{ // 获取包含Hugging Face文本的span元素 const spans = link.querySelectorAll('span.whitespace-nowrap, span.hidden.whitespace-nowrap'); spans.forEach(span => { if (span.textContent && span.textContent.trim().match(/Hugging\s*Face/i)) { span.textContent = 'AI快站'; } }); }); // 替换logo图片的alt属性 document.querySelectorAll('img[alt*="Hugging"], img[alt*="Face"]').forEach(img => { if (img.alt.match(/Hugging\s*Face/i)) { img.alt = 'AI快站 logo'; } }); } // 替换导航栏中的链接 function replaceNavigationLinks() { // 已替换标记,防止重复运行 if (window._navLinksReplaced) { return; } // 已经替换过的链接集合,防止重复替换 const replacedLinks = new Set(); // 只在导航栏区域查找和替换链接 const headerArea = document.querySelector('header') || document.querySelector('nav'); if (!headerArea) { return; } // 在导航区域内查找链接 const navLinks = headerArea.querySelectorAll('a'); navLinks.forEach(link => { // 如果已经替换过,跳过 if (replacedLinks.has(link)) return; const linkText = link.textContent.trim(); const linkHref = link.getAttribute('href') || ''; // 替换Spaces链接 - 仅替换一次 if ( (linkHref.includes('/spaces') || linkHref === '/spaces' || linkText === 'Spaces' || linkText.match(/^s*Spacess*$/i)) && linkText !== 'OCR模型免费转Markdown' && linkText !== 'OCR模型免费转Markdown' ) { link.textContent = 'OCR模型免费转Markdown'; link.href = 'https://fast360.xyz'; link.setAttribute('target', '_blank'); link.setAttribute('rel', 'noopener noreferrer'); replacedLinks.add(link); } // 删除Posts链接 else if ( (linkHref.includes('/posts') || linkHref === '/posts' || linkText === 'Posts' || linkText.match(/^s*Postss*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } // 替换Docs链接 - 仅替换一次 else if ( (linkHref.includes('/docs') || linkHref === '/docs' || linkText === 'Docs' || linkText.match(/^s*Docss*$/i)) && linkText !== '模型下载攻略' ) { link.textContent = '模型下载攻略'; link.href = '/'; replacedLinks.add(link); } // 删除Enterprise链接 else if ( (linkHref.includes('/enterprise') || linkHref === '/enterprise' || linkText === 'Enterprise' || linkText.match(/^s*Enterprises*$/i)) ) { if (link.parentNode) { link.parentNode.removeChild(link); } replacedLinks.add(link); } }); // 查找可能嵌套的Spaces和Posts文本 const textNodes = []; function findTextNodes(element) { if (element.nodeType === Node.TEXT_NODE) { const text = element.textContent.trim(); if (text === 'Spaces' || text === 'Posts' || text === 'Enterprise') { textNodes.push(element); } } else { for (const child of element.childNodes) { findTextNodes(child); } } } // 只在导航区域内查找文本节点 findTextNodes(headerArea); // 替换找到的文本节点 textNodes.forEach(node => { const text = node.textContent.trim(); if (text === 'Spaces') { node.textContent = node.textContent.replace(/Spaces/g, 'OCR模型免费转Markdown'); } else if (text === 'Posts') { // 删除Posts文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } else if (text === 'Enterprise') { // 删除Enterprise文本节点 if (node.parentNode) { node.parentNode.removeChild(node); } } }); // 标记已替换完成 window._navLinksReplaced = true; } // 替换代码区域中的域名 function replaceCodeDomains() { // 特别处理span.hljs-string和span.njs-string元素 document.querySelectorAll('span.hljs-string, span.njs-string, span[class*="hljs-string"], span[class*="njs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换hljs-string类的span中的域名(移除多余的转义符号) document.querySelectorAll('span.hljs-string, span[class*="hljs-string"]').forEach(span => { if (span.textContent && span.textContent.includes('huggingface.co')) { span.textContent = span.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 替换pre和code标签中包含git clone命令的域名 document.querySelectorAll('pre, code').forEach(element => { if (element.textContent && element.textContent.includes('git clone')) { const text = element.innerHTML; if (text.includes('huggingface.co')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 处理特定的命令行示例 document.querySelectorAll('pre, code').forEach(element => { const text = element.innerHTML; if (text.includes('huggingface.co')) { // 针对git clone命令的专门处理 if (text.includes('git clone') || text.includes('GIT_LFS_SKIP_SMUDGE=1')) { element.innerHTML = text.replace(/huggingface.co/g, 'aifasthub.com'); } } }); // 特别处理模型下载页面上的代码片段 document.querySelectorAll('.flex.border-t, .svelte_hydrator, .inline-block').forEach(container => { const content = container.innerHTML; if (content && content.includes('huggingface.co')) { container.innerHTML = content.replace(/huggingface.co/g, 'aifasthub.com'); } }); // 特别处理模型仓库克隆对话框中的代码片段 try { // 查找包含"Clone this model repository"标题的对话框 const cloneDialog = document.querySelector('.svelte_hydration_boundary, [data-target="MainHeader"]'); if (cloneDialog) { // 查找对话框中所有的代码片段和命令示例 const codeElements = cloneDialog.querySelectorAll('pre, code, span'); codeElements.forEach(element => { if (element.textContent && element.textContent.includes('huggingface.co')) { if (element.innerHTML.includes('huggingface.co')) { element.innerHTML = element.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { element.textContent = element.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); } // 更精确地定位克隆命令中的域名 document.querySelectorAll('[data-target]').forEach(container => { const codeBlocks = container.querySelectorAll('pre, code, span.hljs-string'); codeBlocks.forEach(block => { if (block.textContent && block.textContent.includes('huggingface.co')) { if (block.innerHTML.includes('huggingface.co')) { block.innerHTML = block.innerHTML.replace(/huggingface.co/g, 'aifasthub.com'); } else { block.textContent = block.textContent.replace(/huggingface.co/g, 'aifasthub.com'); } } }); }); } catch (e) { // 错误处理但不打印日志 } } // 当DOM加载完成后执行替换 if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', () => { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); }); } else { replaceHeaderBranding(); replaceNavigationLinks(); replaceCodeDomains(); // 只在必要时执行替换 - 3秒后再次检查 setTimeout(() => { if (!window._navLinksReplaced) { console.log('[Client] 3秒后重新检查导航链接'); replaceNavigationLinks(); } }, 3000); } // 增加一个MutationObserver来处理可能的动态元素加载 const observer = new MutationObserver(mutations => { // 检查是否导航区域有变化 const hasNavChanges = mutations.some(mutation => { // 检查是否存在header或nav元素变化 return Array.from(mutation.addedNodes).some(node => { if (node.nodeType === Node.ELEMENT_NODE) { // 检查是否是导航元素或其子元素 if (node.tagName === 'HEADER' || node.tagName === 'NAV' || node.querySelector('header, nav')) { return true; } // 检查是否在导航元素内部 let parent = node.parentElement; while (parent) { if (parent.tagName === 'HEADER' || parent.tagName === 'NAV') { return true; } parent = parent.parentElement; } } return false; }); }); // 只在导航区域有变化时执行替换 if (hasNavChanges) { // 重置替换状态,允许再次替换 window._navLinksReplaced = false; replaceHeaderBranding(); replaceNavigationLinks(); } }); // 开始观察document.body的变化,包括子节点 if (document.body) { observer.observe(document.body, { childList: true, subtree: true }); } else { document.addEventListener('DOMContentLoaded', () => { observer.observe(document.body, { childList: true, subtree: true }); }); } })(); \n\n \n\n
\"; // Texto del email en formato HTML\n $mail->AltBody = \"{$mensaje} \\n\\n \"; // Texto sin formato HTML\n // FIN - VALORES A MODIFICAR //\n\n $mail->SMTPOptions = array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n );\n\n return($mail->Send()); \n \n}","title":""},{"docid":"d181239477daab4bb96cca8169d6ac28","score":"0.608845","text":"function api_melhor_oferta_request(){\n\t\n\n\t$server = $GLOBALS['server'];\n\t$authorization = $GLOBALS['authorization'];\n\n\t// para usar quando passar parametros para a api\n\t//$dados = http_build_query($att);\n\t//$getUrl = $server.\"?\".$dados;\n\n\t$getUrl = $server; //utilizar quando não houver parâmetros\n\n\t$curl = curl_init($getUrl);\n\tcurl_setopt($curl, CURLOPT_URL, $getUrl);\n\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array($authorization));\n\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n\n\t$r = json_decode(curl_exec($curl));\n\n\tcurl_close($curl);\n\n\treturn $r;\n\t\n}","title":""},{"docid":"9ece8f884ae168e7f9e9ae3a23f60a73","score":"0.60883427","text":"public function AplicaOfertaEnJuegos(){\r\n \r\n }","title":""},{"docid":"a5ee85d9181e6f2e922b4516e987fa36","score":"0.60410523","text":"function consignacion_obtenerDatosCONSIGNACION()\n{\n global $PRO_CONSIGNACION_HABILITADO;\n global $PRO_CONSIGNACION_MODO;\n \n $data = new stdClass();\n $data_detalles = new stdClass();\n $data_detalles->habilitado = $PRO_CONSIGNACION_HABILITADO;\n $data_detalles->modo = $PRO_CONSIGNACION_MODO;\n $data->resultado = 'OK';\n $data->mensaje = '¡Datos de CONSIGNACION disponibles!';\n $data->detalles = $data_detalles;\n return $data;\n}","title":""},{"docid":"cd425cee591787156eb484299b6bf2af","score":"0.6021848","text":"public function statusReceita(){\n\t\tApp::import('Vendor', 'ToolsNFePHP', array('file' => 'Nfephp/libs/NFe/ToolsNFePHP.class.php'));\n\t\t$nfe = new ToolsNFePHP;\n\t\theader('Content-type: text/html; charset=UTF-8');\n\t\t$sUF = 'AC;AL;AM;AP;BA;CE;DF;ES;GO;MA;MG;MS;MT;PA;PB;PE;PI;PR;RJ;RN;RO;RR;RS;SC;SE;SP;TO';\n\t\t$sUF = 'RJ';\n\n\t\t//determina o ambiente 1-produção 2-homologação\n\t\t$tpAmb= '2';\n\t\t$aUF = explode(';', $sUF);\n\t\tif ($tpAmb == 1) {\n\t\t $sAmb='Produção';\n\t\t} else {\n\t\t $sAmb='Homologação';\n\t\t}\n\n\t\tforeach ($aUF as $UF) {\n\t\t echo '


';\n\t\t echo \"$UF [ $sAmb ] ==> $UF
\";\n\t\t $resp = $nfe->statusServico($UF, $tpAmb, $retorno);\n\t\t echo print_r($retorno);\n\t\t echo '
';\n\t\t echo $nfe->errMsg.'
';\n\t\t echo '
';\n\t\t    echo htmlspecialchars($nfe->soapDebug);\n\t\t    echo '

';\n\t\t echo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '



';\n\t\t flush();\n\t\t}\n\n\t\t/*\n\t\t//Contignecia SVCAN\n\t\t$UF = 'SP';\n\t\t$nfe->ativaContingencia('SVCAN');\n\t\t$alias = 'SVCAN';\n\t\techo '


';\n\t\techo \"$UF [ $sAmb ] ==> $alias
\";\n\t\t$resp = $nfe->statusServico($UF, $tpAmb, $retorno);\n\t\techo print_r($retorno);\n\t\techo '
';\n\t\techo $nfe->errMsg.'
';\n\t\techo '
';\n\t\techo htmlspecialchars($nfe->soapDebug);\n\t\techo '

';\n\t\techo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '



';\n\t\tflush();\n\n\t\t//Contingecia SVCRS\n\t\t$nfe->ativaContingencia('SVCRS');\n\t\t$alias = 'SVCRS';\n\t\techo '


';\n\t\techo \"$UF [ $sAmb ] ==> $alias
\";\n\t\t$resp = $nfe->statusServico($UF, $tpAmb, $retorno);\n\t\techo print_r($retorno);\n\t\techo '
';\n\t\techo $nfe->errMsg.'
';\n\t\techo '
';\n\t\techo htmlspecialchars($nfe->soapDebug);\n\t\techo '

';\n\t\techo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '



';\n\t\tflush();\n\t\t*/\n\t}","title":""},{"docid":"c5ffadca2e9d7fe661109df56e8e0307","score":"0.5997765","text":"function generarCodigoControl(){\r\n\t\t$this->procedimiento='param.f_utilidades_ime';\r\n\t\t$this->transaccion='PM_GENCC_IME';\r\n\t\t$this->tipo_procedimiento='IME';//tipo de transaccion\r\n\t\t$this->tipo_conexion='seguridad';\r\n\t\t\r\n\t\t$this->arreglo['id_usuario'] = 1;\r\n\t\t\r\n\t\t$this->setParametro('id_usuario','id_usuario','integer');\r\n\t\t\t\t\t\t\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->setParametro('llave','varchar','varchar');\r\n\t\t$this->setParametro('nro_autorizacion','varchar','varchar');\r\n\t\t$this->setParametro('nro_factura','varchar','varchar');\r\n\t\t$this->setParametro('nit','varchar','varchar');\r\n\t\t$this->setParametro('fecha','varchar','varchar'); // formato YYYYMMDD\r\n\t\t$this->setParametro('monto','numeric','numeric');//tiene q ser numerico redondeado a 0 decimales\r\n\t\t\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}","title":""},{"docid":"86b9396fca621122d5c85b3202eee51d","score":"0.5991059","text":"public function apiPagseguro() {\n $this->General = new extend\\General();\n\n //Instancia a classe de configurações\n $this->Config = new objects\\Configuracoes();\n\n //Obtem o valor do cep\n $usuario = $this->input->post( 'usuario_api' );\n $token = $this->input->post( 'token_api' );\n\n //Seta o valor na classe\n $this->Config->valor = $usuario;\n\n //Seta o ID da configuração\n $this->Config->idConfig = 5;\n\n //Grava a configuração\n $this->Config->gravarConfiguracao();\n\n $this->Config->valor = $token;\n\n //Seta o ID da configuração\n $this->Config->idConfig = 6;\n\n //Grava a configuração\n $this->Config->gravarConfiguracao();\n\n //Envia a mensagem para o usuário\n $this->Essentials->setMessage( 'Gravado com sucesso', 100 );\n\n }","title":""},{"docid":"1a855d77a3b198bd58e0c666168f8271","score":"0.59580106","text":"function ferPeticio($cat, $novetats, $valorats, $buscador, $idLector, $idLlibre){\n $db=Database::conectar();\n $peticioMetode = $_SERVER[\"REQUEST_METHOD\"];\n $controller = new LlibreControllerApi($db, $peticioMetode, $cat, $novetats, $valorats, $buscador, $idLector, $idLlibre);\n $controller->processRequest();\n}","title":""},{"docid":"de6d5a9a34693817d76d53de57eb7545","score":"0.59040356","text":"static public function ctrAltaCasoSeguimiento()\n {\n if(isset($_POST[\"rfc-cliente\"]) && isset($_POST[\"nombreRS-cliente\"]) )\n {\n $tabla = \"tbl_clientes_inbursa\";\n\n $datos = array(\n\n \"tci_cod_caso\" => $_POST[\"codCaso\"],\n \"tci_rfc\" => $_POST[\"rfc-cliente\"],\n \"tci_nombre_razon_social\" => $_POST[\"nombreRS-cliente\"],\n \"tci_id_persona\" => $_POST[\"id-cliente\"],\n \"tci_numero_cuenta\" => $_POST[\"numeroCuenta-cliente\"],\n \"tci_situacion_actual\" => $_POST[\"situacion-cliente\"],\n \"tci_seguimiento\" => $_POST[\"seguimiento-cliente\"],\n \"tci_observaciones\" => $_POST[\"observaciones-cliente\"]\n );\n\n $respuesta = ModeloSigai::mdlAltaCasoSeguimiento($tabla,$datos);\n\n return $respuesta;\n }\n\n }","title":""},{"docid":"18a226e34ada98162812e200ba7742e2","score":"0.58604634","text":"function obtnerUosEpsDetalleObligacion()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_OBEPUO_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"b5fb202dd44cd7af9fea870a457acbe7","score":"0.58438915","text":"function recuperarDetalleCotizacion(){\r\n\t\t\t\t$this->procedimiento='mat.ft_cotizacion_ime';\r\n\t\t\t\t$this->transaccion='MAT_REC_DET_SOL';\r\n\t\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n\t\t\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }","title":""},{"docid":"c19a8fb31cc9edebb8fb73c2d59c3c67","score":"0.58249956","text":"function recuperarDatosFiltro()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_GETFILOP_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"4a66945c31e66ff379d7af1312101a73","score":"0.5823086","text":"function listarContactos(){\r\n $this->procedimiento='mat.ft_cotizacion_sel';\r\n $this->transaccion='MAT_CONT_PROVE_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n\t\t\t\t$this->captura('id_proveedor_contacto','int4');\r\n $this->captura('id_proveedor_contacto_alkym','int4');\r\n $this->captura('nombre_contacto','varchar');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }","title":""},{"docid":"d3b9cbc0440712909d53331beea437e5","score":"0.58130354","text":"private function TccGrabarDespacho( $Destinatario, $Direccion, $Telefono, $Ciudad, $Observaciones, $ReclamaBodega,\n $KilosReales, $PesoVolumen,$VrMcia, $Boomerang, $FechaDespacho, $TipoDocumento,\n $NumeroDocumento, $FechaDocumento, $CodBarra ){\n // Pruebas\n //$url = 'http://clientes.tcc.com.co/preservicios/wsdespachos.asmx?wsdl';\n \n \n\n $url = TCC_SOAP_ENDPOINT;\n\n $DocumentoReferencia = array(\n array('tipodocumento' => $TipoDocumento,\n 'numerodocumento' => $NumeroDocumento,\n 'fechadocumento' => $FechaDocumento\n )\n );\n\n //Se configuran las unidades de la remesa para este ejemplo se envian dos unidades\n if ( $Boomerang == 0) {\n $unidad = array(\n array('tipounidad' => 'TIPO_UND_PAQ',\n 'claseempaque' => '',\n 'dicecontener' => $Observaciones,\n 'cantidadunidades' => '1',\n 'kilosreales' => $KilosReales,\n 'pesovolumen' => $PesoVolumen,\n 'valormercancia' => $VrMcia,\n 'codigobarras' => $CodBarra\n )\n );\n }else{\n $unidad = array(\n array('tipounidad' => 'TIPO_UND_DOCB',\n 'claseempaque' => 'CLEM_SOBRE',\n 'dicecontener' => $Observaciones,\n 'cantidadunidades' => '1',\n 'kilosreales' => '0',\n 'pesovolumen' => '0',\n 'valormercancia' => '0',\n 'codigobarras' => $CodBarra\n )\n );\n }\n \n $objDespacho = array(\n 'objDespacho' => array(\n 'clave' => TCC_SOAP_PASSWORD,\n 'fechahoralote' => '',\n 'numeroremesa' => '',\n 'numeroDepacho' => '',\n 'unidadnegocio' => '1',\n 'fechadespacho' => $FechaDespacho,\n 'cuentaremitente' => TCC_SOAP_CUENTA,\n 'sederemitente' => '',\n 'primernombreremitente' => '',\n 'segundonombreremitente' => '',\n 'primerapellidoremitente' => '',\n 'segundoapellidoremitente' => '',\n 'razonsocialremitente' => 'CRIPACK S.A.S.',\n 'naturalezaremitente' => 'J',\n 'tipoidentificacionremitente' => 'NIT',\n 'identificacionremitente' => '800149062',\n 'telefonoremitente' => '8298217',\n 'direccionremitente' => 'CARRERA 6 # 21 - 44 ',\n 'ciudadorigen' => '76001000',\n 'tipoidentificaciondestinatario' => '',\n 'identificaciondestinatario' => '',\n 'sededestinatario' => '',\n 'primernombredestinatario' => '',\n 'segundonombredestinatario' => '',\n 'primerapellidodestinatario' => '',\n 'segundoapellidodestinatario' => '',\n 'razonsocialdestinatario' => $Destinatario,\n 'naturalezadestinatario' => 'N',\n 'direcciondestinatario' => $Direccion,\n 'telefonodestinatario' => $Telefono,\n 'ciudaddestinatario' => $Ciudad,\n 'barriodestinatario' => '',\n 'totalpeso' => '',\n 'totalpesovolumen' => '',\n 'formapago' => '',\n 'observaciones' => $Observaciones,\n 'llevabodega' => '',\n 'recogebodega' => $ReclamaBodega,\n 'centrocostos' => '',\n 'totalvalorproducto' => '',\n 'unidad' => $unidad,\n 'documentoreferencia' => $DocumentoReferencia,\n 'generarDocumentos' => true\n ),'respuesta' => 0,\n 'remesa' => '',\n 'URLRelacionEnvio' => '',\n 'URLRotulos' => '',\n 'URLRemesa' => '',\n 'IMGRelacionEnvio' => null,\n 'IMGRotulos' => null,\n 'IMGRemesa' => null,\n 'respuesta' => 0,\n 'mensaje' => ''\n );\n \n\n\n $client = new SoapClient($url);\n $remesa = new \\StdClass;\n $remesa->remesa = '';\n $URLRelacionEnvio = new \\StdClass;\n $URLRelacionEnvio->URLRelacionEnvio ='';\n $URLRotulos = new \\StdClass;\n $URLRotulos->URLRotulos ='';\n $URLRemesa = new \\StdClass;\n $URLRemesa->URLRemesa ='';\n $IMGRelacionEnvio = new \\StdClass;\n $IMGRelacionEnvio->IMGRelacionEnvio = null;\n $IMGRotulos = new \\StdClass;\n $IMGRotulos->IMGRotulos =null;\n $IMGRemesa = new \\StdClass;\n $IMGRemesa->IMGRemesa =null;\n $respuesta = new \\StdClass;\n $respuesta->respuesta = 0;\n $mensaje = new \\StdClass;\n $mensaje->mensaje = '';\n \n\n try {\n\n //Despues de realizar la configuración del xml a enviar, se realiza el consumo del servicio web\n $resp = $client->GrabarDespacho4($objDespacho, $remesa,$URLRelacionEnvio,$URLRotulos,$URLRemesa,$IMGRelacionEnvio,$IMGRotulos,$IMGRemesa,$respuesta,$mensaje);\n \n //Aqui se hace el manejo de la excepción del consumo\n echo $client->__getLastRequest() .\"\\n\";\n\n }catch(Exception $e){\n echo 'Excepción capturada: ', $e->getMessage() , '
';\n }\n\n\n $NumeroRemesa = intval($resp->remesa);\n if ( $NumeroRemesa > 0 ) {\n $this->RespuestaTcc = substr( $resp->mensaje,0,45);\n //Se realiza la decodificación del string enviado por el servicio a base64 para su posterior grabación o descarga en un archivo binario.\n // $decoded = base64_decode($resp->IMGRelacionEnvio);\n //Se asigna el nombre del archivo\n // $file = \"$resp->remesa\".'.pdf';\n //Se realiza la descarga del archivo.\n // file_put_contents($file, $resp->IMGRelacionEnvio);\n //echo($file);\n return $NumeroRemesa;\n } else {\n var_dump($resp->mensaje);\n echo '
';\n return -1;\n }\n\n /* $arrayDe100Valores = array( array());\n for($i = 0; $i < 10; $i++) {\n $arrayDe100Valores[$i]['tipounidad'] = $i;\n $arrayDe100Valores[$i]['claseempaque'] = '525000';\n\n }\n\n\n Debug::Mostrar($unidad);\n Debug::Mostrar($arrayDe100Valores);\n\n return ;\n //Se configura la informacion de la remesa, IMPORTARTE ACLARAR QUE LA VARIABLE \"Clave\",\n //es la asignada por TCC para cada cliente, por tal motivo en el ejemplo se envia como XXXXXXXXXXXX la cual NO funcionará hasta tanto NO sea reemplazada.\n*/\n //var_dump($resp->URLRelacionEnvio);\n //var_dump($resp->URLRotulos);\n // var_dump($resp->respuesta);\n //echo '
';\n // var_dump($resp->mensaje);\n // echo '
';\n //var_dump($resp);\n\n }","title":""},{"docid":"618fec855c3a40ce665f3a81ca59024b","score":"0.5801897","text":"private function get_api_psa_conn_car($param, $fields = null)\n {\n $session = curl_init();\n curl_setopt($session, CURLOPT_URL, $this->url_api_psa_conn_car.$param);\n curl_setopt($session, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Authorization: Bearer ' . $this->access_token[\"access_token2\"]));\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n if (isset($fields)) {\n curl_setopt($session, CURLOPT_POSTFIELDS, $fields);\n }\n $json = curl_exec($session);\n // Vérifie si une erreur survient\n if(curl_errno($session)) {\n $info = [];\n echo 'Erreur Curl : ' . curl_error($session);\n }\n else {\n $info = curl_getinfo($session);\n }\n curl_close($session);\n $ret_array[\"info\"] = $info;\n $ret_array[\"result\"] = json_decode($json);\n return $ret_array;\n }","title":""},{"docid":"d259f16493c2010f2c88e7e5379ebc86","score":"0.57956374","text":"public function puxaCentrosCustoLucro(){ \n \n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/centros_custo_lucro?access_token='.$this->chave_granatum);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $result = curl_exec($ch);\n if (curl_errno($ch)) {\n echo 'Error:' . curl_error($ch);\n }\n $this->centros_custo_lucro = json_decode($result, true);\n\n curl_close($ch);\n }","title":""},{"docid":"c55c66cbd73cd49d9be285e97c8d3588","score":"0.5784577","text":"function obtenerModalidad(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='adq.f_solicitud_ime';\n $this->transaccion='ADQ_RECUMOD_GET';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud','id_solicitud','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //echo $this->consulta;exit;\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"aa16a23c0d33ae302d65d52b14aa5437","score":"0.5755566","text":"function NuevoPresupuestoCLI($campos, $filtros, $items_std)\n\t\t{\n\t\t$this->con_sql = $this->GetConex();\n\t\t$this->LimpiarClase();\n\t\t\n\t\t$this->encabezado[NUM_OT] = 0;\n\t\t$this->encabezado[NUM_PRES] = 0;\t\t\n\t\t$this->encabezado[NUM_STD] = $campos[NUM_STD];\n\t\t$this->encabezado[NUM_MOTOR] = $this->GetNroMotor($this->encabezado[NUM_STD]);\n\t\t$this->encabezado[DESC_PRES] = $campos[DESC_PRES];\n\t\t$this->encabezado[CLIENTE] = $campos[CLIENTE];\n\t\t$this->encabezado[DIRECCION] = $campos[DIRECCION];\n\t\t$this->encabezado[TELEFONO] = $campos[TELEFONO];\n\t\t$this->encabezado[LOCALIDAD] = $campos[LOCALIDAD];\n\t\t$this->encabezado[DESC_MOTOR] = BuscarDescripcionMotor($this->con_sql, $this->encabezado[NUM_MOTOR]);\n\t\t$this->encabezado[DESCUENTO] = $campos[DESCUENTO];\n\t\t$this->encabezado[LISTA_MOB]=BuscarNroLista($this->con_sql, $this->encabezado[NUM_MOTOR]);\n\n\t\t$this->campos_enc=ENC_CLI;\n\t\t$this->tipo=CLI;\n\t\t$this->filtros=$filtros;\n\t\t$this->items_std=$items_std;\n\t\t$this->ArmarMOB(CLI, $this->nro, EDIT);\n\t\t$this->ArmarMAT(CLI, $this->nro, EDIT);\n\t\t$this->MostrarPresOT(CLI, $this->nro, EDIT, 1);\n\t\t}","title":""},{"docid":"973a8b8c5dde8ff74b84017f735c0012","score":"0.5754738","text":"function procesa()\n {\n $this->inicio();\n $arguments = array();\n $arguments = $this->decodeGetData($this->argumentos);\n call_user_func_array(array($this,$this->funcion),$arguments);\n $this->termina();\n }","title":""},{"docid":"ce990ce5fac7751645e342efb14f8989","score":"0.5747082","text":"function recuperarComite()\n {\n\n $this->procedimiento = 'adq.f_solicitud_sel';\n $this->transaccion = 'ADQ_RMEMOCOMDCR_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n $this->setCount(false);\n\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n\n //Definicion de la lista del resultado del query\n\n\n $this->captura('funcionario', 'text');\n $this->captura('proveedor', 'varchar');\n $this->captura('tramite', 'varchar');\n $this->captura('nombres', 'varchar');\n $this->captura('fecha_po', 'varchar');\n\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"1469e284c6a3d4626fb710340a58c704","score":"0.57444644","text":"function abrirCerrarPeriodo(){\n\t\t$this->procedimiento='ccb.f_estado_periodo_ime';\n\t\t$this->transaccion='CCB_ABRCERAR_INS';\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_estado_periodo','id_estado_periodo','int4');\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}","title":""},{"docid":"62f2839d37e205a352438ad9495a94b8","score":"0.5715195","text":"function getConturData($params_arr, $type = '/api3/req')\n{\n $answ_str = '';\n\n if(!is_array($params_arr) || count($params_arr) == 0)\n {\n $answ_str = 'error';\n }\n else\n {\n $options = array(\n CURLOPT_RETURNTRANSFER => true, // return web page\n CURLOPT_HEADER => false, // don't return headers\n CURLOPT_FOLLOWLOCATION => true, // follow redirects\n CURLOPT_ENCODING => \"\", // handle all encodings\n CURLOPT_AUTOREFERER => true, // set referer on redirect\n CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect\n CURLOPT_TIMEOUT => 120, // timeout on response\n CURLOPT_MAXREDIRS => 10, // stop after 10 redirects\n CURLOPT_SSL_VERIFYPEER => false // Disabled SSL Cert checks\n );\n\n $ch = curl_init('https://focus-api.kontur.ru' . $type . '?key=' . $GLOBALS['conturKey'] . '&pdf=False&' . http_build_query($params_arr));\n curl_setopt_array($ch, $options);\n $answ_str = curl_exec($ch);\n curl_close($ch);\n }\n\n return $answ_str;\n}","title":""},{"docid":"6450c9589a4d14b3a549e0c4a2989aa2","score":"0.57064664","text":"private function getApi()\n\t{\n\t\t$this->getApiKeyWEB();\n\t\t//$this->getApiKeySEP();\n\t\t$respu = null;\n\t\t$respuesta = null;\n\t\tfor ($i = 0; $i < count($this->controllers); $i++)\n\t\t{\n\t\t\tswitch($this->controllers[$i]['tipo'])\n\t\t\t{\n\t\t\t\tcase 'GET':\n\t\t\t\tcase 'get':\n\t\t\t\t{\n\t\t\t\t\t$respu = $this->getApiGet($this->controllers[$i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'POST':\n\t\t\t\tcase 'post':\n\t\t\t\t{\n\t\t\t\t\t$respu = $this->getApiPost($this->controllers[$i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*\n\t\t\tif ($respu['success'] && !isset($respu['curlError']))\n\t\t\t{\n\t\t\t*/\n\t\t\t\t$this->dataPropagationControl(array(\n\t\t\t\t\t'controller'=>$this->controllers[$i],\n\t\t\t\t\t'response'=>$respu\n\t\t\t\t));\n\t\t\t\tif (isset($this->controllers[$i]['noSeLlama']) ? $this->controllers[$i]['noSeLlama'] : false)\n\t\t\t\t{\n\t\t\t\t\t$respuesta[\"{$this->controllers[$i]['nombre']}->{$this->controllers[$i]['metodo']}\"] = $respu;\n\t\t\t\t}\n\t\t\t/*\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->status = false;\n\t\t\t\t$respuesta = $respu;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\treturn $respuesta;\n\t}","title":""},{"docid":"d3556c40610f8568796f40da2e40ded0","score":"0.5693608","text":"public function venta_rapida(){\n\t\t$parametros = json_decode($_POST['parametros']);\n\n\t\t$id_servicio = $parametros->idServicio;\n\t\t$pago = $parametros->pago;\n\t\t$id_sucursal = $parametros->idSucursal;\n\t\t$id_vendedor = $parametros->idVendedor;\n\n\t\tif($id_servicio == 'otro'){\n\t\t\t// agregamos la info del catalogo_servicio_rapido\n\t\t\t$datos_servicio = array(\n\t\t\t\t'nombre' => $parametros->nuevoServicio,\n\t\t\t\t'fecha_registro' => time()\n\t\t\t);\n\t\t\t$this->add_model->agregar($datos_servicio, 'catalogo_servicio_rapido');\n\t\t\t$id_servicio = $this->db->insert_id();\n\t\t}\n\n\t\t// agregamos la info del servicio rapido\n\t\t$data_info_servicio_rapido = array(\n\t\t\t'fk_id_catalogo_servicio_rapido' => $id_servicio,\n\t\t\t'monto' => $pago,\n\t\t\t'id_usuario' => $id_vendedor,\n\t\t\t'fk_id_sucursal' => $id_sucursal,\n\t\t\t'fecha_registro' => time()\n \t\t);\n\t\t$this->add_model->agregar($data_info_servicio_rapido, 'servicio_rapido');\n\t}","title":""},{"docid":"4f4bd6374ca4158105a25ad3e1f828ff","score":"0.5678532","text":"public function proximocodigoAction() {\n\n // Desabilita a view. Estes comandos são utilizados sempre que a resposta for JSON\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout->disableLayout();\n\n try {\n\n // Busca o proximo codigo de cadastro e o atribui no formulario\n $this->_dataModule->camposForm['codigo'] = $this->_dataModule->qryBuscaProximoCodigo();\n\n // Recupera as permissoes dos botoes\n $this->_dataModule->atribuiPermissoesBotoes(FORM_ADD);\n\n // Adiciona a resposta de preenchimento de formulario\n JSONMessage::getInstance()->add(JSONMessageFactory::factoryForm($this->_dataModule->camposForm, 'descricao'));\n\n } catch(DSINWebAppsException $dwaex) {\n \n // Adiciona mensagem de excecao\n JSONMessage::getInstance()->add(JSONMessageFactory::factoryException($dwaex->getMessage()));\n\n }\n\n echo JSONMessage::getInstance();\n exit;\n\n }","title":""},{"docid":"a237ed27493e91f4aec0f2a0d35a5f8f","score":"0.56756836","text":"function ejecutarAplicacionExterna($datos, $codigo, $metodo) {\n try {\n $this->conectar();\n $consultasDAO = new ConsultasDAO();\n $consultasDAO->setConexion($this->conexion);\n $aplicacion = $consultasDAO->getAplicacionExterna($codigo);\n if (is_null($aplicacion)) {\n return false;\n }\n $headers = null;\n if ($aplicacion->esAutenticable == 'SI') {\n $respuesta = $this->getAutenticar($aplicacion);\n if (is_null($respuesta)) {\n return false;\n }\n if (!is_null($aplicacion->tramaHederToken)) {\n $headers = $this->getHeaderAutenticar($aplicacion, $respuesta->data->token);\n }\n }\n if ($aplicacion->esRegistrable == 'SI') {\n $respuesta = $this->registrar($aplicacion, $headers, $datos);\n if (!$this->validarRespuesta($aplicacion, $respuesta)) {\n return false;\n }\n }\n\n $mailBO = new MailBO();\n $mailBO->setConexion($this->conexion);\n $data = $mailBO->getTramaJSON($datos->cod_trama, $datos);\n $ch = curl_init($aplicacion->api . \"/$metodo\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n //establecemos el verbo http que queremos utilizar para la petición\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\n\n if (!is_null($headers))\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n //enviamos el array data\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\n //obtenemos la respuesta\n $response = curl_exec($ch);\n // Se cierra el recurso CURL y se liberan los recursos del sistema\n curl_close($ch);\n if (!$response) {\n return false;\n } else {\n return $this->validarRespuesta($aplicacion, json_decode($response));\n }\n } catch (Exception $ex) {\n return false;\n } finally {\n $this->cerrarConexion();\n }\n }","title":""},{"docid":"3306c9d199ba6218d5e4e3b288d8f521","score":"0.5627823","text":"function corredores(){\r\n\t$ck = arrumaCookie(cookieSecao());\r\n\treturn json_decode(do_get_request(urlSp.urlCorredor,$ck),true);\r\n}","title":""},{"docid":"f07dcadb06b288c3ba2b8d37d3e15132","score":"0.56275564","text":"function gestionarWF(){\n $this->procedimiento='ven.ft_pedido_det_ime';\n $this->transaccion='VEN_DETPED_WF';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_pedido_det','id_pedido_det','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('operacion','operacion','varchar');\n $this->setParametro('id_funcionario','id_funcionario','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('obs','obs','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"a431781526333d386080ca7a5c632ce7","score":"0.5625936","text":"function getBasements(){\n\t\t$ch = curl_init();\n\t\t$dati = array();\n\t\t// imposto la URl del web-service remoto\n\t\tcurl_setopt($ch, CURLOPT_URL, 'localhost/server/api/basement/read.php');\n\t\t\n\t\t// Chiamo l'API tramite PUT\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\t\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\");\n\n\t\t// imposto gli header correttamente\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t 'Content-Type: application/json')\n\t\t);\n\n\t\t// eseguo la chiamata\n\t\t$response = json_decode(curl_exec($ch), true);\n\t\t\n\t\t// chiudo\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}","title":""},{"docid":"dc71dabc56ae4af06d8b38fa4b22f1fe","score":"0.5619985","text":"public function contaLancamentosConta(){\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/lancamentos?access_token='.$this->chave_granatum);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"conta_id=39820&data_inicio=\".$this->p_dia.\"&data_fim=\".$this->h_dia.\"&tipo_view=count\");\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $result = curl_exec($ch);\n if (curl_errno($ch)) {\n echo 'Error:' . curl_error($ch);\n }\n $this->n_lancamentos_conta = json_decode($result, true);\n\n curl_close($ch);\n }","title":""},{"docid":"f027f13af23e2ce7ae40104461ef452f","score":"0.5619718","text":"function extenderOp()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_EXTOP_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('id_administrador', 'id_administrador', 'int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"74456da17d4d314b4a856677b4db050a","score":"0.56115645","text":"function siguienteEstadoObligacion()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_SIGESTOB_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\n $this->setParametro('id_depto_lb', 'id_depto_lb', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('json_procesos', 'json_procesos', 'text');\n $this->setParametro('instruc_rpc', 'instruc_rpc', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"8016ea811716697ceca31c5434cb30d9","score":"0.56111866","text":"public function index(){\n $client = new SoapClient(\"http://test.analitica.com.co/AZDigital_Pruebas/WebServices/ServiciosAZDigital.wsdl\",$this->options);\n $client->__setLocation('http://test.analitica.com.co/AZDigital_Pruebas/WebServices/SOAP/index.php');\n \n// parametros de la consulta\n $params = [\n 'Condiciones' => \n [\n 'Condicion' => [\n 'Tipo' => 'FechaInicial',\n 'Expresion' => '2019-07-01 00:00:00',\n ]\n ]\n ];\n \n \n try { // funcion del soap para la consulta ( segun la prueba enviada )\n $response = $client->__soapCall('BuscarArchivo', array($params));\n\n //krumo($response->Archivo);\n\n // funcion que agrega los datos a la tabla de Archivos ( si sale ok en pantalla ya fue lleno las tablas SQL )\n if ($this->b2btic_model->addAll($response->Archivo)) {\n echo \"ok\";\n }\n\n else {\n echo \"Error\";\n }\n }\n catch(Exception $e) {\n print_r($e);\n echo \"Exception: \" . $e->getMessage();\n }\n \n \n \n}","title":""},{"docid":"3d2b112c4780d0d4e65b6c3807d52008","score":"0.5601828","text":"public static function getWSClearView()\n {\n $procesado =2;\n $id=Input::get('id', '');//id de la tarea\n $sql =\"UPDATE tareas SET procesado=? WHERE id=?\";\n try {\n DB::update($sql, array($procesado,$id));\n } catch (Exception $e) {\n \n }\n $result = array();\n $msj=\"\";\n $telefono=Input::get('telefono', '');\n //$idConsulta=Input::get('idConsulta', '');\n $idConsulta = date('YmdHis'); // Debe enviar una fecha en este formato\n \n $url = \"http://10.226.88.214/WSASSIA/wsASSIA.php/RegistrarDiagnostico/\"\n .$telefono.\"/\".$idConsulta;\n try {\n $ch = curl_init();\n if (FALSE === $ch)\n throw new Exception('failed to initialize');\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, false);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n if( $result === false)\n $msj= 'no se pudo establecer conexion ' . curl_error($ch);\n \n $result = json_decode($result);\n curl_close($ch);\n } catch (Exception $e) {\n trigger_error(\n sprintf(\n 'Curl failed with error #%d: %s',\n $e->getCode(),\n $e->getMessage()\n ),\n E_USER_ERROR\n );\n }\n //$result = json_decode('[{\"id\":16,\"Desc\":\"No se obtiene respuesta. \n //Revisar linea o modem\",\"Tel\":\"12421836\",\"Ok\":0}]');\n \n if (count($result)>0) {\n $id = $result[0]->id;\n $Desc = $result[0]->Desc;\n $Tel = $result[0]->Tel;\n $Ok = $result[0]->Ok;\n if ($Ok==1) {\n $msj = $Tel.\": Linea OK\";\n } elseif ($Ok==0) {\n $msj = $Tel.\": No OK\";\n }\n $procesado=1;\n\n try {\n DB::update($sql, array($procesado,$id));\n } catch (Exception $e) {\n \n }\n }\n \n return\n array(\n 'rst'=>'1',\n 'datos'=> $msj,\n 'msj'=>$msj,\n );\n }","title":""},{"docid":"fc6f75293513b8395954324831959fad","score":"0.5600897","text":"function obtenerIdsExternos()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_IDSEXT_GET';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('sistema', 'sistema', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"f7498efafa1effda34b211bdca0abe0c","score":"0.5576825","text":"static public function ctrRegistroBitacora(){\r\n\r\n\t\tif (isset($_POST[\"editarIdPedido\"])) {\r\n\r\n\t\t$tabla = \"bitacora\";\r\n\r\n\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t \"accion\" => 'Edición de Pedido Laboratorio',\r\n\t\t\t\t\t\t\t \"folio\" => $_POST[\"editarIdPedido\"]);\r\n\r\n\t\t$respuesta = ModeloLaboratorio::mdlRegistroBitacora($tabla, $datos);\r\n\r\n\t\treturn $respuesta;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}","title":""},{"docid":"a7d57e72b0e01622fbf4bdc52691e0ae","score":"0.5566543","text":"function API_semanas($usuario,$anio){\n\t$ClsPro = new ClsProgramacionPPM();\n\t$ClsAct = new ClsActivo();\n\t$ClsUsu = new ClsUsuario();\n\tif($usuario != \"\" && $anio != \"\"){\n\t\t$result = $ClsUsu->get_usuario_sede(\"\",$usuario,\"\");\n\t\tif(is_array($result)){\n\t\t\t$sedes = \"\";\n\t\t\tforeach($result as $row){\n\t\t\t\t$sedes.= trim($row[\"sus_sede\"]).\",\";\n\t\t\t}\n\t\t\t$sedes = substr($sedes,0,-1);\n\t\t}\n\t\t$semana_actual = date(\"W\");\n\t\t$semana_actual = ($semana_actual == 0)?7:$semana_actual;\n\t\t$i = 0;\n\t\t$arr_data = array();\n\t\tfor($semana = 1; $semana <= 52; $semana++){\n\t\t\tif($semana < $semana_actual){\n\t\t\t\t$semana = (strlen($semana) <= 1)?\"0$semana\":$semana;\n\t\t\t\t$desde = date(\"d/m/Y\", strtotime($anio.\"-W\".$semana.'-1'));\n\t\t\t\t$hasta = date(\"d/m/Y\", strtotime($anio.\"-W\".$semana.'-7'));\n\t\t\t\t$rango_fechas = \"$desde - $hasta\";\n\t\t\t\t\n\t\t\t\t$result = $ClsPro->get_programacion($codigo,$activo,$usuario,$categoria,$sedes, '', '', $desde, $hasta);\n\t\t\t\t$normal = 0;\n\t\t\t\t$vencido = 0;\n\t\t\t\tif(is_array($result)){\n\t\t\t\t\tforeach ($result as $row){\n\t\t\t\t\t\t//conteo de dias\n\t\t\t\t\t\t$programado = trim($row[\"pro_fecha\"]).\" 23:59:59\";\n\t\t\t\t\t\t$fecha_update = trim($row[\"pro_fecha_update\"]);\n\t\t\t\t\t\t$vencimiento = comparaFechas($programado, $fecha_update);\n\t\t\t\t\t\t$situacion = $row[\"pro_situacion\"];\n\t\t\t\t\t\tif($vencimiento == 2){ // vencido\n\t\t\t\t\t\t\t$vencido++;\n\t\t\t\t\t\t}else{ // normal\n\t\t\t\t\t\t\t$normal++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($vencido > 0){\n\t\t\t\t\t$estado = 2;\n\t\t\t\t}else{\n\t\t\t\t\t$estado = 1;\n\t\t\t\t}\n\t\t\t}else if($semana == $semana_actual){\n\t\t\t\t$estado = 3;\n\t\t\t}else{\n\t\t\t\t$estado = 4;\n\t\t\t}\n\t\t\t$arr_data[$i]['semana'] = intval($semana);\n\t\t\t$arr_data[$i]['rango_fechas'] = $rango_fechas;\n\t\t\t$arr_data[$i]['estado'] = intval($estado);\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t$payload = array(\n\t\t\t\"status\" => true,\n\t\t\t\"data\" => $arr_data,\n\t\t\t\"message\" => \"\");\n\n\t\techo json_encode($payload);\n\t\t\n\t}else{\n\t\t//devuelve un mensaje de manejo de errores\n\t\t$payload = array(\n\t\t\t\"status\" => false,\n\t\t\t\"data\" => [],\n\t\t\t\"message\" => \"Uno de los campos esta vacio...\");\n\t\t\techo json_encode($payload);\n\t}\n}","title":""},{"docid":"49798c3aa3ce5cb9a410ac08d0626738","score":"0.55656993","text":"public function testapicarga(){\n $res=\n $this->call('POST', 'api/Sigex/Inspecciones/', array(\n \"id\"=> 207,\n \"nroControl\"=> 51,\n \"fechaProgramacion\"=> \"2020-06-15\",\n \"fechaRealizado\"=> \"2020-06-15\",\n \"observaciones\"=> \"\",\n \"estado\"=> 1,\n \"tipo\"=> 1,\n \"contrato\"=>array( \n \"nroContrato\"=> \"CO010\",\n \"fechaCarga\"=> \"2019-06-24\",\n \"periodo\"=> 7,\n \"estado\"=> 1,\n \"fechaInicio\"=> \"2019-06-24\",\n \"fechaFin\"=> \"2020-08-30\",\n \"observaciones\"=> \"\",\n \"cod_Cliente\"=> 195,\n \"idSucursal\"=> 354,\n \"id\"=> 11,\n \"sucursales\"=>array(\n \"idSucursal\"=> 354,\n \"nombre\"=> \"Aeroparque\",\n \"sectores\"=>array(\n \"idSector\"=> 160,\n \"numero\"=> \"001\",\n \"sector\"=> \"General\",\n \"cod_Cliente\"=> 195,\n \"idSucursal\"=> 534,\n \"estadoSubida\"=> 1,\n \"habilitado\"=> 1,\n \"puestos\"=>array(\n \"idPuesto\"=> 4270,\n \"nroPuesto\"=> \"001\",\n \"ubicacion\"=> \"Escalera\",\n \"habilitado\"=> 1,\n \"idCapacidad\"=> 1,\n \"idSector\"=> 160,\n \"tipoDeEquipo\"=>array(\n \"tipoDeEquipo\"=> \"ABC-PQS\",\n \"tipogenerico\"=>array(\n \"tipo\"=> \"Polvo\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 1\n )\n ),\n \"equipo\"=> array(\n \"elemento_id\"=> 18715,\n \"numeroDeEquipo\"=> \"11897\",\n \"FechaFabricacion\"=> \"04\\\\/98\",\n \"fechaUltimaPH\"=> \"06\\\\/12\",\n \"vencimientoDeCarga\"=> \"2016-09-16\",\n \"vencimientoDePH\"=> \"2017-06-01\",\n \"codigoInternoCliente\"=> \"3\",\n \"observaciones\"=> \"\",\n \"disponible\"=> true,\n \"vencimientoVidaUtil\"=> \"2018-04-01\",\n \"tipo\"=>array (\n \"tipoDeEquipo\"=> \"HCFC 123\",\n \"tipogenerico\"=>array(\n \"tipo\"=> \"Halogenado\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 5\n )\n ),\n \"idCapacidad\"=> 1,\n \"marca\"=>array (\n \"id\"=> 10,\n \"Marca\"=> \"DRAGON\",\n \"marcaMOST\"=> \"Otros\"\n ),\n \"codCliente\"=> 290,\n \"sucursal\"=>array(\n \"idSucursal\"=> 629,\n \"nombre\"=> \"22 DE SEPTIEMBRE S.A. - Casa Central\",\n \"sectores\"=>array()\n ),\n \"idEquipo\"=> 4\n \n )\n\n ),\n ),\n ),\n ),\n \"inspecciones\"=> array(\n \"fechahora\"=> \"08/12/2019 01=>00=>00\",\n \"observaciones\"=> \"\",\n \"estado\"=> 1,\n \"idControlPeriodico\"=> 207,\n \"puesto\"=> array(\n \"idPuesto\"=> 4270,\n \"nroPuesto\"=> \"001\",\n \"ubicacion\"=> \"Escalera\",\n \"habilitado\"=> 1,\n \"idCapacidad\"=> 1,\n \"idSector\"=> 160,\n \"tipoDeEquipo\"=> array(\n \"tipoDeEquipo\"=> \"ABC-PQS\",\n \"tipogenerico\"=> array(\n \"tipo\"=> \"Polvo\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 1\n )\n ),\n \"equipo\"=> array(\n \"elemento_id\"=> 18715,\n \"numeroDeEquipo\"=> \"11897\",\n \"FechaFabricacion\"=> \"04\\\\/98\",\n \"fechaUltimaPH\"=> \"06\\\\/12\",\n \"vencimientoDeCarga\"=> \"2016-09-16\",\n \"vencimientoDePH\"=> \"2017-06-01\",\n \"codigoInternoCliente\"=> \"3\",\n \"observaciones\"=> \"\",\n \"disponible\"=> true,\n \"vencimientoVidaUtil\"=> \"2018-04-01\",\n \"tipo\"=> array(\n \"tipoDeEquipo\"=> \"HCFC 123\",\n \"tipogenerico\"=> array(\n \"tipo\"=> \"Halogenado\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 5\n )\n ),\n \"idCapacidad\"=> 1,\n \"marca\"=> array(\n \"id\"=> 10,\n \"Marca\"=> \"DRAGON\",\n \"marcaMOST\"=> \"Otros\"\n ),\n \"codCliente\"=> 290,\n \"sucursal\"=> array(\n \"idSucursal\"=> 629,\n \"nombre\"=> \"22 DE SEPTIEMBRE S.A. - Casa Central\",\n \"sectores\"=> array()\n ),\n \"idEquipo\"=> 4\n )\n ),\n \"equipo\"=> array(\n \"elemento_id\"=> 18715,\n \"numeroDeEquipo\"=> \"11897\",\n \"FechaFabricacion\"=> \"04\\\\/98\",\n \"fechaUltimaPH\"=> \"06\\\\/12\",\n \"vencimientoDeCarga\"=> \"2016-09-16\",\n \"vencimientoDePH\"=> \"2017-06-01\",\n \"codigoInternoCliente\"=> \"3\",\n \"observaciones\"=> \"\",\n \"disponible\"=> true,\n \"vencimientoVidaUtil\"=> \"2018-04-01\",\n \"tipo\"=> array(\n \"tipoDeEquipo\"=> \"HCFC 123\",\n \"tipogenerico\"=> array(\n \"tipo\"=> \"Halogenado\",\n \"tipoExtintor\"=> \"bajaPresion\",\n \"idTipoElemento\"=> 1,\n \"id\"=> 5\n )\n ),\n \"idCapacidad\"=> 1,\n \"marca\"=> array(\n \"id\"=> 10,\n \"Marca\"=> \"DRAGON\",\n \"marcaMOST\"=> \"Otros\"\n ),\n \"codCliente\"=> 290,\n \"sucursal\"=> array(\n \"idSucursal\"=> 629,\n \"nombre\"=> \"22 DE SEPTIEMBRE S.A. - Casa Central\",\n \"sectores\"=> array()\n ),\n \"idEquipo\"=> 4\n ),\n \"id\"=> 13333,\n \"fotos\"=> array()\n )\n\n ));\n dd($res);\n }","title":""},{"docid":"9cb719e08bc053a4515cfdf027716837","score":"0.55443585","text":"function runAutomaticApi()\n {\n try {\n $this->auth();\n $db = new Db();\n $method = Input::getMethod();\n $segments = Uri::getSegments();\n $endPoint = BASE_URL.\"/api/v1/z2/x21/:miembro_id/\";\n $endPoint = BASE_URL.\"/api/v1/\";\n\n // Get the route\n // The parameters are fields\n // Count the route segments\n // Reduce the uri segments\n // Get the table name\n // Get the parameters\n\n array_shift($segments);\n array_shift($segments);\n $tableName = $segments[0];\n array_shift($segments);\n $segmentCount = count($segments);\n\n switch( $method ) {\n case \"GET\":\n if ( $segmentCount === 0 ) {\n $results = $db->get($tableName);\n return $this->setResponse();\n } // end if segment count === 0\n\n // Here we construct the query\n // we need the primary key for the table\n // and the segments to match\n $primaryKeys = $db->getPrimaryKeys( $tableName );\n\n if (count($primaryKeys) !== count($segments)) {\n throw new Exception(\"Not all segments corresponding to key in table\");\n } // end if count primaryKeys <> count segments\n\n $where = array();\n foreach($primaryKeys as $i => $key) {\n $where[$key] = $segments[$i];\n } // end foreach primary key\n\n // Get the result\n $results = $db->from($tableName)->where($where)->get();\n // Set the response\n return $this->setResponse();\n break;\n case \"POST\":\n if ( $segmentCount > 0 ) {\n throw new Exception( \"Post method must not include more url data\" );\n } // end if segmentCount > 0\n\n Logger::debug(\"Input array\");\n Logger::debug(Input::getArray());\n $rows = $db->insert( $tableName, Input::getArray() );\n // Here get id\n\n $keys = $db->getPrimaryKeys( $tableName );\n $keys = implode(\",\", $keys);\n $id = $db->select($keys)->from($tableName)->where(Input::getArray())->first();\n $id = implode(\"/\",$id);\n\n Output::setStatusCode(201);\n Output::setHeader(\"Location\", $endPoint . $tableName . \"/\" .$id );\n return;\n break;\n case \"PUT\":\n\n $input = Input::getArray();\n $primaryKeys = $db->getPrimaryKeys( $tableName );\n\n if (count($primaryKeys) !== count($segments)) {\n throw new Exception(\"Not all segments corresponding to key in table\");\n } // end if count primaryKeys <> count segments\n\n $where = array();\n foreach( $primaryKeys as $i => $key ) {\n $where[$key] = $segments[$i];\n } // end foreach\n\n $exists =\n $db->select(implode(\",\", $where))->\n from($tableName)->\n where($where)->get();\n\n if (!$exists) {\n Output::setStatusCode(404);\n } // end if not exists\n\n $db->update( $tableName, $input, $where );\n\n $keys = implode(\",\", $primaryKeys);\n $id = $db->select($keys)->from($tableName)->where(Input::getArray())->first();\n $id = implode(\"/\",$id);\n Output::setStatusCode(201);\n Output::setHeader(\"Location\", $endPoint . $tableName . \"/\" .$id );\n return;\n break;\n case \"DELETE\":\n if ( $segmentCount === 0 ) {\n throw new Exception( \"Must specify a record id to delete\" );\n } // end if segment count === 0\n\n $primaryKeys = $db->getPrimaryKeys( $tableName );\n\n if (count($primaryKeys) !== count($segments)) {\n throw new Exception(\"Not all segments corresponding to key in table\");\n } // end if count primaryKeys <> count segments\n\n $where = array();\n foreach($primaryKeys as $i => $key) {\n $where[$key] = $segments[$i];\n } // end foreach primary key\n\n $db->delete( $tableName, $where );\n Output::setStatusCode(204);\n return;\n break;\n } // end switch $method\n } catch(Exception $ex) {\n Output::setStatusCode(415);\n $this->jsonResponse(\n array(\n \"error\" => true,\n \"description\" => $ex->getMessage()\n ) // end array\n ); // end jsonResponse\n } // end try catch\n }","title":""},{"docid":"1219cd029b2c28fd0ae97f20f15d84f0","score":"0.55404466","text":"function anteriorEstadoObligacion()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_ANTEOB_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('operacion', 'operacion', 'varchar');\n $this->setParametro('obs', 'obs', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"eb82b199f9f13f94a32fcec2df8ab4ee","score":"0.55351216","text":"function Modificar_Bono_Regular($cod,$dpi,$monto,$moneda,$tcambio,$desc){\n $respuesta = new xajaxResponse();\n $ClsPla = new ClsPlanillaAsignaciones();\n //pasa a mayusculas\n\t\t$desc = trim($desc);\n\t//--------\n\t//decodificaciones de tildes y Ñ's\n\t\t$desc = utf8_encode($desc);\n\t\t//--\n\t\t$desc = utf8_decode($desc);\n\t//-------- \n if($cod !=\"\" && $dpi !=\"\" && $desc !=\"\" && $monto != \"\" && $moneda != \"\" && $tcambio != \"\"){\n\t\t//$respuesta->alert(\"$id\");\n\t\t$sql = $ClsPla->update_base_bonificaciones($cod,$dpi,$monto,$moneda,$tcambio,$desc); /// Inserta\n\t\t//$respuesta->alert(\"$sql\");\n\t\t$rs = $ClsPla->exec_sql($sql);\n if($rs == 1){\n $respuesta->script('swal(\"Excelente!\", \"Registros actualizados satisfactoriamente!\", \"success\").then((value)=>{ window.location.reload(); });');\n }else{\n $respuesta->script('swal(\"Error\", \"Error de transacci\\u00F3n...\", \"error\").then((value)=>{ cerrar(); });');\n $respuesta->script(\"document.getElementById('mod').className = 'btn btn-primary';\");\n $respuesta->script(\"document.getElementById('gra').className = 'btn btn-primary hidden';\");\n }\t\n\t}else{\n $respuesta->script('swal(\"Error\", \"Error de transacci\\u00F3n...\", \"error\").then((value)=>{ cerrar(); });');\n $respuesta->script(\"document.getElementById('mod').className = 'btn btn-primary';\");\n $respuesta->script(\"document.getElementById('gra').className = 'btn btn-primary hidden';\");\n\t}\n \t\t\n return $respuesta;\n}","title":""},{"docid":"1ce4a76123cd6af6b7fa528397fc5c7d","score":"0.5521816","text":"function sap_grpo_header_cancel($data) {\n $this->m_saprfc->setUserRfc();\n $this->m_saprfc->setPassRfc();\n $this->m_saprfc->sapAttr();\n $this->m_saprfc->connect();\n $this->m_saprfc->functionDiscover(\"ZMM_BAPI_CANCEL_GOODS_MOV\");\n $this->m_saprfc->importParameter(array (\"MATDOCUMENTYEAR\",\n \"MATERIALDOCUMENT\",\n \"OUTLET\",\n \"POSTING_DATE\",\n \"WEB_LOGIN_ID\",\n \"WEB_TRANSID\"),\n array ($data['mat_doc_year'],\n $data['grpo_no'],\n $data['plant'],\n $data['posting_date'],\n $data['id_user_input'],\n $data['web_trans_id'])\n );\n $count = count($data['item']);\n $this->m_saprfc->setInitTable(\"MATDOC_ITEM\");\n for ($i=1;$i<=$count;$i++) {\n $this->m_saprfc->append (\"MATDOC_ITEM\",\n array (\"MATDOC_ITEM\"=>$data['item'][$i])\n );\n }\n $this->m_saprfc->setInitTable(\"I_RETURN\");\n $this->m_saprfc->executeSAP();\n $GOODSMVT_HEADRET = $this->m_saprfc->export(\"GOODSMVT_HEADRET\");\n $I_RETURN = $this->m_saprfc->fetch_rows(\"I_RETURN\");\n $MATDOC_ITEM = $this->m_saprfc->fetch_rows(\"MATDOC_ITEM\");\n $this->m_saprfc->free();\n $this->m_saprfc->close();\n $count = count($I_RETURN);\n $sap_messages = '';\n for($i=1;$i<=$count;$i++) {\n $sap_messages = $sap_messages.'
'.$I_RETURN[$i]['MESSAGE'];\n }\n if (empty($GOODSMVT_HEADRET['MAT_DOC'])) {\n $count = count($MATDOC_ITEM);\n $sap_messages = $sap_messages.\n '
--------------------------------------
'.\n 'Parameter Input yang dimasukkan :
'.\n 'MATDOCUMENTYEAR : '.$data['mat_doc_year'].'
'.\n 'MATERIALDOCUMENT : '.$data['grpo_no'].'
'.\n 'OUTLET : '.$data['plant'].'
'.\n 'POSTING_DATE : '.$data['posting_date'].'
'.\n 'WEB_LOGIN_ID : '.$data['id_user_input'].'
'.\n 'WEB_TRANSID : '.$data['web_trans_id'].'
';\n for($i=1;$i<=$count;$i++) {\n $sap_messages = $sap_messages.\n '--------------------------------------
'.\n 'MATDOC_ITEM :'.$MATDOC_ITEM[$i]['MATDOC_ITEM'].'
';\n }\n } else {\n $count = count($MATDOC_ITEM);\n for($i=1;$i<=$count;$i++) {\n $this->sap_po_outstanding_update($data['po_no'],$data['item_po'][$i],$data['gr_quantity'][$i],'-');\n }\n }\n\n $cancelled_data = array (\n \"material_document\" => $GOODSMVT_HEADRET['MAT_DOC'],\n \"sap_messages\" => $sap_messages\n );\n\n return $cancelled_data;\n\t}","title":""},{"docid":"e8211bdd3eb9896068e5f358855be364","score":"0.5520552","text":"public function testComunas()\n {\n // Parameters for the API call\n $body = TestHelper::getJsonMapper()->mapClass(json_decode(\n '{\\r\\n \"idIntegracion\": 21,\\r\\n \"token\": \"6be7212a-a769-40e4-9c6b-283aa06a3127\",\\r\\n \"idOrigen\": 83\\r\\n}'),\n 'SGIAvenderLib\\\\Models\\\\ComunasRequest'\n );\n\n // Set callback and perform API call\n self::$controller->setHttpCallBack($this->httpResponse);\n try {\n self::$controller->comunas($body);\n } catch (APIException $e) {\n }\n\n // Test response code\n $this->assertEquals(\n 200,\n $this->httpResponse->getResponse()->getStatusCode(),\n \"Status is not 200\"\n );\n }","title":""},{"docid":"88b0dc38299108cd2dfe19f3c95cf47f","score":"0.5506308","text":"public function devuelveDatosPiso() {\n $idpiso = $this -> input -> post_get(\"id\");\n\n\t\t$datos[\"inmueble\"] = $this -> pisos_model -> show_piso($idpiso);\n\n\t\t// Cambiamos la cabecera a JSON de respuesta\n header(\"Content-Type: application/json\");\n // Escupimos la respuesta\n echo json_encode($datos);\n\t}","title":""},{"docid":"863ee79a06f29d46d80026fd03ad3f88","score":"0.5504539","text":"public function procedimiento10($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$c10,$c11,$c12,$c13,$c14){\n\t\t\t$db = Yii::$app->params['awadb'];\t\t\n\t\t\t$usuario = Yii::$app->params['usuario'];\n\t\t\t$contrasena = Yii::$app->params['password'];\n\t\t\t//establece la conexion con la bese de dato AWA\n\t\t\t$conexion = oci_connect($usuario, $contrasena, $db, 'AL32UTF8');\t\t\t\t\t\t\t\t\t\n\t\t\t//se hace el llamado al procedimietno que trae la informacion de las mesas\n\t\t\t$stid = oci_parse($conexion,\"BEGIN PKG_ACOMER_PROCEDURES.SP_ACOMER_FACTURA_RESTRASADA(:c1,:c2,:c3,:c4,:c5,:c6,:c7,:c8,:c9,:c10,:c11,:c12,:c13,:c14,:c15,:c16,:c17,:c18,:c19,:c20,:c21,:c22,:c23); END;\");\n\t\t\t//inicializa el cursor pasa como parametro\n\t\t\t$c16 = oci_new_cursor($conexion);\n\t\t\t//\n\t\t\toci_bind_by_name($stid, \":c1\", $c1, 10);\n\t\t\toci_bind_by_name($stid, \":c2\", $c2, 8);\t\t\n\t\t\toci_bind_array_by_name($stid, \":c3\", $c3, 100, -1, SQLT_CHR);\n\t\t\toci_bind_array_by_name($stid, \":c4\", $c4, 100, -1, SQLT_CHR);\n\t\t\toci_bind_array_by_name($stid, \":c5\", $c5, 100, -1, SQLT_CHR);\n\t\t\toci_bind_array_by_name($stid, \":c6\", $c6, 100, -1, SQLT_CHR);\n\t\t\toci_bind_by_name($stid, \":c7\", $c7, 11);\n\t\t\toci_bind_by_name($stid, \":c8\", $c8, 10);\n\t\t\toci_bind_by_name($stid, \":c9\", $c9, 11);\n\t\t\toci_bind_by_name($stid, \":c10\", $c10, 3);\n\t\t\toci_bind_by_name($stid, \":c11\", $c11, 20);\n\t\t\toci_bind_array_by_name($stid, \":c12\", $c12, 100, -1, SQLT_CHR);\n\t\t\toci_bind_array_by_name($stid, \":c13\", $c13, 100, -1, SQLT_CHR);\n\t\t\toci_bind_by_name($stid, \":c14\", $c14, 10);\n\t\t\toci_bind_by_name($stid, \":c15\", $c15, 20);\n\t\t\toci_bind_by_name($stid, \":c16\", $c16,-1, OCI_B_CURSOR);\n\t\t\toci_bind_by_name($stid, \":c17\", $c17, 10);\n\t\t\toci_bind_by_name($stid, \":c18\", $c18, 10);\n\t\t\toci_bind_by_name($stid, \":c19\", $c19, 10);\n\t\t\toci_bind_by_name($stid, \":c20\", $c20, 10);\n\t\t\toci_bind_by_name($stid, \":c21\", $c21, 10);\n\t\t\toci_bind_by_name($stid, \":c22\", $c22, 10);\n\t\t\toci_bind_by_name($stid, \":c23\", $c23, 8);\n\n\t\t\t//se ejecuta el procidimiento \n\t\t\toci_execute($stid);\n\t\t\toci_execute($c16,OCI_DEFAULT);\n\n\t\t\toci_fetch_all($c16, $cursor1);\n\n\t\t\treturn $c15;\n\t\t}","title":""},{"docid":"76c99ed9ca61ec00b2022931c3811b8a","score":"0.5502674","text":"function listarModalidad(){\n $this->procedimiento='adq.f_solicitud_ime';\n $this->transaccion='ADQ_LISTMOD_GET';\n $this->tipo_procedimiento='IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud','id_solicitud','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //echo $this->consulta;exit;\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"72597608c706dc3d74574b0eb55131de","score":"0.5499241","text":"function controlAdjudicado(){\r\n $this->procedimiento='mat.ft_cotizacion_ime';\r\n $this->transaccion='MAT_CTS_ADJ';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\r\n $this->setParametro('adjudicado','adjudicado','varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }","title":""},{"docid":"50a60e0ad8ae5b0fff980a37bd725c5e","score":"0.5492188","text":"function API_login($usu,$pass){\n\t$ClsUsu = new ClsUsuario();\n\t$ClsReg = new ClsRegla();\n\t$ClsPerm = new ClsPermiso();\n\t$ClsPen = new ClsPensum();\n\tif($usu != \"\" && $pass != \"\"){\n\t\t$result = $ClsUsu->get_login($usu,$pass);\n\t\tif (is_array($result)) {\n\t\t\tforeach ($result as $row){\n\t\t\t\t$codigo = $row['usu_id'];\n\t\t\t\t$nombre = trim($row['usu_nombre']);\n\t\t\t\t$nombre_pantalla = utf8_decode($row['usu_nombre_pantalla']);\n\t\t\t\t$empresa = trim($row['suc_nombre']);\n\t\t\t\t$empCodigo = trim($row['suc_id']);\n\t\t\t\t$tipo = $row['usu_tipo'];\n\t\t\t\t$tipo_codigo = $row['usu_tipo_codigo'];\n\t\t\t\t//--\n\t\t\t\t$chat_user_id = $row['usu_chat_id'];\n\t\t\t\t//--\n\t\t\t\t$foto = $row['usu_foto'];\n\t\t\t}\n\t\t\t\n\t\t\t/// USUARIO\n\t\t\t$arr_data['codigo'] = $codigo;\n\t\t\t$arr_data['usu'] = $usu;\n\t\t\t$arr_data['pass'] = $pass;\n\t\t\t$arr_data['nombre'] = $nombre;\n\t\t\t$arr_data['usu_nombre_pantalla'] = $nombre_pantalla;\n\t\t\t//--\n\t\t\t$chat = ($tipo == 1 || $tipo == 3)?1:0;\n\t\t\t$arr_data['chat'] = $chat; ///\n\t\t\t$arr_data['chat_user_id'] = $chat_user_id;\n\t\t\tif(file_exists('../../CONFIG/Fotos/USUARIOS/'.$foto.'.jpg')){ /// valida que tenga foto registrada\n\t\t\t\t$arr_data['url_foto'] = \"https://\" . $_SERVER['HTTP_HOST'] . \"/CONFIG/Fotos/USUARIOS/\".$foto.\".jpg\";\n\t\t\t}else{\n\t\t\t\t$arr_data['url_foto'] = \"https://\" . $_SERVER['HTTP_HOST'] . \"/CONFIG/Fotos/nofoto.png\";\n\t\t\t}\n\t\t\t\n\t\t\t/// PENSUM ////\n\t\t\t$pensum = $ClsPen->get_pensum_activo();\n\t\t\t\n\t\t\t///// ASMS /////\n\t\t\t$arr_data['pensum'] = $pensum;\n\t\t\t$arr_data['tipo_usuario'] = $tipo;\n\t\t\t$arr_data['tipo_codigo'] = $tipo_codigo;\n\t\t\tif($tipo == 1){\n\t\t\t\t$arr_data['tipo_descripcion'] = \"USIARIO ADMINISTRATIVO\";\n\t\t\t}else if($tipo == 2){\n\t\t\t\t$arr_data['tipo_descripcion'] = \"MAESTRO\";\n\t\t\t}else if($tipo == 3){\n\t\t\t\t$arr_data['tipo_descripcion'] = \"PADRE\";\n\t\t\t}else if($tipo == 4){\n\t\t\t\t$arr_data['tipo_descripcion'] = \"MONITOR DE BUS\";\n\t\t\t}\n\t\t\t\n\t\t\t$payload = array(\n\t\t\t\t\t\"status\" => true,\n\t\t\t\t\t\"data\" => $arr_data,\n\t\t\t\t\t\"message\" => \"\");\n\t\t\t\t\t\t\n\t\t\techo json_encode($payload);\n\t\t}else{\n\t\t\t//devuelve un mensaje de manejo de errores\n\t\t\t$arr_data = array(\n\t\t\t\t\"status\" => false,\n\t\t\t\t\"message\" => \"El usuario o el password son incorrectos...\");\n\t\t\t\techo json_encode($arr_data);\n\t\t}\n\t}else{\n\t\t//devuelve un mensaje de manejo de errores\n\t\t$arr_data = array(\n\t\t\t\"status\" => false,\n\t\t\t\"message\" => \"Uno de los campos esta vacio...\");\n\t\t\techo json_encode($arr_data);\n\t}\n\t\n}","title":""},{"docid":"f9488c1cb05e93cd9e058b6f57802d23","score":"0.5487243","text":"function modificarObsPoa()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_OBSPOA_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('obs_poa', 'obs_poa', 'varchar');\n $this->setParametro('codigo_poa', 'codigo_poa', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"0a22b171da4907acb1eaa4ec4f4d845a","score":"0.54780996","text":"function modificarObsPoa()\n {\n $this->procedimiento = 'adq.f_solicitud_ime';\n $this->transaccion = 'ADQ_MODOBSPOA_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('obs_poa', 'obs_poa', 'varchar');\n $this->setParametro('codigo_poa', 'codigo_poa', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"cbe6d23752b1cf5d04c75e4b2142249e","score":"0.54756206","text":"function siguienteEstadoCaja(){\n $this->procedimiento='tes.ft_caja_ime';\n $this->transaccion='TES_SIGECAJA_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\n $this->setParametro('obs','obs','text');\n $this->setParametro('json_procesos','json_procesos','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"caefaac73669a724a5e5301d1061d12e","score":"0.5469488","text":"function BD()\n\t\t{\n\t\t\t$this->servidor = SERVIDOR;\n\t\t\t$this->usuario = USUARIOBD;\n\t\t\t$this->clave = CLAVEBD;\n\t\t\t$this->idlink;\n\t\t\t$this->idresult;\n\t\t\t$this->indice_result = 'N'; // varible para definir si el array de los datos va a tener el indice numero N o alfabetico A\t\t\n\t\t\t\n\t\t}","title":""},{"docid":"0fa16921540f6523e3ca5562e4b3070c","score":"0.54688597","text":"function getDatosCurso_ini_any()\n {\n $nom_tabla = $this->getNomTabla();\n $oDatosCampo = new core\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'curso_ini_any'));\n $oDatosCampo->setEtiqueta(_(\"año inicio curso\"));\n return $oDatosCampo;\n }","title":""},{"docid":"daafb433eb278cb5c2d177520cc78eac","score":"0.5468668","text":"public function odobri()\n {\n }","title":""},{"docid":"3ca91eb7dc55c0ff93ec168025e74300","score":"0.5464755","text":"function obtenerFaltante()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_PAFPP_IME';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('ope_filtro', 'ope_filtro', 'varchar');\n $this->setParametro('id_plan_pago', 'id_plan_pago', 'integer');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"9fcbfa955bcff11e7e7e2fe351291ab1","score":"0.546113","text":"public function CumpleTodo($param) {//vienen todos los parametros incluido el servicio\r\n $datosiniciales = $this->capturartodoyconvertir($param); //request\r\n\r\n $array_fechas = $this->Dias2Fechas($datosiniciales[3], $datosiniciales[4]); //first and second fechaentra y fechasalida\r\n\r\n return $this->recorrerfechas($array_fechas, $datosiniciales);\r\n }","title":""},{"docid":"154ae42d657c62e335e0ab1635404e4d","score":"0.5458462","text":"public function getConsultaUno($params){\n \n $msj = array(codigoError=>'0000',mensaje=>'',sesionId=>session_id(), sesUsuario=>$_SESSION[\"UsuarioId\"]);\n if (!isset($_SESSION[\"UsuarioId\"])){\n $msj = array(codigoError=>'9999',mensaje=>'Usuario no ha ingresado',sesionId=>session_id());\n $results = array();\n $respuesta = array($msj,$results); \n return $respuesta;\t \n\t } else { \n \n // Usuario ya ingresado. \n $_db = $this->__construct();\n \n $correo = $params->correo;\n \n $_result = $_db->query(\"SELECT EMail, NoCedula, Nombre, Apellidos, Apodo, TelCelular, FechaNacimiento,\n Genero, CodProv, CodCanton, CodDist, FotoFile, TipoUsuario \n FROM Usuario as A, Persona as B\n WHERE EMail='\".$correo.\"' AND A.IdPersona = B.id\") \n or die('Connect Error (' . $_db->connect_errno . ') ' . $_db->connect_error); \n \n $results = array();\n while ($row = $_result->fetch_assoc()) {array_push($results, $row);}\n $respuesta = array($msj,$results); \n return $respuesta;\n \n } // Fin de IF Sesion\n \n }","title":""},{"docid":"200b58e75f8045cda861f87b5867e93c","score":"0.54509217","text":"private function loguear() {\n $respuesta = array();\n\n $body = file_get_contents('php://input');\n $usuario = json_decode($body);\n\n $telefono = $usuario->telefono;\n $contrasena = $usuario->contrasena;\n\n if (self::autenticar($telefono, $contrasena)) {\n $usuarioBD = self::obtenerUsuarioPorTelefono($telefono);\n\n if ($usuarioBD != NULL) {\n http_response_code(200);\n $respuesta[\"Usuario\"] = $usuarioBD[\"id_Usuario\"];\n $respuesta[\"Nombre\"] = base64_decode($usuarioBD[\"nombre\"]);\n $respuesta[\"Telefono\"] = $usuarioBD[\"telefono\"];\n $respuesta[\"APIkey\"] = $usuarioBD[\"claveApi\"];\n return [\"estado\" => 1, \"usuario\" => $respuesta];\n\n } else {\n throw new ExcepcionApi(self::ESTADO_FALLA_DESCONOCIDA,\n \"Ha ocurrido un error\");\n }\n } else {\n throw new ExcepcionApi(self::ESTADO_PARAMETROS_INCORRECTOS,\n utf8_encode(\"Teléfono o contraseña inválidos\"));\n }\n }","title":""},{"docid":"6e2c94e3fb2867ff12740e05f9a7a8e0","score":"0.54471695","text":"function VerificaDatos_2($param_num,$param_notas,$param_archivo)\r\n {\r\n global $vectorNotasTemporal;\r\n global $ErrorExisteDoble;\r\n\r\n $ErrorExisteDoble = 0;\r\n $noexisten = 0;\r\n $ubicaciondoble = 0;\r\n for ($c=1; $c < $param_num; $c++)\r\n {\r\n list($card,$name,$final) = split(\",\",$param_notas[$c]);\r\n $laboratorio = 0;\r\n $zona = 0;\r\n $final = trim($final);\r\n $cantdigitos = strlen($card);\r\n // ----------modificacion realizada para el carnet\r\n switch($cantdigitos)\r\n {\r\n case 9: /*carne bueno */ break;\r\n case 7: $subcadena = substr($card, 0, 2);\r\n $factible = $subcadena + 0;\r\n if ($factible < 98) //aqui preguntar si los primeros dos digitos son < 98\r\n { $card = '00'.$card; }\r\n else //si son mayores a 98 entonces agregar 19\r\n { $card = '19'.$card; }\r\n break;\r\n default: $faltan = 9 - $cantdigitos;\r\n for($i=0; $i < $faltan; $i++) $card = '0'.$card;\r\n }//Fin del switch\r\n\r\n //Se le coloca el valor correspondiente sin son APR = -3, REP = -4\r\n $valor = strtoupper($final);\r\n switch( $valor )\r\n {\r\n case '1': $final = -3; break;\r\n case '2': $final = -4; break;\r\n case 'APR': $final = -3; break;\r\n case 'REP': $final = -4; break;\r\n }\r\n //echo \"final -* - $final
\";\r\n\r\n //aqui se verifica que el carne se encuentre en asignacion y asignaciondetalle\r\n //sino no se traslada a ingresotemporal, ademas para los periodos de retrasada\r\n //se le coloca a la zona y el laboratorio los valores de sus semestres respectivos\r\n $banderaencontrado = -1;\r\n for ($j=0; $j < $_SESSION[\"sNotas\"]->num_rows(); $j++)\r\n {\r\n $_SESSION[\"sNotas\"]->Row = $j;\r\n\r\n $_SESSION[\"sNotas\"]->next_record();\r\n $vectasig1[usuarioid] = trim($_SESSION[\"sNotas\"]->f('idstudent'));\r\n $vectasig1[carrera] = trim($_SESSION[\"sNotas\"]->f('idcareer'));\r\n $vectasig1[zona] = trim($_SESSION[\"sNotas\"]->f('classzone'));\r\n $vectasig1[zonalaboratorio] = trim($_SESSION[\"sNotas\"]->f('labnote'));\r\n\r\n if (strcmp($vectasig1[usuarioid], $card) == 0 )\r\n {\r\n $banderaencontrado = 1;\r\n $carrera = trim($vectasig1[carrera]);\r\n $laboratorio = 0; //asigno el laboratorio\r\n $zona = 0; //asigno la zona\r\n break;\r\n }\r\n }//Fin del for\r\n\r\n\r\n // Si los valores son encontrados se va guardando en un vector temporal para luego\r\n // ser insertado en la tabla ingresotemporal\r\n if ($banderaencontrado == 1 )\r\n {\r\n $numero = is_numeric($final);\r\n if ($numero)\r\n {\r\n $convfinal = 0;\r\n $convfinal = 0 + $final;\r\n }\r\n else { $convfinal = $final; }\r\n\r\n $notas[$c-1] = $this->mUsuarioid.\"|\".$card.\"|\".$carrera.\"|\".$this->mCurso.\"|\".$this->mIndex.\"|\".\r\n $this->mSeccion.\"|\".$this->mPeriodo.\"|\".$this->mAnio.\"|\".$zona.\r\n \"|\".$laboratorio.\"|\".$convfinal.\"|0|0\";\r\n\r\n //echo \" -*-*- \".$notas[$c-1].\"
\"; die;\r\n\r\n //busca que no sea un registro repetido\r\n $valor = -5;\r\n $banderaduplicado = 0;\r\n for ($r = 0; $r < $c-1; $r++)\r\n {\r\n if ($valor != 1)\r\n {\r\n $valor = substr_count($notasfinales[$r], $card); //cuenta cuantas veces aparece\r\n if ($valor > 0) //si lo encontro al menos una vez\r\n {\r\n// $tempdup = substr($notasfinales[$r],0,strlen($notasfinales[$r])-1);\r\n// $tempdup = $tempdup.\"8003,\".$carrera;\r\n// $notasfinales[$r] = \"\";\r\n// $notasfinales[$r] = $tempdup;\r\n $valor = -5;\r\n $banderaduplicado = 1;\r\n $ErrorExisteDoble = 1;\r\n $ubicaciondoble = $c+1;\r\n // echo \"entro con \".$card.\"
\";\r\n }\r\n }\r\n } //Fin del For\r\n\r\n if ($banderaduplicado == 0)\r\n {\r\n $notasfinales[$c-1] = $notas[$c-1];\r\n // echo \"notas finales \".$notasfinales[$c-1].\"
\";\r\n }\r\n\r\n $banderaencontrado = -1;\r\n }//fin del if de encontrado\r\n else { $noexisten++; }\r\n }//Fin del for\r\n//echo \"
vector --\",$notasfinales[0][$card],\"-- no existen <<\",$noexisten,\">>\";\r\n //Si existe en el archivo alguna tupla repetida se descarta de una vez el archivo\r\n\r\n//\t echo \"error --- \".$ErrorExisteDoble.\"
\"; die;\r\n if ($ErrorExisteDoble == 0)\r\n {\r\n //cuando hay registros agregados hay que verificar cuantos son dependiendo el porcentaje se desecha el archivo\r\n $porcentaje = $this->mAsignados * 0.50;\r\n\r\n if (($noexisten < $porcentaje)&&($notasfinales != null))\r\n {\r\n $transaccion_ok = 1;\r\n// $transaccion_ok = $_SESSION[\"sNotas\"]->query(\"begin\");\r\n\r\n $transaccion_ok = $_SESSION[\"sNotas\"]->query($this->gsql_IA->begin());\r\n\r\n $registros = $this->VerificaDatosTabla();\r\n\r\n /*\t\t $nf = count($notasfinales);\r\n for( $x=0; $x < nf; $x++)\r\n {\r\n echo $notasfinales[$x].\"
\";\r\n }\r\n\r\n print_r($notasfinales);\r\n\r\n die; */\r\n\r\n //Manejo de errores en la carga del vector a la tabla\r\n// $old_error_handler = set_error_handler(\"Maneja_Error_Copy\");\r\n $resultado = pg_copy_from($_SESSION[\"sNotas\"]->Link_ID,\"tbtempentry\", $notasfinales,\"|\");\r\n// restore_error_handler();\r\n if ($resultado)\r\n { //COMMIT TRANSACTION\r\n //echo \"entro por aca
\";\r\n// $rst_transaccion = $_SESSION[\"sNotas\"]->query(\"commit\");\r\n\r\n $rst_transaccion = $_SESSION[\"sNotas\"]->query($this->gsql_IA->commit());\r\n\r\n\r\n //echo \"hasta aqui solo los q estan en archivo\"; die;\r\n // Muestra resultados\r\n if ($this->upload_report($registros,$param_archivo) == 1) { return 1; }\r\n else { return 0; }\r\n }\r\n else\r\n { // Ha ocurrido algún error. Recupera el backup de la tabla de notas\r\n //ROLLBACK TRANSACTION\r\n// $rst_transaccion = $_SESSION[\"sNotas\"]->query(\"rollback\");\r\n\r\n $rst_transaccion = $_SESSION[\"sNotas\"]->query($this->gsql_IA->rollback());\r\n\r\n $this->mStringMensaje = \"No fu&eacute; posible cargar el archivo
\r\n por favor revise la informaci&oacute;n y vuelva a intentarlo.\";\r\n return 0;\r\n } //END TRANSACTION\r\n// $rst_transaccion = $_SESSION[\"sNotas\"]->query(\"end\");\r\n\r\n $rst_transaccion = $_SESSION[\"sNotas\"]->query($this->gsql_IA->end());\r\n\r\n }\r\n else\r\n {\r\n $this->mStringMensaje = \"No coinciden los alumnos del archivo con los asignados
\r\n revise que el archivo realmente sea el correcto
\r\n y vuelva a intentarlo.\";\r\n return 0;\r\n }\r\n }\r\n else\r\n {\r\n $this->mStringMensaje = \"Existen registros repetidos.
Verificar la l&iacute;nea : \".$ubicaciondoble;\r\n return 0;\r\n }//Fin de if de existe tupla repetida en el archivo\r\n\r\n }","title":""},{"docid":"46a5078063074368e8c1bdb695b8209a","score":"0.54416376","text":"function ObtenerBaseDatos($CodigoSesion){\n $Conexion = new Conexion();\n\n /**\n * se asigna el nombre de la base de datos\n */\n $DatosConexion = $Conexion->ObtenerConexion();\n\n $Resultado = array();\n\n /**\n * verifica que el codigo no este \n * vacio\n */\n if($CodigoSesion != \"\"){ \n /**\n * selecciona unicamente \n * el nombre y la conexion\n * */ \n $result = $DatosConexion->query(\"SELECT Nombre,Conexion FROM operacion_conexiones where Codigo='\".$CodigoSesion.\"' and idEstado=1\");\n\n /**\n * evalua si devolvio \n * datos\n */\n if($result)\n { \n /**\n * asigna los datos consultados\n */\n $Resultado = $result->fetch_array(MYSQLI_ASSOC);\n }\n else{\n /**\n * retorna si no se encuentra un\n * registro\n */\n $Resultado = array (\n 'Codigo' => '',\n 'Usuario' => '',\n 'Response' => 'No hay datos'\n );\n }\n }\n else{\n /**\n * retorna si no se encuentra un\n * registro\n */\n $Resultado = array (\n 'Codigo' => '',\n 'Usuario' => '',\n 'Response' => 'No hay datos'\n );\n }\n\n return $Resultado;\n }","title":""},{"docid":"1becf984c4739b324f5006600c557645","score":"0.5431796","text":"function callAPI($request_Type, $data = false, $api_url, $header, $url_campagin)\n{\n $url = $url_campagin . $api_url;\n $curl = curl_init();\n // print_r($data);\n // die;\n $data = json_encode($data);\n switch ($request_Type) {\n case \"POST\":\n curl_setopt($curl, CURLOPT_POST, 1);\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n case \"PUT\":\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"PUT\");\n if ($data)\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, $data);\n }\n // OPTIONS:\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n // EXECUTE:\n $result = curl_exec($curl);\n $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n curl_close($curl);\n\n return array('response' => $result, 'httpcode' => $httpcode);\n}","title":""},{"docid":"0b0e251c340cd7f7505489c7c5884e9d","score":"0.54223895","text":"function cuadroComparativo(){\r\n $this->procedimiento='mat.ft_cotizacion_sel';\r\n $this->transaccion='MAT_CTS_CUAR';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n $this->setCount(false);\r\n\r\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\r\n\r\n $this->captura('id_solicitud','int4');\r\n $this->captura('id_cotizacion','int4');\r\n $this->captura('parte','varchar');\r\n $this->captura('descripcion','text');\r\n $this->captura('explicacion_detallada_part_cot','varchar');\r\n $this->captura('cantidad','integer');\r\n $this->captura('tipo_cot','varchar');\r\n $this->captura('cd','varchar');\r\n $this->captura('precio_unitario','numeric');\r\n $this->captura('precio_unitario_mb','numeric');\r\n $this->captura('codigo_tipo','varchar');\r\n $this->captura('desc_proveedor','text');\r\n $this->captura('adjudicado','varchar');\r\n $this->captura('recomendacion','varchar');\r\n $this->captura('obs','varchar');\r\n $this->captura('fecha_cotizacion','varchar');\r\n $this->captura('fecha_po','varchar');\r\n $this->captura('monto_total','numeric');\r\n $this->captura('lista_proveedor','varchar');\r\n $this->captura('pie_pag','varchar');\r\n $this->captura('estado','varchar');\r\n\t\t\t\t$this->captura('nro_cotizacion','varchar');\r\n\t\t\t\t$this->captura('fecha_solicitud','date');\r\n\t\t\t\t$this->captura('fecha_salida','date');\r\n\t\t\t\t$this->captura('pn_cotizacion','varchar');\r\n $this->captura('nro_tramite','varchar');\r\n\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n\t\t\t\t//var_dump(\"aqui llega \",$this->respuesta);exit;\r\n return $this->respuesta;\r\n }","title":""},{"docid":"a9ba48d7897b3c637e544561b91198e8","score":"0.5421656","text":"function listarObligacion()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_sel';\n $this->transaccion = 'TES_COMEJEPAG_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n $this->setCount(false);\n\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\n //Definicion de la lista del resultado del query\n $this->captura('id_obligacion_det', 'int4');\n $this->captura('id_partida', 'int4');\n $this->captura('nombre_partida', 'text');\n $this->captura('id_concepto_ingas', 'int4');\n $this->captura('nombre_ingas', 'text');\n $this->captura('id_obligacion_pago', 'int4');\n $this->captura('id_centro_costo', 'int4');\n $this->captura('codigo_cc', 'text');\n $this->captura('id_partida_ejecucion_com', 'int4');\n $this->captura('descripcion', 'text');\n $this->captura('comprometido', 'numeric');\n $this->captura('ejecutado', 'numeric');\n $this->captura('pagado', 'numeric');\n $this->captura('revertible', 'numeric');\n $this->captura('revertir', 'numeric');\n $this->captura('moneda', 'varchar');\n $this->captura('desc_orden', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"3d78f76818aff63033721d495ede4c70","score":"0.542111","text":"function paradasCorredor($codCorredor){\r\n\t$ck = arrumaCookie(cookieSecao());\r\n\t$data = urlencode($codCorredor);\r\n\treturn json_decode(do_get_request(urlSp.urlParadasCorredor.$data,$ck),true);\r\n}","title":""},{"docid":"2df8bd514dbd10eb8ed19663958638d4","score":"0.5420119","text":"function modificarObsPresupuestos()\n {\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\n $this->transaccion = 'TES_OBSPRE_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\n $this->setParametro('obs', 'obs', 'varchar');\n $this->setParametro('fecha_cer_pres', 'fecha_cer_pres', 'date');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"ccc2a0ae40a579dbe20010a48b389813","score":"0.5417308","text":"function modificarTarjetasErp(){\n\n $this->objFunc=$this->create('MODBoleto');\n $this->res=$this->objFunc->modificarTarjetasErp($this->objParam);\n\n if($this->res->getTipo()!='EXITO'){\n $this->res->imprimirRespuesta($this->res->generarJson());\n exit;\n }\n\n\n\n /*Aqui para guardar en el log de datos*/\n $this->objParam->addParametro('observaciones', \"Modificacion MP Tarjetas ERP y STAGE\");\n $this->objFunc=$this->create('MODBoleto');\n $this->res2=$this->objFunc->logModificaciones($this->objParam);\n\n if($this->res2->getTipo()!='EXITO'){\n $this->res2->imprimirRespuesta($this->res2->generarJson());\n exit;\n }\n\n /*Incluyenco la modificacion en el STAGE*/\n $data = array(\"ticketNumber\"=>$this->objParam->getParametro('boleto_a_modificar'),\n \"nroTarjeta\"=>$this->objParam->getParametro('num_tarjeta_1'),\n \"codAutorizacion\"=>$this->objParam->getParametro('cod_tarjeta_1'),\n \"issueDate\"=>$this->objParam->getParametro('issueDate')\n );\n $datosUpdate = json_encode($data);\n\n $envio_dato = $datosUpdate;\n\n $request = 'http://sms.obairlines.bo/CommissionServices/ServiceComision.svc/UpdatePaymentMethod';\n $session = curl_init($request);\n curl_setopt($session, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($session, CURLOPT_POSTFIELDS, $envio_dato);\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($session, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($envio_dato))\n );\n\n $result = curl_exec($session);\n curl_close($session);\n\n\n\n $respuesta = json_decode($result);\n\n $respuesta_final = json_decode($respuesta->UpdatePaymentMethodResult);\n\n $respuesta_estado_servicio = $respuesta_final->State;\n\n if ($respuesta_estado_servicio == true) {\n $respuesta_base_datos = $respuesta_final->Data;\n\n if ($respuesta_base_datos) {\n $respuesta_mensaje = $respuesta_base_datos[0]->Result;\n\n if ($respuesta_mensaje == 1) {\n $respuesta_mensaje = \"Medio de Pago modificado Correctamente en STAGE\";\n $error = false;\n } else {\n $error = true;\n $respuesta_mensaje = 'Error en la modificacion DB';\n }\n\n } else {\n $error = true;\n $respuesta_mensaje = 'Error en el Servicio cod: 2';\n }\n\n } else {\n $error = true;\n $respuesta_mensaje = 'Error en el servicio cod: 1';\n }\n\n\n\n if ($this->objParam->getParametro('num_tarjeta_2') != '' && $this->objParam->getParametro('num_tarjeta_2') != null) {\n\n $data2 = array(\"ticketNumber\"=>$this->objParam->getParametro('boleto_a_modificar'),\n \"nroTarjeta\"=>$this->objParam->getParametro('num_tarjeta_2'),\n \"codAutorizacion\"=>$this->objParam->getParametro('cod_tarjeta_2'),\n \"issueDate\"=>$this->objParam->getParametro('issueDate'));\n $datosUpdate2 = json_encode($data2);\n\n $envio_dato2 = $datosUpdate2;\n\n $request2 = 'http://sms.obairlines.bo/CommissionServices/ServiceComision.svc/UpdatePaymentMethod';\n $session2 = curl_init($request2);\n curl_setopt($session2, CURLOPT_CUSTOMREQUEST, \"POST\");\n curl_setopt($session2, CURLOPT_POSTFIELDS, $envio_dato2);\n curl_setopt($session2, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($session2, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($envio_dato2))\n );\n\n $result2 = curl_exec($session2);\n curl_close($session2);\n\n $respuesta2 = json_decode($result2);\n\n $respuesta_final2 = json_decode($respuesta2->UpdatePaymentMethodResult);\n\n $respuesta_estado_servicio2 = $respuesta_final2->State;\n\n if ($respuesta_estado_servicio2 == true) {\n $respuesta_base_datos2 = $respuesta_final2->Data;\n\n if ($respuesta_base_datos2) {\n $respuesta_mensaje2 = $respuesta_base_datos2[0]->Result;\n\n if ($respuesta_mensaje2 == 1) {\n $respuesta_mensaje2 = \"Medios de Pago modificados Correctamente en STAGE\";\n $error2 = false;\n } else {\n $error2 = true;\n $respuesta_mensaje2 = 'Error en la modificacion DB';\n }\n\n } else {\n $error2 = true;\n $respuesta_mensaje2 = 'Error en el Servicio cod: 2';\n }\n\n } else {\n $error2 = true;\n $respuesta_mensaje2 = 'Error en el servicio cod: 1';\n }\n\n if (($error == false) && ($error2 == false)) {\n\n\n $send = array(\n \"error\" => $error, // todo\n \"data\" => [\"mensaje_exito\" => $respuesta_mensaje2]\n );\n echo json_encode($send);\n\n } else {\n\n $send = array(\n \"error\" => $error, // todo\n \"data\" => [\"mensaje_exito\" => $respuesta_mensaje2]\n );\n echo json_encode($send);\n\n }\n\n } else {\n\n\n $send = array(\n \"error\" => $error, // todo\n \"data\" => [\"mensaje_exito\" => \"Datos Modificados Correctamente en ERP y Stage\"]\n );\n echo json_encode($send);\n }\n\n /****************************************/\n\n\n\n\n \t}","title":""},{"docid":"12d557e46431b9224aea2fe80c0b88d8","score":"0.5415781","text":"public function EditarDatosPaciente()\n{\n\n $datosEditarPaciente = new GestionarPaciente();\n $idUsuario=base64_decode($_REQUEST['g']);\n \n if(isset($idUsuario)){\n\n $datosEditarPaciente = $this->modelo->ObtenerDatosEditarPaciente($idUsuario);\n}\nrequire_once 'Vista/Header.php';\nrequire_once 'Vista/GestionPacientes/EditarPaciente.php'; \nrequire_once 'Vista/Footer.php'; \n\n}","title":""},{"docid":"1971f245c59bde4ae181b8ab3607b0aa","score":"0.5411199","text":"function listarCotizacion(){\r\n\t\t$this->procedimiento='mat.ft_cotizacion_sel';\r\n\t\t$this->transaccion='MAT_CTS_SEL';\r\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n $this->setParametro('id_solicitud','id_solicitud','int4');\r\n\t\t//Definicion de la lista del resultado del query\r\n\t\t$this->captura('id_cotizacion','int4');\r\n\t\t$this->captura('id_solicitud','int4');\r\n\t\t$this->captura('id_moneda','int4');\r\n\t\t$this->captura('nro_tramite','varchar');\r\n\t\t$this->captura('fecha_cotizacion','date');\r\n\t\t$this->captura('adjudicado','varchar');\r\n\t\t$this->captura('estado_reg','varchar');\r\n\t\t$this->captura('id_proveedor','int4');\r\n\t\t$this->captura('monto_total','numeric');\r\n\t\t$this->captura('id_usuario_ai','int4');\r\n\t\t$this->captura('id_usuario_reg','int4');\r\n\t\t$this->captura('fecha_reg','timestamp');\r\n\t\t$this->captura('usuario_ai','varchar');\r\n\t\t$this->captura('id_usuario_mod','int4');\r\n\t\t$this->captura('fecha_mod','timestamp');\r\n\t\t$this->captura('usr_reg','varchar');\r\n\t\t$this->captura('usr_mod','varchar');\r\n\t\t$this->captura('desc_moneda','varchar');\r\n\t\t$this->captura('desc_proveedor','varchar');\r\n\t\t$this->captura('nro_cotizacion','varchar');\r\n\t\t$this->captura('recomendacion','varchar');\r\n\t\t$this->captura('obs','varchar');\r\n\t\t$this->captura('pie_pag','varchar');\r\n\t\t//\r\n\t\t// $this->captura('id_condicion_entrega','int4');\r\n\t\t// $this->captura('id_forma_pago','int4');\r\n\t\t// $this->captura('id_modo_envio','int4');\r\n\t\t// $this->captura('id_puntos_entrega','int4');\r\n\t\t// $this->captura('id_tipo_transaccion','int4');\r\n\t\t// $this->captura('id_orden_destino','int4');\r\n\t\t//\r\n\t\t// $this->captura('codigo_condicion_entrega','varchar');\r\n\t\t// $this->captura('codigo_forma_pago','varchar');\r\n\t\t// $this->captura('codigo_modo_envio','varchar');\r\n\t\t// $this->captura('codigo_puntos_entrega','varchar');\r\n\t\t// $this->captura('codigo_tipo_transaccion','varchar');\r\n\t\t// $this->captura('codigo_orden_destino','varchar');\r\n\t\t$this->captura('tipo_evaluacion','varchar');\r\n\t\t$this->captura('id_proveedor_contacto','int4');\r\n\t\t$this->captura('desc_contacto','varchar');\r\n\r\n\t\t//Ejecuta la instruccion\r\n\t\t$this->armarConsulta();\r\n\t\t$this->ejecutarConsulta();\r\n\t\t//Devuelve la respuesta\r\n\t\treturn $this->respuesta;\r\n\t}","title":""},{"docid":"a84d2c10331294ca9a48103af7d7c003","score":"0.5407112","text":"public function filtrosConsultaCorreosPadres() \n {\n try { \n $content = trim(file_get_contents(\"php://input\")); \n $decoded = json_decode($content, true); \n\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager()); \n $ciclo = $dbm->getRepositoriosById('Ciclo', 'activo', 1);\n $nivel = $dbm->getRepositoriosById('Nivel', 'activo', 1);\n $semestre = $dbm->getRepositoriosById('CeSemestre', 'activo', 1);\n $grado = $dbm->getRepositoriosById('Grado', 'activo', 1); \n $grupo = $dbm->getRepositoriosById('CeGrupo', 'tipogrupoid', 1);\n \n return Api::Ok(\"Filtros\",\n array(\n \"ciclo\" => $ciclo,\n \"grado\" => $grado,\n \"nivel\" => $nivel,\n \"semestre\" => $semestre,\n \"grupo\" => $grupo \n ));\n } catch (\\Exception $e) {\n return Api::Error(Response::HTTP_BAD_REQUEST, $e->getMessage()); \n }\n }","title":""},{"docid":"27c289df5d1d5db0c2c54048bfe81f1f","score":"0.54047674","text":"function reportePreOrdenCompra()\n {\n\n $this->procedimiento = 'adq.f_solicitud_sel';\n $this->transaccion = 'ADQ_SOLOC_REP';\n $this->tipo_procedimiento = 'SEL';\n $this->setCount(false);\n\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('id_proveedor', 'id_proveedor', 'int4');\n $this->captura('desc_proveedor', 'varchar');\n $this->captura('id_persona', 'int4');\n $this->captura('dir_persona', 'varchar');\n $this->captura('telf1_persona', 'varchar');\n $this->captura('telf2_persona', 'varchar');\n $this->captura('cel_persona', 'varchar');\n $this->captura('correo_persona', 'varchar');\n $this->captura('id_institucion', 'int4');\n $this->captura('dir_institucion', 'varchar');\n $this->captura('telf1_institucion', 'varchar');\n $this->captura('telf2_institucion', 'varchar');\n $this->captura('cel_institucion', 'varchar');\n $this->captura('email_institucion', 'varchar');\n $this->captura('fax_institucion', 'varchar');\n $this->captura('lugar_entrega', 'varchar');\n $this->captura('tipo', 'varchar');\n $this->captura('moneda', 'varchar');\n $this->captura('codigo_moneda', 'varchar');\n $this->captura('num_tramite', 'varchar');\n\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //var_dump($this->respuesta); exit;\n return $this->respuesta;\n }","title":""},{"docid":"1559c56cd2cb521a00accbd12eaedf5d","score":"0.54030406","text":"public function actionCotizarV2(){\n $request = Yii::$app->request;\n $params = $request->bodyParams;\n\n $tipoPaquete = $request->getBodyParam(\"tipo_paquete\");\n\n if(!$tipoPaquete){\n throw new HttpException(500, \"No se envio el tipo de paquete\");\n }\n $cotizacion = new CotizacionRequest();\n $cotizacion->origenCP = $request->getBodyParam(\"cp_from\");\n $cotizacion->origenCountry = $request->getBodyParam(\"country_code_from\");\n $cotizacion->origenStateCode = $request->getBodyParam(\"state_code_from\");\n\n $cotizacion->destinoCP = $request->getBodyParam(\"cp_to\");\n $cotizacion->destinoCountry = $request->getBodyParam(\"country_code_to\");\n $cotizacion->destinoStateCode = $request->getBodyParam(\"state_code_to\");\n\n //Fecha de solicitud de envio o recoleccion\n $cotizacion->solicitaPickup = $request->getBodyParam(\"b_requiere_recoleccion\");\n if($request->getBodyParam(\"fch_recoleccion\") != null){\n $cotizacion->fecha = $request->getBodyParam(\"fch_recoleccion\");\n }else{\n $cotizacion->fecha = Calendario::getFechaActualMasDias(1); //Si no indica la fecha, le agrega 1 día para el envio\n }\n\n //Uso de seguro del envío\n if($request->getBodyParam(\"num_monto_seguro\") != null){\n $cotizacion->montoSeguro = $request->getBodyParam(\"num_monto_seguro\");\n $cotizacion->hasSeguro = true;\n }\n \n\n if(strtoupper($tipoPaquete)==\"SOBRE\"){\n $cotizacion->isPaquete = false;\n $dimenSobre = $request->getBodyParam(\"dimensiones_sobre\");\n $cotizacion->addSobre($dimenSobre[\"num_peso\"]/1000);\n }else{\n $cotizacion->isPaquete = true;\n $paquetesRequest = $request->getBodyParam(\"dimensiones_paquete\");\n \n foreach($paquetesRequest as $paquete){\n $cotizacion->addPaqueteElementos($paquete[\"num_alto\"],$paquete[\"num_ancho\"],$paquete[\"num_largo\"],$paquete[\"num_peso\"]);\n }\n }\n\n\n //Llama al servicio de cotización pertinente\n if($cotizacion->isPaquete){\n $cotizador = new CotizadorPaquete();\n return $cotizador->realizaCotizacion($cotizacion);\n }else{\n $cotizador = new CotizadorSobre();\n return $cotizador->realizaCotizacion($cotizacion);\n }\n }","title":""},{"docid":"4818e5f19dbf03a85aee6f7518ad7543","score":"0.5400881","text":"static public function ctrRegistroBitacoraAgregar(){\r\n\r\n\t\tif (isset($_POST[\"idPedido\"])) {\r\n\t\t\t\r\n\t\t\t$tabla = \"bitacora\";\r\n\r\n\t\t\t$datos = array(\"usuario\" => $_SESSION['nombre'],\r\n\t\t\t\t\t\t\t\t \"perfil\" => $_SESSION['perfil'],\r\n\t\t\t\t\t\t\t\t \"accion\" => 'Seguimiento de Pedido Laboratorio',\r\n\t\t\t\t\t\t\t\t \"folio\" => $_POST[\"idPedido\"]);\r\n\r\n\t\t\t$respuesta = ModeloLaboratorio::mdlRegistroBitacoraAgregar($tabla, $datos);\r\n\r\n\t\t\treturn $respuesta;\r\n\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}","title":""},{"docid":"c3d21bed8c501b8a0ea7c4ca02d445d6","score":"0.53993607","text":"function anteriorEstadoCaja(){\n $this->procedimiento='tes.ft_caja_ime';\n $this->transaccion='TES_ANTECAJA_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\n $this->setParametro('obs','obs','text');\n $this->setParametro('json_procesos','json_procesos','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"87535d6e77549678f29b4e7d8d72c7b3","score":"0.5396186","text":"function modificarObsPresupuestos()\n {\n $this->procedimiento = 'adq.f_solicitud_ime';\n $this->transaccion = 'ADQ_MODOBS_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('obs', 'obs', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"96b732e9256b87e7a5fafe3b9c011b84","score":"0.5395967","text":"function enviarcorreo_cliente($t_nombres,$t_apellido1,$email,$creditcardtype,$last4carddigits){\n \n $mensaje = \" \".$t_nombres.\" \".$t_apellido1.\": ¡Bienvenido a REST911 servicio MEDICO EN ATENCION DOMICILIARIA! REST911 es la empresa líder en la ZONA NORTE DEL PAIS y esperamos que su experiencia de contratación en línea haya cumplido con sus expectativas, al igual que miles de familias han confiado en nosotros, es nuestro desafío atender sus requerimientos en atención oportuna que usted y su familia necesitan.\n Sus servicios quedaran activados dentro de las próximas 24 HORAS Hábiles, adjuntamos Instructivo de uso del servicio.\n Si tiene una emergencia debe llamarnos al 442 469 911 desde cualquier teléfono fijo o móvil o si lo prefiera al número 225738555. Nuestros profesionales de servicio están las 24 horas del día todo los días del año, listos para para ayudar de manera oportuna.\n Si tiene cualquier duda o consulta con las características de su plan, puede escribirnos a sac@rest911.cl \n Su pago inicial se aplicó conforme al Tipo de Plan seleccionado y en adelante sus pagos (mensual-trimestral-semestral ó anual) se aplicarán en modalidad automática para su comodidad y tranquilidad con cargo a su tarjeta \".$creditcardtype.\" número XXXX XXXX XXXX \".$last4carddigits.\" . \n REST911 más de 10 años protegiendo a las familias y al cuidado de los trabajadores.\n Por cualquier duda o consulta, no dude en contactarnos.\n Saludos\";\n\n $destinatario = $email;\n\n $asunto = \"REST911 Bienvenida y Confirmación de Pago - Activación en 24 Horas Hábiles\";\n\n // Datos de la cuenta de correo utilizada para enviar vía SMTP\n $smtpHost = \"pyme91.pymedns.net\"; // Dominio alternativo brindado en el email de alta \n $smtpUsuario = \"autocontrato@rest911.cl\"; // Mi cuenta de correo\n $smtpClave = \"%&auto&%web2020\"; // Mi contraseña\n $correo = ('autocontrato@rest911.cl'); // Email desde donde se envia el correo\n $nombre = \"REST911\";\n \n \n \n\n\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPAuth = true; // authentication enabled\n $mail->Port = 465; \n $mail->IsHTML(true); \n $mail->CharSet = \"utf-8\";\n $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail\n \n //adicional\n //$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\n //$mail->SMTPDebug = 2;\n //$mail->Debugoutput = 'html';\n \n \n // VALORES A MODIFICAR //\n $mail->Host = $smtpHost; \n $mail->Username = $smtpUsuario; \n $mail->Password = $smtpClave;\n\n\n $mail->From = ($correo); // Email desde donde envío el correo.\n $mail->FromName = $nombre;\n $mail->AddAddress($destinatario); // Esta es la dirección a donde enviamos los datos del formulario\n //ADJUNTO\n $url = 'https://planes.rest911.cl/docu/Rest911%20Instructivo%20Usuario%20Activacion%20Servicio.pdf';\n $fichero = file_get_contents($url);\n $mail->addStringAttachment($fichero, 'Rest911 Instructivo Usuario Activacion Servicio.pdf');\n\t\n $mail->Subject = $asunto; // Este es el titulo del email.\n $mensajeHtml = nl2br($mensaje);\n \n $mail->Body = \"\n \n\t\n \n \n
\n

{$t_nombres} {$t_apellido1} :

\n \n ¡Bienvenido a REST911 servicio MEDICO EN ATENCION DOMICILIARIA! REST911 es la empresa líder en la ZONA NORTE DEL PAIS y esperamos que su experiencia de contratación en línea haya cumplido con sus expectativas, al igual que miles de familias han confiado en nosotros, es nuestro desafío atender sus requerimientos en atención oportuna que usted y su familia necesitan.

\n \n Sus servicios quedaran activados dentro de las próximas 24 HORAS Hábiles, adjuntamos Instructivo de uso del servicio.

\n \n Si tiene una emergencia debe llamarnos al 442 469 911 desde cualquier teléfono fijo o móvil o si lo prefiera al número 225738555. Nuestros profesionales de servicio están las 24 horas del día todo los días del año, listos para para ayudar de manera oportuna.
\n \n

Si tiene cualquier duda o consulta con las características de su plan, puede escribirnos a sac@rest911.cl

\n \n Su pago inicial se aplicó conforme al Tipo de Plan seleccionado y en adelante sus pagos (mensual-trimestral-semestral ó anual) se aplicarán en modalidad automática para su comodidad y tranquilidad con cargo a su tarjeta {$creditcardtype} número XXXX XXXX XXXX {$last4carddigits} .

\n \n REST911 más de 10 años protegiendo a las familias y al cuidado de los trabajadores.

\n \n Por cualquier duda o consulta, no dude en contactarnos.

\n \n Saludos
\n REST911\n
\n\t\n \n\n \n\n
\"; // Texto del email en formato HTML\n $mail->AltBody = \"{$mensaje} \\n\\n \"; // Texto sin formato HTML\n // FIN - VALORES A MODIFICAR //\n\n $mail->SMTPOptions = array(\n 'ssl' => array(\n 'verify_peer' => false,\n 'verify_peer_name' => false,\n 'allow_self_signed' => true\n )\n );\n \n \n \n return($mail->Send());\n}","title":""},{"docid":"771ebcfccb1ecdcd8f0c482458b148bf","score":"0.5393932","text":"public function ObtenerAcceso($Documento, $Clave)\r\n {\r\n try\r\n { \r\n $cn = Conexion::ObtenerConexion();\r\n $rs= $cn->query(\"CALL SPR_R_ObtenerAcceso('\" . $Documento . \"', '\" . $Clave . \"')\");\r\n $vecresultado = array(); // Recorremos el resultado de la consulta y lo almacenamos en el array\r\n while ($fila = $rs->fetch_row()) {\r\n array_push($vecresultado, $fila); \r\n }\r\n mysqli_free_result($rs);\r\n mysqli_close($cn);\r\n if ($vecresultado!= NULL)\r\n {\r\n $operario = new Operario(); \r\n $operario->setOperario_Id($vecresultado[0][0]); \r\n $operario->setNombres($vecresultado[0][1]);\r\n $operario->setApellidos($vecresultado[0][2]); \r\n $operario->setPerfil($vecresultado[0][3]);\r\n unset($vecresultado);\r\n return $operario;\r\n }\r\n else\r\n {\r\n return NULL;\r\n }\r\n }\r\n catch (Exception $ex)\r\n {\r\n echo $ex;\r\n }\r\n }","title":""},{"docid":"2951e605cef32f3901b7147ae56fca8e","score":"0.53844124","text":"function Grabar_Bono_Regular($dpi,$monto,$moneda,$tcambio,$desc){\n //instanciamos el objeto para generar la respuesta con ajax\n $respuesta = new xajaxResponse();\n $ClsPla = new ClsPlanillaAsignaciones();\n //pasa a mayusculas\n\t\t$desc = trim($desc);\n\t//--------\n\t//decodificaciones de tildes y Ñ's\n\t\t$desc = utf8_encode($desc);\n\t\t//--\n\t\t$desc = utf8_decode($desc);\n\t//-------- \n if($dpi !=\"\" && $desc !=\"\" && $monto != \"\" && $moneda != \"\" && $tcambio != \"\"){\n\t\t//$respuesta->alert(\"$id\");\n\t\t$cod = $ClsPla->max_base_bonificaciones($dpi);\n\t\t$cod++;\n\t\t$sql = $ClsPla->insert_base_bonificaciones($cod,$dpi,$monto,$moneda,$tcambio,$desc); /// Inserta\n\t\t//$respuesta->alert(\"$sql\");\n\t\t$rs = $ClsPla->exec_sql($sql);\n\t\tif($rs == 1){\n\t\t\t$respuesta->script('swal(\"Excelente!\", \"Registros guardados satisfactoriamente!\", \"success\").then((value)=>{ window.location.reload(); });');\n\t\t}else{\n\t\t\t$respuesta->script('swal(\"Error\", \"Error de transacci\\u00F3n...\", \"error\").then((value)=>{ cerrar(); });');\n\t\t\t$respuesta->script(\"document.getElementById('gra').className = 'btn btn-primary';\");\n\t\t\t$respuesta->script(\"document.getElementById('mod').className = 'btn btn-primary hidden';\");\n\t\t}\n\t}\n \n return $respuesta;\n}","title":""},{"docid":"0e081773fc7935fbf79c87da3c355057","score":"0.5382907","text":"function cotizar($serviciosReferencias) {\r\n\t\r\n\t\r\n\t$cadErrores = '';\r\n\t$cad = 'tela';\r\n\t$cad1 = 'resi';\r\n\t$sistemaNormal = 0;\r\n\t$sistemaDoble = 0;\r\n\t$sistema = 1;\r\n\t$idResiduo = 0;\r\n\t\r\n\t$idTela = array();\r\n\t\r\n\t$resTelas = $serviciosReferencias->traerTelas();\r\n\t$resResiduos = $serviciosReferencias->traerResiduos();\r\n\t\r\n\t$idResiduo = $_POST['refresiduo'];\r\n\r\n\t$refroles = $_POST['refroles'];\r\n\tif ($refroles == 3) {\r\n\t\t$esRevendedor = 1;\r\n\t} else {\r\n\t\t$esRevendedor = 0;\r\n\t}\r\n\r\n\t$sistema = $_POST['normal'];\r\n\t\r\n\t$idTela[] = $_POST['reftelas'];\r\n\t$idTela[] = $_POST['reftelaopcional'];\r\n\t\r\n\t$ancho\t=\t(float)$_POST['ancho'] * 100;\r\n\t$alto\t=\t(float)$_POST['alto'] * 100;\r\n\t\r\n\t\r\n\t/*\r\n\tif ((sizeof($idTela) < 2) and ($sistema == 2)) {\r\n\t\t$cadErrores .= \"_ Debe seleccionar el segundo Material
\"; \r\n\t}\r\n\t\r\n\tif ((sizeof($idTela) > 2) and ($sistema == 2)) {\r\n\t\t$cadErrores .= \"_ Selecciono más de un Material
\"; \r\n\t}\r\n\t\r\n\tif ((sizeof($idTela) > 1) and ($sistema == 1)) {\r\n\t\t$cadErrores .= \"_ Selecciono más de un Material
\"; \r\n\t}\r\n\tif (sizeof($idTela) < 1) {\r\n\t\t$cadErrores .= \"_ Debe seleccionar un Material
\"; \r\n\t}\r\n\t*/\r\n\tif ($idResiduo == 0) {\r\n\t\t$cadErrores .= \"_ Debe seleccionar un Residuo
\"; \r\n\t}\r\n\t\r\n\t\r\n\t\r\n\tif (($ancho == '') || ($ancho < 20)) {\r\n\t\t$cadErrores .= \"_ Debe cargar un acnho o el ancho a menor a las 20 centimetros
\"; \r\n\t}\r\n\t\r\n\tif (($alto == '') || ($alto < 20)) {\r\n\t\t$cadErrores .= \"_ Debe cargar un alto o el alto a menor a las 20 centimetros
\"; \r\n\t}\r\n\t\r\n\t\r\n\tif ($cadErrores == '') {\r\n\t\t$total = $serviciosReferencias->cotizar($sistema, $idTela, $idResiduo, $ancho, $alto, $esRevendedor);\r\n\t\techo $total;\r\n\t} else {\r\n\t\techo $cadErrores;\t\r\n\t}\r\n}","title":""},{"docid":"ff8eac78c5557ba590b5540374800f67","score":"0.5376894","text":"function CallAPI($method, $url, $data = false)\n{\n $curl = curlemu_init();\n\n switch ($method){\n case \"POST\":\n curlemu_setopt($curl, CURLOPT_POST, 1);\n if ($data){\n curlemu_setopt($curl, CURLOPT_POSTFIELDS, $data);\n }\n break;\n case \"PUT\":\n curlemu_setopt($curl, CURLOPT_PUT, 1);\n break;\n default:\n if ($data)\n $url = sprintf(\"%s?%s\", $url, http_build_query($data));\n }\n\n // Optional Authentication:\n curlemu_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n // curlemu_setopt($curl, CURLOPT_PORT, 81);\n curlemu_setopt($curl, CURLOPT_URL, $url);\n curlemu_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n $result = curlemu_exec($curl);\n\n if(!$result){\n var_dump(curlemu_error($curl));\n }\n curlemu_close($curl);\n return $result;\n}","title":""},{"docid":"5f4e2ca7025fa3b7963d20e126b5eacf","score":"0.53768104","text":"function __construct($idInventario=\"\",$serial=\"\",$idDescripcion=\"\",$idMarca=\"\",$idModelo=\"\",$fru=\"\",$productNumber=\"\",$spareNumber=\"\",$ct=\"\",$idPedido=\"\",\n\t$fechaInicio=\"\",$fechaFinal=\"\",$disponible=0,$codigoSap=\"\",$idInventarioUsuario=\"\",$ficha=\"9999999\",$statusActual=\"\",$fechaAsociacion=\"\",\n\t$idInventarioPropiedad=\"\",$idUss=\"\",$idEstado=\"\",$idInventarioUbicacion=\"\",$idDepartamento=\"\",$idSitio=\"\",$especifico=\"\",$SeviceTag=\"\",$ExpressService=\"\") {\n\t\t$this->idInventario;\n\t\t$this->serial=strtoupper($serial);\n\t\t$this->idDescripcion=$idDescripcion;\n\t\t$this->idMarca=$idMarca;\n\t\t$this->idModelo=$idModelo;\n\t\t$this->fru=strtoupper($fru);\n\t\t//*********************************\n\t\t//*********************************\n\t\t$this->ServiceTag=strtoupper($SeviceTag);\n\t\t$this->ExpressService=strtoupper($ExpressService);\n\t\t//*********************************\n\t\t//*********************************\n\t\t$this->productNumber=strtoupper($productNumber);\n\t\t$this->spareNumber=strtoupper($spareNumber);\n\t\t$this->ct=strtoupper($ct);\n\t\t$this->idPedido=$idPedido;\n\t\t$this->fechaInicio=substr($fechaInicio,6,6).\"-\".substr($fechaInicio,3,2).\"-\".substr($fechaInicio,0,2);\n\t\t$this->fechaFinal=substr($fechaFinal,6,6).\"-\".substr($fechaFinal,3,2).\"-\".substr($fechaFinal,0,2);\n\t\t$this->disponible=$disponible;\n\t\t$this->codigoSap=$codigoSap;\n\t\t$this->idInventarioUsuario=$idInventarioUsuario;\n\t\t$this->ficha=$ficha;\n\t\t$this->statusActual=$statusActual;\n\t\t$this->fechaAsociacion=getdate();\n\t\t$this->fechaAsociacion=$this->fechaAsociacion[year].\"-\".$this->fechaAsociacion[mon].\"-\".$this->fechaAsociacion[mday].\" \"\n\t\t.$this->fechaAsociacion[hours].\":\".$this->fechaAsociacion[minutes].\":\".$this->fechaAsociacion[seconds];\n\t\t\n\t\t$this->idInventarioPropiedad=$idInventarioPropiedad;\n\t\t$this->idUss=$idUss;\n\t\t$this->idEstado=$idEstado;\n\t\t$this->idInventarioUbicacion=$idInventarioUbicacion;\n\t\t$this->idDepartamento=$idDepartamento;\n\t\t$this->idSitio=$idSitio;\n\t\t$this->especifico=$especifico;\n\t}","title":""},{"docid":"01f422cb8104218b481b577e5bd3dcd1","score":"0.53738475","text":"public function indexAPIRM()\n {\n $response = Http::get('https://datosabiertos.regiondemurcia.es/catalogo/api/action//datastore_search?resource_id=52dd8435-46aa-495e-bd2b-703263e576e7&limit=5&sort=DESCRIPCIONLOCALIDAD desc');\n \n return response()->json(json_decode($response));\n }","title":""},{"docid":"92554adac812357aab650da0cbe446cc","score":"0.5371886","text":"public function obtener_argumentos(Request $request)\n {\n $validator = Validator::make($request->all(), [ \n 'archivo_id' => 'required',\n 'num_pagina' => 'required',\n 'motivo' => 'required',\n 'exacto' => 'required',\n 'pos_pagina' => 'required',\n 'apariencia'=> 'required',\n ]);\n\n if ($validator->fails()) {\n return response()->json(['message'=>$validator->errors()], 500);\n }\n\n $archivo = Archivo::find($request->archivo_id);\n if ($archivo == null) {\n return response()->json(['message'=>\"No se encontro el archivo!\"], 500);\n }\n\n if(!Storage::disk($this->disco)->exists($archivo->ruta)) {\n return response()->json(['message'=>\"No se encontro el archivo (FILESYSTEM)!\"], 500);\n }\n\n $reniec_id = config('app.reniec_id');\n $reniec_secret = config('app.reniec_secret');\n\n if ($reniec_id == '' | $reniec_secret == '') {\n return response()->json(['message'=>\"No se encontraron las claves reniec!\"], 500);\n }\n\n $recursos = new Recursos;\n $ubicacion = $recursos->obtener_pagina($archivo, $request->num_pagina, $request->exacto, $request->pos_pagina, $request->apariencia);\n \n $parametros ='{\n \"app\":\"pdf\",\n \"fileUploadUrl\":\"'.url('json/firma/'.$archivo->id).'/cargar\",\n \"reason\":\"'.$request->motivo.'\",\n \"type\":\"W\",\n \"clientId\":\"'.$reniec_id.'\",\n \"clientSecret\":\"'.$reniec_secret.'\",\n \"dcfilter\":\".*FIR.*|.*FAU.*\",\n \"fileDownloadUrl\":\"'.url('json/firma/'.$archivo->codigo).'/descargar\",\n \"fileDownloadLogoUrl\":\"\",\n \"posx\":\"'.$ubicacion[\"x\"].'\",\n \"posy\":\"'.$ubicacion[\"y\"].'\",\n \"outputFile\":\"'.pathinfo($archivo->ruta, PATHINFO_FILENAME).'[R].pdf\",\n \"protocol\":\"T\",\n \"contentFile\":\"'.$archivo->nombre_real.'\",\n \"stampAppearanceId\":\"'.$request->apariencia.'\",\n \"isSignatureVisible\":\"true\",\n \"idFile\":\"archivo_subir\",\n \"fileDownloadStampUrl\":\"'.asset('img/unamad_firma.png').'\",\n \"pageNumber\":\"'.$ubicacion[\"pagina\"].'\",\n \"maxFileSize\":\"15728640\",\n \"fontSize\":\"7\",\t\t\t\n \"timestamp\":\"false\"\n }';\n\n //error_log('ENVIO');\n return base64_encode($parametros);\n //return $parametros;\n }","title":""},{"docid":"6601560bad91df6a2d00bebb26fa7148","score":"0.537026","text":"function cl_clientescontato() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"clientescontato\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }","title":""},{"docid":"f119dcd397c28f84f5ea609a182607b6","score":"0.53682065","text":"public function apiAction()\n {\n parent::disableViewAndLayout();\n\n //$apiID : kolerasi ke fn cuacaID, cuacaGlobal, prakGel di controller ini\n $apiID = $this->_request->getParam('id', null);\n\n $data = 'Tidak ada data'; //\n //jangan kosong\n if( !is_null($apiID) ){\n $data = self::$apiID();\n }\n\n //note : callback data html saja\n //karena data di bmkg kadang2 mengandung karakter yg tidak valid\n //ketika dipakai di format json / xml callback\n echo json_encode($data);\n }","title":""},{"docid":"c404dfa83b126601d244d87b75b42ac0","score":"0.53654754","text":"function getDatosSolicitud()\n {\n $this->procedimiento = 'adq.f_solicitud_sel';\n $this->transaccion = 'ADQ_GET_DAT_SOL_SEL';\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\n\n $this->setCount(false);\n //$this->setParametro('id_solicitud','id_solicitud','int4');\n\n\n //Definicion de la lista del resultado del query\n $this->captura('id_solicitud', 'integer');\n $this->captura('num_tramite', 'varchar');\n $this->captura('id_depto', 'integer');\n $this->captura('instruc_rpc', 'varchar');\n\n\n $this->armarConsulta();//echo $this->consulta; exit;\n $this->ejecutarConsulta();\n\n return $this->respuesta;\n }","title":""},{"docid":"9439b9a0d17a8086604649528e7b87fb","score":"0.53648096","text":"public function filtrarConsultaCorreosPadres() \n {\n try { \n $content = trim(file_get_contents(\"php://input\")); \n $decoded = json_decode($content, true); \n $decoded = array_filter($decoded); \n\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager()); \n if($decoded['agruparfamilia']) {\n $result = $dbm->ObtenerCorreosPadresFamilia($decoded);\n } else {\n $result = $dbm->ObtenerCorreosPadresAlumnos($decoded);\n } \n\n return Api::Ok(\"Correos #\" . count($result), $result);\n } catch (\\Exception $e) {\n return Api::Error(Response::HTTP_BAD_REQUEST, $e->getMessage()); \n }\n }","title":""},{"docid":"3e5c0d04dda5f8614d4890d1ccdd7067","score":"0.5364721","text":"function cargaAdmin($datos)\n{\n global $servidor;\n global $base;\n global $usuarioBD;\n global $pass;\n global $diaSemana;\n $stopFlag = false; //Variable para controlar el ciclo de asignaciones.\n $rawAsignaciones = array(); //Variable para guardar las asignaciones filtradas, sin procesamiento.\n $finalAsignaciones = array(); //Variable para guardar las asignaciones procesadas y listas para cargar al sistema.\n $errorAsignacion=array();\n $estadoCarga = array(); //Variable para guardar el \"log\" de la carga de las asignaciones.\n $toProcess = json_decode($datos, true);\n $getErrors= json_decode($_POST['errors'], true);\n $responsable = \"NULL\";\n if (isset($_POST['responsible'])) {\n $responsable = $_POST['responsible'];\n }\n # TODO: Camios para nueva instancia.\n # Elementos estaticos:\n # idServicio = ID del servicio que pertenece a Estancia en Campus\n # idGrupo = ID del grupo de Administrativos\n # idEspacio = ID del espacio con nombre UVM Campus Gdl Sur\n\n //Recibe los errores encontrados en el parserFIGO\n foreach ($getErrors as $error) {\n $error = array_map('utf8_decode', $error);\n $error = array_map('trim', $error);\n $tempE = array(\"nss\" => $error['nss'], \"nombre\" => $error['nombre'], \"ap\" => $error['apellidoP'], \"am\" => $error['apellidoM'], \"detalle\" => $error['detalle'], \"espacio\" => $error['espacio'], \"fechaInicio\" => $error['fechaInicio'], \"fechaFin\" => $error['fechaFin'], \"periodo\" => $error['periodo'], \"lunes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"martes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"miercoles\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"jueves\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"viernes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"sabado\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"domingo\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"tipo_error\" => $error['tipo_error']);\n for ($x = 0; $x < count($diaSemana); $x++) {\n if (!empty($error[$diaSemana[$x]])) {\n $timeArray = explode(\" \", $error[$diaSemana[$x]], 2);\n $tempE[$diaSemana[$x]]['hi'] = $timeArray[0];\n $tempE[$diaSemana[$x]]['hf'] = $timeArray[1];\n }\n }\n //Guarda errores recibidos del parserFIGPO\n array_push($errorAsignacion, $tempE);\n }\n //Modificar los datos de entrada del POST\n foreach ($toProcess as $data) {\n $data = array_map('utf8_decode', $data);\n $data = array_map('trim', $data);\n //$pattern=\"/^([0-1][0-9]|[2][0-3])[\\:]([0-5][0-9])$/\";//Expresion regular para validar la hora de inicio y fin\n $erroresHorario=0;\n $temp = array(\"nss\" => $data['nss'], \"nombre\" => $data['nombre'], \"ap\" => $data['apellidoP'], \"am\" => $data['apellidoM'], \"detalle\" => $data['detalle'], \"espacio\" => $data['espacio'], \"fechaInicio\" => $data['fechaInicio'], \"fechaFin\" => $data['fechaFin'], \"periodo\" => $data['periodo'], \"lunes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"martes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"miercoles\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"jueves\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"viernes\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"sabado\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"domingo\" => array(\"hi\" => \"\", \"hf\" => \"\"), \"tipo_error\" => $data['tipo_error']);\n //Validar Horario \n for ($x = 0; $x < count($diaSemana); $x++) {\n if (!empty($data[$diaSemana[$x]])) {\n $timeArray = explode(\" \", $data[$diaSemana[$x]], 3);\n if (empty($timeArray[0])) {\n $temp['tipo_error'] .= \"Error en la captura de horario de \". $diaSemana[$x] . \", \";\n $temp[$diaSemana[$x]]['hi'] = $timeArray[0];\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\n $erroresHorario++;\n continue;\n } else {\n $temp[$diaSemana[$x]]['hi'] = $timeArray[0];\n if (empty($timeArray[1])) {\n $temp['tipo_error'] .= \"Error en la captura de horario de \". $diaSemana[$x] . \", \";\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\n $erroresHorario++;\n continue;\n } else {\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\n if (strtotime($timeArray[0]) > strtotime($timeArray[1])) {\n $temp['tipo_error'].=\"\".$diaSemana[$x]. \"La hora de entrada es mayor a la hora de salida, \";\n $erroresHorario++;\n continue;\n }\n }\n }\n }\n }\n //Validar formato de fecha\n $tempFI = explode(\"/\", $temp['fechaInicio'], 3);\n $tempFF = explode(\"/\", $temp['fechaFin'], 3);\n $eFI=true;\n $eFF=true;\n if (!checkdate($tempFI[0], $tempFI[1], $tempFI[2])) {\n $temp['Tipo_error'] .= \"Formato de Fecha de Inicio incorrecto, \";\n $eFI=false;\n }\n if (!checkdate($tempFF[0], $tempFF[1], $tempFF[2])) {\n $eFF=false;\n $temp['Tipo_error'] .= \"Formato de Fecha de Fin incorrecto, \";\n }\n if ($erroresHorario!=0 || $eFI==false || $eFF==false ) {\n array_push($errorAsignacion, $temp);\n } else {\n array_push($finalAsignaciones, $temp);\n }\n //Gardar en la variable arrayAsignaciones los registros que pasaron el filtro con la informacion que nos interesa.\n //array_push($finalAsignaciones, $temp);\n }\n if (count($errorAsignacion)!=0) {\n echo json_encode(array(\"s\" =>0, \"m\" => \"Error al cargar FIGPO, el archivo contiene errores\", \"d\" => $errorAsignacion));\n } else {\n if (!$con = mysqli_connect($servidor, $usuarioBD, $pass, $base)) {\n die(\"Error de conexion\");\n } else {\n //$rows=count($finalAsignaciones);\n foreach ($finalAsignaciones as $key => $asignacion) {\n $idPersona = 0;\n $idAsignacion = 0;\n $estadoTemp = \"\";\n ////////////////////////////////////////////////////////////////////////////////Verificar si existe una persona\n ////Si hay concidencia en la busqueda de la persona por NSS\n $sql = \" SELECT ID FROM personas WHERE NSS = '{$asignacion['nss']}' \";\n if ($personaNSS = mysqli_query($con, $sql)) {\n //SI la persona ya existe => Actualizar el campo Activo a 1\n //ELSE => Insertar en la base de datos.\n if (mysqli_num_rows($personaNSS) != 0) {\n $estadoTemp .= \"Persona: \" . $asignacion['nss'] . \" ya existe
\";\n while ($row = mysqli_fetch_array($personaNSS)) {\n mysqli_query($con, \"UPDATE personas SET Activo = 1, Detalle = '{$asignacion['detalle']}' WHERE ID = '$row[ID]' \");\n $idPersona = $row['ID'];\n }\n } else {\n $sql = \" INSERT INTO personas (NSS, Nombre, ApellidoP, ApellidoM, Detalle) VALUES ('{$asignacion['nss']}', '{$asignacion['nombre']}', '{$asignacion['am']}', '{$asignacion['ap']}', '{$asignacion['detalle']}')\";\n if (mysqli_query($con, $sql)) {\n if ($idPersona = mysqli_insert_id($con)) {\n $estadoTemp .= \"Nueva Persona Resgistrada: \" . $asignacion['nss'] . \"
\";\n $sql = \" INSERT INTO identificador (ID_Persona, ID1) VALUES ('$idPersona', '{$asignacion['nss']}') \";\n if (mysqli_query($con, $sql)) {\n $estadoTemp .= \"&emsp;Identificador registrado correctamente
\";\n } else {\n $estadoTemp .= \"&emsp;Error al registrar Identificador
\";\n }\n } else {\n $estadoTemp .= \"Error al tratar de insertar nueva persona
\";\n }\n } else {\n $estadoTemp .= \"Error al tratar de insertar nueva persona
\";\n }\n }\n\n ////Registra Area en la tabla servicios.\n $sql=\"SELECT ID FROM servicios where Titulo='{$asignacion['detalle']}' \";\n if ($result = mysqli_query($con,$sql)) {\n if (mysqli_num_rows($result)!=0) {\n $service = mysqli_fetch_assoc($result);\n $service = (int) $service['ID'];\n $estadoTemp .= \"Servicio \".$asignacion['detalle']. \" ya existe
\";\n } else {\n $sql=\"INSERT INTO servicios (Codigo, Titulo, ID_Tipo_Servicio, Departamento, Nivel, Activo) VALUES ('AD', '{$asignacion['detalle']}', 1, 'Administrativo', 'AD', 1)\";\n if (mysqli_query($con,$sql)){\n $sql=\"SELECT ID FROM servicios where Titulo='{$asignacion['detalle']}' \";\n $service=mysqli_fetch_assoc(mysqli_query($con,$sql));\n $service = (int) $service['ID'];\n $estadoTemp .= \"Nuevo servicio registrado: [\".$asignacion['detalle'].\"]\";\n } else {\n $estadoTemp .= \"Error al registrar nuevo servicio\";\n }\n }\n } else {\n $estadoTemp .= \"Error al buscar servicio\";\n }\n ////Revisar si existe un espacio registrado\n $sql = \"SELECT ID FROM espacios WHERE Nombre='{$asignacion['espacio']}' \";\n if ($result= mysqli_query($con, $sql)) {\n if (mysqli_num_rows($result)==1){\n $place=mysqli_fetch_assoc($result);\n $place= (int) $place['ID'];\n $estadoTemp.= \"Ya existe el espacio \".$asignacion['espacio'].\".\";\n } else {\n $sql = \"INSERT INTO espacios (Nombre, Capacidad, ID_Tipo, Activo) VALUES ('{$asignacion['espacio']}', 0, 6, 1)\";\n if (mysqli_query($con,$sql)) {\n $sql=\"SELECT ID FROM espacios WHERE Nombre='{$asignacion['espacio']}' \";\n $place=mysqli_fetch_assoc(mysqli_query($con, $sql));\n $place= (int) $place['ID'];\n $estadoTemp .= \"Nuevo espacio \".$asignacion['espacio'].\" registrado\";\n } else {\n $estadoTemp .= \"Error al registrar el espacio \".$asignacion['espacio'].\".\";\n }\n }\n } else {\n $estadoTemp.= \"Error en la busqueda de espacio\";\n }\n ////Revisar si existen el rol 'Administrativo' registrado\n $sql = \"SELECT ID FROM roles WHERE Nombre='Administrativo'\";\n if ($result= mysqli_query($con, $sql)) {\n if (mysqli_num_rows($result)==1){\n $ID = mysqli_fetch_assoc($result);\n $ID = (int) $ID['ID'];\n $estadoTemp .= \"Ya existe rol \".$ID .\".\";\n } else{\n $sql= \"INSERT INTO roles (Nombre, Activo) VALUES ('Administrativo', 1)\";\n if (mysqli_query($con, $sql)) {\n $sql = \"SELECT ID FROM roles WHERE Nombre='Administrativo'\";\n $ID = mysqli_fetch_assoc(mysqli_query($con,$sql));\n $ID = (int) $ID['ID'];\n $estadoTemp .= \"Rol 'Administrativo' registrado correctamente\";\n } else {\n $estadoTemp .= \"Error al registar Rol 'Administrativo'\";\n }\n }\n } else {\n $estadoTemp .= \"Error al buscar rol 'Administrativo'\";\n }\n ////Revisar si existe un rol asignado para un Administrativo\n $sql = \" SELECT * FROM asignacion_roles WHERE ID_Persona = '$idPersona' \";\n if ($rolAsignado = mysqli_query($con, $sql)) {\n if (mysqli_num_rows($rolAsignado) == 0) {\n $sql = \" INSERT INTO asignacion_roles (ID_Rol, ID_Persona) VALUES ('$ID', '$idPersona') \";\n if (mysqli_query($con, $sql)) {\n $estadoTemp .= \"&emsp;Rol registrado correctamente
\";\n } else {\n $estadoTemp .= \"&emsp;Error al registrar Rol
\";\n }\n } else {\n $sql = \" UPDATE asignacion_roles SET ID_Rol='$ID' WHERE ID_Persona='$idPersona' \";\n if (mysqli_query($con, $sql)) {\n $estadoTemp .= \"&emsp;Rol actualizado
\";\n } else {\n $estadoTemp .= \"&emsp;Error al actualizar Rol
\";\n }\n }\n } else {\n $estadoTemp .= \"&emsp;Error al buscar Roles
\";\n }\n ////Revisar si existe grupo 'Administrativos'\n $sql=\"SELECT ID FROM grupos where Nombre='Administrativos'\";\n if ($result=mysqli_query($con,$sql)) {\n if (mysqli_num_rows($result)==1) {\n $group = mysqli_fetch_assoc($result);\n $group = (int) $group['ID'];\n $estadoTemp .= \"Grupo 'Administrativos' ya existe\";\n } else {\n $sql=\"INSERT INTO grupos (Nombre, ID_Rol, Activo) VALUES ('Administrativos', '$ID', 1)\";\n if (mysqli_query($con,$sql)) {\n $sql = \"SELECT ID FROM grupos where Nombre='Administrativos'\";\n $group = mysqli_fetch_assoc(mysqli_query($con, $sql));\n $group = (int) $group['ID'];\n $estadoTemp .= \"Grupo 'Administrativos' registrado correctamente\";\n } else {\n $estadoTemp .= \"Error al registrar grupo\";\n }\n }\n } else {\n $estadoTemp .= \"Error al buscar grupo 'Administrativos'\";\n }\n\n } else {\n $estadoTemp .= \"&emsp;Error al buscar Persona por NSS
\";\n }\n /////////////////////////////////////////////////////////////Registrar asignaciones\n ////Verificar que la fecha de inicio y fin esten en formato Ingles.\n if ((bool)strtotime($asignacion['fechaInicio']) && (bool)strtotime($asignacion['fechaInicio'])) {\n $tempFI = explode(\"/\", $asignacion['fechaInicio'], 3);\n $tempFF = explode(\"/\", $asignacion['fechaFin'], 3);\n if (checkdate($tempFI[0], $tempFI[1], $tempFI[2]) && checkdate($tempFF[0], $tempFF[1], $tempFF[2])) {\n ////Verificar si existe una asignacion\n $sql = \" SELECT asig.ID FROM asignaciones AS asig\n INNER JOIN servicios AS ser ON asig.ID_Servicio = ser.ID\n INNER JOIN personas AS per on asig.ID_Persona = per.ID\n WHERE ser.ID = '$service' AND per.NSS = '{$asignacion['nss']}'\n AND Periodo = '{$asignacion['periodo']}'\n AND FechaInicio = STR_TO_DATE('{$asignacion['fechaInicio']}', '%m/%d/%Y')\n AND FechaFin = STR_TO_DATE('{$asignacion['fechaFin']}', '%m/%d/%Y') \";\n if ($asignation = mysqli_query($con, $sql)) {\n if (mysqli_num_rows($asignation) != 0) {\n $estadoTemp .= \"Asignación ya registrada
\";\n } else {\n ////Registrar nueva asignacion\n $sql = \"INSERT INTO asignaciones (ID_Grupo, ID_Espacio, ID_Servicio, ID_Persona, FechaInicio, FechaFin, Periodo, CRN, ID_Administrativo, Forma) values ('$group', '$place', '$service', '$idPersona', STR_TO_DATE('{$asignacion['fechaInicio']}', '%m/%d/%Y'), STR_TO_DATE('{$asignacion['fechaFin']}', '%m/%d/%Y'), '{$asignacion['periodo']}', '', $responsable, 'figpo') \"; //'{$asignacion['periodo']}', '{$asignacion['crn']}')\";\n if (mysqli_query($con, $sql)) {\n if ($idAsignacion = mysqli_insert_id($con)) {\n $estadoTemp .= \"Nueva Asignacion
\";\n } else {\n $estadoTemp .= \"Error al seleccionar asignacion
\";\n }\n } else {\n $estadoTemp .= \"Error al tratar de insertar nueva asignacion
\";\n }\n\n ////Registrar detalles_asignacion\n for ($x = 0; $x < count($diaSemana); $x++) {\n if ($asignacion[$diaSemana[$x]]['hi'] != \"\" || $asignacion[$diaSemana[$x]]['hf'] != \"\") {\n if ($x == 2) $dia = strtoupper($diaSemana[$x][0]) . $diaSemana[$x][1];\n else $dia = strtoupper($diaSemana[$x][0]);\n $sql = \"INSERT INTO detalle_asignacion (ID_Asignacion, Dia, HoraInicio, HoraFin) VALUES ('$idAsignacion', '$dia', '{$asignacion[$diaSemana[$x]]['hi']}', '{$asignacion[$diaSemana[$x]]['hf']}') \";\n if (mysqli_query($con, $sql)) {\n $estadoTemp .= \"&emsp;Dia \" . $diaSemana[$x] . \" de \" . $asignacion[$diaSemana[$x]]['hi'] . \" a \" . $asignacion[$diaSemana[$x]]['hf'] . \" registrado
\";\n\n } else {\n $estadoTemp .= \"&emsp;Error al tratar de registrar nuevo Detalle Asignacion
\";\n }\n } else continue;\n }\n }\n } else {\n $estadoTemp .= \"Error al buscar asignaciones
\";\n }\n } else {\n $estadoTemp .= \"Error en el formato de Fecha Inicio o Fecha Fin
\";\n }\n } else {\n $estadoTemp .= \"Error en el formato de Fecha Inicio o Fecha Fin
\";\n }\n\n $estadoTemp .= \"
\";\n array_push($estadoCarga, $estadoTemp);\n }\n echo json_encode(array(\"s\" => 1, \"m\" => \"Carga correcta de Administrativos\", \"d\" => $estadoCarga));\n }\n\n }\n mysqli_close($con);\n}","title":""},{"docid":"8c28903d8b9186c2663360c54c5a6c0d","score":"0.5363422","text":"function cargarDatosProyecto() {\n //verifica el codigo de proyecto\n $codProyecto=(isset($_REQUEST['codProyecto'])?$_REQUEST['codProyecto']:'');\n if($codProyecto=='')\n {\n echo \"No seleccionó proyecto\";exit;\n }\n //borra los registros de estudiantes del proyecto\n $variables=array('CAMPO'=>'ins_est_cra_cod',\n 'VALOR_CAMPO'=>$_REQUEST['codProyecto']);\n $borradas=$this->borrarDatosPrecarga($variables);\n echo \"Se han borrado \".$borradas.\" registros de \";\n //consulta datos delproyecto\n $this->carreras=$this->consultarDatosProyecto($codProyecto);\n echo $this->carreras[0]['NOMBRE_CARRERA'].\".
\";\n $this->totalEstudiantes=0;\n $this->consultarRequisitos(); \n $this->consultarParametros();\n $this->consultarEspaciosCancelados();\n $this->espaciosEquivalentes=$this->consultarEspaciosEquivalentes();\n //ejecuta la carga para el proyecto\n $this->ejecutarCargaPorProyecto($this->carreras[0]);\n //finaliza reporte\n echo \"TOTAL ESTUDIANTES: \".$this->totalEstudiantes.\"
\";\n $this->volver();\n exit;\n }","title":""},{"docid":"3e9589e0519218e22d11e54b5e8ea92b","score":"0.5347954","text":"function respuesta($status, $mensaje, $datos)\n {\n header(\"HTTP/1.1 $status $mensaje\");\n $response['status'] = $status;\n $response['disponibles'] = $mensaje;\n $response['habitaciones_disponibles'] = $datos;\n \n $json_response = json_encode($response);\n echo $json_response;\n }","title":""},{"docid":"184a112d06fbf9858d13556e5716fc61","score":"0.5347343","text":"function NominaWEBRechazoMotivo($idNomina){\n\ttry{\n\t\tglobal $conn;\n\t\t\n\t\t$params = array(\":IDNOMINA\" => $idNomina);\t\n\t\t\n\t\t$sql = \"SELECT r.mr_descripcion, e.ew_observacionesrechazo\n\t\t\t\t FROM hys.hew_establecimientoweb e\n\t\t INNER JOIN \t hys.hmr_motivorechazonomina r ON e.ew_idmotivorechazo = r.mr_id\n\t\t\t\t WHERE e.ew_id = :IDNOMINA\";\n\t\t\n\n\t\t@$stmt = DBExecSql($conn, $sql, $params);\t\n\t\t\n\t\twhile ($row = DBGetQuery($stmt)){\t\n\t\t\n\t\t\t$desc = utf8_encode($row['MR_DESCRIPCION']);\n\t\t\t$obser = utf8_encode($row['EW_OBSERVACIONESRECHAZO']);\n\t\t\t\t\n\t\t\t$row1 = array(\"MR_DESCRIPCION\" => $desc, \n\t\t\t\t\t\t\t\"EW_OBSERVACIONESRECHAZO\" => $obser);\n\t\t\t\t\t\t\t\n\t\t\treturn json_encode($row1);\t\t\n\t\t}\n\t\t\t\t\n\t\treturn json_encode(array(\"MR_DESCRIPCION\" => \"SIN DATOS\", \"EW_OBSERVACIONESRECHAZO\" => \"SIN DATOS\" ));\t\n\t\t\n\t}catch (Exception $e) {\t\t\n\t\tthrow new Exception(\"Error \".$e->getMessage() ); \n\t}\t\n}","title":""},{"docid":"9300360077163fa80079f67c8bd5c9f8","score":"0.53454655","text":"public function contaLancamentosCartao(){\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/lancamentos?access_token='.$this->chave_granatum);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n curl_setopt($ch, CURLOPT_POSTFIELDS, \"conta_id=55632&data_inicio=\".$this->p_dia.\"&data_fim=\".$this->h_dia.\"&tipo_view=count\");\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\n\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\n\n $result = curl_exec($ch);\n if (curl_errno($ch)) {\n echo 'Error:' . curl_error($ch);\n }\n $this->n_lancamentos_cartao = json_decode($result, true);\n\n curl_close($ch);\n }","title":""},{"docid":"27230a7b13286e98591d8985a6c23a6c","score":"0.5345081","text":"function Buscar_Conducta($codigo){\n $respuesta = new xajaxResponse();\n $ClsCon = new ClsConducta();\n //$respuesta->alert(\"$codigo\");\n\t$result = $ClsCon->get_conducta($codigo);\n\tif(is_array($result)){\n\t\t\tforeach($result as $row){\n\t\t\t\t\t$codigo = $row[\"con_codigo\"];\n\t\t\t\t\t$respuesta->assign(\"codigo\",\"value\",$codigo);\n\t\t\t\t\t$pensum = $row[\"con_pensum\"];\n\t\t\t\t\t$respuesta->assign(\"pensum\",\"value\",$pensum);\n\t\t\t\t\t$nivel = $row[\"con_nivel\"];\n\t\t\t\t\t$respuesta->assign(\"nivel\",\"value\",$nivel);\n\t\t\t\t\t$grado = $row[\"con_grado\"];\n\t\t\t\t\t$respuesta->assign(\"grado\",\"value\",$grado);\n\t\t\t\t\t$seccion = $row[\"con_seccion\"];\n\t\t\t\t\t$respuesta->assign(\"grado\",\"value\",$seccion);\n\t\t\t\t\t$alumno = trim($row[\"con_alumno\"]);\n\t\t\t\t\t$respuesta->assign(\"alumno\",\"value\",$alumno);\n\t\t\t\t\t$pipi = trim($row[\"con_cant_pipi\"]);\n\t\t\t\t\t$respuesta->assign(\"pipi\",\"value\",$pipi);\n\t\t\t\t\t$obs = utf8_decode($row[\"con_observaciones\"]);\n\t\t\t\t\t$respuesta->assign(\"obs\",\"value\",$obs);\n\t\t\t}\t\n\t\t}\n\t\t\t//abilita y desabilita botones\n\t\t\t$respuesta->script(\"document.getElementById('mod').className = 'btn btn-primary';\");\n\t\t\t$respuesta->script(\"document.getElementById('gra').className = 'btn btn-primary hidden'\");\n\t\t\t\n\t\t\t$respuesta->script('document.getElementById(\"alumno\").focus();');\n\t\t\t$respuesta->script(\"cerrar();\");\n return $respuesta;\n}","title":""},{"docid":"6a8a56a09466f979bc09214552c00350","score":"0.5343437","text":"public function getCertificacionSegip($data)\n {\n $respuesta = array(\n 'respuesta' => '',\n 'sw' => 0\n );\n\n $error1 = FALSE;\n //dd($data);\n // === OPERACION ===\n try\n {\n\n $params = [\n 'encoding' => 'UTF-8'\n ];\n\n $cliente = new \\SoapClient('http://172.27.104.3:86/ServicioExternoInstitucion.svc?singleWsdl', $params);\n //dd($cliente);\n $parametros = array(\n 'pCodigoInstitucion' => 4,//env('SEGIP_CODIGO_INSTITUCION'),\n 'pUsuario' => 'pablo.corral',//env('SEGIP_USUARIO'),\n 'pContrasenia' => 'Corral2018',//env('SEGIP_CONTRASENIA'),\n 'pClaveAccesoUsuarioFinal' => 'P33638371',//env('SEGIP_CLAVE_ACCESO_USUARIO_FINAL'),\n 'pNumeroAutorizacion' => '',\n 'pNumeroDocumento' => $data['n_documento'],\n 'pComplemento' => $data['complemento'],\n 'pNombre' => $data['nombre'],\n 'pPrimerApellido' => $data['ap_paterno'],\n 'pSegundoApellido' => $data['ap_materno'],\n 'pFechaNacimiento' => date(\"d/m/Y\", strtotime($data['f_nacimiento']))\n );\n\n $respuesta_soap1 = (array) $cliente->ConsultaDatoPersonaCertificacion($parametros);\n //dd($respuesta_soap1);\n $respuesta_soap = (array) $respuesta_soap1[\"ConsultaDatoPersonaCertificacionResult\"];\n }\n catch (Exception $e)\n {\n $respuesta['respuesta'] .= \"ERROR EN EL SOAP\";\n $error1 = TRUE;\n }\n\n if( ! $error1)\n {\n $respuesta['respuesta'] = $respuesta_soap;\n $respuesta['sw'] = 1;\n\n }\n\n return $respuesta;\n }","title":""},{"docid":"67cfa5e7acc0d9ddee18b4d65413c3b5","score":"0.53387725","text":"function generaCodigotodos() {\n $actor = $this->AutoLoadModel('actor');\n $dataActor = $actor->listaTodosActores();\n $cantidad = count($dataActor);\n $cont = 0;\n $cont2 = 0;\n for ($i = 0; $i < $cantidad; $i++) {\n $idactor = $dataActor[$i]['idactor'];\n $filtro = \"idactor='$idactor'\";\n $data['codigo'] = 'GC' . str_pad($idactor, 5, '0', STR_PAD_LEFT);\n $exito = $actor->ActualizaActor($data, $filtro);\n if ($exito) {\n $cont++;\n } else {\n $cont2++;\n }\n }\n echo 'Cantidad Registros correctos :' . $cont;\n echo 'Cantidad Errores : ' . $cont2;\n }","title":""},{"docid":"c9b544ce1d86f16269105ae0c98cabbb","score":"0.5338174","text":"function obtenerdatos($conn2, $fechainicio, $variable)\n\t{\n\t// Creamos una sentencia preparada para evitar inyecciones SQL\n //Obtenemos la lista del IVR que contengan un UCID y especificamos el Rango de Fechas en nuestra Sentencia Preparada\n\t$stmt = $conn2->prepare(\"SELECT logid, split, i_availtime, row_date FROM DAGENT\nwhere row_date = :fechainicio\nand logid=:variable\n;\");\n\t// Enlazamos las variables a nuestros apuntadores para Prepared Statements y Ejecutamos el Query\n\t$stmt->execute([':fechainicio' => $fechainicio, ':variable' => $variable]);\n //Creamos un Objeto con los resultados de la consulta\n\t$array = $stmt->fetchAll(PDO::FETCH_ASSOC);\n //Recorremos este objeto y vamos agregando los resultados de la columna ucid a un Array\n //Si este array se encuentra vacio lanzamos el error que no se encuentran reusltados en la Consola\n\tif (!$array) exit('No hay resultados');\n //Designamos una variable con el objeto base\n\techo json_encode($array);\n //Limpiamos Consultas\n\t$stmt = null;\n\n //Cerramos conexiones\n $conn = null;\n\n\t}","title":""},{"docid":"14f2e7d26e6a457bf380d21b651528a4","score":"0.5334596","text":"public function AgregarRfcFisicaOtra(){\n\n\t\t\t$tabla = \"clientes\";\n\n\t\t\t$datos = array(\"rfc\"=>$_POST[\"nuevoRFC_F\"],\n\t\t\t\t\t\t\t\"nombre\" => $_POST[\"nuevoNombre_F\"],\n\t\t\t\t\t\t\t\"app\" => $_POST[\"nuevoApellidoP_F\"],\n\t\t\t\t\t\t\t\"apm\" => $_POST[\"nuevoApellidoM_F\"],\n\t\t\t\t\t\t\t\"correo\" => $_POST[\"nuevo_Corrreo_F\"],\n\t\t\t\t\t\t\t\"calle\"=>$_POST[\"nuevoCalle_F\"],\n\t\t\t\t\t\t \"ext\"=>$_POST[\"nuevoExterior_F\"],\n\t\t\t\t\t\t \"intt\"=>$_POST[\"nuevoInterior_F\"],\n\t\t\t\t\t\t \"colonia\"=>$_POST[\"nuevoColonia_F\"],\n\t\t\t\t\t\t \"ciudad\"=>$_POST[\"nuevoCiudad_F\"],\n\t\t\t\t\t\t \"estado\"=>$_POST[\"nuevoEstado_F\"],\n\t\t\t\t\t\t \"codigo\"=>$_POST[\"nuevoPostal_F\"],\n\t\t\t\t\t\t \"tel1\"=>$_POST[\"nuevoNumero1_F\"],\n\t\t\t\t\t\t\t\"tel2\" => $_POST[\"nuevoNumero2_F\"]);\n\n\t\t\t$respuesta = ModeloClientes::mdlAgregarClienteFisicaOtro($tabla, $datos);\n\t\t\t$tabla2 =\"direccion_fiscal\";\n\n\t\t\t$result = ModeloClientes::mdlAgregarDomicilioFisicaOtra($tabla2, $datos,$respuesta);\n\n\t\t echo json_encode($result);\n\t\t\t\n\t\t\t\n\n\t}","title":""}],"string":"[\n {\n \"docid\": \"85c11255d273fb1c9ab703ce1a868088\",\n \"score\": \"0.64352584\",\n \"text\": \"function clonarOP(){\\n $this->procedimiento='tes.ft_obligacion_pago_ime';\\n $this->transaccion='TES_REPOP_IME';\\n $this->tipo_procedimiento='IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago','id_obligacion_pago','int4');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3349206830a546974303a30b0ecfc794\",\n \"score\": \"0.62664497\",\n \"text\": \"Public function API(){\\n \\n header('Content-Type: application/JSON'); \\n $method = $_SERVER['REQUEST_METHOD'];\\n switch ($method) {\\n case 'GET'://consulta\\n $this->getOptotypes();\\n break; \\n case 'POST'://inserta\\n //$this->getOptotypesAnswer();\\n break; \\n case 'PUT'://actualiza\\n $this->putOptotypes();\\n break; \\n case 'DELETE'://elimina\\n echo'delete';\\n break;\\n default://metodo NO soportado\\n echo 'METODO NO SOPORTADO';\\n break;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ddd28496717544103c8f5f6c34caade\",\n \"score\": \"0.62419343\",\n \"text\": \"public function API(){\\n header('Content-Type: application/JSON'); //Definos que tipo respuesta va a generar nuestra API \\n $method = $_SERVER['REQUEST_METHOD']; //Recoge el tipo \\\"metodo\\\" del que solicito a la API\\n switch ($method) { \\n case 'POST'://inserta telefono\\n $this->insertNumber();\\n break; \\n default://metodo NO soportado\\n echo 'METODO NO SOPORTADO';\\n break;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbee7d1693614589f008ed1e28caa87c\",\n \"score\": \"0.61481476\",\n \"text\": \"function API_detalle_informacion($codigo){\\n\\t$ClsInfo = new ClsInformacion();\\n\\t\\n\\tif($codigo != \\\"\\\"){\\n\\t\\t$result = $ClsInfo->get_informacion($codigo,\\\"\\\",\\\"\\\",\\\"\\\");\\n\\t\\tif(is_array($result)){\\n\\t\\t\\t$i = 0;\\t\\n\\t\\t\\tforeach ($result as $row){\\n\\t\\t\\t\\t$arr_data[$i]['codigo'] = $row[\\\"inf_codigo\\\"];\\n $imagen = trim($row[\\\"inf_imagen\\\"]);\\n\\t\\t\\t\\t$imagen = ($imagen == \\\"\\\")?\\\"https://\\\" . $_SERVER['HTTP_HOST'] . \\\"/CONFIG/images/banersapp/baner_actividad.png\\\":\\\"https://\\\" . $_SERVER['HTTP_HOST'] . \\\"/CONFIG/Actividades/\\\".trim($row[\\\"inf_imagen\\\"]);\\n\\t\\t\\t\\t$arr_data[$i]['imagen'] = $imagen;\\n\\t\\t\\t\\t$url = trim($row[\\\"inf_link\\\"]);\\n\\t\\t\\t\\t$arr_data[$i]['link'] = $url;\\n\\t\\t\\t\\t/*if (preg_match('#^(https?://|www\\\\.)#i', $url) === 1){\\n\\t\\t\\t\\t\\t$arr_data[$i]['link'] = $url;\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$arr_data[$i]['link'] = \\\"\\\";\\n\\t\\t\\t\\t}*/\\n\\t\\t\\t\\t$arr_data[$i]['ics'] = \\\"https://\\\" . $_SERVER['HTTP_HOST'] .\\\"/SISTEM/API/API_ICScalendario.php?codigo=\\\".trim($row[\\\"inf_codigo\\\"]);\\n $arr_data[$i]['titulo'] = trim($row[\\\"inf_nombre\\\"]);\\n\\t\\t\\t\\t$arr_data[$i]['descripcion'] = trim($row[\\\"inf_descripcion\\\"]);\\n\\t\\t\\t\\t$fini = trim($row[\\\"inf_fecha_inicio\\\"]);\\n\\t\\t\\t\\t$ffin = trim($row[\\\"inf_fecha_fin\\\"]);\\n\\t\\t\\t\\t//--\\t\\t\\t\\t\\n\\t\\t\\t\\t$fechaini = explode(\\\" \\\",$fini);\\n\\t\\t\\t\\t$fini = cambia_fecha($fechaini[0]);\\n\\t\\t\\t\\t$arr_data[$i]['fecha_inicio'] = $fini;\\n\\t\\t\\t\\t$arr_data[$i]['hora_inicio'] = substr($fechaini[1], 0, -3);\\n\\t\\t\\t\\t//--\\n\\t\\t\\t\\t$fechafin = explode(\\\" \\\",$ffin);\\n\\t\\t\\t\\t$fini = cambia_fecha($fechafin[0]);\\n\\t\\t\\t\\t$arr_data[$i]['fecha_final'] = $fini;\\n\\t\\t\\t\\t$arr_data[$i]['hora_final'] = substr($fechafin[1], 0, -3);\\n\\t\\t\\t\\t//\\n\\t\\t\\t\\tif(file_exists('../../CONFIG/images/logo.png')){ /// valida que tenga foto registrada\\n\\t\\t\\t\\t\\t$arr_data[$i]['url_logo'] = \\\"https://\\\" . $_SERVER['HTTP_HOST'] . \\\"/CONFIG/images/banersapp/logo_fondo.png\\\";\\n\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t$arr_data[$i]['url_logo'] = \\\"https://\\\" . $_SERVER['HTTP_HOST'] . \\\"/CONFIG/images/noimage.png\\\";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t//--\\n\\t\\t\\t\\t$i++;\\n\\t\\t\\t}\\n\\t\\t\\techo json_encode($arr_data);\\n\\t\\t}else{\\n\\t\\t\\t//devuelve un mensaje de manejo de errores\\n\\t\\t\\t$arr_data = array(\\n\\t\\t\\t\\t\\\"status\\\" => \\\"vacio\\\",\\n\\t\\t\\t\\t\\\"message\\\" => \\\"No se registran datos...\\\");\\n\\t\\t\\t\\techo json_encode($arr_data);\\n\\t\\t}\\n\\t}else{\\n\\t\\t//devuelve un mensaje de manejo de errores\\n\\t\\t$arr_data = array(\\n\\t\\t\\t\\\"status\\\" => \\\"error\\\",\\n\\t\\t\\t\\\"message\\\" => \\\"Uno de los campos esta vacio...\\\");\\n\\t\\t\\techo json_encode($arr_data);\\n\\t}\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f91d65ace1c2efce5417f4a02281e03\",\n \"score\": \"0.614707\",\n \"text\": \"function enviarcorreo_interno($destinatario,$destinatario2,$cc,$cc2,$pagos,$fec_pag,$t_nombres,$t_apellido1,$t_apellido2,$rut,$t_fec_nac,$email,$telefono,$telefono2,$direccion,$comuna,$cod_plan,$estado,$nom_plan,$num_benef,$valor_plan_benef,$cod_pago,$tipo_pago,$cant_descuento,$valor_plan,$token,$buyorder,$authorizationcode,$creditcardtype,$last4carddigits,$tbkuser,$username,$fecha_tbk,$payment_type_code,$fec_fac,$clase,$observa,$responsecode,$campania,$camp_nombre){\\n \\n /* Estado del Cliente */\\n if($estado == 'S'){\\n $titulo = 'Transacción Exitosa';\\n }elseif($estado == 'R'){\\n $titulo = 'Rechaza Cobro';\\n }elseif($estado == 'T'){\\n $titulo = 'Rechazo TBK';\\n }elseif($estado == 'I'){\\n $titulo = 'Nueva Suscripción'; \\n }else{\\n $titulo = '';\\n }\\n /* Tipo de Cliente */\\n if($clase == 'A'){\\n $tipo_clase = '(A) Autocontratados';\\n }elseif($clase == 'B'){\\n $tipo_clase = '(B) Inscripción y Cobro';\\n }elseif($clase == 'C'){\\n $tipo_clase = '(C) Solo Inscripción'; \\n }else{\\n $tipo_clase = '';\\n }\\n /* Tipo de Error Clientes antiguos*/\\n if($responsecode == '0'){\\n $obs_error = ''; \\n }elseif($responsecode == '-97'){\\n $obs_error = '-97 máximo monto diario de pago excedido';\\n }elseif($responsecode == '-98'){\\n $obs_error = '-98 máximo monto de pago excedido';\\n }elseif($responsecode == '-99'){\\n $obs_error = '-99 máxima cantidad de pagos diarios excedido'; \\n }elseif(substr($responsecode,0, 1) != 'i' && substr($responsecode,0, 1) != 'c'){\\n if($responsecode < 0 && $responsecode > -9){\\n $obs_error = 'Rechazo TBK'; \\n }\\n }\\n /* Tipo de Error COBRO */\\n elseif($responsecode == 'c-97'){\\n $obs_error = '-97 máximo monto diario de pago excedido';\\n }elseif($responsecode == 'c-98'){\\n $obs_error = '-98 máximo monto de pago excedido';\\n }elseif($responsecode == 'c-99'){\\n $obs_error = '-99 máxima cantidad de pagos diarios excedido'; \\n }elseif(substr($responsecode,0, 1) == 'c'){\\n if(substr($responsecode,1) < 0 && substr($responsecode,1) > -9){\\n $obs_error = 'Rechazo TBK'; \\n } \\n }\\n /* Tipo de Error INSCRIPCION */\\n elseif($responsecode == 'i-1'){\\n $obs_error = '-1 máximo monto diario de pago excedido';\\n }elseif($responsecode == 'i-2'){\\n $obs_error = '-2 máximo monto de pago excedido';\\n }elseif($responsecode == 'i-3'){\\n $obs_error = '-3 máxima cantidad de pagos diarios excedido'; \\n }elseif($responsecode == 'i-4'){\\n $obs_error = '-4 máxima cantidad de pagos diarios excedido'; \\n }elseif($responsecode == 'i-5'){\\n $obs_error = '-5 Rechazo - Posible Fraude (Transacción con riesgo de posible fraude)'; \\n }else{\\n $obs_error = 'No especifica';\\n }\\n \\n //FORMATO FECHA TBK\\n $newDate_tbk = date(\\\"d-m-Y H:i:s\\\", strtotime($fecha_tbk));\\n \\n $mensaje = \\\"CODIGO: {$pagos}, FECHA REGISTRO: {$fec_pag}, NOMBRE TITULAR: {$t_nombres} {$t_apellido1} {$t_apellido2}, RUT: {$rut}, FECHA NAC: {$t_fec_nac}, EMAIL: {$email}, TELEFONO: {$telefono}, TELEFONO 2: {$telefono2}, DIRECCION: {$direccion}, COMUNA: {$comuna}, CODIGO PLAN: {$cod_plan}, NOMBRE PLAN: {$nom_plan}, CANT BENEFICIARIOS: {$num_benef}, VALOR PLAN: {$valor_plan_benef}, COD PAGO: {$cod_pago}, TIPO PAGO: {$tipo_pago}, DESCUENTO: {$cant_descuento}, VALOR FINAL: {$valor_plan}, ESTADO: {$titulo}, TOKEN: {$token}, ORDEN DE COMPRA: {$buyorder}, CODIGO AUTORIZACION TBK: {$authorizationcode}, TIPO DE TARJETA: {$creditcardtype}, ULTIMOS 4 DIGITOS: {$last4carddigits}, USUARIO TBK: {$username}, COD USUARIO TBK: {$tbkuser}, FECHA TBK: {$newDate_tbk}, COD TIPO DE PAGO: {$payment_type_code}, FECHA FACTURACION: {$fec_fac}, CODIGO CAMPAÑA: {$campania}, NOMBRE CAMPAÑA: {$camp_nombre} , OBSERVACION ERROR: {$obs_error}, TIPO DE CLIENTE: {$tipo_clase}, COMENTARIO: {$observa} \\\";\\n \\n $fechahoy = date(\\\"Y-m-d\\\");\\n $asunto = $titulo.\\\" en Pagina Web el \\\".$fechahoy.\\\" Cliente \\\".$t_nombres.\\\" \\\".$t_apellido1.\\\" \\\".$t_apellido2.\\\" Tipo de cliente \\\".$clase.\\\" Rut \\\".$rut. \\\".\\\";\\n\\n // Datos de la cuenta de correo utilizada para enviar vía SMTP\\n $smtpHost = \\\"pyme91.pymedns.net\\\"; // Dominio alternativo brindado en el email de alta \\n $smtpUsuario = \\\"autocontrato@rest911.cl\\\"; // Mi cuenta de correo\\n $smtpClave = \\\"%&auto&%web2020\\\"; // Mi contraseña\\n $correo = ('autocontrato@rest911.cl'); // Email desde donde se envia el correo\\n $nombre = \\\"REST911 WEB\\\";\\n\\n\\n $mail = new PHPMailer();\\n $mail->IsSMTP();\\n $mail->SMTPAuth = true;\\n $mail->Port = 465; \\n $mail->IsHTML(true); \\n $mail->CharSet = \\\"utf-8\\\";\\n $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail\\n\\n // VALORES A MODIFICAR //\\n $mail->Host = $smtpHost; \\n $mail->Username = $smtpUsuario; \\n $mail->Password = $smtpClave;\\n \\n //DEBUG\\n //$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\\n //$mail->SMTPDebug = 2;\\n //$mail->Debugoutput = 'html';\\n\\n $mail->From = ($correo); // Email desde donde envío el correo.\\n $mail->FromName = $nombre;\\n $mail->AddAddress($destinatario); // Esta es la dirección a donde enviamos los datos del formulario\\n $mail->AddAddress($destinatario2);\\n $mail->addCC($cc); // Dirección de copia\\n $mail->addCC($cc2); // Dirección de copia 2\\n\\n\\n $mail->Subject = $asunto; // Este es el titulo del email.\\n $mensajeHtml = nl2br($mensaje);\\n $mail->Body = \\\"\\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n
CODIGO:{$pagos}
FECHA REGISTRO:{$fec_pag}
NOMBRE TITULAR:{$t_nombres} {$t_apellido1} {$t_apellido2}
RUT:{$rut}
FECHA NACIMIENTO:{$t_fec_nac}
EMAIL:{$email}
TELEFONO:{$telefono}
TELEFONO 2:{$telefono2}
DIRECCION:{$direccion}
COMUNA:{$comuna}
CODIGO PLAN:{$cod_plan}
NOMBRE PLAN:{$nom_plan}
CANT BENEFICIARIOS:{$num_benef}
VALOR PLAN:{$valor_plan_benef}
COD PAGO:{$cod_pago}
TIPO PAGO:{$tipo_pago}
DESCUENTO:{$cant_descuento}
VALOR FINAL:{$valor_plan}
ESTADO:{$titulo}
TOKEN:{$token}
ORDEN DE COMPRA:{$buyorder}
CODIGO AUTORIZACION TBK:{$authorizationcode}
TIPO DE TARJETA:{$creditcardtype}
ULTIMOS 4 DIGITOS:{$last4carddigits}
USUARIO TBK:{$username}
COD USUARIO TBK:{$tbkuser}
FECHA TBK:{$newDate_tbk}
COD TIPO DE PAGO:{$payment_type_code}
FECHA FACTURACION:{$fec_fac}
OBSERVACION ERROR:{$obs_error}
TIPO DE CLIENTE:{$tipo_clase}
CODIGO CAMPAÑA:{$campania}
NOMBRE CAMPAÑA:{$camp_nombre}
COMENTARIO:{$observa}
\\n\\n \\n\\n \\n\\n
\\\"; // Texto del email en formato HTML\\n $mail->AltBody = \\\"{$mensaje} \\\\n\\\\n \\\"; // Texto sin formato HTML\\n // FIN - VALORES A MODIFICAR //\\n\\n $mail->SMTPOptions = array(\\n 'ssl' => array(\\n 'verify_peer' => false,\\n 'verify_peer_name' => false,\\n 'allow_self_signed' => true\\n )\\n );\\n\\n return($mail->Send()); \\n \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d181239477daab4bb96cca8169d6ac28\",\n \"score\": \"0.608845\",\n \"text\": \"function api_melhor_oferta_request(){\\n\\t\\n\\n\\t$server = $GLOBALS['server'];\\n\\t$authorization = $GLOBALS['authorization'];\\n\\n\\t// para usar quando passar parametros para a api\\n\\t//$dados = http_build_query($att);\\n\\t//$getUrl = $server.\\\"?\\\".$dados;\\n\\n\\t$getUrl = $server; //utilizar quando não houver parâmetros\\n\\n\\t$curl = curl_init($getUrl);\\n\\tcurl_setopt($curl, CURLOPT_URL, $getUrl);\\n\\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array($authorization));\\n\\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\\n\\n\\n\\t$r = json_decode(curl_exec($curl));\\n\\n\\tcurl_close($curl);\\n\\n\\treturn $r;\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ece8f884ae168e7f9e9ae3a23f60a73\",\n \"score\": \"0.60883427\",\n \"text\": \"public function AplicaOfertaEnJuegos(){\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5ee85d9181e6f2e922b4516e987fa36\",\n \"score\": \"0.60410523\",\n \"text\": \"function consignacion_obtenerDatosCONSIGNACION()\\n{\\n global $PRO_CONSIGNACION_HABILITADO;\\n global $PRO_CONSIGNACION_MODO;\\n \\n $data = new stdClass();\\n $data_detalles = new stdClass();\\n $data_detalles->habilitado = $PRO_CONSIGNACION_HABILITADO;\\n $data_detalles->modo = $PRO_CONSIGNACION_MODO;\\n $data->resultado = 'OK';\\n $data->mensaje = '¡Datos de CONSIGNACION disponibles!';\\n $data->detalles = $data_detalles;\\n return $data;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd425cee591787156eb484299b6bf2af\",\n \"score\": \"0.6021848\",\n \"text\": \"public function statusReceita(){\\n\\t\\tApp::import('Vendor', 'ToolsNFePHP', array('file' => 'Nfephp/libs/NFe/ToolsNFePHP.class.php'));\\n\\t\\t$nfe = new ToolsNFePHP;\\n\\t\\theader('Content-type: text/html; charset=UTF-8');\\n\\t\\t$sUF = 'AC;AL;AM;AP;BA;CE;DF;ES;GO;MA;MG;MS;MT;PA;PB;PE;PI;PR;RJ;RN;RO;RR;RS;SC;SE;SP;TO';\\n\\t\\t$sUF = 'RJ';\\n\\n\\t\\t//determina o ambiente 1-produção 2-homologação\\n\\t\\t$tpAmb= '2';\\n\\t\\t$aUF = explode(';', $sUF);\\n\\t\\tif ($tpAmb == 1) {\\n\\t\\t $sAmb='Produção';\\n\\t\\t} else {\\n\\t\\t $sAmb='Homologação';\\n\\t\\t}\\n\\n\\t\\tforeach ($aUF as $UF) {\\n\\t\\t echo '


';\\n\\t\\t echo \\\"$UF [ $sAmb ] ==> $UF
\\\";\\n\\t\\t $resp = $nfe->statusServico($UF, $tpAmb, $retorno);\\n\\t\\t echo print_r($retorno);\\n\\t\\t echo '
';\\n\\t\\t echo $nfe->errMsg.'
';\\n\\t\\t echo '
';\\n\\t\\t    echo htmlspecialchars($nfe->soapDebug);\\n\\t\\t    echo '

';\\n\\t\\t echo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '



';\\n\\t\\t flush();\\n\\t\\t}\\n\\n\\t\\t/*\\n\\t\\t//Contignecia SVCAN\\n\\t\\t$UF = 'SP';\\n\\t\\t$nfe->ativaContingencia('SVCAN');\\n\\t\\t$alias = 'SVCAN';\\n\\t\\techo '


';\\n\\t\\techo \\\"$UF [ $sAmb ] ==> $alias
\\\";\\n\\t\\t$resp = $nfe->statusServico($UF, $tpAmb, $retorno);\\n\\t\\techo print_r($retorno);\\n\\t\\techo '
';\\n\\t\\techo $nfe->errMsg.'
';\\n\\t\\techo '
';\\n\\t\\techo htmlspecialchars($nfe->soapDebug);\\n\\t\\techo '

';\\n\\t\\techo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '



';\\n\\t\\tflush();\\n\\n\\t\\t//Contingecia SVCRS\\n\\t\\t$nfe->ativaContingencia('SVCRS');\\n\\t\\t$alias = 'SVCRS';\\n\\t\\techo '


';\\n\\t\\techo \\\"$UF [ $sAmb ] ==> $alias
\\\";\\n\\t\\t$resp = $nfe->statusServico($UF, $tpAmb, $retorno);\\n\\t\\techo print_r($retorno);\\n\\t\\techo '
';\\n\\t\\techo $nfe->errMsg.'
';\\n\\t\\techo '
';\\n\\t\\techo htmlspecialchars($nfe->soapDebug);\\n\\t\\techo '

';\\n\\t\\techo $UF . '[' . $sAmb . '] - ' . $retorno['xMotivo'] . '



';\\n\\t\\tflush();\\n\\t\\t*/\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5ffadca2e9d7fe661109df56e8e0307\",\n \"score\": \"0.5997765\",\n \"text\": \"function generarCodigoControl(){\\r\\n\\t\\t$this->procedimiento='param.f_utilidades_ime';\\r\\n\\t\\t$this->transaccion='PM_GENCC_IME';\\r\\n\\t\\t$this->tipo_procedimiento='IME';//tipo de transaccion\\r\\n\\t\\t$this->tipo_conexion='seguridad';\\r\\n\\t\\t\\r\\n\\t\\t$this->arreglo['id_usuario'] = 1;\\r\\n\\t\\t\\r\\n\\t\\t$this->setParametro('id_usuario','id_usuario','integer');\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t//Definicion de la lista del resultado del query\\r\\n\\t\\t$this->setParametro('llave','varchar','varchar');\\r\\n\\t\\t$this->setParametro('nro_autorizacion','varchar','varchar');\\r\\n\\t\\t$this->setParametro('nro_factura','varchar','varchar');\\r\\n\\t\\t$this->setParametro('nit','varchar','varchar');\\r\\n\\t\\t$this->setParametro('fecha','varchar','varchar'); // formato YYYYMMDD\\r\\n\\t\\t$this->setParametro('monto','numeric','numeric');//tiene q ser numerico redondeado a 0 decimales\\r\\n\\t\\t\\r\\n\\t\\t//Ejecuta la instruccion\\r\\n\\t\\t$this->armarConsulta();\\r\\n\\t\\t$this->ejecutarConsulta();\\r\\n\\t\\t\\r\\n\\t\\t//Devuelve la respuesta\\r\\n\\t\\treturn $this->respuesta;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86b9396fca621122d5c85b3202eee51d\",\n \"score\": \"0.5991059\",\n \"text\": \"public function apiPagseguro() {\\n $this->General = new extend\\\\General();\\n\\n //Instancia a classe de configurações\\n $this->Config = new objects\\\\Configuracoes();\\n\\n //Obtem o valor do cep\\n $usuario = $this->input->post( 'usuario_api' );\\n $token = $this->input->post( 'token_api' );\\n\\n //Seta o valor na classe\\n $this->Config->valor = $usuario;\\n\\n //Seta o ID da configuração\\n $this->Config->idConfig = 5;\\n\\n //Grava a configuração\\n $this->Config->gravarConfiguracao();\\n\\n $this->Config->valor = $token;\\n\\n //Seta o ID da configuração\\n $this->Config->idConfig = 6;\\n\\n //Grava a configuração\\n $this->Config->gravarConfiguracao();\\n\\n //Envia a mensagem para o usuário\\n $this->Essentials->setMessage( 'Gravado com sucesso', 100 );\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a855d77a3b198bd58e0c666168f8271\",\n \"score\": \"0.59580106\",\n \"text\": \"function ferPeticio($cat, $novetats, $valorats, $buscador, $idLector, $idLlibre){\\n $db=Database::conectar();\\n $peticioMetode = $_SERVER[\\\"REQUEST_METHOD\\\"];\\n $controller = new LlibreControllerApi($db, $peticioMetode, $cat, $novetats, $valorats, $buscador, $idLector, $idLlibre);\\n $controller->processRequest();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de6d5a9a34693817d76d53de57eb7545\",\n \"score\": \"0.59040356\",\n \"text\": \"static public function ctrAltaCasoSeguimiento()\\n {\\n if(isset($_POST[\\\"rfc-cliente\\\"]) && isset($_POST[\\\"nombreRS-cliente\\\"]) )\\n {\\n $tabla = \\\"tbl_clientes_inbursa\\\";\\n\\n $datos = array(\\n\\n \\\"tci_cod_caso\\\" => $_POST[\\\"codCaso\\\"],\\n \\\"tci_rfc\\\" => $_POST[\\\"rfc-cliente\\\"],\\n \\\"tci_nombre_razon_social\\\" => $_POST[\\\"nombreRS-cliente\\\"],\\n \\\"tci_id_persona\\\" => $_POST[\\\"id-cliente\\\"],\\n \\\"tci_numero_cuenta\\\" => $_POST[\\\"numeroCuenta-cliente\\\"],\\n \\\"tci_situacion_actual\\\" => $_POST[\\\"situacion-cliente\\\"],\\n \\\"tci_seguimiento\\\" => $_POST[\\\"seguimiento-cliente\\\"],\\n \\\"tci_observaciones\\\" => $_POST[\\\"observaciones-cliente\\\"]\\n );\\n\\n $respuesta = ModeloSigai::mdlAltaCasoSeguimiento($tabla,$datos);\\n\\n return $respuesta;\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18a226e34ada98162812e200ba7742e2\",\n \"score\": \"0.58604634\",\n \"text\": \"function obtnerUosEpsDetalleObligacion()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_OBEPUO_IME';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5fb202dd44cd7af9fea870a457acbe7\",\n \"score\": \"0.58438915\",\n \"text\": \"function recuperarDetalleCotizacion(){\\r\\n\\t\\t\\t\\t$this->procedimiento='mat.ft_cotizacion_ime';\\r\\n\\t\\t\\t\\t$this->transaccion='MAT_REC_DET_SOL';\\r\\n\\t\\t\\t\\t$this->tipo_procedimiento='IME';\\r\\n\\r\\n //Define los parametros para la funcion\\r\\n\\t\\t\\t\\t$this->setParametro('id_solicitud','id_solicitud','int4');\\r\\n //Ejecuta la instruccion\\r\\n $this->armarConsulta();\\r\\n $this->ejecutarConsulta();\\r\\n //Devuelve la respuesta\\r\\n return $this->respuesta;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c19a8fb31cc9edebb8fb73c2d59c3c67\",\n \"score\": \"0.58249956\",\n \"text\": \"function recuperarDatosFiltro()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_GETFILOP_IME';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a66945c31e66ff379d7af1312101a73\",\n \"score\": \"0.5823086\",\n \"text\": \"function listarContactos(){\\r\\n $this->procedimiento='mat.ft_cotizacion_sel';\\r\\n $this->transaccion='MAT_CONT_PROVE_SEL';\\r\\n $this->tipo_procedimiento='SEL';//tipo de transaccion\\r\\n\\r\\n\\t\\t\\t\\t$this->captura('id_proveedor_contacto','int4');\\r\\n $this->captura('id_proveedor_contacto_alkym','int4');\\r\\n $this->captura('nombre_contacto','varchar');\\r\\n\\r\\n\\r\\n //Ejecuta la instruccion\\r\\n $this->armarConsulta();\\r\\n $this->ejecutarConsulta();\\r\\n\\r\\n //Devuelve la respuesta\\r\\n return $this->respuesta;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3b9cbc0440712909d53331beea437e5\",\n \"score\": \"0.58130354\",\n \"text\": \"private function TccGrabarDespacho( $Destinatario, $Direccion, $Telefono, $Ciudad, $Observaciones, $ReclamaBodega,\\n $KilosReales, $PesoVolumen,$VrMcia, $Boomerang, $FechaDespacho, $TipoDocumento,\\n $NumeroDocumento, $FechaDocumento, $CodBarra ){\\n // Pruebas\\n //$url = 'http://clientes.tcc.com.co/preservicios/wsdespachos.asmx?wsdl';\\n \\n \\n\\n $url = TCC_SOAP_ENDPOINT;\\n\\n $DocumentoReferencia = array(\\n array('tipodocumento' => $TipoDocumento,\\n 'numerodocumento' => $NumeroDocumento,\\n 'fechadocumento' => $FechaDocumento\\n )\\n );\\n\\n //Se configuran las unidades de la remesa para este ejemplo se envian dos unidades\\n if ( $Boomerang == 0) {\\n $unidad = array(\\n array('tipounidad' => 'TIPO_UND_PAQ',\\n 'claseempaque' => '',\\n 'dicecontener' => $Observaciones,\\n 'cantidadunidades' => '1',\\n 'kilosreales' => $KilosReales,\\n 'pesovolumen' => $PesoVolumen,\\n 'valormercancia' => $VrMcia,\\n 'codigobarras' => $CodBarra\\n )\\n );\\n }else{\\n $unidad = array(\\n array('tipounidad' => 'TIPO_UND_DOCB',\\n 'claseempaque' => 'CLEM_SOBRE',\\n 'dicecontener' => $Observaciones,\\n 'cantidadunidades' => '1',\\n 'kilosreales' => '0',\\n 'pesovolumen' => '0',\\n 'valormercancia' => '0',\\n 'codigobarras' => $CodBarra\\n )\\n );\\n }\\n \\n $objDespacho = array(\\n 'objDespacho' => array(\\n 'clave' => TCC_SOAP_PASSWORD,\\n 'fechahoralote' => '',\\n 'numeroremesa' => '',\\n 'numeroDepacho' => '',\\n 'unidadnegocio' => '1',\\n 'fechadespacho' => $FechaDespacho,\\n 'cuentaremitente' => TCC_SOAP_CUENTA,\\n 'sederemitente' => '',\\n 'primernombreremitente' => '',\\n 'segundonombreremitente' => '',\\n 'primerapellidoremitente' => '',\\n 'segundoapellidoremitente' => '',\\n 'razonsocialremitente' => 'CRIPACK S.A.S.',\\n 'naturalezaremitente' => 'J',\\n 'tipoidentificacionremitente' => 'NIT',\\n 'identificacionremitente' => '800149062',\\n 'telefonoremitente' => '8298217',\\n 'direccionremitente' => 'CARRERA 6 # 21 - 44 ',\\n 'ciudadorigen' => '76001000',\\n 'tipoidentificaciondestinatario' => '',\\n 'identificaciondestinatario' => '',\\n 'sededestinatario' => '',\\n 'primernombredestinatario' => '',\\n 'segundonombredestinatario' => '',\\n 'primerapellidodestinatario' => '',\\n 'segundoapellidodestinatario' => '',\\n 'razonsocialdestinatario' => $Destinatario,\\n 'naturalezadestinatario' => 'N',\\n 'direcciondestinatario' => $Direccion,\\n 'telefonodestinatario' => $Telefono,\\n 'ciudaddestinatario' => $Ciudad,\\n 'barriodestinatario' => '',\\n 'totalpeso' => '',\\n 'totalpesovolumen' => '',\\n 'formapago' => '',\\n 'observaciones' => $Observaciones,\\n 'llevabodega' => '',\\n 'recogebodega' => $ReclamaBodega,\\n 'centrocostos' => '',\\n 'totalvalorproducto' => '',\\n 'unidad' => $unidad,\\n 'documentoreferencia' => $DocumentoReferencia,\\n 'generarDocumentos' => true\\n ),'respuesta' => 0,\\n 'remesa' => '',\\n 'URLRelacionEnvio' => '',\\n 'URLRotulos' => '',\\n 'URLRemesa' => '',\\n 'IMGRelacionEnvio' => null,\\n 'IMGRotulos' => null,\\n 'IMGRemesa' => null,\\n 'respuesta' => 0,\\n 'mensaje' => ''\\n );\\n \\n\\n\\n $client = new SoapClient($url);\\n $remesa = new \\\\StdClass;\\n $remesa->remesa = '';\\n $URLRelacionEnvio = new \\\\StdClass;\\n $URLRelacionEnvio->URLRelacionEnvio ='';\\n $URLRotulos = new \\\\StdClass;\\n $URLRotulos->URLRotulos ='';\\n $URLRemesa = new \\\\StdClass;\\n $URLRemesa->URLRemesa ='';\\n $IMGRelacionEnvio = new \\\\StdClass;\\n $IMGRelacionEnvio->IMGRelacionEnvio = null;\\n $IMGRotulos = new \\\\StdClass;\\n $IMGRotulos->IMGRotulos =null;\\n $IMGRemesa = new \\\\StdClass;\\n $IMGRemesa->IMGRemesa =null;\\n $respuesta = new \\\\StdClass;\\n $respuesta->respuesta = 0;\\n $mensaje = new \\\\StdClass;\\n $mensaje->mensaje = '';\\n \\n\\n try {\\n\\n //Despues de realizar la configuración del xml a enviar, se realiza el consumo del servicio web\\n $resp = $client->GrabarDespacho4($objDespacho, $remesa,$URLRelacionEnvio,$URLRotulos,$URLRemesa,$IMGRelacionEnvio,$IMGRotulos,$IMGRemesa,$respuesta,$mensaje);\\n \\n //Aqui se hace el manejo de la excepción del consumo\\n echo $client->__getLastRequest() .\\\"\\\\n\\\";\\n\\n }catch(Exception $e){\\n echo 'Excepción capturada: ', $e->getMessage() , '
';\\n }\\n\\n\\n $NumeroRemesa = intval($resp->remesa);\\n if ( $NumeroRemesa > 0 ) {\\n $this->RespuestaTcc = substr( $resp->mensaje,0,45);\\n //Se realiza la decodificación del string enviado por el servicio a base64 para su posterior grabación o descarga en un archivo binario.\\n // $decoded = base64_decode($resp->IMGRelacionEnvio);\\n //Se asigna el nombre del archivo\\n // $file = \\\"$resp->remesa\\\".'.pdf';\\n //Se realiza la descarga del archivo.\\n // file_put_contents($file, $resp->IMGRelacionEnvio);\\n //echo($file);\\n return $NumeroRemesa;\\n } else {\\n var_dump($resp->mensaje);\\n echo '
';\\n return -1;\\n }\\n\\n /* $arrayDe100Valores = array( array());\\n for($i = 0; $i < 10; $i++) {\\n $arrayDe100Valores[$i]['tipounidad'] = $i;\\n $arrayDe100Valores[$i]['claseempaque'] = '525000';\\n\\n }\\n\\n\\n Debug::Mostrar($unidad);\\n Debug::Mostrar($arrayDe100Valores);\\n\\n return ;\\n //Se configura la informacion de la remesa, IMPORTARTE ACLARAR QUE LA VARIABLE \\\"Clave\\\",\\n //es la asignada por TCC para cada cliente, por tal motivo en el ejemplo se envia como XXXXXXXXXXXX la cual NO funcionará hasta tanto NO sea reemplazada.\\n*/\\n //var_dump($resp->URLRelacionEnvio);\\n //var_dump($resp->URLRotulos);\\n // var_dump($resp->respuesta);\\n //echo '
';\\n // var_dump($resp->mensaje);\\n // echo '
';\\n //var_dump($resp);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"618fec855c3a40ce665f3a81ca59024b\",\n \"score\": \"0.5801897\",\n \"text\": \"private function get_api_psa_conn_car($param, $fields = null)\\n {\\n $session = curl_init();\\n curl_setopt($session, CURLOPT_URL, $this->url_api_psa_conn_car.$param);\\n curl_setopt($session, CURLOPT_HTTPHEADER, array(\\n 'Content-Type: application/json',\\n 'Authorization: Bearer ' . $this->access_token[\\\"access_token2\\\"]));\\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\\n if (isset($fields)) {\\n curl_setopt($session, CURLOPT_POSTFIELDS, $fields);\\n }\\n $json = curl_exec($session);\\n // Vérifie si une erreur survient\\n if(curl_errno($session)) {\\n $info = [];\\n echo 'Erreur Curl : ' . curl_error($session);\\n }\\n else {\\n $info = curl_getinfo($session);\\n }\\n curl_close($session);\\n $ret_array[\\\"info\\\"] = $info;\\n $ret_array[\\\"result\\\"] = json_decode($json);\\n return $ret_array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d259f16493c2010f2c88e7e5379ebc86\",\n \"score\": \"0.57956374\",\n \"text\": \"public function puxaCentrosCustoLucro(){ \\n \\n $ch = curl_init();\\n\\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/centros_custo_lucro?access_token='.$this->chave_granatum);\\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\\n\\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\\n\\n $result = curl_exec($ch);\\n if (curl_errno($ch)) {\\n echo 'Error:' . curl_error($ch);\\n }\\n $this->centros_custo_lucro = json_decode($result, true);\\n\\n curl_close($ch);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c55c66cbd73cd49d9be285e97c8d3588\",\n \"score\": \"0.5784577\",\n \"text\": \"function obtenerModalidad(){\\n //Definicion de variables para ejecucion del procedimiento\\n $this->procedimiento='adq.f_solicitud_ime';\\n $this->transaccion='ADQ_RECUMOD_GET';\\n $this->tipo_procedimiento='IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_solicitud','id_solicitud','int4');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n //echo $this->consulta;exit;\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa16a23c0d33ae302d65d52b14aa5437\",\n \"score\": \"0.5755566\",\n \"text\": \"function NuevoPresupuestoCLI($campos, $filtros, $items_std)\\n\\t\\t{\\n\\t\\t$this->con_sql = $this->GetConex();\\n\\t\\t$this->LimpiarClase();\\n\\t\\t\\n\\t\\t$this->encabezado[NUM_OT] = 0;\\n\\t\\t$this->encabezado[NUM_PRES] = 0;\\t\\t\\n\\t\\t$this->encabezado[NUM_STD] = $campos[NUM_STD];\\n\\t\\t$this->encabezado[NUM_MOTOR] = $this->GetNroMotor($this->encabezado[NUM_STD]);\\n\\t\\t$this->encabezado[DESC_PRES] = $campos[DESC_PRES];\\n\\t\\t$this->encabezado[CLIENTE] = $campos[CLIENTE];\\n\\t\\t$this->encabezado[DIRECCION] = $campos[DIRECCION];\\n\\t\\t$this->encabezado[TELEFONO] = $campos[TELEFONO];\\n\\t\\t$this->encabezado[LOCALIDAD] = $campos[LOCALIDAD];\\n\\t\\t$this->encabezado[DESC_MOTOR] = BuscarDescripcionMotor($this->con_sql, $this->encabezado[NUM_MOTOR]);\\n\\t\\t$this->encabezado[DESCUENTO] = $campos[DESCUENTO];\\n\\t\\t$this->encabezado[LISTA_MOB]=BuscarNroLista($this->con_sql, $this->encabezado[NUM_MOTOR]);\\n\\n\\t\\t$this->campos_enc=ENC_CLI;\\n\\t\\t$this->tipo=CLI;\\n\\t\\t$this->filtros=$filtros;\\n\\t\\t$this->items_std=$items_std;\\n\\t\\t$this->ArmarMOB(CLI, $this->nro, EDIT);\\n\\t\\t$this->ArmarMAT(CLI, $this->nro, EDIT);\\n\\t\\t$this->MostrarPresOT(CLI, $this->nro, EDIT, 1);\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"973a8b8c5dde8ff74b84017f735c0012\",\n \"score\": \"0.5754738\",\n \"text\": \"function procesa()\\n {\\n $this->inicio();\\n $arguments = array();\\n $arguments = $this->decodeGetData($this->argumentos);\\n call_user_func_array(array($this,$this->funcion),$arguments);\\n $this->termina();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce990ce5fac7751645e342efb14f8989\",\n \"score\": \"0.5747082\",\n \"text\": \"function recuperarComite()\\n {\\n\\n $this->procedimiento = 'adq.f_solicitud_sel';\\n $this->transaccion = 'ADQ_RMEMOCOMDCR_SEL';\\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\\n $this->setCount(false);\\n\\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\\n\\n //Definicion de la lista del resultado del query\\n\\n\\n $this->captura('funcionario', 'text');\\n $this->captura('proveedor', 'varchar');\\n $this->captura('tramite', 'varchar');\\n $this->captura('nombres', 'varchar');\\n $this->captura('fecha_po', 'varchar');\\n\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n //var_dump($this->consulta);exit;\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1469e284c6a3d4626fb710340a58c704\",\n \"score\": \"0.57444644\",\n \"text\": \"function abrirCerrarPeriodo(){\\n\\t\\t$this->procedimiento='ccb.f_estado_periodo_ime';\\n\\t\\t$this->transaccion='CCB_ABRCERAR_INS';\\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_estado_periodo','id_estado_periodo','int4');\\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}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62f2839d37e205a352438ad9495a94b8\",\n \"score\": \"0.5715195\",\n \"text\": \"function getConturData($params_arr, $type = '/api3/req')\\n{\\n $answ_str = '';\\n\\n if(!is_array($params_arr) || count($params_arr) == 0)\\n {\\n $answ_str = 'error';\\n }\\n else\\n {\\n $options = array(\\n CURLOPT_RETURNTRANSFER => true, // return web page\\n CURLOPT_HEADER => false, // don't return headers\\n CURLOPT_FOLLOWLOCATION => true, // follow redirects\\n CURLOPT_ENCODING => \\\"\\\", // handle all encodings\\n CURLOPT_AUTOREFERER => true, // set referer on redirect\\n CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect\\n CURLOPT_TIMEOUT => 120, // timeout on response\\n CURLOPT_MAXREDIRS => 10, // stop after 10 redirects\\n CURLOPT_SSL_VERIFYPEER => false // Disabled SSL Cert checks\\n );\\n\\n $ch = curl_init('https://focus-api.kontur.ru' . $type . '?key=' . $GLOBALS['conturKey'] . '&pdf=False&' . http_build_query($params_arr));\\n curl_setopt_array($ch, $options);\\n $answ_str = curl_exec($ch);\\n curl_close($ch);\\n }\\n\\n return $answ_str;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6450c9589a4d14b3a549e0c4a2989aa2\",\n \"score\": \"0.57064664\",\n \"text\": \"private function getApi()\\n\\t{\\n\\t\\t$this->getApiKeyWEB();\\n\\t\\t//$this->getApiKeySEP();\\n\\t\\t$respu = null;\\n\\t\\t$respuesta = null;\\n\\t\\tfor ($i = 0; $i < count($this->controllers); $i++)\\n\\t\\t{\\n\\t\\t\\tswitch($this->controllers[$i]['tipo'])\\n\\t\\t\\t{\\n\\t\\t\\t\\tcase 'GET':\\n\\t\\t\\t\\tcase 'get':\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$respu = $this->getApiGet($this->controllers[$i]);\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tcase 'POST':\\n\\t\\t\\t\\tcase 'post':\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$respu = $this->getApiPost($this->controllers[$i]);\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t/*\\n\\t\\t\\tif ($respu['success'] && !isset($respu['curlError']))\\n\\t\\t\\t{\\n\\t\\t\\t*/\\n\\t\\t\\t\\t$this->dataPropagationControl(array(\\n\\t\\t\\t\\t\\t'controller'=>$this->controllers[$i],\\n\\t\\t\\t\\t\\t'response'=>$respu\\n\\t\\t\\t\\t));\\n\\t\\t\\t\\tif (isset($this->controllers[$i]['noSeLlama']) ? $this->controllers[$i]['noSeLlama'] : false)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$respuesta[\\\"{$this->controllers[$i]['nombre']}->{$this->controllers[$i]['metodo']}\\\"] = $respu;\\n\\t\\t\\t\\t}\\n\\t\\t\\t/*\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->status = false;\\n\\t\\t\\t\\t$respuesta = $respu;\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t\\t*/\\n\\t\\t}\\n\\t\\treturn $respuesta;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3556c40610f8568796f40da2e40ded0\",\n \"score\": \"0.5693608\",\n \"text\": \"public function venta_rapida(){\\n\\t\\t$parametros = json_decode($_POST['parametros']);\\n\\n\\t\\t$id_servicio = $parametros->idServicio;\\n\\t\\t$pago = $parametros->pago;\\n\\t\\t$id_sucursal = $parametros->idSucursal;\\n\\t\\t$id_vendedor = $parametros->idVendedor;\\n\\n\\t\\tif($id_servicio == 'otro'){\\n\\t\\t\\t// agregamos la info del catalogo_servicio_rapido\\n\\t\\t\\t$datos_servicio = array(\\n\\t\\t\\t\\t'nombre' => $parametros->nuevoServicio,\\n\\t\\t\\t\\t'fecha_registro' => time()\\n\\t\\t\\t);\\n\\t\\t\\t$this->add_model->agregar($datos_servicio, 'catalogo_servicio_rapido');\\n\\t\\t\\t$id_servicio = $this->db->insert_id();\\n\\t\\t}\\n\\n\\t\\t// agregamos la info del servicio rapido\\n\\t\\t$data_info_servicio_rapido = array(\\n\\t\\t\\t'fk_id_catalogo_servicio_rapido' => $id_servicio,\\n\\t\\t\\t'monto' => $pago,\\n\\t\\t\\t'id_usuario' => $id_vendedor,\\n\\t\\t\\t'fk_id_sucursal' => $id_sucursal,\\n\\t\\t\\t'fecha_registro' => time()\\n \\t\\t);\\n\\t\\t$this->add_model->agregar($data_info_servicio_rapido, 'servicio_rapido');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f4bd6374ca4158105a25ad3e1f828ff\",\n \"score\": \"0.5678532\",\n \"text\": \"public function proximocodigoAction() {\\n\\n // Desabilita a view. Estes comandos são utilizados sempre que a resposta for JSON\\n $this->_helper->viewRenderer->setNoRender(true);\\n $this->_helper->layout->disableLayout();\\n\\n try {\\n\\n // Busca o proximo codigo de cadastro e o atribui no formulario\\n $this->_dataModule->camposForm['codigo'] = $this->_dataModule->qryBuscaProximoCodigo();\\n\\n // Recupera as permissoes dos botoes\\n $this->_dataModule->atribuiPermissoesBotoes(FORM_ADD);\\n\\n // Adiciona a resposta de preenchimento de formulario\\n JSONMessage::getInstance()->add(JSONMessageFactory::factoryForm($this->_dataModule->camposForm, 'descricao'));\\n\\n } catch(DSINWebAppsException $dwaex) {\\n \\n // Adiciona mensagem de excecao\\n JSONMessage::getInstance()->add(JSONMessageFactory::factoryException($dwaex->getMessage()));\\n\\n }\\n\\n echo JSONMessage::getInstance();\\n exit;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a237ed27493e91f4aec0f2a0d35a5f8f\",\n \"score\": \"0.56756836\",\n \"text\": \"function ejecutarAplicacionExterna($datos, $codigo, $metodo) {\\n try {\\n $this->conectar();\\n $consultasDAO = new ConsultasDAO();\\n $consultasDAO->setConexion($this->conexion);\\n $aplicacion = $consultasDAO->getAplicacionExterna($codigo);\\n if (is_null($aplicacion)) {\\n return false;\\n }\\n $headers = null;\\n if ($aplicacion->esAutenticable == 'SI') {\\n $respuesta = $this->getAutenticar($aplicacion);\\n if (is_null($respuesta)) {\\n return false;\\n }\\n if (!is_null($aplicacion->tramaHederToken)) {\\n $headers = $this->getHeaderAutenticar($aplicacion, $respuesta->data->token);\\n }\\n }\\n if ($aplicacion->esRegistrable == 'SI') {\\n $respuesta = $this->registrar($aplicacion, $headers, $datos);\\n if (!$this->validarRespuesta($aplicacion, $respuesta)) {\\n return false;\\n }\\n }\\n\\n $mailBO = new MailBO();\\n $mailBO->setConexion($this->conexion);\\n $data = $mailBO->getTramaJSON($datos->cod_trama, $datos);\\n $ch = curl_init($aplicacion->api . \\\"/$metodo\\\");\\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\\n //establecemos el verbo http que queremos utilizar para la petición\\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \\\"POST\\\");\\n\\n if (!is_null($headers))\\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\\n //enviamos el array data\\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));\\n //obtenemos la respuesta\\n $response = curl_exec($ch);\\n // Se cierra el recurso CURL y se liberan los recursos del sistema\\n curl_close($ch);\\n if (!$response) {\\n return false;\\n } else {\\n return $this->validarRespuesta($aplicacion, json_decode($response));\\n }\\n } catch (Exception $ex) {\\n return false;\\n } finally {\\n $this->cerrarConexion();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3306c9d199ba6218d5e4e3b288d8f521\",\n \"score\": \"0.5627823\",\n \"text\": \"function corredores(){\\r\\n\\t$ck = arrumaCookie(cookieSecao());\\r\\n\\treturn json_decode(do_get_request(urlSp.urlCorredor,$ck),true);\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f07dcadb06b288c3ba2b8d37d3e15132\",\n \"score\": \"0.56275564\",\n \"text\": \"function gestionarWF(){\\n $this->procedimiento='ven.ft_pedido_det_ime';\\n $this->transaccion='VEN_DETPED_WF';\\n $this->tipo_procedimiento='IME';\\n \\n //Define los parametros para la funcion\\n $this->setParametro('id_pedido_det','id_pedido_det','int4');\\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\\n $this->setParametro('operacion','operacion','varchar');\\n $this->setParametro('id_funcionario','id_funcionario','int4');\\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\\n $this->setParametro('obs','obs','text');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a431781526333d386080ca7a5c632ce7\",\n \"score\": \"0.5625936\",\n \"text\": \"function getBasements(){\\n\\t\\t$ch = curl_init();\\n\\t\\t$dati = array();\\n\\t\\t// imposto la URl del web-service remoto\\n\\t\\tcurl_setopt($ch, CURLOPT_URL, 'localhost/server/api/basement/read.php');\\n\\t\\t\\n\\t\\t// Chiamo l'API tramite PUT\\n\\t\\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\t\\n\\t\\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \\\"PUT\\\");\\n\\n\\t\\t// imposto gli header correttamente\\n\\t\\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\\n\\t\\t 'Content-Type: application/json')\\n\\t\\t);\\n\\n\\t\\t// eseguo la chiamata\\n\\t\\t$response = json_decode(curl_exec($ch), true);\\n\\t\\t\\n\\t\\t// chiudo\\n\\t\\tcurl_close($ch);\\n\\t\\treturn $response;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc71dabc56ae4af06d8b38fa4b22f1fe\",\n \"score\": \"0.5619985\",\n \"text\": \"public function contaLancamentosConta(){\\n $ch = curl_init();\\n\\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/lancamentos?access_token='.$this->chave_granatum);\\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\\n curl_setopt($ch, CURLOPT_POSTFIELDS, \\\"conta_id=39820&data_inicio=\\\".$this->p_dia.\\\"&data_fim=\\\".$this->h_dia.\\\"&tipo_view=count\\\");\\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\\n\\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\\n\\n $result = curl_exec($ch);\\n if (curl_errno($ch)) {\\n echo 'Error:' . curl_error($ch);\\n }\\n $this->n_lancamentos_conta = json_decode($result, true);\\n\\n curl_close($ch);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f027f13af23e2ce7ae40104461ef452f\",\n \"score\": \"0.5619718\",\n \"text\": \"function extenderOp()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_EXTOP_IME';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n $this->setParametro('id_administrador', 'id_administrador', 'int4');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74456da17d4d314b4a856677b4db050a\",\n \"score\": \"0.56115645\",\n \"text\": \"function siguienteEstadoObligacion()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_SIGESTOB_IME';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\\n $this->setParametro('id_depto_lb', 'id_depto_lb', 'int4');\\n $this->setParametro('obs', 'obs', 'text');\\n $this->setParametro('json_procesos', 'json_procesos', 'text');\\n $this->setParametro('instruc_rpc', 'instruc_rpc', 'varchar');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8016ea811716697ceca31c5434cb30d9\",\n \"score\": \"0.56111866\",\n \"text\": \"public function index(){\\n $client = new SoapClient(\\\"http://test.analitica.com.co/AZDigital_Pruebas/WebServices/ServiciosAZDigital.wsdl\\\",$this->options);\\n $client->__setLocation('http://test.analitica.com.co/AZDigital_Pruebas/WebServices/SOAP/index.php');\\n \\n// parametros de la consulta\\n $params = [\\n 'Condiciones' => \\n [\\n 'Condicion' => [\\n 'Tipo' => 'FechaInicial',\\n 'Expresion' => '2019-07-01 00:00:00',\\n ]\\n ]\\n ];\\n \\n \\n try { // funcion del soap para la consulta ( segun la prueba enviada )\\n $response = $client->__soapCall('BuscarArchivo', array($params));\\n\\n //krumo($response->Archivo);\\n\\n // funcion que agrega los datos a la tabla de Archivos ( si sale ok en pantalla ya fue lleno las tablas SQL )\\n if ($this->b2btic_model->addAll($response->Archivo)) {\\n echo \\\"ok\\\";\\n }\\n\\n else {\\n echo \\\"Error\\\";\\n }\\n }\\n catch(Exception $e) {\\n print_r($e);\\n echo \\\"Exception: \\\" . $e->getMessage();\\n }\\n \\n \\n \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d2b112c4780d0d4e65b6c3807d52008\",\n \"score\": \"0.5601828\",\n \"text\": \"public static function getWSClearView()\\n {\\n $procesado =2;\\n $id=Input::get('id', '');//id de la tarea\\n $sql =\\\"UPDATE tareas SET procesado=? WHERE id=?\\\";\\n try {\\n DB::update($sql, array($procesado,$id));\\n } catch (Exception $e) {\\n \\n }\\n $result = array();\\n $msj=\\\"\\\";\\n $telefono=Input::get('telefono', '');\\n //$idConsulta=Input::get('idConsulta', '');\\n $idConsulta = date('YmdHis'); // Debe enviar una fecha en este formato\\n \\n $url = \\\"http://10.226.88.214/WSASSIA/wsASSIA.php/RegistrarDiagnostico/\\\"\\n .$telefono.\\\"/\\\".$idConsulta;\\n try {\\n $ch = curl_init();\\n if (FALSE === $ch)\\n throw new Exception('failed to initialize');\\n curl_setopt($ch, CURLOPT_URL, $url);\\n curl_setopt($ch, CURLOPT_HEADER, false);\\n \\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\\n $result = curl_exec($ch);\\n if( $result === false)\\n $msj= 'no se pudo establecer conexion ' . curl_error($ch);\\n \\n $result = json_decode($result);\\n curl_close($ch);\\n } catch (Exception $e) {\\n trigger_error(\\n sprintf(\\n 'Curl failed with error #%d: %s',\\n $e->getCode(),\\n $e->getMessage()\\n ),\\n E_USER_ERROR\\n );\\n }\\n //$result = json_decode('[{\\\"id\\\":16,\\\"Desc\\\":\\\"No se obtiene respuesta. \\n //Revisar linea o modem\\\",\\\"Tel\\\":\\\"12421836\\\",\\\"Ok\\\":0}]');\\n \\n if (count($result)>0) {\\n $id = $result[0]->id;\\n $Desc = $result[0]->Desc;\\n $Tel = $result[0]->Tel;\\n $Ok = $result[0]->Ok;\\n if ($Ok==1) {\\n $msj = $Tel.\\\": Linea OK\\\";\\n } elseif ($Ok==0) {\\n $msj = $Tel.\\\": No OK\\\";\\n }\\n $procesado=1;\\n\\n try {\\n DB::update($sql, array($procesado,$id));\\n } catch (Exception $e) {\\n \\n }\\n }\\n \\n return\\n array(\\n 'rst'=>'1',\\n 'datos'=> $msj,\\n 'msj'=>$msj,\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc6f75293513b8395954324831959fad\",\n \"score\": \"0.5600897\",\n \"text\": \"function obtenerIdsExternos()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_IDSEXT_GET';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n $this->setParametro('sistema', 'sistema', 'varchar');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7498efafa1effda34b211bdca0abe0c\",\n \"score\": \"0.5576825\",\n \"text\": \"static public function ctrRegistroBitacora(){\\r\\n\\r\\n\\t\\tif (isset($_POST[\\\"editarIdPedido\\\"])) {\\r\\n\\r\\n\\t\\t$tabla = \\\"bitacora\\\";\\r\\n\\r\\n\\t\\t$datos = array(\\\"usuario\\\" => $_SESSION['nombre'],\\r\\n\\t\\t\\t\\t\\t\\t\\t \\\"perfil\\\" => $_SESSION['perfil'],\\r\\n\\t\\t\\t\\t\\t\\t\\t \\\"accion\\\" => 'Edición de Pedido Laboratorio',\\r\\n\\t\\t\\t\\t\\t\\t\\t \\\"folio\\\" => $_POST[\\\"editarIdPedido\\\"]);\\r\\n\\r\\n\\t\\t$respuesta = ModeloLaboratorio::mdlRegistroBitacora($tabla, $datos);\\r\\n\\r\\n\\t\\treturn $respuesta;\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7d57e72b0e01622fbf4bdc52691e0ae\",\n \"score\": \"0.5566543\",\n \"text\": \"function API_semanas($usuario,$anio){\\n\\t$ClsPro = new ClsProgramacionPPM();\\n\\t$ClsAct = new ClsActivo();\\n\\t$ClsUsu = new ClsUsuario();\\n\\tif($usuario != \\\"\\\" && $anio != \\\"\\\"){\\n\\t\\t$result = $ClsUsu->get_usuario_sede(\\\"\\\",$usuario,\\\"\\\");\\n\\t\\tif(is_array($result)){\\n\\t\\t\\t$sedes = \\\"\\\";\\n\\t\\t\\tforeach($result as $row){\\n\\t\\t\\t\\t$sedes.= trim($row[\\\"sus_sede\\\"]).\\\",\\\";\\n\\t\\t\\t}\\n\\t\\t\\t$sedes = substr($sedes,0,-1);\\n\\t\\t}\\n\\t\\t$semana_actual = date(\\\"W\\\");\\n\\t\\t$semana_actual = ($semana_actual == 0)?7:$semana_actual;\\n\\t\\t$i = 0;\\n\\t\\t$arr_data = array();\\n\\t\\tfor($semana = 1; $semana <= 52; $semana++){\\n\\t\\t\\tif($semana < $semana_actual){\\n\\t\\t\\t\\t$semana = (strlen($semana) <= 1)?\\\"0$semana\\\":$semana;\\n\\t\\t\\t\\t$desde = date(\\\"d/m/Y\\\", strtotime($anio.\\\"-W\\\".$semana.'-1'));\\n\\t\\t\\t\\t$hasta = date(\\\"d/m/Y\\\", strtotime($anio.\\\"-W\\\".$semana.'-7'));\\n\\t\\t\\t\\t$rango_fechas = \\\"$desde - $hasta\\\";\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$result = $ClsPro->get_programacion($codigo,$activo,$usuario,$categoria,$sedes, '', '', $desde, $hasta);\\n\\t\\t\\t\\t$normal = 0;\\n\\t\\t\\t\\t$vencido = 0;\\n\\t\\t\\t\\tif(is_array($result)){\\n\\t\\t\\t\\t\\tforeach ($result as $row){\\n\\t\\t\\t\\t\\t\\t//conteo de dias\\n\\t\\t\\t\\t\\t\\t$programado = trim($row[\\\"pro_fecha\\\"]).\\\" 23:59:59\\\";\\n\\t\\t\\t\\t\\t\\t$fecha_update = trim($row[\\\"pro_fecha_update\\\"]);\\n\\t\\t\\t\\t\\t\\t$vencimiento = comparaFechas($programado, $fecha_update);\\n\\t\\t\\t\\t\\t\\t$situacion = $row[\\\"pro_situacion\\\"];\\n\\t\\t\\t\\t\\t\\tif($vencimiento == 2){ // vencido\\n\\t\\t\\t\\t\\t\\t\\t$vencido++;\\n\\t\\t\\t\\t\\t\\t}else{ // normal\\n\\t\\t\\t\\t\\t\\t\\t$normal++;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif($vencido > 0){\\n\\t\\t\\t\\t\\t$estado = 2;\\n\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t$estado = 1;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}else if($semana == $semana_actual){\\n\\t\\t\\t\\t$estado = 3;\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$estado = 4;\\n\\t\\t\\t}\\n\\t\\t\\t$arr_data[$i]['semana'] = intval($semana);\\n\\t\\t\\t$arr_data[$i]['rango_fechas'] = $rango_fechas;\\n\\t\\t\\t$arr_data[$i]['estado'] = intval($estado);\\n\\t\\t\\t$i++;\\n\\t\\t}\\n\\t\\t\\n\\t\\t$payload = array(\\n\\t\\t\\t\\\"status\\\" => true,\\n\\t\\t\\t\\\"data\\\" => $arr_data,\\n\\t\\t\\t\\\"message\\\" => \\\"\\\");\\n\\n\\t\\techo json_encode($payload);\\n\\t\\t\\n\\t}else{\\n\\t\\t//devuelve un mensaje de manejo de errores\\n\\t\\t$payload = array(\\n\\t\\t\\t\\\"status\\\" => false,\\n\\t\\t\\t\\\"data\\\" => [],\\n\\t\\t\\t\\\"message\\\" => \\\"Uno de los campos esta vacio...\\\");\\n\\t\\t\\techo json_encode($payload);\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49798c3aa3ce5cb9a410ac08d0626738\",\n \"score\": \"0.55656993\",\n \"text\": \"public function testapicarga(){\\n $res=\\n $this->call('POST', 'api/Sigex/Inspecciones/', array(\\n \\\"id\\\"=> 207,\\n \\\"nroControl\\\"=> 51,\\n \\\"fechaProgramacion\\\"=> \\\"2020-06-15\\\",\\n \\\"fechaRealizado\\\"=> \\\"2020-06-15\\\",\\n \\\"observaciones\\\"=> \\\"\\\",\\n \\\"estado\\\"=> 1,\\n \\\"tipo\\\"=> 1,\\n \\\"contrato\\\"=>array( \\n \\\"nroContrato\\\"=> \\\"CO010\\\",\\n \\\"fechaCarga\\\"=> \\\"2019-06-24\\\",\\n \\\"periodo\\\"=> 7,\\n \\\"estado\\\"=> 1,\\n \\\"fechaInicio\\\"=> \\\"2019-06-24\\\",\\n \\\"fechaFin\\\"=> \\\"2020-08-30\\\",\\n \\\"observaciones\\\"=> \\\"\\\",\\n \\\"cod_Cliente\\\"=> 195,\\n \\\"idSucursal\\\"=> 354,\\n \\\"id\\\"=> 11,\\n \\\"sucursales\\\"=>array(\\n \\\"idSucursal\\\"=> 354,\\n \\\"nombre\\\"=> \\\"Aeroparque\\\",\\n \\\"sectores\\\"=>array(\\n \\\"idSector\\\"=> 160,\\n \\\"numero\\\"=> \\\"001\\\",\\n \\\"sector\\\"=> \\\"General\\\",\\n \\\"cod_Cliente\\\"=> 195,\\n \\\"idSucursal\\\"=> 534,\\n \\\"estadoSubida\\\"=> 1,\\n \\\"habilitado\\\"=> 1,\\n \\\"puestos\\\"=>array(\\n \\\"idPuesto\\\"=> 4270,\\n \\\"nroPuesto\\\"=> \\\"001\\\",\\n \\\"ubicacion\\\"=> \\\"Escalera\\\",\\n \\\"habilitado\\\"=> 1,\\n \\\"idCapacidad\\\"=> 1,\\n \\\"idSector\\\"=> 160,\\n \\\"tipoDeEquipo\\\"=>array(\\n \\\"tipoDeEquipo\\\"=> \\\"ABC-PQS\\\",\\n \\\"tipogenerico\\\"=>array(\\n \\\"tipo\\\"=> \\\"Polvo\\\",\\n \\\"tipoExtintor\\\"=> \\\"bajaPresion\\\",\\n \\\"idTipoElemento\\\"=> 1,\\n \\\"id\\\"=> 1\\n )\\n ),\\n \\\"equipo\\\"=> array(\\n \\\"elemento_id\\\"=> 18715,\\n \\\"numeroDeEquipo\\\"=> \\\"11897\\\",\\n \\\"FechaFabricacion\\\"=> \\\"04\\\\\\\\/98\\\",\\n \\\"fechaUltimaPH\\\"=> \\\"06\\\\\\\\/12\\\",\\n \\\"vencimientoDeCarga\\\"=> \\\"2016-09-16\\\",\\n \\\"vencimientoDePH\\\"=> \\\"2017-06-01\\\",\\n \\\"codigoInternoCliente\\\"=> \\\"3\\\",\\n \\\"observaciones\\\"=> \\\"\\\",\\n \\\"disponible\\\"=> true,\\n \\\"vencimientoVidaUtil\\\"=> \\\"2018-04-01\\\",\\n \\\"tipo\\\"=>array (\\n \\\"tipoDeEquipo\\\"=> \\\"HCFC 123\\\",\\n \\\"tipogenerico\\\"=>array(\\n \\\"tipo\\\"=> \\\"Halogenado\\\",\\n \\\"tipoExtintor\\\"=> \\\"bajaPresion\\\",\\n \\\"idTipoElemento\\\"=> 1,\\n \\\"id\\\"=> 5\\n )\\n ),\\n \\\"idCapacidad\\\"=> 1,\\n \\\"marca\\\"=>array (\\n \\\"id\\\"=> 10,\\n \\\"Marca\\\"=> \\\"DRAGON\\\",\\n \\\"marcaMOST\\\"=> \\\"Otros\\\"\\n ),\\n \\\"codCliente\\\"=> 290,\\n \\\"sucursal\\\"=>array(\\n \\\"idSucursal\\\"=> 629,\\n \\\"nombre\\\"=> \\\"22 DE SEPTIEMBRE S.A. - Casa Central\\\",\\n \\\"sectores\\\"=>array()\\n ),\\n \\\"idEquipo\\\"=> 4\\n \\n )\\n\\n ),\\n ),\\n ),\\n ),\\n \\\"inspecciones\\\"=> array(\\n \\\"fechahora\\\"=> \\\"08/12/2019 01=>00=>00\\\",\\n \\\"observaciones\\\"=> \\\"\\\",\\n \\\"estado\\\"=> 1,\\n \\\"idControlPeriodico\\\"=> 207,\\n \\\"puesto\\\"=> array(\\n \\\"idPuesto\\\"=> 4270,\\n \\\"nroPuesto\\\"=> \\\"001\\\",\\n \\\"ubicacion\\\"=> \\\"Escalera\\\",\\n \\\"habilitado\\\"=> 1,\\n \\\"idCapacidad\\\"=> 1,\\n \\\"idSector\\\"=> 160,\\n \\\"tipoDeEquipo\\\"=> array(\\n \\\"tipoDeEquipo\\\"=> \\\"ABC-PQS\\\",\\n \\\"tipogenerico\\\"=> array(\\n \\\"tipo\\\"=> \\\"Polvo\\\",\\n \\\"tipoExtintor\\\"=> \\\"bajaPresion\\\",\\n \\\"idTipoElemento\\\"=> 1,\\n \\\"id\\\"=> 1\\n )\\n ),\\n \\\"equipo\\\"=> array(\\n \\\"elemento_id\\\"=> 18715,\\n \\\"numeroDeEquipo\\\"=> \\\"11897\\\",\\n \\\"FechaFabricacion\\\"=> \\\"04\\\\\\\\/98\\\",\\n \\\"fechaUltimaPH\\\"=> \\\"06\\\\\\\\/12\\\",\\n \\\"vencimientoDeCarga\\\"=> \\\"2016-09-16\\\",\\n \\\"vencimientoDePH\\\"=> \\\"2017-06-01\\\",\\n \\\"codigoInternoCliente\\\"=> \\\"3\\\",\\n \\\"observaciones\\\"=> \\\"\\\",\\n \\\"disponible\\\"=> true,\\n \\\"vencimientoVidaUtil\\\"=> \\\"2018-04-01\\\",\\n \\\"tipo\\\"=> array(\\n \\\"tipoDeEquipo\\\"=> \\\"HCFC 123\\\",\\n \\\"tipogenerico\\\"=> array(\\n \\\"tipo\\\"=> \\\"Halogenado\\\",\\n \\\"tipoExtintor\\\"=> \\\"bajaPresion\\\",\\n \\\"idTipoElemento\\\"=> 1,\\n \\\"id\\\"=> 5\\n )\\n ),\\n \\\"idCapacidad\\\"=> 1,\\n \\\"marca\\\"=> array(\\n \\\"id\\\"=> 10,\\n \\\"Marca\\\"=> \\\"DRAGON\\\",\\n \\\"marcaMOST\\\"=> \\\"Otros\\\"\\n ),\\n \\\"codCliente\\\"=> 290,\\n \\\"sucursal\\\"=> array(\\n \\\"idSucursal\\\"=> 629,\\n \\\"nombre\\\"=> \\\"22 DE SEPTIEMBRE S.A. - Casa Central\\\",\\n \\\"sectores\\\"=> array()\\n ),\\n \\\"idEquipo\\\"=> 4\\n )\\n ),\\n \\\"equipo\\\"=> array(\\n \\\"elemento_id\\\"=> 18715,\\n \\\"numeroDeEquipo\\\"=> \\\"11897\\\",\\n \\\"FechaFabricacion\\\"=> \\\"04\\\\\\\\/98\\\",\\n \\\"fechaUltimaPH\\\"=> \\\"06\\\\\\\\/12\\\",\\n \\\"vencimientoDeCarga\\\"=> \\\"2016-09-16\\\",\\n \\\"vencimientoDePH\\\"=> \\\"2017-06-01\\\",\\n \\\"codigoInternoCliente\\\"=> \\\"3\\\",\\n \\\"observaciones\\\"=> \\\"\\\",\\n \\\"disponible\\\"=> true,\\n \\\"vencimientoVidaUtil\\\"=> \\\"2018-04-01\\\",\\n \\\"tipo\\\"=> array(\\n \\\"tipoDeEquipo\\\"=> \\\"HCFC 123\\\",\\n \\\"tipogenerico\\\"=> array(\\n \\\"tipo\\\"=> \\\"Halogenado\\\",\\n \\\"tipoExtintor\\\"=> \\\"bajaPresion\\\",\\n \\\"idTipoElemento\\\"=> 1,\\n \\\"id\\\"=> 5\\n )\\n ),\\n \\\"idCapacidad\\\"=> 1,\\n \\\"marca\\\"=> array(\\n \\\"id\\\"=> 10,\\n \\\"Marca\\\"=> \\\"DRAGON\\\",\\n \\\"marcaMOST\\\"=> \\\"Otros\\\"\\n ),\\n \\\"codCliente\\\"=> 290,\\n \\\"sucursal\\\"=> array(\\n \\\"idSucursal\\\"=> 629,\\n \\\"nombre\\\"=> \\\"22 DE SEPTIEMBRE S.A. - Casa Central\\\",\\n \\\"sectores\\\"=> array()\\n ),\\n \\\"idEquipo\\\"=> 4\\n ),\\n \\\"id\\\"=> 13333,\\n \\\"fotos\\\"=> array()\\n )\\n\\n ));\\n dd($res);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cb719e08bc053a4515cfdf027716837\",\n \"score\": \"0.55443585\",\n \"text\": \"function runAutomaticApi()\\n {\\n try {\\n $this->auth();\\n $db = new Db();\\n $method = Input::getMethod();\\n $segments = Uri::getSegments();\\n $endPoint = BASE_URL.\\\"/api/v1/z2/x21/:miembro_id/\\\";\\n $endPoint = BASE_URL.\\\"/api/v1/\\\";\\n\\n // Get the route\\n // The parameters are fields\\n // Count the route segments\\n // Reduce the uri segments\\n // Get the table name\\n // Get the parameters\\n\\n array_shift($segments);\\n array_shift($segments);\\n $tableName = $segments[0];\\n array_shift($segments);\\n $segmentCount = count($segments);\\n\\n switch( $method ) {\\n case \\\"GET\\\":\\n if ( $segmentCount === 0 ) {\\n $results = $db->get($tableName);\\n return $this->setResponse();\\n } // end if segment count === 0\\n\\n // Here we construct the query\\n // we need the primary key for the table\\n // and the segments to match\\n $primaryKeys = $db->getPrimaryKeys( $tableName );\\n\\n if (count($primaryKeys) !== count($segments)) {\\n throw new Exception(\\\"Not all segments corresponding to key in table\\\");\\n } // end if count primaryKeys <> count segments\\n\\n $where = array();\\n foreach($primaryKeys as $i => $key) {\\n $where[$key] = $segments[$i];\\n } // end foreach primary key\\n\\n // Get the result\\n $results = $db->from($tableName)->where($where)->get();\\n // Set the response\\n return $this->setResponse();\\n break;\\n case \\\"POST\\\":\\n if ( $segmentCount > 0 ) {\\n throw new Exception( \\\"Post method must not include more url data\\\" );\\n } // end if segmentCount > 0\\n\\n Logger::debug(\\\"Input array\\\");\\n Logger::debug(Input::getArray());\\n $rows = $db->insert( $tableName, Input::getArray() );\\n // Here get id\\n\\n $keys = $db->getPrimaryKeys( $tableName );\\n $keys = implode(\\\",\\\", $keys);\\n $id = $db->select($keys)->from($tableName)->where(Input::getArray())->first();\\n $id = implode(\\\"/\\\",$id);\\n\\n Output::setStatusCode(201);\\n Output::setHeader(\\\"Location\\\", $endPoint . $tableName . \\\"/\\\" .$id );\\n return;\\n break;\\n case \\\"PUT\\\":\\n\\n $input = Input::getArray();\\n $primaryKeys = $db->getPrimaryKeys( $tableName );\\n\\n if (count($primaryKeys) !== count($segments)) {\\n throw new Exception(\\\"Not all segments corresponding to key in table\\\");\\n } // end if count primaryKeys <> count segments\\n\\n $where = array();\\n foreach( $primaryKeys as $i => $key ) {\\n $where[$key] = $segments[$i];\\n } // end foreach\\n\\n $exists =\\n $db->select(implode(\\\",\\\", $where))->\\n from($tableName)->\\n where($where)->get();\\n\\n if (!$exists) {\\n Output::setStatusCode(404);\\n } // end if not exists\\n\\n $db->update( $tableName, $input, $where );\\n\\n $keys = implode(\\\",\\\", $primaryKeys);\\n $id = $db->select($keys)->from($tableName)->where(Input::getArray())->first();\\n $id = implode(\\\"/\\\",$id);\\n Output::setStatusCode(201);\\n Output::setHeader(\\\"Location\\\", $endPoint . $tableName . \\\"/\\\" .$id );\\n return;\\n break;\\n case \\\"DELETE\\\":\\n if ( $segmentCount === 0 ) {\\n throw new Exception( \\\"Must specify a record id to delete\\\" );\\n } // end if segment count === 0\\n\\n $primaryKeys = $db->getPrimaryKeys( $tableName );\\n\\n if (count($primaryKeys) !== count($segments)) {\\n throw new Exception(\\\"Not all segments corresponding to key in table\\\");\\n } // end if count primaryKeys <> count segments\\n\\n $where = array();\\n foreach($primaryKeys as $i => $key) {\\n $where[$key] = $segments[$i];\\n } // end foreach primary key\\n\\n $db->delete( $tableName, $where );\\n Output::setStatusCode(204);\\n return;\\n break;\\n } // end switch $method\\n } catch(Exception $ex) {\\n Output::setStatusCode(415);\\n $this->jsonResponse(\\n array(\\n \\\"error\\\" => true,\\n \\\"description\\\" => $ex->getMessage()\\n ) // end array\\n ); // end jsonResponse\\n } // end try catch\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1219cd029b2c28fd0ae97f20f15d84f0\",\n \"score\": \"0.55404466\",\n \"text\": \"function anteriorEstadoObligacion()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_ANTEOB_IME';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n $this->setParametro('operacion', 'operacion', 'varchar');\\n $this->setParametro('obs', 'obs', 'varchar');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb82b199f9f13f94a32fcec2df8ab4ee\",\n \"score\": \"0.55351216\",\n \"text\": \"function Modificar_Bono_Regular($cod,$dpi,$monto,$moneda,$tcambio,$desc){\\n $respuesta = new xajaxResponse();\\n $ClsPla = new ClsPlanillaAsignaciones();\\n //pasa a mayusculas\\n\\t\\t$desc = trim($desc);\\n\\t//--------\\n\\t//decodificaciones de tildes y Ñ's\\n\\t\\t$desc = utf8_encode($desc);\\n\\t\\t//--\\n\\t\\t$desc = utf8_decode($desc);\\n\\t//-------- \\n if($cod !=\\\"\\\" && $dpi !=\\\"\\\" && $desc !=\\\"\\\" && $monto != \\\"\\\" && $moneda != \\\"\\\" && $tcambio != \\\"\\\"){\\n\\t\\t//$respuesta->alert(\\\"$id\\\");\\n\\t\\t$sql = $ClsPla->update_base_bonificaciones($cod,$dpi,$monto,$moneda,$tcambio,$desc); /// Inserta\\n\\t\\t//$respuesta->alert(\\\"$sql\\\");\\n\\t\\t$rs = $ClsPla->exec_sql($sql);\\n if($rs == 1){\\n $respuesta->script('swal(\\\"Excelente!\\\", \\\"Registros actualizados satisfactoriamente!\\\", \\\"success\\\").then((value)=>{ window.location.reload(); });');\\n }else{\\n $respuesta->script('swal(\\\"Error\\\", \\\"Error de transacci\\\\u00F3n...\\\", \\\"error\\\").then((value)=>{ cerrar(); });');\\n $respuesta->script(\\\"document.getElementById('mod').className = 'btn btn-primary';\\\");\\n $respuesta->script(\\\"document.getElementById('gra').className = 'btn btn-primary hidden';\\\");\\n }\\t\\n\\t}else{\\n $respuesta->script('swal(\\\"Error\\\", \\\"Error de transacci\\\\u00F3n...\\\", \\\"error\\\").then((value)=>{ cerrar(); });');\\n $respuesta->script(\\\"document.getElementById('mod').className = 'btn btn-primary';\\\");\\n $respuesta->script(\\\"document.getElementById('gra').className = 'btn btn-primary hidden';\\\");\\n\\t}\\n \\t\\t\\n return $respuesta;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ce4a76123cd6af6b7fa528397fc5c7d\",\n \"score\": \"0.5521816\",\n \"text\": \"function sap_grpo_header_cancel($data) {\\n $this->m_saprfc->setUserRfc();\\n $this->m_saprfc->setPassRfc();\\n $this->m_saprfc->sapAttr();\\n $this->m_saprfc->connect();\\n $this->m_saprfc->functionDiscover(\\\"ZMM_BAPI_CANCEL_GOODS_MOV\\\");\\n $this->m_saprfc->importParameter(array (\\\"MATDOCUMENTYEAR\\\",\\n \\\"MATERIALDOCUMENT\\\",\\n \\\"OUTLET\\\",\\n \\\"POSTING_DATE\\\",\\n \\\"WEB_LOGIN_ID\\\",\\n \\\"WEB_TRANSID\\\"),\\n array ($data['mat_doc_year'],\\n $data['grpo_no'],\\n $data['plant'],\\n $data['posting_date'],\\n $data['id_user_input'],\\n $data['web_trans_id'])\\n );\\n $count = count($data['item']);\\n $this->m_saprfc->setInitTable(\\\"MATDOC_ITEM\\\");\\n for ($i=1;$i<=$count;$i++) {\\n $this->m_saprfc->append (\\\"MATDOC_ITEM\\\",\\n array (\\\"MATDOC_ITEM\\\"=>$data['item'][$i])\\n );\\n }\\n $this->m_saprfc->setInitTable(\\\"I_RETURN\\\");\\n $this->m_saprfc->executeSAP();\\n $GOODSMVT_HEADRET = $this->m_saprfc->export(\\\"GOODSMVT_HEADRET\\\");\\n $I_RETURN = $this->m_saprfc->fetch_rows(\\\"I_RETURN\\\");\\n $MATDOC_ITEM = $this->m_saprfc->fetch_rows(\\\"MATDOC_ITEM\\\");\\n $this->m_saprfc->free();\\n $this->m_saprfc->close();\\n $count = count($I_RETURN);\\n $sap_messages = '';\\n for($i=1;$i<=$count;$i++) {\\n $sap_messages = $sap_messages.'
'.$I_RETURN[$i]['MESSAGE'];\\n }\\n if (empty($GOODSMVT_HEADRET['MAT_DOC'])) {\\n $count = count($MATDOC_ITEM);\\n $sap_messages = $sap_messages.\\n '
--------------------------------------
'.\\n 'Parameter Input yang dimasukkan :
'.\\n 'MATDOCUMENTYEAR : '.$data['mat_doc_year'].'
'.\\n 'MATERIALDOCUMENT : '.$data['grpo_no'].'
'.\\n 'OUTLET : '.$data['plant'].'
'.\\n 'POSTING_DATE : '.$data['posting_date'].'
'.\\n 'WEB_LOGIN_ID : '.$data['id_user_input'].'
'.\\n 'WEB_TRANSID : '.$data['web_trans_id'].'
';\\n for($i=1;$i<=$count;$i++) {\\n $sap_messages = $sap_messages.\\n '--------------------------------------
'.\\n 'MATDOC_ITEM :'.$MATDOC_ITEM[$i]['MATDOC_ITEM'].'
';\\n }\\n } else {\\n $count = count($MATDOC_ITEM);\\n for($i=1;$i<=$count;$i++) {\\n $this->sap_po_outstanding_update($data['po_no'],$data['item_po'][$i],$data['gr_quantity'][$i],'-');\\n }\\n }\\n\\n $cancelled_data = array (\\n \\\"material_document\\\" => $GOODSMVT_HEADRET['MAT_DOC'],\\n \\\"sap_messages\\\" => $sap_messages\\n );\\n\\n return $cancelled_data;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8211bdd3eb9896068e5f358855be364\",\n \"score\": \"0.5520552\",\n \"text\": \"public function testComunas()\\n {\\n // Parameters for the API call\\n $body = TestHelper::getJsonMapper()->mapClass(json_decode(\\n '{\\\\r\\\\n \\\"idIntegracion\\\": 21,\\\\r\\\\n \\\"token\\\": \\\"6be7212a-a769-40e4-9c6b-283aa06a3127\\\",\\\\r\\\\n \\\"idOrigen\\\": 83\\\\r\\\\n}'),\\n 'SGIAvenderLib\\\\\\\\Models\\\\\\\\ComunasRequest'\\n );\\n\\n // Set callback and perform API call\\n self::$controller->setHttpCallBack($this->httpResponse);\\n try {\\n self::$controller->comunas($body);\\n } catch (APIException $e) {\\n }\\n\\n // Test response code\\n $this->assertEquals(\\n 200,\\n $this->httpResponse->getResponse()->getStatusCode(),\\n \\\"Status is not 200\\\"\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88b0dc38299108cd2dfe19f3c95cf47f\",\n \"score\": \"0.5506308\",\n \"text\": \"public function devuelveDatosPiso() {\\n $idpiso = $this -> input -> post_get(\\\"id\\\");\\n\\n\\t\\t$datos[\\\"inmueble\\\"] = $this -> pisos_model -> show_piso($idpiso);\\n\\n\\t\\t// Cambiamos la cabecera a JSON de respuesta\\n header(\\\"Content-Type: application/json\\\");\\n // Escupimos la respuesta\\n echo json_encode($datos);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"863ee79a06f29d46d80026fd03ad3f88\",\n \"score\": \"0.5504539\",\n \"text\": \"public function procedimiento10($c1,$c2,$c3,$c4,$c5,$c6,$c7,$c8,$c9,$c10,$c11,$c12,$c13,$c14){\\n\\t\\t\\t$db = Yii::$app->params['awadb'];\\t\\t\\n\\t\\t\\t$usuario = Yii::$app->params['usuario'];\\n\\t\\t\\t$contrasena = Yii::$app->params['password'];\\n\\t\\t\\t//establece la conexion con la bese de dato AWA\\n\\t\\t\\t$conexion = oci_connect($usuario, $contrasena, $db, 'AL32UTF8');\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t//se hace el llamado al procedimietno que trae la informacion de las mesas\\n\\t\\t\\t$stid = oci_parse($conexion,\\\"BEGIN PKG_ACOMER_PROCEDURES.SP_ACOMER_FACTURA_RESTRASADA(:c1,:c2,:c3,:c4,:c5,:c6,:c7,:c8,:c9,:c10,:c11,:c12,:c13,:c14,:c15,:c16,:c17,:c18,:c19,:c20,:c21,:c22,:c23); END;\\\");\\n\\t\\t\\t//inicializa el cursor pasa como parametro\\n\\t\\t\\t$c16 = oci_new_cursor($conexion);\\n\\t\\t\\t//\\n\\t\\t\\toci_bind_by_name($stid, \\\":c1\\\", $c1, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c2\\\", $c2, 8);\\t\\t\\n\\t\\t\\toci_bind_array_by_name($stid, \\\":c3\\\", $c3, 100, -1, SQLT_CHR);\\n\\t\\t\\toci_bind_array_by_name($stid, \\\":c4\\\", $c4, 100, -1, SQLT_CHR);\\n\\t\\t\\toci_bind_array_by_name($stid, \\\":c5\\\", $c5, 100, -1, SQLT_CHR);\\n\\t\\t\\toci_bind_array_by_name($stid, \\\":c6\\\", $c6, 100, -1, SQLT_CHR);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c7\\\", $c7, 11);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c8\\\", $c8, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c9\\\", $c9, 11);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c10\\\", $c10, 3);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c11\\\", $c11, 20);\\n\\t\\t\\toci_bind_array_by_name($stid, \\\":c12\\\", $c12, 100, -1, SQLT_CHR);\\n\\t\\t\\toci_bind_array_by_name($stid, \\\":c13\\\", $c13, 100, -1, SQLT_CHR);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c14\\\", $c14, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c15\\\", $c15, 20);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c16\\\", $c16,-1, OCI_B_CURSOR);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c17\\\", $c17, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c18\\\", $c18, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c19\\\", $c19, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c20\\\", $c20, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c21\\\", $c21, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c22\\\", $c22, 10);\\n\\t\\t\\toci_bind_by_name($stid, \\\":c23\\\", $c23, 8);\\n\\n\\t\\t\\t//se ejecuta el procidimiento \\n\\t\\t\\toci_execute($stid);\\n\\t\\t\\toci_execute($c16,OCI_DEFAULT);\\n\\n\\t\\t\\toci_fetch_all($c16, $cursor1);\\n\\n\\t\\t\\treturn $c15;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76c99ed9ca61ec00b2022931c3811b8a\",\n \"score\": \"0.5502674\",\n \"text\": \"function listarModalidad(){\\n $this->procedimiento='adq.f_solicitud_ime';\\n $this->transaccion='ADQ_LISTMOD_GET';\\n $this->tipo_procedimiento='IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_solicitud','id_solicitud','int4');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n //echo $this->consulta;exit;\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72597608c706dc3d74574b0eb55131de\",\n \"score\": \"0.5499241\",\n \"text\": \"function controlAdjudicado(){\\r\\n $this->procedimiento='mat.ft_cotizacion_ime';\\r\\n $this->transaccion='MAT_CTS_ADJ';\\r\\n $this->tipo_procedimiento='IME';\\r\\n\\r\\n //Define los parametros para la funcion\\r\\n $this->setParametro('id_cotizacion','id_cotizacion','int4');\\r\\n $this->setParametro('adjudicado','adjudicado','varchar');\\r\\n\\r\\n //Ejecuta la instruccion\\r\\n $this->armarConsulta();\\r\\n $this->ejecutarConsulta();\\r\\n\\r\\n //Devuelve la respuesta\\r\\n return $this->respuesta;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50a60e0ad8ae5b0fff980a37bd725c5e\",\n \"score\": \"0.5492188\",\n \"text\": \"function API_login($usu,$pass){\\n\\t$ClsUsu = new ClsUsuario();\\n\\t$ClsReg = new ClsRegla();\\n\\t$ClsPerm = new ClsPermiso();\\n\\t$ClsPen = new ClsPensum();\\n\\tif($usu != \\\"\\\" && $pass != \\\"\\\"){\\n\\t\\t$result = $ClsUsu->get_login($usu,$pass);\\n\\t\\tif (is_array($result)) {\\n\\t\\t\\tforeach ($result as $row){\\n\\t\\t\\t\\t$codigo = $row['usu_id'];\\n\\t\\t\\t\\t$nombre = trim($row['usu_nombre']);\\n\\t\\t\\t\\t$nombre_pantalla = utf8_decode($row['usu_nombre_pantalla']);\\n\\t\\t\\t\\t$empresa = trim($row['suc_nombre']);\\n\\t\\t\\t\\t$empCodigo = trim($row['suc_id']);\\n\\t\\t\\t\\t$tipo = $row['usu_tipo'];\\n\\t\\t\\t\\t$tipo_codigo = $row['usu_tipo_codigo'];\\n\\t\\t\\t\\t//--\\n\\t\\t\\t\\t$chat_user_id = $row['usu_chat_id'];\\n\\t\\t\\t\\t//--\\n\\t\\t\\t\\t$foto = $row['usu_foto'];\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t/// USUARIO\\n\\t\\t\\t$arr_data['codigo'] = $codigo;\\n\\t\\t\\t$arr_data['usu'] = $usu;\\n\\t\\t\\t$arr_data['pass'] = $pass;\\n\\t\\t\\t$arr_data['nombre'] = $nombre;\\n\\t\\t\\t$arr_data['usu_nombre_pantalla'] = $nombre_pantalla;\\n\\t\\t\\t//--\\n\\t\\t\\t$chat = ($tipo == 1 || $tipo == 3)?1:0;\\n\\t\\t\\t$arr_data['chat'] = $chat; ///\\n\\t\\t\\t$arr_data['chat_user_id'] = $chat_user_id;\\n\\t\\t\\tif(file_exists('../../CONFIG/Fotos/USUARIOS/'.$foto.'.jpg')){ /// valida que tenga foto registrada\\n\\t\\t\\t\\t$arr_data['url_foto'] = \\\"https://\\\" . $_SERVER['HTTP_HOST'] . \\\"/CONFIG/Fotos/USUARIOS/\\\".$foto.\\\".jpg\\\";\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$arr_data['url_foto'] = \\\"https://\\\" . $_SERVER['HTTP_HOST'] . \\\"/CONFIG/Fotos/nofoto.png\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t/// PENSUM ////\\n\\t\\t\\t$pensum = $ClsPen->get_pensum_activo();\\n\\t\\t\\t\\n\\t\\t\\t///// ASMS /////\\n\\t\\t\\t$arr_data['pensum'] = $pensum;\\n\\t\\t\\t$arr_data['tipo_usuario'] = $tipo;\\n\\t\\t\\t$arr_data['tipo_codigo'] = $tipo_codigo;\\n\\t\\t\\tif($tipo == 1){\\n\\t\\t\\t\\t$arr_data['tipo_descripcion'] = \\\"USIARIO ADMINISTRATIVO\\\";\\n\\t\\t\\t}else if($tipo == 2){\\n\\t\\t\\t\\t$arr_data['tipo_descripcion'] = \\\"MAESTRO\\\";\\n\\t\\t\\t}else if($tipo == 3){\\n\\t\\t\\t\\t$arr_data['tipo_descripcion'] = \\\"PADRE\\\";\\n\\t\\t\\t}else if($tipo == 4){\\n\\t\\t\\t\\t$arr_data['tipo_descripcion'] = \\\"MONITOR DE BUS\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$payload = array(\\n\\t\\t\\t\\t\\t\\\"status\\\" => true,\\n\\t\\t\\t\\t\\t\\\"data\\\" => $arr_data,\\n\\t\\t\\t\\t\\t\\\"message\\\" => \\\"\\\");\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\techo json_encode($payload);\\n\\t\\t}else{\\n\\t\\t\\t//devuelve un mensaje de manejo de errores\\n\\t\\t\\t$arr_data = array(\\n\\t\\t\\t\\t\\\"status\\\" => false,\\n\\t\\t\\t\\t\\\"message\\\" => \\\"El usuario o el password son incorrectos...\\\");\\n\\t\\t\\t\\techo json_encode($arr_data);\\n\\t\\t}\\n\\t}else{\\n\\t\\t//devuelve un mensaje de manejo de errores\\n\\t\\t$arr_data = array(\\n\\t\\t\\t\\\"status\\\" => false,\\n\\t\\t\\t\\\"message\\\" => \\\"Uno de los campos esta vacio...\\\");\\n\\t\\t\\techo json_encode($arr_data);\\n\\t}\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9488c1cb05e93cd9e058b6f57802d23\",\n \"score\": \"0.5487243\",\n \"text\": \"function modificarObsPoa()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_OBSPOA_MOD';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n $this->setParametro('obs_poa', 'obs_poa', 'varchar');\\n $this->setParametro('codigo_poa', 'codigo_poa', 'varchar');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a22b171da4907acb1eaa4ec4f4d845a\",\n \"score\": \"0.54780996\",\n \"text\": \"function modificarObsPoa()\\n {\\n $this->procedimiento = 'adq.f_solicitud_ime';\\n $this->transaccion = 'ADQ_MODOBSPOA_MOD';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\\n $this->setParametro('obs_poa', 'obs_poa', 'varchar');\\n $this->setParametro('codigo_poa', 'codigo_poa', 'varchar');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbe6d23752b1cf5d04c75e4b2142249e\",\n \"score\": \"0.54756206\",\n \"text\": \"function siguienteEstadoCaja(){\\n $this->procedimiento='tes.ft_caja_ime';\\n $this->transaccion='TES_SIGECAJA_IME';\\n $this->tipo_procedimiento='IME';\\n \\n //Define los parametros para la funcion\\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\\n $this->setParametro('obs','obs','text');\\n $this->setParametro('json_procesos','json_procesos','text');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"caefaac73669a724a5e5301d1061d12e\",\n \"score\": \"0.5469488\",\n \"text\": \"function BD()\\n\\t\\t{\\n\\t\\t\\t$this->servidor = SERVIDOR;\\n\\t\\t\\t$this->usuario = USUARIOBD;\\n\\t\\t\\t$this->clave = CLAVEBD;\\n\\t\\t\\t$this->idlink;\\n\\t\\t\\t$this->idresult;\\n\\t\\t\\t$this->indice_result = 'N'; // varible para definir si el array de los datos va a tener el indice numero N o alfabetico A\\t\\t\\n\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fa16921540f6523e3ca5562e4b3070c\",\n \"score\": \"0.54688597\",\n \"text\": \"function getDatosCurso_ini_any()\\n {\\n $nom_tabla = $this->getNomTabla();\\n $oDatosCampo = new core\\\\DatosCampo(array('nom_tabla' => $nom_tabla, 'nom_camp' => 'curso_ini_any'));\\n $oDatosCampo->setEtiqueta(_(\\\"año inicio curso\\\"));\\n return $oDatosCampo;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"daafb433eb278cb5c2d177520cc78eac\",\n \"score\": \"0.5468668\",\n \"text\": \"public function odobri()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ca91eb7dc55c0ff93ec168025e74300\",\n \"score\": \"0.5464755\",\n \"text\": \"function obtenerFaltante()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_PAFPP_IME';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n $this->setParametro('ope_filtro', 'ope_filtro', 'varchar');\\n $this->setParametro('id_plan_pago', 'id_plan_pago', 'integer');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fcbfa955bcff11e7e7e2fe351291ab1\",\n \"score\": \"0.546113\",\n \"text\": \"public function CumpleTodo($param) {//vienen todos los parametros incluido el servicio\\r\\n $datosiniciales = $this->capturartodoyconvertir($param); //request\\r\\n\\r\\n $array_fechas = $this->Dias2Fechas($datosiniciales[3], $datosiniciales[4]); //first and second fechaentra y fechasalida\\r\\n\\r\\n return $this->recorrerfechas($array_fechas, $datosiniciales);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"154ae42d657c62e335e0ab1635404e4d\",\n \"score\": \"0.5458462\",\n \"text\": \"public function getConsultaUno($params){\\n \\n $msj = array(codigoError=>'0000',mensaje=>'',sesionId=>session_id(), sesUsuario=>$_SESSION[\\\"UsuarioId\\\"]);\\n if (!isset($_SESSION[\\\"UsuarioId\\\"])){\\n $msj = array(codigoError=>'9999',mensaje=>'Usuario no ha ingresado',sesionId=>session_id());\\n $results = array();\\n $respuesta = array($msj,$results); \\n return $respuesta;\\t \\n\\t } else { \\n \\n // Usuario ya ingresado. \\n $_db = $this->__construct();\\n \\n $correo = $params->correo;\\n \\n $_result = $_db->query(\\\"SELECT EMail, NoCedula, Nombre, Apellidos, Apodo, TelCelular, FechaNacimiento,\\n Genero, CodProv, CodCanton, CodDist, FotoFile, TipoUsuario \\n FROM Usuario as A, Persona as B\\n WHERE EMail='\\\".$correo.\\\"' AND A.IdPersona = B.id\\\") \\n or die('Connect Error (' . $_db->connect_errno . ') ' . $_db->connect_error); \\n \\n $results = array();\\n while ($row = $_result->fetch_assoc()) {array_push($results, $row);}\\n $respuesta = array($msj,$results); \\n return $respuesta;\\n \\n } // Fin de IF Sesion\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"200b58e75f8045cda861f87b5867e93c\",\n \"score\": \"0.54509217\",\n \"text\": \"private function loguear() {\\n $respuesta = array();\\n\\n $body = file_get_contents('php://input');\\n $usuario = json_decode($body);\\n\\n $telefono = $usuario->telefono;\\n $contrasena = $usuario->contrasena;\\n\\n if (self::autenticar($telefono, $contrasena)) {\\n $usuarioBD = self::obtenerUsuarioPorTelefono($telefono);\\n\\n if ($usuarioBD != NULL) {\\n http_response_code(200);\\n $respuesta[\\\"Usuario\\\"] = $usuarioBD[\\\"id_Usuario\\\"];\\n $respuesta[\\\"Nombre\\\"] = base64_decode($usuarioBD[\\\"nombre\\\"]);\\n $respuesta[\\\"Telefono\\\"] = $usuarioBD[\\\"telefono\\\"];\\n $respuesta[\\\"APIkey\\\"] = $usuarioBD[\\\"claveApi\\\"];\\n return [\\\"estado\\\" => 1, \\\"usuario\\\" => $respuesta];\\n\\n } else {\\n throw new ExcepcionApi(self::ESTADO_FALLA_DESCONOCIDA,\\n \\\"Ha ocurrido un error\\\");\\n }\\n } else {\\n throw new ExcepcionApi(self::ESTADO_PARAMETROS_INCORRECTOS,\\n utf8_encode(\\\"Teléfono o contraseña inválidos\\\"));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e2c94e3fb2867ff12740e05f9a7a8e0\",\n \"score\": \"0.54471695\",\n \"text\": \"function VerificaDatos_2($param_num,$param_notas,$param_archivo)\\r\\n {\\r\\n global $vectorNotasTemporal;\\r\\n global $ErrorExisteDoble;\\r\\n\\r\\n $ErrorExisteDoble = 0;\\r\\n $noexisten = 0;\\r\\n $ubicaciondoble = 0;\\r\\n for ($c=1; $c < $param_num; $c++)\\r\\n {\\r\\n list($card,$name,$final) = split(\\\",\\\",$param_notas[$c]);\\r\\n $laboratorio = 0;\\r\\n $zona = 0;\\r\\n $final = trim($final);\\r\\n $cantdigitos = strlen($card);\\r\\n // ----------modificacion realizada para el carnet\\r\\n switch($cantdigitos)\\r\\n {\\r\\n case 9: /*carne bueno */ break;\\r\\n case 7: $subcadena = substr($card, 0, 2);\\r\\n $factible = $subcadena + 0;\\r\\n if ($factible < 98) //aqui preguntar si los primeros dos digitos son < 98\\r\\n { $card = '00'.$card; }\\r\\n else //si son mayores a 98 entonces agregar 19\\r\\n { $card = '19'.$card; }\\r\\n break;\\r\\n default: $faltan = 9 - $cantdigitos;\\r\\n for($i=0; $i < $faltan; $i++) $card = '0'.$card;\\r\\n }//Fin del switch\\r\\n\\r\\n //Se le coloca el valor correspondiente sin son APR = -3, REP = -4\\r\\n $valor = strtoupper($final);\\r\\n switch( $valor )\\r\\n {\\r\\n case '1': $final = -3; break;\\r\\n case '2': $final = -4; break;\\r\\n case 'APR': $final = -3; break;\\r\\n case 'REP': $final = -4; break;\\r\\n }\\r\\n //echo \\\"final -* - $final
\\\";\\r\\n\\r\\n //aqui se verifica que el carne se encuentre en asignacion y asignaciondetalle\\r\\n //sino no se traslada a ingresotemporal, ademas para los periodos de retrasada\\r\\n //se le coloca a la zona y el laboratorio los valores de sus semestres respectivos\\r\\n $banderaencontrado = -1;\\r\\n for ($j=0; $j < $_SESSION[\\\"sNotas\\\"]->num_rows(); $j++)\\r\\n {\\r\\n $_SESSION[\\\"sNotas\\\"]->Row = $j;\\r\\n\\r\\n $_SESSION[\\\"sNotas\\\"]->next_record();\\r\\n $vectasig1[usuarioid] = trim($_SESSION[\\\"sNotas\\\"]->f('idstudent'));\\r\\n $vectasig1[carrera] = trim($_SESSION[\\\"sNotas\\\"]->f('idcareer'));\\r\\n $vectasig1[zona] = trim($_SESSION[\\\"sNotas\\\"]->f('classzone'));\\r\\n $vectasig1[zonalaboratorio] = trim($_SESSION[\\\"sNotas\\\"]->f('labnote'));\\r\\n\\r\\n if (strcmp($vectasig1[usuarioid], $card) == 0 )\\r\\n {\\r\\n $banderaencontrado = 1;\\r\\n $carrera = trim($vectasig1[carrera]);\\r\\n $laboratorio = 0; //asigno el laboratorio\\r\\n $zona = 0; //asigno la zona\\r\\n break;\\r\\n }\\r\\n }//Fin del for\\r\\n\\r\\n\\r\\n // Si los valores son encontrados se va guardando en un vector temporal para luego\\r\\n // ser insertado en la tabla ingresotemporal\\r\\n if ($banderaencontrado == 1 )\\r\\n {\\r\\n $numero = is_numeric($final);\\r\\n if ($numero)\\r\\n {\\r\\n $convfinal = 0;\\r\\n $convfinal = 0 + $final;\\r\\n }\\r\\n else { $convfinal = $final; }\\r\\n\\r\\n $notas[$c-1] = $this->mUsuarioid.\\\"|\\\".$card.\\\"|\\\".$carrera.\\\"|\\\".$this->mCurso.\\\"|\\\".$this->mIndex.\\\"|\\\".\\r\\n $this->mSeccion.\\\"|\\\".$this->mPeriodo.\\\"|\\\".$this->mAnio.\\\"|\\\".$zona.\\r\\n \\\"|\\\".$laboratorio.\\\"|\\\".$convfinal.\\\"|0|0\\\";\\r\\n\\r\\n //echo \\\" -*-*- \\\".$notas[$c-1].\\\"
\\\"; die;\\r\\n\\r\\n //busca que no sea un registro repetido\\r\\n $valor = -5;\\r\\n $banderaduplicado = 0;\\r\\n for ($r = 0; $r < $c-1; $r++)\\r\\n {\\r\\n if ($valor != 1)\\r\\n {\\r\\n $valor = substr_count($notasfinales[$r], $card); //cuenta cuantas veces aparece\\r\\n if ($valor > 0) //si lo encontro al menos una vez\\r\\n {\\r\\n// $tempdup = substr($notasfinales[$r],0,strlen($notasfinales[$r])-1);\\r\\n// $tempdup = $tempdup.\\\"8003,\\\".$carrera;\\r\\n// $notasfinales[$r] = \\\"\\\";\\r\\n// $notasfinales[$r] = $tempdup;\\r\\n $valor = -5;\\r\\n $banderaduplicado = 1;\\r\\n $ErrorExisteDoble = 1;\\r\\n $ubicaciondoble = $c+1;\\r\\n // echo \\\"entro con \\\".$card.\\\"
\\\";\\r\\n }\\r\\n }\\r\\n } //Fin del For\\r\\n\\r\\n if ($banderaduplicado == 0)\\r\\n {\\r\\n $notasfinales[$c-1] = $notas[$c-1];\\r\\n // echo \\\"notas finales \\\".$notasfinales[$c-1].\\\"
\\\";\\r\\n }\\r\\n\\r\\n $banderaencontrado = -1;\\r\\n }//fin del if de encontrado\\r\\n else { $noexisten++; }\\r\\n }//Fin del for\\r\\n//echo \\\"
vector --\\\",$notasfinales[0][$card],\\\"-- no existen <<\\\",$noexisten,\\\">>\\\";\\r\\n //Si existe en el archivo alguna tupla repetida se descarta de una vez el archivo\\r\\n\\r\\n//\\t echo \\\"error --- \\\".$ErrorExisteDoble.\\\"
\\\"; die;\\r\\n if ($ErrorExisteDoble == 0)\\r\\n {\\r\\n //cuando hay registros agregados hay que verificar cuantos son dependiendo el porcentaje se desecha el archivo\\r\\n $porcentaje = $this->mAsignados * 0.50;\\r\\n\\r\\n if (($noexisten < $porcentaje)&&($notasfinales != null))\\r\\n {\\r\\n $transaccion_ok = 1;\\r\\n// $transaccion_ok = $_SESSION[\\\"sNotas\\\"]->query(\\\"begin\\\");\\r\\n\\r\\n $transaccion_ok = $_SESSION[\\\"sNotas\\\"]->query($this->gsql_IA->begin());\\r\\n\\r\\n $registros = $this->VerificaDatosTabla();\\r\\n\\r\\n /*\\t\\t $nf = count($notasfinales);\\r\\n for( $x=0; $x < nf; $x++)\\r\\n {\\r\\n echo $notasfinales[$x].\\\"
\\\";\\r\\n }\\r\\n\\r\\n print_r($notasfinales);\\r\\n\\r\\n die; */\\r\\n\\r\\n //Manejo de errores en la carga del vector a la tabla\\r\\n// $old_error_handler = set_error_handler(\\\"Maneja_Error_Copy\\\");\\r\\n $resultado = pg_copy_from($_SESSION[\\\"sNotas\\\"]->Link_ID,\\\"tbtempentry\\\", $notasfinales,\\\"|\\\");\\r\\n// restore_error_handler();\\r\\n if ($resultado)\\r\\n { //COMMIT TRANSACTION\\r\\n //echo \\\"entro por aca
\\\";\\r\\n// $rst_transaccion = $_SESSION[\\\"sNotas\\\"]->query(\\\"commit\\\");\\r\\n\\r\\n $rst_transaccion = $_SESSION[\\\"sNotas\\\"]->query($this->gsql_IA->commit());\\r\\n\\r\\n\\r\\n //echo \\\"hasta aqui solo los q estan en archivo\\\"; die;\\r\\n // Muestra resultados\\r\\n if ($this->upload_report($registros,$param_archivo) == 1) { return 1; }\\r\\n else { return 0; }\\r\\n }\\r\\n else\\r\\n { // Ha ocurrido algún error. Recupera el backup de la tabla de notas\\r\\n //ROLLBACK TRANSACTION\\r\\n// $rst_transaccion = $_SESSION[\\\"sNotas\\\"]->query(\\\"rollback\\\");\\r\\n\\r\\n $rst_transaccion = $_SESSION[\\\"sNotas\\\"]->query($this->gsql_IA->rollback());\\r\\n\\r\\n $this->mStringMensaje = \\\"No fu&eacute; posible cargar el archivo
\\r\\n por favor revise la informaci&oacute;n y vuelva a intentarlo.\\\";\\r\\n return 0;\\r\\n } //END TRANSACTION\\r\\n// $rst_transaccion = $_SESSION[\\\"sNotas\\\"]->query(\\\"end\\\");\\r\\n\\r\\n $rst_transaccion = $_SESSION[\\\"sNotas\\\"]->query($this->gsql_IA->end());\\r\\n\\r\\n }\\r\\n else\\r\\n {\\r\\n $this->mStringMensaje = \\\"No coinciden los alumnos del archivo con los asignados
\\r\\n revise que el archivo realmente sea el correcto
\\r\\n y vuelva a intentarlo.\\\";\\r\\n return 0;\\r\\n }\\r\\n }\\r\\n else\\r\\n {\\r\\n $this->mStringMensaje = \\\"Existen registros repetidos.
Verificar la l&iacute;nea : \\\".$ubicaciondoble;\\r\\n return 0;\\r\\n }//Fin de if de existe tupla repetida en el archivo\\r\\n\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46a5078063074368e8c1bdb695b8209a\",\n \"score\": \"0.54416376\",\n \"text\": \"function ObtenerBaseDatos($CodigoSesion){\\n $Conexion = new Conexion();\\n\\n /**\\n * se asigna el nombre de la base de datos\\n */\\n $DatosConexion = $Conexion->ObtenerConexion();\\n\\n $Resultado = array();\\n\\n /**\\n * verifica que el codigo no este \\n * vacio\\n */\\n if($CodigoSesion != \\\"\\\"){ \\n /**\\n * selecciona unicamente \\n * el nombre y la conexion\\n * */ \\n $result = $DatosConexion->query(\\\"SELECT Nombre,Conexion FROM operacion_conexiones where Codigo='\\\".$CodigoSesion.\\\"' and idEstado=1\\\");\\n\\n /**\\n * evalua si devolvio \\n * datos\\n */\\n if($result)\\n { \\n /**\\n * asigna los datos consultados\\n */\\n $Resultado = $result->fetch_array(MYSQLI_ASSOC);\\n }\\n else{\\n /**\\n * retorna si no se encuentra un\\n * registro\\n */\\n $Resultado = array (\\n 'Codigo' => '',\\n 'Usuario' => '',\\n 'Response' => 'No hay datos'\\n );\\n }\\n }\\n else{\\n /**\\n * retorna si no se encuentra un\\n * registro\\n */\\n $Resultado = array (\\n 'Codigo' => '',\\n 'Usuario' => '',\\n 'Response' => 'No hay datos'\\n );\\n }\\n\\n return $Resultado;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1becf984c4739b324f5006600c557645\",\n \"score\": \"0.5431796\",\n \"text\": \"function callAPI($request_Type, $data = false, $api_url, $header, $url_campagin)\\n{\\n $url = $url_campagin . $api_url;\\n $curl = curl_init();\\n // print_r($data);\\n // die;\\n $data = json_encode($data);\\n switch ($request_Type) {\\n case \\\"POST\\\":\\n curl_setopt($curl, CURLOPT_POST, 1);\\n if ($data)\\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\\n break;\\n case \\\"PUT\\\":\\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \\\"PUT\\\");\\n if ($data)\\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data);\\n break;\\n default:\\n if ($data)\\n $url = sprintf(\\\"%s?%s\\\", $url, $data);\\n }\\n // OPTIONS:\\n curl_setopt($curl, CURLOPT_URL, $url);\\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\\n curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\\n // EXECUTE:\\n $result = curl_exec($curl);\\n $httpcode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\\n curl_close($curl);\\n\\n return array('response' => $result, 'httpcode' => $httpcode);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b0e251c340cd7f7505489c7c5884e9d\",\n \"score\": \"0.54223895\",\n \"text\": \"function cuadroComparativo(){\\r\\n $this->procedimiento='mat.ft_cotizacion_sel';\\r\\n $this->transaccion='MAT_CTS_CUAR';\\r\\n $this->tipo_procedimiento='SEL';//tipo de transaccion\\r\\n $this->setCount(false);\\r\\n\\r\\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\\r\\n\\r\\n $this->captura('id_solicitud','int4');\\r\\n $this->captura('id_cotizacion','int4');\\r\\n $this->captura('parte','varchar');\\r\\n $this->captura('descripcion','text');\\r\\n $this->captura('explicacion_detallada_part_cot','varchar');\\r\\n $this->captura('cantidad','integer');\\r\\n $this->captura('tipo_cot','varchar');\\r\\n $this->captura('cd','varchar');\\r\\n $this->captura('precio_unitario','numeric');\\r\\n $this->captura('precio_unitario_mb','numeric');\\r\\n $this->captura('codigo_tipo','varchar');\\r\\n $this->captura('desc_proveedor','text');\\r\\n $this->captura('adjudicado','varchar');\\r\\n $this->captura('recomendacion','varchar');\\r\\n $this->captura('obs','varchar');\\r\\n $this->captura('fecha_cotizacion','varchar');\\r\\n $this->captura('fecha_po','varchar');\\r\\n $this->captura('monto_total','numeric');\\r\\n $this->captura('lista_proveedor','varchar');\\r\\n $this->captura('pie_pag','varchar');\\r\\n $this->captura('estado','varchar');\\r\\n\\t\\t\\t\\t$this->captura('nro_cotizacion','varchar');\\r\\n\\t\\t\\t\\t$this->captura('fecha_solicitud','date');\\r\\n\\t\\t\\t\\t$this->captura('fecha_salida','date');\\r\\n\\t\\t\\t\\t$this->captura('pn_cotizacion','varchar');\\r\\n $this->captura('nro_tramite','varchar');\\r\\n\\r\\n\\r\\n //Ejecuta la instruccion\\r\\n $this->armarConsulta();\\r\\n $this->ejecutarConsulta();\\r\\n //Devuelve la respuesta\\r\\n\\t\\t\\t\\t//var_dump(\\\"aqui llega \\\",$this->respuesta);exit;\\r\\n return $this->respuesta;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9ba48d7897b3c637e544561b91198e8\",\n \"score\": \"0.5421656\",\n \"text\": \"function listarObligacion()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_sel';\\n $this->transaccion = 'TES_COMEJEPAG_SEL';\\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\\n $this->setCount(false);\\n\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n $this->setParametro('id_moneda', 'id_moneda', 'int4');\\n //Definicion de la lista del resultado del query\\n $this->captura('id_obligacion_det', 'int4');\\n $this->captura('id_partida', 'int4');\\n $this->captura('nombre_partida', 'text');\\n $this->captura('id_concepto_ingas', 'int4');\\n $this->captura('nombre_ingas', 'text');\\n $this->captura('id_obligacion_pago', 'int4');\\n $this->captura('id_centro_costo', 'int4');\\n $this->captura('codigo_cc', 'text');\\n $this->captura('id_partida_ejecucion_com', 'int4');\\n $this->captura('descripcion', 'text');\\n $this->captura('comprometido', 'numeric');\\n $this->captura('ejecutado', 'numeric');\\n $this->captura('pagado', 'numeric');\\n $this->captura('revertible', 'numeric');\\n $this->captura('revertir', 'numeric');\\n $this->captura('moneda', 'varchar');\\n $this->captura('desc_orden', 'varchar');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n //echo($this->consulta);exit;\\n $this->ejecutarConsulta();\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d78f76818aff63033721d495ede4c70\",\n \"score\": \"0.542111\",\n \"text\": \"function paradasCorredor($codCorredor){\\r\\n\\t$ck = arrumaCookie(cookieSecao());\\r\\n\\t$data = urlencode($codCorredor);\\r\\n\\treturn json_decode(do_get_request(urlSp.urlParadasCorredor.$data,$ck),true);\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2df8bd514dbd10eb8ed19663958638d4\",\n \"score\": \"0.5420119\",\n \"text\": \"function modificarObsPresupuestos()\\n {\\n $this->procedimiento = 'tes.ft_obligacion_pago_ime';\\n $this->transaccion = 'TES_OBSPRE_MOD';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_obligacion_pago', 'id_obligacion_pago', 'int4');\\n $this->setParametro('obs', 'obs', 'varchar');\\n $this->setParametro('fecha_cer_pres', 'fecha_cer_pres', 'date');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccc2a0ae40a579dbe20010a48b389813\",\n \"score\": \"0.5417308\",\n \"text\": \"function modificarTarjetasErp(){\\n\\n $this->objFunc=$this->create('MODBoleto');\\n $this->res=$this->objFunc->modificarTarjetasErp($this->objParam);\\n\\n if($this->res->getTipo()!='EXITO'){\\n $this->res->imprimirRespuesta($this->res->generarJson());\\n exit;\\n }\\n\\n\\n\\n /*Aqui para guardar en el log de datos*/\\n $this->objParam->addParametro('observaciones', \\\"Modificacion MP Tarjetas ERP y STAGE\\\");\\n $this->objFunc=$this->create('MODBoleto');\\n $this->res2=$this->objFunc->logModificaciones($this->objParam);\\n\\n if($this->res2->getTipo()!='EXITO'){\\n $this->res2->imprimirRespuesta($this->res2->generarJson());\\n exit;\\n }\\n\\n /*Incluyenco la modificacion en el STAGE*/\\n $data = array(\\\"ticketNumber\\\"=>$this->objParam->getParametro('boleto_a_modificar'),\\n \\\"nroTarjeta\\\"=>$this->objParam->getParametro('num_tarjeta_1'),\\n \\\"codAutorizacion\\\"=>$this->objParam->getParametro('cod_tarjeta_1'),\\n \\\"issueDate\\\"=>$this->objParam->getParametro('issueDate')\\n );\\n $datosUpdate = json_encode($data);\\n\\n $envio_dato = $datosUpdate;\\n\\n $request = 'http://sms.obairlines.bo/CommissionServices/ServiceComision.svc/UpdatePaymentMethod';\\n $session = curl_init($request);\\n curl_setopt($session, CURLOPT_CUSTOMREQUEST, \\\"POST\\\");\\n curl_setopt($session, CURLOPT_POSTFIELDS, $envio_dato);\\n curl_setopt($session, CURLOPT_RETURNTRANSFER, true);\\n curl_setopt($session, CURLOPT_HTTPHEADER, array(\\n 'Content-Type: application/json',\\n 'Content-Length: ' . strlen($envio_dato))\\n );\\n\\n $result = curl_exec($session);\\n curl_close($session);\\n\\n\\n\\n $respuesta = json_decode($result);\\n\\n $respuesta_final = json_decode($respuesta->UpdatePaymentMethodResult);\\n\\n $respuesta_estado_servicio = $respuesta_final->State;\\n\\n if ($respuesta_estado_servicio == true) {\\n $respuesta_base_datos = $respuesta_final->Data;\\n\\n if ($respuesta_base_datos) {\\n $respuesta_mensaje = $respuesta_base_datos[0]->Result;\\n\\n if ($respuesta_mensaje == 1) {\\n $respuesta_mensaje = \\\"Medio de Pago modificado Correctamente en STAGE\\\";\\n $error = false;\\n } else {\\n $error = true;\\n $respuesta_mensaje = 'Error en la modificacion DB';\\n }\\n\\n } else {\\n $error = true;\\n $respuesta_mensaje = 'Error en el Servicio cod: 2';\\n }\\n\\n } else {\\n $error = true;\\n $respuesta_mensaje = 'Error en el servicio cod: 1';\\n }\\n\\n\\n\\n if ($this->objParam->getParametro('num_tarjeta_2') != '' && $this->objParam->getParametro('num_tarjeta_2') != null) {\\n\\n $data2 = array(\\\"ticketNumber\\\"=>$this->objParam->getParametro('boleto_a_modificar'),\\n \\\"nroTarjeta\\\"=>$this->objParam->getParametro('num_tarjeta_2'),\\n \\\"codAutorizacion\\\"=>$this->objParam->getParametro('cod_tarjeta_2'),\\n \\\"issueDate\\\"=>$this->objParam->getParametro('issueDate'));\\n $datosUpdate2 = json_encode($data2);\\n\\n $envio_dato2 = $datosUpdate2;\\n\\n $request2 = 'http://sms.obairlines.bo/CommissionServices/ServiceComision.svc/UpdatePaymentMethod';\\n $session2 = curl_init($request2);\\n curl_setopt($session2, CURLOPT_CUSTOMREQUEST, \\\"POST\\\");\\n curl_setopt($session2, CURLOPT_POSTFIELDS, $envio_dato2);\\n curl_setopt($session2, CURLOPT_RETURNTRANSFER, true);\\n curl_setopt($session2, CURLOPT_HTTPHEADER, array(\\n 'Content-Type: application/json',\\n 'Content-Length: ' . strlen($envio_dato2))\\n );\\n\\n $result2 = curl_exec($session2);\\n curl_close($session2);\\n\\n $respuesta2 = json_decode($result2);\\n\\n $respuesta_final2 = json_decode($respuesta2->UpdatePaymentMethodResult);\\n\\n $respuesta_estado_servicio2 = $respuesta_final2->State;\\n\\n if ($respuesta_estado_servicio2 == true) {\\n $respuesta_base_datos2 = $respuesta_final2->Data;\\n\\n if ($respuesta_base_datos2) {\\n $respuesta_mensaje2 = $respuesta_base_datos2[0]->Result;\\n\\n if ($respuesta_mensaje2 == 1) {\\n $respuesta_mensaje2 = \\\"Medios de Pago modificados Correctamente en STAGE\\\";\\n $error2 = false;\\n } else {\\n $error2 = true;\\n $respuesta_mensaje2 = 'Error en la modificacion DB';\\n }\\n\\n } else {\\n $error2 = true;\\n $respuesta_mensaje2 = 'Error en el Servicio cod: 2';\\n }\\n\\n } else {\\n $error2 = true;\\n $respuesta_mensaje2 = 'Error en el servicio cod: 1';\\n }\\n\\n if (($error == false) && ($error2 == false)) {\\n\\n\\n $send = array(\\n \\\"error\\\" => $error, // todo\\n \\\"data\\\" => [\\\"mensaje_exito\\\" => $respuesta_mensaje2]\\n );\\n echo json_encode($send);\\n\\n } else {\\n\\n $send = array(\\n \\\"error\\\" => $error, // todo\\n \\\"data\\\" => [\\\"mensaje_exito\\\" => $respuesta_mensaje2]\\n );\\n echo json_encode($send);\\n\\n }\\n\\n } else {\\n\\n\\n $send = array(\\n \\\"error\\\" => $error, // todo\\n \\\"data\\\" => [\\\"mensaje_exito\\\" => \\\"Datos Modificados Correctamente en ERP y Stage\\\"]\\n );\\n echo json_encode($send);\\n }\\n\\n /****************************************/\\n\\n\\n\\n\\n \\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12d557e46431b9224aea2fe80c0b88d8\",\n \"score\": \"0.5415781\",\n \"text\": \"public function EditarDatosPaciente()\\n{\\n\\n $datosEditarPaciente = new GestionarPaciente();\\n $idUsuario=base64_decode($_REQUEST['g']);\\n \\n if(isset($idUsuario)){\\n\\n $datosEditarPaciente = $this->modelo->ObtenerDatosEditarPaciente($idUsuario);\\n}\\nrequire_once 'Vista/Header.php';\\nrequire_once 'Vista/GestionPacientes/EditarPaciente.php'; \\nrequire_once 'Vista/Footer.php'; \\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1971f245c59bde4ae181b8ab3607b0aa\",\n \"score\": \"0.5411199\",\n \"text\": \"function listarCotizacion(){\\r\\n\\t\\t$this->procedimiento='mat.ft_cotizacion_sel';\\r\\n\\t\\t$this->transaccion='MAT_CTS_SEL';\\r\\n\\t\\t$this->tipo_procedimiento='SEL';//tipo de transaccion\\r\\n\\r\\n $this->setParametro('id_solicitud','id_solicitud','int4');\\r\\n\\t\\t//Definicion de la lista del resultado del query\\r\\n\\t\\t$this->captura('id_cotizacion','int4');\\r\\n\\t\\t$this->captura('id_solicitud','int4');\\r\\n\\t\\t$this->captura('id_moneda','int4');\\r\\n\\t\\t$this->captura('nro_tramite','varchar');\\r\\n\\t\\t$this->captura('fecha_cotizacion','date');\\r\\n\\t\\t$this->captura('adjudicado','varchar');\\r\\n\\t\\t$this->captura('estado_reg','varchar');\\r\\n\\t\\t$this->captura('id_proveedor','int4');\\r\\n\\t\\t$this->captura('monto_total','numeric');\\r\\n\\t\\t$this->captura('id_usuario_ai','int4');\\r\\n\\t\\t$this->captura('id_usuario_reg','int4');\\r\\n\\t\\t$this->captura('fecha_reg','timestamp');\\r\\n\\t\\t$this->captura('usuario_ai','varchar');\\r\\n\\t\\t$this->captura('id_usuario_mod','int4');\\r\\n\\t\\t$this->captura('fecha_mod','timestamp');\\r\\n\\t\\t$this->captura('usr_reg','varchar');\\r\\n\\t\\t$this->captura('usr_mod','varchar');\\r\\n\\t\\t$this->captura('desc_moneda','varchar');\\r\\n\\t\\t$this->captura('desc_proveedor','varchar');\\r\\n\\t\\t$this->captura('nro_cotizacion','varchar');\\r\\n\\t\\t$this->captura('recomendacion','varchar');\\r\\n\\t\\t$this->captura('obs','varchar');\\r\\n\\t\\t$this->captura('pie_pag','varchar');\\r\\n\\t\\t//\\r\\n\\t\\t// $this->captura('id_condicion_entrega','int4');\\r\\n\\t\\t// $this->captura('id_forma_pago','int4');\\r\\n\\t\\t// $this->captura('id_modo_envio','int4');\\r\\n\\t\\t// $this->captura('id_puntos_entrega','int4');\\r\\n\\t\\t// $this->captura('id_tipo_transaccion','int4');\\r\\n\\t\\t// $this->captura('id_orden_destino','int4');\\r\\n\\t\\t//\\r\\n\\t\\t// $this->captura('codigo_condicion_entrega','varchar');\\r\\n\\t\\t// $this->captura('codigo_forma_pago','varchar');\\r\\n\\t\\t// $this->captura('codigo_modo_envio','varchar');\\r\\n\\t\\t// $this->captura('codigo_puntos_entrega','varchar');\\r\\n\\t\\t// $this->captura('codigo_tipo_transaccion','varchar');\\r\\n\\t\\t// $this->captura('codigo_orden_destino','varchar');\\r\\n\\t\\t$this->captura('tipo_evaluacion','varchar');\\r\\n\\t\\t$this->captura('id_proveedor_contacto','int4');\\r\\n\\t\\t$this->captura('desc_contacto','varchar');\\r\\n\\r\\n\\t\\t//Ejecuta la instruccion\\r\\n\\t\\t$this->armarConsulta();\\r\\n\\t\\t$this->ejecutarConsulta();\\r\\n\\t\\t//Devuelve la respuesta\\r\\n\\t\\treturn $this->respuesta;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a84d2c10331294ca9a48103af7d7c003\",\n \"score\": \"0.5407112\",\n \"text\": \"public function filtrosConsultaCorreosPadres() \\n {\\n try { \\n $content = trim(file_get_contents(\\\"php://input\\\")); \\n $decoded = json_decode($content, true); \\n\\n $dbm = new DbmControlescolar($this->get(\\\"db_manager\\\")->getEntityManager()); \\n $ciclo = $dbm->getRepositoriosById('Ciclo', 'activo', 1);\\n $nivel = $dbm->getRepositoriosById('Nivel', 'activo', 1);\\n $semestre = $dbm->getRepositoriosById('CeSemestre', 'activo', 1);\\n $grado = $dbm->getRepositoriosById('Grado', 'activo', 1); \\n $grupo = $dbm->getRepositoriosById('CeGrupo', 'tipogrupoid', 1);\\n \\n return Api::Ok(\\\"Filtros\\\",\\n array(\\n \\\"ciclo\\\" => $ciclo,\\n \\\"grado\\\" => $grado,\\n \\\"nivel\\\" => $nivel,\\n \\\"semestre\\\" => $semestre,\\n \\\"grupo\\\" => $grupo \\n ));\\n } catch (\\\\Exception $e) {\\n return Api::Error(Response::HTTP_BAD_REQUEST, $e->getMessage()); \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27c289df5d1d5db0c2c54048bfe81f1f\",\n \"score\": \"0.54047674\",\n \"text\": \"function reportePreOrdenCompra()\\n {\\n\\n $this->procedimiento = 'adq.f_solicitud_sel';\\n $this->transaccion = 'ADQ_SOLOC_REP';\\n $this->tipo_procedimiento = 'SEL';\\n $this->setCount(false);\\n\\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\\n $this->setParametro('id_proveedor', 'id_proveedor', 'int4');\\n $this->captura('desc_proveedor', 'varchar');\\n $this->captura('id_persona', 'int4');\\n $this->captura('dir_persona', 'varchar');\\n $this->captura('telf1_persona', 'varchar');\\n $this->captura('telf2_persona', 'varchar');\\n $this->captura('cel_persona', 'varchar');\\n $this->captura('correo_persona', 'varchar');\\n $this->captura('id_institucion', 'int4');\\n $this->captura('dir_institucion', 'varchar');\\n $this->captura('telf1_institucion', 'varchar');\\n $this->captura('telf2_institucion', 'varchar');\\n $this->captura('cel_institucion', 'varchar');\\n $this->captura('email_institucion', 'varchar');\\n $this->captura('fax_institucion', 'varchar');\\n $this->captura('lugar_entrega', 'varchar');\\n $this->captura('tipo', 'varchar');\\n $this->captura('moneda', 'varchar');\\n $this->captura('codigo_moneda', 'varchar');\\n $this->captura('num_tramite', 'varchar');\\n\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n //var_dump($this->respuesta); exit;\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1559c56cd2cb521a00accbd12eaedf5d\",\n \"score\": \"0.54030406\",\n \"text\": \"public function actionCotizarV2(){\\n $request = Yii::$app->request;\\n $params = $request->bodyParams;\\n\\n $tipoPaquete = $request->getBodyParam(\\\"tipo_paquete\\\");\\n\\n if(!$tipoPaquete){\\n throw new HttpException(500, \\\"No se envio el tipo de paquete\\\");\\n }\\n $cotizacion = new CotizacionRequest();\\n $cotizacion->origenCP = $request->getBodyParam(\\\"cp_from\\\");\\n $cotizacion->origenCountry = $request->getBodyParam(\\\"country_code_from\\\");\\n $cotizacion->origenStateCode = $request->getBodyParam(\\\"state_code_from\\\");\\n\\n $cotizacion->destinoCP = $request->getBodyParam(\\\"cp_to\\\");\\n $cotizacion->destinoCountry = $request->getBodyParam(\\\"country_code_to\\\");\\n $cotizacion->destinoStateCode = $request->getBodyParam(\\\"state_code_to\\\");\\n\\n //Fecha de solicitud de envio o recoleccion\\n $cotizacion->solicitaPickup = $request->getBodyParam(\\\"b_requiere_recoleccion\\\");\\n if($request->getBodyParam(\\\"fch_recoleccion\\\") != null){\\n $cotizacion->fecha = $request->getBodyParam(\\\"fch_recoleccion\\\");\\n }else{\\n $cotizacion->fecha = Calendario::getFechaActualMasDias(1); //Si no indica la fecha, le agrega 1 día para el envio\\n }\\n\\n //Uso de seguro del envío\\n if($request->getBodyParam(\\\"num_monto_seguro\\\") != null){\\n $cotizacion->montoSeguro = $request->getBodyParam(\\\"num_monto_seguro\\\");\\n $cotizacion->hasSeguro = true;\\n }\\n \\n\\n if(strtoupper($tipoPaquete)==\\\"SOBRE\\\"){\\n $cotizacion->isPaquete = false;\\n $dimenSobre = $request->getBodyParam(\\\"dimensiones_sobre\\\");\\n $cotizacion->addSobre($dimenSobre[\\\"num_peso\\\"]/1000);\\n }else{\\n $cotizacion->isPaquete = true;\\n $paquetesRequest = $request->getBodyParam(\\\"dimensiones_paquete\\\");\\n \\n foreach($paquetesRequest as $paquete){\\n $cotizacion->addPaqueteElementos($paquete[\\\"num_alto\\\"],$paquete[\\\"num_ancho\\\"],$paquete[\\\"num_largo\\\"],$paquete[\\\"num_peso\\\"]);\\n }\\n }\\n\\n\\n //Llama al servicio de cotización pertinente\\n if($cotizacion->isPaquete){\\n $cotizador = new CotizadorPaquete();\\n return $cotizador->realizaCotizacion($cotizacion);\\n }else{\\n $cotizador = new CotizadorSobre();\\n return $cotizador->realizaCotizacion($cotizacion);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4818e5f19dbf03a85aee6f7518ad7543\",\n \"score\": \"0.5400881\",\n \"text\": \"static public function ctrRegistroBitacoraAgregar(){\\r\\n\\r\\n\\t\\tif (isset($_POST[\\\"idPedido\\\"])) {\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t$tabla = \\\"bitacora\\\";\\r\\n\\r\\n\\t\\t\\t$datos = array(\\\"usuario\\\" => $_SESSION['nombre'],\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t \\\"perfil\\\" => $_SESSION['perfil'],\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t \\\"accion\\\" => 'Seguimiento de Pedido Laboratorio',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t \\\"folio\\\" => $_POST[\\\"idPedido\\\"]);\\r\\n\\r\\n\\t\\t\\t$respuesta = ModeloLaboratorio::mdlRegistroBitacoraAgregar($tabla, $datos);\\r\\n\\r\\n\\t\\t\\treturn $respuesta;\\r\\n\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3d21bed8c501b8a0ea7c4ca02d445d6\",\n \"score\": \"0.53993607\",\n \"text\": \"function anteriorEstadoCaja(){\\n $this->procedimiento='tes.ft_caja_ime';\\n $this->transaccion='TES_ANTECAJA_IME';\\n $this->tipo_procedimiento='IME';\\n \\n //Define los parametros para la funcion\\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\\n $this->setParametro('obs','obs','text');\\n $this->setParametro('json_procesos','json_procesos','text');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87535d6e77549678f29b4e7d8d72c7b3\",\n \"score\": \"0.5396186\",\n \"text\": \"function modificarObsPresupuestos()\\n {\\n $this->procedimiento = 'adq.f_solicitud_ime';\\n $this->transaccion = 'ADQ_MODOBS_MOD';\\n $this->tipo_procedimiento = 'IME';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\\n $this->setParametro('obs', 'obs', 'varchar');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96b732e9256b87e7a5fafe3b9c011b84\",\n \"score\": \"0.5395967\",\n \"text\": \"function enviarcorreo_cliente($t_nombres,$t_apellido1,$email,$creditcardtype,$last4carddigits){\\n \\n $mensaje = \\\" \\\".$t_nombres.\\\" \\\".$t_apellido1.\\\": ¡Bienvenido a REST911 servicio MEDICO EN ATENCION DOMICILIARIA! REST911 es la empresa líder en la ZONA NORTE DEL PAIS y esperamos que su experiencia de contratación en línea haya cumplido con sus expectativas, al igual que miles de familias han confiado en nosotros, es nuestro desafío atender sus requerimientos en atención oportuna que usted y su familia necesitan.\\n Sus servicios quedaran activados dentro de las próximas 24 HORAS Hábiles, adjuntamos Instructivo de uso del servicio.\\n Si tiene una emergencia debe llamarnos al 442 469 911 desde cualquier teléfono fijo o móvil o si lo prefiera al número 225738555. Nuestros profesionales de servicio están las 24 horas del día todo los días del año, listos para para ayudar de manera oportuna.\\n Si tiene cualquier duda o consulta con las características de su plan, puede escribirnos a sac@rest911.cl \\n Su pago inicial se aplicó conforme al Tipo de Plan seleccionado y en adelante sus pagos (mensual-trimestral-semestral ó anual) se aplicarán en modalidad automática para su comodidad y tranquilidad con cargo a su tarjeta \\\".$creditcardtype.\\\" número XXXX XXXX XXXX \\\".$last4carddigits.\\\" . \\n REST911 más de 10 años protegiendo a las familias y al cuidado de los trabajadores.\\n Por cualquier duda o consulta, no dude en contactarnos.\\n Saludos\\\";\\n\\n $destinatario = $email;\\n\\n $asunto = \\\"REST911 Bienvenida y Confirmación de Pago - Activación en 24 Horas Hábiles\\\";\\n\\n // Datos de la cuenta de correo utilizada para enviar vía SMTP\\n $smtpHost = \\\"pyme91.pymedns.net\\\"; // Dominio alternativo brindado en el email de alta \\n $smtpUsuario = \\\"autocontrato@rest911.cl\\\"; // Mi cuenta de correo\\n $smtpClave = \\\"%&auto&%web2020\\\"; // Mi contraseña\\n $correo = ('autocontrato@rest911.cl'); // Email desde donde se envia el correo\\n $nombre = \\\"REST911\\\";\\n \\n \\n \\n\\n\\n $mail = new PHPMailer();\\n $mail->IsSMTP();\\n $mail->SMTPAuth = true; // authentication enabled\\n $mail->Port = 465; \\n $mail->IsHTML(true); \\n $mail->CharSet = \\\"utf-8\\\";\\n $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for Gmail\\n \\n //adicional\\n //$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\\n //$mail->SMTPDebug = 2;\\n //$mail->Debugoutput = 'html';\\n \\n \\n // VALORES A MODIFICAR //\\n $mail->Host = $smtpHost; \\n $mail->Username = $smtpUsuario; \\n $mail->Password = $smtpClave;\\n\\n\\n $mail->From = ($correo); // Email desde donde envío el correo.\\n $mail->FromName = $nombre;\\n $mail->AddAddress($destinatario); // Esta es la dirección a donde enviamos los datos del formulario\\n //ADJUNTO\\n $url = 'https://planes.rest911.cl/docu/Rest911%20Instructivo%20Usuario%20Activacion%20Servicio.pdf';\\n $fichero = file_get_contents($url);\\n $mail->addStringAttachment($fichero, 'Rest911 Instructivo Usuario Activacion Servicio.pdf');\\n\\t\\n $mail->Subject = $asunto; // Este es el titulo del email.\\n $mensajeHtml = nl2br($mensaje);\\n \\n $mail->Body = \\\"\\n \\n\\t\\n \\n \\n
\\n

{$t_nombres} {$t_apellido1} :

\\n \\n ¡Bienvenido a REST911 servicio MEDICO EN ATENCION DOMICILIARIA! REST911 es la empresa líder en la ZONA NORTE DEL PAIS y esperamos que su experiencia de contratación en línea haya cumplido con sus expectativas, al igual que miles de familias han confiado en nosotros, es nuestro desafío atender sus requerimientos en atención oportuna que usted y su familia necesitan.

\\n \\n Sus servicios quedaran activados dentro de las próximas 24 HORAS Hábiles, adjuntamos Instructivo de uso del servicio.

\\n \\n Si tiene una emergencia debe llamarnos al 442 469 911 desde cualquier teléfono fijo o móvil o si lo prefiera al número 225738555. Nuestros profesionales de servicio están las 24 horas del día todo los días del año, listos para para ayudar de manera oportuna.
\\n \\n

Si tiene cualquier duda o consulta con las características de su plan, puede escribirnos a sac@rest911.cl

\\n \\n Su pago inicial se aplicó conforme al Tipo de Plan seleccionado y en adelante sus pagos (mensual-trimestral-semestral ó anual) se aplicarán en modalidad automática para su comodidad y tranquilidad con cargo a su tarjeta {$creditcardtype} número XXXX XXXX XXXX {$last4carddigits} .

\\n \\n REST911 más de 10 años protegiendo a las familias y al cuidado de los trabajadores.

\\n \\n Por cualquier duda o consulta, no dude en contactarnos.

\\n \\n Saludos
\\n REST911\\n
\\n\\t\\n \\n\\n \\n\\n
\\\"; // Texto del email en formato HTML\\n $mail->AltBody = \\\"{$mensaje} \\\\n\\\\n \\\"; // Texto sin formato HTML\\n // FIN - VALORES A MODIFICAR //\\n\\n $mail->SMTPOptions = array(\\n 'ssl' => array(\\n 'verify_peer' => false,\\n 'verify_peer_name' => false,\\n 'allow_self_signed' => true\\n )\\n );\\n \\n \\n \\n return($mail->Send());\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"771ebcfccb1ecdcd8f0c482458b148bf\",\n \"score\": \"0.5393932\",\n \"text\": \"public function ObtenerAcceso($Documento, $Clave)\\r\\n {\\r\\n try\\r\\n { \\r\\n $cn = Conexion::ObtenerConexion();\\r\\n $rs= $cn->query(\\\"CALL SPR_R_ObtenerAcceso('\\\" . $Documento . \\\"', '\\\" . $Clave . \\\"')\\\");\\r\\n $vecresultado = array(); // Recorremos el resultado de la consulta y lo almacenamos en el array\\r\\n while ($fila = $rs->fetch_row()) {\\r\\n array_push($vecresultado, $fila); \\r\\n }\\r\\n mysqli_free_result($rs);\\r\\n mysqli_close($cn);\\r\\n if ($vecresultado!= NULL)\\r\\n {\\r\\n $operario = new Operario(); \\r\\n $operario->setOperario_Id($vecresultado[0][0]); \\r\\n $operario->setNombres($vecresultado[0][1]);\\r\\n $operario->setApellidos($vecresultado[0][2]); \\r\\n $operario->setPerfil($vecresultado[0][3]);\\r\\n unset($vecresultado);\\r\\n return $operario;\\r\\n }\\r\\n else\\r\\n {\\r\\n return NULL;\\r\\n }\\r\\n }\\r\\n catch (Exception $ex)\\r\\n {\\r\\n echo $ex;\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2951e605cef32f3901b7147ae56fca8e\",\n \"score\": \"0.53844124\",\n \"text\": \"function Grabar_Bono_Regular($dpi,$monto,$moneda,$tcambio,$desc){\\n //instanciamos el objeto para generar la respuesta con ajax\\n $respuesta = new xajaxResponse();\\n $ClsPla = new ClsPlanillaAsignaciones();\\n //pasa a mayusculas\\n\\t\\t$desc = trim($desc);\\n\\t//--------\\n\\t//decodificaciones de tildes y Ñ's\\n\\t\\t$desc = utf8_encode($desc);\\n\\t\\t//--\\n\\t\\t$desc = utf8_decode($desc);\\n\\t//-------- \\n if($dpi !=\\\"\\\" && $desc !=\\\"\\\" && $monto != \\\"\\\" && $moneda != \\\"\\\" && $tcambio != \\\"\\\"){\\n\\t\\t//$respuesta->alert(\\\"$id\\\");\\n\\t\\t$cod = $ClsPla->max_base_bonificaciones($dpi);\\n\\t\\t$cod++;\\n\\t\\t$sql = $ClsPla->insert_base_bonificaciones($cod,$dpi,$monto,$moneda,$tcambio,$desc); /// Inserta\\n\\t\\t//$respuesta->alert(\\\"$sql\\\");\\n\\t\\t$rs = $ClsPla->exec_sql($sql);\\n\\t\\tif($rs == 1){\\n\\t\\t\\t$respuesta->script('swal(\\\"Excelente!\\\", \\\"Registros guardados satisfactoriamente!\\\", \\\"success\\\").then((value)=>{ window.location.reload(); });');\\n\\t\\t}else{\\n\\t\\t\\t$respuesta->script('swal(\\\"Error\\\", \\\"Error de transacci\\\\u00F3n...\\\", \\\"error\\\").then((value)=>{ cerrar(); });');\\n\\t\\t\\t$respuesta->script(\\\"document.getElementById('gra').className = 'btn btn-primary';\\\");\\n\\t\\t\\t$respuesta->script(\\\"document.getElementById('mod').className = 'btn btn-primary hidden';\\\");\\n\\t\\t}\\n\\t}\\n \\n return $respuesta;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e081773fc7935fbf79c87da3c355057\",\n \"score\": \"0.5382907\",\n \"text\": \"function cotizar($serviciosReferencias) {\\r\\n\\t\\r\\n\\t\\r\\n\\t$cadErrores = '';\\r\\n\\t$cad = 'tela';\\r\\n\\t$cad1 = 'resi';\\r\\n\\t$sistemaNormal = 0;\\r\\n\\t$sistemaDoble = 0;\\r\\n\\t$sistema = 1;\\r\\n\\t$idResiduo = 0;\\r\\n\\t\\r\\n\\t$idTela = array();\\r\\n\\t\\r\\n\\t$resTelas = $serviciosReferencias->traerTelas();\\r\\n\\t$resResiduos = $serviciosReferencias->traerResiduos();\\r\\n\\t\\r\\n\\t$idResiduo = $_POST['refresiduo'];\\r\\n\\r\\n\\t$refroles = $_POST['refroles'];\\r\\n\\tif ($refroles == 3) {\\r\\n\\t\\t$esRevendedor = 1;\\r\\n\\t} else {\\r\\n\\t\\t$esRevendedor = 0;\\r\\n\\t}\\r\\n\\r\\n\\t$sistema = $_POST['normal'];\\r\\n\\t\\r\\n\\t$idTela[] = $_POST['reftelas'];\\r\\n\\t$idTela[] = $_POST['reftelaopcional'];\\r\\n\\t\\r\\n\\t$ancho\\t=\\t(float)$_POST['ancho'] * 100;\\r\\n\\t$alto\\t=\\t(float)$_POST['alto'] * 100;\\r\\n\\t\\r\\n\\t\\r\\n\\t/*\\r\\n\\tif ((sizeof($idTela) < 2) and ($sistema == 2)) {\\r\\n\\t\\t$cadErrores .= \\\"_ Debe seleccionar el segundo Material
\\\"; \\r\\n\\t}\\r\\n\\t\\r\\n\\tif ((sizeof($idTela) > 2) and ($sistema == 2)) {\\r\\n\\t\\t$cadErrores .= \\\"_ Selecciono más de un Material
\\\"; \\r\\n\\t}\\r\\n\\t\\r\\n\\tif ((sizeof($idTela) > 1) and ($sistema == 1)) {\\r\\n\\t\\t$cadErrores .= \\\"_ Selecciono más de un Material
\\\"; \\r\\n\\t}\\r\\n\\tif (sizeof($idTela) < 1) {\\r\\n\\t\\t$cadErrores .= \\\"_ Debe seleccionar un Material
\\\"; \\r\\n\\t}\\r\\n\\t*/\\r\\n\\tif ($idResiduo == 0) {\\r\\n\\t\\t$cadErrores .= \\\"_ Debe seleccionar un Residuo
\\\"; \\r\\n\\t}\\r\\n\\t\\r\\n\\t\\r\\n\\t\\r\\n\\tif (($ancho == '') || ($ancho < 20)) {\\r\\n\\t\\t$cadErrores .= \\\"_ Debe cargar un acnho o el ancho a menor a las 20 centimetros
\\\"; \\r\\n\\t}\\r\\n\\t\\r\\n\\tif (($alto == '') || ($alto < 20)) {\\r\\n\\t\\t$cadErrores .= \\\"_ Debe cargar un alto o el alto a menor a las 20 centimetros
\\\"; \\r\\n\\t}\\r\\n\\t\\r\\n\\t\\r\\n\\tif ($cadErrores == '') {\\r\\n\\t\\t$total = $serviciosReferencias->cotizar($sistema, $idTela, $idResiduo, $ancho, $alto, $esRevendedor);\\r\\n\\t\\techo $total;\\r\\n\\t} else {\\r\\n\\t\\techo $cadErrores;\\t\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff8eac78c5557ba590b5540374800f67\",\n \"score\": \"0.5376894\",\n \"text\": \"function CallAPI($method, $url, $data = false)\\n{\\n $curl = curlemu_init();\\n\\n switch ($method){\\n case \\\"POST\\\":\\n curlemu_setopt($curl, CURLOPT_POST, 1);\\n if ($data){\\n curlemu_setopt($curl, CURLOPT_POSTFIELDS, $data);\\n }\\n break;\\n case \\\"PUT\\\":\\n curlemu_setopt($curl, CURLOPT_PUT, 1);\\n break;\\n default:\\n if ($data)\\n $url = sprintf(\\\"%s?%s\\\", $url, http_build_query($data));\\n }\\n\\n // Optional Authentication:\\n curlemu_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\\n // curlemu_setopt($curl, CURLOPT_PORT, 81);\\n curlemu_setopt($curl, CURLOPT_URL, $url);\\n curlemu_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\\n\\n $result = curlemu_exec($curl);\\n\\n if(!$result){\\n var_dump(curlemu_error($curl));\\n }\\n curlemu_close($curl);\\n return $result;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f4e2ca7025fa3b7963d20e126b5eacf\",\n \"score\": \"0.53768104\",\n \"text\": \"function __construct($idInventario=\\\"\\\",$serial=\\\"\\\",$idDescripcion=\\\"\\\",$idMarca=\\\"\\\",$idModelo=\\\"\\\",$fru=\\\"\\\",$productNumber=\\\"\\\",$spareNumber=\\\"\\\",$ct=\\\"\\\",$idPedido=\\\"\\\",\\n\\t$fechaInicio=\\\"\\\",$fechaFinal=\\\"\\\",$disponible=0,$codigoSap=\\\"\\\",$idInventarioUsuario=\\\"\\\",$ficha=\\\"9999999\\\",$statusActual=\\\"\\\",$fechaAsociacion=\\\"\\\",\\n\\t$idInventarioPropiedad=\\\"\\\",$idUss=\\\"\\\",$idEstado=\\\"\\\",$idInventarioUbicacion=\\\"\\\",$idDepartamento=\\\"\\\",$idSitio=\\\"\\\",$especifico=\\\"\\\",$SeviceTag=\\\"\\\",$ExpressService=\\\"\\\") {\\n\\t\\t$this->idInventario;\\n\\t\\t$this->serial=strtoupper($serial);\\n\\t\\t$this->idDescripcion=$idDescripcion;\\n\\t\\t$this->idMarca=$idMarca;\\n\\t\\t$this->idModelo=$idModelo;\\n\\t\\t$this->fru=strtoupper($fru);\\n\\t\\t//*********************************\\n\\t\\t//*********************************\\n\\t\\t$this->ServiceTag=strtoupper($SeviceTag);\\n\\t\\t$this->ExpressService=strtoupper($ExpressService);\\n\\t\\t//*********************************\\n\\t\\t//*********************************\\n\\t\\t$this->productNumber=strtoupper($productNumber);\\n\\t\\t$this->spareNumber=strtoupper($spareNumber);\\n\\t\\t$this->ct=strtoupper($ct);\\n\\t\\t$this->idPedido=$idPedido;\\n\\t\\t$this->fechaInicio=substr($fechaInicio,6,6).\\\"-\\\".substr($fechaInicio,3,2).\\\"-\\\".substr($fechaInicio,0,2);\\n\\t\\t$this->fechaFinal=substr($fechaFinal,6,6).\\\"-\\\".substr($fechaFinal,3,2).\\\"-\\\".substr($fechaFinal,0,2);\\n\\t\\t$this->disponible=$disponible;\\n\\t\\t$this->codigoSap=$codigoSap;\\n\\t\\t$this->idInventarioUsuario=$idInventarioUsuario;\\n\\t\\t$this->ficha=$ficha;\\n\\t\\t$this->statusActual=$statusActual;\\n\\t\\t$this->fechaAsociacion=getdate();\\n\\t\\t$this->fechaAsociacion=$this->fechaAsociacion[year].\\\"-\\\".$this->fechaAsociacion[mon].\\\"-\\\".$this->fechaAsociacion[mday].\\\" \\\"\\n\\t\\t.$this->fechaAsociacion[hours].\\\":\\\".$this->fechaAsociacion[minutes].\\\":\\\".$this->fechaAsociacion[seconds];\\n\\t\\t\\n\\t\\t$this->idInventarioPropiedad=$idInventarioPropiedad;\\n\\t\\t$this->idUss=$idUss;\\n\\t\\t$this->idEstado=$idEstado;\\n\\t\\t$this->idInventarioUbicacion=$idInventarioUbicacion;\\n\\t\\t$this->idDepartamento=$idDepartamento;\\n\\t\\t$this->idSitio=$idSitio;\\n\\t\\t$this->especifico=$especifico;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01f422cb8104218b481b577e5bd3dcd1\",\n \"score\": \"0.53738475\",\n \"text\": \"public function indexAPIRM()\\n {\\n $response = Http::get('https://datosabiertos.regiondemurcia.es/catalogo/api/action//datastore_search?resource_id=52dd8435-46aa-495e-bd2b-703263e576e7&limit=5&sort=DESCRIPCIONLOCALIDAD desc');\\n \\n return response()->json(json_decode($response));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92554adac812357aab650da0cbe446cc\",\n \"score\": \"0.5371886\",\n \"text\": \"public function obtener_argumentos(Request $request)\\n {\\n $validator = Validator::make($request->all(), [ \\n 'archivo_id' => 'required',\\n 'num_pagina' => 'required',\\n 'motivo' => 'required',\\n 'exacto' => 'required',\\n 'pos_pagina' => 'required',\\n 'apariencia'=> 'required',\\n ]);\\n\\n if ($validator->fails()) {\\n return response()->json(['message'=>$validator->errors()], 500);\\n }\\n\\n $archivo = Archivo::find($request->archivo_id);\\n if ($archivo == null) {\\n return response()->json(['message'=>\\\"No se encontro el archivo!\\\"], 500);\\n }\\n\\n if(!Storage::disk($this->disco)->exists($archivo->ruta)) {\\n return response()->json(['message'=>\\\"No se encontro el archivo (FILESYSTEM)!\\\"], 500);\\n }\\n\\n $reniec_id = config('app.reniec_id');\\n $reniec_secret = config('app.reniec_secret');\\n\\n if ($reniec_id == '' | $reniec_secret == '') {\\n return response()->json(['message'=>\\\"No se encontraron las claves reniec!\\\"], 500);\\n }\\n\\n $recursos = new Recursos;\\n $ubicacion = $recursos->obtener_pagina($archivo, $request->num_pagina, $request->exacto, $request->pos_pagina, $request->apariencia);\\n \\n $parametros ='{\\n \\\"app\\\":\\\"pdf\\\",\\n \\\"fileUploadUrl\\\":\\\"'.url('json/firma/'.$archivo->id).'/cargar\\\",\\n \\\"reason\\\":\\\"'.$request->motivo.'\\\",\\n \\\"type\\\":\\\"W\\\",\\n \\\"clientId\\\":\\\"'.$reniec_id.'\\\",\\n \\\"clientSecret\\\":\\\"'.$reniec_secret.'\\\",\\n \\\"dcfilter\\\":\\\".*FIR.*|.*FAU.*\\\",\\n \\\"fileDownloadUrl\\\":\\\"'.url('json/firma/'.$archivo->codigo).'/descargar\\\",\\n \\\"fileDownloadLogoUrl\\\":\\\"\\\",\\n \\\"posx\\\":\\\"'.$ubicacion[\\\"x\\\"].'\\\",\\n \\\"posy\\\":\\\"'.$ubicacion[\\\"y\\\"].'\\\",\\n \\\"outputFile\\\":\\\"'.pathinfo($archivo->ruta, PATHINFO_FILENAME).'[R].pdf\\\",\\n \\\"protocol\\\":\\\"T\\\",\\n \\\"contentFile\\\":\\\"'.$archivo->nombre_real.'\\\",\\n \\\"stampAppearanceId\\\":\\\"'.$request->apariencia.'\\\",\\n \\\"isSignatureVisible\\\":\\\"true\\\",\\n \\\"idFile\\\":\\\"archivo_subir\\\",\\n \\\"fileDownloadStampUrl\\\":\\\"'.asset('img/unamad_firma.png').'\\\",\\n \\\"pageNumber\\\":\\\"'.$ubicacion[\\\"pagina\\\"].'\\\",\\n \\\"maxFileSize\\\":\\\"15728640\\\",\\n \\\"fontSize\\\":\\\"7\\\",\\t\\t\\t\\n \\\"timestamp\\\":\\\"false\\\"\\n }';\\n\\n //error_log('ENVIO');\\n return base64_encode($parametros);\\n //return $parametros;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6601560bad91df6a2d00bebb26fa7148\",\n \"score\": \"0.537026\",\n \"text\": \"function cl_clientescontato() { \\n //classes dos rotulos dos campos\\n $this->rotulo = new rotulo(\\\"clientescontato\\\"); \\n $this->pagina_retorno = basename($GLOBALS[\\\"HTTP_SERVER_VARS\\\"][\\\"PHP_SELF\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f119dcd397c28f84f5ea609a182607b6\",\n \"score\": \"0.53682065\",\n \"text\": \"public function apiAction()\\n {\\n parent::disableViewAndLayout();\\n\\n //$apiID : kolerasi ke fn cuacaID, cuacaGlobal, prakGel di controller ini\\n $apiID = $this->_request->getParam('id', null);\\n\\n $data = 'Tidak ada data'; //\\n //jangan kosong\\n if( !is_null($apiID) ){\\n $data = self::$apiID();\\n }\\n\\n //note : callback data html saja\\n //karena data di bmkg kadang2 mengandung karakter yg tidak valid\\n //ketika dipakai di format json / xml callback\\n echo json_encode($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c404dfa83b126601d244d87b75b42ac0\",\n \"score\": \"0.53654754\",\n \"text\": \"function getDatosSolicitud()\\n {\\n $this->procedimiento = 'adq.f_solicitud_sel';\\n $this->transaccion = 'ADQ_GET_DAT_SOL_SEL';\\n $this->tipo_procedimiento = 'SEL';//tipo de transaccion\\n\\n $this->setCount(false);\\n //$this->setParametro('id_solicitud','id_solicitud','int4');\\n\\n\\n //Definicion de la lista del resultado del query\\n $this->captura('id_solicitud', 'integer');\\n $this->captura('num_tramite', 'varchar');\\n $this->captura('id_depto', 'integer');\\n $this->captura('instruc_rpc', 'varchar');\\n\\n\\n $this->armarConsulta();//echo $this->consulta; exit;\\n $this->ejecutarConsulta();\\n\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9439b9a0d17a8086604649528e7b87fb\",\n \"score\": \"0.53648096\",\n \"text\": \"public function filtrarConsultaCorreosPadres() \\n {\\n try { \\n $content = trim(file_get_contents(\\\"php://input\\\")); \\n $decoded = json_decode($content, true); \\n $decoded = array_filter($decoded); \\n\\n $dbm = new DbmControlescolar($this->get(\\\"db_manager\\\")->getEntityManager()); \\n if($decoded['agruparfamilia']) {\\n $result = $dbm->ObtenerCorreosPadresFamilia($decoded);\\n } else {\\n $result = $dbm->ObtenerCorreosPadresAlumnos($decoded);\\n } \\n\\n return Api::Ok(\\\"Correos #\\\" . count($result), $result);\\n } catch (\\\\Exception $e) {\\n return Api::Error(Response::HTTP_BAD_REQUEST, $e->getMessage()); \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e5c0d04dda5f8614d4890d1ccdd7067\",\n \"score\": \"0.5364721\",\n \"text\": \"function cargaAdmin($datos)\\n{\\n global $servidor;\\n global $base;\\n global $usuarioBD;\\n global $pass;\\n global $diaSemana;\\n $stopFlag = false; //Variable para controlar el ciclo de asignaciones.\\n $rawAsignaciones = array(); //Variable para guardar las asignaciones filtradas, sin procesamiento.\\n $finalAsignaciones = array(); //Variable para guardar las asignaciones procesadas y listas para cargar al sistema.\\n $errorAsignacion=array();\\n $estadoCarga = array(); //Variable para guardar el \\\"log\\\" de la carga de las asignaciones.\\n $toProcess = json_decode($datos, true);\\n $getErrors= json_decode($_POST['errors'], true);\\n $responsable = \\\"NULL\\\";\\n if (isset($_POST['responsible'])) {\\n $responsable = $_POST['responsible'];\\n }\\n # TODO: Camios para nueva instancia.\\n # Elementos estaticos:\\n # idServicio = ID del servicio que pertenece a Estancia en Campus\\n # idGrupo = ID del grupo de Administrativos\\n # idEspacio = ID del espacio con nombre UVM Campus Gdl Sur\\n\\n //Recibe los errores encontrados en el parserFIGO\\n foreach ($getErrors as $error) {\\n $error = array_map('utf8_decode', $error);\\n $error = array_map('trim', $error);\\n $tempE = array(\\\"nss\\\" => $error['nss'], \\\"nombre\\\" => $error['nombre'], \\\"ap\\\" => $error['apellidoP'], \\\"am\\\" => $error['apellidoM'], \\\"detalle\\\" => $error['detalle'], \\\"espacio\\\" => $error['espacio'], \\\"fechaInicio\\\" => $error['fechaInicio'], \\\"fechaFin\\\" => $error['fechaFin'], \\\"periodo\\\" => $error['periodo'], \\\"lunes\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"martes\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"miercoles\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"jueves\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"viernes\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"sabado\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"domingo\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"tipo_error\\\" => $error['tipo_error']);\\n for ($x = 0; $x < count($diaSemana); $x++) {\\n if (!empty($error[$diaSemana[$x]])) {\\n $timeArray = explode(\\\" \\\", $error[$diaSemana[$x]], 2);\\n $tempE[$diaSemana[$x]]['hi'] = $timeArray[0];\\n $tempE[$diaSemana[$x]]['hf'] = $timeArray[1];\\n }\\n }\\n //Guarda errores recibidos del parserFIGPO\\n array_push($errorAsignacion, $tempE);\\n }\\n //Modificar los datos de entrada del POST\\n foreach ($toProcess as $data) {\\n $data = array_map('utf8_decode', $data);\\n $data = array_map('trim', $data);\\n //$pattern=\\\"/^([0-1][0-9]|[2][0-3])[\\\\:]([0-5][0-9])$/\\\";//Expresion regular para validar la hora de inicio y fin\\n $erroresHorario=0;\\n $temp = array(\\\"nss\\\" => $data['nss'], \\\"nombre\\\" => $data['nombre'], \\\"ap\\\" => $data['apellidoP'], \\\"am\\\" => $data['apellidoM'], \\\"detalle\\\" => $data['detalle'], \\\"espacio\\\" => $data['espacio'], \\\"fechaInicio\\\" => $data['fechaInicio'], \\\"fechaFin\\\" => $data['fechaFin'], \\\"periodo\\\" => $data['periodo'], \\\"lunes\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"martes\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"miercoles\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"jueves\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"viernes\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"sabado\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"domingo\\\" => array(\\\"hi\\\" => \\\"\\\", \\\"hf\\\" => \\\"\\\"), \\\"tipo_error\\\" => $data['tipo_error']);\\n //Validar Horario \\n for ($x = 0; $x < count($diaSemana); $x++) {\\n if (!empty($data[$diaSemana[$x]])) {\\n $timeArray = explode(\\\" \\\", $data[$diaSemana[$x]], 3);\\n if (empty($timeArray[0])) {\\n $temp['tipo_error'] .= \\\"Error en la captura de horario de \\\". $diaSemana[$x] . \\\", \\\";\\n $temp[$diaSemana[$x]]['hi'] = $timeArray[0];\\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\\n $erroresHorario++;\\n continue;\\n } else {\\n $temp[$diaSemana[$x]]['hi'] = $timeArray[0];\\n if (empty($timeArray[1])) {\\n $temp['tipo_error'] .= \\\"Error en la captura de horario de \\\". $diaSemana[$x] . \\\", \\\";\\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\\n $erroresHorario++;\\n continue;\\n } else {\\n $temp[$diaSemana[$x]]['hf'] = $timeArray[1];\\n if (strtotime($timeArray[0]) > strtotime($timeArray[1])) {\\n $temp['tipo_error'].=\\\"\\\".$diaSemana[$x]. \\\"La hora de entrada es mayor a la hora de salida, \\\";\\n $erroresHorario++;\\n continue;\\n }\\n }\\n }\\n }\\n }\\n //Validar formato de fecha\\n $tempFI = explode(\\\"/\\\", $temp['fechaInicio'], 3);\\n $tempFF = explode(\\\"/\\\", $temp['fechaFin'], 3);\\n $eFI=true;\\n $eFF=true;\\n if (!checkdate($tempFI[0], $tempFI[1], $tempFI[2])) {\\n $temp['Tipo_error'] .= \\\"Formato de Fecha de Inicio incorrecto, \\\";\\n $eFI=false;\\n }\\n if (!checkdate($tempFF[0], $tempFF[1], $tempFF[2])) {\\n $eFF=false;\\n $temp['Tipo_error'] .= \\\"Formato de Fecha de Fin incorrecto, \\\";\\n }\\n if ($erroresHorario!=0 || $eFI==false || $eFF==false ) {\\n array_push($errorAsignacion, $temp);\\n } else {\\n array_push($finalAsignaciones, $temp);\\n }\\n //Gardar en la variable arrayAsignaciones los registros que pasaron el filtro con la informacion que nos interesa.\\n //array_push($finalAsignaciones, $temp);\\n }\\n if (count($errorAsignacion)!=0) {\\n echo json_encode(array(\\\"s\\\" =>0, \\\"m\\\" => \\\"Error al cargar FIGPO, el archivo contiene errores\\\", \\\"d\\\" => $errorAsignacion));\\n } else {\\n if (!$con = mysqli_connect($servidor, $usuarioBD, $pass, $base)) {\\n die(\\\"Error de conexion\\\");\\n } else {\\n //$rows=count($finalAsignaciones);\\n foreach ($finalAsignaciones as $key => $asignacion) {\\n $idPersona = 0;\\n $idAsignacion = 0;\\n $estadoTemp = \\\"\\\";\\n ////////////////////////////////////////////////////////////////////////////////Verificar si existe una persona\\n ////Si hay concidencia en la busqueda de la persona por NSS\\n $sql = \\\" SELECT ID FROM personas WHERE NSS = '{$asignacion['nss']}' \\\";\\n if ($personaNSS = mysqli_query($con, $sql)) {\\n //SI la persona ya existe => Actualizar el campo Activo a 1\\n //ELSE => Insertar en la base de datos.\\n if (mysqli_num_rows($personaNSS) != 0) {\\n $estadoTemp .= \\\"Persona: \\\" . $asignacion['nss'] . \\\" ya existe
\\\";\\n while ($row = mysqli_fetch_array($personaNSS)) {\\n mysqli_query($con, \\\"UPDATE personas SET Activo = 1, Detalle = '{$asignacion['detalle']}' WHERE ID = '$row[ID]' \\\");\\n $idPersona = $row['ID'];\\n }\\n } else {\\n $sql = \\\" INSERT INTO personas (NSS, Nombre, ApellidoP, ApellidoM, Detalle) VALUES ('{$asignacion['nss']}', '{$asignacion['nombre']}', '{$asignacion['am']}', '{$asignacion['ap']}', '{$asignacion['detalle']}')\\\";\\n if (mysqli_query($con, $sql)) {\\n if ($idPersona = mysqli_insert_id($con)) {\\n $estadoTemp .= \\\"Nueva Persona Resgistrada: \\\" . $asignacion['nss'] . \\\"
\\\";\\n $sql = \\\" INSERT INTO identificador (ID_Persona, ID1) VALUES ('$idPersona', '{$asignacion['nss']}') \\\";\\n if (mysqli_query($con, $sql)) {\\n $estadoTemp .= \\\"&emsp;Identificador registrado correctamente
\\\";\\n } else {\\n $estadoTemp .= \\\"&emsp;Error al registrar Identificador
\\\";\\n }\\n } else {\\n $estadoTemp .= \\\"Error al tratar de insertar nueva persona
\\\";\\n }\\n } else {\\n $estadoTemp .= \\\"Error al tratar de insertar nueva persona
\\\";\\n }\\n }\\n\\n ////Registra Area en la tabla servicios.\\n $sql=\\\"SELECT ID FROM servicios where Titulo='{$asignacion['detalle']}' \\\";\\n if ($result = mysqli_query($con,$sql)) {\\n if (mysqli_num_rows($result)!=0) {\\n $service = mysqli_fetch_assoc($result);\\n $service = (int) $service['ID'];\\n $estadoTemp .= \\\"Servicio \\\".$asignacion['detalle']. \\\" ya existe
\\\";\\n } else {\\n $sql=\\\"INSERT INTO servicios (Codigo, Titulo, ID_Tipo_Servicio, Departamento, Nivel, Activo) VALUES ('AD', '{$asignacion['detalle']}', 1, 'Administrativo', 'AD', 1)\\\";\\n if (mysqli_query($con,$sql)){\\n $sql=\\\"SELECT ID FROM servicios where Titulo='{$asignacion['detalle']}' \\\";\\n $service=mysqli_fetch_assoc(mysqli_query($con,$sql));\\n $service = (int) $service['ID'];\\n $estadoTemp .= \\\"Nuevo servicio registrado: [\\\".$asignacion['detalle'].\\\"]\\\";\\n } else {\\n $estadoTemp .= \\\"Error al registrar nuevo servicio\\\";\\n }\\n }\\n } else {\\n $estadoTemp .= \\\"Error al buscar servicio\\\";\\n }\\n ////Revisar si existe un espacio registrado\\n $sql = \\\"SELECT ID FROM espacios WHERE Nombre='{$asignacion['espacio']}' \\\";\\n if ($result= mysqli_query($con, $sql)) {\\n if (mysqli_num_rows($result)==1){\\n $place=mysqli_fetch_assoc($result);\\n $place= (int) $place['ID'];\\n $estadoTemp.= \\\"Ya existe el espacio \\\".$asignacion['espacio'].\\\".\\\";\\n } else {\\n $sql = \\\"INSERT INTO espacios (Nombre, Capacidad, ID_Tipo, Activo) VALUES ('{$asignacion['espacio']}', 0, 6, 1)\\\";\\n if (mysqli_query($con,$sql)) {\\n $sql=\\\"SELECT ID FROM espacios WHERE Nombre='{$asignacion['espacio']}' \\\";\\n $place=mysqli_fetch_assoc(mysqli_query($con, $sql));\\n $place= (int) $place['ID'];\\n $estadoTemp .= \\\"Nuevo espacio \\\".$asignacion['espacio'].\\\" registrado\\\";\\n } else {\\n $estadoTemp .= \\\"Error al registrar el espacio \\\".$asignacion['espacio'].\\\".\\\";\\n }\\n }\\n } else {\\n $estadoTemp.= \\\"Error en la busqueda de espacio\\\";\\n }\\n ////Revisar si existen el rol 'Administrativo' registrado\\n $sql = \\\"SELECT ID FROM roles WHERE Nombre='Administrativo'\\\";\\n if ($result= mysqli_query($con, $sql)) {\\n if (mysqli_num_rows($result)==1){\\n $ID = mysqli_fetch_assoc($result);\\n $ID = (int) $ID['ID'];\\n $estadoTemp .= \\\"Ya existe rol \\\".$ID .\\\".\\\";\\n } else{\\n $sql= \\\"INSERT INTO roles (Nombre, Activo) VALUES ('Administrativo', 1)\\\";\\n if (mysqli_query($con, $sql)) {\\n $sql = \\\"SELECT ID FROM roles WHERE Nombre='Administrativo'\\\";\\n $ID = mysqli_fetch_assoc(mysqli_query($con,$sql));\\n $ID = (int) $ID['ID'];\\n $estadoTemp .= \\\"Rol 'Administrativo' registrado correctamente\\\";\\n } else {\\n $estadoTemp .= \\\"Error al registar Rol 'Administrativo'\\\";\\n }\\n }\\n } else {\\n $estadoTemp .= \\\"Error al buscar rol 'Administrativo'\\\";\\n }\\n ////Revisar si existe un rol asignado para un Administrativo\\n $sql = \\\" SELECT * FROM asignacion_roles WHERE ID_Persona = '$idPersona' \\\";\\n if ($rolAsignado = mysqli_query($con, $sql)) {\\n if (mysqli_num_rows($rolAsignado) == 0) {\\n $sql = \\\" INSERT INTO asignacion_roles (ID_Rol, ID_Persona) VALUES ('$ID', '$idPersona') \\\";\\n if (mysqli_query($con, $sql)) {\\n $estadoTemp .= \\\"&emsp;Rol registrado correctamente
\\\";\\n } else {\\n $estadoTemp .= \\\"&emsp;Error al registrar Rol
\\\";\\n }\\n } else {\\n $sql = \\\" UPDATE asignacion_roles SET ID_Rol='$ID' WHERE ID_Persona='$idPersona' \\\";\\n if (mysqli_query($con, $sql)) {\\n $estadoTemp .= \\\"&emsp;Rol actualizado
\\\";\\n } else {\\n $estadoTemp .= \\\"&emsp;Error al actualizar Rol
\\\";\\n }\\n }\\n } else {\\n $estadoTemp .= \\\"&emsp;Error al buscar Roles
\\\";\\n }\\n ////Revisar si existe grupo 'Administrativos'\\n $sql=\\\"SELECT ID FROM grupos where Nombre='Administrativos'\\\";\\n if ($result=mysqli_query($con,$sql)) {\\n if (mysqli_num_rows($result)==1) {\\n $group = mysqli_fetch_assoc($result);\\n $group = (int) $group['ID'];\\n $estadoTemp .= \\\"Grupo 'Administrativos' ya existe\\\";\\n } else {\\n $sql=\\\"INSERT INTO grupos (Nombre, ID_Rol, Activo) VALUES ('Administrativos', '$ID', 1)\\\";\\n if (mysqli_query($con,$sql)) {\\n $sql = \\\"SELECT ID FROM grupos where Nombre='Administrativos'\\\";\\n $group = mysqli_fetch_assoc(mysqli_query($con, $sql));\\n $group = (int) $group['ID'];\\n $estadoTemp .= \\\"Grupo 'Administrativos' registrado correctamente\\\";\\n } else {\\n $estadoTemp .= \\\"Error al registrar grupo\\\";\\n }\\n }\\n } else {\\n $estadoTemp .= \\\"Error al buscar grupo 'Administrativos'\\\";\\n }\\n\\n } else {\\n $estadoTemp .= \\\"&emsp;Error al buscar Persona por NSS
\\\";\\n }\\n /////////////////////////////////////////////////////////////Registrar asignaciones\\n ////Verificar que la fecha de inicio y fin esten en formato Ingles.\\n if ((bool)strtotime($asignacion['fechaInicio']) && (bool)strtotime($asignacion['fechaInicio'])) {\\n $tempFI = explode(\\\"/\\\", $asignacion['fechaInicio'], 3);\\n $tempFF = explode(\\\"/\\\", $asignacion['fechaFin'], 3);\\n if (checkdate($tempFI[0], $tempFI[1], $tempFI[2]) && checkdate($tempFF[0], $tempFF[1], $tempFF[2])) {\\n ////Verificar si existe una asignacion\\n $sql = \\\" SELECT asig.ID FROM asignaciones AS asig\\n INNER JOIN servicios AS ser ON asig.ID_Servicio = ser.ID\\n INNER JOIN personas AS per on asig.ID_Persona = per.ID\\n WHERE ser.ID = '$service' AND per.NSS = '{$asignacion['nss']}'\\n AND Periodo = '{$asignacion['periodo']}'\\n AND FechaInicio = STR_TO_DATE('{$asignacion['fechaInicio']}', '%m/%d/%Y')\\n AND FechaFin = STR_TO_DATE('{$asignacion['fechaFin']}', '%m/%d/%Y') \\\";\\n if ($asignation = mysqli_query($con, $sql)) {\\n if (mysqli_num_rows($asignation) != 0) {\\n $estadoTemp .= \\\"Asignación ya registrada
\\\";\\n } else {\\n ////Registrar nueva asignacion\\n $sql = \\\"INSERT INTO asignaciones (ID_Grupo, ID_Espacio, ID_Servicio, ID_Persona, FechaInicio, FechaFin, Periodo, CRN, ID_Administrativo, Forma) values ('$group', '$place', '$service', '$idPersona', STR_TO_DATE('{$asignacion['fechaInicio']}', '%m/%d/%Y'), STR_TO_DATE('{$asignacion['fechaFin']}', '%m/%d/%Y'), '{$asignacion['periodo']}', '', $responsable, 'figpo') \\\"; //'{$asignacion['periodo']}', '{$asignacion['crn']}')\\\";\\n if (mysqli_query($con, $sql)) {\\n if ($idAsignacion = mysqli_insert_id($con)) {\\n $estadoTemp .= \\\"Nueva Asignacion
\\\";\\n } else {\\n $estadoTemp .= \\\"Error al seleccionar asignacion
\\\";\\n }\\n } else {\\n $estadoTemp .= \\\"Error al tratar de insertar nueva asignacion
\\\";\\n }\\n\\n ////Registrar detalles_asignacion\\n for ($x = 0; $x < count($diaSemana); $x++) {\\n if ($asignacion[$diaSemana[$x]]['hi'] != \\\"\\\" || $asignacion[$diaSemana[$x]]['hf'] != \\\"\\\") {\\n if ($x == 2) $dia = strtoupper($diaSemana[$x][0]) . $diaSemana[$x][1];\\n else $dia = strtoupper($diaSemana[$x][0]);\\n $sql = \\\"INSERT INTO detalle_asignacion (ID_Asignacion, Dia, HoraInicio, HoraFin) VALUES ('$idAsignacion', '$dia', '{$asignacion[$diaSemana[$x]]['hi']}', '{$asignacion[$diaSemana[$x]]['hf']}') \\\";\\n if (mysqli_query($con, $sql)) {\\n $estadoTemp .= \\\"&emsp;Dia \\\" . $diaSemana[$x] . \\\" de \\\" . $asignacion[$diaSemana[$x]]['hi'] . \\\" a \\\" . $asignacion[$diaSemana[$x]]['hf'] . \\\" registrado
\\\";\\n\\n } else {\\n $estadoTemp .= \\\"&emsp;Error al tratar de registrar nuevo Detalle Asignacion
\\\";\\n }\\n } else continue;\\n }\\n }\\n } else {\\n $estadoTemp .= \\\"Error al buscar asignaciones
\\\";\\n }\\n } else {\\n $estadoTemp .= \\\"Error en el formato de Fecha Inicio o Fecha Fin
\\\";\\n }\\n } else {\\n $estadoTemp .= \\\"Error en el formato de Fecha Inicio o Fecha Fin
\\\";\\n }\\n\\n $estadoTemp .= \\\"
\\\";\\n array_push($estadoCarga, $estadoTemp);\\n }\\n echo json_encode(array(\\\"s\\\" => 1, \\\"m\\\" => \\\"Carga correcta de Administrativos\\\", \\\"d\\\" => $estadoCarga));\\n }\\n\\n }\\n mysqli_close($con);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c28903d8b9186c2663360c54c5a6c0d\",\n \"score\": \"0.5363422\",\n \"text\": \"function cargarDatosProyecto() {\\n //verifica el codigo de proyecto\\n $codProyecto=(isset($_REQUEST['codProyecto'])?$_REQUEST['codProyecto']:'');\\n if($codProyecto=='')\\n {\\n echo \\\"No seleccionó proyecto\\\";exit;\\n }\\n //borra los registros de estudiantes del proyecto\\n $variables=array('CAMPO'=>'ins_est_cra_cod',\\n 'VALOR_CAMPO'=>$_REQUEST['codProyecto']);\\n $borradas=$this->borrarDatosPrecarga($variables);\\n echo \\\"Se han borrado \\\".$borradas.\\\" registros de \\\";\\n //consulta datos delproyecto\\n $this->carreras=$this->consultarDatosProyecto($codProyecto);\\n echo $this->carreras[0]['NOMBRE_CARRERA'].\\\".
\\\";\\n $this->totalEstudiantes=0;\\n $this->consultarRequisitos(); \\n $this->consultarParametros();\\n $this->consultarEspaciosCancelados();\\n $this->espaciosEquivalentes=$this->consultarEspaciosEquivalentes();\\n //ejecuta la carga para el proyecto\\n $this->ejecutarCargaPorProyecto($this->carreras[0]);\\n //finaliza reporte\\n echo \\\"TOTAL ESTUDIANTES: \\\".$this->totalEstudiantes.\\\"
\\\";\\n $this->volver();\\n exit;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e9589e0519218e22d11e54b5e8ea92b\",\n \"score\": \"0.5347954\",\n \"text\": \"function respuesta($status, $mensaje, $datos)\\n {\\n header(\\\"HTTP/1.1 $status $mensaje\\\");\\n $response['status'] = $status;\\n $response['disponibles'] = $mensaje;\\n $response['habitaciones_disponibles'] = $datos;\\n \\n $json_response = json_encode($response);\\n echo $json_response;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"184a112d06fbf9858d13556e5716fc61\",\n \"score\": \"0.5347343\",\n \"text\": \"function NominaWEBRechazoMotivo($idNomina){\\n\\ttry{\\n\\t\\tglobal $conn;\\n\\t\\t\\n\\t\\t$params = array(\\\":IDNOMINA\\\" => $idNomina);\\t\\n\\t\\t\\n\\t\\t$sql = \\\"SELECT r.mr_descripcion, e.ew_observacionesrechazo\\n\\t\\t\\t\\t FROM hys.hew_establecimientoweb e\\n\\t\\t INNER JOIN \\t hys.hmr_motivorechazonomina r ON e.ew_idmotivorechazo = r.mr_id\\n\\t\\t\\t\\t WHERE e.ew_id = :IDNOMINA\\\";\\n\\t\\t\\n\\n\\t\\t@$stmt = DBExecSql($conn, $sql, $params);\\t\\n\\t\\t\\n\\t\\twhile ($row = DBGetQuery($stmt)){\\t\\n\\t\\t\\n\\t\\t\\t$desc = utf8_encode($row['MR_DESCRIPCION']);\\n\\t\\t\\t$obser = utf8_encode($row['EW_OBSERVACIONESRECHAZO']);\\n\\t\\t\\t\\t\\n\\t\\t\\t$row1 = array(\\\"MR_DESCRIPCION\\\" => $desc, \\n\\t\\t\\t\\t\\t\\t\\t\\\"EW_OBSERVACIONESRECHAZO\\\" => $obser);\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\treturn json_encode($row1);\\t\\t\\n\\t\\t}\\n\\t\\t\\t\\t\\n\\t\\treturn json_encode(array(\\\"MR_DESCRIPCION\\\" => \\\"SIN DATOS\\\", \\\"EW_OBSERVACIONESRECHAZO\\\" => \\\"SIN DATOS\\\" ));\\t\\n\\t\\t\\n\\t}catch (Exception $e) {\\t\\t\\n\\t\\tthrow new Exception(\\\"Error \\\".$e->getMessage() ); \\n\\t}\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9300360077163fa80079f67c8bd5c9f8\",\n \"score\": \"0.53454655\",\n \"text\": \"public function contaLancamentosCartao(){\\n $ch = curl_init();\\n\\n curl_setopt($ch, CURLOPT_URL, 'https://api.granatum.com.br/v1/lancamentos?access_token='.$this->chave_granatum);\\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\\n curl_setopt($ch, CURLOPT_POSTFIELDS, \\\"conta_id=55632&data_inicio=\\\".$this->p_dia.\\\"&data_fim=\\\".$this->h_dia.\\\"&tipo_view=count\\\");\\n curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );\\n\\n curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers);\\n\\n $result = curl_exec($ch);\\n if (curl_errno($ch)) {\\n echo 'Error:' . curl_error($ch);\\n }\\n $this->n_lancamentos_cartao = json_decode($result, true);\\n\\n curl_close($ch);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27230a7b13286e98591d8985a6c23a6c\",\n \"score\": \"0.5345081\",\n \"text\": \"function Buscar_Conducta($codigo){\\n $respuesta = new xajaxResponse();\\n $ClsCon = new ClsConducta();\\n //$respuesta->alert(\\\"$codigo\\\");\\n\\t$result = $ClsCon->get_conducta($codigo);\\n\\tif(is_array($result)){\\n\\t\\t\\tforeach($result as $row){\\n\\t\\t\\t\\t\\t$codigo = $row[\\\"con_codigo\\\"];\\n\\t\\t\\t\\t\\t$respuesta->assign(\\\"codigo\\\",\\\"value\\\",$codigo);\\n\\t\\t\\t\\t\\t$pensum = $row[\\\"con_pensum\\\"];\\n\\t\\t\\t\\t\\t$respuesta->assign(\\\"pensum\\\",\\\"value\\\",$pensum);\\n\\t\\t\\t\\t\\t$nivel = $row[\\\"con_nivel\\\"];\\n\\t\\t\\t\\t\\t$respuesta->assign(\\\"nivel\\\",\\\"value\\\",$nivel);\\n\\t\\t\\t\\t\\t$grado = $row[\\\"con_grado\\\"];\\n\\t\\t\\t\\t\\t$respuesta->assign(\\\"grado\\\",\\\"value\\\",$grado);\\n\\t\\t\\t\\t\\t$seccion = $row[\\\"con_seccion\\\"];\\n\\t\\t\\t\\t\\t$respuesta->assign(\\\"grado\\\",\\\"value\\\",$seccion);\\n\\t\\t\\t\\t\\t$alumno = trim($row[\\\"con_alumno\\\"]);\\n\\t\\t\\t\\t\\t$respuesta->assign(\\\"alumno\\\",\\\"value\\\",$alumno);\\n\\t\\t\\t\\t\\t$pipi = trim($row[\\\"con_cant_pipi\\\"]);\\n\\t\\t\\t\\t\\t$respuesta->assign(\\\"pipi\\\",\\\"value\\\",$pipi);\\n\\t\\t\\t\\t\\t$obs = utf8_decode($row[\\\"con_observaciones\\\"]);\\n\\t\\t\\t\\t\\t$respuesta->assign(\\\"obs\\\",\\\"value\\\",$obs);\\n\\t\\t\\t}\\t\\n\\t\\t}\\n\\t\\t\\t//abilita y desabilita botones\\n\\t\\t\\t$respuesta->script(\\\"document.getElementById('mod').className = 'btn btn-primary';\\\");\\n\\t\\t\\t$respuesta->script(\\\"document.getElementById('gra').className = 'btn btn-primary hidden'\\\");\\n\\t\\t\\t\\n\\t\\t\\t$respuesta->script('document.getElementById(\\\"alumno\\\").focus();');\\n\\t\\t\\t$respuesta->script(\\\"cerrar();\\\");\\n return $respuesta;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a8a56a09466f979bc09214552c00350\",\n \"score\": \"0.5343437\",\n \"text\": \"public function getCertificacionSegip($data)\\n {\\n $respuesta = array(\\n 'respuesta' => '',\\n 'sw' => 0\\n );\\n\\n $error1 = FALSE;\\n //dd($data);\\n // === OPERACION ===\\n try\\n {\\n\\n $params = [\\n 'encoding' => 'UTF-8'\\n ];\\n\\n $cliente = new \\\\SoapClient('http://172.27.104.3:86/ServicioExternoInstitucion.svc?singleWsdl', $params);\\n //dd($cliente);\\n $parametros = array(\\n 'pCodigoInstitucion' => 4,//env('SEGIP_CODIGO_INSTITUCION'),\\n 'pUsuario' => 'pablo.corral',//env('SEGIP_USUARIO'),\\n 'pContrasenia' => 'Corral2018',//env('SEGIP_CONTRASENIA'),\\n 'pClaveAccesoUsuarioFinal' => 'P33638371',//env('SEGIP_CLAVE_ACCESO_USUARIO_FINAL'),\\n 'pNumeroAutorizacion' => '',\\n 'pNumeroDocumento' => $data['n_documento'],\\n 'pComplemento' => $data['complemento'],\\n 'pNombre' => $data['nombre'],\\n 'pPrimerApellido' => $data['ap_paterno'],\\n 'pSegundoApellido' => $data['ap_materno'],\\n 'pFechaNacimiento' => date(\\\"d/m/Y\\\", strtotime($data['f_nacimiento']))\\n );\\n\\n $respuesta_soap1 = (array) $cliente->ConsultaDatoPersonaCertificacion($parametros);\\n //dd($respuesta_soap1);\\n $respuesta_soap = (array) $respuesta_soap1[\\\"ConsultaDatoPersonaCertificacionResult\\\"];\\n }\\n catch (Exception $e)\\n {\\n $respuesta['respuesta'] .= \\\"ERROR EN EL SOAP\\\";\\n $error1 = TRUE;\\n }\\n\\n if( ! $error1)\\n {\\n $respuesta['respuesta'] = $respuesta_soap;\\n $respuesta['sw'] = 1;\\n\\n }\\n\\n return $respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67cfa5e7acc0d9ddee18b4d65413c3b5\",\n \"score\": \"0.53387725\",\n \"text\": \"function generaCodigotodos() {\\n $actor = $this->AutoLoadModel('actor');\\n $dataActor = $actor->listaTodosActores();\\n $cantidad = count($dataActor);\\n $cont = 0;\\n $cont2 = 0;\\n for ($i = 0; $i < $cantidad; $i++) {\\n $idactor = $dataActor[$i]['idactor'];\\n $filtro = \\\"idactor='$idactor'\\\";\\n $data['codigo'] = 'GC' . str_pad($idactor, 5, '0', STR_PAD_LEFT);\\n $exito = $actor->ActualizaActor($data, $filtro);\\n if ($exito) {\\n $cont++;\\n } else {\\n $cont2++;\\n }\\n }\\n echo 'Cantidad Registros correctos :' . $cont;\\n echo 'Cantidad Errores : ' . $cont2;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9b544ce1d86f16269105ae0c98cabbb\",\n \"score\": \"0.5338174\",\n \"text\": \"function obtenerdatos($conn2, $fechainicio, $variable)\\n\\t{\\n\\t// Creamos una sentencia preparada para evitar inyecciones SQL\\n //Obtenemos la lista del IVR que contengan un UCID y especificamos el Rango de Fechas en nuestra Sentencia Preparada\\n\\t$stmt = $conn2->prepare(\\\"SELECT logid, split, i_availtime, row_date FROM DAGENT\\nwhere row_date = :fechainicio\\nand logid=:variable\\n;\\\");\\n\\t// Enlazamos las variables a nuestros apuntadores para Prepared Statements y Ejecutamos el Query\\n\\t$stmt->execute([':fechainicio' => $fechainicio, ':variable' => $variable]);\\n //Creamos un Objeto con los resultados de la consulta\\n\\t$array = $stmt->fetchAll(PDO::FETCH_ASSOC);\\n //Recorremos este objeto y vamos agregando los resultados de la columna ucid a un Array\\n //Si este array se encuentra vacio lanzamos el error que no se encuentran reusltados en la Consola\\n\\tif (!$array) exit('No hay resultados');\\n //Designamos una variable con el objeto base\\n\\techo json_encode($array);\\n //Limpiamos Consultas\\n\\t$stmt = null;\\n\\n //Cerramos conexiones\\n $conn = null;\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14f2e7d26e6a457bf380d21b651528a4\",\n \"score\": \"0.5334596\",\n \"text\": \"public function AgregarRfcFisicaOtra(){\\n\\n\\t\\t\\t$tabla = \\\"clientes\\\";\\n\\n\\t\\t\\t$datos = array(\\\"rfc\\\"=>$_POST[\\\"nuevoRFC_F\\\"],\\n\\t\\t\\t\\t\\t\\t\\t\\\"nombre\\\" => $_POST[\\\"nuevoNombre_F\\\"],\\n\\t\\t\\t\\t\\t\\t\\t\\\"app\\\" => $_POST[\\\"nuevoApellidoP_F\\\"],\\n\\t\\t\\t\\t\\t\\t\\t\\\"apm\\\" => $_POST[\\\"nuevoApellidoM_F\\\"],\\n\\t\\t\\t\\t\\t\\t\\t\\\"correo\\\" => $_POST[\\\"nuevo_Corrreo_F\\\"],\\n\\t\\t\\t\\t\\t\\t\\t\\\"calle\\\"=>$_POST[\\\"nuevoCalle_F\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"ext\\\"=>$_POST[\\\"nuevoExterior_F\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"intt\\\"=>$_POST[\\\"nuevoInterior_F\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"colonia\\\"=>$_POST[\\\"nuevoColonia_F\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"ciudad\\\"=>$_POST[\\\"nuevoCiudad_F\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"estado\\\"=>$_POST[\\\"nuevoEstado_F\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"codigo\\\"=>$_POST[\\\"nuevoPostal_F\\\"],\\n\\t\\t\\t\\t\\t\\t \\\"tel1\\\"=>$_POST[\\\"nuevoNumero1_F\\\"],\\n\\t\\t\\t\\t\\t\\t\\t\\\"tel2\\\" => $_POST[\\\"nuevoNumero2_F\\\"]);\\n\\n\\t\\t\\t$respuesta = ModeloClientes::mdlAgregarClienteFisicaOtro($tabla, $datos);\\n\\t\\t\\t$tabla2 =\\\"direccion_fiscal\\\";\\n\\n\\t\\t\\t$result = ModeloClientes::mdlAgregarDomicilioFisicaOtra($tabla2, $datos,$respuesta);\\n\\n\\t\\t echo json_encode($result);\\n\\t\\t\\t\\n\\t\\t\\t\\n\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":714,"cells":{"query_id":{"kind":"string","value":"160aa472c8fe1dfc35be3dcd5f65b0e8"},"query":{"kind":"string","value":"/ prints error message"},"positive_passages":{"kind":"list like","value":[{"docid":"2e60fa21b00ecc51ffb9891c67acab9f","score":"0.0","text":"private static function error($controller, $action, $msg=NULL){\n echo \"

Error occurred

$msg

\";\n exit(0);\n }","title":""}],"string":"[\n {\n \"docid\": \"2e60fa21b00ecc51ffb9891c67acab9f\",\n \"score\": \"0.0\",\n \"text\": \"private static function error($controller, $action, $msg=NULL){\\n echo \\\"

Error occurred

$msg

\\\";\\n exit(0);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"ff121d73b3325c3721a582f60c0fe1ef","score":"0.7772783","text":"public function error();","title":""},{"docid":"97b8a0cf9a65d4ed45572cc26f8ddf04","score":"0.76964396","text":"abstract public function error();","title":""},{"docid":"97b8a0cf9a65d4ed45572cc26f8ddf04","score":"0.76964396","text":"abstract public function error();","title":""},{"docid":"e5abc7b002233bb845c13e8be8411216","score":"0.7447953","text":"public abstract function error();","title":""},{"docid":"2013672459594e2dac00626e788b7a3c","score":"0.7426822","text":"public function errorf();","title":""},{"docid":"ffed6ccf6c1102c5ff8a6241738c6e91","score":"0.7381607","text":"abstract protected function get_error();","title":""},{"docid":"ad734de73af1f196423c8d5c65d89596","score":"0.73674643","text":"public static function customErrorMsg()\n {\n echo \"

An error occurred, The error has been reported.

\";\n exit;\n }","title":""},{"docid":"cce703e01282b378922d081b8c98a860","score":"0.73556876","text":"public static function error($message) {}","title":""},{"docid":"627ed13816689ccc28bb69b6e729d502","score":"0.734219","text":"function error_found(){\n //echo \"Custom error: [$errno] $errstr
\";\n //echo \" Error on line $errline in $errfile
\";\n}","title":""},{"docid":"bfe7b878a3bf0817fa82c185c264e22d","score":"0.730539","text":"public function output_errors()\n {\n }","title":""},{"docid":"5ff45d9b6fb826127dad9a258407db80","score":"0.7300101","text":"function error() \r\n\t{\r\n\t\tassert(FALSE);\r\n\t}","title":""},{"docid":"15854e4921ec85662f5704cff062c93d","score":"0.72812223","text":"function error_msg()\n\t{\n\t\t//How did the user get here? Must've been up to no good.\n\t\techo \"
Error: Invalid information.

\n\t\t\t
If you feel you reached this in error, please contact webmaster@footesbooks.com
\";\n\t}","title":""},{"docid":"3284b1b62146ad1163842b0cf5b07747","score":"0.72491133","text":"public function error()\n\t{\n\t\t$numargs = func_num_args();\n\t\t$arg_list = func_get_args();\n\n\t\tif($this->logLevel >= Logger::$LOG_ERRORS)\n\t\t{\n\t\t\t$msg = \"[ERROR]\";\n\t\t\tfor ($i = 0; $i < $numargs; $i++)\n\t\t\t{\t\t\t\n\t\t\t\t$msg .= \" \".$this->toString($arg_list[$i]) ;\n\t\t\t}\n\t\t\t$this->save($msg);\n\t\t}\n\t}","title":""},{"docid":"f285078d24a1f04655ecd14f8ce15ce9","score":"0.72156316","text":"function _error($message = null) {\r\n\t\tif ($message === null) $message = $this->lang->line('Invalid API request');\r\n\t\t$this->_output(array('error' => $message));\r\n\t}","title":""},{"docid":"13e9e2accfdfb48eb67d5bc09ef097d2","score":"0.7210492","text":"function customError ($errno, $errstr, $error_file, $error_line, $error_context)\n\t{\n\t\techo \"
Error: [$errno] $errstr
\";\n\t\techo \"Error: $error_file $error_line
\";\n\t\techo \"Error: $error_context
\";\n\t\techo \"Ending Script\";\n\t\tdie();\n\t}","title":""},{"docid":"28b2486ddae0937d5324f03270d31efc","score":"0.7190932","text":"function customError($errno, $errstr)\n{\necho \"\n\nError:\n\n[$errno] $errstr\";\n}","title":""},{"docid":"e394de4c56c6fd6618f5bbf97d0c070b","score":"0.7176575","text":"function error($errstr) {\n echo \"Error: $errstr\";\n}","title":""},{"docid":"6af0c2f11dd0b773479971975b73a01a","score":"0.71695447","text":"function displayerror($error) {\r\n echo \"Error: $error\";\r\n }","title":""},{"docid":"4208ede59d4f903253cb755a691d9a07","score":"0.7156844","text":"private function error()\n {\n $this->checkPassword();\n $this->checkPasswordFormat();\n $this->ifPasswordsAreDifferent();\n }","title":""},{"docid":"d96caa7bbaf5f2892f18fea08c48669d","score":"0.7146473","text":"public function error_msg_print() {\r\n echo \"
\";\r\n for ($i=0; $i err_msgs); $i++) {\r\n echo $this->err_msgs[$i];\r\n }\r\n }","title":""},{"docid":"ce0cf4e976c08c0969250d95d2bb0d2b","score":"0.7145055","text":"public function error($message) {\n // TODO: jeo - we need to use stderr for these.\n echo $this->formatDate( time() ) . ' - ' . $message . \"\\n\";\n }","title":""},{"docid":"a77406bd22f19fef97d9667d51071111","score":"0.71446735","text":"function error($msg = NULL) {\n\tif ($msg) {\n\t\techo \"Error: \" . $msg; \n\t} else {\n\t\techo \"0\"; \n\t}\t\n\tdie(); \n}","title":""},{"docid":"4cb788d697890ba0e0f6f2fe11f3a36b","score":"0.71444744","text":"function printError(int $code) : void\n {\n $begin = '

';\n $message = '';\n $end = '

';\n\n switch($code)\n {\n case 0: break;\n case 1: $message = 'Please provide input.';\n break;\n case 2: $message = 'Input is not valid.';\n break;\n case 3: $message = 'Awaiting input...';\n break;\n default: $message = 'Something went wrong.';\n break;\n }\n print($begin . $message . $end);\n }","title":""},{"docid":"eb3d532b89cf8b92cb2b474c1d48e719","score":"0.7139431","text":"public function printErrorLog() {}","title":""},{"docid":"f40dc28927cbe4344e218f6eb43f007d","score":"0.7131707","text":"protected function error($message)\n {\n $this->output->writeln(\"{$message}\");\n }","title":""},{"docid":"76155793a79e49d6aabe51fbe5fc1182","score":"0.71190923","text":"public function error(): string;","title":""},{"docid":"76155793a79e49d6aabe51fbe5fc1182","score":"0.71190923","text":"public function error(): string;","title":""},{"docid":"d0bc560eb6abbd4bbc705719312c4037","score":"0.71062565","text":"function printError(){\n?>\t

Error! Invalid data.

\n\t

We're sorry. You submitted invalid user information. Please go back and try again.

\n\";\n var_dump( $text );\n echo \"\";\n die('ok');\n }","title":""},{"docid":"f76d61db6bcd528ee58b947269693111","score":"0.7099591","text":"public function error()\n {\n }","title":""},{"docid":"dffde826001e49c829d4c4913ea816c1","score":"0.70992815","text":"function ShowLastError()\n {\n printf(\"@E@%s failed\\nError Code: %d\\nReason: %s\\n\\n\",\n $this->errorLine,\n $this->errorNumber,\n $this->errorReason);\n }","title":""},{"docid":"29783e5478a41a346dfe691f2459b480","score":"0.7096681","text":"public function display_errors()\n {\n }","title":""},{"docid":"8858b6b719e468cb58bf784b5b1da22d","score":"0.7094188","text":"public function display_error()\n {\n $this->error->display();\n }","title":""},{"docid":"ff9ec3aaf84e978ce13281945fbe2e33","score":"0.7093242","text":"abstract protected function displayFailure($msg);","title":""},{"docid":"1b48f7edf04f3eeb640679fc93dcf749","score":"0.70926917","text":"function usageError($message)\n {\n echo \"Error: $message\\n\\n\";\n exit(1);\n }","title":""},{"docid":"1b48f7edf04f3eeb640679fc93dcf749","score":"0.70926917","text":"function usageError($message)\n {\n echo \"Error: $message\\n\\n\";\n exit(1);\n }","title":""},{"docid":"d48b73c9c201e670f191f6ba831666ab","score":"0.70892715","text":"function PrintError($error) {\r\n print('

' . $error. '

');\r\n}","title":""},{"docid":"c4e885d5f997b3597fb9cbe2d5e9ec89","score":"0.70887804","text":"public function error()\n {\n $args = func_get_args();\n foreach ($args as $d) {\n switch (true) {\n case (is_string($d)) :\n echo $d;\n break;\n case (is_array($d)) :\n print_r($d);\n break;\n default:\n var_dump($d);\n break;\n }\n echo PHP_EOL;\n }\n }","title":""},{"docid":"3ed0bd2a3a72c8764d331ed46bcf133d","score":"0.70802027","text":"function handle_error($msg, $ex) {\n \theader(\"Content-Type: text/plain\");\n \tprint (\"{$msg}\\n\");\n \tprint (\"Error details: $ex \\n\");\n \tdie();\n }","title":""},{"docid":"4cd248ecac96e2610a34b948caca28b2","score":"0.70777136","text":"function customError($errno, $errstr) {\n echo \"Error: [$errno] $errstr
\";\n die();\n}","title":""},{"docid":"4aba7c0a4f1c1a8d306f839f1f589ed8","score":"0.70764923","text":"function show_error() {\n if ( $this->ERROR == 'wordpress' ) {\n print_string( 'new_feed_wordpress', 'bimtwo' );\n }\n\n // make sure there is an error\n if ( ! $this->simplepie->error() ) {\n return;\n }\n\n $error = $this->simplepie->error();\n\n // simplepie couldn't find a feed\n if ( preg_match( \"!^A feed could not be found at !\", $error )) {\n print_string( \"new_feed_nofound_error\", 'bimtwo' );\n } else if ( preg_match( \"!time out after!\", $error )) {\n print_string( \"new_feed_timeout_error\", 'bimtwo' );\n } else {\n print_string( \"new_feed_noretrieve_error\", 'bimtwo' );\n }\n }","title":""},{"docid":"fafbe88e9a290be816569b3dbc45ab04","score":"0.70719904","text":"public function command_error();","title":""},{"docid":"70d7c67fa8bc9cca7254f1d2f19ec664","score":"0.7066597","text":"function error($message) {\n echo $message;\n}","title":""},{"docid":"60f42d5dd833c9e28abfcac5ceda21de","score":"0.7059789","text":"function error_string();","title":""},{"docid":"e7f309215c28e5e89ee2be8f120a10d1","score":"0.70486474","text":"function report_error( $msg ) {\n\tprint 'Error: '.$msg;\n exit;\n}","title":""},{"docid":"7737726ca91262359ad7d935186f0c2c","score":"0.7027198","text":"public function actionError() {\n\t\techo \"error\";\n\t}","title":""},{"docid":"0a3de2322493bd8f36df78466d7fa04e","score":"0.7022906","text":"public function errorInfo();","title":""},{"docid":"ae0b36bd13cdfec491158520d1351848","score":"0.7022449","text":"static function Error($X){ die(\"Error: $X\"); }","title":""},{"docid":"b9305da8f276931b73c5489a9be941a3","score":"0.70217925","text":"public function get_error_message()\n {\n }","title":""},{"docid":"fe1dba34260f1fe89a286fa653df7790","score":"0.7016594","text":"function printe($msg) {\r\n\tprintf(\"

Debug Error:

%s

\", $msg);\r\n\texit(1);\r\n}","title":""},{"docid":"6e7818b9ef90c29197df49afc36b900b","score":"0.700828","text":"abstract public function action_error ();","title":""},{"docid":"452a23dace44bbdc649a757224ed2c07","score":"0.7007079","text":"function error($msg) { trigger_error($msg, E_USER_ERROR); }","title":""},{"docid":"c7a8dec8dc74e35b0efe031ef20eceb1","score":"0.700429","text":"function paintError($message) {\n parent::paintError($message);\n print \"Exception: \";\n $breadcrumb = $this->getTestList();\n array_shift($breadcrumb);\n print implode(\" -&gt; \", $breadcrumb);\n print \" -&gt; \" . $this->_htmlEntities($message) . \"
\\n\";\n }","title":""},{"docid":"1acdc1c4d19a82934fe0f36b7843765c","score":"0.6999709","text":"protected function error($nvae) { ; }","title":""},{"docid":"f9aa14e3fd40c6c962b7766690aedab3","score":"0.698872","text":"public static function err($message = '') {\n echo '
';\n        throw new exception('Error: ' . $message\n      );        \n    }","title":""},{"docid":"f9aa14e3fd40c6c962b7766690aedab3","score":"0.698872","text":"public static function err($message = '') {\n        echo '
';\n        throw new exception('Error: ' . $message\n      );        \n    }","title":""},{"docid":"940c818ea28f3b5094abd8959c70cd09","score":"0.6984316","text":"function displayError($step) {\n\techo '

An error occurred in step '.$step.'

';\n}","title":""},{"docid":"69e17149cae4e6a0b69ec8083b4fe208","score":"0.6976827","text":"function print_error($message) {\n script_print(\" ERROR: $message\\n\", SCRIPT_COLOR_FAIL);\n}","title":""},{"docid":"3a5e4f0003af3e5e5d1ec551da777993","score":"0.69710326","text":"public function log_errors()\n {\n }","title":""},{"docid":"2aa49ea55366f8f638bee325cbece738","score":"0.69611895","text":"function admin_error($title, $message = '')\n {\n admin_info($title, $message, 'error');\n }","title":""},{"docid":"2aa49ea55366f8f638bee325cbece738","score":"0.69611895","text":"function admin_error($title, $message = '')\n {\n admin_info($title, $message, 'error');\n }","title":""},{"docid":"2aa49ea55366f8f638bee325cbece738","score":"0.69611895","text":"function admin_error($title, $message = '')\n {\n admin_info($title, $message, 'error');\n }","title":""},{"docid":"93f3d9b66d959ff28541b38a6b3cb419","score":"0.6934754","text":"public function errors();","title":""},{"docid":"93f3d9b66d959ff28541b38a6b3cb419","score":"0.6934754","text":"public function errors();","title":""},{"docid":"93f3d9b66d959ff28541b38a6b3cb419","score":"0.6934754","text":"public function errors();","title":""},{"docid":"fc9db30d7aa24198d0dbd3eac22c2f39","score":"0.6932473","text":"public function errorShow()\n\t{\n\t\t//\n\n\t}","title":""},{"docid":"e24e114ac7540ef603f313eb2fde5fa4","score":"0.69317836","text":"function getErrorMsg();","title":""},{"docid":"fc9ac5914173a638a7e667951ec7aebc","score":"0.69301856","text":"function died($error) {\n echo \"Please complete all the required fields to continue \";\n echo $error.\"

\";\n echo \"Please go back and fix these errors.

\";\n die();\n }","title":""},{"docid":"5d99bd64d5565e19cb3dfef34e9ff679","score":"0.69244796","text":"public function error($string) {\n $this->output->writeln(\"$string\");\n }","title":""},{"docid":"8e1969c09955b126ac2162b8fd83cfa8","score":"0.69214606","text":"function error($description)\n{\n html_start();\n echo \"
\\n\";\n    echo htmlentities($description);\n    echo \"\\n\";\n    print_debug_backtrace();\n    html_end();\n    exit;\n}","title":""},{"docid":"488d17c6fd48f832c9a7d8442c3aa62c","score":"0.6919378","text":"public function getError(){\n\n    // ve(\"show_error = \".self::$show_error);\n\n        if(self::$show_error){\n\n            echo \"
\";\n            if(self::$db_error){\n                foreach (self::$db_error as $key => $error) {\n                    pre(\"- DB: \".__METHOD__.\"[  \".self::$target.\" ] \".$error.\"\",'left','ltr','#F33000');\n             // trigger_error(self::$target.\" \".$error) ; //set as php runtime error.\n                }\n            }else{\n                echo \"no Errors\";\n            }\n            echo \"
\";\n }\n }","title":""},{"docid":"e009fd0969642a99a9ae546bcdc1b3e6","score":"0.6917245","text":"function Error($msg){\r\n\r\n\t // Show the error\r\n\t echo('[-] '.trim($msg).\"\\n\");\r\n }","title":""},{"docid":"e9d8968ee77cfff919c67c0dfb009454","score":"0.6916132","text":"function print_errors($msg) {\n header(\"HTTP/1.1 400 Invalid Request\");\n header(\"Content-type: text/plain\");\n echo $msg;\n }","title":""},{"docid":"8bf961a0ae7897e6d09255897625934a","score":"0.6908824","text":"protected function errorAction() {}","title":""},{"docid":"b2735dada6e5a448bca31dc8b26ab652","score":"0.6906669","text":"public function error($message);","title":""},{"docid":"5bdb07ad8097cbec6055190b9d9f9b19","score":"0.6904187","text":"function err($string)\n{\n\t// Annoying PHP: we need to import global variables here...\n\tglobal $title;\n\tif (NONINTERACTIVE) error($string);\n\n\trequire(LIBWWWDIR . '/header.php');\n\n\techo \"

Submit - error

\\n\\n\";\n\n\techo '
';\n\tlogmsg(LOG_WARNING, $string);\n\techo '
';\n\n\trequire(LIBWWWDIR . '/footer.php');\n\texit;\n}","title":""},{"docid":"640e713fe52c177e0cc4aeedbb36d412","score":"0.68889695","text":"public static function error($message) {\r\n self::writeLine('ERROR | ' . $message);\r\n }","title":""},{"docid":"ec7df0d3237333e4aefdc577a1ae89e2","score":"0.6885041","text":"abstract public function getMsgError();","title":""},{"docid":"f62e4a418633b88a019ce86c4d7dd985","score":"0.68810546","text":"public function getError ();","title":""},{"docid":"dfdee70032cedf2ef9a199158ed8cdaa","score":"0.6867589","text":"private function error()\n\t{\n\t\t$file = '';\n\t\t$line = 0;\n\n\t\t$message = 'Illegal use of $' . $this->name . '. You must use the request class to access input data. Found in %s on line %d. This error message was generated by deactivated_super_global.';\n\n\t\t$backtrace = debug_backtrace();\n\t\tif (isset($backtrace[1]))\n\t\t{\n\t\t\t$file = $backtrace[1]['file'];\n\t\t\t$line = $backtrace[1]['line'];\n\t\t}\n\t\ttrigger_error(sprintf($message, $file, $line), E_USER_ERROR);\n\t}","title":""},{"docid":"3535075ee5f13ad58a94d734d315f652","score":"0.6863229","text":"function died($error) {\n echo \"มีข้อผิดพลาดเกิดขึ้น\";\n echo \"ด้านล่างนี้คือข้อผิดพลาด

\";\n echo $error.\"

\";\n echo \"กรุณาแก้ข้อผิดพลาดเหล่านี้

\";\n die();\n }","title":""},{"docid":"956aefd4a2adaa335d5ecb92c0e12321","score":"0.68611866","text":"function error($message) \n {\n if ( $this->_level | self::ERROR ) {\n $this->_app->getService('response')->writeLine(\n 'ERROR : ' . $message\n );\n } \n }","title":""},{"docid":"1874fee03259d475d4e629d7dd50ef70","score":"0.68583316","text":"function error($params) {\n\t\textract($params, EXTR_OVERWRITE);\n\t\t$this->stderr($code . $name . $message.\"\\n\");\n\t\t$this->_stop(1);\n\t}","title":""},{"docid":"61e01867231f2b93a509f61acbc04212","score":"0.6856762","text":"function print_errors($error_nodes) {\n\t\tprint \"There was an error processing your request:\\n\";\n\t\tforeach ($error_nodes as $error) {\n\t\t\tprint \" Error code: \" . $error->Code . \"\\n\";\n\t\t\tprint \" Error message: \" . $error->Message . \"\\n\";\n\t\t}\n\t}","title":""},{"docid":"1954bd3a446fa4183b029739790e3492","score":"0.68472767","text":"private function error($message)\n {\n $this->write(''.$message.'', 'white', 'red');\n }","title":""},{"docid":"db3f6ccacc47eaac8ba46f28ebb07f0d","score":"0.6840599","text":"function outputURLError()\r\n {\r\n\r\n $this->outputError(\"400\", \"error\", \"Query failed\", \"URL string has incorrect format.\");\r\n\r\n }","title":""},{"docid":"6371c7b26393139c1cf96bccacb6e12d","score":"0.6840179","text":"function displayError($errMessage)\n {\n global $args;\n\n if (is_writable('./')) {\n $f=fopen(\"ydbmigrate.lasterror\",\"w\");\n fwrite($f,$errMessage);\n fclose($f);\n }\n\n $args->setArgValue('help',__TRUE__);\n die(\"\\n$errMessage\\n\");\n }","title":""},{"docid":"e6e65df98f148937bff0556f1694feef","score":"0.6839861","text":"function show_error($message)\n\t{\n\t\t// require template\n require_once(\"error.php\");\n\n // exit immediately since we're apologizing\n exit;\n\t}","title":""},{"docid":"1134ac0f7bc42e8f5746ba17318cbd0a","score":"0.68363446","text":"public function error($msg) {\r\n\t\t$this->writeLn('ERROR', $msg);\r\n\t}","title":""},{"docid":"98e377edb48e54f1f9bbaba13abf1fb8","score":"0.6833947","text":"function get_error($input)\n {\n }","title":""},{"docid":"d97e29562d21e87cad45d5f1983e1f2c","score":"0.6828913","text":"function IT_Error($msg, $file = __FILE__, $line = __LINE__)\n {\n\n $this->PEAR_Error(sprintf(\"%s [%s on line %d].\", $msg, $file, $line));\n\n }","title":""},{"docid":"888f2f31a079ebdd165a2ff6fa08c4c8","score":"0.68159306","text":"function died($error) {\n\t\t\t\t\t\t\t\t $displayError = \"We are very sorry, but there were error(s) found with the form you submitted. These errors appear below.

\".$error.\"

\".\"Please go back and fix these errors.

\";\n\t\t\t\t\t\t\t\t die();\n\t\t\t\t\t\t\t }","title":""},{"docid":"c3cd3d5e923f259a83e751c1eba57af4","score":"0.6814875","text":"function died($error) {\n\t\t\t\t\techo \"We are very sorry, but there were error(s) found with the form you submitted. \";\n\t\t\t\t\techo \"These errors appear below.

\";\n\t\t\t\t\techo $error.\"

\";\n\t\t\t\t\techo \"Please go back and fix these errors.

\";\n\t\t\t\t\tdie();\n\t\t\t\t}","title":""},{"docid":"c3cd3d5e923f259a83e751c1eba57af4","score":"0.6814875","text":"function died($error) {\n\t\t\t\t\techo \"We are very sorry, but there were error(s) found with the form you submitted. \";\n\t\t\t\t\techo \"These errors appear below.

\";\n\t\t\t\t\techo $error.\"

\";\n\t\t\t\t\techo \"Please go back and fix these errors.

\";\n\t\t\t\t\tdie();\n\t\t\t\t}","title":""},{"docid":"b00bf79295719bbe078ae3d998030cb7","score":"0.6806885","text":"public function usageError($message)\n {\n echo \"Error: $message\\n\\n\";\n exit(1);\n }","title":""},{"docid":"9de21cd943639d55aab66adc76ff85e9","score":"0.6800173","text":"function printError($key)\n {\n if ($this->_error[$key]) {\n print ''.$this->_error[$key].'';\n }\n }","title":""},{"docid":"b254d652df04b15bb19807805e7d0121","score":"0.6794334","text":"public function getErrorMsg();","title":""},{"docid":"b254d652df04b15bb19807805e7d0121","score":"0.6794334","text":"public function getErrorMsg();","title":""},{"docid":"e50b2ed633afe6ce3678a517e0ae68ec","score":"0.67922777","text":"public function actionError()\r\n {\r\n if ($error = Yii::app()->errorHandler->error)\r\n {\r\n echo $error['message'];\r\n }\r\n }","title":""},{"docid":"51e78e5ccff2a2ac4a7120e3e3c0f86a","score":"0.6791116","text":"function _get_error_string()\n {\n \t# Driver specific\n }","title":""},{"docid":"23e5919442d1f735770d1d6f68a082f7","score":"0.6790401","text":"function get_errors()\n {\n }","title":""}],"string":"[\n {\n \"docid\": \"ff121d73b3325c3721a582f60c0fe1ef\",\n \"score\": \"0.7772783\",\n \"text\": \"public function error();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97b8a0cf9a65d4ed45572cc26f8ddf04\",\n \"score\": \"0.76964396\",\n \"text\": \"abstract public function error();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97b8a0cf9a65d4ed45572cc26f8ddf04\",\n \"score\": \"0.76964396\",\n \"text\": \"abstract public function error();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5abc7b002233bb845c13e8be8411216\",\n \"score\": \"0.7447953\",\n \"text\": \"public abstract function error();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2013672459594e2dac00626e788b7a3c\",\n \"score\": \"0.7426822\",\n \"text\": \"public function errorf();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ffed6ccf6c1102c5ff8a6241738c6e91\",\n \"score\": \"0.7381607\",\n \"text\": \"abstract protected function get_error();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad734de73af1f196423c8d5c65d89596\",\n \"score\": \"0.73674643\",\n \"text\": \"public static function customErrorMsg()\\n {\\n echo \\\"

An error occurred, The error has been reported.

\\\";\\n exit;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cce703e01282b378922d081b8c98a860\",\n \"score\": \"0.73556876\",\n \"text\": \"public static function error($message) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"627ed13816689ccc28bb69b6e729d502\",\n \"score\": \"0.734219\",\n \"text\": \"function error_found(){\\n //echo \\\"Custom error: [$errno] $errstr
\\\";\\n //echo \\\" Error on line $errline in $errfile
\\\";\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bfe7b878a3bf0817fa82c185c264e22d\",\n \"score\": \"0.730539\",\n \"text\": \"public function output_errors()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ff45d9b6fb826127dad9a258407db80\",\n \"score\": \"0.7300101\",\n \"text\": \"function error() \\r\\n\\t{\\r\\n\\t\\tassert(FALSE);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15854e4921ec85662f5704cff062c93d\",\n \"score\": \"0.72812223\",\n \"text\": \"function error_msg()\\n\\t{\\n\\t\\t//How did the user get here? Must've been up to no good.\\n\\t\\techo \\\"
Error: Invalid information.

\\n\\t\\t\\t
If you feel you reached this in error, please contact webmaster@footesbooks.com
\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3284b1b62146ad1163842b0cf5b07747\",\n \"score\": \"0.72491133\",\n \"text\": \"public function error()\\n\\t{\\n\\t\\t$numargs = func_num_args();\\n\\t\\t$arg_list = func_get_args();\\n\\n\\t\\tif($this->logLevel >= Logger::$LOG_ERRORS)\\n\\t\\t{\\n\\t\\t\\t$msg = \\\"[ERROR]\\\";\\n\\t\\t\\tfor ($i = 0; $i < $numargs; $i++)\\n\\t\\t\\t{\\t\\t\\t\\n\\t\\t\\t\\t$msg .= \\\" \\\".$this->toString($arg_list[$i]) ;\\n\\t\\t\\t}\\n\\t\\t\\t$this->save($msg);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f285078d24a1f04655ecd14f8ce15ce9\",\n \"score\": \"0.72156316\",\n \"text\": \"function _error($message = null) {\\r\\n\\t\\tif ($message === null) $message = $this->lang->line('Invalid API request');\\r\\n\\t\\t$this->_output(array('error' => $message));\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13e9e2accfdfb48eb67d5bc09ef097d2\",\n \"score\": \"0.7210492\",\n \"text\": \"function customError ($errno, $errstr, $error_file, $error_line, $error_context)\\n\\t{\\n\\t\\techo \\\"
Error: [$errno] $errstr
\\\";\\n\\t\\techo \\\"Error: $error_file $error_line
\\\";\\n\\t\\techo \\\"Error: $error_context
\\\";\\n\\t\\techo \\\"Ending Script\\\";\\n\\t\\tdie();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"28b2486ddae0937d5324f03270d31efc\",\n \"score\": \"0.7190932\",\n \"text\": \"function customError($errno, $errstr)\\n{\\necho \\\"\\n\\nError:\\n\\n[$errno] $errstr\\\";\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e394de4c56c6fd6618f5bbf97d0c070b\",\n \"score\": \"0.7176575\",\n \"text\": \"function error($errstr) {\\n echo \\\"Error: $errstr\\\";\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6af0c2f11dd0b773479971975b73a01a\",\n \"score\": \"0.71695447\",\n \"text\": \"function displayerror($error) {\\r\\n echo \\\"Error: $error\\\";\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4208ede59d4f903253cb755a691d9a07\",\n \"score\": \"0.7156844\",\n \"text\": \"private function error()\\n {\\n $this->checkPassword();\\n $this->checkPasswordFormat();\\n $this->ifPasswordsAreDifferent();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d96caa7bbaf5f2892f18fea08c48669d\",\n \"score\": \"0.7146473\",\n \"text\": \"public function error_msg_print() {\\r\\n echo \\\"
\\\";\\r\\n for ($i=0; $i err_msgs); $i++) {\\r\\n echo $this->err_msgs[$i];\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce0cf4e976c08c0969250d95d2bb0d2b\",\n \"score\": \"0.7145055\",\n \"text\": \"public function error($message) {\\n // TODO: jeo - we need to use stderr for these.\\n echo $this->formatDate( time() ) . ' - ' . $message . \\\"\\\\n\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a77406bd22f19fef97d9667d51071111\",\n \"score\": \"0.71446735\",\n \"text\": \"function error($msg = NULL) {\\n\\tif ($msg) {\\n\\t\\techo \\\"Error: \\\" . $msg; \\n\\t} else {\\n\\t\\techo \\\"0\\\"; \\n\\t}\\t\\n\\tdie(); \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4cb788d697890ba0e0f6f2fe11f3a36b\",\n \"score\": \"0.71444744\",\n \"text\": \"function printError(int $code) : void\\n {\\n $begin = '

';\\n $message = '';\\n $end = '

';\\n\\n switch($code)\\n {\\n case 0: break;\\n case 1: $message = 'Please provide input.';\\n break;\\n case 2: $message = 'Input is not valid.';\\n break;\\n case 3: $message = 'Awaiting input...';\\n break;\\n default: $message = 'Something went wrong.';\\n break;\\n }\\n print($begin . $message . $end);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb3d532b89cf8b92cb2b474c1d48e719\",\n \"score\": \"0.7139431\",\n \"text\": \"public function printErrorLog() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f40dc28927cbe4344e218f6eb43f007d\",\n \"score\": \"0.7131707\",\n \"text\": \"protected function error($message)\\n {\\n $this->output->writeln(\\\"{$message}\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76155793a79e49d6aabe51fbe5fc1182\",\n \"score\": \"0.71190923\",\n \"text\": \"public function error(): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76155793a79e49d6aabe51fbe5fc1182\",\n \"score\": \"0.71190923\",\n \"text\": \"public function error(): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0bc560eb6abbd4bbc705719312c4037\",\n \"score\": \"0.71062565\",\n \"text\": \"function printError(){\\n?>\\t

Error! Invalid data.

\\n\\t

We're sorry. You submitted invalid user information. Please go back and try again.

\\n\\\";\\n var_dump( $text );\\n echo \\\"
\\\";\\n die('ok');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f76d61db6bcd528ee58b947269693111\",\n \"score\": \"0.7099591\",\n \"text\": \"public function error()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dffde826001e49c829d4c4913ea816c1\",\n \"score\": \"0.70992815\",\n \"text\": \"function ShowLastError()\\n {\\n printf(\\\"@E@%s failed\\\\nError Code: %d\\\\nReason: %s\\\\n\\\\n\\\",\\n $this->errorLine,\\n $this->errorNumber,\\n $this->errorReason);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29783e5478a41a346dfe691f2459b480\",\n \"score\": \"0.7096681\",\n \"text\": \"public function display_errors()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8858b6b719e468cb58bf784b5b1da22d\",\n \"score\": \"0.7094188\",\n \"text\": \"public function display_error()\\n {\\n $this->error->display();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff9ec3aaf84e978ce13281945fbe2e33\",\n \"score\": \"0.7093242\",\n \"text\": \"abstract protected function displayFailure($msg);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b48f7edf04f3eeb640679fc93dcf749\",\n \"score\": \"0.70926917\",\n \"text\": \"function usageError($message)\\n {\\n echo \\\"Error: $message\\\\n\\\\n\\\";\\n exit(1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b48f7edf04f3eeb640679fc93dcf749\",\n \"score\": \"0.70926917\",\n \"text\": \"function usageError($message)\\n {\\n echo \\\"Error: $message\\\\n\\\\n\\\";\\n exit(1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d48b73c9c201e670f191f6ba831666ab\",\n \"score\": \"0.70892715\",\n \"text\": \"function PrintError($error) {\\r\\n print('

' . $error. '

');\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4e885d5f997b3597fb9cbe2d5e9ec89\",\n \"score\": \"0.70887804\",\n \"text\": \"public function error()\\n {\\n $args = func_get_args();\\n foreach ($args as $d) {\\n switch (true) {\\n case (is_string($d)) :\\n echo $d;\\n break;\\n case (is_array($d)) :\\n print_r($d);\\n break;\\n default:\\n var_dump($d);\\n break;\\n }\\n echo PHP_EOL;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ed0bd2a3a72c8764d331ed46bcf133d\",\n \"score\": \"0.70802027\",\n \"text\": \"function handle_error($msg, $ex) {\\n \\theader(\\\"Content-Type: text/plain\\\");\\n \\tprint (\\\"{$msg}\\\\n\\\");\\n \\tprint (\\\"Error details: $ex \\\\n\\\");\\n \\tdie();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4cd248ecac96e2610a34b948caca28b2\",\n \"score\": \"0.70777136\",\n \"text\": \"function customError($errno, $errstr) {\\n echo \\\"Error: [$errno] $errstr
\\\";\\n die();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4aba7c0a4f1c1a8d306f839f1f589ed8\",\n \"score\": \"0.70764923\",\n \"text\": \"function show_error() {\\n if ( $this->ERROR == 'wordpress' ) {\\n print_string( 'new_feed_wordpress', 'bimtwo' );\\n }\\n\\n // make sure there is an error\\n if ( ! $this->simplepie->error() ) {\\n return;\\n }\\n\\n $error = $this->simplepie->error();\\n\\n // simplepie couldn't find a feed\\n if ( preg_match( \\\"!^A feed could not be found at !\\\", $error )) {\\n print_string( \\\"new_feed_nofound_error\\\", 'bimtwo' );\\n } else if ( preg_match( \\\"!time out after!\\\", $error )) {\\n print_string( \\\"new_feed_timeout_error\\\", 'bimtwo' );\\n } else {\\n print_string( \\\"new_feed_noretrieve_error\\\", 'bimtwo' );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fafbe88e9a290be816569b3dbc45ab04\",\n \"score\": \"0.70719904\",\n \"text\": \"public function command_error();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70d7c67fa8bc9cca7254f1d2f19ec664\",\n \"score\": \"0.7066597\",\n \"text\": \"function error($message) {\\n echo $message;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60f42d5dd833c9e28abfcac5ceda21de\",\n \"score\": \"0.7059789\",\n \"text\": \"function error_string();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7f309215c28e5e89ee2be8f120a10d1\",\n \"score\": \"0.70486474\",\n \"text\": \"function report_error( $msg ) {\\n\\tprint 'Error: '.$msg;\\n exit;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7737726ca91262359ad7d935186f0c2c\",\n \"score\": \"0.7027198\",\n \"text\": \"public function actionError() {\\n\\t\\techo \\\"error\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a3de2322493bd8f36df78466d7fa04e\",\n \"score\": \"0.7022906\",\n \"text\": \"public function errorInfo();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae0b36bd13cdfec491158520d1351848\",\n \"score\": \"0.7022449\",\n \"text\": \"static function Error($X){ die(\\\"Error: $X\\\"); }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9305da8f276931b73c5489a9be941a3\",\n \"score\": \"0.70217925\",\n \"text\": \"public function get_error_message()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe1dba34260f1fe89a286fa653df7790\",\n \"score\": \"0.7016594\",\n \"text\": \"function printe($msg) {\\r\\n\\tprintf(\\\"

Debug Error:

%s

\\\", $msg);\\r\\n\\texit(1);\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e7818b9ef90c29197df49afc36b900b\",\n \"score\": \"0.700828\",\n \"text\": \"abstract public function action_error ();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"452a23dace44bbdc649a757224ed2c07\",\n \"score\": \"0.7007079\",\n \"text\": \"function error($msg) { trigger_error($msg, E_USER_ERROR); }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7a8dec8dc74e35b0efe031ef20eceb1\",\n \"score\": \"0.700429\",\n \"text\": \"function paintError($message) {\\n parent::paintError($message);\\n print \\\"Exception: \\\";\\n $breadcrumb = $this->getTestList();\\n array_shift($breadcrumb);\\n print implode(\\\" -&gt; \\\", $breadcrumb);\\n print \\\" -&gt; \\\" . $this->_htmlEntities($message) . \\\"
\\\\n\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1acdc1c4d19a82934fe0f36b7843765c\",\n \"score\": \"0.6999709\",\n \"text\": \"protected function error($nvae) { ; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9aa14e3fd40c6c962b7766690aedab3\",\n \"score\": \"0.698872\",\n \"text\": \"public static function err($message = '') {\\n echo '
';\\n        throw new exception('Error: ' . $message\\n      );        \\n    }\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"f9aa14e3fd40c6c962b7766690aedab3\",\n    \"score\": \"0.698872\",\n    \"text\": \"public static function err($message = '') {\\n        echo '
';\\n        throw new exception('Error: ' . $message\\n      );        \\n    }\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"940c818ea28f3b5094abd8959c70cd09\",\n    \"score\": \"0.6984316\",\n    \"text\": \"function displayError($step) {\\n\\techo '

An error occurred in step '.$step.'

';\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69e17149cae4e6a0b69ec8083b4fe208\",\n \"score\": \"0.6976827\",\n \"text\": \"function print_error($message) {\\n script_print(\\\" ERROR: $message\\\\n\\\", SCRIPT_COLOR_FAIL);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a5e4f0003af3e5e5d1ec551da777993\",\n \"score\": \"0.69710326\",\n \"text\": \"public function log_errors()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2aa49ea55366f8f638bee325cbece738\",\n \"score\": \"0.69611895\",\n \"text\": \"function admin_error($title, $message = '')\\n {\\n admin_info($title, $message, 'error');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2aa49ea55366f8f638bee325cbece738\",\n \"score\": \"0.69611895\",\n \"text\": \"function admin_error($title, $message = '')\\n {\\n admin_info($title, $message, 'error');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2aa49ea55366f8f638bee325cbece738\",\n \"score\": \"0.69611895\",\n \"text\": \"function admin_error($title, $message = '')\\n {\\n admin_info($title, $message, 'error');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93f3d9b66d959ff28541b38a6b3cb419\",\n \"score\": \"0.6934754\",\n \"text\": \"public function errors();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93f3d9b66d959ff28541b38a6b3cb419\",\n \"score\": \"0.6934754\",\n \"text\": \"public function errors();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93f3d9b66d959ff28541b38a6b3cb419\",\n \"score\": \"0.6934754\",\n \"text\": \"public function errors();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc9db30d7aa24198d0dbd3eac22c2f39\",\n \"score\": \"0.6932473\",\n \"text\": \"public function errorShow()\\n\\t{\\n\\t\\t//\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e24e114ac7540ef603f313eb2fde5fa4\",\n \"score\": \"0.69317836\",\n \"text\": \"function getErrorMsg();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc9ac5914173a638a7e667951ec7aebc\",\n \"score\": \"0.69301856\",\n \"text\": \"function died($error) {\\n echo \\\"Please complete all the required fields to continue \\\";\\n echo $error.\\\"

\\\";\\n echo \\\"Please go back and fix these errors.

\\\";\\n die();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d99bd64d5565e19cb3dfef34e9ff679\",\n \"score\": \"0.69244796\",\n \"text\": \"public function error($string) {\\n $this->output->writeln(\\\"$string\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e1969c09955b126ac2162b8fd83cfa8\",\n \"score\": \"0.69214606\",\n \"text\": \"function error($description)\\n{\\n html_start();\\n echo \\\"
\\\\n\\\";\\n    echo htmlentities($description);\\n    echo \\\"\\\\n\\\";\\n    print_debug_backtrace();\\n    html_end();\\n    exit;\\n}\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"488d17c6fd48f832c9a7d8442c3aa62c\",\n    \"score\": \"0.6919378\",\n    \"text\": \"public function getError(){\\n\\n    // ve(\\\"show_error = \\\".self::$show_error);\\n\\n        if(self::$show_error){\\n\\n            echo \\\"
\\\";\\n            if(self::$db_error){\\n                foreach (self::$db_error as $key => $error) {\\n                    pre(\\\"- DB: \\\".__METHOD__.\\\"[  \\\".self::$target.\\\" ] \\\".$error.\\\"\\\",'left','ltr','#F33000');\\n             // trigger_error(self::$target.\\\" \\\".$error) ; //set as php runtime error.\\n                }\\n            }else{\\n                echo \\\"no Errors\\\";\\n            }\\n            echo \\\"
\\\";\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e009fd0969642a99a9ae546bcdc1b3e6\",\n \"score\": \"0.6917245\",\n \"text\": \"function Error($msg){\\r\\n\\r\\n\\t // Show the error\\r\\n\\t echo('[-] '.trim($msg).\\\"\\\\n\\\");\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9d8968ee77cfff919c67c0dfb009454\",\n \"score\": \"0.6916132\",\n \"text\": \"function print_errors($msg) {\\n header(\\\"HTTP/1.1 400 Invalid Request\\\");\\n header(\\\"Content-type: text/plain\\\");\\n echo $msg;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8bf961a0ae7897e6d09255897625934a\",\n \"score\": \"0.6908824\",\n \"text\": \"protected function errorAction() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2735dada6e5a448bca31dc8b26ab652\",\n \"score\": \"0.6906669\",\n \"text\": \"public function error($message);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5bdb07ad8097cbec6055190b9d9f9b19\",\n \"score\": \"0.6904187\",\n \"text\": \"function err($string)\\n{\\n\\t// Annoying PHP: we need to import global variables here...\\n\\tglobal $title;\\n\\tif (NONINTERACTIVE) error($string);\\n\\n\\trequire(LIBWWWDIR . '/header.php');\\n\\n\\techo \\\"

Submit - error

\\\\n\\\\n\\\";\\n\\n\\techo '
';\\n\\tlogmsg(LOG_WARNING, $string);\\n\\techo '
';\\n\\n\\trequire(LIBWWWDIR . '/footer.php');\\n\\texit;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"640e713fe52c177e0cc4aeedbb36d412\",\n \"score\": \"0.68889695\",\n \"text\": \"public static function error($message) {\\r\\n self::writeLine('ERROR | ' . $message);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec7df0d3237333e4aefdc577a1ae89e2\",\n \"score\": \"0.6885041\",\n \"text\": \"abstract public function getMsgError();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f62e4a418633b88a019ce86c4d7dd985\",\n \"score\": \"0.68810546\",\n \"text\": \"public function getError ();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dfdee70032cedf2ef9a199158ed8cdaa\",\n \"score\": \"0.6867589\",\n \"text\": \"private function error()\\n\\t{\\n\\t\\t$file = '';\\n\\t\\t$line = 0;\\n\\n\\t\\t$message = 'Illegal use of $' . $this->name . '. You must use the request class to access input data. Found in %s on line %d. This error message was generated by deactivated_super_global.';\\n\\n\\t\\t$backtrace = debug_backtrace();\\n\\t\\tif (isset($backtrace[1]))\\n\\t\\t{\\n\\t\\t\\t$file = $backtrace[1]['file'];\\n\\t\\t\\t$line = $backtrace[1]['line'];\\n\\t\\t}\\n\\t\\ttrigger_error(sprintf($message, $file, $line), E_USER_ERROR);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3535075ee5f13ad58a94d734d315f652\",\n \"score\": \"0.6863229\",\n \"text\": \"function died($error) {\\n echo \\\"มีข้อผิดพลาดเกิดขึ้น\\\";\\n echo \\\"ด้านล่างนี้คือข้อผิดพลาด

\\\";\\n echo $error.\\\"

\\\";\\n echo \\\"กรุณาแก้ข้อผิดพลาดเหล่านี้

\\\";\\n die();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"956aefd4a2adaa335d5ecb92c0e12321\",\n \"score\": \"0.68611866\",\n \"text\": \"function error($message) \\n {\\n if ( $this->_level | self::ERROR ) {\\n $this->_app->getService('response')->writeLine(\\n 'ERROR : ' . $message\\n );\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1874fee03259d475d4e629d7dd50ef70\",\n \"score\": \"0.68583316\",\n \"text\": \"function error($params) {\\n\\t\\textract($params, EXTR_OVERWRITE);\\n\\t\\t$this->stderr($code . $name . $message.\\\"\\\\n\\\");\\n\\t\\t$this->_stop(1);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61e01867231f2b93a509f61acbc04212\",\n \"score\": \"0.6856762\",\n \"text\": \"function print_errors($error_nodes) {\\n\\t\\tprint \\\"There was an error processing your request:\\\\n\\\";\\n\\t\\tforeach ($error_nodes as $error) {\\n\\t\\t\\tprint \\\" Error code: \\\" . $error->Code . \\\"\\\\n\\\";\\n\\t\\t\\tprint \\\" Error message: \\\" . $error->Message . \\\"\\\\n\\\";\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1954bd3a446fa4183b029739790e3492\",\n \"score\": \"0.68472767\",\n \"text\": \"private function error($message)\\n {\\n $this->write(''.$message.'', 'white', 'red');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db3f6ccacc47eaac8ba46f28ebb07f0d\",\n \"score\": \"0.6840599\",\n \"text\": \"function outputURLError()\\r\\n {\\r\\n\\r\\n $this->outputError(\\\"400\\\", \\\"error\\\", \\\"Query failed\\\", \\\"URL string has incorrect format.\\\");\\r\\n\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6371c7b26393139c1cf96bccacb6e12d\",\n \"score\": \"0.6840179\",\n \"text\": \"function displayError($errMessage)\\n {\\n global $args;\\n\\n if (is_writable('./')) {\\n $f=fopen(\\\"ydbmigrate.lasterror\\\",\\\"w\\\");\\n fwrite($f,$errMessage);\\n fclose($f);\\n }\\n\\n $args->setArgValue('help',__TRUE__);\\n die(\\\"\\\\n$errMessage\\\\n\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6e65df98f148937bff0556f1694feef\",\n \"score\": \"0.6839861\",\n \"text\": \"function show_error($message)\\n\\t{\\n\\t\\t// require template\\n require_once(\\\"error.php\\\");\\n\\n // exit immediately since we're apologizing\\n exit;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1134ac0f7bc42e8f5746ba17318cbd0a\",\n \"score\": \"0.68363446\",\n \"text\": \"public function error($msg) {\\r\\n\\t\\t$this->writeLn('ERROR', $msg);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98e377edb48e54f1f9bbaba13abf1fb8\",\n \"score\": \"0.6833947\",\n \"text\": \"function get_error($input)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d97e29562d21e87cad45d5f1983e1f2c\",\n \"score\": \"0.6828913\",\n \"text\": \"function IT_Error($msg, $file = __FILE__, $line = __LINE__)\\n {\\n\\n $this->PEAR_Error(sprintf(\\\"%s [%s on line %d].\\\", $msg, $file, $line));\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"888f2f31a079ebdd165a2ff6fa08c4c8\",\n \"score\": \"0.68159306\",\n \"text\": \"function died($error) {\\n\\t\\t\\t\\t\\t\\t\\t\\t $displayError = \\\"We are very sorry, but there were error(s) found with the form you submitted. These errors appear below.

\\\".$error.\\\"

\\\".\\\"Please go back and fix these errors.

\\\";\\n\\t\\t\\t\\t\\t\\t\\t\\t die();\\n\\t\\t\\t\\t\\t\\t\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3cd3d5e923f259a83e751c1eba57af4\",\n \"score\": \"0.6814875\",\n \"text\": \"function died($error) {\\n\\t\\t\\t\\t\\techo \\\"We are very sorry, but there were error(s) found with the form you submitted. \\\";\\n\\t\\t\\t\\t\\techo \\\"These errors appear below.

\\\";\\n\\t\\t\\t\\t\\techo $error.\\\"

\\\";\\n\\t\\t\\t\\t\\techo \\\"Please go back and fix these errors.

\\\";\\n\\t\\t\\t\\t\\tdie();\\n\\t\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3cd3d5e923f259a83e751c1eba57af4\",\n \"score\": \"0.6814875\",\n \"text\": \"function died($error) {\\n\\t\\t\\t\\t\\techo \\\"We are very sorry, but there were error(s) found with the form you submitted. \\\";\\n\\t\\t\\t\\t\\techo \\\"These errors appear below.

\\\";\\n\\t\\t\\t\\t\\techo $error.\\\"

\\\";\\n\\t\\t\\t\\t\\techo \\\"Please go back and fix these errors.

\\\";\\n\\t\\t\\t\\t\\tdie();\\n\\t\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b00bf79295719bbe078ae3d998030cb7\",\n \"score\": \"0.6806885\",\n \"text\": \"public function usageError($message)\\n {\\n echo \\\"Error: $message\\\\n\\\\n\\\";\\n exit(1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9de21cd943639d55aab66adc76ff85e9\",\n \"score\": \"0.6800173\",\n \"text\": \"function printError($key)\\n {\\n if ($this->_error[$key]) {\\n print ''.$this->_error[$key].'';\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b254d652df04b15bb19807805e7d0121\",\n \"score\": \"0.6794334\",\n \"text\": \"public function getErrorMsg();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b254d652df04b15bb19807805e7d0121\",\n \"score\": \"0.6794334\",\n \"text\": \"public function getErrorMsg();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e50b2ed633afe6ce3678a517e0ae68ec\",\n \"score\": \"0.67922777\",\n \"text\": \"public function actionError()\\r\\n {\\r\\n if ($error = Yii::app()->errorHandler->error)\\r\\n {\\r\\n echo $error['message'];\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51e78e5ccff2a2ac4a7120e3e3c0f86a\",\n \"score\": \"0.6791116\",\n \"text\": \"function _get_error_string()\\n {\\n \\t# Driver specific\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23e5919442d1f735770d1d6f68a082f7\",\n \"score\": \"0.6790401\",\n \"text\": \"function get_errors()\\n {\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":715,"cells":{"query_id":{"kind":"string","value":"787035bc8e3c36432dfee2d0b86d0ddc"},"query":{"kind":"string","value":"Get the path to the application \"app\" directory."},"positive_passages":{"kind":"list like","value":[{"docid":"5a90ce1bb0e4f570beb1c7ad7071d7d8","score":"0.78055686","text":"public function path()\n {\n return $this->basePath.DIRECTORY_SEPARATOR.'app';\n }","title":""}],"string":"[\n {\n \"docid\": \"5a90ce1bb0e4f570beb1c7ad7071d7d8\",\n \"score\": \"0.78055686\",\n \"text\": \"public function path()\\n {\\n return $this->basePath.DIRECTORY_SEPARATOR.'app';\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"3fd785b010911f0c4c87f4fc3ab9e8b6","score":"0.8877233","text":"public function getAppPath() {\n return str_replace('\\\\', '/', realpath($this->appDir));\n }","title":""},{"docid":"a358ecef2daf08ed19a20e085a763d11","score":"0.87416685","text":"public static function getAppDir() {\n\t\treturn self::$app_dir;\n\t}","title":""},{"docid":"67ae9676eabe42ba5bdb508637042579","score":"0.8726361","text":"protected function getAppPath()\n {\n return config()->path->app;\n }","title":""},{"docid":"c212869ca2a9e1b50f917228d9ca7a1d","score":"0.86749697","text":"public function getAppPath()\n\t{\n\t\treturn realpath($this->applicationPath);\n\t}","title":""},{"docid":"9d65f858028b30f048dcdabbef630457","score":"0.85695016","text":"public function getAppPath(){\n\t\treturn $this->getBasePath().$this->getAppFolder().DIRECTORY_SEPARATOR;\n\t}","title":""},{"docid":"922a2e1fbf173484b30d8006074ae1a6","score":"0.84234285","text":"public function getAppDir()\n {\n return $this->_appDir;\n }","title":""},{"docid":"8e10cf01a9acfc30eff778272017cade","score":"0.8411603","text":"protected function getAppFolderPath()\n {\n return $this->laravel->basePath().DIRECTORY_SEPARATOR.'app';\n }","title":""},{"docid":"4018fe43312d41870ed5d4a5b1f927e6","score":"0.8313208","text":"public function getAppPath(): string\n {\n return $this->appPath;\n }","title":""},{"docid":"e6bd0db7e5b00115de62ae8a59abaf90","score":"0.8268232","text":"function app_path()\n {\n return base_path() . '/app';\n }","title":""},{"docid":"dd3039f95f7269ab07864413c57fd59c","score":"0.82431394","text":"private function getAppRootDir()\n {\n return $this->container->get('app.parameter_bag')->get('kernel.project_dir');\n }","title":""},{"docid":"5103a6ed9555367308f59ae1e50758a4","score":"0.8243135","text":"public function appPath()\r\n {\r\n return $this->appPath;\r\n }","title":""},{"docid":"c7f10ead41d6eb3d5431c1ab05441d2d","score":"0.8147497","text":"protected function appPath() : string\n {\n if (defined('APP_ROOT')) {\n return APP_ROOT;\n }\n if (isset($_ENV['APP_BASE_PATH'])) {\n return $_ENV['APP_BASE_PATH'];\n }\n if (function_exists('app_path')) {\n return app_path();\n }\n // Try to guess relative from vendor\n return realpath(__DIR__.'/../../../../..');\n }","title":""},{"docid":"103a8cf754d57128b12c3c089c6f19ed","score":"0.7908102","text":"public static function path(){\n\t\t\treturn CFG::get('ABS_K2F').'apps/'.get_class(self::instance()).'/';\n\t\t}","title":""},{"docid":"c1b4284dff45bfae59673fc8e307d7a6","score":"0.77464545","text":"public function getApplicationRoot()\n {\n return atkconfig('application_dir');\n }","title":""},{"docid":"db6631b69a234a43be8c5aa6c4707642","score":"0.7646897","text":"static public function getPath()\n {\n return sfConfig::get('sf_config_dir').'/app.yml';\n }","title":""},{"docid":"199d0c12840b8a81df7adb4420c0cd60","score":"0.76046205","text":"protected function applicationDirectory(){\n $webRoot = $_SERVER['DOCUMENT_ROOT'];\n $folders = explode('/',$webRoot);\n\n $newFolders = array_slice($folders, 0, -1);\n return implode('/', $newFolders);\n }","title":""},{"docid":"a13680d75dd6b725a3e7550e2cea12e1","score":"0.7511409","text":"public function applicationDir(string $path = ''): string {\n return $this->rootDir('app') . ($path ? \"/{$path}\" : '');\n }","title":""},{"docid":"832b92467bc663c64d8bd42e4df3007a","score":"0.75094455","text":"public function getApplicationDirectory () : string {\n return $this->applicationDirectory;\n }","title":""},{"docid":"0a907e9db4d045b74fde908aa274dbc0","score":"0.7503668","text":"protected function getAppPath($path = null)\n {\n return $this->getStubPath('app'.($path ? '/'.$path : ''));\n }","title":""},{"docid":"51a3a96b32077bd0c992b7714517e093","score":"0.7469347","text":"function app_path($path = '')\n {\n return app('path') . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }","title":""},{"docid":"fbf2724d69604092de1f0d81f36a2170","score":"0.7460959","text":"public function getAppsDir() {\n if (strpos(php_uname(), \"OS400\") !== false) {\n return self::DIR_APPS_I5;\n }\n \n return self::DIR_APPS;\n }","title":""},{"docid":"f8f57704f4ac88b3eff1741efcfa9ee9","score":"0.7435807","text":"protected function getWebappPath()\n {\n return $this->getServletConfig()->getWebappPath();\n }","title":""},{"docid":"941a15352d23b1750077b1201dbe70cb","score":"0.7362219","text":"public function getBaseDir()\n\t{\n\t\treturn $this->exedra->getBaseDir().'/'.$this->getAppName();\n\t}","title":""},{"docid":"51f25797860eb4a68882f9809d18d08f","score":"0.7310263","text":"public final function getApplicationBaseDir()\n\t{\n\t\treturn $this->m_basedir;\n\t}","title":""},{"docid":"cb432b55333cba6273cbf18f238a3db1","score":"0.72846955","text":"protected function getDefaultAppBasePath(): string\n {\n return env(static::ENV_NAME_APP_BASE_PATH) ?? $_ENV[static::ENV_NAME_APP_BASE_PATH] ?? \\dirname(__DIR__, 5);\n }","title":""},{"docid":"2e16cb952aab6f600055f1944cfbc2c0","score":"0.72558326","text":"static public function appRoot() {\n\t\treturn self::$root;\n\t}","title":""},{"docid":"74f12a1df3f5c0d8442fcc8be096c0a7","score":"0.7208966","text":"public static function APP_ROOT()\n {\n return self::$APP_ROOT;\n }","title":""},{"docid":"a2f40ba496ce59b9aa90d28ae12913bd","score":"0.7198173","text":"protected function getApplicationConfigPath()\n {\n return $this->app->basePath('config/api.php');\n }","title":""},{"docid":"90b19a5433e9799804085197905672bb","score":"0.7179756","text":"public function getApplicationRoot();","title":""},{"docid":"9732a43e98a14097813a5d0ba0545866","score":"0.7158976","text":"public function getAppConfig()\n {\n return self::cleanPath(dirname(VENDOR_PATH) . DS . 'app' . DS . 'config' . DS . 'main.php');\n }","title":""},{"docid":"4578daf5bc818fb7b3a15c20971848cf","score":"0.7148916","text":"protected function getDestinationPath()\n {\n return app_path();\n }","title":""},{"docid":"307c850656e3be158e29f6a861c6fb3c","score":"0.71375906","text":"public static function GetPath(): string {\n return __DIR__;\n }","title":""},{"docid":"c846a4cc92c9c2a77b3e3378c81c25f2","score":"0.71259457","text":"public static function get_path() {\n return dirname( __DIR__ );\n }","title":""},{"docid":"8a5388c0e63928c6480b6afc5a9b8f2f","score":"0.7066076","text":"public static function getBundleDir() {\n return realpath(__DIR__ );\n }","title":""},{"docid":"8507ad15200a3e50340f5f02f4d6f444","score":"0.7043717","text":"function get_web_root() {\r\n $uri = substr( __FILE__, strlen( $_SERVER[ 'DOCUMENT_ROOT' ] ) );\r\n\r\n // Split for unix\r\n $dirs = explode('/', $uri);\r\n\r\n try {\r\n // make an absolute url that points to the base of the app\r\n @ $app_path = '/' . $dirs[1] . '/';\r\n } catch (Exception $e) {\r\n // Split for windows in case the unix version doesn't work.\r\n $dirs = explode('\\\\', $uri);\r\n $app_path = '/' . $dirs[1] . '/';\r\n }\r\n \r\n return $app_path;\r\n}","title":""},{"docid":"f740eb97067c31009c9d871325da6160","score":"0.697008","text":"public function getAppName() {\n return basename($this->getAppPath() . '/');\n }","title":""},{"docid":"105cbbe0f14a0d85c9af57b92f6ee959","score":"0.6966292","text":"static function root (): string {\n return substr(__DIR__, 0, -1 * strlen(\"vendor/arshwell/monolith/src\"));\n }","title":""},{"docid":"99e9bc124f4a542a069b01ca873a17a3","score":"0.6965053","text":"function get_app_dir($modulename) {\n\treturn is_dir(MODULE_DIR. '/'. $modulename) ? MODULE_DIR.'/'.$modulename : false;\n}","title":""},{"docid":"b2d7b82a544920ab0cbbe8ad536b8c8e","score":"0.6909473","text":"protected function getAppPath($name)\n {\n $name = Str::replaceFirst($this->laravel->getNamespace(), '', $name);\n\n return $this->laravel['path'].'/'.str_replace('\\\\', '/', $name).'.php';\n }","title":""},{"docid":"c29555ea0c6e966173b32c9a1405318f","score":"0.6867018","text":"function app_path() {\n return path('app');\n}","title":""},{"docid":"1025f771f5bd90ae7dbeec7ed3b26b84","score":"0.685002","text":"function get_app_dir_under_construction() {\n\treturn MODULE_DIR. '/under_construction';\n}","title":""},{"docid":"a81f54ed7efd0b09e1099b08be93a425","score":"0.6809295","text":"public function getPath()\n {\n return APPLICATION_PATH . self::PATH;\n }","title":""},{"docid":"72e5c4ccd4f3c201770931d9581a78ab","score":"0.6752673","text":"protected function getProjectRoot()\n {\n return dirname(__DIR__);\n }","title":""},{"docid":"1421ac2e65cf1602ce6e6d0cacf169b5","score":"0.6724568","text":"protected function getPath() : string\n\t{\n\t\treturn dirname(__DIR__, 3) . '/';\n\t}","title":""},{"docid":"c23a887b1446357db741be579367514f","score":"0.66998464","text":"public static function path(){\n\t\treturn $_SERVER['DOCUMENT_ROOT'];\n\t}","title":""},{"docid":"8b400be40e12710d4271c02ccf8f134c","score":"0.66958785","text":"function app_path($path = '')\n{\n return base_path('app/' . $path);\n}","title":""},{"docid":"5e47de895e42090a67a5f20fe6630ff8","score":"0.6695472","text":"function app_path(?string $relative = null): string\n {\n return app('path.app') . DIRECTORY_SEPARATOR . $relative;\n }","title":""},{"docid":"be8691b10da71d40aef2fbde49e09b6f","score":"0.6693014","text":"protected function getDefaultAppBootstrapPath(): string\n {\n return env(static::ENV_NAME_APP_BOOTSTRAP_PATH) ?? $_ENV[static::ENV_NAME_APP_BOOTSTRAP_PATH] ?? '/bootstrap/app.php';\n }","title":""},{"docid":"36e3ba53f3cc68af84b3df2ef9a7503c","score":"0.6691083","text":"protected function getDir()\n {\n return str_replace('\\\\', '/', __DIR__);\n }","title":""},{"docid":"26ad45ddb7b3c41fa86bb44a0a03aea4","score":"0.6686017","text":"public function getRootDir()\n {\n // why does setting above not work ?\n // $this->vmRoot; // __DIR__;\n return '/home/vagrant/symProject/app';\n }","title":""},{"docid":"9bd1affe6a6fc80a5d462b52aef0bdee","score":"0.66847897","text":"public static function getRootPath(){\n return (string) FrameWork::$rootPath;\n }","title":""},{"docid":"d8e805da130a4acaa4ab1e7152659ece","score":"0.66844046","text":"protected function getRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/';\n }","title":""},{"docid":"d67c7475961ef7d4ee5d0fc4409b27e7","score":"0.66465473","text":"function dirPath () { return (\"../../\"); }","title":""},{"docid":"bad4a794ca19764dab35cd709a6855c9","score":"0.6631665","text":"public static function root_folder()\n {\n return Config::inst()->get(__CLASS__, 'root_folder') ?? ASSETS_PATH;\n }","title":""},{"docid":"4d9a9e5f333626af466cda67dcf7630c","score":"0.66168386","text":"public function getBasePath()\n {\n return dirname(__DIR__);\n }","title":""},{"docid":"4674ac615d4c93b25abbde7577e0170c","score":"0.65718913","text":"public static function getBaseDir() {\n \n return dirname(__DIR__);\n }","title":""},{"docid":"7bdc0a58457225920759a8bd17991f6c","score":"0.65619564","text":"protected function getFrameworkDir()\n {\n return marm_shopgate::getOxConfig()->getConfigParam(\n 'sShopDir'\n ) . DIRECTORY_SEPARATOR . self::FRAMEWORK_DIR . DIRECTORY_SEPARATOR;\n }","title":""},{"docid":"d5b1c2fa1e500066574ce5087e50c6d1","score":"0.654438","text":"protected function getRootDir()\n {\n return $this->config['rootDir'];\n }","title":""},{"docid":"f490c03c5d272f06f66a6661984e7fe0","score":"0.65413785","text":"function dirPath() { return (\"../../\"); }","title":""},{"docid":"bc90d04908acc72f650dd91c9ab32a8c","score":"0.65270495","text":"public function getPath ()\n\t{\n\t\treturn dirname ( dirname ( __FILE__ ) );\n\t}","title":""},{"docid":"1f7133de493de9811537d1b149f98de3","score":"0.65098643","text":"public static function getModulePath()\n {\n return dirname(__DIR__);\n }","title":""},{"docid":"8ab3fe302a1886f7224c3c11aad9d10d","score":"0.649797","text":"static function AppBundlesFolder()\n {\n return Path::Combine(PHINE_PATH, 'App/Phine/Bundles');\n }","title":""},{"docid":"b2e64e001c2119a1b326dd0182a75877","score":"0.6494931","text":"protected function projectRootAbsolutePath()\n {\n return realpath(__DIR__ . '/../../../../');\n }","title":""},{"docid":"84c7bff84896581c5fffe9e04b56210e","score":"0.64885664","text":"private function getBasePath(Application $application)\n {\n return sprintf(\n '%s/%s',\n $this->buildsApplicationDir,\n $application->getSlug()\n );\n }","title":""},{"docid":"928e946e40205a318da6f5109dcbd6e1","score":"0.64580184","text":"public function configPath()\n {\n return $this->basePath.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'config';\n }","title":""},{"docid":"04465bab70879b8155acfd235cf2039a","score":"0.6456082","text":"public function getDir(){\n\t\t$module = $this->getModuleName();\n\t\treturn System::get()->moduleDir() . $module;\n\t}","title":""},{"docid":"5d2a10fc0955b4918d67204f7520bdb0","score":"0.64554995","text":"public function getProjectDir()\n {\n if (file_exists(__DIR__.'/../../../../composer.json')) {\n return realpath(__DIR__.'/../../../..');\n }\n\n return parent::getProjectDir();\n }","title":""},{"docid":"96ce576a3c18d335aa6074315ecfd500","score":"0.6448864","text":"public function getApp() : ? string\n {\n return $this->app;\n }","title":""},{"docid":"4d276d0c82c1061319914caddc66179d","score":"0.6445638","text":"public static function wbAppGenPath($path = '')\n {\n return Path::rootConcatPath(APP_WORKBENCH_ROOT, self::WB_APP_GEN, $path);\n }","title":""},{"docid":"14064d3a48856dd90eab054ec9ec7f61","score":"0.6445493","text":"public function getAppBaseUrl(){\n \n return UrlFacade::to('/').'/';\n }","title":""},{"docid":"3c7e6abe5159baf079b17e0ead3d1f9f","score":"0.64356446","text":"public function path($path = '')\n {\n $appPath = $this->appPath ?: $this->basePath . DIRECTORY_SEPARATOR . 'app';\n return $appPath . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }","title":""},{"docid":"dc4e67ea9e41b79f7a4be7672ca09d8d","score":"0.64327776","text":"public function getBasePath()\r\n {\r\n return getcwd();\r\n }","title":""},{"docid":"896f674d2871e3235c393b26bb9f9e6d","score":"0.64311713","text":"public function getBasePath()\n {\n return realpath(__DIR__ . '/../..');\n }","title":""},{"docid":"5d0c6ab62ef30c0acc90ac0ce15f6ff9","score":"0.64228797","text":"protected function getDir()\n {\n return __DIR__ . self::FILE_DIR;\n }","title":""},{"docid":"84171716a1a77646e2c0603beac2e954","score":"0.64223146","text":"private function getConfigDir(): string\n {\n return $this->getProjectDir().'/config';\n }","title":""},{"docid":"8d2aeab81d557ef593946e7b5a05eacf","score":"0.6415186","text":"private function getAppScript() {\n\n\t\t// return get_template_directory_uri() . '/dist/' . $this->manifest['app.js'];\n\t\treturn get_home_url() . $this->manifest['app.js'];\n\t}","title":""},{"docid":"d4c5b19bf29917f1b92f21ea049d72fb","score":"0.6411178","text":"public static function get_path() {\n\t\treturn self::get_package()->get_path();\n\t}","title":""},{"docid":"29714a009c2e3eacc117bafd3f25cf63","score":"0.64103293","text":"public static function path()\n {\n return getcwd();\n }","title":""},{"docid":"8535a5143b5b2c4c13fda452116f1de4","score":"0.6377574","text":"public function appPath(string $path = '', string $extension = 'php')\n {\n return $this->appPath . ($path ? DIRECTORY_SEPARATOR . $path . ($extension ? '.' . $extension : '') : $path);\n }","title":""},{"docid":"a81814fadf3735630af576da2c91eba0","score":"0.6376201","text":"protected function getAppComposer(): string\n {\n return ((new Filesystem())->closest($this->path(), 'composer.json')) ?? $this->basePath('composer.json');\n }","title":""},{"docid":"804a940a6c14fa0fed3d0375fdc97096","score":"0.6355365","text":"protected function getBinDir(): string\n {\n return __DIR__ . '/../bin';\n }","title":""},{"docid":"369d5e3a0e4674aec4ee2ec24927be2d","score":"0.6350954","text":"function getStarterKitPath()\n\t{\n\t\tstatic $starterKitPath = null;\n\t\t\n\t\tif ($starterKitPath === NULL)\n\t\t{\n\t\t\t$trace = debug_backtrace();\n\t\t\t$starterKitPath = dirname( $trace[1]['file'] );\n\t\t}\n\n\t\treturn $starterKitPath;\n\t}","title":""},{"docid":"d3a32e4f0e992bbc7ea30a2203a8f812","score":"0.63483083","text":"final public function getProjectSystemPath(): string\n {\n return $this->appKernel->getProjectDir();\n }","title":""},{"docid":"849fb52984cb8bec3ded931727137456","score":"0.6346744","text":"public static function getDocumentRoot(): string\n {\n if (array_key_exists('DOCUMENT_ROOT', $_SERVER)) {\n return $_SERVER['DOCUMENT_ROOT'];\n } else {\n $dirArray = explode(DIRECTORY_SEPARATOR, __DIR__);\n return implode(DIRECTORY_SEPARATOR, array_slice($dirArray, 0, count($dirArray) - 3));\n }\n }","title":""},{"docid":"dda819b3aebc0a39f7e43d99b06ce8eb","score":"0.6340376","text":"public static function getVarPath($app = null) \n {\n $path = VPATH_BASE.DS.'var';\n \n if (!empty($app)) {\n $path .= DS.$app;\n } \n return $path;\n }","title":""},{"docid":"37290aeec74df562d4ee0983a6f7d5e5","score":"0.6329874","text":"public function getRootDir()\n\t{\n\t\treturn XenForo_Autoloader::getInstance()->getRootDir();\n\t}","title":""},{"docid":"d86deaa03f6250ff638cf90e64bcfa50","score":"0.63233876","text":"private function getAppScript() {\n\n\t\t// return get_template_directory_uri() . '/dist/' . $this->manifest['app.js'];\n\t\treturn $this->manifest['app.js'];\n\t}","title":""},{"docid":"172b475d3b6ac7698cd79de968c5d195","score":"0.6322318","text":"protected function getBasePath()\n {\n return getcwd();\n }","title":""},{"docid":"0ca5e16726edec06c0805738ddf1d942","score":"0.63081765","text":"private function getPath(): string\n {\n if ($this->path === null) {\n $this->path = $this->getConfig()->getParameterValue(self::CONFIG_PATH);\n\n if ($this->util->endsWith($this->path, DIRECTORY_SEPARATOR) === false) {\n $this->path .= DIRECTORY_SEPARATOR;\n }\n }\n\n return $this->path;\n }","title":""},{"docid":"1a22cef0eec73ba9d9c669e7b585dad0","score":"0.6307366","text":"public function getPublicPath(Container $app);","title":""},{"docid":"97090059f5d6617ce1df022a9e7b8c2b","score":"0.62973195","text":"function base_path()\n {\n return dirname(__DIR__);\n }","title":""},{"docid":"a09ef211f4a934193e07964501a5463b","score":"0.62905926","text":"public static function siteRootDir() : string {\n return _assbase::siteRootDir_($_SERVER['PHP_SELF']);\n }","title":""},{"docid":"08042dd21963748ad4433af0226674b9","score":"0.62899345","text":"public function getApplicationPaths()\n {\n return $this->applicationPaths;\n }","title":""},{"docid":"363102f095dfc72b005aa70c3211721a","score":"0.6288634","text":"public function getAppTempDir()\n {\n return $this->_bootstrap->getApplication()->getTempDir();\n }","title":""},{"docid":"801c14477dcd0863b6298e3156ce3ebe","score":"0.6280069","text":"public function getRootDir()\n {\n return($this->rootDir);\n }","title":""},{"docid":"1f39ce585e5acbd82e3979d66b59a668","score":"0.62576956","text":"function getSiteRootDir() {\n\t\treturn BinCommon::getSiteRootDir();\n\t}","title":""},{"docid":"02329f95538470fa7aa8d71b834ea44f","score":"0.6257034","text":"public function serverPath(){\n $result = $_SERVER['DOCUMENT_ROOT'];\n return $result;\n }","title":""},{"docid":"09368f1cae9f8ea3378f84286e9786b8","score":"0.6252916","text":"public function getAppBase();","title":""}],"string":"[\n {\n \"docid\": \"3fd785b010911f0c4c87f4fc3ab9e8b6\",\n \"score\": \"0.8877233\",\n \"text\": \"public function getAppPath() {\\n return str_replace('\\\\\\\\', '/', realpath($this->appDir));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a358ecef2daf08ed19a20e085a763d11\",\n \"score\": \"0.87416685\",\n \"text\": \"public static function getAppDir() {\\n\\t\\treturn self::$app_dir;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67ae9676eabe42ba5bdb508637042579\",\n \"score\": \"0.8726361\",\n \"text\": \"protected function getAppPath()\\n {\\n return config()->path->app;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c212869ca2a9e1b50f917228d9ca7a1d\",\n \"score\": \"0.86749697\",\n \"text\": \"public function getAppPath()\\n\\t{\\n\\t\\treturn realpath($this->applicationPath);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d65f858028b30f048dcdabbef630457\",\n \"score\": \"0.85695016\",\n \"text\": \"public function getAppPath(){\\n\\t\\treturn $this->getBasePath().$this->getAppFolder().DIRECTORY_SEPARATOR;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"922a2e1fbf173484b30d8006074ae1a6\",\n \"score\": \"0.84234285\",\n \"text\": \"public function getAppDir()\\n {\\n return $this->_appDir;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e10cf01a9acfc30eff778272017cade\",\n \"score\": \"0.8411603\",\n \"text\": \"protected function getAppFolderPath()\\n {\\n return $this->laravel->basePath().DIRECTORY_SEPARATOR.'app';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4018fe43312d41870ed5d4a5b1f927e6\",\n \"score\": \"0.8313208\",\n \"text\": \"public function getAppPath(): string\\n {\\n return $this->appPath;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6bd0db7e5b00115de62ae8a59abaf90\",\n \"score\": \"0.8268232\",\n \"text\": \"function app_path()\\n {\\n return base_path() . '/app';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd3039f95f7269ab07864413c57fd59c\",\n \"score\": \"0.82431394\",\n \"text\": \"private function getAppRootDir()\\n {\\n return $this->container->get('app.parameter_bag')->get('kernel.project_dir');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5103a6ed9555367308f59ae1e50758a4\",\n \"score\": \"0.8243135\",\n \"text\": \"public function appPath()\\r\\n {\\r\\n return $this->appPath;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7f10ead41d6eb3d5431c1ab05441d2d\",\n \"score\": \"0.8147497\",\n \"text\": \"protected function appPath() : string\\n {\\n if (defined('APP_ROOT')) {\\n return APP_ROOT;\\n }\\n if (isset($_ENV['APP_BASE_PATH'])) {\\n return $_ENV['APP_BASE_PATH'];\\n }\\n if (function_exists('app_path')) {\\n return app_path();\\n }\\n // Try to guess relative from vendor\\n return realpath(__DIR__.'/../../../../..');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"103a8cf754d57128b12c3c089c6f19ed\",\n \"score\": \"0.7908102\",\n \"text\": \"public static function path(){\\n\\t\\t\\treturn CFG::get('ABS_K2F').'apps/'.get_class(self::instance()).'/';\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1b4284dff45bfae59673fc8e307d7a6\",\n \"score\": \"0.77464545\",\n \"text\": \"public function getApplicationRoot()\\n {\\n return atkconfig('application_dir');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db6631b69a234a43be8c5aa6c4707642\",\n \"score\": \"0.7646897\",\n \"text\": \"static public function getPath()\\n {\\n return sfConfig::get('sf_config_dir').'/app.yml';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"199d0c12840b8a81df7adb4420c0cd60\",\n \"score\": \"0.76046205\",\n \"text\": \"protected function applicationDirectory(){\\n $webRoot = $_SERVER['DOCUMENT_ROOT'];\\n $folders = explode('/',$webRoot);\\n\\n $newFolders = array_slice($folders, 0, -1);\\n return implode('/', $newFolders);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a13680d75dd6b725a3e7550e2cea12e1\",\n \"score\": \"0.7511409\",\n \"text\": \"public function applicationDir(string $path = ''): string {\\n return $this->rootDir('app') . ($path ? \\\"/{$path}\\\" : '');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"832b92467bc663c64d8bd42e4df3007a\",\n \"score\": \"0.75094455\",\n \"text\": \"public function getApplicationDirectory () : string {\\n return $this->applicationDirectory;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a907e9db4d045b74fde908aa274dbc0\",\n \"score\": \"0.7503668\",\n \"text\": \"protected function getAppPath($path = null)\\n {\\n return $this->getStubPath('app'.($path ? '/'.$path : ''));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51a3a96b32077bd0c992b7714517e093\",\n \"score\": \"0.7469347\",\n \"text\": \"function app_path($path = '')\\n {\\n return app('path') . ($path ? DIRECTORY_SEPARATOR . $path : $path);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbf2724d69604092de1f0d81f36a2170\",\n \"score\": \"0.7460959\",\n \"text\": \"public function getAppsDir() {\\n if (strpos(php_uname(), \\\"OS400\\\") !== false) {\\n return self::DIR_APPS_I5;\\n }\\n \\n return self::DIR_APPS;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8f57704f4ac88b3eff1741efcfa9ee9\",\n \"score\": \"0.7435807\",\n \"text\": \"protected function getWebappPath()\\n {\\n return $this->getServletConfig()->getWebappPath();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"941a15352d23b1750077b1201dbe70cb\",\n \"score\": \"0.7362219\",\n \"text\": \"public function getBaseDir()\\n\\t{\\n\\t\\treturn $this->exedra->getBaseDir().'/'.$this->getAppName();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51f25797860eb4a68882f9809d18d08f\",\n \"score\": \"0.7310263\",\n \"text\": \"public final function getApplicationBaseDir()\\n\\t{\\n\\t\\treturn $this->m_basedir;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb432b55333cba6273cbf18f238a3db1\",\n \"score\": \"0.72846955\",\n \"text\": \"protected function getDefaultAppBasePath(): string\\n {\\n return env(static::ENV_NAME_APP_BASE_PATH) ?? $_ENV[static::ENV_NAME_APP_BASE_PATH] ?? \\\\dirname(__DIR__, 5);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e16cb952aab6f600055f1944cfbc2c0\",\n \"score\": \"0.72558326\",\n \"text\": \"static public function appRoot() {\\n\\t\\treturn self::$root;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74f12a1df3f5c0d8442fcc8be096c0a7\",\n \"score\": \"0.7208966\",\n \"text\": \"public static function APP_ROOT()\\n {\\n return self::$APP_ROOT;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2f40ba496ce59b9aa90d28ae12913bd\",\n \"score\": \"0.7198173\",\n \"text\": \"protected function getApplicationConfigPath()\\n {\\n return $this->app->basePath('config/api.php');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90b19a5433e9799804085197905672bb\",\n \"score\": \"0.7179756\",\n \"text\": \"public function getApplicationRoot();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9732a43e98a14097813a5d0ba0545866\",\n \"score\": \"0.7158976\",\n \"text\": \"public function getAppConfig()\\n {\\n return self::cleanPath(dirname(VENDOR_PATH) . DS . 'app' . DS . 'config' . DS . 'main.php');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4578daf5bc818fb7b3a15c20971848cf\",\n \"score\": \"0.7148916\",\n \"text\": \"protected function getDestinationPath()\\n {\\n return app_path();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"307c850656e3be158e29f6a861c6fb3c\",\n \"score\": \"0.71375906\",\n \"text\": \"public static function GetPath(): string {\\n return __DIR__;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c846a4cc92c9c2a77b3e3378c81c25f2\",\n \"score\": \"0.71259457\",\n \"text\": \"public static function get_path() {\\n return dirname( __DIR__ );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a5388c0e63928c6480b6afc5a9b8f2f\",\n \"score\": \"0.7066076\",\n \"text\": \"public static function getBundleDir() {\\n return realpath(__DIR__ );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8507ad15200a3e50340f5f02f4d6f444\",\n \"score\": \"0.7043717\",\n \"text\": \"function get_web_root() {\\r\\n $uri = substr( __FILE__, strlen( $_SERVER[ 'DOCUMENT_ROOT' ] ) );\\r\\n\\r\\n // Split for unix\\r\\n $dirs = explode('/', $uri);\\r\\n\\r\\n try {\\r\\n // make an absolute url that points to the base of the app\\r\\n @ $app_path = '/' . $dirs[1] . '/';\\r\\n } catch (Exception $e) {\\r\\n // Split for windows in case the unix version doesn't work.\\r\\n $dirs = explode('\\\\\\\\', $uri);\\r\\n $app_path = '/' . $dirs[1] . '/';\\r\\n }\\r\\n \\r\\n return $app_path;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f740eb97067c31009c9d871325da6160\",\n \"score\": \"0.697008\",\n \"text\": \"public function getAppName() {\\n return basename($this->getAppPath() . '/');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"105cbbe0f14a0d85c9af57b92f6ee959\",\n \"score\": \"0.6966292\",\n \"text\": \"static function root (): string {\\n return substr(__DIR__, 0, -1 * strlen(\\\"vendor/arshwell/monolith/src\\\"));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99e9bc124f4a542a069b01ca873a17a3\",\n \"score\": \"0.6965053\",\n \"text\": \"function get_app_dir($modulename) {\\n\\treturn is_dir(MODULE_DIR. '/'. $modulename) ? MODULE_DIR.'/'.$modulename : false;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2d7b82a544920ab0cbbe8ad536b8c8e\",\n \"score\": \"0.6909473\",\n \"text\": \"protected function getAppPath($name)\\n {\\n $name = Str::replaceFirst($this->laravel->getNamespace(), '', $name);\\n\\n return $this->laravel['path'].'/'.str_replace('\\\\\\\\', '/', $name).'.php';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c29555ea0c6e966173b32c9a1405318f\",\n \"score\": \"0.6867018\",\n \"text\": \"function app_path() {\\n return path('app');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1025f771f5bd90ae7dbeec7ed3b26b84\",\n \"score\": \"0.685002\",\n \"text\": \"function get_app_dir_under_construction() {\\n\\treturn MODULE_DIR. '/under_construction';\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a81f54ed7efd0b09e1099b08be93a425\",\n \"score\": \"0.6809295\",\n \"text\": \"public function getPath()\\n {\\n return APPLICATION_PATH . self::PATH;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72e5c4ccd4f3c201770931d9581a78ab\",\n \"score\": \"0.6752673\",\n \"text\": \"protected function getProjectRoot()\\n {\\n return dirname(__DIR__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1421ac2e65cf1602ce6e6d0cacf169b5\",\n \"score\": \"0.6724568\",\n \"text\": \"protected function getPath() : string\\n\\t{\\n\\t\\treturn dirname(__DIR__, 3) . '/';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c23a887b1446357db741be579367514f\",\n \"score\": \"0.66998464\",\n \"text\": \"public static function path(){\\n\\t\\treturn $_SERVER['DOCUMENT_ROOT'];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b400be40e12710d4271c02ccf8f134c\",\n \"score\": \"0.66958785\",\n \"text\": \"function app_path($path = '')\\n{\\n return base_path('app/' . $path);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e47de895e42090a67a5f20fe6630ff8\",\n \"score\": \"0.6695472\",\n \"text\": \"function app_path(?string $relative = null): string\\n {\\n return app('path.app') . DIRECTORY_SEPARATOR . $relative;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be8691b10da71d40aef2fbde49e09b6f\",\n \"score\": \"0.6693014\",\n \"text\": \"protected function getDefaultAppBootstrapPath(): string\\n {\\n return env(static::ENV_NAME_APP_BOOTSTRAP_PATH) ?? $_ENV[static::ENV_NAME_APP_BOOTSTRAP_PATH] ?? '/bootstrap/app.php';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36e3ba53f3cc68af84b3df2ef9a7503c\",\n \"score\": \"0.6691083\",\n \"text\": \"protected function getDir()\\n {\\n return str_replace('\\\\\\\\', '/', __DIR__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26ad45ddb7b3c41fa86bb44a0a03aea4\",\n \"score\": \"0.6686017\",\n \"text\": \"public function getRootDir()\\n {\\n // why does setting above not work ?\\n // $this->vmRoot; // __DIR__;\\n return '/home/vagrant/symProject/app';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9bd1affe6a6fc80a5d462b52aef0bdee\",\n \"score\": \"0.66847897\",\n \"text\": \"public static function getRootPath(){\\n return (string) FrameWork::$rootPath;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d8e805da130a4acaa4ab1e7152659ece\",\n \"score\": \"0.66844046\",\n \"text\": \"protected function getRootDir()\\n {\\n // documents should be saved\\n return __DIR__.'/../../../../web/';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d67c7475961ef7d4ee5d0fc4409b27e7\",\n \"score\": \"0.66465473\",\n \"text\": \"function dirPath () { return (\\\"../../\\\"); }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bad4a794ca19764dab35cd709a6855c9\",\n \"score\": \"0.6631665\",\n \"text\": \"public static function root_folder()\\n {\\n return Config::inst()->get(__CLASS__, 'root_folder') ?? ASSETS_PATH;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d9a9e5f333626af466cda67dcf7630c\",\n \"score\": \"0.66168386\",\n \"text\": \"public function getBasePath()\\n {\\n return dirname(__DIR__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4674ac615d4c93b25abbde7577e0170c\",\n \"score\": \"0.65718913\",\n \"text\": \"public static function getBaseDir() {\\n \\n return dirname(__DIR__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7bdc0a58457225920759a8bd17991f6c\",\n \"score\": \"0.65619564\",\n \"text\": \"protected function getFrameworkDir()\\n {\\n return marm_shopgate::getOxConfig()->getConfigParam(\\n 'sShopDir'\\n ) . DIRECTORY_SEPARATOR . self::FRAMEWORK_DIR . DIRECTORY_SEPARATOR;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5b1c2fa1e500066574ce5087e50c6d1\",\n \"score\": \"0.654438\",\n \"text\": \"protected function getRootDir()\\n {\\n return $this->config['rootDir'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f490c03c5d272f06f66a6661984e7fe0\",\n \"score\": \"0.65413785\",\n \"text\": \"function dirPath() { return (\\\"../../\\\"); }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc90d04908acc72f650dd91c9ab32a8c\",\n \"score\": \"0.65270495\",\n \"text\": \"public function getPath ()\\n\\t{\\n\\t\\treturn dirname ( dirname ( __FILE__ ) );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f7133de493de9811537d1b149f98de3\",\n \"score\": \"0.65098643\",\n \"text\": \"public static function getModulePath()\\n {\\n return dirname(__DIR__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ab3fe302a1886f7224c3c11aad9d10d\",\n \"score\": \"0.649797\",\n \"text\": \"static function AppBundlesFolder()\\n {\\n return Path::Combine(PHINE_PATH, 'App/Phine/Bundles');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2e64e001c2119a1b326dd0182a75877\",\n \"score\": \"0.6494931\",\n \"text\": \"protected function projectRootAbsolutePath()\\n {\\n return realpath(__DIR__ . '/../../../../');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84c7bff84896581c5fffe9e04b56210e\",\n \"score\": \"0.64885664\",\n \"text\": \"private function getBasePath(Application $application)\\n {\\n return sprintf(\\n '%s/%s',\\n $this->buildsApplicationDir,\\n $application->getSlug()\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"928e946e40205a318da6f5109dcbd6e1\",\n \"score\": \"0.64580184\",\n \"text\": \"public function configPath()\\n {\\n return $this->basePath.DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'config';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04465bab70879b8155acfd235cf2039a\",\n \"score\": \"0.6456082\",\n \"text\": \"public function getDir(){\\n\\t\\t$module = $this->getModuleName();\\n\\t\\treturn System::get()->moduleDir() . $module;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d2a10fc0955b4918d67204f7520bdb0\",\n \"score\": \"0.64554995\",\n \"text\": \"public function getProjectDir()\\n {\\n if (file_exists(__DIR__.'/../../../../composer.json')) {\\n return realpath(__DIR__.'/../../../..');\\n }\\n\\n return parent::getProjectDir();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96ce576a3c18d335aa6074315ecfd500\",\n \"score\": \"0.6448864\",\n \"text\": \"public function getApp() : ? string\\n {\\n return $this->app;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d276d0c82c1061319914caddc66179d\",\n \"score\": \"0.6445638\",\n \"text\": \"public static function wbAppGenPath($path = '')\\n {\\n return Path::rootConcatPath(APP_WORKBENCH_ROOT, self::WB_APP_GEN, $path);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14064d3a48856dd90eab054ec9ec7f61\",\n \"score\": \"0.6445493\",\n \"text\": \"public function getAppBaseUrl(){\\n \\n return UrlFacade::to('/').'/';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c7e6abe5159baf079b17e0ead3d1f9f\",\n \"score\": \"0.64356446\",\n \"text\": \"public function path($path = '')\\n {\\n $appPath = $this->appPath ?: $this->basePath . DIRECTORY_SEPARATOR . 'app';\\n return $appPath . ($path ? DIRECTORY_SEPARATOR . $path : $path);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc4e67ea9e41b79f7a4be7672ca09d8d\",\n \"score\": \"0.64327776\",\n \"text\": \"public function getBasePath()\\r\\n {\\r\\n return getcwd();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"896f674d2871e3235c393b26bb9f9e6d\",\n \"score\": \"0.64311713\",\n \"text\": \"public function getBasePath()\\n {\\n return realpath(__DIR__ . '/../..');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d0c6ab62ef30c0acc90ac0ce15f6ff9\",\n \"score\": \"0.64228797\",\n \"text\": \"protected function getDir()\\n {\\n return __DIR__ . self::FILE_DIR;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84171716a1a77646e2c0603beac2e954\",\n \"score\": \"0.64223146\",\n \"text\": \"private function getConfigDir(): string\\n {\\n return $this->getProjectDir().'/config';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d2aeab81d557ef593946e7b5a05eacf\",\n \"score\": \"0.6415186\",\n \"text\": \"private function getAppScript() {\\n\\n\\t\\t// return get_template_directory_uri() . '/dist/' . $this->manifest['app.js'];\\n\\t\\treturn get_home_url() . $this->manifest['app.js'];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4c5b19bf29917f1b92f21ea049d72fb\",\n \"score\": \"0.6411178\",\n \"text\": \"public static function get_path() {\\n\\t\\treturn self::get_package()->get_path();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29714a009c2e3eacc117bafd3f25cf63\",\n \"score\": \"0.64103293\",\n \"text\": \"public static function path()\\n {\\n return getcwd();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8535a5143b5b2c4c13fda452116f1de4\",\n \"score\": \"0.6377574\",\n \"text\": \"public function appPath(string $path = '', string $extension = 'php')\\n {\\n return $this->appPath . ($path ? DIRECTORY_SEPARATOR . $path . ($extension ? '.' . $extension : '') : $path);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a81814fadf3735630af576da2c91eba0\",\n \"score\": \"0.6376201\",\n \"text\": \"protected function getAppComposer(): string\\n {\\n return ((new Filesystem())->closest($this->path(), 'composer.json')) ?? $this->basePath('composer.json');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"804a940a6c14fa0fed3d0375fdc97096\",\n \"score\": \"0.6355365\",\n \"text\": \"protected function getBinDir(): string\\n {\\n return __DIR__ . '/../bin';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"369d5e3a0e4674aec4ee2ec24927be2d\",\n \"score\": \"0.6350954\",\n \"text\": \"function getStarterKitPath()\\n\\t{\\n\\t\\tstatic $starterKitPath = null;\\n\\t\\t\\n\\t\\tif ($starterKitPath === NULL)\\n\\t\\t{\\n\\t\\t\\t$trace = debug_backtrace();\\n\\t\\t\\t$starterKitPath = dirname( $trace[1]['file'] );\\n\\t\\t}\\n\\n\\t\\treturn $starterKitPath;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3a32e4f0e992bbc7ea30a2203a8f812\",\n \"score\": \"0.63483083\",\n \"text\": \"final public function getProjectSystemPath(): string\\n {\\n return $this->appKernel->getProjectDir();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"849fb52984cb8bec3ded931727137456\",\n \"score\": \"0.6346744\",\n \"text\": \"public static function getDocumentRoot(): string\\n {\\n if (array_key_exists('DOCUMENT_ROOT', $_SERVER)) {\\n return $_SERVER['DOCUMENT_ROOT'];\\n } else {\\n $dirArray = explode(DIRECTORY_SEPARATOR, __DIR__);\\n return implode(DIRECTORY_SEPARATOR, array_slice($dirArray, 0, count($dirArray) - 3));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dda819b3aebc0a39f7e43d99b06ce8eb\",\n \"score\": \"0.6340376\",\n \"text\": \"public static function getVarPath($app = null) \\n {\\n $path = VPATH_BASE.DS.'var';\\n \\n if (!empty($app)) {\\n $path .= DS.$app;\\n } \\n return $path;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37290aeec74df562d4ee0983a6f7d5e5\",\n \"score\": \"0.6329874\",\n \"text\": \"public function getRootDir()\\n\\t{\\n\\t\\treturn XenForo_Autoloader::getInstance()->getRootDir();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d86deaa03f6250ff638cf90e64bcfa50\",\n \"score\": \"0.63233876\",\n \"text\": \"private function getAppScript() {\\n\\n\\t\\t// return get_template_directory_uri() . '/dist/' . $this->manifest['app.js'];\\n\\t\\treturn $this->manifest['app.js'];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"172b475d3b6ac7698cd79de968c5d195\",\n \"score\": \"0.6322318\",\n \"text\": \"protected function getBasePath()\\n {\\n return getcwd();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ca5e16726edec06c0805738ddf1d942\",\n \"score\": \"0.63081765\",\n \"text\": \"private function getPath(): string\\n {\\n if ($this->path === null) {\\n $this->path = $this->getConfig()->getParameterValue(self::CONFIG_PATH);\\n\\n if ($this->util->endsWith($this->path, DIRECTORY_SEPARATOR) === false) {\\n $this->path .= DIRECTORY_SEPARATOR;\\n }\\n }\\n\\n return $this->path;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a22cef0eec73ba9d9c669e7b585dad0\",\n \"score\": \"0.6307366\",\n \"text\": \"public function getPublicPath(Container $app);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97090059f5d6617ce1df022a9e7b8c2b\",\n \"score\": \"0.62973195\",\n \"text\": \"function base_path()\\n {\\n return dirname(__DIR__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a09ef211f4a934193e07964501a5463b\",\n \"score\": \"0.62905926\",\n \"text\": \"public static function siteRootDir() : string {\\n return _assbase::siteRootDir_($_SERVER['PHP_SELF']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08042dd21963748ad4433af0226674b9\",\n \"score\": \"0.62899345\",\n \"text\": \"public function getApplicationPaths()\\n {\\n return $this->applicationPaths;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"363102f095dfc72b005aa70c3211721a\",\n \"score\": \"0.6288634\",\n \"text\": \"public function getAppTempDir()\\n {\\n return $this->_bootstrap->getApplication()->getTempDir();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"801c14477dcd0863b6298e3156ce3ebe\",\n \"score\": \"0.6280069\",\n \"text\": \"public function getRootDir()\\n {\\n return($this->rootDir);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f39ce585e5acbd82e3979d66b59a668\",\n \"score\": \"0.62576956\",\n \"text\": \"function getSiteRootDir() {\\n\\t\\treturn BinCommon::getSiteRootDir();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02329f95538470fa7aa8d71b834ea44f\",\n \"score\": \"0.6257034\",\n \"text\": \"public function serverPath(){\\n $result = $_SERVER['DOCUMENT_ROOT'];\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09368f1cae9f8ea3378f84286e9786b8\",\n \"score\": \"0.6252916\",\n \"text\": \"public function getAppBase();\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":716,"cells":{"query_id":{"kind":"string","value":"a85e260dd2e6e462a217a94383d34f85"},"query":{"kind":"string","value":"Register any application services."},"positive_passages":{"kind":"list like","value":[{"docid":"011346c6589e19b161889b4094b34fc4","score":"0.0","text":"public function register()\r\n {\r\n App::bind(ILocationCAD::class, LocationCAD::class);\r\n App::bind(ILocationCAN::class, LocationCAN::class);\r\n App::bind(IServiceLogsCAD::class, ServiceLogsCAD::class);\r\n App::bind(IServiceLogsCAN::class, ServiceLogsCAN::class);\r\n App::bind(IProdutoCAD::class, ProdutoCAD::class);\r\n App::bind(IProdutoCAN::class, ProdutoCAN::class);\r\n App::bind(IUserManagementCAD::class, UserManagementCAD::class);\r\n App::bind(IUserManagementCAN::class, UserManagementCAN::class);\r\n }","title":""}],"string":"[\n {\n \"docid\": \"011346c6589e19b161889b4094b34fc4\",\n \"score\": \"0.0\",\n \"text\": \"public function register()\\r\\n {\\r\\n App::bind(ILocationCAD::class, LocationCAD::class);\\r\\n App::bind(ILocationCAN::class, LocationCAN::class);\\r\\n App::bind(IServiceLogsCAD::class, ServiceLogsCAD::class);\\r\\n App::bind(IServiceLogsCAN::class, ServiceLogsCAN::class);\\r\\n App::bind(IProdutoCAD::class, ProdutoCAD::class);\\r\\n App::bind(IProdutoCAN::class, ProdutoCAN::class);\\r\\n App::bind(IUserManagementCAD::class, UserManagementCAD::class);\\r\\n App::bind(IUserManagementCAN::class, UserManagementCAN::class);\\r\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"fbbb425b3bd02bbcc276621894741fe7","score":"0.7714091","text":"public function register()\n {\n// $this->registerServices();\n $this->registerRepositories();\n }","title":""},{"docid":"f4bce7ab24b860b65455405e7af802e6","score":"0.76522887","text":"public function register(): void\n {\n $this->registerServices();\n }","title":""},{"docid":"659b9b0b8033e83fca194956968b4426","score":"0.7629979","text":"public function register()\n {\n $this->registerRepositories();\n\n $this->registerDomainServices();\n }","title":""},{"docid":"429bf528a34387a8ffaa9126341fc247","score":"0.7498076","text":"public function register()\n {\n $this->registerServiceProviders();\n\n $this->registerFacades();\n\n $this->registerConsole();\n }","title":""},{"docid":"ce812ef3fba40bc383f1db3afaa81d4e","score":"0.74953425","text":"public function register()\n {\n $this->registerAlias();\n\n $this->registerServices();\n }","title":""},{"docid":"7f687a4f8ebf0479878b557feadefac1","score":"0.7463522","text":"public function register()\n {\n $this->registerServiceProviders();\n }","title":""},{"docid":"cddf77398f948fc35b216a0e987a1bed","score":"0.7385764","text":"public function register()\n {\n // app()->bind('App\\Services\\SocialService', function() {\n // return new \\App\\Services\\TwitterService('api-key-123');\n // });\n app()->bind('App\\Services\\SocialService', function() {\n return new \\App\\Services\\FacebookService('thing1', 'thing2');\n });\n }","title":""},{"docid":"d2763e7b99729281f7476cfb88e6c392","score":"0.73639125","text":"public function register()\n {\n $this->registerResources();\n $this->registerFilterService();\n }","title":""},{"docid":"84518461f0d2326c0450eface0f2565b","score":"0.7337376","text":"public function register()\n\t{\n $this->registerOAuthServer();\n $this->registerApi();\n\n // Register artisan commands\n\t\t$this->registerCommands();\n\t}","title":""},{"docid":"972b96c8194c303163fc86d259a65a9f","score":"0.7323455","text":"public function register()\n {\n $this->registerServices();\n $this->registerAliases();\n $this->registerMiddlewares();\n }","title":""},{"docid":"f6565a24d5a28733b87ac1adb8b6715a","score":"0.72733027","text":"public function register()\n {\n $this->app->bind('App\\Services\\MeigaraService');\n }","title":""},{"docid":"c9bc6cfd69a60feee0745325044d378e","score":"0.7268026","text":"public function register()\n {\n $this->registerRepositories();\n }","title":""},{"docid":"1f957a2343ab60f1e1e46bfbc29595a1","score":"0.7247485","text":"public function register()\n {\n // Automatically apply the package configuration\n //$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'data-repository');\n\n // Register the main class to use with the facade\n $this->app->singleton('data-repository', function () {\n return new DataRepository;\n });\n\n $this ->app ->register('Mawuekom\\MacroSearch\\MacroSearchServiceProvider');\n $this ->app ->register('Spatie\\QueryBuilder\\QueryBuilderServiceProvider');\n $this ->app ->register('Spatie\\JsonApiPaginate\\JsonApiPaginateServiceProvider');\n }","title":""},{"docid":"3ecbd2e6e9219079a74c56af4e343e67","score":"0.7237381","text":"public function register()\n {\n $this->app->bind('Customer', \\App\\Services\\CustomerService::class);\n $this->app->bind('Loan', \\App\\Services\\LoanService::class);\n $this->app->bind('Screen', \\App\\Services\\ScreenService::class);\n $this->app->bind('Message', \\App\\Services\\MessageService::class);\n $this->app->bind('Payment', \\App\\Services\\PaymentService::class); \n $this->app->bind('Crb', \\App\\Services\\CrbService::class); \n }","title":""},{"docid":"d9e22c599d2bd043c36264648ddcc425","score":"0.72195977","text":"public function register()\n {\n Passport::ignoreMigrations();\n\n // Register providers\n // $this->app->register(BroadcastServiceProvider::class);\n $this->app->register(EventServiceProvider::class);\n $this->app->register(RouteServiceProvider::class);\n// $this->app->register(AuthServiceProvider::class);\n }","title":""},{"docid":"f5921cbcb82527c146d127ec1dc98298","score":"0.7211748","text":"public function register()\n {\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n\n $this->app->bind(\"neo4jRelation\", function() {\n return new \\Gigtrooper\\Services\\Neo4jRelationService;\n });\n\n $this->app->bind(\"neo4jCriteria\", function() {\n return new \\Gigtrooper\\Services\\Neo4jCriteriaService;\n });\n\n $this->app->bind(\"field\", function() {\n return new \\Gigtrooper\\Services\\FieldService;\n });\n\n $this->app->bind(\"criteria\", function() {\n return new \\Gigtrooper\\Services\\CriteriaService;\n });\n\n $this->app->bind(\"pagination\", function() {\n return new \\Gigtrooper\\Services\\PaginationService;\n });\n\n $this->app->bind(\"templateHelper\", function() {\n return new \\Gigtrooper\\Helpers\\TemplateHelper();\n });\n\n $this->app->bind(\"categoryService\", function() {\n return new \\Gigtrooper\\Services\\CategoryService();\n });\n\n $this->app->bind(\"subFieldService\", function() {\n return new \\Gigtrooper\\Services\\SubField();\n });\n\n $this->app->bind(\"fileUploadService\", function() {\n return new \\Gigtrooper\\Services\\FileUploadService();\n });\n\n $this->app->bind(\"dateService\", function() {\n return new \\Gigtrooper\\Services\\DateService();\n });\n\n $this->app->bind(\"dateTimeService\", function() {\n return new \\Gigtrooper\\Services\\DateTimeService();\n });\n\n $this->app->bind(\"userService\", function() {\n return new \\Gigtrooper\\Services\\UserService();\n });\n\n $this->app->bind(\"elementsService\", function() {\n return new \\Gigtrooper\\Services\\ElementsService();\n });\n\n $this->app->bind(\"fieldTypes\", function() {\n return new \\Gigtrooper\\Services\\FieldTypes();\n });\n\n $this->app->bind(\"countryService\", function() {\n return new \\Gigtrooper\\Services\\CountryService();\n });\n\n $this->app->bind(\"postService\", function() {\n return new \\Gigtrooper\\Services\\PostService();\n });\n\n $this->app->bind(\"messageChainService\", function() {\n return new \\Gigtrooper\\Services\\MessageChainService();\n });\n\n $this->app->bind(\"messageFormService\", function() {\n return new \\Gigtrooper\\Services\\MessageForm();\n });\n }","title":""},{"docid":"41684855bf0abd3d5c8d41c9ad6c7a07","score":"0.7209296","text":"public function register()\n {\n\n $this->app->bind(\n VacancyServiceInterface::class,\n VacancyService::class,\n );\n\n $this->app->bind(\n VacancyRepositoryInterface::class,\n VacancyRepository::class,\n );\n\n $this->app->bind(\n AuthServiceInterface::class,\n AuthService::class,\n );\n\n $this->app->bind(\n AuthRepositoryInterface::class,\n AuthRepository::class,\n );\n\n $this->app->bind(\n MailServiceInterface::class,\n MailService::class,\n );\n\n $this->app->bind(\n HashServiceInterface::class,\n HashService::class,\n );\n\n $this->app->bind(\n JwtServiceInterface::class,\n JwtService::class,\n );\n\n $this->app->bind(\n UserRepositoryInterface::class,\n UserRepository::class,\n );\n\n $this->app->bind(\n FtpServiceInterface::class,\n FtpService::class,\n );\n\n $this->app->bind(\n ProfileServiceInterface::class,\n ProfileService::class,\n );\n\n $this->app->bind(\n ProfileRepositoryInterface::class,\n ProfileRepository::class,\n );\n\n $this->app->bind(\n LocationRepositoryInterface::class,\n LocationRepository::class,\n );\n\n $this->app->bind(\n LocationServiceInterface::class,\n LocationService::class,\n );\n }","title":""},{"docid":"67bad94d602aaba709b68134297a5c79","score":"0.72073114","text":"public function register()\n {\n $this->app->register(OrchestratorEventServiceProvider::class);\n $this->app->register(DoctrineSupportServiceProvider::class);\n $this->app->register(DropboxServiceProvider::class);\n $this->app->register(GoogleDriveServiceProvider::class);\n $this->app->register(LogViewerServiceProvider::class);\n $this->app->register(L5SwaggerServiceProvider::class);\n $this->registerConsoleCommands();\n }","title":""},{"docid":"5d04803be9b3b5833f6573a28989aabd","score":"0.7197857","text":"public function register() {\n\t\t$this->registerQueryService();\n\t}","title":""},{"docid":"c93f6a4a7d0b079c6cdc9af5f7929b14","score":"0.71915245","text":"public function register()\n {\n $this->registerHttplugFactories();\n $this->registerHttplug();\n }","title":""},{"docid":"c868ba7aca81f42ec0f9ec225c4b5ecd","score":"0.71911395","text":"public function register()\n {\n $this->app->bind(\n ContaServiceInterface::class,\n ContaService::class,\n );\n $this->app->bind(\n TransacaoServiceInterface::class,\n TransacaoService::class,\n );\n }","title":""},{"docid":"1b18c34205ec5190ef1df81197574af7","score":"0.7182214","text":"public function register()\n {\n $this->registerModels();\n $this->registerRepositories();\n $this->registerSubscribers();\n $this->registerValidators();\n }","title":""},{"docid":"3453bd73dbffcdc4a2fe2b6fea8540f7","score":"0.71802413","text":"public function register()\n {\n App::bind(GCloudPubSubService::class, function () {\n return new GCloudPubSubService();\n });\n\n App::bind(PelaporanService::class, function ($app, $item) {\n return new PelaporanService($item);\n });\n }","title":""},{"docid":"49b33fbc5bfca91fe4dc2b23d7c66c71","score":"0.7179535","text":"public function register()\n {\n $this->registerValidationService();\n\n $this->registerValidate();\n\n $this->registerValidateAlias();\n }","title":""},{"docid":"b4fe5a75b6b66edf2a1ecc58967a749b","score":"0.71674174","text":"public function register()\n {\n //login\n $this->app->bind('Domain\\Contracts\\Services\\UserLoginServiceContract', 'Domain\\Services\\UserLoginService');\n //me\n $this->app->bind('Domain\\Contracts\\Services\\MeServiceContract', 'Domain\\Services\\MeService');\n \n //user\n $this->app->bind('Domain\\Contracts\\Repositories\\UserRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\UserRepository');\n $this->app->bind('Domain\\Contracts\\Services\\UserServiceContract', 'Domain\\Services\\UserService');\n \n //company\n $this->app->bind('Domain\\Contracts\\Repositories\\CompanyRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CompanyRepository');\n $this->app->bind('Domain\\Contracts\\Services\\CompanyServiceContract', 'Domain\\Services\\CompanyService');\n\n //country\n $this->app->bind('Domain\\Contracts\\Repositories\\CountryRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CountryRepository');\n\n //state\n $this->app->bind('Domain\\Contracts\\Repositories\\StateRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\StateRepository');\n $this->app->bind('Domain\\Contracts\\Services\\StateServiceContract', 'Domain\\Services\\StateService');\n\n //city\n $this->app->bind('Domain\\Contracts\\Repositories\\CityRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CityRepository');\n $this->app->bind('Domain\\Contracts\\Services\\CityServiceContract', 'Domain\\Services\\CityService');\n\n //plan\n $this->app->bind('Domain\\Contracts\\Repositories\\PlanRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\PlanRepository');\n\n //manager\n $this->app->bind('Domain\\Contracts\\Repositories\\ManagerRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\ManagerRepository');\n\n //customer\n $this->app->bind('Domain\\Contracts\\Repositories\\CustomerRepositoryContract', 'Infrastructure\\Persistence\\Doctrine\\Repositories\\CustomerRepository');\n\n }","title":""},{"docid":"87308f79ec91947fe614365d984c4187","score":"0.71669966","text":"public function register()\n {\n $this->app->bind(\n 'App\\Http\\Interfaces\\VehicleInterface',\n 'App\\Http\\Repositories\\VehicleRepository'\n );\n\n $this->app->bind(\n 'App\\Http\\Interfaces\\VehicleLookupInterface',\n 'App\\Http\\Repositories\\VehicleLookupRepository'\n );\n\n $this->app->bind(\n 'App\\Http\\Interfaces\\DashboardInterface',\n 'App\\Http\\Repositories\\DashboardRepository'\n );\n }","title":""},{"docid":"8e9aa82c070622a2b80dcb6963f3284d","score":"0.7164823","text":"public function register()\n {\n //\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n $this->app->register(\\pierresilva\\CrudGenerator\\CrudGeneratorServiceProvider::class);\n $this->app->register(\\pierresilva\\NgGenerators\\LaravelServiceProvider::class);\n $this->app->register(\\Mpociot\\ApiDoc\\ApiDocGeneratorServiceProvider::class);\n }\n }","title":""},{"docid":"25f4e270b5831167c34bac6f478651e6","score":"0.7164422","text":"public function register()\n {\n $this->registerHttpParsers();\n $this->registerHttpValidation();\n }","title":""},{"docid":"e30a68c58100ffcd0f8a581bacd7594a","score":"0.7156825","text":"public function register()\n {\n $this->registerTeamspeakFramework();\n $this->registerTeamspeak();\n }","title":""},{"docid":"551449f13cba894a32639d3755a647e5","score":"0.7149477","text":"public function register()\n {\n $this->registerAlias();\n\n $this->registerServices();\n\n $this->registerCommands();\n }","title":""},{"docid":"5be92b0a679a47e81b6b6c7295629cc3","score":"0.714629","text":"public function register()\n {\n //include __DIR__.'/routes.php';\n //$this->app->make('dsanchezInmedia\\DataTable\\DataTableController');\n }","title":""},{"docid":"4afd584d2e282e2912b292a9d7710570","score":"0.7141903","text":"public function register()\n {\n $this->app->register(ArtisanServiceProvider::class);\n $this->app->register(RouteServiceProvider::class);\n\n $this->registerProviders();\n\n $this->registerVueApplication();\n\n $this->loadAssets();\n\n $this->registerNavigationPresetFactoryApplication();\n }","title":""},{"docid":"41b780742f74c60ba1140ced3fcbcab0","score":"0.7140552","text":"public function register()\n {\n App::bind('App\\Repositories\\UserRepositoryInterface','App\\Repositories\\UserRepository');\n App::bind('App\\Repositories\\AnimalRepositoryInterface','App\\Repositories\\AnimalRepository');\n App::bind('App\\Repositories\\DonationTypeRepositoryInterface','App\\Repositories\\DonationTypeRepository');\n App::bind('App\\Repositories\\NewsAniRepositoryInterface','App\\Repositories\\NewsAniRepository');\n App::bind('App\\Repositories\\DonationRepositoryInterface','App\\Repositories\\DonationRepository');\n App::bind('App\\Repositories\\ProductRepositoryInterface','App\\Repositories\\ProductRepository');\n App::bind('App\\Repositories\\CategoryRepositoryInterface','App\\Repositories\\CategoryRepository');\n App::bind('App\\Repositories\\TransferMoneyRepositoryInterface','App\\Repositories\\TransferMoneyRepository');\n App::bind('App\\Repositories\\ShippingRepositoryInterface','App\\Repositories\\ShippingRepository');\n }","title":""},{"docid":"b5437c140e9b733468d3f7a661bdc737","score":"0.7139776","text":"public function register()\n {\n $this->app->bind('date', \\App\\Services\\Date\\DateService::class);\n }","title":""},{"docid":"b267b515babc15285a8ebfb019b6a8f8","score":"0.7135218","text":"public function register()\n {\n if ($this->app instanceof LumenApplication) {\n $this->app->configure('api'); // @codeCoverageIgnore\n }\n\n $this->mergeConfigFrom(__DIR__.'/../config/api.php', 'api');\n\n $this->registerClient();\n\n $this->registerToken();\n\n if ($this->app->runningInConsole()) {\n $this->registerForConsole();\n }\n }","title":""},{"docid":"47db51fb87da28db3d8a87fc9a87302b","score":"0.7132706","text":"public function register()\n {\n// $this->app->bind(BlogService::class);\n }","title":""},{"docid":"3c6f44c96275b5eb26cc52e2c80583c7","score":"0.71313804","text":"public function register()\n {\n /* $this->app->register(RouteServiceProvider::class); */\n $this->registerBladeExtensions();\n $this->setAliase();\n }","title":""},{"docid":"96cb33ed2e7fdfbc4632bd6de12e341d","score":"0.7119459","text":"public function register(): void\n {\n $this->app->register(MenuEventServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n }","title":""},{"docid":"96d8dce2a6bbdeb514d710a19e7939ca","score":"0.7115587","text":"public function register()\n {\n $this->app->bind(DoctorService::class, function($app) {\n return new DoctorService();\n });\n }","title":""},{"docid":"d491548a56d80ccd58366b607a4e8a2d","score":"0.71090174","text":"public function register()\n {\n $this->app->make('Ecce\\WeatherForecast\\ForecastController');\n $this->loadViewsFrom(__DIR__.'/views', 'forecast');\n $this->loadMigrationsFrom(__DIR__.'/migrations');\n }","title":""},{"docid":"e4b124148ced0fba2b3a598e29ac90e4","score":"0.70962703","text":"public function register()\n {\n $this->registerApiAuth();\n\n $this->registerCommands();\n\n $this->mergeConfig();\n }","title":""},{"docid":"5f6812adf3d8edd064360f2b1367eca5","score":"0.7091754","text":"public function register()\n {\n //\n if ($this->app->isLocal()) {\n $this->app->register(\\Laravel\\Telescope\\TelescopeServiceProvider::class);\n $this->app->register(TelescopeServiceProvider::class);\n }\n\n if ($this->app->environment() !== 'production') {\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n }\n }","title":""},{"docid":"3c853ae9bac17cacf27655da163a2708","score":"0.70844907","text":"public function register()\n {\n $this->app->bind(\n 'App\\Services\\Contracts\\CartServiceContract',\n 'App\\Services\\CartService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\ProductServiceContract',\n 'App\\Services\\ProductService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\CategoryServiceContract',\n 'App\\Services\\CategoryService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\TranslateServiceContract',\n 'App\\Services\\TranslateService'\n );\n }","title":""},{"docid":"40f3f5ec79d8ffb47d3b910e79af5128","score":"0.7083211","text":"public function register()\n {\n /**\n * Regitrar intanciamento padrão para noticia Repository pegando configuração\n * para conexão ao elasticSearch\n */\n $this->app->bind(NoticiaRepository::class, function ($app) {\n return new NoticiaRepository($app->make(Client::class));\n });\n $this->bindESClient();\n }","title":""},{"docid":"ef2200d44224806dd3179aae60c8575c","score":"0.7082185","text":"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n\n $this->app->register(MenuServiceProvider::class);\n }","title":""},{"docid":"da1bc636f5076a61e905c37509fbd72f","score":"0.70815176","text":"public function register()\n {\n $this->app->register(RepositoryServiceProvider::class);\n }","title":""},{"docid":"443e770bddb47643992b29968059a288","score":"0.7078013","text":"public function register()\n {\n $this->app->bind(AircraftController::class, function () {\n return new AircraftController(new AircraftService());\n });\n $this->app->bind(BookingController::class, function () {\n return new BookingController(new BookingService());\n });\n $this->app->bind(FlightController::class, function () {\n return new FlightController(new FlightService());\n });\n $this->app->bind(SeatController::class, function () {\n return new SeatController(new SeatService());\n });\n $this->app->bind(MultipleBookingController::class, function () {\n return new MultipleBookingController(new MultipleBookingService());\n });\n }","title":""},{"docid":"08b225cb063f72327c7123c067cbf548","score":"0.70772624","text":"public function register()\n {\n $this->registerService();\n\n $this->loadConfig();\n\n $this->registerCommands();\n }","title":""},{"docid":"ecdce634712e37057c3c243a68fe7301","score":"0.7071076","text":"public function register()\n {\n $this->app->bind(\n 'App\\Services\\Contracts\\UsersServiceInterface',\n 'App\\Services\\UsersService'\n );\n\n $this->app->bind(\n 'App\\Services\\Contracts\\BooksServiceInterface',\n 'App\\Services\\BooksService'\n );\n }","title":""},{"docid":"4ca4dc4f5b96b978cbb5d5afbba3a19e","score":"0.7059063","text":"public function register()\n {\n $this->app->make('Magnetar\\Tariffs\\Controllers\\ObjectCrudController');\n $this->app->make('Magnetar\\Tariffs\\Controllers\\ModuleCrudController');\n $this->app->make('Magnetar\\Tariffs\\Controllers\\UserObjectCrudController');\n $this->app->make('Magnetar\\Tariffs\\Controllers\\ObjectTypeCrudController');\n $this->app->make('Magnetar\\Tariffs\\Controllers\\PaymentController');\n $this->commands($this->commands);\n\n $this->loadViewsFrom(__DIR__.'/views', 'magnetar_tariffs');\n }","title":""},{"docid":"7fc00bca0153bf347d4d91993f4ac6fb","score":"0.70588976","text":"public function register()\n {\n $this->registerConfig();\n\n $this->registerMenuManagerService();\n }","title":""},{"docid":"d98d9977a862a0f17245df402c5d9eb7","score":"0.70563334","text":"public function register()\n {\n $this->app->bind(UserAuthContract::class,UserAuthService::class);\n $this->app->bind(CompanySettingContract::class,CompanySettingService::class);\n }","title":""},{"docid":"4e9bab5116778d6003f417ff9aa2a07c","score":"0.7055316","text":"public function register()\n {\n $this->app->register( RouteServiceProvider::class );\n $this->app->register( RepositoryServiceProvider::class );\n $this->app->register( AuthServiceProvider::class );\n $this->app->register( ImageServiceProvider::class );\n }","title":""},{"docid":"430890e4b1f0dabc57776620444fb8eb","score":"0.7054543","text":"public function register()\n {\n $this->app->bind(\n \\App\\Services\\Country\\ICountryService::class,\n \\App\\Services\\Country\\CountryService::class\n );\n }","title":""},{"docid":"cebbe088c77610455dbe05fa46e11db3","score":"0.70522976","text":"public function register()\n {\n $this->registerImage();\n\n $this->registerImagineManager();\n\n $this->registerSourceManager();\n\n $this->registerUrlGenerator();\n\n $this->registerRouteRegistrar();\n\n $this->registerImageHandler();\n\n $this->registerContracts();\n\n $this->registerMiddlewares();\n\n $this->registerConsole();\n }","title":""},{"docid":"488b95520cd592b575e11c7452d640e3","score":"0.70503455","text":"public function register()\n {\n //Register Services\n $this->app->bind('Api\\\\Services\\\\ISellerPostService', 'Api\\\\Services\\\\SellerPostService');\n $this->app->bind('Api\\\\Services\\\\IBuyerPostService', 'Api\\\\Services\\\\BuyerPostService');\n\n $this->app->bind('Api\\\\Services\\\\FileStorage\\\\FileStorageInterface', 'Api\\\\Services\\\\FileStorage\\\\S3FileStorage');\n }","title":""},{"docid":"e29aa875bcce2fee3e6b1953b69fd15a","score":"0.70470077","text":"public function register()\n {\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\AuthRepositoryInterface',\n 'App\\Repositories\\AuthRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\CaptureRepositoryInterface',\n 'App\\Repositories\\CaptureRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Interfaces\\PokemonRepositoryInterface',\n 'App\\Repositories\\PokemonRepository'\n );\n\n $this->app->bind(\n 'App\\Services\\Interfaces\\AuthServiceInterface',\n 'App\\Services\\AuthService'\n );\n $this->app->bind(\n 'App\\Services\\Interfaces\\CaptureServiceInterface',\n 'App\\Services\\CaptureService'\n );\n $this->app->bind(\n 'App\\Services\\Interfaces\\PokemonServiceInterface',\n 'App\\Services\\PokemonService'\n );\n }","title":""},{"docid":"78bcefd7050ea075e2d08badd8a8ef43","score":"0.7046471","text":"public function register()\n {\n $this->app->bind( \\LACC\\Repositories\\CategoryRepository::class, \\LACC\\Repositories\\CategoryRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\UserRepository::class, \\LACC\\Repositories\\UserRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\SerieRepository::class, \\LACC\\Repositories\\SerieRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\VideoRepository::class, \\LACC\\Repositories\\VideoRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\PlanRepository::class, \\LACC\\Repositories\\PlanRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\OrderRepository::class, \\LACC\\Repositories\\OrderRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\SubscriptionRepository::class, \\LACC\\Repositories\\SubscriptionRepositoryEloquent::class );\n $this->app->bind( \\LACC\\Repositories\\PaypalWebProfileRepository::class, \\LACC\\Repositories\\PaypalWebProfileRepositoryEloquent::class );\n //:end-bindings:\n }","title":""},{"docid":"9614f01af5ef402d2f77ea0965a37ddd","score":"0.7044727","text":"public function register() {\n\t\t$this->app['zuora'] = $this->app->share(function($app) {\n\t\t\t\treturn new ZuoraManager($app);\n\t\t\t});\n\t\t$this->app->booting(function() {\n\t\t\t\t$loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n\t\t\t\t$loader->alias('Zuora', 'Dazza76\\Zuora\\Facades\\Zuora');\n\t\t\t\t$loader->alias('Zuora_API', 'Dazza76\\Zuora\\zuora-api\\API');\n\t\t\t});\n\t}","title":""},{"docid":"9696a2955855ee0c64bc22082a3087c9","score":"0.70437646","text":"public function register()\n {\n $this->registerConfiguration();\n\n $this->registerIgc2Kmz();\n }","title":""},{"docid":"cdfeac787cdd5eb8804a4f15a59df6a4","score":"0.70428437","text":"public function register()\n {\n $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'les');\n\n $this->registerCommands();\n $this->registerDataSerializer();\n $this->registerRepositoryFactory();\n $this->registerResponseBuilder();\n }","title":""},{"docid":"dcebcce58ea16efaf0a131275d002fd2","score":"0.70383126","text":"public function register ()\n {\n $this->registerBankServices();\n }","title":""},{"docid":"36b05d08d95a77ee3892ab87399d37ed","score":"0.7032526","text":"public function register()\n {\n $this->app->register(RouteServiceProvider::class);\n $this->app->register(MiddlewareServiceProvider::class);\n }","title":""},{"docid":"05feae3ee4b76131873d0fe07f0f065f","score":"0.70259774","text":"public function register() {\n\n $app = $this->app;\n $app['rest.server'] = $app->share(function ($app)\n {\n $case = $app['config']['andizzle/rest-framework::case'];\n return new RestServer($case);\n });\n\n $app['rest.serializer'] = $app->share(function ($app)\n {\n $model = $app['config']['andizzle/rest-framework::serializer.model'];\n return new $model;\n });\n\n }","title":""},{"docid":"0d21c1b0658a66c641de235961ddb458","score":"0.7025021","text":"public function register() {\n $this->app->bind(\n 'App\\Services\\ExcelFileProcessorService',\n function ($app) {\n return new ExcelFileProcessorService();\n }\n );\n\n $this->app->bind('App\\Services\\UserService', function ($app) {\n return new UserService();\n });\n }","title":""},{"docid":"2fdc41fb4fad15312dc0e93d3a818d52","score":"0.7022796","text":"public function register()\n {\n $this->registerServiceProviders();\n $this->registerAliases();\n $this->registerCommands();\n $this->registerConfigs();\n $this->registerRoutes();\n $this->registerPublishable();\n }","title":""},{"docid":"0ee6da8654ba9bd9d0101156c5225e65","score":"0.7022791","text":"public function register()\n\t{\n\t\t$this->registerCommandTranslator();\n\n\t\t$this->registerCommandBus();\n\t}","title":""},{"docid":"65694cf9355438bdb56a1bcc4b9e2a87","score":"0.70214576","text":"public function register()\n {\n \\App::bind('App\\Repositories\\CampaignRepositoryInterface', 'App\\Repositories\\Eloquent\\CampaignRepository');\n \\App::bind('App\\Repositories\\LotteryRepositoryInterface', 'App\\Repositories\\Eloquent\\LotteryRepository');\n \\App::bind('App\\Repositories\\EntryRepositoryInterface', 'App\\Repositories\\Eloquent\\EntryRepository');\n \\App::bind('App\\Repositories\\VoteRepositoryInterface', 'App\\Repositories\\Eloquent\\VoteRepository');\n \\App::bind('App\\Repositories\\PlayerRepositoryInterface', 'App\\Repositories\\Eloquent\\PlayerRepository');\n \\App::bind('App\\Repositories\\UserRepositoryInterface', 'App\\Repositories\\Eloquent\\UserRepository');\n \\App::bind('App\\Repositories\\SerialRepositoryInterface', 'App\\Repositories\\Eloquent\\SerialRepository');\n }","title":""},{"docid":"550bd052b2967290f29706336c80e80b","score":"0.70176536","text":"public function register()\n {\n $this->app->bind(\"App\\Repositories\\User\\UserRepository\", \"App\\Repositories\\User\\UserService\");\n $this->app->bind(\"App\\Repositories\\Note\\NoteRepository\", \"App\\Repositories\\Note\\NoteService\");\n }","title":""},{"docid":"23809250d230e1f4ac8cda60819645df","score":"0.7014792","text":"public function register()\n {\n $this->registerBindings();\n $this->registerFacade();\n }","title":""},{"docid":"dbde3c2af05f55fb8df4261eeda74cbb","score":"0.7013609","text":"public function register()\n {\n $this->app->bind(\n ParserInterface::class,\n ParserService::class\n );\n $this->app->bind(\n SocialInterface::class,\n SocialService::class\n );\n }","title":""},{"docid":"ff416b2021da6b9f1a51bd49be5661e6","score":"0.70120114","text":"public function register()\n {\n $this->mergeConfigFrom(__DIR__.'/config/config.php', 'widgetize');\n $this->commands('command.imanghafoori.widget');\n app(RouteMacros::class)->registerMacros();\n app(SingletonServices::class)->registerSingletons($this->app);\n }","title":""},{"docid":"cfae77d9fe9b935350385adbdcd9ae91","score":"0.70066726","text":"public function register()\n {\n $this->app->register(\\Webpatser\\Countries\\CountriesServiceProvider::class);\n\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('Countries', 'Webpatser\\Countries\\CountriesFacade');\n }","title":""},{"docid":"297dd2baab74cabd002cb7d94173f542","score":"0.70058805","text":"public function register()\n {\n\n $this->app->bind(\n UserRepository::class,\n EloquentUserRepository::class\n );\n\n $this->app->bind(\n EmpresasRepository::class,\n EloquentEmpresasRepository::class\n );\n\n }","title":""},{"docid":"66f0c3b6d11614e5a90039a3456c784f","score":"0.7005107","text":"public function register()\n {\n $this->registerApi($this->app['config']['zuora'], $this->app[LoggerInterface::class]);\n }","title":""},{"docid":"12ab930dfedd294d1332c8713ceff315","score":"0.7003655","text":"public function register()\n {\n $this->app->bind('App\\Services\\AudienceService', function ($app) {\n return new AudienceService($app->make('Illuminate\\Database\\DatabaseManager'));\n });\n }","title":""},{"docid":"3e6847ee02ae41d870fb4e7adb61ca52","score":"0.7002627","text":"public function register()\n {\n //\n $this->modelService();\n $this->manufactureService();\n $this->categoryService();\n $this->itemService();\n $this->saleOrderService();\n $this->conditionService();\n $this->whTransferService();\n $this->supplierService();\n }","title":""},{"docid":"f7dd8ea5d03d8b02a445f42ba595bca8","score":"0.6997481","text":"public function register()\n\t{ \n \t\n \t\\App::bind('assets', function()\n\t\t{\n\t\t return new \\App\\Services\\Assets;\n\t\t});\n\t\t\n\t}","title":""},{"docid":"fa49ab70e8e4d0712fc332213e5918c3","score":"0.6996125","text":"public function register()\n {\n $this->app->singleton(ChromeDriverService::class, ChromeDriverService::class);\n $this->app->singleton(WebDriverService::class, WebDriverService::class);\n $this->app->singleton(ReportRepository::class, ReportRepository::class);\n }","title":""},{"docid":"f6c961d61ddd61241667d328f8e518b6","score":"0.6995174","text":"public function register()\n {\n $this->registerRouter();\n $this->registerControllerDispatcher();\n }","title":""},{"docid":"123e5f09cb8263ff4946744bbe7f9a67","score":"0.6993437","text":"public function register()\n {\n $this->app->bind('App\\Services\\Interfaces\\UserServiceInterface', 'App\\Services\\UserService');\n $this->app->bind('App\\Services\\Interfaces\\SearchServiceInterface', 'App\\Services\\SearchService');\n $this->app->bind('App\\Services\\Interfaces\\TaskServiceInterface', 'App\\Services\\TaskService');\n $this->app->bind('App\\Services\\Interfaces\\TimesheetServiceInterface', 'App\\Services\\TimesheetService');\n $this->app->bind('App\\Services\\Interfaces\\FileServiceInterface', 'App\\Services\\FileService');\n $this->app->bind('App\\Services\\Interfaces\\ReportServiceInterface', 'App\\Services\\ReportService');\n \n }","title":""},{"docid":"cbe0b9f157965d6277fe01bcbd6a76a1","score":"0.6991146","text":"public function register()\n {\n /**\n * Service providers are auto-discovered by Laravel from version 5.5\n * If a Service Provider is needed only is specific environment\n * use the switch below\n */\n switch ($this->app->environment()) {\n case 'local':\n $this->app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);\n break;\n\n case 'test':\n break;\n\n case 'staging':\n break;\n\n case 'production':\n break;\n }\n }","title":""},{"docid":"32b6819d12a255227cf4657552a828de","score":"0.69901663","text":"public function register()\n {\n $this->app->bind('log-reader', 'Jackiedo\\LogReader\\LogReader');\n\n $this->registerCommands();\n }","title":""},{"docid":"254020eedf35718d14379d6b89004954","score":"0.69893235","text":"public function register() {\n\n // Middlewares\n $this->app->singleton('TokenMiddleware', function($app){\n return new TokenMiddleware($app);\n });\n\n // Services\n // $this->app->bind('WordListService', function($app) {\n $this->app->singleton('WordListService', function($app) {\n return new WordListService();\n });\n\n }","title":""},{"docid":"39d6bd38810dc9103fc1b520d13ab79d","score":"0.6988052","text":"public function register()\n {\n\n\n $models = array(\n 'Article',\n 'Categorie',\n 'Section',\n 'Media',\n 'User'\n );\n\n foreach ($models as $model) {\n $this->app->bind(\n\n \"App\\\\Repositories\\\\{$model}Repository\",\n \"App\\\\Repositories\\\\{$model}RepositoryEloquent\"\n );\n }\n\n $this->app->register('Darkaonline\\L5Swagger\\L5SwaggerServiceProvider');\n\n }","title":""},{"docid":"69c83df6b13aef2407d3e73cba145cb1","score":"0.6987087","text":"public function register()\n {\n $this->app->singleton(CountryService::class);\n $this->app->singleton(Client::class, function () {\n return new Client(\n config('services.influx.host'),\n config('services.influx.port'),\n config('services.influx.username'),\n config('services.influx.password')\n );\n });\n $this->app->singleton(InfluxService::class, function () {\n $service = app(Client::class);\n return new InfluxService(\n $service,\n $service->selectDB(config('services.influx.database'))\n );\n });\n $this->app->singleton(\\Elasticsearch\\Client::class, function () {\n return ClientBuilder::create()\n ->setHosts([config('services.elasticsearch.host') . ':' . config('services.elasticsearch.port')])\n ->build();\n });\n $this->app->singleton(ElasticSearchService::class);\n $this->app->singleton(DatabaseService::class);\n }","title":""},{"docid":"4dc342393b6ec4bb2d2679382e1911f3","score":"0.69835174","text":"public function register()\n {\n\t\t$this->registerErrorHandlers();\n $this->registerFilterBindings();\n }","title":""},{"docid":"bd93ffb07b82f55c19bbb5c3b13af369","score":"0.6983031","text":"public function register()\n {\n $this->app->bind('fazlali.laravel-jwt.api', function($app){\n return new \\Fazlali\\LaravelJWT\\JWTAPI($app['request']);\n });\n $this->app->bind('fazlali.laravel-jwt.auth', function($app){\n return new \\Fazlali\\LaravelJWT\\JWTAuth($app['request'], $app['auth']);\n });\n\n }","title":""},{"docid":"7351bc11062a4c556526bf47212d9269","score":"0.6973643","text":"public function register()\n {\n // $this->app->singleton('leancloud', \\App\\Services\\LeancloudService::class);\n\n // $this->app->singleton('qiniu', \\App\\Services\\QiniuService::class);\n\n $this->app->singleton('wechat', \\App\\Services\\WechatService::class);\n }","title":""},{"docid":"bdd17555ebe34b621e1da9d71ee8230b","score":"0.6970282","text":"public function register()\n {\n $this->app->booting(function() {\n $loader = AliasLoader::getInstance();\n $loader->alias(\\Vanilo\\Framework\\Http\\Controllers\\ProductController::class, \\App\\Http\\Controllers\\Admin\\ProductController::class);\n $loader->alias(\\Vanilo\\Framework\\Http\\Controllers\\MediaController::class, \\App\\Http\\Controllers\\Admin\\MediaController::class);\n $loader->alias(\\Vanilo\\Framework\\Search\\ProductFinder::class, \\App\\Ctic\\Product\\Search\\ProductFinder::class);\n });\n }","title":""},{"docid":"da743f1cdf57877d8341b117fc3ec7ba","score":"0.6970165","text":"public function register()\n\t{\n\t\tapp()->bind(UserstatisticsServiceInterface::class, UserstatisticsService::class);\n\t\tapp()->bind(UserstatisticsRepositoryInterface::class, UserstatisticsRepository::class);\n\t}","title":""},{"docid":"4485cef02cdd87b12a09ca62d56eb074","score":"0.69695693","text":"public function register()\n\t{\n\t\t$this->app->register(EventServiceProvider::class);\n\t}","title":""},{"docid":"45db8ec6276e2bcbcc82009817da3d53","score":"0.69687283","text":"public function register()\n {\n $this->app->bind(LoadsServiceInterface::class, LoadsService::class);\n $this->app->bind(UtillsServiceInterface::class, UtillsService::class);\n $this->app->bind(OffersServiceInterface::class, OffersService::class);\n $this->app->bind(VehiclesServiceInterface::class, VehiclesService::class);\n }","title":""},{"docid":"3e2dc3e202e54a8b49de16647852b2e7","score":"0.6967715","text":"public function register()\n {\n if ($this->app->runningInConsole()) {\n $this->registerConsoleCommands();\n }\n }","title":""},{"docid":"262e6955c60f56ae55fa9127d6f7e4e8","score":"0.69606704","text":"public function register()\n {\n $this->app->singleton(NotificationApi::class, function ($app) {\n return new NotificationApiVersion1($app->make(NotificationService::class));\n });\n\n $this->app->singleton(TransactionUploadApi::class, function ($app) {\n return new TransactionUploadApiVersion1($app->make(TransactionUploadService::class),\n $app->make(CsvValidatorService::class));\n });\n }","title":""},{"docid":"d7d84cfee7e5163f0ac2e95c6ce484c5","score":"0.6959384","text":"public function register() {\n \n $this->app['google'] = $this->app->share(function($app) {\n return new Eden_Google($app['config']);\n });\n $this->app->booting(function() {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('google','Taqmaninw\\Apipack\\Facade\\Google');\n });\n $this->app['facebook'] = $this->app->share(function($app) {\n return new Eden_Facebook($app['config']);\n });\n $this->app->booting(function() {\n $loader = \\Illuminate\\Foundation\\AliasLoader::getInstance();\n $loader->alias('fb', 'Taqmaninw\\Apipack\\Facade\\Facebook');\n });\n $this->app['twitter'] = $this->app->share(function($app) {\n return new Eden_Twitter($app['config']);\n });\n $this->app['dropbox'] = $this->app->share(function($app) {\n return new Eden_Dropbox($app['config']);\n });\n $this->app['instagram'] = $this->app->share(function($app) {\n return new Eden_Instagram($app['config']);\n });\n $this->app['paypal'] = $this->app->share(function($app) {\n return new Eden_Paypal($app['config']);\n });\n }","title":""},{"docid":"3b738453f6bd35aac0f52592451efa7a","score":"0.695643","text":"public function register()\n {\n $this->di->setShared(\n $this->serviceName,\n function () {\n $dispatcher = new Dispatcher();\n $dispatcher->setDefaultNamespace('App\\Http\\Controllers');\n\n return $dispatcher;\n }\n );\n }","title":""},{"docid":"b5567db2de31e992cf94837319e0fc1c","score":"0.69551903","text":"public function register()\n {\n\n // Register Factories\n $this->registerEloquentFactoriesFrom(__DIR__.'/database/factories');\n\n // Default Package Configuration\n $this->mergeConfigFrom(__DIR__.'/config/earmark.php', 'earmark');\n $this->mergeConfigFrom(__DIR__.'/config/default.php', 'earmark');\n\n $this->app->register(EventServiceProvider::class);\n\n // @codeCoverageIgnoreStart\n //Poing\\Earmark\\Http\\Controllers\n $this->app->singleton('earmark', function () {\n return new Serial;\n });\n\n //Poing\\Earmark\\Http\\Controllers\n $this->app->singleton('sequence', function () {\n return new Sequential;\n });\n // @codeCoverageIgnoreEnd\n }","title":""},{"docid":"00df6aa25ac08b99dd662ce948e6d51b","score":"0.6954678","text":"public function register()\n {\n include __DIR__.'/../Http/routes.php';\n\n $this->app->register('A6digital\\Image\\DefaultProfileImageServiceProvider');\n\n $this->app->make('Arangel\\SmartAdmin\\Http\\Controllers\\AdminController');\n $this->app->make('Arangel\\SmartAdmin\\Http\\Controllers\\ProfileController');\n\n }","title":""},{"docid":"6b7a0ac11db89c809d327596ba939fd9","score":"0.695379","text":"public function register(): void\n {\n $this->registerContracts();\n $this->registerConsoleCommands();\n }","title":""},{"docid":"b91e69cc5f4882216988c0d66a43c536","score":"0.6952329","text":"public function register()\n {\n if (class_exists(\\ErpNET\\Saas\\Providers\\ErpnetSaasServiceProvider::class))\n $this->app->register(\\ErpNET\\Saas\\Providers\\ErpnetSaasServiceProvider::class);\n\n if (class_exists(\\ErpNET\\Permissions\\Providers\\ErpnetPermissionsServiceProvider::class))\n $this->app->register(\\ErpNET\\Permissions\\Providers\\ErpnetPermissionsServiceProvider::class);\n\n if (class_exists(\\Barryvdh\\TranslationManager\\ManagerServiceProvider::class))\n $this->app->register(\\Barryvdh\\TranslationManager\\ManagerServiceProvider::class);\n\n\n if (class_exists(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class))\n $this->app->register(\\ErpNET\\Migrates\\Providers\\ErpnetMigratesServiceProvider::class);\n\n// if (class_exists(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class))\n// $this->app->register(\\ErpNET\\Models\\Providers\\ErpnetModelsServiceProvider::class);\n }","title":""}],"string":"[\n {\n \"docid\": \"fbbb425b3bd02bbcc276621894741fe7\",\n \"score\": \"0.7714091\",\n \"text\": \"public function register()\\n {\\n// $this->registerServices();\\n $this->registerRepositories();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4bce7ab24b860b65455405e7af802e6\",\n \"score\": \"0.76522887\",\n \"text\": \"public function register(): void\\n {\\n $this->registerServices();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"659b9b0b8033e83fca194956968b4426\",\n \"score\": \"0.7629979\",\n \"text\": \"public function register()\\n {\\n $this->registerRepositories();\\n\\n $this->registerDomainServices();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"429bf528a34387a8ffaa9126341fc247\",\n \"score\": \"0.7498076\",\n \"text\": \"public function register()\\n {\\n $this->registerServiceProviders();\\n\\n $this->registerFacades();\\n\\n $this->registerConsole();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce812ef3fba40bc383f1db3afaa81d4e\",\n \"score\": \"0.74953425\",\n \"text\": \"public function register()\\n {\\n $this->registerAlias();\\n\\n $this->registerServices();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f687a4f8ebf0479878b557feadefac1\",\n \"score\": \"0.7463522\",\n \"text\": \"public function register()\\n {\\n $this->registerServiceProviders();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cddf77398f948fc35b216a0e987a1bed\",\n \"score\": \"0.7385764\",\n \"text\": \"public function register()\\n {\\n // app()->bind('App\\\\Services\\\\SocialService', function() {\\n // return new \\\\App\\\\Services\\\\TwitterService('api-key-123');\\n // });\\n app()->bind('App\\\\Services\\\\SocialService', function() {\\n return new \\\\App\\\\Services\\\\FacebookService('thing1', 'thing2');\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2763e7b99729281f7476cfb88e6c392\",\n \"score\": \"0.73639125\",\n \"text\": \"public function register()\\n {\\n $this->registerResources();\\n $this->registerFilterService();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84518461f0d2326c0450eface0f2565b\",\n \"score\": \"0.7337376\",\n \"text\": \"public function register()\\n\\t{\\n $this->registerOAuthServer();\\n $this->registerApi();\\n\\n // Register artisan commands\\n\\t\\t$this->registerCommands();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"972b96c8194c303163fc86d259a65a9f\",\n \"score\": \"0.7323455\",\n \"text\": \"public function register()\\n {\\n $this->registerServices();\\n $this->registerAliases();\\n $this->registerMiddlewares();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6565a24d5a28733b87ac1adb8b6715a\",\n \"score\": \"0.72733027\",\n \"text\": \"public function register()\\n {\\n $this->app->bind('App\\\\Services\\\\MeigaraService');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9bc6cfd69a60feee0745325044d378e\",\n \"score\": \"0.7268026\",\n \"text\": \"public function register()\\n {\\n $this->registerRepositories();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f957a2343ab60f1e1e46bfbc29595a1\",\n \"score\": \"0.7247485\",\n \"text\": \"public function register()\\n {\\n // Automatically apply the package configuration\\n //$this->mergeConfigFrom(__DIR__.'/../config/config.php', 'data-repository');\\n\\n // Register the main class to use with the facade\\n $this->app->singleton('data-repository', function () {\\n return new DataRepository;\\n });\\n\\n $this ->app ->register('Mawuekom\\\\MacroSearch\\\\MacroSearchServiceProvider');\\n $this ->app ->register('Spatie\\\\QueryBuilder\\\\QueryBuilderServiceProvider');\\n $this ->app ->register('Spatie\\\\JsonApiPaginate\\\\JsonApiPaginateServiceProvider');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ecbd2e6e9219079a74c56af4e343e67\",\n \"score\": \"0.7237381\",\n \"text\": \"public function register()\\n {\\n $this->app->bind('Customer', \\\\App\\\\Services\\\\CustomerService::class);\\n $this->app->bind('Loan', \\\\App\\\\Services\\\\LoanService::class);\\n $this->app->bind('Screen', \\\\App\\\\Services\\\\ScreenService::class);\\n $this->app->bind('Message', \\\\App\\\\Services\\\\MessageService::class);\\n $this->app->bind('Payment', \\\\App\\\\Services\\\\PaymentService::class); \\n $this->app->bind('Crb', \\\\App\\\\Services\\\\CrbService::class); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9e22c599d2bd043c36264648ddcc425\",\n \"score\": \"0.72195977\",\n \"text\": \"public function register()\\n {\\n Passport::ignoreMigrations();\\n\\n // Register providers\\n // $this->app->register(BroadcastServiceProvider::class);\\n $this->app->register(EventServiceProvider::class);\\n $this->app->register(RouteServiceProvider::class);\\n// $this->app->register(AuthServiceProvider::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5921cbcb82527c146d127ec1dc98298\",\n \"score\": \"0.7211748\",\n \"text\": \"public function register()\\n {\\n if ($this->app->environment() !== 'production') {\\n $this->app->register(\\\\Barryvdh\\\\LaravelIdeHelper\\\\IdeHelperServiceProvider::class);\\n }\\n\\n $this->app->bind(\\\"neo4jRelation\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\Neo4jRelationService;\\n });\\n\\n $this->app->bind(\\\"neo4jCriteria\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\Neo4jCriteriaService;\\n });\\n\\n $this->app->bind(\\\"field\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\FieldService;\\n });\\n\\n $this->app->bind(\\\"criteria\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\CriteriaService;\\n });\\n\\n $this->app->bind(\\\"pagination\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\PaginationService;\\n });\\n\\n $this->app->bind(\\\"templateHelper\\\", function() {\\n return new \\\\Gigtrooper\\\\Helpers\\\\TemplateHelper();\\n });\\n\\n $this->app->bind(\\\"categoryService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\CategoryService();\\n });\\n\\n $this->app->bind(\\\"subFieldService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\SubField();\\n });\\n\\n $this->app->bind(\\\"fileUploadService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\FileUploadService();\\n });\\n\\n $this->app->bind(\\\"dateService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\DateService();\\n });\\n\\n $this->app->bind(\\\"dateTimeService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\DateTimeService();\\n });\\n\\n $this->app->bind(\\\"userService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\UserService();\\n });\\n\\n $this->app->bind(\\\"elementsService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\ElementsService();\\n });\\n\\n $this->app->bind(\\\"fieldTypes\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\FieldTypes();\\n });\\n\\n $this->app->bind(\\\"countryService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\CountryService();\\n });\\n\\n $this->app->bind(\\\"postService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\PostService();\\n });\\n\\n $this->app->bind(\\\"messageChainService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\MessageChainService();\\n });\\n\\n $this->app->bind(\\\"messageFormService\\\", function() {\\n return new \\\\Gigtrooper\\\\Services\\\\MessageForm();\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41684855bf0abd3d5c8d41c9ad6c7a07\",\n \"score\": \"0.7209296\",\n \"text\": \"public function register()\\n {\\n\\n $this->app->bind(\\n VacancyServiceInterface::class,\\n VacancyService::class,\\n );\\n\\n $this->app->bind(\\n VacancyRepositoryInterface::class,\\n VacancyRepository::class,\\n );\\n\\n $this->app->bind(\\n AuthServiceInterface::class,\\n AuthService::class,\\n );\\n\\n $this->app->bind(\\n AuthRepositoryInterface::class,\\n AuthRepository::class,\\n );\\n\\n $this->app->bind(\\n MailServiceInterface::class,\\n MailService::class,\\n );\\n\\n $this->app->bind(\\n HashServiceInterface::class,\\n HashService::class,\\n );\\n\\n $this->app->bind(\\n JwtServiceInterface::class,\\n JwtService::class,\\n );\\n\\n $this->app->bind(\\n UserRepositoryInterface::class,\\n UserRepository::class,\\n );\\n\\n $this->app->bind(\\n FtpServiceInterface::class,\\n FtpService::class,\\n );\\n\\n $this->app->bind(\\n ProfileServiceInterface::class,\\n ProfileService::class,\\n );\\n\\n $this->app->bind(\\n ProfileRepositoryInterface::class,\\n ProfileRepository::class,\\n );\\n\\n $this->app->bind(\\n LocationRepositoryInterface::class,\\n LocationRepository::class,\\n );\\n\\n $this->app->bind(\\n LocationServiceInterface::class,\\n LocationService::class,\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67bad94d602aaba709b68134297a5c79\",\n \"score\": \"0.72073114\",\n \"text\": \"public function register()\\n {\\n $this->app->register(OrchestratorEventServiceProvider::class);\\n $this->app->register(DoctrineSupportServiceProvider::class);\\n $this->app->register(DropboxServiceProvider::class);\\n $this->app->register(GoogleDriveServiceProvider::class);\\n $this->app->register(LogViewerServiceProvider::class);\\n $this->app->register(L5SwaggerServiceProvider::class);\\n $this->registerConsoleCommands();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d04803be9b3b5833f6573a28989aabd\",\n \"score\": \"0.7197857\",\n \"text\": \"public function register() {\\n\\t\\t$this->registerQueryService();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c93f6a4a7d0b079c6cdc9af5f7929b14\",\n \"score\": \"0.71915245\",\n \"text\": \"public function register()\\n {\\n $this->registerHttplugFactories();\\n $this->registerHttplug();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c868ba7aca81f42ec0f9ec225c4b5ecd\",\n \"score\": \"0.71911395\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(\\n ContaServiceInterface::class,\\n ContaService::class,\\n );\\n $this->app->bind(\\n TransacaoServiceInterface::class,\\n TransacaoService::class,\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b18c34205ec5190ef1df81197574af7\",\n \"score\": \"0.7182214\",\n \"text\": \"public function register()\\n {\\n $this->registerModels();\\n $this->registerRepositories();\\n $this->registerSubscribers();\\n $this->registerValidators();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3453bd73dbffcdc4a2fe2b6fea8540f7\",\n \"score\": \"0.71802413\",\n \"text\": \"public function register()\\n {\\n App::bind(GCloudPubSubService::class, function () {\\n return new GCloudPubSubService();\\n });\\n\\n App::bind(PelaporanService::class, function ($app, $item) {\\n return new PelaporanService($item);\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49b33fbc5bfca91fe4dc2b23d7c66c71\",\n \"score\": \"0.7179535\",\n \"text\": \"public function register()\\n {\\n $this->registerValidationService();\\n\\n $this->registerValidate();\\n\\n $this->registerValidateAlias();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4fe5a75b6b66edf2a1ecc58967a749b\",\n \"score\": \"0.71674174\",\n \"text\": \"public function register()\\n {\\n //login\\n $this->app->bind('Domain\\\\Contracts\\\\Services\\\\UserLoginServiceContract', 'Domain\\\\Services\\\\UserLoginService');\\n //me\\n $this->app->bind('Domain\\\\Contracts\\\\Services\\\\MeServiceContract', 'Domain\\\\Services\\\\MeService');\\n \\n //user\\n $this->app->bind('Domain\\\\Contracts\\\\Repositories\\\\UserRepositoryContract', 'Infrastructure\\\\Persistence\\\\Doctrine\\\\Repositories\\\\UserRepository');\\n $this->app->bind('Domain\\\\Contracts\\\\Services\\\\UserServiceContract', 'Domain\\\\Services\\\\UserService');\\n \\n //company\\n $this->app->bind('Domain\\\\Contracts\\\\Repositories\\\\CompanyRepositoryContract', 'Infrastructure\\\\Persistence\\\\Doctrine\\\\Repositories\\\\CompanyRepository');\\n $this->app->bind('Domain\\\\Contracts\\\\Services\\\\CompanyServiceContract', 'Domain\\\\Services\\\\CompanyService');\\n\\n //country\\n $this->app->bind('Domain\\\\Contracts\\\\Repositories\\\\CountryRepositoryContract', 'Infrastructure\\\\Persistence\\\\Doctrine\\\\Repositories\\\\CountryRepository');\\n\\n //state\\n $this->app->bind('Domain\\\\Contracts\\\\Repositories\\\\StateRepositoryContract', 'Infrastructure\\\\Persistence\\\\Doctrine\\\\Repositories\\\\StateRepository');\\n $this->app->bind('Domain\\\\Contracts\\\\Services\\\\StateServiceContract', 'Domain\\\\Services\\\\StateService');\\n\\n //city\\n $this->app->bind('Domain\\\\Contracts\\\\Repositories\\\\CityRepositoryContract', 'Infrastructure\\\\Persistence\\\\Doctrine\\\\Repositories\\\\CityRepository');\\n $this->app->bind('Domain\\\\Contracts\\\\Services\\\\CityServiceContract', 'Domain\\\\Services\\\\CityService');\\n\\n //plan\\n $this->app->bind('Domain\\\\Contracts\\\\Repositories\\\\PlanRepositoryContract', 'Infrastructure\\\\Persistence\\\\Doctrine\\\\Repositories\\\\PlanRepository');\\n\\n //manager\\n $this->app->bind('Domain\\\\Contracts\\\\Repositories\\\\ManagerRepositoryContract', 'Infrastructure\\\\Persistence\\\\Doctrine\\\\Repositories\\\\ManagerRepository');\\n\\n //customer\\n $this->app->bind('Domain\\\\Contracts\\\\Repositories\\\\CustomerRepositoryContract', 'Infrastructure\\\\Persistence\\\\Doctrine\\\\Repositories\\\\CustomerRepository');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87308f79ec91947fe614365d984c4187\",\n \"score\": \"0.71669966\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(\\n 'App\\\\Http\\\\Interfaces\\\\VehicleInterface',\\n 'App\\\\Http\\\\Repositories\\\\VehicleRepository'\\n );\\n\\n $this->app->bind(\\n 'App\\\\Http\\\\Interfaces\\\\VehicleLookupInterface',\\n 'App\\\\Http\\\\Repositories\\\\VehicleLookupRepository'\\n );\\n\\n $this->app->bind(\\n 'App\\\\Http\\\\Interfaces\\\\DashboardInterface',\\n 'App\\\\Http\\\\Repositories\\\\DashboardRepository'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e9aa82c070622a2b80dcb6963f3284d\",\n \"score\": \"0.7164823\",\n \"text\": \"public function register()\\n {\\n //\\n if ($this->app->environment() !== 'production') {\\n $this->app->register(\\\\Barryvdh\\\\LaravelIdeHelper\\\\IdeHelperServiceProvider::class);\\n $this->app->register(\\\\pierresilva\\\\CrudGenerator\\\\CrudGeneratorServiceProvider::class);\\n $this->app->register(\\\\pierresilva\\\\NgGenerators\\\\LaravelServiceProvider::class);\\n $this->app->register(\\\\Mpociot\\\\ApiDoc\\\\ApiDocGeneratorServiceProvider::class);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25f4e270b5831167c34bac6f478651e6\",\n \"score\": \"0.7164422\",\n \"text\": \"public function register()\\n {\\n $this->registerHttpParsers();\\n $this->registerHttpValidation();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e30a68c58100ffcd0f8a581bacd7594a\",\n \"score\": \"0.7156825\",\n \"text\": \"public function register()\\n {\\n $this->registerTeamspeakFramework();\\n $this->registerTeamspeak();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"551449f13cba894a32639d3755a647e5\",\n \"score\": \"0.7149477\",\n \"text\": \"public function register()\\n {\\n $this->registerAlias();\\n\\n $this->registerServices();\\n\\n $this->registerCommands();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5be92b0a679a47e81b6b6c7295629cc3\",\n \"score\": \"0.714629\",\n \"text\": \"public function register()\\n {\\n //include __DIR__.'/routes.php';\\n //$this->app->make('dsanchezInmedia\\\\DataTable\\\\DataTableController');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4afd584d2e282e2912b292a9d7710570\",\n \"score\": \"0.7141903\",\n \"text\": \"public function register()\\n {\\n $this->app->register(ArtisanServiceProvider::class);\\n $this->app->register(RouteServiceProvider::class);\\n\\n $this->registerProviders();\\n\\n $this->registerVueApplication();\\n\\n $this->loadAssets();\\n\\n $this->registerNavigationPresetFactoryApplication();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41b780742f74c60ba1140ced3fcbcab0\",\n \"score\": \"0.7140552\",\n \"text\": \"public function register()\\n {\\n App::bind('App\\\\Repositories\\\\UserRepositoryInterface','App\\\\Repositories\\\\UserRepository');\\n App::bind('App\\\\Repositories\\\\AnimalRepositoryInterface','App\\\\Repositories\\\\AnimalRepository');\\n App::bind('App\\\\Repositories\\\\DonationTypeRepositoryInterface','App\\\\Repositories\\\\DonationTypeRepository');\\n App::bind('App\\\\Repositories\\\\NewsAniRepositoryInterface','App\\\\Repositories\\\\NewsAniRepository');\\n App::bind('App\\\\Repositories\\\\DonationRepositoryInterface','App\\\\Repositories\\\\DonationRepository');\\n App::bind('App\\\\Repositories\\\\ProductRepositoryInterface','App\\\\Repositories\\\\ProductRepository');\\n App::bind('App\\\\Repositories\\\\CategoryRepositoryInterface','App\\\\Repositories\\\\CategoryRepository');\\n App::bind('App\\\\Repositories\\\\TransferMoneyRepositoryInterface','App\\\\Repositories\\\\TransferMoneyRepository');\\n App::bind('App\\\\Repositories\\\\ShippingRepositoryInterface','App\\\\Repositories\\\\ShippingRepository');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5437c140e9b733468d3f7a661bdc737\",\n \"score\": \"0.7139776\",\n \"text\": \"public function register()\\n {\\n $this->app->bind('date', \\\\App\\\\Services\\\\Date\\\\DateService::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b267b515babc15285a8ebfb019b6a8f8\",\n \"score\": \"0.7135218\",\n \"text\": \"public function register()\\n {\\n if ($this->app instanceof LumenApplication) {\\n $this->app->configure('api'); // @codeCoverageIgnore\\n }\\n\\n $this->mergeConfigFrom(__DIR__.'/../config/api.php', 'api');\\n\\n $this->registerClient();\\n\\n $this->registerToken();\\n\\n if ($this->app->runningInConsole()) {\\n $this->registerForConsole();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47db51fb87da28db3d8a87fc9a87302b\",\n \"score\": \"0.7132706\",\n \"text\": \"public function register()\\n {\\n// $this->app->bind(BlogService::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c6f44c96275b5eb26cc52e2c80583c7\",\n \"score\": \"0.71313804\",\n \"text\": \"public function register()\\n {\\n /* $this->app->register(RouteServiceProvider::class); */\\n $this->registerBladeExtensions();\\n $this->setAliase();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96cb33ed2e7fdfbc4632bd6de12e341d\",\n \"score\": \"0.7119459\",\n \"text\": \"public function register(): void\\n {\\n $this->app->register(MenuEventServiceProvider::class);\\n $this->app->register(AuthServiceProvider::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96d8dce2a6bbdeb514d710a19e7939ca\",\n \"score\": \"0.7115587\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(DoctorService::class, function($app) {\\n return new DoctorService();\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d491548a56d80ccd58366b607a4e8a2d\",\n \"score\": \"0.71090174\",\n \"text\": \"public function register()\\n {\\n $this->app->make('Ecce\\\\WeatherForecast\\\\ForecastController');\\n $this->loadViewsFrom(__DIR__.'/views', 'forecast');\\n $this->loadMigrationsFrom(__DIR__.'/migrations');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4b124148ced0fba2b3a598e29ac90e4\",\n \"score\": \"0.70962703\",\n \"text\": \"public function register()\\n {\\n $this->registerApiAuth();\\n\\n $this->registerCommands();\\n\\n $this->mergeConfig();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f6812adf3d8edd064360f2b1367eca5\",\n \"score\": \"0.7091754\",\n \"text\": \"public function register()\\n {\\n //\\n if ($this->app->isLocal()) {\\n $this->app->register(\\\\Laravel\\\\Telescope\\\\TelescopeServiceProvider::class);\\n $this->app->register(TelescopeServiceProvider::class);\\n }\\n\\n if ($this->app->environment() !== 'production') {\\n $this->app->register(\\\\Barryvdh\\\\LaravelIdeHelper\\\\IdeHelperServiceProvider::class);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c853ae9bac17cacf27655da163a2708\",\n \"score\": \"0.70844907\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(\\n 'App\\\\Services\\\\Contracts\\\\CartServiceContract',\\n 'App\\\\Services\\\\CartService'\\n );\\n\\n $this->app->bind(\\n 'App\\\\Services\\\\Contracts\\\\ProductServiceContract',\\n 'App\\\\Services\\\\ProductService'\\n );\\n\\n $this->app->bind(\\n 'App\\\\Services\\\\Contracts\\\\CategoryServiceContract',\\n 'App\\\\Services\\\\CategoryService'\\n );\\n\\n $this->app->bind(\\n 'App\\\\Services\\\\Contracts\\\\TranslateServiceContract',\\n 'App\\\\Services\\\\TranslateService'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40f3f5ec79d8ffb47d3b910e79af5128\",\n \"score\": \"0.7083211\",\n \"text\": \"public function register()\\n {\\n /**\\n * Regitrar intanciamento padrão para noticia Repository pegando configuração\\n * para conexão ao elasticSearch\\n */\\n $this->app->bind(NoticiaRepository::class, function ($app) {\\n return new NoticiaRepository($app->make(Client::class));\\n });\\n $this->bindESClient();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef2200d44224806dd3179aae60c8575c\",\n \"score\": \"0.7082185\",\n \"text\": \"public function register()\\n {\\n $this->app->register(RouteServiceProvider::class);\\n\\n $this->app->register(MenuServiceProvider::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da1bc636f5076a61e905c37509fbd72f\",\n \"score\": \"0.70815176\",\n \"text\": \"public function register()\\n {\\n $this->app->register(RepositoryServiceProvider::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"443e770bddb47643992b29968059a288\",\n \"score\": \"0.7078013\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(AircraftController::class, function () {\\n return new AircraftController(new AircraftService());\\n });\\n $this->app->bind(BookingController::class, function () {\\n return new BookingController(new BookingService());\\n });\\n $this->app->bind(FlightController::class, function () {\\n return new FlightController(new FlightService());\\n });\\n $this->app->bind(SeatController::class, function () {\\n return new SeatController(new SeatService());\\n });\\n $this->app->bind(MultipleBookingController::class, function () {\\n return new MultipleBookingController(new MultipleBookingService());\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08b225cb063f72327c7123c067cbf548\",\n \"score\": \"0.70772624\",\n \"text\": \"public function register()\\n {\\n $this->registerService();\\n\\n $this->loadConfig();\\n\\n $this->registerCommands();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ecdce634712e37057c3c243a68fe7301\",\n \"score\": \"0.7071076\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(\\n 'App\\\\Services\\\\Contracts\\\\UsersServiceInterface',\\n 'App\\\\Services\\\\UsersService'\\n );\\n\\n $this->app->bind(\\n 'App\\\\Services\\\\Contracts\\\\BooksServiceInterface',\\n 'App\\\\Services\\\\BooksService'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ca4dc4f5b96b978cbb5d5afbba3a19e\",\n \"score\": \"0.7059063\",\n \"text\": \"public function register()\\n {\\n $this->app->make('Magnetar\\\\Tariffs\\\\Controllers\\\\ObjectCrudController');\\n $this->app->make('Magnetar\\\\Tariffs\\\\Controllers\\\\ModuleCrudController');\\n $this->app->make('Magnetar\\\\Tariffs\\\\Controllers\\\\UserObjectCrudController');\\n $this->app->make('Magnetar\\\\Tariffs\\\\Controllers\\\\ObjectTypeCrudController');\\n $this->app->make('Magnetar\\\\Tariffs\\\\Controllers\\\\PaymentController');\\n $this->commands($this->commands);\\n\\n $this->loadViewsFrom(__DIR__.'/views', 'magnetar_tariffs');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fc00bca0153bf347d4d91993f4ac6fb\",\n \"score\": \"0.70588976\",\n \"text\": \"public function register()\\n {\\n $this->registerConfig();\\n\\n $this->registerMenuManagerService();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d98d9977a862a0f17245df402c5d9eb7\",\n \"score\": \"0.70563334\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(UserAuthContract::class,UserAuthService::class);\\n $this->app->bind(CompanySettingContract::class,CompanySettingService::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e9bab5116778d6003f417ff9aa2a07c\",\n \"score\": \"0.7055316\",\n \"text\": \"public function register()\\n {\\n $this->app->register( RouteServiceProvider::class );\\n $this->app->register( RepositoryServiceProvider::class );\\n $this->app->register( AuthServiceProvider::class );\\n $this->app->register( ImageServiceProvider::class );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"430890e4b1f0dabc57776620444fb8eb\",\n \"score\": \"0.7054543\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(\\n \\\\App\\\\Services\\\\Country\\\\ICountryService::class,\\n \\\\App\\\\Services\\\\Country\\\\CountryService::class\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cebbe088c77610455dbe05fa46e11db3\",\n \"score\": \"0.70522976\",\n \"text\": \"public function register()\\n {\\n $this->registerImage();\\n\\n $this->registerImagineManager();\\n\\n $this->registerSourceManager();\\n\\n $this->registerUrlGenerator();\\n\\n $this->registerRouteRegistrar();\\n\\n $this->registerImageHandler();\\n\\n $this->registerContracts();\\n\\n $this->registerMiddlewares();\\n\\n $this->registerConsole();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"488b95520cd592b575e11c7452d640e3\",\n \"score\": \"0.70503455\",\n \"text\": \"public function register()\\n {\\n //Register Services\\n $this->app->bind('Api\\\\\\\\Services\\\\\\\\ISellerPostService', 'Api\\\\\\\\Services\\\\\\\\SellerPostService');\\n $this->app->bind('Api\\\\\\\\Services\\\\\\\\IBuyerPostService', 'Api\\\\\\\\Services\\\\\\\\BuyerPostService');\\n\\n $this->app->bind('Api\\\\\\\\Services\\\\\\\\FileStorage\\\\\\\\FileStorageInterface', 'Api\\\\\\\\Services\\\\\\\\FileStorage\\\\\\\\S3FileStorage');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e29aa875bcce2fee3e6b1953b69fd15a\",\n \"score\": \"0.70470077\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(\\n 'App\\\\Repositories\\\\Interfaces\\\\AuthRepositoryInterface',\\n 'App\\\\Repositories\\\\AuthRepository'\\n );\\n $this->app->bind(\\n 'App\\\\Repositories\\\\Interfaces\\\\CaptureRepositoryInterface',\\n 'App\\\\Repositories\\\\CaptureRepository'\\n );\\n $this->app->bind(\\n 'App\\\\Repositories\\\\Interfaces\\\\PokemonRepositoryInterface',\\n 'App\\\\Repositories\\\\PokemonRepository'\\n );\\n\\n $this->app->bind(\\n 'App\\\\Services\\\\Interfaces\\\\AuthServiceInterface',\\n 'App\\\\Services\\\\AuthService'\\n );\\n $this->app->bind(\\n 'App\\\\Services\\\\Interfaces\\\\CaptureServiceInterface',\\n 'App\\\\Services\\\\CaptureService'\\n );\\n $this->app->bind(\\n 'App\\\\Services\\\\Interfaces\\\\PokemonServiceInterface',\\n 'App\\\\Services\\\\PokemonService'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78bcefd7050ea075e2d08badd8a8ef43\",\n \"score\": \"0.7046471\",\n \"text\": \"public function register()\\n {\\n $this->app->bind( \\\\LACC\\\\Repositories\\\\CategoryRepository::class, \\\\LACC\\\\Repositories\\\\CategoryRepositoryEloquent::class );\\n $this->app->bind( \\\\LACC\\\\Repositories\\\\UserRepository::class, \\\\LACC\\\\Repositories\\\\UserRepositoryEloquent::class );\\n $this->app->bind( \\\\LACC\\\\Repositories\\\\SerieRepository::class, \\\\LACC\\\\Repositories\\\\SerieRepositoryEloquent::class );\\n $this->app->bind( \\\\LACC\\\\Repositories\\\\VideoRepository::class, \\\\LACC\\\\Repositories\\\\VideoRepositoryEloquent::class );\\n $this->app->bind( \\\\LACC\\\\Repositories\\\\PlanRepository::class, \\\\LACC\\\\Repositories\\\\PlanRepositoryEloquent::class );\\n $this->app->bind( \\\\LACC\\\\Repositories\\\\OrderRepository::class, \\\\LACC\\\\Repositories\\\\OrderRepositoryEloquent::class );\\n $this->app->bind( \\\\LACC\\\\Repositories\\\\SubscriptionRepository::class, \\\\LACC\\\\Repositories\\\\SubscriptionRepositoryEloquent::class );\\n $this->app->bind( \\\\LACC\\\\Repositories\\\\PaypalWebProfileRepository::class, \\\\LACC\\\\Repositories\\\\PaypalWebProfileRepositoryEloquent::class );\\n //:end-bindings:\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9614f01af5ef402d2f77ea0965a37ddd\",\n \"score\": \"0.7044727\",\n \"text\": \"public function register() {\\n\\t\\t$this->app['zuora'] = $this->app->share(function($app) {\\n\\t\\t\\t\\treturn new ZuoraManager($app);\\n\\t\\t\\t});\\n\\t\\t$this->app->booting(function() {\\n\\t\\t\\t\\t$loader = \\\\Illuminate\\\\Foundation\\\\AliasLoader::getInstance();\\n\\t\\t\\t\\t$loader->alias('Zuora', 'Dazza76\\\\Zuora\\\\Facades\\\\Zuora');\\n\\t\\t\\t\\t$loader->alias('Zuora_API', 'Dazza76\\\\Zuora\\\\zuora-api\\\\API');\\n\\t\\t\\t});\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9696a2955855ee0c64bc22082a3087c9\",\n \"score\": \"0.70437646\",\n \"text\": \"public function register()\\n {\\n $this->registerConfiguration();\\n\\n $this->registerIgc2Kmz();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdfeac787cdd5eb8804a4f15a59df6a4\",\n \"score\": \"0.70428437\",\n \"text\": \"public function register()\\n {\\n $this->mergeConfigFrom(__DIR__ . '/config/config.php', 'les');\\n\\n $this->registerCommands();\\n $this->registerDataSerializer();\\n $this->registerRepositoryFactory();\\n $this->registerResponseBuilder();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dcebcce58ea16efaf0a131275d002fd2\",\n \"score\": \"0.70383126\",\n \"text\": \"public function register ()\\n {\\n $this->registerBankServices();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36b05d08d95a77ee3892ab87399d37ed\",\n \"score\": \"0.7032526\",\n \"text\": \"public function register()\\n {\\n $this->app->register(RouteServiceProvider::class);\\n $this->app->register(MiddlewareServiceProvider::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05feae3ee4b76131873d0fe07f0f065f\",\n \"score\": \"0.70259774\",\n \"text\": \"public function register() {\\n\\n $app = $this->app;\\n $app['rest.server'] = $app->share(function ($app)\\n {\\n $case = $app['config']['andizzle/rest-framework::case'];\\n return new RestServer($case);\\n });\\n\\n $app['rest.serializer'] = $app->share(function ($app)\\n {\\n $model = $app['config']['andizzle/rest-framework::serializer.model'];\\n return new $model;\\n });\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d21c1b0658a66c641de235961ddb458\",\n \"score\": \"0.7025021\",\n \"text\": \"public function register() {\\n $this->app->bind(\\n 'App\\\\Services\\\\ExcelFileProcessorService',\\n function ($app) {\\n return new ExcelFileProcessorService();\\n }\\n );\\n\\n $this->app->bind('App\\\\Services\\\\UserService', function ($app) {\\n return new UserService();\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fdc41fb4fad15312dc0e93d3a818d52\",\n \"score\": \"0.7022796\",\n \"text\": \"public function register()\\n {\\n $this->registerServiceProviders();\\n $this->registerAliases();\\n $this->registerCommands();\\n $this->registerConfigs();\\n $this->registerRoutes();\\n $this->registerPublishable();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ee6da8654ba9bd9d0101156c5225e65\",\n \"score\": \"0.7022791\",\n \"text\": \"public function register()\\n\\t{\\n\\t\\t$this->registerCommandTranslator();\\n\\n\\t\\t$this->registerCommandBus();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65694cf9355438bdb56a1bcc4b9e2a87\",\n \"score\": \"0.70214576\",\n \"text\": \"public function register()\\n {\\n \\\\App::bind('App\\\\Repositories\\\\CampaignRepositoryInterface', 'App\\\\Repositories\\\\Eloquent\\\\CampaignRepository');\\n \\\\App::bind('App\\\\Repositories\\\\LotteryRepositoryInterface', 'App\\\\Repositories\\\\Eloquent\\\\LotteryRepository');\\n \\\\App::bind('App\\\\Repositories\\\\EntryRepositoryInterface', 'App\\\\Repositories\\\\Eloquent\\\\EntryRepository');\\n \\\\App::bind('App\\\\Repositories\\\\VoteRepositoryInterface', 'App\\\\Repositories\\\\Eloquent\\\\VoteRepository');\\n \\\\App::bind('App\\\\Repositories\\\\PlayerRepositoryInterface', 'App\\\\Repositories\\\\Eloquent\\\\PlayerRepository');\\n \\\\App::bind('App\\\\Repositories\\\\UserRepositoryInterface', 'App\\\\Repositories\\\\Eloquent\\\\UserRepository');\\n \\\\App::bind('App\\\\Repositories\\\\SerialRepositoryInterface', 'App\\\\Repositories\\\\Eloquent\\\\SerialRepository');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"550bd052b2967290f29706336c80e80b\",\n \"score\": \"0.70176536\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(\\\"App\\\\Repositories\\\\User\\\\UserRepository\\\", \\\"App\\\\Repositories\\\\User\\\\UserService\\\");\\n $this->app->bind(\\\"App\\\\Repositories\\\\Note\\\\NoteRepository\\\", \\\"App\\\\Repositories\\\\Note\\\\NoteService\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23809250d230e1f4ac8cda60819645df\",\n \"score\": \"0.7014792\",\n \"text\": \"public function register()\\n {\\n $this->registerBindings();\\n $this->registerFacade();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbde3c2af05f55fb8df4261eeda74cbb\",\n \"score\": \"0.7013609\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(\\n ParserInterface::class,\\n ParserService::class\\n );\\n $this->app->bind(\\n SocialInterface::class,\\n SocialService::class\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff416b2021da6b9f1a51bd49be5661e6\",\n \"score\": \"0.70120114\",\n \"text\": \"public function register()\\n {\\n $this->mergeConfigFrom(__DIR__.'/config/config.php', 'widgetize');\\n $this->commands('command.imanghafoori.widget');\\n app(RouteMacros::class)->registerMacros();\\n app(SingletonServices::class)->registerSingletons($this->app);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cfae77d9fe9b935350385adbdcd9ae91\",\n \"score\": \"0.70066726\",\n \"text\": \"public function register()\\n {\\n $this->app->register(\\\\Webpatser\\\\Countries\\\\CountriesServiceProvider::class);\\n\\n $loader = \\\\Illuminate\\\\Foundation\\\\AliasLoader::getInstance();\\n $loader->alias('Countries', 'Webpatser\\\\Countries\\\\CountriesFacade');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"297dd2baab74cabd002cb7d94173f542\",\n \"score\": \"0.70058805\",\n \"text\": \"public function register()\\n {\\n\\n $this->app->bind(\\n UserRepository::class,\\n EloquentUserRepository::class\\n );\\n\\n $this->app->bind(\\n EmpresasRepository::class,\\n EloquentEmpresasRepository::class\\n );\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66f0c3b6d11614e5a90039a3456c784f\",\n \"score\": \"0.7005107\",\n \"text\": \"public function register()\\n {\\n $this->registerApi($this->app['config']['zuora'], $this->app[LoggerInterface::class]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12ab930dfedd294d1332c8713ceff315\",\n \"score\": \"0.7003655\",\n \"text\": \"public function register()\\n {\\n $this->app->bind('App\\\\Services\\\\AudienceService', function ($app) {\\n return new AudienceService($app->make('Illuminate\\\\Database\\\\DatabaseManager'));\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e6847ee02ae41d870fb4e7adb61ca52\",\n \"score\": \"0.7002627\",\n \"text\": \"public function register()\\n {\\n //\\n $this->modelService();\\n $this->manufactureService();\\n $this->categoryService();\\n $this->itemService();\\n $this->saleOrderService();\\n $this->conditionService();\\n $this->whTransferService();\\n $this->supplierService();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7dd8ea5d03d8b02a445f42ba595bca8\",\n \"score\": \"0.6997481\",\n \"text\": \"public function register()\\n\\t{ \\n \\t\\n \\t\\\\App::bind('assets', function()\\n\\t\\t{\\n\\t\\t return new \\\\App\\\\Services\\\\Assets;\\n\\t\\t});\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa49ab70e8e4d0712fc332213e5918c3\",\n \"score\": \"0.6996125\",\n \"text\": \"public function register()\\n {\\n $this->app->singleton(ChromeDriverService::class, ChromeDriverService::class);\\n $this->app->singleton(WebDriverService::class, WebDriverService::class);\\n $this->app->singleton(ReportRepository::class, ReportRepository::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6c961d61ddd61241667d328f8e518b6\",\n \"score\": \"0.6995174\",\n \"text\": \"public function register()\\n {\\n $this->registerRouter();\\n $this->registerControllerDispatcher();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"123e5f09cb8263ff4946744bbe7f9a67\",\n \"score\": \"0.6993437\",\n \"text\": \"public function register()\\n {\\n $this->app->bind('App\\\\Services\\\\Interfaces\\\\UserServiceInterface', 'App\\\\Services\\\\UserService');\\n $this->app->bind('App\\\\Services\\\\Interfaces\\\\SearchServiceInterface', 'App\\\\Services\\\\SearchService');\\n $this->app->bind('App\\\\Services\\\\Interfaces\\\\TaskServiceInterface', 'App\\\\Services\\\\TaskService');\\n $this->app->bind('App\\\\Services\\\\Interfaces\\\\TimesheetServiceInterface', 'App\\\\Services\\\\TimesheetService');\\n $this->app->bind('App\\\\Services\\\\Interfaces\\\\FileServiceInterface', 'App\\\\Services\\\\FileService');\\n $this->app->bind('App\\\\Services\\\\Interfaces\\\\ReportServiceInterface', 'App\\\\Services\\\\ReportService');\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbe0b9f157965d6277fe01bcbd6a76a1\",\n \"score\": \"0.6991146\",\n \"text\": \"public function register()\\n {\\n /**\\n * Service providers are auto-discovered by Laravel from version 5.5\\n * If a Service Provider is needed only is specific environment\\n * use the switch below\\n */\\n switch ($this->app->environment()) {\\n case 'local':\\n $this->app->register(\\\\Barryvdh\\\\LaravelIdeHelper\\\\IdeHelperServiceProvider::class);\\n break;\\n\\n case 'test':\\n break;\\n\\n case 'staging':\\n break;\\n\\n case 'production':\\n break;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32b6819d12a255227cf4657552a828de\",\n \"score\": \"0.69901663\",\n \"text\": \"public function register()\\n {\\n $this->app->bind('log-reader', 'Jackiedo\\\\LogReader\\\\LogReader');\\n\\n $this->registerCommands();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"254020eedf35718d14379d6b89004954\",\n \"score\": \"0.69893235\",\n \"text\": \"public function register() {\\n\\n // Middlewares\\n $this->app->singleton('TokenMiddleware', function($app){\\n return new TokenMiddleware($app);\\n });\\n\\n // Services\\n // $this->app->bind('WordListService', function($app) {\\n $this->app->singleton('WordListService', function($app) {\\n return new WordListService();\\n });\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39d6bd38810dc9103fc1b520d13ab79d\",\n \"score\": \"0.6988052\",\n \"text\": \"public function register()\\n {\\n\\n\\n $models = array(\\n 'Article',\\n 'Categorie',\\n 'Section',\\n 'Media',\\n 'User'\\n );\\n\\n foreach ($models as $model) {\\n $this->app->bind(\\n\\n \\\"App\\\\\\\\Repositories\\\\\\\\{$model}Repository\\\",\\n \\\"App\\\\\\\\Repositories\\\\\\\\{$model}RepositoryEloquent\\\"\\n );\\n }\\n\\n $this->app->register('Darkaonline\\\\L5Swagger\\\\L5SwaggerServiceProvider');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69c83df6b13aef2407d3e73cba145cb1\",\n \"score\": \"0.6987087\",\n \"text\": \"public function register()\\n {\\n $this->app->singleton(CountryService::class);\\n $this->app->singleton(Client::class, function () {\\n return new Client(\\n config('services.influx.host'),\\n config('services.influx.port'),\\n config('services.influx.username'),\\n config('services.influx.password')\\n );\\n });\\n $this->app->singleton(InfluxService::class, function () {\\n $service = app(Client::class);\\n return new InfluxService(\\n $service,\\n $service->selectDB(config('services.influx.database'))\\n );\\n });\\n $this->app->singleton(\\\\Elasticsearch\\\\Client::class, function () {\\n return ClientBuilder::create()\\n ->setHosts([config('services.elasticsearch.host') . ':' . config('services.elasticsearch.port')])\\n ->build();\\n });\\n $this->app->singleton(ElasticSearchService::class);\\n $this->app->singleton(DatabaseService::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4dc342393b6ec4bb2d2679382e1911f3\",\n \"score\": \"0.69835174\",\n \"text\": \"public function register()\\n {\\n\\t\\t$this->registerErrorHandlers();\\n $this->registerFilterBindings();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd93ffb07b82f55c19bbb5c3b13af369\",\n \"score\": \"0.6983031\",\n \"text\": \"public function register()\\n {\\n $this->app->bind('fazlali.laravel-jwt.api', function($app){\\n return new \\\\Fazlali\\\\LaravelJWT\\\\JWTAPI($app['request']);\\n });\\n $this->app->bind('fazlali.laravel-jwt.auth', function($app){\\n return new \\\\Fazlali\\\\LaravelJWT\\\\JWTAuth($app['request'], $app['auth']);\\n });\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7351bc11062a4c556526bf47212d9269\",\n \"score\": \"0.6973643\",\n \"text\": \"public function register()\\n {\\n // $this->app->singleton('leancloud', \\\\App\\\\Services\\\\LeancloudService::class);\\n\\n // $this->app->singleton('qiniu', \\\\App\\\\Services\\\\QiniuService::class);\\n\\n $this->app->singleton('wechat', \\\\App\\\\Services\\\\WechatService::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdd17555ebe34b621e1da9d71ee8230b\",\n \"score\": \"0.6970282\",\n \"text\": \"public function register()\\n {\\n $this->app->booting(function() {\\n $loader = AliasLoader::getInstance();\\n $loader->alias(\\\\Vanilo\\\\Framework\\\\Http\\\\Controllers\\\\ProductController::class, \\\\App\\\\Http\\\\Controllers\\\\Admin\\\\ProductController::class);\\n $loader->alias(\\\\Vanilo\\\\Framework\\\\Http\\\\Controllers\\\\MediaController::class, \\\\App\\\\Http\\\\Controllers\\\\Admin\\\\MediaController::class);\\n $loader->alias(\\\\Vanilo\\\\Framework\\\\Search\\\\ProductFinder::class, \\\\App\\\\Ctic\\\\Product\\\\Search\\\\ProductFinder::class);\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da743f1cdf57877d8341b117fc3ec7ba\",\n \"score\": \"0.6970165\",\n \"text\": \"public function register()\\n\\t{\\n\\t\\tapp()->bind(UserstatisticsServiceInterface::class, UserstatisticsService::class);\\n\\t\\tapp()->bind(UserstatisticsRepositoryInterface::class, UserstatisticsRepository::class);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4485cef02cdd87b12a09ca62d56eb074\",\n \"score\": \"0.69695693\",\n \"text\": \"public function register()\\n\\t{\\n\\t\\t$this->app->register(EventServiceProvider::class);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45db8ec6276e2bcbcc82009817da3d53\",\n \"score\": \"0.69687283\",\n \"text\": \"public function register()\\n {\\n $this->app->bind(LoadsServiceInterface::class, LoadsService::class);\\n $this->app->bind(UtillsServiceInterface::class, UtillsService::class);\\n $this->app->bind(OffersServiceInterface::class, OffersService::class);\\n $this->app->bind(VehiclesServiceInterface::class, VehiclesService::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e2dc3e202e54a8b49de16647852b2e7\",\n \"score\": \"0.6967715\",\n \"text\": \"public function register()\\n {\\n if ($this->app->runningInConsole()) {\\n $this->registerConsoleCommands();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"262e6955c60f56ae55fa9127d6f7e4e8\",\n \"score\": \"0.69606704\",\n \"text\": \"public function register()\\n {\\n $this->app->singleton(NotificationApi::class, function ($app) {\\n return new NotificationApiVersion1($app->make(NotificationService::class));\\n });\\n\\n $this->app->singleton(TransactionUploadApi::class, function ($app) {\\n return new TransactionUploadApiVersion1($app->make(TransactionUploadService::class),\\n $app->make(CsvValidatorService::class));\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7d84cfee7e5163f0ac2e95c6ce484c5\",\n \"score\": \"0.6959384\",\n \"text\": \"public function register() {\\n \\n $this->app['google'] = $this->app->share(function($app) {\\n return new Eden_Google($app['config']);\\n });\\n $this->app->booting(function() {\\n $loader = \\\\Illuminate\\\\Foundation\\\\AliasLoader::getInstance();\\n $loader->alias('google','Taqmaninw\\\\Apipack\\\\Facade\\\\Google');\\n });\\n $this->app['facebook'] = $this->app->share(function($app) {\\n return new Eden_Facebook($app['config']);\\n });\\n $this->app->booting(function() {\\n $loader = \\\\Illuminate\\\\Foundation\\\\AliasLoader::getInstance();\\n $loader->alias('fb', 'Taqmaninw\\\\Apipack\\\\Facade\\\\Facebook');\\n });\\n $this->app['twitter'] = $this->app->share(function($app) {\\n return new Eden_Twitter($app['config']);\\n });\\n $this->app['dropbox'] = $this->app->share(function($app) {\\n return new Eden_Dropbox($app['config']);\\n });\\n $this->app['instagram'] = $this->app->share(function($app) {\\n return new Eden_Instagram($app['config']);\\n });\\n $this->app['paypal'] = $this->app->share(function($app) {\\n return new Eden_Paypal($app['config']);\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b738453f6bd35aac0f52592451efa7a\",\n \"score\": \"0.695643\",\n \"text\": \"public function register()\\n {\\n $this->di->setShared(\\n $this->serviceName,\\n function () {\\n $dispatcher = new Dispatcher();\\n $dispatcher->setDefaultNamespace('App\\\\Http\\\\Controllers');\\n\\n return $dispatcher;\\n }\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5567db2de31e992cf94837319e0fc1c\",\n \"score\": \"0.69551903\",\n \"text\": \"public function register()\\n {\\n\\n // Register Factories\\n $this->registerEloquentFactoriesFrom(__DIR__.'/database/factories');\\n\\n // Default Package Configuration\\n $this->mergeConfigFrom(__DIR__.'/config/earmark.php', 'earmark');\\n $this->mergeConfigFrom(__DIR__.'/config/default.php', 'earmark');\\n\\n $this->app->register(EventServiceProvider::class);\\n\\n // @codeCoverageIgnoreStart\\n //Poing\\\\Earmark\\\\Http\\\\Controllers\\n $this->app->singleton('earmark', function () {\\n return new Serial;\\n });\\n\\n //Poing\\\\Earmark\\\\Http\\\\Controllers\\n $this->app->singleton('sequence', function () {\\n return new Sequential;\\n });\\n // @codeCoverageIgnoreEnd\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00df6aa25ac08b99dd662ce948e6d51b\",\n \"score\": \"0.6954678\",\n \"text\": \"public function register()\\n {\\n include __DIR__.'/../Http/routes.php';\\n\\n $this->app->register('A6digital\\\\Image\\\\DefaultProfileImageServiceProvider');\\n\\n $this->app->make('Arangel\\\\SmartAdmin\\\\Http\\\\Controllers\\\\AdminController');\\n $this->app->make('Arangel\\\\SmartAdmin\\\\Http\\\\Controllers\\\\ProfileController');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6b7a0ac11db89c809d327596ba939fd9\",\n \"score\": \"0.695379\",\n \"text\": \"public function register(): void\\n {\\n $this->registerContracts();\\n $this->registerConsoleCommands();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b91e69cc5f4882216988c0d66a43c536\",\n \"score\": \"0.6952329\",\n \"text\": \"public function register()\\n {\\n if (class_exists(\\\\ErpNET\\\\Saas\\\\Providers\\\\ErpnetSaasServiceProvider::class))\\n $this->app->register(\\\\ErpNET\\\\Saas\\\\Providers\\\\ErpnetSaasServiceProvider::class);\\n\\n if (class_exists(\\\\ErpNET\\\\Permissions\\\\Providers\\\\ErpnetPermissionsServiceProvider::class))\\n $this->app->register(\\\\ErpNET\\\\Permissions\\\\Providers\\\\ErpnetPermissionsServiceProvider::class);\\n\\n if (class_exists(\\\\Barryvdh\\\\TranslationManager\\\\ManagerServiceProvider::class))\\n $this->app->register(\\\\Barryvdh\\\\TranslationManager\\\\ManagerServiceProvider::class);\\n\\n\\n if (class_exists(\\\\ErpNET\\\\Migrates\\\\Providers\\\\ErpnetMigratesServiceProvider::class))\\n $this->app->register(\\\\ErpNET\\\\Migrates\\\\Providers\\\\ErpnetMigratesServiceProvider::class);\\n\\n// if (class_exists(\\\\ErpNET\\\\Models\\\\Providers\\\\ErpnetModelsServiceProvider::class))\\n// $this->app->register(\\\\ErpNET\\\\Models\\\\Providers\\\\ErpnetModelsServiceProvider::class);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":717,"cells":{"query_id":{"kind":"string","value":"f15be84d7cf7e910bf64b78dd646bc0f"},"query":{"kind":"string","value":"Return action message for history log"},"positive_passages":{"kind":"list like","value":[{"docid":"20e72e8ebe2a75a0c499bac47dc6bff6","score":"0.6382086","text":"public function getHistoryMessage($args = array())\n\t{\n\t\t$incrementId = isset($args['increment_id']) ? $args['increment_id'] : '';\n\t\treturn df_h()->reward()->__('Earned points for order #%s.', $incrementId);\n\t}","title":""}],"string":"[\n {\n \"docid\": \"20e72e8ebe2a75a0c499bac47dc6bff6\",\n \"score\": \"0.6382086\",\n \"text\": \"public function getHistoryMessage($args = array())\\n\\t{\\n\\t\\t$incrementId = isset($args['increment_id']) ? $args['increment_id'] : '';\\n\\t\\treturn df_h()->reward()->__('Earned points for order #%s.', $incrementId);\\n\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"9f0355284295d6c67bd9686c4f8c1855","score":"0.65113485","text":"public function getName() {\n\t\treturn \"log_action\";\n\t}","title":""},{"docid":"e8b5656b266f8277607b3ad10a1bae08","score":"0.6172861","text":"function _log_action($action = '')\n\t{\n\t\tglobal $DB, $IN, $LOC, $PREFS;\n\n\t\tif ($action == '')\n\t\t{\n\t\t\treturn;\n\t\t}\n\n if (is_array($action))\n {\n \tif (count($action) == 0)\n \t{\n \t\treturn;\n \t}\n\n $msg = '';\n\n foreach ($action as $val)\n {\n $msg .= $val.\"\\n\";\n }\n\n $action = $msg;\n }\n\n $DB->query(\n $DB->insert_string(\n 'exp_cp_log',\n\n array(\n 'id' => '',\n 'member_id' => 1,\n 'username' => 'Member Utilities',\n 'ip_address' => '127.0.0.1',\n 'act_date' => $LOC->now,\n 'action' => $action,\n 'site_id'\t => $PREFS->ini('site_id')\n )\n )\n );\n\t}","title":""},{"docid":"662208ce69e47750ce31b06a386aa846","score":"0.61136204","text":"public function displayHistory() {}","title":""},{"docid":"d536dafb2ccb6e34e384682b2418a39b","score":"0.60654575","text":"public function getHistoryMessage($args = [])\n {\n $incrementId = isset($args['increment_id']) ? $args['increment_id'] : '';\n return __('Earned promotion extra points from order #%1', $incrementId);\n }","title":""},{"docid":"0d1712e7e13e373a2a56b8632df162c2","score":"0.60622096","text":"public function getCallToActionText()\n {\n return isset($this->call_to_action_text) ? $this->call_to_action_text : null;\n }","title":""},{"docid":"92e960e92e0862d0f445b5a774e64b5c","score":"0.6044147","text":"public function getPreviousActionName() {}","title":""},{"docid":"a267102716ba4c095bfd20804473d456","score":"0.5978843","text":"public function logHistory()\n {\n $model = Mage::getModel('quartic/history');\n $storeCode = $this->getRequest()->getParam('___store');\n $store = Mage::getModel(\"core/store\")->load($storeCode);\n $data = array('store_id' => $store->getId());\n $model->setData($data);\n $model->save();\n }","title":""},{"docid":"138e33174c3c832caa577df30d7d8063","score":"0.59761906","text":"function view_action()\n\t{\n\t\tbreadcrumb_set_self(do_lang_tempcode('ENTRY'));\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('VIEW_ACTION_LOGS')),array('_SELF:_SELF:list',do_lang_tempcode('RESULTS'))));\n\n\t\t$mode=get_param('mode','ocf');\n\t\t$id=get_param_integer('id');\n\n\t\tif ($mode=='ocf')\n\t\t{\n\t\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_moderator_logs',array('l_reason AS reason','id','l_by AS the_user','l_date_and_time AS date_and_time','l_the_type AS the_type','l_param_a AS param_a','l_param_b AS param_b'),array('id'=>$id),'',1);\n\t\t} else\n\t\t{\n\t\t\t$rows=$GLOBALS['SITE_DB']->query_select('adminlogs',array('id','the_user','date_and_time','the_type','param_a','param_b','ip'),array('id'=>$id),'',1);\n\t\t}\n\n\t\tif (!array_key_exists(0,$rows)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n\t\t$row=$rows[0];\n\n\t\t$title=get_page_title('VIEW_ACTION_LOGS');\n\t\t$username=$GLOBALS['FORUM_DRIVER']->get_username($row['the_user']);\n\t\tif (is_null($username)) $username=do_lang('UNKNOWN');\n\t\t$type_str=do_lang($row['the_type'],$row['param_a'],$row['param_b'],NULL,NULL,false);\n\t\tif (is_null($type_str)) $type_str=$row['the_type'];\n\t\t$fields=array(\n\t\t\t\t\t\t'USERNAME'=>$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($row['the_user']),\n\t\t\t\t\t\t'DATE_TIME'=>get_timezoned_date($row['date_and_time']),\n\t\t\t\t\t\t'TYPE'=>$type_str,\n\t\t\t\t\t\t'PARAMETER_A'=>is_null($row['param_a'])?'':$row['param_a'],\n\t\t\t\t\t\t'PARAMETER_B'=>is_null($row['param_b'])?'':$row['param_b']);\n\t\tif (array_key_exists('ip',$row)) $fields['IP_ADDRESS']=escape_html($row['ip']);\n\t\tif (array_key_exists('reason',$row)) $fields['REASON']=escape_html($row['reason']);\n\t\tif (addon_installed('securitylogging'))\n\t\t{\n\t\t\tif (array_key_exists('ip',$row))\n\t\t\t{\n\t\t\t\t$banned_test_1=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_ip','ip',array('ip'=>$row['ip']));\n\t\t\t\t$fields['IP_BANNED']=is_null($banned_test_1)?do_lang_tempcode('NO'):do_lang_tempcode('YES');\n\t\t\t\tif ($row['ip']!=get_ip_address())\n\t\t\t\t{\n\t\t\t\t\t$fields['IP_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_ip_ban','id'=>$row['ip']),'_SELF'))));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$banned_test_2=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_member','the_member',array('the_member'=>$row['the_user']));\n\t\t\t$fields['SUBMITTER_BANNED']=is_null($banned_test_2)?do_lang_tempcode('NO'):do_lang_tempcode('YES');\n\t\t\tif ((!is_guest($row['the_user'])) && ($row['the_user']!=get_member()))\n\t\t\t{\n\t\t\t\t$fields['SUBMITTER_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_submitter_ban','id'=>$row['the_user'],'mode'=>$mode,'action_id'=>$id),'_SELF'))));\n\t\t\t}\n\t\t\t$banned_test_3=$GLOBALS['FORUM_DRIVER']->is_banned($row['the_user']);\n\t\t\t$fields['MEMBER_BANNED']=$banned_test_3?do_lang_tempcode('YES'):do_lang_tempcode('NO');\n\t\t\tif (((get_forum_type()=='ocf') && (!is_guest($row['the_user']))) && ($row['the_user']!=get_member()))\n\t\t\t{\n\t\t\t\t$fields['MEMBER_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_member_ban','id'=>$row['the_user'],'mode'=>$mode,'action_id'=>$id),'_SELF'))));\n\t\t\t}\n\t\t}\n\t\t$fields['INVESTIGATE_USER']=hyperlink(build_url(array('page'=>'admin_lookup','id'=>(array_key_exists('ip',$row))?$row['ip']:$row['the_user']),'_SELF'),do_lang_tempcode('PROCEED'));\n\n\t\trequire_code('templates_view_space');\n\t\treturn view_space($title,$fields);\n\t}","title":""},{"docid":"ba55e4f49cae7df1987f265826a64f7e","score":"0.59605944","text":"public function getActionDetails()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $request = $objectManager->get('\\Magento\\Framework\\App\\RequestInterface');\n $action = ['origin' => null, 'username' => null];\n\n if (isset($request->getParams()['key'])) {\n // Action triggered from the backend\n $action['origin'] = \\Wyomind\\Framework\\Api\\Data\\ActionHistoryInterface::ORIGIN_BACKEND;\n\n $auth = $objectManager->get('\\Magento\\Backend\\Model\\Auth');\n if ($auth->getUser() != null) {\n $action['username'] = $auth->getUser()->getUsername();\n } else {\n $action['username'] = __('Unknown user');\n }\n } else {\n if (php_sapi_name() == 'cli') {\n // Action triggered from CLI\n $action['origin'] = \\Wyomind\\Framework\\Api\\Data\\ActionHistoryInterface::ORIGIN_CLI;\n $action['username'] = utf8_encode(get_current_user());\n } else {\n $state = $objectManager->get('\\Magento\\Framework\\App\\State');\n if ($state->getAreaCode() == 'webapi_rest') {\n // Action triggered from API\n $action['origin'] = \\Wyomind\\Framework\\Api\\Data\\ActionHistoryInterface::ORIGIN_API;\n\n } else {\n // Action triggered from Cron\n $action['origin'] = \\Wyomind\\Framework\\Api\\Data\\ActionHistoryInterface::ORIGIN_CRON;\n $action['username'] = utf8_encode(get_current_user());\n }\n }\n }\n\n return $action;\n }","title":""},{"docid":"8983a2ab97eb328eb6dab1c5623c69cd","score":"0.5932819","text":"public function action() : string\n {\n\t return $this->action;\n }","title":""},{"docid":"2692c428af3823c8cc2cee3205368139","score":"0.58929473","text":"public function getActionHistory () {\n return UserActionHistory::getUserHistory();\n }","title":""},{"docid":"9dc0896ffef81ff4581f8377ce9fb4b5","score":"0.5879128","text":"public function addHistory() {\n if (!empty($this->evidenciahistory_id)) {\n $sql = \"insert into tickethistory (ticket_id,description,created_at,user_id,evidenciahistory_id) \";\n $sql .= \"value ($this->ticket_id,\\\"$this->description\\\",NOW(),$this->user_id,\\\"$this->evidenciahistory_id\\\")\";\n return Executor::doit($sql);\n } else {\n $sql = \"insert into tickethistory (ticket_id,description,created_at,user_id,evidenciahistory_id) \";\n $sql .= \"value ($this->ticket_id,\\\"$this->description\\\",NOW(),$this->user_id,\\\"$this->evidenciahistory_id\\\")\";\n return Executor::doit($sql);\n }\n }","title":""},{"docid":"e7f5c5e11c27c54545dc9ff939648771","score":"0.58700436","text":"function insights_get_history_actions() {\n global $db;\n $tbl = TABLE_PREFIX;\n\n $r = $db->Index(\"action\")->Query(\n \"select count(*) AS `rows` , `action`\n FROM `{$tbl}_history`\n GROUP BY `action`\n ORDER BY `action`\"\n );\n\n return( $r );\n}","title":""},{"docid":"8b726fcb2f484c02aefcf91b3f016883","score":"0.5867213","text":"public static function writeHistory($action = 'update', $result = null) {\n global $lC_Database;\n \n $lC_Database->startTransaction();\n \n $Qhistory = $lC_Database->query('insert into :table_updates_log (action, result, user, dateCreated) values (:action, :result, :user, :dateCreated)');\n $Qhistory->bindTable(':table_updates_log', TABLE_UPDATES_LOG);\n $Qhistory->bindValue(':action', ucwords($action));\n $Qhistory->bindValue(':result', $result);\n $Qhistory->bindValue(':user', $_SESSION['admin']['firstname'] . ' ' . $_SESSION['admin']['lastname']);\n $Qhistory->bindValue(':dateCreated', date(\"Y-m-d H:i:s\")); \n $Qhistory->setLogging($_SESSION['module']); \n $Qhistory->execute(); \n\n if (!$lC_Database->isError()) {\n $lC_Database->commitTransaction();\n return true;\n } else {\n $lC_Database->rollbackTransaction();\n return false;\n } \n }","title":""},{"docid":"537eab9e5254c9997ddd6370df61619b","score":"0.5865054","text":"function getHistory() {}","title":""},{"docid":"ddc3e888d4aa184fe12ed2de9621c0d2","score":"0.5819254","text":"public function actionLog() {\n $file = Yii::app()->basePath . DIRECTORY_SEPARATOR . \"data\" . DIRECTORY_SEPARATOR . \"chat_log.html\";\n\n if (is_file($file)) {\n $filesize = filesize($file);\n if ($filesize > 0) {\n $fp = fopen($file, 'r');\n\n $contents = fread($fp, $filesize);\n fclose($fp);\n $page_title = $this->readPageTitle();\n $userName = explode(\":\",trim($page_title));\n $contents = GroupChat::model()->getChatHistory();\n echo CJSON::encode(array(\"content\" => $contents,\"page_title\"=>$page_title));\n } else {\n echo CJSON::encode(array(\"content\" => \"\",\"page_title\"=>\"\",\"user_name\"=>$userName[0]));\n }\n } else {\n echo CJSON::encode(array(\"content\" => \"\",\"page_title\"=>\"\"));\n }\n }","title":""},{"docid":"b22604515476fb8cb011e2032b002133","score":"0.5759748","text":"public function getLogMessage();","title":""},{"docid":"b85fa3471370c3dcfda001035b29a80b","score":"0.57584614","text":"public function operation_history() {\n $data['title'] = 'Nexup | History';\n\n if (isset($_SESSION['logged_in'])) {\n $get_operations_url = API_URL . 'Account/GetOperationHistory';\n $header = array('Content-Type: application/json');\n if (isset($_SESSION['xauthtoken'])) {\n $val = 'X-AuthToken: ' . $_SESSION['xauthtoken'];\n array_push($header, $val);\n }\n\n $history_post['apikey'] = API_KEY;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $get_operations_url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $header);\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($history_post));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n $server_output = curl_exec($ch);\n $response = (array) json_decode($server_output);\n $op = array_merge_recursive($response['data']->ListOperation, $response['data']->TaskOperation);\n $data['operations'] = $op;\n $this->template->load('default_template', 'user/operations', $data);\n } else {\n $this->session->set_flashdata('error', 'Please login to continue!');\n redirect($this->agent->referrer());\n }\n }","title":""},{"docid":"e99b852017c75ccc7948dee67bd0a799","score":"0.5757954","text":"public function getActionName()\n {\n // get the last action stack entry\n $lastEntry = $this->getActionStack()->getLastEntry();\n\n if ($lastEntry)\n {\n return $lastEntry->getActionName();\n }\n }","title":""},{"docid":"aa5f607ff9d66b9633ff4e784404a071","score":"0.5736952","text":"public function pfmstransactionhistoryAction(){\n\t\t\t\n\t\t$admname = new Zend_Session_Namespace('adminMname'); \n\t\t$userid = new Zend_Session_Namespace('userid');\n if($admname->adminname==''){\n $this->_redirect('');\n }\n $role = new Zend_Session_Namespace('role');\t\n if(!in_array($role->role,$this->rolearray)){\n\t\t\t$this->_redirect('');\n }\n if($role->role==6){\n $this->_helper->layout->setLayout('admin/layout');\n }\n\t\t\n\t\t$request = $this->getRequest();//$this should refer to a controller\n\t\tif($request->getParam('benef_id')!=''){\n\t\t\t$querystr = safexss($request->getParam('benef_id'));\n\t\t\t$_GET['benef_id'] = $querystr;\n\t\t}\n\t\t$scheme_id = safexss(base64_decode($request->getParam('scheme_id')));\n\t\t$min_id = safexss(base64_decode($request->getParam('min_id')));\n\t\t\n\t\tif(($scheme_id == '') || (!is_numeric($scheme_id))){\n\t\t\t$this->_redirect('');\n\t\t}\n\t\t$cmi_list = new Application_Model_Managetransaction();\n\t\t$scheme_code = $cmi_list->getschemecode($scheme_id);\n\t\t$this->view->assign('scheme_code', $scheme_code);\n\t\t$schemedetail = $cmi_list->getschemename($scheme_id);\n\t\t$this->view->assign('scheme_id', $schemedetail);\n\t\t$this->view->assign('min_id', $min_id);\n\t\t$schemedetails = $schemedetail->toArray();\n if($request->getParam('actmsg')=='add'){\n $this->view->assign('successMsg', RECORD_INSERTED);\n }elseif($request->getParam('actmsg')=='edit'){\n $this->view->assign('successMsg', RECORD_UPDATED);\n }elseif($request->getParam('actmsg')=='del'){\n $this->view->assign('successMsg', RECORD_DELETED);\n }elseif($request->getParam('actmsg')=='inactivate'){\n $this->view->assign('successMsg', 'Selected record has been Deactivated successfully.');\n }\n\t\t// Remove query string on page refresh\n\t\tsession_start();\n\t\t$RequestSignature = md5($_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING'].print_r($_POST, true));\n\t\tif ($_SESSION['LastRequest'] == $RequestSignature){\n\t\t \t$pos = strpos($_SERVER['QUERY_STRING'], 'actmsg=');\n\t\t\tif ($pos !== false) {\n\t\t\t\t//$this->_redirect('/schemeowner/beneficiarydatalist?scheme_id='.base64_encode($schemedetails[0]['id']));\n\t\t\t}\n\t\t}else{\n\t\t $_SESSION['LastRequest'] = $RequestSignature;\n\t\t}\n\t\t// Remove query string on page refresh end\n\t\t\tif(isset($start)){\n\t\t\t\t// This variable is set to zero for the first page\n\t\t\t\t$start = 0;\n\t\t\t}else{\n\t\t\t\t $start=$request->getParam('start');\n\t\t\t\t}\n\t\t$page=0;\n\t\t$limit=1500;\n\t\t$scheme_id = base64_decode($request->getParam('scheme_id'));\n\t\t$asignedschemeid = $cmi_list->checkasignedschemeid($userid->userid,$scheme_id);\n\t\tif($asignedschemeid > 0 || $role->role == 1 || $role->role == 6){\n\t\t\t$cmishow_list = $cmi_list->pfmstransactiondatalist($start,$limit,$scheme_id);\n\t\t\t$countcmi = $cmi_list->countpfmstransactiondatalist($scheme_id);\n\t\t\t//$this->pr_man($cmishow_list,1);\n\t\t\t$this->view->assign('cmidata', $cmishow_list);\n\t\t\t$minpagingid = $request->getParam('min_id');\n\t\t\t$schmepagingid = $request->getParam('scheme_id');\n\t\t\t$page_name = 'beneficiarydatalist';\n\t\t\t$pagination1=$this->pagination_search($schmepagingid,$minpagingid, $countcmi,$year,$month,$start,$limit,$page_name);\n\t\t\t$this->view->assign('pagination', $pagination1);\n\t\t\t$this->view->assign('start', $start);\n\t\t\t$this->view->assign('counttotalcmireports', $countcmi);\n\t\t\t//echo \"aaab\";exit;\n\t\t}else{\n\t\t\t$this->_redirect('/schemeowner/beneficiarydatalist');\n\t\t}\n\t}","title":""},{"docid":"be903889d24f6d3223b0a70b2b47ade4","score":"0.5726721","text":"public function getLastAction()\n {\n\n return $this->database->getSession( session_id() )->lastaction;\n }","title":""},{"docid":"96323b672294b400614e2314190c194b","score":"0.5718543","text":"public function getActionlogs()\n {\n return $this->actionlogs;\n }","title":""},{"docid":"06e4a74b15bb6ce670750d1d59f59c4b","score":"0.57048947","text":"public function getLogIntentionAction()\n {\n \n }","title":""},{"docid":"52d925af2921658bcd753b608f60be3b","score":"0.56885856","text":"private function log(Model $model, string $action)\n {\n }","title":""},{"docid":"20d8b15393ee68dc09d8e4e3018e9f2f","score":"0.56876165","text":"public function action()\n\t{\n\t\treturn $this->action;\n\t}","title":""},{"docid":"74026f672c4fa9a3330e381b5dead4f0","score":"0.56587774","text":"function logAction($action, $message, $file = 'log.txt')\n{\n $logfile = SITE_ROOT . DS . 'log' . DS . $file;\n\n if ($handle = fopen($logfile, 'a')) {\n $timestamp = strftime(\"%d.%m.%Y %H:%M:%S\", time());\n $content = \"$timestamp | $action : $message\\n\";\n fwrite($handle, $content);\n fclose($handle);\n } else {\n echo \"Nije uspelo logovanje\";\n }\n}","title":""},{"docid":"906958e8866e3e06bdee5bcdcf7018be","score":"0.56528884","text":"function logAction($level,$method,$data,$action){\n\t$CI = &get_instance();\n\tlog_message($level,'DFI::'.$method.' | '. $CI->session->userdata('username')\n\t.' | '.$action.' | '. print_r($data,TRUE));\n}","title":""},{"docid":"6733919df141daf3d5d86ed91646f52e","score":"0.5642127","text":"public function getAction()\n {\n return isset($this->action) ? $this->action : '';\n }","title":""},{"docid":"7984775977fed6ccd15b94404589218f","score":"0.5639815","text":"public function action()\n {\n return $this->action;\n }","title":""},{"docid":"697ab51e075984c3910305a65e522c34","score":"0.5638907","text":"public function transactionhistoryAction() {\n /**\n * Renderer loadlayout()\n */\n $this->loadLayout ();\n $this->_initLayoutMessages ( 'catalog/session' );\n /**\n * If not logged in\n */\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {\n /**\n * Set login redirect url.\n */\n $this->_redirectUrl ( Mage::helper ( 'customer' )->getLoginUrl () );\n } else {\n /**\n * Set page title.\n */\n $this->getLayout ()->getBlock ( 'head' )->setTitle ( $this->__ ( 'Transaction History' ) );\n }\n $this->renderLayout ();\n }","title":""},{"docid":"3abdff993ad1f7a5d34b34b3907b497c","score":"0.56231636","text":"public static function logChange( Model $model, string $action ) {\n ModelAction::create([\n 'id' => ModelAction::max('id')+1,\n 'user_id' => static::activeUserId(),\n 'model' => static::class,\n 'action' => $action,\n 'message' => static::logSubject($model),\n 'ip_address' => request()->ip(),\n 'models' => [\n 'new' => $action !== 'DELETED' ? $model->getAttributes() : null,\n 'old' => $action !== 'CREATED' ? $model->getOriginal() : null,\n 'changed' => $action === 'UPDATED' ? $model->getChanges() : null,\n ]\n ]);\n }","title":""},{"docid":"12d73efbdf38dd11f6bb17f0a98236e7","score":"0.56219864","text":"public function getAction(): string\n {\n return $this->action;\n }","title":""},{"docid":"03dc774c44478d7b9fbf8542b0cff2b5","score":"0.5615899","text":"private function getLogTemplate()\n {\n $user_id = $this->user ? $this->user->id : 'N/A';\n\n $template = now()->toDateTimeString().PHP_EOL;\n\n if ($this->action === 'create') {\n $template .= \"New model was created by $user_id.\"\n .PHP_EOL.'Inserted data: '\n .PHP_EOL.http_build_query($this->model->toArray(), '', PHP_EOL);\n } elseif ($this->action === 'edit') {\n $template .= \"Model {$this->model->id} was update by $user_id.\"\n .PHP_EOL.'MODEL BEFORE '\n .PHP_EOL.http_build_query(array_intersect_key($this->model->getOriginal(),\n array_intersect_key($this->model->getChanges(),\n array_flip($this->loggable_fields))), '', PHP_EOL)\n\n .PHP_EOL.'MODEL AFTER '\n .PHP_EOL.http_build_query(array_intersect_key($this->model->getChanges(),\n array_flip($this->loggable_fields)), '', PHP_EOL);\n } elseif ($this->action === 'delete') {\n $template .= \"Model {$this->model->id} was deleted by $user_id\";\n }\n\n $template .= PHP_EOL.PHP_EOL;\n\n return $template;\n }","title":""},{"docid":"2f1e755da1398e06e73dbc87c8fc9e43","score":"0.56108254","text":"function history_id() {\n return $this->history_id;\n }","title":""},{"docid":"5d9e1103e12f1551112564f4053345bc","score":"0.5607661","text":"public function getActionlogsId()\n {\n return $this->actionlogs_id;\n }","title":""},{"docid":"84f1a4e0e6444b837fb02e9e80aae664","score":"0.5599127","text":"public function getHistory()\n {\n\n }","title":""},{"docid":"18265a1561d4e5190d96687a271ecd5c","score":"0.5595286","text":"public function getAction(): string\n {\n if ($this->obj[0] !== null) {\n return $this->obj[0]->action;\n }\n return '';\n }","title":""},{"docid":"7643a300b68ae5a6c9e004a9413d3edc","score":"0.5587727","text":"public function _actionsAction()\n\t{\n\t\t$this->ajax(\n\t\t\t'SELECT DATE_FORMAT(Date,\"%d/%m/%y à %Hh\"), CONCAT(Matiere, \\' : \\', Titre, \\'\\'), Action\n\t\t\tFROM Exercices_Logs\n\t\t\tLEFT JOIN Exercices ON (Exercices_Logs.Exercice = Exercices.ID)\n\t\t\tLEFT JOIN Membres ON (Membres.ID = Exercices_Logs.Membre)\n\t\t\tWHERE Exercices_Logs.Correcteur = ' . $_SESSION['Correcteur']->getFilteredId(),\n\t\t\t'Exercices_Logs.ID DESC'\n\t\t);\n\t}","title":""},{"docid":"a001239f81d24cf80b7912f173abecc0","score":"0.5587579","text":"public function actionViewLogs(){\n return $this->render('view-logs');\n }","title":""},{"docid":"c06b4863e7be353b8a02cf3130813650","score":"0.5579973","text":"function choose_action()\n\t{\n\t\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('VIEW_ACTION_LOGS'))));\n\t\tbreadcrumb_set_self(do_lang_tempcode('RESULTS'));\n\n\t\t$title=get_page_title('VIEW_ACTION_LOGS');\n\n\t\trequire_code('templates_internalise_screen');\n\t\t$test_tpl=internalise_own_screen($title);\n\t\tif (is_object($test_tpl)) return $test_tpl;\n\n\t\t$id=get_param_integer('id',-1);\n\t\t$start=get_param_integer('start',0);\n\t\t$max=get_param_integer('max',50);\n\t\t$sortables=array('date_and_time'=>do_lang_tempcode('DATE_TIME'),'the_type'=>do_lang_tempcode('ACTION'));\n\t\t$test=explode(' ',get_param('sort','date_and_time DESC'),2);\n\t\tif (count($test)==1) $test[1]='DESC';\n\t\tlist($sortable,$sort_order)=$test;\n\t\tif (((strtoupper($sort_order)!='ASC') && (strtoupper($sort_order)!='DESC')) || (!array_key_exists($sortable,$sortables)))\n\t\t\tlog_hack_attack_and_exit('ORDERBY_HACK');\n\t\tglobal $NON_CANONICAL_PARAMS;\n\t\t$NON_CANONICAL_PARAMS[]='sort';\n\n\t\trequire_code('templates_results_table');\n\t\t$field_titles=array(do_lang_tempcode('USERNAME'),do_lang_tempcode('DATE_TIME'),do_lang_tempcode('ACTION'),do_lang_tempcode('PARAMETER_A'),do_lang_tempcode('PARAMETER_B'));\n\t\tif (addon_installed('securitylogging'))\n\t\t\t$field_titles[]=do_lang_tempcode('_BANNED');\n\t\t$fields_title=results_field_title($field_titles,$sortables,'sort',$sortable.' '.$sort_order);\n\n\t\t$filter_to_type=get_param('to_type','');\n\t\t$filter_param_a=get_param('param_a','');\n\t\t$filter_param_b=get_param('param_b','');\n\n\t\t$max_rows=0;\n\n\t\t// Pull up our rows: forum\n\t\tif (get_forum_type()=='ocf')\n\t\t{\n\t\t\t// Possible filter (called up by URL)\n\t\t\t$where='1=1';\n\t\t\tif ($filter_to_type!='')\n\t\t\t\t$where.=' AND '.db_string_equal_to('l_the_type',$filter_to_type);\n\t\t\tif ($filter_param_a!='')\n\t\t\t\t$where.=' AND l_param_a LIKE \\''.db_encode_like('%'.$filter_param_a.'%').'\\'';\n\t\t\tif ($filter_param_b!='')\n\t\t\t\t$where.=' AND l_param_b LIKE \\''.db_encode_like('%'.$filter_param_b.'%').'\\'';\n\t\t\tif ($id!=-1) $where.=' AND l_by='.strval($id);\n\n\t\t\t// Fetch\n\t\t\t$rows1=$GLOBALS['FORUM_DB']->query('SELECT l_reason,id,l_by AS the_user,l_date_and_time AS date_and_time,l_the_type AS the_type,l_param_a AS param_a,l_param_b AS param_b FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_moderator_logs WHERE '.$where.' ORDER BY '.$sortable.' '.$sort_order,$max+$start);\n\t\t\t$max_rows+=$GLOBALS['FORUM_DB']->query_value_null_ok_full('SELECT COUNT(*) FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_moderator_logs WHERE '.$where);\n\t\t} else $rows1=array();\n\n\t\t// Pull up our rows: site\n\t\t{\n\t\t\t// Possible filter (called up by URL)\n\t\t\t$where='1=1';\n\t\t\tif ($filter_to_type!='')\n\t\t\t\t$where.=' AND '.db_string_equal_to('the_type',$filter_to_type);\n\t\t\tif ($filter_param_a!='')\n\t\t\t\t$where.=' AND param_a LIKE \\''.db_encode_like('%'.$filter_param_a.'%').'\\'';\n\t\t\tif ($filter_param_b!='')\n\t\t\t\t$where.=' AND param_b LIKE \\''.db_encode_like('%'.$filter_param_b.'%').'\\'';\n\t\t\tif ($id!=-1) $where.=' AND the_user='.strval($id);\n\n\t\t\t// Fetch\n\t\t\t$rows2=$GLOBALS['SITE_DB']->query('SELECT id,the_user,date_and_time,the_type,param_a,param_b,ip FROM '.get_table_prefix().'adminlogs WHERE '.$where.' ORDER BY '.$sortable.' '.$sort_order,$max+$start);\n\t\t\t$max_rows+=$GLOBALS['SITE_DB']->query_value_null_ok_full('SELECT COUNT(*) FROM '.get_table_prefix().'adminlogs WHERE '.$where);\n\t\t\t$rows=array_merge($rows1,$rows2);\n\t\t}\n\n\t\trequire_code('actionlog');\n\n\t\t$fields=new ocp_tempcode();\n\t\t$pos=0;\n\t\twhile ((count($rows)!=0) && (($pos-$start)<$max))\n\t\t{\n\t\t\t$best=0; // Initialise type to integer\n\t\t\t$_best=0; // Initialise type to integer\n\t\t\t$best=NULL;\n\t\t\t$_best=NULL;\n\t\t\tforeach ($rows as $x=>$row)\n\t\t\t{\n\t\t\t\tif ((is_null($best))\n\t\t\t\t\t|| (($row['date_and_time']<$_best) && ($sortable=='date_and_time') && ($sort_order=='ASC'))\n\t\t\t\t\t|| (($row['date_and_time']>$_best) && ($sortable=='date_and_time') && ($sort_order=='DESC'))\n\t\t\t\t\t|| ((intval($row['the_type'])<$_best) && ($sortable=='the_type') && ($sort_order=='ASC'))\n\t\t\t\t\t|| ((intval($row['the_type'])>$_best) && ($sortable=='the_type') && ($sort_order=='DESC'))\n\t\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$best=$x;\n\t\t\t\t\tif ($sortable=='date_and_time') $_best=$row['date_and_time'];\n\t\t\t\t\tif ($sortable=='the_type') $_best=$row['the_type'];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($pos>=$start)\n\t\t\t{\n\t\t\t\t$myrow=$rows[$best];\n\n\t\t\t\t$username=$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($myrow['the_user']);\n\t\t\t\t$mode=array_key_exists('l_reason',$myrow)?'ocf':'ocp';\n\t\t\t\t$url=build_url(array('page'=>'_SELF','type'=>'view','id'=>$myrow['id'],'mode'=>$mode),'_SELF');\n\t\t\t\t$mode_nice=($mode=='ocp')?'ocPortal':'OCF';\n\t\t\t\t$date=hyperlink($url,get_timezoned_date($myrow['date_and_time']),false,true,$mode_nice.'/'.$row['the_type'].'/'.strval($myrow['id']),NULL,NULL,NULL,'_top');\n\n\t\t\t\tif (!is_null($myrow['param_a'])) $a=$myrow['param_a']; else $a='';\n\t\t\t\tif (!is_null($myrow['param_b'])) $b=$myrow['param_b']; else $b='';\n\n\t\t\t\trequire_code('templates_interfaces');\n\t\t\t\t$_a=tpl_crop_text_mouse_over($a,8);\n\t\t\t\t$_b=tpl_crop_text_mouse_over($b,15);\n\n\t\t\t\t$type_str=do_lang($myrow['the_type'],$_a,$_b,NULL,NULL,false);\n\t\t\t\tif (is_null($type_str)) $type_str=$myrow['the_type'];\n\n\t\t\t\t$test=actionlog_linkage($myrow['the_type'],$a,$b,$_a,$_b);\n\t\t\t\tif (!is_null($test)) list($_a,$_b)=$test;\n\n\t\t\t\t$result_entry=array($username,$date,$type_str,$_a,$_b);\n\n\t\t\t\tif (addon_installed('securitylogging'))\n\t\t\t\t{\n\t\t\t\t\t$banned_test_1=array_key_exists('ip',$myrow)?$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_ip','ip',array('ip'=>$myrow['ip'])):NULL;\n\t\t\t\t\t$banned_test_2=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_member','the_member',array('the_member'=>$myrow['the_user']));\n\t\t\t\t\t$banned_test_3=$GLOBALS['FORUM_DRIVER']->is_banned($myrow['the_user']);\n\t\t\t\t\t$banned=((is_null($banned_test_1)) && (is_null($banned_test_2)) && (!$banned_test_3))?do_lang_tempcode('NO'):do_lang_tempcode('YES');\n\n\t\t\t\t\t$result_entry[]=$banned;\n\t\t\t\t}\n\n\t\t\t\t$fields->attach(results_entry($result_entry,true));\n\t\t\t}\n\n\t\t\tunset($rows[$best]);\n\t\t\t$pos++;\n\t\t}\n\t\t$table=results_table(do_lang_tempcode('ACTIONS'),$start,'start',$max,'max',$max_rows,$fields_title,$fields,$sortables,$sortable,$sort_order,'sort');\n\n\t\treturn do_template('ACTION_LOGS_SCREEN',array('_GUID'=>'d75c813e372c3ca8d1204609e54c9d65','TABLE'=>$table,'TITLE'=>$title));\n\t}","title":""},{"docid":"a6b65c1117dbbeaa4b72b9ea21996ef6","score":"0.5578558","text":"function getPostTransactionActions($history) {\n $actions = array(4 => 'inquiryTransaction');\n\n if ( (in_array('3', $history) === false) && (in_array('2', $history) === false) ) {\n $actions[3] = 'approveTransaction';\n }\n\n if (in_array('2', $history) === false) {\n $actions[2] = 'cancelTransaction';\n }\n\n return $actions;\n }","title":""},{"docid":"08c9d445505f491edf6c71eccb722af4","score":"0.5571992","text":"static public function toHistoryString($post)\n\t{\n\t\t$controller = sfContext::getInstance()->getController();\n\t\t$link = $controller->genUrl('@view_thread?thread_id=' . $post->getThreadId());\n\t\t\n\t\t$link = sprintf(\n\t\t\t'%s',\n\t\t\t$link,\n\t\t\t'forum thread'\n\t\t);\n\t\t\n\t\treturn sprintf(\n\t\t\t'posted on a %s',\n\t\t\t$link\n\t\t);\n\t}","title":""},{"docid":"8b2b715fbf7a25facdbc6f681546fcee","score":"0.556756","text":"protected function createActionLog()\n {\n list($beforeAttributes, $afterAttributes) = $this->getAttributes();\n\n if ($this->actionType === 'updated' && empty($beforeAttributes)) {\n return;\n }\n\n ActionLog::create([\n 'user_id' => auth()->id(),\n 'type' => $this->actionType,\n 'model_id' => $this->model->id,\n 'model_type' => $this->modelType,\n 'model_name' => $this->model->getLogActionModelName(),\n 'before_attributes' => json_encode($beforeAttributes),\n 'after_attributes' => json_encode($afterAttributes),\n ]);\n }","title":""},{"docid":"f2e5dd54a9a9f915e3860a0e8d816960","score":"0.55622894","text":"public function execute()\n {\n $module = $this->getRequest()->getParam('module');\n $entity = $this->getRequest()->getParam('entity');\n\n $this->initCurrentAction();\n\n return $this->getResponse()->setBody(\n $this->_view->getLayout()->createBlock(\n 'Wyomind\\\\' . $module . '\\Block\\Adminhtml' . ($entity ? '\\\\' . $entity : '') . '\\Edit\\Tab\\ActionHistory'\n )->toHtml()\n );\n }","title":""},{"docid":"648d517a2f51dcfee03bf4a76baf0ecf","score":"0.5559455","text":"public function title(): string\n {\n return $this->action;\n }","title":""},{"docid":"0552b37fab50eaa21c26325d0089f91b","score":"0.5556896","text":"public function getActionName():string\n {\n return $this->action;\n }","title":""},{"docid":"f7c3de3ad9e3bcd6288e99c16d90e0b0","score":"0.555456","text":"public function commentsHistoryAction()\n {\n $this->_initOrder();\n $this->getResponse()->setBody(\n $this->getLayout()->createBlock('smvendors/adminhtml_sales_order_view_tab_history')->toHtml()\n );\n }","title":""},{"docid":"a472536db886773ed2a8665d7c5dfbcf","score":"0.5550547","text":"public function getAction(): string\n {\n return $this->getStringValue(['action'], 'run');\n }","title":""},{"docid":"ede3b7e8f6ec7be55db6d25f35a67d11","score":"0.55304086","text":"public static function processAuditLog(AuditLog $log): string\n {\n $sentence = '';\n\n if ($log->action == 'account_created') {\n $sentence = trans('account.log_account_created');\n }\n\n if ($log->action == 'employee_added_to_company') {\n $sentence = trans('account.log_employee_added_to_company', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_destroyed') {\n $sentence = trans('account.log_employee_destroyed', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_locked') {\n $sentence = trans('account.log_employee_locked', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_unlocked') {\n $sentence = trans('account.log_employee_unlocked', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'team_created') {\n $sentence = trans('account.log_team_created', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'team_updated') {\n $sentence = trans('account.log_team_updated', [\n 'old_name' => $log->object->{'team_old_name'},\n 'new_name' => $log->object->{'team_new_name'},\n ]);\n }\n\n if ($log->action == 'team_destroyed') {\n $sentence = trans('account.log_team_destroyed', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_added_to_team') {\n $sentence = trans('account.log_employee_added_to_team', [\n 'employee' => $log->object->{'employee_name'},\n 'team' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_removed_from_team') {\n $sentence = trans('account.log_employee_removed_from_team', [\n 'employee' => $log->object->{'employee_name'},\n 'team' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_updated') {\n $sentence = trans('account.log_employee_updated', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_updated_hiring_information') {\n $sentence = trans('account.log_employee_updated_hiring_information', [\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'manager_assigned') {\n $sentence = trans('account.log_manager_assigned', [\n 'name' => $log->object->{'manager_name'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'manager_unassigned') {\n $sentence = trans('account.log_manager_unassigned', [\n 'name' => $log->object->{'manager_name'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_invited_to_become_user') {\n $sentence = trans('account.log_employee_invited_to_become_user', [\n 'employee' => $log->object->{'employee_first_name'}.' '.$log->object->{'employee_last_name'},\n ]);\n }\n\n if ($log->action == 'position_created') {\n $sentence = trans('account.log_position_created', [\n 'name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'position_updated') {\n $sentence = trans('account.log_position_updated', [\n 'former_name' => $log->object->{'position_old_title'},\n 'new_name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'position_destroyed') {\n $sentence = trans('account.log_position_destroyed', [\n 'name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'position_assigned') {\n $sentence = trans('account.log_position_assigned', [\n 'name' => $log->object->{'position_title'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'position_removed') {\n $sentence = trans('account.log_position_removed', [\n 'name' => $log->object->{'position_title'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'flow_created') {\n $sentence = trans('account.log_flow_created', [\n 'name' => $log->object->{'flow_name'},\n ]);\n }\n\n if ($log->action == 'employee_worklog_logged') {\n $sentence = trans('account.log_employee_worklog_logged');\n }\n\n if ($log->action == 'employee_status_created') {\n $sentence = trans('account.log_employee_status_created', [\n 'name' => $log->object->{'employee_status_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_updated') {\n $sentence = trans('account.log_employee_status_updated', [\n 'former_name' => $log->object->{'employee_status_old_name'},\n 'new_name' => $log->object->{'employee_status_new_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_destroyed') {\n $sentence = trans('account.log_employee_status_destroyed', [\n 'name' => $log->object->{'employee_status_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_assigned') {\n $sentence = trans('account.log_employee_status_assigned', [\n 'name' => $log->object->{'employee_status_name'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_removed') {\n $sentence = trans('account.log_employee_status_removed', [\n 'name' => $log->object->{'employee_status_name'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'company_news_created') {\n $sentence = trans('account.log_company_news_created', [\n 'name' => $log->object->{'company_news_title'},\n ]);\n }\n\n if ($log->action == 'company_news_updated') {\n $sentence = trans('account.log_company_news_updated', [\n 'name' => $log->object->{'company_news_title'},\n ]);\n }\n\n if ($log->action == 'company_news_destroyed') {\n $sentence = trans('account.log_company_news_destroyed', [\n 'name' => $log->object->{'company_news_title'},\n ]);\n }\n\n if ($log->action == 'employee_morale_logged') {\n $sentence = trans('account.log_employee_morale_logged', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'company_pto_policy_created') {\n $sentence = trans('account.log_company_pto_policy_created', [\n 'year' => $log->object->{'company_pto_policy_year'},\n ]);\n }\n\n if ($log->action == 'company_pto_policy_updated') {\n $sentence = trans('account.log_company_pto_policy_updated', [\n 'year' => $log->object->{'company_pto_policy_year'},\n ]);\n }\n\n if ($log->action == 'time_off_created') {\n $sentence = trans('account.log_company_time_off_created', [\n 'date' => $log->object->{'planned_holiday_date'},\n ]);\n }\n\n if ($log->action == 'time_off_destroyed') {\n $sentence = trans('account.log_company_time_off_destroyed', [\n 'date' => $log->object->{'planned_holiday_date'},\n ]);\n }\n\n if ($log->action == 'address_added_to_employee') {\n $sentence = trans('account.log_employee_address_set', [\n 'address' => $log->object->{'partial_address'},\n ]);\n }\n\n if ($log->action == 'pronoun_assigned_to_employee') {\n $sentence = trans('account.log_employee_pronoun_set', [\n 'name' => $log->object->{'pronoun_label'},\n 'employee' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'pronoun_removed_from_employee') {\n $sentence = trans('account.log_employee_pronoun_removed', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_description_set') {\n $sentence = trans('account.log_employee_description_set', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_description_cleared') {\n $sentence = trans('account.log_employee_description_cleared', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_birthday_set') {\n $sentence = trans('account.log_employee_birthday_set', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'team_description_set') {\n $sentence = trans('account.log_team_description_set', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'team_description_cleared') {\n $sentence = trans('account.log_team_description_cleared', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'team_useful_link_created') {\n $sentence = trans('account.log_team_useful_link_created', [\n 'name' => $log->object->{'team_name'},\n 'link_name' => $log->object->{'link_name'},\n ]);\n }\n\n if ($log->action == 'team_useful_link_updated') {\n $sentence = trans('account.log_team_useful_link_updated', [\n 'name' => $log->object->{'team_name'},\n 'link_name' => $log->object->{'link_name'},\n ]);\n }\n\n if ($log->action == 'team_useful_link_destroyed') {\n $sentence = trans('account.log_team_useful_link_destroyed', [\n 'name' => $log->object->{'team_name'},\n 'link_name' => $log->object->{'link_name'},\n ]);\n }\n\n if ($log->action == 'team_news_created') {\n $sentence = trans('account.log_team_news_created', [\n 'name' => $log->object->{'team_name'},\n 'news_name' => $log->object->{'team_news_title'},\n ]);\n }\n\n if ($log->action == 'team_news_updated') {\n $sentence = trans('account.log_team_news_updated', [\n 'name' => $log->object->{'team_name'},\n 'news_name' => $log->object->{'team_news_title'},\n ]);\n }\n\n if ($log->action == 'team_news_destroyed') {\n $sentence = trans('account.log_team_news_destroyed', [\n 'name' => $log->object->{'team_name'},\n 'news_name' => $log->object->{'team_news_title'},\n ]);\n }\n\n if ($log->action == 'employee_personal_details_set') {\n $sentence = trans('account.log_employee_personal_details_set', [\n 'name' => $log->object->{'employee_name'},\n 'email' => $log->object->{'employee_email'},\n ]);\n }\n\n if ($log->action == 'team_leader_assigned') {\n $sentence = trans('account.log_team_leader_assigned', [\n 'name' => $log->object->{'team_leader_name'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'team_leader_removed') {\n $sentence = trans('account.log_team_leader_removed', [\n 'name' => $log->object->{'team_leader_name'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_work_from_home_logged') {\n $sentence = trans('account.log_employee_work_from_home_logged', [\n 'name' => $log->object->{'employee_name'},\n 'date' => $log->object->{'date'},\n ]);\n }\n\n if ($log->action == 'employee_work_from_home_destroyed') {\n $sentence = trans('account.log_employee_work_from_home_destroyed', [\n 'name' => $log->object->{'employee_name'},\n 'date' => $log->object->{'date'},\n ]);\n }\n\n if ($log->action == 'question_created') {\n $sentence = trans('account.log_question_created', [\n 'title' => $log->object->{'question_title'},\n 'status' => $log->object->{'question_status'},\n ]);\n }\n\n if ($log->action == 'question_updated') {\n $sentence = trans('account.log_question_updated', [\n 'title' => $log->object->{'question_title'},\n 'old_title' => $log->object->{'question_old_title'},\n ]);\n }\n\n if ($log->action == 'question_destroyed') {\n $sentence = trans('account.log_question_destroyed', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'question_activated') {\n $sentence = trans('account.log_question_activated', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'question_deactivated') {\n $sentence = trans('account.log_question_deactivated', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_created') {\n $sentence = trans('account.log_answer_created', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_updated') {\n $sentence = trans('account.log_answer_updated', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_destroyed') {\n $sentence = trans('account.log_answer_destroyed', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'hardware_created') {\n $sentence = trans('account.log_hardware_created', [\n 'name' => $log->object->{'hardware_name'},\n ]);\n }\n\n if ($log->action == 'hardware_updated') {\n $sentence = trans('account.log_hardware_updated', [\n 'name' => $log->object->{'hardware_name'},\n 'old_name' => $log->object->{'hardware_old_name'},\n ]);\n }\n\n if ($log->action == 'hardware_destroyed') {\n $sentence = trans('account.log_hardware_destroyed', [\n 'name' => $log->object->{'hardware_name'},\n ]);\n }\n\n if ($log->action == 'hardware_lent') {\n $sentence = trans('account.log_hardware_lent', [\n 'hardware_name' => $log->object->{'hardware_name'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'hardware_regained') {\n $sentence = trans('account.log_hardware_regained', [\n 'hardware_name' => $log->object->{'hardware_name'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'recent_ship_created') {\n $sentence = trans('account.log_recent_ship_created', [\n 'team_name' => $log->object->{'team_name'},\n 'ship_title' => $log->object->{'ship_title'},\n ]);\n }\n\n if ($log->action == 'employee_attached_to_recent_ship') {\n $sentence = trans('account.log_employee_attached_to_recent_ship', [\n 'employee_name' => $log->object->{'employee_name'},\n 'ship_title' => $log->object->{'ship_title'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'ship_destroyed') {\n $sentence = trans('account.log_recent_ship_destroyed', [\n 'ship_title' => $log->object->{'ship_title'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'skill_created') {\n $sentence = trans('account.log_skill_created', [\n 'skill_id' => $log->object->{'skill_id'},\n 'skill_name' => $log->object->{'skill_name'},\n ]);\n }\n\n if ($log->action == 'skill_associated_with_employee') {\n $sentence = trans('account.log_skill_associated_with_employee', [\n 'skill_id' => $log->object->{'skill_id'},\n 'skill_name' => $log->object->{'skill_name'},\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'skill_removed_from_an_employee') {\n $sentence = trans('account.log_skill_removed_from_an_employee', [\n 'skill_id' => $log->object->{'skill_id'},\n 'skill_name' => $log->object->{'skill_name'},\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'skill_destroyed') {\n $sentence = trans('account.log_skill_destroyed', [\n 'name' => $log->object->{'skill_name'},\n ]);\n }\n\n if ($log->action == 'skill_updated') {\n $sentence = trans('account.log_skill_updated', [\n 'skill_id' => $log->object->{'skill_id'},\n 'skill_old_name' => $log->object->{'skill_old_name'},\n 'skill_new_name' => $log->object->{'skill_new_name'},\n ]);\n }\n\n if ($log->action == 'expense_category_created') {\n $sentence = trans('account.log_expense_category_created', [\n 'id' => $log->object->{'expense_category_id'},\n 'name' => $log->object->{'expense_category_name'},\n ]);\n }\n\n if ($log->action == 'expense_category_updated') {\n $sentence = trans('account.log_expense_category_updated', [\n 'id' => $log->object->{'expense_category_id'},\n 'old_name' => $log->object->{'expense_category_old_name'},\n 'new_name' => $log->object->{'expense_category_new_name'},\n ]);\n }\n\n if ($log->action == 'expense_category_destroyed') {\n $sentence = trans('account.log_expense_category_destroyed', [\n 'name' => $log->object->{'expense_category_name'},\n ]);\n }\n\n if ($log->action == 'task_created') {\n $sentence = trans('account.log_task_created', [\n 'title' => $log->object->{'title'},\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'company_renamed') {\n $sentence = trans('account.log_company_renamed', [\n 'old_name' => $log->object->{'old_name'},\n 'new_name' => $log->object->{'new_name'},\n ]);\n }\n\n if ($log->action == 'company_currency_updated') {\n $sentence = trans('account.log_company_currency_updated', [\n 'old_currency' => $log->object->{'old_currency'},\n 'new_currency' => $log->object->{'new_currency'},\n ]);\n }\n\n if ($log->action == 'expense_created') {\n $sentence = trans('account.log_expense_created', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_manager') {\n $sentence = trans('account.log_expense_accepted_by_manager', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_accounting') {\n $sentence = trans('account.log_expense_accepted_by_accounting', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_by_accounting') {\n $sentence = trans('account.log_expense_rejected_by_accounting', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'employee_allowed_to_manage_expenses') {\n $sentence = trans('account.log_employee_allowed_to_manage_expenses', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_disallowed_to_manage_expenses') {\n $sentence = trans('account.log_employee_disallowed_to_manage_expenses', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'rate_your_manager_survey_answered') {\n $sentence = trans('account.log_rate_your_manager_survey_answered', [\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'employee_twitter_set') {\n $sentence = trans('account.log_employee_twitter_set', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'twitter' => $log->object->{'twitter'},\n ]);\n }\n\n if ($log->action == 'employee_twitter_reset') {\n $sentence = trans('account.log_employee_twitter_reset', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_slack_set') {\n $sentence = trans('account.log_employee_slack_set', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'slack' => $log->object->{'slack'},\n ]);\n }\n\n if ($log->action == 'employee_slack_reset') {\n $sentence = trans('account.log_employee_slack_reset', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'employee_hiring_date_set') {\n $sentence = trans('account.log_employee_hiring_date_set', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'hiring_date' => $log->object->{'hiring_date'},\n ]);\n }\n\n if ($log->action == 'one_on_one_entry_created') {\n $sentence = trans('account.log_one_on_one_entry_created', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_entry_destroyed') {\n $sentence = trans('account.log_one_on_one_entry_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_talking_point_created') {\n $sentence = trans('account.log_one_on_one_talking_point_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_talking_point_id' => $log->object->{'one_on_one_talking_point_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_action_item_created') {\n $sentence = trans('account.log_one_on_one_action_item_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_action_item_id' => $log->object->{'one_on_one_action_item_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_created') {\n $sentence = trans('account.log_one_on_one_note_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_note_id' => $log->object->{'one_on_one_note_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_action_item_destroyed') {\n $sentence = trans('account.log_one_on_one_action_item_destroyed', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_talking_point_destroyed') {\n $sentence = trans('account.log_one_on_one_talking_point_destroyed', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_destroyed') {\n $sentence = trans('account.log_one_on_one_note_destroyed', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_marked_happened') {\n $sentence = trans('account.log_one_on_one_note_marked_happened', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n return $sentence;\n }","title":""},{"docid":"ed3c3ede5058180494c78d7ee5ad5fd4","score":"0.551074","text":"public function dispatchLog();","title":""},{"docid":"25ba849872e53805b46d380f6d98059c","score":"0.55077046","text":"public function getOrderHistoryUrl(){\n return $this->getUrl('sales/order/history');\n }","title":""},{"docid":"9b671e432d526150bf76d0d1328af8f0","score":"0.5503841","text":"public function __toString()\n\t{\n\t\t$level = 0;\n\t\t$lines = [];\n\n\t\tforeach ($this->state as $action) {\n\t\t\tswitch ($action['type']) {\n\t\t\t\tcase 'request':\n\t\t\t\t\t$lines[] = str_repeat(\"\\t\", $level) . $action['name'] . ' requested ('; \n\t\t\t\t\t$level++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'dependsOn':\n\t\t\t\t\t$deps = $action['dependencies'];\n\t\t\t\t\t$lines[] = str_repeat(\"\\t\", $level) . 'Depedencies: ' . (empty($deps) ? 'none' : '[' . implode(', ', $deps) . ']'); \n\t\t\t\t\tbreak;\n\t\t\t\tcase 'note':\n\t\t\t\t\t$lines[] = str_repeat(\"\\t\", $level) . 'Note: ' . $action['note'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'received':\n\t\t\t\t\t$level--;\n\t\t\t\t\t$lines[] = str_repeat(\"\\t\", $level) . ')';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn implode(\"\\n\", $lines);\n\t}","title":""},{"docid":"2904ef50a4498c0ca20b1ae675126b09","score":"0.549825","text":"function logaction($user_id, $res, $res_id = 0, $action = null)\n{\n q(\n 'INSERT INTO fud30_action_log (logtime, logaction, user_id, a_res, a_res_id)\n\t\tVALUES(' .\n __request_timestamp__ .\n ', ' .\n ssn($action) .\n ', ' .\n $user_id .\n ', ' .\n ssn($res) .\n ', ' .\n (int)$res_id .\n ')'\n );\n}","title":""},{"docid":"5ef5614a605adc1dbfc64e542e741f33","score":"0.54968923","text":"function insights_history( $entry_id, $action, $note = '', $skip_copy = false ) {\n global $db;\n $tbl = TABLE_PREFIX;\n\n # phase one: make copies of all data associated with this $action_id\n if( $action === 'update' && $skip_copy === false ) {\n $copy_id = insights_backup($entry_id);\n\n # override $note to point to the old entry\n $note = \"~\" . $copy_id;\n }\n\n # phase two: get action id, record info about user and action\n $db->Query(\n \"insert into `{$tbl}_history`\n (`ip`, `action`, `entry_id`, `note`)\n values\n (:addr, :action, :entry_id, :note)\",\n array(\n \":addr\" => $_SERVER[\"REMOTE_ADDR\"],\n \":action\" => $action,\n \":entry_id\" => intval( $entry_id ),\n \":note\" => $note\n )\n );\n\n $action_id = $db->getInsertID();\n\n return( $action_id );\n}","title":""},{"docid":"15ac8f6db05a89426d4050dcba777931","score":"0.5495883","text":"protected function Action() { \n if(isset($this->queryGET['roll'])) {\n return \"\" . $this->Roll() . \"\"; \n } else if(isset($this->queryGET['store'])) {\n return \"\" . $this->Store() . \"\"; \n } else if(isset($this->queryGET['restart'])) {\n return $this->Restart(); \n }\n }","title":""},{"docid":"fd86a15b8e4feafc897a454093e020e5","score":"0.5491284","text":"public function action_history(){\n $this->template->content = $this->getView('payment-history')//View::factory('admin/payment-history')\n ->bind('sub', $sub);\n Spreedly::configure($this->site, $this->token);\n $sub=SpreedlySubscriber::find($this->user_id);\n }","title":""},{"docid":"51c26a6d689a292e5f639040537e7736","score":"0.5488722","text":"function log_action($link, $action, $user, $ip, $details, $user_group, $db_query = '') {\n\t\t$action = $link->escape(strtoupper($action));\n\t\t$event_date = date(\"Y-m-d H:i:s\");\n\t\t$user = $link->escape($user);\n\t\t$ip = $link->escape($ip);\n\t\t$user_group = $link->escape($user_group);\n\t\t$details = $link->escape($details);\n\t\t$db_query = $link->escape($db_query);\n\t\t\n\t\tif ((!is_null($user) && strlen($user) > 0) && (!is_null($ip) && strlen($ip) > 0) && $link) {\n\t\t\t//$logSQL = \"INSERT INTO go_action_logs (user, ip_address, event_date, action, details, db_query, user_group) VALUES ('$user', '$ip', '$event_date', '$action', '$details', '$db_query', '$user_group');\";\n\t\t\t$insertData = array(\n\t\t\t\t'user' => $user,\n\t\t\t\t'ip_address' => $ip,\n\t\t\t\t'event_date' => $event_date,\n\t\t\t\t'action' => $action,\n\t\t\t\t'details' => $details,\n\t\t\t\t'db_query' => $db_query,\n\t\t\t\t'user_group' => $user_group\n\t\t\t);\n\t\t\t$result = $link->insert('go_action_logs', $insertData);\n\t\t}\n\t\t\n\t\tif ($result) {\n\t\t\t$log_id = $link->getInsertId();\n\t\t\treturn $log_id;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"e156f1ff82f5504b6f902887058e2736","score":"0.5485324","text":"function getAction() { return $this->action; }","title":""},{"docid":"5caf44da9f95d52c2e142203dca4a9e7","score":"0.548314","text":"public function getActionName()\n {\n return $this->action_name;\n }","title":""},{"docid":"86cdfcfcce67065dd1b7c033143e7e5d","score":"0.54794836","text":"public function getActionName()\n {\n return $this->action;\n }","title":""},{"docid":"86cdfcfcce67065dd1b7c033143e7e5d","score":"0.54794836","text":"public function getActionName()\n {\n return $this->action;\n }","title":""},{"docid":"4c4fe4356bdf75e726e0f8f53104db0c","score":"0.5465473","text":"public function getAction() { return $this->_action; }","title":""},{"docid":"48160e5f1bee1ed2d10e0e2cf9c6516e","score":"0.5459732","text":"static function getRebuildActions() {\n $actions = array(Router::assemble('activity_logs_admin_clean') => lang('Clean up existing log entries'));\n \n EventsManager::trigger('on_rebuild_activity_log_actions', array(&$actions));\n \n return $actions;\n }","title":""},{"docid":"57889a174455134ba06765a865127cab","score":"0.54523695","text":"function logActivity($action = null, $name=null)\n\t{\n\t\tif (!isset ($name)) \n\t\t{\n\t\t}\n\n\t\t$stmt = \"INSERT INTO $this->userActivityLog SET \" .\n\t\t\t\"OrderId = $this->OrderId, \".\n\t\t\t\"OrderNameId = $name, \".\n\t\t\t\"ActionType = $action, \" .\n\t\t\t\t\"ActionTimeStamp = NOW()\";\n\n\t\t// echo \"$stmt

\";\n\n\t\t$result = $this->dbi->query($stmt);\n\n\t\treturn $this->getReturnValue($result);\n\t}","title":""},{"docid":"5314a036fbb66e578a2ff1b0cd17be94","score":"0.54506755","text":"private function getLastEventByAction(string $action): \\Magento\\Logging\\Model\\Event\n {\n $collection = $this->_objectManager->create(\\Magento\\Logging\\Model\\Event::class)->getCollection();\n $lastEvent = $collection->addFieldToFilter('fullaction', $action)\n ->setOrder('time', 'DESC')\n ->getLastItem();\n\n return $lastEvent;\n }","title":""},{"docid":"0c13e90cd138b3addfa58bf95b3a70d8","score":"0.5440356","text":"public function getHistoryData() {\n echo(\"GetHistoryData Mastervolt\\n\");\n return \"No History Data\"; \n }","title":""},{"docid":"fb6eaba2570f65cac49e9a771c64dc18","score":"0.5433113","text":"public function getActionName()\n {\n return $this->_action;\n }","title":""},{"docid":"efa824a6a53c250d3102376332239079","score":"0.54263407","text":"public function getNewActionUrl(): string\n {\n return $this->batchUrl->getNewActionUrl();\n }","title":""},{"docid":"368e47f2f7bedab96bd6cdf538d0a8bc","score":"0.54243433","text":"protected function performAction()\n {\n parent::performAction();\n\n $this->accesslog->logChange(\n $this->request,\n $this->getTitle(),\n $this->saveData + $this->getModel()->loadFirst()\n );\n }","title":""},{"docid":"53c4016c2384ce0346d160d03c38ccbf","score":"0.5424341","text":"public function InsertHistory()\n {\n\n\t\t\t$nicks = $this->GetNick($this->to_user,$_SESSION['userid']);\n\n $sth = DB::prep(\"INSERT INTO cms_messaging_history (user,from_ip, email, sess, msg, admin, type) VALUES(:user,INET_ATON(:from_ip),:email,:sess,:msg,:this_admin, 'admin')\");\n $sth->bindParam(\":msg\", $this->msg, PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":from_ip\", $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":sess\", $nicks->sess, PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":email\", $nicks->email, PDO::PARAM_STR);\n\t\t\t$sth->bindParam(\":this_admin\", $nicks->admin, PDO::PARAM_STR);\n $sth->bindParam(\":user\", $nicks->nick, PDO::PARAM_STR);\n \n DB::Exec($sth);\n }","title":""},{"docid":"ed391bc3d66e431919ecf4f93f6dd4cb","score":"0.5423868","text":"function get_action() {\n return $this->action;\n }","title":""},{"docid":"bc43f9b2f2b6b98d310f134724c0b0ac","score":"0.5422916","text":"public function GetAction()\n {\n return Flag::ACTION_STRING[$this->action];\n }","title":""},{"docid":"766cc5a5882a6b1541806b32d4c184ed","score":"0.54209316","text":"public function get_action()\n {\n return $this->action;\n }","title":""},{"docid":"3152f0d3f6d4f7e3681da5adc6402501","score":"0.54159003","text":"public function testGetMessageHistory()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"1c19719b341b796f83c084b00561bed3","score":"0.5412721","text":"function chatHistory($request) {\n\t\t$partnerId = $request['params']['to'];\n\t\t$user = $this->pi->db->getUser();\n\t\t//$partner = $this->pi->db->getUser($partnerId);\n\t\t\n\t\t// Prepare response\n\t\t$items = '';\n\t\tif (isset($this->chatHistory[$partnerId])) {\n\t\t\t$items = $this->chatHistory[$partnerId];\n\t\t}\n\t\tif ($items != '') {\n\t\t\t$items = substr($items, 0, -1);\n\t\t}\n\t\t\n\t\t// Respond\n\t\treturn \"{ \\\"items\\\": [$items] }\";\n\t}","title":""},{"docid":"22b6ad47de3ecafac83369c32298ecc8","score":"0.5411978","text":"function cash_create_log($type, $action, $message = '')\n{\n\tglobal $db;\n\t$action = implode(CASH_LOG_ACTION_DELIMITER,$action);\n\t$current_time = time();\n\t$sql = \"INSERT INTO \" . CASH_LOGS_TABLE . \"\n\t\t\t(log_time, log_type, log_action, log_text)\n\t\t\tVALUES(\" . $current_time . \", \" . $type . \", '\" . $db->sql_escape($action) . \"', '\" . $db->sql_escape($message) . \"')\";\n\t$db->sql_query($sql);\n}","title":""},{"docid":"96b359a696f7fde23557c8b6ae8a25a4","score":"0.5408305","text":"private function get_action() {\n\t\treturn $this->action;\n\t}","title":""},{"docid":"96b359a696f7fde23557c8b6ae8a25a4","score":"0.5408305","text":"private function get_action() {\n\t\treturn $this->action;\n\t}","title":""},{"docid":"96b359a696f7fde23557c8b6ae8a25a4","score":"0.5408305","text":"private function get_action() {\n\t\treturn $this->action;\n\t}","title":""},{"docid":"249c978d3aca12c6e44f71ba03baea89","score":"0.5401322","text":"public static function getAction()\r\n {\r\n return wcmSession::getInstance()->getCurrentAction();\r\n }","title":""},{"docid":"98342172d5ec2cea0c765e51d800a84f","score":"0.53991157","text":"public function __toString() {\n\t\tif ($this->toString === null) {\n\t\t\tswitch ($this->objectTypeID) {\n\t\t\t\tcase \\wcf\\data\\object\\type\\ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.modifiableContent', 'com.woltlab.wbb.thread'):\n\t\t\t\t\t$this->toString = \\wcf\\system\\WCF::getLanguage()->getDynamicVariable('wcf.acp.modification.log.wbb.thread.'.$this->action, array(\n\t\t\t\t\t\t'thread' => $this->getObject(), \n\t\t\t\t\t\t'additionalData' => $this->additionalData\n\t\t\t\t\t)); \n\t\t\t\t\tbreak; \n\t\t\t\t\n\t\t\t\tcase \\wcf\\data\\object\\type\\ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.modifiableContent', 'com.woltlab.wbb.post'): \n\t\t\t\t\t$this->toString = \\wcf\\system\\WCF::getLanguage()->getDynamicVariable('wcf.acp.modification.log.wbb.post.'.$this->action, array(\n\t\t\t\t\t\t'post' => $this->getObject(), \n\t\t\t\t\t\t'additionalData' => $this->additionalData\n\t\t\t\t\t)); \n\t\t\t\t\tbreak; \n\t\t\t}\n\t\t\t\n\t\t\t\\wcf\\system\\event\\EventHandler::getInstance()->fireAction($this, 'toString_'. \\wcf\\data\\object\\type\\ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID)->objectType);\n\t\t}\n\t\t\n\t\tif ($this->toString !== null) {\n\t\t\treturn $this->toString; \n\t\t}\n\t\t\n\t\treturn '';\n\t}","title":""},{"docid":"a163d8cf9e6fbce73411e8386545af7d","score":"0.53971434","text":"public function action(): string {\n return $this->route->getActionName();\n }","title":""},{"docid":"5b04763a4a8639a91b2b5938011084e1","score":"0.53937083","text":"public function getLogCommandsAction()\n {\n $data = $this->getModelManager()->getConnection()->fetchAll(\n 'SELECT DISTINCT `command` FROM `s_plugin_connect_log`'\n );\n\n $data = array_map(function ($column) {\n return $column['command'];\n }, $data);\n\n // Enforce these fields\n foreach (['fromShop', 'toShop', 'getLastRevision', 'update', 'checkProducts', 'buy', 'reserveProducts', 'confirm'] as $value) {\n if (!in_array($value, $data)) {\n $data[] = $value;\n }\n }\n\n $this->View()->assign([\n 'success' => true,\n 'data' => $data\n ]);\n }","title":""},{"docid":"38c18cd96907c5d628fb4e41fb502c93","score":"0.5390117","text":"public function getAction() {\n return $this->action;\n }","title":""},{"docid":"3e0eb928ade8532ae1de8375562769b0","score":"0.5383616","text":"function action_log_and_get_score($action = null, $model = null, $record_id = null, $user_id = null)\r\r{\r\r}","title":""},{"docid":"eac705b669fd5606604e34b3b1ffcdd3","score":"0.5383519","text":"private function getAction()\r\n {\r\n return $this->action;\r\n }","title":""},{"docid":"2eafefb1eec2ec010835fc2662b2f4d8","score":"0.53827083","text":"function bp_get_messages_form_action() {\n\t\treturn apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) );\n\t}","title":""},{"docid":"afb314c12d0a2c6bb494f250100e4f94","score":"0.5382378","text":"function irc_bot_message_history_replay( int $log_id ) : void\n{\n // Require administrator rights to run this action\n user_restrict_to_administrators();\n\n // Sanitize the log id\n $log_id = sanitize($log_id, 'int', 0);\n\n // Fetch the data we need to replay the log\n $dlog = mysqli_fetch_array(query(\" SELECT logs_irc_bot.channel AS 'il_channel' ,\n logs_irc_bot.body AS 'il_body'\n FROM logs_irc_bot\n WHERE logs_irc_bot.id = '$log_id' \"));\n\n // Strip the hash from the start of the channel name\n $channel = $dlog['il_channel'];\n if($channel && (substr($channel, 0, 1) === '#'))\n $channel = substr($channel, 1);\n\n // Replay the message and bypass silenced mode\n irc_bot_send_message($dlog['il_body'], $channel, 1, 1);\n\n // Update the log now that it has been sent (if there's still an error, it will appear in the replayed log instead)\n query(\" UPDATE logs_irc_bot\n SET logs_irc_bot.is_silenced = 0 ,\n logs_irc_bot.is_failed = 0\n WHERE logs_irc_bot.id = '$log_id' \");\n}","title":""},{"docid":"550b8988772b7911588dea3333fae024","score":"0.537675","text":"public function get_action()\n {\n return $this->action;\n }","title":""},{"docid":"82c7aec7447ae13c7e392a03a617e0b9","score":"0.5366671","text":"public static function processEmployeeLog(EmployeeLog $log): string\n {\n $sentence = '';\n\n if ($log->action == 'employee_created') {\n $sentence = trans('account.employee_log_employee_created');\n }\n\n if ($log->action == 'employee_locked') {\n $sentence = trans('account.employee_log_employee_locked');\n }\n\n if ($log->action == 'employee_unlocked') {\n $sentence = trans('account.employee_log_employee_unlocked');\n }\n\n if ($log->action == 'manager_assigned') {\n $sentence = trans('account.employee_log_manager_assigned', [\n 'name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'direct_report_assigned') {\n $sentence = trans('account.employee_log_direct_report_assigned', [\n 'name' => $log->object->{'direct_report_name'},\n ]);\n }\n\n if ($log->action == 'manager_unassigned') {\n $sentence = trans('account.employee_log_manager_unassigned', [\n 'name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'direct_report_unassigned') {\n $sentence = trans('account.employee_log_direct_report_unassigned', [\n 'name' => $log->object->{'direct_report_name'},\n ]);\n }\n\n if ($log->action == 'position_assigned') {\n $sentence = trans('account.employee_log_position_assigned', [\n 'name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'position_removed') {\n $sentence = trans('account.employee_log_position_removed', [\n 'name' => $log->object->{'position_title'},\n ]);\n }\n\n if ($log->action == 'employee_added_to_team') {\n $sentence = trans('account.employee_log_employee_added_to_team', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_removed_from_team') {\n $sentence = trans('account.employee_log_employee_removed_from_team', [\n 'name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'employee_worklog_logged') {\n $sentence = trans('account.employee_log_employee_worklog_logged');\n }\n\n if ($log->action == 'employee_status_assigned') {\n $sentence = trans('account.employee_log_employee_status_assigned', [\n 'name' => $log->object->{'employee_status_name'},\n ]);\n }\n\n if ($log->action == 'employee_status_removed') {\n $sentence = trans('account.employee_log_employee_status_removed', [\n 'name' => $log->object->{'employee_status_name'},\n ]);\n }\n\n if ($log->action == 'morale_logged') {\n $sentence = trans('account.employee_log_morale_logged', [\n 'name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'time_off_created') {\n $sentence = trans('account.employee_log_time_off_created', [\n 'date' => $log->object->{'planned_holiday_date'},\n ]);\n }\n\n if ($log->action == 'time_off_destroyed') {\n $sentence = trans('account.employee_log_time_off_destroyed', [\n 'date' => $log->object->{'planned_holiday_date'},\n ]);\n }\n\n if ($log->action == 'address_added') {\n $sentence = trans('account.employee_log_address_set', [\n 'address' => $log->object->{'partial_address'},\n ]);\n }\n\n if ($log->action == 'pronoun_assigned') {\n $sentence = trans('account.employee_log_pronoun_set', [\n 'name' => $log->object->{'pronoun_label'},\n ]);\n }\n\n if ($log->action == 'pronoun_removed') {\n $sentence = trans('account.employee_log_pronoun_removed');\n }\n\n if ($log->action == 'description_set') {\n $sentence = trans('account.employee_log_description_set');\n }\n\n if ($log->action == 'description_cleared') {\n $sentence = trans('account.employee_log_description_cleared');\n }\n\n if ($log->action == 'birthday_set') {\n $sentence = trans('account.employee_birthday_set');\n }\n\n if ($log->action == 'personal_details_set') {\n $sentence = trans('account.employee_personal_details_set', [\n 'name' => $log->object->{'name'},\n 'email' => $log->object->{'email'},\n ]);\n }\n\n if ($log->action == 'work_from_home_logged') {\n $sentence = trans('account.employee_log_work_from_home_logged', [\n 'date' => $log->object->{'date'},\n ]);\n }\n\n if ($log->action == 'work_from_home_destroyed') {\n $sentence = trans('account.employee_log_work_from_home_destroyed', [\n 'date' => $log->object->{'date'},\n ]);\n }\n\n if ($log->action == 'answer_created') {\n $sentence = trans('account.employee_log_answer_created', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_updated') {\n $sentence = trans('account.employee_log_answer_updated', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'answer_destroyed') {\n $sentence = trans('account.employee_log_answer_destroyed', [\n 'title' => $log->object->{'question_title'},\n ]);\n }\n\n if ($log->action == 'employee_attached_to_recent_ship') {\n $sentence = trans('account.employee_log_employee_attached_to_recent_ship', [\n 'ship_title' => $log->object->{'ship_title'},\n 'team_name' => $log->object->{'team_name'},\n ]);\n }\n\n if ($log->action == 'skill_associated_with_employee') {\n $sentence = trans('account.employee_log_skill_associated_with_employee', [\n 'name' => $log->object->{'skill_name'},\n ]);\n }\n\n if ($log->action == 'skill_removed_from_an_employee') {\n $sentence = trans('account.employee_log_skill_removed_from_an_employee', [\n 'name' => $log->object->{'skill_name'},\n ]);\n }\n\n if ($log->action == 'task_created') {\n $sentence = trans('account.employee_log_task_created', [\n 'title' => $log->object->{'title'},\n ]);\n }\n\n if ($log->action == 'expense_created') {\n $sentence = trans('account.employee_log_expense_created', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_for_employee') {\n $sentence = trans('account.employee_log_expense_accepted_for_employee', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_manager') {\n $sentence = trans('account.employee_log_expense_accepted_by_manager', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_by_manager') {\n $sentence = trans('account.employee_log_expense_rejected_by_manager', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_for_employee') {\n $sentence = trans('account.employee_log_expense_rejected_for_employee', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_accounting_for_employee') {\n $sentence = trans('account.employee_log_expense_accepted_by_accounting_for_employee', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_accepted_by_accounting') {\n $sentence = trans('account.employee_log_expense_accepted_by_accounting', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_by_accounting_for_employee') {\n $sentence = trans('account.employee_log_expense_rejected_by_accounting_for_employee', [\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'expense_rejected_by_accounting') {\n $sentence = trans('account.employee_log_expense_rejected_by_accounting', [\n 'expense_id' => $log->object->{'expense_id'},\n 'expense_title' => $log->object->{'expense_title'},\n 'expense_amount' => $log->object->{'expense_amount'},\n 'expensed_at' => $log->object->{'expensed_at'},\n ]);\n }\n\n if ($log->action == 'employee_allowed_to_manage_expenses') {\n $sentence = trans('account.employee_log_employee_allowed_to_manage_expenses');\n }\n\n if ($log->action == 'employee_disallowed_to_manage_expenses') {\n $sentence = trans('account.employee_log_employee_disallowed_to_manage_expenses');\n }\n\n if ($log->action == 'rate_your_manager_survey_answered') {\n $sentence = trans('account.log_rate_your_manager_survey_answered', [\n 'manager_id' => $log->object->{'manager_id'},\n 'manager_name' => $log->object->{'manager_name'},\n ]);\n }\n\n if ($log->action == 'twitter_set') {\n $sentence = trans('account.employee_log_employee_twitter_set', [\n 'twitter' => $log->object->{'twitter'},\n ]);\n }\n\n if ($log->action == 'twitter_reset') {\n $sentence = trans('account.employee_log_employee_twitter_reset');\n }\n\n if ($log->action == 'slack_set') {\n $sentence = trans('account.employee_log_employee_slack_set', [\n 'slack' => $log->object->{'slack'},\n ]);\n }\n\n if ($log->action == 'slack_reset') {\n $sentence = trans('account.employee_log_employee_slack_reset');\n }\n\n if ($log->action == 'hiring_date_set') {\n $sentence = trans('account.employee_log_hiring_date_set', [\n 'hiring_date' => $log->object->{'hiring_date'},\n ]);\n }\n\n if ($log->action == 'one_on_one_entry_created') {\n $sentence = trans('account.employee_log_one_on_one_entry_created', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_entry_destroyed') {\n $sentence = trans('account.employee_log_one_on_one_entry_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_talking_point_created') {\n $sentence = trans('account.employee_log_one_on_one_talking_point_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_talking_point_id' => $log->object->{'one_on_one_talking_point_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_action_item_created') {\n $sentence = trans('account.employee_log_one_on_one_action_item_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_action_item_id' => $log->object->{'one_on_one_action_item_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_created') {\n $sentence = trans('account.employee_log_one_on_one_note_created', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'one_on_one_note_id' => $log->object->{'one_on_one_note_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_talking_point_destroyed') {\n $sentence = trans('account.employee_log_one_on_one_talking_point_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_action_item_destroyed') {\n $sentence = trans('account.employee_log_one_on_one_action_item_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_destroyed') {\n $sentence = trans('account.employee_log_one_on_one_note_destroyed', [\n 'happened_at' => $log->object->{'happened_at'},\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n if ($log->action == 'one_on_one_note_marked_happened') {\n $sentence = trans('account.employee_log_one_on_one_note_marked_happened', [\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\n 'happened_at' => $log->object->{'happened_at'},\n 'employee_id' => $log->object->{'employee_id'},\n 'employee_name' => $log->object->{'employee_name'},\n ]);\n }\n\n return $sentence;\n }","title":""},{"docid":"5310163c84225aef1f254945796bb03b","score":"0.5361113","text":"public function get_action() {\n return $this->action;\n }","title":""},{"docid":"c70ff83766075905e1cb4140a3b93b61","score":"0.53571606","text":"public function actionViewlogging()\n\t{\n\t\t$h_id = Yii::app()->request->getParam('h', AppHelper::two_way_string_encrypt(Yii::app()->user->id));\n\t\t$id = AppHelper::two_way_string_decrypt($h_id);\n\t\tself::check_function_argument($id);\n\t\tif (Yii::app()->user->getIsGuest()) {\n\t\t\tYii::app()->user->setReturnUrl(Yii::app()->request->baseUrl.'/site/viewloggingdetails');\n\t\t\t$this->redirect(Yii::app()->request->baseUrl.'/user/login');\n\t\t}\n\t\t$wslogging_model=WsLogging::model()->findByPk($id);\n\t\t$this->render('viewlogging',array(\n\t\t\t\t'wslogging_model'=>$wslogging_model,\n\t\t));\n\t}","title":""},{"docid":"b88c80c5539c1bcea127369391a1d24d","score":"0.53561646","text":"function ajan_activity_action( $args = array() ) {\n\techo ajan_get_activity_action( $args );\n}","title":""},{"docid":"56bcde5b0173a441bde00954bb8774b7","score":"0.53561145","text":"public function getActionName()\n\t{\n\t\treturn $this->_action;\n\t}","title":""},{"docid":"757aff08d5272f8735a592320effbe00","score":"0.5354372","text":"protected function messageHistory($id) {\n\n $message_sheduling = DB::table('CRM_MC_EVENTS')\n ->where('CME_ID', $id)\n ->first();\n\n $mhdata['CMH_RET_BIZ_ID'] = $message_sheduling->CME_RET_BIZ_ID;\n $mhdata['CMH_CMCVH_ID'] = 0;\n $mhdata['CMH_MSG_TYPE'] = $message_sheduling->CME_MSG_TYPE;\n\n $mhdata['CMH_TITLE'] = $message_sheduling->CME_TITLE;\n $mhdata['CMH_CONTENT'] = $message_sheduling->CME_MSG_TXT;\n $mhdata['CMH_CCM_GENDER'] = $message_sheduling->CME_CCM_GENDER;\n $mhdata['CMH_CCRL_CUST_PROS_TYPE'] = $message_sheduling->CME_CCRL_CUST_PROS_TYPE;\n $mhdata['CMH_CREATED_DT'] = Carbon::now();\n\n DB::table('CRM_MC_HISTORY')->insert($mhdata);\n $data['message_sheduling'] = DB::table('CRM_MC_EVENTS')->where('CME_ID', '=', $id)->update(['CME_MSG_STATUS' => 2]);\n }","title":""},{"docid":"a4d99c5e2db0767958c2f4120a88d7b6","score":"0.53532743","text":"static function record_log($action, $handler, $message){\n //date formatting\n $date=strftime('%Y-%m-%d %H:%M:%S', time());\n //log format::2013-01-02 01:02:03|Login: kenny logged in\n if($action==\"Clear\"){\n $logfile=SITE_ROOT.DS.\"logs\".DS.\"logs.txt\";\n file_put_contents($logfile, \"{$date} |{$action}:{$message}\\n\");\n }else{\n $content=\"{$date} |{$action}:{$message}\\n\";\n //writing the content into a file\n $write_state=fwrite($handler, $content);\n }\n }","title":""},{"docid":"9f1dde3ff85e859d12b77d94a33e7cac","score":"0.5351802","text":"public function index_activityLog()\n {\n //\n }","title":""},{"docid":"8e49b63c139c936e53160f3599c18369","score":"0.5351518","text":"public function GetAction() {\n\t\treturn self::$strAction;\n\t}","title":""},{"docid":"e49255ac22c3c6616a0b6c4e9a16f054","score":"0.53452003","text":"public function createHistoryLog($entity_id, $entity_type, $remote_site_id, $action, $note = NULL) {\n // Check if exists.\n $query = \\Drupal::entityQuery('history_log')\n ->condition('target_entity_id', $entity_id)\n ->condition('target_entity_type', $entity_type)\n ->condition('remote_site', $remote_site_id)\n ->condition('action', $action);\n $existing_logs = $query->execute();\n if ($existing_logs) {\n // Update existing log.\n $log = HistoryLog::load(end($existing_logs));\n $log->setChangedTime(time());\n $log->set('note', $note);\n $log->save();\n }\n else {\n // Create a new history log.\n $values = array(\n 'target_entity_id' => $entity_id,\n 'target_entity_type' => $entity_type,\n 'remote_site' => $remote_site_id,\n 'action' => $action,\n 'note' => $note,\n );\n return HistoryLog::create($values)->save();\n\n }\n }","title":""},{"docid":"c4a3cdea83d726c2b2870f86f5d70d19","score":"0.53446764","text":"public function getAction()\r\n {\r\n return $this->action;\r\n }","title":""}],"string":"[\n {\n \"docid\": \"9f0355284295d6c67bd9686c4f8c1855\",\n \"score\": \"0.65113485\",\n \"text\": \"public function getName() {\\n\\t\\treturn \\\"log_action\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8b5656b266f8277607b3ad10a1bae08\",\n \"score\": \"0.6172861\",\n \"text\": \"function _log_action($action = '')\\n\\t{\\n\\t\\tglobal $DB, $IN, $LOC, $PREFS;\\n\\n\\t\\tif ($action == '')\\n\\t\\t{\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n if (is_array($action))\\n {\\n \\tif (count($action) == 0)\\n \\t{\\n \\t\\treturn;\\n \\t}\\n\\n $msg = '';\\n\\n foreach ($action as $val)\\n {\\n $msg .= $val.\\\"\\\\n\\\";\\n }\\n\\n $action = $msg;\\n }\\n\\n $DB->query(\\n $DB->insert_string(\\n 'exp_cp_log',\\n\\n array(\\n 'id' => '',\\n 'member_id' => 1,\\n 'username' => 'Member Utilities',\\n 'ip_address' => '127.0.0.1',\\n 'act_date' => $LOC->now,\\n 'action' => $action,\\n 'site_id'\\t => $PREFS->ini('site_id')\\n )\\n )\\n );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"662208ce69e47750ce31b06a386aa846\",\n \"score\": \"0.61136204\",\n \"text\": \"public function displayHistory() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d536dafb2ccb6e34e384682b2418a39b\",\n \"score\": \"0.60654575\",\n \"text\": \"public function getHistoryMessage($args = [])\\n {\\n $incrementId = isset($args['increment_id']) ? $args['increment_id'] : '';\\n return __('Earned promotion extra points from order #%1', $incrementId);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d1712e7e13e373a2a56b8632df162c2\",\n \"score\": \"0.60622096\",\n \"text\": \"public function getCallToActionText()\\n {\\n return isset($this->call_to_action_text) ? $this->call_to_action_text : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92e960e92e0862d0f445b5a774e64b5c\",\n \"score\": \"0.6044147\",\n \"text\": \"public function getPreviousActionName() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a267102716ba4c095bfd20804473d456\",\n \"score\": \"0.5978843\",\n \"text\": \"public function logHistory()\\n {\\n $model = Mage::getModel('quartic/history');\\n $storeCode = $this->getRequest()->getParam('___store');\\n $store = Mage::getModel(\\\"core/store\\\")->load($storeCode);\\n $data = array('store_id' => $store->getId());\\n $model->setData($data);\\n $model->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"138e33174c3c832caa577df30d7d8063\",\n \"score\": \"0.59761906\",\n \"text\": \"function view_action()\\n\\t{\\n\\t\\tbreadcrumb_set_self(do_lang_tempcode('ENTRY'));\\n\\t\\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('VIEW_ACTION_LOGS')),array('_SELF:_SELF:list',do_lang_tempcode('RESULTS'))));\\n\\n\\t\\t$mode=get_param('mode','ocf');\\n\\t\\t$id=get_param_integer('id');\\n\\n\\t\\tif ($mode=='ocf')\\n\\t\\t{\\n\\t\\t\\t$rows=$GLOBALS['FORUM_DB']->query_select('f_moderator_logs',array('l_reason AS reason','id','l_by AS the_user','l_date_and_time AS date_and_time','l_the_type AS the_type','l_param_a AS param_a','l_param_b AS param_b'),array('id'=>$id),'',1);\\n\\t\\t} else\\n\\t\\t{\\n\\t\\t\\t$rows=$GLOBALS['SITE_DB']->query_select('adminlogs',array('id','the_user','date_and_time','the_type','param_a','param_b','ip'),array('id'=>$id),'',1);\\n\\t\\t}\\n\\n\\t\\tif (!array_key_exists(0,$rows)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\\n\\t\\t$row=$rows[0];\\n\\n\\t\\t$title=get_page_title('VIEW_ACTION_LOGS');\\n\\t\\t$username=$GLOBALS['FORUM_DRIVER']->get_username($row['the_user']);\\n\\t\\tif (is_null($username)) $username=do_lang('UNKNOWN');\\n\\t\\t$type_str=do_lang($row['the_type'],$row['param_a'],$row['param_b'],NULL,NULL,false);\\n\\t\\tif (is_null($type_str)) $type_str=$row['the_type'];\\n\\t\\t$fields=array(\\n\\t\\t\\t\\t\\t\\t'USERNAME'=>$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($row['the_user']),\\n\\t\\t\\t\\t\\t\\t'DATE_TIME'=>get_timezoned_date($row['date_and_time']),\\n\\t\\t\\t\\t\\t\\t'TYPE'=>$type_str,\\n\\t\\t\\t\\t\\t\\t'PARAMETER_A'=>is_null($row['param_a'])?'':$row['param_a'],\\n\\t\\t\\t\\t\\t\\t'PARAMETER_B'=>is_null($row['param_b'])?'':$row['param_b']);\\n\\t\\tif (array_key_exists('ip',$row)) $fields['IP_ADDRESS']=escape_html($row['ip']);\\n\\t\\tif (array_key_exists('reason',$row)) $fields['REASON']=escape_html($row['reason']);\\n\\t\\tif (addon_installed('securitylogging'))\\n\\t\\t{\\n\\t\\t\\tif (array_key_exists('ip',$row))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$banned_test_1=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_ip','ip',array('ip'=>$row['ip']));\\n\\t\\t\\t\\t$fields['IP_BANNED']=is_null($banned_test_1)?do_lang_tempcode('NO'):do_lang_tempcode('YES');\\n\\t\\t\\t\\tif ($row['ip']!=get_ip_address())\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$fields['IP_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_ip_ban','id'=>$row['ip']),'_SELF'))));\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t$banned_test_2=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_member','the_member',array('the_member'=>$row['the_user']));\\n\\t\\t\\t$fields['SUBMITTER_BANNED']=is_null($banned_test_2)?do_lang_tempcode('NO'):do_lang_tempcode('YES');\\n\\t\\t\\tif ((!is_guest($row['the_user'])) && ($row['the_user']!=get_member()))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$fields['SUBMITTER_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_submitter_ban','id'=>$row['the_user'],'mode'=>$mode,'action_id'=>$id),'_SELF'))));\\n\\t\\t\\t}\\n\\t\\t\\t$banned_test_3=$GLOBALS['FORUM_DRIVER']->is_banned($row['the_user']);\\n\\t\\t\\t$fields['MEMBER_BANNED']=$banned_test_3?do_lang_tempcode('YES'):do_lang_tempcode('NO');\\n\\t\\t\\tif (((get_forum_type()=='ocf') && (!is_guest($row['the_user']))) && ($row['the_user']!=get_member()))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$fields['MEMBER_BANNED']->attach(do_template('ACTION_LOGS_TOGGLE_LINK',array('URL'=>build_url(array('page'=>'_SELF','type'=>'toggle_member_ban','id'=>$row['the_user'],'mode'=>$mode,'action_id'=>$id),'_SELF'))));\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t$fields['INVESTIGATE_USER']=hyperlink(build_url(array('page'=>'admin_lookup','id'=>(array_key_exists('ip',$row))?$row['ip']:$row['the_user']),'_SELF'),do_lang_tempcode('PROCEED'));\\n\\n\\t\\trequire_code('templates_view_space');\\n\\t\\treturn view_space($title,$fields);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba55e4f49cae7df1987f265826a64f7e\",\n \"score\": \"0.59605944\",\n \"text\": \"public function getActionDetails()\\n {\\n $objectManager = \\\\Magento\\\\Framework\\\\App\\\\ObjectManager::getInstance();\\n $request = $objectManager->get('\\\\Magento\\\\Framework\\\\App\\\\RequestInterface');\\n $action = ['origin' => null, 'username' => null];\\n\\n if (isset($request->getParams()['key'])) {\\n // Action triggered from the backend\\n $action['origin'] = \\\\Wyomind\\\\Framework\\\\Api\\\\Data\\\\ActionHistoryInterface::ORIGIN_BACKEND;\\n\\n $auth = $objectManager->get('\\\\Magento\\\\Backend\\\\Model\\\\Auth');\\n if ($auth->getUser() != null) {\\n $action['username'] = $auth->getUser()->getUsername();\\n } else {\\n $action['username'] = __('Unknown user');\\n }\\n } else {\\n if (php_sapi_name() == 'cli') {\\n // Action triggered from CLI\\n $action['origin'] = \\\\Wyomind\\\\Framework\\\\Api\\\\Data\\\\ActionHistoryInterface::ORIGIN_CLI;\\n $action['username'] = utf8_encode(get_current_user());\\n } else {\\n $state = $objectManager->get('\\\\Magento\\\\Framework\\\\App\\\\State');\\n if ($state->getAreaCode() == 'webapi_rest') {\\n // Action triggered from API\\n $action['origin'] = \\\\Wyomind\\\\Framework\\\\Api\\\\Data\\\\ActionHistoryInterface::ORIGIN_API;\\n\\n } else {\\n // Action triggered from Cron\\n $action['origin'] = \\\\Wyomind\\\\Framework\\\\Api\\\\Data\\\\ActionHistoryInterface::ORIGIN_CRON;\\n $action['username'] = utf8_encode(get_current_user());\\n }\\n }\\n }\\n\\n return $action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8983a2ab97eb328eb6dab1c5623c69cd\",\n \"score\": \"0.5932819\",\n \"text\": \"public function action() : string\\n {\\n\\t return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2692c428af3823c8cc2cee3205368139\",\n \"score\": \"0.58929473\",\n \"text\": \"public function getActionHistory () {\\n return UserActionHistory::getUserHistory();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9dc0896ffef81ff4581f8377ce9fb4b5\",\n \"score\": \"0.5879128\",\n \"text\": \"public function addHistory() {\\n if (!empty($this->evidenciahistory_id)) {\\n $sql = \\\"insert into tickethistory (ticket_id,description,created_at,user_id,evidenciahistory_id) \\\";\\n $sql .= \\\"value ($this->ticket_id,\\\\\\\"$this->description\\\\\\\",NOW(),$this->user_id,\\\\\\\"$this->evidenciahistory_id\\\\\\\")\\\";\\n return Executor::doit($sql);\\n } else {\\n $sql = \\\"insert into tickethistory (ticket_id,description,created_at,user_id,evidenciahistory_id) \\\";\\n $sql .= \\\"value ($this->ticket_id,\\\\\\\"$this->description\\\\\\\",NOW(),$this->user_id,\\\\\\\"$this->evidenciahistory_id\\\\\\\")\\\";\\n return Executor::doit($sql);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7f5c5e11c27c54545dc9ff939648771\",\n \"score\": \"0.58700436\",\n \"text\": \"function insights_get_history_actions() {\\n global $db;\\n $tbl = TABLE_PREFIX;\\n\\n $r = $db->Index(\\\"action\\\")->Query(\\n \\\"select count(*) AS `rows` , `action`\\n FROM `{$tbl}_history`\\n GROUP BY `action`\\n ORDER BY `action`\\\"\\n );\\n\\n return( $r );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b726fcb2f484c02aefcf91b3f016883\",\n \"score\": \"0.5867213\",\n \"text\": \"public static function writeHistory($action = 'update', $result = null) {\\n global $lC_Database;\\n \\n $lC_Database->startTransaction();\\n \\n $Qhistory = $lC_Database->query('insert into :table_updates_log (action, result, user, dateCreated) values (:action, :result, :user, :dateCreated)');\\n $Qhistory->bindTable(':table_updates_log', TABLE_UPDATES_LOG);\\n $Qhistory->bindValue(':action', ucwords($action));\\n $Qhistory->bindValue(':result', $result);\\n $Qhistory->bindValue(':user', $_SESSION['admin']['firstname'] . ' ' . $_SESSION['admin']['lastname']);\\n $Qhistory->bindValue(':dateCreated', date(\\\"Y-m-d H:i:s\\\")); \\n $Qhistory->setLogging($_SESSION['module']); \\n $Qhistory->execute(); \\n\\n if (!$lC_Database->isError()) {\\n $lC_Database->commitTransaction();\\n return true;\\n } else {\\n $lC_Database->rollbackTransaction();\\n return false;\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"537eab9e5254c9997ddd6370df61619b\",\n \"score\": \"0.5865054\",\n \"text\": \"function getHistory() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddc3e888d4aa184fe12ed2de9621c0d2\",\n \"score\": \"0.5819254\",\n \"text\": \"public function actionLog() {\\n $file = Yii::app()->basePath . DIRECTORY_SEPARATOR . \\\"data\\\" . DIRECTORY_SEPARATOR . \\\"chat_log.html\\\";\\n\\n if (is_file($file)) {\\n $filesize = filesize($file);\\n if ($filesize > 0) {\\n $fp = fopen($file, 'r');\\n\\n $contents = fread($fp, $filesize);\\n fclose($fp);\\n $page_title = $this->readPageTitle();\\n $userName = explode(\\\":\\\",trim($page_title));\\n $contents = GroupChat::model()->getChatHistory();\\n echo CJSON::encode(array(\\\"content\\\" => $contents,\\\"page_title\\\"=>$page_title));\\n } else {\\n echo CJSON::encode(array(\\\"content\\\" => \\\"\\\",\\\"page_title\\\"=>\\\"\\\",\\\"user_name\\\"=>$userName[0]));\\n }\\n } else {\\n echo CJSON::encode(array(\\\"content\\\" => \\\"\\\",\\\"page_title\\\"=>\\\"\\\"));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b22604515476fb8cb011e2032b002133\",\n \"score\": \"0.5759748\",\n \"text\": \"public function getLogMessage();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b85fa3471370c3dcfda001035b29a80b\",\n \"score\": \"0.57584614\",\n \"text\": \"public function operation_history() {\\n $data['title'] = 'Nexup | History';\\n\\n if (isset($_SESSION['logged_in'])) {\\n $get_operations_url = API_URL . 'Account/GetOperationHistory';\\n $header = array('Content-Type: application/json');\\n if (isset($_SESSION['xauthtoken'])) {\\n $val = 'X-AuthToken: ' . $_SESSION['xauthtoken'];\\n array_push($header, $val);\\n }\\n\\n $history_post['apikey'] = API_KEY;\\n\\n $ch = curl_init();\\n curl_setopt($ch, CURLOPT_URL, $get_operations_url);\\n curl_setopt($ch, CURLOPT_POST, 1);\\n curl_setopt($ch, CURLOPT_HTTPHEADER, $header);\\n curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($history_post));\\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\\n $server_output = curl_exec($ch);\\n $response = (array) json_decode($server_output);\\n $op = array_merge_recursive($response['data']->ListOperation, $response['data']->TaskOperation);\\n $data['operations'] = $op;\\n $this->template->load('default_template', 'user/operations', $data);\\n } else {\\n $this->session->set_flashdata('error', 'Please login to continue!');\\n redirect($this->agent->referrer());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e99b852017c75ccc7948dee67bd0a799\",\n \"score\": \"0.5757954\",\n \"text\": \"public function getActionName()\\n {\\n // get the last action stack entry\\n $lastEntry = $this->getActionStack()->getLastEntry();\\n\\n if ($lastEntry)\\n {\\n return $lastEntry->getActionName();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa5f607ff9d66b9633ff4e784404a071\",\n \"score\": \"0.5736952\",\n \"text\": \"public function pfmstransactionhistoryAction(){\\n\\t\\t\\t\\n\\t\\t$admname = new Zend_Session_Namespace('adminMname'); \\n\\t\\t$userid = new Zend_Session_Namespace('userid');\\n if($admname->adminname==''){\\n $this->_redirect('');\\n }\\n $role = new Zend_Session_Namespace('role');\\t\\n if(!in_array($role->role,$this->rolearray)){\\n\\t\\t\\t$this->_redirect('');\\n }\\n if($role->role==6){\\n $this->_helper->layout->setLayout('admin/layout');\\n }\\n\\t\\t\\n\\t\\t$request = $this->getRequest();//$this should refer to a controller\\n\\t\\tif($request->getParam('benef_id')!=''){\\n\\t\\t\\t$querystr = safexss($request->getParam('benef_id'));\\n\\t\\t\\t$_GET['benef_id'] = $querystr;\\n\\t\\t}\\n\\t\\t$scheme_id = safexss(base64_decode($request->getParam('scheme_id')));\\n\\t\\t$min_id = safexss(base64_decode($request->getParam('min_id')));\\n\\t\\t\\n\\t\\tif(($scheme_id == '') || (!is_numeric($scheme_id))){\\n\\t\\t\\t$this->_redirect('');\\n\\t\\t}\\n\\t\\t$cmi_list = new Application_Model_Managetransaction();\\n\\t\\t$scheme_code = $cmi_list->getschemecode($scheme_id);\\n\\t\\t$this->view->assign('scheme_code', $scheme_code);\\n\\t\\t$schemedetail = $cmi_list->getschemename($scheme_id);\\n\\t\\t$this->view->assign('scheme_id', $schemedetail);\\n\\t\\t$this->view->assign('min_id', $min_id);\\n\\t\\t$schemedetails = $schemedetail->toArray();\\n if($request->getParam('actmsg')=='add'){\\n $this->view->assign('successMsg', RECORD_INSERTED);\\n }elseif($request->getParam('actmsg')=='edit'){\\n $this->view->assign('successMsg', RECORD_UPDATED);\\n }elseif($request->getParam('actmsg')=='del'){\\n $this->view->assign('successMsg', RECORD_DELETED);\\n }elseif($request->getParam('actmsg')=='inactivate'){\\n $this->view->assign('successMsg', 'Selected record has been Deactivated successfully.');\\n }\\n\\t\\t// Remove query string on page refresh\\n\\t\\tsession_start();\\n\\t\\t$RequestSignature = md5($_SERVER['REQUEST_URI'].$_SERVER['QUERY_STRING'].print_r($_POST, true));\\n\\t\\tif ($_SESSION['LastRequest'] == $RequestSignature){\\n\\t\\t \\t$pos = strpos($_SERVER['QUERY_STRING'], 'actmsg=');\\n\\t\\t\\tif ($pos !== false) {\\n\\t\\t\\t\\t//$this->_redirect('/schemeowner/beneficiarydatalist?scheme_id='.base64_encode($schemedetails[0]['id']));\\n\\t\\t\\t}\\n\\t\\t}else{\\n\\t\\t $_SESSION['LastRequest'] = $RequestSignature;\\n\\t\\t}\\n\\t\\t// Remove query string on page refresh end\\n\\t\\t\\tif(isset($start)){\\n\\t\\t\\t\\t// This variable is set to zero for the first page\\n\\t\\t\\t\\t$start = 0;\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t $start=$request->getParam('start');\\n\\t\\t\\t\\t}\\n\\t\\t$page=0;\\n\\t\\t$limit=1500;\\n\\t\\t$scheme_id = base64_decode($request->getParam('scheme_id'));\\n\\t\\t$asignedschemeid = $cmi_list->checkasignedschemeid($userid->userid,$scheme_id);\\n\\t\\tif($asignedschemeid > 0 || $role->role == 1 || $role->role == 6){\\n\\t\\t\\t$cmishow_list = $cmi_list->pfmstransactiondatalist($start,$limit,$scheme_id);\\n\\t\\t\\t$countcmi = $cmi_list->countpfmstransactiondatalist($scheme_id);\\n\\t\\t\\t//$this->pr_man($cmishow_list,1);\\n\\t\\t\\t$this->view->assign('cmidata', $cmishow_list);\\n\\t\\t\\t$minpagingid = $request->getParam('min_id');\\n\\t\\t\\t$schmepagingid = $request->getParam('scheme_id');\\n\\t\\t\\t$page_name = 'beneficiarydatalist';\\n\\t\\t\\t$pagination1=$this->pagination_search($schmepagingid,$minpagingid, $countcmi,$year,$month,$start,$limit,$page_name);\\n\\t\\t\\t$this->view->assign('pagination', $pagination1);\\n\\t\\t\\t$this->view->assign('start', $start);\\n\\t\\t\\t$this->view->assign('counttotalcmireports', $countcmi);\\n\\t\\t\\t//echo \\\"aaab\\\";exit;\\n\\t\\t}else{\\n\\t\\t\\t$this->_redirect('/schemeowner/beneficiarydatalist');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be903889d24f6d3223b0a70b2b47ade4\",\n \"score\": \"0.5726721\",\n \"text\": \"public function getLastAction()\\n {\\n\\n return $this->database->getSession( session_id() )->lastaction;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96323b672294b400614e2314190c194b\",\n \"score\": \"0.5718543\",\n \"text\": \"public function getActionlogs()\\n {\\n return $this->actionlogs;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06e4a74b15bb6ce670750d1d59f59c4b\",\n \"score\": \"0.57048947\",\n \"text\": \"public function getLogIntentionAction()\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52d925af2921658bcd753b608f60be3b\",\n \"score\": \"0.56885856\",\n \"text\": \"private function log(Model $model, string $action)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20d8b15393ee68dc09d8e4e3018e9f2f\",\n \"score\": \"0.56876165\",\n \"text\": \"public function action()\\n\\t{\\n\\t\\treturn $this->action;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74026f672c4fa9a3330e381b5dead4f0\",\n \"score\": \"0.56587774\",\n \"text\": \"function logAction($action, $message, $file = 'log.txt')\\n{\\n $logfile = SITE_ROOT . DS . 'log' . DS . $file;\\n\\n if ($handle = fopen($logfile, 'a')) {\\n $timestamp = strftime(\\\"%d.%m.%Y %H:%M:%S\\\", time());\\n $content = \\\"$timestamp | $action : $message\\\\n\\\";\\n fwrite($handle, $content);\\n fclose($handle);\\n } else {\\n echo \\\"Nije uspelo logovanje\\\";\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"906958e8866e3e06bdee5bcdcf7018be\",\n \"score\": \"0.56528884\",\n \"text\": \"function logAction($level,$method,$data,$action){\\n\\t$CI = &get_instance();\\n\\tlog_message($level,'DFI::'.$method.' | '. $CI->session->userdata('username')\\n\\t.' | '.$action.' | '. print_r($data,TRUE));\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6733919df141daf3d5d86ed91646f52e\",\n \"score\": \"0.5642127\",\n \"text\": \"public function getAction()\\n {\\n return isset($this->action) ? $this->action : '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7984775977fed6ccd15b94404589218f\",\n \"score\": \"0.5639815\",\n \"text\": \"public function action()\\n {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"697ab51e075984c3910305a65e522c34\",\n \"score\": \"0.5638907\",\n \"text\": \"public function transactionhistoryAction() {\\n /**\\n * Renderer loadlayout()\\n */\\n $this->loadLayout ();\\n $this->_initLayoutMessages ( 'catalog/session' );\\n /**\\n * If not logged in\\n */\\n if (! Mage::getSingleton ( 'customer/session' )->isLoggedIn ()) {\\n /**\\n * Set login redirect url.\\n */\\n $this->_redirectUrl ( Mage::helper ( 'customer' )->getLoginUrl () );\\n } else {\\n /**\\n * Set page title.\\n */\\n $this->getLayout ()->getBlock ( 'head' )->setTitle ( $this->__ ( 'Transaction History' ) );\\n }\\n $this->renderLayout ();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3abdff993ad1f7a5d34b34b3907b497c\",\n \"score\": \"0.56231636\",\n \"text\": \"public static function logChange( Model $model, string $action ) {\\n ModelAction::create([\\n 'id' => ModelAction::max('id')+1,\\n 'user_id' => static::activeUserId(),\\n 'model' => static::class,\\n 'action' => $action,\\n 'message' => static::logSubject($model),\\n 'ip_address' => request()->ip(),\\n 'models' => [\\n 'new' => $action !== 'DELETED' ? $model->getAttributes() : null,\\n 'old' => $action !== 'CREATED' ? $model->getOriginal() : null,\\n 'changed' => $action === 'UPDATED' ? $model->getChanges() : null,\\n ]\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12d73efbdf38dd11f6bb17f0a98236e7\",\n \"score\": \"0.56219864\",\n \"text\": \"public function getAction(): string\\n {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03dc774c44478d7b9fbf8542b0cff2b5\",\n \"score\": \"0.5615899\",\n \"text\": \"private function getLogTemplate()\\n {\\n $user_id = $this->user ? $this->user->id : 'N/A';\\n\\n $template = now()->toDateTimeString().PHP_EOL;\\n\\n if ($this->action === 'create') {\\n $template .= \\\"New model was created by $user_id.\\\"\\n .PHP_EOL.'Inserted data: '\\n .PHP_EOL.http_build_query($this->model->toArray(), '', PHP_EOL);\\n } elseif ($this->action === 'edit') {\\n $template .= \\\"Model {$this->model->id} was update by $user_id.\\\"\\n .PHP_EOL.'MODEL BEFORE '\\n .PHP_EOL.http_build_query(array_intersect_key($this->model->getOriginal(),\\n array_intersect_key($this->model->getChanges(),\\n array_flip($this->loggable_fields))), '', PHP_EOL)\\n\\n .PHP_EOL.'MODEL AFTER '\\n .PHP_EOL.http_build_query(array_intersect_key($this->model->getChanges(),\\n array_flip($this->loggable_fields)), '', PHP_EOL);\\n } elseif ($this->action === 'delete') {\\n $template .= \\\"Model {$this->model->id} was deleted by $user_id\\\";\\n }\\n\\n $template .= PHP_EOL.PHP_EOL;\\n\\n return $template;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f1e755da1398e06e73dbc87c8fc9e43\",\n \"score\": \"0.56108254\",\n \"text\": \"function history_id() {\\n return $this->history_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d9e1103e12f1551112564f4053345bc\",\n \"score\": \"0.5607661\",\n \"text\": \"public function getActionlogsId()\\n {\\n return $this->actionlogs_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84f1a4e0e6444b837fb02e9e80aae664\",\n \"score\": \"0.5599127\",\n \"text\": \"public function getHistory()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18265a1561d4e5190d96687a271ecd5c\",\n \"score\": \"0.5595286\",\n \"text\": \"public function getAction(): string\\n {\\n if ($this->obj[0] !== null) {\\n return $this->obj[0]->action;\\n }\\n return '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7643a300b68ae5a6c9e004a9413d3edc\",\n \"score\": \"0.5587727\",\n \"text\": \"public function _actionsAction()\\n\\t{\\n\\t\\t$this->ajax(\\n\\t\\t\\t'SELECT DATE_FORMAT(Date,\\\"%d/%m/%y à %Hh\\\"), CONCAT(Matiere, \\\\' : \\\\', Titre, \\\\'\\\\'), Action\\n\\t\\t\\tFROM Exercices_Logs\\n\\t\\t\\tLEFT JOIN Exercices ON (Exercices_Logs.Exercice = Exercices.ID)\\n\\t\\t\\tLEFT JOIN Membres ON (Membres.ID = Exercices_Logs.Membre)\\n\\t\\t\\tWHERE Exercices_Logs.Correcteur = ' . $_SESSION['Correcteur']->getFilteredId(),\\n\\t\\t\\t'Exercices_Logs.ID DESC'\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a001239f81d24cf80b7912f173abecc0\",\n \"score\": \"0.5587579\",\n \"text\": \"public function actionViewLogs(){\\n return $this->render('view-logs');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c06b4863e7be353b8a02cf3130813650\",\n \"score\": \"0.5579973\",\n \"text\": \"function choose_action()\\n\\t{\\n\\t\\tbreadcrumb_set_parents(array(array('_SELF:_SELF:misc',do_lang_tempcode('VIEW_ACTION_LOGS'))));\\n\\t\\tbreadcrumb_set_self(do_lang_tempcode('RESULTS'));\\n\\n\\t\\t$title=get_page_title('VIEW_ACTION_LOGS');\\n\\n\\t\\trequire_code('templates_internalise_screen');\\n\\t\\t$test_tpl=internalise_own_screen($title);\\n\\t\\tif (is_object($test_tpl)) return $test_tpl;\\n\\n\\t\\t$id=get_param_integer('id',-1);\\n\\t\\t$start=get_param_integer('start',0);\\n\\t\\t$max=get_param_integer('max',50);\\n\\t\\t$sortables=array('date_and_time'=>do_lang_tempcode('DATE_TIME'),'the_type'=>do_lang_tempcode('ACTION'));\\n\\t\\t$test=explode(' ',get_param('sort','date_and_time DESC'),2);\\n\\t\\tif (count($test)==1) $test[1]='DESC';\\n\\t\\tlist($sortable,$sort_order)=$test;\\n\\t\\tif (((strtoupper($sort_order)!='ASC') && (strtoupper($sort_order)!='DESC')) || (!array_key_exists($sortable,$sortables)))\\n\\t\\t\\tlog_hack_attack_and_exit('ORDERBY_HACK');\\n\\t\\tglobal $NON_CANONICAL_PARAMS;\\n\\t\\t$NON_CANONICAL_PARAMS[]='sort';\\n\\n\\t\\trequire_code('templates_results_table');\\n\\t\\t$field_titles=array(do_lang_tempcode('USERNAME'),do_lang_tempcode('DATE_TIME'),do_lang_tempcode('ACTION'),do_lang_tempcode('PARAMETER_A'),do_lang_tempcode('PARAMETER_B'));\\n\\t\\tif (addon_installed('securitylogging'))\\n\\t\\t\\t$field_titles[]=do_lang_tempcode('_BANNED');\\n\\t\\t$fields_title=results_field_title($field_titles,$sortables,'sort',$sortable.' '.$sort_order);\\n\\n\\t\\t$filter_to_type=get_param('to_type','');\\n\\t\\t$filter_param_a=get_param('param_a','');\\n\\t\\t$filter_param_b=get_param('param_b','');\\n\\n\\t\\t$max_rows=0;\\n\\n\\t\\t// Pull up our rows: forum\\n\\t\\tif (get_forum_type()=='ocf')\\n\\t\\t{\\n\\t\\t\\t// Possible filter (called up by URL)\\n\\t\\t\\t$where='1=1';\\n\\t\\t\\tif ($filter_to_type!='')\\n\\t\\t\\t\\t$where.=' AND '.db_string_equal_to('l_the_type',$filter_to_type);\\n\\t\\t\\tif ($filter_param_a!='')\\n\\t\\t\\t\\t$where.=' AND l_param_a LIKE \\\\''.db_encode_like('%'.$filter_param_a.'%').'\\\\'';\\n\\t\\t\\tif ($filter_param_b!='')\\n\\t\\t\\t\\t$where.=' AND l_param_b LIKE \\\\''.db_encode_like('%'.$filter_param_b.'%').'\\\\'';\\n\\t\\t\\tif ($id!=-1) $where.=' AND l_by='.strval($id);\\n\\n\\t\\t\\t// Fetch\\n\\t\\t\\t$rows1=$GLOBALS['FORUM_DB']->query('SELECT l_reason,id,l_by AS the_user,l_date_and_time AS date_and_time,l_the_type AS the_type,l_param_a AS param_a,l_param_b AS param_b FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_moderator_logs WHERE '.$where.' ORDER BY '.$sortable.' '.$sort_order,$max+$start);\\n\\t\\t\\t$max_rows+=$GLOBALS['FORUM_DB']->query_value_null_ok_full('SELECT COUNT(*) FROM '.$GLOBALS['FORUM_DB']->get_table_prefix().'f_moderator_logs WHERE '.$where);\\n\\t\\t} else $rows1=array();\\n\\n\\t\\t// Pull up our rows: site\\n\\t\\t{\\n\\t\\t\\t// Possible filter (called up by URL)\\n\\t\\t\\t$where='1=1';\\n\\t\\t\\tif ($filter_to_type!='')\\n\\t\\t\\t\\t$where.=' AND '.db_string_equal_to('the_type',$filter_to_type);\\n\\t\\t\\tif ($filter_param_a!='')\\n\\t\\t\\t\\t$where.=' AND param_a LIKE \\\\''.db_encode_like('%'.$filter_param_a.'%').'\\\\'';\\n\\t\\t\\tif ($filter_param_b!='')\\n\\t\\t\\t\\t$where.=' AND param_b LIKE \\\\''.db_encode_like('%'.$filter_param_b.'%').'\\\\'';\\n\\t\\t\\tif ($id!=-1) $where.=' AND the_user='.strval($id);\\n\\n\\t\\t\\t// Fetch\\n\\t\\t\\t$rows2=$GLOBALS['SITE_DB']->query('SELECT id,the_user,date_and_time,the_type,param_a,param_b,ip FROM '.get_table_prefix().'adminlogs WHERE '.$where.' ORDER BY '.$sortable.' '.$sort_order,$max+$start);\\n\\t\\t\\t$max_rows+=$GLOBALS['SITE_DB']->query_value_null_ok_full('SELECT COUNT(*) FROM '.get_table_prefix().'adminlogs WHERE '.$where);\\n\\t\\t\\t$rows=array_merge($rows1,$rows2);\\n\\t\\t}\\n\\n\\t\\trequire_code('actionlog');\\n\\n\\t\\t$fields=new ocp_tempcode();\\n\\t\\t$pos=0;\\n\\t\\twhile ((count($rows)!=0) && (($pos-$start)<$max))\\n\\t\\t{\\n\\t\\t\\t$best=0; // Initialise type to integer\\n\\t\\t\\t$_best=0; // Initialise type to integer\\n\\t\\t\\t$best=NULL;\\n\\t\\t\\t$_best=NULL;\\n\\t\\t\\tforeach ($rows as $x=>$row)\\n\\t\\t\\t{\\n\\t\\t\\t\\tif ((is_null($best))\\n\\t\\t\\t\\t\\t|| (($row['date_and_time']<$_best) && ($sortable=='date_and_time') && ($sort_order=='ASC'))\\n\\t\\t\\t\\t\\t|| (($row['date_and_time']>$_best) && ($sortable=='date_and_time') && ($sort_order=='DESC'))\\n\\t\\t\\t\\t\\t|| ((intval($row['the_type'])<$_best) && ($sortable=='the_type') && ($sort_order=='ASC'))\\n\\t\\t\\t\\t\\t|| ((intval($row['the_type'])>$_best) && ($sortable=='the_type') && ($sort_order=='DESC'))\\n\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$best=$x;\\n\\t\\t\\t\\t\\tif ($sortable=='date_and_time') $_best=$row['date_and_time'];\\n\\t\\t\\t\\t\\tif ($sortable=='the_type') $_best=$row['the_type'];\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tif ($pos>=$start)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$myrow=$rows[$best];\\n\\n\\t\\t\\t\\t$username=$GLOBALS['FORUM_DRIVER']->member_profile_hyperlink($myrow['the_user']);\\n\\t\\t\\t\\t$mode=array_key_exists('l_reason',$myrow)?'ocf':'ocp';\\n\\t\\t\\t\\t$url=build_url(array('page'=>'_SELF','type'=>'view','id'=>$myrow['id'],'mode'=>$mode),'_SELF');\\n\\t\\t\\t\\t$mode_nice=($mode=='ocp')?'ocPortal':'OCF';\\n\\t\\t\\t\\t$date=hyperlink($url,get_timezoned_date($myrow['date_and_time']),false,true,$mode_nice.'/'.$row['the_type'].'/'.strval($myrow['id']),NULL,NULL,NULL,'_top');\\n\\n\\t\\t\\t\\tif (!is_null($myrow['param_a'])) $a=$myrow['param_a']; else $a='';\\n\\t\\t\\t\\tif (!is_null($myrow['param_b'])) $b=$myrow['param_b']; else $b='';\\n\\n\\t\\t\\t\\trequire_code('templates_interfaces');\\n\\t\\t\\t\\t$_a=tpl_crop_text_mouse_over($a,8);\\n\\t\\t\\t\\t$_b=tpl_crop_text_mouse_over($b,15);\\n\\n\\t\\t\\t\\t$type_str=do_lang($myrow['the_type'],$_a,$_b,NULL,NULL,false);\\n\\t\\t\\t\\tif (is_null($type_str)) $type_str=$myrow['the_type'];\\n\\n\\t\\t\\t\\t$test=actionlog_linkage($myrow['the_type'],$a,$b,$_a,$_b);\\n\\t\\t\\t\\tif (!is_null($test)) list($_a,$_b)=$test;\\n\\n\\t\\t\\t\\t$result_entry=array($username,$date,$type_str,$_a,$_b);\\n\\n\\t\\t\\t\\tif (addon_installed('securitylogging'))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$banned_test_1=array_key_exists('ip',$myrow)?$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_ip','ip',array('ip'=>$myrow['ip'])):NULL;\\n\\t\\t\\t\\t\\t$banned_test_2=$GLOBALS['SITE_DB']->query_value_null_ok('usersubmitban_member','the_member',array('the_member'=>$myrow['the_user']));\\n\\t\\t\\t\\t\\t$banned_test_3=$GLOBALS['FORUM_DRIVER']->is_banned($myrow['the_user']);\\n\\t\\t\\t\\t\\t$banned=((is_null($banned_test_1)) && (is_null($banned_test_2)) && (!$banned_test_3))?do_lang_tempcode('NO'):do_lang_tempcode('YES');\\n\\n\\t\\t\\t\\t\\t$result_entry[]=$banned;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t$fields->attach(results_entry($result_entry,true));\\n\\t\\t\\t}\\n\\n\\t\\t\\tunset($rows[$best]);\\n\\t\\t\\t$pos++;\\n\\t\\t}\\n\\t\\t$table=results_table(do_lang_tempcode('ACTIONS'),$start,'start',$max,'max',$max_rows,$fields_title,$fields,$sortables,$sortable,$sort_order,'sort');\\n\\n\\t\\treturn do_template('ACTION_LOGS_SCREEN',array('_GUID'=>'d75c813e372c3ca8d1204609e54c9d65','TABLE'=>$table,'TITLE'=>$title));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6b65c1117dbbeaa4b72b9ea21996ef6\",\n \"score\": \"0.5578558\",\n \"text\": \"function getPostTransactionActions($history) {\\n $actions = array(4 => 'inquiryTransaction');\\n\\n if ( (in_array('3', $history) === false) && (in_array('2', $history) === false) ) {\\n $actions[3] = 'approveTransaction';\\n }\\n\\n if (in_array('2', $history) === false) {\\n $actions[2] = 'cancelTransaction';\\n }\\n\\n return $actions;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08c9d445505f491edf6c71eccb722af4\",\n \"score\": \"0.5571992\",\n \"text\": \"static public function toHistoryString($post)\\n\\t{\\n\\t\\t$controller = sfContext::getInstance()->getController();\\n\\t\\t$link = $controller->genUrl('@view_thread?thread_id=' . $post->getThreadId());\\n\\t\\t\\n\\t\\t$link = sprintf(\\n\\t\\t\\t'%s',\\n\\t\\t\\t$link,\\n\\t\\t\\t'forum thread'\\n\\t\\t);\\n\\t\\t\\n\\t\\treturn sprintf(\\n\\t\\t\\t'posted on a %s',\\n\\t\\t\\t$link\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b2b715fbf7a25facdbc6f681546fcee\",\n \"score\": \"0.556756\",\n \"text\": \"protected function createActionLog()\\n {\\n list($beforeAttributes, $afterAttributes) = $this->getAttributes();\\n\\n if ($this->actionType === 'updated' && empty($beforeAttributes)) {\\n return;\\n }\\n\\n ActionLog::create([\\n 'user_id' => auth()->id(),\\n 'type' => $this->actionType,\\n 'model_id' => $this->model->id,\\n 'model_type' => $this->modelType,\\n 'model_name' => $this->model->getLogActionModelName(),\\n 'before_attributes' => json_encode($beforeAttributes),\\n 'after_attributes' => json_encode($afterAttributes),\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2e5dd54a9a9f915e3860a0e8d816960\",\n \"score\": \"0.55622894\",\n \"text\": \"public function execute()\\n {\\n $module = $this->getRequest()->getParam('module');\\n $entity = $this->getRequest()->getParam('entity');\\n\\n $this->initCurrentAction();\\n\\n return $this->getResponse()->setBody(\\n $this->_view->getLayout()->createBlock(\\n 'Wyomind\\\\\\\\' . $module . '\\\\Block\\\\Adminhtml' . ($entity ? '\\\\\\\\' . $entity : '') . '\\\\Edit\\\\Tab\\\\ActionHistory'\\n )->toHtml()\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"648d517a2f51dcfee03bf4a76baf0ecf\",\n \"score\": \"0.5559455\",\n \"text\": \"public function title(): string\\n {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0552b37fab50eaa21c26325d0089f91b\",\n \"score\": \"0.5556896\",\n \"text\": \"public function getActionName():string\\n {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7c3de3ad9e3bcd6288e99c16d90e0b0\",\n \"score\": \"0.555456\",\n \"text\": \"public function commentsHistoryAction()\\n {\\n $this->_initOrder();\\n $this->getResponse()->setBody(\\n $this->getLayout()->createBlock('smvendors/adminhtml_sales_order_view_tab_history')->toHtml()\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a472536db886773ed2a8665d7c5dfbcf\",\n \"score\": \"0.5550547\",\n \"text\": \"public function getAction(): string\\n {\\n return $this->getStringValue(['action'], 'run');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ede3b7e8f6ec7be55db6d25f35a67d11\",\n \"score\": \"0.55304086\",\n \"text\": \"public static function processAuditLog(AuditLog $log): string\\n {\\n $sentence = '';\\n\\n if ($log->action == 'account_created') {\\n $sentence = trans('account.log_account_created');\\n }\\n\\n if ($log->action == 'employee_added_to_company') {\\n $sentence = trans('account.log_employee_added_to_company', [\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_destroyed') {\\n $sentence = trans('account.log_employee_destroyed', [\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_locked') {\\n $sentence = trans('account.log_employee_locked', [\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_unlocked') {\\n $sentence = trans('account.log_employee_unlocked', [\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_created') {\\n $sentence = trans('account.log_team_created', [\\n 'name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_updated') {\\n $sentence = trans('account.log_team_updated', [\\n 'old_name' => $log->object->{'team_old_name'},\\n 'new_name' => $log->object->{'team_new_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_destroyed') {\\n $sentence = trans('account.log_team_destroyed', [\\n 'name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_added_to_team') {\\n $sentence = trans('account.log_employee_added_to_team', [\\n 'employee' => $log->object->{'employee_name'},\\n 'team' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_removed_from_team') {\\n $sentence = trans('account.log_employee_removed_from_team', [\\n 'employee' => $log->object->{'employee_name'},\\n 'team' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_updated') {\\n $sentence = trans('account.log_employee_updated', [\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_updated_hiring_information') {\\n $sentence = trans('account.log_employee_updated_hiring_information', [\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'manager_assigned') {\\n $sentence = trans('account.log_manager_assigned', [\\n 'name' => $log->object->{'manager_name'},\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'manager_unassigned') {\\n $sentence = trans('account.log_manager_unassigned', [\\n 'name' => $log->object->{'manager_name'},\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_invited_to_become_user') {\\n $sentence = trans('account.log_employee_invited_to_become_user', [\\n 'employee' => $log->object->{'employee_first_name'}.' '.$log->object->{'employee_last_name'},\\n ]);\\n }\\n\\n if ($log->action == 'position_created') {\\n $sentence = trans('account.log_position_created', [\\n 'name' => $log->object->{'position_title'},\\n ]);\\n }\\n\\n if ($log->action == 'position_updated') {\\n $sentence = trans('account.log_position_updated', [\\n 'former_name' => $log->object->{'position_old_title'},\\n 'new_name' => $log->object->{'position_title'},\\n ]);\\n }\\n\\n if ($log->action == 'position_destroyed') {\\n $sentence = trans('account.log_position_destroyed', [\\n 'name' => $log->object->{'position_title'},\\n ]);\\n }\\n\\n if ($log->action == 'position_assigned') {\\n $sentence = trans('account.log_position_assigned', [\\n 'name' => $log->object->{'position_title'},\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'position_removed') {\\n $sentence = trans('account.log_position_removed', [\\n 'name' => $log->object->{'position_title'},\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'flow_created') {\\n $sentence = trans('account.log_flow_created', [\\n 'name' => $log->object->{'flow_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_worklog_logged') {\\n $sentence = trans('account.log_employee_worklog_logged');\\n }\\n\\n if ($log->action == 'employee_status_created') {\\n $sentence = trans('account.log_employee_status_created', [\\n 'name' => $log->object->{'employee_status_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_status_updated') {\\n $sentence = trans('account.log_employee_status_updated', [\\n 'former_name' => $log->object->{'employee_status_old_name'},\\n 'new_name' => $log->object->{'employee_status_new_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_status_destroyed') {\\n $sentence = trans('account.log_employee_status_destroyed', [\\n 'name' => $log->object->{'employee_status_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_status_assigned') {\\n $sentence = trans('account.log_employee_status_assigned', [\\n 'name' => $log->object->{'employee_status_name'},\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_status_removed') {\\n $sentence = trans('account.log_employee_status_removed', [\\n 'name' => $log->object->{'employee_status_name'},\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'company_news_created') {\\n $sentence = trans('account.log_company_news_created', [\\n 'name' => $log->object->{'company_news_title'},\\n ]);\\n }\\n\\n if ($log->action == 'company_news_updated') {\\n $sentence = trans('account.log_company_news_updated', [\\n 'name' => $log->object->{'company_news_title'},\\n ]);\\n }\\n\\n if ($log->action == 'company_news_destroyed') {\\n $sentence = trans('account.log_company_news_destroyed', [\\n 'name' => $log->object->{'company_news_title'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_morale_logged') {\\n $sentence = trans('account.log_employee_morale_logged', [\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'company_pto_policy_created') {\\n $sentence = trans('account.log_company_pto_policy_created', [\\n 'year' => $log->object->{'company_pto_policy_year'},\\n ]);\\n }\\n\\n if ($log->action == 'company_pto_policy_updated') {\\n $sentence = trans('account.log_company_pto_policy_updated', [\\n 'year' => $log->object->{'company_pto_policy_year'},\\n ]);\\n }\\n\\n if ($log->action == 'time_off_created') {\\n $sentence = trans('account.log_company_time_off_created', [\\n 'date' => $log->object->{'planned_holiday_date'},\\n ]);\\n }\\n\\n if ($log->action == 'time_off_destroyed') {\\n $sentence = trans('account.log_company_time_off_destroyed', [\\n 'date' => $log->object->{'planned_holiday_date'},\\n ]);\\n }\\n\\n if ($log->action == 'address_added_to_employee') {\\n $sentence = trans('account.log_employee_address_set', [\\n 'address' => $log->object->{'partial_address'},\\n ]);\\n }\\n\\n if ($log->action == 'pronoun_assigned_to_employee') {\\n $sentence = trans('account.log_employee_pronoun_set', [\\n 'name' => $log->object->{'pronoun_label'},\\n 'employee' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'pronoun_removed_from_employee') {\\n $sentence = trans('account.log_employee_pronoun_removed', [\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_description_set') {\\n $sentence = trans('account.log_employee_description_set', [\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_description_cleared') {\\n $sentence = trans('account.log_employee_description_cleared', [\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_birthday_set') {\\n $sentence = trans('account.log_employee_birthday_set', [\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_description_set') {\\n $sentence = trans('account.log_team_description_set', [\\n 'name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_description_cleared') {\\n $sentence = trans('account.log_team_description_cleared', [\\n 'name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_useful_link_created') {\\n $sentence = trans('account.log_team_useful_link_created', [\\n 'name' => $log->object->{'team_name'},\\n 'link_name' => $log->object->{'link_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_useful_link_updated') {\\n $sentence = trans('account.log_team_useful_link_updated', [\\n 'name' => $log->object->{'team_name'},\\n 'link_name' => $log->object->{'link_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_useful_link_destroyed') {\\n $sentence = trans('account.log_team_useful_link_destroyed', [\\n 'name' => $log->object->{'team_name'},\\n 'link_name' => $log->object->{'link_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_news_created') {\\n $sentence = trans('account.log_team_news_created', [\\n 'name' => $log->object->{'team_name'},\\n 'news_name' => $log->object->{'team_news_title'},\\n ]);\\n }\\n\\n if ($log->action == 'team_news_updated') {\\n $sentence = trans('account.log_team_news_updated', [\\n 'name' => $log->object->{'team_name'},\\n 'news_name' => $log->object->{'team_news_title'},\\n ]);\\n }\\n\\n if ($log->action == 'team_news_destroyed') {\\n $sentence = trans('account.log_team_news_destroyed', [\\n 'name' => $log->object->{'team_name'},\\n 'news_name' => $log->object->{'team_news_title'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_personal_details_set') {\\n $sentence = trans('account.log_employee_personal_details_set', [\\n 'name' => $log->object->{'employee_name'},\\n 'email' => $log->object->{'employee_email'},\\n ]);\\n }\\n\\n if ($log->action == 'team_leader_assigned') {\\n $sentence = trans('account.log_team_leader_assigned', [\\n 'name' => $log->object->{'team_leader_name'},\\n 'team_name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'team_leader_removed') {\\n $sentence = trans('account.log_team_leader_removed', [\\n 'name' => $log->object->{'team_leader_name'},\\n 'team_name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_work_from_home_logged') {\\n $sentence = trans('account.log_employee_work_from_home_logged', [\\n 'name' => $log->object->{'employee_name'},\\n 'date' => $log->object->{'date'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_work_from_home_destroyed') {\\n $sentence = trans('account.log_employee_work_from_home_destroyed', [\\n 'name' => $log->object->{'employee_name'},\\n 'date' => $log->object->{'date'},\\n ]);\\n }\\n\\n if ($log->action == 'question_created') {\\n $sentence = trans('account.log_question_created', [\\n 'title' => $log->object->{'question_title'},\\n 'status' => $log->object->{'question_status'},\\n ]);\\n }\\n\\n if ($log->action == 'question_updated') {\\n $sentence = trans('account.log_question_updated', [\\n 'title' => $log->object->{'question_title'},\\n 'old_title' => $log->object->{'question_old_title'},\\n ]);\\n }\\n\\n if ($log->action == 'question_destroyed') {\\n $sentence = trans('account.log_question_destroyed', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'question_activated') {\\n $sentence = trans('account.log_question_activated', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'question_deactivated') {\\n $sentence = trans('account.log_question_deactivated', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'answer_created') {\\n $sentence = trans('account.log_answer_created', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'answer_updated') {\\n $sentence = trans('account.log_answer_updated', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'answer_destroyed') {\\n $sentence = trans('account.log_answer_destroyed', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'hardware_created') {\\n $sentence = trans('account.log_hardware_created', [\\n 'name' => $log->object->{'hardware_name'},\\n ]);\\n }\\n\\n if ($log->action == 'hardware_updated') {\\n $sentence = trans('account.log_hardware_updated', [\\n 'name' => $log->object->{'hardware_name'},\\n 'old_name' => $log->object->{'hardware_old_name'},\\n ]);\\n }\\n\\n if ($log->action == 'hardware_destroyed') {\\n $sentence = trans('account.log_hardware_destroyed', [\\n 'name' => $log->object->{'hardware_name'},\\n ]);\\n }\\n\\n if ($log->action == 'hardware_lent') {\\n $sentence = trans('account.log_hardware_lent', [\\n 'hardware_name' => $log->object->{'hardware_name'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'hardware_regained') {\\n $sentence = trans('account.log_hardware_regained', [\\n 'hardware_name' => $log->object->{'hardware_name'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'recent_ship_created') {\\n $sentence = trans('account.log_recent_ship_created', [\\n 'team_name' => $log->object->{'team_name'},\\n 'ship_title' => $log->object->{'ship_title'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_attached_to_recent_ship') {\\n $sentence = trans('account.log_employee_attached_to_recent_ship', [\\n 'employee_name' => $log->object->{'employee_name'},\\n 'ship_title' => $log->object->{'ship_title'},\\n 'team_name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'ship_destroyed') {\\n $sentence = trans('account.log_recent_ship_destroyed', [\\n 'ship_title' => $log->object->{'ship_title'},\\n 'team_name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'skill_created') {\\n $sentence = trans('account.log_skill_created', [\\n 'skill_id' => $log->object->{'skill_id'},\\n 'skill_name' => $log->object->{'skill_name'},\\n ]);\\n }\\n\\n if ($log->action == 'skill_associated_with_employee') {\\n $sentence = trans('account.log_skill_associated_with_employee', [\\n 'skill_id' => $log->object->{'skill_id'},\\n 'skill_name' => $log->object->{'skill_name'},\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'skill_removed_from_an_employee') {\\n $sentence = trans('account.log_skill_removed_from_an_employee', [\\n 'skill_id' => $log->object->{'skill_id'},\\n 'skill_name' => $log->object->{'skill_name'},\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'skill_destroyed') {\\n $sentence = trans('account.log_skill_destroyed', [\\n 'name' => $log->object->{'skill_name'},\\n ]);\\n }\\n\\n if ($log->action == 'skill_updated') {\\n $sentence = trans('account.log_skill_updated', [\\n 'skill_id' => $log->object->{'skill_id'},\\n 'skill_old_name' => $log->object->{'skill_old_name'},\\n 'skill_new_name' => $log->object->{'skill_new_name'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_category_created') {\\n $sentence = trans('account.log_expense_category_created', [\\n 'id' => $log->object->{'expense_category_id'},\\n 'name' => $log->object->{'expense_category_name'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_category_updated') {\\n $sentence = trans('account.log_expense_category_updated', [\\n 'id' => $log->object->{'expense_category_id'},\\n 'old_name' => $log->object->{'expense_category_old_name'},\\n 'new_name' => $log->object->{'expense_category_new_name'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_category_destroyed') {\\n $sentence = trans('account.log_expense_category_destroyed', [\\n 'name' => $log->object->{'expense_category_name'},\\n ]);\\n }\\n\\n if ($log->action == 'task_created') {\\n $sentence = trans('account.log_task_created', [\\n 'title' => $log->object->{'title'},\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'company_renamed') {\\n $sentence = trans('account.log_company_renamed', [\\n 'old_name' => $log->object->{'old_name'},\\n 'new_name' => $log->object->{'new_name'},\\n ]);\\n }\\n\\n if ($log->action == 'company_currency_updated') {\\n $sentence = trans('account.log_company_currency_updated', [\\n 'old_currency' => $log->object->{'old_currency'},\\n 'new_currency' => $log->object->{'new_currency'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_created') {\\n $sentence = trans('account.log_expense_created', [\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_accepted_by_manager') {\\n $sentence = trans('account.log_expense_accepted_by_manager', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_accepted_by_accounting') {\\n $sentence = trans('account.log_expense_accepted_by_accounting', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_rejected_by_accounting') {\\n $sentence = trans('account.log_expense_rejected_by_accounting', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_allowed_to_manage_expenses') {\\n $sentence = trans('account.log_employee_allowed_to_manage_expenses', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_disallowed_to_manage_expenses') {\\n $sentence = trans('account.log_employee_disallowed_to_manage_expenses', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'rate_your_manager_survey_answered') {\\n $sentence = trans('account.log_rate_your_manager_survey_answered', [\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_twitter_set') {\\n $sentence = trans('account.log_employee_twitter_set', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'twitter' => $log->object->{'twitter'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_twitter_reset') {\\n $sentence = trans('account.log_employee_twitter_reset', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_slack_set') {\\n $sentence = trans('account.log_employee_slack_set', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'slack' => $log->object->{'slack'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_slack_reset') {\\n $sentence = trans('account.log_employee_slack_reset', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_hiring_date_set') {\\n $sentence = trans('account.log_employee_hiring_date_set', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'hiring_date' => $log->object->{'hiring_date'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_entry_created') {\\n $sentence = trans('account.log_one_on_one_entry_created', [\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_entry_destroyed') {\\n $sentence = trans('account.log_one_on_one_entry_destroyed', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_talking_point_created') {\\n $sentence = trans('account.log_one_on_one_talking_point_created', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'one_on_one_talking_point_id' => $log->object->{'one_on_one_talking_point_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_action_item_created') {\\n $sentence = trans('account.log_one_on_one_action_item_created', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'one_on_one_action_item_id' => $log->object->{'one_on_one_action_item_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_note_created') {\\n $sentence = trans('account.log_one_on_one_note_created', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'one_on_one_note_id' => $log->object->{'one_on_one_note_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_action_item_destroyed') {\\n $sentence = trans('account.log_one_on_one_action_item_destroyed', [\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'happened_at' => $log->object->{'happened_at'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_talking_point_destroyed') {\\n $sentence = trans('account.log_one_on_one_talking_point_destroyed', [\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'happened_at' => $log->object->{'happened_at'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_note_destroyed') {\\n $sentence = trans('account.log_one_on_one_note_destroyed', [\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'happened_at' => $log->object->{'happened_at'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_note_marked_happened') {\\n $sentence = trans('account.log_one_on_one_note_marked_happened', [\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'happened_at' => $log->object->{'happened_at'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n return $sentence;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed3c3ede5058180494c78d7ee5ad5fd4\",\n \"score\": \"0.551074\",\n \"text\": \"public function dispatchLog();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25ba849872e53805b46d380f6d98059c\",\n \"score\": \"0.55077046\",\n \"text\": \"public function getOrderHistoryUrl(){\\n return $this->getUrl('sales/order/history');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b671e432d526150bf76d0d1328af8f0\",\n \"score\": \"0.5503841\",\n \"text\": \"public function __toString()\\n\\t{\\n\\t\\t$level = 0;\\n\\t\\t$lines = [];\\n\\n\\t\\tforeach ($this->state as $action) {\\n\\t\\t\\tswitch ($action['type']) {\\n\\t\\t\\t\\tcase 'request':\\n\\t\\t\\t\\t\\t$lines[] = str_repeat(\\\"\\\\t\\\", $level) . $action['name'] . ' requested ('; \\n\\t\\t\\t\\t\\t$level++;\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 'dependsOn':\\n\\t\\t\\t\\t\\t$deps = $action['dependencies'];\\n\\t\\t\\t\\t\\t$lines[] = str_repeat(\\\"\\\\t\\\", $level) . 'Depedencies: ' . (empty($deps) ? 'none' : '[' . implode(', ', $deps) . ']'); \\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 'note':\\n\\t\\t\\t\\t\\t$lines[] = str_repeat(\\\"\\\\t\\\", $level) . 'Note: ' . $action['note'];\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 'received':\\n\\t\\t\\t\\t\\t$level--;\\n\\t\\t\\t\\t\\t$lines[] = str_repeat(\\\"\\\\t\\\", $level) . ')';\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn implode(\\\"\\\\n\\\", $lines);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2904ef50a4498c0ca20b1ae675126b09\",\n \"score\": \"0.549825\",\n \"text\": \"function logaction($user_id, $res, $res_id = 0, $action = null)\\n{\\n q(\\n 'INSERT INTO fud30_action_log (logtime, logaction, user_id, a_res, a_res_id)\\n\\t\\tVALUES(' .\\n __request_timestamp__ .\\n ', ' .\\n ssn($action) .\\n ', ' .\\n $user_id .\\n ', ' .\\n ssn($res) .\\n ', ' .\\n (int)$res_id .\\n ')'\\n );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ef5614a605adc1dbfc64e542e741f33\",\n \"score\": \"0.54968923\",\n \"text\": \"function insights_history( $entry_id, $action, $note = '', $skip_copy = false ) {\\n global $db;\\n $tbl = TABLE_PREFIX;\\n\\n # phase one: make copies of all data associated with this $action_id\\n if( $action === 'update' && $skip_copy === false ) {\\n $copy_id = insights_backup($entry_id);\\n\\n # override $note to point to the old entry\\n $note = \\\"~\\\" . $copy_id;\\n }\\n\\n # phase two: get action id, record info about user and action\\n $db->Query(\\n \\\"insert into `{$tbl}_history`\\n (`ip`, `action`, `entry_id`, `note`)\\n values\\n (:addr, :action, :entry_id, :note)\\\",\\n array(\\n \\\":addr\\\" => $_SERVER[\\\"REMOTE_ADDR\\\"],\\n \\\":action\\\" => $action,\\n \\\":entry_id\\\" => intval( $entry_id ),\\n \\\":note\\\" => $note\\n )\\n );\\n\\n $action_id = $db->getInsertID();\\n\\n return( $action_id );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15ac8f6db05a89426d4050dcba777931\",\n \"score\": \"0.5495883\",\n \"text\": \"protected function Action() { \\n if(isset($this->queryGET['roll'])) {\\n return \\\"\\\" . $this->Roll() . \\\"\\\"; \\n } else if(isset($this->queryGET['store'])) {\\n return \\\"\\\" . $this->Store() . \\\"\\\"; \\n } else if(isset($this->queryGET['restart'])) {\\n return $this->Restart(); \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd86a15b8e4feafc897a454093e020e5\",\n \"score\": \"0.5491284\",\n \"text\": \"public function action_history(){\\n $this->template->content = $this->getView('payment-history')//View::factory('admin/payment-history')\\n ->bind('sub', $sub);\\n Spreedly::configure($this->site, $this->token);\\n $sub=SpreedlySubscriber::find($this->user_id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51c26a6d689a292e5f639040537e7736\",\n \"score\": \"0.5488722\",\n \"text\": \"function log_action($link, $action, $user, $ip, $details, $user_group, $db_query = '') {\\n\\t\\t$action = $link->escape(strtoupper($action));\\n\\t\\t$event_date = date(\\\"Y-m-d H:i:s\\\");\\n\\t\\t$user = $link->escape($user);\\n\\t\\t$ip = $link->escape($ip);\\n\\t\\t$user_group = $link->escape($user_group);\\n\\t\\t$details = $link->escape($details);\\n\\t\\t$db_query = $link->escape($db_query);\\n\\t\\t\\n\\t\\tif ((!is_null($user) && strlen($user) > 0) && (!is_null($ip) && strlen($ip) > 0) && $link) {\\n\\t\\t\\t//$logSQL = \\\"INSERT INTO go_action_logs (user, ip_address, event_date, action, details, db_query, user_group) VALUES ('$user', '$ip', '$event_date', '$action', '$details', '$db_query', '$user_group');\\\";\\n\\t\\t\\t$insertData = array(\\n\\t\\t\\t\\t'user' => $user,\\n\\t\\t\\t\\t'ip_address' => $ip,\\n\\t\\t\\t\\t'event_date' => $event_date,\\n\\t\\t\\t\\t'action' => $action,\\n\\t\\t\\t\\t'details' => $details,\\n\\t\\t\\t\\t'db_query' => $db_query,\\n\\t\\t\\t\\t'user_group' => $user_group\\n\\t\\t\\t);\\n\\t\\t\\t$result = $link->insert('go_action_logs', $insertData);\\n\\t\\t}\\n\\t\\t\\n\\t\\tif ($result) {\\n\\t\\t\\t$log_id = $link->getInsertId();\\n\\t\\t\\treturn $log_id;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e156f1ff82f5504b6f902887058e2736\",\n \"score\": \"0.5485324\",\n \"text\": \"function getAction() { return $this->action; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5caf44da9f95d52c2e142203dca4a9e7\",\n \"score\": \"0.548314\",\n \"text\": \"public function getActionName()\\n {\\n return $this->action_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86cdfcfcce67065dd1b7c033143e7e5d\",\n \"score\": \"0.54794836\",\n \"text\": \"public function getActionName()\\n {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86cdfcfcce67065dd1b7c033143e7e5d\",\n \"score\": \"0.54794836\",\n \"text\": \"public function getActionName()\\n {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c4fe4356bdf75e726e0f8f53104db0c\",\n \"score\": \"0.5465473\",\n \"text\": \"public function getAction() { return $this->_action; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48160e5f1bee1ed2d10e0e2cf9c6516e\",\n \"score\": \"0.5459732\",\n \"text\": \"static function getRebuildActions() {\\n $actions = array(Router::assemble('activity_logs_admin_clean') => lang('Clean up existing log entries'));\\n \\n EventsManager::trigger('on_rebuild_activity_log_actions', array(&$actions));\\n \\n return $actions;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57889a174455134ba06765a865127cab\",\n \"score\": \"0.54523695\",\n \"text\": \"function logActivity($action = null, $name=null)\\n\\t{\\n\\t\\tif (!isset ($name)) \\n\\t\\t{\\n\\t\\t}\\n\\n\\t\\t$stmt = \\\"INSERT INTO $this->userActivityLog SET \\\" .\\n\\t\\t\\t\\\"OrderId = $this->OrderId, \\\".\\n\\t\\t\\t\\\"OrderNameId = $name, \\\".\\n\\t\\t\\t\\\"ActionType = $action, \\\" .\\n\\t\\t\\t\\t\\\"ActionTimeStamp = NOW()\\\";\\n\\n\\t\\t// echo \\\"$stmt

\\\";\\n\\n\\t\\t$result = $this->dbi->query($stmt);\\n\\n\\t\\treturn $this->getReturnValue($result);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5314a036fbb66e578a2ff1b0cd17be94\",\n \"score\": \"0.54506755\",\n \"text\": \"private function getLastEventByAction(string $action): \\\\Magento\\\\Logging\\\\Model\\\\Event\\n {\\n $collection = $this->_objectManager->create(\\\\Magento\\\\Logging\\\\Model\\\\Event::class)->getCollection();\\n $lastEvent = $collection->addFieldToFilter('fullaction', $action)\\n ->setOrder('time', 'DESC')\\n ->getLastItem();\\n\\n return $lastEvent;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c13e90cd138b3addfa58bf95b3a70d8\",\n \"score\": \"0.5440356\",\n \"text\": \"public function getHistoryData() {\\n echo(\\\"GetHistoryData Mastervolt\\\\n\\\");\\n return \\\"No History Data\\\"; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb6eaba2570f65cac49e9a771c64dc18\",\n \"score\": \"0.5433113\",\n \"text\": \"public function getActionName()\\n {\\n return $this->_action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"efa824a6a53c250d3102376332239079\",\n \"score\": \"0.54263407\",\n \"text\": \"public function getNewActionUrl(): string\\n {\\n return $this->batchUrl->getNewActionUrl();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"368e47f2f7bedab96bd6cdf538d0a8bc\",\n \"score\": \"0.54243433\",\n \"text\": \"protected function performAction()\\n {\\n parent::performAction();\\n\\n $this->accesslog->logChange(\\n $this->request,\\n $this->getTitle(),\\n $this->saveData + $this->getModel()->loadFirst()\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53c4016c2384ce0346d160d03c38ccbf\",\n \"score\": \"0.5424341\",\n \"text\": \"public function InsertHistory()\\n {\\n\\n\\t\\t\\t$nicks = $this->GetNick($this->to_user,$_SESSION['userid']);\\n\\n $sth = DB::prep(\\\"INSERT INTO cms_messaging_history (user,from_ip, email, sess, msg, admin, type) VALUES(:user,INET_ATON(:from_ip),:email,:sess,:msg,:this_admin, 'admin')\\\");\\n $sth->bindParam(\\\":msg\\\", $this->msg, PDO::PARAM_STR);\\n\\t\\t\\t$sth->bindParam(\\\":from_ip\\\", $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR);\\n\\t\\t\\t$sth->bindParam(\\\":sess\\\", $nicks->sess, PDO::PARAM_STR);\\n\\t\\t\\t$sth->bindParam(\\\":email\\\", $nicks->email, PDO::PARAM_STR);\\n\\t\\t\\t$sth->bindParam(\\\":this_admin\\\", $nicks->admin, PDO::PARAM_STR);\\n $sth->bindParam(\\\":user\\\", $nicks->nick, PDO::PARAM_STR);\\n \\n DB::Exec($sth);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed391bc3d66e431919ecf4f93f6dd4cb\",\n \"score\": \"0.5423868\",\n \"text\": \"function get_action() {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc43f9b2f2b6b98d310f134724c0b0ac\",\n \"score\": \"0.5422916\",\n \"text\": \"public function GetAction()\\n {\\n return Flag::ACTION_STRING[$this->action];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"766cc5a5882a6b1541806b32d4c184ed\",\n \"score\": \"0.54209316\",\n \"text\": \"public function get_action()\\n {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3152f0d3f6d4f7e3681da5adc6402501\",\n \"score\": \"0.54159003\",\n \"text\": \"public function testGetMessageHistory()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c19719b341b796f83c084b00561bed3\",\n \"score\": \"0.5412721\",\n \"text\": \"function chatHistory($request) {\\n\\t\\t$partnerId = $request['params']['to'];\\n\\t\\t$user = $this->pi->db->getUser();\\n\\t\\t//$partner = $this->pi->db->getUser($partnerId);\\n\\t\\t\\n\\t\\t// Prepare response\\n\\t\\t$items = '';\\n\\t\\tif (isset($this->chatHistory[$partnerId])) {\\n\\t\\t\\t$items = $this->chatHistory[$partnerId];\\n\\t\\t}\\n\\t\\tif ($items != '') {\\n\\t\\t\\t$items = substr($items, 0, -1);\\n\\t\\t}\\n\\t\\t\\n\\t\\t// Respond\\n\\t\\treturn \\\"{ \\\\\\\"items\\\\\\\": [$items] }\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"22b6ad47de3ecafac83369c32298ecc8\",\n \"score\": \"0.5411978\",\n \"text\": \"function cash_create_log($type, $action, $message = '')\\n{\\n\\tglobal $db;\\n\\t$action = implode(CASH_LOG_ACTION_DELIMITER,$action);\\n\\t$current_time = time();\\n\\t$sql = \\\"INSERT INTO \\\" . CASH_LOGS_TABLE . \\\"\\n\\t\\t\\t(log_time, log_type, log_action, log_text)\\n\\t\\t\\tVALUES(\\\" . $current_time . \\\", \\\" . $type . \\\", '\\\" . $db->sql_escape($action) . \\\"', '\\\" . $db->sql_escape($message) . \\\"')\\\";\\n\\t$db->sql_query($sql);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96b359a696f7fde23557c8b6ae8a25a4\",\n \"score\": \"0.5408305\",\n \"text\": \"private function get_action() {\\n\\t\\treturn $this->action;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96b359a696f7fde23557c8b6ae8a25a4\",\n \"score\": \"0.5408305\",\n \"text\": \"private function get_action() {\\n\\t\\treturn $this->action;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96b359a696f7fde23557c8b6ae8a25a4\",\n \"score\": \"0.5408305\",\n \"text\": \"private function get_action() {\\n\\t\\treturn $this->action;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"249c978d3aca12c6e44f71ba03baea89\",\n \"score\": \"0.5401322\",\n \"text\": \"public static function getAction()\\r\\n {\\r\\n return wcmSession::getInstance()->getCurrentAction();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98342172d5ec2cea0c765e51d800a84f\",\n \"score\": \"0.53991157\",\n \"text\": \"public function __toString() {\\n\\t\\tif ($this->toString === null) {\\n\\t\\t\\tswitch ($this->objectTypeID) {\\n\\t\\t\\t\\tcase \\\\wcf\\\\data\\\\object\\\\type\\\\ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.modifiableContent', 'com.woltlab.wbb.thread'):\\n\\t\\t\\t\\t\\t$this->toString = \\\\wcf\\\\system\\\\WCF::getLanguage()->getDynamicVariable('wcf.acp.modification.log.wbb.thread.'.$this->action, array(\\n\\t\\t\\t\\t\\t\\t'thread' => $this->getObject(), \\n\\t\\t\\t\\t\\t\\t'additionalData' => $this->additionalData\\n\\t\\t\\t\\t\\t)); \\n\\t\\t\\t\\t\\tbreak; \\n\\t\\t\\t\\t\\n\\t\\t\\t\\tcase \\\\wcf\\\\data\\\\object\\\\type\\\\ObjectTypeCache::getInstance()->getObjectTypeIDByName('com.woltlab.wcf.modifiableContent', 'com.woltlab.wbb.post'): \\n\\t\\t\\t\\t\\t$this->toString = \\\\wcf\\\\system\\\\WCF::getLanguage()->getDynamicVariable('wcf.acp.modification.log.wbb.post.'.$this->action, array(\\n\\t\\t\\t\\t\\t\\t'post' => $this->getObject(), \\n\\t\\t\\t\\t\\t\\t'additionalData' => $this->additionalData\\n\\t\\t\\t\\t\\t)); \\n\\t\\t\\t\\t\\tbreak; \\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t\\\\wcf\\\\system\\\\event\\\\EventHandler::getInstance()->fireAction($this, 'toString_'. \\\\wcf\\\\data\\\\object\\\\type\\\\ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID)->objectType);\\n\\t\\t}\\n\\t\\t\\n\\t\\tif ($this->toString !== null) {\\n\\t\\t\\treturn $this->toString; \\n\\t\\t}\\n\\t\\t\\n\\t\\treturn '';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a163d8cf9e6fbce73411e8386545af7d\",\n \"score\": \"0.53971434\",\n \"text\": \"public function action(): string {\\n return $this->route->getActionName();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b04763a4a8639a91b2b5938011084e1\",\n \"score\": \"0.53937083\",\n \"text\": \"public function getLogCommandsAction()\\n {\\n $data = $this->getModelManager()->getConnection()->fetchAll(\\n 'SELECT DISTINCT `command` FROM `s_plugin_connect_log`'\\n );\\n\\n $data = array_map(function ($column) {\\n return $column['command'];\\n }, $data);\\n\\n // Enforce these fields\\n foreach (['fromShop', 'toShop', 'getLastRevision', 'update', 'checkProducts', 'buy', 'reserveProducts', 'confirm'] as $value) {\\n if (!in_array($value, $data)) {\\n $data[] = $value;\\n }\\n }\\n\\n $this->View()->assign([\\n 'success' => true,\\n 'data' => $data\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38c18cd96907c5d628fb4e41fb502c93\",\n \"score\": \"0.5390117\",\n \"text\": \"public function getAction() {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e0eb928ade8532ae1de8375562769b0\",\n \"score\": \"0.5383616\",\n \"text\": \"function action_log_and_get_score($action = null, $model = null, $record_id = null, $user_id = null)\\r\\r{\\r\\r}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eac705b669fd5606604e34b3b1ffcdd3\",\n \"score\": \"0.5383519\",\n \"text\": \"private function getAction()\\r\\n {\\r\\n return $this->action;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2eafefb1eec2ec010835fc2662b2f4d8\",\n \"score\": \"0.53827083\",\n \"text\": \"function bp_get_messages_form_action() {\\n\\t\\treturn apply_filters( 'bp_get_messages_form_action', trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() . '/' . bp_action_variable( 0 ) ) );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afb314c12d0a2c6bb494f250100e4f94\",\n \"score\": \"0.5382378\",\n \"text\": \"function irc_bot_message_history_replay( int $log_id ) : void\\n{\\n // Require administrator rights to run this action\\n user_restrict_to_administrators();\\n\\n // Sanitize the log id\\n $log_id = sanitize($log_id, 'int', 0);\\n\\n // Fetch the data we need to replay the log\\n $dlog = mysqli_fetch_array(query(\\\" SELECT logs_irc_bot.channel AS 'il_channel' ,\\n logs_irc_bot.body AS 'il_body'\\n FROM logs_irc_bot\\n WHERE logs_irc_bot.id = '$log_id' \\\"));\\n\\n // Strip the hash from the start of the channel name\\n $channel = $dlog['il_channel'];\\n if($channel && (substr($channel, 0, 1) === '#'))\\n $channel = substr($channel, 1);\\n\\n // Replay the message and bypass silenced mode\\n irc_bot_send_message($dlog['il_body'], $channel, 1, 1);\\n\\n // Update the log now that it has been sent (if there's still an error, it will appear in the replayed log instead)\\n query(\\\" UPDATE logs_irc_bot\\n SET logs_irc_bot.is_silenced = 0 ,\\n logs_irc_bot.is_failed = 0\\n WHERE logs_irc_bot.id = '$log_id' \\\");\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"550b8988772b7911588dea3333fae024\",\n \"score\": \"0.537675\",\n \"text\": \"public function get_action()\\n {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82c7aec7447ae13c7e392a03a617e0b9\",\n \"score\": \"0.5366671\",\n \"text\": \"public static function processEmployeeLog(EmployeeLog $log): string\\n {\\n $sentence = '';\\n\\n if ($log->action == 'employee_created') {\\n $sentence = trans('account.employee_log_employee_created');\\n }\\n\\n if ($log->action == 'employee_locked') {\\n $sentence = trans('account.employee_log_employee_locked');\\n }\\n\\n if ($log->action == 'employee_unlocked') {\\n $sentence = trans('account.employee_log_employee_unlocked');\\n }\\n\\n if ($log->action == 'manager_assigned') {\\n $sentence = trans('account.employee_log_manager_assigned', [\\n 'name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'direct_report_assigned') {\\n $sentence = trans('account.employee_log_direct_report_assigned', [\\n 'name' => $log->object->{'direct_report_name'},\\n ]);\\n }\\n\\n if ($log->action == 'manager_unassigned') {\\n $sentence = trans('account.employee_log_manager_unassigned', [\\n 'name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'direct_report_unassigned') {\\n $sentence = trans('account.employee_log_direct_report_unassigned', [\\n 'name' => $log->object->{'direct_report_name'},\\n ]);\\n }\\n\\n if ($log->action == 'position_assigned') {\\n $sentence = trans('account.employee_log_position_assigned', [\\n 'name' => $log->object->{'position_title'},\\n ]);\\n }\\n\\n if ($log->action == 'position_removed') {\\n $sentence = trans('account.employee_log_position_removed', [\\n 'name' => $log->object->{'position_title'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_added_to_team') {\\n $sentence = trans('account.employee_log_employee_added_to_team', [\\n 'name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_removed_from_team') {\\n $sentence = trans('account.employee_log_employee_removed_from_team', [\\n 'name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_worklog_logged') {\\n $sentence = trans('account.employee_log_employee_worklog_logged');\\n }\\n\\n if ($log->action == 'employee_status_assigned') {\\n $sentence = trans('account.employee_log_employee_status_assigned', [\\n 'name' => $log->object->{'employee_status_name'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_status_removed') {\\n $sentence = trans('account.employee_log_employee_status_removed', [\\n 'name' => $log->object->{'employee_status_name'},\\n ]);\\n }\\n\\n if ($log->action == 'morale_logged') {\\n $sentence = trans('account.employee_log_morale_logged', [\\n 'name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'time_off_created') {\\n $sentence = trans('account.employee_log_time_off_created', [\\n 'date' => $log->object->{'planned_holiday_date'},\\n ]);\\n }\\n\\n if ($log->action == 'time_off_destroyed') {\\n $sentence = trans('account.employee_log_time_off_destroyed', [\\n 'date' => $log->object->{'planned_holiday_date'},\\n ]);\\n }\\n\\n if ($log->action == 'address_added') {\\n $sentence = trans('account.employee_log_address_set', [\\n 'address' => $log->object->{'partial_address'},\\n ]);\\n }\\n\\n if ($log->action == 'pronoun_assigned') {\\n $sentence = trans('account.employee_log_pronoun_set', [\\n 'name' => $log->object->{'pronoun_label'},\\n ]);\\n }\\n\\n if ($log->action == 'pronoun_removed') {\\n $sentence = trans('account.employee_log_pronoun_removed');\\n }\\n\\n if ($log->action == 'description_set') {\\n $sentence = trans('account.employee_log_description_set');\\n }\\n\\n if ($log->action == 'description_cleared') {\\n $sentence = trans('account.employee_log_description_cleared');\\n }\\n\\n if ($log->action == 'birthday_set') {\\n $sentence = trans('account.employee_birthday_set');\\n }\\n\\n if ($log->action == 'personal_details_set') {\\n $sentence = trans('account.employee_personal_details_set', [\\n 'name' => $log->object->{'name'},\\n 'email' => $log->object->{'email'},\\n ]);\\n }\\n\\n if ($log->action == 'work_from_home_logged') {\\n $sentence = trans('account.employee_log_work_from_home_logged', [\\n 'date' => $log->object->{'date'},\\n ]);\\n }\\n\\n if ($log->action == 'work_from_home_destroyed') {\\n $sentence = trans('account.employee_log_work_from_home_destroyed', [\\n 'date' => $log->object->{'date'},\\n ]);\\n }\\n\\n if ($log->action == 'answer_created') {\\n $sentence = trans('account.employee_log_answer_created', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'answer_updated') {\\n $sentence = trans('account.employee_log_answer_updated', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'answer_destroyed') {\\n $sentence = trans('account.employee_log_answer_destroyed', [\\n 'title' => $log->object->{'question_title'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_attached_to_recent_ship') {\\n $sentence = trans('account.employee_log_employee_attached_to_recent_ship', [\\n 'ship_title' => $log->object->{'ship_title'},\\n 'team_name' => $log->object->{'team_name'},\\n ]);\\n }\\n\\n if ($log->action == 'skill_associated_with_employee') {\\n $sentence = trans('account.employee_log_skill_associated_with_employee', [\\n 'name' => $log->object->{'skill_name'},\\n ]);\\n }\\n\\n if ($log->action == 'skill_removed_from_an_employee') {\\n $sentence = trans('account.employee_log_skill_removed_from_an_employee', [\\n 'name' => $log->object->{'skill_name'},\\n ]);\\n }\\n\\n if ($log->action == 'task_created') {\\n $sentence = trans('account.employee_log_task_created', [\\n 'title' => $log->object->{'title'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_created') {\\n $sentence = trans('account.employee_log_expense_created', [\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_accepted_for_employee') {\\n $sentence = trans('account.employee_log_expense_accepted_for_employee', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_accepted_by_manager') {\\n $sentence = trans('account.employee_log_expense_accepted_by_manager', [\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_rejected_by_manager') {\\n $sentence = trans('account.employee_log_expense_rejected_by_manager', [\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_rejected_for_employee') {\\n $sentence = trans('account.employee_log_expense_rejected_for_employee', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_accepted_by_accounting_for_employee') {\\n $sentence = trans('account.employee_log_expense_accepted_by_accounting_for_employee', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_accepted_by_accounting') {\\n $sentence = trans('account.employee_log_expense_accepted_by_accounting', [\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_rejected_by_accounting_for_employee') {\\n $sentence = trans('account.employee_log_expense_rejected_by_accounting_for_employee', [\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'expense_rejected_by_accounting') {\\n $sentence = trans('account.employee_log_expense_rejected_by_accounting', [\\n 'expense_id' => $log->object->{'expense_id'},\\n 'expense_title' => $log->object->{'expense_title'},\\n 'expense_amount' => $log->object->{'expense_amount'},\\n 'expensed_at' => $log->object->{'expensed_at'},\\n ]);\\n }\\n\\n if ($log->action == 'employee_allowed_to_manage_expenses') {\\n $sentence = trans('account.employee_log_employee_allowed_to_manage_expenses');\\n }\\n\\n if ($log->action == 'employee_disallowed_to_manage_expenses') {\\n $sentence = trans('account.employee_log_employee_disallowed_to_manage_expenses');\\n }\\n\\n if ($log->action == 'rate_your_manager_survey_answered') {\\n $sentence = trans('account.log_rate_your_manager_survey_answered', [\\n 'manager_id' => $log->object->{'manager_id'},\\n 'manager_name' => $log->object->{'manager_name'},\\n ]);\\n }\\n\\n if ($log->action == 'twitter_set') {\\n $sentence = trans('account.employee_log_employee_twitter_set', [\\n 'twitter' => $log->object->{'twitter'},\\n ]);\\n }\\n\\n if ($log->action == 'twitter_reset') {\\n $sentence = trans('account.employee_log_employee_twitter_reset');\\n }\\n\\n if ($log->action == 'slack_set') {\\n $sentence = trans('account.employee_log_employee_slack_set', [\\n 'slack' => $log->object->{'slack'},\\n ]);\\n }\\n\\n if ($log->action == 'slack_reset') {\\n $sentence = trans('account.employee_log_employee_slack_reset');\\n }\\n\\n if ($log->action == 'hiring_date_set') {\\n $sentence = trans('account.employee_log_hiring_date_set', [\\n 'hiring_date' => $log->object->{'hiring_date'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_entry_created') {\\n $sentence = trans('account.employee_log_one_on_one_entry_created', [\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_entry_destroyed') {\\n $sentence = trans('account.employee_log_one_on_one_entry_destroyed', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_talking_point_created') {\\n $sentence = trans('account.employee_log_one_on_one_talking_point_created', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'one_on_one_talking_point_id' => $log->object->{'one_on_one_talking_point_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_action_item_created') {\\n $sentence = trans('account.employee_log_one_on_one_action_item_created', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'one_on_one_action_item_id' => $log->object->{'one_on_one_action_item_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_note_created') {\\n $sentence = trans('account.employee_log_one_on_one_note_created', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'one_on_one_note_id' => $log->object->{'one_on_one_note_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_talking_point_destroyed') {\\n $sentence = trans('account.employee_log_one_on_one_talking_point_destroyed', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_action_item_destroyed') {\\n $sentence = trans('account.employee_log_one_on_one_action_item_destroyed', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_note_destroyed') {\\n $sentence = trans('account.employee_log_one_on_one_note_destroyed', [\\n 'happened_at' => $log->object->{'happened_at'},\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n if ($log->action == 'one_on_one_note_marked_happened') {\\n $sentence = trans('account.employee_log_one_on_one_note_marked_happened', [\\n 'one_on_one_entry_id' => $log->object->{'one_on_one_entry_id'},\\n 'happened_at' => $log->object->{'happened_at'},\\n 'employee_id' => $log->object->{'employee_id'},\\n 'employee_name' => $log->object->{'employee_name'},\\n ]);\\n }\\n\\n return $sentence;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5310163c84225aef1f254945796bb03b\",\n \"score\": \"0.5361113\",\n \"text\": \"public function get_action() {\\n return $this->action;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c70ff83766075905e1cb4140a3b93b61\",\n \"score\": \"0.53571606\",\n \"text\": \"public function actionViewlogging()\\n\\t{\\n\\t\\t$h_id = Yii::app()->request->getParam('h', AppHelper::two_way_string_encrypt(Yii::app()->user->id));\\n\\t\\t$id = AppHelper::two_way_string_decrypt($h_id);\\n\\t\\tself::check_function_argument($id);\\n\\t\\tif (Yii::app()->user->getIsGuest()) {\\n\\t\\t\\tYii::app()->user->setReturnUrl(Yii::app()->request->baseUrl.'/site/viewloggingdetails');\\n\\t\\t\\t$this->redirect(Yii::app()->request->baseUrl.'/user/login');\\n\\t\\t}\\n\\t\\t$wslogging_model=WsLogging::model()->findByPk($id);\\n\\t\\t$this->render('viewlogging',array(\\n\\t\\t\\t\\t'wslogging_model'=>$wslogging_model,\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b88c80c5539c1bcea127369391a1d24d\",\n \"score\": \"0.53561646\",\n \"text\": \"function ajan_activity_action( $args = array() ) {\\n\\techo ajan_get_activity_action( $args );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56bcde5b0173a441bde00954bb8774b7\",\n \"score\": \"0.53561145\",\n \"text\": \"public function getActionName()\\n\\t{\\n\\t\\treturn $this->_action;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"757aff08d5272f8735a592320effbe00\",\n \"score\": \"0.5354372\",\n \"text\": \"protected function messageHistory($id) {\\n\\n $message_sheduling = DB::table('CRM_MC_EVENTS')\\n ->where('CME_ID', $id)\\n ->first();\\n\\n $mhdata['CMH_RET_BIZ_ID'] = $message_sheduling->CME_RET_BIZ_ID;\\n $mhdata['CMH_CMCVH_ID'] = 0;\\n $mhdata['CMH_MSG_TYPE'] = $message_sheduling->CME_MSG_TYPE;\\n\\n $mhdata['CMH_TITLE'] = $message_sheduling->CME_TITLE;\\n $mhdata['CMH_CONTENT'] = $message_sheduling->CME_MSG_TXT;\\n $mhdata['CMH_CCM_GENDER'] = $message_sheduling->CME_CCM_GENDER;\\n $mhdata['CMH_CCRL_CUST_PROS_TYPE'] = $message_sheduling->CME_CCRL_CUST_PROS_TYPE;\\n $mhdata['CMH_CREATED_DT'] = Carbon::now();\\n\\n DB::table('CRM_MC_HISTORY')->insert($mhdata);\\n $data['message_sheduling'] = DB::table('CRM_MC_EVENTS')->where('CME_ID', '=', $id)->update(['CME_MSG_STATUS' => 2]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4d99c5e2db0767958c2f4120a88d7b6\",\n \"score\": \"0.53532743\",\n \"text\": \"static function record_log($action, $handler, $message){\\n //date formatting\\n $date=strftime('%Y-%m-%d %H:%M:%S', time());\\n //log format::2013-01-02 01:02:03|Login: kenny logged in\\n if($action==\\\"Clear\\\"){\\n $logfile=SITE_ROOT.DS.\\\"logs\\\".DS.\\\"logs.txt\\\";\\n file_put_contents($logfile, \\\"{$date} |{$action}:{$message}\\\\n\\\");\\n }else{\\n $content=\\\"{$date} |{$action}:{$message}\\\\n\\\";\\n //writing the content into a file\\n $write_state=fwrite($handler, $content);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f1dde3ff85e859d12b77d94a33e7cac\",\n \"score\": \"0.5351802\",\n \"text\": \"public function index_activityLog()\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e49b63c139c936e53160f3599c18369\",\n \"score\": \"0.5351518\",\n \"text\": \"public function GetAction() {\\n\\t\\treturn self::$strAction;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e49255ac22c3c6616a0b6c4e9a16f054\",\n \"score\": \"0.53452003\",\n \"text\": \"public function createHistoryLog($entity_id, $entity_type, $remote_site_id, $action, $note = NULL) {\\n // Check if exists.\\n $query = \\\\Drupal::entityQuery('history_log')\\n ->condition('target_entity_id', $entity_id)\\n ->condition('target_entity_type', $entity_type)\\n ->condition('remote_site', $remote_site_id)\\n ->condition('action', $action);\\n $existing_logs = $query->execute();\\n if ($existing_logs) {\\n // Update existing log.\\n $log = HistoryLog::load(end($existing_logs));\\n $log->setChangedTime(time());\\n $log->set('note', $note);\\n $log->save();\\n }\\n else {\\n // Create a new history log.\\n $values = array(\\n 'target_entity_id' => $entity_id,\\n 'target_entity_type' => $entity_type,\\n 'remote_site' => $remote_site_id,\\n 'action' => $action,\\n 'note' => $note,\\n );\\n return HistoryLog::create($values)->save();\\n\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4a3cdea83d726c2b2870f86f5d70d19\",\n \"score\": \"0.53446764\",\n \"text\": \"public function getAction()\\r\\n {\\r\\n return $this->action;\\r\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":718,"cells":{"query_id":{"kind":"string","value":"33b0b5768df228b3024cf55a05133955"},"query":{"kind":"string","value":"A way to get all the currently 'hot' artists Uses last.fm at the moment, could change later"},"positive_passages":{"kind":"list like","value":[{"docid":"44d202e8ee89d28e58bda106f5f94684","score":"0.6771763","text":"public function hot() {\n\t\t$this->set('artists', $this->Artist->getHot(8));\n\t}","title":""}],"string":"[\n {\n \"docid\": \"44d202e8ee89d28e58bda106f5f94684\",\n \"score\": \"0.6771763\",\n \"text\": \"public function hot() {\\n\\t\\t$this->set('artists', $this->Artist->getHot(8));\\n\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"fafbf95d6ff8f6816791b4f9cb0f0b34","score":"0.704185","text":"public function GetAllArtist()\r\n {\r\n $html = $this->LoadSite(\"http://www.eachamps.rw/audios\");\r\n $c = HtmlPageCrawler::create($html);\r\n $links = $c->filter('.tabcontents #view2 .scroll-pane .panel-default .list-group .list-group-item a');\r\n $data = array();\r\n for ($i = 0; $i < $links->length; $i++) {\r\n $info = array();\r\n $info['artist'] = $links->eq($i)->html();\r\n $info['link'] = $links->eq($i)->attr('href');\r\n //$info['info'] = $this->ArtistDetails($links->eq($i)->attr('href'));\r\n array_push($data, $info);\r\n }\r\n return $data;\r\n }","title":""},{"docid":"67b781a51969d98814d0157cadc789c0","score":"0.6972261","text":"public function getArtists()\n {\n // return artists\n return (array) $this->artists;\n }","title":""},{"docid":"58b40d631cf3154c758e28edfed67012","score":"0.6851953","text":"public function getAllArtists()\r\n\t{\r\n\t$artists = $this->select('*', 'artists');\r\n\treturn $artists;\r\n\t}","title":""},{"docid":"a8798831cf45ab2e1ae66899c732f7fd","score":"0.67795706","text":"public static function artists()\n {\n return \"discogs:artists\";\n }","title":""},{"docid":"d861df88975670501d59c96044ea934f","score":"0.6703048","text":"public function getArtist()\r\n {\r\n if (!empty($this->_tags['artists']))\r\n return $this->_tags['artist'];\r\n else return ;\r\n }","title":""},{"docid":"e46958a02edb04173755a6eea732da29","score":"0.6502736","text":"public function getArtists($artist){\n\t\t$data['artist_name'] = $artist;\n\t\t//Get Artist information\n\t\t$data['artist_cover'] = Comicbooks::artists($artist)\n\t \t\t\t\t\t\t\t\t\t\t->select('cover_image')\n\t\t\t\t\t\t\t\t\t\t\t\t->orderBy('published_date', 'asc')\n\t\t\t\t\t\t\t\t\t\t\t \t->distinct()->get();\n\t\t$data['artist_works'] = Comicbooks::artists($artist)\n\t\t\t\t\t\t\t\t\t ->select('book_name')\n\t\t\t\t\t\t\t\t\t ->orderBy('published_date', 'asc')\n\t\t\t\t\t\t\t\t\t ->distinct()->get();\n\n\t \t//Check to see if artist exist in database. If it doesn't Redirect to a wiki page\n\t $data['has_artist'] = (count($data['artist_works'])) ? true : false;\n\t\tif (!$data['has_artist']) {\n\t\t\treturn Redirect::away(\"http://en.wikipedia.org/wiki/\".ucwords($artist));\n\t\t}\n\t\t$this->layout->content = View::make('artist', $data);\n\t}","title":""},{"docid":"d55771dbc76b0f3f603682c538f05d65","score":"0.6498086","text":"function WOLFARTISTS() {\n\treturn Wolf_Artists::instance();\n}","title":""},{"docid":"8e19adff16fd3b0ea7b047877fcf0559","score":"0.63691163","text":"public function getArtists($id)\n {\n \n // skladanka, gdzie chcemy wziac artist (album artist mamy v/a wtedy)\n // plyta producencka, gdzie chcemy wziac feat\n // normalna plyta gdzie wykonawca jest autor plyty (ale nie mamy jak odroznic od producenckiej)\n \n // moze jako wykonawce traktowac zawsze album artist, ale dawac w nawiasie feat ?\n // hhbd.pl/Dj 600v/_/Merctedes (feat. Tede),4581.html\n // hhbd.pl/VA/Letnie hity 2010/Merctedes (feat. Tede),4581.html\n $artists = new Jkl_List();\n //set feat as artist\n $featuring = Model_Artist_Api::getInstance()->getSongFeaturing($id);\n foreach ($featuring->items as $key => $value) {\n $artists->add($value);\n }\n \n //if empty \n //get list of albums\n // seat first album artist not v/a as artist\n if (sizeof($artists->items) < 1) {\n $featured = Model_Album_Api::getInstance()->getSongAlbums($id, null);\n foreach ($featured->items as $key => $value) {\n if ($value->artist->name != 'V/A') {\n $artists->add($value->artist);\n } \n }\n }\n \n // if still empty\n // set song's artist\n if (sizeof($artists->items) < 1) {\n $artist = Model_Artist_Api::getInstance()->getSongArtist($id); \n foreach ($featured->items as $key => $value) {\n $artists->add($value);\n }\n }\n return $artists; \n }","title":""},{"docid":"dac397de04eb120c416974b67154c6ef","score":"0.6366875","text":"function artistLists( $offset = 0 ){\n\n\t\treturn $this->take(Config::get('cms_config.limit'))\n\t\t\t\t\t->offset($offset)\n\t\t\t\t\t->get();\n\t}","title":""},{"docid":"1a19cfe861e20153e83667c799c5319c","score":"0.6365595","text":"public function populateMusicArtists($artist)\n\t\t\t{\n\t\t\t\t$strtoarray = explode(',',$artist);\n\t\t\t\t$artist = array_pop($strtoarray);\n\t\t\t\t$sql = 'SELECT artist_name, '.\n\t\t\t\t\t\t'(CASE WHEN `artist_name` LIKE \\''.$artist.'%\\' THEN 1 ELSE 0 END) AS relevance1, '.\n\t\t\t\t\t\t'(CASE WHEN `artist_name` LIKE \\'%'.$artist.'%\\' THEN 1 ELSE 0 END) AS relevance2 '.\n\t\t\t\t\t\t' FROM '.$this->CFG['db']['tbl']['music_artist'].\n\t\t\t\t\t\t' WHERE artist_name LIKE \\'%'.$artist.'%\\''.\n\t\t\t\t\t\t' AND music_artist_id!=1'.\n\t\t\t\t\t\t' ORDER BY relevance1 DESC, relevance2 DESC';\n\n\t\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t\t$rs = $this->dbObj->Execute($stmt, array());\n\t\t\t if (!$rs)\n\t\t\t\t trigger_error($this->dbObj->ErrorNo().' '.\n\t\t\t\t\t\t$this->dbObj->ErrorMsg(), E_USER_ERROR);\n\n\t\t\t\tif(!$rs->PO_RecordCount())\n\t\t\t\t\treturn false;\n\n\t\t\t\t$artist_name = array();\n\t\t\t\twhile($row = $rs->FetchRow())\n\t\t\t\t\t{\n\t\t\t\t\t\t$artist_name[] = trim($row['artist_name']);\n\t\t\t\t\t}\n\t\t\t\treturn $artist_name;\n\t\t\t}","title":""},{"docid":"9bbaa13b47b25b22bc6860e577a0814f","score":"0.63458663","text":"public function getArtistSearchResult()\n {\n return $this->artistSearchResult;\n }","title":""},{"docid":"5bcd185617e7e1d518f93304013d5a93","score":"0.614506","text":"function getArtistInfo($artist, $api){\n $album_list = array();\n $xml_request_url = 'http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist='.$artist.'&api_key='.$api;\n $xml = new SimpleXMLElement($xml_request_url, null, true);\n if($xml->topalbums->album){\n $artist_info['album_list'] = array();\n foreach($xml->topalbums as $value){\n foreach($value->album as $test){\n array_push($album_list,'url.'\">'.$test->name.'');\n }\n }\n }\n if($xml->artist->bio->summary){\n $artist_info['summary'] = $xml->artist->bio->summary;\n $artist_info['info'] = $xml->artist->bio->content;\n }\n return $artist_info;\n}","title":""},{"docid":"f7d22be55b142ba9d7caa52c90381843","score":"0.6105338","text":"public function getTopTags($artist=\"\") {\n if (!$artist)\n return false;\n $url = \"http://ws.audioscrobbler.com/2.0/?method=artist.gettoptags\";\n $url .= \"&artist=\" . urlencode($artist);\n $url .= \"&limit=\" . self::MAX_TAGS;\n $url .= \"&api_key=\" . self::API_KEY . \"&format=json\";\n $obj = json_decode(file_get_contents($url));\n if (isset($obj->error)) {\n return false;\n } else {\n return $obj;\n }\n }","title":""},{"docid":"d33d296dd90b27db256769b1c66ddb1d","score":"0.6102792","text":"function get_artist()\r\n {\r\n return $this->get_additional_property(self :: PROPERTY_ARTIST);\r\n }","title":""},{"docid":"9683c78056ccd61b073012c074947930","score":"0.6096452","text":"public function getArtistSearchResultInfo()\n {\n return $this->artistSearchResultInfo;\n }","title":""},{"docid":"a5be8557e3eb8beaf6c23f364e42550e","score":"0.60147697","text":"function queryArtworkArtistInfo($art){\n $artworkQuery;\n $artistArtworkQuery;\n $artistNames;\n $artistQuery;\n $result;\n\n if(is_array($art)){\n // build main image artist name (by querying ARTWORK with artworkReferenceNo in the EXHIBITION table)\n if($artworkQuery = queryReference('ARTWORK', 'ArtworkID', $art['ArtworkID'])){\n\n // check if artist_artwork table gets referenced\n if($artistArtworkQuery = queryReference('ARTIST_ARTWORKS', 'ArtworkID', $artworkQuery[0]['ArtworkID'])){\n\n // build the artistNames string\n $artistNames =\"\";\n\n // loop through the artwork query\n foreach($artistArtworkQuery as $artist){\n\n // query the ARTIST table with corresponding ID\n if($artistsQuery = queryReference('ARTIST', 'ArtistID', $artist['ArtistID'])){\n\n // build name and concatenate each return string\n $artistNames .= buildArtistName($artistsQuery[0]);\n\n }\n }\n }\n }\n \n $result = array(\"artwork\" => $artworkQuery, \"artists\" => $artistNames);\n }\n return $result;\n }","title":""},{"docid":"d4381bf7d94e787e87b6b7bcd2ae77bf","score":"0.60025483","text":"public function artists() {\n return $this->belongsToMany('Artist', 'artist_musician');\n }","title":""},{"docid":"414a402f8766349b7b4ee0d6e31a3489","score":"0.5995856","text":"private function getrecenttracks()\n {\n include_once \"../app/API/newdb.php\";\n $conn = getconn();\n $sql = \"SELECT * FROM metadata ORDER BY STR_TO_DATE(releaseDate,'%Y-%c-%e') DESC limit 5\";\n $myres = array();\n $result = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($result)) {\n $item = array(\n 'id' => $row['id'],\n 'songName' => $row['songName'],\n 'albumName' => $row['albumName'],\n 'artists' => $row['artists'],\n 'releaseDate' => $row['releaseDate'],\n 'songImage' => $row['songImage'],\n 'genre' => $row['genre'],\n 'popularity' => $row['popularity']\n );\n\n array_push($myres, $item);\n }\n $conn->close();\n return $myres;\n }","title":""},{"docid":"132e4ff1bd27555915613e2c502e4c4d","score":"0.5983257","text":"function list_artist()\n {\n // Recupération des artistes pour les options du select \n $artist = new Artist();\n $row_artiste = $artist->details_artist();\n return $row_artiste;\n }","title":""},{"docid":"fa346369caf563c46de95c633535f080","score":"0.5971614","text":"function getArtist()\n\t{\n\t\treturn $this->_artist;\n\t}","title":""},{"docid":"2a5d1e265f60cc85874ca1b7203db6bc","score":"0.5960267","text":"public function getSongsbyArtist($artist) {\n // create null artist\n $searchArtist[] = null;\n // Loop through the songs array\n foreach ($this->songs as $value) {\n // Check the value of the current items properties in the array to see if they match the artist we are looking for\n if($value->artist == $artist){\n //if the artist does match the one we are looking for, push it to the search artist array and echo values\n array_push($searchArtist, $value);\n echo $value . \"\\n\";\n }\n }\n //return print_r($searchArtist);\n }","title":""},{"docid":"777dda2e937d2e0e21d1db1244c70b36","score":"0.5953435","text":"public function refreshArtistList()\n {\n $key = Config::get('key');\n $endpoint = Config::get('endpoint');\n $faceListUUID = Config::get('faceListUUID');\n\n Http::withoutVerifying()->withHeaders([\n 'Content-Type' => 'application/json',\n 'Ocp-Apim-Subscription-Key' => $key\n ])->post(\"$endpoint/face/v1.0/largefacelists/$faceListUUID/train\");\n }","title":""},{"docid":"8c820a4f9c319048b3d2740420ad4984","score":"0.5948619","text":"function getLatestSongs() {\n\t\t$songs = json_decode( $this->fetchLatest()->getBody()->getContents(), true );\n\n\t\t$this->parseSongs( $songs );\n\t}","title":""},{"docid":"744f38014c7467806bafe5b0ea227f48","score":"0.5936104","text":"public function index()\n {\n return Artist::all();\n }","title":""},{"docid":"f12a09e66ae9b341e3ce5595aba8cc95","score":"0.5922935","text":"public function getArtist(){\n return $this->artist;\n }","title":""},{"docid":"8ffa0148f98c569db127d73b1e06bd8d","score":"0.5901701","text":"public function getArtist() {\n $artist = $this->_getTrack()->getArtist();\n if ($artist == null) {\n $artist = $this->_getTrack()->getAlbum()->getProduct()->getMytunesArtist();\n }\n return $artist;\n }","title":""},{"docid":"569c8eb4871edfed002864d67cd575c0","score":"0.58981055","text":"public function MakeArtistAdvancedSearch(){\n\t\t//get all artists\n\t\t$artist =$this->DanceRepository->GetArtists();\n\t\t$artistsSearchlist = \"\";\n\t\t// foreach artist make a checkbox \n\t\tforeach ($artist as $artist) {\n\t\t\t$artistsSearchlist .= \"
\";\n\t\t}\n\t\t//return all artists checkboxes\n\t\treturn $artistsSearchlist;\n\t}","title":""},{"docid":"a547d449350f21b203fdce3d957363b8","score":"0.5883599","text":"public function getArtist()\n {\n return $this->artist;\n }","title":""},{"docid":"a547d449350f21b203fdce3d957363b8","score":"0.5883599","text":"public function getArtist()\n {\n return $this->artist;\n }","title":""},{"docid":"a547d449350f21b203fdce3d957363b8","score":"0.5883599","text":"public function getArtist()\n {\n return $this->artist;\n }","title":""},{"docid":"a547d449350f21b203fdce3d957363b8","score":"0.5883599","text":"public function getArtist()\n {\n return $this->artist;\n }","title":""},{"docid":"ebcd15b367520aad46e9ffa9803d2577","score":"0.58790743","text":"function sr_artist_tracks($artist)\r\n{\t\r\n\t$tracks = array();\r\n\tglobal $tracks_mb;\r\n\t$meta = $tracks_mb->the_meta();\r\n\t$trackmeta = $meta['tracks'];\r\n\t\r\n\tif($trackmeta){\r\n\t\tforeach ($trackmeta as $track){\r\n\t\t\t$track = $track['track-link'];\r\n\t\t\tif (!in_array($track , $tracks)){\r\n\t\t\t\tarray_push($tracks, $track);\r\n\t\t\t}\r\n\t\t}\r\n\t} \r\n\t$args = $rel_args = array('post_type' => 'release' , 'artist' => $artist , 'posts_per_page' => '-1');\r\n\t$rel_query = new WP_query($rel_args);\r\n\t\t\r\n\tif(have_posts()): while ( $rel_query->have_posts() ) : $rel_query->the_post();\r\n\t\r\n\t\t$meta = $tracks_mb->the_meta();\r\n\t\t$trackmeta = $meta['tracks'];\r\n\t\r\n\t\tif($trackmeta){\r\n\t\t\tforeach ($trackmeta as $track){\r\n\t\t\t\t$track = $track['track-link'];\r\n\t\t\t\tif (!in_array($track , $tracks)){\r\n\t\t\t\t\tarray_push($tracks, $track);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} \r\n\t\r\n\tendwhile; endif; wp_reset_query();\r\n\t\r\n\t$tracks_count = count($tracks);\r\n\tif($tracks_count > 7){\r\n\t\t$tracks = array_slice($tracks, 0, 7);\r\n\t}\r\n\tif(!empty($tracks)){\r\n\t\techo '

';\r\n\t}\r\n}","title":""},{"docid":"1640313410df2f6623bf0d2f97ad804f","score":"0.58760655","text":"function sr_get_rels_artist($postID , $link = true, $tag = 'h2'){\r\n\r\n\t$artist_terms = get_the_terms( $postID, 'artist' );\r\n\t$artists = array();\r\n\tforeach ($artist_terms as $artist_term)\r\n\t{\t\r\n\t\tarray_push($artists, $artist_term->term_id);\r\n\t}\r\n\t$artists_titles = array();\r\n\tforeach ($artist_terms as $artist_term)\r\n\t{\t\r\n\t\t$artist_title = get_page_by_title($artist_term->name , OBJECT, 'artist');\r\n\t\t$artist_title = array('title' => $artist_title->post_title, 'guid' => $artist_title->guid);\r\n\t\tarray_push($artists_titles, $artist_title);\r\n\t}\r\n\t\r\n\t$artists_titles_count = count($artists_titles);\r\n\techo '<'. $tag .' class=\"entry-artists\">';\r\n\tif($artists_titles_count <= 2):\r\n\t\tforeach($artists_titles as $artist_title): ?>\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\" title= \"More about \">\r\n\t\t\t\t\r\n\t\t\t \r\n\t\tVarious Artists\r\n\t';\r\n\treturn $artists;\r\n}","title":""},{"docid":"bd8e3941d91ab65647bf45edde3e0daa","score":"0.58757293","text":"public static function artistsIgnore()\n {\n return \"discogs:artists:ignore\";\n }","title":""},{"docid":"edafdf8f67f90bf0896cfdf88303344a","score":"0.58636916","text":"public function getDisplayArtist()\n {\n return $this->displayArtist;\n }","title":""},{"docid":"57fc54f76c643e6f901d3b08c6c4bbff","score":"0.5843973","text":"public function getArtists()\n {\n\n try {\n\n //search the token\n $em = $this->getDoctrine()->getEntityManager();\n $oArtistRepo = $em->getRepository(Artist::class);\n\n $oArtists = $oArtistRepo->findAll();\n\n if (empty($oArtistRepo))\n throw new \\Exception('No artists found');\n\n //package to return\n $arrArtist = array_map(function($oArtist) {\n return $oArtist->getSerializedArtist();\n }, $oArtists );\n\n $response = ['result' => self::SUCCESS_RESPONSE, 'message' => 'success', 'data' => $arrArtist];\n } catch (\\Exception $ex) {\n $response = ['result' => self::NOT_SUCCESS_RESPONSE, 'message' => $ex->getMessage(), 'data' => ''];\n }\n\n return $this->json($response);\n }","title":""},{"docid":"bf324adea6fd1ec1db81be15ba16f1d5","score":"0.5842245","text":"protected function getArtistQuery()\n {\n return $this->artistQuery;\n }","title":""},{"docid":"f46ddaa80713065377c2d813f7edc964","score":"0.58234257","text":"function fetch_ijlastfm_data($username = 'just_in_time90',$trackNum = 3,$showArt = 1,$showUI = 1,$useReturn = 0){\n$options = get_option(\"ij_lastfm_widget\");\nlibxml_use_internal_errors(true);\nif (!is_array($options))\n{\n$options = array(\n\t\t'title' => 'Last.fm Recently Played',\n\t\t'username' => 'just_in_time90',\n\t\t'trackNum' => '3',\n\t\t'showArt' => '1',\n\t\t'showUI' => '1',\n\t\t'profileLink' => 'View My Profile'\n );\n}\nif(false === ($latest = get_transient('ij_lastfm_widget_'.$username))){\n$request_url = \"http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=\".$username.\"&limit=50&api_key=f02d8c8d50cd86d57bed580b6c6aeda3\";\n$ch = curl_init();\n$timeout = 5;\ncurl_setopt($ch, CURLOPT_URL, $request_url);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n$latest = curl_exec($ch);\ncurl_close($ch);\nset_transient('ij_lastfm_widget_'.$username, $latest, 60);\n}\nif(false === ($ui = get_transient('ij_lastfm_widget_uinfo_'.$username))){\n$request_url = \"http://ws.audioscrobbler.com/2.0/?method=user.getinfo&user=\".$username.\"&api_key=f02d8c8d50cd86d57bed580b6c6aeda3\";\n$ch = curl_init();\n$timeout = 5;\ncurl_setopt($ch, CURLOPT_URL, $request_url);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\n$ui = curl_exec($ch);\ncurl_close($ch);\nset_transient('ij_lastfm_widget_uinfo_'.$username, $ui, 60);\n}\n\n$latest = new SimpleXMLElement($latest);\n$ui = new SimpleXMLElement($ui);\nif($latest->xpath('//track')){\n//gather user info\n$upic = $ui->user->image[1];\n$username = $ui->user->name;\n$playcount = $ui->user->playcount;\n$timejoin = $ui->user->registered['unixtime'];\n$fromCountry = $ui->user->country;\n\n$theTracks = \"\";\n\nif($showUI==1){\n$theTracks = $theTracks.\"
\";\nif($upic!=''){\n$theTracks = $theTracks.\"\\\"Profile\";\n}\n//determin link text\nif($options['profileLink'] == \"\")\n{\n$profileLink = \"View My Profile\";\n}else{\n$profileLink = $options['profileLink'];\n}\n$theTracks = $theTracks.\"\".$username.\"\";\n$theTracks = $theTracks.\"\".$profileLink.\"\";\n$theTracks = $theTracks.\"\".$playcount.\" plays since \".date(\"F j Y\",(int)$timejoin).\"\";\n$theTracks = $theTracks.\"
\";\n}\n$i=0;\nforeach($latest->xpath('//track') as $track){\n//get all the info\n\t$title = $track->xpath('//name');\n\t$title = $title[$i];\n\t$nowPlaying = $track->xpath('//track/@nowplaying');\n\t$datePlayed = $track->xpath('//date/@uts');\n\t$albumArt = $track->xpath('//image[@size=\"medium\"]');\n\t$artist = $track->xpath('//artist');\n//create the DIV\n$theTracks = $theTracks.\"
\";\n\tif($showArt==1){\n//do we want to show album art?\n\tif($albumArt[$i] != \"\"){\n\t$theTracks = $theTracks.\"Album Art for \".$title.\"\";\n\t}else{\n\t$theTracks = $theTracks.\"No Album Art Available\";\n\t}\n\t$theTracks = $theTracks.\"\".$title.\"\";\n\t$theTracks = $theTracks.\"\".$artist[$i].\"\";\n\t//lets see if this song is currently playing...\n\tif($nowPlaying[$i] != \"\"){\n\t$theTracks = $theTracks.\"now playing!\";\n\t}else{\n\t$theTracks = $theTracks.\"\".human_time_diff($datePlayed[$i]).\" ago\";\n\t}\n\t}else{\n\t$theTracks = $theTracks.\"\".$title.\"\";\n\t$theTracks = $theTracks.\"\".$artist[$i].\"\";\n\t//lets see if this song is currently playing...\n\tif($nowPlaying[$i] != \"\"){\n\t$theTracks = $theTracks.\"now playing!\";\n\t}else{\n\t$theTracks = $theTracks.\"\".human_time_diff($datePlayed[$i]).\" ago\";\n\t}\n}\n\t$i++;\n$theTracks = $theTracks.\"
\";\n\tif($i == $trackNum){break;};\n\tif($i == 50){break;};\n}\n}else{\n\t$theTracks = \"Something went wrong... Last.fm may be down.\";\n}\nIf($useReturn == 1){\nreturn $theTracks;\n}else{\necho $theTracks;\n}\n}","title":""},{"docid":"e5d1d37a86d0df133a414bfddc91c747","score":"0.58045304","text":"function findArtist($level, $echonest, $i = 0)\n{\n if ($i > 100) {\n die('sorry, no artist found');\n }\n\n $familiarity = 0.9 - ($level/10);\n\n $results = $echonest->getArtistApi()->search(array(\n 'genre' => 'classical',\n 'min_familiarity' => $familiarity,\n 'artist_start_year_before' => 1870,\n 'sort' => 'familiarity-desc'\n ));\n\n $rand = rand(0, count($results) - 1);\n $artist = $results[$rand];\n\n $location = $echonest->getArtistApi()->setId($artist['id'])->getProfile(array(\n 'bucket' => 'artist_location'\n ));\n\n $country = $location['artist_location']['country'];\n $city = $location['artist_location']['city'];\n\n // filter the USA because we get wrong results from there -> this is just a hack\n if ($country == 'United States'\n || empty($city)\n || empty($country)\n ) {\n return findArtist($level, $echonest, ++$i);\n }\n\n return $location;\n}","title":""},{"docid":"740c8c8c093751c432c261997fc678cb","score":"0.57630706","text":"function hnd_artist_events() {\n\n\t$artist_title = get_the_title();\n\n\tadd_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\n \t$artist_events = new WP_Query( array(\n\t\t'post_type' => 'events',\n\t\t'order' => 'DESC',\n\t\t'posts_per_page' => -1,\n\t\t'artist_title' => $artist_title,\n\t) );\n\tremove_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\n \t\n\t# TODO: split into upcoming and past events\n\n\tif( isset( $artist_events ) && $artist_events->have_posts() ) {\n\t\twhile( $artist_events->have_posts() ) : $artist_events->the_post();\n\t\t\tget_template_part( 'loop', 'item' );\n\t\tendwhile;\n\t} else {\n\t\techo '

No Upcoming Events


';\n\t}\n\t\n\twp_reset_query();\n}","title":""},{"docid":"0626754873d261691b16b939df55bb9b","score":"0.5748841","text":"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CDACertifBundle:Artist')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }","title":""},{"docid":"3253382079eeb30d95d42bdae183ed7d","score":"0.5743927","text":"function getFavorites() \n {\n return $this->favorites;\n }","title":""},{"docid":"009c2cb74e5580b3e0ee653e8c81e2f7","score":"0.57435393","text":"function getLastFm() {\n\n $user = '** USERNAME **'; // Enter your username here\n $key = '** API KEYS **'; // Enter your API Key\n $status = 'Last Played:'; // default to this, if 'Now Playing' is true, the json will reflect this.\n $endpoint = 'https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=' . $user . '&&limit=2&api_key=' . $key . '&format=json';\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $endpoint);\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); // 0 for indefinite\n curl_setopt($ch, CURLOPT_TIMEOUT, 10); // 10 second attempt before timing out\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));\n\n $response = curl_exec($ch);\n $lastfm[] = json_decode($response, true);\n\n curl_close($ch);\n\n $artwork = $lastfm[0]['recenttracks']['track'][0]['image'][2]['#text'];\n\n if ( empty( $artwork ) ) {\n $artwork = 'artwork-fallback.png';\n }\n\n $trackInfo = [\n 'name' => $lastfm[0]['recenttracks']['track'][0]['name'],\n 'artist' => $lastfm[0]['recenttracks']['track'][0]['artist']['#text'],\n 'link' => $lastfm[0]['recenttracks']['track'][0]['url'],\n 'albumArt' => $artwork,\n 'status' => $status\n ];\n\n if ( !empty($lastfm[0]['recenttracks']['track'][0]['@attr']['nowplaying']) ) {\n $trackInfo['nowPlaying'] = $lastfm[0]['recenttracks']['track'][0]['@attr']['nowplaying'];\n $trackInfo['status'] = 'Now Playing:';\n }\n\n return displayLastFM($trackInfo);\n}","title":""},{"docid":"33a576a7ad8502fac6df1ad68858cc5a","score":"0.5696698","text":"function lastfm_recenttracks($lastfm_username,$amount=5) {\n\t$list=file(\"http://ws.audioscrobbler.com/1.0/user/$lastfm_username/recenttracks.txt\");\n\t$i=0;\n\t$pieces=array();\n\t$temp=array();\n\twhile ($i<$amount) {\n\t\t//each piece's pieces array structure: 0=>$timestamp, 1=>$artist, 2=>$title\n\t\t$pieces[$i]=explode(\",\",$list[$i]);\n\t\t//now $pieces[$i][0] is our timestamp of current song, $pieces[$i][1] are other parts of the song info\n\t\t$temp[$i][0]=$pieces[$i][1];\n\t\t//I saved the other part of the track info (track, artist) to $temp[$i][0] for later to use substr. Because some songs may have \" - \" someting like \"Oh God - Please Help me!\"\n\t\t$temp[$i][1]=explode(\"---\",preg_replace('/[^0-9a-z\\s\\`\\~\\!\\@\\#\\$\\%\\^\\*\\(\\)\\; \\,\\.\\'\\/\\_\\-]/i', '-',$pieces[$i][1])); //file() messes up with the \" - \", don't know. Tried on 2 different servers, both same. it changes it to some special char which hardens the job. Instead, I changed them to - char and join them to use with explode\n\t\t$pieces[$i][1]=trim($temp[$i][1][0]);\n\t\t//now $pieces[$i][1] is artist\n\t\t$pieces[$i][2]=substr($temp[$i][0],(strlen($pieces[$i][1])+4)); //4 , because \" - \" this makes 3 chars, and a file() shows - as a false character, and it makes one extra character, that's why it's 3+1=4\n\t\t//$pieces[$i][2] is now title\n \n\t\t//echo \"timestamp: \".$pieces[$i][0].\"
\";\n\t\t//echo \"artist: \".$pieces[$i][1].\"
\";\n\t\t//echo \"title: \".$pieces[$i][2].\"
\";\n\t\t$i++;\n\t}\n \nfor($j=0;$j<$i;$j++) { unset($temp[$j][0],$temp[$j][1]); } //for memory cleanup\n \nreturn $pieces; //either returns the array, or uncomment echo statements and change this to return true; for echoing. I prefer returning the array\n}","title":""},{"docid":"76f4b98555cae4372740651b92d3111b","score":"0.5680409","text":"public function getArtist() {\n\t\t\treturn $this->artist;\n\t\t}","title":""},{"docid":"9f31984700fcc3613ec546e993324c94","score":"0.56763595","text":"public function getTopFans($artist=\"\") {\n if (!$artist)\n return false;\n $url = \"http://ws.audioscrobbler.com/2.0/?method=artist.gettopfans\";\n $url .= \"&artist=\" . urlencode($artist);\n $url .= \"&limit=\" . self::MAX_FANS;\n $url .= \"&api_key=\" . self::API_KEY . \"&format=json\";\n $obj = json_decode(file_get_contents($url));\n if (isset($obj->error)) {\n return false;\n } else {\n return $obj;\n }\n }","title":""},{"docid":"52d58bb9d2914b2482aae6f0eb5be37f","score":"0.5673547","text":"function ListAlbums() {\n\t//THIS is not in use for my purposes KLY\n\tglobal $gp;\n\ttry {\n\t $userFeed = $gp->getUserFeed(\"default\");\n\t foreach ($userFeed as $userEntry) {\n\t echo $userEntry->title->text . \"
\\n\";\n\t }\n\t} catch (Zend_Gdata_App_HttpException $e) {\n\t echo \"Error: \" . $e->getMessage() . \"
\\n\";\n\t if ($e->getResponse() != null) {\n\t echo \"Body:
\\n\" . $e->getResponse()->getBody() .\n\t \"
\\n\";\n\t }\n\t // In new versions of Zend Framework, you also have the option\n\t // to print out the request that was made. As the request\n\t // includes Auth credentials, it's not advised to print out\n\t // this data unless doing debugging\n\t // echo \"Request:
\\n\" . $e->getRequest() . \"
\\n\";\n\t} catch (Zend_Gdata_App_Exception $e) {\n\t echo \"Error: \" . $e->getMessage() . \"
\\n\";\n\t}\n}","title":""},{"docid":"b54d0f10478b89313a2b11d129efd410","score":"0.5637695","text":"public function getFavorites()\n {\n return $this->get('1.1/favorites/list.json');\n }","title":""},{"docid":"a6a5408905f55ee4769acfda0203399c","score":"0.56357807","text":"function getOGAuthors();","title":""},{"docid":"aa2d03078adf780369d77a44265f80cc","score":"0.56293935","text":"public function getAll() {\r\n\t\tif (!$this->userController->isUserAdmin()) {\r\n\t\t\t$this->userController->index();\r\n\t\t} else {\r\n\t\t\t$artistArray = $this->dao->retrieveAll();\r\n\t\t\tinclude ADMIN_VIEWS . '/adminartist.php';\r\n\t\t}\r\n\t}","title":""},{"docid":"07edddb85180b071ec68c97283096aa1","score":"0.5614671","text":"public function artist_musicians() {\n return $this->hasMany('ArtistMusician');\n }","title":""},{"docid":"54be2a36547c2ca8661a8157946ac3d8","score":"0.5608186","text":"function get_artist($GroupID) {\n\t$Results = get_artists(array($GroupID));\n\treturn $Results[$GroupID];\n}","title":""},{"docid":"f821dd2d7054ff7ba28dd2b94250b8e1","score":"0.56065506","text":"public function getArtist($id);","title":""},{"docid":"59d2a1d18654f5b1cb9f55588528ee45","score":"0.560624","text":"public function getArtist($parameters = null)\n {\n return $this->getRelated('AlbumOrama\\Models\\Artists', $parameters);\n }","title":""},{"docid":"4c73b0d16c5a7c1731e48956b3e53653","score":"0.5597599","text":"public static function getArtist($name) {\n\t\t$result = file_get_contents(\"http://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&artist=\" . urlencode($name) . \"&autocorrect=1&format=json&limit=10&api_key=\" . self::API_KEY);\n\t\tif ($result !== false) {\n\t\t\t$artist = new Artist($name);\n\n\t\t\treturn $artist->setTopTracks(json_decode($result, true));\n\t\t}\n\t\treturn false;\n\n\t}","title":""},{"docid":"ee2c564e63ab7fdc9176db1d2cddc89e","score":"0.5586276","text":"abstract protected function getAlbumArtist(): string;","title":""},{"docid":"308f29bbf7096206ef5635d7428b8910","score":"0.5584955","text":"public function getAlbumsByArtist($artist) {\n $success = $this->_db->query(\"SELECT * FROM albums WHERE album_artist = ' $artist ' \");\n\n if ($success) {\n $albums = [];\n while ($row = $success->fetch_assoc()) {\n $albums[] = $row;\n }\n return $albums;\n }\n\n return NULL;\n }","title":""},{"docid":"ca5511be178170c7d1640ab21e6293b4","score":"0.5584499","text":"public function Recently_song()\r\n {\r\n $html = $this->LoadSite(\"http://www.eachamps.rw/recentlyadded\");\r\n $c = HtmlPageCrawler::create($html);\r\n $links = $c->filter('.songs-wid table .sng-img a');\r\n $data = array();\r\n for ($i = 0; $i < $links->length; $i++) {\r\n $link = $links->eq($i)->attr('href');\r\n array_push($data, $link);\r\n }\r\n return $data;\r\n }","title":""},{"docid":"0d0366dfc4ab75b552bc5becb3d6045c","score":"0.55573106","text":"public function viewArtist(){\n $result = $this->danceAdmin->getAllArtists();\n foreach ($result as $row){\n $data[] = array('id'=>$row->artist_id,'name'=>$row->name,'genre'=>$row->genre);\n }\n $this->view('danceAdmins/viewArtist',$data);\n }","title":""},{"docid":"d1260e30acca974058c44ce46e0640e6","score":"0.5540244","text":"public function artistAlbums($artist)\n {\n //procurar albums do artista\n $data = LastFm::searchArtistAlbum($artist);\n $searchError = LastFm::getErrorMsg($data);\n $obj = ($searchError) ? $searchError : $data->topalbums->album;\n\n return view('pages.music.artistAlbums')\n ->with(\"albums\", $obj)\n ->with(\"artist\", $artist);\n }","title":""},{"docid":"07973cdc35b30a9bfaaf9371a292f531","score":"0.5525384","text":"function getArtists() {\r\n\t$memc = new Memcached();\r\n\t$memc->addServer(\"localhost\", 11211) or die(\"Could not connect to memcached\");\r\n\t$artists = $memc->get(\"artists\");\r\n\tif($artists) {\r\n\t\techo \"\";\r\n\t\treturn $artists;\r\n\t} else {\r\n\t\t$sql = 'SELECT ArtistID, FirstName, LastName FROM Artists';\r\n\t\techo \"\";\r\n\t\t$result = DBQuery($sql);\r\n\t\ttry {\r\n\t\t\twhile($row = $result->fetch()) {\r\n\t\t\t\t$artists[$row['ArtistID']] = $row['FirstName'].' '.$row['LastName'];\r\n\t\t\t}\r\n\t\t\t$memc->set(\"artists\", $artists, 60);\r\n\t\t\treturn $artists;\r\n\t\t} catch (PDOException $e) {\r\n\t\t\tdie($e->getMessage());\r\n\t\t}\r\n\t}\r\n\t\r\n}","title":""},{"docid":"caa9f441f1377f2e5cfb1556afa4ea59","score":"0.5523972","text":"private function getpopular()\n {\n include_once \"../app/API/newdb.php\";\n $conn = getconn();\n $sql = \"SELECT * from metadata order by popularity desc limit 5\";\n $myres = array();\n $result = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($result)) {\n $item = array(\n 'id' => $row['id'],\n 'songName' => $row['songName'],\n 'albumName' => $row['albumName'],\n 'artists' => $row['artists'],\n 'releaseDate' => $row['releaseDate'],\n 'songImage' => $row['songImage'],\n 'genre' => $row['genre'],\n 'popularity' => $row['popularity']\n );\n\n array_push($myres, $item);\n }\n $conn->close();\n return $myres;\n }","title":""},{"docid":"29b10b606a5134aea1113786b72264af","score":"0.5522644","text":"function addArtists($c){\n\t$artists = array();\n\t$db = new DB($c['db_host'], $c['db_user'], $c['db_pass'], $c['db_name']);\n\t$sql = \"SELECT id, name from artist order by name asc\";\n\t\t$query = $db->query($sql);\n\t\twhile($row = $query->fetch_array()){\n\t\t\t$i = $row['id'];\n\t\t\t$n = $row['name'];\n\t\t\t$artists[] = new Artist($i,$n);\n\t\t}\n\t\t$db->close();\n\t\treturn $artists;\n}","title":""},{"docid":"4757f14f1ab5529dd01ba8d630602752","score":"0.5518958","text":"public function getTopAlbums($artist=\"\") {\n if (!$artist)\n return false;\n $url = \"http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums\";\n $url .= \"&artist=\" . urlencode($artist);\n $url .= \"&limit=\" . self::MAX_ALBUMS;\n $url .= \"&api_key=\" . self::API_KEY . \"&format=json\";\n $obj = json_decode(file_get_contents($url));\n if (isset($obj->error)) {\n return false;\n } else {\n return $obj;\n }\n }","title":""},{"docid":"f6a597929c72c1f393a6380cf6c4a517","score":"0.55085284","text":"private function artists_above_50() {\n\n//Make a master list as a single dimensional array\n$tmplist = explode(',', preg_replace('/(\\r\\n|[\\r\\n])/', ',', trim($this->file_contents)));\n\n//product the array of only the duplicates\n$duplicates_array = $this->array_not_unique($tmplist);\n\n//get a count for how many times each is duplicated\n$count_array = @array_count_values($duplicates_array);\t//supress warning with blank entries\n\n$dup_array = array();\n\n//Find all duplicate artists that are mentioned 50 times or more\nforeach ($count_array as $key => $value) {\nif ($value >= 50) {\n$dup_array[] = $key;\n}\n}\n\nreturn $dup_array;\n\n}","title":""},{"docid":"2247ab41c2831135d47168863fd9da32","score":"0.55033606","text":"function sr_rels_by_artist($args = array() , $show_artist = false)\r\n{\t\r\n\t$defaults = array(\r\n\t\t'artist' => '',\r\n\t\t'thumb_size' => 'thumbnail',\r\n\t\t'limit' => '6',\r\n\t\t'buy_now' => true,\r\n\t\t'exclude' => '',\r\n\t\t'aside' => false,\r\n\t\t'title' => false,\r\n\t);\r\n\t\r\n\t$options = array_merge($defaults , $args);\r\n\t\r\n\t$query_args = array(\r\n\t\t'post_type' => 'release' ,\r\n\t\t'post_status' => 'publish',\r\n\t\t'posts_per_page' => $options['limit'] ,\r\n\t\t'post__not_in' => array($options['exclude']),\r\n\t\t'orderby' => 'meta_value',\r\n\t\t'meta_key' => '_sr_release-date'\r\n\t);\r\n\tif ($options['artist'] != ''){\r\n\t\t$query_args['tax_query'] = array(\r\n\t\t\tarray(\r\n\t\t\t\t'taxonomy' => 'artist',\r\n\t\t\t\t'field' => 'id',\r\n\t\t\t\t'terms' => $options['artist']\r\n\t\t\t)\r\n\t\t);\r\n\t}\r\n\t$rel_query = new WP_query($query_args);\r\n\t$aside = $options['aside'];\r\n\tif($aside == false)\r\n\t{\r\n\t\tif ($options['title'] == true){\r\n\t\t\t$wrapper_o = '

Latest Releases

';\r\n\t\t}else{\r\n\t\t\t$wrapper_o = '
';\r\n\t\t}\r\n\t\t$wrapper_o .= '
';\r\n\t\t$wrapper_c = '
';\r\n\t\t$article_tag_o = '
';\r\n\t\t$article_tag_c = '
';\r\n\t}else{\r\n\t\t$wrapper_o = '';\r\n\t\t$article_tag_o = '
  • ';\r\n\t\t$article_tag_c = '
  • ';\r\n\t\t\r\n\t}\r\n\tif( $rel_query->have_posts() ):\r\n\t\techo $wrapper_o;\r\n\t\twhile ($rel_query->have_posts() ): $rel_query->the_post(); ?>\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\" rel=\"bookmark\">\r\n\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t
    \r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t

    \">

    ' . $release_date . '';\r\n\t\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\t\telseif($show_artist == true):\t\r\n\t\t\t\t\t\t\t\t\tsr_get_rels_artist($post->ID, false, 'h3');\r\n\t\t\t\t\t\t\tendif; ?>\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\t

    \r\n\t\t\t\t\t\t 0):\r\n\t\t\t\t\t\t\t$excerpt = sr_truncate($excerpt, 75, ' ');\r\n\t\t\t\t\t\t\techo $excerpt;\r\n\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\tglobal $review_mb;\r\n\t\t\t\t\t\t\t$meta = $review_mb->the_meta();\r\n\t\t\t\t\t\t\t$reviews = $meta['reviews'];\r\n\t\t\t\t\t\t\tif($reviews):\r\n\t\t\t\t\t\t\t\t$review_text = sr_truncate($reviews[0]['review-text'], 75, ' ');\r\n\t\t\t\t\t\t\t\techo $review_text;\r\n\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\tendif;\r\n\t\t\t\t\t?>\r\n\t\t\t\t\t\t

    \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t
    \r\n\t\t\t\t\t
    \r\n\t\t\t\t\tPreorder now';\r\n\t\t\t\t\t\t}else\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\techo 'Buy Now';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}?>\r\n\t\t\t\r\n\t\tdb->prepare(\"SELECT * FROM tracks\");\n //TODO add filter by user id WHERE (user_id = :user_id)\");\n //$stmt->bindParam(':user_id', $_SESSION['id']);\n $stmt->execute();\n $isFetchModeSet = $stmt->setFetchMode(PDO::FETCH_ASSOC);\n\n //we store the results in memory, might not be best for large results\n $allRows = $stmt->fetchAll();\n return $allRows;\n }","title":""},{"docid":"928827c6464e6cdc2a09809ffe3d55df","score":"0.5485443","text":"function sr_relart_loop_markup(&$artists = array()){\r\n\tglobal $post;\r\n\t$sr_post_class = '';\r\n\tif('artist' == get_post_type()){\r\n\t\t$sr_post_class = get_post_meta(get_the_ID(),'_sr_present-past',TRUE);\r\n\t\tif ($sr_post_class == 'past'){\r\n\t\t\t$meta_blob = 'Catalogue'; \r\n\t\t}else{\r\n\t\t\t$artist_status = null;\r\n\t\t\t$meta_blob = null;\r\n\t\t}\r\n\t}else{\r\n\t\t$artist_tax = get_the_terms( $post->ID, 'artist' );\r\n\t\tforeach($artist_tax as $artist){\r\n\t\t\t$artist = array('title' => $artist->name , 'class' => $artist->slug);\r\n\t\t\t$sr_post_class .= $artist['class'] . ' ';\r\n\t\t\tif(!in_array($artist , $artists)){\r\n\t\t\t\tarray_push($artists, $artist);\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t$sr_post_class .= ' fourcol fancy-roll';\r\n\t?>\r\n\t\r\n\t\" rel=\"bookmark\">\r\n\t\t\r\n\t\t
    \r\n\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t

    \r\n\t\t\t\t\tID , false);}?>\r\n\t\t\t\t
    \r\n\t\t\t\t
    \r\n\t\t\t\t\t 0):\r\n\t\t\t\t\t\t\t$excerpt = sr_truncate($excerpt, 250, ' ');\r\n\t\t\t\t\t\t\techo '

    ' . $excerpt . '

    ';\r\n\t\t\t\t\t\t\techo '
    read more
    ';\r\n\t\t\t\t\t\telse:\r\n\t\t\t\t\t\t\tglobal $review_mb;\r\n\t\t\t\t\t\t\t$meta = $review_mb->the_meta();\r\n\t\t\t\t\t\t\t$reviews = $meta['reviews'];\r\n\t\t\t\t\t\t\tif($reviews):\r\n\t\t\t\t\t\t\t\t$review_text = sr_truncate($reviews[0]['review-text'], 250, ' ');\r\n\t\t\t\t\t\t\t\techo '

    ' . $review_text . '

    ';\r\n\t\t\t\t\t\t\t\techo '
    read more
    ';\r\n\t\t\t\t\t\t\tendif;\r\n\t\t\t\t\t\tendif;\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\nsongs;\n }","title":""},{"docid":"3f7a2755868a2c14246125edb4a7a79c","score":"0.5482759","text":"public function getSimilarArtists($artist,$limit){\n\t\t$query = \"SELECT DISTINCT artist2 FROM correlation WHERE artist1 = '\".$artist.\"' ORDER BY correlation DESC LIMIT \".$limit;\n\t\t\n\t\t$result = mysql_query($query);\n\n\t\t$array = array();\n\t\twhile($row = mysql_fetch_array($result)){\n\t\t\t$array[]= $row;\n\t\t}\n\t\treturn $array;\n\t}","title":""},{"docid":"924e4802734340878ba5a71e9f9f5c4a","score":"0.54716617","text":"public function createArtistList()\n {\n $key = Config::get('key');\n $endpoint = Config::get('endpoint');\n $faceListUUID = Config::get('faceListUUID');\n\n $request = Http::withoutVerifying()->withHeaders([\n 'Content-Type' => 'application/json',\n 'Ocp-Apim-Subscription-Key' => $key\n ])->put(\"$endpoint/face/v1.0/largefacelists/$faceListUUID\", [\n 'name' => $faceListUUID,\n 'userData' => $faceListUUID,\n 'recognitionModel' => 'recognition_03',\n ]);\n\n try {\n return $request->getBody();\n } catch (HttpException $ex) {\n return $ex;\n }\n }","title":""},{"docid":"50e6a4966ccc127151e1b0c324d88e5f","score":"0.54670787","text":"public function testWillRetriveArtistWithMediumDetails()\n {\n $artist = $this->getSpotifyService()->lookupArtist(self::ARTIST_URI, 'album');\n\n // artist assertions\n $this->assertInstanceOf('PequenoSpotifyModule\\Item\\Artist', $artist);\n $this->assertEquals(self::ARTIST_URI, $artist->getUri());\n $this->assertEquals('Basement Jaxx', $artist->getName());\n $this->assertGreaterThanOrEqual(0.0, $artist->getPopularity());\n // albums assertions\n $this->assertNotEmpty($artist->getAlbums());\n $albums = $artist->getAlbums();\n /** @var $album \\PequenoSpotifyModule\\Item\\Album */\n $album = end($albums);\n $this->assertInstanceOf('PequenoSpotifyModule\\Item\\Album', $album);\n $this->assertEquals('spotify:album:7gljDo33wlUkdGGVwkKDMG', $album->getUri());\n $this->assertEquals('Atlantic Jaxx - A Compilation Vol 1', $album->getName());\n $this->assertNotEmpty($album->getTerritories());\n $this->assertEmpty($album->getReleased());\n $this->assertEmpty($album->getArtists());\n $this->assertEmpty($album->getExternalIds());\n $this->assertEmpty($album->getTracks());\n\n // album artist assertions\n $this->assertSame($artist, $album->getArtist());\n $this->assertEquals(self::ARTIST_URI, $album->getArtist()->getUri());\n $this->assertEquals('Basement Jaxx', $album->getArtist()->getName());\n $this->assertSame($artist->getAlbums(), $album->getArtist()->getAlbums());\n $this->assertEmpty($album->getArtist()->getPopularity());\n }","title":""},{"docid":"a9042e6dcfd9732f2263a519d1bdb237","score":"0.54587054","text":"public function getArtist()\n {\n if (! isset($this->artist)) {\n $this->artist = (($nodeList = $this->getXPath($this->getDomElement())->query($this->getArtistQuery(), $this->getDomElement())) && $nodeList->length)\n ? new \\MphpMusicBrainz\\Result\\Artist($this->getFactory()->getResultAdapter(\\MphpMusicBrainz\\Service\\MusicBrainz::RESOURCE_ARTIST, $nodeList->item(0)))\n : null;\n }\n return $this->artist;\n }","title":""},{"docid":"e084cb91e44fc0bb02d99e1e51c81f12","score":"0.5456722","text":"public function getLessListenedAlbum()\n {\n $allAlbums = $this->getUserAlbums();\n $album = $this->getRandomAlbums($allAlbums, 1);\n $chart = $this->request(self::USER_ALBUMS_CHART_URL.\"?access_token=\".$this->getAccessToken());\n $i = 0;\n $albumToSuggest = null;\n $topFiveAlbumsId = array();\n for($j = 0; $j < 5; $j++) {\n $topFiveAlbumsId[] = $chart['data'][$j]['id'];\n }\n while($albumToSuggest === null && $i < self::TRACKS_MAX_TRIES) {\n $i++;\n if(!in_array($album[0]->getDeezerId(), $topFiveAlbumsId)) {\n $albumToSuggest = $album[0];\n } else {\n $album = $this->getRandomAlbums($allAlbums['data'], 1);\n }\n }\n if(!isset($albumToSuggest)) {\n $albumToSuggest = $album[0];\n }\n\n return $albumToSuggest;\n }","title":""},{"docid":"2912e9c32a07f203b38e034d6c398b0c","score":"0.5456717","text":"public function searchArtists($query, $limit);","title":""},{"docid":"642915a31aa58d67198d8dc128e0e421","score":"0.54566914","text":"function hnd_artist_flyers() {\n\t$artist_title = get_the_title();\n\tadd_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\n \t$artist_events = new WP_Query( array(\n\t\t'post_type' => 'events',\n\t\t'order' => 'DESC',\n\t\t'posts_per_page' => -1,\n\t\t'artist_title' => $artist_title,\n\t) );\n\tremove_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\n\n\tif( isset( $artist_events ) && $artist_events->have_posts() ) {\n\t\t\n\t\t$flyer_ids = array();\n\t\t\n\t\t// build array of flyer ids\n\t\twhile( $artist_events->have_posts() ) : $artist_events->the_post();\n\t\t\tif( has_post_thumbnail() ) $flyer_ids[] = get_post_thumbnail_id();\n\t\tendwhile;\n\n\t\t// flyer gallery\n\t\tif( count( $flyer_ids ) ) {\n\t\t\t\n\t\t\t// default gallery\n\t\t\t#$shortcode = '[gallery ids=\"' . implode( ',', $flyer_ids ) . '\"]';\t\t\t\n\t\t\t\n\t\t\t// tiled columns\n\t\t\t#$shortcode = '[gallery type=\"columns\" link=\"file\" ids=\"' . implode( ',', $flyer_ids ) . '\"]';\t\t\t\n\t\t\t\n\t\t\t// tiled mosaic\n\t\t\t$shortcode = '[gallery type=\"rectangular\" link=\"file\" ids=\"' . implode( ',', $flyer_ids ) . '\"]';\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// only apply content filters to flyers\n\t\t\tremove_filter( 'the_content', 'hnd_event_content' );\n\t\t\techo apply_filters( 'the_content', $shortcode );\n\t\t\tadd_filter( 'the_content', 'hnd_event_content' );\n\t\t}\n\n\t} else {\n\t\techo '

    No Flyers Available


    '; \n\t\techo '

    Free free to send us any flyers we don\\'t already have!

    ';\n\t}\n\t\n\twp_reset_query();\t\n}","title":""},{"docid":"05b0cb87686e08b8ed7765b0a5cf9b4a","score":"0.5448923","text":"public function getArtistUrl()\n {\n return $this->_artistUrl;\n }","title":""},{"docid":"0d22a12d8f32d1c64627a5f87faaf7e9","score":"0.544498","text":"private function getSongs()\n {\n $song = new Song();\n $songs = $song->getWhere('deleted', 0);\n return $songs;\n }","title":""},{"docid":"49728bf4f6e34419684f7bcd86c946c5","score":"0.54408383","text":"private function favorite_tweets() {\n $json = $this->load_url('http://api.twitter.com/1/statuses/retweeted_by_me.json?count=10', '', FAVORITES_TWITTER_USER.':'.FAVORITES_TWITTER_PASS);\n \n $json = json_decode($json);\n \n $tweets = array();\n \n foreach ($json as $tweet) {\n $tweets[] = array(\n 'text' => (string) $tweet->retweeted_status->text,\n 'author' => (string) $tweet->retweeted_status->user->screen_name.' ('.$tweet->retweeted_status->user->name.')',\n 'author_url' => (string) 'http://twitter.com/'.$tweet->retweeted_status->user->screen_name,\n 'url' => (string) 'http://twitter.com/'.$tweet->retweeted_status->user->screen_name.'/statuses/'.$tweet->retweeted_status->id,\n 'avatar' => (string) $tweet->retweeted_status->user->profile_image_url,\n 'date' => (string) $tweet->retweeted_status->created_at\n );\n }\n \n return $tweets;\n }","title":""},{"docid":"17b3a325a7e8f77b35f7bbd8f9205757","score":"0.54170096","text":"public function albumInfo($artist, $album)\n {\n $data = LastFm::searchAlbumInfo($artist, $album);\n $searchError = LastFm::getErrorMsg($data);\n $obj = ($searchError) ? $searchError : $data->album;\n\n //more by this artist\n $moreByArtist = LastFm::searchArtistAlbum($artist, '', 20)->topalbums->album;\n //\n $x = 1;\n $more = [];\n $arrAlbumNames = [];\n while ( $x <= 5) {\n $rand = array_rand($moreByArtist);\n\n if( isset($moreByArtist[$rand]->name) )\n {\n\n if( $obj->name != $moreByArtist[$rand]->name )\n {\n if(!in_array($moreByArtist[$rand]->name, $arrAlbumNames))\n {\n array_push($more, $moreByArtist[$rand]);\n array_push($arrAlbumNames, $moreByArtist[$rand]->name);\n $x++;\n }\n }\n }\n }\n //\n\n return view('pages.music.albumInfo')\n ->with(\"album\", $obj)\n ->with(\"moreBy\", $more);\n }","title":""},{"docid":"f7350d6f57b9a00f22e374cdb1f070e6","score":"0.54096454","text":"public function getArtists($user, $limit = null, $page = null)\n {\n $response = $this->call(array(\n 'method' => 'library.getArtists',\n 'user' => $user,\n 'limit' => $limit,\n 'page' => $page\n ));\n\n $artists = array();\n if (!empty($response->artists->artist)) {\n foreach ($response->artists->artist as $artist) {\n $artists[] = LastfmModel\\Artist::createFromResponse($artist);\n }\n }\n\n return $artists;\n }","title":""},{"docid":"0168338d540ed1bf43a636fba0134e1d","score":"0.5396238","text":"function songsLists( $offset = 0 ){\n\n\t\treturn $this->Join('artist', function($join){\n\t\t\t\t\t\t$join->on('artist.id', '=', 'songs.artist');\n\t\t\t\t\t})\n\t\t\t\t\t->groupBy('artist.id')\n\t\t\t\t\t->take(Config::get('cms_config.limit'))\n\t\t\t\t\t->offset($offset)\n\t\t\t\t\t->get([\n\t\t\t\t\t\tDB::raw('artist.id'),\n\t\t\t\t\t\tDB::raw('artist.name'),\n\t\t\t\t\t\tDB::raw('count(songs.id) as number_of_songs')\n\t\t\t\t\t]);\n\t}","title":""},{"docid":"f3d21d126f633e8552fea9d05b39a65d","score":"0.5395225","text":"public static function getAllArtists($st_limit=0, $end_limit=10){\n global $db;\n $rs_arr = [];\n $query = \"SELECT *, profile_images.img_sm_path FROM users INNER JOIN profile_images \";\n $query .= \"ON users.id=profile_images.user_id WHERE(role=1) \";\n $query .= \"ORDER BY users.id DESC LIMIT {$st_limit}, {$end_limit}\";\n $rs = $db->query($query);\n if($rs && $db->num_rows($rs) > 0){\n while($row = $db->fetch_array($rs)){\n array_push($rs_arr, array(\n \"id\"=>$row[\"id\"],\n \"profile_image\"=>$row[\"img_sm_path\"],\n \"username\"=>$row[\"username\"],\n \"email\"=>$row[\"email\"],\n \"active_since\"=>$row[\"active_since\"],\n \"musical_style\"=>$row[\"musical_style\"],\n \"isBlocked\"=>$row[\"isBlocked\"],\n \"rank\"=>$row[\"rank\"],\n \"binHexCode\"=>$row[\"binHexCode\"],\n \"date_of_entry\"=>dateToString($row[\"date_of_entry\"])\n ));\n }\n }\n return ($rs_arr == null) ? null : $rs_arr;\n }","title":""},{"docid":"858f660d4dd4485dfd2c17c3a6ad801d","score":"0.53726083","text":"public function getArtista()\n {\n return $this->artista;\n }","title":""},{"docid":"49f5179d84aab69fe7bb6552b3278538","score":"0.53612804","text":"public function getSimilar($artist=\"\") {\n if (!$artist)\n return false;\n $url = \"http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar\";\n $url .= \"&artist=\" . urlencode($artist);\n $url .= \"&limit=\" . self::MAX_ARTISTS;\n $url .= \"&api_key=\" . self::API_KEY . \"&format=json\";\n $obj = json_decode(file_get_contents($url));\n if (isset($obj->error)) {\n return false;\n } else {\n return $obj;\n }\n }","title":""},{"docid":"0878736c939ac0794918f58132aca157","score":"0.53608674","text":"public function getArtista()\n {\n return $this->artista;\n }","title":""},{"docid":"cc692aacf88a2bccc0cf1a358f524199","score":"0.53525406","text":"function getArtistTotal(){\n\n\t\treturn $this->count();\n\n\t}","title":""},{"docid":"2f01f9984366306fa4eca29a536a452b","score":"0.53493553","text":"public function topStories(): array\n {\n $key = 'topstories-ids';\n if (Cache::has($key)) {\n $topStories = Cache::get($key);\n } else {\n $url = \"https://hacker-news.firebaseio.com/v0/topstories.json\";\n\n $client = new Client();\n\n try {\n $res = $client->get($url);\n } catch (ClientException $e) {\n dd($e);\n }\n $topStories = json_decode($res->getBody()->getContents());\n Cache::put($key, $topStories, now()->addMinutes($this->topStoriesTtl));\n }\n return $topStories;\n }","title":""},{"docid":"ce15d568162b0a93ca1f9d24ad7c007a","score":"0.534767","text":"public function show(Artist $artist)\n {\n return $artist;\n }","title":""},{"docid":"755addf7a842eb01fdfca2e6d4d55755","score":"0.5344165","text":"function getSong($level, $echonest, $i = 0)\n{\n if ($i > 100) {\n die('sorry, no song found');\n }\n\n $artist = findArtist($level, $echonest);\n\n $songs = $echonest->getSongApi()->search(array(\n 'artist_id' => $artist['id'],\n 'bucket' => array('id:spotify-WW', 'tracks')\n ));\n\n $songsWithTrx = array();\n\n foreach ($songs as $song) {\n\n if (count($song['tracks']) > 0) {\n foreach ($song['tracks'] as $i => $track) {\n $song['tracks'][$i]['foreign_id'] = preg_replace('~^spotify\\-WW~', 'spotify', $song['tracks'][$i]['foreign_id']);\n }\n\n $songsWithTrx[] = $song;\n }\n }\n\n $songs = $songsWithTrx;\n\n if (count($songs) == 0) {\n return getSong($level, $echonest, ++$i);\n }\n\n $rand = rand(0, count($songs) - 1);\n $song = $songs[$rand];\n $rand = rand(0, count($song['tracks']) - 1);\n\n return array(\n 'artist' => $artist,\n 'song' => $song['tracks'][$rand]\n );\n}","title":""},{"docid":"84be80ee4da5481d486e683553cab904","score":"0.5338183","text":"function getPlayHistory($for=false) {\n\t $for = jz_db_escape($for);\n\t $q = \"SELECT n.*,p.user FROM jz_playcounts p,jz_nodes n WHERE p.media_id=n.my_id\";\n\t if ($for){\n\t $q .= \" AND p.user='$for'\";\n\t }\n\t $q .= \" AND n.ptype='track' GROUP BY p.media_id ORDER BY max(date) desc LIMIT 25\";\n\t $res = jz_db_object_query($q);\n\n\t // TODO: include user info in result\n\t return $res;\n\t}","title":""},{"docid":"112265e6a2f88b59b79405fc92b1a549","score":"0.53277314","text":"public function favoritesAction()\n {\n $favorite = $this->getService('Model\\Favorite');\n $userId = $this->getService('Auth')->getIdentity()->id;\n return array('titles' => $favorite->all($userId));\n }","title":""},{"docid":"6429fdbf32c70a2322afc4ad7def7e64","score":"0.5321101","text":"public function getItemArtistAttribute()\n {\n if(!$this->artist_url && !$this->artist_id) return null;\n\n // Check to see if the artist exists on site\n $artist = checkAlias($this->artist_url, false);\n if(is_object($artist)) {\n $this->artist_id = $artist->id;\n $this->artist_url = null;\n $this->save();\n }\n\n if($this->artist_id)\n {\n return $this->artist->displayName;\n }\n else if ($this->artist_url)\n {\n return prettyProfileLink($this->artist_url);\n }\n }","title":""},{"docid":"fae453de80d04dad38f2aab8a1b0c87d","score":"0.5320939","text":"public function get_fluids()\n {\n return $this->fluids;\n }","title":""},{"docid":"ea44f89726de638ee0ccdb40d7d7411a","score":"0.5315851","text":"function scrap_url($artist, $song_name) {\n if(strpos($song_name,\"(\") > 0 ){\n $song_name = substr($song_name,0,strpos($song_name,\"(\")-1);\n }\n\n if(strpos($artist,\"feat\") > 0 ){\n $artist = substr($artist,0,strpos($artist,\"feat\"));\n }\n\n $artist = filer_var($artist);\n $song_name = filer_var($song_name);\n $artist = ucwords(str_replace(\" \",\"-\",$artist));\n $song_name = ucwords(str_replace(\" \",\"-\",$song_name));\n $url = sprintf('https://genius.com/%s-%s-lyrics',$artist,$song_name);\n $url = str_replace(\"--\",\"-\",$url);\n $lyrics = \"\";\n\n do{\n $lyrics = file_get_html($url)->plaintext;\n $start_index = strpos($lyrics,\"Verse\");\n $end_index =strpos($lyrics,\"Contributors\");\n $lyrics = substr($lyrics,$start_index,$end_index - $start_index);\n }while(strpos($lyrics,\"More on Genius\")>1);\n\n return $lyrics;\n }","title":""},{"docid":"7188b2032238220fe028c5ffb62f4e78","score":"0.5291484","text":"public function favorators();","title":""},{"docid":"a5c0819d36b47516e77df224b3807041","score":"0.5291047","text":"function songsAlbumLists( $offset = 0, $artistId = 0 ){\n\n\t\treturn $this->Join('albums', function($join){\n\t\t\t\t\t\t$join->on('albums.id', '=', 'songs.album');\n\t\t\t\t\t})\n\t\t\t\t\t->where('songs.artist', $artistId)\n\t\t\t\t\t->groupBy('albums.id')\n\t\t\t\t\t->take(Config::get('cms_config.limit'))\n\t\t\t\t\t->offset($offset)\n\t\t\t\t\t->get([\n\t\t\t\t\t\tDB::raw('albums.id'),\n\t\t\t\t\t\tDB::raw('albums.title'),\n\t\t\t\t\t\tDB::raw('albums.artworkPath'),\n\t\t\t\t\t\tDB::raw('count(songs.id) as number_of_songs')\n\t\t\t\t\t]);\n\t}","title":""},{"docid":"1aae5508a69df256a8fa5d6998c93e77","score":"0.5282606","text":"function SERVICE_GETALBUMMETADATA_yahoo($node, $displayOutput = true, $return = false) {\n\t\tglobal $include_path;\n\t\t\n\t\t// Ok, now we need to see if we are reading a album or an artist\n\t \t$album = $node->getName(); \n\t\t$parent = $node->getParent();\n\t\t$artist = $parent->getName();\n\t\t\t\t\n\t\tinclude_once($include_path. \"lib/snoopy.class.php\");\n\t\t\n\t\t// First let's get the artist page\n\t\t$snoopy = new Snoopy;\n\t\t$snoopy->fetch(\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\". urlencode($album));\n\t\t$contents = $snoopy->results;\n\t\tunset($snoopy);\n\t\t\n\t\t// Did we get anything?\n\t\tif (stristr($contents,\"no matches found\")){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Now let's fix up the name\n\t\t$albumName = str_replace(\"&\",\"&amp;\",$album);\n\t\t$artist = str_replace(\"&\",\"&amp;\",$artist);\n\t\t\n\t\t// Ok, now let's see if we got a direct hit or a link\n\t\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\n\t\t\t// Ok, we missed let's try to mangle the name and try again?\n\t\t\t$album = trim(substr($album,0,strpos($album,\" -\")));\n\t\t\t$snoopy = new Snoopy;\n\t\t\t$snoopy->fetch(\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\". urlencode($album));\n\t\t\t$contents = $snoopy->results;\n\t\t\tunset($snoopy);\n\t\t}\n\t\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\n\t\t\t// Ok, we missed let's try to mangle the name and try again?\n\t\t\t$album = trim(substr($album,0,strpos($album,\"[\")));\n\t\t\t$snoopy = new Snoopy;\n\t\t\t$snoopy->fetch(\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\". urlencode($album));\n\t\t\t$contents = $snoopy->results;\n\t\t\tunset($snoopy);\n\t\t}\n\t\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\n\t\t\t// Ok, we missed let's try to mangle the name and try again?\n\t\t\t$album = trim(substr($album,0,strpos($album,\"(\")));\n\t\t\t$snoopy = new Snoopy;\n\t\t\t$snoopy->fetch(\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\". urlencode($album));\n\t\t\t$contents = $snoopy->results;\n\t\t\tunset($snoopy);\n\t\t}\n\t\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\n\t\t\treturn false;\n\t\t}\n\n\t\t// Now let's move up to the artist and back\n\t\t$link = substr($contents,strpos($contents,$artist)-300);\n\t\t$link = substr($link,strpos($link,\"\")){\n\t\t\t$link = substr($link,0,strpos($link,'>'));\n\t\t}\n\t\t\n\t\t// Now let's get that page\n\t\t$contents = @file_get_contents($link);\n\t\t\n\t\t// Now let's get the image\n\t\t$contents = substr($contents,strpos($contents,'onClick=\"ext_link'));\n\t\t$contents = substr($contents,strpos($contents,'Album Release Date')-400);\n\t\t$image = substr($contents,strpos($contents,''));\n\t\t\n\t\tif (!$return){\n\t\t\twriteAlbumMetaData($node, $year, $image, false, false, false, false, false, $displayOutput);\n\t\t} else {\n\t\t\tif ($return == \"array\"){\n\t\t\t\t$retArr['year'] = $year;\n\t\t\t\t$retArr['image'] = $image;\n\t\t\t\t$retArr['review'] = false;\n\t\t\t\t$retArr['rating'] = false;\n\t\t\t\t\n\t\t\t\treturn $retArr;\n\t\t\t} else {\n\t\t\t\treturn $$return;\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"c9d84edadd21842b82d6abb05e2a6c3d","score":"0.52769315","text":"function fetch_flickr() {\n\t$theme_options = get_option(THEME_OPTIONS_NAME);\n\tif ( (in_array('flickr', $theme_options['enabled_services'])) && ($theme_options['hashtags']) ) {\n\t\t$max \t= is_numeric($theme_options['flickr_max_results']) ? $theme_options['hashtags'] : 20; // fallback check for valid max #\n\t\t\n\t\tadd_filter( 'wp_feed_cache_transient_lifetime' , 'cache_reset' );\t\t\n\t\t$feed \t= fetch_feed('http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tagmode=ANY&'.build_hashtag_query('tags'));\n\t\tremove_filter( 'wp_feed_cache_transient_lifetime' , 'cache_reset' );\n\t\t\n\t\tif (!is_wp_error($feed)) { \n\t\t\t// Figure out how many total items there are, but limit it to the max number set. \n\t\t\t$total = $feed->get_item_quantity($max); \n\t\t\t// Build an array of all the items, starting with element 0 (first element).\n\t\t\t$items = $feed->get_items(0, $total);\n\t\t\t\n\t\t\treturn $items;\n\t\t}\n\t\telse { return 'Error in generating Flickr feed object'; }\n\t}\n}","title":""}],"string":"[\n {\n \"docid\": \"fafbf95d6ff8f6816791b4f9cb0f0b34\",\n \"score\": \"0.704185\",\n \"text\": \"public function GetAllArtist()\\r\\n {\\r\\n $html = $this->LoadSite(\\\"http://www.eachamps.rw/audios\\\");\\r\\n $c = HtmlPageCrawler::create($html);\\r\\n $links = $c->filter('.tabcontents #view2 .scroll-pane .panel-default .list-group .list-group-item a');\\r\\n $data = array();\\r\\n for ($i = 0; $i < $links->length; $i++) {\\r\\n $info = array();\\r\\n $info['artist'] = $links->eq($i)->html();\\r\\n $info['link'] = $links->eq($i)->attr('href');\\r\\n //$info['info'] = $this->ArtistDetails($links->eq($i)->attr('href'));\\r\\n array_push($data, $info);\\r\\n }\\r\\n return $data;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67b781a51969d98814d0157cadc789c0\",\n \"score\": \"0.6972261\",\n \"text\": \"public function getArtists()\\n {\\n // return artists\\n return (array) $this->artists;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58b40d631cf3154c758e28edfed67012\",\n \"score\": \"0.6851953\",\n \"text\": \"public function getAllArtists()\\r\\n\\t{\\r\\n\\t$artists = $this->select('*', 'artists');\\r\\n\\treturn $artists;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a8798831cf45ab2e1ae66899c732f7fd\",\n \"score\": \"0.67795706\",\n \"text\": \"public static function artists()\\n {\\n return \\\"discogs:artists\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d861df88975670501d59c96044ea934f\",\n \"score\": \"0.6703048\",\n \"text\": \"public function getArtist()\\r\\n {\\r\\n if (!empty($this->_tags['artists']))\\r\\n return $this->_tags['artist'];\\r\\n else return ;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e46958a02edb04173755a6eea732da29\",\n \"score\": \"0.6502736\",\n \"text\": \"public function getArtists($artist){\\n\\t\\t$data['artist_name'] = $artist;\\n\\t\\t//Get Artist information\\n\\t\\t$data['artist_cover'] = Comicbooks::artists($artist)\\n\\t \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t->select('cover_image')\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t->orderBy('published_date', 'asc')\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t \\t->distinct()->get();\\n\\t\\t$data['artist_works'] = Comicbooks::artists($artist)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t ->select('book_name')\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t ->orderBy('published_date', 'asc')\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t ->distinct()->get();\\n\\n\\t \\t//Check to see if artist exist in database. If it doesn't Redirect to a wiki page\\n\\t $data['has_artist'] = (count($data['artist_works'])) ? true : false;\\n\\t\\tif (!$data['has_artist']) {\\n\\t\\t\\treturn Redirect::away(\\\"http://en.wikipedia.org/wiki/\\\".ucwords($artist));\\n\\t\\t}\\n\\t\\t$this->layout->content = View::make('artist', $data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d55771dbc76b0f3f603682c538f05d65\",\n \"score\": \"0.6498086\",\n \"text\": \"function WOLFARTISTS() {\\n\\treturn Wolf_Artists::instance();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e19adff16fd3b0ea7b047877fcf0559\",\n \"score\": \"0.63691163\",\n \"text\": \"public function getArtists($id)\\n {\\n \\n // skladanka, gdzie chcemy wziac artist (album artist mamy v/a wtedy)\\n // plyta producencka, gdzie chcemy wziac feat\\n // normalna plyta gdzie wykonawca jest autor plyty (ale nie mamy jak odroznic od producenckiej)\\n \\n // moze jako wykonawce traktowac zawsze album artist, ale dawac w nawiasie feat ?\\n // hhbd.pl/Dj 600v/_/Merctedes (feat. Tede),4581.html\\n // hhbd.pl/VA/Letnie hity 2010/Merctedes (feat. Tede),4581.html\\n $artists = new Jkl_List();\\n //set feat as artist\\n $featuring = Model_Artist_Api::getInstance()->getSongFeaturing($id);\\n foreach ($featuring->items as $key => $value) {\\n $artists->add($value);\\n }\\n \\n //if empty \\n //get list of albums\\n // seat first album artist not v/a as artist\\n if (sizeof($artists->items) < 1) {\\n $featured = Model_Album_Api::getInstance()->getSongAlbums($id, null);\\n foreach ($featured->items as $key => $value) {\\n if ($value->artist->name != 'V/A') {\\n $artists->add($value->artist);\\n } \\n }\\n }\\n \\n // if still empty\\n // set song's artist\\n if (sizeof($artists->items) < 1) {\\n $artist = Model_Artist_Api::getInstance()->getSongArtist($id); \\n foreach ($featured->items as $key => $value) {\\n $artists->add($value);\\n }\\n }\\n return $artists; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dac397de04eb120c416974b67154c6ef\",\n \"score\": \"0.6366875\",\n \"text\": \"function artistLists( $offset = 0 ){\\n\\n\\t\\treturn $this->take(Config::get('cms_config.limit'))\\n\\t\\t\\t\\t\\t->offset($offset)\\n\\t\\t\\t\\t\\t->get();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a19cfe861e20153e83667c799c5319c\",\n \"score\": \"0.6365595\",\n \"text\": \"public function populateMusicArtists($artist)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$strtoarray = explode(',',$artist);\\n\\t\\t\\t\\t$artist = array_pop($strtoarray);\\n\\t\\t\\t\\t$sql = 'SELECT artist_name, '.\\n\\t\\t\\t\\t\\t\\t'(CASE WHEN `artist_name` LIKE \\\\''.$artist.'%\\\\' THEN 1 ELSE 0 END) AS relevance1, '.\\n\\t\\t\\t\\t\\t\\t'(CASE WHEN `artist_name` LIKE \\\\'%'.$artist.'%\\\\' THEN 1 ELSE 0 END) AS relevance2 '.\\n\\t\\t\\t\\t\\t\\t' FROM '.$this->CFG['db']['tbl']['music_artist'].\\n\\t\\t\\t\\t\\t\\t' WHERE artist_name LIKE \\\\'%'.$artist.'%\\\\''.\\n\\t\\t\\t\\t\\t\\t' AND music_artist_id!=1'.\\n\\t\\t\\t\\t\\t\\t' ORDER BY relevance1 DESC, relevance2 DESC';\\n\\n\\t\\t\\t\\t$stmt = $this->dbObj->Prepare($sql);\\n\\t\\t\\t\\t$rs = $this->dbObj->Execute($stmt, array());\\n\\t\\t\\t if (!$rs)\\n\\t\\t\\t\\t trigger_error($this->dbObj->ErrorNo().' '.\\n\\t\\t\\t\\t\\t\\t$this->dbObj->ErrorMsg(), E_USER_ERROR);\\n\\n\\t\\t\\t\\tif(!$rs->PO_RecordCount())\\n\\t\\t\\t\\t\\treturn false;\\n\\n\\t\\t\\t\\t$artist_name = array();\\n\\t\\t\\t\\twhile($row = $rs->FetchRow())\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$artist_name[] = trim($row['artist_name']);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn $artist_name;\\n\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9bbaa13b47b25b22bc6860e577a0814f\",\n \"score\": \"0.63458663\",\n \"text\": \"public function getArtistSearchResult()\\n {\\n return $this->artistSearchResult;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5bcd185617e7e1d518f93304013d5a93\",\n \"score\": \"0.614506\",\n \"text\": \"function getArtistInfo($artist, $api){\\n $album_list = array();\\n $xml_request_url = 'http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist='.$artist.'&api_key='.$api;\\n $xml = new SimpleXMLElement($xml_request_url, null, true);\\n if($xml->topalbums->album){\\n $artist_info['album_list'] = array();\\n foreach($xml->topalbums as $value){\\n foreach($value->album as $test){\\n array_push($album_list,'url.'\\\">'.$test->name.'');\\n }\\n }\\n }\\n if($xml->artist->bio->summary){\\n $artist_info['summary'] = $xml->artist->bio->summary;\\n $artist_info['info'] = $xml->artist->bio->content;\\n }\\n return $artist_info;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7d22be55b142ba9d7caa52c90381843\",\n \"score\": \"0.6105338\",\n \"text\": \"public function getTopTags($artist=\\\"\\\") {\\n if (!$artist)\\n return false;\\n $url = \\\"http://ws.audioscrobbler.com/2.0/?method=artist.gettoptags\\\";\\n $url .= \\\"&artist=\\\" . urlencode($artist);\\n $url .= \\\"&limit=\\\" . self::MAX_TAGS;\\n $url .= \\\"&api_key=\\\" . self::API_KEY . \\\"&format=json\\\";\\n $obj = json_decode(file_get_contents($url));\\n if (isset($obj->error)) {\\n return false;\\n } else {\\n return $obj;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d33d296dd90b27db256769b1c66ddb1d\",\n \"score\": \"0.6102792\",\n \"text\": \"function get_artist()\\r\\n {\\r\\n return $this->get_additional_property(self :: PROPERTY_ARTIST);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9683c78056ccd61b073012c074947930\",\n \"score\": \"0.6096452\",\n \"text\": \"public function getArtistSearchResultInfo()\\n {\\n return $this->artistSearchResultInfo;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5be8557e3eb8beaf6c23f364e42550e\",\n \"score\": \"0.60147697\",\n \"text\": \"function queryArtworkArtistInfo($art){\\n $artworkQuery;\\n $artistArtworkQuery;\\n $artistNames;\\n $artistQuery;\\n $result;\\n\\n if(is_array($art)){\\n // build main image artist name (by querying ARTWORK with artworkReferenceNo in the EXHIBITION table)\\n if($artworkQuery = queryReference('ARTWORK', 'ArtworkID', $art['ArtworkID'])){\\n\\n // check if artist_artwork table gets referenced\\n if($artistArtworkQuery = queryReference('ARTIST_ARTWORKS', 'ArtworkID', $artworkQuery[0]['ArtworkID'])){\\n\\n // build the artistNames string\\n $artistNames =\\\"\\\";\\n\\n // loop through the artwork query\\n foreach($artistArtworkQuery as $artist){\\n\\n // query the ARTIST table with corresponding ID\\n if($artistsQuery = queryReference('ARTIST', 'ArtistID', $artist['ArtistID'])){\\n\\n // build name and concatenate each return string\\n $artistNames .= buildArtistName($artistsQuery[0]);\\n\\n }\\n }\\n }\\n }\\n \\n $result = array(\\\"artwork\\\" => $artworkQuery, \\\"artists\\\" => $artistNames);\\n }\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4381bf7d94e787e87b6b7bcd2ae77bf\",\n \"score\": \"0.60025483\",\n \"text\": \"public function artists() {\\n return $this->belongsToMany('Artist', 'artist_musician');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"414a402f8766349b7b4ee0d6e31a3489\",\n \"score\": \"0.5995856\",\n \"text\": \"private function getrecenttracks()\\n {\\n include_once \\\"../app/API/newdb.php\\\";\\n $conn = getconn();\\n $sql = \\\"SELECT * FROM metadata ORDER BY STR_TO_DATE(releaseDate,'%Y-%c-%e') DESC limit 5\\\";\\n $myres = array();\\n $result = mysqli_query($conn, $sql);\\n while ($row = mysqli_fetch_assoc($result)) {\\n $item = array(\\n 'id' => $row['id'],\\n 'songName' => $row['songName'],\\n 'albumName' => $row['albumName'],\\n 'artists' => $row['artists'],\\n 'releaseDate' => $row['releaseDate'],\\n 'songImage' => $row['songImage'],\\n 'genre' => $row['genre'],\\n 'popularity' => $row['popularity']\\n );\\n\\n array_push($myres, $item);\\n }\\n $conn->close();\\n return $myres;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"132e4ff1bd27555915613e2c502e4c4d\",\n \"score\": \"0.5983257\",\n \"text\": \"function list_artist()\\n {\\n // Recupération des artistes pour les options du select \\n $artist = new Artist();\\n $row_artiste = $artist->details_artist();\\n return $row_artiste;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa346369caf563c46de95c633535f080\",\n \"score\": \"0.5971614\",\n \"text\": \"function getArtist()\\n\\t{\\n\\t\\treturn $this->_artist;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a5d1e265f60cc85874ca1b7203db6bc\",\n \"score\": \"0.5960267\",\n \"text\": \"public function getSongsbyArtist($artist) {\\n // create null artist\\n $searchArtist[] = null;\\n // Loop through the songs array\\n foreach ($this->songs as $value) {\\n // Check the value of the current items properties in the array to see if they match the artist we are looking for\\n if($value->artist == $artist){\\n //if the artist does match the one we are looking for, push it to the search artist array and echo values\\n array_push($searchArtist, $value);\\n echo $value . \\\"\\\\n\\\";\\n }\\n }\\n //return print_r($searchArtist);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"777dda2e937d2e0e21d1db1244c70b36\",\n \"score\": \"0.5953435\",\n \"text\": \"public function refreshArtistList()\\n {\\n $key = Config::get('key');\\n $endpoint = Config::get('endpoint');\\n $faceListUUID = Config::get('faceListUUID');\\n\\n Http::withoutVerifying()->withHeaders([\\n 'Content-Type' => 'application/json',\\n 'Ocp-Apim-Subscription-Key' => $key\\n ])->post(\\\"$endpoint/face/v1.0/largefacelists/$faceListUUID/train\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c820a4f9c319048b3d2740420ad4984\",\n \"score\": \"0.5948619\",\n \"text\": \"function getLatestSongs() {\\n\\t\\t$songs = json_decode( $this->fetchLatest()->getBody()->getContents(), true );\\n\\n\\t\\t$this->parseSongs( $songs );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"744f38014c7467806bafe5b0ea227f48\",\n \"score\": \"0.5936104\",\n \"text\": \"public function index()\\n {\\n return Artist::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f12a09e66ae9b341e3ce5595aba8cc95\",\n \"score\": \"0.5922935\",\n \"text\": \"public function getArtist(){\\n return $this->artist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ffa0148f98c569db127d73b1e06bd8d\",\n \"score\": \"0.5901701\",\n \"text\": \"public function getArtist() {\\n $artist = $this->_getTrack()->getArtist();\\n if ($artist == null) {\\n $artist = $this->_getTrack()->getAlbum()->getProduct()->getMytunesArtist();\\n }\\n return $artist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"569c8eb4871edfed002864d67cd575c0\",\n \"score\": \"0.58981055\",\n \"text\": \"public function MakeArtistAdvancedSearch(){\\n\\t\\t//get all artists\\n\\t\\t$artist =$this->DanceRepository->GetArtists();\\n\\t\\t$artistsSearchlist = \\\"\\\";\\n\\t\\t// foreach artist make a checkbox \\n\\t\\tforeach ($artist as $artist) {\\n\\t\\t\\t$artistsSearchlist .= \\\"
    \\\";\\n\\t\\t}\\n\\t\\t//return all artists checkboxes\\n\\t\\treturn $artistsSearchlist;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a547d449350f21b203fdce3d957363b8\",\n \"score\": \"0.5883599\",\n \"text\": \"public function getArtist()\\n {\\n return $this->artist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a547d449350f21b203fdce3d957363b8\",\n \"score\": \"0.5883599\",\n \"text\": \"public function getArtist()\\n {\\n return $this->artist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a547d449350f21b203fdce3d957363b8\",\n \"score\": \"0.5883599\",\n \"text\": \"public function getArtist()\\n {\\n return $this->artist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a547d449350f21b203fdce3d957363b8\",\n \"score\": \"0.5883599\",\n \"text\": \"public function getArtist()\\n {\\n return $this->artist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebcd15b367520aad46e9ffa9803d2577\",\n \"score\": \"0.58790743\",\n \"text\": \"function sr_artist_tracks($artist)\\r\\n{\\t\\r\\n\\t$tracks = array();\\r\\n\\tglobal $tracks_mb;\\r\\n\\t$meta = $tracks_mb->the_meta();\\r\\n\\t$trackmeta = $meta['tracks'];\\r\\n\\t\\r\\n\\tif($trackmeta){\\r\\n\\t\\tforeach ($trackmeta as $track){\\r\\n\\t\\t\\t$track = $track['track-link'];\\r\\n\\t\\t\\tif (!in_array($track , $tracks)){\\r\\n\\t\\t\\t\\tarray_push($tracks, $track);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t} \\r\\n\\t$args = $rel_args = array('post_type' => 'release' , 'artist' => $artist , 'posts_per_page' => '-1');\\r\\n\\t$rel_query = new WP_query($rel_args);\\r\\n\\t\\t\\r\\n\\tif(have_posts()): while ( $rel_query->have_posts() ) : $rel_query->the_post();\\r\\n\\t\\r\\n\\t\\t$meta = $tracks_mb->the_meta();\\r\\n\\t\\t$trackmeta = $meta['tracks'];\\r\\n\\t\\r\\n\\t\\tif($trackmeta){\\r\\n\\t\\t\\tforeach ($trackmeta as $track){\\r\\n\\t\\t\\t\\t$track = $track['track-link'];\\r\\n\\t\\t\\t\\tif (!in_array($track , $tracks)){\\r\\n\\t\\t\\t\\t\\tarray_push($tracks, $track);\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t} \\r\\n\\t\\r\\n\\tendwhile; endif; wp_reset_query();\\r\\n\\t\\r\\n\\t$tracks_count = count($tracks);\\r\\n\\tif($tracks_count > 7){\\r\\n\\t\\t$tracks = array_slice($tracks, 0, 7);\\r\\n\\t}\\r\\n\\tif(!empty($tracks)){\\r\\n\\t\\techo '';\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1640313410df2f6623bf0d2f97ad804f\",\n \"score\": \"0.58760655\",\n \"text\": \"function sr_get_rels_artist($postID , $link = true, $tag = 'h2'){\\r\\n\\r\\n\\t$artist_terms = get_the_terms( $postID, 'artist' );\\r\\n\\t$artists = array();\\r\\n\\tforeach ($artist_terms as $artist_term)\\r\\n\\t{\\t\\r\\n\\t\\tarray_push($artists, $artist_term->term_id);\\r\\n\\t}\\r\\n\\t$artists_titles = array();\\r\\n\\tforeach ($artist_terms as $artist_term)\\r\\n\\t{\\t\\r\\n\\t\\t$artist_title = get_page_by_title($artist_term->name , OBJECT, 'artist');\\r\\n\\t\\t$artist_title = array('title' => $artist_title->post_title, 'guid' => $artist_title->guid);\\r\\n\\t\\tarray_push($artists_titles, $artist_title);\\r\\n\\t}\\r\\n\\t\\r\\n\\t$artists_titles_count = count($artists_titles);\\r\\n\\techo '<'. $tag .' class=\\\"entry-artists\\\">';\\r\\n\\tif($artists_titles_count <= 2):\\r\\n\\t\\tforeach($artists_titles as $artist_title): ?>\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\\" title= \\\"More about \\\">\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t \\r\\n\\t\\tVarious Artists\\r\\n\\t';\\r\\n\\treturn $artists;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd8e3941d91ab65647bf45edde3e0daa\",\n \"score\": \"0.58757293\",\n \"text\": \"public static function artistsIgnore()\\n {\\n return \\\"discogs:artists:ignore\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edafdf8f67f90bf0896cfdf88303344a\",\n \"score\": \"0.58636916\",\n \"text\": \"public function getDisplayArtist()\\n {\\n return $this->displayArtist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57fc54f76c643e6f901d3b08c6c4bbff\",\n \"score\": \"0.5843973\",\n \"text\": \"public function getArtists()\\n {\\n\\n try {\\n\\n //search the token\\n $em = $this->getDoctrine()->getEntityManager();\\n $oArtistRepo = $em->getRepository(Artist::class);\\n\\n $oArtists = $oArtistRepo->findAll();\\n\\n if (empty($oArtistRepo))\\n throw new \\\\Exception('No artists found');\\n\\n //package to return\\n $arrArtist = array_map(function($oArtist) {\\n return $oArtist->getSerializedArtist();\\n }, $oArtists );\\n\\n $response = ['result' => self::SUCCESS_RESPONSE, 'message' => 'success', 'data' => $arrArtist];\\n } catch (\\\\Exception $ex) {\\n $response = ['result' => self::NOT_SUCCESS_RESPONSE, 'message' => $ex->getMessage(), 'data' => ''];\\n }\\n\\n return $this->json($response);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf324adea6fd1ec1db81be15ba16f1d5\",\n \"score\": \"0.5842245\",\n \"text\": \"protected function getArtistQuery()\\n {\\n return $this->artistQuery;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f46ddaa80713065377c2d813f7edc964\",\n \"score\": \"0.58234257\",\n \"text\": \"function fetch_ijlastfm_data($username = 'just_in_time90',$trackNum = 3,$showArt = 1,$showUI = 1,$useReturn = 0){\\n$options = get_option(\\\"ij_lastfm_widget\\\");\\nlibxml_use_internal_errors(true);\\nif (!is_array($options))\\n{\\n$options = array(\\n\\t\\t'title' => 'Last.fm Recently Played',\\n\\t\\t'username' => 'just_in_time90',\\n\\t\\t'trackNum' => '3',\\n\\t\\t'showArt' => '1',\\n\\t\\t'showUI' => '1',\\n\\t\\t'profileLink' => 'View My Profile'\\n );\\n}\\nif(false === ($latest = get_transient('ij_lastfm_widget_'.$username))){\\n$request_url = \\\"http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=\\\".$username.\\\"&limit=50&api_key=f02d8c8d50cd86d57bed580b6c6aeda3\\\";\\n$ch = curl_init();\\n$timeout = 5;\\ncurl_setopt($ch, CURLOPT_URL, $request_url);\\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\\n$latest = curl_exec($ch);\\ncurl_close($ch);\\nset_transient('ij_lastfm_widget_'.$username, $latest, 60);\\n}\\nif(false === ($ui = get_transient('ij_lastfm_widget_uinfo_'.$username))){\\n$request_url = \\\"http://ws.audioscrobbler.com/2.0/?method=user.getinfo&user=\\\".$username.\\\"&api_key=f02d8c8d50cd86d57bed580b6c6aeda3\\\";\\n$ch = curl_init();\\n$timeout = 5;\\ncurl_setopt($ch, CURLOPT_URL, $request_url);\\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);\\n$ui = curl_exec($ch);\\ncurl_close($ch);\\nset_transient('ij_lastfm_widget_uinfo_'.$username, $ui, 60);\\n}\\n\\n$latest = new SimpleXMLElement($latest);\\n$ui = new SimpleXMLElement($ui);\\nif($latest->xpath('//track')){\\n//gather user info\\n$upic = $ui->user->image[1];\\n$username = $ui->user->name;\\n$playcount = $ui->user->playcount;\\n$timejoin = $ui->user->registered['unixtime'];\\n$fromCountry = $ui->user->country;\\n\\n$theTracks = \\\"\\\";\\n\\nif($showUI==1){\\n$theTracks = $theTracks.\\\"
    \\\";\\nif($upic!=''){\\n$theTracks = $theTracks.\\\"\\\\\\\"Profile\\\";\\n}\\n//determin link text\\nif($options['profileLink'] == \\\"\\\")\\n{\\n$profileLink = \\\"View My Profile\\\";\\n}else{\\n$profileLink = $options['profileLink'];\\n}\\n$theTracks = $theTracks.\\\"\\\".$username.\\\"\\\";\\n$theTracks = $theTracks.\\\"\\\".$profileLink.\\\"\\\";\\n$theTracks = $theTracks.\\\"\\\".$playcount.\\\" plays since \\\".date(\\\"F j Y\\\",(int)$timejoin).\\\"\\\";\\n$theTracks = $theTracks.\\\"
    \\\";\\n}\\n$i=0;\\nforeach($latest->xpath('//track') as $track){\\n//get all the info\\n\\t$title = $track->xpath('//name');\\n\\t$title = $title[$i];\\n\\t$nowPlaying = $track->xpath('//track/@nowplaying');\\n\\t$datePlayed = $track->xpath('//date/@uts');\\n\\t$albumArt = $track->xpath('//image[@size=\\\"medium\\\"]');\\n\\t$artist = $track->xpath('//artist');\\n//create the DIV\\n$theTracks = $theTracks.\\\"
    \\\";\\n\\tif($showArt==1){\\n//do we want to show album art?\\n\\tif($albumArt[$i] != \\\"\\\"){\\n\\t$theTracks = $theTracks.\\\"Album Art for \\\".$title.\\\"\\\";\\n\\t}else{\\n\\t$theTracks = $theTracks.\\\"No Album Art Available\\\";\\n\\t}\\n\\t$theTracks = $theTracks.\\\"\\\".$title.\\\"\\\";\\n\\t$theTracks = $theTracks.\\\"\\\".$artist[$i].\\\"\\\";\\n\\t//lets see if this song is currently playing...\\n\\tif($nowPlaying[$i] != \\\"\\\"){\\n\\t$theTracks = $theTracks.\\\"now playing!\\\";\\n\\t}else{\\n\\t$theTracks = $theTracks.\\\"\\\".human_time_diff($datePlayed[$i]).\\\" ago\\\";\\n\\t}\\n\\t}else{\\n\\t$theTracks = $theTracks.\\\"\\\".$title.\\\"\\\";\\n\\t$theTracks = $theTracks.\\\"\\\".$artist[$i].\\\"\\\";\\n\\t//lets see if this song is currently playing...\\n\\tif($nowPlaying[$i] != \\\"\\\"){\\n\\t$theTracks = $theTracks.\\\"now playing!\\\";\\n\\t}else{\\n\\t$theTracks = $theTracks.\\\"\\\".human_time_diff($datePlayed[$i]).\\\" ago\\\";\\n\\t}\\n}\\n\\t$i++;\\n$theTracks = $theTracks.\\\"
    \\\";\\n\\tif($i == $trackNum){break;};\\n\\tif($i == 50){break;};\\n}\\n}else{\\n\\t$theTracks = \\\"Something went wrong... Last.fm may be down.\\\";\\n}\\nIf($useReturn == 1){\\nreturn $theTracks;\\n}else{\\necho $theTracks;\\n}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5d1d37a86d0df133a414bfddc91c747\",\n \"score\": \"0.58045304\",\n \"text\": \"function findArtist($level, $echonest, $i = 0)\\n{\\n if ($i > 100) {\\n die('sorry, no artist found');\\n }\\n\\n $familiarity = 0.9 - ($level/10);\\n\\n $results = $echonest->getArtistApi()->search(array(\\n 'genre' => 'classical',\\n 'min_familiarity' => $familiarity,\\n 'artist_start_year_before' => 1870,\\n 'sort' => 'familiarity-desc'\\n ));\\n\\n $rand = rand(0, count($results) - 1);\\n $artist = $results[$rand];\\n\\n $location = $echonest->getArtistApi()->setId($artist['id'])->getProfile(array(\\n 'bucket' => 'artist_location'\\n ));\\n\\n $country = $location['artist_location']['country'];\\n $city = $location['artist_location']['city'];\\n\\n // filter the USA because we get wrong results from there -> this is just a hack\\n if ($country == 'United States'\\n || empty($city)\\n || empty($country)\\n ) {\\n return findArtist($level, $echonest, ++$i);\\n }\\n\\n return $location;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"740c8c8c093751c432c261997fc678cb\",\n \"score\": \"0.57630706\",\n \"text\": \"function hnd_artist_events() {\\n\\n\\t$artist_title = get_the_title();\\n\\n\\tadd_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\\n \\t$artist_events = new WP_Query( array(\\n\\t\\t'post_type' => 'events',\\n\\t\\t'order' => 'DESC',\\n\\t\\t'posts_per_page' => -1,\\n\\t\\t'artist_title' => $artist_title,\\n\\t) );\\n\\tremove_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\\n \\t\\n\\t# TODO: split into upcoming and past events\\n\\n\\tif( isset( $artist_events ) && $artist_events->have_posts() ) {\\n\\t\\twhile( $artist_events->have_posts() ) : $artist_events->the_post();\\n\\t\\t\\tget_template_part( 'loop', 'item' );\\n\\t\\tendwhile;\\n\\t} else {\\n\\t\\techo '

    No Upcoming Events


    ';\\n\\t}\\n\\t\\n\\twp_reset_query();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0626754873d261691b16b939df55bb9b\",\n \"score\": \"0.5748841\",\n \"text\": \"public function indexAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $entities = $em->getRepository('CDACertifBundle:Artist')->findAll();\\n\\n return array(\\n 'entities' => $entities,\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3253382079eeb30d95d42bdae183ed7d\",\n \"score\": \"0.5743927\",\n \"text\": \"function getFavorites() \\n {\\n return $this->favorites;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"009c2cb74e5580b3e0ee653e8c81e2f7\",\n \"score\": \"0.57435393\",\n \"text\": \"function getLastFm() {\\n\\n $user = '** USERNAME **'; // Enter your username here\\n $key = '** API KEYS **'; // Enter your API Key\\n $status = 'Last Played:'; // default to this, if 'Now Playing' is true, the json will reflect this.\\n $endpoint = 'https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=' . $user . '&&limit=2&api_key=' . $key . '&format=json';\\n\\n $ch = curl_init();\\n curl_setopt($ch, CURLOPT_URL, $endpoint);\\n curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);\\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);\\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0); // 0 for indefinite\\n curl_setopt($ch, CURLOPT_TIMEOUT, 10); // 10 second attempt before timing out\\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json'));\\n\\n $response = curl_exec($ch);\\n $lastfm[] = json_decode($response, true);\\n\\n curl_close($ch);\\n\\n $artwork = $lastfm[0]['recenttracks']['track'][0]['image'][2]['#text'];\\n\\n if ( empty( $artwork ) ) {\\n $artwork = 'artwork-fallback.png';\\n }\\n\\n $trackInfo = [\\n 'name' => $lastfm[0]['recenttracks']['track'][0]['name'],\\n 'artist' => $lastfm[0]['recenttracks']['track'][0]['artist']['#text'],\\n 'link' => $lastfm[0]['recenttracks']['track'][0]['url'],\\n 'albumArt' => $artwork,\\n 'status' => $status\\n ];\\n\\n if ( !empty($lastfm[0]['recenttracks']['track'][0]['@attr']['nowplaying']) ) {\\n $trackInfo['nowPlaying'] = $lastfm[0]['recenttracks']['track'][0]['@attr']['nowplaying'];\\n $trackInfo['status'] = 'Now Playing:';\\n }\\n\\n return displayLastFM($trackInfo);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33a576a7ad8502fac6df1ad68858cc5a\",\n \"score\": \"0.5696698\",\n \"text\": \"function lastfm_recenttracks($lastfm_username,$amount=5) {\\n\\t$list=file(\\\"http://ws.audioscrobbler.com/1.0/user/$lastfm_username/recenttracks.txt\\\");\\n\\t$i=0;\\n\\t$pieces=array();\\n\\t$temp=array();\\n\\twhile ($i<$amount) {\\n\\t\\t//each piece's pieces array structure: 0=>$timestamp, 1=>$artist, 2=>$title\\n\\t\\t$pieces[$i]=explode(\\\",\\\",$list[$i]);\\n\\t\\t//now $pieces[$i][0] is our timestamp of current song, $pieces[$i][1] are other parts of the song info\\n\\t\\t$temp[$i][0]=$pieces[$i][1];\\n\\t\\t//I saved the other part of the track info (track, artist) to $temp[$i][0] for later to use substr. Because some songs may have \\\" - \\\" someting like \\\"Oh God - Please Help me!\\\"\\n\\t\\t$temp[$i][1]=explode(\\\"---\\\",preg_replace('/[^0-9a-z\\\\s\\\\`\\\\~\\\\!\\\\@\\\\#\\\\$\\\\%\\\\^\\\\*\\\\(\\\\)\\\\; \\\\,\\\\.\\\\'\\\\/\\\\_\\\\-]/i', '-',$pieces[$i][1])); //file() messes up with the \\\" - \\\", don't know. Tried on 2 different servers, both same. it changes it to some special char which hardens the job. Instead, I changed them to - char and join them to use with explode\\n\\t\\t$pieces[$i][1]=trim($temp[$i][1][0]);\\n\\t\\t//now $pieces[$i][1] is artist\\n\\t\\t$pieces[$i][2]=substr($temp[$i][0],(strlen($pieces[$i][1])+4)); //4 , because \\\" - \\\" this makes 3 chars, and a file() shows - as a false character, and it makes one extra character, that's why it's 3+1=4\\n\\t\\t//$pieces[$i][2] is now title\\n \\n\\t\\t//echo \\\"timestamp: \\\".$pieces[$i][0].\\\"
    \\\";\\n\\t\\t//echo \\\"artist: \\\".$pieces[$i][1].\\\"
    \\\";\\n\\t\\t//echo \\\"title: \\\".$pieces[$i][2].\\\"
    \\\";\\n\\t\\t$i++;\\n\\t}\\n \\nfor($j=0;$j<$i;$j++) { unset($temp[$j][0],$temp[$j][1]); } //for memory cleanup\\n \\nreturn $pieces; //either returns the array, or uncomment echo statements and change this to return true; for echoing. I prefer returning the array\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76f4b98555cae4372740651b92d3111b\",\n \"score\": \"0.5680409\",\n \"text\": \"public function getArtist() {\\n\\t\\t\\treturn $this->artist;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f31984700fcc3613ec546e993324c94\",\n \"score\": \"0.56763595\",\n \"text\": \"public function getTopFans($artist=\\\"\\\") {\\n if (!$artist)\\n return false;\\n $url = \\\"http://ws.audioscrobbler.com/2.0/?method=artist.gettopfans\\\";\\n $url .= \\\"&artist=\\\" . urlencode($artist);\\n $url .= \\\"&limit=\\\" . self::MAX_FANS;\\n $url .= \\\"&api_key=\\\" . self::API_KEY . \\\"&format=json\\\";\\n $obj = json_decode(file_get_contents($url));\\n if (isset($obj->error)) {\\n return false;\\n } else {\\n return $obj;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52d58bb9d2914b2482aae6f0eb5be37f\",\n \"score\": \"0.5673547\",\n \"text\": \"function ListAlbums() {\\n\\t//THIS is not in use for my purposes KLY\\n\\tglobal $gp;\\n\\ttry {\\n\\t $userFeed = $gp->getUserFeed(\\\"default\\\");\\n\\t foreach ($userFeed as $userEntry) {\\n\\t echo $userEntry->title->text . \\\"
    \\\\n\\\";\\n\\t }\\n\\t} catch (Zend_Gdata_App_HttpException $e) {\\n\\t echo \\\"Error: \\\" . $e->getMessage() . \\\"
    \\\\n\\\";\\n\\t if ($e->getResponse() != null) {\\n\\t echo \\\"Body:
    \\\\n\\\" . $e->getResponse()->getBody() .\\n\\t \\\"
    \\\\n\\\";\\n\\t }\\n\\t // In new versions of Zend Framework, you also have the option\\n\\t // to print out the request that was made. As the request\\n\\t // includes Auth credentials, it's not advised to print out\\n\\t // this data unless doing debugging\\n\\t // echo \\\"Request:
    \\\\n\\\" . $e->getRequest() . \\\"
    \\\\n\\\";\\n\\t} catch (Zend_Gdata_App_Exception $e) {\\n\\t echo \\\"Error: \\\" . $e->getMessage() . \\\"
    \\\\n\\\";\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b54d0f10478b89313a2b11d129efd410\",\n \"score\": \"0.5637695\",\n \"text\": \"public function getFavorites()\\n {\\n return $this->get('1.1/favorites/list.json');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6a5408905f55ee4769acfda0203399c\",\n \"score\": \"0.56357807\",\n \"text\": \"function getOGAuthors();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa2d03078adf780369d77a44265f80cc\",\n \"score\": \"0.56293935\",\n \"text\": \"public function getAll() {\\r\\n\\t\\tif (!$this->userController->isUserAdmin()) {\\r\\n\\t\\t\\t$this->userController->index();\\r\\n\\t\\t} else {\\r\\n\\t\\t\\t$artistArray = $this->dao->retrieveAll();\\r\\n\\t\\t\\tinclude ADMIN_VIEWS . '/adminartist.php';\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07edddb85180b071ec68c97283096aa1\",\n \"score\": \"0.5614671\",\n \"text\": \"public function artist_musicians() {\\n return $this->hasMany('ArtistMusician');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54be2a36547c2ca8661a8157946ac3d8\",\n \"score\": \"0.5608186\",\n \"text\": \"function get_artist($GroupID) {\\n\\t$Results = get_artists(array($GroupID));\\n\\treturn $Results[$GroupID];\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f821dd2d7054ff7ba28dd2b94250b8e1\",\n \"score\": \"0.56065506\",\n \"text\": \"public function getArtist($id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59d2a1d18654f5b1cb9f55588528ee45\",\n \"score\": \"0.560624\",\n \"text\": \"public function getArtist($parameters = null)\\n {\\n return $this->getRelated('AlbumOrama\\\\Models\\\\Artists', $parameters);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c73b0d16c5a7c1731e48956b3e53653\",\n \"score\": \"0.5597599\",\n \"text\": \"public static function getArtist($name) {\\n\\t\\t$result = file_get_contents(\\\"http://ws.audioscrobbler.com/2.0/?method=artist.getTopTracks&artist=\\\" . urlencode($name) . \\\"&autocorrect=1&format=json&limit=10&api_key=\\\" . self::API_KEY);\\n\\t\\tif ($result !== false) {\\n\\t\\t\\t$artist = new Artist($name);\\n\\n\\t\\t\\treturn $artist->setTopTracks(json_decode($result, true));\\n\\t\\t}\\n\\t\\treturn false;\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee2c564e63ab7fdc9176db1d2cddc89e\",\n \"score\": \"0.5586276\",\n \"text\": \"abstract protected function getAlbumArtist(): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"308f29bbf7096206ef5635d7428b8910\",\n \"score\": \"0.5584955\",\n \"text\": \"public function getAlbumsByArtist($artist) {\\n $success = $this->_db->query(\\\"SELECT * FROM albums WHERE album_artist = ' $artist ' \\\");\\n\\n if ($success) {\\n $albums = [];\\n while ($row = $success->fetch_assoc()) {\\n $albums[] = $row;\\n }\\n return $albums;\\n }\\n\\n return NULL;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca5511be178170c7d1640ab21e6293b4\",\n \"score\": \"0.5584499\",\n \"text\": \"public function Recently_song()\\r\\n {\\r\\n $html = $this->LoadSite(\\\"http://www.eachamps.rw/recentlyadded\\\");\\r\\n $c = HtmlPageCrawler::create($html);\\r\\n $links = $c->filter('.songs-wid table .sng-img a');\\r\\n $data = array();\\r\\n for ($i = 0; $i < $links->length; $i++) {\\r\\n $link = $links->eq($i)->attr('href');\\r\\n array_push($data, $link);\\r\\n }\\r\\n return $data;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d0366dfc4ab75b552bc5becb3d6045c\",\n \"score\": \"0.55573106\",\n \"text\": \"public function viewArtist(){\\n $result = $this->danceAdmin->getAllArtists();\\n foreach ($result as $row){\\n $data[] = array('id'=>$row->artist_id,'name'=>$row->name,'genre'=>$row->genre);\\n }\\n $this->view('danceAdmins/viewArtist',$data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1260e30acca974058c44ce46e0640e6\",\n \"score\": \"0.5540244\",\n \"text\": \"public function artistAlbums($artist)\\n {\\n //procurar albums do artista\\n $data = LastFm::searchArtistAlbum($artist);\\n $searchError = LastFm::getErrorMsg($data);\\n $obj = ($searchError) ? $searchError : $data->topalbums->album;\\n\\n return view('pages.music.artistAlbums')\\n ->with(\\\"albums\\\", $obj)\\n ->with(\\\"artist\\\", $artist);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07973cdc35b30a9bfaaf9371a292f531\",\n \"score\": \"0.5525384\",\n \"text\": \"function getArtists() {\\r\\n\\t$memc = new Memcached();\\r\\n\\t$memc->addServer(\\\"localhost\\\", 11211) or die(\\\"Could not connect to memcached\\\");\\r\\n\\t$artists = $memc->get(\\\"artists\\\");\\r\\n\\tif($artists) {\\r\\n\\t\\techo \\\"\\\";\\r\\n\\t\\treturn $artists;\\r\\n\\t} else {\\r\\n\\t\\t$sql = 'SELECT ArtistID, FirstName, LastName FROM Artists';\\r\\n\\t\\techo \\\"\\\";\\r\\n\\t\\t$result = DBQuery($sql);\\r\\n\\t\\ttry {\\r\\n\\t\\t\\twhile($row = $result->fetch()) {\\r\\n\\t\\t\\t\\t$artists[$row['ArtistID']] = $row['FirstName'].' '.$row['LastName'];\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t$memc->set(\\\"artists\\\", $artists, 60);\\r\\n\\t\\t\\treturn $artists;\\r\\n\\t\\t} catch (PDOException $e) {\\r\\n\\t\\t\\tdie($e->getMessage());\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"caa9f441f1377f2e5cfb1556afa4ea59\",\n \"score\": \"0.5523972\",\n \"text\": \"private function getpopular()\\n {\\n include_once \\\"../app/API/newdb.php\\\";\\n $conn = getconn();\\n $sql = \\\"SELECT * from metadata order by popularity desc limit 5\\\";\\n $myres = array();\\n $result = mysqli_query($conn, $sql);\\n while ($row = mysqli_fetch_assoc($result)) {\\n $item = array(\\n 'id' => $row['id'],\\n 'songName' => $row['songName'],\\n 'albumName' => $row['albumName'],\\n 'artists' => $row['artists'],\\n 'releaseDate' => $row['releaseDate'],\\n 'songImage' => $row['songImage'],\\n 'genre' => $row['genre'],\\n 'popularity' => $row['popularity']\\n );\\n\\n array_push($myres, $item);\\n }\\n $conn->close();\\n return $myres;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29b10b606a5134aea1113786b72264af\",\n \"score\": \"0.5522644\",\n \"text\": \"function addArtists($c){\\n\\t$artists = array();\\n\\t$db = new DB($c['db_host'], $c['db_user'], $c['db_pass'], $c['db_name']);\\n\\t$sql = \\\"SELECT id, name from artist order by name asc\\\";\\n\\t\\t$query = $db->query($sql);\\n\\t\\twhile($row = $query->fetch_array()){\\n\\t\\t\\t$i = $row['id'];\\n\\t\\t\\t$n = $row['name'];\\n\\t\\t\\t$artists[] = new Artist($i,$n);\\n\\t\\t}\\n\\t\\t$db->close();\\n\\t\\treturn $artists;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4757f14f1ab5529dd01ba8d630602752\",\n \"score\": \"0.5518958\",\n \"text\": \"public function getTopAlbums($artist=\\\"\\\") {\\n if (!$artist)\\n return false;\\n $url = \\\"http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums\\\";\\n $url .= \\\"&artist=\\\" . urlencode($artist);\\n $url .= \\\"&limit=\\\" . self::MAX_ALBUMS;\\n $url .= \\\"&api_key=\\\" . self::API_KEY . \\\"&format=json\\\";\\n $obj = json_decode(file_get_contents($url));\\n if (isset($obj->error)) {\\n return false;\\n } else {\\n return $obj;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6a597929c72c1f393a6380cf6c4a517\",\n \"score\": \"0.55085284\",\n \"text\": \"private function artists_above_50() {\\n\\n//Make a master list as a single dimensional array\\n$tmplist = explode(',', preg_replace('/(\\\\r\\\\n|[\\\\r\\\\n])/', ',', trim($this->file_contents)));\\n\\n//product the array of only the duplicates\\n$duplicates_array = $this->array_not_unique($tmplist);\\n\\n//get a count for how many times each is duplicated\\n$count_array = @array_count_values($duplicates_array);\\t//supress warning with blank entries\\n\\n$dup_array = array();\\n\\n//Find all duplicate artists that are mentioned 50 times or more\\nforeach ($count_array as $key => $value) {\\nif ($value >= 50) {\\n$dup_array[] = $key;\\n}\\n}\\n\\nreturn $dup_array;\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2247ab41c2831135d47168863fd9da32\",\n \"score\": \"0.55033606\",\n \"text\": \"function sr_rels_by_artist($args = array() , $show_artist = false)\\r\\n{\\t\\r\\n\\t$defaults = array(\\r\\n\\t\\t'artist' => '',\\r\\n\\t\\t'thumb_size' => 'thumbnail',\\r\\n\\t\\t'limit' => '6',\\r\\n\\t\\t'buy_now' => true,\\r\\n\\t\\t'exclude' => '',\\r\\n\\t\\t'aside' => false,\\r\\n\\t\\t'title' => false,\\r\\n\\t);\\r\\n\\t\\r\\n\\t$options = array_merge($defaults , $args);\\r\\n\\t\\r\\n\\t$query_args = array(\\r\\n\\t\\t'post_type' => 'release' ,\\r\\n\\t\\t'post_status' => 'publish',\\r\\n\\t\\t'posts_per_page' => $options['limit'] ,\\r\\n\\t\\t'post__not_in' => array($options['exclude']),\\r\\n\\t\\t'orderby' => 'meta_value',\\r\\n\\t\\t'meta_key' => '_sr_release-date'\\r\\n\\t);\\r\\n\\tif ($options['artist'] != ''){\\r\\n\\t\\t$query_args['tax_query'] = array(\\r\\n\\t\\t\\tarray(\\r\\n\\t\\t\\t\\t'taxonomy' => 'artist',\\r\\n\\t\\t\\t\\t'field' => 'id',\\r\\n\\t\\t\\t\\t'terms' => $options['artist']\\r\\n\\t\\t\\t)\\r\\n\\t\\t);\\r\\n\\t}\\r\\n\\t$rel_query = new WP_query($query_args);\\r\\n\\t$aside = $options['aside'];\\r\\n\\tif($aside == false)\\r\\n\\t{\\r\\n\\t\\tif ($options['title'] == true){\\r\\n\\t\\t\\t$wrapper_o = '

    Latest Releases

    ';\\r\\n\\t\\t}else{\\r\\n\\t\\t\\t$wrapper_o = '
    ';\\r\\n\\t\\t}\\r\\n\\t\\t$wrapper_o .= '
    ';\\r\\n\\t\\t$wrapper_c = '
    ';\\r\\n\\t\\t$article_tag_o = '
    ';\\r\\n\\t\\t$article_tag_c = '
    ';\\r\\n\\t}else{\\r\\n\\t\\t$wrapper_o = '';\\r\\n\\t\\t$article_tag_o = '
  • ';\\r\\n\\t\\t$article_tag_c = '
  • ';\\r\\n\\t\\t\\r\\n\\t}\\r\\n\\tif( $rel_query->have_posts() ):\\r\\n\\t\\techo $wrapper_o;\\r\\n\\t\\twhile ($rel_query->have_posts() ): $rel_query->the_post(); ?>\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\\" rel=\\\"bookmark\\\">\\r\\n\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t

    \\\">

    ' . $release_date . '';\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tendif;\\r\\n\\t\\t\\t\\t\\t\\t\\telseif($show_artist == true):\\t\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tsr_get_rels_artist($post->ID, false, 'h3');\\r\\n\\t\\t\\t\\t\\t\\t\\tendif; ?>\\r\\n\\t\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t

    \\r\\n\\t\\t\\t\\t\\t\\t 0):\\r\\n\\t\\t\\t\\t\\t\\t\\t$excerpt = sr_truncate($excerpt, 75, ' ');\\r\\n\\t\\t\\t\\t\\t\\t\\techo $excerpt;\\r\\n\\t\\t\\t\\t\\t\\telse:\\r\\n\\t\\t\\t\\t\\t\\t\\tglobal $review_mb;\\r\\n\\t\\t\\t\\t\\t\\t\\t$meta = $review_mb->the_meta();\\r\\n\\t\\t\\t\\t\\t\\t\\t$reviews = $meta['reviews'];\\r\\n\\t\\t\\t\\t\\t\\t\\tif($reviews):\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t$review_text = sr_truncate($reviews[0]['review-text'], 75, ' ');\\r\\n\\t\\t\\t\\t\\t\\t\\t\\techo $review_text;\\r\\n\\t\\t\\t\\t\\t\\t\\tendif;\\r\\n\\t\\t\\t\\t\\t\\tendif;\\r\\n\\t\\t\\t\\t\\t?>\\r\\n\\t\\t\\t\\t\\t\\t

    \\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t\\tPreorder now';\\r\\n\\t\\t\\t\\t\\t\\t}else\\r\\n\\t\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t\\techo 'Buy Now';\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}?>\\r\\n\\t\\t\\t\\r\\n\\t\\tdb->prepare(\\\"SELECT * FROM tracks\\\");\\n //TODO add filter by user id WHERE (user_id = :user_id)\\\");\\n //$stmt->bindParam(':user_id', $_SESSION['id']);\\n $stmt->execute();\\n $isFetchModeSet = $stmt->setFetchMode(PDO::FETCH_ASSOC);\\n\\n //we store the results in memory, might not be best for large results\\n $allRows = $stmt->fetchAll();\\n return $allRows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"928827c6464e6cdc2a09809ffe3d55df\",\n \"score\": \"0.5485443\",\n \"text\": \"function sr_relart_loop_markup(&$artists = array()){\\r\\n\\tglobal $post;\\r\\n\\t$sr_post_class = '';\\r\\n\\tif('artist' == get_post_type()){\\r\\n\\t\\t$sr_post_class = get_post_meta(get_the_ID(),'_sr_present-past',TRUE);\\r\\n\\t\\tif ($sr_post_class == 'past'){\\r\\n\\t\\t\\t$meta_blob = 'Catalogue'; \\r\\n\\t\\t}else{\\r\\n\\t\\t\\t$artist_status = null;\\r\\n\\t\\t\\t$meta_blob = null;\\r\\n\\t\\t}\\r\\n\\t}else{\\r\\n\\t\\t$artist_tax = get_the_terms( $post->ID, 'artist' );\\r\\n\\t\\tforeach($artist_tax as $artist){\\r\\n\\t\\t\\t$artist = array('title' => $artist->name , 'class' => $artist->slug);\\r\\n\\t\\t\\t$sr_post_class .= $artist['class'] . ' ';\\r\\n\\t\\t\\tif(!in_array($artist , $artists)){\\r\\n\\t\\t\\t\\tarray_push($artists, $artist);\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\t$sr_post_class .= ' fourcol fancy-roll';\\r\\n\\t?>\\r\\n\\t\\r\\n\\t\\\" rel=\\\"bookmark\\\">\\r\\n\\t\\t\\r\\n\\t\\t
    \\r\\n\\t\\t\\t
    \\r\\n\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t\\t

    \\r\\n\\t\\t\\t\\t\\tID , false);}?>\\r\\n\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t
    \\r\\n\\t\\t\\t\\t\\t 0):\\r\\n\\t\\t\\t\\t\\t\\t\\t$excerpt = sr_truncate($excerpt, 250, ' ');\\r\\n\\t\\t\\t\\t\\t\\t\\techo '

    ' . $excerpt . '

    ';\\r\\n\\t\\t\\t\\t\\t\\t\\techo '
    read more
    ';\\r\\n\\t\\t\\t\\t\\t\\telse:\\r\\n\\t\\t\\t\\t\\t\\t\\tglobal $review_mb;\\r\\n\\t\\t\\t\\t\\t\\t\\t$meta = $review_mb->the_meta();\\r\\n\\t\\t\\t\\t\\t\\t\\t$reviews = $meta['reviews'];\\r\\n\\t\\t\\t\\t\\t\\t\\tif($reviews):\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t$review_text = sr_truncate($reviews[0]['review-text'], 250, ' ');\\r\\n\\t\\t\\t\\t\\t\\t\\t\\techo '

    ' . $review_text . '

    ';\\r\\n\\t\\t\\t\\t\\t\\t\\t\\techo '
    read more
    ';\\r\\n\\t\\t\\t\\t\\t\\t\\tendif;\\r\\n\\t\\t\\t\\t\\t\\tendif;\\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\\nsongs;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f7a2755868a2c14246125edb4a7a79c\",\n \"score\": \"0.5482759\",\n \"text\": \"public function getSimilarArtists($artist,$limit){\\n\\t\\t$query = \\\"SELECT DISTINCT artist2 FROM correlation WHERE artist1 = '\\\".$artist.\\\"' ORDER BY correlation DESC LIMIT \\\".$limit;\\n\\t\\t\\n\\t\\t$result = mysql_query($query);\\n\\n\\t\\t$array = array();\\n\\t\\twhile($row = mysql_fetch_array($result)){\\n\\t\\t\\t$array[]= $row;\\n\\t\\t}\\n\\t\\treturn $array;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"924e4802734340878ba5a71e9f9f5c4a\",\n \"score\": \"0.54716617\",\n \"text\": \"public function createArtistList()\\n {\\n $key = Config::get('key');\\n $endpoint = Config::get('endpoint');\\n $faceListUUID = Config::get('faceListUUID');\\n\\n $request = Http::withoutVerifying()->withHeaders([\\n 'Content-Type' => 'application/json',\\n 'Ocp-Apim-Subscription-Key' => $key\\n ])->put(\\\"$endpoint/face/v1.0/largefacelists/$faceListUUID\\\", [\\n 'name' => $faceListUUID,\\n 'userData' => $faceListUUID,\\n 'recognitionModel' => 'recognition_03',\\n ]);\\n\\n try {\\n return $request->getBody();\\n } catch (HttpException $ex) {\\n return $ex;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50e6a4966ccc127151e1b0c324d88e5f\",\n \"score\": \"0.54670787\",\n \"text\": \"public function testWillRetriveArtistWithMediumDetails()\\n {\\n $artist = $this->getSpotifyService()->lookupArtist(self::ARTIST_URI, 'album');\\n\\n // artist assertions\\n $this->assertInstanceOf('PequenoSpotifyModule\\\\Item\\\\Artist', $artist);\\n $this->assertEquals(self::ARTIST_URI, $artist->getUri());\\n $this->assertEquals('Basement Jaxx', $artist->getName());\\n $this->assertGreaterThanOrEqual(0.0, $artist->getPopularity());\\n // albums assertions\\n $this->assertNotEmpty($artist->getAlbums());\\n $albums = $artist->getAlbums();\\n /** @var $album \\\\PequenoSpotifyModule\\\\Item\\\\Album */\\n $album = end($albums);\\n $this->assertInstanceOf('PequenoSpotifyModule\\\\Item\\\\Album', $album);\\n $this->assertEquals('spotify:album:7gljDo33wlUkdGGVwkKDMG', $album->getUri());\\n $this->assertEquals('Atlantic Jaxx - A Compilation Vol 1', $album->getName());\\n $this->assertNotEmpty($album->getTerritories());\\n $this->assertEmpty($album->getReleased());\\n $this->assertEmpty($album->getArtists());\\n $this->assertEmpty($album->getExternalIds());\\n $this->assertEmpty($album->getTracks());\\n\\n // album artist assertions\\n $this->assertSame($artist, $album->getArtist());\\n $this->assertEquals(self::ARTIST_URI, $album->getArtist()->getUri());\\n $this->assertEquals('Basement Jaxx', $album->getArtist()->getName());\\n $this->assertSame($artist->getAlbums(), $album->getArtist()->getAlbums());\\n $this->assertEmpty($album->getArtist()->getPopularity());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9042e6dcfd9732f2263a519d1bdb237\",\n \"score\": \"0.54587054\",\n \"text\": \"public function getArtist()\\n {\\n if (! isset($this->artist)) {\\n $this->artist = (($nodeList = $this->getXPath($this->getDomElement())->query($this->getArtistQuery(), $this->getDomElement())) && $nodeList->length)\\n ? new \\\\MphpMusicBrainz\\\\Result\\\\Artist($this->getFactory()->getResultAdapter(\\\\MphpMusicBrainz\\\\Service\\\\MusicBrainz::RESOURCE_ARTIST, $nodeList->item(0)))\\n : null;\\n }\\n return $this->artist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e084cb91e44fc0bb02d99e1e51c81f12\",\n \"score\": \"0.5456722\",\n \"text\": \"public function getLessListenedAlbum()\\n {\\n $allAlbums = $this->getUserAlbums();\\n $album = $this->getRandomAlbums($allAlbums, 1);\\n $chart = $this->request(self::USER_ALBUMS_CHART_URL.\\\"?access_token=\\\".$this->getAccessToken());\\n $i = 0;\\n $albumToSuggest = null;\\n $topFiveAlbumsId = array();\\n for($j = 0; $j < 5; $j++) {\\n $topFiveAlbumsId[] = $chart['data'][$j]['id'];\\n }\\n while($albumToSuggest === null && $i < self::TRACKS_MAX_TRIES) {\\n $i++;\\n if(!in_array($album[0]->getDeezerId(), $topFiveAlbumsId)) {\\n $albumToSuggest = $album[0];\\n } else {\\n $album = $this->getRandomAlbums($allAlbums['data'], 1);\\n }\\n }\\n if(!isset($albumToSuggest)) {\\n $albumToSuggest = $album[0];\\n }\\n\\n return $albumToSuggest;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2912e9c32a07f203b38e034d6c398b0c\",\n \"score\": \"0.5456717\",\n \"text\": \"public function searchArtists($query, $limit);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"642915a31aa58d67198d8dc128e0e421\",\n \"score\": \"0.54566914\",\n \"text\": \"function hnd_artist_flyers() {\\n\\t$artist_title = get_the_title();\\n\\tadd_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\\n \\t$artist_events = new WP_Query( array(\\n\\t\\t'post_type' => 'events',\\n\\t\\t'order' => 'DESC',\\n\\t\\t'posts_per_page' => -1,\\n\\t\\t'artist_title' => $artist_title,\\n\\t) );\\n\\tremove_filter( 'posts_where', 'hnd_artists_posts_where', 10, 2 );\\n\\n\\tif( isset( $artist_events ) && $artist_events->have_posts() ) {\\n\\t\\t\\n\\t\\t$flyer_ids = array();\\n\\t\\t\\n\\t\\t// build array of flyer ids\\n\\t\\twhile( $artist_events->have_posts() ) : $artist_events->the_post();\\n\\t\\t\\tif( has_post_thumbnail() ) $flyer_ids[] = get_post_thumbnail_id();\\n\\t\\tendwhile;\\n\\n\\t\\t// flyer gallery\\n\\t\\tif( count( $flyer_ids ) ) {\\n\\t\\t\\t\\n\\t\\t\\t// default gallery\\n\\t\\t\\t#$shortcode = '[gallery ids=\\\"' . implode( ',', $flyer_ids ) . '\\\"]';\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t// tiled columns\\n\\t\\t\\t#$shortcode = '[gallery type=\\\"columns\\\" link=\\\"file\\\" ids=\\\"' . implode( ',', $flyer_ids ) . '\\\"]';\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t// tiled mosaic\\n\\t\\t\\t$shortcode = '[gallery type=\\\"rectangular\\\" link=\\\"file\\\" ids=\\\"' . implode( ',', $flyer_ids ) . '\\\"]';\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t// only apply content filters to flyers\\n\\t\\t\\tremove_filter( 'the_content', 'hnd_event_content' );\\n\\t\\t\\techo apply_filters( 'the_content', $shortcode );\\n\\t\\t\\tadd_filter( 'the_content', 'hnd_event_content' );\\n\\t\\t}\\n\\n\\t} else {\\n\\t\\techo '

    No Flyers Available


    '; \\n\\t\\techo '

    Free free to send us any flyers we don\\\\'t already have!

    ';\\n\\t}\\n\\t\\n\\twp_reset_query();\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05b0cb87686e08b8ed7765b0a5cf9b4a\",\n \"score\": \"0.5448923\",\n \"text\": \"public function getArtistUrl()\\n {\\n return $this->_artistUrl;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d22a12d8f32d1c64627a5f87faaf7e9\",\n \"score\": \"0.544498\",\n \"text\": \"private function getSongs()\\n {\\n $song = new Song();\\n $songs = $song->getWhere('deleted', 0);\\n return $songs;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49728bf4f6e34419684f7bcd86c946c5\",\n \"score\": \"0.54408383\",\n \"text\": \"private function favorite_tweets() {\\n $json = $this->load_url('http://api.twitter.com/1/statuses/retweeted_by_me.json?count=10', '', FAVORITES_TWITTER_USER.':'.FAVORITES_TWITTER_PASS);\\n \\n $json = json_decode($json);\\n \\n $tweets = array();\\n \\n foreach ($json as $tweet) {\\n $tweets[] = array(\\n 'text' => (string) $tweet->retweeted_status->text,\\n 'author' => (string) $tweet->retweeted_status->user->screen_name.' ('.$tweet->retweeted_status->user->name.')',\\n 'author_url' => (string) 'http://twitter.com/'.$tweet->retweeted_status->user->screen_name,\\n 'url' => (string) 'http://twitter.com/'.$tweet->retweeted_status->user->screen_name.'/statuses/'.$tweet->retweeted_status->id,\\n 'avatar' => (string) $tweet->retweeted_status->user->profile_image_url,\\n 'date' => (string) $tweet->retweeted_status->created_at\\n );\\n }\\n \\n return $tweets;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"17b3a325a7e8f77b35f7bbd8f9205757\",\n \"score\": \"0.54170096\",\n \"text\": \"public function albumInfo($artist, $album)\\n {\\n $data = LastFm::searchAlbumInfo($artist, $album);\\n $searchError = LastFm::getErrorMsg($data);\\n $obj = ($searchError) ? $searchError : $data->album;\\n\\n //more by this artist\\n $moreByArtist = LastFm::searchArtistAlbum($artist, '', 20)->topalbums->album;\\n //\\n $x = 1;\\n $more = [];\\n $arrAlbumNames = [];\\n while ( $x <= 5) {\\n $rand = array_rand($moreByArtist);\\n\\n if( isset($moreByArtist[$rand]->name) )\\n {\\n\\n if( $obj->name != $moreByArtist[$rand]->name )\\n {\\n if(!in_array($moreByArtist[$rand]->name, $arrAlbumNames))\\n {\\n array_push($more, $moreByArtist[$rand]);\\n array_push($arrAlbumNames, $moreByArtist[$rand]->name);\\n $x++;\\n }\\n }\\n }\\n }\\n //\\n\\n return view('pages.music.albumInfo')\\n ->with(\\\"album\\\", $obj)\\n ->with(\\\"moreBy\\\", $more);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7350d6f57b9a00f22e374cdb1f070e6\",\n \"score\": \"0.54096454\",\n \"text\": \"public function getArtists($user, $limit = null, $page = null)\\n {\\n $response = $this->call(array(\\n 'method' => 'library.getArtists',\\n 'user' => $user,\\n 'limit' => $limit,\\n 'page' => $page\\n ));\\n\\n $artists = array();\\n if (!empty($response->artists->artist)) {\\n foreach ($response->artists->artist as $artist) {\\n $artists[] = LastfmModel\\\\Artist::createFromResponse($artist);\\n }\\n }\\n\\n return $artists;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0168338d540ed1bf43a636fba0134e1d\",\n \"score\": \"0.5396238\",\n \"text\": \"function songsLists( $offset = 0 ){\\n\\n\\t\\treturn $this->Join('artist', function($join){\\n\\t\\t\\t\\t\\t\\t$join->on('artist.id', '=', 'songs.artist');\\n\\t\\t\\t\\t\\t})\\n\\t\\t\\t\\t\\t->groupBy('artist.id')\\n\\t\\t\\t\\t\\t->take(Config::get('cms_config.limit'))\\n\\t\\t\\t\\t\\t->offset($offset)\\n\\t\\t\\t\\t\\t->get([\\n\\t\\t\\t\\t\\t\\tDB::raw('artist.id'),\\n\\t\\t\\t\\t\\t\\tDB::raw('artist.name'),\\n\\t\\t\\t\\t\\t\\tDB::raw('count(songs.id) as number_of_songs')\\n\\t\\t\\t\\t\\t]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3d21d126f633e8552fea9d05b39a65d\",\n \"score\": \"0.5395225\",\n \"text\": \"public static function getAllArtists($st_limit=0, $end_limit=10){\\n global $db;\\n $rs_arr = [];\\n $query = \\\"SELECT *, profile_images.img_sm_path FROM users INNER JOIN profile_images \\\";\\n $query .= \\\"ON users.id=profile_images.user_id WHERE(role=1) \\\";\\n $query .= \\\"ORDER BY users.id DESC LIMIT {$st_limit}, {$end_limit}\\\";\\n $rs = $db->query($query);\\n if($rs && $db->num_rows($rs) > 0){\\n while($row = $db->fetch_array($rs)){\\n array_push($rs_arr, array(\\n \\\"id\\\"=>$row[\\\"id\\\"],\\n \\\"profile_image\\\"=>$row[\\\"img_sm_path\\\"],\\n \\\"username\\\"=>$row[\\\"username\\\"],\\n \\\"email\\\"=>$row[\\\"email\\\"],\\n \\\"active_since\\\"=>$row[\\\"active_since\\\"],\\n \\\"musical_style\\\"=>$row[\\\"musical_style\\\"],\\n \\\"isBlocked\\\"=>$row[\\\"isBlocked\\\"],\\n \\\"rank\\\"=>$row[\\\"rank\\\"],\\n \\\"binHexCode\\\"=>$row[\\\"binHexCode\\\"],\\n \\\"date_of_entry\\\"=>dateToString($row[\\\"date_of_entry\\\"])\\n ));\\n }\\n }\\n return ($rs_arr == null) ? null : $rs_arr;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"858f660d4dd4485dfd2c17c3a6ad801d\",\n \"score\": \"0.53726083\",\n \"text\": \"public function getArtista()\\n {\\n return $this->artista;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49f5179d84aab69fe7bb6552b3278538\",\n \"score\": \"0.53612804\",\n \"text\": \"public function getSimilar($artist=\\\"\\\") {\\n if (!$artist)\\n return false;\\n $url = \\\"http://ws.audioscrobbler.com/2.0/?method=artist.getsimilar\\\";\\n $url .= \\\"&artist=\\\" . urlencode($artist);\\n $url .= \\\"&limit=\\\" . self::MAX_ARTISTS;\\n $url .= \\\"&api_key=\\\" . self::API_KEY . \\\"&format=json\\\";\\n $obj = json_decode(file_get_contents($url));\\n if (isset($obj->error)) {\\n return false;\\n } else {\\n return $obj;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0878736c939ac0794918f58132aca157\",\n \"score\": \"0.53608674\",\n \"text\": \"public function getArtista()\\n {\\n return $this->artista;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc692aacf88a2bccc0cf1a358f524199\",\n \"score\": \"0.53525406\",\n \"text\": \"function getArtistTotal(){\\n\\n\\t\\treturn $this->count();\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f01f9984366306fa4eca29a536a452b\",\n \"score\": \"0.53493553\",\n \"text\": \"public function topStories(): array\\n {\\n $key = 'topstories-ids';\\n if (Cache::has($key)) {\\n $topStories = Cache::get($key);\\n } else {\\n $url = \\\"https://hacker-news.firebaseio.com/v0/topstories.json\\\";\\n\\n $client = new Client();\\n\\n try {\\n $res = $client->get($url);\\n } catch (ClientException $e) {\\n dd($e);\\n }\\n $topStories = json_decode($res->getBody()->getContents());\\n Cache::put($key, $topStories, now()->addMinutes($this->topStoriesTtl));\\n }\\n return $topStories;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce15d568162b0a93ca1f9d24ad7c007a\",\n \"score\": \"0.534767\",\n \"text\": \"public function show(Artist $artist)\\n {\\n return $artist;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"755addf7a842eb01fdfca2e6d4d55755\",\n \"score\": \"0.5344165\",\n \"text\": \"function getSong($level, $echonest, $i = 0)\\n{\\n if ($i > 100) {\\n die('sorry, no song found');\\n }\\n\\n $artist = findArtist($level, $echonest);\\n\\n $songs = $echonest->getSongApi()->search(array(\\n 'artist_id' => $artist['id'],\\n 'bucket' => array('id:spotify-WW', 'tracks')\\n ));\\n\\n $songsWithTrx = array();\\n\\n foreach ($songs as $song) {\\n\\n if (count($song['tracks']) > 0) {\\n foreach ($song['tracks'] as $i => $track) {\\n $song['tracks'][$i]['foreign_id'] = preg_replace('~^spotify\\\\-WW~', 'spotify', $song['tracks'][$i]['foreign_id']);\\n }\\n\\n $songsWithTrx[] = $song;\\n }\\n }\\n\\n $songs = $songsWithTrx;\\n\\n if (count($songs) == 0) {\\n return getSong($level, $echonest, ++$i);\\n }\\n\\n $rand = rand(0, count($songs) - 1);\\n $song = $songs[$rand];\\n $rand = rand(0, count($song['tracks']) - 1);\\n\\n return array(\\n 'artist' => $artist,\\n 'song' => $song['tracks'][$rand]\\n );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84be80ee4da5481d486e683553cab904\",\n \"score\": \"0.5338183\",\n \"text\": \"function getPlayHistory($for=false) {\\n\\t $for = jz_db_escape($for);\\n\\t $q = \\\"SELECT n.*,p.user FROM jz_playcounts p,jz_nodes n WHERE p.media_id=n.my_id\\\";\\n\\t if ($for){\\n\\t $q .= \\\" AND p.user='$for'\\\";\\n\\t }\\n\\t $q .= \\\" AND n.ptype='track' GROUP BY p.media_id ORDER BY max(date) desc LIMIT 25\\\";\\n\\t $res = jz_db_object_query($q);\\n\\n\\t // TODO: include user info in result\\n\\t return $res;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"112265e6a2f88b59b79405fc92b1a549\",\n \"score\": \"0.53277314\",\n \"text\": \"public function favoritesAction()\\n {\\n $favorite = $this->getService('Model\\\\Favorite');\\n $userId = $this->getService('Auth')->getIdentity()->id;\\n return array('titles' => $favorite->all($userId));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6429fdbf32c70a2322afc4ad7def7e64\",\n \"score\": \"0.5321101\",\n \"text\": \"public function getItemArtistAttribute()\\n {\\n if(!$this->artist_url && !$this->artist_id) return null;\\n\\n // Check to see if the artist exists on site\\n $artist = checkAlias($this->artist_url, false);\\n if(is_object($artist)) {\\n $this->artist_id = $artist->id;\\n $this->artist_url = null;\\n $this->save();\\n }\\n\\n if($this->artist_id)\\n {\\n return $this->artist->displayName;\\n }\\n else if ($this->artist_url)\\n {\\n return prettyProfileLink($this->artist_url);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fae453de80d04dad38f2aab8a1b0c87d\",\n \"score\": \"0.5320939\",\n \"text\": \"public function get_fluids()\\n {\\n return $this->fluids;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea44f89726de638ee0ccdb40d7d7411a\",\n \"score\": \"0.5315851\",\n \"text\": \"function scrap_url($artist, $song_name) {\\n if(strpos($song_name,\\\"(\\\") > 0 ){\\n $song_name = substr($song_name,0,strpos($song_name,\\\"(\\\")-1);\\n }\\n\\n if(strpos($artist,\\\"feat\\\") > 0 ){\\n $artist = substr($artist,0,strpos($artist,\\\"feat\\\"));\\n }\\n\\n $artist = filer_var($artist);\\n $song_name = filer_var($song_name);\\n $artist = ucwords(str_replace(\\\" \\\",\\\"-\\\",$artist));\\n $song_name = ucwords(str_replace(\\\" \\\",\\\"-\\\",$song_name));\\n $url = sprintf('https://genius.com/%s-%s-lyrics',$artist,$song_name);\\n $url = str_replace(\\\"--\\\",\\\"-\\\",$url);\\n $lyrics = \\\"\\\";\\n\\n do{\\n $lyrics = file_get_html($url)->plaintext;\\n $start_index = strpos($lyrics,\\\"Verse\\\");\\n $end_index =strpos($lyrics,\\\"Contributors\\\");\\n $lyrics = substr($lyrics,$start_index,$end_index - $start_index);\\n }while(strpos($lyrics,\\\"More on Genius\\\")>1);\\n\\n return $lyrics;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7188b2032238220fe028c5ffb62f4e78\",\n \"score\": \"0.5291484\",\n \"text\": \"public function favorators();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5c0819d36b47516e77df224b3807041\",\n \"score\": \"0.5291047\",\n \"text\": \"function songsAlbumLists( $offset = 0, $artistId = 0 ){\\n\\n\\t\\treturn $this->Join('albums', function($join){\\n\\t\\t\\t\\t\\t\\t$join->on('albums.id', '=', 'songs.album');\\n\\t\\t\\t\\t\\t})\\n\\t\\t\\t\\t\\t->where('songs.artist', $artistId)\\n\\t\\t\\t\\t\\t->groupBy('albums.id')\\n\\t\\t\\t\\t\\t->take(Config::get('cms_config.limit'))\\n\\t\\t\\t\\t\\t->offset($offset)\\n\\t\\t\\t\\t\\t->get([\\n\\t\\t\\t\\t\\t\\tDB::raw('albums.id'),\\n\\t\\t\\t\\t\\t\\tDB::raw('albums.title'),\\n\\t\\t\\t\\t\\t\\tDB::raw('albums.artworkPath'),\\n\\t\\t\\t\\t\\t\\tDB::raw('count(songs.id) as number_of_songs')\\n\\t\\t\\t\\t\\t]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1aae5508a69df256a8fa5d6998c93e77\",\n \"score\": \"0.5282606\",\n \"text\": \"function SERVICE_GETALBUMMETADATA_yahoo($node, $displayOutput = true, $return = false) {\\n\\t\\tglobal $include_path;\\n\\t\\t\\n\\t\\t// Ok, now we need to see if we are reading a album or an artist\\n\\t \\t$album = $node->getName(); \\n\\t\\t$parent = $node->getParent();\\n\\t\\t$artist = $parent->getName();\\n\\t\\t\\t\\t\\n\\t\\tinclude_once($include_path. \\\"lib/snoopy.class.php\\\");\\n\\t\\t\\n\\t\\t// First let's get the artist page\\n\\t\\t$snoopy = new Snoopy;\\n\\t\\t$snoopy->fetch(\\\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\\\". urlencode($album));\\n\\t\\t$contents = $snoopy->results;\\n\\t\\tunset($snoopy);\\n\\t\\t\\n\\t\\t// Did we get anything?\\n\\t\\tif (stristr($contents,\\\"no matches found\\\")){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\t\\n\\t\\t// Now let's fix up the name\\n\\t\\t$albumName = str_replace(\\\"&\\\",\\\"&amp;\\\",$album);\\n\\t\\t$artist = str_replace(\\\"&\\\",\\\"&amp;\\\",$artist);\\n\\t\\t\\n\\t\\t// Ok, now let's see if we got a direct hit or a link\\n\\t\\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\\n\\t\\t\\t// Ok, we missed let's try to mangle the name and try again?\\n\\t\\t\\t$album = trim(substr($album,0,strpos($album,\\\" -\\\")));\\n\\t\\t\\t$snoopy = new Snoopy;\\n\\t\\t\\t$snoopy->fetch(\\\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\\\". urlencode($album));\\n\\t\\t\\t$contents = $snoopy->results;\\n\\t\\t\\tunset($snoopy);\\n\\t\\t}\\n\\t\\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\\n\\t\\t\\t// Ok, we missed let's try to mangle the name and try again?\\n\\t\\t\\t$album = trim(substr($album,0,strpos($album,\\\"[\\\")));\\n\\t\\t\\t$snoopy = new Snoopy;\\n\\t\\t\\t$snoopy->fetch(\\\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\\\". urlencode($album));\\n\\t\\t\\t$contents = $snoopy->results;\\n\\t\\t\\tunset($snoopy);\\n\\t\\t}\\n\\t\\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\\n\\t\\t\\t// Ok, we missed let's try to mangle the name and try again?\\n\\t\\t\\t$album = trim(substr($album,0,strpos($album,\\\"(\\\")));\\n\\t\\t\\t$snoopy = new Snoopy;\\n\\t\\t\\t$snoopy->fetch(\\\"http://search.music.yahoo.com/search/?m=album&x=15&y=7&p=\\\". urlencode($album));\\n\\t\\t\\t$contents = $snoopy->results;\\n\\t\\t\\tunset($snoopy);\\n\\t\\t}\\n\\t\\tif (!stristr($contents,$artist) or !stristr($contents,$album)){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t// Now let's move up to the artist and back\\n\\t\\t$link = substr($contents,strpos($contents,$artist)-300);\\n\\t\\t$link = substr($link,strpos($link,\\\"\\\")){\\n\\t\\t\\t$link = substr($link,0,strpos($link,'>'));\\n\\t\\t}\\n\\t\\t\\n\\t\\t// Now let's get that page\\n\\t\\t$contents = @file_get_contents($link);\\n\\t\\t\\n\\t\\t// Now let's get the image\\n\\t\\t$contents = substr($contents,strpos($contents,'onClick=\\\"ext_link'));\\n\\t\\t$contents = substr($contents,strpos($contents,'Album Release Date')-400);\\n\\t\\t$image = substr($contents,strpos($contents,''));\\n\\t\\t\\n\\t\\tif (!$return){\\n\\t\\t\\twriteAlbumMetaData($node, $year, $image, false, false, false, false, false, $displayOutput);\\n\\t\\t} else {\\n\\t\\t\\tif ($return == \\\"array\\\"){\\n\\t\\t\\t\\t$retArr['year'] = $year;\\n\\t\\t\\t\\t$retArr['image'] = $image;\\n\\t\\t\\t\\t$retArr['review'] = false;\\n\\t\\t\\t\\t$retArr['rating'] = false;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\treturn $retArr;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\treturn $$return;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9d84edadd21842b82d6abb05e2a6c3d\",\n \"score\": \"0.52769315\",\n \"text\": \"function fetch_flickr() {\\n\\t$theme_options = get_option(THEME_OPTIONS_NAME);\\n\\tif ( (in_array('flickr', $theme_options['enabled_services'])) && ($theme_options['hashtags']) ) {\\n\\t\\t$max \\t= is_numeric($theme_options['flickr_max_results']) ? $theme_options['hashtags'] : 20; // fallback check for valid max #\\n\\t\\t\\n\\t\\tadd_filter( 'wp_feed_cache_transient_lifetime' , 'cache_reset' );\\t\\t\\n\\t\\t$feed \\t= fetch_feed('http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tagmode=ANY&'.build_hashtag_query('tags'));\\n\\t\\tremove_filter( 'wp_feed_cache_transient_lifetime' , 'cache_reset' );\\n\\t\\t\\n\\t\\tif (!is_wp_error($feed)) { \\n\\t\\t\\t// Figure out how many total items there are, but limit it to the max number set. \\n\\t\\t\\t$total = $feed->get_item_quantity($max); \\n\\t\\t\\t// Build an array of all the items, starting with element 0 (first element).\\n\\t\\t\\t$items = $feed->get_items(0, $total);\\n\\t\\t\\t\\n\\t\\t\\treturn $items;\\n\\t\\t}\\n\\t\\telse { return 'Error in generating Flickr feed object'; }\\n\\t}\\n}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":719,"cells":{"query_id":{"kind":"string","value":"d2e6a55072549a661ff599e7b5112d32"},"query":{"kind":"string","value":"Get the fields available on the action."},"positive_passages":{"kind":"list like","value":[{"docid":"e53d261b0050462f8a70085c68e4eca0","score":"0.0","text":"public function fields()\n {\n $data = \\App\\Collection::query()\n ->orderBy('count', 'DESC')\n ->pluck('name', 'id')\n ->toArray();\n return [\n SelectAutoComplete::make(_(\"加入合集\"), 'collection')->options(\n $data\n ),\n ];\n }","title":""}],"string":"[\n {\n \"docid\": \"e53d261b0050462f8a70085c68e4eca0\",\n \"score\": \"0.0\",\n \"text\": \"public function fields()\\n {\\n $data = \\\\App\\\\Collection::query()\\n ->orderBy('count', 'DESC')\\n ->pluck('name', 'id')\\n ->toArray();\\n return [\\n SelectAutoComplete::make(_(\\\"加入合集\\\"), 'collection')->options(\\n $data\\n ),\\n ];\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"fbcb81ed29ba972b1535b534c6090f35","score":"0.76794356","text":"final private function action_fields() {\n\t\techo json_encode( array(\n\t\t\t'fields' => $this->_fields,\n\t\t\t'required' => $this->_required,\n\t\t));\n\t}","title":""},{"docid":"d0033b2bfffa85cdb4f9369e134ec5d7","score":"0.7256724","text":"public function getFields(): array\n {\n return $this->getParam('fields');\n }","title":""},{"docid":"162710dabcee8c0c68faacf64608cc50","score":"0.7212939","text":"protected function _getActionFields(Request $request, $action = null)\n {\n $controller = $request->controller;\n\n if (is_null($action)) {\n $action = $request->action;\n }\n\n $mc = new ModuleConfig(ConfigType::VIEW(), $controller, $action);\n $result = $mc->parse()->items;\n\n return $result;\n }","title":""},{"docid":"33e93b5f32fb2bad94506250a33e2c09","score":"0.7102856","text":"public function getFields() {}","title":""},{"docid":"33e93b5f32fb2bad94506250a33e2c09","score":"0.7102856","text":"public function getFields() {}","title":""},{"docid":"33e93b5f32fb2bad94506250a33e2c09","score":"0.7102856","text":"public function getFields() {}","title":""},{"docid":"33e93b5f32fb2bad94506250a33e2c09","score":"0.7102856","text":"public function getFields() {}","title":""},{"docid":"c05d1a717598ad7bb2e27bf5fbb76d98","score":"0.70388126","text":"protected function _get_fields() {\n\t\treturn $this->getData( 'fields' );\n\t}","title":""},{"docid":"9ba0c7b6cfac0c5057262a72bdc5915c","score":"0.7022615","text":"public function getFields();","title":""},{"docid":"9ba0c7b6cfac0c5057262a72bdc5915c","score":"0.7022615","text":"public function getFields();","title":""},{"docid":"9ba0c7b6cfac0c5057262a72bdc5915c","score":"0.7022615","text":"public function getFields();","title":""},{"docid":"9ba0c7b6cfac0c5057262a72bdc5915c","score":"0.7022615","text":"public function getFields();","title":""},{"docid":"9ba0c7b6cfac0c5057262a72bdc5915c","score":"0.7022615","text":"public function getFields();","title":""},{"docid":"9ba0c7b6cfac0c5057262a72bdc5915c","score":"0.7022615","text":"public function getFields();","title":""},{"docid":"9ba0c7b6cfac0c5057262a72bdc5915c","score":"0.7022615","text":"public function getFields();","title":""},{"docid":"c79b9464822fba1a9a904c6d8e4bf403","score":"0.70016515","text":"private function getFields()\n {\n return $this->option('fields');\n }","title":""},{"docid":"67bfb1c997ac416471a49903c50f902f","score":"0.6955787","text":"public function fields()\n {\n return $this->query->get('fields', ['*']);\n }","title":""},{"docid":"4e8545111781f7de6a144630f7577cf0","score":"0.6936022","text":"public function getFieldsForExport();","title":""},{"docid":"77d4873ffba80d190a23297fd98ead82","score":"0.6877529","text":"public function fields();","title":""},{"docid":"77d4873ffba80d190a23297fd98ead82","score":"0.6877529","text":"public function fields();","title":""},{"docid":"b7fbfe144ca9c1d034bb7ebf8120f86a","score":"0.6829355","text":"public abstract function getFields();","title":""},{"docid":"a0076042e8dcc2743ee302a5b3374e9e","score":"0.6827416","text":"public function get_fields()\n {\n return $this->fields;\n }","title":""},{"docid":"04007fa8b56716a52dbf21969d240765","score":"0.6823905","text":"public function get_fields(){\n\t\t\treturn $this->attributes();\n\t}","title":""},{"docid":"35517251216a0ee294b86af15172fcfd","score":"0.68228036","text":"protected function fields()\n\t{\n\t\treturn array();\n\t}","title":""},{"docid":"e76c9ad7019caa5ed90b22909a54cf2b","score":"0.68186903","text":"public function fields()\n {\n return $this->fields;\n }","title":""},{"docid":"e76c9ad7019caa5ed90b22909a54cf2b","score":"0.68186903","text":"public function fields()\n {\n return $this->fields;\n }","title":""},{"docid":"e76c9ad7019caa5ed90b22909a54cf2b","score":"0.68186903","text":"public function fields()\n {\n return $this->fields;\n }","title":""},{"docid":"e76c9ad7019caa5ed90b22909a54cf2b","score":"0.68186903","text":"public function fields()\n {\n return $this->fields;\n }","title":""},{"docid":"e76c9ad7019caa5ed90b22909a54cf2b","score":"0.68186903","text":"public function fields()\n {\n return $this->fields;\n }","title":""},{"docid":"e76c9ad7019caa5ed90b22909a54cf2b","score":"0.68186903","text":"public function fields()\n {\n return $this->fields;\n }","title":""},{"docid":"cb675d454d605a8f2247d33929183dc2","score":"0.6801977","text":"public function fields()\n\t{\n\t\treturn $this->fields;\n\t\t\n\t}","title":""},{"docid":"c4678a435e0c24b18b90d6f33d36bea3","score":"0.67854786","text":"public function get_fields() {\n return $this->fields;\n }","title":""},{"docid":"dea4c38826dbcd9bf33e72d715d16fbe","score":"0.67746043","text":"private final function getFields() {\n\t\t\treturn $this->fields;\n\t\t}","title":""},{"docid":"9957355417a37e9320a3b5fa06125d71","score":"0.67366904","text":"public function fields()\n\t{\n\t\treturn $this->_fields;\n\t}","title":""},{"docid":"9957355417a37e9320a3b5fa06125d71","score":"0.67366904","text":"public function fields()\n\t{\n\t\treturn $this->_fields;\n\t}","title":""},{"docid":"031ae34088f6eca8258f16501aeb3872","score":"0.67213905","text":"public function getFieldsForFilter();","title":""},{"docid":"770bebc7101f0f4befaaeb686ac5b048","score":"0.67099893","text":"function getFields () {\n\t\treturn array_merge ($this->_baseFields, $this->_optionalFields);\n\t}","title":""},{"docid":"8d82d2549ea0782bda574ed5da5e8232","score":"0.6700873","text":"public function __get_fields()\n {\n return $this->fillable ? $this->fillable : [];\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"fa5cf309e844eb59a69802e9697d7e64","score":"0.66945714","text":"public function getFields()\n {\n return $this->fields;\n }","title":""},{"docid":"5926e635db4d11dc3118d4079bb27b54","score":"0.6675174","text":"public function getFields() \n {\n return $this->fields;\n }","title":""},{"docid":"e0426a55d01a693558a46ec84ec0518a","score":"0.6665702","text":"public function getFields() {\n return $this->fields;\n }","title":""},{"docid":"a0570da3d2ce5f95a8b0f718c045216e","score":"0.6663916","text":"public function getFields() {\n return $this->fields;\n }","title":""},{"docid":"a0570da3d2ce5f95a8b0f718c045216e","score":"0.6663916","text":"public function getFields() {\n return $this->fields;\n }","title":""},{"docid":"a0570da3d2ce5f95a8b0f718c045216e","score":"0.6663916","text":"public function getFields() {\n return $this->fields;\n }","title":""},{"docid":"728d146684d83a06a517acdf45d45c2d","score":"0.6662549","text":"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}","title":""},{"docid":"728d146684d83a06a517acdf45d45c2d","score":"0.6662549","text":"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}","title":""},{"docid":"728d146684d83a06a517acdf45d45c2d","score":"0.6662549","text":"public function getFields()\n\t{\n\t\treturn $this->fields;\n\t}","title":""},{"docid":"d15667d1030c43621f3350b78d0a58fb","score":"0.66619664","text":"public function getFields() { \n return $this->fields; \n }","title":""},{"docid":"9a9036785bb3d85bf4de91bc5c3f34dc","score":"0.66615903","text":"public function getFields(){\n\t\treturn $this->_fields;\n\t}","title":""},{"docid":"a91b7ad453761ac2b67d0db05ada0b8c","score":"0.66383606","text":"public function getFields() {\n\t\treturn $this->fields;\n\t}","title":""},{"docid":"711a94e5915dec1e5e708c38a142076c","score":"0.6635201","text":"public function getFields()\n {\n return $this->_fields;\n }","title":""},{"docid":"711a94e5915dec1e5e708c38a142076c","score":"0.6635201","text":"public function getFields()\n {\n return $this->_fields;\n }","title":""},{"docid":"711a94e5915dec1e5e708c38a142076c","score":"0.6635201","text":"public function getFields()\n {\n return $this->_fields;\n }","title":""},{"docid":"711a94e5915dec1e5e708c38a142076c","score":"0.6635201","text":"public function getFields()\n {\n return $this->_fields;\n }","title":""},{"docid":"d535168086f097d16f2741a38c0e7f7d","score":"0.6634387","text":"public function fields() {\n return array();\n }","title":""},{"docid":"5f723f232abb6636c6a367fdd4cb648b","score":"0.66184384","text":"public function getFields() {\n return $this->_fields;\n }","title":""},{"docid":"39f885f17c5752de50bc486edbad1325","score":"0.66090715","text":"public function getFields()\n\t{\n\t\treturn $this->_fields;\n\t}","title":""},{"docid":"5eaeee1eeec435551c77103965302005","score":"0.66085863","text":"protected function getFields(): array\n {\n return $this->fields;\n }","title":""},{"docid":"2a092b3dc8ed7652c1f49ae5b1f6ac6f","score":"0.6597802","text":"public function getFields(): array\n {\n return $this->fields;\n }","title":""},{"docid":"2a092b3dc8ed7652c1f49ae5b1f6ac6f","score":"0.6597802","text":"public function getFields(): array\n {\n return $this->fields;\n }","title":""},{"docid":"2a092b3dc8ed7652c1f49ae5b1f6ac6f","score":"0.6597802","text":"public function getFields(): array\n {\n return $this->fields;\n }","title":""},{"docid":"2a092b3dc8ed7652c1f49ae5b1f6ac6f","score":"0.6597802","text":"public function getFields(): array\n {\n return $this->fields;\n }","title":""},{"docid":"a365a525cb46187b44c68bc0d9f9fa09","score":"0.65966916","text":"public function GetFields()\n {\n return $this->fields;\n }","title":""},{"docid":"53d0548f69334b568b4a9cf9de781d80","score":"0.65893567","text":"abstract public function getFields();","title":""},{"docid":"53d0548f69334b568b4a9cf9de781d80","score":"0.65893567","text":"abstract public function getFields();","title":""},{"docid":"ed05faaf734687310751214da07a7dec","score":"0.65858537","text":"public function fields()\n {\n return [\n ];\n }","title":""},{"docid":"769d5d5b2de1dd955d971e0bfad1779b","score":"0.6578913","text":"protected function getFields()\n {\n //not used. please see query for more details.\n return array(\n 'validationid AS id',\n 'id',\n 'type',\n 'view_type',\n 'fix_user_id',\n 'osm_id',\n 'osm_type',\n 'title',\n 'fixmessage',\n 'falsepositive',\n 'question',\n 'bug_question',\n 'latitude',\n 'longitude',\n 'upratings',\n 'downratings',\n 'required_votes',\n 'geom',\n 'txt1',\n 'txt2',\n 'txt3',\n 'txt4',\n 'txt5'\n );\n }","title":""},{"docid":"e5645904a27804b4bfa8da648f30e9bd","score":"0.6569733","text":"protected function fields(): array\n {\n return $this->fields;\n }","title":""},{"docid":"5a9bf1e8781251b27dae507687cfbdc7","score":"0.6567309","text":"public function getFields(): array {\n return $this->fields;\n }","title":""},{"docid":"62cc78c6a53109f8aaebd178e26e23e5","score":"0.6560122","text":"public function getAllFields();","title":""},{"docid":"ddff45333f245b18bc55dd497175ca9f","score":"0.65487885","text":"public function fields(){\n if($this->_fields){\n return $this->_fields;\n }\n\n //$fields = parent::fields();\n\n\n //var_dump(array_keys($fields));\n\n $fields = [\n 'id',\n 'tempId',\n 'title',\n 'postDate',\n 'expiryDate',\n 'dateCreated',\n 'dateUpdated',\n 'enabled',\n 'sectionId',\n 'typeId',\n 'authorId',\n 'newParentId',\n 'revisionCreatorId',\n 'revisionNotes'\n ];\n\n\n if($this->_removeFields){\n // remove fields that contain sensitive information\n foreach($this->_removeFields AS $key) {\n unset($fields[$key]);\n }\n }\n\n /* Return Standard Fields Removing Unset Fields */\n return $fields;\n }","title":""},{"docid":"e9c8f16724e072e3d6760c0d3e89d9d3","score":"0.65424234","text":"public static function listFields(){\n\t\treturn [ \n\t\t\t\"permission_id\",\n\t\t\t\"model_type\",\n\t\t\t\"model_id\" \n\t\t];\n\t}","title":""},{"docid":"4f55d5346433d32d752833663df6db99","score":"0.6522194","text":"public function getFields(): array\n {\n $request = [\n 'id' => $this->id,\n 'student_id' => $this->student_id,\n 'exam_duration' => $this->exam_duration,\n 'course_number' => $this->course_number,\n 'exam_date' => $this->exam_date,\n 'delay' => $this->delay,\n 'paid' => $this->paid,\n 'minStarRating' => $this->min_star_rating,\n 'maxStarRating' => $this->max_star_rating,\n 'dismissed_at' => $this->dismissed_at,\n 'created_at' => $this->created_at,\n ];\n\n if (get_class($this->discipline) !== Reference::class) {\n $request['discipline'] = $this->discipline->getFields();\n }\n if (get_class($this->subject) !== Reference::class) {\n $request['subject'] = $this->subject->getFields();\n }\n if (get_class($this->level) !== Reference::class) {\n $request['level'] = $this->level->getFields();\n }\n if (get_class($this->student) !== Reference::class) {\n $request['student'] = $this->student->getFields();\n }\n if (get_class($this->school) !== Reference::class) {\n $request['school'] = $this->school->getFields();\n }\n\n return $request;\n }","title":""},{"docid":"50bfe33fdf0035632a1b33674ed7f48b","score":"0.6504257","text":"public function getFields()\n {\n $fields = $this->fields;\n\n return $fields;\n }","title":""},{"docid":"38ac10c3c1c7994252b6bb11e79df08e","score":"0.6498773","text":"public function getActionParameters() : array\n {\n return $this->actionParameters;\n }","title":""},{"docid":"c30a8ae081b5592e5887e6400d913f2e","score":"0.6484356","text":"public function fields()\n {\n return $this->fields ? $this->fields->all() : [];\n }","title":""},{"docid":"ed110ff55019d88e0d35e2e1d782b300","score":"0.64816916","text":"public function fields()\n\t{\n\t\t$fields = array_diff_key(\n\t\t\tparent::fields(), \n\t\t\tarray_flip([\n\t\t\t\t'created_at',\n\t\t\t\t'created_by',\n\t\t\t\t'updated_at',\n\t\t\t\t'updated_by',\n\t\t\t])\n\t\t);\n\t\t\t\t\t\t\t\t\t\t\n\t\treturn $fields;\n\t}","title":""},{"docid":"9bd3255dc13049670e6d614314164f9b","score":"0.6472619","text":"public static function viewFields(){\n\t\treturn [ \n\t\t\t\"permission_id\",\n\t\t\t\"model_type\",\n\t\t\t\"model_id\" \n\t\t];\n\t}","title":""},{"docid":"83c74553baef8705ae5814840dcf7b95","score":"0.6470866","text":"private function get_reservation_action_fields() {\n\t\treturn [\n\t\t\t'target' => [\n\t\t\t\t'_default' => null,\n\t\t\t\t'_edit' => true,\n\t\t\t\t'_ret' => '',\n\t\t\t\t'_req' => false,\n\t\t\t\t'_type' => 'multi',\n\t\t\t\t'_desc' => [\n\t\t\t\t\t\\__( 'Target specifications', 'the-seo-framework-extension-manager' ),\n\t\t\t\t\t\\__( 'Specify where the user can complete a reservation.', 'the-seo-framework-extension-manager' ),\n\t\t\t\t],\n\t\t\t\t'_data' => [\n\t\t\t\t\t'is-showif-listener' => '1',\n\t\t\t\t\t'showif' => [\n\t\t\t\t\t\t'department.acceptsReservations.type' => 'accept',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'_fields' => $this->get_reservation_target_fields(),\n\t\t\t],\n\t\t];\n\t}","title":""},{"docid":"4f6ae1c4cac259bd9ea724047f59c9b0","score":"0.6470728","text":"public function getFields (): array\n {\n return $this->fields;\n }","title":""},{"docid":"59b39a640674c21feb2ef6404647a9e4","score":"0.64683706","text":"static function getFields() {\n\t\t// Expect Override\n\t\treturn array();\n\t}","title":""},{"docid":"59b39a640674c21feb2ef6404647a9e4","score":"0.64683706","text":"static function getFields() {\n\t\t// Expect Override\n\t\treturn array();\n\t}","title":""},{"docid":"0805a90c2b19700625c2b0ed533e34dd","score":"0.6464409","text":"public static function fields();","title":""},{"docid":"a1c33356ee56992038a89d5b0f788795","score":"0.6461294","text":"function acfe_form_get_actions(){\n \n return get_query_var('acfe_form_actions', array());\n \n}","title":""},{"docid":"9c9704f407e9756f14f3db3797cd175e","score":"0.6433368","text":"public function fields()\n {\n }","title":""},{"docid":"845b6f1fd412b65c9eaf4a4dc195a40c","score":"0.6428576","text":"abstract public function available_fields();","title":""},{"docid":"6da2cfcf825b689fc1a5b96d758bc90d","score":"0.6427386","text":"public function getFields() {\r\n\t\treturn array('fromaddress', 'toaddress', 'subjectop', 'subject', 'bodyop', 'body', 'matchusing');\r\n\t}","title":""},{"docid":"fbb5d9b77c69d6dd58400d5210deff7f","score":"0.6373995","text":"public function get_fields() {\n $this->maybe_reload_fields();\n\n return $this->fields;\n }","title":""},{"docid":"5152dd464ac5d01d618b5f0d1198e514","score":"0.63738143","text":"private function get_fields() {\r\n /** \r\n * Use the charitable_settings_tab_fields to include the fields for new tabs. \r\n * DO NOT use it to add individual fields. That should be done with the\r\n * filters within each of the methods. \r\n */\r\n return apply_filters( 'charitable_settings_tab_fields', array(\r\n 'general' => $this->get_general_fields(),\r\n 'forms' => $this->get_form_fields(),\r\n 'gateways' => $this->get_gateway_fields() \r\n ) );\r\n }","title":""},{"docid":"bdaa3030cea54b44e25196d7612faee8","score":"0.63716227","text":"public function fields()\n {\n return [];\n }","title":""},{"docid":"bdaa3030cea54b44e25196d7612faee8","score":"0.63716227","text":"public function fields()\n {\n return [];\n }","title":""}],"string":"[\n {\n \"docid\": \"fbcb81ed29ba972b1535b534c6090f35\",\n \"score\": \"0.76794356\",\n \"text\": \"final private function action_fields() {\\n\\t\\techo json_encode( array(\\n\\t\\t\\t'fields' => $this->_fields,\\n\\t\\t\\t'required' => $this->_required,\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0033b2bfffa85cdb4f9369e134ec5d7\",\n \"score\": \"0.7256724\",\n \"text\": \"public function getFields(): array\\n {\\n return $this->getParam('fields');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"162710dabcee8c0c68faacf64608cc50\",\n \"score\": \"0.7212939\",\n \"text\": \"protected function _getActionFields(Request $request, $action = null)\\n {\\n $controller = $request->controller;\\n\\n if (is_null($action)) {\\n $action = $request->action;\\n }\\n\\n $mc = new ModuleConfig(ConfigType::VIEW(), $controller, $action);\\n $result = $mc->parse()->items;\\n\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33e93b5f32fb2bad94506250a33e2c09\",\n \"score\": \"0.7102856\",\n \"text\": \"public function getFields() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33e93b5f32fb2bad94506250a33e2c09\",\n \"score\": \"0.7102856\",\n \"text\": \"public function getFields() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33e93b5f32fb2bad94506250a33e2c09\",\n \"score\": \"0.7102856\",\n \"text\": \"public function getFields() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33e93b5f32fb2bad94506250a33e2c09\",\n \"score\": \"0.7102856\",\n \"text\": \"public function getFields() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c05d1a717598ad7bb2e27bf5fbb76d98\",\n \"score\": \"0.70388126\",\n \"text\": \"protected function _get_fields() {\\n\\t\\treturn $this->getData( 'fields' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba0c7b6cfac0c5057262a72bdc5915c\",\n \"score\": \"0.7022615\",\n \"text\": \"public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba0c7b6cfac0c5057262a72bdc5915c\",\n \"score\": \"0.7022615\",\n \"text\": \"public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba0c7b6cfac0c5057262a72bdc5915c\",\n \"score\": \"0.7022615\",\n \"text\": \"public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba0c7b6cfac0c5057262a72bdc5915c\",\n \"score\": \"0.7022615\",\n \"text\": \"public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba0c7b6cfac0c5057262a72bdc5915c\",\n \"score\": \"0.7022615\",\n \"text\": \"public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba0c7b6cfac0c5057262a72bdc5915c\",\n \"score\": \"0.7022615\",\n \"text\": \"public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba0c7b6cfac0c5057262a72bdc5915c\",\n \"score\": \"0.7022615\",\n \"text\": \"public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c79b9464822fba1a9a904c6d8e4bf403\",\n \"score\": \"0.70016515\",\n \"text\": \"private function getFields()\\n {\\n return $this->option('fields');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67bfb1c997ac416471a49903c50f902f\",\n \"score\": \"0.6955787\",\n \"text\": \"public function fields()\\n {\\n return $this->query->get('fields', ['*']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e8545111781f7de6a144630f7577cf0\",\n \"score\": \"0.6936022\",\n \"text\": \"public function getFieldsForExport();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77d4873ffba80d190a23297fd98ead82\",\n \"score\": \"0.6877529\",\n \"text\": \"public function fields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77d4873ffba80d190a23297fd98ead82\",\n \"score\": \"0.6877529\",\n \"text\": \"public function fields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7fbfe144ca9c1d034bb7ebf8120f86a\",\n \"score\": \"0.6829355\",\n \"text\": \"public abstract function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0076042e8dcc2743ee302a5b3374e9e\",\n \"score\": \"0.6827416\",\n \"text\": \"public function get_fields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04007fa8b56716a52dbf21969d240765\",\n \"score\": \"0.6823905\",\n \"text\": \"public function get_fields(){\\n\\t\\t\\treturn $this->attributes();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35517251216a0ee294b86af15172fcfd\",\n \"score\": \"0.68228036\",\n \"text\": \"protected function fields()\\n\\t{\\n\\t\\treturn array();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e76c9ad7019caa5ed90b22909a54cf2b\",\n \"score\": \"0.68186903\",\n \"text\": \"public function fields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e76c9ad7019caa5ed90b22909a54cf2b\",\n \"score\": \"0.68186903\",\n \"text\": \"public function fields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e76c9ad7019caa5ed90b22909a54cf2b\",\n \"score\": \"0.68186903\",\n \"text\": \"public function fields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e76c9ad7019caa5ed90b22909a54cf2b\",\n \"score\": \"0.68186903\",\n \"text\": \"public function fields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e76c9ad7019caa5ed90b22909a54cf2b\",\n \"score\": \"0.68186903\",\n \"text\": \"public function fields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e76c9ad7019caa5ed90b22909a54cf2b\",\n \"score\": \"0.68186903\",\n \"text\": \"public function fields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb675d454d605a8f2247d33929183dc2\",\n \"score\": \"0.6801977\",\n \"text\": \"public function fields()\\n\\t{\\n\\t\\treturn $this->fields;\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4678a435e0c24b18b90d6f33d36bea3\",\n \"score\": \"0.67854786\",\n \"text\": \"public function get_fields() {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dea4c38826dbcd9bf33e72d715d16fbe\",\n \"score\": \"0.67746043\",\n \"text\": \"private final function getFields() {\\n\\t\\t\\treturn $this->fields;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9957355417a37e9320a3b5fa06125d71\",\n \"score\": \"0.67366904\",\n \"text\": \"public function fields()\\n\\t{\\n\\t\\treturn $this->_fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9957355417a37e9320a3b5fa06125d71\",\n \"score\": \"0.67366904\",\n \"text\": \"public function fields()\\n\\t{\\n\\t\\treturn $this->_fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"031ae34088f6eca8258f16501aeb3872\",\n \"score\": \"0.67213905\",\n \"text\": \"public function getFieldsForFilter();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"770bebc7101f0f4befaaeb686ac5b048\",\n \"score\": \"0.67099893\",\n \"text\": \"function getFields () {\\n\\t\\treturn array_merge ($this->_baseFields, $this->_optionalFields);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d82d2549ea0782bda574ed5da5e8232\",\n \"score\": \"0.6700873\",\n \"text\": \"public function __get_fields()\\n {\\n return $this->fillable ? $this->fillable : [];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa5cf309e844eb59a69802e9697d7e64\",\n \"score\": \"0.66945714\",\n \"text\": \"public function getFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5926e635db4d11dc3118d4079bb27b54\",\n \"score\": \"0.6675174\",\n \"text\": \"public function getFields() \\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0426a55d01a693558a46ec84ec0518a\",\n \"score\": \"0.6665702\",\n \"text\": \"public function getFields() {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0570da3d2ce5f95a8b0f718c045216e\",\n \"score\": \"0.6663916\",\n \"text\": \"public function getFields() {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0570da3d2ce5f95a8b0f718c045216e\",\n \"score\": \"0.6663916\",\n \"text\": \"public function getFields() {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0570da3d2ce5f95a8b0f718c045216e\",\n \"score\": \"0.6663916\",\n \"text\": \"public function getFields() {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"728d146684d83a06a517acdf45d45c2d\",\n \"score\": \"0.6662549\",\n \"text\": \"public function getFields()\\n\\t{\\n\\t\\treturn $this->fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"728d146684d83a06a517acdf45d45c2d\",\n \"score\": \"0.6662549\",\n \"text\": \"public function getFields()\\n\\t{\\n\\t\\treturn $this->fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"728d146684d83a06a517acdf45d45c2d\",\n \"score\": \"0.6662549\",\n \"text\": \"public function getFields()\\n\\t{\\n\\t\\treturn $this->fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d15667d1030c43621f3350b78d0a58fb\",\n \"score\": \"0.66619664\",\n \"text\": \"public function getFields() { \\n return $this->fields; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a9036785bb3d85bf4de91bc5c3f34dc\",\n \"score\": \"0.66615903\",\n \"text\": \"public function getFields(){\\n\\t\\treturn $this->_fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a91b7ad453761ac2b67d0db05ada0b8c\",\n \"score\": \"0.66383606\",\n \"text\": \"public function getFields() {\\n\\t\\treturn $this->fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"711a94e5915dec1e5e708c38a142076c\",\n \"score\": \"0.6635201\",\n \"text\": \"public function getFields()\\n {\\n return $this->_fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"711a94e5915dec1e5e708c38a142076c\",\n \"score\": \"0.6635201\",\n \"text\": \"public function getFields()\\n {\\n return $this->_fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"711a94e5915dec1e5e708c38a142076c\",\n \"score\": \"0.6635201\",\n \"text\": \"public function getFields()\\n {\\n return $this->_fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"711a94e5915dec1e5e708c38a142076c\",\n \"score\": \"0.6635201\",\n \"text\": \"public function getFields()\\n {\\n return $this->_fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d535168086f097d16f2741a38c0e7f7d\",\n \"score\": \"0.6634387\",\n \"text\": \"public function fields() {\\n return array();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f723f232abb6636c6a367fdd4cb648b\",\n \"score\": \"0.66184384\",\n \"text\": \"public function getFields() {\\n return $this->_fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39f885f17c5752de50bc486edbad1325\",\n \"score\": \"0.66090715\",\n \"text\": \"public function getFields()\\n\\t{\\n\\t\\treturn $this->_fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5eaeee1eeec435551c77103965302005\",\n \"score\": \"0.66085863\",\n \"text\": \"protected function getFields(): array\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a092b3dc8ed7652c1f49ae5b1f6ac6f\",\n \"score\": \"0.6597802\",\n \"text\": \"public function getFields(): array\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a092b3dc8ed7652c1f49ae5b1f6ac6f\",\n \"score\": \"0.6597802\",\n \"text\": \"public function getFields(): array\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a092b3dc8ed7652c1f49ae5b1f6ac6f\",\n \"score\": \"0.6597802\",\n \"text\": \"public function getFields(): array\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a092b3dc8ed7652c1f49ae5b1f6ac6f\",\n \"score\": \"0.6597802\",\n \"text\": \"public function getFields(): array\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a365a525cb46187b44c68bc0d9f9fa09\",\n \"score\": \"0.65966916\",\n \"text\": \"public function GetFields()\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53d0548f69334b568b4a9cf9de781d80\",\n \"score\": \"0.65893567\",\n \"text\": \"abstract public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53d0548f69334b568b4a9cf9de781d80\",\n \"score\": \"0.65893567\",\n \"text\": \"abstract public function getFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed05faaf734687310751214da07a7dec\",\n \"score\": \"0.65858537\",\n \"text\": \"public function fields()\\n {\\n return [\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"769d5d5b2de1dd955d971e0bfad1779b\",\n \"score\": \"0.6578913\",\n \"text\": \"protected function getFields()\\n {\\n //not used. please see query for more details.\\n return array(\\n 'validationid AS id',\\n 'id',\\n 'type',\\n 'view_type',\\n 'fix_user_id',\\n 'osm_id',\\n 'osm_type',\\n 'title',\\n 'fixmessage',\\n 'falsepositive',\\n 'question',\\n 'bug_question',\\n 'latitude',\\n 'longitude',\\n 'upratings',\\n 'downratings',\\n 'required_votes',\\n 'geom',\\n 'txt1',\\n 'txt2',\\n 'txt3',\\n 'txt4',\\n 'txt5'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5645904a27804b4bfa8da648f30e9bd\",\n \"score\": \"0.6569733\",\n \"text\": \"protected function fields(): array\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a9bf1e8781251b27dae507687cfbdc7\",\n \"score\": \"0.6567309\",\n \"text\": \"public function getFields(): array {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62cc78c6a53109f8aaebd178e26e23e5\",\n \"score\": \"0.6560122\",\n \"text\": \"public function getAllFields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddff45333f245b18bc55dd497175ca9f\",\n \"score\": \"0.65487885\",\n \"text\": \"public function fields(){\\n if($this->_fields){\\n return $this->_fields;\\n }\\n\\n //$fields = parent::fields();\\n\\n\\n //var_dump(array_keys($fields));\\n\\n $fields = [\\n 'id',\\n 'tempId',\\n 'title',\\n 'postDate',\\n 'expiryDate',\\n 'dateCreated',\\n 'dateUpdated',\\n 'enabled',\\n 'sectionId',\\n 'typeId',\\n 'authorId',\\n 'newParentId',\\n 'revisionCreatorId',\\n 'revisionNotes'\\n ];\\n\\n\\n if($this->_removeFields){\\n // remove fields that contain sensitive information\\n foreach($this->_removeFields AS $key) {\\n unset($fields[$key]);\\n }\\n }\\n\\n /* Return Standard Fields Removing Unset Fields */\\n return $fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9c8f16724e072e3d6760c0d3e89d9d3\",\n \"score\": \"0.65424234\",\n \"text\": \"public static function listFields(){\\n\\t\\treturn [ \\n\\t\\t\\t\\\"permission_id\\\",\\n\\t\\t\\t\\\"model_type\\\",\\n\\t\\t\\t\\\"model_id\\\" \\n\\t\\t];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f55d5346433d32d752833663df6db99\",\n \"score\": \"0.6522194\",\n \"text\": \"public function getFields(): array\\n {\\n $request = [\\n 'id' => $this->id,\\n 'student_id' => $this->student_id,\\n 'exam_duration' => $this->exam_duration,\\n 'course_number' => $this->course_number,\\n 'exam_date' => $this->exam_date,\\n 'delay' => $this->delay,\\n 'paid' => $this->paid,\\n 'minStarRating' => $this->min_star_rating,\\n 'maxStarRating' => $this->max_star_rating,\\n 'dismissed_at' => $this->dismissed_at,\\n 'created_at' => $this->created_at,\\n ];\\n\\n if (get_class($this->discipline) !== Reference::class) {\\n $request['discipline'] = $this->discipline->getFields();\\n }\\n if (get_class($this->subject) !== Reference::class) {\\n $request['subject'] = $this->subject->getFields();\\n }\\n if (get_class($this->level) !== Reference::class) {\\n $request['level'] = $this->level->getFields();\\n }\\n if (get_class($this->student) !== Reference::class) {\\n $request['student'] = $this->student->getFields();\\n }\\n if (get_class($this->school) !== Reference::class) {\\n $request['school'] = $this->school->getFields();\\n }\\n\\n return $request;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50bfe33fdf0035632a1b33674ed7f48b\",\n \"score\": \"0.6504257\",\n \"text\": \"public function getFields()\\n {\\n $fields = $this->fields;\\n\\n return $fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38ac10c3c1c7994252b6bb11e79df08e\",\n \"score\": \"0.6498773\",\n \"text\": \"public function getActionParameters() : array\\n {\\n return $this->actionParameters;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c30a8ae081b5592e5887e6400d913f2e\",\n \"score\": \"0.6484356\",\n \"text\": \"public function fields()\\n {\\n return $this->fields ? $this->fields->all() : [];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed110ff55019d88e0d35e2e1d782b300\",\n \"score\": \"0.64816916\",\n \"text\": \"public function fields()\\n\\t{\\n\\t\\t$fields = array_diff_key(\\n\\t\\t\\tparent::fields(), \\n\\t\\t\\tarray_flip([\\n\\t\\t\\t\\t'created_at',\\n\\t\\t\\t\\t'created_by',\\n\\t\\t\\t\\t'updated_at',\\n\\t\\t\\t\\t'updated_by',\\n\\t\\t\\t])\\n\\t\\t);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\treturn $fields;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9bd3255dc13049670e6d614314164f9b\",\n \"score\": \"0.6472619\",\n \"text\": \"public static function viewFields(){\\n\\t\\treturn [ \\n\\t\\t\\t\\\"permission_id\\\",\\n\\t\\t\\t\\\"model_type\\\",\\n\\t\\t\\t\\\"model_id\\\" \\n\\t\\t];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83c74553baef8705ae5814840dcf7b95\",\n \"score\": \"0.6470866\",\n \"text\": \"private function get_reservation_action_fields() {\\n\\t\\treturn [\\n\\t\\t\\t'target' => [\\n\\t\\t\\t\\t'_default' => null,\\n\\t\\t\\t\\t'_edit' => true,\\n\\t\\t\\t\\t'_ret' => '',\\n\\t\\t\\t\\t'_req' => false,\\n\\t\\t\\t\\t'_type' => 'multi',\\n\\t\\t\\t\\t'_desc' => [\\n\\t\\t\\t\\t\\t\\\\__( 'Target specifications', 'the-seo-framework-extension-manager' ),\\n\\t\\t\\t\\t\\t\\\\__( 'Specify where the user can complete a reservation.', 'the-seo-framework-extension-manager' ),\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t'_data' => [\\n\\t\\t\\t\\t\\t'is-showif-listener' => '1',\\n\\t\\t\\t\\t\\t'showif' => [\\n\\t\\t\\t\\t\\t\\t'department.acceptsReservations.type' => 'accept',\\n\\t\\t\\t\\t\\t],\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t'_fields' => $this->get_reservation_target_fields(),\\n\\t\\t\\t],\\n\\t\\t];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f6ae1c4cac259bd9ea724047f59c9b0\",\n \"score\": \"0.6470728\",\n \"text\": \"public function getFields (): array\\n {\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59b39a640674c21feb2ef6404647a9e4\",\n \"score\": \"0.64683706\",\n \"text\": \"static function getFields() {\\n\\t\\t// Expect Override\\n\\t\\treturn array();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59b39a640674c21feb2ef6404647a9e4\",\n \"score\": \"0.64683706\",\n \"text\": \"static function getFields() {\\n\\t\\t// Expect Override\\n\\t\\treturn array();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0805a90c2b19700625c2b0ed533e34dd\",\n \"score\": \"0.6464409\",\n \"text\": \"public static function fields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1c33356ee56992038a89d5b0f788795\",\n \"score\": \"0.6461294\",\n \"text\": \"function acfe_form_get_actions(){\\n \\n return get_query_var('acfe_form_actions', array());\\n \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c9704f407e9756f14f3db3797cd175e\",\n \"score\": \"0.6433368\",\n \"text\": \"public function fields()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"845b6f1fd412b65c9eaf4a4dc195a40c\",\n \"score\": \"0.6428576\",\n \"text\": \"abstract public function available_fields();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6da2cfcf825b689fc1a5b96d758bc90d\",\n \"score\": \"0.6427386\",\n \"text\": \"public function getFields() {\\r\\n\\t\\treturn array('fromaddress', 'toaddress', 'subjectop', 'subject', 'bodyop', 'body', 'matchusing');\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbb5d9b77c69d6dd58400d5210deff7f\",\n \"score\": \"0.6373995\",\n \"text\": \"public function get_fields() {\\n $this->maybe_reload_fields();\\n\\n return $this->fields;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5152dd464ac5d01d618b5f0d1198e514\",\n \"score\": \"0.63738143\",\n \"text\": \"private function get_fields() {\\r\\n /** \\r\\n * Use the charitable_settings_tab_fields to include the fields for new tabs. \\r\\n * DO NOT use it to add individual fields. That should be done with the\\r\\n * filters within each of the methods. \\r\\n */\\r\\n return apply_filters( 'charitable_settings_tab_fields', array(\\r\\n 'general' => $this->get_general_fields(),\\r\\n 'forms' => $this->get_form_fields(),\\r\\n 'gateways' => $this->get_gateway_fields() \\r\\n ) );\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdaa3030cea54b44e25196d7612faee8\",\n \"score\": \"0.63716227\",\n \"text\": \"public function fields()\\n {\\n return [];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdaa3030cea54b44e25196d7612faee8\",\n \"score\": \"0.63716227\",\n \"text\": \"public function fields()\\n {\\n return [];\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":720,"cells":{"query_id":{"kind":"string","value":"3db22ff6ebfcb14b7c19b8e39f7b2bd3"},"query":{"kind":"string","value":"Function for generating vouchers."},"positive_passages":{"kind":"list like","value":[{"docid":"1dc1ad0ec001109058d7d380b00df31f","score":"0.4653837","text":"public function generateVoucher($minutes = 60, $count = 1, $numberOfUsage = 4, $note = null, $upSpeed = null, $downSpeed = null, $totalMB = null)\n {\n return self::$uniFiClient->create_voucher($minutes, $count, $numberOfUsage, $note, $upSpeed, $downSpeed, $totalMB);\n }","title":""}],"string":"[\n {\n \"docid\": \"1dc1ad0ec001109058d7d380b00df31f\",\n \"score\": \"0.4653837\",\n \"text\": \"public function generateVoucher($minutes = 60, $count = 1, $numberOfUsage = 4, $note = null, $upSpeed = null, $downSpeed = null, $totalMB = null)\\n {\\n return self::$uniFiClient->create_voucher($minutes, $count, $numberOfUsage, $note, $upSpeed, $downSpeed, $totalMB);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"c4c9f4e5070adf19f9913662f8bf5672","score":"0.6959568","text":"public function action_generate()\n {\n\n $id_offer = Input::post(\"id_offer_gen\");\n $expiration_date = Input::post(\"date_expiration\");\n\n $recipients = \\Model_Recipient::find('all');\n\n // Loop between recipients to create the vouchers\n foreach ($recipients as $r) {\n\n // Create a new voucher record\n $voucher = new \\Model_Voucher();\n $voucher->id_recipient = $r->id_recipient;\n $voucher->id_offer = $id_offer;\n $voucher->date_expiration = $expiration_date;\n $voucher->date_usage = NULL;\n $voucher->code = $this->generateVoucherCode(); // generate random code\n\n $voucher->save();\n\n }\n\n Session::set_flash(\"success\", \"All vouchers have been generated sucessfully.\");\n Response::redirect_back();\n\n }","title":""},{"docid":"375bdd073345bfc6809a0e83809d267a","score":"0.63281393","text":"public function getVouchersList()\n {\n $vouchers = self::$uniFiClient->stat_voucher();\n $date = new \\DateTime();\n\n foreach ($vouchers as $voucher) {\n $interval = new \\DateInterval('PT' . $voucher->duration . 'M');\n $created = new \\DateTime();\n $created->setTimestamp($voucher->create_time);\n\n if ($created->add($interval) < $date) {\n $voucher->invalid = true;\n } else {\n $voucher->invalid = false;\n }\n }\n\n return $vouchers;\n }","title":""},{"docid":"c6741e633250f943fd1db4bd11f22dfd","score":"0.5916995","text":"private function setUpForAvailableVouchersTests()\n {\n\n $vouchers = [];\n $vouchers[0] = factory(Voucher::class)->create([\n 'public_name' => 'no limits applied',\n ]);\n $vouchers[1] = factory(Voucher::class)->create([\n 'public_name' => 'no limits applied, not published',\n ]);\n $vouchers[2] = factory(Voucher::class)->create([\n 'public_name' => 'expired, no limits applied',\n ]);\n $vouchers[3] = factory(Voucher::class)->create([\n 'public_name' => 'limit_per_account set to 1',\n ]);\n $vouchers[4] = factory(Voucher::class)->create([\n 'public_name' => 'limit_pet_required set to 1',\n ]);\n $vouchers[5] = factory(Voucher::class)->create([\n 'public_name' => 'limit_species_id set to 1',\n ]);\n $vouchers[6] = factory(Voucher::class)->create([\n 'public_name' => 'limit_per_pet set to 2',\n ]);\n\n $consumers = [];\n $consumers[0] = factory(Consumer::class)->create([\n 'first_name' => 'No Pets',\n 'last_name' => \"One coupon for {$vouchers[3]->id}\",\n ]);\n $consumers[1] = factory(Consumer::class)->create([\n 'first_name' => 'No Pets',\n 'last_name' => 'No Coupons',\n ]);\n $consumers[2] = factory(Consumer::class)->create([\n 'first_name' => 'One pet, species id 1',\n 'last_name' => \"One coupon, for {$vouchers[3]->id}\",\n ]);\n $consumers[3] = factory(Consumer::class)->create([\n 'first_name' => 'One pet, species id 2',\n 'last_name' => \"One coupon, for {$vouchers[3]->id}\",\n ]);\n $consumers[4] = factory(Consumer::class)->create([\n 'first_name' => 'One pet, species id 1',\n 'last_name' => 'No Coupons',\n ]);\n $consumers[5] = factory(Consumer::class)->create([\n 'first_name' => 'One pet, species id 2',\n 'last_name' => 'No Coupons',\n ]);\n\n// $consumers = factory(Consumer::class, 6)->create();\n\n $vouchers[0]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[0]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[0]->limit_per_account = 0;\n $vouchers[0]->limit_per_account_per_date_period = '0';\n $vouchers[0]->limit_pet_required = 0;\n $vouchers[0]->limit_per_pet = 0;\n $vouchers[0]->limit_species_id = null;\n $vouchers[0]->published = 1;\n $vouchers[0]->save();\n\n $vouchers[1]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[1]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[1]->limit_per_account = 0;\n $vouchers[1]->limit_per_account_per_date_period = '0';\n $vouchers[1]->limit_pet_required = 0;\n $vouchers[1]->limit_per_pet = 0;\n $vouchers[1]->limit_species_id = null;\n $vouchers[1]->published = 0;\n $vouchers[1]->save();\n\n $vouchers[2]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[2]->subscribe_to_date = Carbon::now()->subDays(5);\n $vouchers[2]->limit_per_account = 0;\n $vouchers[2]->limit_per_account_per_date_period = '0';\n $vouchers[2]->limit_pet_required = 0;\n $vouchers[2]->limit_per_pet = 0;\n $vouchers[2]->limit_species_id = null;\n $vouchers[2]->published = 1;\n $vouchers[2]->save();\n\n $vouchers[3]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[3]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[3]->limit_per_account = 1;\n $vouchers[3]->limit_per_account_per_date_period = '0';\n $vouchers[3]->limit_pet_required = 0;\n $vouchers[3]->limit_per_pet = 0;\n $vouchers[3]->limit_species_id = null;\n $vouchers[3]->published = 1;\n $vouchers[3]->save();\n\n $vouchers[4]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[4]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[4]->limit_per_account = 0;\n $vouchers[4]->limit_per_account_per_date_period = '0';\n $vouchers[4]->limit_pet_required = 1;\n $vouchers[4]->limit_per_pet = 0;\n $vouchers[4]->limit_species_id = null;\n $vouchers[4]->published = 1;\n $vouchers[4]->save();\n\n $vouchers[5]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[5]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[5]->limit_per_account = 0;\n $vouchers[5]->limit_per_account_per_date_period = '0';\n $vouchers[5]->limit_pet_required = 1;\n $vouchers[5]->limit_per_pet = 0;\n $vouchers[5]->limit_species_id = 1;\n $vouchers[5]->published = 1;\n $vouchers[5]->save();\n\n $vouchers[6]->subscribe_from_date = Carbon::now()->subDays(10);\n $vouchers[6]->subscribe_to_date = Carbon::now()->addDays(10);\n $vouchers[6]->limit_per_account = 0;\n $vouchers[6]->limit_per_account_per_date_period = '0';\n $vouchers[6]->limit_pet_required = 1;\n $vouchers[6]->limit_per_pet = 2;\n $vouchers[6]->limit_species_id = null;\n $vouchers[6]->published = 1;\n $vouchers[6]->save();\n\n $coupons = [];\n $coupons[0] = new Coupon(\n [\n 'voucher_id' => $vouchers[3]->id,\n 'restrict_consumer_id' => $consumers[0]->id,\n 'issued_at' => now(),\n 'valid_from' => now(),\n 'valid_to' => now(),\n ]\n );\n $coupons[0]->save();\n\n $coupons[1] = new Coupon(\n [\n 'voucher_id' => $vouchers[3]->id,\n 'restrict_consumer_id' => $consumers[2]->id,\n 'issued_at' => now(),\n 'valid_from' => now(),\n 'valid_to' => now(),\n ]\n );\n $coupons[1]->save();\n\n $coupons[2] = new Coupon(\n [\n 'voucher_id' => $vouchers[3]->id,\n 'restrict_consumer_id' => $consumers[3]->id,\n 'issued_at' => now(),\n 'valid_from' => now(),\n 'valid_to' => now(),\n ]\n );\n $coupons[2]->save();\n\n $pets = [];\n $pets[0] = new Pet(\n [\n 'consumer_id' => $consumers[2]->id,\n 'pet_name' => 'Pet 0',\n 'pet_dob' => Carbon::now()->subDays(90),\n 'breed_id' => \\App\\Breed::where('species_id', '=', 1)->get()->random(1)->first()->id,\n 'pet_gender' => 'male',\n ]\n );\n $pets[0]->save();\n\n $pets[1] = new Pet(\n [\n 'consumer_id' => $consumers[3]->id,\n 'pet_name' => 'Pet 1',\n 'pet_dob' => Carbon::now()->subDays(90),\n 'breed_id' => \\App\\Breed::where('species_id', '=', 2)->get()->random(1)->first()->id,\n 'pet_gender' => 'male',\n ]\n );\n $pets[1]->save();\n\n $pets[2] = new Pet(\n [\n 'consumer_id' => $consumers[4]->id,\n 'pet_name' => 'Pet 2',\n 'pet_dob' => Carbon::now()->subDays(90),\n 'breed_id' => \\App\\Breed::where('species_id', '=', 1)->get()->random(1)->first()->id,\n 'pet_gender' => 'male',\n ]\n );\n $pets[2]->save();\n\n $pets[3] = new Pet(\n [\n 'consumer_id' => $consumers[5]->id,\n 'pet_name' => 'Pet 3',\n 'pet_dob' => Carbon::now()->subDays(90),\n 'breed_id' => \\App\\Breed::where('species_id', '=', 2)->get()->random(1)->first()->id,\n 'pet_gender' => 'male',\n ]\n );\n $pets[3]->save();\n\n return [\n 'pets' => $pets,\n 'coupons' => $coupons,\n 'vouchers' => $vouchers,\n 'consumers' => $consumers,\n ];\n }","title":""},{"docid":"091bf4b542599fce076107fff5ece739","score":"0.5757781","text":"public function vouchers()\n {\n return $this->hasMany(Voucher::class);\n }","title":""},{"docid":"091bf4b542599fce076107fff5ece739","score":"0.5757781","text":"public function vouchers()\n {\n return $this->hasMany(Voucher::class);\n }","title":""},{"docid":"b312f22bc0fb3b7c23e113aee8fb6ff9","score":"0.57561255","text":"public function generateVoucher(Request $request)\n {\n DB::beginTransaction();\n try {\n $date_time = date('Y-m-d H:i:s');\n if (!empty($request->offer)) {\n if (!empty($request->offer['id'])) {\n $offer_id = $request->offer['id'];\n } else {\n $offer = Offer::create([\n 'name' => $request->offer['name'],\n 'discount' => $request->offer['discount'],\n ]);\n $offer_id = $offer->id;\n }\n }\n\n if (!empty($request->customer)) {\n if (!empty($request->customer['id'])) {\n $customer_id = $request->customer['id'];\n } else {\n $customer = Customer::whereEmail($request->customer['email'])->first();\n if (!empty($customer)) {\n return response()->json(['status' => 400, 'message' => 'Customer email already exist']);\n } else {\n $customer = Customer::create([\n 'name' => $request->customer['name'],\n 'email' => $request->customer['email'],\n ]);\n }\n $customer_id = $customer->id;\n }\n }\n $voucher_data = [\n 'expire_date' => date('Y-m-d', strtotime('+3 days', strtotime(date('Y-m-d')))),\n 'is_active' => 'true',\n 'offer_id' => $offer_id,\n 'customer_id' => $customer_id,\n 'code' => mb_substr(rand(100000000, strtotime(date('Y-m-d H:i:s'))), 0, 8)\n ];\n $voucher = Voucher::create($voucher_data);\n DB::commit();\n return response()->json(['data' => $voucher], 200);\n } catch (\\Exception $e) {\n DB::rollBack();\n return response()->json(['status' => false, 'message' => $e->getMessage()]);\n }\n }","title":""},{"docid":"e951b7eae13747edd5d577a234f5ace4","score":"0.57287276","text":"public function createVouchers(int $amount, ?Closure $callback = null)\n {\n $vouchers = new Vouchers();\n\n if ($callback) {\n $callback($vouchers);\n }\n\n return $vouchers->withOwner($this)->create($amount);\n }","title":""},{"docid":"1f8229da956f4c300dff281142f62d8e","score":"0.5600894","text":"public function testGetAvailableVouchersNoPetsWithCoupon()\n {\n extract($this->setUpForAvailableVouchersTests());\n\n $response = $this->actingAs(User::first())\n ->json(\n 'GET',\n $this->baseurl . 'consumer/' . $consumers[0]->uuid . '/available_vouchers'\n )\n ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'vouchers_available' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n 'invalid_vouchers' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n ]\n )\n ->getData();\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n }","title":""},{"docid":"7cd155953b82557d2ba3e3423e2b9985","score":"0.5579743","text":"public function generateGiftVouchers($length = 20) {\n $allowedCharacters = '23456789abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($allowedCharacters);\n $giftVoucherCode = '';\n for ($i = 0; $i < $length; $i++) {\n $giftVoucherCode .= $allowedCharacters[mt_rand(0, $charactersLength - 1)];\n\n }\n return $giftVoucherCode;\n }","title":""},{"docid":"7ad94feb60780bc875225befefe463c3","score":"0.55547756","text":"public function testCreateVouchersWithCallback(): void\n {\n $user = factory(User::class)->create();\n $color = factory(Color::class)->create();\n $vouchers = $user->createVouchers(3, function (Vouchers $vouchers) use ($color) {\n $vouchers->withEntities($color);\n });\n\n foreach ($vouchers as $index => $voucher) {\n // Check user voucher relation.\n $this->assertTrue($voucher->is($user->vouchers[$index]));\n $this->assertTrue($voucher->is($user->voucherEntities[$index]->voucher));\n $this->assertTrue($color->is($voucher->getEntities(Color::class)->first()));\n }\n }","title":""},{"docid":"571fed3a3632d1a3a1f8ac2829eda7a8","score":"0.55030686","text":"public function testGetAvailableVouchersOnePetWithCoupon()\n {\n extract($this->setUpForAvailableVouchersTests());\n\n $response = $this->actingAs(User::first())\n ->json(\n 'GET',\n $this->baseurl . 'consumer/' . $consumers[2]->uuid . '/available_vouchers'\n )\n ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'vouchers_available' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n 'invalid_vouchers' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n ]\n )\n ->getData();\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n }","title":""},{"docid":"956d9cf9b60cb52c51ea63164bf796cc","score":"0.54982483","text":"private function generateVoucherCode() {\n\t\t// generate voucher code\n\t\twp_send_json(\n\t\t\tarray(\n\t\t\t\t'success' => TRUE,\n\t\t\t\t'code' => LaterPay_Helper_Voucher::generateVoucherCode(),\n\t\t\t));\n\t}","title":""},{"docid":"cbb570a41de110110abf31617970d614","score":"0.5445817","text":"public function createVirtualUsers_get() {\n\n $tlds = array(\"com\");\n $char = \"0123456789abcdefghijklmnopqrstuvwxyz\";\n $Limit = 5000;\n $Names = $this->Utility_model->getDummyNames($Limit);\n for ($j = 0; $j < $Limit; $j++) {\n $UserName = $Names[$j]['names'];\n $UserUnique = str_replace(\" \", \"\", $UserName);\n $ulen = mt_rand(5, 10);\n $dlen = mt_rand(7, 17);\n $email = \"\";\n for ($i = 1; $i <= $ulen; $i++) {\n $email .= substr($char, mt_rand(0, strlen($char)), 1);\n }\n $email .= \"@\";\n $email .= \"gmail\";\n $email .= \".\";\n $email .= $tlds[mt_rand(0, (sizeof($tlds) - 1))];\n $username = strtolower($UserUnique) . substr(md5(microtime()), rand(0, 26), 4);\n $Input = array();\n $Input['Email'] = $username . \"@gmail.com\";\n $Input['Username'] = $username;\n $Input['FirstName'] = $UserName;\n $Input['Password'] = 'A@123456';\n $Input['Source'] = \"Direct\";\n $Input['PanStatus'] = 2;\n $Input['BankStatus'] = 2;\n $Input['DocumentStatus'] = 2;\n $UserID = $this->Users_model->addUser($Input, 3, 1, 2);\n if ($UserID) {\n $this->Utility_model->generateReferralCode($UserID);\n $WalletData = array(\n \"Amount\" => 10000,\n \"CashBonus\" => 0,\n \"TransactionType\" => 'Cr',\n \"Narration\" => 'Deposit Money',\n \"EntryDate\" => date(\"Y-m-d H:i:s\")\n );\n $this->Users_model->addToWallet($WalletData, $UserID, 5);\n }\n }\n }","title":""},{"docid":"7d31d1ade9912ac1b0ec2131067d388b","score":"0.5435966","text":"public function testGetAvailableVouchersNoPetsWithoutCoupon()\n {\n extract($this->setUpForAvailableVouchersTests());\n\n $response = $this->actingAs(User::first())\n ->json(\n 'GET',\n $this->baseurl . 'consumer/' . $consumers[1]->uuid . '/available_vouchers'\n )\n ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'vouchers_available' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n 'invalid_vouchers' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n ]\n )\n ->getData();\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n }","title":""},{"docid":"8940eb2b25b3c4558cf67bff0bd359f0","score":"0.5359112","text":"public static function generateVouchers( ServicePlan $plan, $validity, $validity_unit, $count)\n {\n return DB::transaction(function() use( $plan, $validity, $validity_unit, $count){\n $pins = [];\n for($i=1; $i<=$count; $i++)\n {\n $voucher = static::generateSingle($plan, $validity, $validity_unit);\n $pins[] = $voucher->pin;\n }\n return $pins;\n });\n }","title":""},{"docid":"7626c268771fd0e1a0393aa0ce981933","score":"0.5342733","text":"public function create()\n {\n return view('backend.vouchers.create');\n }","title":""},{"docid":"265f7ab60ab92205252c3ee523eddba4","score":"0.53421444","text":"public function run()\n {\n //\n $vouchers = [\n [\n 'name' => 'Khuyến mại dịp đầu năm'\n ],\n [\n 'name' => 'Khuyến mại dịp mùng 8/3'\n ],\n\n ];\n\n foreach ($vouchers as $voucher)\n {\n \\App\\Voucher::create($voucher);\n }\n }","title":""},{"docid":"0888c03823e511339bdc5bdf1b3a0960","score":"0.52850145","text":"public function index()\n {\n $q = request()->query('q');\n $paginate = request()->query('paginate') != null ? request()->query('paginate') : 15;\n\n $electronicVouchers = ElectronicVoucher::orderBy('id', 'DESC')\n ->where(function ($query) use ($q) {\n $query->where(\"number\", \"like\", \"%$q%\");\n $query->orWhere(\"serie\", \"like\", \"%$q%\");\n $query->orWhere(\"created_at\", \"like\", \"%$q%\");\n })\n ->paginate($paginate);\n\n return ElectronicVoucherResource::collection($electronicVouchers);\n }","title":""},{"docid":"488ac33cd0d43293929ad5dd206763eb","score":"0.52704334","text":"public function generate_invoice_vat() {\n\t\t// Depending on the mode selected, the VAT will either be calculated per\n\t\t// invoice line, or per VAT rate group.\n\n\t\t// Fetch the invoice_items\n\t\t$invoice_items = $this->get_invoice_items();\n\n\t\t// Get existing VAT lines, reset them without saving yet\n\t\t$invoice_vats = [];\n\t\tforeach (Invoice_Vat::get_by_invoice($this) as $invoice_vat) {\n\t\t\t$invoice_vat->base = 0;\n\t\t\t$invoice_vat->vat = 0;\n\t\t\t$invoice_vats[$invoice_vat->vat_rate_id] = $invoice_vat;\n\t\t}\n\n\t\tforeach ($invoice_items as $invoice_item) {\n\t\t\tif ($invoice_item->vat_rate_value == 0) {\n\t\t\t\tcontinue;\n\t\t\t} elseif (isset($invoice_vats[$invoice_item->vat_rate_id])) {\n\t\t\t\t$invoice_vat = $invoice_vats[$invoice_item->vat_rate_id];\n\t\t\t} else {\n\t\t\t\t$invoice_vat = new Invoice_Vat();\n\t\t\t\t$invoice_vat->invoice_id = $this->id;\n\t\t\t\t$invoice_vat->vat_rate_id = $invoice_item->vat_rate_id;\n\t\t\t\t$invoice_vat->rate = $invoice_item->vat_rate_value;\n\t\t\t\t$invoice_vat->base = 0;\n\t\t\t\t$invoice_vat->vat = 0;\n\t\t\t}\n\n\t\t\t// Check the vat mode, calculate accordingly\n\t\t\tif ($this->vat_mode == 'line') {\n\t\t\t\t// Calculate the VAT for each line, add the VAT per line\n\t\t\t\t$invoice_vat->base = $invoice_vat->base + $invoice_item->get_price_excl();\n\t\t\t\t$invoice_vat->vat = $invoice_vat->vat + ($invoice_item->get_price_incl() - $invoice_item->get_price_excl());\n\t\t\t\t$invoice_vat->save();\n\n\t\t\t\t$invoice_vats[$invoice_item->vat_rate_id] = $invoice_vat;\n\t\t\t} else {\n\t\t\t\t// Group all items subject to the same VAT rate, calculate VAT\n\t\t\t\t// over the sum of these at the end\n\t\t\t\t$invoice_vat->base = $invoice_vat->base + $invoice_item->get_price_excl();\n\t\t\t\t$invoice_vats[$invoice_item->vat_rate_id] = $invoice_vat;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($invoice_vats as $invoice_vat) {\n\t\t\t// Calculate the VAT over the group, if desired\n\t\t\tif ($this->vat_mode == 'group') {\n\t\t\t\t$invoice_vat->vat = $invoice_vat->base * ($invoice_vat->rate / 100);\n\t\t\t}\n\n\t\t\t$invoice_vat->save();\n\t\t}\n\t}","title":""},{"docid":"cd6146a74f9db1d5f6ca353bfb495106","score":"0.5231511","text":"public function index() {\n $vouchers = Voucher::all();\n $result = $vouchers->toArray();\n\n return Response::make( [\n 'meta' => [ 'message' => 'success', 'code' => 200 ],\n 'vouchers' => $result\n ] );\n\n }","title":""},{"docid":"e0ce69279d70bc90bfc6e550cbc6b83b","score":"0.5204736","text":"public function index()\n {\n $vouchers = Voucher::latest('id')->paginate(10);\n return new VoucherCollection($vouchers);\n }","title":""},{"docid":"e6f2e469a7d6c57886d5fbe2203a47b0","score":"0.51899064","text":"public function index()\n {\n $vouchers = Voucher::all();\n return view('pages/vouchers/index',compact('vouchers'));\n }","title":""},{"docid":"3fa6f1afa45a7230b28ab5db749b212b","score":"0.51439637","text":"function generateLicenseResponse($requests) {\n $last_ticket = \"\";\n $responses = array();\n $response = \"\";\n $boundary = @exec(\"uuid\");\n\n foreach($requests as $req) {\n\t$ticket = $req['ticket'];\n\t$partner_id = $req['partner_id'];\n\t$name = $req['name'];\n\t$email = $req['email'];\n\t$key = $req['key'];\n\t$request_id = $req['request_id'];\n\t$hw_sn = $req['hw_sn'];\n\t$sw_sn = $req['sw_sn'];\n\n\tif ($ticket != $last_ticket) {\n\n\t // new ticket, save previous response and generate a new response\n\t if ($response != \"\") {\n\t\t$responses[$last_ticket] = $response;\n\t\t$response = \"\";\n\t }\n\n\t // generate email headers\n\t $response = $response . sprintf(\"From: VIVIPOS License Service \\n\");\n\t $response = $response . sprintf(\"To: %s\\n\", $ticket);\n\t $response = $response . sprintf(\"Subject: Requested VIVIPOS license(s) generated (Request ID: %s)\\n\", $request_id);\n\t $response = $response . sprintf(\"Content-Type: multipart/mixed; boundary=%s\\n\\n\", $boundary);\n\n\t $response = $response . sprintf(\"--%s\\n\", $boundary);\n\t $response = $response . sprintf(\"Content-Type: text/plain; charset=utf-8\\n\");\n\t $response = $response . sprintf(\"Content-Transfer-Encoding: 7bit\\n\\n\");\n\t $response = $response . sprintf(\"Attached please find the license(s) that you have requested.\\n\\n\");\n\n\t $last_ticket = $ticket;\n\t}\n\n\t$response = $response . sprintf(\"--%s\\n\", $boundary);\n\n\tif ($partner_id == 'VIVIPOS SDK') {\n\t $response = $response . sprintf(\"Content-Type: application/octet-stream; name=\\\"vivipos.lic\\\"\\n\");\n\t $response = $response . sprintf(\"Content-Disposition: attachment; filename=\\\"vivipos.lic\\\"\\n\\n\");\n\t $response = $response . sprintf(\"%s\\n\\n\", $key);\n\t}\n\telse {\n\t $response = $response . sprintf(\"Content-Type: application/octet-stream; name=\\\"vivipos.lic\\\"\\n\");\n\t $response = $response . sprintf(\"Content-Disposition: attachment; filename=\\\"vivipos.lic\\\"\\n\\n\");\n\t $response = $response . sprintf(\"[%s]\\nname=%s\\nemail=%s\\nsigned_key=%s\\n\\n\", $partner_id, $name, $email, $key);\n\t}\n }\n if ($response != \"\") {\n\t$response = $response . sprintf(\"--%s--\\n\", $boundary);\n\t$responses[$ticket] = $response;\n }\n return $responses;\n}","title":""},{"docid":"ac52ac3e768773a06e3efa78e1b8c7ea","score":"0.51409996","text":"public function vendors(){\n $v = $this->Freeradius->getVendors();\n $items = array();\n foreach($v as $i){\n array_push($items, array('id' => $i, 'name' => $i));\n }\n $this->set(array(\n 'items' => $items,\n 'success' => true,\n '_serialize' => array('items','success')\n ));\n }","title":""},{"docid":"4a02b6411ed276e97b73f27156a6bee2","score":"0.5134869","text":"public function getRelatedVouchers(Request $request, Response $response)\n {\n $recipient_vouchers = [];\n $recipient = Recipient::with('vouchers')\n ->where('email',$request->get('email'))->first();\n if(!$recipient)\n {\n return response()->json([\n 'Message' => \"This email doesnt exist in our database!\"\n ], 400);\n }\n else\n {\n foreach ($recipient->vouchers as $voucher) {\n $recipient_vouchers[] = (object) array('voucher_code' => $voucher->code , 'offer' => $voucher->offer->name);\n }\n return response()->json([\n 'Message' => collect($recipient_vouchers)\n ], 400);\n }\n }","title":""},{"docid":"33e0a656e54e88f5292ad4f792ab9938","score":"0.50997686","text":"public function create()\n {\n $sellers = Seller::all();\n return view('pages/vouchers/create',compact('sellers'));\n }","title":""},{"docid":"2e64dbe460d4353701498a9375e36701","score":"0.50907844","text":"private static function generateInvoice()\n {\n //find all orders that have been verified and\n //ready to be invoiced\n\n $userIds = BanquetOrder::find()\n ->select('userId')\n ->where(['orderStatus' => BanquetOrder::ORDER_STATUS_VERIFIED])\n ->distinct()->asArray()->all();\n\n \n foreach ($userIds as $userId)\n {\n $id = $userId[\"userId\"];\n Yii::info('xx='.$id);\n InvoiceHelper::generateForUser($id);\n }\n\n\n\n }","title":""},{"docid":"695811e148a1778d3017479abab05960","score":"0.5084104","text":"public function testGetAvailableVouchersOnePetDifferentSpeciesWithCoupon()\n {\n extract($this->setUpForAvailableVouchersTests());\n\n $response = $this->actingAs(User::first())\n ->json(\n 'GET',\n $this->baseurl . 'consumer/' . $consumers[3]->uuid . '/available_vouchers'\n )\n ->assertStatus(200)\n ->assertJsonStructure(\n [\n 'vouchers_available' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n 'invalid_vouchers' => [\n '*' => [\n 'name',\n 'uuid',\n ],\n ],\n ]\n )\n ->getData();\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[0]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[1]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[2]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[3]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[4]->uuid->toString()\n )\n );\n\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[5]->uuid->toString()\n )\n );\n\n $this->assertTrue(\n $this->arrayOfArraysSearch(\n $response->vouchers_available,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n $this->assertFalse(\n $this->arrayOfArraysSearch(\n $response->invalid_vouchers,\n 'uuid',\n $vouchers[6]->uuid->toString()\n )\n );\n }","title":""},{"docid":"dd32747902ad9d699600f6904f96f710","score":"0.5061233","text":"public function index()\n {\n try {\n $vouchers = $this->voucher->all();\n return view('adminlte::voucher_list', compact('vouchers'));\n } catch (Exception $e) {\n dd($e);\n }\n }","title":""},{"docid":"98eecee762a11520e565fd408061a944","score":"0.50497067","text":"function archivevoucher(){\n\t\t$this->set('title_for_layout','Archive Gift Certificate');\n\t\t$this->set('categoryList',$this->common->getAllCategory());\n\t\t$this->set('countyList',$this->common->getAllCounty()); \t// List counties\n\t\t$this->set('cityList',$this->common->getAllCity()); \t\t// List cities\n\t\t$this->set('stateList',$this->common->getAllState()); \t\t// List states\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\n\t\t$this->set('search_text','Title');\n\t\t$this->set('s_date','');\n\t\t$this->set('e_date','');\n\t\t$this->set('category', 'Category');\n\t\t$this->set('county', 'County');\n\t\t$this->set('advertiser_profile_id', 'Advertiser');\n\t\t$cond = '';\n\t\t$time = mktime(0,0,0,date('m'),date('d'),date('Y'));\n\t\t$cond['Voucher.e_date <'] = $time;\n\t\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\n\t\t\n\t\t\n\t\t//pr($this->params);\n\t\t\n\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\n\t\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\n\t\t\t{\n\t\t\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\n\t\t\t}\n\t\t\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\n\t\t\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\n\t\t\t}else{\n\t\t\t \n\t\t\t $advertiser_profile_id =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('advertiser_profile_id',$advertiser_profile_id); \n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\n\t\t\t{\n\t\t\t $category = $this->data['vouchers']['category'] ;\n\t\t\t}\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\n $category = $this->params['named']['category'] ;\n\t\t\t}else{\n\t\t\t$category = '';\n\t\t\t}\n\t\t\t$this->set('category',$category); \n\t\t}\n// if county is set\n\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\n\t\t\t{\n\t\t\t $county = $this->data['vouchers']['county'] ;\n\t\t\t}\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\n $county = $this->params['named']['county'] ;\n\t\t\t}else{\n\t\t\t$county = '';\n\t\t\t}\n\t\t\t$this->set('county',$county); \n\t\t}\n\n\t\t\n\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\n\t\t\t{\n\t\t\t $search_text = $this->data['vouchers']['search_text'] ;\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\n\t\t\t $search_text = $this->params['named']['search_text'] ;\n\t\t\t}else{\n $search_text ='';\n\t\t\t}\n\t\t\t$this->set('search_text',$search_text); \n\t\t}\n\t\t\n\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\n\t\t\t{\n\t\t\t $arrS_date = explode(\"/\",$this->data['vouchers']['s_date']);\n\t\t\t $day = $arrS_date[1] ;\n\t\t\t $month = $arrS_date[0] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->data['vouchers']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\n\t\t\t \n\t\t\t $arrS_date = explode(\"-\",$this->params['named']['s_date']);\n\t\t\t $day = $arrS_date[1] ;\n\t\t\t $month = $arrS_date[0] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->params['named']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}else{\n\t\t\t $s_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('s_date',$s_date);\n\t\t\t\n\t\t\t$this->set('s_datetmsp',$s_datetmsp);\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\n\t\t\t{\n\t\t\t\n\t\t\t $arrE_date = explode(\"/\",$this->data['vouchers']['e_date']);\n\t\t\t $eday = $arrE_date[1] ;\n\t\t\t $emonth = $arrE_date[0] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t $e_date = $this->data['vouchers']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\n\t\t\t \n\t\t\t $arrE_date = explode(\"-\",$this->params['named']['e_date']);\n\t\t\t $eday = $arrE_date[1] ;\n\t\t\t $emonth = $arrE_date[0] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t \n\t\t\t $e_date = $this->params['named']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}else{\n\t\t\t $e_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('e_date',$e_date);\n\t\t\t$this->set('e_datetmsp',$e_datetmsp);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\n\t\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\n\t\t}\n\t\t\n\t\tif(isset($category) && $category !=''){\n\t\t $cond['Voucher.category_id'] = $category;\n\t\t}\n\t\t\n\t\tif(isset($county) && $county !=''){\n\t\t $cond['Voucher.advertiser_county_id'] = $county;\n\t\t}\n\n\t\tif(isset($search_text) && $search_text !=''){\n\t\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\n\t\t}\n\t\t\n\t\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\n\t\t $cond['Voucher.s_date >='] = $s_datetmsp ;\n\t\t $cond['Voucher.e_date <='] = $e_datetmsp ;\n\t\t}\n\t\t\n\t\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\n\t\t\n\t\t $cond['Voucher.s_date ='] = $s_datetmsp ;\n\t\t\n\t\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\n\t\t $cond['Voucher.e_date ='] = $e_datetmsp ;\n\t\t}\n\n\t\t$data = $this->paginate('Voucher', $cond);\n\t\t$this->set('vouchers', $data);\n\t\n\t}","title":""},{"docid":"8b47da3155623a90b6776169dbceb993","score":"0.50392497","text":"public function index()\n {\n $vouchers = Voucher::all();\n\n $index = 1;\n\n return view('backend.vouchers.index', compact('vouchers','index'));\n }","title":""},{"docid":"d4944ab5be6652db8eeac31c90cdf597","score":"0.5034194","text":"public function createVoucher(?Closure $callback = null): object\n {\n return $this->createVouchers(1, $callback);\n }","title":""},{"docid":"b371ba2e38e94cf2b1fa1340419dbd7f","score":"0.49957168","text":"protected function _getVouchersAttributeName()\n {\n return Innobyte_EmagMarketplace_Model_Sales_Voucher_Abstract::EMAG_VOUCHERS;\n }","title":""},{"docid":"3e4e8e50eed2d50bd102a0b06d436117","score":"0.4981456","text":"public function run()\n\t{\n\t\tDB::table('reference_vouchers')->insert([\n\t\t\t[\n\t\t\t\t'name' => 'direct',\n\t\t\t\t'display_name' => 'Direct',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'purchase_order',\n\t\t\t\t'display_name' => 'Purchase Order',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'purchases',\n\t\t\t\t'display_name' => 'Purchase',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'goods_receipt_note',\n\t\t\t\t'display_name' => 'Goods Receipt Note',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'debit_note',\n\t\t\t\t'display_name' => 'Debit Note',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'estimation',\n\t\t\t\t'display_name' => 'Estimation',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'sale_order',\n\t\t\t\t'display_name' => 'Sale Order',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'sales',\n\t\t\t\t'display_name' => 'Invoice',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'job_invoice',\n\t\t\t\t'display_name' => 'Job Invoice',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'job_request',\n\t\t\t\t'display_name' => 'Job Request',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'delivery_note',\n\t\t\t\t'display_name' => 'Delivery Note',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'credit_note',\n\t\t\t\t'display_name' => 'Credit Note',\n\t\t\t\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\t\t\t\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n\t\t\t]\n\t\t]);\n\t}","title":""},{"docid":"3896a08104ba58eaee033d285a2da664","score":"0.49777725","text":"public function generate($params,$version) {\n //et pars url y ketery poxum _ gceri\n //stex et responsy xml a galis eli, ydex mi komponentner el ka vor dzevapoxuma , es konkret arrayinnem grel, arrayova eli patasxany galis\n $unsignedRequest = $this->CreateUnsignedAmazonUrl($params);\n\t\treturn $this->CreateSignedAwsRequest($unsignedRequest,$version);\n }","title":""},{"docid":"99ac37d2fb55f86b26f8d642fdf14b9d","score":"0.49526668","text":"public function index()\n {\n $vouchers = Voucher::where('terminal_id', Auth::user()->terminal_id);\n return view('admin.voucher.index', ['vouchers' => $vouchers]);\n }","title":""},{"docid":"8e96c1f390781d412d9cbc4215e2d923","score":"0.49438828","text":"protected function _generate()\n {\n }","title":""},{"docid":"ec5f9b44323ca4ed28b959ffcfcf3a05","score":"0.49410847","text":"public function vocations();","title":""},{"docid":"7a19435f34050846bcdc8a35737f812e","score":"0.49258858","text":"public function index()\n {\n $vouchers = Voucher::all();\n\n return view('voucher.index', compact('vouchers'));\n }","title":""},{"docid":"109898ada62c690ddfa964d3b5bf08f0","score":"0.4915956","text":"public function vouchertemplate(Request $request)\n {\n\n //////vouchertemplate\n\n //agency detal get\n\n $payment_booking = DB::table('payment')->where('id', '=', $_POST['bookingid'])->get();\n\n $guest = unserialize($payment_booking[0]->guest);\n\n $Servicename = '';\n\n $Servicetype = '';\n\n $MealBasis = '';\n\n $ServiceAddress = '';\n\n $RoomServiceType = '';\n\n $NoRooms = '';\n\n $Child = '';\n\n $Desitination = '';\n\n $starCategory = '';\n\n $Reservationstatus = '';\n\n $GuestName = '';\n\n $NoAdult = '';\n\n $Infants = '';\n\n $PoliciesDetails = '';\n\n if ($payment_booking[0]->supplier == 'travelanda') {\n $getBookingDetails = $this->getBookingDetails($payment_booking[0]);\n\n $Gethotelresponse = HotelApiController::Gethotelresponse($payment_booking[0]->hotelid);\n\n $Description = '';\n\n if (isset($Gethotelresponse->Body->Hotels->Hotel->Description)) {\n $Description = $Gethotelresponse->Body->Hotels->Hotel->Description;\n }\n\n if (isset($getBookingDetails->Body->Bookings)) {\n foreach ($getBookingDetails->Body->Bookings->HotelBooking as $HotelBooking) {\n if ($payment_booking[0]->BookingReference == $HotelBooking->BookingReference) {\n $bo = 1;\n\n if (isset($HotelBooking->Policies->Policy)) {\n $PoliciesDetails .= $Description;\n\n $PoliciesDetails .= '
    You may cancel your reservation for no charge before this deadline. \n\n\t\t Please note that we will assess full payment of reservation if you must cancel after this deadline.
    ';\n\n foreach ($HotelBooking->Policies->Policy as $Policy) {\n if ($Policy->Type == 'Percentage') {\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay Value.'% penalty for this booking.
    ';\n }\n\n if ($Policy->Type == 'Amount') {\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay $ '.$Policy->Value.' penalty for this booking.
    ';\n }\n\n if ($Policy->Type == 'Nights') {\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay '.$Policy->Value.' night price penalty for this booking.
    ';\n }\n\n ++$bo;\n }\n }\n\n // echo '
    ';\n\n                        //print_r($payment_booking);\n\n                        // print_r($HotelBooking);\n\n                        //echo '
    ';\n\n /*echo '
    ';\n\n    print_r($guest);\n\n    echo '
    ';*/\n\n //guest dateil\n\n $roomGuestDetails = '';\n\n foreach ($guest as $guestDetails) {\n if ($guestDetails['adult'] != 0) {\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\n $roomGuestDetails .= '

    '.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'

    ';\n }\n }\n\n if ($guestDetails['child'] != 0) {\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\n $roomGuestDetails .= '

    '.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'

    ';\n }\n }\n }\n\n $RoomName = '';\n\n $NumAdults = '';\n\n $NumChildren = '';\n\n $room = 0;\n\n foreach ($HotelBooking->Rooms->Room as $roomDetails) {\n $RoomName = $roomDetails->RoomName;\n\n $NumAdults += $roomDetails->NumAdults;\n\n $NumChildren += $roomDetails->NumChildren;\n\n ++$room;\n }\n\n $Servicename = $HotelBooking->HotelName;\n\n $Servicetype = 'Hotel';\n\n $MealBasis = $HotelBooking->BoardType;\n\n $ServiceAddress = $HotelBooking->City;\n\n $RoomServiceType = $RoomName;\n\n $NoRooms = $room;\n\n $Child = $NumChildren;\n\n $Desitination = $HotelBooking->City;\n\n $starCategory = '';\n\n $Reservationstatus = 'Confirm';\n\n $GuestName = $roomGuestDetails;\n\n $NoAdult = $NumAdults;\n\n $Infants = $NumChildren;\n }\n }\n }\n }\n\n if ($payment_booking[0]->supplier == 'tbo') {\n $getBookingDetails = $this->tbobboking_details($payment_booking[0]->BookingReference);\n\n $tboHolidaysHotelDetails = HotelApiController::tboHolidaysHotelDetails($payment_booking[0]->hotelid);\n\n /*\techo '
    ';\n\n        print_r($tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description']);\n\n        echo '
    ';*/\n\n $RoomName = '';\n\n if (!empty($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'])) {\n for ($r = 0; $r < $payment_booking[0]->no_of_room; ++$r) {\n $RoomName .= '

    '.$getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'][$r]['RoomName'].'

    ';\n }\n }\n\n //guest dateil\n\n $roomGuestDetails = '';\n\n $NumAdults = 0;\n\n $NumChildren = 0;\n\n foreach ($guest as $guestDetails) {\n $NumAdults += $guestDetails['adult'];\n\n if ($guestDetails['adult'] != 0) {\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\n $roomGuestDetails .= '

    '.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'

    ';\n }\n }\n\n if ($guestDetails['child'] != 0) {\n $NumChildren += $guestDetails['child'];\n\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\n $roomGuestDetails .= '

    '.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'

    ';\n }\n }\n }\n\n $PoliciesDetails .= $tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description'];\n\n $PoliciesDetails .= '
    You may cancel your reservation for no charge before this deadline. \n\n\t\t Please note that we will assess full payment of reservation if you must cancel after this deadline.
    ';\n\n $attr = '@attributes';\n\n $bo = 1;\n\n if (isset($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'][0])) {\n foreach ($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'] as $Policy) {\n if ($Policy[$attr]['ChargeType'] == 'Fixed') {\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['Currency'].''.$Policy[$attr]['CancellationCharge'].' penalty for this booking
    ';\n }\n\n if ($Policy[$attr]['ChargeType'] == 'Percentage') {\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking
    ';\n }\n\n if ($Policy[$attr]['ChargeType'] == 'Night') {\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking
    ';\n }\n\n ++$bo;\n }\n }\n\n $Servicename = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\n\n $Servicetype = 'Hotel';\n\n $MealBasis = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\n\n $ServiceAddress = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['AddressLine1'];\n\n $RoomServiceType = $RoomName;\n\n $NoRooms = $payment_booking[0]->no_of_room;\n\n $Child = ''; //$NumChildren;\n\n $Desitination = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['City'];\n\n $starCategory = '';\n\n $Reservationstatus = 'Confirm';\n\n $GuestName = $roomGuestDetails;\n\n $NoAdult = $NumAdults;\n\n $Infants = $NumChildren;\n }\n\n $name = '';\n\n $address = '';\n\n $city = '';\n\n $country = '';\n\n if ($payment_booking[0]->user_type == 'AgencyManger') {\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '
    ';\n\n        print_r($agency);\n\n        echo '
    ';*/\n\n $name = $agency[0]->aname;\n\n $address = $agency[0]->address1;\n\n $city = $agency[0]->city;\n\n $country = $agency[0]->country;\n }\n\n if ($payment_booking[0]->user_type == 'SubAgencyManger') {\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '
    ';\n\n        print_r($agency);\n\n        echo '
    ';*/\n\n $name = $agency[0]->aname;\n\n $address = $agency[0]->address1;\n\n $city = $agency[0]->city;\n\n $country = $agency[0]->country;\n }\n\n if ($payment_booking[0]->user_type == 'UserInfo') {\n $userinformation = DB::table('userinformation')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '
    ';\n\n        print_r($userinformation);\n\n        echo '
    ';*/\n\n $name = $userinformation[0]->name;\n\n $address = $userinformation[0]->email;\n\n $city = $userinformation[0]->phone;\n }\n\n /*echo '
    ';\n\n        print_r($guest[0]['firstname'][1]);\n\n        echo '
    ';*/\n\n $date1 = date_create($payment_booking[0]->checkin);\n\n $date2 = date_create($payment_booking[0]->checkout);\n\n $diff = date_diff($date1, $date2);\n\n $daycount = $diff->days;\n\n\n $tempalte = '\n\t\t\n\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tVoucher\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t
    \n\t\t\n\t\t\t
    \n\t\t\n\t\t\t
    Please Present this voucher upon arrival
    \n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t

    Service Voucher

    \n\t\t\n\t\t\t\t\t\t

    '.$name.'

    \n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\t'.$address.', '.$city.', '.$country.'.\n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\tBooking Information\n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t \n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\n\t\t\t\t\t
    Voucher NoLBVN'.$payment_booking[0]->hotelid.'
    LB REF NoLBHR'.$payment_booking[0]->hotelid.'
    Supplier Ref No'.$payment_booking[0]->id.$payment_booking[0]->hotelid.$payment_booking[0]->login_id.'
    Re-confirmation No/Msg'.$payment_booking[0]->login_id.$payment_booking[0]->hotelid.$payment_booking[0]->id.'
    Lead Name'.$guest[0]['firstname'][1].''.$guest[0]['lastname'][1].'
    Issued on'.date('d/M/Y, D', strtotime($payment_booking[0]->bookingdate)).'
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\t

    Check In

    \n\t\t\n\t\t\t\t\t\t\t

    '.date('d', strtotime($payment_booking[0]->checkin)).'

    \n\t\t\n\t\t\t\t\t\t\t'.date('M', strtotime($payment_booking[0]->checkin)).', '.date('Y', strtotime($payment_booking[0]->checkin)).'\n\t\t\n\t\t\t\t\t\t\t'.date('D', strtotime($payment_booking[0]->checkin)).'\n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\t

    Check Out

    \n\t\t\n\t\t\t\t\t\t\t

    '.date('d', strtotime($payment_booking[0]->checkout)).'

    \n\t\t\n\t\t\t\t\t\t\t'.date('M', strtotime($payment_booking[0]->checkout)).', '.date('Y', strtotime($payment_booking[0]->checkout)).'\n\t\t\n\t\t\t\t\t\t\t'.date('D', strtotime($payment_booking[0]->checkout)).'\n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t'.$daycount.' Nights\n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\tAccomodation Details\n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t
    Servicename'.$Servicename.'
    Service Type '.$Servicetype.'
    Meal Basis '.$MealBasis.'
    Service Address'.$ServiceAddress.'
    RoomService Type'.$RoomServiceType.'
    No Rooms'.$NoRooms.'
    \n\t\t\n\t\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t
    Child '.$Child.'
    Desitination'.$Desitination.'
    Reservation Status'.$Reservationstatus.'
    NoAdult'.$NoAdult.'
    Infants'.$Infants.'
    Guest Name'.$GuestName.'
    \n\t\t\n\t\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t\t\tImportant Notes\n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t\t\t\t
    \n\t\t\n\t\t\t\t\t'.$PoliciesDetails.'\n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t\t

    Hotel Map

    \n\t\t\n\t\t\t\t\t\n\t\t\n\t\t\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t
    \n\t\t\n\t\t\t\t
    \n\t\t\n\t\t\t\t\t \n\t\t\n\t\t\n\t\t\n\t\t\t\t \n\t\t\n\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\t
    \n\t\t\n\t\t\n\t\t\n\t\t\n\n\n\n\t\t';\n\n echo $tempalte;\n }","title":""},{"docid":"dec2af58b1d08b1db32d956007ff52f8","score":"0.4903172","text":"function addVoucher(){\n\t\tif(isset($this->params['pass'][0])){\n\t \t\t$this->set('advertiser_id', $this->params['pass'][0]);\n\t\t}\n\t\t\n\t\tif($this->referer()=='/vouchers/addVoucher' || $this->referer()=='/'){ } else {\n\t\t\t$this->Session->write('referer',$this->referer());\n\t\t}\t\t\n\t\t$this->set('refferer',$this->Session->read('referer'));\n\t\t$this->set('title_for_layout','Add Gift Certificate');\n\t\t$this->set('categoryList',$this->common->getAllCategory()); // List categories\n\t \t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List Advertisers\n\n\t\t/*------------------validation for redirect 2 mastersheet if it is initiated from master sheet-----------------*/\n\t\t if((strpos($this->referer(),'masterSheet')!=false)) {\n\t\t \t$this->Session->write('reff',$this->referer());\n\t\t }\n\t\t if($this->Session->read('reff')) {\n\t\t \t$this->set('reff',$this->Session->read('reff'));\n\t\t } else {\n\t\t \t$this->set('reff',$this->referer());\n\t\t }\n\t\t \n\t\t/*----------------------------------------------------------------------------------------------------------*/\t\n\n\t\tif(isset($this->data))\n\t\t\t\t{\n\t\t\t\t $this->Voucher->set($this->data['voucher']);\n\t\t\t\t\n\t\t \t \t $this->set('advertiser_id', $this->data['voucher']['advertiser_profile_id']);//element use only\n\t\t\t\t if($this->Voucher->validates())\n\t\t\t\t { \n\t\t\t\t\t\t\n\t\t\t\t\t/*------------------------------------find county of specified advertiser---------------------------------------------*/\n\t\t\t\t\t\t\n\t\t\t\t\t\t$county = $this->Voucher->getCityCountyState($this->data['voucher']['advertiser_profile_id']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['advertiser_county_id']\t=\t$county[0]['advertiser_profiles']['county'];\n\t\t\t\t\t\t\n\t\t\t\t\t/*--------------------------------------------------------------------------------------------------------------------*/\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($this->data['voucher']['sdate']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$s_date\t\t= $this->data['voucher']['sdate'];\n\t\t\t\t\t\t\t$start_date\t= explode('/',$s_date);\n\t\t\t\t\t\t\t$start_date = mktime(0,0,0,$start_date[0],$start_date[1],$start_date[2]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$start_date = mktime(0,0,0,date('m'),date('t',strtotime('today')),date('Y'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!empty($this->data['voucher']['edate']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$e_date\t\t= $this->data['voucher']['edate'];\n\t\t\t\t\t\t\t$expiry_date\t= explode('/',$e_date);\n\t\t\t\t\t\t\t$expiry_date = mktime(0,0,0,$expiry_date[0],$expiry_date[1],$expiry_date[2]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$expiry_date = mktime(0,0,0,date('m'),date('t',strtotime('today')),date('Y'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/***********--------------------------valid date validation ------------------------------------------------------*/\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($expiry_date < $start_date )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->Session->setFlash('End Date should be greater than or equal to Start Date'); \n\t\t\t\t\t\t\treturn false;\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*----------------------------------------------------------------------------------------------------------------*/\t\n\t\t\t\t\t\t\t$this->data['Voucher']['s_date']= $start_date;\n\t\t\t\t\t\t\t$this->data['Voucher']['e_date']= $expiry_date;\n\t\t\t\t\t\t/*---------------------------------------------------------------------------------*/\n\t\t\t\t\t\t$lastid = $this->Voucher->find('first',array('fields'=>array('Voucher.id'),'order'=>array('Voucher.id DESC'),'limit'=>1));\n\t\t\t\t\t\tif(is_array($lastid)) {\n\t\t\t\t\t\t\t$this->data['Voucher']['id'] = $lastid['Voucher']['id']+1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->data['Voucher']['id'] = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['title']\t=\t$this->data['voucher']['title'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['description']\t=\t$this->data['voucher']['description'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['price']\t=\t$this->data['voucher']['price'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['advertiser_profile_id']\t=\t$this->data['voucher']['advertiser_profile_id'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['category_id']\t=\t$this->data['voucher']['category_id'];\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->data['Voucher']['status']\t=\t$this->data['voucher']['status'];\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t/*pr($this->data['Voucher']);\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t$this->Voucher->save($this->data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*----------------------------------------------------------------------------------------------------*/\n\t\t\t\t\t\t App::import('model', 'WorkOrder');\n\t\t\t\t\t\t $this->WorkOrder = new WorkOrder;\t\t\t \n\t\t\t\t\t\t $orderid = $this->common->getOrderId($this->data['Voucher']['advertiser_profile_id']);\n\t \t\t\t\t\t $salsemain_detail = $this->common->getorderdetail($orderid['AdvertiserProfile']['order_id']);\n\t\t\t\t\t\t $saveWorkArray = array();\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['advertiser_order_id'] = $orderid['AdvertiserProfile']['order_id'];\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['read_status'] \t\t = 0;\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['subject'] \t\t\t = 'New Workorder for Gift Certificate';\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['message'] \t\t\t = 'New Workorder for Gift Certificate has been launched for the following advertiser profile.';\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['type'] \t\t\t = 'Gift Certificate Workorder';\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['sent_to'] \t\t\t = $salsemain_detail['AdvertiserOrder']['salesperson'];\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['sent_to_group'] \t = 5;\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['from_group'] \t\t = $this->Session->read('Auth.Admin.user_group_id');\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['salseperson_id'] \t = 0;\n\t\t\t\t\t\t date_default_timezone_set('US/Eastern');\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['created_date'] \t\t\t= date(DATE_FORMAT.' h:i:s A');\n\t\t\t\t\t\t $saveWorkArray['WorkOrder']['created'] \t\t\t = strtotime(date(DATE_FORMAT.' h:i:s A'));\n\t\t\t\t\t\t $this->WorkOrder->save($saveWorkArray);\n\t\t\t\t\t/*----------------------------------------------------------------------------------------------------------*/\t\t\t\t\t\t\n\t\t\t\t\t\t$this->Session->setFlash('Gift Certificate Successfully Saved'); \n\t\t\t\t\t\tif(isset($this->data['voucher']['prvs_link']) && (strpos($this->data['voucher']['prvs_link'],'masterSheet')!=false))\n\t\t\t\t\t\t{\n\t\t\t\t\t \t\t$this->Session->delete('reff');\n\t\t\t\t\t\t\t$ad_id = explode('/',$this->data['voucher']['prvs_link']);\t\t\n\t\t\t\t\t\t\t$this->redirect(FULL_BASE_URL.router::url('/',false).'advertiser_profiles/masterSheet/'.$ad_id[3]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->redirect(array('action' => 'index/'.$this->data['voucher']['advertiser_profile_id']));\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\n\t\t\t\t\t\t$errors = $this->Voucher->invalidFields();\t\n\t\t\t\t\t\t$this->Session->setFlash(implode('
    ', $errors)); \n\t\t\t\t\t\treturn false;\n\t\t\t\t }\t \n\t\t\t}\n\t}","title":""},{"docid":"ae65bb6cd56609cd64f5ea39a03596dc","score":"0.48989162","text":"public function store(CreateVouchersRequest $request)\n {\n $data = $request->except('valid_from','valid_until');\n $data['valid_from'] = $request->valid_from != '' ? $request->valid_from : NULL ;\n $data['valid_until'] = $request->valid_until != '' ? $request->valid_until : NULL ;\n $voucher = Voucher::create($data);\n\n return redirect()->route('gjadmin.vouchers.index');\n }","title":""},{"docid":"707598dd3a6f3868b02cb066f3a01a33","score":"0.48901686","text":"function createView() {\n\n require 'connector.php';\n\n /* Map Function */\n $map = \"function(doc) {\n (doc.genre || []).forEach(function(genre){ \n var key = {title: doc.title, genre: doc.genre};\n emit(key, 1);\n });\n }\";\n\n $view = new stdClass();\n $view->_id = '_design/title';\n $view->language = 'javascript';\n $view->views = array('byGenre' => array('map' => $map, \"reduce\" => \"_count\"));\n\n $client->storeDoc($view);\n}","title":""},{"docid":"d382802f3ac099e23bfdaee4bcfbaa2e","score":"0.48863566","text":"protected function RecalculateVouchers()\n {\n if (!is_null($this->GetActiveVouchers())) {\n $this->dCostVouchers = 0;\n $this->GetActiveVouchers()->RemoveInvalidVouchers(MTShopBasketCore::MSG_CONSUMER_NAME, $this);\n $this->dCostVouchers = $this->GetActiveVouchers()->GetVoucherValue(true);\n if ($this->dCostVouchers > $this->dCostTotal) {\n $this->dCostVouchers = $this->dCostTotal;\n }\n } else {\n $this->dCostVouchers = 0;\n }\n }","title":""},{"docid":"b1f522473626035b45f8d09f2a682ce7","score":"0.48726457","text":"function downloadvolunteers()\n\t{\n\t\t$userInfo = $_SESSION['user'];\n\t\tif(!isset($userInfo))\n\t\t\tredirect('/hcdec/index');\n\t\tif(!in_array('manage_volunteers', $userInfo['roles']))\n\t\t\tredirect('/hcdec/myhcdec');\n\t\t\t# list the volunteers as rows in HTML table. parameters for\n\t\t# this request: $startDate, $endDate. if startDate is not\n\t\t# given, all volunteer requests are listed up thru endDate.\n\t\t# if endDate is not given, all volunteer requests are listed\n\t\t# period in one giant scrolling div. add format = html or csv\n\t\t# so we know which view to load\n\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t\n\t\t$criteria = array();\n\t\t$startDate = \"\";\n\t\tif(isset($arr['startDate']))\n\t\t{\n\t\t\t$criteria['startDate'] = $arr['startDate'];\n\t\t\t$startDate = $arr['startDate'];\n\t\t}\n\t\t\t\n\t\t$endDate = \"\";\n\t\tif(isset($arr['endDate']))\n\t\t{\n\t\t\t$criteria['endDate'] = $arr['endDate'];\n\t\t\t$endDate = $arr['endDate'];\n\t\t}\n\t\t\n\t\t$precinct = \"\";\n\t\tif(isset($arr['precinct']))\n\t\t{\n\t\t\t$criteria['precinct'] = $arr['precinct'];\n\t\t\t$precinct = $arr['precinct'];\n\t\t}\n\t\t\t\n\t\t$criteria = array();\n\t\t# now look up volunteers\n\t\t$this->load->model('volunteers');\n\t\t$r = $this->volunteers->getVolunteers();\n\t\tif($r['status'] == 'OK')\n\t\t{\n\t\t\t$params['volunteers'] = $r['rows'];\n\t\t\t$params['startDate'] = $startDate;\n\t\t\t$params['endDate'] = $endDate;\n\t\t\t$params['precinct'] = $precinct;\n\t\t\t$this->load->view('volunteers_spreadsheet', $params);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# error page\n\t\t}\n\t}","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"09ea1b1b1e32adfa9b9794a8b6bd069a","score":"0.48708385","text":"public function generate();","title":""},{"docid":"7dd10791b42ea589326aa3d2fec1051e","score":"0.48571146","text":"protected function _setVouchers( $aVoucherSeries )\r\n {\r\n if ( empty( $aVoucherSeries ) ) {\r\n return;\r\n }\r\n $aVoucherIDs = array();\r\n foreach ( $aVoucherSeries as $aVoucherSerie ) {\r\n $oVoucherSerie = oxNew( 'oxbase' );\r\n $oVoucherSerie->init( 'oxvoucherseries' );\r\n foreach( $aVoucherSerie as $sKey => $mxValue ) {\r\n $sField = \"oxvoucherseries__\" . $sKey;\r\n $oVoucherSerie->$sField = new oxField( $mxValue, oxField::T_RAW);\r\n }\r\n $oVoucherSerie->save();\r\n // inserting vouchers\r\n for ( $i = 1; $i <= $aVoucherSerie['voucher_count']; $i++ ) {\r\n $aData = array(\r\n 'oxreserved' => 0,\r\n 'oxvouchernr' => md5( uniqid( rand(), true ) ),\r\n 'oxvoucherserieid' => $oVoucherSerie->getId() \r\n );\r\n $oVoucher = $this->createObj( $aData, 'oxvoucher', 'oxvouchers' );\r\n $aVoucherIDs[] = $oVoucher->getId();\r\n }\r\n }\r\n return $aVoucherIDs;\r\n }","title":""},{"docid":"b44c6127fb55f26eb4e490af9a373be5","score":"0.48478484","text":"public function payment_vouchers()\r\n {\r\n return $this->hasMany('App\\PaymentVoucher');\r\n }","title":""},{"docid":"8c1d7d8c48f9896dfc27e6469230d2ce","score":"0.48383877","text":"public function generate() {\n\n\t\t}","title":""},{"docid":"fe0afdbb783d907cdcac4e7119d949ed","score":"0.4826828","text":"public function create()\n {\n $temp_vendors=DB::table('vendors')\n ->where('vendortype','customer')\n ->orderBy('company_name_th','asc') //select data from database\n ->get();\n\n $vendors=[];\n if(!empty($temp_vendors)){\n foreach($temp_vendors as $temp){ //check data and loop for change value to id \n $vendors[$temp->vendor_id]=$temp;\n }\n }\n return view('createquotation',['vendors'=>$vendors]);\n }","title":""},{"docid":"9b468c67cc6e974d62abe56dbcbd38e0","score":"0.4808531","text":"function index(){\n\tif(!isset($this->params['pass'][0])) {\n\t\t$this->redirect(array('action'=>'voucherCommon'));\n\t}\n\t\t$this->set('title_for_layout','Gift Certificate');\n\t\t$this->set('categoryList',$this->common->getAllCategory());\n\t\t$this->set('countyList',$this->common->getAllCounty()); \t// List counties\n\t\t$this->set('cityList',$this->common->getAllCity()); \t\t// List cities\n\t\t$this->set('stateList',$this->common->getAllState()); \t\t// List states\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\n\t\t$this->set('search_text','Title');\n\t\t$this->set('s_date','');\n\t\t$this->set('e_date','');\n\t\t$this->set('category', 'Category');\n\t\t$this->set('county', 'County');\n\t\t$this->set('advertiser_profile_id', 'Advertiser');\n\t\t$cond = '';\n\t\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\n\t\t\n\t\t/*--------------------------------------setting diff condition in paginate function according to search criteria-----------------------------*/\n\t\t\n\t\tif(isset($this->params['pass'][0]) && $this->params['pass'][0] !='' )\n\t\t {\n\t\t\t $cond=array('Voucher.advertiser_profile_id' => $this->params['pass'][0]);\n\t\t\t (empty($this->params['named'])) ? $this->set('advertiser_profile_id', $this->params['pass'][0]) :$this->set('advertiser_profile_id', $this->params['pass'][0]) ; \n\t\t\t $this->set('advertiser_id',$this->params['pass'][0]);\n\t\t }\n\t\t//if advertiser is set\t\t\n\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\n\t\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\n\t\t\t{\n\t\t\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\n\t\t\t}\n\t\t\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\n\t\t\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\n\t\t\t}else{\n\t\t\t \n\t\t\t $advertiser_profile_id =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('advertiser_profile_id',$advertiser_profile_id); \n\t\t}\n\t\t\n\t\t\n\t\t//if categry is set\n\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\n\t\t\t{\n\t\t\t $category = $this->data['vouchers']['category'] ;\n\t\t\t}\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\n $category = $this->params['named']['category'] ;\n\t\t\t}else{\n\t\t\t$category = '';\n\t\t\t}\n\t\t\t$this->set('category',$category); \n\t\t}\n\t\t//if county is set\n\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\n\t\t\t{\n\t\t\t $county = $this->data['vouchers']['county'] ;\n\t\t\t}\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\n $county = $this->params['named']['county'] ;\n\t\t\t}else{\n\t\t\t$county = '';\n\t\t\t}\n\t\t\t$this->set('county',$county); \n\t\t}\n\t\t\n\t\t//if title is set\t \t\t \n\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\n\t\t\t{\n\t\t\t $search_text = $this->data['vouchers']['search_text'] ;\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\n\t\t\t $search_text = $this->params['named']['search_text'] ;\n\t\t\t}else{\n $search_text ='';\n\t\t\t}\n\t\t\t$this->set('search_text',$search_text); \n\t\t}\n\t\t\n\t\t//if start and end dates are set \n\t\t\n\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\n\t\t\t{\n\t\t\t $arrS_date = explode(\"/\",$this->data['vouchers']['s_date']);\n\t\t\t $day = $arrS_date[0] ;\n\t\t\t $month = $arrS_date[1] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->data['vouchers']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\n\t\t\t \n\t\t\t $arrS_date = explode(\"-\",$this->params['named']['s_date']);\n\t\t\t $day = $arrS_date[0] ;\n\t\t\t $month = $arrS_date[1] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->params['named']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}else{\n\t\t\t $s_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('s_date',$s_date);\n\t\t\t\n\t\t\t$this->set('s_datetmsp',$s_datetmsp);\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\n\t\t\t{\n\t\t\t\n\t\t\t $arrE_date = explode(\"/\",$this->data['vouchers']['e_date']);\n\t\t\t $eday = $arrE_date[0] ;\n\t\t\t $emonth = $arrE_date[1] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t $e_date = $this->data['vouchers']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\n\t\t\t \n\t\t\t $arrE_date = explode(\"-\",$this->params['named']['e_date']);\n\t\t\t $eday = $arrE_date[0] ;\n\t\t\t $emonth = $arrE_date[1] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t \n\t\t\t $e_date = $this->params['named']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}else{\n\t\t\t $e_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('e_date',$e_date);\n\t\t\t$this->set('e_datetmsp',$e_datetmsp);\n\t\t\n\t\t}\n\t\n\t\t \n\t\t\t /*----------------------------------At the time of sorting Filteration on basis of these fields------------------------------*/\n\t\t\n\t\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\n\t\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\n\t\t}\n\t\t\n\t\tif(isset($category) && $category !=''){\n\t\t $cond['Voucher.category_id'] = $category;\n\t\t}\n\t\t\n\t\tif(isset($county) && $county !=''){\n\t\t $cond['Voucher.advertiser_county_id'] = $county;\n\t\t}\n\n\t\tif(isset($search_text) && $search_text !=''){\n\t\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\n\t\t}\n\t\t\n\t\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\n\t\t $cond['Voucher.s_date >='] = $s_datetmsp ;\n\t\t $cond['Voucher.e_date <='] = $e_datetmsp ;\n\t\t}\n\t\t\n\t\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\n\n\t\t\n\t\t $cond['Voucher.s_date ='] = $s_datetmsp ;\n\t\t\n\t\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\n\t\t $cond['Voucher.e_date ='] = $e_datetmsp ;\n\t\t}\n\n\t\t\n\t\t$data = $this->paginate('Voucher', $cond);\n\t\t$this->set('vouchers', $data);\n\t\n\t}","title":""},{"docid":"436fa0b7be7f3da7f95d7022b403edb5","score":"0.48030066","text":"public function index()\n\t{\n\n\t\t//$vouchers = Vouchers::latest()->get();\n $vouchers= Vouchers::paginate(1);\n //dd($paginare);\n\t\treturn view('administrare.pages.voucher.index', compact('vouchers'));\n // ->with(compact('paginare'));\n\t}","title":""},{"docid":"3c32c2b4304c44e6e1023d89efd9c5ba","score":"0.48025286","text":"public function method1()\n {\n $user = getAPIUser();\n\n // Only Buyer User or Broker can access buyer records\n if (!($this->isCustomer() || ($this->isBroker() && $user->broker))) {\n ssAbort('Unauthorised', ERROR_CODE_UNAUTHORIZED);\n }\n\n $buyers = null;\n\n if ($this->isCustomer()) {\n $buyers = $user->buyers;\n } else if ($this->isBroker() && $user->broker) {\n $buyers = $user->broker->buyers;\n }\n\n loadObjects($buyers, [\n 'individual',\n 'company',\n 'officers',\n 'primary_address',\n 'mailing_address',\n 'email_contact',\n 'phone1_contact',\n 'phone2_contact',\n 'documents',\n 'lawyers',\n 'users'\n ]);\n\n $data = [\n \"buyers\" => $buyers,\n ];\n\n $buyersArray[]=['No', 'Date', 'Name', 'Email', 'Contact Number', 'NIRC/PASSPORT / COMPANY REG. NO', 'STATUS'];\n foreach($buyers as $key=>$buyer){\n $verified =($buyer->emailContact->verified)?'Verified':'Not Verified';\n $email =($buyer->emailContact->value)?$buyer->emailContact->value:'';\n $created_at =!empty($buyer->emailContact->created_at)?$buyer->emailContact->created_at:'';\n $display_name =!empty($buyer->individual)?$buyer->individual->first_name.' '.$buyer->individual->last_name:$buyer->company->name;\n $phone1Contactvalue =!empty($buyer->phone1Contact->value)?$buyer->phone1Contact->value:'';\n\n\n if(!empty($buyer->individual)){\n $passport_no =!empty($buyer->individual->passport_no)?$buyer->individual->passport_no:$buyer->individual->national_id;\n }\n if(!empty($buyer->company)){\n $passport_no =!empty($buyer->company->reg_no)?$buyer->company->reg_no:'';\n }\n //$passport_no =!empty($buyer->individual)?($buyer->individual->identity_type=='singaporean' || $buyer->individual->identity_type=='singaporean_r')?$buyer->individual->national_id:$buyer->individual->passport_no:$buyer->company->reg_no;\n $buyersArray[]=[$key+1, $created_at, $display_name, $email, $phone1Contactvalue, $passport_no, $verified];\n }\n Excel::create('BUYERS LIST', function ($exportBuyers) use ($buyersArray) {\n // Set the spreadsheet title, creator, and description\n $exportBuyers->setTitle('BUYERS LIST');\n $exportBuyers->setCreator('test')->setCompany('Show Suite');\n $exportBuyers->setDescription('Buyers List Export');\n //Property\n $exportBuyers->sheet('Buyers', function ($sheet) use ($buyersArray) {\n $sheet->fromArray($buyersArray, null, 'A1', true, false);\n });\n\n })->download('xlsx');\n\n }","title":""},{"docid":"f1d5d7d30b93f2bfe29e2aa250ec0ec0","score":"0.47578892","text":"function gen() { $this->generate(); }","title":""},{"docid":"b3e4213cbc089be7b07970ee597139c0","score":"0.47552603","text":"public function generate()\n {\n }","title":""},{"docid":"cc44ac22660d0a3053ee6ec80ae9ff2c","score":"0.4710078","text":"public function generate_guest_report(){\n\t\t$pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\n\t\t// set document information\n\t\t// $pdf->SetCreator(PDF_CREATOR);\n\t\t// $pdf->SetAuthor('Nicola Asuni');\n\t\t// $pdf->SetTitle('TCPDF Example 048');\n\t\t// $pdf->SetSubject('TCPDF Tutorial');\n\t\t// $pdf->SetKeywords('TCPDF, PDF, example, test, guide');\n\n\t\t// set default header data\n\t\t$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);\n\n\t\t// set header and footer fonts\n\t\t$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n\t\t$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n\n\t\t// set default monospaced font\n\t\t$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n\t\t// set margins\n\t\t$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n\t\t$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n\t\t$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n\t\t// set auto page breaks\n\t\t$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n\t\t// set image scale factor\n\t\t$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n\t\t// set some language-dependent strings (optional)\n\t\tif (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\n\t\t\trequire_once(dirname(__FILE__).'/lang/eng.php');\n\t\t\t$pdf->setLanguageArray($l);\n\t\t}\n\n\t\t// ---------------------------------------------------------\n\n\t\t// set font\n\t\t$pdf->SetFont('helvetica', 'B', 20);\n\n\t\t// add a page\n\t\t$pdf->AddPage();\n\n\t\t$pdf->Write(0, 'Guest List', '', 0, 'C', true, 0, false, false, 0);\n\n\t\t// set font\n\t\t$pdf->SetFont('helvetica', 'B', 10);\n\t\t\n\t\t$pdf->Write(0, 'Date: '.date('F d, Y'), '', 0, 'C', true, 0, false, false, 0);\n\t\t\n\t\t$pdf->SetFont('helvetica', '', 10);\n\t\t\n\t\tif(isset($_POST['guest_type_id']) == true && isset($_POST['gender_id']) == true){\n\t\t\t$data['guests'] = $this->usersModel->getGuestTypeAndGender($_POST['guest_type_id'], $_POST['gender_id']);\n\t\t}elseif(isset($_POST['guest_type_id']) == true && isset($_POST['gender_id']) == false){\n\t\t\t$data['guests'] = $this->usersModel->getGuestTypeAndNoGender($_POST['guest_type_id']);\n\t\t}elseif(isset($_POST['guest_type_id']) == false && isset($_POST['gender_id']) == true){\n\t\t\t$data['guests'] = $this->usersModel->getNoGuestTypeAndGender($_POST['gender_id']);\n\t\t}else{\n\t\t\t$data['guests'] = $this->usersModel->getUsersLists();\n\t\t}\n\t\t$html = view('Modules\\Guests\\Views\\guests\\guestspdf', $data);\n\t\t$pdf->writeHTML($html, true, false, false, false, '');\n\t\t// ---------------------------------------------------------\n\n\t\t// Close and output PDF document\n\t\t// This method has several options, check the source code documentation for more information.\n\t\t$pdf->Output('example_001.pdf', 'I');\n\t\tdie();\n\t}","title":""},{"docid":"c26d8057542b3ffe28f242620e5fc519","score":"0.46835908","text":"abstract public function generate();","title":""},{"docid":"c26d8057542b3ffe28f242620e5fc519","score":"0.46835908","text":"abstract public function generate();","title":""},{"docid":"c26d8057542b3ffe28f242620e5fc519","score":"0.46835908","text":"abstract public function generate();","title":""},{"docid":"c26d8057542b3ffe28f242620e5fc519","score":"0.46835908","text":"abstract public function generate();","title":""},{"docid":"c26d8057542b3ffe28f242620e5fc519","score":"0.46835908","text":"abstract public function generate();","title":""},{"docid":"54d8d709193bf8cd436df32b18796ca7","score":"0.46793646","text":"public function getAll(Request $request, Response $response)\n {\n $vouchers = Voucher::all();\n return response()->json([\n 'vouchers' => $vouchers\n ], 200);\n }","title":""},{"docid":"d234f6e813278016f8e3644f3ac69297","score":"0.46764204","text":"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $recipients = [];\n\n /**\n * This first recipient will be used for later testing the API\n */\n $recipients[] = DB::table('recipients')\n ->insertGetId([\n 'name' => 'John Doe',\n 'email' => 'john@doe.com',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n\n for ($i = 0; $i < 49; $i++) {\n $recipients[] = DB::table('recipients')\n ->insertGetId([\n 'name' => $faker->name,\n 'email' => $faker->unique()->email,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n }\n\n for ($i = 0; $i < 5; $i++) {\n $offer = DB::table('special_offers')\n ->insertGetId([\n 'name' => $faker->sentence(4),\n 'discount' => $faker->numberBetween(1, 20) * 5,\n 'expiration' => $faker->dateTimeBetween('-2 months', '+5 months'),\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n\n foreach ($recipients as $recipient) {\n DB::table('voucher_codes')\n ->insert([\n 'special_offer_id' => $offer,\n 'recipient_id' => $recipient,\n 'code' => str_random(12),\n 'used_on' => (mt_rand(0, 2) <= 1) ? $faker->dateTimeBetween('-2 months', 'now') : NULL,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n }\n }\n }","title":""},{"docid":"7f995aa3fd22e6520e919d63477ad1ef","score":"0.46645784","text":"public function generate( $args, $assoc_args ) {\n $faker = Faker::get();\n\n $count = 10;\n $generated = 0;\n\n if ( ! empty( $assoc_args['count'] ) ) {\n $count = $assoc_args['count'];\n }\n\n $message = sprintf( 'Generating %d vendors', $count );\n\n $progress = $this->make_progress_bar( $message, $count );\n\n add_filter( 'woocommerce_email_enabled_dokan_new_seller', '__return_false' );\n\n for ( $i = 0; $i < $count; $i++ ) {\n $email = $faker->safeEmail;\n $shopname = $faker->unique()->userName;\n\n $userdata = [\n 'user_login' => $email,\n 'user_email' => $email,\n 'user_pass' => ',lpmkonji',\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName,\n 'role' => 'seller',\n 'user_nicename' => $shopname,\n ];\n\n $vendor = wp_insert_user( $userdata );\n\n if ( ! is_wp_error( $vendor ) ) {\n $dokan_settings = array(\n 'store_name' => $shopname,\n 'social' => array(),\n 'payment' => array(),\n 'phone' => $faker->phoneNumber,\n 'show_email' => 'no',\n 'dokan_category' => '',\n 'banner' => 0,\n );\n\n // 50-50 chance to add location data\n $add_location_data = $faker->boolean();\n\n if ( $add_location_data ) {\n $lat = $faker->latitude( 23.70, 23.90 );\n $long = $faker->longitude( 90.25, 90.50 );\n\n $dokan_settings['find_address'] = $faker->address;\n $dokan_settings['location'] = $lat . ',' . $long;\n }\n\n update_user_meta( $vendor, 'dokan_profile_settings', $dokan_settings );\n update_user_meta( $vendor, 'dokan_store_name', $dokan_settings['store_name'] );\n\n do_action( 'dokan_new_seller_created', $vendor, $dokan_settings );\n\n do_action( 'dokan_dev_cli_vendor_generated', $vendor );\n\n ++$generated;\n }\n\n $progress->tick();\n }\n\n $progress->finish();\n\n $message = sprintf( 'Generated %d vendors', $generated );\n\n $this->success( $message );\n }","title":""},{"docid":"546026b52202f3210a24a75e0f2235b1","score":"0.4659318","text":"public function createReservationVoucher(BathReservation $reservation, string $flePath, string $projectDir)\n {\n $pdfOptions = new Options();\n $pdfOptions->set('defaultFont', 'DejaVu Sans');\n // Instantiate Dompdf with our options\n $dompdf = new Dompdf($pdfOptions);\n\n $dompdf->getOptions()->setChroot($projectDir . DIRECTORY_SEPARATOR . 'public'); //path to document root\n // Retrieve the HTML generated in our twig file\n\n /** @var BathSlot[] $slots */\n $slots = $reservation->getSlots();\n $countSlots = count($slots);\n $startTime = $slots[0]->getBathschedule()->getDate()->format('Y-m-d'). \" \" .explode('-', $slots[0]->getTime())[0];\n $endTime = $slots[$countSlots - 1]->getBathschedule()->getDate()->format('Y-m-d'). \" \" .explode('-', $slots[$countSlots - 1]->getTime())[1];\n $html = $this->twig->render('pdf/voucher.html.twig', [\n 'title' => \"Ваучер бронирования\",\n 'assetDir' => $projectDir . DIRECTORY_SEPARATOR . 'public',\n 'reservation' => $reservation,\n 'startTime' => $startTime,\n 'endTime' => $endTime\n ]);\n\n $dompdf->loadHtml($html);\n \n // (Optional) Setup the paper size and orientation 'portrait' or 'portrait'\n $dompdf->setPaper('A4', 'portrait');\n\n // Render the HTML as PDF\n $dompdf->render();\n\n // Store PDF Binary Data\n $output = $dompdf->output();\n \n // Write file to the desired path\n file_put_contents($flePath, $output); \n }","title":""},{"docid":"b22bf1296ea34a5a7f8993ee4749927c","score":"0.46513382","text":"public function index() {\n\t\t$id = $this->requete->getParametre('id');\n $Client = $this->Client->getClient($id);\n $this->genererVue(array('Client' => $Client));\n }","title":""},{"docid":"efb5112dd14999fbfd9069a8830aa8b3","score":"0.46510085","text":"public function getTypeVouchers(){\n $type_vouchers = \\DB::table('type_vouchers')->get();\n return response()->json(['estado'=>true, 'code'=>'200', 'message'=>\"Petición exitosa\", 'data'=>$type_vouchers]);\n\n }","title":""},{"docid":"534410c4a5ca0ae549bfaa831f292b73","score":"0.46496972","text":"public abstract function generateView();","title":""},{"docid":"42ada19f453464f1876edd8e8dc6bedb","score":"0.46456087","text":"public function ventas(Request $request)\n {\n $facturas = Factura::orderBy('fecha', 'ASC')->get();\n // Establecer la fecha desde y hasta\n if (count($facturas) > 0) {\n $inicio = $facturas->first();\n $ultima = $facturas->last();\n $from = $request->get('desde', $inicio->fecha);\n $to = $request->get('hasta', $ultima->fecha);\n } else {\n $from = $request->get('desde', now());\n $to = $request->get('hasta', now());\n }\n\n $desde = new Carbon($from);\n $hasta = new Carbon($to);\n $ventasFecha = [];\n $fecs = collect();\n $vendedores = [];\n $ventasVendedores = [];\n $sellers = collect();\n $ventasClientes = [];\n $clientes = [];\n $clients = collect();\n $ventasCondiciones = [];\n $condiciones = collect(['CONTADO', 'CUENTA CORRIENTE', 'CREDITO / DEBITO']);\n\n // Buscar las facturas entre las fechas\n $facturas = Factura::where('fecha', '>=', $desde->format('Ymd'))->where('fecha', '<=', $hasta->format('Ymd'))->orderBy('fecha', 'ASC')->take($request->get('limit', null))->get();\n\n foreach ($facturas as $factura) {\n $seller = User::find($factura->user_id);\n $sellers->push($seller);\n $client = Cliente::find($factura->cliente_id);\n $clients->push($client);\n }\n\n $facturas2 = Factura::where('fecha', '>=', $desde->format('Ymd'))->where('fecha', '<=', $hasta->format('Ymd'))->orderBy('fecha', 'ASC')->get();\n foreach ($facturas2 as $factura) {\n $fecs->push($factura->fecha);\n }\n\n // Fechas\n $auxFechas = $fecs->unique();\n foreach ($auxFechas as $value) {\n $factus = Factura::where('fecha', $value)->get();\n array_push($ventasFecha, $factus);\n };\n $columnsFechas = ['fecha', 'total'];\n $rowsFechas = collect();\n $total = 0;\n for ($i = 0; $i < count($ventasFecha); $i++) {\n $otro = $ventasFecha[$i];\n foreach ($otro as $a) {\n $total += $a->total;\n }\n $fecha = $ventasFecha[$i][0]->fecha;\n $fechaNew = new Carbon($fecha);\n $rowsFechas->push([\n 'fecha' =>\n $fechaNew->format('d-m-Y'),\n 'total' => $total\n ]);\n $total = 0;\n };\n $ventasFechasChart = collect();\n $ventasFechasChart->put('columns', $columnsFechas);\n $ventasFechasChart->put('rows', $rowsFechas);\n // Fin Fechas\n\n // Vendedores\n $auxVendedores = $sellers->unique();\n foreach ($auxVendedores as $key) {\n $facs = Factura::where('user_id', $key->id)\n ->where('fecha', '>=', $desde->format('Ymd'))\n ->where('fecha', '<=', $hasta->format('Ymd'))\n ->orderBy('fecha', 'ASC')\n ->get();\n array_push($vendedores, $key);\n array_push($ventasVendedores, $facs);\n }\n $columnsVendedores = ['vendedor', 'totalVendido'];\n $rowsVendedores = collect();\n $total = 0;\n for ($i = 0; $i < count($ventasVendedores); $i++) {\n $otro = $ventasVendedores[$i];\n foreach ($otro as $a) {\n $total += $a->total;\n }\n $rowsVendedores->push([\n 'vendedor' => $vendedores[$i]->name,\n 'totalVendido' => $total\n ]);\n $total = 0;\n };\n $ventasVendedores = collect();\n $ventasVendedores->put('columns', $columnsVendedores);\n $ventasVendedores->put('rows', $rowsVendedores);\n // Fin Vendedores\n\n // Clientes\n $auxClientes = $clients->unique();\n foreach ($auxClientes as $aux) {\n $facturs = Factura::where('cliente_id', $aux->id)\n ->where('fecha', '>=', $desde->format('Ymd'))\n ->where('fecha', '<=', $hasta->format('Ymd'))\n ->orderBy('fecha', 'ASC')->get();\n array_push($clientes, $aux);\n array_push($ventasClientes, $facturs);\n }\n $columnsClientes = ['cliente', 'totalComprado'];\n $rowsClientes = collect();\n $total = 0;\n for ($i = 0; $i < count($ventasClientes); $i++) {\n $otro = $ventasClientes[$i];\n foreach ($otro as $a) {\n $total += $a->total;\n }\n $rowsClientes->push([\n 'cliente' => $clientes[$i]->razonsocial,\n 'totalComprado' => $total\n ]);\n $total = 0;\n };\n $ventasClientes = collect();\n $ventasClientes->put('columns', $columnsClientes);\n $ventasClientes->put('rows', $rowsClientes);\n // Fin Clientes\n\n // Condiciones\n foreach ($condiciones as $cond) {\n $fa = Factura::where('condicionventa', $cond)\n ->where('fecha', '>=', $desde->format('Ymd'))\n ->where('fecha', '<=', $hasta->format('Ymd'))\n ->orderBy('fecha', 'ASC')->get();;\n array_push($ventasCondiciones, $fa);\n }\n $columnsCondiciones = ['condicion', 'totalVendido'];\n $rowsCondiciones = collect();\n $total = 0;\n for ($i = 0; $i < count($ventasCondiciones); $i++) {\n $otro = $ventasCondiciones[$i];\n foreach ($otro as $a) {\n $total += $a->total;\n }\n $rowsCondiciones->push([\n 'condicion' => $condiciones[$i],\n 'totalVendido' => $total\n ]);\n $total = 0;\n };\n $ventasCondiciones = collect();\n $ventasCondiciones->put('columns', $columnsCondiciones);\n $ventasCondiciones->put('rows', $rowsCondiciones);\n // Fin Condiciones\n\n $ventas = [\n 'fechas' => ['desde' => $desde->format('Y-m-d'), 'hasta' => $hasta->format('Y-m-d')],\n 'ventasFecha' => $facturas,\n 'ventasFechaChart' => $ventasFechasChart,\n 'total' => count(Factura::all()),\n 'vendedores' => $vendedores,\n 'ventasVendedores' => $ventasVendedores,\n 'clientes' => $clientes,\n 'ventasClientes' => $ventasClientes,\n 'condiciones' => $condiciones,\n 'ventasCondiciones' => $ventasCondiciones\n ];\n\n return ['ventas' => $ventas];\n }","title":""},{"docid":"188bcaec1f4f91a043af3b33457bc868","score":"0.46387964","text":"public function __construct(Google_Client $client)\n {\n parent::__construct($client);\n $this->servicePath = 'apps/reseller/v1/';\n $this->version = 'v1';\n $this->serviceName = 'reseller';\n\n $this->customers = new Google_Service_Reseller_Customers_Resource(\n $this,\n $this->serviceName,\n 'customers',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'customers/{customerId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'customers',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerAuthToken' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),'patch' => array(\n 'path' => 'customers/{customerId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'customers/{customerId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->subscriptions = new Google_Service_Reseller_Subscriptions_Resource(\n $this,\n $this->serviceName,\n 'subscriptions',\n array(\n 'methods' => array(\n 'activate' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/activate',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'changePlan' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changePlan',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'changeRenewalSettings' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'changeSeats' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changeSeats',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'delete' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'deletionType' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'get' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'customers/{customerId}/subscriptions',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customerAuthToken' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),'list' => array(\n 'path' => 'subscriptions',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'customerAuthToken' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'pageToken' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'customerId' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'maxResults' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'customerNamePrefix' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),'startPaidService' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/startPaidService',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'suspend' => array(\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/suspend',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'customerId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'subscriptionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n }","title":""},{"docid":"15dbf206655220f9b5a7f5bdefe836dd","score":"0.46299675","text":"protected function GetActiveVouchers()\n {\n if (is_null($this->oActiveVouchers)) {\n $this->oActiveVouchers = new TShopBasketVoucherList();\n }\n\n return $this->oActiveVouchers;\n }","title":""},{"docid":"b7372e67a6ced070a8fdb527b5891a02","score":"0.46255672","text":"public function generate()\n {\n $this->initialiseDocument();\n $this->createRDFContainer();\n $this->createRDFVersion();\n $this->signManifest();\n }","title":""},{"docid":"d466adf32928ad68c826f61a4dd357ce","score":"0.4624151","text":"public function generate()\n {\n $validation = $this->validate();\n\n if ($validation === true) {\n $offers = Offer::whereHas('leadstat', function($query) {\n $query->where('date', '>=', Input::get('date_start'))\n ->where('date', '<=', Input::get('date_end'));\n });\n\n $country = Input::get('country');\n if (!empty($country)) {\n $offers->whereHas('countries', function($query) use ($country) {\n $query->where('country', '=', $country);\n });\n }\n\n $offerIds = Input::get('offer_ids');\n // 0 denotes all offers.\n if (!in_array('0', $offerIds))\n $offers->whereRaw('id IN (' . implode(',', $offerIds) . ')');\n\n $this->generated = true;\n return $this->showResults($offers->get()->sortBy('name'));\n } else {\n $this->setAlertDanger($validation);\n return $this->showResults();\n }\n }","title":""},{"docid":"0097b425d5ac073c4ed76e557e7723bd","score":"0.4622875","text":"function voucherCommon(){\n\t\t$this->set('title_for_layout','Gift Certificate Common');\n\t\t$this->set('categoryList',$this->common->getAllCategory());\n\t\t$this->set('countyList',$this->common->getAllCounty()); \t// List counties\n\t\t$this->set('cityList',$this->common->getAllCity()); \t\t// List cities\n\t\t$this->set('stateList',$this->common->getAllState()); \t\t// List states\n\t\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\n\t\t$this->set('search_text','Title');\n\t\t$this->set('s_date','');\n\t\t$this->set('e_date','');\n\t\t$this->set('category', 'Category');\n\t\t$this->set('county', 'County');\n\t\t$this->set('advertiser_profile_id', 'Advertiser');\n\t\t$cond = '';\n\t\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\n\t\t\n\t\t\n\t\t//pr($this->params);\n\t\t\n\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\n\t\t\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\n\t\t\t{\n\t\t\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\n\t\t\t}\n\t\t\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\n\t\t\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\n\t\t\t}else{\n\t\t\t \n\t\t\t $advertiser_profile_id =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('advertiser_profile_id',$advertiser_profile_id); \n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\n\t\t\t{\n\t\t\t $category = $this->data['vouchers']['category'] ;\n\t\t\t}\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\n $category = $this->params['named']['category'] ;\n\t\t\t}else{\n\t\t\t$category = '';\n\t\t\t}\n\t\t\t$this->set('category',$category); \n\t\t}\n// if county is set\n\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\n\t\t\n\t\t\n\t\t\n\t\t\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\n\t\t\t{\n\t\t\t $county = $this->data['vouchers']['county'] ;\n\t\t\t}\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\n $county = $this->params['named']['county'] ;\n\t\t\t}else{\n\t\t\t$county = '';\n\t\t\t}\n\t\t\t$this->set('county',$county); \n\t\t}\n\n\t\t\n\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\n\t\t\t{\n\t\t\t $search_text = $this->data['vouchers']['search_text'] ;\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\n\t\t\t $search_text = $this->params['named']['search_text'] ;\n\t\t\t}else{\n $search_text ='';\n\t\t\t}\n\t\t\t$this->set('search_text',$search_text); \n\t\t}\n\t\t\n\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\n\t\t\t{\n\t\t\t $arrS_date = explode(\"/\",$this->data['vouchers']['s_date']);\n\t\t\t $day = $arrS_date[1] ;\n\t\t\t $month = $arrS_date[0] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->data['vouchers']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\n\t\t\t \n\t\t\t $arrS_date = explode(\"-\",$this->params['named']['s_date']);\n\t\t\t $day = $arrS_date[1] ;\n\t\t\t $month = $arrS_date[0] ;\n\t\t\t $year = $arrS_date[2] ;\n\t\t\t \n\t\t\t $s_date = $this->params['named']['s_date'] ;\n\t\t\t $s_date = str_replace(\"/\",\"-\",$s_date);\n\t\t\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\n\t\t\t}else{\n\t\t\t $s_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('s_date',$s_date);\n\t\t\t\n\t\t\t$this->set('s_datetmsp',$s_datetmsp);\n\t\t\t\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\n\t\t\n\t\t\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\n\t\t\t{\n\t\t\t\n\t\t\t $arrE_date = explode(\"/\",$this->data['vouchers']['e_date']);\n\t\t\t $eday = $arrE_date[1] ;\n\t\t\t $emonth = $arrE_date[0] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t $e_date = $this->data['vouchers']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}\n\t\t\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\n\t\t\t \n\t\t\t $arrE_date = explode(\"-\",$this->params['named']['e_date']);\n\t\t\t $eday = $arrE_date[1] ;\n\t\t\t $emonth = $arrE_date[0] ;\n\t\t\t $eyear = $arrE_date[2] ;\n\t\t\t \n\t\t\t $e_date = $this->params['named']['e_date'] ;\n\t\t\t $e_date = str_replace(\"/\",\"-\",$e_date);\n\t\t\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\n\t\t\t}else{\n\t\t\t $e_date =\"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->set('e_date',$e_date);\n\t\t\t$this->set('e_datetmsp',$e_datetmsp);\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\n\t\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\n\t\t}\n\t\t\n\t\tif(isset($category) && $category !=''){\n\t\t $cond['Voucher.category_id'] = $category;\n\t\t}\n\t\t\n\t\tif(isset($county) && $county !=''){\n\t\t $cond['Voucher.advertiser_county_id'] = $county;\n\t\t}\n\n\t\tif(isset($search_text) && $search_text !=''){\n\t\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\n\t\t}\n\t\t\n\t\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\n\t\t $cond['Voucher.s_date >='] = $s_datetmsp ;\n\t\t $cond['Voucher.e_date <='] = $e_datetmsp ;\n\t\t}\n\t\t\n\t\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\n\t\t\n\t\t $cond['Voucher.s_date ='] = $s_datetmsp ;\n\t\t\n\t\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\n\t\t $cond['Voucher.e_date ='] = $e_datetmsp ;\n\t\t}\n\n\t\t$data = $this->paginate('Voucher', $cond);\n\t\t$this->set('vouchers', $data);\n\t\n\t}","title":""},{"docid":"21330d8293f52111fb7ca9b932bbe91a","score":"0.46182698","text":"function makeOfficerList() {\n global $HERE;\n $jsonPath = $HERE . \"../res/json/officers.json\";\n return jsonFileArrayToStr($jsonPath, \"makeOfficerHtml\");\n}","title":""},{"docid":"8dbe557dc0e43290c1459a242ee0566e","score":"0.46150115","text":"public function woo_vou_admin_voucher_pdf_download() {\r\r\n\t\t\r\r\n\t\tglobal $current_user;\r\r\n\t\t\r\r\n\t\tif( !empty( $_GET['download_file'] ) && !empty( $_GET['key'] ) \r\r\n\t\t\t&& !empty( $_GET['woo_vou_admin'] ) && !empty( $_GET['woo_vou_order_id'] ) ) {\r\r\n\t\t\t\t\r\r\n\t\t\t\tif ( current_user_can( 'moderate_comments' ) ) {\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t$product_id\t\t= (int) $_GET['download_file'];\r\r\n\t\t\t\t\t$email\t\t\t= sanitize_email( str_replace( ' ', '+', $_GET['email'] ) );\r\r\n\t\t\t\t\t$download_id\t= isset( $_GET['key'] ) ? preg_replace( '/\\s+/', ' ', $_GET['key'] ) : '';\r\r\n\t\t\t\t\t$order_id\t\t= $_GET['woo_vou_order_id'];\r\r\n\t\t\t\t\t$item_id\t\t= isset( $_GET['item_id'] ) ? $_GET['item_id'] : '';\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t//Generate PDF\r\r\n\t\t\t\t\t$this->model->woo_vou_generate_pdf_voucher( $email, $product_id, $download_id, $order_id, $item_id );\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t} else {\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\twp_die( '

    '.__( 'You are not allowed to access this URL.', 'woovoucher' ).'

    ' );\r\r\n\t\t\t\t}\r\r\n\t\t\t\t\r\r\n\t\t\t\texit;\r\r\n\t\t}\r\r\n\t}","title":""},{"docid":"6bdebcb50144a7f6bf261ac8ae1682a3","score":"0.46087518","text":"public function getOurOffers(Request $request){\n //$ouroffers = ouroffers::where('branch_id',$this->branch_id)->get();\n $ouroffers = ouroffers::all();\n $ouroffers = OurOffersResource::collection($ouroffers);\n $ouroffersArr = $ouroffers->toArray($ouroffers);\n //dd($ouroffersArr);\n $allArr = [];\n foreach($ouroffersArr as $items){\n foreach($items as $ouroffer){\n $allArr[] = $ouroffer;\n }\n }\n //dd($allArr);\n\n return $this->setCode(200)->setData($allArr)->send();\n\n }","title":""},{"docid":"f7f2ff05bb1a51f4b22d534004d7db02","score":"0.4596203","text":"public function index(Request $request)\n {\n $vouchers= Voucher::where(function($query) use ($request) {\n \n if (($term = $request->get('term'))) {\n\n $query->orWhere('dep_id','like','%' . $term . '%');\n // $query->orWhere('bacprno','like','%' . $term . '%');\n $query->orWhere('pboobrno','like','%' . $term . '%');\n $query->orWhere('pboacctcode','like','%' . $term . '%');\n\n }\n })\n \n ->orderBy('id', 'desc')\n ->where('is_released','<>','1')\n ->paginate(5);\n\n //$prs = PurchaseRequest::orderBy('id', 'desc')->paginate(4);\n return view('budget.vouchers.index', compact('vouchers'));\n }","title":""},{"docid":"34c3c1ee60e1b784061e5ffd150a6aa2","score":"0.45873955","text":"public function voucherpaymentemail(Request $request)\n {\n\n //////vouchertemplate\n\n //agency detal get\n\n $payment_booking = DB::table('payment')->where('id', '=', $_POST['bookingid'])->get();\n\n $guest = unserialize($payment_booking[0]->guest);\n\n $Servicename = '';\n\n $Servicetype = '';\n\n $MealBasis = '';\n\n $ServiceAddress = '';\n\n $RoomServiceType = '';\n\n $NoRooms = '';\n\n $Child = '';\n\n $Desitination = '';\n\n $starCategory = '';\n\n $Reservationstatus = '';\n\n $GuestName = '';\n\n $NoAdult = '';\n\n $Infants = '';\n\n $PoliciesDetails = '';\n\n if ($payment_booking[0]->supplier == 'travelanda') {\n $getBookingDetails = $this->getBookingDetails($payment_booking[0]);\n\n $Gethotelresponse = HotelApiController::Gethotelresponse($payment_booking[0]->hotelid);\n\n $Description = '';\n\n if (isset($Gethotelresponse->Body->Hotels->Hotel->Description)) {\n $Description = $Gethotelresponse->Body->Hotels->Hotel->Description;\n }\n\n if (isset($getBookingDetails->Body->Bookings)) {\n foreach ($getBookingDetails->Body->Bookings->HotelBooking as $HotelBooking) {\n if ($payment_booking[0]->BookingReference == $HotelBooking->BookingReference) {\n $bo = 1;\n\n if (isset($HotelBooking->Policies->Policy)) {\n $PoliciesDetails .= $Description;\n\n $PoliciesDetails .= '
    You may cancel your reservation for no charge before this deadline. \n\n\t\t Please note that we will assess full payment of reservation if you must cancel after this deadline.
    ';\n\n foreach ($HotelBooking->Policies->Policy as $Policy) {\n if ($Policy->Type == 'Percentage') {\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay Value.'% penalty for this booking.
    ';\n }\n\n if ($Policy->Type == 'Amount') {\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay $ '.$Policy->Value.' penalty for this booking.
    ';\n }\n\n if ($Policy->Type == 'Nights') {\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay '.$Policy->Value.' night price penalty for this booking.
    ';\n }\n\n ++$bo;\n }\n }\n\n // echo '
    ';\n\n                        //print_r($payment_booking);\n\n                        // print_r($HotelBooking);\n\n                        //echo '
    ';\n\n /*echo '
    ';\n\n    print_r($guest);\n\n    echo '
    ';*/\n\n //guest dateil\n\n $roomGuestDetails = '';\n\n foreach ($guest as $guestDetails) {\n if ($guestDetails['adult'] != 0) {\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\n $roomGuestDetails .= '

    '.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'

    ';\n }\n }\n\n if ($guestDetails['child'] != 0) {\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\n $roomGuestDetails .= '

    '.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'

    ';\n }\n }\n }\n\n $RoomName = '';\n\n $NumAdults = '';\n\n $NumChildren = '';\n\n $room = 0;\n\n foreach ($HotelBooking->Rooms->Room as $roomDetails) {\n $RoomName = $roomDetails->RoomName;\n\n $NumAdults += $roomDetails->NumAdults;\n\n $NumChildren += $roomDetails->NumChildren;\n\n ++$room;\n }\n\n $Servicename = $HotelBooking->HotelName;\n\n $Servicetype = 'Hotel';\n\n $MealBasis = $HotelBooking->BoardType;\n\n $ServiceAddress = $HotelBooking->City;\n\n $RoomServiceType = $RoomName;\n\n $NoRooms = $room;\n\n $Child = $NumChildren;\n\n $Desitination = $HotelBooking->City;\n\n $starCategory = '';\n\n $Reservationstatus = 'Confirm';\n\n $GuestName = $roomGuestDetails;\n\n $NoAdult = $NumAdults;\n\n $Infants = $NumChildren;\n }\n }\n }\n }\n\n if ($payment_booking[0]->supplier == 'tbo') {\n $getBookingDetails = $this->tbobboking_details($payment_booking[0]->BookingReference);\n\n $tboHolidaysHotelDetails = HotelApiController::tboHolidaysHotelDetails($payment_booking[0]->hotelid);\n\n /*\techo '
    ';\n\n        print_r($tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description']);\n\n        echo '
    ';*/\n\n $RoomName = '';\n\n if (!empty($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'])) {\n for ($r = 0; $r < $payment_booking[0]->no_of_room; ++$r) {\n $RoomName .= '

    '.$getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'][$r]['RoomName'].'

    ';\n }\n }\n\n //guest dateil\n\n $roomGuestDetails = '';\n\n $NumAdults = 0;\n\n $NumChildren = 0;\n\n foreach ($guest as $guestDetails) {\n $NumAdults += $guestDetails['adult'];\n\n if ($guestDetails['adult'] != 0) {\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\n $roomGuestDetails .= '

    '.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'

    ';\n }\n }\n\n if ($guestDetails['child'] != 0) {\n $NumChildren += $guestDetails['child'];\n\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\n $roomGuestDetails .= '

    '.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'

    ';\n }\n }\n }\n\n $PoliciesDetails .= $tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description'];\n\n $PoliciesDetails .= '
    You may cancel your reservation for no charge before this deadline. \n\n\t\t Please note that we will assess full payment of reservation if you must cancel after this deadline.
    ';\n\n $attr = '@attributes';\n\n $bo = 1;\n\n if (isset($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'][0])) {\n foreach ($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'] as $Policy) {\n if ($Policy[$attr]['ChargeType'] == 'Fixed') {\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['Currency'].''.$Policy[$attr]['CancellationCharge'].' penalty for this booking
    ';\n }\n\n if ($Policy[$attr]['ChargeType'] == 'Percentage') {\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking
    ';\n }\n\n if ($Policy[$attr]['ChargeType'] == 'Night') {\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking
    ';\n }\n\n ++$bo;\n }\n }\n\n $Servicename = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\n\n $Servicetype = 'Hotel';\n\n $MealBasis = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\n\n $ServiceAddress = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['AddressLine1'];\n\n $RoomServiceType = $RoomName;\n\n $NoRooms = $payment_booking[0]->no_of_room;\n\n $Child = ''; //$NumChildren;\n\n $Desitination = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['City'];\n\n $starCategory = '';\n\n $Reservationstatus = 'Confirm';\n\n $GuestName = $roomGuestDetails;\n\n $NoAdult = $NumAdults;\n\n $Infants = $NumChildren;\n }\n\n $name = '';\n\n $address = '';\n\n $city = '';\n\n $country = '';\n\n if ($payment_booking[0]->user_type == 'AgencyManger') {\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '
    ';\n\n        print_r($agency);\n\n        echo '
    ';*/\n\n $name = $agency[0]->aname;\n\n $address = $agency[0]->address1;\n\n $city = $agency[0]->city;\n\n $country = $agency[0]->country;\n }\n\n if ($payment_booking[0]->user_type == 'SubAgencyManger') {\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '
    ';\n\n        print_r($agency);\n\n        echo '
    ';*/\n\n $name = $agency[0]->aname;\n\n $address = $agency[0]->address1;\n\n $city = $agency[0]->city;\n\n $country = $agency[0]->country;\n }\n\n if ($payment_booking[0]->user_type == 'UserInfo') {\n $userinformation = DB::table('userinformation')->where('loginid', '=', $payment_booking[0]->login_id)->get();\n\n /*\techo '
    ';\n\n        print_r($userinformation);\n\n        echo '
    ';*/\n\n $name = $userinformation[0]->name;\n\n $address = $userinformation[0]->email;\n\n $city = $userinformation[0]->phone;\n }\n\n /*echo '
    ';\n\n        print_r($guest[0]['firstname'][1]);\n\n        echo '
    ';*/\n\n $date1 = date_create($payment_booking[0]->checkin);\n\n $date2 = date_create($payment_booking[0]->checkout);\n\n $diff = date_diff($date1, $date2);\n\n $daycount = $diff->days;\n\n $tempalte = '\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tVoucher\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    Please Present this voucher upon arrival
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    Service Voucher

    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t

    '.$name.'

    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.$address.', '.$city.', '.$country.'.\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tBooking Information\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    Voucher NoLBVN'.$payment_booking[0]->hotelid.'
    LB REF NoLBHR'.$payment_booking[0]->hotelid.'
    Supplier Ref No'.$payment_booking[0]->id.$payment_booking[0]->hotelid.$payment_booking[0]->login_id.'
    Re-confirmation No/Msg'.$payment_booking[0]->login_id.$payment_booking[0]->hotelid.$payment_booking[0]->id.'
    Lead Name'.$guest[0]['firstname'][1].''.$guest[0]['lastname'][1].'
    Issued on'.date('d/M/Y, D', strtotime($payment_booking[0]->bookingdate)).'
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t

    Check In

    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t

    '.date('d', strtotime($payment_booking[0]->checkin)).'

    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.date('M', strtotime($payment_booking[0]->checkin)).', '.date('Y', strtotime($payment_booking[0]->checkin)).'\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.date('D', strtotime($payment_booking[0]->checkin)).'\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t

    Check Out

    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t

    '.date('d', strtotime($payment_booking[0]->checkout)).'

    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.date('M', strtotime($payment_booking[0]->checkout)).', '.date('Y', strtotime($payment_booking[0]->checkout)).'\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t'.date('D', strtotime($payment_booking[0]->checkout)).'\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t'.$daycount.' Nights\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tAccomodation Details\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    Servicename'.$Servicename.'
    Service Type '.$Servicetype.'
    Meal Basis '.$MealBasis.'
    Service Address'.$ServiceAddress.'
    RoomService Type'.$RoomServiceType.'
    No Rooms'.$NoRooms.'
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    Child '.$Child.'
    Desitination'.$Desitination.'
    Reservation Status'.$Reservationstatus.'
    NoAdult'.$NoAdult.'
    Infants'.$Infants.'
    Guest Name'.$GuestName.'
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tImportant Notes\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t'.$PoliciesDetails.'\n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t

    Hotel Map

    \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t
    \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t';\n\n $mail = $tempalte;\n\n $to = $payment_booking[0]->email;\n\n $subject = 'Booking Voucher';\n\n $message = $mail;\n\n $headers = \"From: B2B project\\r\\n\";\n\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n\n $headers .= \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n mail($to,$subject,$message,$headers);\n }","title":""},{"docid":"027153c383160e2e9e3efc321f79e2b2","score":"0.4585479","text":"function generate(Collection $collection, $code = null, $quota = null);","title":""},{"docid":"323a5921b64f12f2a9dfa292ee08c266","score":"0.4577593","text":"private function __generateData() {\n\t\t$this->__logMessage('Generating test data');\n\t\t$this->__pushLogIndent();\n\n\t\t$totalMembersToGenerate = 200;\n\t\t$membersRemaining = $totalMembersToGenerate;\n\n\t\t$genDetails = array();\n\n\t\t// Half the members should be current members\n\t\t$genDetails[Status::CURRENT_MEMBER] = $this->__distribureMembers($membersRemaining, 2);\n\n\t\t// 1/3rd of the remaining members should be ex members\n\t\t$genDetails[Status::EX_MEMBER] = $this->__distribureMembers($membersRemaining, 3);\n\n\t\t// Distribute the rest of the members evenly over the other statuses\n\t\t$toAssign = (int)floor($membersRemaining / 4);\n\n\t\t$genDetails[Status::PROSPECTIVE_MEMBER] = $toAssign;\n\t\t$genDetails[Status::PRE_MEMBER_1] = $toAssign;\n\t\t$genDetails[Status::PRE_MEMBER_2] = $toAssign;\n\t\t$genDetails[Status::PRE_MEMBER_3] = $toAssign;\n\n\t\t$membersRemaining -= ($toAssign * 4);\n\n\t\t// Any left? Make them current members\n\t\t$genDetails[Status::CURRENT_MEMBER] += $membersRemaining;\n\n\t\t$this->__logMessage(\"Generating data for $totalMembersToGenerate members.\");\n\n\t\t// Generate!\n\t\t$dataGenerator = new DataGenerator();\n\t\tforeach ($genDetails as $status => $num) {\n\t\t\tfor ($i = 0; $i < $num; $i++) {\n\t\t\t\t$dataGenerator->generateMember($status);\n\t\t\t}\n\t\t}\n\n\t\t// Finally generate the dev user\n\t\t$details = array(\n\t\t\t'firstname' => $this->__firstname,\n\t\t\t'surname' => $this->__surname,\n\t\t\t'email' => $this->__email,\n\t\t\t'username' => $this->__username,\n\t\t\t'groups' => array(\n\t\t\t\tGroup::CURRENT_MEMBERS, Group::FULL_ACCESS, Group::MEMBERSHIP_ADMIN,\n\t\t\t),\n\t\t);\n\t\t$dataGenerator->generateMember(Status::CURRENT_MEMBER, $details);\n\n\t\t// Generate some subscriptions\n\t\t$memberData = $dataGenerator->getMembersData();\n\n\t\t$memberEmails = array_map(function ($data) {\n\t\t\treturn $data['email'];\n\t\t}, $memberData);\n\n\t\t$emailGenerator = new emailGenerator();\n\t\t$randomEmails = array();\n\t\tfor ($i = 0; $i < 50; $i++) {\n\t\t\tarray_push($randomEmails, $emailGenerator->generate());\n\t\t}\n\t\t$allEmails = array_merge($memberEmails, $randomEmails);\n\n\t\t$mailingListDataGenerator = new MailingListDataGenerator();\n\t\tforeach ($mailingListDataGenerator->getMailingListsData() as $list) {\n\t\t\t$numToAdd = rand(10, 30);\n\t\t\tfor ($i = 0; $i < $numToAdd; $i++) {\n\t\t\t\t$timestamp = rand(strtotime('last year'), time());\n\t\t\t\t$email = $allEmails[array_rand($allEmails)];\n\t\t\t\t$mailingListDataGenerator->subscribeEmailToList($email, $list['id'], $timestamp);\n\t\t\t}\n\t\t}\n\n\t\t$this->__logMessage('Writing SQL files');\n\n\t\t$sqlData = array(\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/members_data.sql',\n\t\t\t\t'tableName' => 'members',\n\t\t\t\t'data' => $memberData,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/member_group_data.sql',\n\t\t\t\t'tableName' => 'member_group',\n\t\t\t\t'data' => $dataGenerator->getMembersGroupData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/account_data.sql',\n\t\t\t\t'tableName' => 'account',\n\t\t\t\t'data' => $dataGenerator->getAccountsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/pins_data.sql',\n\t\t\t\t'tableName' => 'pins',\n\t\t\t\t'data' => $dataGenerator->getPinsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/rfid_tags_data.sql',\n\t\t\t\t'tableName' => 'rfid_tags',\n\t\t\t\t'data' => $dataGenerator->getRfidTagsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/status_updates_data.sql',\n\t\t\t\t'tableName' => 'status_updates',\n\t\t\t\t'data' => $dataGenerator->getStatusUpdatesData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/mailinglists_data.development.sql',\n\t\t\t\t'tableName' => 'mailinglists',\n\t\t\t\t'data' => $mailingListDataGenerator->getMailingListsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/mailinglist_subscriptions_data.development.sql',\n\t\t\t\t'tableName' => 'mailinglist_subscriptions',\n\t\t\t\t'data' => $mailingListDataGenerator->getMailingListSubscriptionsData(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'filepath' => '../Sql/hms_emails_data.development.sql',\n\t\t\t\t'tableName' => 'hms_emails',\n\t\t\t\t'data' => $dataGenerator->getEmailRecordData(),\n\t\t\t),\n array(\n 'filepath' => '../Sql/bank_transactions_data.sql',\n 'tableName' => 'bank_transactions',\n 'data' => $dataGenerator->getBankTransactionData(),\n ),\n array(\n 'filepath' => '../Sql/access_log_data.sql',\n 'tableName' => 'access_log',\n 'data' => $dataGenerator->getAccessLogData(),\n ),\n\t\t);\n\n\t\t$sqlWriter = new sqlWriter();\n\t\tforeach ($sqlData as $dataEntry) {\n\t\t\t$sqlString = $sqlWriter->writeInsert($dataEntry['tableName'], $dataEntry['data']);\n\t\t\t$path = $dataEntry['filepath'];\n\t\t\tif ($this->__writeToFile($path, $sqlString)) {\n\t\t\t\t$this->__logMessage(\"Wrote $path\");\n\t\t\t} else {\n\t\t\t\t$this->__logMessage(\"Failed to write $path\");\n\t\t\t\t$this->__popLogIndent();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n \n // TODO: write out csv files of records we can import into the bank transactions table\n \n $this->__writeDataCSV($dataGenerator->getBankCSVData());\n\n\t\t$this->__popLogIndent();\n\t\treturn true;\n\t}","title":""},{"docid":"eb51ec8ce7192908a2077a5cad7d76b3","score":"0.457343","text":"public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|unique:giftvouchers,name,NULL,id,deleted_at,NULL',\n 'code' => 'required',\n 'value' => 'required',\n 'quantity' => 'required',\n 'valid_from' => 'required',\n 'valid_to' => 'required',\n \n ])->validate();\n\n $count = $request->quantity;;\n $generatedGiftVoucherCode = array();\n $prefix = $request->code;\n $fromDate = date('d',strtotime($request->valid_from));\n $toDate = date('d',strtotime($request->valid_to));\n\n for ($i=1; $i <= $count; $i++) {\n $generatedGiftVoucherCode[] = \"NSP\" . trim($prefix) . $fromDate . $this->generateGiftVouchers(6) . $toDate;\n }\n\n $out = array_values($generatedGiftVoucherCode);\n $myJSON = json_encode($out);\n\n $giftvoucher = new Giftvoucher();\n $giftvoucher->name = $request->name;\n $giftvoucher->code = $myJSON;\n $giftvoucher->value = $request->value;\n $giftvoucher->qty = $request->quantity;\n $giftvoucher->valid_from = date('Y-m-d',strtotime($request->valid_from));\n $giftvoucher->valid_to = date('Y-m-d',strtotime($request->valid_to));\n $giftvoucher->remark = $request->remark;\n $giftvoucher->created_by = 0;\n $giftvoucher->updated_by = 0;\n $result = $giftvoucher->save();\n\n if ($result == true) {\n return Redirect::back()->with('success', 'Successfully created');\n } else {\n return Redirect::back()->with('failure', 'Something Went Wrong..!');\n }\n }","title":""},{"docid":"bef1ed778c1e02dc62eb52aabc56ec76","score":"0.45559847","text":"public function getOwnOffers(){\n require('dbconnect.php');\n mysqli_select_db($connection, 'db_sharey');\n \n $query = \"SELECT o.*, p.pz_plz, p.pz_location, p.pz_plzID, t.tg_description AS tagDescription, t.tg_color AS tagColor, t.tg_tagID AS tagID \n FROM tbl_offer AS o \n JOIN tbl_tag AS t \n ON o.or_tagID = t.tg_tagID \n JOIN tbl_plz AS p \n ON o.or_plzID = p.pz_plzID \n WHERE o.or_ocID = \".$this->getUserID().\" AND o.or_active = true\n ORDER BY o.or_creationDate DESC;\";\n\n $res = mysqli_query($connection, $query);\n\n $offers = [];\n \n while(($data = mysqli_fetch_array($res)) != false){\n $offers[] = new Offer($data['or_active'], new DateTime($data['or_creationDate']), utf8_encode($data['or_description']), new DateTime($data['or_mhd']), $data['or_offerID'], $data['or_picture'], new PLZ(utf8_encode($data['pz_location']), $data['pz_plz'], $data['pz_plzID']), $data['or_report'], new Tag($data['tagColor'], utf8_encode($data['tagDescription']), $data['tagID']), utf8_encode($data['or_title']), $data['or_ocID']);\n }\n\n return $offers;\n }","title":""},{"docid":"6730ca59ff15b5099ec57f9474996749","score":"0.45557582","text":"public function makeJSONforBooking(Request $request)\n {\n $dateStart=$request->dateStart;\n $dateEnd=$request->dateEnd;\n\n $diff = strtotime($dateEnd) - strtotime($dateStart);\n $json=[];\n\n if($diff>0)\n {\n $cars=$this->aveilibleCars($dateStart,$dateEnd);\n $models=array_keys($cars);\n $readyModels=[];\n $cene=[];\n\n foreach($models as $model)\n {\n $readyModels[$model]=TipoviAutomobilaModel::where('Model',$model)->first();\n $cene[$model]=$this->totalCost($model,$dateStart,$dateEnd);\n }\n\n \n // $json['cars']=$cars;\n $json['unique_models']=$models;\n $json['cene']=$cene;\n $json['podaci']=$readyModels;\n }\n else\n {\n $json['unique_models']=[];\n $json['cene']=[];\n $json['podaci']=[];\n }\n\n $paket=json_encode($json);\n \n return $paket;\n }","title":""},{"docid":"a9f9022bda0d8043b770c2293b8b2f94","score":"0.45538932","text":"function volunteers()\n\t{\n\t\t$userInfo = $_SESSION['user'];\n\t\tif(!isset($userInfo))\n\t\t\tredirect('/hcdec/index');\n\t\tif(!in_array('manage_volunteers', $userInfo['roles']))\n\t\t\tredirect('/hcdec/myhcdec');\n\t\t\t# list the volunteers as rows in HTML table. parameters for\n\t\t# this request: $startDate, $endDate. if startDate is not\n\t\t# given, all volunteer requests are listed up thru endDate.\n\t\t# if endDate is not given, all volunteer requests are listed\n\t\t# period in one giant scrolling div. add format = html or csv\n\t\t# so we know which view to load\n\n\t\t$arr = $this->uri->uri_to_assoc(3);\n\t\t\n\t\t$criteria = array();\n\t\t$startDate = \"\";\n\t\tif(isset($arr['startDate']))\n\t\t{\n\t\t\t$criteria['startDate'] = $arr['startDate'];\n\t\t\t$startDate = $arr['startDate'];\n\t\t}\n\t\t\t\n\t\t$endDate = \"\";\n\t\tif(isset($arr['endDate']))\n\t\t{\n\t\t\t$criteria['endDate'] = $arr['endDate'];\n\t\t\t$endDate = $arr['endDate'];\n\t\t}\n\t\t\n\t\t$precinct = \"\";\n\t\tif(isset($arr['precinct']))\n\t\t{\n\t\t\t$criteria['precinct'] = $arr['precinct'];\n\t\t\t$precinct = $arr['precinct'];\n\t\t}\n\t\t\t\n\t\t# now look up volunteers\n\t\t$this->load->model('volunteers');\n\t\t#FIXME - change this to use start and end dates and precinct numbers\n\t\t$r = $this->volunteers->getVolunteersForCriteria($criteria);\n\t\tif($r['status'] == 'OK')\n\t\t{\n\t\t\tif(count($r['rows'])>0)\n\t\t\t{\n\t\t\t\t$params['volunteers'] = $r['rows'];\n\t\t\t\t$params['startDate'] = $startDate;\n\t\t\t\t$params['endDate'] = $endDate;\n\t\t\t\t$params['precinct'] = $precinct;\n\t\t\t\t$content = $this->load->view('hcdec_volunteers', $params, true);\n\t\t\t\t$p = array('user'=>$userInfo, 'content'=>$content);\n\t\t\t\t$this->load->view('public_template', $p);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# redirect to page that says 'no volunteers found in that range'\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# error page\n\t\t}\n\t}","title":""},{"docid":"99786d56b343a9b3e3ea5e40686d53f1","score":"0.45453182","text":"public function index()\n {\n if (\\request('year')){\n\n $date = Verta::parse(\\request('year'));\n $from = $date->formatGregorian('Y-m-d');//getGregorian($date->year, $date->month, $date->day);\n\n\n $date2 = $date->addDays(365);\n $to = $date2->formatGregorian('Y-m-d');\n\n\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->paginate(\\request('size') ? \\request('size') : 30));\n\n }\n\n if (\\request('lastName')){\n\n $lastName = \\request('lastName');\n\n $date = verta(Carbon::now()->format('Y-m-d'));\n $date->month(1);\n $date->day(1);\n $from = $date->formatGregorian('Y-m-d');\n\n $date2 = $date->addDays(365);\n $to = $date2->formatGregorian('Y-m-d');\n\n\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->where('lastName' ,'LIKE', '%' . $lastName . '%')->paginate(\\request('size') ? \\request('size') : 30));\n\n }\n\n else\n {\n $date = verta(Carbon::now()->format('Y-m-d'));\n $date->month(1);\n $date->day(1);\n $from = $date->formatGregorian('Y-m-d');\n\n $date2 = $date->addDays(365);\n $to = $date2->formatGregorian('Y-m-d');\n\n\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->paginate(\\request('size') ? \\request('size'):30));\n\n }\n\n }","title":""},{"docid":"8c8bc4eee5d1be97141dc54349031387","score":"0.45416793","text":"public function generateContract(){\n $users = DB::table('users')->get();\n $properties= DB::table('immovableproperty')->get();\n return view('auth.generateContract')->with('users',$users)->with('properties',$properties);\n }","title":""},{"docid":"56d496c921d7f48df2b9d8224481e8b0","score":"0.45380506","text":"protected function createVertices()\n {\n foreach ($this->items as $itemId => $itemData) {\n $vertex = $this->graph->createVertex($itemId);\n $vertex->setAttribute('data', $itemData);\n }\n }","title":""},{"docid":"3c2e8a3f416bb7e666e46ed3d31e1c31","score":"0.45315677","text":"public function create(Request $request)\n {\n $clinics = $this->clinicProfileRepository->all();\n return view('pemedic::admin.vouchers.create',compact('clinics','request'));\n }","title":""},{"docid":"c0f7345bc7675e223331f837dda3b2a5","score":"0.4531281","text":"public function booking ()\n {\n $clients = $this->Client->find('all', array ('fields' => array ('Client.id', 'Client.name')));\n $this->set(array('clients'),array($clients));\n }","title":""},{"docid":"10dcf4a14027142fc33a8f1a2f872ac4","score":"0.45308638","text":"public function productLicenses(Varien_Event_Observer $observer)\n {\n $event = $observer->getEvent();\n $order = $event->getInvoice()->getOrder();\n $invoice = $observer->getEvent()->getInvoice();\n switch ($invoice->getState()) {\n \tcase Mage_Sales_Model_Order_Invoice::STATE_PAID :\n \t $customerId = $invoice->getCustomerId();\n \t $orderId = $order->getIncrementId();\n \t $storeId = $invoice->getStoreId();\n \t $items = $invoice->getAllItems();\n \t $model = Mage::getModel('pyro_licenses/licenses');\n \t $emailData = array();\n \t \n \t foreach ($items as $item) {\n $product = Mage::getResourceModel('catalog/product')->getAttributeRawValue($item->getProductId(), 'license', $storeId);\n if (!$product) {\n continue; \n }\n \n $qty = (int) $item->getQty();\n $productId = $item->getProductId();\n $collection = $model->getCollection()->getAvailableLicenses();\n $collection->getSelect()->limit($qty);\n \n $emailData[$productId] = array(\n \t 'product' => $item,\n );\n \n foreach ($collection as $item) {\n $qty--;\n $item->setStatus(Pyro_Licenses_Model_Licenses::STATUS_ENABLED);\n $item->setCustomerId($customerId);\n $item->setProductId($productId);\n $item->setOrderId($orderId);\n $item->save();\n\n $emailData[$productId]['licenses'][] = $item->getLicenseKey();\n }\n \n // If there are no licenses in database generate for the remaining quantity \n if ($qty > 0) {\n for($i = 1; $i <= $qty; $i++) {\n $item = Mage::getModel('pyro_licenses/licenses');\n $licenseKey = Mage::helper('pyro_licenses/generate')->license();\n $item->setStatus(Pyro_Licenses_Model_Licenses::STATUS_ENABLED);\n $item->setCustomerId($customerId);\n $item->setProductId($productId);\n $item->setOrderId($orderId);\n $item->setLicenseKey($licenseKey);\n $item->save();\n $emailData[$productId]['licenses'][] = $licenseKey;\n }\n } \n \t }\n\n \t if(count($emailData)) {\n \t $this->sendLicensesMail($order, $emailData);\n \t }\n \t break;\n }\n \n return $this;\n }","title":""},{"docid":"f159d527a90fc5f638c60e8edb8e298f","score":"0.45285237","text":"function get_cdrs_retail_customer($icustomer, $from_date, $to_date, $iteracion, $cantidad) {\n try { \n if ($iteracion==1) {\n $cdrs_list_info = new SoapClient($this->wsdl_url_customer);\n $cdrs_list_info->__setSoapHeaders($this->auth_info);\n $this->cdrs_list_info = $cdrs_list_info;\n }\n \n // Se extraen como maximo los primeros 3000 CDRS por factura (para un cliente y un rango de fechas), \n // dado que al intentar sacar mas se obtiene error del SOAP\n $GetCustomerXDRsRequest_info = array('offset' => ($cantidad==0 ? 0 : (3000*$cantidad)), \n 'limit' => 3000, \n 'from_date' => $from_date . ' 00:00:00', 'to_date' => $to_date . ' 23:59:59',\n 'i_customer' => $icustomer);\n \n if ($GetCustomerXDRsRequest_info) {\n \n if ($iteracion==1) {\n $cdrs_list_response = $cdrs_list_info->get_customer_xdrs($GetCustomerXDRsRequest_info);\n } else {\n $cdrs_list_response = $this->cdrs_list_info->get_customer_xdrs($GetCustomerXDRsRequest_info);\n }\n\n if($cdrs_list_response){\n $this->xdr_list = $cdrs_list_response->xdr_list;\n return $resp = true; \n }else{\n \t$this->xdr_list = \"\";\n return $resp = false;\n }\n }else{\n return $resp = false;\n }\n } catch (SoapFault $exception) { } \n }","title":""}],"string":"[\n {\n \"docid\": \"c4c9f4e5070adf19f9913662f8bf5672\",\n \"score\": \"0.6959568\",\n \"text\": \"public function action_generate()\\n {\\n\\n $id_offer = Input::post(\\\"id_offer_gen\\\");\\n $expiration_date = Input::post(\\\"date_expiration\\\");\\n\\n $recipients = \\\\Model_Recipient::find('all');\\n\\n // Loop between recipients to create the vouchers\\n foreach ($recipients as $r) {\\n\\n // Create a new voucher record\\n $voucher = new \\\\Model_Voucher();\\n $voucher->id_recipient = $r->id_recipient;\\n $voucher->id_offer = $id_offer;\\n $voucher->date_expiration = $expiration_date;\\n $voucher->date_usage = NULL;\\n $voucher->code = $this->generateVoucherCode(); // generate random code\\n\\n $voucher->save();\\n\\n }\\n\\n Session::set_flash(\\\"success\\\", \\\"All vouchers have been generated sucessfully.\\\");\\n Response::redirect_back();\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"375bdd073345bfc6809a0e83809d267a\",\n \"score\": \"0.63281393\",\n \"text\": \"public function getVouchersList()\\n {\\n $vouchers = self::$uniFiClient->stat_voucher();\\n $date = new \\\\DateTime();\\n\\n foreach ($vouchers as $voucher) {\\n $interval = new \\\\DateInterval('PT' . $voucher->duration . 'M');\\n $created = new \\\\DateTime();\\n $created->setTimestamp($voucher->create_time);\\n\\n if ($created->add($interval) < $date) {\\n $voucher->invalid = true;\\n } else {\\n $voucher->invalid = false;\\n }\\n }\\n\\n return $vouchers;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6741e633250f943fd1db4bd11f22dfd\",\n \"score\": \"0.5916995\",\n \"text\": \"private function setUpForAvailableVouchersTests()\\n {\\n\\n $vouchers = [];\\n $vouchers[0] = factory(Voucher::class)->create([\\n 'public_name' => 'no limits applied',\\n ]);\\n $vouchers[1] = factory(Voucher::class)->create([\\n 'public_name' => 'no limits applied, not published',\\n ]);\\n $vouchers[2] = factory(Voucher::class)->create([\\n 'public_name' => 'expired, no limits applied',\\n ]);\\n $vouchers[3] = factory(Voucher::class)->create([\\n 'public_name' => 'limit_per_account set to 1',\\n ]);\\n $vouchers[4] = factory(Voucher::class)->create([\\n 'public_name' => 'limit_pet_required set to 1',\\n ]);\\n $vouchers[5] = factory(Voucher::class)->create([\\n 'public_name' => 'limit_species_id set to 1',\\n ]);\\n $vouchers[6] = factory(Voucher::class)->create([\\n 'public_name' => 'limit_per_pet set to 2',\\n ]);\\n\\n $consumers = [];\\n $consumers[0] = factory(Consumer::class)->create([\\n 'first_name' => 'No Pets',\\n 'last_name' => \\\"One coupon for {$vouchers[3]->id}\\\",\\n ]);\\n $consumers[1] = factory(Consumer::class)->create([\\n 'first_name' => 'No Pets',\\n 'last_name' => 'No Coupons',\\n ]);\\n $consumers[2] = factory(Consumer::class)->create([\\n 'first_name' => 'One pet, species id 1',\\n 'last_name' => \\\"One coupon, for {$vouchers[3]->id}\\\",\\n ]);\\n $consumers[3] = factory(Consumer::class)->create([\\n 'first_name' => 'One pet, species id 2',\\n 'last_name' => \\\"One coupon, for {$vouchers[3]->id}\\\",\\n ]);\\n $consumers[4] = factory(Consumer::class)->create([\\n 'first_name' => 'One pet, species id 1',\\n 'last_name' => 'No Coupons',\\n ]);\\n $consumers[5] = factory(Consumer::class)->create([\\n 'first_name' => 'One pet, species id 2',\\n 'last_name' => 'No Coupons',\\n ]);\\n\\n// $consumers = factory(Consumer::class, 6)->create();\\n\\n $vouchers[0]->subscribe_from_date = Carbon::now()->subDays(10);\\n $vouchers[0]->subscribe_to_date = Carbon::now()->addDays(10);\\n $vouchers[0]->limit_per_account = 0;\\n $vouchers[0]->limit_per_account_per_date_period = '0';\\n $vouchers[0]->limit_pet_required = 0;\\n $vouchers[0]->limit_per_pet = 0;\\n $vouchers[0]->limit_species_id = null;\\n $vouchers[0]->published = 1;\\n $vouchers[0]->save();\\n\\n $vouchers[1]->subscribe_from_date = Carbon::now()->subDays(10);\\n $vouchers[1]->subscribe_to_date = Carbon::now()->addDays(10);\\n $vouchers[1]->limit_per_account = 0;\\n $vouchers[1]->limit_per_account_per_date_period = '0';\\n $vouchers[1]->limit_pet_required = 0;\\n $vouchers[1]->limit_per_pet = 0;\\n $vouchers[1]->limit_species_id = null;\\n $vouchers[1]->published = 0;\\n $vouchers[1]->save();\\n\\n $vouchers[2]->subscribe_from_date = Carbon::now()->subDays(10);\\n $vouchers[2]->subscribe_to_date = Carbon::now()->subDays(5);\\n $vouchers[2]->limit_per_account = 0;\\n $vouchers[2]->limit_per_account_per_date_period = '0';\\n $vouchers[2]->limit_pet_required = 0;\\n $vouchers[2]->limit_per_pet = 0;\\n $vouchers[2]->limit_species_id = null;\\n $vouchers[2]->published = 1;\\n $vouchers[2]->save();\\n\\n $vouchers[3]->subscribe_from_date = Carbon::now()->subDays(10);\\n $vouchers[3]->subscribe_to_date = Carbon::now()->addDays(10);\\n $vouchers[3]->limit_per_account = 1;\\n $vouchers[3]->limit_per_account_per_date_period = '0';\\n $vouchers[3]->limit_pet_required = 0;\\n $vouchers[3]->limit_per_pet = 0;\\n $vouchers[3]->limit_species_id = null;\\n $vouchers[3]->published = 1;\\n $vouchers[3]->save();\\n\\n $vouchers[4]->subscribe_from_date = Carbon::now()->subDays(10);\\n $vouchers[4]->subscribe_to_date = Carbon::now()->addDays(10);\\n $vouchers[4]->limit_per_account = 0;\\n $vouchers[4]->limit_per_account_per_date_period = '0';\\n $vouchers[4]->limit_pet_required = 1;\\n $vouchers[4]->limit_per_pet = 0;\\n $vouchers[4]->limit_species_id = null;\\n $vouchers[4]->published = 1;\\n $vouchers[4]->save();\\n\\n $vouchers[5]->subscribe_from_date = Carbon::now()->subDays(10);\\n $vouchers[5]->subscribe_to_date = Carbon::now()->addDays(10);\\n $vouchers[5]->limit_per_account = 0;\\n $vouchers[5]->limit_per_account_per_date_period = '0';\\n $vouchers[5]->limit_pet_required = 1;\\n $vouchers[5]->limit_per_pet = 0;\\n $vouchers[5]->limit_species_id = 1;\\n $vouchers[5]->published = 1;\\n $vouchers[5]->save();\\n\\n $vouchers[6]->subscribe_from_date = Carbon::now()->subDays(10);\\n $vouchers[6]->subscribe_to_date = Carbon::now()->addDays(10);\\n $vouchers[6]->limit_per_account = 0;\\n $vouchers[6]->limit_per_account_per_date_period = '0';\\n $vouchers[6]->limit_pet_required = 1;\\n $vouchers[6]->limit_per_pet = 2;\\n $vouchers[6]->limit_species_id = null;\\n $vouchers[6]->published = 1;\\n $vouchers[6]->save();\\n\\n $coupons = [];\\n $coupons[0] = new Coupon(\\n [\\n 'voucher_id' => $vouchers[3]->id,\\n 'restrict_consumer_id' => $consumers[0]->id,\\n 'issued_at' => now(),\\n 'valid_from' => now(),\\n 'valid_to' => now(),\\n ]\\n );\\n $coupons[0]->save();\\n\\n $coupons[1] = new Coupon(\\n [\\n 'voucher_id' => $vouchers[3]->id,\\n 'restrict_consumer_id' => $consumers[2]->id,\\n 'issued_at' => now(),\\n 'valid_from' => now(),\\n 'valid_to' => now(),\\n ]\\n );\\n $coupons[1]->save();\\n\\n $coupons[2] = new Coupon(\\n [\\n 'voucher_id' => $vouchers[3]->id,\\n 'restrict_consumer_id' => $consumers[3]->id,\\n 'issued_at' => now(),\\n 'valid_from' => now(),\\n 'valid_to' => now(),\\n ]\\n );\\n $coupons[2]->save();\\n\\n $pets = [];\\n $pets[0] = new Pet(\\n [\\n 'consumer_id' => $consumers[2]->id,\\n 'pet_name' => 'Pet 0',\\n 'pet_dob' => Carbon::now()->subDays(90),\\n 'breed_id' => \\\\App\\\\Breed::where('species_id', '=', 1)->get()->random(1)->first()->id,\\n 'pet_gender' => 'male',\\n ]\\n );\\n $pets[0]->save();\\n\\n $pets[1] = new Pet(\\n [\\n 'consumer_id' => $consumers[3]->id,\\n 'pet_name' => 'Pet 1',\\n 'pet_dob' => Carbon::now()->subDays(90),\\n 'breed_id' => \\\\App\\\\Breed::where('species_id', '=', 2)->get()->random(1)->first()->id,\\n 'pet_gender' => 'male',\\n ]\\n );\\n $pets[1]->save();\\n\\n $pets[2] = new Pet(\\n [\\n 'consumer_id' => $consumers[4]->id,\\n 'pet_name' => 'Pet 2',\\n 'pet_dob' => Carbon::now()->subDays(90),\\n 'breed_id' => \\\\App\\\\Breed::where('species_id', '=', 1)->get()->random(1)->first()->id,\\n 'pet_gender' => 'male',\\n ]\\n );\\n $pets[2]->save();\\n\\n $pets[3] = new Pet(\\n [\\n 'consumer_id' => $consumers[5]->id,\\n 'pet_name' => 'Pet 3',\\n 'pet_dob' => Carbon::now()->subDays(90),\\n 'breed_id' => \\\\App\\\\Breed::where('species_id', '=', 2)->get()->random(1)->first()->id,\\n 'pet_gender' => 'male',\\n ]\\n );\\n $pets[3]->save();\\n\\n return [\\n 'pets' => $pets,\\n 'coupons' => $coupons,\\n 'vouchers' => $vouchers,\\n 'consumers' => $consumers,\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"091bf4b542599fce076107fff5ece739\",\n \"score\": \"0.5757781\",\n \"text\": \"public function vouchers()\\n {\\n return $this->hasMany(Voucher::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"091bf4b542599fce076107fff5ece739\",\n \"score\": \"0.5757781\",\n \"text\": \"public function vouchers()\\n {\\n return $this->hasMany(Voucher::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b312f22bc0fb3b7c23e113aee8fb6ff9\",\n \"score\": \"0.57561255\",\n \"text\": \"public function generateVoucher(Request $request)\\n {\\n DB::beginTransaction();\\n try {\\n $date_time = date('Y-m-d H:i:s');\\n if (!empty($request->offer)) {\\n if (!empty($request->offer['id'])) {\\n $offer_id = $request->offer['id'];\\n } else {\\n $offer = Offer::create([\\n 'name' => $request->offer['name'],\\n 'discount' => $request->offer['discount'],\\n ]);\\n $offer_id = $offer->id;\\n }\\n }\\n\\n if (!empty($request->customer)) {\\n if (!empty($request->customer['id'])) {\\n $customer_id = $request->customer['id'];\\n } else {\\n $customer = Customer::whereEmail($request->customer['email'])->first();\\n if (!empty($customer)) {\\n return response()->json(['status' => 400, 'message' => 'Customer email already exist']);\\n } else {\\n $customer = Customer::create([\\n 'name' => $request->customer['name'],\\n 'email' => $request->customer['email'],\\n ]);\\n }\\n $customer_id = $customer->id;\\n }\\n }\\n $voucher_data = [\\n 'expire_date' => date('Y-m-d', strtotime('+3 days', strtotime(date('Y-m-d')))),\\n 'is_active' => 'true',\\n 'offer_id' => $offer_id,\\n 'customer_id' => $customer_id,\\n 'code' => mb_substr(rand(100000000, strtotime(date('Y-m-d H:i:s'))), 0, 8)\\n ];\\n $voucher = Voucher::create($voucher_data);\\n DB::commit();\\n return response()->json(['data' => $voucher], 200);\\n } catch (\\\\Exception $e) {\\n DB::rollBack();\\n return response()->json(['status' => false, 'message' => $e->getMessage()]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e951b7eae13747edd5d577a234f5ace4\",\n \"score\": \"0.57287276\",\n \"text\": \"public function createVouchers(int $amount, ?Closure $callback = null)\\n {\\n $vouchers = new Vouchers();\\n\\n if ($callback) {\\n $callback($vouchers);\\n }\\n\\n return $vouchers->withOwner($this)->create($amount);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f8229da956f4c300dff281142f62d8e\",\n \"score\": \"0.5600894\",\n \"text\": \"public function testGetAvailableVouchersNoPetsWithCoupon()\\n {\\n extract($this->setUpForAvailableVouchersTests());\\n\\n $response = $this->actingAs(User::first())\\n ->json(\\n 'GET',\\n $this->baseurl . 'consumer/' . $consumers[0]->uuid . '/available_vouchers'\\n )\\n ->assertStatus(200)\\n ->assertJsonStructure(\\n [\\n 'vouchers_available' => [\\n '*' => [\\n 'name',\\n 'uuid',\\n ],\\n ],\\n 'invalid_vouchers' => [\\n '*' => [\\n 'name',\\n 'uuid',\\n ],\\n ],\\n ]\\n )\\n ->getData();\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[0]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[0]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[1]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[1]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[2]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[2]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[3]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[3]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[4]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[4]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[5]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[5]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[6]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[6]->uuid->toString()\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7cd155953b82557d2ba3e3423e2b9985\",\n \"score\": \"0.5579743\",\n \"text\": \"public function generateGiftVouchers($length = 20) {\\n $allowedCharacters = '23456789abcdefghijklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ';\\n $charactersLength = strlen($allowedCharacters);\\n $giftVoucherCode = '';\\n for ($i = 0; $i < $length; $i++) {\\n $giftVoucherCode .= $allowedCharacters[mt_rand(0, $charactersLength - 1)];\\n\\n }\\n return $giftVoucherCode;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ad94feb60780bc875225befefe463c3\",\n \"score\": \"0.55547756\",\n \"text\": \"public function testCreateVouchersWithCallback(): void\\n {\\n $user = factory(User::class)->create();\\n $color = factory(Color::class)->create();\\n $vouchers = $user->createVouchers(3, function (Vouchers $vouchers) use ($color) {\\n $vouchers->withEntities($color);\\n });\\n\\n foreach ($vouchers as $index => $voucher) {\\n // Check user voucher relation.\\n $this->assertTrue($voucher->is($user->vouchers[$index]));\\n $this->assertTrue($voucher->is($user->voucherEntities[$index]->voucher));\\n $this->assertTrue($color->is($voucher->getEntities(Color::class)->first()));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"571fed3a3632d1a3a1f8ac2829eda7a8\",\n \"score\": \"0.55030686\",\n \"text\": \"public function testGetAvailableVouchersOnePetWithCoupon()\\n {\\n extract($this->setUpForAvailableVouchersTests());\\n\\n $response = $this->actingAs(User::first())\\n ->json(\\n 'GET',\\n $this->baseurl . 'consumer/' . $consumers[2]->uuid . '/available_vouchers'\\n )\\n ->assertStatus(200)\\n ->assertJsonStructure(\\n [\\n 'vouchers_available' => [\\n '*' => [\\n 'name',\\n 'uuid',\\n ],\\n ],\\n 'invalid_vouchers' => [\\n '*' => [\\n 'name',\\n 'uuid',\\n ],\\n ],\\n ]\\n )\\n ->getData();\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[0]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[0]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[1]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[1]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[2]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[2]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[3]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[3]->uuid->toString()\\n )\\n );\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[4]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[4]->uuid->toString()\\n )\\n );\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[5]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[5]->uuid->toString()\\n )\\n );\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[6]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[6]->uuid->toString()\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"956d9cf9b60cb52c51ea63164bf796cc\",\n \"score\": \"0.54982483\",\n \"text\": \"private function generateVoucherCode() {\\n\\t\\t// generate voucher code\\n\\t\\twp_send_json(\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'success' => TRUE,\\n\\t\\t\\t\\t'code' => LaterPay_Helper_Voucher::generateVoucherCode(),\\n\\t\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbb570a41de110110abf31617970d614\",\n \"score\": \"0.5445817\",\n \"text\": \"public function createVirtualUsers_get() {\\n\\n $tlds = array(\\\"com\\\");\\n $char = \\\"0123456789abcdefghijklmnopqrstuvwxyz\\\";\\n $Limit = 5000;\\n $Names = $this->Utility_model->getDummyNames($Limit);\\n for ($j = 0; $j < $Limit; $j++) {\\n $UserName = $Names[$j]['names'];\\n $UserUnique = str_replace(\\\" \\\", \\\"\\\", $UserName);\\n $ulen = mt_rand(5, 10);\\n $dlen = mt_rand(7, 17);\\n $email = \\\"\\\";\\n for ($i = 1; $i <= $ulen; $i++) {\\n $email .= substr($char, mt_rand(0, strlen($char)), 1);\\n }\\n $email .= \\\"@\\\";\\n $email .= \\\"gmail\\\";\\n $email .= \\\".\\\";\\n $email .= $tlds[mt_rand(0, (sizeof($tlds) - 1))];\\n $username = strtolower($UserUnique) . substr(md5(microtime()), rand(0, 26), 4);\\n $Input = array();\\n $Input['Email'] = $username . \\\"@gmail.com\\\";\\n $Input['Username'] = $username;\\n $Input['FirstName'] = $UserName;\\n $Input['Password'] = 'A@123456';\\n $Input['Source'] = \\\"Direct\\\";\\n $Input['PanStatus'] = 2;\\n $Input['BankStatus'] = 2;\\n $Input['DocumentStatus'] = 2;\\n $UserID = $this->Users_model->addUser($Input, 3, 1, 2);\\n if ($UserID) {\\n $this->Utility_model->generateReferralCode($UserID);\\n $WalletData = array(\\n \\\"Amount\\\" => 10000,\\n \\\"CashBonus\\\" => 0,\\n \\\"TransactionType\\\" => 'Cr',\\n \\\"Narration\\\" => 'Deposit Money',\\n \\\"EntryDate\\\" => date(\\\"Y-m-d H:i:s\\\")\\n );\\n $this->Users_model->addToWallet($WalletData, $UserID, 5);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d31d1ade9912ac1b0ec2131067d388b\",\n \"score\": \"0.5435966\",\n \"text\": \"public function testGetAvailableVouchersNoPetsWithoutCoupon()\\n {\\n extract($this->setUpForAvailableVouchersTests());\\n\\n $response = $this->actingAs(User::first())\\n ->json(\\n 'GET',\\n $this->baseurl . 'consumer/' . $consumers[1]->uuid . '/available_vouchers'\\n )\\n ->assertStatus(200)\\n ->assertJsonStructure(\\n [\\n 'vouchers_available' => [\\n '*' => [\\n 'name',\\n 'uuid',\\n ],\\n ],\\n 'invalid_vouchers' => [\\n '*' => [\\n 'name',\\n 'uuid',\\n ],\\n ],\\n ]\\n )\\n ->getData();\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[0]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[0]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[1]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[1]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[2]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[2]->uuid->toString()\\n )\\n );\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[3]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[3]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[4]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[4]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[5]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[5]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[6]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[6]->uuid->toString()\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8940eb2b25b3c4558cf67bff0bd359f0\",\n \"score\": \"0.5359112\",\n \"text\": \"public static function generateVouchers( ServicePlan $plan, $validity, $validity_unit, $count)\\n {\\n return DB::transaction(function() use( $plan, $validity, $validity_unit, $count){\\n $pins = [];\\n for($i=1; $i<=$count; $i++)\\n {\\n $voucher = static::generateSingle($plan, $validity, $validity_unit);\\n $pins[] = $voucher->pin;\\n }\\n return $pins;\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7626c268771fd0e1a0393aa0ce981933\",\n \"score\": \"0.5342733\",\n \"text\": \"public function create()\\n {\\n return view('backend.vouchers.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"265f7ab60ab92205252c3ee523eddba4\",\n \"score\": \"0.53421444\",\n \"text\": \"public function run()\\n {\\n //\\n $vouchers = [\\n [\\n 'name' => 'Khuyến mại dịp đầu năm'\\n ],\\n [\\n 'name' => 'Khuyến mại dịp mùng 8/3'\\n ],\\n\\n ];\\n\\n foreach ($vouchers as $voucher)\\n {\\n \\\\App\\\\Voucher::create($voucher);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0888c03823e511339bdc5bdf1b3a0960\",\n \"score\": \"0.52850145\",\n \"text\": \"public function index()\\n {\\n $q = request()->query('q');\\n $paginate = request()->query('paginate') != null ? request()->query('paginate') : 15;\\n\\n $electronicVouchers = ElectronicVoucher::orderBy('id', 'DESC')\\n ->where(function ($query) use ($q) {\\n $query->where(\\\"number\\\", \\\"like\\\", \\\"%$q%\\\");\\n $query->orWhere(\\\"serie\\\", \\\"like\\\", \\\"%$q%\\\");\\n $query->orWhere(\\\"created_at\\\", \\\"like\\\", \\\"%$q%\\\");\\n })\\n ->paginate($paginate);\\n\\n return ElectronicVoucherResource::collection($electronicVouchers);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"488ac33cd0d43293929ad5dd206763eb\",\n \"score\": \"0.52704334\",\n \"text\": \"public function generate_invoice_vat() {\\n\\t\\t// Depending on the mode selected, the VAT will either be calculated per\\n\\t\\t// invoice line, or per VAT rate group.\\n\\n\\t\\t// Fetch the invoice_items\\n\\t\\t$invoice_items = $this->get_invoice_items();\\n\\n\\t\\t// Get existing VAT lines, reset them without saving yet\\n\\t\\t$invoice_vats = [];\\n\\t\\tforeach (Invoice_Vat::get_by_invoice($this) as $invoice_vat) {\\n\\t\\t\\t$invoice_vat->base = 0;\\n\\t\\t\\t$invoice_vat->vat = 0;\\n\\t\\t\\t$invoice_vats[$invoice_vat->vat_rate_id] = $invoice_vat;\\n\\t\\t}\\n\\n\\t\\tforeach ($invoice_items as $invoice_item) {\\n\\t\\t\\tif ($invoice_item->vat_rate_value == 0) {\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t} elseif (isset($invoice_vats[$invoice_item->vat_rate_id])) {\\n\\t\\t\\t\\t$invoice_vat = $invoice_vats[$invoice_item->vat_rate_id];\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$invoice_vat = new Invoice_Vat();\\n\\t\\t\\t\\t$invoice_vat->invoice_id = $this->id;\\n\\t\\t\\t\\t$invoice_vat->vat_rate_id = $invoice_item->vat_rate_id;\\n\\t\\t\\t\\t$invoice_vat->rate = $invoice_item->vat_rate_value;\\n\\t\\t\\t\\t$invoice_vat->base = 0;\\n\\t\\t\\t\\t$invoice_vat->vat = 0;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Check the vat mode, calculate accordingly\\n\\t\\t\\tif ($this->vat_mode == 'line') {\\n\\t\\t\\t\\t// Calculate the VAT for each line, add the VAT per line\\n\\t\\t\\t\\t$invoice_vat->base = $invoice_vat->base + $invoice_item->get_price_excl();\\n\\t\\t\\t\\t$invoice_vat->vat = $invoice_vat->vat + ($invoice_item->get_price_incl() - $invoice_item->get_price_excl());\\n\\t\\t\\t\\t$invoice_vat->save();\\n\\n\\t\\t\\t\\t$invoice_vats[$invoice_item->vat_rate_id] = $invoice_vat;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t// Group all items subject to the same VAT rate, calculate VAT\\n\\t\\t\\t\\t// over the sum of these at the end\\n\\t\\t\\t\\t$invoice_vat->base = $invoice_vat->base + $invoice_item->get_price_excl();\\n\\t\\t\\t\\t$invoice_vats[$invoice_item->vat_rate_id] = $invoice_vat;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tforeach ($invoice_vats as $invoice_vat) {\\n\\t\\t\\t// Calculate the VAT over the group, if desired\\n\\t\\t\\tif ($this->vat_mode == 'group') {\\n\\t\\t\\t\\t$invoice_vat->vat = $invoice_vat->base * ($invoice_vat->rate / 100);\\n\\t\\t\\t}\\n\\n\\t\\t\\t$invoice_vat->save();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd6146a74f9db1d5f6ca353bfb495106\",\n \"score\": \"0.5231511\",\n \"text\": \"public function index() {\\n $vouchers = Voucher::all();\\n $result = $vouchers->toArray();\\n\\n return Response::make( [\\n 'meta' => [ 'message' => 'success', 'code' => 200 ],\\n 'vouchers' => $result\\n ] );\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0ce69279d70bc90bfc6e550cbc6b83b\",\n \"score\": \"0.5204736\",\n \"text\": \"public function index()\\n {\\n $vouchers = Voucher::latest('id')->paginate(10);\\n return new VoucherCollection($vouchers);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6f2e469a7d6c57886d5fbe2203a47b0\",\n \"score\": \"0.51899064\",\n \"text\": \"public function index()\\n {\\n $vouchers = Voucher::all();\\n return view('pages/vouchers/index',compact('vouchers'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fa6f1afa45a7230b28ab5db749b212b\",\n \"score\": \"0.51439637\",\n \"text\": \"function generateLicenseResponse($requests) {\\n $last_ticket = \\\"\\\";\\n $responses = array();\\n $response = \\\"\\\";\\n $boundary = @exec(\\\"uuid\\\");\\n\\n foreach($requests as $req) {\\n\\t$ticket = $req['ticket'];\\n\\t$partner_id = $req['partner_id'];\\n\\t$name = $req['name'];\\n\\t$email = $req['email'];\\n\\t$key = $req['key'];\\n\\t$request_id = $req['request_id'];\\n\\t$hw_sn = $req['hw_sn'];\\n\\t$sw_sn = $req['sw_sn'];\\n\\n\\tif ($ticket != $last_ticket) {\\n\\n\\t // new ticket, save previous response and generate a new response\\n\\t if ($response != \\\"\\\") {\\n\\t\\t$responses[$last_ticket] = $response;\\n\\t\\t$response = \\\"\\\";\\n\\t }\\n\\n\\t // generate email headers\\n\\t $response = $response . sprintf(\\\"From: VIVIPOS License Service \\\\n\\\");\\n\\t $response = $response . sprintf(\\\"To: %s\\\\n\\\", $ticket);\\n\\t $response = $response . sprintf(\\\"Subject: Requested VIVIPOS license(s) generated (Request ID: %s)\\\\n\\\", $request_id);\\n\\t $response = $response . sprintf(\\\"Content-Type: multipart/mixed; boundary=%s\\\\n\\\\n\\\", $boundary);\\n\\n\\t $response = $response . sprintf(\\\"--%s\\\\n\\\", $boundary);\\n\\t $response = $response . sprintf(\\\"Content-Type: text/plain; charset=utf-8\\\\n\\\");\\n\\t $response = $response . sprintf(\\\"Content-Transfer-Encoding: 7bit\\\\n\\\\n\\\");\\n\\t $response = $response . sprintf(\\\"Attached please find the license(s) that you have requested.\\\\n\\\\n\\\");\\n\\n\\t $last_ticket = $ticket;\\n\\t}\\n\\n\\t$response = $response . sprintf(\\\"--%s\\\\n\\\", $boundary);\\n\\n\\tif ($partner_id == 'VIVIPOS SDK') {\\n\\t $response = $response . sprintf(\\\"Content-Type: application/octet-stream; name=\\\\\\\"vivipos.lic\\\\\\\"\\\\n\\\");\\n\\t $response = $response . sprintf(\\\"Content-Disposition: attachment; filename=\\\\\\\"vivipos.lic\\\\\\\"\\\\n\\\\n\\\");\\n\\t $response = $response . sprintf(\\\"%s\\\\n\\\\n\\\", $key);\\n\\t}\\n\\telse {\\n\\t $response = $response . sprintf(\\\"Content-Type: application/octet-stream; name=\\\\\\\"vivipos.lic\\\\\\\"\\\\n\\\");\\n\\t $response = $response . sprintf(\\\"Content-Disposition: attachment; filename=\\\\\\\"vivipos.lic\\\\\\\"\\\\n\\\\n\\\");\\n\\t $response = $response . sprintf(\\\"[%s]\\\\nname=%s\\\\nemail=%s\\\\nsigned_key=%s\\\\n\\\\n\\\", $partner_id, $name, $email, $key);\\n\\t}\\n }\\n if ($response != \\\"\\\") {\\n\\t$response = $response . sprintf(\\\"--%s--\\\\n\\\", $boundary);\\n\\t$responses[$ticket] = $response;\\n }\\n return $responses;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac52ac3e768773a06e3efa78e1b8c7ea\",\n \"score\": \"0.51409996\",\n \"text\": \"public function vendors(){\\n $v = $this->Freeradius->getVendors();\\n $items = array();\\n foreach($v as $i){\\n array_push($items, array('id' => $i, 'name' => $i));\\n }\\n $this->set(array(\\n 'items' => $items,\\n 'success' => true,\\n '_serialize' => array('items','success')\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a02b6411ed276e97b73f27156a6bee2\",\n \"score\": \"0.5134869\",\n \"text\": \"public function getRelatedVouchers(Request $request, Response $response)\\n {\\n $recipient_vouchers = [];\\n $recipient = Recipient::with('vouchers')\\n ->where('email',$request->get('email'))->first();\\n if(!$recipient)\\n {\\n return response()->json([\\n 'Message' => \\\"This email doesnt exist in our database!\\\"\\n ], 400);\\n }\\n else\\n {\\n foreach ($recipient->vouchers as $voucher) {\\n $recipient_vouchers[] = (object) array('voucher_code' => $voucher->code , 'offer' => $voucher->offer->name);\\n }\\n return response()->json([\\n 'Message' => collect($recipient_vouchers)\\n ], 400);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33e0a656e54e88f5292ad4f792ab9938\",\n \"score\": \"0.50997686\",\n \"text\": \"public function create()\\n {\\n $sellers = Seller::all();\\n return view('pages/vouchers/create',compact('sellers'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e64dbe460d4353701498a9375e36701\",\n \"score\": \"0.50907844\",\n \"text\": \"private static function generateInvoice()\\n {\\n //find all orders that have been verified and\\n //ready to be invoiced\\n\\n $userIds = BanquetOrder::find()\\n ->select('userId')\\n ->where(['orderStatus' => BanquetOrder::ORDER_STATUS_VERIFIED])\\n ->distinct()->asArray()->all();\\n\\n \\n foreach ($userIds as $userId)\\n {\\n $id = $userId[\\\"userId\\\"];\\n Yii::info('xx='.$id);\\n InvoiceHelper::generateForUser($id);\\n }\\n\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"695811e148a1778d3017479abab05960\",\n \"score\": \"0.5084104\",\n \"text\": \"public function testGetAvailableVouchersOnePetDifferentSpeciesWithCoupon()\\n {\\n extract($this->setUpForAvailableVouchersTests());\\n\\n $response = $this->actingAs(User::first())\\n ->json(\\n 'GET',\\n $this->baseurl . 'consumer/' . $consumers[3]->uuid . '/available_vouchers'\\n )\\n ->assertStatus(200)\\n ->assertJsonStructure(\\n [\\n 'vouchers_available' => [\\n '*' => [\\n 'name',\\n 'uuid',\\n ],\\n ],\\n 'invalid_vouchers' => [\\n '*' => [\\n 'name',\\n 'uuid',\\n ],\\n ],\\n ]\\n )\\n ->getData();\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[0]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[0]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[1]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[1]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[2]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[2]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[3]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[3]->uuid->toString()\\n )\\n );\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[4]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[4]->uuid->toString()\\n )\\n );\\n\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[5]->uuid->toString()\\n )\\n );\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[5]->uuid->toString()\\n )\\n );\\n\\n $this->assertTrue(\\n $this->arrayOfArraysSearch(\\n $response->vouchers_available,\\n 'uuid',\\n $vouchers[6]->uuid->toString()\\n )\\n );\\n $this->assertFalse(\\n $this->arrayOfArraysSearch(\\n $response->invalid_vouchers,\\n 'uuid',\\n $vouchers[6]->uuid->toString()\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd32747902ad9d699600f6904f96f710\",\n \"score\": \"0.5061233\",\n \"text\": \"public function index()\\n {\\n try {\\n $vouchers = $this->voucher->all();\\n return view('adminlte::voucher_list', compact('vouchers'));\\n } catch (Exception $e) {\\n dd($e);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98eecee762a11520e565fd408061a944\",\n \"score\": \"0.50497067\",\n \"text\": \"function archivevoucher(){\\n\\t\\t$this->set('title_for_layout','Archive Gift Certificate');\\n\\t\\t$this->set('categoryList',$this->common->getAllCategory());\\n\\t\\t$this->set('countyList',$this->common->getAllCounty()); \\t// List counties\\n\\t\\t$this->set('cityList',$this->common->getAllCity()); \\t\\t// List cities\\n\\t\\t$this->set('stateList',$this->common->getAllState()); \\t\\t// List states\\n\\t\\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\\n\\t\\t$this->set('search_text','Title');\\n\\t\\t$this->set('s_date','');\\n\\t\\t$this->set('e_date','');\\n\\t\\t$this->set('category', 'Category');\\n\\t\\t$this->set('county', 'County');\\n\\t\\t$this->set('advertiser_profile_id', 'Advertiser');\\n\\t\\t$cond = '';\\n\\t\\t$time = mktime(0,0,0,date('m'),date('d'),date('Y'));\\n\\t\\t$cond['Voucher.e_date <'] = $time;\\n\\t\\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\\n\\t\\t\\n\\t\\t\\n\\t\\t//pr($this->params);\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\\n\\t\\t\\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\\n\\t\\t\\t{\\n\\t\\t\\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\\n\\t\\t\\t}\\n\\t\\t\\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\\n\\t\\t\\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t \\n\\t\\t\\t $advertiser_profile_id =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('advertiser_profile_id',$advertiser_profile_id); \\n\\t\\t}\\n\\t\\t\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $category = $this->data['vouchers']['category'] ;\\n\\t\\t\\t}\\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\\n $category = $this->params['named']['category'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t$category = '';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('category',$category); \\n\\t\\t}\\n// if county is set\\n\\t\\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $county = $this->data['vouchers']['county'] ;\\n\\t\\t\\t}\\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\\n $county = $this->params['named']['county'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t$county = '';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('county',$county); \\n\\t\\t}\\n\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\\n\\t\\t\\t{\\n\\t\\t\\t $search_text = $this->data['vouchers']['search_text'] ;\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\\n\\t\\t\\t $search_text = $this->params['named']['search_text'] ;\\n\\t\\t\\t}else{\\n $search_text ='';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('search_text',$search_text); \\n\\t\\t}\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $arrS_date = explode(\\\"/\\\",$this->data['vouchers']['s_date']);\\n\\t\\t\\t $day = $arrS_date[1] ;\\n\\t\\t\\t $month = $arrS_date[0] ;\\n\\t\\t\\t $year = $arrS_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $s_date = $this->data['vouchers']['s_date'] ;\\n\\t\\t\\t $s_date = str_replace(\\\"/\\\",\\\"-\\\",$s_date);\\n\\t\\t\\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\\n\\t\\t\\t \\n\\t\\t\\t $arrS_date = explode(\\\"-\\\",$this->params['named']['s_date']);\\n\\t\\t\\t $day = $arrS_date[1] ;\\n\\t\\t\\t $month = $arrS_date[0] ;\\n\\t\\t\\t $year = $arrS_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $s_date = $this->params['named']['s_date'] ;\\n\\t\\t\\t $s_date = str_replace(\\\"/\\\",\\\"-\\\",$s_date);\\n\\t\\t\\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\\n\\t\\t\\t}else{\\n\\t\\t\\t $s_date =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('s_date',$s_date);\\n\\t\\t\\t\\n\\t\\t\\t$this->set('s_datetmsp',$s_datetmsp);\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t}\\n\\t\\t\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\\n\\t\\t\\t{\\n\\t\\t\\t\\n\\t\\t\\t $arrE_date = explode(\\\"/\\\",$this->data['vouchers']['e_date']);\\n\\t\\t\\t $eday = $arrE_date[1] ;\\n\\t\\t\\t $emonth = $arrE_date[0] ;\\n\\t\\t\\t $eyear = $arrE_date[2] ;\\n\\t\\t\\t $e_date = $this->data['vouchers']['e_date'] ;\\n\\t\\t\\t $e_date = str_replace(\\\"/\\\",\\\"-\\\",$e_date);\\n\\t\\t\\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\\n\\t\\t\\t \\n\\t\\t\\t $arrE_date = explode(\\\"-\\\",$this->params['named']['e_date']);\\n\\t\\t\\t $eday = $arrE_date[1] ;\\n\\t\\t\\t $emonth = $arrE_date[0] ;\\n\\t\\t\\t $eyear = $arrE_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $e_date = $this->params['named']['e_date'] ;\\n\\t\\t\\t $e_date = str_replace(\\\"/\\\",\\\"-\\\",$e_date);\\n\\t\\t\\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\\n\\t\\t\\t}else{\\n\\t\\t\\t $e_date =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('e_date',$e_date);\\n\\t\\t\\t$this->set('e_datetmsp',$e_datetmsp);\\n\\t\\t\\n\\t\\t}\\n\\t\\t\\n\\t\\t\\n\\t\\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\\n\\t\\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($category) && $category !=''){\\n\\t\\t $cond['Voucher.category_id'] = $category;\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($county) && $county !=''){\\n\\t\\t $cond['Voucher.advertiser_county_id'] = $county;\\n\\t\\t}\\n\\n\\t\\tif(isset($search_text) && $search_text !=''){\\n\\t\\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\\n\\t\\t $cond['Voucher.s_date >='] = $s_datetmsp ;\\n\\t\\t $cond['Voucher.e_date <='] = $e_datetmsp ;\\n\\t\\t}\\n\\t\\t\\n\\t\\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\\n\\t\\t\\n\\t\\t $cond['Voucher.s_date ='] = $s_datetmsp ;\\n\\t\\t\\n\\t\\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\\n\\t\\t $cond['Voucher.e_date ='] = $e_datetmsp ;\\n\\t\\t}\\n\\n\\t\\t$data = $this->paginate('Voucher', $cond);\\n\\t\\t$this->set('vouchers', $data);\\n\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b47da3155623a90b6776169dbceb993\",\n \"score\": \"0.50392497\",\n \"text\": \"public function index()\\n {\\n $vouchers = Voucher::all();\\n\\n $index = 1;\\n\\n return view('backend.vouchers.index', compact('vouchers','index'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4944ab5be6652db8eeac31c90cdf597\",\n \"score\": \"0.5034194\",\n \"text\": \"public function createVoucher(?Closure $callback = null): object\\n {\\n return $this->createVouchers(1, $callback);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b371ba2e38e94cf2b1fa1340419dbd7f\",\n \"score\": \"0.49957168\",\n \"text\": \"protected function _getVouchersAttributeName()\\n {\\n return Innobyte_EmagMarketplace_Model_Sales_Voucher_Abstract::EMAG_VOUCHERS;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e4e8e50eed2d50bd102a0b06d436117\",\n \"score\": \"0.4981456\",\n \"text\": \"public function run()\\n\\t{\\n\\t\\tDB::table('reference_vouchers')->insert([\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'direct',\\n\\t\\t\\t\\t'display_name' => 'Direct',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'purchase_order',\\n\\t\\t\\t\\t'display_name' => 'Purchase Order',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'purchases',\\n\\t\\t\\t\\t'display_name' => 'Purchase',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'goods_receipt_note',\\n\\t\\t\\t\\t'display_name' => 'Goods Receipt Note',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'debit_note',\\n\\t\\t\\t\\t'display_name' => 'Debit Note',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'estimation',\\n\\t\\t\\t\\t'display_name' => 'Estimation',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'sale_order',\\n\\t\\t\\t\\t'display_name' => 'Sale Order',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'sales',\\n\\t\\t\\t\\t'display_name' => 'Invoice',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'job_invoice',\\n\\t\\t\\t\\t'display_name' => 'Job Invoice',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'job_request',\\n\\t\\t\\t\\t'display_name' => 'Job Request',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'delivery_note',\\n\\t\\t\\t\\t'display_name' => 'Delivery Note',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'name' => 'credit_note',\\n\\t\\t\\t\\t'display_name' => 'Credit Note',\\n\\t\\t\\t\\t'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n\\t\\t\\t\\t'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\\n\\t\\t\\t]\\n\\t\\t]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3896a08104ba58eaee033d285a2da664\",\n \"score\": \"0.49777725\",\n \"text\": \"public function generate($params,$version) {\\n //et pars url y ketery poxum _ gceri\\n //stex et responsy xml a galis eli, ydex mi komponentner el ka vor dzevapoxuma , es konkret arrayinnem grel, arrayova eli patasxany galis\\n $unsignedRequest = $this->CreateUnsignedAmazonUrl($params);\\n\\t\\treturn $this->CreateSignedAwsRequest($unsignedRequest,$version);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99ac37d2fb55f86b26f8d642fdf14b9d\",\n \"score\": \"0.49526668\",\n \"text\": \"public function index()\\n {\\n $vouchers = Voucher::where('terminal_id', Auth::user()->terminal_id);\\n return view('admin.voucher.index', ['vouchers' => $vouchers]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e96c1f390781d412d9cbc4215e2d923\",\n \"score\": \"0.49438828\",\n \"text\": \"protected function _generate()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec5f9b44323ca4ed28b959ffcfcf3a05\",\n \"score\": \"0.49410847\",\n \"text\": \"public function vocations();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a19435f34050846bcdc8a35737f812e\",\n \"score\": \"0.49258858\",\n \"text\": \"public function index()\\n {\\n $vouchers = Voucher::all();\\n\\n return view('voucher.index', compact('vouchers'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"109898ada62c690ddfa964d3b5bf08f0\",\n \"score\": \"0.4915956\",\n \"text\": \"public function vouchertemplate(Request $request)\\n {\\n\\n //////vouchertemplate\\n\\n //agency detal get\\n\\n $payment_booking = DB::table('payment')->where('id', '=', $_POST['bookingid'])->get();\\n\\n $guest = unserialize($payment_booking[0]->guest);\\n\\n $Servicename = '';\\n\\n $Servicetype = '';\\n\\n $MealBasis = '';\\n\\n $ServiceAddress = '';\\n\\n $RoomServiceType = '';\\n\\n $NoRooms = '';\\n\\n $Child = '';\\n\\n $Desitination = '';\\n\\n $starCategory = '';\\n\\n $Reservationstatus = '';\\n\\n $GuestName = '';\\n\\n $NoAdult = '';\\n\\n $Infants = '';\\n\\n $PoliciesDetails = '';\\n\\n if ($payment_booking[0]->supplier == 'travelanda') {\\n $getBookingDetails = $this->getBookingDetails($payment_booking[0]);\\n\\n $Gethotelresponse = HotelApiController::Gethotelresponse($payment_booking[0]->hotelid);\\n\\n $Description = '';\\n\\n if (isset($Gethotelresponse->Body->Hotels->Hotel->Description)) {\\n $Description = $Gethotelresponse->Body->Hotels->Hotel->Description;\\n }\\n\\n if (isset($getBookingDetails->Body->Bookings)) {\\n foreach ($getBookingDetails->Body->Bookings->HotelBooking as $HotelBooking) {\\n if ($payment_booking[0]->BookingReference == $HotelBooking->BookingReference) {\\n $bo = 1;\\n\\n if (isset($HotelBooking->Policies->Policy)) {\\n $PoliciesDetails .= $Description;\\n\\n $PoliciesDetails .= '
    You may cancel your reservation for no charge before this deadline. \\n\\n\\t\\t Please note that we will assess full payment of reservation if you must cancel after this deadline.
    ';\\n\\n foreach ($HotelBooking->Policies->Policy as $Policy) {\\n if ($Policy->Type == 'Percentage') {\\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay Value.'% penalty for this booking.
    ';\\n }\\n\\n if ($Policy->Type == 'Amount') {\\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay $ '.$Policy->Value.' penalty for this booking.
    ';\\n }\\n\\n if ($Policy->Type == 'Nights') {\\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay '.$Policy->Value.' night price penalty for this booking.
    ';\\n }\\n\\n ++$bo;\\n }\\n }\\n\\n // echo '
    ';\\n\\n                        //print_r($payment_booking);\\n\\n                        // print_r($HotelBooking);\\n\\n                        //echo '
    ';\\n\\n /*echo '
    ';\\n\\n    print_r($guest);\\n\\n    echo '
    ';*/\\n\\n //guest dateil\\n\\n $roomGuestDetails = '';\\n\\n foreach ($guest as $guestDetails) {\\n if ($guestDetails['adult'] != 0) {\\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\\n $roomGuestDetails .= '

    '.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'

    ';\\n }\\n }\\n\\n if ($guestDetails['child'] != 0) {\\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\\n $roomGuestDetails .= '

    '.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'

    ';\\n }\\n }\\n }\\n\\n $RoomName = '';\\n\\n $NumAdults = '';\\n\\n $NumChildren = '';\\n\\n $room = 0;\\n\\n foreach ($HotelBooking->Rooms->Room as $roomDetails) {\\n $RoomName = $roomDetails->RoomName;\\n\\n $NumAdults += $roomDetails->NumAdults;\\n\\n $NumChildren += $roomDetails->NumChildren;\\n\\n ++$room;\\n }\\n\\n $Servicename = $HotelBooking->HotelName;\\n\\n $Servicetype = 'Hotel';\\n\\n $MealBasis = $HotelBooking->BoardType;\\n\\n $ServiceAddress = $HotelBooking->City;\\n\\n $RoomServiceType = $RoomName;\\n\\n $NoRooms = $room;\\n\\n $Child = $NumChildren;\\n\\n $Desitination = $HotelBooking->City;\\n\\n $starCategory = '';\\n\\n $Reservationstatus = 'Confirm';\\n\\n $GuestName = $roomGuestDetails;\\n\\n $NoAdult = $NumAdults;\\n\\n $Infants = $NumChildren;\\n }\\n }\\n }\\n }\\n\\n if ($payment_booking[0]->supplier == 'tbo') {\\n $getBookingDetails = $this->tbobboking_details($payment_booking[0]->BookingReference);\\n\\n $tboHolidaysHotelDetails = HotelApiController::tboHolidaysHotelDetails($payment_booking[0]->hotelid);\\n\\n /*\\techo '
    ';\\n\\n        print_r($tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description']);\\n\\n        echo '
    ';*/\\n\\n $RoomName = '';\\n\\n if (!empty($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'])) {\\n for ($r = 0; $r < $payment_booking[0]->no_of_room; ++$r) {\\n $RoomName .= '

    '.$getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'][$r]['RoomName'].'

    ';\\n }\\n }\\n\\n //guest dateil\\n\\n $roomGuestDetails = '';\\n\\n $NumAdults = 0;\\n\\n $NumChildren = 0;\\n\\n foreach ($guest as $guestDetails) {\\n $NumAdults += $guestDetails['adult'];\\n\\n if ($guestDetails['adult'] != 0) {\\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\\n $roomGuestDetails .= '

    '.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'

    ';\\n }\\n }\\n\\n if ($guestDetails['child'] != 0) {\\n $NumChildren += $guestDetails['child'];\\n\\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\\n $roomGuestDetails .= '

    '.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'

    ';\\n }\\n }\\n }\\n\\n $PoliciesDetails .= $tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description'];\\n\\n $PoliciesDetails .= '
    You may cancel your reservation for no charge before this deadline. \\n\\n\\t\\t Please note that we will assess full payment of reservation if you must cancel after this deadline.
    ';\\n\\n $attr = '@attributes';\\n\\n $bo = 1;\\n\\n if (isset($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'][0])) {\\n foreach ($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'] as $Policy) {\\n if ($Policy[$attr]['ChargeType'] == 'Fixed') {\\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['Currency'].''.$Policy[$attr]['CancellationCharge'].' penalty for this booking
    ';\\n }\\n\\n if ($Policy[$attr]['ChargeType'] == 'Percentage') {\\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking
    ';\\n }\\n\\n if ($Policy[$attr]['ChargeType'] == 'Night') {\\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking
    ';\\n }\\n\\n ++$bo;\\n }\\n }\\n\\n $Servicename = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\\n\\n $Servicetype = 'Hotel';\\n\\n $MealBasis = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\\n\\n $ServiceAddress = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['AddressLine1'];\\n\\n $RoomServiceType = $RoomName;\\n\\n $NoRooms = $payment_booking[0]->no_of_room;\\n\\n $Child = ''; //$NumChildren;\\n\\n $Desitination = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['City'];\\n\\n $starCategory = '';\\n\\n $Reservationstatus = 'Confirm';\\n\\n $GuestName = $roomGuestDetails;\\n\\n $NoAdult = $NumAdults;\\n\\n $Infants = $NumChildren;\\n }\\n\\n $name = '';\\n\\n $address = '';\\n\\n $city = '';\\n\\n $country = '';\\n\\n if ($payment_booking[0]->user_type == 'AgencyManger') {\\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\\n\\n /*\\techo '
    ';\\n\\n        print_r($agency);\\n\\n        echo '
    ';*/\\n\\n $name = $agency[0]->aname;\\n\\n $address = $agency[0]->address1;\\n\\n $city = $agency[0]->city;\\n\\n $country = $agency[0]->country;\\n }\\n\\n if ($payment_booking[0]->user_type == 'SubAgencyManger') {\\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\\n\\n /*\\techo '
    ';\\n\\n        print_r($agency);\\n\\n        echo '
    ';*/\\n\\n $name = $agency[0]->aname;\\n\\n $address = $agency[0]->address1;\\n\\n $city = $agency[0]->city;\\n\\n $country = $agency[0]->country;\\n }\\n\\n if ($payment_booking[0]->user_type == 'UserInfo') {\\n $userinformation = DB::table('userinformation')->where('loginid', '=', $payment_booking[0]->login_id)->get();\\n\\n /*\\techo '
    ';\\n\\n        print_r($userinformation);\\n\\n        echo '
    ';*/\\n\\n $name = $userinformation[0]->name;\\n\\n $address = $userinformation[0]->email;\\n\\n $city = $userinformation[0]->phone;\\n }\\n\\n /*echo '
    ';\\n\\n        print_r($guest[0]['firstname'][1]);\\n\\n        echo '
    ';*/\\n\\n $date1 = date_create($payment_booking[0]->checkin);\\n\\n $date2 = date_create($payment_booking[0]->checkout);\\n\\n $diff = date_diff($date1, $date2);\\n\\n $daycount = $diff->days;\\n\\n\\n $tempalte = '\\n\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\tVoucher\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t
    Please Present this voucher upon arrival
    \\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t

    Service Voucher

    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t

    '.$name.'

    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t'.$address.', '.$city.', '.$country.'.\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\tBooking Information\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t
    Voucher NoLBVN'.$payment_booking[0]->hotelid.'
    LB REF NoLBHR'.$payment_booking[0]->hotelid.'
    Supplier Ref No'.$payment_booking[0]->id.$payment_booking[0]->hotelid.$payment_booking[0]->login_id.'
    Re-confirmation No/Msg'.$payment_booking[0]->login_id.$payment_booking[0]->hotelid.$payment_booking[0]->id.'
    Lead Name'.$guest[0]['firstname'][1].''.$guest[0]['lastname'][1].'
    Issued on'.date('d/M/Y, D', strtotime($payment_booking[0]->bookingdate)).'
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t

    Check In

    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t

    '.date('d', strtotime($payment_booking[0]->checkin)).'

    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t'.date('M', strtotime($payment_booking[0]->checkin)).', '.date('Y', strtotime($payment_booking[0]->checkin)).'\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t'.date('D', strtotime($payment_booking[0]->checkin)).'\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t

    Check Out

    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t

    '.date('d', strtotime($payment_booking[0]->checkout)).'

    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t'.date('M', strtotime($payment_booking[0]->checkout)).', '.date('Y', strtotime($payment_booking[0]->checkout)).'\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t'.date('D', strtotime($payment_booking[0]->checkout)).'\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t'.$daycount.' Nights\\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\tAccomodation Details\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t
    Servicename'.$Servicename.'
    Service Type '.$Servicetype.'
    Meal Basis '.$MealBasis.'
    Service Address'.$ServiceAddress.'
    RoomService Type'.$RoomServiceType.'
    No Rooms'.$NoRooms.'
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t
    Child '.$Child.'
    Desitination'.$Desitination.'
    Reservation Status'.$Reservationstatus.'
    NoAdult'.$NoAdult.'
    Infants'.$Infants.'
    Guest Name'.$GuestName.'
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\tImportant Notes\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t'.$PoliciesDetails.'\\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t

    Hotel Map

    \\n\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\t\\t\\t \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\t \\n\\t\\t\\n\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t
    \\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\n\\n\\n\\t\\t';\\n\\n echo $tempalte;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dec2af58b1d08b1db32d956007ff52f8\",\n \"score\": \"0.4903172\",\n \"text\": \"function addVoucher(){\\n\\t\\tif(isset($this->params['pass'][0])){\\n\\t \\t\\t$this->set('advertiser_id', $this->params['pass'][0]);\\n\\t\\t}\\n\\t\\t\\n\\t\\tif($this->referer()=='/vouchers/addVoucher' || $this->referer()=='/'){ } else {\\n\\t\\t\\t$this->Session->write('referer',$this->referer());\\n\\t\\t}\\t\\t\\n\\t\\t$this->set('refferer',$this->Session->read('referer'));\\n\\t\\t$this->set('title_for_layout','Add Gift Certificate');\\n\\t\\t$this->set('categoryList',$this->common->getAllCategory()); // List categories\\n\\t \\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List Advertisers\\n\\n\\t\\t/*------------------validation for redirect 2 mastersheet if it is initiated from master sheet-----------------*/\\n\\t\\t if((strpos($this->referer(),'masterSheet')!=false)) {\\n\\t\\t \\t$this->Session->write('reff',$this->referer());\\n\\t\\t }\\n\\t\\t if($this->Session->read('reff')) {\\n\\t\\t \\t$this->set('reff',$this->Session->read('reff'));\\n\\t\\t } else {\\n\\t\\t \\t$this->set('reff',$this->referer());\\n\\t\\t }\\n\\t\\t \\n\\t\\t/*----------------------------------------------------------------------------------------------------------*/\\t\\n\\n\\t\\tif(isset($this->data))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t $this->Voucher->set($this->data['voucher']);\\n\\t\\t\\t\\t\\n\\t\\t \\t \\t $this->set('advertiser_id', $this->data['voucher']['advertiser_profile_id']);//element use only\\n\\t\\t\\t\\t if($this->Voucher->validates())\\n\\t\\t\\t\\t { \\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t/*------------------------------------find county of specified advertiser---------------------------------------------*/\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$county = $this->Voucher->getCityCountyState($this->data['voucher']['advertiser_profile_id']);\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$this->data['Voucher']['advertiser_county_id']\\t=\\t$county[0]['advertiser_profiles']['county'];\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t/*--------------------------------------------------------------------------------------------------------------------*/\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tif(!empty($this->data['voucher']['sdate']))\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$s_date\\t\\t= $this->data['voucher']['sdate'];\\n\\t\\t\\t\\t\\t\\t\\t$start_date\\t= explode('/',$s_date);\\n\\t\\t\\t\\t\\t\\t\\t$start_date = mktime(0,0,0,$start_date[0],$start_date[1],$start_date[2]);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$start_date = mktime(0,0,0,date('m'),date('t',strtotime('today')),date('Y'));\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tif(!empty($this->data['voucher']['edate']))\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$e_date\\t\\t= $this->data['voucher']['edate'];\\n\\t\\t\\t\\t\\t\\t\\t$expiry_date\\t= explode('/',$e_date);\\n\\t\\t\\t\\t\\t\\t\\t$expiry_date = mktime(0,0,0,$expiry_date[0],$expiry_date[1],$expiry_date[2]);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$expiry_date = mktime(0,0,0,date('m'),date('t',strtotime('today')),date('Y'));\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t/***********--------------------------valid date validation ------------------------------------------------------*/\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tif($expiry_date < $start_date )\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$this->Session->setFlash('End Date should be greater than or equal to Start Date'); \\n\\t\\t\\t\\t\\t\\t\\treturn false;\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t/*----------------------------------------------------------------------------------------------------------------*/\\t\\n\\t\\t\\t\\t\\t\\t\\t$this->data['Voucher']['s_date']= $start_date;\\n\\t\\t\\t\\t\\t\\t\\t$this->data['Voucher']['e_date']= $expiry_date;\\n\\t\\t\\t\\t\\t\\t/*---------------------------------------------------------------------------------*/\\n\\t\\t\\t\\t\\t\\t$lastid = $this->Voucher->find('first',array('fields'=>array('Voucher.id'),'order'=>array('Voucher.id DESC'),'limit'=>1));\\n\\t\\t\\t\\t\\t\\tif(is_array($lastid)) {\\n\\t\\t\\t\\t\\t\\t\\t$this->data['Voucher']['id'] = $lastid['Voucher']['id']+1;\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t$this->data['Voucher']['id'] = 1;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$this->data['Voucher']['title']\\t=\\t$this->data['voucher']['title'];\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$this->data['Voucher']['description']\\t=\\t$this->data['voucher']['description'];\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$this->data['Voucher']['price']\\t=\\t$this->data['voucher']['price'];\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$this->data['Voucher']['advertiser_profile_id']\\t=\\t$this->data['voucher']['advertiser_profile_id'];\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$this->data['Voucher']['category_id']\\t=\\t$this->data['voucher']['category_id'];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$this->data['Voucher']['status']\\t=\\t$this->data['voucher']['status'];\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t/*pr($this->data['Voucher']);\\n\\t\\t\\t\\t\\t\\t*/\\n\\t\\t\\t\\t\\t\\t$this->Voucher->save($this->data);\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t/*----------------------------------------------------------------------------------------------------*/\\n\\t\\t\\t\\t\\t\\t App::import('model', 'WorkOrder');\\n\\t\\t\\t\\t\\t\\t $this->WorkOrder = new WorkOrder;\\t\\t\\t \\n\\t\\t\\t\\t\\t\\t $orderid = $this->common->getOrderId($this->data['Voucher']['advertiser_profile_id']);\\n\\t \\t\\t\\t\\t\\t $salsemain_detail = $this->common->getorderdetail($orderid['AdvertiserProfile']['order_id']);\\n\\t\\t\\t\\t\\t\\t $saveWorkArray = array();\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['advertiser_order_id'] = $orderid['AdvertiserProfile']['order_id'];\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['read_status'] \\t\\t = 0;\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['subject'] \\t\\t\\t = 'New Workorder for Gift Certificate';\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['message'] \\t\\t\\t = 'New Workorder for Gift Certificate has been launched for the following advertiser profile.';\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['type'] \\t\\t\\t = 'Gift Certificate Workorder';\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['sent_to'] \\t\\t\\t = $salsemain_detail['AdvertiserOrder']['salesperson'];\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['sent_to_group'] \\t = 5;\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['from_group'] \\t\\t = $this->Session->read('Auth.Admin.user_group_id');\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['salseperson_id'] \\t = 0;\\n\\t\\t\\t\\t\\t\\t date_default_timezone_set('US/Eastern');\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['created_date'] \\t\\t\\t= date(DATE_FORMAT.' h:i:s A');\\n\\t\\t\\t\\t\\t\\t $saveWorkArray['WorkOrder']['created'] \\t\\t\\t = strtotime(date(DATE_FORMAT.' h:i:s A'));\\n\\t\\t\\t\\t\\t\\t $this->WorkOrder->save($saveWorkArray);\\n\\t\\t\\t\\t\\t/*----------------------------------------------------------------------------------------------------------*/\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$this->Session->setFlash('Gift Certificate Successfully Saved'); \\n\\t\\t\\t\\t\\t\\tif(isset($this->data['voucher']['prvs_link']) && (strpos($this->data['voucher']['prvs_link'],'masterSheet')!=false))\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t \\t\\t$this->Session->delete('reff');\\n\\t\\t\\t\\t\\t\\t\\t$ad_id = explode('/',$this->data['voucher']['prvs_link']);\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t$this->redirect(FULL_BASE_URL.router::url('/',false).'advertiser_profiles/masterSheet/'.$ad_id[3]);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$this->redirect(array('action' => 'index/'.$this->data['voucher']['advertiser_profile_id']));\\t\\t\\t\\t \\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t }\\n\\t\\t\\t\\t else\\n\\t\\t\\t\\t {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$errors = $this->Voucher->invalidFields();\\t\\n\\t\\t\\t\\t\\t\\t$this->Session->setFlash(implode('
    ', $errors)); \\n\\t\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t }\\t \\n\\t\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae65bb6cd56609cd64f5ea39a03596dc\",\n \"score\": \"0.48989162\",\n \"text\": \"public function store(CreateVouchersRequest $request)\\n {\\n $data = $request->except('valid_from','valid_until');\\n $data['valid_from'] = $request->valid_from != '' ? $request->valid_from : NULL ;\\n $data['valid_until'] = $request->valid_until != '' ? $request->valid_until : NULL ;\\n $voucher = Voucher::create($data);\\n\\n return redirect()->route('gjadmin.vouchers.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"707598dd3a6f3868b02cb066f3a01a33\",\n \"score\": \"0.48901686\",\n \"text\": \"function createView() {\\n\\n require 'connector.php';\\n\\n /* Map Function */\\n $map = \\\"function(doc) {\\n (doc.genre || []).forEach(function(genre){ \\n var key = {title: doc.title, genre: doc.genre};\\n emit(key, 1);\\n });\\n }\\\";\\n\\n $view = new stdClass();\\n $view->_id = '_design/title';\\n $view->language = 'javascript';\\n $view->views = array('byGenre' => array('map' => $map, \\\"reduce\\\" => \\\"_count\\\"));\\n\\n $client->storeDoc($view);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d382802f3ac099e23bfdaee4bcfbaa2e\",\n \"score\": \"0.48863566\",\n \"text\": \"protected function RecalculateVouchers()\\n {\\n if (!is_null($this->GetActiveVouchers())) {\\n $this->dCostVouchers = 0;\\n $this->GetActiveVouchers()->RemoveInvalidVouchers(MTShopBasketCore::MSG_CONSUMER_NAME, $this);\\n $this->dCostVouchers = $this->GetActiveVouchers()->GetVoucherValue(true);\\n if ($this->dCostVouchers > $this->dCostTotal) {\\n $this->dCostVouchers = $this->dCostTotal;\\n }\\n } else {\\n $this->dCostVouchers = 0;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1f522473626035b45f8d09f2a682ce7\",\n \"score\": \"0.48726457\",\n \"text\": \"function downloadvolunteers()\\n\\t{\\n\\t\\t$userInfo = $_SESSION['user'];\\n\\t\\tif(!isset($userInfo))\\n\\t\\t\\tredirect('/hcdec/index');\\n\\t\\tif(!in_array('manage_volunteers', $userInfo['roles']))\\n\\t\\t\\tredirect('/hcdec/myhcdec');\\n\\t\\t\\t# list the volunteers as rows in HTML table. parameters for\\n\\t\\t# this request: $startDate, $endDate. if startDate is not\\n\\t\\t# given, all volunteer requests are listed up thru endDate.\\n\\t\\t# if endDate is not given, all volunteer requests are listed\\n\\t\\t# period in one giant scrolling div. add format = html or csv\\n\\t\\t# so we know which view to load\\n\\n\\t\\t$arr = $this->uri->uri_to_assoc(3);\\n\\t\\t\\n\\t\\t$criteria = array();\\n\\t\\t$startDate = \\\"\\\";\\n\\t\\tif(isset($arr['startDate']))\\n\\t\\t{\\n\\t\\t\\t$criteria['startDate'] = $arr['startDate'];\\n\\t\\t\\t$startDate = $arr['startDate'];\\n\\t\\t}\\n\\t\\t\\t\\n\\t\\t$endDate = \\\"\\\";\\n\\t\\tif(isset($arr['endDate']))\\n\\t\\t{\\n\\t\\t\\t$criteria['endDate'] = $arr['endDate'];\\n\\t\\t\\t$endDate = $arr['endDate'];\\n\\t\\t}\\n\\t\\t\\n\\t\\t$precinct = \\\"\\\";\\n\\t\\tif(isset($arr['precinct']))\\n\\t\\t{\\n\\t\\t\\t$criteria['precinct'] = $arr['precinct'];\\n\\t\\t\\t$precinct = $arr['precinct'];\\n\\t\\t}\\n\\t\\t\\t\\n\\t\\t$criteria = array();\\n\\t\\t# now look up volunteers\\n\\t\\t$this->load->model('volunteers');\\n\\t\\t$r = $this->volunteers->getVolunteers();\\n\\t\\tif($r['status'] == 'OK')\\n\\t\\t{\\n\\t\\t\\t$params['volunteers'] = $r['rows'];\\n\\t\\t\\t$params['startDate'] = $startDate;\\n\\t\\t\\t$params['endDate'] = $endDate;\\n\\t\\t\\t$params['precinct'] = $precinct;\\n\\t\\t\\t$this->load->view('volunteers_spreadsheet', $params);\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t# error page\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea1b1b1e32adfa9b9794a8b6bd069a\",\n \"score\": \"0.48708385\",\n \"text\": \"public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7dd10791b42ea589326aa3d2fec1051e\",\n \"score\": \"0.48571146\",\n \"text\": \"protected function _setVouchers( $aVoucherSeries )\\r\\n {\\r\\n if ( empty( $aVoucherSeries ) ) {\\r\\n return;\\r\\n }\\r\\n $aVoucherIDs = array();\\r\\n foreach ( $aVoucherSeries as $aVoucherSerie ) {\\r\\n $oVoucherSerie = oxNew( 'oxbase' );\\r\\n $oVoucherSerie->init( 'oxvoucherseries' );\\r\\n foreach( $aVoucherSerie as $sKey => $mxValue ) {\\r\\n $sField = \\\"oxvoucherseries__\\\" . $sKey;\\r\\n $oVoucherSerie->$sField = new oxField( $mxValue, oxField::T_RAW);\\r\\n }\\r\\n $oVoucherSerie->save();\\r\\n // inserting vouchers\\r\\n for ( $i = 1; $i <= $aVoucherSerie['voucher_count']; $i++ ) {\\r\\n $aData = array(\\r\\n 'oxreserved' => 0,\\r\\n 'oxvouchernr' => md5( uniqid( rand(), true ) ),\\r\\n 'oxvoucherserieid' => $oVoucherSerie->getId() \\r\\n );\\r\\n $oVoucher = $this->createObj( $aData, 'oxvoucher', 'oxvouchers' );\\r\\n $aVoucherIDs[] = $oVoucher->getId();\\r\\n }\\r\\n }\\r\\n return $aVoucherIDs;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b44c6127fb55f26eb4e490af9a373be5\",\n \"score\": \"0.48478484\",\n \"text\": \"public function payment_vouchers()\\r\\n {\\r\\n return $this->hasMany('App\\\\PaymentVoucher');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c1d7d8c48f9896dfc27e6469230d2ce\",\n \"score\": \"0.48383877\",\n \"text\": \"public function generate() {\\n\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe0afdbb783d907cdcac4e7119d949ed\",\n \"score\": \"0.4826828\",\n \"text\": \"public function create()\\n {\\n $temp_vendors=DB::table('vendors')\\n ->where('vendortype','customer')\\n ->orderBy('company_name_th','asc') //select data from database\\n ->get();\\n\\n $vendors=[];\\n if(!empty($temp_vendors)){\\n foreach($temp_vendors as $temp){ //check data and loop for change value to id \\n $vendors[$temp->vendor_id]=$temp;\\n }\\n }\\n return view('createquotation',['vendors'=>$vendors]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b468c67cc6e974d62abe56dbcbd38e0\",\n \"score\": \"0.4808531\",\n \"text\": \"function index(){\\n\\tif(!isset($this->params['pass'][0])) {\\n\\t\\t$this->redirect(array('action'=>'voucherCommon'));\\n\\t}\\n\\t\\t$this->set('title_for_layout','Gift Certificate');\\n\\t\\t$this->set('categoryList',$this->common->getAllCategory());\\n\\t\\t$this->set('countyList',$this->common->getAllCounty()); \\t// List counties\\n\\t\\t$this->set('cityList',$this->common->getAllCity()); \\t\\t// List cities\\n\\t\\t$this->set('stateList',$this->common->getAllState()); \\t\\t// List states\\n\\t\\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\\n\\t\\t$this->set('search_text','Title');\\n\\t\\t$this->set('s_date','');\\n\\t\\t$this->set('e_date','');\\n\\t\\t$this->set('category', 'Category');\\n\\t\\t$this->set('county', 'County');\\n\\t\\t$this->set('advertiser_profile_id', 'Advertiser');\\n\\t\\t$cond = '';\\n\\t\\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\\n\\t\\t\\n\\t\\t/*--------------------------------------setting diff condition in paginate function according to search criteria-----------------------------*/\\n\\t\\t\\n\\t\\tif(isset($this->params['pass'][0]) && $this->params['pass'][0] !='' )\\n\\t\\t {\\n\\t\\t\\t $cond=array('Voucher.advertiser_profile_id' => $this->params['pass'][0]);\\n\\t\\t\\t (empty($this->params['named'])) ? $this->set('advertiser_profile_id', $this->params['pass'][0]) :$this->set('advertiser_profile_id', $this->params['pass'][0]) ; \\n\\t\\t\\t $this->set('advertiser_id',$this->params['pass'][0]);\\n\\t\\t }\\n\\t\\t//if advertiser is set\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\\n\\t\\t\\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\\n\\t\\t\\t{\\n\\t\\t\\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\\n\\t\\t\\t}\\n\\t\\t\\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\\n\\t\\t\\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t \\n\\t\\t\\t $advertiser_profile_id =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('advertiser_profile_id',$advertiser_profile_id); \\n\\t\\t}\\n\\t\\t\\n\\t\\t\\n\\t\\t//if categry is set\\n\\t\\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $category = $this->data['vouchers']['category'] ;\\n\\t\\t\\t}\\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\\n $category = $this->params['named']['category'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t$category = '';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('category',$category); \\n\\t\\t}\\n\\t\\t//if county is set\\n\\t\\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $county = $this->data['vouchers']['county'] ;\\n\\t\\t\\t}\\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\\n $county = $this->params['named']['county'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t$county = '';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('county',$county); \\n\\t\\t}\\n\\t\\t\\n\\t\\t//if title is set\\t \\t\\t \\n\\t\\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\\n\\t\\t\\t{\\n\\t\\t\\t $search_text = $this->data['vouchers']['search_text'] ;\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\\n\\t\\t\\t $search_text = $this->params['named']['search_text'] ;\\n\\t\\t\\t}else{\\n $search_text ='';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('search_text',$search_text); \\n\\t\\t}\\n\\t\\t\\n\\t\\t//if start and end dates are set \\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $arrS_date = explode(\\\"/\\\",$this->data['vouchers']['s_date']);\\n\\t\\t\\t $day = $arrS_date[0] ;\\n\\t\\t\\t $month = $arrS_date[1] ;\\n\\t\\t\\t $year = $arrS_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $s_date = $this->data['vouchers']['s_date'] ;\\n\\t\\t\\t $s_date = str_replace(\\\"/\\\",\\\"-\\\",$s_date);\\n\\t\\t\\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\\n\\t\\t\\t \\n\\t\\t\\t $arrS_date = explode(\\\"-\\\",$this->params['named']['s_date']);\\n\\t\\t\\t $day = $arrS_date[0] ;\\n\\t\\t\\t $month = $arrS_date[1] ;\\n\\t\\t\\t $year = $arrS_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $s_date = $this->params['named']['s_date'] ;\\n\\t\\t\\t $s_date = str_replace(\\\"/\\\",\\\"-\\\",$s_date);\\n\\t\\t\\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\\n\\t\\t\\t}else{\\n\\t\\t\\t $s_date =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('s_date',$s_date);\\n\\t\\t\\t\\n\\t\\t\\t$this->set('s_datetmsp',$s_datetmsp);\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t}\\n\\t\\t\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\\n\\t\\t\\t{\\n\\t\\t\\t\\n\\t\\t\\t $arrE_date = explode(\\\"/\\\",$this->data['vouchers']['e_date']);\\n\\t\\t\\t $eday = $arrE_date[0] ;\\n\\t\\t\\t $emonth = $arrE_date[1] ;\\n\\t\\t\\t $eyear = $arrE_date[2] ;\\n\\t\\t\\t $e_date = $this->data['vouchers']['e_date'] ;\\n\\t\\t\\t $e_date = str_replace(\\\"/\\\",\\\"-\\\",$e_date);\\n\\t\\t\\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\\n\\t\\t\\t \\n\\t\\t\\t $arrE_date = explode(\\\"-\\\",$this->params['named']['e_date']);\\n\\t\\t\\t $eday = $arrE_date[0] ;\\n\\t\\t\\t $emonth = $arrE_date[1] ;\\n\\t\\t\\t $eyear = $arrE_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $e_date = $this->params['named']['e_date'] ;\\n\\t\\t\\t $e_date = str_replace(\\\"/\\\",\\\"-\\\",$e_date);\\n\\t\\t\\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\\n\\t\\t\\t}else{\\n\\t\\t\\t $e_date =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('e_date',$e_date);\\n\\t\\t\\t$this->set('e_datetmsp',$e_datetmsp);\\n\\t\\t\\n\\t\\t}\\n\\t\\n\\t\\t \\n\\t\\t\\t /*----------------------------------At the time of sorting Filteration on basis of these fields------------------------------*/\\n\\t\\t\\n\\t\\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\\n\\t\\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($category) && $category !=''){\\n\\t\\t $cond['Voucher.category_id'] = $category;\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($county) && $county !=''){\\n\\t\\t $cond['Voucher.advertiser_county_id'] = $county;\\n\\t\\t}\\n\\n\\t\\tif(isset($search_text) && $search_text !=''){\\n\\t\\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\\n\\t\\t $cond['Voucher.s_date >='] = $s_datetmsp ;\\n\\t\\t $cond['Voucher.e_date <='] = $e_datetmsp ;\\n\\t\\t}\\n\\t\\t\\n\\t\\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\\n\\n\\t\\t\\n\\t\\t $cond['Voucher.s_date ='] = $s_datetmsp ;\\n\\t\\t\\n\\t\\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\\n\\t\\t $cond['Voucher.e_date ='] = $e_datetmsp ;\\n\\t\\t}\\n\\n\\t\\t\\n\\t\\t$data = $this->paginate('Voucher', $cond);\\n\\t\\t$this->set('vouchers', $data);\\n\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"436fa0b7be7f3da7f95d7022b403edb5\",\n \"score\": \"0.48030066\",\n \"text\": \"public function index()\\n\\t{\\n\\n\\t\\t//$vouchers = Vouchers::latest()->get();\\n $vouchers= Vouchers::paginate(1);\\n //dd($paginare);\\n\\t\\treturn view('administrare.pages.voucher.index', compact('vouchers'));\\n // ->with(compact('paginare'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c32c2b4304c44e6e1023d89efd9c5ba\",\n \"score\": \"0.48025286\",\n \"text\": \"public function method1()\\n {\\n $user = getAPIUser();\\n\\n // Only Buyer User or Broker can access buyer records\\n if (!($this->isCustomer() || ($this->isBroker() && $user->broker))) {\\n ssAbort('Unauthorised', ERROR_CODE_UNAUTHORIZED);\\n }\\n\\n $buyers = null;\\n\\n if ($this->isCustomer()) {\\n $buyers = $user->buyers;\\n } else if ($this->isBroker() && $user->broker) {\\n $buyers = $user->broker->buyers;\\n }\\n\\n loadObjects($buyers, [\\n 'individual',\\n 'company',\\n 'officers',\\n 'primary_address',\\n 'mailing_address',\\n 'email_contact',\\n 'phone1_contact',\\n 'phone2_contact',\\n 'documents',\\n 'lawyers',\\n 'users'\\n ]);\\n\\n $data = [\\n \\\"buyers\\\" => $buyers,\\n ];\\n\\n $buyersArray[]=['No', 'Date', 'Name', 'Email', 'Contact Number', 'NIRC/PASSPORT / COMPANY REG. NO', 'STATUS'];\\n foreach($buyers as $key=>$buyer){\\n $verified =($buyer->emailContact->verified)?'Verified':'Not Verified';\\n $email =($buyer->emailContact->value)?$buyer->emailContact->value:'';\\n $created_at =!empty($buyer->emailContact->created_at)?$buyer->emailContact->created_at:'';\\n $display_name =!empty($buyer->individual)?$buyer->individual->first_name.' '.$buyer->individual->last_name:$buyer->company->name;\\n $phone1Contactvalue =!empty($buyer->phone1Contact->value)?$buyer->phone1Contact->value:'';\\n\\n\\n if(!empty($buyer->individual)){\\n $passport_no =!empty($buyer->individual->passport_no)?$buyer->individual->passport_no:$buyer->individual->national_id;\\n }\\n if(!empty($buyer->company)){\\n $passport_no =!empty($buyer->company->reg_no)?$buyer->company->reg_no:'';\\n }\\n //$passport_no =!empty($buyer->individual)?($buyer->individual->identity_type=='singaporean' || $buyer->individual->identity_type=='singaporean_r')?$buyer->individual->national_id:$buyer->individual->passport_no:$buyer->company->reg_no;\\n $buyersArray[]=[$key+1, $created_at, $display_name, $email, $phone1Contactvalue, $passport_no, $verified];\\n }\\n Excel::create('BUYERS LIST', function ($exportBuyers) use ($buyersArray) {\\n // Set the spreadsheet title, creator, and description\\n $exportBuyers->setTitle('BUYERS LIST');\\n $exportBuyers->setCreator('test')->setCompany('Show Suite');\\n $exportBuyers->setDescription('Buyers List Export');\\n //Property\\n $exportBuyers->sheet('Buyers', function ($sheet) use ($buyersArray) {\\n $sheet->fromArray($buyersArray, null, 'A1', true, false);\\n });\\n\\n })->download('xlsx');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1d5d7d30b93f2bfe29e2aa250ec0ec0\",\n \"score\": \"0.47578892\",\n \"text\": \"function gen() { $this->generate(); }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3e4213cbc089be7b07970ee597139c0\",\n \"score\": \"0.47552603\",\n \"text\": \"public function generate()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc44ac22660d0a3053ee6ec80ae9ff2c\",\n \"score\": \"0.4710078\",\n \"text\": \"public function generate_guest_report(){\\n\\t\\t$pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\\n\\n\\t\\t// set document information\\n\\t\\t// $pdf->SetCreator(PDF_CREATOR);\\n\\t\\t// $pdf->SetAuthor('Nicola Asuni');\\n\\t\\t// $pdf->SetTitle('TCPDF Example 048');\\n\\t\\t// $pdf->SetSubject('TCPDF Tutorial');\\n\\t\\t// $pdf->SetKeywords('TCPDF, PDF, example, test, guide');\\n\\n\\t\\t// set default header data\\n\\t\\t$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);\\n\\n\\t\\t// set header and footer fonts\\n\\t\\t$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\\n\\t\\t$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\\n\\n\\t\\t// set default monospaced font\\n\\t\\t$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\\n\\n\\t\\t// set margins\\n\\t\\t$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\\n\\t\\t$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\\n\\t\\t$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\\n\\n\\t\\t// set auto page breaks\\n\\t\\t$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\\n\\n\\t\\t// set image scale factor\\n\\t\\t$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\\n\\n\\t\\t// set some language-dependent strings (optional)\\n\\t\\tif (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\\n\\t\\t\\trequire_once(dirname(__FILE__).'/lang/eng.php');\\n\\t\\t\\t$pdf->setLanguageArray($l);\\n\\t\\t}\\n\\n\\t\\t// ---------------------------------------------------------\\n\\n\\t\\t// set font\\n\\t\\t$pdf->SetFont('helvetica', 'B', 20);\\n\\n\\t\\t// add a page\\n\\t\\t$pdf->AddPage();\\n\\n\\t\\t$pdf->Write(0, 'Guest List', '', 0, 'C', true, 0, false, false, 0);\\n\\n\\t\\t// set font\\n\\t\\t$pdf->SetFont('helvetica', 'B', 10);\\n\\t\\t\\n\\t\\t$pdf->Write(0, 'Date: '.date('F d, Y'), '', 0, 'C', true, 0, false, false, 0);\\n\\t\\t\\n\\t\\t$pdf->SetFont('helvetica', '', 10);\\n\\t\\t\\n\\t\\tif(isset($_POST['guest_type_id']) == true && isset($_POST['gender_id']) == true){\\n\\t\\t\\t$data['guests'] = $this->usersModel->getGuestTypeAndGender($_POST['guest_type_id'], $_POST['gender_id']);\\n\\t\\t}elseif(isset($_POST['guest_type_id']) == true && isset($_POST['gender_id']) == false){\\n\\t\\t\\t$data['guests'] = $this->usersModel->getGuestTypeAndNoGender($_POST['guest_type_id']);\\n\\t\\t}elseif(isset($_POST['guest_type_id']) == false && isset($_POST['gender_id']) == true){\\n\\t\\t\\t$data['guests'] = $this->usersModel->getNoGuestTypeAndGender($_POST['gender_id']);\\n\\t\\t}else{\\n\\t\\t\\t$data['guests'] = $this->usersModel->getUsersLists();\\n\\t\\t}\\n\\t\\t$html = view('Modules\\\\Guests\\\\Views\\\\guests\\\\guestspdf', $data);\\n\\t\\t$pdf->writeHTML($html, true, false, false, false, '');\\n\\t\\t// ---------------------------------------------------------\\n\\n\\t\\t// Close and output PDF document\\n\\t\\t// This method has several options, check the source code documentation for more information.\\n\\t\\t$pdf->Output('example_001.pdf', 'I');\\n\\t\\tdie();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c26d8057542b3ffe28f242620e5fc519\",\n \"score\": \"0.46835908\",\n \"text\": \"abstract public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c26d8057542b3ffe28f242620e5fc519\",\n \"score\": \"0.46835908\",\n \"text\": \"abstract public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c26d8057542b3ffe28f242620e5fc519\",\n \"score\": \"0.46835908\",\n \"text\": \"abstract public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c26d8057542b3ffe28f242620e5fc519\",\n \"score\": \"0.46835908\",\n \"text\": \"abstract public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c26d8057542b3ffe28f242620e5fc519\",\n \"score\": \"0.46835908\",\n \"text\": \"abstract public function generate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54d8d709193bf8cd436df32b18796ca7\",\n \"score\": \"0.46793646\",\n \"text\": \"public function getAll(Request $request, Response $response)\\n {\\n $vouchers = Voucher::all();\\n return response()->json([\\n 'vouchers' => $vouchers\\n ], 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d234f6e813278016f8e3644f3ac69297\",\n \"score\": \"0.46764204\",\n \"text\": \"public function run()\\n {\\n $faker = \\\\Faker\\\\Factory::create();\\n\\n $recipients = [];\\n\\n /**\\n * This first recipient will be used for later testing the API\\n */\\n $recipients[] = DB::table('recipients')\\n ->insertGetId([\\n 'name' => 'John Doe',\\n 'email' => 'john@doe.com',\\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n ]);\\n\\n for ($i = 0; $i < 49; $i++) {\\n $recipients[] = DB::table('recipients')\\n ->insertGetId([\\n 'name' => $faker->name,\\n 'email' => $faker->unique()->email,\\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n ]);\\n }\\n\\n for ($i = 0; $i < 5; $i++) {\\n $offer = DB::table('special_offers')\\n ->insertGetId([\\n 'name' => $faker->sentence(4),\\n 'discount' => $faker->numberBetween(1, 20) * 5,\\n 'expiration' => $faker->dateTimeBetween('-2 months', '+5 months'),\\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n ]);\\n\\n foreach ($recipients as $recipient) {\\n DB::table('voucher_codes')\\n ->insert([\\n 'special_offer_id' => $offer,\\n 'recipient_id' => $recipient,\\n 'code' => str_random(12),\\n 'used_on' => (mt_rand(0, 2) <= 1) ? $faker->dateTimeBetween('-2 months', 'now') : NULL,\\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\\n ]);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f995aa3fd22e6520e919d63477ad1ef\",\n \"score\": \"0.46645784\",\n \"text\": \"public function generate( $args, $assoc_args ) {\\n $faker = Faker::get();\\n\\n $count = 10;\\n $generated = 0;\\n\\n if ( ! empty( $assoc_args['count'] ) ) {\\n $count = $assoc_args['count'];\\n }\\n\\n $message = sprintf( 'Generating %d vendors', $count );\\n\\n $progress = $this->make_progress_bar( $message, $count );\\n\\n add_filter( 'woocommerce_email_enabled_dokan_new_seller', '__return_false' );\\n\\n for ( $i = 0; $i < $count; $i++ ) {\\n $email = $faker->safeEmail;\\n $shopname = $faker->unique()->userName;\\n\\n $userdata = [\\n 'user_login' => $email,\\n 'user_email' => $email,\\n 'user_pass' => ',lpmkonji',\\n 'first_name' => $faker->firstName,\\n 'last_name' => $faker->lastName,\\n 'role' => 'seller',\\n 'user_nicename' => $shopname,\\n ];\\n\\n $vendor = wp_insert_user( $userdata );\\n\\n if ( ! is_wp_error( $vendor ) ) {\\n $dokan_settings = array(\\n 'store_name' => $shopname,\\n 'social' => array(),\\n 'payment' => array(),\\n 'phone' => $faker->phoneNumber,\\n 'show_email' => 'no',\\n 'dokan_category' => '',\\n 'banner' => 0,\\n );\\n\\n // 50-50 chance to add location data\\n $add_location_data = $faker->boolean();\\n\\n if ( $add_location_data ) {\\n $lat = $faker->latitude( 23.70, 23.90 );\\n $long = $faker->longitude( 90.25, 90.50 );\\n\\n $dokan_settings['find_address'] = $faker->address;\\n $dokan_settings['location'] = $lat . ',' . $long;\\n }\\n\\n update_user_meta( $vendor, 'dokan_profile_settings', $dokan_settings );\\n update_user_meta( $vendor, 'dokan_store_name', $dokan_settings['store_name'] );\\n\\n do_action( 'dokan_new_seller_created', $vendor, $dokan_settings );\\n\\n do_action( 'dokan_dev_cli_vendor_generated', $vendor );\\n\\n ++$generated;\\n }\\n\\n $progress->tick();\\n }\\n\\n $progress->finish();\\n\\n $message = sprintf( 'Generated %d vendors', $generated );\\n\\n $this->success( $message );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"546026b52202f3210a24a75e0f2235b1\",\n \"score\": \"0.4659318\",\n \"text\": \"public function createReservationVoucher(BathReservation $reservation, string $flePath, string $projectDir)\\n {\\n $pdfOptions = new Options();\\n $pdfOptions->set('defaultFont', 'DejaVu Sans');\\n // Instantiate Dompdf with our options\\n $dompdf = new Dompdf($pdfOptions);\\n\\n $dompdf->getOptions()->setChroot($projectDir . DIRECTORY_SEPARATOR . 'public'); //path to document root\\n // Retrieve the HTML generated in our twig file\\n\\n /** @var BathSlot[] $slots */\\n $slots = $reservation->getSlots();\\n $countSlots = count($slots);\\n $startTime = $slots[0]->getBathschedule()->getDate()->format('Y-m-d'). \\\" \\\" .explode('-', $slots[0]->getTime())[0];\\n $endTime = $slots[$countSlots - 1]->getBathschedule()->getDate()->format('Y-m-d'). \\\" \\\" .explode('-', $slots[$countSlots - 1]->getTime())[1];\\n $html = $this->twig->render('pdf/voucher.html.twig', [\\n 'title' => \\\"Ваучер бронирования\\\",\\n 'assetDir' => $projectDir . DIRECTORY_SEPARATOR . 'public',\\n 'reservation' => $reservation,\\n 'startTime' => $startTime,\\n 'endTime' => $endTime\\n ]);\\n\\n $dompdf->loadHtml($html);\\n \\n // (Optional) Setup the paper size and orientation 'portrait' or 'portrait'\\n $dompdf->setPaper('A4', 'portrait');\\n\\n // Render the HTML as PDF\\n $dompdf->render();\\n\\n // Store PDF Binary Data\\n $output = $dompdf->output();\\n \\n // Write file to the desired path\\n file_put_contents($flePath, $output); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b22bf1296ea34a5a7f8993ee4749927c\",\n \"score\": \"0.46513382\",\n \"text\": \"public function index() {\\n\\t\\t$id = $this->requete->getParametre('id');\\n $Client = $this->Client->getClient($id);\\n $this->genererVue(array('Client' => $Client));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"efb5112dd14999fbfd9069a8830aa8b3\",\n \"score\": \"0.46510085\",\n \"text\": \"public function getTypeVouchers(){\\n $type_vouchers = \\\\DB::table('type_vouchers')->get();\\n return response()->json(['estado'=>true, 'code'=>'200', 'message'=>\\\"Petición exitosa\\\", 'data'=>$type_vouchers]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"534410c4a5ca0ae549bfaa831f292b73\",\n \"score\": \"0.46496972\",\n \"text\": \"public abstract function generateView();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42ada19f453464f1876edd8e8dc6bedb\",\n \"score\": \"0.46456087\",\n \"text\": \"public function ventas(Request $request)\\n {\\n $facturas = Factura::orderBy('fecha', 'ASC')->get();\\n // Establecer la fecha desde y hasta\\n if (count($facturas) > 0) {\\n $inicio = $facturas->first();\\n $ultima = $facturas->last();\\n $from = $request->get('desde', $inicio->fecha);\\n $to = $request->get('hasta', $ultima->fecha);\\n } else {\\n $from = $request->get('desde', now());\\n $to = $request->get('hasta', now());\\n }\\n\\n $desde = new Carbon($from);\\n $hasta = new Carbon($to);\\n $ventasFecha = [];\\n $fecs = collect();\\n $vendedores = [];\\n $ventasVendedores = [];\\n $sellers = collect();\\n $ventasClientes = [];\\n $clientes = [];\\n $clients = collect();\\n $ventasCondiciones = [];\\n $condiciones = collect(['CONTADO', 'CUENTA CORRIENTE', 'CREDITO / DEBITO']);\\n\\n // Buscar las facturas entre las fechas\\n $facturas = Factura::where('fecha', '>=', $desde->format('Ymd'))->where('fecha', '<=', $hasta->format('Ymd'))->orderBy('fecha', 'ASC')->take($request->get('limit', null))->get();\\n\\n foreach ($facturas as $factura) {\\n $seller = User::find($factura->user_id);\\n $sellers->push($seller);\\n $client = Cliente::find($factura->cliente_id);\\n $clients->push($client);\\n }\\n\\n $facturas2 = Factura::where('fecha', '>=', $desde->format('Ymd'))->where('fecha', '<=', $hasta->format('Ymd'))->orderBy('fecha', 'ASC')->get();\\n foreach ($facturas2 as $factura) {\\n $fecs->push($factura->fecha);\\n }\\n\\n // Fechas\\n $auxFechas = $fecs->unique();\\n foreach ($auxFechas as $value) {\\n $factus = Factura::where('fecha', $value)->get();\\n array_push($ventasFecha, $factus);\\n };\\n $columnsFechas = ['fecha', 'total'];\\n $rowsFechas = collect();\\n $total = 0;\\n for ($i = 0; $i < count($ventasFecha); $i++) {\\n $otro = $ventasFecha[$i];\\n foreach ($otro as $a) {\\n $total += $a->total;\\n }\\n $fecha = $ventasFecha[$i][0]->fecha;\\n $fechaNew = new Carbon($fecha);\\n $rowsFechas->push([\\n 'fecha' =>\\n $fechaNew->format('d-m-Y'),\\n 'total' => $total\\n ]);\\n $total = 0;\\n };\\n $ventasFechasChart = collect();\\n $ventasFechasChart->put('columns', $columnsFechas);\\n $ventasFechasChart->put('rows', $rowsFechas);\\n // Fin Fechas\\n\\n // Vendedores\\n $auxVendedores = $sellers->unique();\\n foreach ($auxVendedores as $key) {\\n $facs = Factura::where('user_id', $key->id)\\n ->where('fecha', '>=', $desde->format('Ymd'))\\n ->where('fecha', '<=', $hasta->format('Ymd'))\\n ->orderBy('fecha', 'ASC')\\n ->get();\\n array_push($vendedores, $key);\\n array_push($ventasVendedores, $facs);\\n }\\n $columnsVendedores = ['vendedor', 'totalVendido'];\\n $rowsVendedores = collect();\\n $total = 0;\\n for ($i = 0; $i < count($ventasVendedores); $i++) {\\n $otro = $ventasVendedores[$i];\\n foreach ($otro as $a) {\\n $total += $a->total;\\n }\\n $rowsVendedores->push([\\n 'vendedor' => $vendedores[$i]->name,\\n 'totalVendido' => $total\\n ]);\\n $total = 0;\\n };\\n $ventasVendedores = collect();\\n $ventasVendedores->put('columns', $columnsVendedores);\\n $ventasVendedores->put('rows', $rowsVendedores);\\n // Fin Vendedores\\n\\n // Clientes\\n $auxClientes = $clients->unique();\\n foreach ($auxClientes as $aux) {\\n $facturs = Factura::where('cliente_id', $aux->id)\\n ->where('fecha', '>=', $desde->format('Ymd'))\\n ->where('fecha', '<=', $hasta->format('Ymd'))\\n ->orderBy('fecha', 'ASC')->get();\\n array_push($clientes, $aux);\\n array_push($ventasClientes, $facturs);\\n }\\n $columnsClientes = ['cliente', 'totalComprado'];\\n $rowsClientes = collect();\\n $total = 0;\\n for ($i = 0; $i < count($ventasClientes); $i++) {\\n $otro = $ventasClientes[$i];\\n foreach ($otro as $a) {\\n $total += $a->total;\\n }\\n $rowsClientes->push([\\n 'cliente' => $clientes[$i]->razonsocial,\\n 'totalComprado' => $total\\n ]);\\n $total = 0;\\n };\\n $ventasClientes = collect();\\n $ventasClientes->put('columns', $columnsClientes);\\n $ventasClientes->put('rows', $rowsClientes);\\n // Fin Clientes\\n\\n // Condiciones\\n foreach ($condiciones as $cond) {\\n $fa = Factura::where('condicionventa', $cond)\\n ->where('fecha', '>=', $desde->format('Ymd'))\\n ->where('fecha', '<=', $hasta->format('Ymd'))\\n ->orderBy('fecha', 'ASC')->get();;\\n array_push($ventasCondiciones, $fa);\\n }\\n $columnsCondiciones = ['condicion', 'totalVendido'];\\n $rowsCondiciones = collect();\\n $total = 0;\\n for ($i = 0; $i < count($ventasCondiciones); $i++) {\\n $otro = $ventasCondiciones[$i];\\n foreach ($otro as $a) {\\n $total += $a->total;\\n }\\n $rowsCondiciones->push([\\n 'condicion' => $condiciones[$i],\\n 'totalVendido' => $total\\n ]);\\n $total = 0;\\n };\\n $ventasCondiciones = collect();\\n $ventasCondiciones->put('columns', $columnsCondiciones);\\n $ventasCondiciones->put('rows', $rowsCondiciones);\\n // Fin Condiciones\\n\\n $ventas = [\\n 'fechas' => ['desde' => $desde->format('Y-m-d'), 'hasta' => $hasta->format('Y-m-d')],\\n 'ventasFecha' => $facturas,\\n 'ventasFechaChart' => $ventasFechasChart,\\n 'total' => count(Factura::all()),\\n 'vendedores' => $vendedores,\\n 'ventasVendedores' => $ventasVendedores,\\n 'clientes' => $clientes,\\n 'ventasClientes' => $ventasClientes,\\n 'condiciones' => $condiciones,\\n 'ventasCondiciones' => $ventasCondiciones\\n ];\\n\\n return ['ventas' => $ventas];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"188bcaec1f4f91a043af3b33457bc868\",\n \"score\": \"0.46387964\",\n \"text\": \"public function __construct(Google_Client $client)\\n {\\n parent::__construct($client);\\n $this->servicePath = 'apps/reseller/v1/';\\n $this->version = 'v1';\\n $this->serviceName = 'reseller';\\n\\n $this->customers = new Google_Service_Reseller_Customers_Resource(\\n $this,\\n $this->serviceName,\\n 'customers',\\n array(\\n 'methods' => array(\\n 'get' => array(\\n 'path' => 'customers/{customerId}',\\n 'httpMethod' => 'GET',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'insert' => array(\\n 'path' => 'customers',\\n 'httpMethod' => 'POST',\\n 'parameters' => array(\\n 'customerAuthToken' => array(\\n 'location' => 'query',\\n 'type' => 'string',\\n ),\\n ),\\n ),'patch' => array(\\n 'path' => 'customers/{customerId}',\\n 'httpMethod' => 'PATCH',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'update' => array(\\n 'path' => 'customers/{customerId}',\\n 'httpMethod' => 'PUT',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),\\n )\\n )\\n );\\n $this->subscriptions = new Google_Service_Reseller_Subscriptions_Resource(\\n $this,\\n $this->serviceName,\\n 'subscriptions',\\n array(\\n 'methods' => array(\\n 'activate' => array(\\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/activate',\\n 'httpMethod' => 'POST',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'subscriptionId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'changePlan' => array(\\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changePlan',\\n 'httpMethod' => 'POST',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'subscriptionId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'changeRenewalSettings' => array(\\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings',\\n 'httpMethod' => 'POST',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'subscriptionId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'changeSeats' => array(\\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/changeSeats',\\n 'httpMethod' => 'POST',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'subscriptionId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'delete' => array(\\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}',\\n 'httpMethod' => 'DELETE',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'subscriptionId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'deletionType' => array(\\n 'location' => 'query',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'get' => array(\\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}',\\n 'httpMethod' => 'GET',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'subscriptionId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'insert' => array(\\n 'path' => 'customers/{customerId}/subscriptions',\\n 'httpMethod' => 'POST',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'customerAuthToken' => array(\\n 'location' => 'query',\\n 'type' => 'string',\\n ),\\n ),\\n ),'list' => array(\\n 'path' => 'subscriptions',\\n 'httpMethod' => 'GET',\\n 'parameters' => array(\\n 'customerAuthToken' => array(\\n 'location' => 'query',\\n 'type' => 'string',\\n ),\\n 'pageToken' => array(\\n 'location' => 'query',\\n 'type' => 'string',\\n ),\\n 'customerId' => array(\\n 'location' => 'query',\\n 'type' => 'string',\\n ),\\n 'maxResults' => array(\\n 'location' => 'query',\\n 'type' => 'integer',\\n ),\\n 'customerNamePrefix' => array(\\n 'location' => 'query',\\n 'type' => 'string',\\n ),\\n ),\\n ),'startPaidService' => array(\\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/startPaidService',\\n 'httpMethod' => 'POST',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'subscriptionId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),'suspend' => array(\\n 'path' => 'customers/{customerId}/subscriptions/{subscriptionId}/suspend',\\n 'httpMethod' => 'POST',\\n 'parameters' => array(\\n 'customerId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n 'subscriptionId' => array(\\n 'location' => 'path',\\n 'type' => 'string',\\n 'required' => true,\\n ),\\n ),\\n ),\\n )\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15dbf206655220f9b5a7f5bdefe836dd\",\n \"score\": \"0.46299675\",\n \"text\": \"protected function GetActiveVouchers()\\n {\\n if (is_null($this->oActiveVouchers)) {\\n $this->oActiveVouchers = new TShopBasketVoucherList();\\n }\\n\\n return $this->oActiveVouchers;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7372e67a6ced070a8fdb527b5891a02\",\n \"score\": \"0.46255672\",\n \"text\": \"public function generate()\\n {\\n $this->initialiseDocument();\\n $this->createRDFContainer();\\n $this->createRDFVersion();\\n $this->signManifest();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d466adf32928ad68c826f61a4dd357ce\",\n \"score\": \"0.4624151\",\n \"text\": \"public function generate()\\n {\\n $validation = $this->validate();\\n\\n if ($validation === true) {\\n $offers = Offer::whereHas('leadstat', function($query) {\\n $query->where('date', '>=', Input::get('date_start'))\\n ->where('date', '<=', Input::get('date_end'));\\n });\\n\\n $country = Input::get('country');\\n if (!empty($country)) {\\n $offers->whereHas('countries', function($query) use ($country) {\\n $query->where('country', '=', $country);\\n });\\n }\\n\\n $offerIds = Input::get('offer_ids');\\n // 0 denotes all offers.\\n if (!in_array('0', $offerIds))\\n $offers->whereRaw('id IN (' . implode(',', $offerIds) . ')');\\n\\n $this->generated = true;\\n return $this->showResults($offers->get()->sortBy('name'));\\n } else {\\n $this->setAlertDanger($validation);\\n return $this->showResults();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0097b425d5ac073c4ed76e557e7723bd\",\n \"score\": \"0.4622875\",\n \"text\": \"function voucherCommon(){\\n\\t\\t$this->set('title_for_layout','Gift Certificate Common');\\n\\t\\t$this->set('categoryList',$this->common->getAllCategory());\\n\\t\\t$this->set('countyList',$this->common->getAllCounty()); \\t// List counties\\n\\t\\t$this->set('cityList',$this->common->getAllCity()); \\t\\t// List cities\\n\\t\\t$this->set('stateList',$this->common->getAllState()); \\t\\t// List states\\n\\t\\t$this->set('advertiserList',$this->common->getAdvertiserProfileAll()); // List advertisers\\n\\t\\t$this->set('search_text','Title');\\n\\t\\t$this->set('s_date','');\\n\\t\\t$this->set('e_date','');\\n\\t\\t$this->set('category', 'Category');\\n\\t\\t$this->set('county', 'County');\\n\\t\\t$this->set('advertiser_profile_id', 'Advertiser');\\n\\t\\t$cond = '';\\n\\t\\t$this->paginate = array('limit' => PER_PAGE_RECORD,'order' => array('Voucher.id' => 'asc'));\\n\\t\\t\\n\\t\\t\\n\\t\\t//pr($this->params);\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != '')|| ( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !='')){\\n\\t\\t\\tif((isset($this->data['vouchers']['advertiser_profile_id']) and $this->data['vouchers']['advertiser_profile_id'] != ''))\\n\\t\\t\\t{\\n\\t\\t\\t $advertiser_profile_id = $this->data['vouchers']['advertiser_profile_id'] ;\\n\\t\\t\\t}\\n\\t\\t\\telse if( isset($this->params['named']['advertiser_profile_id']) and $this->params['named']['advertiser_profile_id'] !=''){\\n\\t\\t\\t $advertiser_profile_id = $this->params['named']['advertiser_profile_id'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t \\n\\t\\t\\t $advertiser_profile_id =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('advertiser_profile_id',$advertiser_profile_id); \\n\\t\\t}\\n\\t\\t\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0)|| ( isset($this->params['named']['category']) and $this->params['named']['category'] !='')){\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['category']) and $this->data['vouchers']['category'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $category = $this->data['vouchers']['category'] ;\\n\\t\\t\\t}\\n else if( (isset($this->params['named']['category'])) and $this->params['named']['category'] !=''){\\n $category = $this->params['named']['category'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t$category = '';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('category',$category); \\n\\t\\t}\\n// if county is set\\n\\t\\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0)|| ( isset($this->params['named']['county']) and $this->params['named']['county'] !='')){\\n\\t\\t\\n\\t\\t\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['county']) and $this->data['vouchers']['county'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $county = $this->data['vouchers']['county'] ;\\n\\t\\t\\t}\\n else if( (isset($this->params['named']['county'])) and $this->params['named']['county'] !=''){\\n $county = $this->params['named']['county'] ;\\n\\t\\t\\t}else{\\n\\t\\t\\t$county = '';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('county',$county); \\n\\t\\t}\\n\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title'))|| ( isset($this->params['named']['search_text']) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title') )){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['search_text']) and ($this->data['vouchers']['search_text'] != '' and $this->data['vouchers']['search_text'] != 'Title')))\\n\\t\\t\\t{\\n\\t\\t\\t $search_text = $this->data['vouchers']['search_text'] ;\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['search_text'])) and ($this->params['named']['search_text'] !='' and $this->params['named']['search_text'] !='Title')){\\n\\t\\t\\t $search_text = $this->params['named']['search_text'] ;\\n\\t\\t\\t}else{\\n $search_text ='';\\n\\t\\t\\t}\\n\\t\\t\\t$this->set('search_text',$search_text); \\n\\t\\t}\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0)|| ( isset($this->params['named']['s_date']) and $this->params['named']['s_date'] !='')){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['s_date']) and $this->data['vouchers']['s_date'] != 0))\\n\\t\\t\\t{\\n\\t\\t\\t $arrS_date = explode(\\\"/\\\",$this->data['vouchers']['s_date']);\\n\\t\\t\\t $day = $arrS_date[1] ;\\n\\t\\t\\t $month = $arrS_date[0] ;\\n\\t\\t\\t $year = $arrS_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $s_date = $this->data['vouchers']['s_date'] ;\\n\\t\\t\\t $s_date = str_replace(\\\"/\\\",\\\"-\\\",$s_date);\\n\\t\\t\\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['s_date'])) and $this->params['named']['s_date'] !=''){\\n\\t\\t\\t \\n\\t\\t\\t $arrS_date = explode(\\\"-\\\",$this->params['named']['s_date']);\\n\\t\\t\\t $day = $arrS_date[1] ;\\n\\t\\t\\t $month = $arrS_date[0] ;\\n\\t\\t\\t $year = $arrS_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $s_date = $this->params['named']['s_date'] ;\\n\\t\\t\\t $s_date = str_replace(\\\"/\\\",\\\"-\\\",$s_date);\\n\\t\\t\\t $s_datetmsp = mktime(0,0,0,$month,$day,$year);\\n\\t\\t\\t}else{\\n\\t\\t\\t $s_date =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('s_date',$s_date);\\n\\t\\t\\t\\n\\t\\t\\t$this->set('s_datetmsp',$s_datetmsp);\\n\\t\\t\\t\\n\\t\\t\\n\\t\\t}\\n\\t\\t\\n\\t\\t\\n\\t\\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != '')|| ( isset($this->params['named']['e_date']) and $this->params['named']['e_date'] !='')){\\n\\t\\t\\n\\t\\t\\tif((isset($this->data['vouchers']['e_date']) and $this->data['vouchers']['e_date'] != ''))\\n\\t\\t\\t{\\n\\t\\t\\t\\n\\t\\t\\t $arrE_date = explode(\\\"/\\\",$this->data['vouchers']['e_date']);\\n\\t\\t\\t $eday = $arrE_date[1] ;\\n\\t\\t\\t $emonth = $arrE_date[0] ;\\n\\t\\t\\t $eyear = $arrE_date[2] ;\\n\\t\\t\\t $e_date = $this->data['vouchers']['e_date'] ;\\n\\t\\t\\t $e_date = str_replace(\\\"/\\\",\\\"-\\\",$e_date);\\n\\t\\t\\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\\n\\t\\t\\t}\\n\\t\\t\\telse if( (isset($this->params['named']['e_date'])) and $this->params['named']['e_date'] !=''){\\n\\t\\t\\t \\n\\t\\t\\t $arrE_date = explode(\\\"-\\\",$this->params['named']['e_date']);\\n\\t\\t\\t $eday = $arrE_date[1] ;\\n\\t\\t\\t $emonth = $arrE_date[0] ;\\n\\t\\t\\t $eyear = $arrE_date[2] ;\\n\\t\\t\\t \\n\\t\\t\\t $e_date = $this->params['named']['e_date'] ;\\n\\t\\t\\t $e_date = str_replace(\\\"/\\\",\\\"-\\\",$e_date);\\n\\t\\t\\t $e_datetmsp = mktime(0,0,0,$emonth,$eday,$eyear);\\n\\t\\t\\t}else{\\n\\t\\t\\t $e_date =\\\"\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->set('e_date',$e_date);\\n\\t\\t\\t$this->set('e_datetmsp',$e_datetmsp);\\n\\t\\t\\n\\t\\t}\\n\\t\\t\\n\\t\\t\\n\\t\\tif(isset($advertiser_profile_id) && $advertiser_profile_id !=''){\\n\\t\\t $cond['Voucher.advertiser_profile_id'] = $advertiser_profile_id;\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($category) && $category !=''){\\n\\t\\t $cond['Voucher.category_id'] = $category;\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($county) && $county !=''){\\n\\t\\t $cond['Voucher.advertiser_county_id'] = $county;\\n\\t\\t}\\n\\n\\t\\tif(isset($search_text) && $search_text !=''){\\n\\t\\t $cond['Voucher.title LIKE'] = '%'.$search_text. '%';\\n\\t\\t}\\n\\t\\t\\n\\t\\tif(isset($s_date) && $s_date !='' && isset($e_date) && $e_date !=''){\\n\\t\\t $cond['Voucher.s_date >='] = $s_datetmsp ;\\n\\t\\t $cond['Voucher.e_date <='] = $e_datetmsp ;\\n\\t\\t}\\n\\t\\t\\n\\t\\telse if(isset($s_date) && $s_date !='' && (!isset($e_date) || $e_date =='')){\\n\\t\\t\\n\\t\\t $cond['Voucher.s_date ='] = $s_datetmsp ;\\n\\t\\t\\n\\t\\t}else if((!isset($s_date) || $s_date =='') && (isset($e_date) && $e_date !='')){\\n\\t\\t $cond['Voucher.e_date ='] = $e_datetmsp ;\\n\\t\\t}\\n\\n\\t\\t$data = $this->paginate('Voucher', $cond);\\n\\t\\t$this->set('vouchers', $data);\\n\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21330d8293f52111fb7ca9b932bbe91a\",\n \"score\": \"0.46182698\",\n \"text\": \"function makeOfficerList() {\\n global $HERE;\\n $jsonPath = $HERE . \\\"../res/json/officers.json\\\";\\n return jsonFileArrayToStr($jsonPath, \\\"makeOfficerHtml\\\");\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8dbe557dc0e43290c1459a242ee0566e\",\n \"score\": \"0.46150115\",\n \"text\": \"public function woo_vou_admin_voucher_pdf_download() {\\r\\r\\n\\t\\t\\r\\r\\n\\t\\tglobal $current_user;\\r\\r\\n\\t\\t\\r\\r\\n\\t\\tif( !empty( $_GET['download_file'] ) && !empty( $_GET['key'] ) \\r\\r\\n\\t\\t\\t&& !empty( $_GET['woo_vou_admin'] ) && !empty( $_GET['woo_vou_order_id'] ) ) {\\r\\r\\n\\t\\t\\t\\t\\r\\r\\n\\t\\t\\t\\tif ( current_user_can( 'moderate_comments' ) ) {\\r\\r\\n\\t\\t\\t\\t\\t\\r\\r\\n\\t\\t\\t\\t\\t$product_id\\t\\t= (int) $_GET['download_file'];\\r\\r\\n\\t\\t\\t\\t\\t$email\\t\\t\\t= sanitize_email( str_replace( ' ', '+', $_GET['email'] ) );\\r\\r\\n\\t\\t\\t\\t\\t$download_id\\t= isset( $_GET['key'] ) ? preg_replace( '/\\\\s+/', ' ', $_GET['key'] ) : '';\\r\\r\\n\\t\\t\\t\\t\\t$order_id\\t\\t= $_GET['woo_vou_order_id'];\\r\\r\\n\\t\\t\\t\\t\\t$item_id\\t\\t= isset( $_GET['item_id'] ) ? $_GET['item_id'] : '';\\r\\r\\n\\t\\t\\t\\t\\t\\r\\r\\n\\t\\t\\t\\t\\t//Generate PDF\\r\\r\\n\\t\\t\\t\\t\\t$this->model->woo_vou_generate_pdf_voucher( $email, $product_id, $download_id, $order_id, $item_id );\\r\\r\\n\\t\\t\\t\\t\\t\\r\\r\\n\\t\\t\\t\\t} else {\\r\\r\\n\\t\\t\\t\\t\\t\\r\\r\\n\\t\\t\\t\\t\\twp_die( '

    '.__( 'You are not allowed to access this URL.', 'woovoucher' ).'

    ' );\\r\\r\\n\\t\\t\\t\\t}\\r\\r\\n\\t\\t\\t\\t\\r\\r\\n\\t\\t\\t\\texit;\\r\\r\\n\\t\\t}\\r\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bdebcb50144a7f6bf261ac8ae1682a3\",\n \"score\": \"0.46087518\",\n \"text\": \"public function getOurOffers(Request $request){\\n //$ouroffers = ouroffers::where('branch_id',$this->branch_id)->get();\\n $ouroffers = ouroffers::all();\\n $ouroffers = OurOffersResource::collection($ouroffers);\\n $ouroffersArr = $ouroffers->toArray($ouroffers);\\n //dd($ouroffersArr);\\n $allArr = [];\\n foreach($ouroffersArr as $items){\\n foreach($items as $ouroffer){\\n $allArr[] = $ouroffer;\\n }\\n }\\n //dd($allArr);\\n\\n return $this->setCode(200)->setData($allArr)->send();\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7f2ff05bb1a51f4b22d534004d7db02\",\n \"score\": \"0.4596203\",\n \"text\": \"public function index(Request $request)\\n {\\n $vouchers= Voucher::where(function($query) use ($request) {\\n \\n if (($term = $request->get('term'))) {\\n\\n $query->orWhere('dep_id','like','%' . $term . '%');\\n // $query->orWhere('bacprno','like','%' . $term . '%');\\n $query->orWhere('pboobrno','like','%' . $term . '%');\\n $query->orWhere('pboacctcode','like','%' . $term . '%');\\n\\n }\\n })\\n \\n ->orderBy('id', 'desc')\\n ->where('is_released','<>','1')\\n ->paginate(5);\\n\\n //$prs = PurchaseRequest::orderBy('id', 'desc')->paginate(4);\\n return view('budget.vouchers.index', compact('vouchers'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34c3c1ee60e1b784061e5ffd150a6aa2\",\n \"score\": \"0.45873955\",\n \"text\": \"public function voucherpaymentemail(Request $request)\\n {\\n\\n //////vouchertemplate\\n\\n //agency detal get\\n\\n $payment_booking = DB::table('payment')->where('id', '=', $_POST['bookingid'])->get();\\n\\n $guest = unserialize($payment_booking[0]->guest);\\n\\n $Servicename = '';\\n\\n $Servicetype = '';\\n\\n $MealBasis = '';\\n\\n $ServiceAddress = '';\\n\\n $RoomServiceType = '';\\n\\n $NoRooms = '';\\n\\n $Child = '';\\n\\n $Desitination = '';\\n\\n $starCategory = '';\\n\\n $Reservationstatus = '';\\n\\n $GuestName = '';\\n\\n $NoAdult = '';\\n\\n $Infants = '';\\n\\n $PoliciesDetails = '';\\n\\n if ($payment_booking[0]->supplier == 'travelanda') {\\n $getBookingDetails = $this->getBookingDetails($payment_booking[0]);\\n\\n $Gethotelresponse = HotelApiController::Gethotelresponse($payment_booking[0]->hotelid);\\n\\n $Description = '';\\n\\n if (isset($Gethotelresponse->Body->Hotels->Hotel->Description)) {\\n $Description = $Gethotelresponse->Body->Hotels->Hotel->Description;\\n }\\n\\n if (isset($getBookingDetails->Body->Bookings)) {\\n foreach ($getBookingDetails->Body->Bookings->HotelBooking as $HotelBooking) {\\n if ($payment_booking[0]->BookingReference == $HotelBooking->BookingReference) {\\n $bo = 1;\\n\\n if (isset($HotelBooking->Policies->Policy)) {\\n $PoliciesDetails .= $Description;\\n\\n $PoliciesDetails .= '
    You may cancel your reservation for no charge before this deadline. \\n\\n\\t\\t Please note that we will assess full payment of reservation if you must cancel after this deadline.
    ';\\n\\n foreach ($HotelBooking->Policies->Policy as $Policy) {\\n if ($Policy->Type == 'Percentage') {\\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay Value.'% penalty for this booking.
    ';\\n }\\n\\n if ($Policy->Type == 'Amount') {\\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay $ '.$Policy->Value.' penalty for this booking.
    ';\\n }\\n\\n if ($Policy->Type == 'Nights') {\\n $PoliciesDetails .= '
    If you will cancel the booking after '.$Policy->From.' then you should pay '.$Policy->Value.' night price penalty for this booking.
    ';\\n }\\n\\n ++$bo;\\n }\\n }\\n\\n // echo '
    ';\\n\\n                        //print_r($payment_booking);\\n\\n                        // print_r($HotelBooking);\\n\\n                        //echo '
    ';\\n\\n /*echo '
    ';\\n\\n    print_r($guest);\\n\\n    echo '
    ';*/\\n\\n //guest dateil\\n\\n $roomGuestDetails = '';\\n\\n foreach ($guest as $guestDetails) {\\n if ($guestDetails['adult'] != 0) {\\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\\n $roomGuestDetails .= '

    '.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'

    ';\\n }\\n }\\n\\n if ($guestDetails['child'] != 0) {\\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\\n $roomGuestDetails .= '

    '.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'

    ';\\n }\\n }\\n }\\n\\n $RoomName = '';\\n\\n $NumAdults = '';\\n\\n $NumChildren = '';\\n\\n $room = 0;\\n\\n foreach ($HotelBooking->Rooms->Room as $roomDetails) {\\n $RoomName = $roomDetails->RoomName;\\n\\n $NumAdults += $roomDetails->NumAdults;\\n\\n $NumChildren += $roomDetails->NumChildren;\\n\\n ++$room;\\n }\\n\\n $Servicename = $HotelBooking->HotelName;\\n\\n $Servicetype = 'Hotel';\\n\\n $MealBasis = $HotelBooking->BoardType;\\n\\n $ServiceAddress = $HotelBooking->City;\\n\\n $RoomServiceType = $RoomName;\\n\\n $NoRooms = $room;\\n\\n $Child = $NumChildren;\\n\\n $Desitination = $HotelBooking->City;\\n\\n $starCategory = '';\\n\\n $Reservationstatus = 'Confirm';\\n\\n $GuestName = $roomGuestDetails;\\n\\n $NoAdult = $NumAdults;\\n\\n $Infants = $NumChildren;\\n }\\n }\\n }\\n }\\n\\n if ($payment_booking[0]->supplier == 'tbo') {\\n $getBookingDetails = $this->tbobboking_details($payment_booking[0]->BookingReference);\\n\\n $tboHolidaysHotelDetails = HotelApiController::tboHolidaysHotelDetails($payment_booking[0]->hotelid);\\n\\n /*\\techo '
    ';\\n\\n        print_r($tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description']);\\n\\n        echo '
    ';*/\\n\\n $RoomName = '';\\n\\n if (!empty($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'])) {\\n for ($r = 0; $r < $payment_booking[0]->no_of_room; ++$r) {\\n $RoomName .= '

    '.$getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['Roomtype']['RoomDetails'][$r]['RoomName'].'

    ';\\n }\\n }\\n\\n //guest dateil\\n\\n $roomGuestDetails = '';\\n\\n $NumAdults = 0;\\n\\n $NumChildren = 0;\\n\\n foreach ($guest as $guestDetails) {\\n $NumAdults += $guestDetails['adult'];\\n\\n if ($guestDetails['adult'] != 0) {\\n for ($a = 1; $a <= $guestDetails['adult']; ++$a) {\\n $roomGuestDetails .= '

    '.$guestDetails['title'][$a].'.'.$guestDetails['firstname'][$a].' '.$guestDetails['lastname'][$a].'

    ';\\n }\\n }\\n\\n if ($guestDetails['child'] != 0) {\\n $NumChildren += $guestDetails['child'];\\n\\n for ($c = 1; $c <= $guestDetails['child']; ++$c) {\\n $roomGuestDetails .= '

    '.$guestDetails['firstname'][$c].' '.$guestDetails['lastname'][$c].'

    ';\\n }\\n }\\n }\\n\\n $PoliciesDetails .= $tboHolidaysHotelDetails['sBody']['HotelDetailsResponse']['HotelDetails']['Description'];\\n\\n $PoliciesDetails .= '
    You may cancel your reservation for no charge before this deadline. \\n\\n\\t\\t Please note that we will assess full payment of reservation if you must cancel after this deadline.
    ';\\n\\n $attr = '@attributes';\\n\\n $bo = 1;\\n\\n if (isset($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'][0])) {\\n foreach ($getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelCancelPolicies']['CancelPolicy'] as $Policy) {\\n if ($Policy[$attr]['ChargeType'] == 'Fixed') {\\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['Currency'].''.$Policy[$attr]['CancellationCharge'].' penalty for this booking
    ';\\n }\\n\\n if ($Policy[$attr]['ChargeType'] == 'Percentage') {\\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking
    ';\\n }\\n\\n if ($Policy[$attr]['ChargeType'] == 'Night') {\\n $PoliciesDetails .= '
    If you will cancel the booking '.$Policy[$attr]['FromDate'].' to '.$Policy[$attr]['ToDate'].' then you should pay '.$Policy[$attr]['CancellationCharge'].' % penalty for this booking
    ';\\n }\\n\\n ++$bo;\\n }\\n }\\n\\n $Servicename = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\\n\\n $Servicetype = 'Hotel';\\n\\n $MealBasis = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['HotelName'];\\n\\n $ServiceAddress = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['AddressLine1'];\\n\\n $RoomServiceType = $RoomName;\\n\\n $NoRooms = $payment_booking[0]->no_of_room;\\n\\n $Child = ''; //$NumChildren;\\n\\n $Desitination = $getBookingDetails['sBody']['HotelBookingDetailResponse']['BookingDetail']['City'];\\n\\n $starCategory = '';\\n\\n $Reservationstatus = 'Confirm';\\n\\n $GuestName = $roomGuestDetails;\\n\\n $NoAdult = $NumAdults;\\n\\n $Infants = $NumChildren;\\n }\\n\\n $name = '';\\n\\n $address = '';\\n\\n $city = '';\\n\\n $country = '';\\n\\n if ($payment_booking[0]->user_type == 'AgencyManger') {\\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\\n\\n /*\\techo '
    ';\\n\\n        print_r($agency);\\n\\n        echo '
    ';*/\\n\\n $name = $agency[0]->aname;\\n\\n $address = $agency[0]->address1;\\n\\n $city = $agency[0]->city;\\n\\n $country = $agency[0]->country;\\n }\\n\\n if ($payment_booking[0]->user_type == 'SubAgencyManger') {\\n $agency = DB::table('agency')->where('loginid', '=', $payment_booking[0]->login_id)->get();\\n\\n /*\\techo '
    ';\\n\\n        print_r($agency);\\n\\n        echo '
    ';*/\\n\\n $name = $agency[0]->aname;\\n\\n $address = $agency[0]->address1;\\n\\n $city = $agency[0]->city;\\n\\n $country = $agency[0]->country;\\n }\\n\\n if ($payment_booking[0]->user_type == 'UserInfo') {\\n $userinformation = DB::table('userinformation')->where('loginid', '=', $payment_booking[0]->login_id)->get();\\n\\n /*\\techo '
    ';\\n\\n        print_r($userinformation);\\n\\n        echo '
    ';*/\\n\\n $name = $userinformation[0]->name;\\n\\n $address = $userinformation[0]->email;\\n\\n $city = $userinformation[0]->phone;\\n }\\n\\n /*echo '
    ';\\n\\n        print_r($guest[0]['firstname'][1]);\\n\\n        echo '
    ';*/\\n\\n $date1 = date_create($payment_booking[0]->checkin);\\n\\n $date2 = date_create($payment_booking[0]->checkout);\\n\\n $diff = date_diff($date1, $date2);\\n\\n $daycount = $diff->days;\\n\\n $tempalte = '\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tVoucher\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t
    Please Present this voucher upon arrival
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t

    Service Voucher

    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t

    '.$name.'

    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'.$address.', '.$city.', '.$country.'.\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tBooking Information\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    Voucher NoLBVN'.$payment_booking[0]->hotelid.'
    LB REF NoLBHR'.$payment_booking[0]->hotelid.'
    Supplier Ref No'.$payment_booking[0]->id.$payment_booking[0]->hotelid.$payment_booking[0]->login_id.'
    Re-confirmation No/Msg'.$payment_booking[0]->login_id.$payment_booking[0]->hotelid.$payment_booking[0]->id.'
    Lead Name'.$guest[0]['firstname'][1].''.$guest[0]['lastname'][1].'
    Issued on'.date('d/M/Y, D', strtotime($payment_booking[0]->bookingdate)).'
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t

    Check In

    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t

    '.date('d', strtotime($payment_booking[0]->checkin)).'

    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'.date('M', strtotime($payment_booking[0]->checkin)).', '.date('Y', strtotime($payment_booking[0]->checkin)).'\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'.date('D', strtotime($payment_booking[0]->checkin)).'\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t

    Check Out

    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t

    '.date('d', strtotime($payment_booking[0]->checkout)).'

    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'.date('M', strtotime($payment_booking[0]->checkout)).', '.date('Y', strtotime($payment_booking[0]->checkout)).'\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'.date('D', strtotime($payment_booking[0]->checkout)).'\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'.$daycount.' Nights\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tAccomodation Details\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    Servicename'.$Servicename.'
    Service Type '.$Servicetype.'
    Meal Basis '.$MealBasis.'
    Service Address'.$ServiceAddress.'
    RoomService Type'.$RoomServiceType.'
    No Rooms'.$NoRooms.'
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    Child '.$Child.'
    Desitination'.$Desitination.'
    Reservation Status'.$Reservationstatus.'
    NoAdult'.$NoAdult.'
    Infants'.$Infants.'
    Guest Name'.$GuestName.'
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tImportant Notes\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t'.$PoliciesDetails.'\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t

    Hotel Map

    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t';\\n\\n $mail = $tempalte;\\n\\n $to = $payment_booking[0]->email;\\n\\n $subject = 'Booking Voucher';\\n\\n $message = $mail;\\n\\n $headers = \\\"From: B2B project\\\\r\\\\n\\\";\\n\\n $headers .= \\\"MIME-Version: 1.0\\\\r\\\\n\\\";\\n\\n $headers .= \\\"Content-Type: text/html; charset=UTF-8\\\\r\\\\n\\\";\\n\\n mail($to,$subject,$message,$headers);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"027153c383160e2e9e3efc321f79e2b2\",\n \"score\": \"0.4585479\",\n \"text\": \"function generate(Collection $collection, $code = null, $quota = null);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"323a5921b64f12f2a9dfa292ee08c266\",\n \"score\": \"0.4577593\",\n \"text\": \"private function __generateData() {\\n\\t\\t$this->__logMessage('Generating test data');\\n\\t\\t$this->__pushLogIndent();\\n\\n\\t\\t$totalMembersToGenerate = 200;\\n\\t\\t$membersRemaining = $totalMembersToGenerate;\\n\\n\\t\\t$genDetails = array();\\n\\n\\t\\t// Half the members should be current members\\n\\t\\t$genDetails[Status::CURRENT_MEMBER] = $this->__distribureMembers($membersRemaining, 2);\\n\\n\\t\\t// 1/3rd of the remaining members should be ex members\\n\\t\\t$genDetails[Status::EX_MEMBER] = $this->__distribureMembers($membersRemaining, 3);\\n\\n\\t\\t// Distribute the rest of the members evenly over the other statuses\\n\\t\\t$toAssign = (int)floor($membersRemaining / 4);\\n\\n\\t\\t$genDetails[Status::PROSPECTIVE_MEMBER] = $toAssign;\\n\\t\\t$genDetails[Status::PRE_MEMBER_1] = $toAssign;\\n\\t\\t$genDetails[Status::PRE_MEMBER_2] = $toAssign;\\n\\t\\t$genDetails[Status::PRE_MEMBER_3] = $toAssign;\\n\\n\\t\\t$membersRemaining -= ($toAssign * 4);\\n\\n\\t\\t// Any left? Make them current members\\n\\t\\t$genDetails[Status::CURRENT_MEMBER] += $membersRemaining;\\n\\n\\t\\t$this->__logMessage(\\\"Generating data for $totalMembersToGenerate members.\\\");\\n\\n\\t\\t// Generate!\\n\\t\\t$dataGenerator = new DataGenerator();\\n\\t\\tforeach ($genDetails as $status => $num) {\\n\\t\\t\\tfor ($i = 0; $i < $num; $i++) {\\n\\t\\t\\t\\t$dataGenerator->generateMember($status);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Finally generate the dev user\\n\\t\\t$details = array(\\n\\t\\t\\t'firstname' => $this->__firstname,\\n\\t\\t\\t'surname' => $this->__surname,\\n\\t\\t\\t'email' => $this->__email,\\n\\t\\t\\t'username' => $this->__username,\\n\\t\\t\\t'groups' => array(\\n\\t\\t\\t\\tGroup::CURRENT_MEMBERS, Group::FULL_ACCESS, Group::MEMBERSHIP_ADMIN,\\n\\t\\t\\t),\\n\\t\\t);\\n\\t\\t$dataGenerator->generateMember(Status::CURRENT_MEMBER, $details);\\n\\n\\t\\t// Generate some subscriptions\\n\\t\\t$memberData = $dataGenerator->getMembersData();\\n\\n\\t\\t$memberEmails = array_map(function ($data) {\\n\\t\\t\\treturn $data['email'];\\n\\t\\t}, $memberData);\\n\\n\\t\\t$emailGenerator = new emailGenerator();\\n\\t\\t$randomEmails = array();\\n\\t\\tfor ($i = 0; $i < 50; $i++) {\\n\\t\\t\\tarray_push($randomEmails, $emailGenerator->generate());\\n\\t\\t}\\n\\t\\t$allEmails = array_merge($memberEmails, $randomEmails);\\n\\n\\t\\t$mailingListDataGenerator = new MailingListDataGenerator();\\n\\t\\tforeach ($mailingListDataGenerator->getMailingListsData() as $list) {\\n\\t\\t\\t$numToAdd = rand(10, 30);\\n\\t\\t\\tfor ($i = 0; $i < $numToAdd; $i++) {\\n\\t\\t\\t\\t$timestamp = rand(strtotime('last year'), time());\\n\\t\\t\\t\\t$email = $allEmails[array_rand($allEmails)];\\n\\t\\t\\t\\t$mailingListDataGenerator->subscribeEmailToList($email, $list['id'], $timestamp);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t$this->__logMessage('Writing SQL files');\\n\\n\\t\\t$sqlData = array(\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/members_data.sql',\\n\\t\\t\\t\\t'tableName' => 'members',\\n\\t\\t\\t\\t'data' => $memberData,\\n\\t\\t\\t),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/member_group_data.sql',\\n\\t\\t\\t\\t'tableName' => 'member_group',\\n\\t\\t\\t\\t'data' => $dataGenerator->getMembersGroupData(),\\n\\t\\t\\t),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/account_data.sql',\\n\\t\\t\\t\\t'tableName' => 'account',\\n\\t\\t\\t\\t'data' => $dataGenerator->getAccountsData(),\\n\\t\\t\\t),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/pins_data.sql',\\n\\t\\t\\t\\t'tableName' => 'pins',\\n\\t\\t\\t\\t'data' => $dataGenerator->getPinsData(),\\n\\t\\t\\t),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/rfid_tags_data.sql',\\n\\t\\t\\t\\t'tableName' => 'rfid_tags',\\n\\t\\t\\t\\t'data' => $dataGenerator->getRfidTagsData(),\\n\\t\\t\\t),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/status_updates_data.sql',\\n\\t\\t\\t\\t'tableName' => 'status_updates',\\n\\t\\t\\t\\t'data' => $dataGenerator->getStatusUpdatesData(),\\n\\t\\t\\t),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/mailinglists_data.development.sql',\\n\\t\\t\\t\\t'tableName' => 'mailinglists',\\n\\t\\t\\t\\t'data' => $mailingListDataGenerator->getMailingListsData(),\\n\\t\\t\\t),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/mailinglist_subscriptions_data.development.sql',\\n\\t\\t\\t\\t'tableName' => 'mailinglist_subscriptions',\\n\\t\\t\\t\\t'data' => $mailingListDataGenerator->getMailingListSubscriptionsData(),\\n\\t\\t\\t),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'filepath' => '../Sql/hms_emails_data.development.sql',\\n\\t\\t\\t\\t'tableName' => 'hms_emails',\\n\\t\\t\\t\\t'data' => $dataGenerator->getEmailRecordData(),\\n\\t\\t\\t),\\n array(\\n 'filepath' => '../Sql/bank_transactions_data.sql',\\n 'tableName' => 'bank_transactions',\\n 'data' => $dataGenerator->getBankTransactionData(),\\n ),\\n array(\\n 'filepath' => '../Sql/access_log_data.sql',\\n 'tableName' => 'access_log',\\n 'data' => $dataGenerator->getAccessLogData(),\\n ),\\n\\t\\t);\\n\\n\\t\\t$sqlWriter = new sqlWriter();\\n\\t\\tforeach ($sqlData as $dataEntry) {\\n\\t\\t\\t$sqlString = $sqlWriter->writeInsert($dataEntry['tableName'], $dataEntry['data']);\\n\\t\\t\\t$path = $dataEntry['filepath'];\\n\\t\\t\\tif ($this->__writeToFile($path, $sqlString)) {\\n\\t\\t\\t\\t$this->__logMessage(\\\"Wrote $path\\\");\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$this->__logMessage(\\\"Failed to write $path\\\");\\n\\t\\t\\t\\t$this->__popLogIndent();\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\\n \\n // TODO: write out csv files of records we can import into the bank transactions table\\n \\n $this->__writeDataCSV($dataGenerator->getBankCSVData());\\n\\n\\t\\t$this->__popLogIndent();\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb51ec8ce7192908a2077a5cad7d76b3\",\n \"score\": \"0.457343\",\n \"text\": \"public function store(Request $request)\\n {\\n $validator = Validator::make($request->all(), [\\n 'name' => 'required|unique:giftvouchers,name,NULL,id,deleted_at,NULL',\\n 'code' => 'required',\\n 'value' => 'required',\\n 'quantity' => 'required',\\n 'valid_from' => 'required',\\n 'valid_to' => 'required',\\n \\n ])->validate();\\n\\n $count = $request->quantity;;\\n $generatedGiftVoucherCode = array();\\n $prefix = $request->code;\\n $fromDate = date('d',strtotime($request->valid_from));\\n $toDate = date('d',strtotime($request->valid_to));\\n\\n for ($i=1; $i <= $count; $i++) {\\n $generatedGiftVoucherCode[] = \\\"NSP\\\" . trim($prefix) . $fromDate . $this->generateGiftVouchers(6) . $toDate;\\n }\\n\\n $out = array_values($generatedGiftVoucherCode);\\n $myJSON = json_encode($out);\\n\\n $giftvoucher = new Giftvoucher();\\n $giftvoucher->name = $request->name;\\n $giftvoucher->code = $myJSON;\\n $giftvoucher->value = $request->value;\\n $giftvoucher->qty = $request->quantity;\\n $giftvoucher->valid_from = date('Y-m-d',strtotime($request->valid_from));\\n $giftvoucher->valid_to = date('Y-m-d',strtotime($request->valid_to));\\n $giftvoucher->remark = $request->remark;\\n $giftvoucher->created_by = 0;\\n $giftvoucher->updated_by = 0;\\n $result = $giftvoucher->save();\\n\\n if ($result == true) {\\n return Redirect::back()->with('success', 'Successfully created');\\n } else {\\n return Redirect::back()->with('failure', 'Something Went Wrong..!');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bef1ed778c1e02dc62eb52aabc56ec76\",\n \"score\": \"0.45559847\",\n \"text\": \"public function getOwnOffers(){\\n require('dbconnect.php');\\n mysqli_select_db($connection, 'db_sharey');\\n \\n $query = \\\"SELECT o.*, p.pz_plz, p.pz_location, p.pz_plzID, t.tg_description AS tagDescription, t.tg_color AS tagColor, t.tg_tagID AS tagID \\n FROM tbl_offer AS o \\n JOIN tbl_tag AS t \\n ON o.or_tagID = t.tg_tagID \\n JOIN tbl_plz AS p \\n ON o.or_plzID = p.pz_plzID \\n WHERE o.or_ocID = \\\".$this->getUserID().\\\" AND o.or_active = true\\n ORDER BY o.or_creationDate DESC;\\\";\\n\\n $res = mysqli_query($connection, $query);\\n\\n $offers = [];\\n \\n while(($data = mysqli_fetch_array($res)) != false){\\n $offers[] = new Offer($data['or_active'], new DateTime($data['or_creationDate']), utf8_encode($data['or_description']), new DateTime($data['or_mhd']), $data['or_offerID'], $data['or_picture'], new PLZ(utf8_encode($data['pz_location']), $data['pz_plz'], $data['pz_plzID']), $data['or_report'], new Tag($data['tagColor'], utf8_encode($data['tagDescription']), $data['tagID']), utf8_encode($data['or_title']), $data['or_ocID']);\\n }\\n\\n return $offers;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6730ca59ff15b5099ec57f9474996749\",\n \"score\": \"0.45557582\",\n \"text\": \"public function makeJSONforBooking(Request $request)\\n {\\n $dateStart=$request->dateStart;\\n $dateEnd=$request->dateEnd;\\n\\n $diff = strtotime($dateEnd) - strtotime($dateStart);\\n $json=[];\\n\\n if($diff>0)\\n {\\n $cars=$this->aveilibleCars($dateStart,$dateEnd);\\n $models=array_keys($cars);\\n $readyModels=[];\\n $cene=[];\\n\\n foreach($models as $model)\\n {\\n $readyModels[$model]=TipoviAutomobilaModel::where('Model',$model)->first();\\n $cene[$model]=$this->totalCost($model,$dateStart,$dateEnd);\\n }\\n\\n \\n // $json['cars']=$cars;\\n $json['unique_models']=$models;\\n $json['cene']=$cene;\\n $json['podaci']=$readyModels;\\n }\\n else\\n {\\n $json['unique_models']=[];\\n $json['cene']=[];\\n $json['podaci']=[];\\n }\\n\\n $paket=json_encode($json);\\n \\n return $paket;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9f9022bda0d8043b770c2293b8b2f94\",\n \"score\": \"0.45538932\",\n \"text\": \"function volunteers()\\n\\t{\\n\\t\\t$userInfo = $_SESSION['user'];\\n\\t\\tif(!isset($userInfo))\\n\\t\\t\\tredirect('/hcdec/index');\\n\\t\\tif(!in_array('manage_volunteers', $userInfo['roles']))\\n\\t\\t\\tredirect('/hcdec/myhcdec');\\n\\t\\t\\t# list the volunteers as rows in HTML table. parameters for\\n\\t\\t# this request: $startDate, $endDate. if startDate is not\\n\\t\\t# given, all volunteer requests are listed up thru endDate.\\n\\t\\t# if endDate is not given, all volunteer requests are listed\\n\\t\\t# period in one giant scrolling div. add format = html or csv\\n\\t\\t# so we know which view to load\\n\\n\\t\\t$arr = $this->uri->uri_to_assoc(3);\\n\\t\\t\\n\\t\\t$criteria = array();\\n\\t\\t$startDate = \\\"\\\";\\n\\t\\tif(isset($arr['startDate']))\\n\\t\\t{\\n\\t\\t\\t$criteria['startDate'] = $arr['startDate'];\\n\\t\\t\\t$startDate = $arr['startDate'];\\n\\t\\t}\\n\\t\\t\\t\\n\\t\\t$endDate = \\\"\\\";\\n\\t\\tif(isset($arr['endDate']))\\n\\t\\t{\\n\\t\\t\\t$criteria['endDate'] = $arr['endDate'];\\n\\t\\t\\t$endDate = $arr['endDate'];\\n\\t\\t}\\n\\t\\t\\n\\t\\t$precinct = \\\"\\\";\\n\\t\\tif(isset($arr['precinct']))\\n\\t\\t{\\n\\t\\t\\t$criteria['precinct'] = $arr['precinct'];\\n\\t\\t\\t$precinct = $arr['precinct'];\\n\\t\\t}\\n\\t\\t\\t\\n\\t\\t# now look up volunteers\\n\\t\\t$this->load->model('volunteers');\\n\\t\\t#FIXME - change this to use start and end dates and precinct numbers\\n\\t\\t$r = $this->volunteers->getVolunteersForCriteria($criteria);\\n\\t\\tif($r['status'] == 'OK')\\n\\t\\t{\\n\\t\\t\\tif(count($r['rows'])>0)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$params['volunteers'] = $r['rows'];\\n\\t\\t\\t\\t$params['startDate'] = $startDate;\\n\\t\\t\\t\\t$params['endDate'] = $endDate;\\n\\t\\t\\t\\t$params['precinct'] = $precinct;\\n\\t\\t\\t\\t$content = $this->load->view('hcdec_volunteers', $params, true);\\n\\t\\t\\t\\t$p = array('user'=>$userInfo, 'content'=>$content);\\n\\t\\t\\t\\t$this->load->view('public_template', $p);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t# redirect to page that says 'no volunteers found in that range'\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t# error page\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99786d56b343a9b3e3ea5e40686d53f1\",\n \"score\": \"0.45453182\",\n \"text\": \"public function index()\\n {\\n if (\\\\request('year')){\\n\\n $date = Verta::parse(\\\\request('year'));\\n $from = $date->formatGregorian('Y-m-d');//getGregorian($date->year, $date->month, $date->day);\\n\\n\\n $date2 = $date->addDays(365);\\n $to = $date2->formatGregorian('Y-m-d');\\n\\n\\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->paginate(\\\\request('size') ? \\\\request('size') : 30));\\n\\n }\\n\\n if (\\\\request('lastName')){\\n\\n $lastName = \\\\request('lastName');\\n\\n $date = verta(Carbon::now()->format('Y-m-d'));\\n $date->month(1);\\n $date->day(1);\\n $from = $date->formatGregorian('Y-m-d');\\n\\n $date2 = $date->addDays(365);\\n $to = $date2->formatGregorian('Y-m-d');\\n\\n\\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->where('lastName' ,'LIKE', '%' . $lastName . '%')->paginate(\\\\request('size') ? \\\\request('size') : 30));\\n\\n }\\n\\n else\\n {\\n $date = verta(Carbon::now()->format('Y-m-d'));\\n $date->month(1);\\n $date->day(1);\\n $from = $date->formatGregorian('Y-m-d');\\n\\n $date2 = $date->addDays(365);\\n $to = $date2->formatGregorian('Y-m-d');\\n\\n\\n return new CustomerResourceCollection(Customer::whereBetween('created_at', [$from, $to])->paginate(\\\\request('size') ? \\\\request('size'):30));\\n\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c8bc4eee5d1be97141dc54349031387\",\n \"score\": \"0.45416793\",\n \"text\": \"public function generateContract(){\\n $users = DB::table('users')->get();\\n $properties= DB::table('immovableproperty')->get();\\n return view('auth.generateContract')->with('users',$users)->with('properties',$properties);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56d496c921d7f48df2b9d8224481e8b0\",\n \"score\": \"0.45380506\",\n \"text\": \"protected function createVertices()\\n {\\n foreach ($this->items as $itemId => $itemData) {\\n $vertex = $this->graph->createVertex($itemId);\\n $vertex->setAttribute('data', $itemData);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c2e8a3f416bb7e666e46ed3d31e1c31\",\n \"score\": \"0.45315677\",\n \"text\": \"public function create(Request $request)\\n {\\n $clinics = $this->clinicProfileRepository->all();\\n return view('pemedic::admin.vouchers.create',compact('clinics','request'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0f7345bc7675e223331f837dda3b2a5\",\n \"score\": \"0.4531281\",\n \"text\": \"public function booking ()\\n {\\n $clients = $this->Client->find('all', array ('fields' => array ('Client.id', 'Client.name')));\\n $this->set(array('clients'),array($clients));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10dcf4a14027142fc33a8f1a2f872ac4\",\n \"score\": \"0.45308638\",\n \"text\": \"public function productLicenses(Varien_Event_Observer $observer)\\n {\\n $event = $observer->getEvent();\\n $order = $event->getInvoice()->getOrder();\\n $invoice = $observer->getEvent()->getInvoice();\\n switch ($invoice->getState()) {\\n \\tcase Mage_Sales_Model_Order_Invoice::STATE_PAID :\\n \\t $customerId = $invoice->getCustomerId();\\n \\t $orderId = $order->getIncrementId();\\n \\t $storeId = $invoice->getStoreId();\\n \\t $items = $invoice->getAllItems();\\n \\t $model = Mage::getModel('pyro_licenses/licenses');\\n \\t $emailData = array();\\n \\t \\n \\t foreach ($items as $item) {\\n $product = Mage::getResourceModel('catalog/product')->getAttributeRawValue($item->getProductId(), 'license', $storeId);\\n if (!$product) {\\n continue; \\n }\\n \\n $qty = (int) $item->getQty();\\n $productId = $item->getProductId();\\n $collection = $model->getCollection()->getAvailableLicenses();\\n $collection->getSelect()->limit($qty);\\n \\n $emailData[$productId] = array(\\n \\t 'product' => $item,\\n );\\n \\n foreach ($collection as $item) {\\n $qty--;\\n $item->setStatus(Pyro_Licenses_Model_Licenses::STATUS_ENABLED);\\n $item->setCustomerId($customerId);\\n $item->setProductId($productId);\\n $item->setOrderId($orderId);\\n $item->save();\\n\\n $emailData[$productId]['licenses'][] = $item->getLicenseKey();\\n }\\n \\n // If there are no licenses in database generate for the remaining quantity \\n if ($qty > 0) {\\n for($i = 1; $i <= $qty; $i++) {\\n $item = Mage::getModel('pyro_licenses/licenses');\\n $licenseKey = Mage::helper('pyro_licenses/generate')->license();\\n $item->setStatus(Pyro_Licenses_Model_Licenses::STATUS_ENABLED);\\n $item->setCustomerId($customerId);\\n $item->setProductId($productId);\\n $item->setOrderId($orderId);\\n $item->setLicenseKey($licenseKey);\\n $item->save();\\n $emailData[$productId]['licenses'][] = $licenseKey;\\n }\\n } \\n \\t }\\n\\n \\t if(count($emailData)) {\\n \\t $this->sendLicensesMail($order, $emailData);\\n \\t }\\n \\t break;\\n }\\n \\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f159d527a90fc5f638c60e8edb8e298f\",\n \"score\": \"0.45285237\",\n \"text\": \"function get_cdrs_retail_customer($icustomer, $from_date, $to_date, $iteracion, $cantidad) {\\n try { \\n if ($iteracion==1) {\\n $cdrs_list_info = new SoapClient($this->wsdl_url_customer);\\n $cdrs_list_info->__setSoapHeaders($this->auth_info);\\n $this->cdrs_list_info = $cdrs_list_info;\\n }\\n \\n // Se extraen como maximo los primeros 3000 CDRS por factura (para un cliente y un rango de fechas), \\n // dado que al intentar sacar mas se obtiene error del SOAP\\n $GetCustomerXDRsRequest_info = array('offset' => ($cantidad==0 ? 0 : (3000*$cantidad)), \\n 'limit' => 3000, \\n 'from_date' => $from_date . ' 00:00:00', 'to_date' => $to_date . ' 23:59:59',\\n 'i_customer' => $icustomer);\\n \\n if ($GetCustomerXDRsRequest_info) {\\n \\n if ($iteracion==1) {\\n $cdrs_list_response = $cdrs_list_info->get_customer_xdrs($GetCustomerXDRsRequest_info);\\n } else {\\n $cdrs_list_response = $this->cdrs_list_info->get_customer_xdrs($GetCustomerXDRsRequest_info);\\n }\\n\\n if($cdrs_list_response){\\n $this->xdr_list = $cdrs_list_response->xdr_list;\\n return $resp = true; \\n }else{\\n \\t$this->xdr_list = \\\"\\\";\\n return $resp = false;\\n }\\n }else{\\n return $resp = false;\\n }\\n } catch (SoapFault $exception) { } \\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":721,"cells":{"query_id":{"kind":"string","value":"c536d2a82ffe6fcdc0049f91208cd188"},"query":{"kind":"string","value":"Gets the instance of the View"},"positive_passages":{"kind":"list like","value":[{"docid":"4745e282952c35d8df19a7b0e2e2c3b7","score":"0.0","text":"public static function getInstance(){\n if( self::$instance === null ){\n self::$instance = new self();\n }\n return self::$instance;\n }","title":""}],"string":"[\n {\n \"docid\": \"4745e282952c35d8df19a7b0e2e2c3b7\",\n \"score\": \"0.0\",\n \"text\": \"public static function getInstance(){\\n if( self::$instance === null ){\\n self::$instance = new self();\\n }\\n return self::$instance;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"bb5dea0ff81a828fe32385dfa5878532","score":"0.8054523","text":"protected function _view()\n {\n if (!$this->_view) {\n $this->_view = \\Core\\View::getInstance();\n }\n return $this->_view;\n }","title":""},{"docid":"fbd89f00eb5efadb2c0d86ad3bb354cf","score":"0.7703845","text":"public function get_view()\n {\n return $this->viewObject;\n }","title":""},{"docid":"9f5fa9ff451975361c98e6d9d190f91c","score":"0.74205935","text":"public function getView() {\n return $this->_view;\n }","title":""},{"docid":"0506d377e89717fac1cf759fb17cc6ab","score":"0.7410825","text":"public function getView()\n\t{\n\t\treturn $this->_view;\n\t}","title":""},{"docid":"d33478676a508223afe87b2d331a537f","score":"0.7409056","text":"function getView()\n\t{\n\t\treturn $this->view;\n\t}","title":""},{"docid":"d33478676a508223afe87b2d331a537f","score":"0.7409056","text":"function getView()\n\t{\n\t\treturn $this->view;\n\t}","title":""},{"docid":"9e902b69bd9d0fc70d715d095077b43f","score":"0.736638","text":"public function getView()\n {\n if ($this->_view === null) {\n $this->setView(self::getDefaultView());\n }\n\n return $this->_view;\n }","title":""},{"docid":"a49bf11ff5d291eba44a988c924ee553","score":"0.7335811","text":"public function getView()\n\t\t{\n\t\t\treturn $this->view;\n\t\t}","title":""},{"docid":"519d14f016149c629d28a468a480ff86","score":"0.73338956","text":"private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}","title":""},{"docid":"1c3f9b916f9284530b43607cc2758fce","score":"0.732308","text":"public function getView()\n {\n return $this->view;\n }","title":""},{"docid":"78f49a455e5abedcb8aed3565645bdb4","score":"0.7303139","text":"public function getView()\r\n {\r\n return parent::getView();\r\n }","title":""},{"docid":"78f49a455e5abedcb8aed3565645bdb4","score":"0.7303139","text":"public function getView()\r\n {\r\n return parent::getView();\r\n }","title":""},{"docid":"5d4d17bace5ec84ce3fec5215f354685","score":"0.7292293","text":"protected function View() {\n return $this->view;\n }","title":""},{"docid":"bd48a571c827118db0ab14dac4415730","score":"0.7283091","text":"public function getView() {\n return $this->view;\n }","title":""},{"docid":"3146a9a8d15396390160913dfb1ffb61","score":"0.7282899","text":"protected function getView() {\n return $this->_View; // cake 2.0\n }","title":""},{"docid":"43acf694d614c6dbb66f36a18c65fc10","score":"0.7280747","text":"public function getView() {\r\n\t\treturn $this->oView;\r\n\t}","title":""},{"docid":"19f982ca42f62383da44a9422ae3ffb4","score":"0.72737586","text":"public function getView()\n {\n return $this->view;\n }","title":""},{"docid":"19f982ca42f62383da44a9422ae3ffb4","score":"0.72737586","text":"public function getView()\n {\n return $this->view;\n }","title":""},{"docid":"19f982ca42f62383da44a9422ae3ffb4","score":"0.72737586","text":"public function getView()\n {\n return $this->view;\n }","title":""},{"docid":"19f982ca42f62383da44a9422ae3ffb4","score":"0.72737586","text":"public function getView()\n {\n return $this->view;\n }","title":""},{"docid":"19f982ca42f62383da44a9422ae3ffb4","score":"0.72737586","text":"public function getView()\n {\n return $this->view;\n }","title":""},{"docid":"19f982ca42f62383da44a9422ae3ffb4","score":"0.72737586","text":"public function getView()\n {\n return $this->view;\n }","title":""},{"docid":"19f982ca42f62383da44a9422ae3ffb4","score":"0.72737586","text":"public function getView()\n {\n return $this->view;\n }","title":""},{"docid":"e75b2297246bc50f4bc4495fff01353a","score":"0.72227794","text":"public function getView() {}","title":""},{"docid":"e5d849980fb1aade5ba3e40dce1ce414","score":"0.72033817","text":"public function getView() {\n\t\treturn $this->getController()->view;\n\t}","title":""},{"docid":"9dd9b5e377b35d34bdf5066e7ac58bb9","score":"0.7173682","text":"public function getView() {\n if (null === $this->view) {\n require_once 'Zend/Controller/Action/HelperBroker.php';\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $this->setView(clone($viewRenderer->view));\n }\n\n return $this->view;\n }","title":""},{"docid":"63669b927c3a281d011194547b988977","score":"0.7105985","text":"public function getView() {\n\t\tif (null === $this->_view) {\n\t\t\trequire_once 'Zend/Controller/Action/HelperBroker.php';\n\t\t\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'viewRenderer' );\n\t\t\t$this->setView ( $viewRenderer->view );\n\t\t}\n\t\treturn $this->_view;\n\t}","title":""},{"docid":"7452264c3c38ab7a52591352dcf901e3","score":"0.69906354","text":"public function getView() {\n return $this->view['object'];\n }","title":""},{"docid":"7a8012ee2cc5a556b54b79bcc8fa08e5","score":"0.6960877","text":"public function getView()\n\t{\n\t\tif (null === $this->_view) {\n\t\t\trequire_once 'Zend/Controller/Action/HelperBroker.php';\n\t\t\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n\t\t\t$this->setView($viewRenderer->view);\n\t\t}\n\n\t\treturn $this->_view;\n\t}","title":""},{"docid":"3143925c06b13aa4d08d0177db9f3be5","score":"0.687225","text":"public function view()\n {\n return $this->view;\n }","title":""},{"docid":"3143925c06b13aa4d08d0177db9f3be5","score":"0.687225","text":"public function view()\n {\n return $this->view;\n }","title":""},{"docid":"40e089036d124c201919d5492e0addef","score":"0.68645835","text":"public function getView();","title":""},{"docid":"40e089036d124c201919d5492e0addef","score":"0.68645835","text":"public function getView();","title":""},{"docid":"cdff618f2b9e3e55cd455386f1f71823","score":"0.68439883","text":"public function getView ();","title":""},{"docid":"ee916e56fe89a7b4d726bfc682e089a4","score":"0.6816027","text":"public function get_view() {\n if (!isset($this->view)) {\n return false;\n }\n return $this->view;\n }","title":""},{"docid":"2bf48425882c1fa74aa628142e2a9d91","score":"0.6811174","text":"public function getMainView() {}","title":""},{"docid":"8bf43bf6ad7b2c0ecc3e8ecdda78e19b","score":"0.67661375","text":"function getView();","title":""},{"docid":"179ef66c3eac5b7da5cb6f170ae206dc","score":"0.6732854","text":"public function getView()\n {\n // TODO: Implement getView() method.\n }","title":""},{"docid":"6a6e3d6b36be75af1b23bf7941358d29","score":"0.6710661","text":"public function getView()\n\t{\n\t\tif (null === $this->_view) {\n\t\t\t$this->_view = Zend_Layout::getMvcInstance()->getView();\n\t\t}\n\t\treturn $this->_view;\n\t}","title":""},{"docid":"c04439c86f757c3b1528e2cbc41908e6","score":"0.6648896","text":"protected static function getView()\n {\n return null;\n }","title":""},{"docid":"6578ac5a30a632900edc50e0e03a6f6b","score":"0.6644731","text":"function __construct() \n {\n $this->view = new View(); \n }","title":""},{"docid":"3c32d4f0af41e5d5bac5436ed9e8c01b","score":"0.66267097","text":"public function __construct(){\n $this->view = new View();\n }","title":""},{"docid":"85dbb6f69ad627f5b16eca9931cbb669","score":"0.66258335","text":"protected function view()\n {\n if (!$this->view) {\n $this->view = debug_backtrace();\n $this->view = basename($this->view[2]['file'], '.php');\n }\n return $this;\n }","title":""},{"docid":"f6a60b9b73a3a5a540db4d1ed9a5903f","score":"0.661566","text":"public function getView()\n {\n return $this->app->getView();\n }","title":""},{"docid":"705f3a1ca83b56eefacfb7d006074b37","score":"0.65716636","text":"abstract public function getView();","title":""},{"docid":"705f3a1ca83b56eefacfb7d006074b37","score":"0.65716636","text":"abstract public function getView();","title":""},{"docid":"3a9954f4f773179544cda45ac3e0eac5","score":"0.6521006","text":"public function __construct()\n {\n $this->view = new View();\n }","title":""},{"docid":"23c25a027c85ee97f1edaf259d63a793","score":"0.6468614","text":"protected function getView($page) {\n\t\trequire_once('View.php');\n\t\treturn new View($page);\n\t}","title":""},{"docid":"7f3a9691a4be86b79a9b1b3bbb843bdf","score":"0.6444031","text":"public function toView() {\n $this->_initViewResponse();\n $this->_initViewLayout();\n\n return $this->_view;\n }","title":""},{"docid":"b6695b7c2ee146d2bc081946ec443464","score":"0.6433773","text":"public function getView()\n {\n if (is_null($this->_view)) {\n $controller = $this->_routeInfo->controllerName;\n $name = $this->_routeInfo->action;\n $ext = $this->_routeInfo->getExtension();\n $template = \"{$controller}/{$name}.{$ext}.twig\";\n if (!is_null($this->_controller->view)) {\n $template = \"{$this->_controller->view}.{$ext}.twig\";\n }\n $this->_view = new View(['file' => $template]);\n }\n return $this->_view;\n }","title":""},{"docid":"2a9d6a9d820cf8648ed9eca842b3d85a","score":"0.6343339","text":"public function getView(): ?Factory;","title":""},{"docid":"3f5b22648eb0403c2921d31cf3a02d43","score":"0.63312644","text":"public function getView()\n\t{\n\t\treturn $this->client->getView();\n\t}","title":""},{"docid":"3b5c83bfaae12ed928f527bfbad267cf","score":"0.63256276","text":"public function __construct() {\n\t\t$this->_view = new View (new Request);\n\t}","title":""},{"docid":"ef88c1c0cad422626561abf48fa5a253","score":"0.63253736","text":"public static function getContainer()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getContainer();\n }","title":""},{"docid":"da7dd0ea0e6a8b0caf260feeba03ebf6","score":"0.63183796","text":"public function __construct() {\n\t\t$this->view = new view ( $this );\n\t}","title":""},{"docid":"aee8d9b34b36c1ae97b9124ee6008f2c","score":"0.6300965","text":"public function __construct()\r\n\t\t{\r\n\t\t\t$this->view = new View();\r\n\t\t}","title":""},{"docid":"6dc6ffbd2a313238940b7de0e81f6644","score":"0.6253772","text":"public function view()\n {\n return $this->di()->getViewRenderer();\n }","title":""},{"docid":"7980113e8d481552285c7a8a76b1db4c","score":"0.6232145","text":"protected function getView()\n {\n $view = new StandaloneView($this->controllerContext->getRequest());\n if (is_file($this->settings['viewHelpers']['templates'][get_class($this)])) {\n $view->setPartialRootPath($this->settings['viewHelpers']['partialRootPath']);\n $view->setTemplatePathAndFilename($this->settings['viewHelpers']['templates'][get_class($this)]);\n }\n return $view;\n }","title":""},{"docid":"bffc575dc68f6af68c3c211794d64717","score":"0.62243724","text":"public function instance() {\n\t\n\t\treturn $this;\n\t\n\t}","title":""},{"docid":"bb3727c934bc8b0aeb74fbcd4d768dca","score":"0.6203977","text":"private function generateViewObject() {\r\n if ($this->viewLoaded) {\r\n $this->view = new View($this);\r\n // create a global instance\r\n View::$instance = $this->view;\r\n // Check static permission\r\n if ($this->isStatic && !$this->view->__staticLoadAllowed) {\r\n $this->fatal('Error: Loading this page statically is denied.');\r\n }\r\n // Set the template: important\r\n $this->view->template = $this->template;\r\n // Pass data set from controller\r\n if (!empty($this->cData)) {\r\n foreach ($this->cData as $varName => $varValue) {\r\n $this->view->$varName = $varValue;\r\n }\r\n }\r\n } else {\r\n // Check if controller loaded\r\n if (!$this->controllerLoaded) {\r\n // Invalid request. report 404\r\n $this->fatal('Error 404 Page not found!');\r\n }\r\n// $this->debug(\"View Not Loaded\");\r\n }\r\n }","title":""},{"docid":"5ba1a4a1576d73eb69a0cb1dbb638a41","score":"0.61991656","text":"public function create()\n {\n return $this->view();\n }","title":""},{"docid":"468cb75db419e04ef9efd71dfd5ebee2","score":"0.61809087","text":"protected function getView():DomainView {\n if (!isset($this->relatedView)) {\n $this->relatedView = $this->relatedFactory->getView();\n }\n\n return $this->relatedView;\n }","title":""},{"docid":"eace182e9db86a7c86b942b501bb7258","score":"0.6174277","text":"public function getFormView() \n {\n return $this->getForm()->createView();\n }","title":""},{"docid":"e1d4aaea7c9a20be693a25a1272ed91f","score":"0.6174222","text":"protected function getView($view)\n\t{\n\t\treturn View::make($view, $this->viewBag);\n\t}","title":""},{"docid":"4f754e934d45721eb532f7662d3c911f","score":"0.6171902","text":"public function set_view($view)\n {\n return $this;\n }","title":""},{"docid":"31f503b03b4d48d4cbf1c4e01d2b385d","score":"0.6117485","text":"protected function getView()\n {\n $this->runtime_data->render = $this->view_instance->getView($this->token);\n\n if ($this->runtime_data->render->extension->title === $this->token->name) {\n } else {\n $this->token->name = $this->runtime_data->render->extension->title;\n }\n\n return $this;\n }","title":""},{"docid":"eba5b91340156a8c743cae7158ae2a25","score":"0.61069983","text":"function view($view)\n {\n $this->view=$view;\n return $this;\n }","title":""},{"docid":"c422907caead51de0518d9c3d726d8c2","score":"0.60916716","text":"function view() {\n return app()->view;\n }","title":""},{"docid":"97e80a1e4eaded6a0e3b4be4a225b654","score":"0.60743725","text":"public function getView(){\n\t\treturn $this->getActionMapping()->getView();\n\t}","title":""},{"docid":"b47feb43b462361562d06390c796bbd3","score":"0.60576093","text":"public function create()\n {\n return view();\n }","title":""},{"docid":"b47feb43b462361562d06390c796bbd3","score":"0.60576093","text":"public function create()\n {\n return view();\n }","title":""},{"docid":"3b0f0fb92715eb1e5eed5b9e7a70feb9","score":"0.60313094","text":"public function getInstance()\n {\n return $this->model;\n }","title":""},{"docid":"840252dabc9e35a7d768ecf7f51254be","score":"0.6030913","text":"protected function resolveView()\n {\n $viewObjectName = self::JSON_VIEW;\n $view = $this->objectManager->get($viewObjectName);\n return $view;\n }","title":""},{"docid":"6f5852a5598cd38581623afa9889392d","score":"0.60291785","text":"function views(): Views\n {\n return new Views;\n }","title":""},{"docid":"f0226c87f54fe60d5ff27d05ec83f87f","score":"0.60218847","text":"public static function getShared()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getShared();\n }","title":""},{"docid":"f4c2114abf23f6f8893e35590b9b6126","score":"0.5982899","text":"public function instance()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$editor = App::get('editor');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$editor = \\Hubzero\\Html\\Editor::getInstance('none');\n\t\t}\n\n\t\treturn $editor;\n\t}","title":""},{"docid":"604d0e4e1a61c069f8c7dcc391542277","score":"0.5959043","text":"public function get()\n\t{\n\t\t// -----------------------------------------------------\n\t\t// Set the name of the last rendered view.\n\t\t// -----------------------------------------------------\n\t\tstatic::$last = $this->view;\n\n\t\t// -----------------------------------------------------\n\t\t// Get the content of all of the sub-views.\n\t\t// -----------------------------------------------------\n\t\tforeach ($this->data as &$data)\n\t\t{\n\t\t\tif ($data instanceof View or $data instanceof Response)\n\t\t\t{\n\t\t\t\t$data = (string) $data;\n\t\t\t}\n\t\t}\n\n\t\t// -----------------------------------------------------\n\t\t// Extract the view data into the local scope.\n\t\t// -----------------------------------------------------\n\t\textract($this->data, EXTR_SKIP);\n\n\t\t// -----------------------------------------------------\n\t\t// Start an output buffer to catch the content.\n\t\t// -----------------------------------------------------\n\t\tob_start();\n\n\t\t// -----------------------------------------------------\n\t\t// Echo the content of the view.\n\t\t// -----------------------------------------------------\n\t\techo eval('?>'.$this->content);\n\n\t\t// -----------------------------------------------------\n\t\t// Get the contents of the output buffer.\n\t\t// -----------------------------------------------------\n\t\treturn ob_get_clean();\n\t}","title":""},{"docid":"823be81f46582e46d7f3242703cc1537","score":"0.5945081","text":"function asView() {\n $unique = spl_object_hash($this);\n $classname = \"QueryView{$unique}\";\n $class = << true,\n );\n static \\$queryset;\n\n static function getQuery(\\$compiler) {\n return ' ('.static::\\$queryset->getQuery().') ';\n }\n\n static function getSqlAddParams(\\$compiler) {\n return static::\\$queryset->toSql(\\$compiler, self::\\$queryset->model);\n }\n}\nEOF;\n eval($class); // Ugh\n $classname::$queryset = $this;\n return $classname;\n }","title":""},{"docid":"bd43f81adeff70f9505ebfdaf7f5614e","score":"0.5940266","text":"public function view()\n\t{\n\t\treturn View::make('request.request');\n\n }","title":""},{"docid":"c1694a4dd5f0593eb143d564c39e0638","score":"0.5938605","text":"public function create()\n {\n return view($this->_config['view']);\n }","title":""},{"docid":"5d59cec6a1eede654aadb47fadf46117","score":"0.59267294","text":"public static function instance(): WorkoutLogView {\n if (self::$instance === null) {\n self::$instance = new static();\n }\n return self::$instance;\n }","title":""},{"docid":"0f1e41722bf80238f5e276e12c0f8586","score":"0.5924794","text":"function dbGetView($viewClassname)\n {\n $view = new $viewClassname();\n if (!($view instanceof View)) {\n throw new Exception('Invalid view implementation by class: ' . $viewClassname);\n }\n $view->setDb($this);\n \n return $view;\n }","title":""},{"docid":"6822e35e8a07f1aceca81256425210c5","score":"0.59236676","text":"public function getView($name)\n\t{\n\t\treturn $this->getClass('App\\\\Views\\\\' . ucfirst($name) . 'View');\n\t}","title":""},{"docid":"1bf5935164ba3782194be1c3e17aefc4","score":"0.5912308","text":"public function superView(){\n\t\treturn $this->app->superApp()->view;\n\t}","title":""},{"docid":"1f002c11d5f420a27d760f64407dcce3","score":"0.5903931","text":"public function view($view = NULL)\n {\n if ($view === NULL)\n {\n // Act as a getter\n return $this->view;\n }\n\n // Act as a setter\n $this->view = $view;\n\n return $this;\n }","title":""},{"docid":"ba64eb656a1f68c487c0bcfa2744ff21","score":"0.58948493","text":"public function getViewClass(): string;","title":""},{"docid":"196fa38b5d7b3d8ab5aeee34d5ce7c6f","score":"0.5890229","text":"public function cloneView()\n {\r\n \tif (!$this->_clone) {\r\n \t\t\r\n \t\treturn $this->view;\r\n \t}\r\n \t\n $view = clone $this->view;\n $view->clearVars();\n return $view;\n }","title":""},{"docid":"0f26a34ef6fb26390d6bfcc898eea123","score":"0.58639884","text":"public function __invoke()\n {\n return view('app');\n }","title":""},{"docid":"8d62b928fe7b6a3793f1f2c39daea48d","score":"0.5837526","text":"public function getView()\n {\n // Create the view\n $view = parent::getView();\n\n // Find out the value and force it to be true or false\n $value = $this->get('value', false) ? true : false;\n\n // we want to add the checked attribute if we can\n if ($value) {\n $attr = $this->get('attributes', array());\n $attr['checked'] = 'checked';\n $view->set('attributes', $attr);\n }\n\n // Always set the value in the checkbox control to 1\n $view->set('value', 1);\n\n // return it\n return $view;\n }","title":""},{"docid":"a654911b5f2ceaed0fe3e4c51f3b5ba8","score":"0.5836071","text":"public function getResponseView()\n {\n return $this->response_view;\n }","title":""},{"docid":"4eaf9e4e465e060cf060319bb8527063","score":"0.58236575","text":"protected function _initView() {\n $view = new Zend_View();\n $view->doctype('XHTML1_STRICT');\n\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\n $viewRenderer->setView($view);\n\n return $view;\n }","title":""},{"docid":"a687ae8e8294fc6e4a570c2612444389","score":"0.58047444","text":"public function getInstance()\n {\n return $this;\n }","title":""},{"docid":"c85a573e54c149fd73edfd053489fece","score":"0.5798673","text":"public static function make( $view = null, Context $context = null ) {\n\t\t$manager = tribe( Manager::class );\n\n\t\t$default_view = $manager->get_default_view();\n\t\tif (\n\t\t\tnull === $view\n\t\t\t|| 'default' === $view\n\t\t) {\n\t\t\t$view = $default_view;\n\t\t}\n\n\t\tlist( $view_slug, $view_class ) = $manager->get_view( $view );\n\n\t\t// When not found use the default view.\n\t\tif ( ! $view_class ) {\n\t\t\tlist( $view_slug, $view_class ) = $manager->get_view( $default_view );\n\t\t}\n\n\t\t// Make sure we are using Reflector when it fails\n\t\tif ( ! class_exists( $view_class ) ) {\n\t\t\tlist( $view_slug, $view_class ) = $manager->get_view( 'reflector' );\n\t\t}\n\n\t\tif ( ! self::$container instanceof Container ) {\n\t\t\t$message = 'The ' . __CLASS__ . '::$container property is not set: was the class initialized by the service provider?';\n\t\t\tthrow new \\RuntimeException( $message );\n\t\t}\n\n\t\t/**\n\t\t * Run an action before we start making a new View instance.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param string $view_class The current view class.\n\t\t * @param string $view_slug The current view slug.\n\t\t */\n\t\tdo_action( 'tribe_events_views_v2_before_make_view', $view_class, $view_slug );\n\n\t\t/** @var View_Interface $instance */\n\t\t$instance = self::$container->make( $view_class );\n\n\t\t$template = new Template( $instance );\n\n\t\t/**\n\t\t * Filters the Template object for a View.\n\t\t *\n\t\t * @since 4.9.3\n\t\t *\n\t\t * @param Template $template The template object for the View.\n\t\t * @param string $view_slug The current view slug.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$template = apply_filters( 'tribe_events_views_v2_view_template', $template, $view_slug, $instance );\n\n\t\t/**\n\t\t * Filters the Template object for a specific View.\n\t\t *\n\t\t * @since 4.9.3\n\t\t *\n\t\t * @param Template $template The template object for the View.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$template = apply_filters( \"tribe_events_views_v2_{$view_slug}_view_template\", $template, $instance );\n\n\t\t$instance->set_template( $template );\n\t\t$instance->set_slug( $view_slug );\n\t\t$instance->set_template_slug( $view_slug );\n\n\t\t// Let's set the View context from either the global context or the provided one.\n\t\t$view_context = null === $context ? tribe_context() : $context;\n\n\t\t/**\n\t\t * Filters the Context object for a View.\n\t\t *\n\t\t * @since 4.9.3\n\t\t *\n\t\t * @param Context $view_context The context abstraction object that will be passed to the view.\n\t\t * @param string $view The current view slug.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_context = apply_filters( 'tribe_events_views_v2_view_context', $view_context, $view_slug, $instance );\n\n\t\t/**\n\t\t * Filters the Context object for a specific View.\n\t\t *\n\t\t * @since 4.9.3\n\t\t *\n\t\t * @param Context $view_context The context abstraction object that will be passed to the view.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_context = apply_filters( \"tribe_events_views_v2_{$view_slug}_view_context\", $view_context, $instance );\n\n\t\t$instance->set_context( $view_context );\n\n\t\t// This code is coupled with the idea of viewing events: that's fine as Events are the default view content.\n\t\t$view_repository = tribe_events();\n\t\t$view_repository->order_by( 'event_date', 'ASC' );\n\n\t\t/**\n\t\t * Filters the Repository object for a View.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param \\Tribe__Repository__Interface $view_repository The repository instance the View will use.\n\t\t * @param string $view_slug The current view slug.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_repository = apply_filters( 'tribe_events_views_v2_view_repository', $view_repository, $view_slug, $instance );\n\n\t\t/**\n\t\t * Filters the Repository object for a specific View.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param \\Tribe__Repository__Interface $view_repository The repository instance the View will use.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_repository = apply_filters( \"tribe_events_views_v2_{$view_slug}_view_repository\", $view_repository, $instance );\n\n\t\t$instance->set_repository( $view_repository );\n\n\t\t/**\n\t\t * Filters the query arguments array for a View URL.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param array $query_args Arguments used to build the URL.\n\t\t * @param string $view_slug The current view slug.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_url_query_args = apply_filters( 'tribe_events_views_v2_view_url_query_args', [], $view_slug, $instance );\n\n\t\t/**\n\t\t * Filters the query arguments array for a specific View URL.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param array $query_args Arguments used to build the URL.\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\t$view_url_query_args = apply_filters( \"tribe_events_views_v2_{$view_slug}_view_url_query_args\", $view_url_query_args, $instance );\n\n\t\t$instance->set_url( $view_url_query_args, true );\n\n\t\t/**\n\t\t * Run an action after we are done making a new View instance.\n\t\t *\n\t\t * @since 4.9.11\n\t\t *\n\t\t * @param View $instance The current View object.\n\t\t */\n\t\tdo_action( 'tribe_events_views_v2_after_make_view', $instance );\n\n\t\treturn $instance;\n\t}","title":""},{"docid":"798811018532dbb03e67ab14c284912b","score":"0.5789599","text":"public function getInstance()\n {\n return $this->instance;\n }","title":""},{"docid":"798811018532dbb03e67ab14c284912b","score":"0.5789599","text":"public function getInstance()\n {\n return $this->instance;\n }","title":""},{"docid":"798811018532dbb03e67ab14c284912b","score":"0.5789599","text":"public function getInstance()\n {\n return $this->instance;\n }","title":""},{"docid":"9a68a2fb8efd8e04962d3d7183f4fcd0","score":"0.5789537","text":"protected function getContentInstance()\n {\n return $this;\n }","title":""},{"docid":"3e364ab117fdc0d408c34ccad8409cbf","score":"0.5783446","text":"public static function instance() {\n\t\t\treturn tribe( self::class );\n\t\t}","title":""},{"docid":"9e0ee738674261f8561874c1af1b2c80","score":"0.57667357","text":"public static function getDispatcher()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getDispatcher();\n }","title":""},{"docid":"1d4bde6299402b8744a5b381189f416c","score":"0.5758326","text":"public function newPageView()\n {\n return new \\Racecore\\GATracking\\Tracking\\Pageview();\n }","title":""},{"docid":"1f83c557dcea2273da015794d0675111","score":"0.57576174","text":"public static function instance() {\n\t\tif( ! self::$_instance ) {\n\t\t\tself::$_instance = new self();\n\t\t\tself::_add_actions();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}","title":""}],"string":"[\n {\n \"docid\": \"bb5dea0ff81a828fe32385dfa5878532\",\n \"score\": \"0.8054523\",\n \"text\": \"protected function _view()\\n {\\n if (!$this->_view) {\\n $this->_view = \\\\Core\\\\View::getInstance();\\n }\\n return $this->_view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbd89f00eb5efadb2c0d86ad3bb354cf\",\n \"score\": \"0.7703845\",\n \"text\": \"public function get_view()\\n {\\n return $this->viewObject;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f5fa9ff451975361c98e6d9d190f91c\",\n \"score\": \"0.74205935\",\n \"text\": \"public function getView() {\\n return $this->_view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0506d377e89717fac1cf759fb17cc6ab\",\n \"score\": \"0.7410825\",\n \"text\": \"public function getView()\\n\\t{\\n\\t\\treturn $this->_view;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d33478676a508223afe87b2d331a537f\",\n \"score\": \"0.7409056\",\n \"text\": \"function getView()\\n\\t{\\n\\t\\treturn $this->view;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d33478676a508223afe87b2d331a537f\",\n \"score\": \"0.7409056\",\n \"text\": \"function getView()\\n\\t{\\n\\t\\treturn $this->view;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e902b69bd9d0fc70d715d095077b43f\",\n \"score\": \"0.736638\",\n \"text\": \"public function getView()\\n {\\n if ($this->_view === null) {\\n $this->setView(self::getDefaultView());\\n }\\n\\n return $this->_view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a49bf11ff5d291eba44a988c924ee553\",\n \"score\": \"0.7335811\",\n \"text\": \"public function getView()\\n\\t\\t{\\n\\t\\t\\treturn $this->view;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"519d14f016149c629d28a468a480ff86\",\n \"score\": \"0.73338956\",\n \"text\": \"private function _View() {\\n\\t \\n // $this->_View;\\n\\t\\t\\t//$View = ClassRegistry::getObject('');\\n\\t\\treturn $this->_View;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c3f9b916f9284530b43607cc2758fce\",\n \"score\": \"0.732308\",\n \"text\": \"public function getView()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78f49a455e5abedcb8aed3565645bdb4\",\n \"score\": \"0.7303139\",\n \"text\": \"public function getView()\\r\\n {\\r\\n return parent::getView();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78f49a455e5abedcb8aed3565645bdb4\",\n \"score\": \"0.7303139\",\n \"text\": \"public function getView()\\r\\n {\\r\\n return parent::getView();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d4d17bace5ec84ce3fec5215f354685\",\n \"score\": \"0.7292293\",\n \"text\": \"protected function View() {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd48a571c827118db0ab14dac4415730\",\n \"score\": \"0.7283091\",\n \"text\": \"public function getView() {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3146a9a8d15396390160913dfb1ffb61\",\n \"score\": \"0.7282899\",\n \"text\": \"protected function getView() {\\n return $this->_View; // cake 2.0\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43acf694d614c6dbb66f36a18c65fc10\",\n \"score\": \"0.7280747\",\n \"text\": \"public function getView() {\\r\\n\\t\\treturn $this->oView;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f982ca42f62383da44a9422ae3ffb4\",\n \"score\": \"0.72737586\",\n \"text\": \"public function getView()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f982ca42f62383da44a9422ae3ffb4\",\n \"score\": \"0.72737586\",\n \"text\": \"public function getView()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f982ca42f62383da44a9422ae3ffb4\",\n \"score\": \"0.72737586\",\n \"text\": \"public function getView()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f982ca42f62383da44a9422ae3ffb4\",\n \"score\": \"0.72737586\",\n \"text\": \"public function getView()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f982ca42f62383da44a9422ae3ffb4\",\n \"score\": \"0.72737586\",\n \"text\": \"public function getView()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f982ca42f62383da44a9422ae3ffb4\",\n \"score\": \"0.72737586\",\n \"text\": \"public function getView()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f982ca42f62383da44a9422ae3ffb4\",\n \"score\": \"0.72737586\",\n \"text\": \"public function getView()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e75b2297246bc50f4bc4495fff01353a\",\n \"score\": \"0.72227794\",\n \"text\": \"public function getView() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5d849980fb1aade5ba3e40dce1ce414\",\n \"score\": \"0.72033817\",\n \"text\": \"public function getView() {\\n\\t\\treturn $this->getController()->view;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9dd9b5e377b35d34bdf5066e7ac58bb9\",\n \"score\": \"0.7173682\",\n \"text\": \"public function getView() {\\n if (null === $this->view) {\\n require_once 'Zend/Controller/Action/HelperBroker.php';\\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\\n $this->setView(clone($viewRenderer->view));\\n }\\n\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63669b927c3a281d011194547b988977\",\n \"score\": \"0.7105985\",\n \"text\": \"public function getView() {\\n\\t\\tif (null === $this->_view) {\\n\\t\\t\\trequire_once 'Zend/Controller/Action/HelperBroker.php';\\n\\t\\t\\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'viewRenderer' );\\n\\t\\t\\t$this->setView ( $viewRenderer->view );\\n\\t\\t}\\n\\t\\treturn $this->_view;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7452264c3c38ab7a52591352dcf901e3\",\n \"score\": \"0.69906354\",\n \"text\": \"public function getView() {\\n return $this->view['object'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a8012ee2cc5a556b54b79bcc8fa08e5\",\n \"score\": \"0.6960877\",\n \"text\": \"public function getView()\\n\\t{\\n\\t\\tif (null === $this->_view) {\\n\\t\\t\\trequire_once 'Zend/Controller/Action/HelperBroker.php';\\n\\t\\t\\t$viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\\n\\t\\t\\t$this->setView($viewRenderer->view);\\n\\t\\t}\\n\\n\\t\\treturn $this->_view;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3143925c06b13aa4d08d0177db9f3be5\",\n \"score\": \"0.687225\",\n \"text\": \"public function view()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3143925c06b13aa4d08d0177db9f3be5\",\n \"score\": \"0.687225\",\n \"text\": \"public function view()\\n {\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40e089036d124c201919d5492e0addef\",\n \"score\": \"0.68645835\",\n \"text\": \"public function getView();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40e089036d124c201919d5492e0addef\",\n \"score\": \"0.68645835\",\n \"text\": \"public function getView();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdff618f2b9e3e55cd455386f1f71823\",\n \"score\": \"0.68439883\",\n \"text\": \"public function getView ();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee916e56fe89a7b4d726bfc682e089a4\",\n \"score\": \"0.6816027\",\n \"text\": \"public function get_view() {\\n if (!isset($this->view)) {\\n return false;\\n }\\n return $this->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bf48425882c1fa74aa628142e2a9d91\",\n \"score\": \"0.6811174\",\n \"text\": \"public function getMainView() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8bf43bf6ad7b2c0ecc3e8ecdda78e19b\",\n \"score\": \"0.67661375\",\n \"text\": \"function getView();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"179ef66c3eac5b7da5cb6f170ae206dc\",\n \"score\": \"0.6732854\",\n \"text\": \"public function getView()\\n {\\n // TODO: Implement getView() method.\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a6e3d6b36be75af1b23bf7941358d29\",\n \"score\": \"0.6710661\",\n \"text\": \"public function getView()\\n\\t{\\n\\t\\tif (null === $this->_view) {\\n\\t\\t\\t$this->_view = Zend_Layout::getMvcInstance()->getView();\\n\\t\\t}\\n\\t\\treturn $this->_view;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c04439c86f757c3b1528e2cbc41908e6\",\n \"score\": \"0.6648896\",\n \"text\": \"protected static function getView()\\n {\\n return null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6578ac5a30a632900edc50e0e03a6f6b\",\n \"score\": \"0.6644731\",\n \"text\": \"function __construct() \\n {\\n $this->view = new View(); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c32d4f0af41e5d5bac5436ed9e8c01b\",\n \"score\": \"0.66267097\",\n \"text\": \"public function __construct(){\\n $this->view = new View();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85dbb6f69ad627f5b16eca9931cbb669\",\n \"score\": \"0.66258335\",\n \"text\": \"protected function view()\\n {\\n if (!$this->view) {\\n $this->view = debug_backtrace();\\n $this->view = basename($this->view[2]['file'], '.php');\\n }\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6a60b9b73a3a5a540db4d1ed9a5903f\",\n \"score\": \"0.661566\",\n \"text\": \"public function getView()\\n {\\n return $this->app->getView();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"705f3a1ca83b56eefacfb7d006074b37\",\n \"score\": \"0.65716636\",\n \"text\": \"abstract public function getView();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"705f3a1ca83b56eefacfb7d006074b37\",\n \"score\": \"0.65716636\",\n \"text\": \"abstract public function getView();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a9954f4f773179544cda45ac3e0eac5\",\n \"score\": \"0.6521006\",\n \"text\": \"public function __construct()\\n {\\n $this->view = new View();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23c25a027c85ee97f1edaf259d63a793\",\n \"score\": \"0.6468614\",\n \"text\": \"protected function getView($page) {\\n\\t\\trequire_once('View.php');\\n\\t\\treturn new View($page);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f3a9691a4be86b79a9b1b3bbb843bdf\",\n \"score\": \"0.6444031\",\n \"text\": \"public function toView() {\\n $this->_initViewResponse();\\n $this->_initViewLayout();\\n\\n return $this->_view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6695b7c2ee146d2bc081946ec443464\",\n \"score\": \"0.6433773\",\n \"text\": \"public function getView()\\n {\\n if (is_null($this->_view)) {\\n $controller = $this->_routeInfo->controllerName;\\n $name = $this->_routeInfo->action;\\n $ext = $this->_routeInfo->getExtension();\\n $template = \\\"{$controller}/{$name}.{$ext}.twig\\\";\\n if (!is_null($this->_controller->view)) {\\n $template = \\\"{$this->_controller->view}.{$ext}.twig\\\";\\n }\\n $this->_view = new View(['file' => $template]);\\n }\\n return $this->_view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a9d6a9d820cf8648ed9eca842b3d85a\",\n \"score\": \"0.6343339\",\n \"text\": \"public function getView(): ?Factory;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f5b22648eb0403c2921d31cf3a02d43\",\n \"score\": \"0.63312644\",\n \"text\": \"public function getView()\\n\\t{\\n\\t\\treturn $this->client->getView();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b5c83bfaae12ed928f527bfbad267cf\",\n \"score\": \"0.63256276\",\n \"text\": \"public function __construct() {\\n\\t\\t$this->_view = new View (new Request);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef88c1c0cad422626561abf48fa5a253\",\n \"score\": \"0.63253736\",\n \"text\": \"public static function getContainer()\\n {\\n /** @var \\\\Illuminate\\\\View\\\\Factory $instance */\\n return $instance->getContainer();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da7dd0ea0e6a8b0caf260feeba03ebf6\",\n \"score\": \"0.63183796\",\n \"text\": \"public function __construct() {\\n\\t\\t$this->view = new view ( $this );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aee8d9b34b36c1ae97b9124ee6008f2c\",\n \"score\": \"0.6300965\",\n \"text\": \"public function __construct()\\r\\n\\t\\t{\\r\\n\\t\\t\\t$this->view = new View();\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6dc6ffbd2a313238940b7de0e81f6644\",\n \"score\": \"0.6253772\",\n \"text\": \"public function view()\\n {\\n return $this->di()->getViewRenderer();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7980113e8d481552285c7a8a76b1db4c\",\n \"score\": \"0.6232145\",\n \"text\": \"protected function getView()\\n {\\n $view = new StandaloneView($this->controllerContext->getRequest());\\n if (is_file($this->settings['viewHelpers']['templates'][get_class($this)])) {\\n $view->setPartialRootPath($this->settings['viewHelpers']['partialRootPath']);\\n $view->setTemplatePathAndFilename($this->settings['viewHelpers']['templates'][get_class($this)]);\\n }\\n return $view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bffc575dc68f6af68c3c211794d64717\",\n \"score\": \"0.62243724\",\n \"text\": \"public function instance() {\\n\\t\\n\\t\\treturn $this;\\n\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb3727c934bc8b0aeb74fbcd4d768dca\",\n \"score\": \"0.6203977\",\n \"text\": \"private function generateViewObject() {\\r\\n if ($this->viewLoaded) {\\r\\n $this->view = new View($this);\\r\\n // create a global instance\\r\\n View::$instance = $this->view;\\r\\n // Check static permission\\r\\n if ($this->isStatic && !$this->view->__staticLoadAllowed) {\\r\\n $this->fatal('Error: Loading this page statically is denied.');\\r\\n }\\r\\n // Set the template: important\\r\\n $this->view->template = $this->template;\\r\\n // Pass data set from controller\\r\\n if (!empty($this->cData)) {\\r\\n foreach ($this->cData as $varName => $varValue) {\\r\\n $this->view->$varName = $varValue;\\r\\n }\\r\\n }\\r\\n } else {\\r\\n // Check if controller loaded\\r\\n if (!$this->controllerLoaded) {\\r\\n // Invalid request. report 404\\r\\n $this->fatal('Error 404 Page not found!');\\r\\n }\\r\\n// $this->debug(\\\"View Not Loaded\\\");\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ba1a4a1576d73eb69a0cb1dbb638a41\",\n \"score\": \"0.61991656\",\n \"text\": \"public function create()\\n {\\n return $this->view();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"468cb75db419e04ef9efd71dfd5ebee2\",\n \"score\": \"0.61809087\",\n \"text\": \"protected function getView():DomainView {\\n if (!isset($this->relatedView)) {\\n $this->relatedView = $this->relatedFactory->getView();\\n }\\n\\n return $this->relatedView;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eace182e9db86a7c86b942b501bb7258\",\n \"score\": \"0.6174277\",\n \"text\": \"public function getFormView() \\n {\\n return $this->getForm()->createView();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1d4aaea7c9a20be693a25a1272ed91f\",\n \"score\": \"0.6174222\",\n \"text\": \"protected function getView($view)\\n\\t{\\n\\t\\treturn View::make($view, $this->viewBag);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f754e934d45721eb532f7662d3c911f\",\n \"score\": \"0.6171902\",\n \"text\": \"public function set_view($view)\\n {\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31f503b03b4d48d4cbf1c4e01d2b385d\",\n \"score\": \"0.6117485\",\n \"text\": \"protected function getView()\\n {\\n $this->runtime_data->render = $this->view_instance->getView($this->token);\\n\\n if ($this->runtime_data->render->extension->title === $this->token->name) {\\n } else {\\n $this->token->name = $this->runtime_data->render->extension->title;\\n }\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eba5b91340156a8c743cae7158ae2a25\",\n \"score\": \"0.61069983\",\n \"text\": \"function view($view)\\n {\\n $this->view=$view;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c422907caead51de0518d9c3d726d8c2\",\n \"score\": \"0.60916716\",\n \"text\": \"function view() {\\n return app()->view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97e80a1e4eaded6a0e3b4be4a225b654\",\n \"score\": \"0.60743725\",\n \"text\": \"public function getView(){\\n\\t\\treturn $this->getActionMapping()->getView();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b47feb43b462361562d06390c796bbd3\",\n \"score\": \"0.60576093\",\n \"text\": \"public function create()\\n {\\n return view();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b47feb43b462361562d06390c796bbd3\",\n \"score\": \"0.60576093\",\n \"text\": \"public function create()\\n {\\n return view();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b0f0fb92715eb1e5eed5b9e7a70feb9\",\n \"score\": \"0.60313094\",\n \"text\": \"public function getInstance()\\n {\\n return $this->model;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"840252dabc9e35a7d768ecf7f51254be\",\n \"score\": \"0.6030913\",\n \"text\": \"protected function resolveView()\\n {\\n $viewObjectName = self::JSON_VIEW;\\n $view = $this->objectManager->get($viewObjectName);\\n return $view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f5852a5598cd38581623afa9889392d\",\n \"score\": \"0.60291785\",\n \"text\": \"function views(): Views\\n {\\n return new Views;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0226c87f54fe60d5ff27d05ec83f87f\",\n \"score\": \"0.60218847\",\n \"text\": \"public static function getShared()\\n {\\n /** @var \\\\Illuminate\\\\View\\\\Factory $instance */\\n return $instance->getShared();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4c2114abf23f6f8893e35590b9b6126\",\n \"score\": \"0.5982899\",\n \"text\": \"public function instance()\\n\\t{\\n\\t\\ttry\\n\\t\\t{\\n\\t\\t\\t$editor = App::get('editor');\\n\\t\\t}\\n\\t\\tcatch (Exception $e)\\n\\t\\t{\\n\\t\\t\\t$editor = \\\\Hubzero\\\\Html\\\\Editor::getInstance('none');\\n\\t\\t}\\n\\n\\t\\treturn $editor;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"604d0e4e1a61c069f8c7dcc391542277\",\n \"score\": \"0.5959043\",\n \"text\": \"public function get()\\n\\t{\\n\\t\\t// -----------------------------------------------------\\n\\t\\t// Set the name of the last rendered view.\\n\\t\\t// -----------------------------------------------------\\n\\t\\tstatic::$last = $this->view;\\n\\n\\t\\t// -----------------------------------------------------\\n\\t\\t// Get the content of all of the sub-views.\\n\\t\\t// -----------------------------------------------------\\n\\t\\tforeach ($this->data as &$data)\\n\\t\\t{\\n\\t\\t\\tif ($data instanceof View or $data instanceof Response)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$data = (string) $data;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// -----------------------------------------------------\\n\\t\\t// Extract the view data into the local scope.\\n\\t\\t// -----------------------------------------------------\\n\\t\\textract($this->data, EXTR_SKIP);\\n\\n\\t\\t// -----------------------------------------------------\\n\\t\\t// Start an output buffer to catch the content.\\n\\t\\t// -----------------------------------------------------\\n\\t\\tob_start();\\n\\n\\t\\t// -----------------------------------------------------\\n\\t\\t// Echo the content of the view.\\n\\t\\t// -----------------------------------------------------\\n\\t\\techo eval('?>'.$this->content);\\n\\n\\t\\t// -----------------------------------------------------\\n\\t\\t// Get the contents of the output buffer.\\n\\t\\t// -----------------------------------------------------\\n\\t\\treturn ob_get_clean();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"823be81f46582e46d7f3242703cc1537\",\n \"score\": \"0.5945081\",\n \"text\": \"function asView() {\\n $unique = spl_object_hash($this);\\n $classname = \\\"QueryView{$unique}\\\";\\n $class = << true,\\n );\\n static \\\\$queryset;\\n\\n static function getQuery(\\\\$compiler) {\\n return ' ('.static::\\\\$queryset->getQuery().') ';\\n }\\n\\n static function getSqlAddParams(\\\\$compiler) {\\n return static::\\\\$queryset->toSql(\\\\$compiler, self::\\\\$queryset->model);\\n }\\n}\\nEOF;\\n eval($class); // Ugh\\n $classname::$queryset = $this;\\n return $classname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd43f81adeff70f9505ebfdaf7f5614e\",\n \"score\": \"0.5940266\",\n \"text\": \"public function view()\\n\\t{\\n\\t\\treturn View::make('request.request');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1694a4dd5f0593eb143d564c39e0638\",\n \"score\": \"0.5938605\",\n \"text\": \"public function create()\\n {\\n return view($this->_config['view']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d59cec6a1eede654aadb47fadf46117\",\n \"score\": \"0.59267294\",\n \"text\": \"public static function instance(): WorkoutLogView {\\n if (self::$instance === null) {\\n self::$instance = new static();\\n }\\n return self::$instance;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f1e41722bf80238f5e276e12c0f8586\",\n \"score\": \"0.5924794\",\n \"text\": \"function dbGetView($viewClassname)\\n {\\n $view = new $viewClassname();\\n if (!($view instanceof View)) {\\n throw new Exception('Invalid view implementation by class: ' . $viewClassname);\\n }\\n $view->setDb($this);\\n \\n return $view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6822e35e8a07f1aceca81256425210c5\",\n \"score\": \"0.59236676\",\n \"text\": \"public function getView($name)\\n\\t{\\n\\t\\treturn $this->getClass('App\\\\\\\\Views\\\\\\\\' . ucfirst($name) . 'View');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1bf5935164ba3782194be1c3e17aefc4\",\n \"score\": \"0.5912308\",\n \"text\": \"public function superView(){\\n\\t\\treturn $this->app->superApp()->view;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f002c11d5f420a27d760f64407dcce3\",\n \"score\": \"0.5903931\",\n \"text\": \"public function view($view = NULL)\\n {\\n if ($view === NULL)\\n {\\n // Act as a getter\\n return $this->view;\\n }\\n\\n // Act as a setter\\n $this->view = $view;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba64eb656a1f68c487c0bcfa2744ff21\",\n \"score\": \"0.58948493\",\n \"text\": \"public function getViewClass(): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"196fa38b5d7b3d8ab5aeee34d5ce7c6f\",\n \"score\": \"0.5890229\",\n \"text\": \"public function cloneView()\\n {\\r\\n \\tif (!$this->_clone) {\\r\\n \\t\\t\\r\\n \\t\\treturn $this->view;\\r\\n \\t}\\r\\n \\t\\n $view = clone $this->view;\\n $view->clearVars();\\n return $view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f26a34ef6fb26390d6bfcc898eea123\",\n \"score\": \"0.58639884\",\n \"text\": \"public function __invoke()\\n {\\n return view('app');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d62b928fe7b6a3793f1f2c39daea48d\",\n \"score\": \"0.5837526\",\n \"text\": \"public function getView()\\n {\\n // Create the view\\n $view = parent::getView();\\n\\n // Find out the value and force it to be true or false\\n $value = $this->get('value', false) ? true : false;\\n\\n // we want to add the checked attribute if we can\\n if ($value) {\\n $attr = $this->get('attributes', array());\\n $attr['checked'] = 'checked';\\n $view->set('attributes', $attr);\\n }\\n\\n // Always set the value in the checkbox control to 1\\n $view->set('value', 1);\\n\\n // return it\\n return $view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a654911b5f2ceaed0fe3e4c51f3b5ba8\",\n \"score\": \"0.5836071\",\n \"text\": \"public function getResponseView()\\n {\\n return $this->response_view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4eaf9e4e465e060cf060319bb8527063\",\n \"score\": \"0.58236575\",\n \"text\": \"protected function _initView() {\\n $view = new Zend_View();\\n $view->doctype('XHTML1_STRICT');\\n\\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');\\n $viewRenderer->setView($view);\\n\\n return $view;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a687ae8e8294fc6e4a570c2612444389\",\n \"score\": \"0.58047444\",\n \"text\": \"public function getInstance()\\n {\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c85a573e54c149fd73edfd053489fece\",\n \"score\": \"0.5798673\",\n \"text\": \"public static function make( $view = null, Context $context = null ) {\\n\\t\\t$manager = tribe( Manager::class );\\n\\n\\t\\t$default_view = $manager->get_default_view();\\n\\t\\tif (\\n\\t\\t\\tnull === $view\\n\\t\\t\\t|| 'default' === $view\\n\\t\\t) {\\n\\t\\t\\t$view = $default_view;\\n\\t\\t}\\n\\n\\t\\tlist( $view_slug, $view_class ) = $manager->get_view( $view );\\n\\n\\t\\t// When not found use the default view.\\n\\t\\tif ( ! $view_class ) {\\n\\t\\t\\tlist( $view_slug, $view_class ) = $manager->get_view( $default_view );\\n\\t\\t}\\n\\n\\t\\t// Make sure we are using Reflector when it fails\\n\\t\\tif ( ! class_exists( $view_class ) ) {\\n\\t\\t\\tlist( $view_slug, $view_class ) = $manager->get_view( 'reflector' );\\n\\t\\t}\\n\\n\\t\\tif ( ! self::$container instanceof Container ) {\\n\\t\\t\\t$message = 'The ' . __CLASS__ . '::$container property is not set: was the class initialized by the service provider?';\\n\\t\\t\\tthrow new \\\\RuntimeException( $message );\\n\\t\\t}\\n\\n\\t\\t/**\\n\\t\\t * Run an action before we start making a new View instance.\\n\\t\\t *\\n\\t\\t * @since 4.9.11\\n\\t\\t *\\n\\t\\t * @param string $view_class The current view class.\\n\\t\\t * @param string $view_slug The current view slug.\\n\\t\\t */\\n\\t\\tdo_action( 'tribe_events_views_v2_before_make_view', $view_class, $view_slug );\\n\\n\\t\\t/** @var View_Interface $instance */\\n\\t\\t$instance = self::$container->make( $view_class );\\n\\n\\t\\t$template = new Template( $instance );\\n\\n\\t\\t/**\\n\\t\\t * Filters the Template object for a View.\\n\\t\\t *\\n\\t\\t * @since 4.9.3\\n\\t\\t *\\n\\t\\t * @param Template $template The template object for the View.\\n\\t\\t * @param string $view_slug The current view slug.\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\t$template = apply_filters( 'tribe_events_views_v2_view_template', $template, $view_slug, $instance );\\n\\n\\t\\t/**\\n\\t\\t * Filters the Template object for a specific View.\\n\\t\\t *\\n\\t\\t * @since 4.9.3\\n\\t\\t *\\n\\t\\t * @param Template $template The template object for the View.\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\t$template = apply_filters( \\\"tribe_events_views_v2_{$view_slug}_view_template\\\", $template, $instance );\\n\\n\\t\\t$instance->set_template( $template );\\n\\t\\t$instance->set_slug( $view_slug );\\n\\t\\t$instance->set_template_slug( $view_slug );\\n\\n\\t\\t// Let's set the View context from either the global context or the provided one.\\n\\t\\t$view_context = null === $context ? tribe_context() : $context;\\n\\n\\t\\t/**\\n\\t\\t * Filters the Context object for a View.\\n\\t\\t *\\n\\t\\t * @since 4.9.3\\n\\t\\t *\\n\\t\\t * @param Context $view_context The context abstraction object that will be passed to the view.\\n\\t\\t * @param string $view The current view slug.\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\t$view_context = apply_filters( 'tribe_events_views_v2_view_context', $view_context, $view_slug, $instance );\\n\\n\\t\\t/**\\n\\t\\t * Filters the Context object for a specific View.\\n\\t\\t *\\n\\t\\t * @since 4.9.3\\n\\t\\t *\\n\\t\\t * @param Context $view_context The context abstraction object that will be passed to the view.\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\t$view_context = apply_filters( \\\"tribe_events_views_v2_{$view_slug}_view_context\\\", $view_context, $instance );\\n\\n\\t\\t$instance->set_context( $view_context );\\n\\n\\t\\t// This code is coupled with the idea of viewing events: that's fine as Events are the default view content.\\n\\t\\t$view_repository = tribe_events();\\n\\t\\t$view_repository->order_by( 'event_date', 'ASC' );\\n\\n\\t\\t/**\\n\\t\\t * Filters the Repository object for a View.\\n\\t\\t *\\n\\t\\t * @since 4.9.11\\n\\t\\t *\\n\\t\\t * @param \\\\Tribe__Repository__Interface $view_repository The repository instance the View will use.\\n\\t\\t * @param string $view_slug The current view slug.\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\t$view_repository = apply_filters( 'tribe_events_views_v2_view_repository', $view_repository, $view_slug, $instance );\\n\\n\\t\\t/**\\n\\t\\t * Filters the Repository object for a specific View.\\n\\t\\t *\\n\\t\\t * @since 4.9.11\\n\\t\\t *\\n\\t\\t * @param \\\\Tribe__Repository__Interface $view_repository The repository instance the View will use.\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\t$view_repository = apply_filters( \\\"tribe_events_views_v2_{$view_slug}_view_repository\\\", $view_repository, $instance );\\n\\n\\t\\t$instance->set_repository( $view_repository );\\n\\n\\t\\t/**\\n\\t\\t * Filters the query arguments array for a View URL.\\n\\t\\t *\\n\\t\\t * @since 4.9.11\\n\\t\\t *\\n\\t\\t * @param array $query_args Arguments used to build the URL.\\n\\t\\t * @param string $view_slug The current view slug.\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\t$view_url_query_args = apply_filters( 'tribe_events_views_v2_view_url_query_args', [], $view_slug, $instance );\\n\\n\\t\\t/**\\n\\t\\t * Filters the query arguments array for a specific View URL.\\n\\t\\t *\\n\\t\\t * @since 4.9.11\\n\\t\\t *\\n\\t\\t * @param array $query_args Arguments used to build the URL.\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\t$view_url_query_args = apply_filters( \\\"tribe_events_views_v2_{$view_slug}_view_url_query_args\\\", $view_url_query_args, $instance );\\n\\n\\t\\t$instance->set_url( $view_url_query_args, true );\\n\\n\\t\\t/**\\n\\t\\t * Run an action after we are done making a new View instance.\\n\\t\\t *\\n\\t\\t * @since 4.9.11\\n\\t\\t *\\n\\t\\t * @param View $instance The current View object.\\n\\t\\t */\\n\\t\\tdo_action( 'tribe_events_views_v2_after_make_view', $instance );\\n\\n\\t\\treturn $instance;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"798811018532dbb03e67ab14c284912b\",\n \"score\": \"0.5789599\",\n \"text\": \"public function getInstance()\\n {\\n return $this->instance;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"798811018532dbb03e67ab14c284912b\",\n \"score\": \"0.5789599\",\n \"text\": \"public function getInstance()\\n {\\n return $this->instance;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"798811018532dbb03e67ab14c284912b\",\n \"score\": \"0.5789599\",\n \"text\": \"public function getInstance()\\n {\\n return $this->instance;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a68a2fb8efd8e04962d3d7183f4fcd0\",\n \"score\": \"0.5789537\",\n \"text\": \"protected function getContentInstance()\\n {\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e364ab117fdc0d408c34ccad8409cbf\",\n \"score\": \"0.5783446\",\n \"text\": \"public static function instance() {\\n\\t\\t\\treturn tribe( self::class );\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e0ee738674261f8561874c1af1b2c80\",\n \"score\": \"0.57667357\",\n \"text\": \"public static function getDispatcher()\\n {\\n /** @var \\\\Illuminate\\\\View\\\\Factory $instance */\\n return $instance->getDispatcher();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d4bde6299402b8744a5b381189f416c\",\n \"score\": \"0.5758326\",\n \"text\": \"public function newPageView()\\n {\\n return new \\\\Racecore\\\\GATracking\\\\Tracking\\\\Pageview();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f83c557dcea2273da015794d0675111\",\n \"score\": \"0.57576174\",\n \"text\": \"public static function instance() {\\n\\t\\tif( ! self::$_instance ) {\\n\\t\\t\\tself::$_instance = new self();\\n\\t\\t\\tself::_add_actions();\\n\\t\\t}\\n\\n\\t\\treturn self::$_instance;\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":722,"cells":{"query_id":{"kind":"string","value":"3c29a7ad437fe4613d19e59cc70077ad"},"query":{"kind":"string","value":"Retrieves the raw result"},"positive_passages":{"kind":"list like","value":[{"docid":"970b3d66db82016bef6dde1f0a7dacea","score":"0.8254048","text":"function getRawResult()\n {\n return $this->_raw_result;\n }","title":""}],"string":"[\n {\n \"docid\": \"970b3d66db82016bef6dde1f0a7dacea\",\n \"score\": \"0.8254048\",\n \"text\": \"function getRawResult()\\n {\\n return $this->_raw_result;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"fee6ca042cb7b7a7534ccb393ed8e0ce","score":"0.8654125","text":"public function getRawResult();","title":""},{"docid":"f060351cd064680258cf40af1011c87a","score":"0.7553329","text":"public function getRawResponse()\n {\n return $this->execute(false);\n }","title":""},{"docid":"7266ed766ce3f05818f072be82ff0d1b","score":"0.7162325","text":"protected abstract function get_result();","title":""},{"docid":"74422aab3c769e622944c25d8648d60b","score":"0.71161485","text":"public function getRaw();","title":""},{"docid":"74422aab3c769e622944c25d8648d60b","score":"0.71161485","text":"public function getRaw();","title":""},{"docid":"74422aab3c769e622944c25d8648d60b","score":"0.71161485","text":"public function getRaw();","title":""},{"docid":"74422aab3c769e622944c25d8648d60b","score":"0.71161485","text":"public function getRaw();","title":""},{"docid":"9ce3e19d04d2fc8b15486c273fd28b47","score":"0.70984465","text":"public function getResult()\n {\n return $this->get(self::_RESULT);\n }","title":""},{"docid":"9ce3e19d04d2fc8b15486c273fd28b47","score":"0.70984465","text":"public function getResult()\n {\n return $this->get(self::_RESULT);\n }","title":""},{"docid":"9ce3e19d04d2fc8b15486c273fd28b47","score":"0.70984465","text":"public function getResult()\n {\n return $this->get(self::_RESULT);\n }","title":""},{"docid":"9ce3e19d04d2fc8b15486c273fd28b47","score":"0.70984465","text":"public function getResult()\n {\n return $this->get(self::_RESULT);\n }","title":""},{"docid":"8108bc9837d1b37cb06d6e5a28952a89","score":"0.702069","text":"public function get_raw_data() {}","title":""},{"docid":"cdb173dbf94f9499cd0d8e68ffabb224","score":"0.701663","text":"public static function get_raw_data() {}","title":""},{"docid":"92307cb93946f90d45d89e4e64a9ba6c","score":"0.6947413","text":"protected function get_result()\n {\n }","title":""},{"docid":"92307cb93946f90d45d89e4e64a9ba6c","score":"0.6947413","text":"protected function get_result()\n {\n }","title":""},{"docid":"92307cb93946f90d45d89e4e64a9ba6c","score":"0.6947413","text":"protected function get_result()\n {\n }","title":""},{"docid":"92307cb93946f90d45d89e4e64a9ba6c","score":"0.6947413","text":"protected function get_result()\n {\n }","title":""},{"docid":"8b4b536b3b247f98bccd25779dd8add3","score":"0.69369394","text":"private function result() {\n return json_decode($this->result, true);\n }","title":""},{"docid":"74a11efb2d22366b04565b9f873e0650","score":"0.69153315","text":"function getResult()\r\n {\r\n return $this->result;\r\n }","title":""},{"docid":"2e9f647eadb4bec3b7e4bc1c9d08bcf5","score":"0.6899217","text":"public function getResult() {\n return $this->result;\n }","title":""},{"docid":"b1fe1c363cb0866cb9e5b92a068e11aa","score":"0.68757766","text":"function getResult() \n {\n return $this->result;\n }","title":""},{"docid":"0af7642e57f5d90939d6a3f9cc4012ea","score":"0.6853757","text":"function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"bc65d4f72eb538de65f645da21fbfee4","score":"0.6841476","text":"public function result() {\n return $this->_result;\n }","title":""},{"docid":"0bbae86588669d7b1a23ec394c6a2ed6","score":"0.68287283","text":"public function result() {\n return $this->result;\n }","title":""},{"docid":"19fdb233cd38b43994238f22b09b34cb","score":"0.6797053","text":"public function getResult() {\r\n return $this->_result;\r\n }","title":""},{"docid":"fcb0c0f041fd98d624ec9c2fb176e655","score":"0.6796461","text":"public function getResult() {\n return $this->result;\n }","title":""},{"docid":"3264d3434e333075ab0f02db8298daba","score":"0.67920727","text":"public function getResult() {\r\n return $this->result;\r\n }","title":""},{"docid":"083e5453b3e5dfdbdcb41960d91ddbfb","score":"0.67904484","text":"public function result() {\n\t\treturn $this->result;\n\t}","title":""},{"docid":"c560d7d9fd1865febb800ff8441f9ce5","score":"0.67863214","text":"public function getResult()\r\n {\r\n return $this->result;\r\n }","title":""},{"docid":"c560d7d9fd1865febb800ff8441f9ce5","score":"0.67863214","text":"public function getResult()\r\n {\r\n return $this->result;\r\n }","title":""},{"docid":"db97c24a75c5ca6bbcb8adcd3cd19d16","score":"0.67765766","text":"public function getResult(){\n return $this->result;\n }","title":""},{"docid":"db97c24a75c5ca6bbcb8adcd3cd19d16","score":"0.67765766","text":"public function getResult(){\n return $this->result;\n }","title":""},{"docid":"1ffccddb8a021c52280aefebcbf3f42d","score":"0.677622","text":"function getResult() {\n\n return $this->result;\n\n }","title":""},{"docid":"56f6e96b5bfcda8a98c5b9ae014a86f5","score":"0.67714596","text":"public function result()\n {\n return $this->result;\n }","title":""},{"docid":"56f6e96b5bfcda8a98c5b9ae014a86f5","score":"0.67714596","text":"public function result()\n {\n return $this->result;\n }","title":""},{"docid":"56f6e96b5bfcda8a98c5b9ae014a86f5","score":"0.67714596","text":"public function result()\n {\n return $this->result;\n }","title":""},{"docid":"56f6e96b5bfcda8a98c5b9ae014a86f5","score":"0.67714596","text":"public function result()\n {\n return $this->result;\n }","title":""},{"docid":"56f6e96b5bfcda8a98c5b9ae014a86f5","score":"0.67714596","text":"public function result()\n {\n return $this->result;\n }","title":""},{"docid":"534b69a192282d44c8a81630bfbee06d","score":"0.6769219","text":"function getResult()\n\t{\n\t\treturn $this->result;\n\t}","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"cbd908e75b9f2ba0543369027d96e245","score":"0.6745732","text":"public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"b15899ded5a041e6cc9f3265f4c0785a","score":"0.6740582","text":"public function get_result(){\n\t\t\treturn $this -> set_result();\n\t\t}","title":""},{"docid":"58e8bf90ffd157e0c455b5289ba4f0e4","score":"0.6740346","text":"public function getResult() {\n return $this->result;\n }","title":""},{"docid":"58e8bf90ffd157e0c455b5289ba4f0e4","score":"0.6740346","text":"public function getResult() {\n return $this->result;\n }","title":""},{"docid":"58e8bf90ffd157e0c455b5289ba4f0e4","score":"0.6740346","text":"public function getResult() {\n return $this->result;\n }","title":""},{"docid":"58e8bf90ffd157e0c455b5289ba4f0e4","score":"0.6740346","text":"public function getResult() {\n return $this->result;\n }","title":""},{"docid":"58e8bf90ffd157e0c455b5289ba4f0e4","score":"0.6740346","text":"public function getResult() {\n return $this->result;\n }","title":""},{"docid":"174253d2202e330d7f2f38036274b5e0","score":"0.6736543","text":"public function getResult()\n {\n return $this->_result;\n }","title":""},{"docid":"174253d2202e330d7f2f38036274b5e0","score":"0.6736543","text":"public function getResult()\n {\n return $this->_result;\n }","title":""},{"docid":"498a9f547f43d8c4b566d64c06e31664","score":"0.671149","text":"public function getResult(){\r\n \r\n return $this->result;\r\n \r\n }","title":""},{"docid":"4d9ad58f3e69461e6a99423c4907cdb5","score":"0.6701049","text":"public function getResponse()\n {\n return $this->execute();\n }","title":""},{"docid":"8dee40b86f879e2e865f74ef4ce5c75e","score":"0.66913587","text":"public function getResult() {\n\t\treturn $this->_result;\n\t}","title":""},{"docid":"467971416b713cecc8a500dcfddfca7c","score":"0.66830117","text":"public static function get_raw_data()\n {\n }","title":""},{"docid":"5f6047126bc9f9f552990a648dacd480","score":"0.66553575","text":"public function get_raw_data()\n {\n }","title":""},{"docid":"5f6047126bc9f9f552990a648dacd480","score":"0.66553575","text":"public function get_raw_data()\n {\n }","title":""},{"docid":"ab4c201f141abd092f8f2b5b45cf2455","score":"0.66455","text":"public function result()\n\t{\n\t\treturn $this->result;\n\t}","title":""},{"docid":"799e72985588440b1f1ae899fc7c065f","score":"0.66428727","text":"final public function getResult()\n {\n return $this->result;\n }","title":""},{"docid":"db18051f5c33979237e5b873ca4286c6","score":"0.660434","text":"function getResult(): string {\n return $this->result;\n }","title":""},{"docid":"49846b29db39105ba44afd15b529e3ca","score":"0.6603602","text":"public function getResult()\n\t{\n\t\treturn parent::getData()['RESULT'] ?? null;\n\t}","title":""},{"docid":"a555d69282561706f5e6940eaa2b1cb0","score":"0.6588059","text":"public function get_result()\n\t\t{\n\t\t\treturn $this->m_result;\n\t\t}","title":""},{"docid":"1b7fce5553b832b782bf545b71c7d6cc","score":"0.65768564","text":"public function getRawContent();","title":""},{"docid":"dcbf9a5d56ff9d793b7aeb19270ece27","score":"0.65756464","text":"public function getResult()\n {\n if (isset($this->_result)) {\n return $this->_result;\n }\n }","title":""},{"docid":"207a815058fcbaa1267e43be342837fa","score":"0.65744","text":"public function getResult();","title":""},{"docid":"207a815058fcbaa1267e43be342837fa","score":"0.65744","text":"public function getResult();","title":""},{"docid":"207a815058fcbaa1267e43be342837fa","score":"0.65744","text":"public function getResult();","title":""},{"docid":"207a815058fcbaa1267e43be342837fa","score":"0.65744","text":"public function getResult();","title":""},{"docid":"207a815058fcbaa1267e43be342837fa","score":"0.65744","text":"public function getResult();","title":""},{"docid":"5cfbc18a298510fb252d2429450a0a81","score":"0.6534868","text":"public function getRawResult()\n {\n if (!is_array($this->_result)) {\n throw new P4Cms_Diff_Exception(\n \"Cannot get results. Results have not been set.\"\n );\n }\n\n return $this->_result;\n }","title":""},{"docid":"a9a67633636d0320eb8a92b4d5a154de","score":"0.6527428","text":"function getRaw()\n {\n return $this->raw;\n }","title":""},{"docid":"e3884e602e160f57d9a10873f4cd1910","score":"0.65199107","text":"public function getSingleResult()\n {\n }","title":""},{"docid":"8f9af841990c728aa99864b3d83c34c9","score":"0.6506277","text":"public function getResult() {\n return $this->_Result;\n }","title":""},{"docid":"37753c9770573927c296bc5bcfc1a7c3","score":"0.64886284","text":"public function raw();","title":""},{"docid":"37753c9770573927c296bc5bcfc1a7c3","score":"0.64886284","text":"public function raw();","title":""},{"docid":"5b5a0933c15dcda0afe32af3d37a21dc","score":"0.6471584","text":"public function getResult() \n {\n\t\t$res = $this->result;\n\t\tunset($this->result);\t\n\t\treturn $res;\n }","title":""},{"docid":"50f54bbbf62490bd19ca8bc790846d2b","score":"0.64685374","text":"public function result()\n\t\t{\n\n\t\t\t$result = $this->response->result();\n\n\t\t\treturn $result;\n\t\t}","title":""},{"docid":"2068db0c432ab08898db57316fa4c597","score":"0.64663166","text":"public function getResponseRaw()\n {\n return $this->responseRaw;\n }","title":""},{"docid":"2068db0c432ab08898db57316fa4c597","score":"0.64663166","text":"public function getResponseRaw()\n {\n return $this->responseRaw;\n }","title":""},{"docid":"d7c464b3661da85bf3b6462bf4493266","score":"0.6457883","text":"public function raw()\n {\n return $this->raw;\n }","title":""},{"docid":"4eebe1136184124ca3e0f668d409e9ef","score":"0.6449014","text":"public function getRaw()\n {\n return $this->raw;\n }","title":""},{"docid":"4eebe1136184124ca3e0f668d409e9ef","score":"0.6449014","text":"public function getRaw()\n {\n return $this->raw;\n }","title":""},{"docid":"5236b8fff8d2b5dd729690cce6ed60fa","score":"0.6445442","text":"public function getResult()\n {\n //do this only when the cmd is done well\n if (!$this->isSuccess())\n return;\n if ($this->subcmd == 'RESULT' && in_array($this->cmd, $this->rstNeeded)) {\n $this->result = $_POST['result'];\n }\n }","title":""},{"docid":"86e35b23e984279606c40c1165729f8d","score":"0.6423968","text":"function get_raw_data() {\n\t\treturn $this->data;\n\t}","title":""},{"docid":"8ae6e1664a918d8dc831ecf5fa74f39e","score":"0.64139026","text":"public function getRaw() {\n return $this->raw;\n }","title":""},{"docid":"c699a153259ba86d438af94ae5540c55","score":"0.64049846","text":"public function getResultHtml()\n {\n $query = Mage::helper('vubla')->getQueryText();\n \n $queryURL = Mage::helper('vubla')->getVublaURL() . urlencode($query);\n\n // Create the stream context\n $context = stream_context_create(array('http' => array('timeout' => 3))); // Timeout in seconds\n\t\t\n $contents = \"\";\t\t\t \n try {\n // Fetch the URL's contents\n\t @$contents = file_get_contents($queryURL, 0, $context);\n\t if (empty($contents)) Throw new Exception(\"empty\");\n\t \n\t \n } catch(Exception $e){\n\t Mage::app()->getResponse()->setRedirect(\n\t Mage::helper('vubla')->getOldResultUrl($query));\n\t //Mage::getUrl(\"myrouter/mycontroller/noview\"))\n\n }\n\n //$queryURL = \"http://rasmus.vubla.com/dev/search/?q=QUERY&host=everlight.dk&enable=1\";\n //$result = \"searchquery to call: \".$queryURL;\n //$result= file_get_contents($queryURL);\n return $contents;\n }","title":""}],"string":"[\n {\n \"docid\": \"fee6ca042cb7b7a7534ccb393ed8e0ce\",\n \"score\": \"0.8654125\",\n \"text\": \"public function getRawResult();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f060351cd064680258cf40af1011c87a\",\n \"score\": \"0.7553329\",\n \"text\": \"public function getRawResponse()\\n {\\n return $this->execute(false);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7266ed766ce3f05818f072be82ff0d1b\",\n \"score\": \"0.7162325\",\n \"text\": \"protected abstract function get_result();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74422aab3c769e622944c25d8648d60b\",\n \"score\": \"0.71161485\",\n \"text\": \"public function getRaw();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74422aab3c769e622944c25d8648d60b\",\n \"score\": \"0.71161485\",\n \"text\": \"public function getRaw();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74422aab3c769e622944c25d8648d60b\",\n \"score\": \"0.71161485\",\n \"text\": \"public function getRaw();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74422aab3c769e622944c25d8648d60b\",\n \"score\": \"0.71161485\",\n \"text\": \"public function getRaw();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ce3e19d04d2fc8b15486c273fd28b47\",\n \"score\": \"0.70984465\",\n \"text\": \"public function getResult()\\n {\\n return $this->get(self::_RESULT);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ce3e19d04d2fc8b15486c273fd28b47\",\n \"score\": \"0.70984465\",\n \"text\": \"public function getResult()\\n {\\n return $this->get(self::_RESULT);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ce3e19d04d2fc8b15486c273fd28b47\",\n \"score\": \"0.70984465\",\n \"text\": \"public function getResult()\\n {\\n return $this->get(self::_RESULT);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ce3e19d04d2fc8b15486c273fd28b47\",\n \"score\": \"0.70984465\",\n \"text\": \"public function getResult()\\n {\\n return $this->get(self::_RESULT);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8108bc9837d1b37cb06d6e5a28952a89\",\n \"score\": \"0.702069\",\n \"text\": \"public function get_raw_data() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdb173dbf94f9499cd0d8e68ffabb224\",\n \"score\": \"0.701663\",\n \"text\": \"public static function get_raw_data() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92307cb93946f90d45d89e4e64a9ba6c\",\n \"score\": \"0.6947413\",\n \"text\": \"protected function get_result()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92307cb93946f90d45d89e4e64a9ba6c\",\n \"score\": \"0.6947413\",\n \"text\": \"protected function get_result()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92307cb93946f90d45d89e4e64a9ba6c\",\n \"score\": \"0.6947413\",\n \"text\": \"protected function get_result()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92307cb93946f90d45d89e4e64a9ba6c\",\n \"score\": \"0.6947413\",\n \"text\": \"protected function get_result()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b4b536b3b247f98bccd25779dd8add3\",\n \"score\": \"0.69369394\",\n \"text\": \"private function result() {\\n return json_decode($this->result, true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74a11efb2d22366b04565b9f873e0650\",\n \"score\": \"0.69153315\",\n \"text\": \"function getResult()\\r\\n {\\r\\n return $this->result;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e9f647eadb4bec3b7e4bc1c9d08bcf5\",\n \"score\": \"0.6899217\",\n \"text\": \"public function getResult() {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1fe1c363cb0866cb9e5b92a068e11aa\",\n \"score\": \"0.68757766\",\n \"text\": \"function getResult() \\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0af7642e57f5d90939d6a3f9cc4012ea\",\n \"score\": \"0.6853757\",\n \"text\": \"function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc65d4f72eb538de65f645da21fbfee4\",\n \"score\": \"0.6841476\",\n \"text\": \"public function result() {\\n return $this->_result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0bbae86588669d7b1a23ec394c6a2ed6\",\n \"score\": \"0.68287283\",\n \"text\": \"public function result() {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19fdb233cd38b43994238f22b09b34cb\",\n \"score\": \"0.6797053\",\n \"text\": \"public function getResult() {\\r\\n return $this->_result;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcb0c0f041fd98d624ec9c2fb176e655\",\n \"score\": \"0.6796461\",\n \"text\": \"public function getResult() {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3264d3434e333075ab0f02db8298daba\",\n \"score\": \"0.67920727\",\n \"text\": \"public function getResult() {\\r\\n return $this->result;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"083e5453b3e5dfdbdcb41960d91ddbfb\",\n \"score\": \"0.67904484\",\n \"text\": \"public function result() {\\n\\t\\treturn $this->result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c560d7d9fd1865febb800ff8441f9ce5\",\n \"score\": \"0.67863214\",\n \"text\": \"public function getResult()\\r\\n {\\r\\n return $this->result;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c560d7d9fd1865febb800ff8441f9ce5\",\n \"score\": \"0.67863214\",\n \"text\": \"public function getResult()\\r\\n {\\r\\n return $this->result;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db97c24a75c5ca6bbcb8adcd3cd19d16\",\n \"score\": \"0.67765766\",\n \"text\": \"public function getResult(){\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db97c24a75c5ca6bbcb8adcd3cd19d16\",\n \"score\": \"0.67765766\",\n \"text\": \"public function getResult(){\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ffccddb8a021c52280aefebcbf3f42d\",\n \"score\": \"0.677622\",\n \"text\": \"function getResult() {\\n\\n return $this->result;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56f6e96b5bfcda8a98c5b9ae014a86f5\",\n \"score\": \"0.67714596\",\n \"text\": \"public function result()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56f6e96b5bfcda8a98c5b9ae014a86f5\",\n \"score\": \"0.67714596\",\n \"text\": \"public function result()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56f6e96b5bfcda8a98c5b9ae014a86f5\",\n \"score\": \"0.67714596\",\n \"text\": \"public function result()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56f6e96b5bfcda8a98c5b9ae014a86f5\",\n \"score\": \"0.67714596\",\n \"text\": \"public function result()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56f6e96b5bfcda8a98c5b9ae014a86f5\",\n \"score\": \"0.67714596\",\n \"text\": \"public function result()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"534b69a192282d44c8a81630bfbee06d\",\n \"score\": \"0.6769219\",\n \"text\": \"function getResult()\\n\\t{\\n\\t\\treturn $this->result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbd908e75b9f2ba0543369027d96e245\",\n \"score\": \"0.6745732\",\n \"text\": \"public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b15899ded5a041e6cc9f3265f4c0785a\",\n \"score\": \"0.6740582\",\n \"text\": \"public function get_result(){\\n\\t\\t\\treturn $this -> set_result();\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58e8bf90ffd157e0c455b5289ba4f0e4\",\n \"score\": \"0.6740346\",\n \"text\": \"public function getResult() {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58e8bf90ffd157e0c455b5289ba4f0e4\",\n \"score\": \"0.6740346\",\n \"text\": \"public function getResult() {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58e8bf90ffd157e0c455b5289ba4f0e4\",\n \"score\": \"0.6740346\",\n \"text\": \"public function getResult() {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58e8bf90ffd157e0c455b5289ba4f0e4\",\n \"score\": \"0.6740346\",\n \"text\": \"public function getResult() {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58e8bf90ffd157e0c455b5289ba4f0e4\",\n \"score\": \"0.6740346\",\n \"text\": \"public function getResult() {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"174253d2202e330d7f2f38036274b5e0\",\n \"score\": \"0.6736543\",\n \"text\": \"public function getResult()\\n {\\n return $this->_result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"174253d2202e330d7f2f38036274b5e0\",\n \"score\": \"0.6736543\",\n \"text\": \"public function getResult()\\n {\\n return $this->_result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"498a9f547f43d8c4b566d64c06e31664\",\n \"score\": \"0.671149\",\n \"text\": \"public function getResult(){\\r\\n \\r\\n return $this->result;\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d9ad58f3e69461e6a99423c4907cdb5\",\n \"score\": \"0.6701049\",\n \"text\": \"public function getResponse()\\n {\\n return $this->execute();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8dee40b86f879e2e865f74ef4ce5c75e\",\n \"score\": \"0.66913587\",\n \"text\": \"public function getResult() {\\n\\t\\treturn $this->_result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"467971416b713cecc8a500dcfddfca7c\",\n \"score\": \"0.66830117\",\n \"text\": \"public static function get_raw_data()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f6047126bc9f9f552990a648dacd480\",\n \"score\": \"0.66553575\",\n \"text\": \"public function get_raw_data()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f6047126bc9f9f552990a648dacd480\",\n \"score\": \"0.66553575\",\n \"text\": \"public function get_raw_data()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab4c201f141abd092f8f2b5b45cf2455\",\n \"score\": \"0.66455\",\n \"text\": \"public function result()\\n\\t{\\n\\t\\treturn $this->result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"799e72985588440b1f1ae899fc7c065f\",\n \"score\": \"0.66428727\",\n \"text\": \"final public function getResult()\\n {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db18051f5c33979237e5b873ca4286c6\",\n \"score\": \"0.660434\",\n \"text\": \"function getResult(): string {\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49846b29db39105ba44afd15b529e3ca\",\n \"score\": \"0.6603602\",\n \"text\": \"public function getResult()\\n\\t{\\n\\t\\treturn parent::getData()['RESULT'] ?? null;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a555d69282561706f5e6940eaa2b1cb0\",\n \"score\": \"0.6588059\",\n \"text\": \"public function get_result()\\n\\t\\t{\\n\\t\\t\\treturn $this->m_result;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b7fce5553b832b782bf545b71c7d6cc\",\n \"score\": \"0.65768564\",\n \"text\": \"public function getRawContent();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dcbf9a5d56ff9d793b7aeb19270ece27\",\n \"score\": \"0.65756464\",\n \"text\": \"public function getResult()\\n {\\n if (isset($this->_result)) {\\n return $this->_result;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"207a815058fcbaa1267e43be342837fa\",\n \"score\": \"0.65744\",\n \"text\": \"public function getResult();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"207a815058fcbaa1267e43be342837fa\",\n \"score\": \"0.65744\",\n \"text\": \"public function getResult();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"207a815058fcbaa1267e43be342837fa\",\n \"score\": \"0.65744\",\n \"text\": \"public function getResult();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"207a815058fcbaa1267e43be342837fa\",\n \"score\": \"0.65744\",\n \"text\": \"public function getResult();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"207a815058fcbaa1267e43be342837fa\",\n \"score\": \"0.65744\",\n \"text\": \"public function getResult();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cfbc18a298510fb252d2429450a0a81\",\n \"score\": \"0.6534868\",\n \"text\": \"public function getRawResult()\\n {\\n if (!is_array($this->_result)) {\\n throw new P4Cms_Diff_Exception(\\n \\\"Cannot get results. Results have not been set.\\\"\\n );\\n }\\n\\n return $this->_result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9a67633636d0320eb8a92b4d5a154de\",\n \"score\": \"0.6527428\",\n \"text\": \"function getRaw()\\n {\\n return $this->raw;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3884e602e160f57d9a10873f4cd1910\",\n \"score\": \"0.65199107\",\n \"text\": \"public function getSingleResult()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f9af841990c728aa99864b3d83c34c9\",\n \"score\": \"0.6506277\",\n \"text\": \"public function getResult() {\\n return $this->_Result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37753c9770573927c296bc5bcfc1a7c3\",\n \"score\": \"0.64886284\",\n \"text\": \"public function raw();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37753c9770573927c296bc5bcfc1a7c3\",\n \"score\": \"0.64886284\",\n \"text\": \"public function raw();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b5a0933c15dcda0afe32af3d37a21dc\",\n \"score\": \"0.6471584\",\n \"text\": \"public function getResult() \\n {\\n\\t\\t$res = $this->result;\\n\\t\\tunset($this->result);\\t\\n\\t\\treturn $res;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50f54bbbf62490bd19ca8bc790846d2b\",\n \"score\": \"0.64685374\",\n \"text\": \"public function result()\\n\\t\\t{\\n\\n\\t\\t\\t$result = $this->response->result();\\n\\n\\t\\t\\treturn $result;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2068db0c432ab08898db57316fa4c597\",\n \"score\": \"0.64663166\",\n \"text\": \"public function getResponseRaw()\\n {\\n return $this->responseRaw;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2068db0c432ab08898db57316fa4c597\",\n \"score\": \"0.64663166\",\n \"text\": \"public function getResponseRaw()\\n {\\n return $this->responseRaw;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7c464b3661da85bf3b6462bf4493266\",\n \"score\": \"0.6457883\",\n \"text\": \"public function raw()\\n {\\n return $this->raw;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4eebe1136184124ca3e0f668d409e9ef\",\n \"score\": \"0.6449014\",\n \"text\": \"public function getRaw()\\n {\\n return $this->raw;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4eebe1136184124ca3e0f668d409e9ef\",\n \"score\": \"0.6449014\",\n \"text\": \"public function getRaw()\\n {\\n return $this->raw;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5236b8fff8d2b5dd729690cce6ed60fa\",\n \"score\": \"0.6445442\",\n \"text\": \"public function getResult()\\n {\\n //do this only when the cmd is done well\\n if (!$this->isSuccess())\\n return;\\n if ($this->subcmd == 'RESULT' && in_array($this->cmd, $this->rstNeeded)) {\\n $this->result = $_POST['result'];\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86e35b23e984279606c40c1165729f8d\",\n \"score\": \"0.6423968\",\n \"text\": \"function get_raw_data() {\\n\\t\\treturn $this->data;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ae6e1664a918d8dc831ecf5fa74f39e\",\n \"score\": \"0.64139026\",\n \"text\": \"public function getRaw() {\\n return $this->raw;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c699a153259ba86d438af94ae5540c55\",\n \"score\": \"0.64049846\",\n \"text\": \"public function getResultHtml()\\n {\\n $query = Mage::helper('vubla')->getQueryText();\\n \\n $queryURL = Mage::helper('vubla')->getVublaURL() . urlencode($query);\\n\\n // Create the stream context\\n $context = stream_context_create(array('http' => array('timeout' => 3))); // Timeout in seconds\\n\\t\\t\\n $contents = \\\"\\\";\\t\\t\\t \\n try {\\n // Fetch the URL's contents\\n\\t @$contents = file_get_contents($queryURL, 0, $context);\\n\\t if (empty($contents)) Throw new Exception(\\\"empty\\\");\\n\\t \\n\\t \\n } catch(Exception $e){\\n\\t Mage::app()->getResponse()->setRedirect(\\n\\t Mage::helper('vubla')->getOldResultUrl($query));\\n\\t //Mage::getUrl(\\\"myrouter/mycontroller/noview\\\"))\\n\\n }\\n\\n //$queryURL = \\\"http://rasmus.vubla.com/dev/search/?q=QUERY&host=everlight.dk&enable=1\\\";\\n //$result = \\\"searchquery to call: \\\".$queryURL;\\n //$result= file_get_contents($queryURL);\\n return $contents;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":723,"cells":{"query_id":{"kind":"string","value":"06b048169d6000dd8f2954c77b1ec598"},"query":{"kind":"string","value":"Show the form for creating a new resource."},"positive_passages":{"kind":"list like","value":[{"docid":"3466d9dff55537179a6b4dbf5ccab133","score":"0.0","text":"public function create()\n {\n $page_title = 'Tambah Master Kupon';\n return view('view_kupon.create',compact('page_title'));\n }","title":""}],"string":"[\n {\n \"docid\": \"3466d9dff55537179a6b4dbf5ccab133\",\n \"score\": \"0.0\",\n \"text\": \"public function create()\\n {\\n $page_title = 'Tambah Master Kupon';\\n return view('view_kupon.create',compact('page_title'));\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"735e465640db5c659ac193ab8af1f08c","score":"0.75663006","text":"public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t}","title":""},{"docid":"c22dae1333d29c28ed855dcb7f069232","score":"0.7491396","text":"public function create()\n {\n return view('resources.create');\n }","title":""},{"docid":"1f9733369c1aaf55c73aa4d1a8a80882","score":"0.74566424","text":"public function create()\n {\n\n return view('resources.create');\n\n }","title":""},{"docid":"1da53c4d224bfa3bc44c0fabd927bedd","score":"0.7455584","text":"public function create()\n {\n return view ('rol.form_create');\n }","title":""},{"docid":"4c4b7c47a2d71e26b29b9caea091a07c","score":"0.7393118","text":"public function showCreateForm()\n {\n $this->authorize('create', Project::class);\n\n return view('project.create', [\n 'action' => 'create',\n ]);\n }","title":""},{"docid":"edabb98341a0b5aadd47c2864942b8db","score":"0.7339739","text":"protected function create()\n {\n $form = Form::create($this->resource);\n $model = $form->model;\n\n $model->hasAccessOrFail('create');\n\n $model->fill($this->getOldInput());\n\n $form->fields()->each(function (Field $field) use (&$model) {\n $field->setValue($model);\n });\n\n return view('crud::form.create', compact('form'));\n }","title":""},{"docid":"4734584f2f8340a42973a0d555da6c67","score":"0.7328834","text":"public function create()\n {\n return view(\"superadmin.form\");\n }","title":""},{"docid":"10d532d72b585493a6ca515a12bc3a2c","score":"0.7321179","text":"protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}","title":""},{"docid":"9814fd9ae63509e6eb41bf23f7a94615","score":"0.72809595","text":"public function create()\n {\n return view('forms.create');\n }","title":""},{"docid":"6ed61a57fb61b517537e754054cffc2f","score":"0.7257705","text":"public function create()\n {\n return view(\"stok.form\");\n }","title":""},{"docid":"d777482ca48a952bda74d0486cdad76a","score":"0.7237927","text":"public function create()\n {\n return \"Here is the creating form page.\";\n }","title":""},{"docid":"8a257056a97a8ef04b6027c8bfb8cad1","score":"0.723185","text":"public function create()\n {\n\n $title = 'Add '. $this->getName();\n $form = $this->form($this->getFormClass(), [\n 'method' => 'POST',\n 'url' => route($this->getRouteFor('store')),\n ]);\n return view('.admin.form', compact('form', 'title'));\n }","title":""},{"docid":"f5f050d80230f2f0b6313a13b65e7a0b","score":"0.72228223","text":"public function newAction()\n {\n $entity = new Faq();\n $form = $this->createCreateForm($entity);\n\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \n $form->add('answer', 'text', array('label' => 'Give an answer :'));\n $form->add('submit', 'submit', array('label' => 'Submit question'));\n\n return $this->render('FaqBundle:Faq:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"755e91a474eae625dfda22659e4c1f6c","score":"0.72203404","text":"public function create()\n {\n return view('form.create');\n }","title":""},{"docid":"4b9c0332c0bc5feb4fa5c4c15ff4cda0","score":"0.722023","text":"public function create()\n {\n $this->authorize('create', $this->getResourceModel());\n\n $class = $this->getResourceModel();\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\n 'record' => new $class(),\n ] + $this->resourceData()));\n }","title":""},{"docid":"7e6cbda13a4d6999c8e363f25258eeb1","score":"0.7208485","text":"public function showCreateForm()\n {\n return view('user.create');\n }","title":""},{"docid":"85bc1c405768493e40df217a0040f018","score":"0.7191366","text":"function showCreateForm(){\n return view('admin.Direktori.Pendeta.create');\n }","title":""},{"docid":"9493a84894964b34fd6021b3786bcc7a","score":"0.71894634","text":"public function create()\n {\n return view('crops.forms.create');\n }","title":""},{"docid":"68716ed8c8a7c02d13766dd274f478a3","score":"0.718268","text":"public function create()\n {\n return view('user_resources/create');\n }","title":""},{"docid":"643073da4582f0c5ee209f1f696bb305","score":"0.7166686","text":"public function create()\n {\n return view('admin/records/forms/record-create-form');\n }","title":""},{"docid":"ca8a62edbc9efc96246dc89065570720","score":"0.71638685","text":"public function newAction()\n {\n $this->loggerStdout->log('UsersController: display the creation form');\n\n\n }","title":""},{"docid":"86e44150333771a80ff3634ffc76f344","score":"0.71529675","text":"public function create()\n {\n return view('dashboard.form.create');\n }","title":""},{"docid":"75889c35cd5f200bf02a5b21774293e1","score":"0.7137003","text":"public function create()\n {\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n $this->data['category'] = $this->getModelArray($this->modelCategory);\n $this->data['province'] = $this->getModelArray($this->modelProvince);\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\n $this->data['ward'] = $this->getModelArray($this->modelWard);\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\n\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\n }","title":""},{"docid":"0a067c68f8000d9eb913daf36e5e607c","score":"0.712034","text":"public function create()\n {\n return view('FullForm.create');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"c88daeaad1f2ef73dd9534351ceea67a","score":"0.70962554","text":"public function newAction()\n {\n $entity = new FormEntity();\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\n $form = $this->createCreateForm($entity);\n\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"c27004d00e3f9afb85f74623ec456ca9","score":"0.708025","text":"public function create()\n {\n //\n return view('form');\n }","title":""},{"docid":"856274cb86788ad9604003f12dd5060c","score":"0.7073722","text":"public function create()\n {\n return view('carusel.new');\n }","title":""},{"docid":"7545e6950b9a4b4ee7a1ca28789b55aa","score":"0.7072655","text":"public function createAction ()\n\t{\n\t\t$this->view->form = $this->_form;\n\t\t$this->view->render('signin', 'create');\n\t}","title":""},{"docid":"8e0fde88926c98fb2c54ba67ab5b36a7","score":"0.7061749","text":"public function create()\n\t{\n\t\treturn View::make('librarians.create');\n\t}","title":""},{"docid":"345c70747deda30c3482e759c25c4d12","score":"0.706081","text":"public function create()\n {\n return view('passenger.forms.create');\n }","title":""},{"docid":"2b41dd9ed0cf1461dd65f8e05b0a94a1","score":"0.70571953","text":"public function create()\n {\n return $this->showForm();\n }","title":""},{"docid":"20ab9d62fc4da5013c56daa9183bfe28","score":"0.70571035","text":"public function create()\n {\n return view('admin.client.form');\n }","title":""},{"docid":"b7f63db5c5ecb7bba494b8a81ce69874","score":"0.70475084","text":"public function create(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }","title":""},{"docid":"8f53ed51f8136e8e32a2c0525120a50f","score":"0.7042422","text":"public function create()\n {\n //\n\n \n return view('student/ResourceStd');\n\n }","title":""},{"docid":"f1f40cbb0cad3cf320b4c0ec09b3b428","score":"0.7040213","text":"public function create()\n {\n return view('form');\n\n }","title":""},{"docid":"643fd44e4ced88a8aac481ced428c5ca","score":"0.70261294","text":"public function create()\n {\n $title = 'CRIAR REGISTRO';\n return view('forms.create',['title' => $title]);\n }","title":""},{"docid":"40e93c68e66b0c86108e5ae59cc176d2","score":"0.70215225","text":"public function newAction()\n {\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\n }","title":""},{"docid":"8074165780da4d1be303d3e9d8c535ba","score":"0.7012196","text":"public function create()\n {\n return view ('owner/form');\n }","title":""},{"docid":"06af90c4292c136aaaf9329cfae0b3fc","score":"0.70115083","text":"public function create()\r\n {\r\n //mengarahkan ke form\r\n return view('rental.form');\r\n }","title":""},{"docid":"248b476c0f07013b389c79c904231f2a","score":"0.70046955","text":"public function create()\n {\n return view('admin.car.add');\n }","title":""},{"docid":"75fb4bc6a7a5df1f1f5cd380b0cd4aec","score":"0.7000195","text":"public function create()\n {\n //New Property form\n return view('properties.addproperty');\n }","title":""},{"docid":"c6f4cc7fdd05567403f39d82ae477eb4","score":"0.6994647","text":"public function create()\n\t{\n\t\treturn view('kasus.create');\n\t}","title":""},{"docid":"753f9bd767a3748b9d6409cb957dc41f","score":"0.6994326","text":"public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->projectForm = $this->service->getFormForCreating($action);\n }","title":""},{"docid":"7fdab24f12d98bab46a40db3c2f06831","score":"0.69885707","text":"public function create()\n\t{\n\t\treturn View::make('back_setup/ProductForm');\n\t}","title":""},{"docid":"355b502cb4384aeb8c0d1322a57b7677","score":"0.69879013","text":"public function create()\n {\n return view ('show.create', [\n ]); \n }","title":""},{"docid":"afec885a1ddf009d317c5bca27be7983","score":"0.6985705","text":"public function create()\n {\n\t\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\n }","title":""},{"docid":"93cdfcc841a0d10e976bbc17fe7020ec","score":"0.6977717","text":"public function create()\n {\n return view('rombel.create');\n }","title":""},{"docid":"eb3ba5c68f25897de6ed50346b9959f7","score":"0.6976043","text":"public function create()\n {\n $crud = crud_entry(new \\App\\Employee);\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }","title":""},{"docid":"27f66e57741013d1d7bd227b0a1ae6cc","score":"0.6969905","text":"public function create()\n {\n return view('radars/create');\n }","title":""},{"docid":"4e37d311d6990013b0ed72549d9fd35f","score":"0.69635546","text":"public function create()\n {\n return view('product.form');\n }","title":""},{"docid":"58119c678c7b859b3d2fcb9d4e2544e9","score":"0.69620776","text":"public function create()\n {\n return view('forms.girders.create');\n }","title":""},{"docid":"57611366e6e3194f52047893b6a260ec","score":"0.6958746","text":"public function create()\n {\n \tAppGranted::grantedAccess('add', true);\n $data['module_title'] = \"Role\";\n $data['action'] = route('kantor.store');\n $data['action_type'] = \"add\";\n\n $data['breadcrumb'] = [ \n ['title' => 'Master Data','url' => '#'],\n ['title' => 'Kantor','url' => 'kantor'],\n ['title' => 'form','url' => 'form']\n ];\n\n $data['redirect'] = route(\"kantor.create\");\n \n return view('kantor::kantor_form',$data);\n }","title":""},{"docid":"6e09ea0495ecf33b6615199f96a87dd9","score":"0.6958075","text":"public function create()\n {\n return view('inventaris.create');\n }","title":""},{"docid":"cfb06a7f594e86d7fe22432b5bd18371","score":"0.6957784","text":"public function newAction()\n {\n $entity = new Ministro();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"f0a4e435f6bebfce6162cc1be7c7ee0f","score":"0.6954809","text":"public function create()\n {\n return view('conceptos.create');\n }","title":""},{"docid":"9cc1ebbeb06fe2564e0fa603d2c72f75","score":"0.69542176","text":"public function create()\n {\n //\n return view('product.form');\n }","title":""},{"docid":"ad86bd025139be91b2df85c83f79d4bd","score":"0.69525295","text":"public function create()\n {\n return view('syllabus.create');\n }","title":""},{"docid":"7b8c9d5cbe582eab2f28c216421a2719","score":"0.6951232","text":"public function create()\n {\n return view('proyek.add');\n }","title":""},{"docid":"29d1eb6a37de9bf5891c3b5b4ef4fa2d","score":"0.69450635","text":"public function newForm()\n {\n $this->pageTitle = \"Création d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n parent::newForm();\n }","title":""},{"docid":"353155b973a25b62f33cce0b6600b99c","score":"0.693502","text":"public function create()\n {\n $data = array(\n 'title' => 'Ingreso de un nuevo Sector',\n 'message' => 'return confirm(\"¿Esta seguro que desea guardar el sector?\")',\n 'method' => 'POST',\n );\n return view('sector.form')\n ->with('data', $data);\n }","title":""},{"docid":"7c12821aa5d613a86cc8ba0cf190e6fd","score":"0.6930994","text":"public function create()\n {\n return view('tutores.new');\n }","title":""},{"docid":"07e409b45065624d003704ab3b447aec","score":"0.69273114","text":"public function create()\n {\n return view('admin.product.form');\n }","title":""},{"docid":"60c9cc4899b058bc51c74601c8025ebe","score":"0.6925751","text":"public function create()\n {\n return view('adminCreateForm');\n }","title":""},{"docid":"466006539e9b1da8c7c2e06a069c4e2e","score":"0.6921871","text":"public function create()\n {\n return view('layout_admin.thenew.create_new');\n }","title":""},{"docid":"38a6849d5b56a77b178a1fc8297c2e4e","score":"0.69218206","text":"public function create()\n\t{\n\t\treturn view('information.create');\n\t}","title":""},{"docid":"a59dfad08f7be5f4bb5d898d16a6d3a3","score":"0.6919321","text":"public function newAction()\n {\n $entity = new Rector();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"4bf33424414f342096092b367153c3ff","score":"0.6918515","text":"public function create()\n {\n return view('webinars.create');\n }","title":""},{"docid":"1b49a8bc053be1715bbf5620cf797e18","score":"0.69184965","text":"public function create()\n\t{\n\t\treturn View::make('product.create'); //form to create new product \n\t}","title":""},{"docid":"27e5069596828984f14a92c012c1e448","score":"0.6914329","text":"public function newAction()\n {\n $entity = new Inicio();\n $form = $this->createForm(new InicioType(), $entity);\n\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"e90d65170f9bc3dd1e2b969826600c53","score":"0.6914271","text":"public function create()\n {\n return view('ekskul.create');\n }","title":""},{"docid":"51a5131df9fc2dcd5b65b5ca8aa614d0","score":"0.69092304","text":"public function create()\n {\n //To show the required create page when its clicked\n return view('admin.create');\n \n \n }","title":""},{"docid":"4b3f5241c4a2f638b9ee19747079b7a2","score":"0.69069797","text":"public function create()\n {\n return view('stus.add');\n }","title":""},{"docid":"ecc913c81504bfd8529f7b7feaef7080","score":"0.69047576","text":"public function create(){\n return view('person/form', ['action'=>'create']);\n }","title":""},{"docid":"64d616e79a29573ea35b962756917c05","score":"0.69007623","text":"public function create()\n {\n\t\t$d['action'] = route('product.store');\n\t\treturn view('back.pages.product.form', $d);\n }","title":""},{"docid":"61066352fa31a37b0f1d8bc9fd229ea9","score":"0.6897235","text":"public function create()\n {\n /* $this->authorize('create'); */\n return view('refugio.refugioForm');\n }","title":""},{"docid":"70820d35b4d8e319baa89b6f91a3d029","score":"0.6895603","text":"public function newAction() {\n $entity = new Recommandation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"619fa64afd3457bdc8d1c1a041acff47","score":"0.68903565","text":"public function create()\n {\n return View(\"$this->view_folder.form\", $this->data);\n }","title":""},{"docid":"09fab99adf688ea100aa90694eab5889","score":"0.6888845","text":"public function create()\n {\n return view(\"Amenity::add\");\n }","title":""},{"docid":"bdb0161d2f2f44cdaea93bf890a4c02e","score":"0.68880934","text":"public function create()\n {\n return view(\"create\");\n }","title":""},{"docid":"9664795bf81cca0f3e65d94f0f595082","score":"0.6880484","text":"public function create()\n\t{\n\t\treturn view('questao.create');\n\t}","title":""},{"docid":"623f899bed6c6f380a03ffc99508b73d","score":"0.6879059","text":"public function newAction()\n {\n $entity = new Candidato();\n $form = $this->createForm(new CandidatoType(), $entity);\n\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"a3b3bbcce8f8a6239dadc2917240252b","score":"0.6878254","text":"public function showForm()\n {\n return view('AdminView.create');\n }","title":""},{"docid":"06fe0499ccb2038bd9c25e7ef14289e2","score":"0.68774086","text":"public function create()\n {\n //Return item details form\n return view('home.create');\n }","title":""},{"docid":"47e62b5d5e96751bc9e8ab90f94e7ea4","score":"0.6876466","text":"public function create()\n {\n return view('manager.new');\n }","title":""},{"docid":"3557ca31989d52aabfc94b29a8b4779e","score":"0.6874666","text":"public function create()\n {\n return view('hari.create');\n }","title":""},{"docid":"b3998fa6dce49f97902e942f97d98ede","score":"0.687325","text":"public function newAction()\n {\n $entity = new Escuelas();\n $form = $this->createForm(new EscuelasType(), $entity);\n\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"9f18b1b1a35a9af23eb1d4bbdba665f8","score":"0.68696606","text":"public function create()\n {\n return view('admin.car_com.create');\n }","title":""},{"docid":"96c76b820b73f95fa584de07ad04ad0a","score":"0.6865675","text":"public function create()\n {\n return view('nasabah/addnasabah');\n }","title":""},{"docid":"e3cfac3178d9c5cb5ab322fa4785604c","score":"0.6862222","text":"public function create()\n {\n return view('Prenda.create');\n }","title":""},{"docid":"f4672fc37d04d0e3bef9bc80e57323e9","score":"0.6860329","text":"public function create()\n {\n //\n $question= new Question();\n return view('dashboard.question.form', [\n \"question\" => $question\n ]);\n }","title":""},{"docid":"451c07a3106f3c6e3d62757717bfa763","score":"0.6860251","text":"public function create()\n\t{\n\t\treturn view('horas.create');\n\t}","title":""},{"docid":"95a4952039c4b40b058cc67fba7cd2d7","score":"0.68573785","text":"public function create () {\n $course = new Course();\n $btnText = __(\"Enviar curso para revisión\");\n\n return view('courses.form', compact('course', 'btnText'));\n }","title":""},{"docid":"ca80651480f4bbbd35305ceefd136182","score":"0.6853353","text":"public function newAction()\n {\n $entity = new Alumni();\n $form = $this->createForm(new AlumniType(), $entity);\n\n return $this->renderTwig('Master/Alumni:form', array(\n 'entity' => $entity,\n 'edit_form' => $form->createView()\n ));\n }","title":""},{"docid":"d58534453dca5d05eb6bf9759a643eaa","score":"0.68512565","text":"public function create()\n\t{\n\t\treturn View::make('create');\n\t}","title":""},{"docid":"783d7ee63b2e492087fc641fa43b1ef1","score":"0.684831","text":"public function create()\n\t{\n\t\treturn View::make('fornecedors.create');\n\t}","title":""},{"docid":"2d13aa784138fe895746ebaa36bda96f","score":"0.6847265","text":"public function create()\n {\n return view('hr.create');\n }","title":""},{"docid":"1406c82292b4f07e3eecfee633a3f557","score":"0.68437195","text":"public function create()\n {\n return view('admin.company.form', [\n 'company' => null,\n 'route' => 'admin.company.store',\n 'method' => 'POST'\n ]);\n }","title":""},{"docid":"b1d677deef4bb08323db61d502e8dcee","score":"0.6843096","text":"public function create()\n {\n return view('backend.book.create');\n }","title":""}],"string":"[\n {\n \"docid\": \"735e465640db5c659ac193ab8af1f08c\",\n \"score\": \"0.75663006\",\n \"text\": \"public function createAction ()\\n\\t{\\n\\t\\t$this->view->form = $this->_form;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c22dae1333d29c28ed855dcb7f069232\",\n \"score\": \"0.7491396\",\n \"text\": \"public function create()\\n {\\n return view('resources.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f9733369c1aaf55c73aa4d1a8a80882\",\n \"score\": \"0.74566424\",\n \"text\": \"public function create()\\n {\\n\\n return view('resources.create');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1da53c4d224bfa3bc44c0fabd927bedd\",\n \"score\": \"0.7455584\",\n \"text\": \"public function create()\\n {\\n return view ('rol.form_create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c4b7c47a2d71e26b29b9caea091a07c\",\n \"score\": \"0.7393118\",\n \"text\": \"public function showCreateForm()\\n {\\n $this->authorize('create', Project::class);\\n\\n return view('project.create', [\\n 'action' => 'create',\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edabb98341a0b5aadd47c2864942b8db\",\n \"score\": \"0.7339739\",\n \"text\": \"protected function create()\\n {\\n $form = Form::create($this->resource);\\n $model = $form->model;\\n\\n $model->hasAccessOrFail('create');\\n\\n $model->fill($this->getOldInput());\\n\\n $form->fields()->each(function (Field $field) use (&$model) {\\n $field->setValue($model);\\n });\\n\\n return view('crud::form.create', compact('form'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4734584f2f8340a42973a0d555da6c67\",\n \"score\": \"0.7328834\",\n \"text\": \"public function create()\\n {\\n return view(\\\"superadmin.form\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10d532d72b585493a6ca515a12bc3a2c\",\n \"score\": \"0.7321179\",\n \"text\": \"protected function showCreateForm()\\n\\t{\\n\\n\\t\\treturn Response::view('adm/IAS/create');\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9814fd9ae63509e6eb41bf23f7a94615\",\n \"score\": \"0.72809595\",\n \"text\": \"public function create()\\n {\\n return view('forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ed61a57fb61b517537e754054cffc2f\",\n \"score\": \"0.7257705\",\n \"text\": \"public function create()\\n {\\n return view(\\\"stok.form\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d777482ca48a952bda74d0486cdad76a\",\n \"score\": \"0.7237927\",\n \"text\": \"public function create()\\n {\\n return \\\"Here is the creating form page.\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a257056a97a8ef04b6027c8bfb8cad1\",\n \"score\": \"0.723185\",\n \"text\": \"public function create()\\n {\\n\\n $title = 'Add '. $this->getName();\\n $form = $this->form($this->getFormClass(), [\\n 'method' => 'POST',\\n 'url' => route($this->getRouteFor('store')),\\n ]);\\n return view('.admin.form', compact('form', 'title'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5f050d80230f2f0b6313a13b65e7a0b\",\n \"score\": \"0.72228223\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Faq();\\n $form = $this->createCreateForm($entity);\\n\\n $form->add('question', 'text', array('label' => 'Ask Your Question :')); \\n $form->add('answer', 'text', array('label' => 'Give an answer :'));\\n $form->add('submit', 'submit', array('label' => 'Submit question'));\\n\\n return $this->render('FaqBundle:Faq:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"755e91a474eae625dfda22659e4c1f6c\",\n \"score\": \"0.72203404\",\n \"text\": \"public function create()\\n {\\n return view('form.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b9c0332c0bc5feb4fa5c4c15ff4cda0\",\n \"score\": \"0.722023\",\n \"text\": \"public function create()\\n {\\n $this->authorize('create', $this->getResourceModel());\\n\\n $class = $this->getResourceModel();\\n return view($this->getResourceCreatePath(), $this->filterCreateViewData([\\n 'record' => new $class(),\\n ] + $this->resourceData()));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e6cbda13a4d6999c8e363f25258eeb1\",\n \"score\": \"0.7208485\",\n \"text\": \"public function showCreateForm()\\n {\\n return view('user.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85bc1c405768493e40df217a0040f018\",\n \"score\": \"0.7191366\",\n \"text\": \"function showCreateForm(){\\n return view('admin.Direktori.Pendeta.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9493a84894964b34fd6021b3786bcc7a\",\n \"score\": \"0.71894634\",\n \"text\": \"public function create()\\n {\\n return view('crops.forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68716ed8c8a7c02d13766dd274f478a3\",\n \"score\": \"0.718268\",\n \"text\": \"public function create()\\n {\\n return view('user_resources/create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"643073da4582f0c5ee209f1f696bb305\",\n \"score\": \"0.7166686\",\n \"text\": \"public function create()\\n {\\n return view('admin/records/forms/record-create-form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca8a62edbc9efc96246dc89065570720\",\n \"score\": \"0.71638685\",\n \"text\": \"public function newAction()\\n {\\n $this->loggerStdout->log('UsersController: display the creation form');\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86e44150333771a80ff3634ffc76f344\",\n \"score\": \"0.71529675\",\n \"text\": \"public function create()\\n {\\n return view('dashboard.form.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75889c35cd5f200bf02a5b21774293e1\",\n \"score\": \"0.7137003\",\n \"text\": \"public function create()\\n {\\n $this->data['titlePage'] = trans('admin.obj_new',['obj' => trans('admin.'.$this->titleSingle)]);\\n $breadcrumbs = array();\\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconNew ];\\n $this->data['breadcrumbs'] = $breadcrumbs;\\n $this->data['category'] = $this->getModelArray($this->modelCategory);\\n $this->data['province'] = $this->getModelArray($this->modelProvince);\\n $this->data['district'] = $this->getModelArray($this->modelDistrict);\\n $this->data['ward'] = $this->getModelArray($this->modelWard);\\n $this->data['direction'] = $this->getModelArray($this->modelDirection);\\n\\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a067c68f8000d9eb913daf36e5e607c\",\n \"score\": \"0.712034\",\n \"text\": \"public function create()\\n {\\n return view('FullForm.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c88daeaad1f2ef73dd9534351ceea67a\",\n \"score\": \"0.70962554\",\n \"text\": \"public function newAction()\\n {\\n $entity = new FormEntity();\\n $entity->setTemplate('keltanasTrackingBundle:Form:form.html.twig');\\n $form = $this->createCreateForm($entity);\\n\\n return $this->render('keltanasTrackingBundle:Form:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c27004d00e3f9afb85f74623ec456ca9\",\n \"score\": \"0.708025\",\n \"text\": \"public function create()\\n {\\n //\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"856274cb86788ad9604003f12dd5060c\",\n \"score\": \"0.7073722\",\n \"text\": \"public function create()\\n {\\n return view('carusel.new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7545e6950b9a4b4ee7a1ca28789b55aa\",\n \"score\": \"0.7072655\",\n \"text\": \"public function createAction ()\\n\\t{\\n\\t\\t$this->view->form = $this->_form;\\n\\t\\t$this->view->render('signin', 'create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e0fde88926c98fb2c54ba67ab5b36a7\",\n \"score\": \"0.7061749\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('librarians.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"345c70747deda30c3482e759c25c4d12\",\n \"score\": \"0.706081\",\n \"text\": \"public function create()\\n {\\n return view('passenger.forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b41dd9ed0cf1461dd65f8e05b0a94a1\",\n \"score\": \"0.70571953\",\n \"text\": \"public function create()\\n {\\n return $this->showForm();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20ab9d62fc4da5013c56daa9183bfe28\",\n \"score\": \"0.70571035\",\n \"text\": \"public function create()\\n {\\n return view('admin.client.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7f63db5c5ecb7bba494b8a81ce69874\",\n \"score\": \"0.70475084\",\n \"text\": \"public function create(AdminResource $resource)\\n {\\n $form = $resource->getForm();\\n\\n return view('admin::resource.form', compact('form'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f53ed51f8136e8e32a2c0525120a50f\",\n \"score\": \"0.7042422\",\n \"text\": \"public function create()\\n {\\n //\\n\\n \\n return view('student/ResourceStd');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1f40cbb0cad3cf320b4c0ec09b3b428\",\n \"score\": \"0.7040213\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"643fd44e4ced88a8aac481ced428c5ca\",\n \"score\": \"0.70261294\",\n \"text\": \"public function create()\\n {\\n $title = 'CRIAR REGISTRO';\\n return view('forms.create',['title' => $title]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40e93c68e66b0c86108e5ae59cc176d2\",\n \"score\": \"0.70215225\",\n \"text\": \"public function newAction()\\n {\\n $this->view->setVar('form', new ClientForm(null, ['edit' => false]));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8074165780da4d1be303d3e9d8c535ba\",\n \"score\": \"0.7012196\",\n \"text\": \"public function create()\\n {\\n return view ('owner/form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06af90c4292c136aaaf9329cfae0b3fc\",\n \"score\": \"0.70115083\",\n \"text\": \"public function create()\\r\\n {\\r\\n //mengarahkan ke form\\r\\n return view('rental.form');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"248b476c0f07013b389c79c904231f2a\",\n \"score\": \"0.70046955\",\n \"text\": \"public function create()\\n {\\n return view('admin.car.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75fb4bc6a7a5df1f1f5cd380b0cd4aec\",\n \"score\": \"0.7000195\",\n \"text\": \"public function create()\\n {\\n //New Property form\\n return view('properties.addproperty');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6f4cc7fdd05567403f39d82ae477eb4\",\n \"score\": \"0.6994647\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('kasus.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"753f9bd767a3748b9d6409cb957dc41f\",\n \"score\": \"0.6994326\",\n \"text\": \"public function createAction()\\n {\\n $action = $this->view->url(['action' => 'save'], 'controllers');\\n $this->view->projectForm = $this->service->getFormForCreating($action);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fdab24f12d98bab46a40db3c2f06831\",\n \"score\": \"0.69885707\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('back_setup/ProductForm');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"355b502cb4384aeb8c0d1322a57b7677\",\n \"score\": \"0.69879013\",\n \"text\": \"public function create()\\n {\\n return view ('show.create', [\\n ]); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afec885a1ddf009d317c5bca27be7983\",\n \"score\": \"0.6985705\",\n \"text\": \"public function create()\\n {\\n\\t\\treturn view('admin.pages.supplier-form-create', ['page' => 'supplier']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93cdfcc841a0d10e976bbc17fe7020ec\",\n \"score\": \"0.6977717\",\n \"text\": \"public function create()\\n {\\n return view('rombel.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb3ba5c68f25897de6ed50346b9959f7\",\n \"score\": \"0.6976043\",\n \"text\": \"public function create()\\n {\\n $crud = crud_entry(new \\\\App\\\\Employee);\\n\\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27f66e57741013d1d7bd227b0a1ae6cc\",\n \"score\": \"0.6969905\",\n \"text\": \"public function create()\\n {\\n return view('radars/create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e37d311d6990013b0ed72549d9fd35f\",\n \"score\": \"0.69635546\",\n \"text\": \"public function create()\\n {\\n return view('product.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58119c678c7b859b3d2fcb9d4e2544e9\",\n \"score\": \"0.69620776\",\n \"text\": \"public function create()\\n {\\n return view('forms.girders.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57611366e6e3194f52047893b6a260ec\",\n \"score\": \"0.6958746\",\n \"text\": \"public function create()\\n {\\n \\tAppGranted::grantedAccess('add', true);\\n $data['module_title'] = \\\"Role\\\";\\n $data['action'] = route('kantor.store');\\n $data['action_type'] = \\\"add\\\";\\n\\n $data['breadcrumb'] = [ \\n ['title' => 'Master Data','url' => '#'],\\n ['title' => 'Kantor','url' => 'kantor'],\\n ['title' => 'form','url' => 'form']\\n ];\\n\\n $data['redirect'] = route(\\\"kantor.create\\\");\\n \\n return view('kantor::kantor_form',$data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e09ea0495ecf33b6615199f96a87dd9\",\n \"score\": \"0.6958075\",\n \"text\": \"public function create()\\n {\\n return view('inventaris.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cfb06a7f594e86d7fe22432b5bd18371\",\n \"score\": \"0.6957784\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Ministro();\\n $form = $this->createCreateForm($entity);\\n\\n return $this->render('ParroquiaCertificadoBundle:Ministro:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0a4e435f6bebfce6162cc1be7c7ee0f\",\n \"score\": \"0.6954809\",\n \"text\": \"public function create()\\n {\\n return view('conceptos.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cc1ebbeb06fe2564e0fa603d2c72f75\",\n \"score\": \"0.69542176\",\n \"text\": \"public function create()\\n {\\n //\\n return view('product.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad86bd025139be91b2df85c83f79d4bd\",\n \"score\": \"0.69525295\",\n \"text\": \"public function create()\\n {\\n return view('syllabus.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b8c9d5cbe582eab2f28c216421a2719\",\n \"score\": \"0.6951232\",\n \"text\": \"public function create()\\n {\\n return view('proyek.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29d1eb6a37de9bf5891c3b5b4ef4fa2d\",\n \"score\": \"0.69450635\",\n \"text\": \"public function newForm()\\n {\\n $this->pageTitle = \\\"Création d'une question\\\";\\n\\n //initialisation des selects list\\n $this->initSelectList();\\n\\n parent::newForm();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"353155b973a25b62f33cce0b6600b99c\",\n \"score\": \"0.693502\",\n \"text\": \"public function create()\\n {\\n $data = array(\\n 'title' => 'Ingreso de un nuevo Sector',\\n 'message' => 'return confirm(\\\"¿Esta seguro que desea guardar el sector?\\\")',\\n 'method' => 'POST',\\n );\\n return view('sector.form')\\n ->with('data', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c12821aa5d613a86cc8ba0cf190e6fd\",\n \"score\": \"0.6930994\",\n \"text\": \"public function create()\\n {\\n return view('tutores.new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07e409b45065624d003704ab3b447aec\",\n \"score\": \"0.69273114\",\n \"text\": \"public function create()\\n {\\n return view('admin.product.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60c9cc4899b058bc51c74601c8025ebe\",\n \"score\": \"0.6925751\",\n \"text\": \"public function create()\\n {\\n return view('adminCreateForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"466006539e9b1da8c7c2e06a069c4e2e\",\n \"score\": \"0.6921871\",\n \"text\": \"public function create()\\n {\\n return view('layout_admin.thenew.create_new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38a6849d5b56a77b178a1fc8297c2e4e\",\n \"score\": \"0.69218206\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('information.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a59dfad08f7be5f4bb5d898d16a6d3a3\",\n \"score\": \"0.6919321\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Rector();\\n $form = $this->createCreateForm($entity);\\n\\n return $this->render('ColegioAdminBundle:Rector:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4bf33424414f342096092b367153c3ff\",\n \"score\": \"0.6918515\",\n \"text\": \"public function create()\\n {\\n return view('webinars.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b49a8bc053be1715bbf5620cf797e18\",\n \"score\": \"0.69184965\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('product.create'); //form to create new product \\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27e5069596828984f14a92c012c1e448\",\n \"score\": \"0.6914329\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Inicio();\\n $form = $this->createForm(new InicioType(), $entity);\\n\\n return $this->render('SisafBundle:Inicio:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e90d65170f9bc3dd1e2b969826600c53\",\n \"score\": \"0.6914271\",\n \"text\": \"public function create()\\n {\\n return view('ekskul.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51a5131df9fc2dcd5b65b5ca8aa614d0\",\n \"score\": \"0.69092304\",\n \"text\": \"public function create()\\n {\\n //To show the required create page when its clicked\\n return view('admin.create');\\n \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b3f5241c4a2f638b9ee19747079b7a2\",\n \"score\": \"0.69069797\",\n \"text\": \"public function create()\\n {\\n return view('stus.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ecc913c81504bfd8529f7b7feaef7080\",\n \"score\": \"0.69047576\",\n \"text\": \"public function create(){\\n return view('person/form', ['action'=>'create']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64d616e79a29573ea35b962756917c05\",\n \"score\": \"0.69007623\",\n \"text\": \"public function create()\\n {\\n\\t\\t$d['action'] = route('product.store');\\n\\t\\treturn view('back.pages.product.form', $d);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61066352fa31a37b0f1d8bc9fd229ea9\",\n \"score\": \"0.6897235\",\n \"text\": \"public function create()\\n {\\n /* $this->authorize('create'); */\\n return view('refugio.refugioForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70820d35b4d8e319baa89b6f91a3d029\",\n \"score\": \"0.6895603\",\n \"text\": \"public function newAction() {\\n $entity = new Recommandation();\\n $form = $this->createCreateForm($entity);\\n\\n return $this->render('MyAppFrontBundle:Recommandation:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"619fa64afd3457bdc8d1c1a041acff47\",\n \"score\": \"0.68903565\",\n \"text\": \"public function create()\\n {\\n return View(\\\"$this->view_folder.form\\\", $this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09fab99adf688ea100aa90694eab5889\",\n \"score\": \"0.6888845\",\n \"text\": \"public function create()\\n {\\n return view(\\\"Amenity::add\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdb0161d2f2f44cdaea93bf890a4c02e\",\n \"score\": \"0.68880934\",\n \"text\": \"public function create()\\n {\\n return view(\\\"create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9664795bf81cca0f3e65d94f0f595082\",\n \"score\": \"0.6880484\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('questao.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"623f899bed6c6f380a03ffc99508b73d\",\n \"score\": \"0.6879059\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Candidato();\\n $form = $this->createForm(new CandidatoType(), $entity);\\n\\n return $this->render('EleicaoAdmBundle:Candidato:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3b3bbcce8f8a6239dadc2917240252b\",\n \"score\": \"0.6878254\",\n \"text\": \"public function showForm()\\n {\\n return view('AdminView.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06fe0499ccb2038bd9c25e7ef14289e2\",\n \"score\": \"0.68774086\",\n \"text\": \"public function create()\\n {\\n //Return item details form\\n return view('home.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47e62b5d5e96751bc9e8ab90f94e7ea4\",\n \"score\": \"0.6876466\",\n \"text\": \"public function create()\\n {\\n return view('manager.new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3557ca31989d52aabfc94b29a8b4779e\",\n \"score\": \"0.6874666\",\n \"text\": \"public function create()\\n {\\n return view('hari.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3998fa6dce49f97902e942f97d98ede\",\n \"score\": \"0.687325\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Escuelas();\\n $form = $this->createForm(new EscuelasType(), $entity);\\n\\n return $this->render('QQiRecordappBundle:Escuelas:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f18b1b1a35a9af23eb1d4bbdba665f8\",\n \"score\": \"0.68696606\",\n \"text\": \"public function create()\\n {\\n return view('admin.car_com.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96c76b820b73f95fa584de07ad04ad0a\",\n \"score\": \"0.6865675\",\n \"text\": \"public function create()\\n {\\n return view('nasabah/addnasabah');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3cfac3178d9c5cb5ab322fa4785604c\",\n \"score\": \"0.6862222\",\n \"text\": \"public function create()\\n {\\n return view('Prenda.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4672fc37d04d0e3bef9bc80e57323e9\",\n \"score\": \"0.6860329\",\n \"text\": \"public function create()\\n {\\n //\\n $question= new Question();\\n return view('dashboard.question.form', [\\n \\\"question\\\" => $question\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"451c07a3106f3c6e3d62757717bfa763\",\n \"score\": \"0.6860251\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('horas.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95a4952039c4b40b058cc67fba7cd2d7\",\n \"score\": \"0.68573785\",\n \"text\": \"public function create () {\\n $course = new Course();\\n $btnText = __(\\\"Enviar curso para revisión\\\");\\n\\n return view('courses.form', compact('course', 'btnText'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca80651480f4bbbd35305ceefd136182\",\n \"score\": \"0.6853353\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Alumni();\\n $form = $this->createForm(new AlumniType(), $entity);\\n\\n return $this->renderTwig('Master/Alumni:form', array(\\n 'entity' => $entity,\\n 'edit_form' => $form->createView()\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d58534453dca5d05eb6bf9759a643eaa\",\n \"score\": \"0.68512565\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"783d7ee63b2e492087fc641fa43b1ef1\",\n \"score\": \"0.684831\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('fornecedors.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d13aa784138fe895746ebaa36bda96f\",\n \"score\": \"0.6847265\",\n \"text\": \"public function create()\\n {\\n return view('hr.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1406c82292b4f07e3eecfee633a3f557\",\n \"score\": \"0.68437195\",\n \"text\": \"public function create()\\n {\\n return view('admin.company.form', [\\n 'company' => null,\\n 'route' => 'admin.company.store',\\n 'method' => 'POST'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1d677deef4bb08323db61d502e8dcee\",\n \"score\": \"0.6843096\",\n \"text\": \"public function create()\\n {\\n return view('backend.book.create');\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":724,"cells":{"query_id":{"kind":"string","value":"d44b00db19a0535f11425bbc0ad42b69"},"query":{"kind":"string","value":"checks if analysis with specified parameters is already done and cached in local store. If so, returns cached result"},"positive_passages":{"kind":"list like","value":[{"docid":"e81daac7f02e4d2ca01944e096d71a16","score":"0.62183636","text":"protected function isAnalysisCached(){\n\t\t// one more criteria should be added for user authorization.\n\t\t// Analysis request may come from different users for different \n\t\t// domain, source etc. \n\t\treturn smongo::$db->analysis->findOne(array(\n\t\t\t\"date\"=>date('Y-m-d H:i:s',$this->presentEnd),\n\t\t\t\"interval\"=>$this->intervalName\n\t\t));\n\t}","title":""}],"string":"[\n {\n \"docid\": \"e81daac7f02e4d2ca01944e096d71a16\",\n \"score\": \"0.62183636\",\n \"text\": \"protected function isAnalysisCached(){\\n\\t\\t// one more criteria should be added for user authorization.\\n\\t\\t// Analysis request may come from different users for different \\n\\t\\t// domain, source etc. \\n\\t\\treturn smongo::$db->analysis->findOne(array(\\n\\t\\t\\t\\\"date\\\"=>date('Y-m-d H:i:s',$this->presentEnd),\\n\\t\\t\\t\\\"interval\\\"=>$this->intervalName\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"99098f35dbdf97195cb45e4fd17be741","score":"0.63279456","text":"protected function cacheAnalysis($result){\n\t\tsmongo::$db->analysis->insert($result);\n\t\treturn $result;\n\t}","title":""},{"docid":"ce89b953cd29f71e0662be72577ca6d6","score":"0.5725143","text":"public function maybeByPassCache();","title":""},{"docid":"99a5123d637852dee3376f6bba9aa8d2","score":"0.5386595","text":"private static function cacheResult($result)\n {\n\t\n }","title":""},{"docid":"76b778272c7db6ca9be2cbe436a51789","score":"0.5222791","text":"function ProcessIncrementalResult() {\n global $testPath;\n global $done;\n global $testInfo;\n global $testInfo_dirty;\n global $runNumber;\n global $cacheWarmed;\n global $location;\n\n if ($done) {\n // mark this test as done\n $testInfo['test_runs'][$runNumber]['done'] = true;\n $testInfo_dirty = true;\n \n // make sure all of the sharded tests are done\n for ($run = 1; $run <= $testInfo['runs'] && $done; $run++) {\n if (!$testInfo['test_runs'][$run]['done'])\n $done = false;\n }\n \n if (!$done &&\n array_key_exists('discarded', $testInfo['test_runs'][$runNumber]) &&\n $testInfo['test_runs'][$runNumber]['discarded']) {\n if (is_file(\"$testPath/test.job\")) {\n if (copy(\"$testPath/test.job\", $testInfo['job_file'])) {\n AddJobFileHead($location, $testInfo['workdir'], $testInfo['job'], $testInfo['priority'], true);\n }\n }\n }\n }\n}","title":""},{"docid":"b7050a6ddd9a4ac6d342073199a3893e","score":"0.520328","text":"private function isCacheBypassed()\n\t{\n\t\treturn !$this->use_cache;\n\t}","title":""},{"docid":"14b2a5e623b621a74246fdb0a91efd93","score":"0.5142566","text":"public function cached();","title":""},{"docid":"9b1c150309e04dd9d25361d544938f67","score":"0.51316166","text":"public function hasCache();","title":""},{"docid":"48ef374171a21813c174b76e75b99149","score":"0.51020044","text":"public function cache();","title":""},{"docid":"c3e2523e74996e4048669617cfca9537","score":"0.50676453","text":"function check_for_existing_cached_chart($file) {\n // Check if the file exists and return bool\n $forcegeneration = optional_param('forcegeneration', false, PARAM_BOOL);\n if ($forcegeneration==true) {\n return false;\n }\n return (file_exists($file) && is_readable($file));\n}","title":""},{"docid":"73e88c1a86b472ab69c6c8ac51ad5ecf","score":"0.50512487","text":"public function cacheFileExists()\n {\n $request = RequestFactory::create(func_get_args(), $this->defaultManipulations);\n\n return $this->cache->has($this->getCachePath($request));\n }","title":""},{"docid":"941e8c7f963cb34d58920fc5ad009915","score":"0.50386125","text":"public function isCached(): bool;","title":""},{"docid":"941e8c7f963cb34d58920fc5ad009915","score":"0.50386125","text":"public function isCached(): bool;","title":""},{"docid":"b41a86a3bd23fc141b1e8152a53942fb","score":"0.5038088","text":"private function set_cache_variable()\r\n\t{\r\n\t\t\t\t\r\n\t\t$sql = '\tSELECT\r\n\t\t\t\t\t\t`IDP`,\r\n\t\t\t\t\t\t`NOM`,\r\n\t\t\t\t\t\t`resultat`,\r\n\t\t\t\t\t\t`type`,\r\n\t\t\t\t\t\t`id_action`,\r\n\t\t\t\t\t\t`id_src`,\r\n\t\t\t\t\t\t`id_action_src`,\r\n\t\t\t\t\t\t`used`,\r\n\t\t\t\t\t\t`defaut`,\r\n\t\t\t\t\t\t`neutre` \r\n\t\t\t\t\tFROM \r\n\t\t\t\t\t\t`'.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_fiches_param']['name'].'` \r\n\t\t\t\t\tWHERE 1 = 1\r\n\t\t\t\t\t\tAND `id_fiche` = \"'.$this->c_id_temp.'\"\r\n\t\t\t ';\r\n\r\n\t\t$resultat = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\r\n\r\n\t\t$this->c_variables_fiche = null;\r\n\t\twhile($row = mysql_fetch_array($resultat,MYSQL_ASSOC))\r\n\t\t{\r\n\t\t\tswitch($row['type'])\r\n\t\t\t{\r\n\t\t\t\tcase 'IN':\r\n\t\t\t\t\t$nom = $row['NOM'].'()';\r\n\t\t\t\t\t$utilisee = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'OUT':\r\n\t\t\t\t\t$nom = $row['NOM'].'('.$row['id_action'].')';\r\n\t\t\t\t\t$utilisee = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'EXTERNE':\r\n\t\t\t\t\t$nom = $row['NOM'].'('.$row['id_action'].'\\\\'.$row['id_src'].'\\\\'.$row['id_action_src'].')';\r\n\t\t\t\t\t$nom_varext = $row['NOM'].'('.$row['id_src'].'\\\\'.$row['id_action_src'].')';\r\n\t\t\t\t\t// Vérification de l'utilisation de la variable dans les étapes\r\n\t\t\t\t\t($this->get_varinext_utilise($nom,$nom_varext) == true ? $used = 1 : $used = 0);\r\n\r\n\t\t\t\t\t$sql = 'UPDATE `'.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_fiches_param']['name'].'` \r\n\t\t\t\t\t\t\tSET `used` = '.$used.'\r\n\t\t\t\t\t\t\tWHERE `id_fiche` = '.$this->c_id_temp.' \r\n\t\t\t\t\t\t\tAND `IDP` = '.$row['IDP'].' \r\n\t\t\t\t\t\t\tAND `type` = \"EXTERNE\" \r\n\t\t\t\t\t\t\tAND `id_action` = '.$row['id_action'].' \r\n\t\t\t\t\t\t\tAND `id_src` = '.$row['id_src'].' \r\n\t\t\t\t\t\t\tAND `id_action_src` = '.$row['id_action_src'].' \r\n\t\t\t\t\t\t\tAND `NOM` = \"'.$row['NOM'].'\"';\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($used == 1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$utilisee = true;\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$utilisee = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif(isset($_GET[$row['NOM']]))\r\n\t\t\t{\r\n\t\t\t\t$in_url = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$in_url = false;\r\n\t\t\t}\r\n\t\t\t$this->c_variables_fiche[] = array(0 => $nom,1 => $row['resultat'],2 => $row['type'], 3 => $row['id_action'],4 => $utilisee,5 => $row['defaut'],6 => $row['neutre'],7 => $in_url);\r\n\t\t}\r\n\t\t/*===================================================================*/\t\r\n\t}","title":""},{"docid":"de2c3ea415ae8cf9e8a0bc6d2c2df85b","score":"0.5033254","text":"public function storeInCache(): bool;","title":""},{"docid":"8110a95847bbfa2bb566dc6698db6776","score":"0.49676377","text":"public function define_caching(){}","title":""},{"docid":"9903b80b2e3d5370d09bfa6746abe869","score":"0.49361405","text":"public static function useCache() {\n global $GLPI_CACHE;\n return $GLPI_CACHE != null\n && (!defined('TU_USER') || defined('CACHED_TESTS'));\n }","title":""},{"docid":"c55ee81e0b9b1d0ad5fc54b657b28bf2","score":"0.4909914","text":"function si_exhibition_cron_cache($function_name = FALSE, $arguments = FALSE){\n $current_cron_cache = si_exhibition_cache('cron_check','', FALSE, TRUE);\n if ($current_cron_cache == NULL) $current_cron_cache = array();\n si_exhibition_debug(\"si_exhibition_cron_cache $function_name\");\n if ($function_name === FALSE) return $current_cron_cache;\n if (!array_key_exists($function_name, $current_cron_cache) || !is_array($current_cron_cache[$function_name])){\n $current_cron_cache[$function_name] = array(); \n }\n if ($arguments === FALSE) return $current_cron_cache[$function_name];\n\n //Not a simple return, so it's a storage. Already created the cache if it didn't exist yet\n //Now store the arguments (if they are not stored yet)\n if (!in_array($arguments, $current_cron_cache[$function_name])) $current_cron_cache[$function_name][] = $arguments;\n si_exhibition_cache('cron_check',$function_name, $current_cron_cache[$function_name], TRUE);\n}","title":""},{"docid":"16482f1c0619da61ec1cfc4291dac936","score":"0.48661295","text":"private function setParamsCache() {\n\t\t\n\t\t$item = $this->select(\"query_cache, query_cache_time\", TBL_SYS_CONF, \"id='1'\", array('cache'=>false));\n\t\tif(count($item))\n\t\t{\n\t\t\t$this->_query_cache = $item[0]['query_cache'] ? true : false;\n\t\t\t$this->_query_cache_time = $item[0]['query_cache_time'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_query_cache = false;\n\t\t\t$this->_query_cache_time = null;\n\t\t}\n\t}","title":""},{"docid":"a279b953202b22945ba5f71e777e1fb7","score":"0.4848644","text":"function lingotek_do_cache() {\n return !(variable_get('lingotek_flush_cache', FALSE) && user_access('use lingotek developer tools'));\n}","title":""},{"docid":"8d062ad70cd7feac4dec5df038d4a438","score":"0.48418543","text":"function isFileExists($input1, $input2 = '', $forceCheck = false, $noCatcheSave = false) {\n\tif($input2 === true) {\n\t\t$file = false;\n\t\t$cacheKey = $input1;\n\t}\n\telse {\n\t\t$file = str_replace('//', '/', $input1);\n\t\t$cacheKey = $input2;\n\t}\n\t\n\tif(!$cacheKey)\n\t\t$cacheKey = $file;\n\t\n\tif(!$cacheKey)\n\t\treturn false;\n\t\n\tif(!isset($GLOBALS['ZampFilePresenceCache'])) {\n\t\t$GLOBALS['ZampFilePresenceCache'] = [];\n\t\t\n\t\t$cacheFile = _PROJECT_PATH_.'data/tmp/cache/zamp_file_presence_cache.php';\n\t\t\n\t\tif(file_exists($cacheFile)) {\n\t\t\t$GLOBALS['ZampFilePresenceCache'] = include $cacheFile;\n\t\t\t\n\t\t\tif((array) $GLOBALS['ZampFilePresenceCache'] !== $GLOBALS['ZampFilePresenceCache'])\n\t\t\t\t$GLOBALS['ZampFilePresenceCache'] = [];\n\t\t}\n\t}\n\t\n\tif(!$forceCheck && isset($GLOBALS['ZampFilePresenceCache'][$cacheKey])) {\n\t\tif($GLOBALS['ZampFilePresenceCache'][$cacheKey] && $cacheKey == $file)\n\t\t\treturn $file;\n\t\telse\n\t\t\treturn $GLOBALS['ZampFilePresenceCache'][$cacheKey];\n\t}\n\t\n\tif(!$file)\n\t\treturn false;\n\telseif(file_exists($file))\n\t\t$GLOBALS['ZampFilePresenceCache'][$cacheKey] = ($cacheKey == $file) ?true :$file;\n\telse {\n\t\t$file = false;\n\t\t$GLOBALS['ZampFilePresenceCache'][$cacheKey] = $file;\n\t}\n\t\n\tif($noCatcheSave && !$file)\n\t\treturn $file;\n\telseif(!isset($cacheFile))\n\t\t$cacheFile = _PROJECT_PATH_.'data/tmp/cache/zamp_file_presence_cache.php';\n\t\n\tfile_put_contents($cacheFile, \"cache->load($id))) {\n // cache miss\n \n $this->processAction($request);\n \n if ($this->canBeSavedInCache()) {\n\n $data_to_cache = array();\n $data_to_cache['output_headers'] = $this->headers;\n $data_to_cache['output_body'] = $this->output;\n $this->cache->save($data_to_cache);\n\n // update index immediately if enabled in the configuration,\n // but not when search_query is submitted (don't index search results)\n // and not when forward \"to\" is provided\n // TODO: canonise the request before submitting for indexing\n if (ONXSHOP_ALLOW_SEARCH_INDEX_AUTOUPDATE && !array_key_exists('search_query', $_GET) && !array_key_exists('to', $_GET)) $this->indexContent($_GET['translate'], $this->output);\n }\n\n } else {\n \n $this->headers = $data['output_headers'];\n $this->output = $data['output_body'];\n $this->restoreHeaders();\n }\n }","title":""},{"docid":"65dec07d879656bce7eef344ee98c61a","score":"0.48324567","text":"public function cache_valid() {\n return $this->cache_exists();\n }","title":""},{"docid":"e428d9e278273b6203cc737587ea3741","score":"0.48228982","text":"public function is_already_optimized() {\n\t\treturn 'already_optimized' === $this->get_status();\n\t}","title":""},{"docid":"238ae087a7bd9a82eeb00297817facc9","score":"0.48168832","text":"public function getCachedAnalysis($analysisId){\n\t\t$a = smongo::$db->analysis->findOne(\n\t\t\tarray('_id'=>new MongoID($analysisId))\n\t\t);\n\t\t\n\t\tif($a) {\n\t\t\t$a['id'] = (string)$a['_id'];\n\t\t\tunset($a['_id']);\n\t\t}\n\n\t\treturn $a;\n\t}","title":""},{"docid":"ed7bb94c0f7619a9d96f256928f04307","score":"0.48105332","text":"public function isTemporary();","title":""},{"docid":"d974ac56120802ec051a8959aaa9a152","score":"0.480924","text":"function has_cache($name = '') {\n\n\t\t$cache_name = ($name != '') ? $name : sha1(strtolower($_SERVER['REQUEST_URI'])).'-'.$this->v;\n\n\t\t//Return the transient\n\t\t$cache = get_transient($cache_name);\n\n\t\tif ($cache) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}","title":""},{"docid":"fe1df665aa217028d56ba395a7114415","score":"0.48051313","text":"private function get_results_from_storage() {\n\t\t$this->results = get_option( 'rank_math_seo_analysis_results' );\n\t\t$this->build_results();\n\t}","title":""},{"docid":"154d72c41978e1155be677c6cd955c9c","score":"0.47815388","text":"public function configurationIsCached()\n {\n }","title":""},{"docid":"2a1a31f93238696c104dfd4facd8ea22","score":"0.4775719","text":"public function cacheValid()\n {\n // If files exists And is not expired\n if (file_exists($this->path.$this->name.'.xml') && $this->isExpired() !== true){\n return true;\n }else {\n return false;\n }\n }","title":""},{"docid":"3dfbff691a174ec9ed582c8fda188456","score":"0.4765422","text":"protected function extractDataFromCache()\n\t{\n\t\treturn false;\n\t}","title":""},{"docid":"792eaa7d8b8d5909fffb4bb5a1304c4f","score":"0.47492442","text":"public function cachable();","title":""},{"docid":"5887a173001ec880f57f089921a37860","score":"0.47148773","text":"function setup_cache() {\n\t\tglobal $phpbb_seo;\n\t\t// For module inclusion in ACP : No cache\n\t\tif ( defined('ADMIN_START') ) {\n\t\t\treturn;\n\t\t}\n\t\t// build cache file name\n\t\t$ssl_bit = $phpbb_seo->ssl['use'] ? 'ssl_' : '';\n\t\t$file_name = ( !empty($this->options['module_sub']) ? $this->options['module_sub'] : '' ) . trim(str_replace(array('&amp;', '/'), '-', $this->options['extra_params_full']),'-') . '-a' . $this->options['auth_param'];\n\t\tif ($this->gym_master->gym_config['gym_cript_cache']) {\n\t\t\t$file_name = md5( $file_name );\n\t\t}\n\t\t$file_name = $this->gym_master->actions['action_type'] . '_' . ( ( !empty($this->options['module_main']) ) ? $this->options['module_main'] . '_' : 'main_' ) . $ssl_bit . $file_name . $this->cache['cache_file_ext'];\n\t\t$this->cache['file'] = $this->gym_master->path_config['gym_path'] . 'cache/' . $file_name;\n\t\t// Output, first check cache\n\t\tif ($this->cache['do_cache'] && $this->check_cache($this->cache['file'])) {\n\t\t\t// Check expiration\n\t\t\t$this->cache['cache_born'] = filemtime($this->cache['file']);\n\t\t\t$this->cache['cache_too_old'] = ($this->cache['cache_born'] + $this->cache['cache_max_age']) <= $this->outputs['time'] ? true : false;\n\t\t\tif ($this->cache['cache_too_old'] && $this->cache['cache_auto_regen']) {\n\t\t\t\t@unlink($this->cache['file']);\n\t\t\t\t$this->cache['cached'] = false;\n\t\t\t}\n\t\t}\n\t\t// Expiration time & Etags\n\t\tif (!$this->cache['cached'] || !$this->cache['do_cache']) {\n\t\t\t// Take care about lastmod when not cached\n\t\t\tif (($this->outputs['last_mod_time'] + $this->cache['cache_max_age']) <= $this->outputs['time']) {\n\t\t\t\t$this->outputs['last_mod_time'] = $this->outputs['time'];\n\t\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['time'] + $this->cache['cache_max_age']));\n\t\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t\t$this->update_lastmod();\n\t\t\t} else {\n\t\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['last_mod_time'] + $this->cache['cache_max_age']));\n\t\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t}\n\t\t\t$this->check_mod_since();\n\t\t} else {\n\t\t\t$this->outputs['last_mod_time'] = $this->cache['cache_born'];\n\t\t\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\G\\M\\T', ($this->outputs['last_mod_time'] + $this->cache['cache_max_age']));\n\t\t\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\n\t\t\t$this->check_mod_since();\n\t\t\t$this->cache_output();\n\t\t}\n\n\t\treturn;\n\t}","title":""},{"docid":"2fb1b2f359c533d8ad52cb589cddf6d1","score":"0.47136664","text":"public function isCached() \n {\n $modified = (file_exists($this->cache_file)) ? filemtime($this->cache_file) : 0;\n return ((time() - $this->cache_expires) < $modified);\n }","title":""},{"docid":"2a9c585917e87d2a79f79c33c29609bd","score":"0.47087356","text":"public static function check($param=false)\n\t{\n\t\tif(is_array($param))\n\t\t{\n\t\t\t$param['prefix'] = isset($param['prefix']) ? $param['prefix'] : 'data';\n\t\t\t$param['query'] = isset($param['query']) ? $param['query'] : null;\n\t\t\t$param['suffix'] = isset($param['suffix']) ? $param['suffix'] : 'json';\n\t\t\t$param['table'] = isset($param['table']) ? $param['table'] : 'app_cache';\n\t\t\t$param['type_save'] = isset($param['type_save']) ? $param['type_save'] : 'file';\n\n\t\t\t$idFile = $param['prefix'].'-'.md5($param['query']);\n\t\t\t$fileReady = defined('APPDATAPATH') ? APPDATAPATH.'/cache/'.$idFile :\n\t\t\t\t\t\t$param['absolute_path'].'/'.$idFile;\n\n\t\t\t$fileReady = $fileReady.'.'.$param['suffix'];\n\n\t\t\tswitch($param['type_save'])\n\t\t\t{\n\t\t\t\tcase 'file':\n\t\t\t\t$data = file_exists($fileReady);\n\t\t\t\tbreak;\n\t\t\t\tcase 'database':\n\t\t\t\t$prm_read = \"WHERE cache_name='{$idFile}'\";\n\t\t\t\t$data_read = array('tbl'=>$param['table'],'row'=>'*','prm'=>$prm_read);\n\t\t\t\t$sql_read = AccessCRUD($data_read,'read');\n\t\t\t\t$data = $sql_read == false ? false : $sql_read->num_rows > 0 ? true : false;\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t$data = false;\n\t\t\t}\n\n\t\t\tif($data)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"3eeb331ffab2d5ad2bcce3874631f90a","score":"0.4702895","text":"public function shouldResetInMemoryCache(): bool;","title":""},{"docid":"d23371841bb947c6b1586ea6d0d975ae","score":"0.46904173","text":"function has_caching_for($type)\n{\n if (!function_exists('get_option')) {\n return false;\n }\n\n $setting = (get_option('is_on_' . $type . '_cache') == '1');\n\n $positive = (get_param_integer('keep_cache', 0) == 1) || (get_param_integer('cache', 0) == 1) || (get_param_integer('keep_cache_' . $type . 's', 0) == 1) || (get_param_integer('cache_' . $type . 's', 0) == 1);\n\n $not_negative = (get_param_integer('keep_cache', null) !== 0) && (get_param_integer('cache', null) !== 0) && (get_param_integer('keep_cache_' . $type . 's', null) !== 0) && (get_param_integer('cache_' . $type . 's', null) !== 0);\n\n return ($setting || $positive) && (strpos(get_param_string('special_page_type', ''), 't') === false) && $not_negative;\n}","title":""},{"docid":"4df8de7e308f1f04ea703be455cbe2c8","score":"0.46886098","text":"private function getDoneData($localCacheData,&$cacheKeyId,$callKeyId) {/*{{{*/\n if ($localCacheData != false) {\n $key = $cacheKeyId == NULL ? 0 : $cacheKeyId;\n if(is_array($cacheKeyId)==false && $localCacheData[$key]!=false) {\n $returnCacheData = is_array($callKeyId) ? $localCacheData : $localCacheData[$key];\n $cacheKeyId = false; \n return $returnCacheData;\n }\n $localCacheDataKeys = array_keys($localCacheData);\n $cacheKeyId = array_diff($cacheKeyId,$localCacheDataKeys);\n if(empty($cacheKeyId)) {\n $cacheKeyId = false;\n return $localCacheData;\n }\n }\n }","title":""},{"docid":"24a7ef70f4ce7aa83d7f89ea0d1b950c","score":"0.4683057","text":"protected function wasCached()\n {\n $this->start = microtime(true);\n // Location to lookup or store cached file\n $this->cache_file_name = $this->cache_folder.md5(\",a1b2c3d4e5f6g7h8i9ABB!\");\n return file_exists($this->cache_file_name) ? filemtime($this->cache_file_name) : 0;\n }","title":""},{"docid":"d1f3d370fa0baa7ef20b1467a2cc4af5","score":"0.4676231","text":"function is_cached($cacheFile) \n\t{\n \t$cacheFile_created = (file_exists($cacheFile)) ;\n \treturn $cacheFile_created;\n}","title":""},{"docid":"f987d242cb2503c67330cc31c4f71177","score":"0.4675593","text":"public function setCache() {\n\t\tif(!$this->isCacheValid($this->_cachefile)) {\n\t\t\tob_start();\n\t\t\treturn $this->addLog( 'Could not find valid cachefile: ' . $this->_cachefile );\n \t} else {\n \t\treturn true;\n \t}\n\t}","title":""},{"docid":"8c23c8f158f96a23f38283549811dd8f","score":"0.46682513","text":"protected function apply_internal ($cache_not_saved_mark = true) {\n\t\tif ($cache_not_saved_mark) {\n\t\t\t$this->core['cache_not_saved'] = true;\n\t\t} else {\n\t\t\tunset($this->core['cache_not_saved']);\n\t\t}\n\t\t$Cache = Cache::instance();\n\t\tif (!$Cache->set(\n\t\t\t'config',\n\t\t\t[\n\t\t\t\t'core' => $this->core,\n\t\t\t\t'db' => $this->db,\n\t\t\t\t'storage' => $this->storage,\n\t\t\t\t'components' => $this->components\n\t\t\t]\n\t\t)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\t\t$Cache->del('languages');\n\t\tdate_default_timezone_set($this->core['timezone']);\n\t\t$this->fill_mirrors();\n\t\tEvent::instance()->fire('System/Config/changed');\n\t\treturn true;\n\t}","title":""},{"docid":"8fc5217894c8f1a03d990f17db3e6b7d","score":"0.46641606","text":"function getData ()\n{\n return cache();\n}","title":""},{"docid":"12113f68f94062bc578c08097d1b1643","score":"0.46529156","text":"static function Maintain( Wrapper $theWrapper, $doVerbose = FALSE )\n\t{\n\t\t//\n\t\t// Init local storage.\n\t\t//\n\t\t$cache = Array();\n\t\t$prefix = __class__;\n\t\t$zp = $fp = $name_zip = $ok = $eol = NULL;\n\t\t$stats = array( 'new' => 0, 'updated' => 0, 'processed' => 0 );\n\t\t$collection\n\t\t\t= static::ResolveCollection(\n\t\t\t\tstatic::ResolveDatabase( $theWrapper, TRUE ) );\n\t\t\n\t\t//\n\t\t// TRY BLOCK.\n\t\t//\n\t\ttry\n\t\t{\n\t\t\t//\n\t\t\t// Init local storage.\n\t\t\t//\n\t\t\t$max_exe = ini_set( 'max_execution_time', 0 );\n\t\t\t$name_zip = tempnam( \"/tmp\", \"$prefix\".\"ZIP\" );\n\t\t\t\n\t\t\t//\n\t\t\t// Load FAO institutes.\n\t\t\t//\n\t\t\tif( file_put_contents( $name_zip,\n\t\t\t\t\t\t\t\t file_get_contents( kFAO_INSTITUTES_URL ) ) !== FALSE )\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// Open zip file.\n\t\t\t\t//\n\t\t\t\t$zp = zip_open( $name_zip );\n\t\t\t\tif( $zp )\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// Unzip data.\n\t\t\t\t\t//\n\t\t\t\t\tif( $data = zip_read( $zp ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t//\n\t\t\t\t\t\t// Save unzipped data.\n\t\t\t\t\t\t//\n\t\t\t\t\t\t$name_txt = tempnam( \"/tmp\", \"$prefix\".\"TXT\" );\n\t\t\t\t\t\tif( $ok = file_put_contents(\n\t\t\t\t\t\t\t\t\t$name_txt,\n\t\t\t\t\t\t\t\t\tzip_entry_read(\n\t\t\t\t\t\t\t\t\t\t$data, zip_entry_filesize( $data ) ) ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Cleanup.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\tzip_entry_close( $data );\n\t\t\t\t\t\t\tzip_close( $zp );\n\t\t\t\t\t\t\t$zp = NULL;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Handle Mac EOL.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t$eol = ini_set( 'auto_detect_line_endings', 1 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t// Open file.\n\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t$fp = fopen( $name_txt, 'r' );\n\t\t\t\t\t\t\tif( $fp )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Cycle file.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$header = NULL;\n\t\t\t\t\t\t\t\twhile( ($data = fgetcsv( $fp, 4096, ',', '\"' )) !== FALSE )\n\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// Load header.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( $header === NULL )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Load header.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$header = $data;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tcontinue;\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} // First run.\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\t\t\t\t\t// Verify record.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( count( $header ) != count( $data ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\techo( \" ==> Invalid record format at source.\" );\n\t\t\t\t\t\t\t\t\t\tcontinue;\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\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t// Increment processed.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$stats[ 'processed' ]++;\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\t\t\t\t\t// Load new record.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$new = new static( $theWrapper );\n\t\t\t\t\t\t\t\t\t$new->importFAO( $data, $header );\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\t\t\t\t\t// Try loading existing.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$id = static::FAOIdentifier( $data[ 'INSTCODE' ] );\n\t\t\t\t\t\t\t\t\t$criteria = array( kTAG_NID => $id );\n\t\t\t\t\t\t\t\t\t$old = $collection->matchOne(\n\t\t\t\t\t\t\t\t\t\t\t\t$criteria, kQUERY_OBJECT );\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\t\t\t\t\t// Skip not changed.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( $old\n\t\t\t\t\t\t\t\t\t && ($old->offsetGet( kTAG_VERSION )\n\t\t\t\t\t\t\t\t\t\t\t== $new->offsetGet( kTAG_VERSION )) )\n\t\t\t\t\t\t\t\t\t\tcontinue;\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\t\t\t\t\t// Handle cached.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( array_key_exists( $id, $cache ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Save object in cache.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$cache[ $id ] = $new;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tcontinue;\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} // Cached.\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\t\t\t\t\t// Handle referenced.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( $new->offsetExists( kTAG_ENTITY_VALID ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Init local storage.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$valid = $new->offsetGet( kTAG_ENTITY_VALID );\n\t\t\t\t\t\t\t\t\t\t$criteria = array( kTAG_NID => $valid );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Handle unresolved.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tif( ! $collection->matchOne(\n\t\t\t\t\t\t\t\t\t\t\t\t$criteria, kQUERY_COUNT ) )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Cache valid.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\tif( ! array_key_exists( $valid, $cache ) )\n\t\t\t\t\t\t\t\t\t\t\t\t$cache[ $valid ] = NULL;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Cache current.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$cache[ $id ] = $new;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tcontinue;\t\t\t\t\t\t// =>\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} // Cached valid and current.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Has valid institute.\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\t\t\t\t\t// Handle existing.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( $old )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Replace old.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$new->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Increment updated.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$stats[ 'updated' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Exists.\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\t\t\t\t\t// Handle new.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Insert new.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$new->commit();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Increment updated.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$stats[ 'new' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // New record.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} // Iterating file.\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\t// Recurse ad exhaustion.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t$count = count( $cache );\n\t\t\t\t\t\t\t\twhile( count( $cache ) )\n\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// Iterate cache.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t$keys = array_keys( $cache );\n\t\t\t\t\t\t\t\t\tforeach( $keys as $key )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Init loop storage.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$cached = & $cache[ $key ];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Try loading existing.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t$id = static::FAOIdentifier(\n\t\t\t\t\t\t\t\t\t\t\t\t\t$cached[ kTAG_IDENTIFIER ] );\n\t\t\t\t\t\t\t\t\t\t$criteria = array( kTAG_NID => $id );\n\t\t\t\t\t\t\t\t\t\t$old = $collection->matchOne(\n\t\t\t\t\t\t\t\t\t\t\t\t\t$criteria, kQUERY_OBJECT );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Handle existing.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tif( $old )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Replace old.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$cached->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Increment updated.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$stats[ 'updated' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} // Exists.\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Handle new.\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//\n\t\t\t\t\t\t\t\t\t\t\t// Check if valid is there.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\tif( $cached->offsetExists( kTAG_ENTITY_VALID ) )\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//\n\t\t\t\t\t\t\t\t\t\t\t\t// Check if valid exists.\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$criteria = array( kTAG_NID\n\t\t\t\t\t\t\t\t\t\t\t\t\t=> $cached[ kTAG_ENTITY_VALID ] );\n\t\t\t\t\t\t\t\t\t\t\t\tif( ! $collection->matchOne(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$criteria, kQUERY_COUNT ) )\n\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\t\t\t\t// =>\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t} // Has valid reference.\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Insert new.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$cached->commit();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Increment updated.\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t$stats[ 'new' ]++;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} // New record.\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Pop cache.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tunset( $cache[ $key ] );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Iterating cache.\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\t\t\t\t\t// Check infinite loop.\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\tif( count( $cache ) == $count )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// Dump cache.\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\tforeach( $cache as $cached )\n\t\t\t\t\t\t\t\t\t\t\tvar_dump(\n\t\t\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'NICODE'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t=> $cached[ kTAG_IDENTIFIER ],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'VALID'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t=> $cached[ kTAG_ENTITY_VALID ] ) );\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t\t\t\t\t\t\"Unreferenced valid institute\" );\t// !@! ==>\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t} // Unreferenced valid institute.\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t} // Cache not exhausted.\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\t// Reset maximum execution time.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\tini_set( 'max_execution_time', $max_exe );\n\t\t\t\n\t\t\t\t\t\t\t\treturn $stats;\t\t\t\t\t\t\t\t\t\t// ==>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // Opened unzipped file.\n\t\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t\t\t\t\"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t\t .\"unable to open unzipped data\" );\t\t\t// !@! ==>\n\t\t\t\t\t\t\n\t\t\t\t\t\t} // Saved unzipped data.\n\t\t\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t\t\t\"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t .\"unable to save unzipped data\" );\t\t\t\t// !@! ==>\n\t\t\t\t\t\n\t\t\t\t\t} // Unzipped data.\n\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\tthrow new \\Exception( \"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t\t\t\t\t .\"unable to unzip data\" );\t\t\t// !@! ==>\n\t\t\t\t\n\t\t\t\t} // Opened zip file.\n\t\t\n\t\t\t\telse\n\t\t\t\t\tthrow new \\Exception( \"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t\t\t\t .\"unable to open zip file\" );\t\t\t// !@! ==>\n\t\t\n\t\t\t} // Loaded institutes from FAO.\n\t\t\n\t\t\telse\n\t\t\t\tthrow new CException( \"Unable to load FAO institutes: \"\n\t\t\t\t\t\t\t\t\t .\"unable to access URL\" );\t\t\t\t\t// !@! ==>\n\t\t}\n\t\t\n\t\t//\n\t\t// FINAL BLOCK.\n\t\t//\n\t\tfinally\n\t\t{\n\t\t\tif( $zp )\n\t\t\t{\n\t\t\t\tfclose( $zp );\n\t\t\t\tunlink( $name_zip );\n\t\t\t}\n\t\t\t\n\t\t\tif( $fp )\n\t\t\t\tfclose( $fp );\n\t\t\t\n\t\t\tif( $ok )\n\t\t\t\tunlink( $name_txt );\n\t\t\t\n\t\t\tif( $eol !== NULL )\n\t\t\t\tini_set( 'auto_detect_line_endings', $eol );\n\t\t\t\n\t\t\tif( isset( $max_exe ) )\n\t\t\t\tini_set( 'max_execution_time', $max_exe );\n\t\t}\n\t\t\n\t}","title":""},{"docid":"0eb2250cf8c567a6726dec5e930b5885","score":"0.46345368","text":"function preRun($cached)\n {\n }","title":""},{"docid":"447525a002c93502df229985bd4c62ee","score":"0.4633542","text":"final protected function getCacheNeed()\n\t{\n\t\treturn\tintval($this->arParams['CACHE_TIME']) > 0 &&\n\t\t\t\t$this->arParams['CACHE_TYPE'] != 'N' &&\n\t\t\t\tConfig\\Option::get(\"main\", \"component_cache_on\", \"Y\") == \"Y\";\n\t}","title":""},{"docid":"69d5025c1bfc9bf6e31616b04e8fbfd2","score":"0.4631425","text":"public function process() {\r\n\r\n\t\t// Revisión inicial\r\n\t\tif (!$this->checkInit()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$sqlWhere = array();\r\n\t\t$sqlOrden = '';\r\n\t\t$sqlLimit = '';\r\n\t\t\r\n\t\t// Cargo los filtros\r\n\t\t$sqlWhere = $this->checkFilters();\r\n\r\n\t\tif (!count($sqlWhere)) {\r\n\t\t\t$this->log.= '- Error: No existe ningún condicional (WHERE) definido
    ';\r\n\t\t\r\n\t\t\t$this->error(2);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$sqlWhereFinal = implode(' AND ', $sqlWhere);\r\n\r\n\t\tif ($this->orden != '') {\r\n\t\t\t$sqlOrden = 'ORDER BY '.$this->orden;\r\n\t\t}\r\n\r\n\t\tif ($this->cantidad || $this->desplazamiento) {\r\n\t\t\t$sqlLimit = 'LIMIT '.$this->desplazamiento;\r\n\t\t\t$sqlLimit.= ($this->cantidad) ? ','.$this->cantidad : '';\r\n\t\t}\r\n\t\t\r\n\t\t$oSql = \"SELECT count(gal_id) as total \r\n\t\t\tFROM {$this->_table}noticias_galeria_multimedia\r\n\t\t\tWHERE {$sqlWhereFinal}\";\r\n\r\n\t\t$this->log.= '- Realizando consulta previa, para saber la cantidad de resultados.
    ';\r\n\t\t$this->log.= '- Consulta SQL:'.$oSql.'
    ';\r\n\t\t\r\n\t\t$this->log.= '- Generando consulta definitiva
    ';\r\n\t\t$oSqlFinal = \"SELECT {$this->_table}noticias_galeria_multimedia.*\r\n\t\t\tFROM {$this->_table}noticias_galeria_multimedia\r\n\t\t\tWHERE {$sqlWhereFinal}\r\n\t\t\t{$sqlOrden}\r\n\t\t\t{$sqlLimit}\";\r\n\r\n\t\t$this->log.= '- Consulta SQL definitiva:'.$oSqlFinal.'
    ';\r\n\r\n\t\t/* Consultando si posee cache */\r\n\t\tif ($this->_cacheOK) {\r\n\r\n\t\t\t$this->log.= '- Intentando recuper datos de cache.
    ';\r\n\r\n\t\t\t$cacheName = md5($oSqlFinal);\r\n\r\n\t\t\tif ($cacheData = $this->cache->get($cacheName)) {\r\n\t\t\t\r\n\t\t\t\t$this->log.= '- Datos de cache recuperados OK.
    ';\r\n\r\n\t\t\t\t$this->totalPaginas = $cacheData['totalPaginas'];\r\n\t\t\t\t$this->totalResultados = $cacheData['totalResultados'];\r\n\t\t\t\t// $this->facetas = $cacheData['facetas'];\r\n\t\t\t\t$im = $cacheData['im'];\r\n\t\t\t\t\r\n\t\t\t\treturn $im;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif (!$res = $this->db->query($oSql)) {\r\n\t\t\t$this->log.= '- Error al ejecutar la consulta.
    ';\r\n\t\t\t$this->log.= '- El sistema dice:'.$this->db->error().'
    ';\r\n\t\t\r\n\t\t\t$this->error(5);\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$rs = $this->db->next($res);\r\n\t\t$this->totalResultados = $rs['total'];\r\n\r\n\t\t$this->log.= '- Consulta SQL OK.
    ';\r\n\r\n\t\tif ($this->cantidad) {\r\n\t\t\t$this->totalPaginas = ceil($this->totalResultados / $this->cantidad);\r\n\t\t} else {\r\n\t\t\t$this->totalPaginas = $this->totalResultados;\r\n\t\t}\r\n\t\t\r\n\t\t$this->log.= '- Total de resultados encontrados:'.$this->totalResultados.'
    ';\r\n\t\t$this->log.= '- Total de páginas devueltas:'.$this->totalPaginas.'
    ';\r\n\r\n\t\tif (!$res = $this->db->query($oSqlFinal)) {\r\n\t\t\t$this->log.= '- Error al ejecutar la consulta.
    ';\r\n\t\t\t$this->log.= '- El sistema dice:'.$this->db->error().'
    ';\r\n\r\n\t\t\t$this->error(5);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->log.= '- Recuperando información final
    ';\r\n\t\t$im = array();\r\n\r\n\t\t$idList = '';\t// Listado de ids para luego agregar información\r\n\t\t$idArray = array();\t// Ubicación del Id para luego agregarle información\r\n\t\t\r\n\t\t// Información extra solo para Adjuntos\r\n\t\t$idListExtra = '';\t// Listado de ids para luego agregar información\r\n\t\t$idArrayExtra = array();\t// Ubicación del Id para luego agregarle información\t\t\r\n\r\n\t\tif ($this->db->num_rows($res)) {\r\n\t\t\tfor ($i=0; $i<$this->db->num_rows($res);$i++) {\r\n\t\t\t\t$rs = $this->db->next($res);\r\n\r\n\t\t\t\t$rs['extra'] = json_decode($rs['gal_extra'], true);\r\n\t\t\t\t\r\n\t\t\t\tforeach ($rs as $j => $s) {\r\n\t\t\t\t\tif (is_string($s) && $s != '') {\r\n\r\n\t\t\t\t\t\t// Aplica el formato negrita, cursiva, etc y los saltos de líneas\r\n\t\t\t\t\t\t$s = htmlspecialchars_decode($s, ENT_QUOTES);\r\n\t\t\t\t\t\t$s = str_replace(\"\\n\", \"
    \", $s);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Aplico vínculos cliqueables al texto\r\n\t\t\t\t\t\tif ($j == 'gal_descripcion') {\r\n\t\t\t\t\t\t\t$s = clickable($s);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// cierro los tags que puedan haber quedado abiertos\r\n\t\t\t\t\t\t$s = closeTags($s);\r\n\r\n\t\t\t\t\t\t$rs[$j] = $s;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Devuelvo la extensión del adjunto.\r\n\t\t\t\t$rs['gal_file_ext'] = '';\r\n\t\t\t\tif (strpos($rs['gal_file'], '.') && strpos($rs['gal_file'], 'http:') === false) {\r\n\t\t\t\t\t$oFileExtArr = explode('.', $rs['gal_file']);\r\n\t\t\t\t\t$oFileExt = (count($oFileExtArr)>1) ? $oFileExtArr[count($oFileExtArr)-1] : '';\r\n\t\t\t\t\t$rs['gal_file_ext'] = $oFileExt;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Proceso solo si tengo asignado el array de datos\r\n\t\t\t\tif (is_array($this->datos)) {\r\n\t\t\r\n\t\t\t\t\t$fileUrl = pathAdjunto($this->datos[$rs['gal_galeria']], $rs['gal_file'], $rs['gal_fecha']);\r\n\t\t\t\t\tif ($fileUrl) {\r\n\t\t\t\t\t\t$rs = array_merge($rs, array('url' => $fileUrl));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Si es un video de YouTube proceso info extra\r\n\t\t\t\tif ($rs['gal_tipo'] == 'ytube') {\r\n\t\t\t\t\r\n\t\t\t\t\t$type_all = array(\r\n\t\t\t\t\t\t'link' => '/http:\\/\\/[w\\.]*youtube\\.com\\/watch\\?v=([^&#]*)|http:\\/\\/[w\\.]*youtu\\.be\\/([^&#]*)/i',\r\n\t\t\t\t\t\t'embed' => '/http:\\/\\/[w\\.]*youtube\\.com\\/v\\/([^?&#\"\\']*)/is',\r\n\t\t\t\t\t\t'iframe' => '/http:\\/\\/[w\\.]*youtube\\.com\\/embed\\/([^?&#\"\\']*)/is'\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$code = '';\r\n\t\t\t\t\tforeach($type_all as $type => $regexp) {\r\n\r\n\t\t\t\t\t\tpreg_match($regexp, $rs['gal_file'], $match);\r\n\t\t\t\t\t\tif (!empty($match)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tfor($ii = 1; $ii < sizeof($match); $ii++) {\r\n\t\t\t\t\t\t\t\tif($match[$ii] != '') {\r\n\t\t\t\t\t\t\t\t\t$code = $match[$ii];\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif($code != '') {\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($code != '') {\r\n\t\t\t\t\t\t// Imagen grande alternativa\r\n\t\t\t\t\t\t$rs['extra']['img_small'] = 'http://i.ytimg.com/vi/'.$code.'/default.jpg';\r\n\t\t\t\t\t\t$rs['extra']['img_large'] = 'http://i4.ytimg.com/vi/'.$code.'/hqdefault.jpg';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Igualo la ruta del archivo final para videos de ytube\r\n\t\t\t\t\t\t$rs['url']['o'] = $rs['gal_file'];\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Compatibilizo si no recibe esta data desde la dbase\r\n\t\t\t\t\t\t$rs['extra']['iframe'] = 'http://www.youtube.com/embed/'.$code;\r\n\t\t\t\t\t\t$rs['extra']['embed'] = 'http://www.youtube.com/v/'.$code;\r\n\t\t\t\t\t\t$rs['extra']['url'] = 'http://www.youtube.com/watch?v='.$code;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$im[$i] = $rs;\r\n\t\t\t\t$idList.= ','.$rs['gal_id'];\r\n\t\t\t\t$idArray[$rs['gal_id']][] = $i;\r\n\t\t\t\t\r\n\t\t\t\tif (!empty($rs['extra']['adjunto'])) {\r\n\t\t\t\t\t$idListExtra.= ','.$rs['extra']['adjunto'];\r\n\t\t\t\t\t$idArrayExtra[$rs['extra']['adjunto']][$rs['gal_id']] = $i;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$idList = substr($idList,1);\r\n\t\t\t$idListExtra = substr($idListExtra,1);\r\n\t\t}\r\n\t\t\r\n\t\t// Cargo los adjuntos extras del item\r\n\t\t$im = $this->loadItemsExtras($im, $idListExtra, $idArrayExtra);\r\n\r\n\t\t// Cargo los adjuntos del item\r\n\t\t$im = $this->loadAdjuntos($im, $idList, $idArray);\r\n\t\t\r\n\t\t// Cargo los art relacionados del item\r\n\t\t$im = $this->loadNotas($im, $idList, $idArray);\r\n\t\r\n\t\t// Cargo los comentarios del item\r\n\t\t$im = $this->loadComentarios($im, $idList, $idArray);\r\n\t\r\n\t\t// Cargo el mapa asociado al item\r\n\t\t// $im = $this->mapa($im, $idList, $idArray);\r\n\t\r\n\t\t// Cargo información de etiquetas del item\r\n\t\t$im = $this->tags($im, $idList, $idArray);\r\n\t\r\n\t\t// Cargo información de estadísticas del item\r\n\t\t$im = $this->stats($im, $idList, $idArray);\r\n\r\n\t\t// Cargo información reversa del item\r\n\t\tif ($this->reverse) {\r\n\t\t\t// Cargo los adjuntos a los que se asoció el item\r\n\t\t\t$im = $this->loadReverseAdjuntos($im, $idList, $idArray);\r\n\t\t\t\r\n\t\t\t// Cargo los art relacionados asociados al item\r\n\t\t\t$im = $this->loadReverseNotas($im, $idList, $idArray);\t\r\n\t\t}\r\n\r\n\t\t/* Consultando si posee cache */\r\n\t\tif ($this->_cacheOK) {\r\n\t\t\r\n\t\t\t$this->log.= '- Guardando consulta en Cache.
    ';\r\n\r\n\t\t\t$cacheName = md5($oSqlFinal);\r\n\r\n\t\t\t$cacheData = array();\r\n\t\t\t$cacheData['totalPaginas'] = $this->totalPaginas;\r\n\t\t\t$cacheData['totalResultados'] = $this->totalResultados;\r\n\t\t\t// $cacheData['facetas'] = $this->facetas;\r\n\t\t\t$cacheData['im'] = $im;\r\n\r\n\t\t\t// consulta si posee cache, sino lo guarda por 24 hs.\r\n\t\t\t$cacheExpire = !empty($this->cacheExpire) ? $this->cacheExpire : 86400;\r\n\r\n\t\t\tif ($this->cache->set($cacheName, $cacheData, $cacheExpire)) {\r\n\r\n\t\t\t\t$this->log.= '- Información guardada en cache por:'.$cacheExpire.' segundos.
    ';\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$this->log.= '- Error al guardar información en cache.
    ';\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $im;\r\n\t}","title":""},{"docid":"cc1af9b74bb6373e5ba136199b1a869a","score":"0.46204364","text":"public function cache_exists() {\n return isset($this->static_cache[$this->cache_name]);\n }","title":""},{"docid":"cbc07626413f393029c51ece1c59d89b","score":"0.46147287","text":"abstract public function needsExecution(): bool;","title":""},{"docid":"5c5cb42fa81ace06899c94f6f1f334cf","score":"0.46136022","text":"public function checkiscached()\n {\n $template = 'user/cachedemo/checkiscached.tpl';\n\n // force caching on\n $this->view->setCaching(Zikula_View::CACHE_ENABLED);\n\n //force local cache lifetime\n $localcachelifetime = 31;\n $this->view->setCacheLifetime($localcachelifetime);\n\n // check to see if the tempalte is cached, if not, get required data\n if (!$this->view->is_cached($template)) {\n // manufactured wait to demo DB fetch or something resource intensive\n sleep(5);\n\n $this->view->assign('time', microtime(true));\n $this->view->assign('localcachelifetime', $localcachelifetime);\n }\n return $this->view->fetch($template);\n }","title":""},{"docid":"e85267a12aee2c1d5b06851ef36221d4","score":"0.46085775","text":"private function maybe_clear_storage() {\n\t\tif ( '1' === Param::request( 'clear_results' ) ) {\n\t\t\tdelete_option( 'rank_math_seo_analysis_results' );\n\t\t\twp_safe_redirect( Security::remove_query_arg_raw( 'clear_results' ) );\n\t\t\texit;\n\t\t}\n\t}","title":""},{"docid":"83d5e42ae651e0378d9f36702d62a5c7","score":"0.45958245","text":"protected function checkDefeatAudioCache(): bool\n {\n $assertion = true;\n $result = $this->parser->data['options']['drive_options']['defeat_audio_cache'];\n $check = self::DEFEAT_AUDIO_CACHE_DISABLED;\n\n return $this->scoreResult($result, $assertion, $check);\n }","title":""},{"docid":"7d74421e900815a8736aca59b2b289fd","score":"0.45953095","text":"protected function obtainNonCachedData()\n\t{\n\t}","title":""},{"docid":"4caf74662cc684bd1e23fa7b5a6ce75f","score":"0.45941424","text":"public function getCached();","title":""},{"docid":"f50e8a0c388079796b1e81c3d10f22c0","score":"0.45899394","text":"public function detect(){\n\t\t/*\n\t\t$cache=$this->isAnalysisCached();\n\t\tif($cache)\n\t\t\treturn $cache;\n*/\n\t\t$r=parent::detect();\n\t\t$r=$this->prepareResult();\n\t\t\n\t\t// saving the result of detection into the database for caching\n\t\t$r=$this->cacheAnalysis($r);\n\t\t\n\t\t$r->id=(string)$r->_id;\n\t\tunset($r->_id);\n\t\treturn (array)$r;\n\t}","title":""},{"docid":"83d384c1258c11017c964f84a955d96f","score":"0.4575388","text":"function qed_check( $check_name, $ignore_cache = false ) {\r\n\t\tstatic $cache = array();\r\n\r\n\t\tif ( ! isset( $cache[ $check_name ] ) || $ignore_cache ) {\r\n\t\t\t$result = false;\r\n\t\t\tswitch ( $check_name ) {\r\n\t\t\t\tcase 'media_category_taxonomy_exists':\r\n\t\t\t\t\t$result = taxonomy_exists( 'media_category' );\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'is_wpml_in_use':\r\n\t\t\t\t\t$result = defined( 'ICL_SITEPRESS_VERSION' ); // function_exists( 'icl_object_id' );.\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase 'is_wordpress_seo_in_use':\r\n\t\t\t\t\t$result = defined( 'WPSEO_VERSION' );\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t$cache[ $check_name ] = $result;\r\n\t\t}\r\n\r\n\t\treturn $cache[ $check_name ];\r\n\t}","title":""},{"docid":"a0c9e3c8fa1601966b1acb0a154ededc","score":"0.45711517","text":"public function exist_cache(){\n\t\t\t\n\t\t\tif (!$this->CachedString->isHit()) {\n\t\t\t\treturn false;\n\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}","title":""},{"docid":"9efaa3bda54b46384b29342b217b43ff","score":"0.45685363","text":"public function refreshCache()\n\t{\n\t\t$vsid = $this->getID();\n\t\tif (false === ($result = GDO::table('GWF_VoteScoreRow')->selectFirst(\"AVG(vsr_score), SUM(vsr_score), COUNT(*)\", \"vsr_vsid={$vsid}\", '', NULL, GDO::ARRAY_N)))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->saveVars(array(\n\t\t\t'vs_avg' => $result[0] === NULL ? $this->getInitialAvg() : $result[0],\n\t\t\t'vs_sum' => $result[1],\n\t\t\t'vs_count' => $result[2],\n\t\t));\n\t}","title":""},{"docid":"03362c1938fd27c07f3ef9abb950d962","score":"0.45562294","text":"function _slack_call_api_cached($slack, $method, $args, $ttl = MICROBOT_TTL_1_MINUTE) {\n if (!is_a($slack, 'Slack')) {\n throw new Exception(__FUNCTION__ . \" was called with an invalid Slack instance; did you forget to pass one in?\");\n }\n $cache_filename = MICROBOT_TMP_DIR . \"/slack.\" . $method . \".\" . sha1(json_encode($args)) . \".ttl\" . $ttl . \".json\";\n if (file_exists($cache_filename) && (time() - filemtime($cache_filename)) < $ttl) {\n return json_decode(file_get_contents($cache_filename), true);\n }\n\n $resp = $slack->call($method, $args);\n file_put_contents($cache_filename, json_encode($resp));\n return $resp;\n}","title":""},{"docid":"81c30bf6393c777ccc928db5b7803784","score":"0.45554203","text":"private function manage_cache(){\n if ( ! laterpay_check_is_vip_classic() || ! function_exists( 'vary_cache_on_function' ) ) {\n return;\n }\n $client_options = LaterPay_Helper_Config::get_php_client_options();\n $skip_cache_for_cookie = sprintf( '$skip_cache_keys = array( \"laterpay_tracking_code\", \"%s\" );', sanitize_key( $client_options[\"token_name\"] ) );\n $skip_cache_for_cookie .= '\n foreach ( $skip_cache_keys as $key ) {\n if ( array_key_exists( $key, $_COOKIE ) ) {\n return;\n }\n }\n if ( ! empty( $_GET[\"lptoken\"] ) ) {\n return;\n }\n return true;';\n\n vary_cache_on_function( $skip_cache_for_cookie );\n\n if ( ! function_exists( 'batcache_cancel' ) ) {\n return;\n }\n $skip_cache_keys = array(\n 'laterpay_tracking_code',\n $client_options[\"token_name\"],\n );\n foreach ( $skip_cache_keys as $key ) {\n if ( array_key_exists( $key, $_COOKIE ) ) { // phpcs:ignore\n // Cancel adding cache if cookie is present since it can be user specific content.\n batcache_cancel();\n return;\n }\n }\n if ( ! empty( $_GET['lptoken'] ) ) { // When laterpay payment api redirects to set token in cookie.\n batcache_cancel();\n return;\n }\n }","title":""},{"docid":"69806e95aea799a798f645b7052d662e","score":"0.45499074","text":"public function hasCache() {\n return !!$this->cache;\n }","title":""},{"docid":"1bab89ba1d9c37c66653e8938516f692","score":"0.45470914","text":"static public function get_cached_source( $schedule_id, $source_type = false ) {\n if( !( ( $uploads = wp_upload_dir( current_time( 'mysql' ) ) ) && false === $uploads[ 'error' ] ) ) {\n return false; // upload dir is not accessible\n }\n if( $source_type ) {\n $source_type = $source_type . '_';\n }\n $cache_file = $uploads[ 'basedir' ] . \"/wpp_import_files/temp/{$schedule_id}/{$source_type}cache.xml\";\n //** Check if a source_cache file exists and is not empty */\n if( file_exists( $cache_file ) && filesize( $cache_file ) ) {\n $xml_data = file_get_contents( $cache_file );\n $result[ 'time' ] = filemtime( $cache_file );\n $result[ 'xml_data' ] = $xml_data;\n return $result;\n }\n return false;\n }","title":""},{"docid":"5afcce580b5916754deac5d1db5073c9","score":"0.45397237","text":"public function CacheGetOutput() {\n\t\t$key = $this->CacheKey();\n\n\t\tif ('0' == GetGet('cache')) {\n\t\t\t// Cache temp off, but still gen & set\n\t\t\t$s = NULL;\n\t\t} else {\n\t\t\t// Try get\n\t\t\t$s = $this->oCache->Get($key, $this->CacheLifetime());\n\t\t}\n\n\t\tif (is_null($s)) {\n\t\t\t// Cache invalid, gen and set\n\t\t\t$s = $this->GetOutput();\n\t\t\t$this->oCache->Set($key, $s, $this->CacheLifetime());\n\t\t}\n\n\t\treturn $s;\n\t}","title":""},{"docid":"4a20864d6b608b2c0fd20c5b56ff9a60","score":"0.45347184","text":"public function save($notifyJsonCache = true) {\r\n\t\tglobal $wpdb;\r\n\t\t// TODO: check permissions\r\n\t\tUwr1resultsHelper::enforcePermission( 'save' );\r\n\r\n\t\t// check if a result for this fixture already exists.\r\n\t\t// otherwise, the submitter name get overwritten and that sucks.\r\n\t\t$doSave = false;\r\n\r\n\t\t// kludge: use an internal second instance of this class\r\n\t\t$tmpInstance = new Uwr1resultsModelResult();\r\n\t\t$oldResult = $tmpInstance->findById($this->id());\r\n\r\n\t\t$this->updatePoints();\r\n\t\t$changes = Uwr1resultsModel::diff($oldResult->properties, $this->properties);\r\n\t\t// ignore all fields which are not relevant for the decission of $doSave\r\n\t\t$ignoreFields = array('userId', 'modified',\r\n\t\t\t\t\t\t\t'goalsHalfBlue', 'goalsHalfWhite',\r\n\t\t\t\t\t\t\t'goalsRegularBlue', 'goalsRegularWhite');\r\n\t\tforeach ($ignoreFields as $field) {\r\n\t\t\tunset($changes->$field);\r\n\t\t}\r\n\r\n\t\t// all cases where an update is needed:\r\n\t\t// 1) new result (there is no old result)\r\n\t\tif (!$doSave && !@$oldResult->id()) {\r\n\t\t\t$doSave = true;\r\n\t\t}\r\n\t\t// 2) result changed (we optimistically assume the new one is a correction)\r\n\t\tif (!$doSave && \r\n\t\t\t(isset($changes->goalsBlue) || isset($changes->goalsWhite))\r\n\t\t\t) {\r\n\t\t\t$doSave = true;\r\n\t\t}\r\n\t\t// 3) comment changed and not set to empty string\r\n\t\t$newComment = trim(@$changes->comment['new']);\r\n\t\tif (!$doSave && !empty($newComment)) {\r\n\t\t\t$doSave = true;\r\n\t\t}\r\n\t\tunset($newComment);\r\n\t\t\r\n\t\tif (!$doSave) { return; }\r\n\r\n\r\n\t\t$this->updatePoints();\r\n\t\t\r\n\t\t// re-compute $changes after updatePoints\r\n\t\t$changes = Uwr1resultsModel::diff($oldResult->properties, $this->properties);\r\n\t\t// ignore fields which are not user-settable\r\n\t\t$ignoreFields = array('modified',\r\n\t\t\t\t\t\t\t'goalsHalfBlue', 'goalsHalfWhite',\r\n\t\t\t\t\t\t\t'goalsRegularBlue', 'goalsRegularWhite');\r\n\t\tforeach ($ignoreFields as $field) {\r\n\t\t\tunset($changes->$field);\r\n\t\t}\r\n\r\n\t\t// escape and quote $comment\r\n\t\t$comment = $this->comment();\r\n\t\t$this->set( 'comment', \"'\" . Uwr1resultsHelper::sqlEscape( $comment ) . \"'\" );\r\n\r\n\t\t$fields = array();\r\n\t\t$values = array();\r\n\t\tforeach ($this->dbMapping as $prop => $dbField) {\r\n\t\t\t$fields[] = $dbField;\r\n\t\t\t$values[] = $this->$prop();\r\n\t\t}\r\n\t\t$fieldsStr = \"`\" . implode(\"`, `\", $fields) . \"`\";\r\n\t\t$valuesStr = implode(\", \", $values);\r\n/*\t\t\r\n\t\t$sql = 'REPLACE INTO `'.parent::getTable(get_class($this)).'`'\r\n\t\t\t. ' (`fixture_ID`, `user_ID`, `result_modified`, `result_goals_b`, `result_goals_w`)'\r\n\t\t\t. ' VALUES'\r\n\t\t\t. ' (' . $this->fixtureId() . ', ' . intval($current_user) . ', NOW(), ' . intval($_POST['goalsBlue']) . ', ' . intval($_POST['goalsWhite']) . ')';\r\n*/\r\n\t\t// For now: only one result per game: resultId == fixtureId\r\n\t\t$sql = 'REPLACE INTO `'.parent::getTable(get_class($this)).'`'\r\n\t\t\t. \" ({$fieldsStr})\"\r\n\t\t\t. ' VALUES'\r\n\t\t\t. \" ({$valuesStr})\";\r\n\t\t//print $sql;exit;\r\n\t\t$res = $wpdb->query($sql);\r\n\t\t\r\n\t\tif ($res && $notifyJsonCache) {\r\n\t\t\t$this->notifyJsonCache($this->leagueSlug(), __FILE__);\r\n\t\t}\r\n\r\n\t\t// TODO: change return type: $result_id on success, false otherwise\r\n\t\treturn $res;\r\n\t}","title":""},{"docid":"ac0d62ba85a7be6ea016629bf81e17b3","score":"0.45290223","text":"public function test_are_we_setting_the_cache()\n {\n $gracenote = new \\Atomescrochus\\Gracenote\\Gracenote();\n $gracenote->searchType('track_title');\n $gracenote->query('poker face');\n $cache_key = 'track_title-poker face';\n $gracenote->search();\n\n $this->assertTrue(Cache::has($cache_key));\n\n // remove it from cache, just in case it would interfer with future test\n Cache::forget($cache_key);\n $this->assertFalse(Cache::has($cache_key));\n }","title":""},{"docid":"9a8aef022d935fccd2d7eb1fe3ddc5ea","score":"0.45234227","text":"private function isCached() {\n $name = \"body\" . md5(Router::getInstance()->getController() . Router::getInstance()->getAction()) . \".min.js\";\n clearstatcache(true, $this->getJsDir() . $name);\n // check if the file exists\n if (file_exists($this->getJsDir().$name)) {\n if ($this->config['cache']['ttl'] == 0) return true;\n $limit = (time() - $this->config['cache']['ttl']);\n // check if the file is recent\n if ($limit > filemtime($this->getJsDir() . $name)) {\n return true;\n }\n return false;\n } else\n return false;\n }","title":""},{"docid":"4d113fb410016dce8fc421308a131803","score":"0.4523342","text":"public function execute()\n { \n $jsonResp['incache'] = false;\n $params = $this->getRequest()->getParams(); \n if(empty($params['cachecheeck']) == false) {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $sessionManager = $objectManager->create('\\Magento\\Framework\\Session\\SessionManagerInterface');\n $jsonFactory = $objectManager->create('\\Magento\\Framework\\Controller\\Result\\JsonFactory');\n $isInCache = $sessionManager->getNotInCache();\n if($isInCache) {\n $sessionManager->unsNotInCache();\n $jsonResp['incache'] = true; \n }\n $result = $jsonFactory->create();\n\t\t return $result->setData($jsonResp);\n \n } else {\n $this->_view->loadLayout();\n $this->_view->renderLayout();\n }\n }","title":""},{"docid":"9b47c67d4268278cf200482c2dfa399f","score":"0.45231894","text":"public function cache()\n\t{\n\t\t$sources = $this->getSources();\n\t\tforeach ($sources as $source) {\n\t\t\t$source->cache();\n\t\t};\n\t}","title":""},{"docid":"45fac12873f7e823912f9f4c34d2da57","score":"0.4519064","text":"public function should_cache() {\n return (($this->method == HTTP_Request2::METHOD_GET) && $this->config['cache']) || $this->config['force_cache'];\n }","title":""},{"docid":"6495e94618e9b0997b109071fd022b5b","score":"0.45149752","text":"public static function share_cache(){\n self::$cache_shared = true;\n }","title":""},{"docid":"eb0fa60dff69ddfe11d077f189d50b91","score":"0.45116335","text":"protected function getFromCache()\r\n {\r\n return false;\r\n }","title":""},{"docid":"6cbc6952d9b18b67ce992aea942ad628","score":"0.45073825","text":"function smarty_core_read_cache_file( &$params, &$smarty )\r\n{\r\n static $content_cache = array( );\r\n if ( $smarty->force_compile )\r\n {\r\n return FALSE;\r\n }\r\n if ( isset( $content_cache[$params['tpl_file'].\",\".$params['cache_id'].\",\".$params['compile_id']] ) )\r\n {\r\n $smarty->_cache_info = $content_cache[$params['tpl_file'].\",\".$params['cache_id'].\",\".$params['compile_id']][1];\r\n $params['results'] = $content_cache[$params['tpl_file'].\",\".$params['cache_id'].\",\".$params['compile_id']][0];\r\n return TRUE;\r\n }\r\n if ( !empty( $smarty->cache_handler_func ) )\r\n {\r\n call_user_func_array( $smarty->cache_handler_func, array(\r\n \"read\",\r\n $smarty,\r\n $params['results'],\r\n $params['tpl_file'],\r\n $params['cache_id'],\r\n $params['compile_id'],\r\n NULL\r\n ) );\r\n }\r\n else\r\n {\r\n $_auto_id = $smarty->_get_auto_id( $params['cache_id'], $params['compile_id'] );\r\n $_cache_file = $smarty->_get_auto_filename( $smarty->cache_dir, $params['tpl_file'], $_auto_id );\r\n $params['results'] = $smarty->_read_file( $_cache_file );\r\n }\r\n if ( empty( $params['results'] ) )\r\n {\r\n return FALSE;\r\n }\r\n $_contents = $params['results'];\r\n $_info_start = strpos( $_contents, \"\\n\" ) + 1;\r\n $_info_len = ( integer )substr( $_contents, 0, $_info_start - 1 );\r\n $_cache_info = unserialize( substr( $_contents, $_info_start, $_info_len ) );\r\n $params['results'] = substr( $_contents, $_info_start + $_info_len );\r\n if ( $smarty->caching == 2 && isset( $_cache_info['expires'] ) )\r\n {\r\n if ( 0 - 1 < $_cache_info['expires'] && $_cache_info['expires'] < time( ) )\r\n {\r\n return FALSE;\r\n }\r\n }\r\n else if ( 0 - 1 < $smarty->cache_lifetime && $smarty->cache_lifetime < time( ) - $_cache_info['timestamp'] )\r\n {\r\n return FALSE;\r\n }\r\n if ( $smarty->compile_check )\r\n {\r\n $_params = array( \"get_source\" => FALSE, \"quiet\" => TRUE );\r\n foreach ( array_keys( $_cache_info['template'] ) as $_template_dep )\r\n {\r\n $_params['resource_name'] = $_template_dep;\r\n if ( !$smarty->_fetch_resource_info( $_params ) || $_cache_info['timestamp'] < $_params['resource_timestamp'] )\r\n {\r\n return FALSE;\r\n }\r\n }\r\n if ( isset( $_cache_info['config'] ) )\r\n {\r\n $_params = array(\r\n \"resource_base_path\" => $smarty->config_dir,\r\n \"get_source\" => FALSE,\r\n \"quiet\" => TRUE\r\n );\r\n foreach ( array_keys( $_cache_info['config'] ) as $_config_dep )\r\n {\r\n $_params['resource_name'] = $_config_dep;\r\n if ( !$smarty->_fetch_resource_info( $_params ) || $_cache_info['timestamp'] < $_params['resource_timestamp'] )\r\n {\r\n return FALSE;\r\n }\r\n }\r\n }\r\n }\r\n $content_cache[$params['tpl_file'].\",\".$params['cache_id'].\",\".$params['compile_id']] = array(\r\n $params['results'],\r\n $_cache_info\r\n );\r\n $smarty->_cache_info = $_cache_info;\r\n return TRUE;\r\n}","title":""},{"docid":"6166c21746761a7ceca21bff6fe5a08d","score":"0.45054048","text":"public function isUsingMemoized()\n\t{\n\t\treturn $this->_useMemoized;\n\t}","title":""},{"docid":"8b374aa7ec6e91e14446efc432b94e51","score":"0.4503109","text":"function workflow_invalidate_cache() {\n workflow_load_all(TRUE);\n}","title":""},{"docid":"1d6f823eac50f24baf6a4fb0810f631d","score":"0.45026395","text":"function check_cache($file) {\n\t\tif(!$this->cache['cache_enable']) {\n\t\t\t$this->cache['cached'] = false;\n\t\t\treturn false;\n\t\t}\n\t\tif(!@file_exists($file)) {\n\t\t\t$this->cache['cached'] = false;\n\t\t\treturn false;\n\t\t}\n\t\t$this->cache['cached'] = true;\n\t\treturn true;\n\t}","title":""},{"docid":"42514d5779f1159a7d1b21fd512ef47d","score":"0.4498361","text":"public function configurationIsCached(): bool\n {\n return false;\n }","title":""},{"docid":"08db3164f7f2b145ad548a67c761bda0","score":"0.44904435","text":"public function isCached() {\n return $this->_is_cached ? $this->_createCacheKey($this->getId()) : false;\n }","title":""},{"docid":"be1be0bdf479100a6c26d02a868600e9","score":"0.44900268","text":"public function testDoSaveWithDefinedLifeTime()\n {\n $this->primaryProvider\n ->expects($this->any())\n ->method('save')\n ->will($this->returnValue(true));\n\n $this->secondaryProvider\n ->expects($this->any())\n ->method('save')\n ->will($this->returnValue(true));\n\n $this->assertEquals(true, $this->cache->save('panda', 'asdf', 123));\n }","title":""},{"docid":"91215df5a767e0e6dfbfc7ac4d8fd661","score":"0.44790623","text":"public function testDoSaveWithDefaultLifeTime()\n {\n $this->primaryProvider\n ->expects($this->any())\n ->method('save')\n ->will($this->returnValue(true));\n\n $this->secondaryProvider\n ->expects($this->any())\n ->method('save')\n ->will($this->returnValue(true));\n\n $this->assertEquals(true, $this->cache->save('panda', 'asdf'));\n }","title":""},{"docid":"ab6d55bdfd2db6ee8d4a44d62ecec012","score":"0.44766867","text":"function isCached()\n\t{\n\t\treturn $this->is_cached ;\n\t}","title":""},{"docid":"43251772ec413af5f278e4e1bb9c18f0","score":"0.44700038","text":"function RecalculateSharingRules()\n{\n\tglobal $log;\n\t$log->debug(\"Entering RecalculateSharingRules() method ...\");\n\tglobal $adb;\n\n\t$log->debug(\"Exiting RecalculateSharingRules method ...\");\t\n\t\t\t\t\n}","title":""},{"docid":"384beb5edae66eb27afb72143c73771b","score":"0.4468517","text":"public function updateCache()\n {\n $update_cache_process = update_option( 'sprout_logged_errors', $this->cache, 'no' );\n\n if( !$update_cache_process ) {\n return False;\n }\n\n return True;\n }","title":""},{"docid":"b513918c4f12d5313d971e0006fb184b","score":"0.4458395","text":"public static function CacheExists($what)\n\t{\n\t\tif(isset(self::$cache[$what]))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}","title":""},{"docid":"4dbcb33ef8c5274e1a4c5e249aadd047","score":"0.4451571","text":"public function getFromCache()\n {\n $hash = sha1($this->properties['orContent']);\n //if cache is not enabled we leave from here\n if ($this->properties[self::ENABLE_CONTENT_CACHE] !== true) {\n return false;\n }\n\n foreach ($this->properties[self::ASSIGNED] as $var => $val) {\n ${$var} = $val;\n }\n $_cache = new Cache($this->cacheStorage);\n //we load our sourcecode from cache\n $this->properties[self::SOURCE] = $_cache->load($hash);\n\n if($this->properties[self::SOURCE] === null){\n return false;\n }\n\n $this->properties[self::SOURCE] = \"\\n\".$this->properties[self::SOURCE];\n ob_start();\n $e = eval('?>' . $this->properties[self::SOURCE]);\n $this->properties[self::OUTPUT] = ob_get_clean();\n if ($e === false) {\n die(\"Error: unable to compile template\");\n }\n\n return true;\n }","title":""},{"docid":"ea935c088d327b0b8b300f4bebc65a38","score":"0.4449083","text":"private function loadCache() {\n\t\t$cache = get_site_option(self::OPTION_KEY);\n\t\tif ($cache === false) {\n\t\t\treturn $this->updateCache();\n\t\t}\n\t\t$this->cache = $cache;\n\t}","title":""},{"docid":"3d6b0b67ce192db5bbb6834e61eb8d6a","score":"0.4447546","text":"private function isUsed(): bool\n {\n\n return ($this->success\n or (($this->local_status ?? Transaction::LOCAL_STATUS_INIT) != Transaction::LOCAL_STATUS_INIT)\n or $this->cashier_id // i.e. do not reuse those created by admin, not that it matters though.\n );\n }","title":""},{"docid":"baf8a7e1d66d4ffca5d2fa13b364e999","score":"0.44465595","text":"public function configurationIsCached()\n {\n return false;\n }","title":""},{"docid":"0cede0eb594cfc444bc30603cd3b2adf","score":"0.44417682","text":"private function __cache() { \n \n // Save the data to the cache.\n $this->cache->set($this->method, $this->endpoint, $this->query, [\n 'status' => $this->status,\n 'data' => $this->data,\n 'features' => $this->features\n ]);\n \n }","title":""},{"docid":"f872129216499fbec1e78779c2cf933c","score":"0.4437814","text":"public function syncValues() {\n\t\t$DashboardKpi = ClassRegistry::init('Dashboard.DashboardKpi');\n\t\t$kpi = $DashboardKpi->find('list', [\n\t\t\t'fields' => ['id'],\n\t\t\t'recursive' => -1\n\t\t]);\n\n\t\t$ret = true;\n\t\tforeach ($kpi as $kpiId) {\n\t\t\t$ret &= $DashboardKpi->recalculate($kpiId);\n\t\t}\n\n\t\t$ret &= $this->_saveInternalLog(DashboardLog::TYPE_RECALCULATION);\n\n\t\treturn $ret;\n\t}","title":""},{"docid":"1acb25ca843db6122f2ef7a0e192ab91","score":"0.44374546","text":"public function injectFindMatchResultsCache(\\F3\\FLOW3\\Cache\\Frontend\\VariableFrontend $cache) {\n\t\t$this->findMatchResultsCache = $cache;\n\t}","title":""},{"docid":"26a3db560689399a5611fac1def031aa","score":"0.44291365","text":"public static function maybe_cached_request( $url, $args ) {\n\t\t$data = static::get_data( $url );\n\n\t\tif ( ! empty( $data ) ) {\n\t\t\t// check to see if this request is expired\n\t\t\tstatic::check_for_expired_result( $data, $args );\n\n\t\t\treturn $data;\n\t\t}\n\n\t\treturn false;\n\t}","title":""},{"docid":"0be02282b657f98cf56430f73b9de0b7","score":"0.44271722","text":"function _cacheMiss($cache, $id) {\n\t\t$submission = $this->getById($id, null, false);\n\t\t$cache->setCache($id, $submission);\n\t\treturn $submission;\n\t}","title":""},{"docid":"bf1963d1715a4bff8504e158657231a8","score":"0.44263747","text":"function optimizeTables() {\r\n $db =& $this->state->getByRef('db');\r\n\t if (!$this->canExecute('lastOptimization', $this->getRandomTime(300000, 600000))) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t$paramsSettings = $this->createParamsObject();\r\n\t\t\t$paramsSettings->setField('lastOptimization', $db->getDateString());\r\n\t\t\t$this->callService('Settings', 'updateSetting', $paramsSettings);\r\n\t\t}\r\n return $this->runOptimizeTables();\t\t\r\n\t}","title":""},{"docid":"3422174a5e88f65a82fd0276c8c27e73","score":"0.44221178","text":"function previous_references_get_cache(){\n\t\tif ($data = cache_get('previous_references_data','cache')){\n\t\t\treturn $data->data;\n\t\t}\n\t\treturn false;\n\t}","title":""},{"docid":"430547571b1134b72d49edc109c52f26","score":"0.4420516","text":"public function execute()\n {\n // Parse external values\n $this->parseExternalValues();\n\n // Compare external values\n $result = false;\n if ( $this->monolingualTextValueComparer ) {\n $result = $this->monolingualTextValueComparer->execute();\n }\n\n return $result;\n }","title":""},{"docid":"4cf4b8a8ae2010bfc1e0c4e3c04d68bd","score":"0.44068968","text":"public function hasResult(): bool;","title":""},{"docid":"ebe4be41ef4a563a4270d4cb0ecf6b17","score":"0.44055942","text":"private function checkCacheGet(){\n\t\t$cache_path = $this->cachePath();\n\t\t\n\t\t// Check we're not being run by PHP-CLI\n\t\tif(php_sapi_name() == 'cli'){\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Do we have a cached version?\n\t\tif(!file_exists($cache_path)){\n\t\t\tMagicLogger::log(\"No cache file exists at {$cache_path}.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Has the cached file expired?\n\t\tif(filemtime($cache_path) < strtotime('1 hour ago')){\n\t\t\tMagicLogger::log(\"File at {$cache_path} too old.\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t// No caching if the user is logged in.\n\t\tif($this->checkCacheGetHasUser()){\n\t\t\tMagicLogger::log(\"User is logged in, not serving cached file {$cache_path}\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t// No caching if there is a POST operation going on\n\t\tif(count($_POST) > 0){\n\t\t\tMagicLogger::log(\"Request is a POST, not serving {$cache_path}\");\n\t\t\treturn FALSE;\n\t\t}\n\t\t// None of the above true? We can served a cached file.\n\t\treturn TRUE;\n\t}","title":""},{"docid":"f9c73e042073ed440c38fe726c015b8a","score":"0.43985003","text":"function si_exhibition_cache($cache_name, $cache_data_index, $overwrite = FALSE, $permanent = FALSE){\n global $tnum;\n si_exhibition_debug(\"si_exhibition_cache $cache_name | $cache_data_index | $overwrite | $permanent |\");\n if (!variable_get('si_exhibition_cache_on',TRUE)){\n si_exhibition_debug(\"si_exhibition_cache is turned off\");\n if ($overwrite !== FALSE) return $overwrite; //If caching is turned off, don't use caching!\n return NULL;\n }\n $prefix = 'si_exhibition_cache_';\n $cache_table_for_clearing = 'cache';\n if ($overwrite === FALSE){\n $cache = NULL;\n if ($cache_info = cache_get($prefix.$cache_name, $cache_table_for_clearing)){\n $cache = $cache_info->data;\n if ($cache_data_index == ''){\n si_exhibition_debug(\"si_exhibition_cache returning entire cache\", $cache);\n //return the entire cache\n return $cache;\n }\n if (array_key_exists($cache_data_index, $cache)){\n si_exhibition_debug(\"si_exhibition_cache returning specific cache\", $cache[$cache_data_index]);\n return $cache[$cache_data_index];\n }\n }\n }else{\n /*\n if (!is_string($overwrite)){\n if (empty($tnum)) $tnum = 0;\n $tnum++;\n print 'NOT STRING wbt';\n var_dump($overwrite);\n debug_print_backtrace();\n if ($tnum > 1) exit();\n }\n */\n $data = array();\n if ($cache_info = cache_get($prefix.$cache_name, $cache_table_for_clearing)){\n $data = $cache_info->data;\n }\n $data[$cache_data_index] = $overwrite;\n $hours = 3;\n $expire_date_time = time() + 60 * 60 * $hours;\n if ($permanent === TRUE){\n $expire_date_time = CACHE_PERMANENT;\n }\n si_exhibition_debug(\"si_exhibition_cache setting cache $prefix | $cache_name\", $data);\n cache_set($prefix.$cache_name, $data, $cache_table_for_clearing, $expire_date_time);\n return $overwrite;\n }\n si_exhibition_debug(\"si_exhibition_cache returning nothing found in cache\");\n return NULL;\n}","title":""},{"docid":"6f6184cb4a7fbf04d7aa6dcd355ae35a","score":"0.43920428","text":"function check_cache ( $url )\n\t{\n\t\t$this->ERROR = \"\";\n\t\t$filename = $this->file_name( $url );\n\n\t\tif ( file_exists( $filename ) )\n\t\t{\n\t\t\t// find how long ago the file was added to the cache\n\t\t\t// and whether that is longer then MAX_AGE\n\t\t\t$mtime = filemtime( $filename );\n\t\t\t$age = time() - $mtime;\n\t\t\tif ( $this->MAX_AGE > $age )\n\t\t\t{\n\t\t\t\t// object exists and is current\n\t\t\t\treturn 'HIT';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// object exists but is old\n\t\t\t\treturn 'STALE';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// object does not exist\n\t\t\treturn 'MISS';\n\t\t}\n\t}","title":""},{"docid":"1c66ee2c4cb1b286ed76e4fa3928198c","score":"0.43885598","text":"function touchCache() {\n $result = false;\n try {\n $result = $this->query(\n \"UPDATE Cache SET time = '{$time}' WHERE id = '{$id}';\" \n );\n }\n catch (PDOException $e) {\n die($e->getMessage());\n }\n return $result;\n }","title":""},{"docid":"5cf02aeb6d9e958a85fa0220868b262f","score":"0.43873352","text":"public function initcache(){\n $this->cpanel_api_ver = 'api1';\n return $this->_check_result($this->api1_query($this->user, 'Mysql', __FUNCTION__));\n }","title":""}],"string":"[\n {\n \"docid\": \"99098f35dbdf97195cb45e4fd17be741\",\n \"score\": \"0.63279456\",\n \"text\": \"protected function cacheAnalysis($result){\\n\\t\\tsmongo::$db->analysis->insert($result);\\n\\t\\treturn $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce89b953cd29f71e0662be72577ca6d6\",\n \"score\": \"0.5725143\",\n \"text\": \"public function maybeByPassCache();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99a5123d637852dee3376f6bba9aa8d2\",\n \"score\": \"0.5386595\",\n \"text\": \"private static function cacheResult($result)\\n {\\n\\t\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76b778272c7db6ca9be2cbe436a51789\",\n \"score\": \"0.5222791\",\n \"text\": \"function ProcessIncrementalResult() {\\n global $testPath;\\n global $done;\\n global $testInfo;\\n global $testInfo_dirty;\\n global $runNumber;\\n global $cacheWarmed;\\n global $location;\\n\\n if ($done) {\\n // mark this test as done\\n $testInfo['test_runs'][$runNumber]['done'] = true;\\n $testInfo_dirty = true;\\n \\n // make sure all of the sharded tests are done\\n for ($run = 1; $run <= $testInfo['runs'] && $done; $run++) {\\n if (!$testInfo['test_runs'][$run]['done'])\\n $done = false;\\n }\\n \\n if (!$done &&\\n array_key_exists('discarded', $testInfo['test_runs'][$runNumber]) &&\\n $testInfo['test_runs'][$runNumber]['discarded']) {\\n if (is_file(\\\"$testPath/test.job\\\")) {\\n if (copy(\\\"$testPath/test.job\\\", $testInfo['job_file'])) {\\n AddJobFileHead($location, $testInfo['workdir'], $testInfo['job'], $testInfo['priority'], true);\\n }\\n }\\n }\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7050a6ddd9a4ac6d342073199a3893e\",\n \"score\": \"0.520328\",\n \"text\": \"private function isCacheBypassed()\\n\\t{\\n\\t\\treturn !$this->use_cache;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14b2a5e623b621a74246fdb0a91efd93\",\n \"score\": \"0.5142566\",\n \"text\": \"public function cached();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b1c150309e04dd9d25361d544938f67\",\n \"score\": \"0.51316166\",\n \"text\": \"public function hasCache();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48ef374171a21813c174b76e75b99149\",\n \"score\": \"0.51020044\",\n \"text\": \"public function cache();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3e2523e74996e4048669617cfca9537\",\n \"score\": \"0.50676453\",\n \"text\": \"function check_for_existing_cached_chart($file) {\\n // Check if the file exists and return bool\\n $forcegeneration = optional_param('forcegeneration', false, PARAM_BOOL);\\n if ($forcegeneration==true) {\\n return false;\\n }\\n return (file_exists($file) && is_readable($file));\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73e88c1a86b472ab69c6c8ac51ad5ecf\",\n \"score\": \"0.50512487\",\n \"text\": \"public function cacheFileExists()\\n {\\n $request = RequestFactory::create(func_get_args(), $this->defaultManipulations);\\n\\n return $this->cache->has($this->getCachePath($request));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"941e8c7f963cb34d58920fc5ad009915\",\n \"score\": \"0.50386125\",\n \"text\": \"public function isCached(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"941e8c7f963cb34d58920fc5ad009915\",\n \"score\": \"0.50386125\",\n \"text\": \"public function isCached(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b41a86a3bd23fc141b1e8152a53942fb\",\n \"score\": \"0.5038088\",\n \"text\": \"private function set_cache_variable()\\r\\n\\t{\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t$sql = '\\tSELECT\\r\\n\\t\\t\\t\\t\\t\\t`IDP`,\\r\\n\\t\\t\\t\\t\\t\\t`NOM`,\\r\\n\\t\\t\\t\\t\\t\\t`resultat`,\\r\\n\\t\\t\\t\\t\\t\\t`type`,\\r\\n\\t\\t\\t\\t\\t\\t`id_action`,\\r\\n\\t\\t\\t\\t\\t\\t`id_src`,\\r\\n\\t\\t\\t\\t\\t\\t`id_action_src`,\\r\\n\\t\\t\\t\\t\\t\\t`used`,\\r\\n\\t\\t\\t\\t\\t\\t`defaut`,\\r\\n\\t\\t\\t\\t\\t\\t`neutre` \\r\\n\\t\\t\\t\\t\\tFROM \\r\\n\\t\\t\\t\\t\\t\\t`'.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_fiches_param']['name'].'` \\r\\n\\t\\t\\t\\t\\tWHERE 1 = 1\\r\\n\\t\\t\\t\\t\\t\\tAND `id_fiche` = \\\"'.$this->c_id_temp.'\\\"\\r\\n\\t\\t\\t ';\\r\\n\\r\\n\\t\\t$resultat = $this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\\r\\n\\r\\n\\t\\t$this->c_variables_fiche = null;\\r\\n\\t\\twhile($row = mysql_fetch_array($resultat,MYSQL_ASSOC))\\r\\n\\t\\t{\\r\\n\\t\\t\\tswitch($row['type'])\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase 'IN':\\r\\n\\t\\t\\t\\t\\t$nom = $row['NOM'].'()';\\r\\n\\t\\t\\t\\t\\t$utilisee = true;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 'OUT':\\r\\n\\t\\t\\t\\t\\t$nom = $row['NOM'].'('.$row['id_action'].')';\\r\\n\\t\\t\\t\\t\\t$utilisee = true;\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\tcase 'EXTERNE':\\r\\n\\t\\t\\t\\t\\t$nom = $row['NOM'].'('.$row['id_action'].'\\\\\\\\'.$row['id_src'].'\\\\\\\\'.$row['id_action_src'].')';\\r\\n\\t\\t\\t\\t\\t$nom_varext = $row['NOM'].'('.$row['id_src'].'\\\\\\\\'.$row['id_action_src'].')';\\r\\n\\t\\t\\t\\t\\t// Vérification de l'utilisation de la variable dans les étapes\\r\\n\\t\\t\\t\\t\\t($this->get_varinext_utilise($nom,$nom_varext) == true ? $used = 1 : $used = 0);\\r\\n\\r\\n\\t\\t\\t\\t\\t$sql = 'UPDATE `'.$_SESSION['iknow'][$this->c_ssid]['struct']['tb_fiches_param']['name'].'` \\r\\n\\t\\t\\t\\t\\t\\t\\tSET `used` = '.$used.'\\r\\n\\t\\t\\t\\t\\t\\t\\tWHERE `id_fiche` = '.$this->c_id_temp.' \\r\\n\\t\\t\\t\\t\\t\\t\\tAND `IDP` = '.$row['IDP'].' \\r\\n\\t\\t\\t\\t\\t\\t\\tAND `type` = \\\"EXTERNE\\\" \\r\\n\\t\\t\\t\\t\\t\\t\\tAND `id_action` = '.$row['id_action'].' \\r\\n\\t\\t\\t\\t\\t\\t\\tAND `id_src` = '.$row['id_src'].' \\r\\n\\t\\t\\t\\t\\t\\t\\tAND `id_action_src` = '.$row['id_action_src'].' \\r\\n\\t\\t\\t\\t\\t\\t\\tAND `NOM` = \\\"'.$row['NOM'].'\\\"';\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t$this->exec_sql($sql,__LINE__,__FILE__,__FUNCTION__,__CLASS__,$this->link);\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\tif($used == 1)\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t\\t$utilisee = true;\\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$utilisee = false;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif(isset($_GET[$row['NOM']]))\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$in_url = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$in_url = false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t$this->c_variables_fiche[] = array(0 => $nom,1 => $row['resultat'],2 => $row['type'], 3 => $row['id_action'],4 => $utilisee,5 => $row['defaut'],6 => $row['neutre'],7 => $in_url);\\r\\n\\t\\t}\\r\\n\\t\\t/*===================================================================*/\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de2c3ea415ae8cf9e8a0bc6d2c2df85b\",\n \"score\": \"0.5033254\",\n \"text\": \"public function storeInCache(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8110a95847bbfa2bb566dc6698db6776\",\n \"score\": \"0.49676377\",\n \"text\": \"public function define_caching(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9903b80b2e3d5370d09bfa6746abe869\",\n \"score\": \"0.49361405\",\n \"text\": \"public static function useCache() {\\n global $GLPI_CACHE;\\n return $GLPI_CACHE != null\\n && (!defined('TU_USER') || defined('CACHED_TESTS'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c55ee81e0b9b1d0ad5fc54b657b28bf2\",\n \"score\": \"0.4909914\",\n \"text\": \"function si_exhibition_cron_cache($function_name = FALSE, $arguments = FALSE){\\n $current_cron_cache = si_exhibition_cache('cron_check','', FALSE, TRUE);\\n if ($current_cron_cache == NULL) $current_cron_cache = array();\\n si_exhibition_debug(\\\"si_exhibition_cron_cache $function_name\\\");\\n if ($function_name === FALSE) return $current_cron_cache;\\n if (!array_key_exists($function_name, $current_cron_cache) || !is_array($current_cron_cache[$function_name])){\\n $current_cron_cache[$function_name] = array(); \\n }\\n if ($arguments === FALSE) return $current_cron_cache[$function_name];\\n\\n //Not a simple return, so it's a storage. Already created the cache if it didn't exist yet\\n //Now store the arguments (if they are not stored yet)\\n if (!in_array($arguments, $current_cron_cache[$function_name])) $current_cron_cache[$function_name][] = $arguments;\\n si_exhibition_cache('cron_check',$function_name, $current_cron_cache[$function_name], TRUE);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16482f1c0619da61ec1cfc4291dac936\",\n \"score\": \"0.48661295\",\n \"text\": \"private function setParamsCache() {\\n\\t\\t\\n\\t\\t$item = $this->select(\\\"query_cache, query_cache_time\\\", TBL_SYS_CONF, \\\"id='1'\\\", array('cache'=>false));\\n\\t\\tif(count($item))\\n\\t\\t{\\n\\t\\t\\t$this->_query_cache = $item[0]['query_cache'] ? true : false;\\n\\t\\t\\t$this->_query_cache_time = $item[0]['query_cache_time'];\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t$this->_query_cache = false;\\n\\t\\t\\t$this->_query_cache_time = null;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a279b953202b22945ba5f71e777e1fb7\",\n \"score\": \"0.4848644\",\n \"text\": \"function lingotek_do_cache() {\\n return !(variable_get('lingotek_flush_cache', FALSE) && user_access('use lingotek developer tools'));\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d062ad70cd7feac4dec5df038d4a438\",\n \"score\": \"0.48418543\",\n \"text\": \"function isFileExists($input1, $input2 = '', $forceCheck = false, $noCatcheSave = false) {\\n\\tif($input2 === true) {\\n\\t\\t$file = false;\\n\\t\\t$cacheKey = $input1;\\n\\t}\\n\\telse {\\n\\t\\t$file = str_replace('//', '/', $input1);\\n\\t\\t$cacheKey = $input2;\\n\\t}\\n\\t\\n\\tif(!$cacheKey)\\n\\t\\t$cacheKey = $file;\\n\\t\\n\\tif(!$cacheKey)\\n\\t\\treturn false;\\n\\t\\n\\tif(!isset($GLOBALS['ZampFilePresenceCache'])) {\\n\\t\\t$GLOBALS['ZampFilePresenceCache'] = [];\\n\\t\\t\\n\\t\\t$cacheFile = _PROJECT_PATH_.'data/tmp/cache/zamp_file_presence_cache.php';\\n\\t\\t\\n\\t\\tif(file_exists($cacheFile)) {\\n\\t\\t\\t$GLOBALS['ZampFilePresenceCache'] = include $cacheFile;\\n\\t\\t\\t\\n\\t\\t\\tif((array) $GLOBALS['ZampFilePresenceCache'] !== $GLOBALS['ZampFilePresenceCache'])\\n\\t\\t\\t\\t$GLOBALS['ZampFilePresenceCache'] = [];\\n\\t\\t}\\n\\t}\\n\\t\\n\\tif(!$forceCheck && isset($GLOBALS['ZampFilePresenceCache'][$cacheKey])) {\\n\\t\\tif($GLOBALS['ZampFilePresenceCache'][$cacheKey] && $cacheKey == $file)\\n\\t\\t\\treturn $file;\\n\\t\\telse\\n\\t\\t\\treturn $GLOBALS['ZampFilePresenceCache'][$cacheKey];\\n\\t}\\n\\t\\n\\tif(!$file)\\n\\t\\treturn false;\\n\\telseif(file_exists($file))\\n\\t\\t$GLOBALS['ZampFilePresenceCache'][$cacheKey] = ($cacheKey == $file) ?true :$file;\\n\\telse {\\n\\t\\t$file = false;\\n\\t\\t$GLOBALS['ZampFilePresenceCache'][$cacheKey] = $file;\\n\\t}\\n\\t\\n\\tif($noCatcheSave && !$file)\\n\\t\\treturn $file;\\n\\telseif(!isset($cacheFile))\\n\\t\\t$cacheFile = _PROJECT_PATH_.'data/tmp/cache/zamp_file_presence_cache.php';\\n\\t\\n\\tfile_put_contents($cacheFile, \\\"cache->load($id))) {\\n // cache miss\\n \\n $this->processAction($request);\\n \\n if ($this->canBeSavedInCache()) {\\n\\n $data_to_cache = array();\\n $data_to_cache['output_headers'] = $this->headers;\\n $data_to_cache['output_body'] = $this->output;\\n $this->cache->save($data_to_cache);\\n\\n // update index immediately if enabled in the configuration,\\n // but not when search_query is submitted (don't index search results)\\n // and not when forward \\\"to\\\" is provided\\n // TODO: canonise the request before submitting for indexing\\n if (ONXSHOP_ALLOW_SEARCH_INDEX_AUTOUPDATE && !array_key_exists('search_query', $_GET) && !array_key_exists('to', $_GET)) $this->indexContent($_GET['translate'], $this->output);\\n }\\n\\n } else {\\n \\n $this->headers = $data['output_headers'];\\n $this->output = $data['output_body'];\\n $this->restoreHeaders();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65dec07d879656bce7eef344ee98c61a\",\n \"score\": \"0.48324567\",\n \"text\": \"public function cache_valid() {\\n return $this->cache_exists();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e428d9e278273b6203cc737587ea3741\",\n \"score\": \"0.48228982\",\n \"text\": \"public function is_already_optimized() {\\n\\t\\treturn 'already_optimized' === $this->get_status();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"238ae087a7bd9a82eeb00297817facc9\",\n \"score\": \"0.48168832\",\n \"text\": \"public function getCachedAnalysis($analysisId){\\n\\t\\t$a = smongo::$db->analysis->findOne(\\n\\t\\t\\tarray('_id'=>new MongoID($analysisId))\\n\\t\\t);\\n\\t\\t\\n\\t\\tif($a) {\\n\\t\\t\\t$a['id'] = (string)$a['_id'];\\n\\t\\t\\tunset($a['_id']);\\n\\t\\t}\\n\\n\\t\\treturn $a;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed7bb94c0f7619a9d96f256928f04307\",\n \"score\": \"0.48105332\",\n \"text\": \"public function isTemporary();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d974ac56120802ec051a8959aaa9a152\",\n \"score\": \"0.480924\",\n \"text\": \"function has_cache($name = '') {\\n\\n\\t\\t$cache_name = ($name != '') ? $name : sha1(strtolower($_SERVER['REQUEST_URI'])).'-'.$this->v;\\n\\n\\t\\t//Return the transient\\n\\t\\t$cache = get_transient($cache_name);\\n\\n\\t\\tif ($cache) {\\n\\t\\t\\treturn true;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe1df665aa217028d56ba395a7114415\",\n \"score\": \"0.48051313\",\n \"text\": \"private function get_results_from_storage() {\\n\\t\\t$this->results = get_option( 'rank_math_seo_analysis_results' );\\n\\t\\t$this->build_results();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"154d72c41978e1155be677c6cd955c9c\",\n \"score\": \"0.47815388\",\n \"text\": \"public function configurationIsCached()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a1a31f93238696c104dfd4facd8ea22\",\n \"score\": \"0.4775719\",\n \"text\": \"public function cacheValid()\\n {\\n // If files exists And is not expired\\n if (file_exists($this->path.$this->name.'.xml') && $this->isExpired() !== true){\\n return true;\\n }else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3dfbff691a174ec9ed582c8fda188456\",\n \"score\": \"0.4765422\",\n \"text\": \"protected function extractDataFromCache()\\n\\t{\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"792eaa7d8b8d5909fffb4bb5a1304c4f\",\n \"score\": \"0.47492442\",\n \"text\": \"public function cachable();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5887a173001ec880f57f089921a37860\",\n \"score\": \"0.47148773\",\n \"text\": \"function setup_cache() {\\n\\t\\tglobal $phpbb_seo;\\n\\t\\t// For module inclusion in ACP : No cache\\n\\t\\tif ( defined('ADMIN_START') ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t// build cache file name\\n\\t\\t$ssl_bit = $phpbb_seo->ssl['use'] ? 'ssl_' : '';\\n\\t\\t$file_name = ( !empty($this->options['module_sub']) ? $this->options['module_sub'] : '' ) . trim(str_replace(array('&amp;', '/'), '-', $this->options['extra_params_full']),'-') . '-a' . $this->options['auth_param'];\\n\\t\\tif ($this->gym_master->gym_config['gym_cript_cache']) {\\n\\t\\t\\t$file_name = md5( $file_name );\\n\\t\\t}\\n\\t\\t$file_name = $this->gym_master->actions['action_type'] . '_' . ( ( !empty($this->options['module_main']) ) ? $this->options['module_main'] . '_' : 'main_' ) . $ssl_bit . $file_name . $this->cache['cache_file_ext'];\\n\\t\\t$this->cache['file'] = $this->gym_master->path_config['gym_path'] . 'cache/' . $file_name;\\n\\t\\t// Output, first check cache\\n\\t\\tif ($this->cache['do_cache'] && $this->check_cache($this->cache['file'])) {\\n\\t\\t\\t// Check expiration\\n\\t\\t\\t$this->cache['cache_born'] = filemtime($this->cache['file']);\\n\\t\\t\\t$this->cache['cache_too_old'] = ($this->cache['cache_born'] + $this->cache['cache_max_age']) <= $this->outputs['time'] ? true : false;\\n\\t\\t\\tif ($this->cache['cache_too_old'] && $this->cache['cache_auto_regen']) {\\n\\t\\t\\t\\t@unlink($this->cache['file']);\\n\\t\\t\\t\\t$this->cache['cached'] = false;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t// Expiration time & Etags\\n\\t\\tif (!$this->cache['cached'] || !$this->cache['do_cache']) {\\n\\t\\t\\t// Take care about lastmod when not cached\\n\\t\\t\\tif (($this->outputs['last_mod_time'] + $this->cache['cache_max_age']) <= $this->outputs['time']) {\\n\\t\\t\\t\\t$this->outputs['last_mod_time'] = $this->outputs['time'];\\n\\t\\t\\t\\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\\\G\\\\M\\\\T', ($this->outputs['time'] + $this->cache['cache_max_age']));\\n\\t\\t\\t\\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\\n\\t\\t\\t\\t$this->update_lastmod();\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\\\G\\\\M\\\\T', ($this->outputs['last_mod_time'] + $this->cache['cache_max_age']));\\n\\t\\t\\t\\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\\n\\t\\t\\t}\\n\\t\\t\\t$this->check_mod_since();\\n\\t\\t} else {\\n\\t\\t\\t$this->outputs['last_mod_time'] = $this->cache['cache_born'];\\n\\t\\t\\t$this->outputs['expires_time'] = gmdate('D, d M Y H:i:s \\\\G\\\\M\\\\T', ($this->outputs['last_mod_time'] + $this->cache['cache_max_age']));\\n\\t\\t\\t$this->outputs['etag'] = md5($this->outputs['expires_time'] . $this->cache['file']);\\n\\t\\t\\t$this->check_mod_since();\\n\\t\\t\\t$this->cache_output();\\n\\t\\t}\\n\\n\\t\\treturn;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fb1b2f359c533d8ad52cb589cddf6d1\",\n \"score\": \"0.47136664\",\n \"text\": \"public function isCached() \\n {\\n $modified = (file_exists($this->cache_file)) ? filemtime($this->cache_file) : 0;\\n return ((time() - $this->cache_expires) < $modified);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a9c585917e87d2a79f79c33c29609bd\",\n \"score\": \"0.47087356\",\n \"text\": \"public static function check($param=false)\\n\\t{\\n\\t\\tif(is_array($param))\\n\\t\\t{\\n\\t\\t\\t$param['prefix'] = isset($param['prefix']) ? $param['prefix'] : 'data';\\n\\t\\t\\t$param['query'] = isset($param['query']) ? $param['query'] : null;\\n\\t\\t\\t$param['suffix'] = isset($param['suffix']) ? $param['suffix'] : 'json';\\n\\t\\t\\t$param['table'] = isset($param['table']) ? $param['table'] : 'app_cache';\\n\\t\\t\\t$param['type_save'] = isset($param['type_save']) ? $param['type_save'] : 'file';\\n\\n\\t\\t\\t$idFile = $param['prefix'].'-'.md5($param['query']);\\n\\t\\t\\t$fileReady = defined('APPDATAPATH') ? APPDATAPATH.'/cache/'.$idFile :\\n\\t\\t\\t\\t\\t\\t$param['absolute_path'].'/'.$idFile;\\n\\n\\t\\t\\t$fileReady = $fileReady.'.'.$param['suffix'];\\n\\n\\t\\t\\tswitch($param['type_save'])\\n\\t\\t\\t{\\n\\t\\t\\t\\tcase 'file':\\n\\t\\t\\t\\t$data = file_exists($fileReady);\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 'database':\\n\\t\\t\\t\\t$prm_read = \\\"WHERE cache_name='{$idFile}'\\\";\\n\\t\\t\\t\\t$data_read = array('tbl'=>$param['table'],'row'=>'*','prm'=>$prm_read);\\n\\t\\t\\t\\t$sql_read = AccessCRUD($data_read,'read');\\n\\t\\t\\t\\t$data = $sql_read == false ? false : $sql_read->num_rows > 0 ? true : false;\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tdefault:\\n\\t\\t\\t\\t$data = false;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif($data)\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn true;\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3eeb331ffab2d5ad2bcce3874631f90a\",\n \"score\": \"0.4702895\",\n \"text\": \"public function shouldResetInMemoryCache(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d23371841bb947c6b1586ea6d0d975ae\",\n \"score\": \"0.46904173\",\n \"text\": \"function has_caching_for($type)\\n{\\n if (!function_exists('get_option')) {\\n return false;\\n }\\n\\n $setting = (get_option('is_on_' . $type . '_cache') == '1');\\n\\n $positive = (get_param_integer('keep_cache', 0) == 1) || (get_param_integer('cache', 0) == 1) || (get_param_integer('keep_cache_' . $type . 's', 0) == 1) || (get_param_integer('cache_' . $type . 's', 0) == 1);\\n\\n $not_negative = (get_param_integer('keep_cache', null) !== 0) && (get_param_integer('cache', null) !== 0) && (get_param_integer('keep_cache_' . $type . 's', null) !== 0) && (get_param_integer('cache_' . $type . 's', null) !== 0);\\n\\n return ($setting || $positive) && (strpos(get_param_string('special_page_type', ''), 't') === false) && $not_negative;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4df8de7e308f1f04ea703be455cbe2c8\",\n \"score\": \"0.46886098\",\n \"text\": \"private function getDoneData($localCacheData,&$cacheKeyId,$callKeyId) {/*{{{*/\\n if ($localCacheData != false) {\\n $key = $cacheKeyId == NULL ? 0 : $cacheKeyId;\\n if(is_array($cacheKeyId)==false && $localCacheData[$key]!=false) {\\n $returnCacheData = is_array($callKeyId) ? $localCacheData : $localCacheData[$key];\\n $cacheKeyId = false; \\n return $returnCacheData;\\n }\\n $localCacheDataKeys = array_keys($localCacheData);\\n $cacheKeyId = array_diff($cacheKeyId,$localCacheDataKeys);\\n if(empty($cacheKeyId)) {\\n $cacheKeyId = false;\\n return $localCacheData;\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24a7ef70f4ce7aa83d7f89ea0d1b950c\",\n \"score\": \"0.4683057\",\n \"text\": \"protected function wasCached()\\n {\\n $this->start = microtime(true);\\n // Location to lookup or store cached file\\n $this->cache_file_name = $this->cache_folder.md5(\\\",a1b2c3d4e5f6g7h8i9ABB!\\\");\\n return file_exists($this->cache_file_name) ? filemtime($this->cache_file_name) : 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1f3d370fa0baa7ef20b1467a2cc4af5\",\n \"score\": \"0.4676231\",\n \"text\": \"function is_cached($cacheFile) \\n\\t{\\n \\t$cacheFile_created = (file_exists($cacheFile)) ;\\n \\treturn $cacheFile_created;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f987d242cb2503c67330cc31c4f71177\",\n \"score\": \"0.4675593\",\n \"text\": \"public function setCache() {\\n\\t\\tif(!$this->isCacheValid($this->_cachefile)) {\\n\\t\\t\\tob_start();\\n\\t\\t\\treturn $this->addLog( 'Could not find valid cachefile: ' . $this->_cachefile );\\n \\t} else {\\n \\t\\treturn true;\\n \\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c23c8f158f96a23f38283549811dd8f\",\n \"score\": \"0.46682513\",\n \"text\": \"protected function apply_internal ($cache_not_saved_mark = true) {\\n\\t\\tif ($cache_not_saved_mark) {\\n\\t\\t\\t$this->core['cache_not_saved'] = true;\\n\\t\\t} else {\\n\\t\\t\\tunset($this->core['cache_not_saved']);\\n\\t\\t}\\n\\t\\t$Cache = Cache::instance();\\n\\t\\tif (!$Cache->set(\\n\\t\\t\\t'config',\\n\\t\\t\\t[\\n\\t\\t\\t\\t'core' => $this->core,\\n\\t\\t\\t\\t'db' => $this->db,\\n\\t\\t\\t\\t'storage' => $this->storage,\\n\\t\\t\\t\\t'components' => $this->components\\n\\t\\t\\t]\\n\\t\\t)\\n\\t\\t) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\t$Cache->del('languages');\\n\\t\\tdate_default_timezone_set($this->core['timezone']);\\n\\t\\t$this->fill_mirrors();\\n\\t\\tEvent::instance()->fire('System/Config/changed');\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fc5217894c8f1a03d990f17db3e6b7d\",\n \"score\": \"0.46641606\",\n \"text\": \"function getData ()\\n{\\n return cache();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12113f68f94062bc578c08097d1b1643\",\n \"score\": \"0.46529156\",\n \"text\": \"static function Maintain( Wrapper $theWrapper, $doVerbose = FALSE )\\n\\t{\\n\\t\\t//\\n\\t\\t// Init local storage.\\n\\t\\t//\\n\\t\\t$cache = Array();\\n\\t\\t$prefix = __class__;\\n\\t\\t$zp = $fp = $name_zip = $ok = $eol = NULL;\\n\\t\\t$stats = array( 'new' => 0, 'updated' => 0, 'processed' => 0 );\\n\\t\\t$collection\\n\\t\\t\\t= static::ResolveCollection(\\n\\t\\t\\t\\tstatic::ResolveDatabase( $theWrapper, TRUE ) );\\n\\t\\t\\n\\t\\t//\\n\\t\\t// TRY BLOCK.\\n\\t\\t//\\n\\t\\ttry\\n\\t\\t{\\n\\t\\t\\t//\\n\\t\\t\\t// Init local storage.\\n\\t\\t\\t//\\n\\t\\t\\t$max_exe = ini_set( 'max_execution_time', 0 );\\n\\t\\t\\t$name_zip = tempnam( \\\"/tmp\\\", \\\"$prefix\\\".\\\"ZIP\\\" );\\n\\t\\t\\t\\n\\t\\t\\t//\\n\\t\\t\\t// Load FAO institutes.\\n\\t\\t\\t//\\n\\t\\t\\tif( file_put_contents( $name_zip,\\n\\t\\t\\t\\t\\t\\t\\t\\t file_get_contents( kFAO_INSTITUTES_URL ) ) !== FALSE )\\n\\t\\t\\t{\\n\\t\\t\\t\\t//\\n\\t\\t\\t\\t// Open zip file.\\n\\t\\t\\t\\t//\\n\\t\\t\\t\\t$zp = zip_open( $name_zip );\\n\\t\\t\\t\\tif( $zp )\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t// Unzip data.\\n\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\tif( $data = zip_read( $zp ) )\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t// Save unzipped data.\\n\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t$name_txt = tempnam( \\\"/tmp\\\", \\\"$prefix\\\".\\\"TXT\\\" );\\n\\t\\t\\t\\t\\t\\tif( $ok = file_put_contents(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$name_txt,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tzip_entry_read(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$data, zip_entry_filesize( $data ) ) ) )\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t// Cleanup.\\n\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\tzip_entry_close( $data );\\n\\t\\t\\t\\t\\t\\t\\tzip_close( $zp );\\n\\t\\t\\t\\t\\t\\t\\t$zp = NULL;\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t// Handle Mac EOL.\\n\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t$eol = ini_set( 'auto_detect_line_endings', 1 );\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t// Open file.\\n\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t$fp = fopen( $name_txt, 'r' );\\n\\t\\t\\t\\t\\t\\t\\tif( $fp )\\n\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t// Cycle file.\\n\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t$header = NULL;\\n\\t\\t\\t\\t\\t\\t\\t\\twhile( ($data = fgetcsv( $fp, 4096, ',', '\\\"' )) !== FALSE )\\n\\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// Load header.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif( $header === NULL )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Load header.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$header = $data;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcontinue;\\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} // First run.\\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\\t\\t\\t\\t\\t// Verify record.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif( count( $header ) != count( $data ) )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\techo( \\\" ==> Invalid record format at source.\\\" );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcontinue;\\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\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Increment processed.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$stats[ 'processed' ]++;\\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\\t\\t\\t\\t\\t// Load new record.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$new = new static( $theWrapper );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$new->importFAO( $data, $header );\\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\\t\\t\\t\\t\\t// Try loading existing.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$id = static::FAOIdentifier( $data[ 'INSTCODE' ] );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$criteria = array( kTAG_NID => $id );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$old = $collection->matchOne(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$criteria, kQUERY_OBJECT );\\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\\t\\t\\t\\t\\t// Skip not changed.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif( $old\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t && ($old->offsetGet( kTAG_VERSION )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t== $new->offsetGet( kTAG_VERSION )) )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcontinue;\\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\\t\\t\\t\\t\\t// Handle cached.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif( array_key_exists( $id, $cache ) )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Save object in cache.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$cache[ $id ] = $new;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcontinue;\\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} // Cached.\\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\\t\\t\\t\\t\\t// Handle referenced.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif( $new->offsetExists( kTAG_ENTITY_VALID ) )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Init local storage.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$valid = $new->offsetGet( kTAG_ENTITY_VALID );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$criteria = array( kTAG_NID => $valid );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Handle unresolved.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif( ! $collection->matchOne(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$criteria, kQUERY_COUNT ) )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Cache valid.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif( ! array_key_exists( $valid, $cache ) )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$cache[ $valid ] = NULL;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Cache current.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$cache[ $id ] = $new;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcontinue;\\t\\t\\t\\t\\t\\t// =>\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} // Cached valid and current.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} // Has valid institute.\\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\\t\\t\\t\\t\\t// Handle existing.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif( $old )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Replace old.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$new->save();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Increment updated.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$stats[ 'updated' ]++;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} // Exists.\\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\\t\\t\\t\\t\\t// Handle new.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Insert new.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$new->commit();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Increment updated.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$stats[ 'new' ]++;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} // New record.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t} // Iterating file.\\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\\t// Recurse ad exhaustion.\\n\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t$count = count( $cache );\\n\\t\\t\\t\\t\\t\\t\\t\\twhile( count( $cache ) )\\n\\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// Iterate cache.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$keys = array_keys( $cache );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach( $keys as $key )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Init loop storage.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$cached = & $cache[ $key ];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Try loading existing.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$id = static::FAOIdentifier(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$cached[ kTAG_IDENTIFIER ] );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$criteria = array( kTAG_NID => $id );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$old = $collection->matchOne(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$criteria, kQUERY_OBJECT );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Handle existing.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif( $old )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Replace old.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$cached->save();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Increment updated.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$stats[ 'updated' ]++;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} // Exists.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Handle new.\\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//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Check if valid is there.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif( $cached->offsetExists( kTAG_ENTITY_VALID ) )\\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//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Check if valid exists.\\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$criteria = array( kTAG_NID\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t=> $cached[ kTAG_ENTITY_VALID ] );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif( ! $collection->matchOne(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$criteria, kQUERY_COUNT ) )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tcontinue;\\t\\t\\t\\t// =>\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} // Has valid reference.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Insert new.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$cached->commit();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Increment updated.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$stats[ 'new' ]++;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t} // New record.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Pop cache.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tunset( $cache[ $key ] );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} // Iterating cache.\\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\\t\\t\\t\\t\\t// Check infinite loop.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif( count( $cache ) == $count )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// Dump cache.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach( $cache as $cached )\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tvar_dump(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tarray(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'NICODE'\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t=> $cached[ kTAG_IDENTIFIER ],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'VALID'\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t=> $cached[ kTAG_ENTITY_VALID ] ) );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tthrow new \\\\Exception(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Unreferenced valid institute\\\" );\\t// !@! ==>\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t} // Unreferenced valid institute.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t} // Cache not exhausted.\\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\\t// Reset maximum execution time.\\n\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t\\t\\t\\tini_set( 'max_execution_time', $max_exe );\\n\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\treturn $stats;\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t// ==>\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t} // Opened unzipped file.\\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t\\t\\tthrow new \\\\Exception(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Unable to load FAO institutes: \\\"\\n\\t\\t\\t\\t\\t\\t\\t\\t .\\\"unable to open unzipped data\\\" );\\t\\t\\t// !@! ==>\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t} // Saved unzipped data.\\n\\t\\t\\n\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t\\tthrow new \\\\Exception(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\\"Unable to load FAO institutes: \\\"\\n\\t\\t\\t\\t\\t\\t\\t .\\\"unable to save unzipped data\\\" );\\t\\t\\t\\t// !@! ==>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t} // Unzipped data.\\n\\t\\t\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\tthrow new \\\\Exception( \\\"Unable to load FAO institutes: \\\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t .\\\"unable to unzip data\\\" );\\t\\t\\t// !@! ==>\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t} // Opened zip file.\\n\\t\\t\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\tthrow new \\\\Exception( \\\"Unable to load FAO institutes: \\\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t .\\\"unable to open zip file\\\" );\\t\\t\\t// !@! ==>\\n\\t\\t\\n\\t\\t\\t} // Loaded institutes from FAO.\\n\\t\\t\\n\\t\\t\\telse\\n\\t\\t\\t\\tthrow new CException( \\\"Unable to load FAO institutes: \\\"\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t .\\\"unable to access URL\\\" );\\t\\t\\t\\t\\t// !@! ==>\\n\\t\\t}\\n\\t\\t\\n\\t\\t//\\n\\t\\t// FINAL BLOCK.\\n\\t\\t//\\n\\t\\tfinally\\n\\t\\t{\\n\\t\\t\\tif( $zp )\\n\\t\\t\\t{\\n\\t\\t\\t\\tfclose( $zp );\\n\\t\\t\\t\\tunlink( $name_zip );\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\tif( $fp )\\n\\t\\t\\t\\tfclose( $fp );\\n\\t\\t\\t\\n\\t\\t\\tif( $ok )\\n\\t\\t\\t\\tunlink( $name_txt );\\n\\t\\t\\t\\n\\t\\t\\tif( $eol !== NULL )\\n\\t\\t\\t\\tini_set( 'auto_detect_line_endings', $eol );\\n\\t\\t\\t\\n\\t\\t\\tif( isset( $max_exe ) )\\n\\t\\t\\t\\tini_set( 'max_execution_time', $max_exe );\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0eb2250cf8c567a6726dec5e930b5885\",\n \"score\": \"0.46345368\",\n \"text\": \"function preRun($cached)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"447525a002c93502df229985bd4c62ee\",\n \"score\": \"0.4633542\",\n \"text\": \"final protected function getCacheNeed()\\n\\t{\\n\\t\\treturn\\tintval($this->arParams['CACHE_TIME']) > 0 &&\\n\\t\\t\\t\\t$this->arParams['CACHE_TYPE'] != 'N' &&\\n\\t\\t\\t\\tConfig\\\\Option::get(\\\"main\\\", \\\"component_cache_on\\\", \\\"Y\\\") == \\\"Y\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69d5025c1bfc9bf6e31616b04e8fbfd2\",\n \"score\": \"0.4631425\",\n \"text\": \"public function process() {\\r\\n\\r\\n\\t\\t// Revisión inicial\\r\\n\\t\\tif (!$this->checkInit()) {\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t$sqlWhere = array();\\r\\n\\t\\t$sqlOrden = '';\\r\\n\\t\\t$sqlLimit = '';\\r\\n\\t\\t\\r\\n\\t\\t// Cargo los filtros\\r\\n\\t\\t$sqlWhere = $this->checkFilters();\\r\\n\\r\\n\\t\\tif (!count($sqlWhere)) {\\r\\n\\t\\t\\t$this->log.= '- Error: No existe ningún condicional (WHERE) definido
    ';\\r\\n\\t\\t\\r\\n\\t\\t\\t$this->error(2);\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\t$sqlWhereFinal = implode(' AND ', $sqlWhere);\\r\\n\\r\\n\\t\\tif ($this->orden != '') {\\r\\n\\t\\t\\t$sqlOrden = 'ORDER BY '.$this->orden;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\tif ($this->cantidad || $this->desplazamiento) {\\r\\n\\t\\t\\t$sqlLimit = 'LIMIT '.$this->desplazamiento;\\r\\n\\t\\t\\t$sqlLimit.= ($this->cantidad) ? ','.$this->cantidad : '';\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t$oSql = \\\"SELECT count(gal_id) as total \\r\\n\\t\\t\\tFROM {$this->_table}noticias_galeria_multimedia\\r\\n\\t\\t\\tWHERE {$sqlWhereFinal}\\\";\\r\\n\\r\\n\\t\\t$this->log.= '- Realizando consulta previa, para saber la cantidad de resultados.
    ';\\r\\n\\t\\t$this->log.= '- Consulta SQL:'.$oSql.'
    ';\\r\\n\\t\\t\\r\\n\\t\\t$this->log.= '- Generando consulta definitiva
    ';\\r\\n\\t\\t$oSqlFinal = \\\"SELECT {$this->_table}noticias_galeria_multimedia.*\\r\\n\\t\\t\\tFROM {$this->_table}noticias_galeria_multimedia\\r\\n\\t\\t\\tWHERE {$sqlWhereFinal}\\r\\n\\t\\t\\t{$sqlOrden}\\r\\n\\t\\t\\t{$sqlLimit}\\\";\\r\\n\\r\\n\\t\\t$this->log.= '- Consulta SQL definitiva:'.$oSqlFinal.'
    ';\\r\\n\\r\\n\\t\\t/* Consultando si posee cache */\\r\\n\\t\\tif ($this->_cacheOK) {\\r\\n\\r\\n\\t\\t\\t$this->log.= '- Intentando recuper datos de cache.
    ';\\r\\n\\r\\n\\t\\t\\t$cacheName = md5($oSqlFinal);\\r\\n\\r\\n\\t\\t\\tif ($cacheData = $this->cache->get($cacheName)) {\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\t$this->log.= '- Datos de cache recuperados OK.
    ';\\r\\n\\r\\n\\t\\t\\t\\t$this->totalPaginas = $cacheData['totalPaginas'];\\r\\n\\t\\t\\t\\t$this->totalResultados = $cacheData['totalResultados'];\\r\\n\\t\\t\\t\\t// $this->facetas = $cacheData['facetas'];\\r\\n\\t\\t\\t\\t$im = $cacheData['im'];\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\treturn $im;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\t\\t\\r\\n\\t\\t\\r\\n\\t\\tif (!$res = $this->db->query($oSql)) {\\r\\n\\t\\t\\t$this->log.= '- Error al ejecutar la consulta.
    ';\\r\\n\\t\\t\\t$this->log.= '- El sistema dice:'.$this->db->error().'
    ';\\r\\n\\t\\t\\r\\n\\t\\t\\t$this->error(5);\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t$rs = $this->db->next($res);\\r\\n\\t\\t$this->totalResultados = $rs['total'];\\r\\n\\r\\n\\t\\t$this->log.= '- Consulta SQL OK.
    ';\\r\\n\\r\\n\\t\\tif ($this->cantidad) {\\r\\n\\t\\t\\t$this->totalPaginas = ceil($this->totalResultados / $this->cantidad);\\r\\n\\t\\t} else {\\r\\n\\t\\t\\t$this->totalPaginas = $this->totalResultados;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t$this->log.= '- Total de resultados encontrados:'.$this->totalResultados.'
    ';\\r\\n\\t\\t$this->log.= '- Total de páginas devueltas:'.$this->totalPaginas.'
    ';\\r\\n\\r\\n\\t\\tif (!$res = $this->db->query($oSqlFinal)) {\\r\\n\\t\\t\\t$this->log.= '- Error al ejecutar la consulta.
    ';\\r\\n\\t\\t\\t$this->log.= '- El sistema dice:'.$this->db->error().'
    ';\\r\\n\\r\\n\\t\\t\\t$this->error(5);\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t$this->log.= '- Recuperando información final
    ';\\r\\n\\t\\t$im = array();\\r\\n\\r\\n\\t\\t$idList = '';\\t// Listado de ids para luego agregar información\\r\\n\\t\\t$idArray = array();\\t// Ubicación del Id para luego agregarle información\\r\\n\\t\\t\\r\\n\\t\\t// Información extra solo para Adjuntos\\r\\n\\t\\t$idListExtra = '';\\t// Listado de ids para luego agregar información\\r\\n\\t\\t$idArrayExtra = array();\\t// Ubicación del Id para luego agregarle información\\t\\t\\r\\n\\r\\n\\t\\tif ($this->db->num_rows($res)) {\\r\\n\\t\\t\\tfor ($i=0; $i<$this->db->num_rows($res);$i++) {\\r\\n\\t\\t\\t\\t$rs = $this->db->next($res);\\r\\n\\r\\n\\t\\t\\t\\t$rs['extra'] = json_decode($rs['gal_extra'], true);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tforeach ($rs as $j => $s) {\\r\\n\\t\\t\\t\\t\\tif (is_string($s) && $s != '') {\\r\\n\\r\\n\\t\\t\\t\\t\\t\\t// Aplica el formato negrita, cursiva, etc y los saltos de líneas\\r\\n\\t\\t\\t\\t\\t\\t$s = htmlspecialchars_decode($s, ENT_QUOTES);\\r\\n\\t\\t\\t\\t\\t\\t$s = str_replace(\\\"\\\\n\\\", \\\"
    \\\", $s);\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t// Aplico vínculos cliqueables al texto\\r\\n\\t\\t\\t\\t\\t\\tif ($j == 'gal_descripcion') {\\r\\n\\t\\t\\t\\t\\t\\t\\t$s = clickable($s);\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t\\t// cierro los tags que puedan haber quedado abiertos\\r\\n\\t\\t\\t\\t\\t\\t$s = closeTags($s);\\r\\n\\r\\n\\t\\t\\t\\t\\t\\t$rs[$j] = $s;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t// Devuelvo la extensión del adjunto.\\r\\n\\t\\t\\t\\t$rs['gal_file_ext'] = '';\\r\\n\\t\\t\\t\\tif (strpos($rs['gal_file'], '.') && strpos($rs['gal_file'], 'http:') === false) {\\r\\n\\t\\t\\t\\t\\t$oFileExtArr = explode('.', $rs['gal_file']);\\r\\n\\t\\t\\t\\t\\t$oFileExt = (count($oFileExtArr)>1) ? $oFileExtArr[count($oFileExtArr)-1] : '';\\r\\n\\t\\t\\t\\t\\t$rs['gal_file_ext'] = $oFileExt;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t// Proceso solo si tengo asignado el array de datos\\r\\n\\t\\t\\t\\tif (is_array($this->datos)) {\\r\\n\\t\\t\\r\\n\\t\\t\\t\\t\\t$fileUrl = pathAdjunto($this->datos[$rs['gal_galeria']], $rs['gal_file'], $rs['gal_fecha']);\\r\\n\\t\\t\\t\\t\\tif ($fileUrl) {\\r\\n\\t\\t\\t\\t\\t\\t$rs = array_merge($rs, array('url' => $fileUrl));\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t// Si es un video de YouTube proceso info extra\\r\\n\\t\\t\\t\\tif ($rs['gal_tipo'] == 'ytube') {\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t$type_all = array(\\r\\n\\t\\t\\t\\t\\t\\t'link' => '/http:\\\\/\\\\/[w\\\\.]*youtube\\\\.com\\\\/watch\\\\?v=([^&#]*)|http:\\\\/\\\\/[w\\\\.]*youtu\\\\.be\\\\/([^&#]*)/i',\\r\\n\\t\\t\\t\\t\\t\\t'embed' => '/http:\\\\/\\\\/[w\\\\.]*youtube\\\\.com\\\\/v\\\\/([^?&#\\\"\\\\']*)/is',\\r\\n\\t\\t\\t\\t\\t\\t'iframe' => '/http:\\\\/\\\\/[w\\\\.]*youtube\\\\.com\\\\/embed\\\\/([^?&#\\\"\\\\']*)/is'\\r\\n\\t\\t\\t\\t\\t);\\r\\n\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t$code = '';\\r\\n\\t\\t\\t\\t\\tforeach($type_all as $type => $regexp) {\\r\\n\\r\\n\\t\\t\\t\\t\\t\\tpreg_match($regexp, $rs['gal_file'], $match);\\r\\n\\t\\t\\t\\t\\t\\tif (!empty($match)) {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t\\tfor($ii = 1; $ii < sizeof($match); $ii++) {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tif($match[$ii] != '') {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$code = $match[$ii];\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\tif($code != '') {\\r\\n\\t\\t\\t\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\tif ($code != '') {\\r\\n\\t\\t\\t\\t\\t\\t// Imagen grande alternativa\\r\\n\\t\\t\\t\\t\\t\\t$rs['extra']['img_small'] = 'http://i.ytimg.com/vi/'.$code.'/default.jpg';\\r\\n\\t\\t\\t\\t\\t\\t$rs['extra']['img_large'] = 'http://i4.ytimg.com/vi/'.$code.'/hqdefault.jpg';\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t// Igualo la ruta del archivo final para videos de ytube\\r\\n\\t\\t\\t\\t\\t\\t$rs['url']['o'] = $rs['gal_file'];\\r\\n\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t// Compatibilizo si no recibe esta data desde la dbase\\r\\n\\t\\t\\t\\t\\t\\t$rs['extra']['iframe'] = 'http://www.youtube.com/embed/'.$code;\\r\\n\\t\\t\\t\\t\\t\\t$rs['extra']['embed'] = 'http://www.youtube.com/v/'.$code;\\r\\n\\t\\t\\t\\t\\t\\t$rs['extra']['url'] = 'http://www.youtube.com/watch?v='.$code;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t$im[$i] = $rs;\\r\\n\\t\\t\\t\\t$idList.= ','.$rs['gal_id'];\\r\\n\\t\\t\\t\\t$idArray[$rs['gal_id']][] = $i;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tif (!empty($rs['extra']['adjunto'])) {\\r\\n\\t\\t\\t\\t\\t$idListExtra.= ','.$rs['extra']['adjunto'];\\r\\n\\t\\t\\t\\t\\t$idArrayExtra[$rs['extra']['adjunto']][$rs['gal_id']] = $i;\\r\\n\\t\\t\\t\\t}\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t$idList = substr($idList,1);\\r\\n\\t\\t\\t$idListExtra = substr($idListExtra,1);\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t// Cargo los adjuntos extras del item\\r\\n\\t\\t$im = $this->loadItemsExtras($im, $idListExtra, $idArrayExtra);\\r\\n\\r\\n\\t\\t// Cargo los adjuntos del item\\r\\n\\t\\t$im = $this->loadAdjuntos($im, $idList, $idArray);\\r\\n\\t\\t\\r\\n\\t\\t// Cargo los art relacionados del item\\r\\n\\t\\t$im = $this->loadNotas($im, $idList, $idArray);\\r\\n\\t\\r\\n\\t\\t// Cargo los comentarios del item\\r\\n\\t\\t$im = $this->loadComentarios($im, $idList, $idArray);\\r\\n\\t\\r\\n\\t\\t// Cargo el mapa asociado al item\\r\\n\\t\\t// $im = $this->mapa($im, $idList, $idArray);\\r\\n\\t\\r\\n\\t\\t// Cargo información de etiquetas del item\\r\\n\\t\\t$im = $this->tags($im, $idList, $idArray);\\r\\n\\t\\r\\n\\t\\t// Cargo información de estadísticas del item\\r\\n\\t\\t$im = $this->stats($im, $idList, $idArray);\\r\\n\\r\\n\\t\\t// Cargo información reversa del item\\r\\n\\t\\tif ($this->reverse) {\\r\\n\\t\\t\\t// Cargo los adjuntos a los que se asoció el item\\r\\n\\t\\t\\t$im = $this->loadReverseAdjuntos($im, $idList, $idArray);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// Cargo los art relacionados asociados al item\\r\\n\\t\\t\\t$im = $this->loadReverseNotas($im, $idList, $idArray);\\t\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t/* Consultando si posee cache */\\r\\n\\t\\tif ($this->_cacheOK) {\\r\\n\\t\\t\\r\\n\\t\\t\\t$this->log.= '- Guardando consulta en Cache.
    ';\\r\\n\\r\\n\\t\\t\\t$cacheName = md5($oSqlFinal);\\r\\n\\r\\n\\t\\t\\t$cacheData = array();\\r\\n\\t\\t\\t$cacheData['totalPaginas'] = $this->totalPaginas;\\r\\n\\t\\t\\t$cacheData['totalResultados'] = $this->totalResultados;\\r\\n\\t\\t\\t// $cacheData['facetas'] = $this->facetas;\\r\\n\\t\\t\\t$cacheData['im'] = $im;\\r\\n\\r\\n\\t\\t\\t// consulta si posee cache, sino lo guarda por 24 hs.\\r\\n\\t\\t\\t$cacheExpire = !empty($this->cacheExpire) ? $this->cacheExpire : 86400;\\r\\n\\r\\n\\t\\t\\tif ($this->cache->set($cacheName, $cacheData, $cacheExpire)) {\\r\\n\\r\\n\\t\\t\\t\\t$this->log.= '- Información guardada en cache por:'.$cacheExpire.' segundos.
    ';\\r\\n\\r\\n\\t\\t\\t} else {\\r\\n\\r\\n\\t\\t\\t\\t$this->log.= '- Error al guardar información en cache.
    ';\\r\\n\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\treturn $im;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc1af9b74bb6373e5ba136199b1a869a\",\n \"score\": \"0.46204364\",\n \"text\": \"public function cache_exists() {\\n return isset($this->static_cache[$this->cache_name]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbc07626413f393029c51ece1c59d89b\",\n \"score\": \"0.46147287\",\n \"text\": \"abstract public function needsExecution(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c5cb42fa81ace06899c94f6f1f334cf\",\n \"score\": \"0.46136022\",\n \"text\": \"public function checkiscached()\\n {\\n $template = 'user/cachedemo/checkiscached.tpl';\\n\\n // force caching on\\n $this->view->setCaching(Zikula_View::CACHE_ENABLED);\\n\\n //force local cache lifetime\\n $localcachelifetime = 31;\\n $this->view->setCacheLifetime($localcachelifetime);\\n\\n // check to see if the tempalte is cached, if not, get required data\\n if (!$this->view->is_cached($template)) {\\n // manufactured wait to demo DB fetch or something resource intensive\\n sleep(5);\\n\\n $this->view->assign('time', microtime(true));\\n $this->view->assign('localcachelifetime', $localcachelifetime);\\n }\\n return $this->view->fetch($template);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e85267a12aee2c1d5b06851ef36221d4\",\n \"score\": \"0.46085775\",\n \"text\": \"private function maybe_clear_storage() {\\n\\t\\tif ( '1' === Param::request( 'clear_results' ) ) {\\n\\t\\t\\tdelete_option( 'rank_math_seo_analysis_results' );\\n\\t\\t\\twp_safe_redirect( Security::remove_query_arg_raw( 'clear_results' ) );\\n\\t\\t\\texit;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83d5e42ae651e0378d9f36702d62a5c7\",\n \"score\": \"0.45958245\",\n \"text\": \"protected function checkDefeatAudioCache(): bool\\n {\\n $assertion = true;\\n $result = $this->parser->data['options']['drive_options']['defeat_audio_cache'];\\n $check = self::DEFEAT_AUDIO_CACHE_DISABLED;\\n\\n return $this->scoreResult($result, $assertion, $check);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d74421e900815a8736aca59b2b289fd\",\n \"score\": \"0.45953095\",\n \"text\": \"protected function obtainNonCachedData()\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4caf74662cc684bd1e23fa7b5a6ce75f\",\n \"score\": \"0.45941424\",\n \"text\": \"public function getCached();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f50e8a0c388079796b1e81c3d10f22c0\",\n \"score\": \"0.45899394\",\n \"text\": \"public function detect(){\\n\\t\\t/*\\n\\t\\t$cache=$this->isAnalysisCached();\\n\\t\\tif($cache)\\n\\t\\t\\treturn $cache;\\n*/\\n\\t\\t$r=parent::detect();\\n\\t\\t$r=$this->prepareResult();\\n\\t\\t\\n\\t\\t// saving the result of detection into the database for caching\\n\\t\\t$r=$this->cacheAnalysis($r);\\n\\t\\t\\n\\t\\t$r->id=(string)$r->_id;\\n\\t\\tunset($r->_id);\\n\\t\\treturn (array)$r;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83d384c1258c11017c964f84a955d96f\",\n \"score\": \"0.4575388\",\n \"text\": \"function qed_check( $check_name, $ignore_cache = false ) {\\r\\n\\t\\tstatic $cache = array();\\r\\n\\r\\n\\t\\tif ( ! isset( $cache[ $check_name ] ) || $ignore_cache ) {\\r\\n\\t\\t\\t$result = false;\\r\\n\\t\\t\\tswitch ( $check_name ) {\\r\\n\\t\\t\\t\\tcase 'media_category_taxonomy_exists':\\r\\n\\t\\t\\t\\t\\t$result = taxonomy_exists( 'media_category' );\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\r\\n\\t\\t\\t\\tcase 'is_wpml_in_use':\\r\\n\\t\\t\\t\\t\\t$result = defined( 'ICL_SITEPRESS_VERSION' ); // function_exists( 'icl_object_id' );.\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\r\\n\\t\\t\\t\\tcase 'is_wordpress_seo_in_use':\\r\\n\\t\\t\\t\\t\\t$result = defined( 'WPSEO_VERSION' );\\r\\n\\t\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t$cache[ $check_name ] = $result;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\treturn $cache[ $check_name ];\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0c9e3c8fa1601966b1acb0a154ededc\",\n \"score\": \"0.45711517\",\n \"text\": \"public function exist_cache(){\\n\\t\\t\\t\\n\\t\\t\\tif (!$this->CachedString->isHit()) {\\n\\t\\t\\t\\treturn false;\\n\\n\\t\\t\\t} else {\\n\\t\\t\\t\\treturn true;\\n\\t\\t\\t}\\n\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9efaa3bda54b46384b29342b217b43ff\",\n \"score\": \"0.45685363\",\n \"text\": \"public function refreshCache()\\n\\t{\\n\\t\\t$vsid = $this->getID();\\n\\t\\tif (false === ($result = GDO::table('GWF_VoteScoreRow')->selectFirst(\\\"AVG(vsr_score), SUM(vsr_score), COUNT(*)\\\", \\\"vsr_vsid={$vsid}\\\", '', NULL, GDO::ARRAY_N)))\\n\\t\\t{\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\treturn $this->saveVars(array(\\n\\t\\t\\t'vs_avg' => $result[0] === NULL ? $this->getInitialAvg() : $result[0],\\n\\t\\t\\t'vs_sum' => $result[1],\\n\\t\\t\\t'vs_count' => $result[2],\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03362c1938fd27c07f3ef9abb950d962\",\n \"score\": \"0.45562294\",\n \"text\": \"function _slack_call_api_cached($slack, $method, $args, $ttl = MICROBOT_TTL_1_MINUTE) {\\n if (!is_a($slack, 'Slack')) {\\n throw new Exception(__FUNCTION__ . \\\" was called with an invalid Slack instance; did you forget to pass one in?\\\");\\n }\\n $cache_filename = MICROBOT_TMP_DIR . \\\"/slack.\\\" . $method . \\\".\\\" . sha1(json_encode($args)) . \\\".ttl\\\" . $ttl . \\\".json\\\";\\n if (file_exists($cache_filename) && (time() - filemtime($cache_filename)) < $ttl) {\\n return json_decode(file_get_contents($cache_filename), true);\\n }\\n\\n $resp = $slack->call($method, $args);\\n file_put_contents($cache_filename, json_encode($resp));\\n return $resp;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81c30bf6393c777ccc928db5b7803784\",\n \"score\": \"0.45554203\",\n \"text\": \"private function manage_cache(){\\n if ( ! laterpay_check_is_vip_classic() || ! function_exists( 'vary_cache_on_function' ) ) {\\n return;\\n }\\n $client_options = LaterPay_Helper_Config::get_php_client_options();\\n $skip_cache_for_cookie = sprintf( '$skip_cache_keys = array( \\\"laterpay_tracking_code\\\", \\\"%s\\\" );', sanitize_key( $client_options[\\\"token_name\\\"] ) );\\n $skip_cache_for_cookie .= '\\n foreach ( $skip_cache_keys as $key ) {\\n if ( array_key_exists( $key, $_COOKIE ) ) {\\n return;\\n }\\n }\\n if ( ! empty( $_GET[\\\"lptoken\\\"] ) ) {\\n return;\\n }\\n return true;';\\n\\n vary_cache_on_function( $skip_cache_for_cookie );\\n\\n if ( ! function_exists( 'batcache_cancel' ) ) {\\n return;\\n }\\n $skip_cache_keys = array(\\n 'laterpay_tracking_code',\\n $client_options[\\\"token_name\\\"],\\n );\\n foreach ( $skip_cache_keys as $key ) {\\n if ( array_key_exists( $key, $_COOKIE ) ) { // phpcs:ignore\\n // Cancel adding cache if cookie is present since it can be user specific content.\\n batcache_cancel();\\n return;\\n }\\n }\\n if ( ! empty( $_GET['lptoken'] ) ) { // When laterpay payment api redirects to set token in cookie.\\n batcache_cancel();\\n return;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69806e95aea799a798f645b7052d662e\",\n \"score\": \"0.45499074\",\n \"text\": \"public function hasCache() {\\n return !!$this->cache;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1bab89ba1d9c37c66653e8938516f692\",\n \"score\": \"0.45470914\",\n \"text\": \"static public function get_cached_source( $schedule_id, $source_type = false ) {\\n if( !( ( $uploads = wp_upload_dir( current_time( 'mysql' ) ) ) && false === $uploads[ 'error' ] ) ) {\\n return false; // upload dir is not accessible\\n }\\n if( $source_type ) {\\n $source_type = $source_type . '_';\\n }\\n $cache_file = $uploads[ 'basedir' ] . \\\"/wpp_import_files/temp/{$schedule_id}/{$source_type}cache.xml\\\";\\n //** Check if a source_cache file exists and is not empty */\\n if( file_exists( $cache_file ) && filesize( $cache_file ) ) {\\n $xml_data = file_get_contents( $cache_file );\\n $result[ 'time' ] = filemtime( $cache_file );\\n $result[ 'xml_data' ] = $xml_data;\\n return $result;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5afcce580b5916754deac5d1db5073c9\",\n \"score\": \"0.45397237\",\n \"text\": \"public function CacheGetOutput() {\\n\\t\\t$key = $this->CacheKey();\\n\\n\\t\\tif ('0' == GetGet('cache')) {\\n\\t\\t\\t// Cache temp off, but still gen & set\\n\\t\\t\\t$s = NULL;\\n\\t\\t} else {\\n\\t\\t\\t// Try get\\n\\t\\t\\t$s = $this->oCache->Get($key, $this->CacheLifetime());\\n\\t\\t}\\n\\n\\t\\tif (is_null($s)) {\\n\\t\\t\\t// Cache invalid, gen and set\\n\\t\\t\\t$s = $this->GetOutput();\\n\\t\\t\\t$this->oCache->Set($key, $s, $this->CacheLifetime());\\n\\t\\t}\\n\\n\\t\\treturn $s;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a20864d6b608b2c0fd20c5b56ff9a60\",\n \"score\": \"0.45347184\",\n \"text\": \"public function save($notifyJsonCache = true) {\\r\\n\\t\\tglobal $wpdb;\\r\\n\\t\\t// TODO: check permissions\\r\\n\\t\\tUwr1resultsHelper::enforcePermission( 'save' );\\r\\n\\r\\n\\t\\t// check if a result for this fixture already exists.\\r\\n\\t\\t// otherwise, the submitter name get overwritten and that sucks.\\r\\n\\t\\t$doSave = false;\\r\\n\\r\\n\\t\\t// kludge: use an internal second instance of this class\\r\\n\\t\\t$tmpInstance = new Uwr1resultsModelResult();\\r\\n\\t\\t$oldResult = $tmpInstance->findById($this->id());\\r\\n\\r\\n\\t\\t$this->updatePoints();\\r\\n\\t\\t$changes = Uwr1resultsModel::diff($oldResult->properties, $this->properties);\\r\\n\\t\\t// ignore all fields which are not relevant for the decission of $doSave\\r\\n\\t\\t$ignoreFields = array('userId', 'modified',\\r\\n\\t\\t\\t\\t\\t\\t\\t'goalsHalfBlue', 'goalsHalfWhite',\\r\\n\\t\\t\\t\\t\\t\\t\\t'goalsRegularBlue', 'goalsRegularWhite');\\r\\n\\t\\tforeach ($ignoreFields as $field) {\\r\\n\\t\\t\\tunset($changes->$field);\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t// all cases where an update is needed:\\r\\n\\t\\t// 1) new result (there is no old result)\\r\\n\\t\\tif (!$doSave && !@$oldResult->id()) {\\r\\n\\t\\t\\t$doSave = true;\\r\\n\\t\\t}\\r\\n\\t\\t// 2) result changed (we optimistically assume the new one is a correction)\\r\\n\\t\\tif (!$doSave && \\r\\n\\t\\t\\t(isset($changes->goalsBlue) || isset($changes->goalsWhite))\\r\\n\\t\\t\\t) {\\r\\n\\t\\t\\t$doSave = true;\\r\\n\\t\\t}\\r\\n\\t\\t// 3) comment changed and not set to empty string\\r\\n\\t\\t$newComment = trim(@$changes->comment['new']);\\r\\n\\t\\tif (!$doSave && !empty($newComment)) {\\r\\n\\t\\t\\t$doSave = true;\\r\\n\\t\\t}\\r\\n\\t\\tunset($newComment);\\r\\n\\t\\t\\r\\n\\t\\tif (!$doSave) { return; }\\r\\n\\r\\n\\r\\n\\t\\t$this->updatePoints();\\r\\n\\t\\t\\r\\n\\t\\t// re-compute $changes after updatePoints\\r\\n\\t\\t$changes = Uwr1resultsModel::diff($oldResult->properties, $this->properties);\\r\\n\\t\\t// ignore fields which are not user-settable\\r\\n\\t\\t$ignoreFields = array('modified',\\r\\n\\t\\t\\t\\t\\t\\t\\t'goalsHalfBlue', 'goalsHalfWhite',\\r\\n\\t\\t\\t\\t\\t\\t\\t'goalsRegularBlue', 'goalsRegularWhite');\\r\\n\\t\\tforeach ($ignoreFields as $field) {\\r\\n\\t\\t\\tunset($changes->$field);\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t// escape and quote $comment\\r\\n\\t\\t$comment = $this->comment();\\r\\n\\t\\t$this->set( 'comment', \\\"'\\\" . Uwr1resultsHelper::sqlEscape( $comment ) . \\\"'\\\" );\\r\\n\\r\\n\\t\\t$fields = array();\\r\\n\\t\\t$values = array();\\r\\n\\t\\tforeach ($this->dbMapping as $prop => $dbField) {\\r\\n\\t\\t\\t$fields[] = $dbField;\\r\\n\\t\\t\\t$values[] = $this->$prop();\\r\\n\\t\\t}\\r\\n\\t\\t$fieldsStr = \\\"`\\\" . implode(\\\"`, `\\\", $fields) . \\\"`\\\";\\r\\n\\t\\t$valuesStr = implode(\\\", \\\", $values);\\r\\n/*\\t\\t\\r\\n\\t\\t$sql = 'REPLACE INTO `'.parent::getTable(get_class($this)).'`'\\r\\n\\t\\t\\t. ' (`fixture_ID`, `user_ID`, `result_modified`, `result_goals_b`, `result_goals_w`)'\\r\\n\\t\\t\\t. ' VALUES'\\r\\n\\t\\t\\t. ' (' . $this->fixtureId() . ', ' . intval($current_user) . ', NOW(), ' . intval($_POST['goalsBlue']) . ', ' . intval($_POST['goalsWhite']) . ')';\\r\\n*/\\r\\n\\t\\t// For now: only one result per game: resultId == fixtureId\\r\\n\\t\\t$sql = 'REPLACE INTO `'.parent::getTable(get_class($this)).'`'\\r\\n\\t\\t\\t. \\\" ({$fieldsStr})\\\"\\r\\n\\t\\t\\t. ' VALUES'\\r\\n\\t\\t\\t. \\\" ({$valuesStr})\\\";\\r\\n\\t\\t//print $sql;exit;\\r\\n\\t\\t$res = $wpdb->query($sql);\\r\\n\\t\\t\\r\\n\\t\\tif ($res && $notifyJsonCache) {\\r\\n\\t\\t\\t$this->notifyJsonCache($this->leagueSlug(), __FILE__);\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t// TODO: change return type: $result_id on success, false otherwise\\r\\n\\t\\treturn $res;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac0d62ba85a7be6ea016629bf81e17b3\",\n \"score\": \"0.45290223\",\n \"text\": \"public function test_are_we_setting_the_cache()\\n {\\n $gracenote = new \\\\Atomescrochus\\\\Gracenote\\\\Gracenote();\\n $gracenote->searchType('track_title');\\n $gracenote->query('poker face');\\n $cache_key = 'track_title-poker face';\\n $gracenote->search();\\n\\n $this->assertTrue(Cache::has($cache_key));\\n\\n // remove it from cache, just in case it would interfer with future test\\n Cache::forget($cache_key);\\n $this->assertFalse(Cache::has($cache_key));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a8aef022d935fccd2d7eb1fe3ddc5ea\",\n \"score\": \"0.45234227\",\n \"text\": \"private function isCached() {\\n $name = \\\"body\\\" . md5(Router::getInstance()->getController() . Router::getInstance()->getAction()) . \\\".min.js\\\";\\n clearstatcache(true, $this->getJsDir() . $name);\\n // check if the file exists\\n if (file_exists($this->getJsDir().$name)) {\\n if ($this->config['cache']['ttl'] == 0) return true;\\n $limit = (time() - $this->config['cache']['ttl']);\\n // check if the file is recent\\n if ($limit > filemtime($this->getJsDir() . $name)) {\\n return true;\\n }\\n return false;\\n } else\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d113fb410016dce8fc421308a131803\",\n \"score\": \"0.4523342\",\n \"text\": \"public function execute()\\n { \\n $jsonResp['incache'] = false;\\n $params = $this->getRequest()->getParams(); \\n if(empty($params['cachecheeck']) == false) {\\n $objectManager = \\\\Magento\\\\Framework\\\\App\\\\ObjectManager::getInstance();\\n $sessionManager = $objectManager->create('\\\\Magento\\\\Framework\\\\Session\\\\SessionManagerInterface');\\n $jsonFactory = $objectManager->create('\\\\Magento\\\\Framework\\\\Controller\\\\Result\\\\JsonFactory');\\n $isInCache = $sessionManager->getNotInCache();\\n if($isInCache) {\\n $sessionManager->unsNotInCache();\\n $jsonResp['incache'] = true; \\n }\\n $result = $jsonFactory->create();\\n\\t\\t return $result->setData($jsonResp);\\n \\n } else {\\n $this->_view->loadLayout();\\n $this->_view->renderLayout();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b47c67d4268278cf200482c2dfa399f\",\n \"score\": \"0.45231894\",\n \"text\": \"public function cache()\\n\\t{\\n\\t\\t$sources = $this->getSources();\\n\\t\\tforeach ($sources as $source) {\\n\\t\\t\\t$source->cache();\\n\\t\\t};\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45fac12873f7e823912f9f4c34d2da57\",\n \"score\": \"0.4519064\",\n \"text\": \"public function should_cache() {\\n return (($this->method == HTTP_Request2::METHOD_GET) && $this->config['cache']) || $this->config['force_cache'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6495e94618e9b0997b109071fd022b5b\",\n \"score\": \"0.45149752\",\n \"text\": \"public static function share_cache(){\\n self::$cache_shared = true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb0fa60dff69ddfe11d077f189d50b91\",\n \"score\": \"0.45116335\",\n \"text\": \"protected function getFromCache()\\r\\n {\\r\\n return false;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6cbc6952d9b18b67ce992aea942ad628\",\n \"score\": \"0.45073825\",\n \"text\": \"function smarty_core_read_cache_file( &$params, &$smarty )\\r\\n{\\r\\n static $content_cache = array( );\\r\\n if ( $smarty->force_compile )\\r\\n {\\r\\n return FALSE;\\r\\n }\\r\\n if ( isset( $content_cache[$params['tpl_file'].\\\",\\\".$params['cache_id'].\\\",\\\".$params['compile_id']] ) )\\r\\n {\\r\\n $smarty->_cache_info = $content_cache[$params['tpl_file'].\\\",\\\".$params['cache_id'].\\\",\\\".$params['compile_id']][1];\\r\\n $params['results'] = $content_cache[$params['tpl_file'].\\\",\\\".$params['cache_id'].\\\",\\\".$params['compile_id']][0];\\r\\n return TRUE;\\r\\n }\\r\\n if ( !empty( $smarty->cache_handler_func ) )\\r\\n {\\r\\n call_user_func_array( $smarty->cache_handler_func, array(\\r\\n \\\"read\\\",\\r\\n $smarty,\\r\\n $params['results'],\\r\\n $params['tpl_file'],\\r\\n $params['cache_id'],\\r\\n $params['compile_id'],\\r\\n NULL\\r\\n ) );\\r\\n }\\r\\n else\\r\\n {\\r\\n $_auto_id = $smarty->_get_auto_id( $params['cache_id'], $params['compile_id'] );\\r\\n $_cache_file = $smarty->_get_auto_filename( $smarty->cache_dir, $params['tpl_file'], $_auto_id );\\r\\n $params['results'] = $smarty->_read_file( $_cache_file );\\r\\n }\\r\\n if ( empty( $params['results'] ) )\\r\\n {\\r\\n return FALSE;\\r\\n }\\r\\n $_contents = $params['results'];\\r\\n $_info_start = strpos( $_contents, \\\"\\\\n\\\" ) + 1;\\r\\n $_info_len = ( integer )substr( $_contents, 0, $_info_start - 1 );\\r\\n $_cache_info = unserialize( substr( $_contents, $_info_start, $_info_len ) );\\r\\n $params['results'] = substr( $_contents, $_info_start + $_info_len );\\r\\n if ( $smarty->caching == 2 && isset( $_cache_info['expires'] ) )\\r\\n {\\r\\n if ( 0 - 1 < $_cache_info['expires'] && $_cache_info['expires'] < time( ) )\\r\\n {\\r\\n return FALSE;\\r\\n }\\r\\n }\\r\\n else if ( 0 - 1 < $smarty->cache_lifetime && $smarty->cache_lifetime < time( ) - $_cache_info['timestamp'] )\\r\\n {\\r\\n return FALSE;\\r\\n }\\r\\n if ( $smarty->compile_check )\\r\\n {\\r\\n $_params = array( \\\"get_source\\\" => FALSE, \\\"quiet\\\" => TRUE );\\r\\n foreach ( array_keys( $_cache_info['template'] ) as $_template_dep )\\r\\n {\\r\\n $_params['resource_name'] = $_template_dep;\\r\\n if ( !$smarty->_fetch_resource_info( $_params ) || $_cache_info['timestamp'] < $_params['resource_timestamp'] )\\r\\n {\\r\\n return FALSE;\\r\\n }\\r\\n }\\r\\n if ( isset( $_cache_info['config'] ) )\\r\\n {\\r\\n $_params = array(\\r\\n \\\"resource_base_path\\\" => $smarty->config_dir,\\r\\n \\\"get_source\\\" => FALSE,\\r\\n \\\"quiet\\\" => TRUE\\r\\n );\\r\\n foreach ( array_keys( $_cache_info['config'] ) as $_config_dep )\\r\\n {\\r\\n $_params['resource_name'] = $_config_dep;\\r\\n if ( !$smarty->_fetch_resource_info( $_params ) || $_cache_info['timestamp'] < $_params['resource_timestamp'] )\\r\\n {\\r\\n return FALSE;\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n $content_cache[$params['tpl_file'].\\\",\\\".$params['cache_id'].\\\",\\\".$params['compile_id']] = array(\\r\\n $params['results'],\\r\\n $_cache_info\\r\\n );\\r\\n $smarty->_cache_info = $_cache_info;\\r\\n return TRUE;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6166c21746761a7ceca21bff6fe5a08d\",\n \"score\": \"0.45054048\",\n \"text\": \"public function isUsingMemoized()\\n\\t{\\n\\t\\treturn $this->_useMemoized;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b374aa7ec6e91e14446efc432b94e51\",\n \"score\": \"0.4503109\",\n \"text\": \"function workflow_invalidate_cache() {\\n workflow_load_all(TRUE);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d6f823eac50f24baf6a4fb0810f631d\",\n \"score\": \"0.45026395\",\n \"text\": \"function check_cache($file) {\\n\\t\\tif(!$this->cache['cache_enable']) {\\n\\t\\t\\t$this->cache['cached'] = false;\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\tif(!@file_exists($file)) {\\n\\t\\t\\t$this->cache['cached'] = false;\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\t$this->cache['cached'] = true;\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42514d5779f1159a7d1b21fd512ef47d\",\n \"score\": \"0.4498361\",\n \"text\": \"public function configurationIsCached(): bool\\n {\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08db3164f7f2b145ad548a67c761bda0\",\n \"score\": \"0.44904435\",\n \"text\": \"public function isCached() {\\n return $this->_is_cached ? $this->_createCacheKey($this->getId()) : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be1be0bdf479100a6c26d02a868600e9\",\n \"score\": \"0.44900268\",\n \"text\": \"public function testDoSaveWithDefinedLifeTime()\\n {\\n $this->primaryProvider\\n ->expects($this->any())\\n ->method('save')\\n ->will($this->returnValue(true));\\n\\n $this->secondaryProvider\\n ->expects($this->any())\\n ->method('save')\\n ->will($this->returnValue(true));\\n\\n $this->assertEquals(true, $this->cache->save('panda', 'asdf', 123));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91215df5a767e0e6dfbfc7ac4d8fd661\",\n \"score\": \"0.44790623\",\n \"text\": \"public function testDoSaveWithDefaultLifeTime()\\n {\\n $this->primaryProvider\\n ->expects($this->any())\\n ->method('save')\\n ->will($this->returnValue(true));\\n\\n $this->secondaryProvider\\n ->expects($this->any())\\n ->method('save')\\n ->will($this->returnValue(true));\\n\\n $this->assertEquals(true, $this->cache->save('panda', 'asdf'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab6d55bdfd2db6ee8d4a44d62ecec012\",\n \"score\": \"0.44766867\",\n \"text\": \"function isCached()\\n\\t{\\n\\t\\treturn $this->is_cached ;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43251772ec413af5f278e4e1bb9c18f0\",\n \"score\": \"0.44700038\",\n \"text\": \"function RecalculateSharingRules()\\n{\\n\\tglobal $log;\\n\\t$log->debug(\\\"Entering RecalculateSharingRules() method ...\\\");\\n\\tglobal $adb;\\n\\n\\t$log->debug(\\\"Exiting RecalculateSharingRules method ...\\\");\\t\\n\\t\\t\\t\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"384beb5edae66eb27afb72143c73771b\",\n \"score\": \"0.4468517\",\n \"text\": \"public function updateCache()\\n {\\n $update_cache_process = update_option( 'sprout_logged_errors', $this->cache, 'no' );\\n\\n if( !$update_cache_process ) {\\n return False;\\n }\\n\\n return True;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b513918c4f12d5313d971e0006fb184b\",\n \"score\": \"0.4458395\",\n \"text\": \"public static function CacheExists($what)\\n\\t{\\n\\t\\tif(isset(self::$cache[$what]))\\n\\t\\t\\treturn true;\\n\\t\\telse\\n\\t\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4dbcb33ef8c5274e1a4c5e249aadd047\",\n \"score\": \"0.4451571\",\n \"text\": \"public function getFromCache()\\n {\\n $hash = sha1($this->properties['orContent']);\\n //if cache is not enabled we leave from here\\n if ($this->properties[self::ENABLE_CONTENT_CACHE] !== true) {\\n return false;\\n }\\n\\n foreach ($this->properties[self::ASSIGNED] as $var => $val) {\\n ${$var} = $val;\\n }\\n $_cache = new Cache($this->cacheStorage);\\n //we load our sourcecode from cache\\n $this->properties[self::SOURCE] = $_cache->load($hash);\\n\\n if($this->properties[self::SOURCE] === null){\\n return false;\\n }\\n\\n $this->properties[self::SOURCE] = \\\"\\\\n\\\".$this->properties[self::SOURCE];\\n ob_start();\\n $e = eval('?>' . $this->properties[self::SOURCE]);\\n $this->properties[self::OUTPUT] = ob_get_clean();\\n if ($e === false) {\\n die(\\\"Error: unable to compile template\\\");\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea935c088d327b0b8b300f4bebc65a38\",\n \"score\": \"0.4449083\",\n \"text\": \"private function loadCache() {\\n\\t\\t$cache = get_site_option(self::OPTION_KEY);\\n\\t\\tif ($cache === false) {\\n\\t\\t\\treturn $this->updateCache();\\n\\t\\t}\\n\\t\\t$this->cache = $cache;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d6b0b67ce192db5bbb6834e61eb8d6a\",\n \"score\": \"0.4447546\",\n \"text\": \"private function isUsed(): bool\\n {\\n\\n return ($this->success\\n or (($this->local_status ?? Transaction::LOCAL_STATUS_INIT) != Transaction::LOCAL_STATUS_INIT)\\n or $this->cashier_id // i.e. do not reuse those created by admin, not that it matters though.\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"baf8a7e1d66d4ffca5d2fa13b364e999\",\n \"score\": \"0.44465595\",\n \"text\": \"public function configurationIsCached()\\n {\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cede0eb594cfc444bc30603cd3b2adf\",\n \"score\": \"0.44417682\",\n \"text\": \"private function __cache() { \\n \\n // Save the data to the cache.\\n $this->cache->set($this->method, $this->endpoint, $this->query, [\\n 'status' => $this->status,\\n 'data' => $this->data,\\n 'features' => $this->features\\n ]);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f872129216499fbec1e78779c2cf933c\",\n \"score\": \"0.4437814\",\n \"text\": \"public function syncValues() {\\n\\t\\t$DashboardKpi = ClassRegistry::init('Dashboard.DashboardKpi');\\n\\t\\t$kpi = $DashboardKpi->find('list', [\\n\\t\\t\\t'fields' => ['id'],\\n\\t\\t\\t'recursive' => -1\\n\\t\\t]);\\n\\n\\t\\t$ret = true;\\n\\t\\tforeach ($kpi as $kpiId) {\\n\\t\\t\\t$ret &= $DashboardKpi->recalculate($kpiId);\\n\\t\\t}\\n\\n\\t\\t$ret &= $this->_saveInternalLog(DashboardLog::TYPE_RECALCULATION);\\n\\n\\t\\treturn $ret;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1acb25ca843db6122f2ef7a0e192ab91\",\n \"score\": \"0.44374546\",\n \"text\": \"public function injectFindMatchResultsCache(\\\\F3\\\\FLOW3\\\\Cache\\\\Frontend\\\\VariableFrontend $cache) {\\n\\t\\t$this->findMatchResultsCache = $cache;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26a3db560689399a5611fac1def031aa\",\n \"score\": \"0.44291365\",\n \"text\": \"public static function maybe_cached_request( $url, $args ) {\\n\\t\\t$data = static::get_data( $url );\\n\\n\\t\\tif ( ! empty( $data ) ) {\\n\\t\\t\\t// check to see if this request is expired\\n\\t\\t\\tstatic::check_for_expired_result( $data, $args );\\n\\n\\t\\t\\treturn $data;\\n\\t\\t}\\n\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0be02282b657f98cf56430f73b9de0b7\",\n \"score\": \"0.44271722\",\n \"text\": \"function _cacheMiss($cache, $id) {\\n\\t\\t$submission = $this->getById($id, null, false);\\n\\t\\t$cache->setCache($id, $submission);\\n\\t\\treturn $submission;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf1963d1715a4bff8504e158657231a8\",\n \"score\": \"0.44263747\",\n \"text\": \"function optimizeTables() {\\r\\n $db =& $this->state->getByRef('db');\\r\\n\\t if (!$this->canExecute('lastOptimization', $this->getRandomTime(300000, 600000))) {\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t} else {\\r\\n\\t\\t\\t$paramsSettings = $this->createParamsObject();\\r\\n\\t\\t\\t$paramsSettings->setField('lastOptimization', $db->getDateString());\\r\\n\\t\\t\\t$this->callService('Settings', 'updateSetting', $paramsSettings);\\r\\n\\t\\t}\\r\\n return $this->runOptimizeTables();\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3422174a5e88f65a82fd0276c8c27e73\",\n \"score\": \"0.44221178\",\n \"text\": \"function previous_references_get_cache(){\\n\\t\\tif ($data = cache_get('previous_references_data','cache')){\\n\\t\\t\\treturn $data->data;\\n\\t\\t}\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"430547571b1134b72d49edc109c52f26\",\n \"score\": \"0.4420516\",\n \"text\": \"public function execute()\\n {\\n // Parse external values\\n $this->parseExternalValues();\\n\\n // Compare external values\\n $result = false;\\n if ( $this->monolingualTextValueComparer ) {\\n $result = $this->monolingualTextValueComparer->execute();\\n }\\n\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4cf4b8a8ae2010bfc1e0c4e3c04d68bd\",\n \"score\": \"0.44068968\",\n \"text\": \"public function hasResult(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebe4be41ef4a563a4270d4cb0ecf6b17\",\n \"score\": \"0.44055942\",\n \"text\": \"private function checkCacheGet(){\\n\\t\\t$cache_path = $this->cachePath();\\n\\t\\t\\n\\t\\t// Check we're not being run by PHP-CLI\\n\\t\\tif(php_sapi_name() == 'cli'){\\n\\t\\t\\treturn FALSE;\\n\\t\\t}\\n\\t\\t// Do we have a cached version?\\n\\t\\tif(!file_exists($cache_path)){\\n\\t\\t\\tMagicLogger::log(\\\"No cache file exists at {$cache_path}.\\\");\\n\\t\\t\\treturn FALSE;\\n\\t\\t}\\n\\t\\t// Has the cached file expired?\\n\\t\\tif(filemtime($cache_path) < strtotime('1 hour ago')){\\n\\t\\t\\tMagicLogger::log(\\\"File at {$cache_path} too old.\\\");\\n\\t\\t\\treturn FALSE;\\n\\t\\t}\\n\\t\\t// No caching if the user is logged in.\\n\\t\\tif($this->checkCacheGetHasUser()){\\n\\t\\t\\tMagicLogger::log(\\\"User is logged in, not serving cached file {$cache_path}\\\");\\n\\t\\t\\treturn FALSE;\\n\\t\\t}\\n\\t\\t// No caching if there is a POST operation going on\\n\\t\\tif(count($_POST) > 0){\\n\\t\\t\\tMagicLogger::log(\\\"Request is a POST, not serving {$cache_path}\\\");\\n\\t\\t\\treturn FALSE;\\n\\t\\t}\\n\\t\\t// None of the above true? We can served a cached file.\\n\\t\\treturn TRUE;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9c73e042073ed440c38fe726c015b8a\",\n \"score\": \"0.43985003\",\n \"text\": \"function si_exhibition_cache($cache_name, $cache_data_index, $overwrite = FALSE, $permanent = FALSE){\\n global $tnum;\\n si_exhibition_debug(\\\"si_exhibition_cache $cache_name | $cache_data_index | $overwrite | $permanent |\\\");\\n if (!variable_get('si_exhibition_cache_on',TRUE)){\\n si_exhibition_debug(\\\"si_exhibition_cache is turned off\\\");\\n if ($overwrite !== FALSE) return $overwrite; //If caching is turned off, don't use caching!\\n return NULL;\\n }\\n $prefix = 'si_exhibition_cache_';\\n $cache_table_for_clearing = 'cache';\\n if ($overwrite === FALSE){\\n $cache = NULL;\\n if ($cache_info = cache_get($prefix.$cache_name, $cache_table_for_clearing)){\\n $cache = $cache_info->data;\\n if ($cache_data_index == ''){\\n si_exhibition_debug(\\\"si_exhibition_cache returning entire cache\\\", $cache);\\n //return the entire cache\\n return $cache;\\n }\\n if (array_key_exists($cache_data_index, $cache)){\\n si_exhibition_debug(\\\"si_exhibition_cache returning specific cache\\\", $cache[$cache_data_index]);\\n return $cache[$cache_data_index];\\n }\\n }\\n }else{\\n /*\\n if (!is_string($overwrite)){\\n if (empty($tnum)) $tnum = 0;\\n $tnum++;\\n print 'NOT STRING wbt';\\n var_dump($overwrite);\\n debug_print_backtrace();\\n if ($tnum > 1) exit();\\n }\\n */\\n $data = array();\\n if ($cache_info = cache_get($prefix.$cache_name, $cache_table_for_clearing)){\\n $data = $cache_info->data;\\n }\\n $data[$cache_data_index] = $overwrite;\\n $hours = 3;\\n $expire_date_time = time() + 60 * 60 * $hours;\\n if ($permanent === TRUE){\\n $expire_date_time = CACHE_PERMANENT;\\n }\\n si_exhibition_debug(\\\"si_exhibition_cache setting cache $prefix | $cache_name\\\", $data);\\n cache_set($prefix.$cache_name, $data, $cache_table_for_clearing, $expire_date_time);\\n return $overwrite;\\n }\\n si_exhibition_debug(\\\"si_exhibition_cache returning nothing found in cache\\\");\\n return NULL;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f6184cb4a7fbf04d7aa6dcd355ae35a\",\n \"score\": \"0.43920428\",\n \"text\": \"function check_cache ( $url )\\n\\t{\\n\\t\\t$this->ERROR = \\\"\\\";\\n\\t\\t$filename = $this->file_name( $url );\\n\\n\\t\\tif ( file_exists( $filename ) )\\n\\t\\t{\\n\\t\\t\\t// find how long ago the file was added to the cache\\n\\t\\t\\t// and whether that is longer then MAX_AGE\\n\\t\\t\\t$mtime = filemtime( $filename );\\n\\t\\t\\t$age = time() - $mtime;\\n\\t\\t\\tif ( $this->MAX_AGE > $age )\\n\\t\\t\\t{\\n\\t\\t\\t\\t// object exists and is current\\n\\t\\t\\t\\treturn 'HIT';\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t// object exists but is old\\n\\t\\t\\t\\treturn 'STALE';\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t// object does not exist\\n\\t\\t\\treturn 'MISS';\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c66ee2c4cb1b286ed76e4fa3928198c\",\n \"score\": \"0.43885598\",\n \"text\": \"function touchCache() {\\n $result = false;\\n try {\\n $result = $this->query(\\n \\\"UPDATE Cache SET time = '{$time}' WHERE id = '{$id}';\\\" \\n );\\n }\\n catch (PDOException $e) {\\n die($e->getMessage());\\n }\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cf02aeb6d9e958a85fa0220868b262f\",\n \"score\": \"0.43873352\",\n \"text\": \"public function initcache(){\\n $this->cpanel_api_ver = 'api1';\\n return $this->_check_result($this->api1_query($this->user, 'Mysql', __FUNCTION__));\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":725,"cells":{"query_id":{"kind":"string","value":"d39d595318bf00ac5a1ff84c16ba0179"},"query":{"kind":"string","value":"Absorb the build from git."},"positive_passages":{"kind":"list like","value":[{"docid":"2ea1ac473c4f9d3570afda8dbbff1743","score":"0.79937714","text":"private function absorbBuild()\n {\n if (($type = $this->config->get('build.git_absorb')) === false) {\n return;\n }\n\n $config = $this->config->getRoot();\n\n $config['build']['number'] = $this->git->getCommit($type);\n\n $this->config->update($config);\n }","title":""}],"string":"[\n {\n \"docid\": \"2ea1ac473c4f9d3570afda8dbbff1743\",\n \"score\": \"0.79937714\",\n \"text\": \"private function absorbBuild()\\n {\\n if (($type = $this->config->get('build.git_absorb')) === false) {\\n return;\\n }\\n\\n $config = $this->config->getRoot();\\n\\n $config['build']['number'] = $this->git->getCommit($type);\\n\\n $this->config->update($config);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"cd7dbae20affffd816a6f6300e8c7efe","score":"0.60403705","text":"private function absorbVersion()\n {\n if (($type = $this->config->get('current.git_absorb')) === false) {\n return;\n }\n\n $version = $this->git->extractVersion(\n $this->git->getVersionFromGit($type)\n );\n\n $config = $this->config->getRoot();\n\n $config['current']['major'] = (int) $version[1][0];\n\n $config['current']['minor'] = (int) $version[2][0];\n\n $config['current']['patch'] = (int) $version[3][0];\n\n $this->config->update($config);\n }","title":""},{"docid":"16739cf40ff65f143487ab43ca2419d5","score":"0.5715115","text":"public function gitPull(): void\n {\n $this->git\n ->changeDirectory()\n ->fetch()\n ->reset()\n ->pull();\n }","title":""},{"docid":"f169a95bac7060b73d539afffbfc6d37","score":"0.5604104","text":"public function execute() {\r\n try {\r\n if (!$this->has_base_directory()) {\r\n mkdir($this->_directory, 0777, true);\r\n }\r\n\r\n // Make sure we're in the right directory\r\n chdir($this->_directory);\r\n\r\n // only first run\r\n if (!is_dir('./.git')) {\r\n // The \".\" at the end specifies the current folder as the checkout folder!\r\n $this->exec_and_log('Cloning repo for the first time.', \"git clone '\" . $this->_url . \"' .\");\r\n }\r\n\r\n // normal run\r\n else {\r\n\r\n // 1. Move to master branch.\r\n $this->exec_and_log('Switching to master branch.', 'git checkout ' . $this->_branch);\r\n\r\n // 2. Update the local repository\r\n $this->exec_and_log('Pulling in changes.', 'git pull');\r\n\r\n // hidden feature: checkout special revision\r\n\r\n if (isset($_GET['hash']) && $this->is_sha1($_GET['hash'])) {\r\n $hash = $_GET['hash'];\r\n $this->exec_and_log('Checkout previous revision '. $hash.':', 'git checkout '. $hash);\r\n }\r\n }\r\n\r\n // Secure the .git directory\r\n $this->exec_and_log('Securing .git directory.', 'chmod -R og-rx .git');\r\n\r\n $this->log('PULL successful.');\r\n }\r\n catch (Exception $e) {\r\n $this->log($e, 'ERROR');\r\n }\r\n }","title":""},{"docid":"4149cf8a5e6e4421081945ec6848698a","score":"0.5454768","text":"public function gitCheckout(string $ref): void\n {\n $this->git\n ->changeDirectory()\n ->fetch()\n ->checkoutTag($ref);\n }","title":""},{"docid":"d32caf03e108814e95c6510c48cfea40","score":"0.5388621","text":"public function main()\n {\n if (null === $this->getRepository()) {\n throw new BuildException('\"repository\" is required parameter');\n }\n $remotes = trim($this->getRemote());\n if (null === $remotes || '' === $remotes) {\n throw new BuildException('\"remote\" is required parameter');\n }\n\n $client = $this->getGitClient(false, $this->getRepository());\n $command = $client->getCommand('merge');\n $command\n ->setOption('commit', $this->isCommit())\n ->setOption('q', $this->isQuiet());\n\n if ($this->getMessage()) {\n $command->setOption('message', $this->getMessage());\n }\n\n if (!$this->isCommit()) {\n $command->setOption('no-commit', $this->isNoCommit());\n }\n\n if ($this->isFastForwardCommit()) {\n $command->setOption('no-ff', true);\n }\n\n $strategy = $this->getStrategy();\n if ($strategy) {\n // check if strategy is valid\n if (false === in_array($strategy, $this->validStrategies)) {\n throw new BuildException(\n \"Could not find merge strategy '\" . $strategy . \"'\\n\" .\n \"Available strategies are: \" . implode(', ', $this->validStrategies));\n }\n $command->setOption('strategy', $strategy);\n if ($this->getStrategyOption()) {\n $command->setOption(\n 'strategy-option',\n $this->getStrategyOption()\n );\n }\n }\n\n $remotes = explode(' ', $this->getRemote());\n foreach ($remotes as $remote) {\n $command->addArgument($remote);\n }\n\n $this->log('git-merge command: ' . $command->createCommandString(), Project::MSG_INFO);\n\n try {\n $output = $command->execute();\n } catch (Exception $e) {\n throw new BuildException('Task execution failed.', $e);\n }\n\n $this->log(\n sprintf('git-merge: replaying \"%s\" commits', $this->getRemote()),\n Project::MSG_INFO\n );\n $this->log('git-merge output: ' . trim($output), Project::MSG_INFO);\n\n }","title":""},{"docid":"d78f3b64373f7972e85c92d61f3d5e4d","score":"0.53662103","text":"public function doGitFetch()\n {\n $stack = $this->getOption('stack');\n if ($stack) {\n $relativeUrl = sprintf('project/%s/git/fetches', $stack);\n $response = $this->fetchUrl($relativeUrl, 'POST');\n } else {\n throw new \\Exception('[Action:GitFetch] Requires Stack', 1);\n }\n\n if ($response['status'] !== 202) {\n throw new \\Exception('[Error:GitFetch] ' . var_export($response,1), 1);\n }\n\n $relativeUrl = sprintf(\n 'project/%s/git/fetches/%s',\n $stack,\n $response['body']['data']['id']\n );\n\n $timer = 0;\n $sleep = 5;\n $isWaiting = true;\n do {\n $timer += $sleep;\n if ($timer > self::GIT_TIMEOUT) {\n $isWaiting = false;\n throw new \\Exception('[Error:GitFetch] ' . self::GIT_TIMEOUT . 'seconds timeout', 1);\n }\n\n $this->warning('Waiting for 5 seconds...');\n sleep($sleep);\n\n $response = $this->fetchUrl($relativeUrl);\n if ($response['status'] === 200\n && $response['body']['data']['attributes']['status'] === 'Complete'\n ) {\n $this->success('Git Fetch Completed');\n $isWaiting = false;\n }\n } while ($isWaiting);\n\n return $response;\n }","title":""},{"docid":"629ce2299256a22ad11fab8f1893d38f","score":"0.5146541","text":"public static function integrate(Event $event): void\n {\n $filesystem = new Filesystem();\n\n $composerBinDir = $event->getComposer()->getConfig()->get('bin-dir');\n $executable = dirname(__DIR__, 2).$filesystem->ensureValidSlashes('/bin/grumphp');\n $composerExecutable = $composerBinDir.'/grumphp';\n $filesystem->copy(\n $filesystem->ensureValidSlashes($executable),\n $filesystem->ensureValidSlashes($composerExecutable)\n );\n\n $commandlineArgs = ProcessArgumentsCollection::forExecutable($composerExecutable);\n $commandlineArgs->add('git:init');\n $process = self::fixInternalComposerProcessVersion($commandlineArgs);\n\n $process->run();\n if (!$process->isSuccessful()) {\n $event->getIO()->write(\n 'GrumPHP can not sniff your commits. Did you specify the correct git-dir?'\n );\n $event->getIO()->write(''.$process->getErrorOutput().'');\n\n return;\n }\n\n $event->getIO()->write(''.$process->getOutput().'');\n }","title":""},{"docid":"e37211899f259745f58e277d708f3a2d","score":"0.51256263","text":"public function pull() {\n\t\tif(!is_dir(Enviro::mergePath($this->localPath, '.git'))) {\n\t\t\tthrow new Exception(\"The folder '{$this->localPath}' is not a git repository.\");\n\t\t}\n\t\t$prevDir = getcwd();\n\t\tchdir($this->localPath);\n\t\ttry {\n\t\t\tEnviro::write(\"Updading local repository {$this->owner}/{$this->repository}... \");\n\t\t\tEnviro::run('git', \"checkout {$this->branch}\");\n\t\t\tEnviro::run('git', \"fetch origin\");\n\t\t\tEnviro::run('git', \"reset --hard origin/{$this->branch}\");\n\t\t\tEnviro::run('git', \"clean -f -d\");\n\t\t\tEnviro::write(\"done.\\n\");\n\t\t}\n\t\tcatch(Exception $x) {\n\t\t\tchdir($prevDir);\n\t\t\tthrow $x;\n\t\t}\n\t\tchdir($prevDir);\n\t}","title":""},{"docid":"8e84b67f04d6e26bc63c9196e8fdc583","score":"0.5105907","text":"public static function prepareForPantheon()\n {\n // Get rid of any .git directories that Composer may have added.\n // n.b. Ideally, there are none of these, as removing them may\n // impair Composer's ability to update them later. However, leaving\n // them in place prevents us from pushing to Pantheon.\n $dirsToDelete = [];\n $finder = new Finder();\n foreach (\n $finder\n ->directories()\n ->in(getcwd())\n ->ignoreDotFiles(false)\n ->ignoreVCS(false)\n ->depth('> 0')\n ->name('.git')\n as $dir) {\n $dirsToDelete[] = $dir;\n }\n $fs = new Filesystem();\n $fs->remove($dirsToDelete);\n\n // Fix up .gitignore: remove everything above the \"::: cut :::\" line\n $gitignoreFile = getcwd() . '/.gitignore';\n $gitignoreContents = file_get_contents($gitignoreFile);\n $gitignoreContents = preg_replace('/.*::: cut :::*/s', '', $gitignoreContents);\n file_put_contents($gitignoreFile, $gitignoreContents);\n }","title":""},{"docid":"b201fee8abc01c33c36c2035dc57ad76","score":"0.50694793","text":"public function actionForceUploadBuilds()\n {\n $developmentAction = new DevelopmentAction(DevelopmentAction::FORCEUPLOAD);\n $developmentAction->performAction();\n }","title":""},{"docid":"401a0d322ecc103b942264eb2a235e7b","score":"0.5014463","text":"public function handle() {\n $this->line(exec('git pull'));\n }","title":""},{"docid":"4b9a0070a38ed2988c4ff669d98c8c2e","score":"0.49999708","text":"private function buildIfNecessary()\n {\n if (!$this->hasBeenBuilt) {\n $this->build();\n $this->hasBeenBuilt = true;\n }\n }","title":""},{"docid":"28c9823f3e3766f6df52006afc7151b9","score":"0.49289346","text":"protected function postIntegrationCleanup() {\n // Convert Git repo to non-Git controlled file directory. This is required\n // to be able to commit the app files to Health project codebase.\n $git_related_files_folders = [\n '.git',\n '.gitignore',\n ];\n $this\n ->consoleIO\n ->write(\"Checking if project uses Git... \");\n foreach ($git_related_files_folders as $file) {\n $git_file_path = $this->appPath . $file;\n if (file_exists($git_file_path)) {\n $command = 'cd ' . escapeshellcmd($this->appPath) . ' && rm -Rf ' . escapeshellcmd($git_file_path);\n $this->executeCommand($command, \"Removing \" . $git_file_path);\n }\n }\n $this\n ->consoleIO\n ->write(\"[DONE]\");\n }","title":""},{"docid":"12841ef31df4680d5184d28a288bb0c6","score":"0.4897389","text":"public function execute()\n {\n try{\n if (is_callable($this->beforeDeploy)){\n call_user_func($this->beforeDeploy);\n }\n\n // Discard any changes to tracked files since our last deploy\n $output = shell_exec('git reset --hard HEAD');\n $this->log('Reseting repository... '.$output);\n\n // Update the local repository\n $output = shell_exec('git pull origin master');\n $this->log('Pulling in changes... '.$output);\n\n // Secure the .git directory\n $output = shell_exec('chmod -R og-rx .git');\n $this->log('Securing .git directory... '.$output);\n\n $this->log('Deployment successful!');\n\n if (is_callable($this->afterDeploy)){\n call_user_func($this->afterDeploy);\n }\n }catch (\\Exception $e){\n $this->log($e, 'ERROR');\n }\n }","title":""},{"docid":"e2be8675e66f4c9031ff41ef43a83e4f","score":"0.48899144","text":"public function testUpdateGitBranch()\n {\n }","title":""},{"docid":"bc5cb723d8bf65436bf38647a5f4d6af","score":"0.48794106","text":"function upgrade_is_git()\n{\n\tif ( SAFE_MODE === true )\n\t{\n\t\treturn false;\n\t}\n\n\tif ( ! is_dir( PML_BASE . DIRECTORY_SEPARATOR . '.git' ) )\n\t{\n\t\treturn false;\n\t}\n\n\treturn true;\n}","title":""},{"docid":"8d80484613d9ef80ed7c7dbe71853829","score":"0.4861493","text":"protected function preBuild() {\n }","title":""},{"docid":"050e9c01c2acdf4d3b89aa1b79bc9569","score":"0.4845944","text":"function update_fromgit($version_str, &$errmsg){\n\n global $config_ini;\n $taglist = array();\n $errorcnt = 0;\n if(array_key_exists(\"gitcommandpath\", $config_ini)){\n $gitcmd = urldecode($config_ini[\"gitcommandpath\"]);\n if(file_exists($gitcmd)){\n $execcmd = $gitcmd.' config --global core.autoCRLF false';\n exec($execcmd);\n \n $execcmd = $gitcmd.' fetch origin';\n set_time_limit (900);\n exec($execcmd,$result_str);\n foreach($result_str as $line){\n $err_str_pos = mb_strpos($line, \"unable to access\");\n if( $err_str_pos !== false ) {\n $errmsg .= \"network access failed\";\n $errorcnt ++;\n }else if (mb_strstr($line, \"fatal\") !== false) {\n $errmsg .= \"fetch unknown error: $line\";\n $errorcnt ++;\n }\n }\n if($errorcnt > 1){\n return false;\n }\n\n $execcmd = $gitcmd.' reset --hard '.$version_str;\n exec($execcmd,$result_str);\n foreach($result_str as $line){\n $err_str_pos = mb_strpos($line, \"unknown revision\");\n if( $err_str_pos !== false) {\n $errmsg .= \"no version : $version_str\";\n $errorcnt ++;\n }else if (mb_strstr($line, \"fatal\") !== false) {\n $errmsg .= \"reset --hard unknown error: $line\";\n $errorcnt ++;\n }\n }\n }\n }\n \n if($errorcnt > 0) {\n return false;\n }\n \n return true;\n}","title":""},{"docid":"936dc324c49611492a1835a8cd65457d","score":"0.48357284","text":"public function handle(Git $git) {\n $version = $this->getTagWithV($this->argument('version'));\n $issues = $this->argument('issues');\n\n $this->info(\"Creating release branch for version {$version}.\");\n\n $this->info(\"Checking out dev branch.\");\n $repo = $git->open(getcwd());\n $repo->checkout('dev');\n\n $this->info(\"Pulling latest dev branch.\");\n $repo->pull();\n\n $this->info(\"Creating release branch.\");\n $issuesFormattedForBranch = str_replace(',', '-', $issues);\n $branchName = \"release/{$version}-{$issuesFormattedForBranch}\";\n try {\n $this->runProcess(\"git checkout -b {$branchName}\");\n } catch (\\Exception $e) {\n if (str_contains($e->getMessage(), 'already exists')) {\n $shouldDeleteIt = $this->confirm(\"Branch {$branchName} already exists. Should we delete it?\", true);\n if ($shouldDeleteIt) {\n $this->runProcess(\"git branch -D {$branchName}\");\n $this->runProcess(\"git checkout -b {$branchName}\");\n } else {\n $this->error(\"Branch {$branchName} already exists. Please delete it or choose a different version.\");\n return;\n }\n }\n }\n\n $this->info(\"Pulling issue branches into release branch.\");\n $issuesArray = explode(',', $issues);\n $issueBranches = $this->findIssueBranches($issuesArray);\n\n $this->mergeBranches($issueBranches);\n\n $this->info(\"Pushing release branch to origin.\");\n $this->runProcess(\"git push origin $branchName\");\n\n $this->info(\"Creating release PR.\");\n $prBody = \"- #\" . implode(\"\\n- #\", $issuesArray) . \"\\n\";\n // We don't run this in testing mode, because I don't feel like figuring out how to mock the gh command for now.\n if (!app()->runningUnitTests()) {\n try {\n $this->runProcess(<<warn(\"Failed to create PR. Please create it manually.\");\n }\n }\n\n // Create and push a tag for the release\n $this->info(\"Creating release tag.\");\n // Remove any 'v' from the version number\n $version = str_replace('v', '', $version);\n $this->runProcess(\"git tag -a v{$version} -m 'Release {$version}'\");\n $this->runProcess(\"git push origin v{$version}\");\n\n $this->info(\"Done.\");\n $this->info(\"Branch: {$branchName}\");\n }","title":""},{"docid":"6c77fa0a5055e8d01dbcf2fb48972c52","score":"0.483529","text":"public function precommit( ) {\n\t\treturn;\n\t}","title":""},{"docid":"94329ba83bc7b2cc0af357432fa29e5b","score":"0.48231778","text":"public function run()\n {\n \t$branch = $this->getParameter('branch');\n \t$remote = $this->getParameter('remote');\n\n \t// Fetch Remote\n $command = 'git fetch ' . $remote;\n $result = $this->runCommandRemote($command) && $result;\n\n // Checkout\n $command = 'git checkout ' . $branch;\n $result = $this->runCommandRemote($command) && $result;\n\n // Check Working Copy status\n $stashed = false;\n $status = '';\n $command = 'git checkout ' . $branch;\n $result = $this->runCommandRemote($command) && $result;\n\n // Stash if Working Copy is not clean\n if(!$status) {\n \t$stashResult = '';\n \t$command = 'git stash';\n \t$result = $this->runCommandRemote($command, $stashResult) && $result;\n \tif($stashResult != \"No local changes to save\") {\n $stashed = true;\n }\n }\n\n // Rebase\n $command = 'git rebase ' . $remote . '/' . $branch;\n $result = $this->runCommandRemote($command) && $result;\n\n // If Stashed, restore.\n if ($stashed) {\n \t$command = 'git stash pop';\n \t$result = $this->runCommandRemote($command) && $result;\n }\n\n return $result;\n }","title":""},{"docid":"3e930098112b35510d39117e24ff65ec","score":"0.48197645","text":"private function updateRepoInfo()\n {\n $wrapper = tempnam(storage_path() . '/app/', 'gitssh');\n file_put_contents($wrapper, $this->gitWrapperScript($this->private_key));\n\n $workingdir = tempnam(storage_path() . '/app/', 'clone');\n unlink($workingdir);\n\n $cmd = <<< CMD\nchmod +x \"{$wrapper}\" && \\\nexport GIT_SSH=\"{$wrapper}\" && \\\ngit clone --quiet --branch %s --depth 1 %s {$workingdir} && \\\ncd {$workingdir} && \\\ngit checkout %s --quiet && \\\ngit log --pretty=format:\"%%H%%x09%%an\" && \\\nrm -rf {$workingdir}\nCMD;\n\n //$this->outputToConsole('Checking repository state' . PHP_EOL);\n $process = new Process(sprintf(\n $cmd,\n $this->deployment->project->branch,\n $this->deployment->project->repository,\n $this->deployment->project->branch\n ));\n\n $process->setTimeout(null);\n $process->run();\n\n unlink($wrapper);\n\n if (!$process->isSuccessful()) {\n // FIXME: Handle this situation as it is then unclear what went wrong\n throw new \\RuntimeException('Could not get repository info - ' . $process->getErrorOutput());\n }\n\n $git_info = $process->getOutput();\n\n $parts = explode(\"\\x09\", $git_info);\n $this->deployment->commit = $parts[0];\n $this->deployment->committer = trim($parts[1]);\n $this->deployment->save();\n }","title":""},{"docid":"f94fb0dc614283beb82a40ba01bc14a0","score":"0.47722572","text":"function pull()\n\t{\n\t\tif(!$this->_permit('admin')) { $this->_denied(); return; }\n\t\n\t\t// Work outside the web root\n\t\tchdir('../..');\n\t\t\n\t\t// download tar from github\n\t\tsystem('wget --no-check-certificate -O lakshya.tar.gz -o github.log https://github.com/lakshya/website/tarball/master');\n\t\t\n\t\t// unzip into 'beta_new' folder\n\t\tmkdir('beta_new');\n\t\tsystem('tar -xzf lakshya.tar.gz -C beta_new');\n\t\t\n\t\t// copy database & logs from old ones\n\t\tsystem('cp www/beta/application/config/database.php beta_new/lakshya-website-*/www/application/config/database.php');\n\t\tsystem('cp www/beta/application/logs/* beta_new/lakshya-website-*/www/application/logs/');\n\t\t\n\t\t// Delete the old beta backup & create a new one\n\t\tsystem('rm -rf beta_backup');\n\t\tsystem('mv www/beta/ beta_backup/');\n\t\t\n\t\t// Move 'beta_new' to 'beta'\n\t\tsystem('mv beta_new/lakshya-website-*/www/ www/beta/');\n\t\t\n\t\t// Call upgrade on the beta site\n\t\tsystem('wget http://stage.thelakshyafoundation.org/upgrade/');\n\t\t\n\t\t// Remove the temp. files\n\t\tsystem('rm lakshya.tar.gz');\n\t\tsystem('rm github.log');\n\t\tsystem('rm -rf beta_new');\n\t}","title":""},{"docid":"e7a61989b2067453290742a7bfc515fa","score":"0.47685304","text":"protected function build() {\n\t\t$this->durationTracker->start( 'build' );\n\n\t\t// Ensure that the directory doesn't already exist to prevent errors. If it does, remove it.\n\t\tif ( $this->filesystem->exists( $this->buildDirectory ) ) {\n\t\t\t$this->cleanup( $this->buildDirectory );\n\t\t}\n\n\t\t$this->cloneRepository( $this->repository->endpoint, $this->pluginBranch, $this->buildDirectory );\n\t\t$this->installDependencies();\n\t\t$this->createZip( $this->zipName );\n\t\t$this->cleanup( $this->buildDirectory );\n\n\t\t$this->openDir( 'zips' );\n\n\t\t$event = $this->durationTracker->stop( 'build' );\n\t\t$this->successMessage( 'Build complete.', $event );\n\n\t\t$this->durationTracker->saveTotalDuration( $event );\n\t}","title":""},{"docid":"51ca2d5f3f7af0a220d34a9e6ccde181","score":"0.47669557","text":"public function build() {\n parent::build();\n $this->add_step(new rollover_restore_clean_log_step('clean_log'));\n }","title":""},{"docid":"423d7437a5f215f45ddf53b59f8be870","score":"0.47650442","text":"public function git_push() {\n // initialize the git object\n $git = self::get_git_obj();\n $git->clean(false, true);\n // check if gitcreds are set\n $this->options = get_option('gitdown_settings');\n if ( !isset($this->options['github_username'], $this->options['github_password'], $this->options['github_repo'] ) ) {\n // if they're aren't, give up and let user know\n return('Set your credentials');\n } else {\n // get git repo url with creds\n $git_repo = self::get_repo_url();\n // run git push\n $msg = $git->push($git_repo, 'master');\n return('Git push successful. ' . $msg);\n }\n }","title":""},{"docid":"6bce5470848bc536837af5ce7e1cb2f4","score":"0.47618407","text":"public function absorb($force = false)\n {\n if ($force) {\n $this->cache->flush();\n }\n\n $this->absorbVersion();\n\n $this->absorbBuild();\n\n return true;\n }","title":""},{"docid":"1c3ead5bfbcae506a5b7a788c3db0664","score":"0.4758704","text":"protected function createGitIgnore()\n {\n if (!is_file($path = $this->projectDir.'/.gitignore')) {\n try {\n $client = $this->getGuzzleClient();\n\n $response = $client->get(sprintf(\n 'https://raw.githubusercontent.com/symfony/symfony-standard/v%s/.gitignore',\n $this->getInstalledSymfonyVersion()\n ));\n\n $this->fs->dumpFile($path, $response->getBody()->getContents());\n } catch (\\Exception $e) {\n // don't throw an exception in case the .gitignore file cannot be created,\n // because this is just an enhancement, not something mandatory for the project\n }\n }\n\n return $this;\n }","title":""},{"docid":"8e97c82f94dd25098bae2597abcb31cb","score":"0.47413465","text":"function main(){\n $configFile = getcwd() . \"/.gh-backup\";\n if(!file_exists($configFile)){\n $configFile = getenv(\"HOME\") . \"/.gh-backup\";\n if(!file_exists($configFile)){\n echoErr(\"Couldn't locate a github backup configuration file\");\n exit(1);\n }\n }\n $configData = parseConfig($configFile);\n\n //Build up a list of repos to backup\n $credentials = array(\n $configData['username'],\n $configData['token']\n );\n $repoList = array();\n $repoList = array_merge(\n $repoList,\n myRepoList($credentials),\n orgsRepoList($credentials)\n );\n if(isset($configData['filter'])){\n $filter = $configData['filter'];\n foreach($repoList as $index => $repo){\n if(preg_match($filter, $repo) == 0){\n unset($repoList[$index]);\n }\n }\n }\n $repoList = array_unique($repoList);\n $repoList = array_values($repoList); # Re-index\n\n $instanceBackupDir = $configData['directory'] . \"/\" . date('Y-m-d');\n exec(\"mkdir -p {$instanceBackupDir}\");\n chdir($instanceBackupDir);\n foreach($repoList as $repoUrl){\n preg_match('/:(.*)\\//', $repoUrl, $matches);\n $entity = $matches[1]; # User or Org\n exec(\"mkdir -p {$entity}\");\n chdir($entity);\n exec(\"git clone --mirror {$repoUrl}\");\n chdir(\"../\");\n }\n}","title":""},{"docid":"8b59f28fdad5e2fd8af2dbfa062242ea","score":"0.4728857","text":"private function gitWrapperScript($key_file_path)\n {\n return <<repository->getCommit($this->payload->getHeadCommit()->getId());\n }","title":""},{"docid":"c135c1702d46a35653f3dba95638ab0b","score":"0.46913534","text":"public function testGitBranch()\n {\n }","title":""},{"docid":"a9af9635d1ef30b922e8d7445581c8eb","score":"0.46680832","text":"public function initialize()\n {\n if (!GitRepo::isRemoteUrlReadable($this->repoUrl)) {\n throw new GitException('The repo url '.$this->repoUrl.' is not readable');\n }\n if (!is_dir($this->fullRepoPath)) {\n try {\n $this->repo = GitRepo::cloneRepository($this->repoUrl, $this->fullRepoPath);\n $this->logger->info('Repo cloned ('.$this->repoUrl.')');\n } catch (GitException $e) {\n $this->logger->error('Repo clone failed ('.$this->repoUrl.')');\n throw $e;\n }\n } else {\n $this->repo = new GitRepo($this->fullRepoPath);\n }\n $this->handleRepoStatusChange();\n }","title":""},{"docid":"b27d054452c11ebc22dab584ca619c8e","score":"0.46651438","text":"protected function doGitOperation($remote)\n\t{\n\t\t// For now, we will just completely remove the source directory\n\t\t// and create it again. Later, we can probably optimize this\n\t\t// to just perform a git rebase or pull, but it works now.\n\t\t$this->file->deleteDirectory($this->paths->source);\n\n\t\t// Create the git command.\n\t\t$gitOperation = strtr(config('git.clone'), [\n\t\t\t'@version@' => $remote,\n\t\t\t'@source@' => $this->paths->source\n\t\t]);\n\n\t\t$this->info(\"Cloning using '{$gitOperation}'\");\n\t\t$this->run($gitOperation);\n\t}","title":""},{"docid":"3fc0f797a77760902fa1e4c971cd21a9","score":"0.4664693","text":"public function testRunGitConnectionTest()\n {\n }","title":""},{"docid":"f5e66e24e17c5cd6f747f522ae3fd30e","score":"0.465781","text":"static function filterGitURL($url) {\n\t\t//regular expressions to turn invalid git URLs with usernames into valid URLs that can be checked out\n\t\t// without a password prompt appearing (which would block the script)\n\t\t$url = preg_replace('/(\\w+?\\@github\\.com\\:)(.*)/','git://github.com/$2',$url);\n\t\t$url = preg_replace('/(.*?\\/\\/)(\\w+\\@)(.*)/','$1$3',$url);\n\t\t$url = preg_replace('/(\\w+?\\@)(.*)/','git://$2',$url);\n\n\t\treturn $url;\n\t}","title":""},{"docid":"978fc25cbe41163c6f479e7c8b7104ee","score":"0.46527177","text":"public static function clearRepo() {\n $root = dirname(dirname(__DIR__)) . '';\n // Git sub folders.\n exec('find ' . $root . '/drush -name \\'.git\\' | xargs rm -rf');\n exec('find ' . $root . '/web/libraries -name \\'.git\\' | xargs rm -rf');\n exec('find ' . $root . '/web/modules -name \\'.git\\' | xargs rm -rf');\n exec('find ' . $root . '/web/profiles -name \\'.git\\' | xargs rm -rf');\n exec('find ' . $root . '/vendor -name \\'.git\\' | xargs rm -rf');\n\n // Examples and build folders.\n exec('rm -f example.gitignore .eslintignore > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"sample\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"samples\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"example\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"examples\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"doc\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"docs\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"tests\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"node_modules\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . '/web/libraries -type d -iname \"bower_components\" | xargs rm -rf > /dev/null 2>&1');\n\n // Single unnecessary file.\n exec('find ' . $root . ' -name \"*.*~\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \"*travis*\" | xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \"LICENSE*\"| xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \"CHANGELOG.*\"| xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \"MAINTAINERS.*\"| xargs rm -rf > /dev/null 2>&1');\n exec('find ' . $root . ' -iname \".DS_Store\"| xargs rm -rf > /dev/null 2>&1');\n }","title":""},{"docid":"8f68447cedbbe788ea276b6c8c55a15a","score":"0.46382535","text":"public function resetCommand($site_env_id, $commit, $commit_log)\n {\n // Determine tags\n $test_tags = shell_exec('git tag -l \"*test*\"');\n $test_tags_array = preg_split('/\\s+/', trim($test_tags));\n $last_test_tag = end($test_tags_array);\n $last_test_tag_breakdown = explode('_', $last_test_tag);\n $last_test_tag_number = (int) end($last_test_tag_breakdown);\n $new_tag_number_for_test = $last_test_tag_number + 1;\n\n $live_tags = shell_exec('git tag -l \"*live*\"');\n $live_tags_array = preg_split('/\\s+/', trim($live_tags));\n $last_live_tag = end($live_tags_array);\n $last_live_tag_breakdown = explode('_', $last_live_tag);\n $last_live_tag_number = (int) end($last_live_tag_breakdown);\n $new_tag_number_for_live = $last_live_tag_number + 1;\n \n $live_tag = \"pantheon_live_\" . $new_tag_number_for_live;\n $test_tag = \"pantheon_test_\" . $new_tag_number_for_test;\n\n // Get the site repo\n list($site, $env) = $this->getSiteEnv($site_env_id);\n $env_id = $env->getName();\n $siteInfo = $site->serialize();\n print_r($siteInfo);\n\n $site_id = $siteInfo['id'];\n $repo_path = \"ssh://codeserver.dev.$site_id@codeserver.dev.$site_id.drush.in:2222/~/repository.git\";\n\n // Restore DB from url.\n $clone_op = \"terminus env:clone-content \" . $siteInfo['name'] . \".demo \" . \" dev -y\";\n exec($clone_op);\n\n // Reset history back to the commit passed.\n $this->passthru('git reset --hard ' . $commit);\n\n // Rewrite this breaking commit to be recent.\n $this->passthru('GIT_COMMITTER_DATE=\"$(date)\" git commit --amend --no-edit --date \"$(date)\"');\n\n // Tag breaking commit for deploy to test/live\n $this->passthru('git tag ' . $live_tag);\n $this->passthru('git tag ' . $test_tag);\n \n // Get our commit log into an array.\n $commits = array_map('str_getcsv', file($commit_log));\n\n foreach ($commits as $commit) {\n $this->passthru('echo \"Adding ' . $commit[0] . '\" >> log.txt');\n $this->passthru('git add log.txt');\n $this->passthru('git commit -m \"' . $commit[0] . '\"');\n }\n\n // Force push changes to Pantheon.\n $this->passthru('git remote remove pantheon');\n $this->passthru('git remote add pantheon ' . $repo_path);\n $this->passthru('git push pantheon master --force --tags');\n\n\n\n }","title":""},{"docid":"e69206a7454d394c018f8cd2676c17c1","score":"0.463367","text":"public function restoreStashedBranch()\n {\n if (null === $this->stashedBranch) {\n return;\n }\n\n if (!$this->isWorkingTreeReady()) {\n throw new \\RuntimeException(\n sprintf(\n 'The Git working tree has uncommitted changes, unable to checkout your working branch \"%s\"'.\"\\n\".\n 'Please resolve this failure manually.',\n $this->stashedBranch\n )\n );\n }\n\n $this->checkout($this->stashedBranch);\n $this->stashedBranch = null;\n }","title":""},{"docid":"4e7e9a5b202ea8482f0c83883d305233","score":"0.4632594","text":"static function check_git_version() {\n $git = new GitRepo();\n $git_version = $git->run('--version');\n $git_version = substr($git_version, 11);\n if ( version_compare( $git_version, '1.7.5', '>=' ) ) {\n deactivate_plugins( __FILE__ );\n exit('You need to run at least git version 1.7.5. You are currently running version ' . $git_version);\n }\n }","title":""},{"docid":"319f448cbeb4e1a1eff71653971543b1","score":"0.46282798","text":"private function initRepository()\n {\n chdir($this->directory);\n $this->gitInit();\n $this->composerUpdate();\n $this->gitCommitUpdateDependecies();\n }","title":""},{"docid":"5be3898d2eaf91fe959030db4b63c9cd","score":"0.45846388","text":"public function toCommit(HasRemotes $git, string $hash): string;","title":""},{"docid":"624e66d927cac95bde19fecd3f77eb86","score":"0.45806456","text":"function drush_dgb_commit() {\n _dgb_set_required_settings();\n\n // Allow for custom commit message in case of manual backup.\n $message = drush_get_option('m', 'auto-commit changes for databases and files by dgb.');\n\n // Add DRUPAL_ROOT to git index.\n $exec = 'git add .';\n // Add database dumps directory to git index.\n $exec .= '; git add ' . drush_get_option('dgb-dumps');\n // If drushrc.php is located in the upper directory, include it in the commit.\n if (is_file('../drushrc.php')) {\n $exec .= '; git add ../drushrc.php';\n }\n // Commit command.\n $exec .= '; git commit -am \"' . $message . '\"';\n drush_op('system', $exec );\n\n // run git gc for maintenance.\n drush_op('system', 'git gc' );\n}","title":""},{"docid":"6c27421e3e408656d544c34da2291f42","score":"0.4574962","text":"public function testAutoMergeCurrent() {\n $upstream = $this->createUpstreamRepo();\n\n mkdir(\"{$this->fixturePath}/subdir\");\n ProcessUtil::runOk($this->command(\"\", \"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\"));\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\n $this->assertEquals(\"example text\", $downstream->readFile(\"example.txt\"));\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n $downstream->commitFile(\"example.txt\", \"some unrelated local changes\");\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n\n $commandTester = $this->createCommandTester(array(\n 'command' => 'automerge',\n '--path' => $this->fixturePath,\n '--keep' => 1,\n // Find the dir based on upstream remote.\n 'url' => array(\";/upstream;$patchFile\"),\n ));\n $this->assertStringContainsString(\n 'In \"subdir/downstream/\", keep the current branch \"master\"',\n $commandTester->getDisplay(FALSE));\n $this->assertStringContainsString(\n 'In \"subdir/downstream/\", apply',\n $commandTester->getDisplay(FALSE));\n $this->assertEquals(0, $commandTester->getStatusCode());\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n $this->assertRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n // Preserved local changes.\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n }","title":""},{"docid":"481886efe6de76c7520c5073bcfb8ae4","score":"0.4572453","text":"function checkout() { //$repo_url, $repo_sub_path, $current_rev) {\n $repo_url = $this->state->get_repository_root();\n $repo_sub_path = $this->state->get_repository_path();\n $current_rev = $this->state->get_revision();\n \n $src_path = $repo_url . $repo_sub_path;\n \n // figure out where to send our http REPORT request\n $bits = parse_url($repo_url . \"/!svn/vcc/default\");\n $repo_host = $bits['host'];\n $repo_port = @$bits['port']; if (!$repo_port) $repo_port = 80;\n $repo_path = $bits['path'];\n\n $this->out(\"Connecting to host $repo_host:$repo_port,
    sending HTTP REPORT $repo_path for src-path $src_path.\\n\");\n \n $xml = ''.$src_path.'';\n $xml_len = strlen($xml);\n \n $query = \"REPORT $repo_path HTTP/1.0\nHost: $repo_host\nContent-Type: text/xml\nContent-Length: $xml_len\nDepth: 0\n\n$xml\";\n\n $this->out($query);\n\n $sock = new Net_Socket();\n $this->check_err($sock->connect($repo_host, $repo_port, null, 60, null)); // 60 sec timeout\n \n $this->check_err($sock->write($query));\n\n // read response\n $this->out(\"Downloading patch ...\\n\");\n $this->fp = fopen($this->diff_fn, \"wt\");\n if (!$this->fp) throw new Subversion_Failure(\"can't open $this->diff_fn file\");\n $listeners = array($this);\n $this->received_bytes = 0;\n $resp = new HTTP_Response($sock, $listeners);\n $this->check_err($resp->process(false));\n fclose($this->fp);\n $this->out(\"\\nFinished downloading update ($this->received_bytes bytes).\\n\");\n }","title":""},{"docid":"dc3199188e65c5cf091eb09915a9110b","score":"0.45688823","text":"public function build()\n {\n $this->info('Starting build');\n $this->dirPrepare();\n $this->phpLint();\n $this->phpCodeStyle();\n $this->phpMessDetect();\n $this->phpTest();\n $this->docsPhpApi(['force' => true]);\n $this->info('build complete');\n }","title":""},{"docid":"314764cdb34d972d62dee60a47389c72","score":"0.45681307","text":"public function fire()\n\t{\n\t\t$github = new Client();\n\t\t$http = new \\Guzzle\\Http\\Client();\n\n\t\t$forceupdate = $this->argument(\"force\");\n\t\tforeach(\\Config::get(\"laravel.versions\") as $version){\n\n\t\t\t$this->info(\"Process branch $version\");\n\n\t\t\tif($forceupdate){\n\t\t\t\tDocs::version($version)->delete();\n\t\t\t\t$this->info(\"force clear database!\");\n\t\t\t}\n\n\t\t\t//$content = $this->githubTranslated->getFile($version, \"menu.md\");\n\t\t\t$this->line(\"Fetch documentation.md\");\n\t\t\t$content = $this->githubTranslated->getFile($version, \"documentation.md\");\n\t\t\t$lines = explode(\"\\n\", $content);\n\t\t\t$lines[] = \"[Menu](/docs/$version/documentation)\";\n\t\t\t$matches = array();\n\t\t\tforeach($lines as $line){\n\t\t\t\tpreg_match(\"/\\(\\/docs\\/(.*?)\\/(.*?)\\)/im\", $line, $matches);\n\t\t\t\tif(isset($matches[2])){\n\t\t\t\t\t$name = $matches[2];\n\t\t\t\t\t$filename = $name.\".md\";\n\t\t\t\t\t$this->line(\"\");\n\t\t\t\t\t$this->line(\"Fetch $filename ..\");\n\t\t\t\t\t//$last_commit_id = $this->githubTranslated->getLastCommitId($version, $filename);\n\t\t\t\t\t$this->line(\" get last translated commit\");\n\t\t\t\t\t$commit = $this->githubTranslated->getLastCommit($version, $filename);\n\n\t\t\t\t\tif( ! is_null($commit)) {\n\t\t\t\t\t\t$last_commit_id = $commit['sha'];\n\t\t\t\t\t\t$last_commit_at = Carbon::createFromTimestampUTC(strtotime($commit['commit']['committer']['date']));\n\t\t\t\t\t\t$this->line(\" get file\");\n\t\t\t\t\t\t$content = $this->githubTranslated->getFile($version, $filename, $last_commit_id);\n\t\t\t\t\t\tif(!is_null($content)) {\n\t\t\t\t\t\t\tpreg_match(\"/git (.*?)$/m\", $content, $matches);\n\t\t\t\t\t\t\t$last_original_commit_id = array_get($matches, '1');\n\t\t\t\t\t\t\t//if(!$last_original_commit) {\n\t\t\t\t\t\t\tif(!$last_original_commit_id AND $name != \"menu\") {\n\t\t\t\t\t\t\t\t$this->error(\"Not found git signature in $filename\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$this->line(\" get last translated original commit $last_original_commit_id\");\n\t\t\t\t\t\t\t\t$original_commit = $this->githubOriginal->getCommit($last_original_commit_id);\n\t\t\t\t\t\t\t\t$count_ahead = 0;\n\t\t\t\t\t\t\t\t$current_original_commit = \"\";\n\t\t\t\t\t\t\t\tif($original_commit) {\n\t\t\t\t\t\t\t\t\t$last_original_commit_at = Carbon::createFromTimestampUTC(strtotime($original_commit['commit']['committer']['date']));\n\n\t\t\t\t\t\t\t\t\t// Считаем сколько коммитов прошло с момента перевода\n\t\t\t\t\t\t\t\t\t$this->line(\" get current original commit\");\n\t\t\t\t\t\t\t\t\t$original_commits = $this->githubOriginal->getCommits($version, $filename, $last_original_commit_at);\n\t\t\t\t\t\t\t\t\t$count_ahead = count($original_commits)-1;\n\t\t\t\t\t\t\t\t\t$current_original_commit = $this->githubOriginal->getLastCommit($version, $filename);\n\t\t\t\t\t\t\t\t\t$current_original_commit_id = $current_original_commit['sha'];\n\n//\t\t\t\t\t\t\t\t\t$current_original_commit = $original_commits[0]['sha'];\n//\t\t\t\t\t\t\t\t\tforeach($original_commits as $c){\n//\t\t\t\t\t\t\t\t\t\tif($c['sha']!=$last_original_commit_id) $count_ahead++;\n//\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t$last_original_commit_at = null;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$content = preg_replace(\"/git(.*?)(\\n*?)---(\\n*?)/\", \"\", $content);\n\t\t\t\t\t\t\t\tpreg_match(\"/#(.*?)$/m\", $content, $matches);\n\t\t\t\t\t\t\t\t$title = trim(array_get($matches, '1'));\n\t\t\t\t\t\t\t\t$page = Docs::version($version)->name($name)->first();\n\t\t\t\t\t\t\t\tif($page) {\n\t\t\t\t\t\t\t\t\tif($last_commit_id != $page->last_commit) {\n\t\t\t\t\t\t\t\t\t\t$page->last_commit = $last_commit_id;\n\t\t\t\t\t\t\t\t\t\t$page->last_commit_at = $last_commit_at;\n\t\t\t\t\t\t\t\t\t\t$page->last_original_commit = $last_original_commit_id;\n\t\t\t\t\t\t\t\t\t\t$page->last_original_commit_at = $last_original_commit_at;\n\t\t\t\t\t\t\t\t\t\t$page->current_original_commit = $current_original_commit_id;\n\t\t\t\t\t\t\t\t\t\t$page->original_commits_ahead = $count_ahead;\n\t\t\t\t\t\t\t\t\t\t$page->title = $title;\n\t\t\t\t\t\t\t\t\t\t$page->text = $content;\n\t\t\t\t\t\t\t\t\t\t$page->save();\n\t\t\t\t\t\t\t\t\t\t$this->info(\"$version/$filename updated. Commit $last_commit_id. Last original commit $last_original_commit_id.\");\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\telse {\n\t\t\t\t\t\t\t\t\tDocs::create([\n\t\t\t\t\t\t\t\t\t\t\t'framework_version' => $version,\n\t\t\t\t\t\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t\t\t\t\t\t'title' => $title,\n\t\t\t\t\t\t\t\t\t\t\t'last_commit' => $last_commit_id,\n\t\t\t\t\t\t\t\t\t\t\t'last_commit_at' => $last_commit_at,\n\t\t\t\t\t\t\t\t\t\t\t'last_original_commit' => $last_original_commit_id,\n\t\t\t\t\t\t\t\t\t\t\t'last_original_commit_at' => $last_original_commit_at,\n\t\t\t\t\t\t\t\t\t\t\t'current_original_commit' => $current_original_commit_id,\n\t\t\t\t\t\t\t\t\t\t\t'original_commits_ahead' => $count_ahead,\n\t\t\t\t\t\t\t\t\t\t\t'text' => $content]);\n\t\t\t\t\t\t\t\t\t$this->info(\"$version/$filename created. Commit $last_commit_id. Last original commit $last_original_commit_id.\");\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}","title":""},{"docid":"c22d4a5b3f02b011df28f13ff054420d","score":"0.45660073","text":"public function pullOrInitialize() {\n\t\tif($this->localFolderIsGit()) {\n\t\t\t$this->pull();\n\t\t}\n\t\telse {\n\t\t\t$this->initialize();\n\t\t}\n\t}","title":""},{"docid":"e3814d5248fdce8593d3d836239c957d","score":"0.45645553","text":"public function doExt( $extRepo, $unusedKey, $branchName ) {\n\t\t// otherwise we'll get build/AntiBot/CategoryTree/.. instead of build/AntiBot, build/CategoryTree, ..\n\t\t$this->chdir( $this->buildDir );\n\t\techo \"... $extRepo\\n\";\n\t\t$url = str_replace( '{repository}', $extRepo, $this->conf->extRepoUrlFormat );\n\t\t$name = basename( $extRepo );\n\t\t$this->execCmd( 'git', 'clone', '-q', $url, '-b', 'master', $name );\n\t\t$this->chdir( $name );\n\n\t\t$out = $exitcode = null;\n\t\t// Check if the branch exists already\n\t\texec( 'git show-branch origin/' . escapeshellarg( $branchName ) . ' 2>&1', $out, $exitcode );\n\t\tif ( $exitcode == 0 ) {\n\t\t\techo \"Skipping $extRepo: Branch exists already\\n\";\n\t\t\treturn;\n\t\t}\n\t\t$commit = $this->execReadCmd( 'git', 'rev-list', '-n', '1', '--before', $this->opts->branchDate, 'master' );\n\t\tif ( !$commit ) {\n\t\t\techo \"Skipping $extRepo: Repo does not have a commit before the branch date\\n\";\n\t\t\treturn;\n\t\t}\n\t\tif ( $this->conf->verbose ) {\n\t\t\techo \"... $extRepo: Branching $branchName at $commit\\n\";\n\t\t}\n\t\t$this->execCmd( 'git', 'checkout', '-q', '-b', $branchName, $commit );\n\n\t\t# Intermediate commit & fixes\n\t\t$this->fixGitReview( $branchName );\n\t\t$this->execCmd( 'git', 'commit', '-a', '-q', '-m', \"Creating new {$branchName} branch\" );\n\n\t\t# Final push to repo for this extension/skin\n\t\t$this->execWriteCmd( 'git', 'push', 'origin', \"$branchName:refs/heads/$branchName\" );\n\t}","title":""},{"docid":"f83c01facd18c02bc374a5b4c424c5fa","score":"0.45599082","text":"public function testGit()\n {\n $descriptorspec = array(\n 1 => array('pipe', 'w'),\n 2 => array('pipe', 'w'),\n );\n $pipes = array();\n $resource = proc_open(GitApi::getBin(), $descriptorspec, $pipes);\n\n $stdout = stream_get_contents($pipes[1]);\n $stderr = stream_get_contents($pipes[2]);\n foreach ($pipes as $pipe) {\n fclose($pipe);\n }\n\n $status = trim(proc_close($resource));\n return ($status != 127);\n }","title":""},{"docid":"3dcab8f154b2fd965e80ee36a3b3bdd1","score":"0.45473325","text":"function git($command, &$output = null) {\n\texec('git '.$command, $output, $exitCode);\n\treturn $exitCode;\n}","title":""},{"docid":"dad23a60a6aed39298c30aa89abee13d","score":"0.45401362","text":"public function build(): void;","title":""},{"docid":"67d543c97c84fd76558c58266f62da7b","score":"0.45307738","text":"public function import_full( $p_repo ) {}","title":""},{"docid":"7098c83bebe20575dce2feffe4e9d90a","score":"0.45264924","text":"public function getGitUpdate(){\n $command = \"git fetch origin\";\n $returnVar = NULL;\n $output = NULL;\n exec($command, $output, $returnVar);\n\n $command = \"git diff master origin/master --name-only\";\n $returnVar = NULL;\n $output = NULL;\n exec($command, $output, $returnVar);\n return $output;\n }","title":""},{"docid":"d460727dd72a0739f91edf69b16a606a","score":"0.45254084","text":"public function build(): void\n {\n if ($this->config->isHotReload()) {\n $output = $this->config->getJson();\n $this->swagger->writeFile($output);\n }\n }","title":""},{"docid":"167de434da45c30a4a3b012204104c8b","score":"0.45140684","text":"public function set_needed_repos(): void {}","title":""},{"docid":"c25ff108845b9967a7a8245480bef5e8","score":"0.45129213","text":"protected function initGit() {\n // Init repo.\n $this->git = new \\derhasi\\RedmineToGit\\Git();\n // @todo: option to init repo.\n $this->git->setRepository($this->repoPath->string());\n\n // Validate repo, by checking status.\n try {\n $this->git->status();\n }\n // When there is a git excpetion we are likely to have no repo there.\n catch (\\PHPGit\\Exception\\GitException $e) {\n $this->currentOutput->writeln(\"{$this->repoPath->string()} is no valid git repo.\");\n return FALSE;\n }\n }","title":""},{"docid":"e1021d3be0ee79451812ff05bb89c0c7","score":"0.45063487","text":"public function downloadUpdate(){\n $command = \"git pull\";\n $returnVar = NULL;\n $output = NULL;\n exec($command, $output, $returnVar);\n }","title":""},{"docid":"277b30e64080eb88e99a4b422c8f41f1","score":"0.4502693","text":"function checkout() {\n\t\t//\n\t}","title":""},{"docid":"9cca4ce4fa7ecb3dece4cd57232625be","score":"0.44969106","text":"public function handle()\n {\n exec('bash '.app_path('../bin/git/status'), $result);\n\n if (empty($result) || !isset($result[1])) {\n Log::error('Update', 'Checking', 'Cannot get GIT status. Updating failed');\n return;\n }\n\n $this->clientRepository->insertOrUpdateClient([\n 'last_update_check' => date('Y-m-d H:i:s'),\n 'last_commit' => $this->getCurrentCommit(),\n ]);\n\n switch($result[1])\n {\n case 'up-to-date':\n // nothing to do\n break;\n case 'need-to-pull':\n $this->update();\n break;\n case 'diverged':\n case 'need-to-push':\n Log::error('Update', 'Checking', 'Impossible to update due to local changes or conflicts');\n break;\n default:\n Log::error('Update', 'Checking', 'Unknown GIT status. Updating failed!');\n return;\n\n }\n\n }","title":""},{"docid":"16d57a925acfcac11cbebff74de3877a","score":"0.44951326","text":"public function testRunHookWithUnstagedChanges(): void\n {\n $this->assertFalse(getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR));\n\n $config = $this->createConfigMock();\n $io = $this->createIOMock();\n $pluginConfig = $this->createPluginConfigMock();\n\n $unstagedChanges = 'foo bar baz';\n $patchFileConstraint = $this->matches(sys_get_temp_dir() . '/CaptainHook/patches/%d-%x.patch');\n\n $this->statusOperator->method('getWorkingTreeStatus')->willReturn([]);\n\n $this->indexOperator->expects($this->never())->method('removeFiles');\n $this->indexOperator->expects($this->never())->method('recordIntentToAddFiles');\n\n $this->diffOperator\n ->expects($this->once())\n ->method('getUnstagedPatch')\n ->willReturn($unstagedChanges);\n\n $this->filesystem\n ->expects($this->once())\n ->method('dumpFile')\n ->with($patchFileConstraint, $unstagedChanges);\n\n $this->statusOperator\n ->expects($this->once())\n ->method('restoreWorkingTree')\n ->will($this->returnCallback(function (): bool {\n if (getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR) != '1') {\n $this->fail(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR . ' did not have the correct value');\n }\n return true;\n }));\n\n $this->diffOperator\n ->expects($this->once())\n ->method('applyPatches')\n ->with($this->callback(function ($value) use ($patchFileConstraint): bool {\n $result = true;\n foreach ($value as $item) {\n $result = $result && $patchFileConstraint->evaluate($item, '', true);\n }\n return $result;\n }))\n ->willReturn(true);\n\n $hook = new class ($io, $config, $this->repo) extends Hook {\n protected $hook = Hooks::PRE_COMMIT;\n };\n\n $plugin = new PreserveWorkingTree($this->filesystem);\n $plugin->configure($config, $io, $this->repo, $pluginConfig);\n\n $plugin->beforeHook($hook);\n $plugin->afterHook($hook);\n\n // This should not be set after this test is finished.\n $this->assertFalse(getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR));\n }","title":""},{"docid":"5dbc322b904a4562a1063894175af728","score":"0.44888255","text":"protected function build(): void\n {\n\n }","title":""},{"docid":"c1fbc4def40e8ce95722254fba9b2038","score":"0.44881886","text":"function tryProcessUncommitedChanges(): void\n {\n }","title":""},{"docid":"f3222f3f0e399b35be32ebc073f30045","score":"0.4479133","text":"public function fromGit(string $url)\n {\n return $this->setRepositorySource('custom', $url);\n }","title":""},{"docid":"f8176190b0c21446fa0580c28e7ce856","score":"0.44770023","text":"protected function gitCall($_args)\n {\n return sprintf(\n '%s %s %s %s',\n static::ENCODING_ENV,\n static::GIT_BINARY,\n \"--git-dir={$this->root}/.git --work-tree={$this->root}\",\n implode(' ', func_get_args())\n );\n }","title":""},{"docid":"5fd62debb8fe71c7bb742b91adbee375","score":"0.44404185","text":"public function gotoGit(){\n\n\n return Socialite::driver('github')->redirect();\n }","title":""},{"docid":"4ad2e8cf3e7fff42bf4240ca5a00f71d","score":"0.44205353","text":"function upgrade_can_git_pull()\n{\n\tif ( SAFE_MODE === true )\n\t{\n\t\treturn false;\n\t}\n\n\t$base = PML_BASE;\n\n\t// Check if git is callable and if all files are not changed\n\t$a = exec( 'cd ' . escapeshellarg( $base ) . '; git status -s' , $lines , $code );\n\n\t// Error while executing this comand\n\tif ( $code !== 0 )\n\t{\n\t\treturn array( $code , $lines );\n\t}\n\n\t// Error, files have been modified\n\tif ( count( $lines ) !== 0 )\n\t{\n\t\treturn array( $code , $lines );\n\t}\n\n\t// can write all files with this webserver user ?\n\t$canwrite = true;\n\t$lines = array();\n\t$git = mb_strlen( realpath( $base ) ) + 1;\n\t$pmlfiles = new RecursiveIteratorIterator(\n\t\tnew RecursiveDirectoryIterator( $base ) ,\n\t\tRecursiveIteratorIterator::SELF_FIRST\n\t);\n\n\tforeach ( $pmlfiles as $f )\n\t{\n\n\t\t// Ignore all .git/* files\n\t\tif ( ( mb_substr( $f->getPathname() , $git , 4 ) ) === '.git' )\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\t// check if this file is writable\n\t\tif ( ! $f->isWritable() )\n\t\t{\n\n\t\t\t// check if it ignored or not\n\t\t\t$b = exec( \"git ls-files \" . escapeshellarg( $f->getPathname() ) );\n\t\t\tif ( ! empty( $b ) )\n\t\t\t{\n\t\t\t\t$canwrite = false;\n\t\t\t\t$lines[] = $f->getPathname();\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( $canwrite === false )\n\t{\n\t\treturn array( 2706 , $lines );\n\t}\n\n\treturn true;\n}","title":""},{"docid":"ba18157c0f76dce7e2a0c71e51a64ec0","score":"0.44124347","text":"protected function updateGitRepo() {\n\n $this->currentOutput->writeln(\"Committing changes ...\");\n\n $changes = FALSE;\n\n // @todo: option to stash current repo changes?\n foreach ($this->wikiVersions as $version) {\n\n // Perform any changes in the filesystem for the given version.\n $this->updateFilesForVersion($version);\n\n // Only really commit if there are changes to commit.\n if ($this->git->hasStagedChanges()) {\n $changes++;\n\n // Build commit message.\n if ($version->version == 1) {\n $message = \"Created page {$version->title} by {$version->author->name}\";\n }\n else {\n $message = \"Updated page {$version->title} by {$version->author->name}\";\n }\n\n $commit_message = \"{$this->project->project}: $message\";\n $commit_message .= \"\\n Date: {$version->updated_on}\";\n\n // If the version got some comments, we add that to the commit message.\n if (!empty($version->comments)) {\n $commit_message .= \"\\n Message: {$version->comments}\";\n }\n\n $this->git->commit($commit_message, array(\n 'author' => $version->author->getGitAuthorName(),\n 'date' => $version->updated_on,\n ));\n\n // Write status.\n $this->currentOutput->writeln(\"$message\");\n }\n\n // @todo: handling comments?\n // @todo: handling documents?\n\n }\n\n if (empty($changes)) {\n $this->currentOutput->writeln(\"There were no changes to commit.\");\n }\n }","title":""},{"docid":"b86d826960c1d4ef3d76c844f498fc67","score":"0.43981454","text":"public function testCreateGitBranch()\n {\n }","title":""},{"docid":"975be872ac1cb24737f0e9067424695a","score":"0.43928447","text":"public function clear_build_ts() {\n\t\t$this->out('Clearing build timestamp.');\n\t\t$this->out();\n\t\tAssetConfig::clearBuildTimeStamp();\n\t}","title":""},{"docid":"98d1e27dbfad729dea8350586a621f89","score":"0.43761477","text":"public function handle()\n {\n if (!\\App::environment('local', 'staging', 'development', 'testing')) {\n $this->info('...Photon update forbidden');\n return false;\n }\n\n $this->info(\"...Checking license\");\n // check if license key exist\n $key = LicenseKeyHelper::checkLicenseKey();\n // ping home\n $validKey = LicenseKeyHelper::pingHome($key); \n // store license key if it does not exist\n if(!$key) \n LicenseKeyHelper::storeLiceseKey($validKey['body']['license_key']);\n\n $currentVersion = ComposerBump::getVersion();\n $this->info(\"...Installed version: \" . $currentVersion);\n $this->info(\"...Latest version: \" . $validKey['body']['newest_version']);\n \n if($validKey['body']['newest_version'] == $currentVersion) {\n $this->info(\"Photon instalation already up to date\");\n return false;\n }\n\n $directory = getcwd().'/tmp';\n\n // clear tmp folder\n $this->info(\"...Clearing old temporary files\");\n $this->clearTmpFolder($directory);\n\n $this->info(\"...Downloading and extracting update\");\n $this->download($zipFile = $this->makeFilename($directory))\n ->extract($zipFile, $directory)\n ->cleanUp($zipFile);\n\n $this->info(\"...Applying update\");\n $this->copyCoreBeFiles();\n $this->copyCoreFeFiles();\n\n // clear tmp folder\n $this->info(\"...Clearing temporary files\");\n $this->clearTmpFolder($directory);\n\n $this->info(\"...Updating composer\");\n $this->composerFileHelper->setVersion($validKey['body']['newest_version'])->save();\n\n $this->info(\"Photon CMS Updated\");\n }","title":""},{"docid":"0f4034a7e3a159e4fcab525fe6c86ebb","score":"0.43691802","text":"function build()\n {\n assert('Debug::checkState(\"Component\", DEBUG_STATE_BUILD)');\n assert('$id = $this->getObjectId()');\n assert('$class = get_class($this)');\n assert('Debug::log(\"Component: building \\'$id\\', class \\'$class\\'\")');\n }","title":""},{"docid":"978df408211b4bd230b84aceec240cf6","score":"0.43640077","text":"function commitEditedMedia($full_filepath) {\n if (\n isset($_POST) && \n isset($_POST['action']) && \n $_POST['action'] !== 'image-editor'\n ) return $full_filepath;\n\n // bail out if this is an intermediate image size. \n // gatsby creates our image sizes so we only commit full size images to the repo.\n if (\n !preg_match(\n '/^(?!.*-\\d{2,4}x\\d{2,4}).*\\.(jpg|png|bmp|gif|ico)$/', $full_filepath\n )\n ) return $full_filepath;\n\n // bail if the file doesn't exist. It should, but just in case.\n if (!file_exists($full_filepath)) {\n jp_notices_add_error(\"There was an error saving your image. Please try again.\");\n return $full_filepath;\n };\n\n\t$dirname = pathinfo( $full_filepath, PATHINFO_DIRNAME );\n\t$ext = pathinfo( $full_filepath, PATHINFO_EXTENSION );\n $filename = pathinfo( $full_filepath, PATHINFO_FILENAME );\n\n $repo_full_filepath = \"wordsby/\" . substr(\n $full_filepath, \n strpos($full_filepath, \"/uploads/\") + 1\n ); \n\n $repo_filename = pathinfo( $repo_full_filepath, PATHINFO_BASENAME );\n\t$repo_dirname = pathinfo( $repo_full_filepath, PATHINFO_DIRNAME );\n\n\n $client = getGitlabClient();\n if (!$client) return null; \n\n createMediaBranchIfItDoesntExist($client);\n \n global $mediaBranch;\n\n\n $media_exists = isFileInRepo(\n $client, $repo_dirname, $repo_filename, $mediaBranch\n );\n $action = $media_exists ? 'update' : 'create';\n\n $original_filename = preg_replace( \n '/-e([0-9]+)$/', '', $filename \n ) . \".$ext\";\n\n $repo_original_filepath = \"$repo_dirname/$original_filename\";\n \n $original_media_exists = isFileInRepo(\n $client, $repo_dirname, $original_filename, $mediaBranch\n );\n\n\n $site_url = get_site_url();\n $current_user = wp_get_current_user()->data;\n $username = $current_user->user_nicename;\n\n $commit_message = \"\n \\\"$filename\\\" edited (\\\"$repo_filename\\\") \n — by $username (from $site_url)\n \";\n\n $actions = array(\n array(\n 'action' => $action,\n 'file_path' => $repo_full_filepath,\n 'content' => base64_encode(file_get_contents($full_filepath)),\n 'encoding' => 'base64'\n )\n );\n\n // delete the original media file from the repo if \n // IMAGE_EDIT_OVERWRITE is true.\n if (\n defined( 'IMAGE_EDIT_OVERWRITE' ) && \n IMAGE_EDIT_OVERWRITE &&\n $original_media_exists\n ) {\n array_push($actions, array(\n 'action' => 'delete',\n 'file_path' => $repo_original_filepath,\n ));\n }\n\n $commit = $client->api('repositories')->createCommit(\n WORDLIFY_GITLAB_PROJECT_ID, \n array(\n 'branch' => $mediaBranch, \n 'commit_message' => $commit_message,\n 'actions' => $actions,\n 'author_email' => $username,\n 'author_name' => $current_user->user_email\n )\n );\n\n return $full_filepath;\n}","title":""},{"docid":"a1d44eb8ef5adf399244d1a2fb87ac2c","score":"0.43614262","text":"public function run()\n {\n //config from params, and if not params from environment config: git-rebase-defaults\n $deploymentGitData = $this->getConfig()->environmentConfig('git-rebase-defaults', array());\n $remote = $this->getParameter('remote', (array_key_exists('remote',$deploymentGitData)) ? $deploymentGitData['remote'] : 'origin');\n $branch = $this->getParameter('branch', (array_key_exists('branch',$deploymentGitData)) ? $deploymentGitData['branch'] : 'master');\n \n $result = true;\n\n //fetching\n $result = $this->runCommandRemote(\"git fetch $remote\", $output) && $result;\n if(!$result)\n {\n Console::output(\"fails fetch $remote ... \",0,0);\n return false;\n }\n\n //ensuring right branch is checked out\n $result = $this->runCommandRemote(\"git checkout $branch\") && $result;\n if(!$result)\n {\n Console::output(\"fails $branch checkout ... \",0,0);\n return false;\n }\n\n //testing for local modifications just to be sure\n $status = '';\n $result = $this->runCommandRemote('git status --porcelain', $status) && $result;\n $clean = (empty($status)) ? true : false;\n $stashed = false;\n if(!$clean)\n {\n //hacemos un stash\n $result = $this->runCommandRemote(\"git stash\", $output) && $result;\n if($output != \"No local changes to save\"){\n Console::output(\"stash ... \",0,0);\n $stashed = true;\n }\n }\n\n //rebasing\n $result = $this->runCommandRemote(\"git rebase $remote/$branch\", $output) && $result;\n if(!$result)\n {\n Console::output(\"fails rebase $remote/$branch ... \",0,0);\n }\n\n if($stashed)\n {\n //local modifications before rebase being popped from stash\n $result = $this->runCommandRemote(\"git stash pop\", $output) && $result;\n Console::output(\"stash pop ... \",0,0);\n }\n\n return $result;\n }","title":""},{"docid":"0e7613a2365edd19550df4d7f36e335c","score":"0.4358847","text":"public function testAutoMergeRebuild() {\n $upstream = $this->createUpstreamRepo();\n\n mkdir(\"{$this->fixturePath}/subdir\");\n ProcessUtil::runOk($this->command(\"\", \"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\"));\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\n $this->assertEquals(\"example text\", $downstream->readFile(\"example.txt\"));\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\n\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n $downstream->commitFile(\"example.txt\", \"some unrelated local changes\");\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n\n // Run it the first time\n\n $commandTester = $this->createCommandTester(array(\n 'command' => 'automerge',\n '--path' => $this->fixturePath,\n '--rebuild' => 1,\n // Find the dir based on upstream remote.\n 'url' => array(\";/upstream;$patchFile\"),\n ));\n $this->assertStringContainsString(\n 'In \"subdir/downstream/\", rename \"master\" to \"backup-master-',\n $commandTester->getDisplay(FALSE));\n $this->assertStringContainsString(\n 'In \"subdir/downstream/\", apply',\n $commandTester->getDisplay(FALSE));\n $this->assertEquals(0, $commandTester->getStatusCode());\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n $this->assertRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n // Rebuilt from upstream. Local changes were lost.\n $this->assertNotRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n }","title":""},{"docid":"5caa80984ed29459407f3a185052f385","score":"0.43482804","text":"public function testFindGitBranch()\n {\n }","title":""},{"docid":"2e19560ca8335d147bfd0f469263317c","score":"0.43432114","text":"protected function update()\n {\n exec('git checkout .');\n exec('git clean -fd');\n\n // Pull new version\n exec('git pull origin master');\n\n exec('composer install --no-interaction');\n\n $this->clientRepository->insertOrUpdateClient([\n 'last_commit' => $this->getCurrentCommit(),\n 'last_update_code' => date('Y-m-d H:i:s')\n ]);\n\n Artisan::call('cache:clear');\n }","title":""},{"docid":"ead04577e7a8073aa13cd0f593c8552c","score":"0.43213633","text":"protected function _clearBuilds($ext) {\n\t\t$targets = $this->_Config->targets($ext);\n\t\tif (empty($targets)) {\n\t\t\t$this->err('No ' . $ext . ' build files defined, skipping');\n\t\t\treturn;\n\t\t}\n\t\t$path = $this->_Config->cachePath($ext);\n\t\tif (!file_exists($path)) {\n\t\t\t$this->err('Build directory ' . $path . ' for ' . $ext . ' does not exist.');\n\t\t\treturn;\n\t\t}\n\t\t$dir = new DirectoryIterator($path);\n\t\tforeach ($dir as $file) {\n\t\t\t$name = $file->getFilename();\n\t\t\tif (in_array($name, array('.', '..'))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// no timestamp\n\t\t\tif (in_array($name, $targets)) {\n\t\t\t\t$this->out(' - Deleting ' . $path . $name);\n\t\t\t\tunlink($path . $name);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (preg_match('/^.*\\.v\\d+\\.[a-z]+$/', $name)) {\n\t\t\t\tlist($base, $v, $ext) = explode('.', $name, 3);\n\t\t\t\tif (in_array($base . '.' . $ext, $targets)) {\n\t\t\t\t\t$this->out(' - Deleting ' . $path . $name);\n\t\t\t\t\tunlink($path . $name);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"e84608326828d270439e67e566935616","score":"0.4318278","text":"public function createAndCheckoutBranchFromHead($name) {\n list($err, $stdout, $stderr) = $this->api\n ->execManualLocal('checkout --track -b %s', $name);\n echo $stdout;\n if ($err) {\n throw new ArcanistUsageException($stderr);\n }\n }","title":""},{"docid":"0dc1ad5a1acb2199119dc1e9718b5d09","score":"0.42999792","text":"public function testAllGitBranches()\n {\n }","title":""},{"docid":"114253361c539c2037dd12585ea1f9c0","score":"0.42952728","text":"public static function clone()\n {\n \t$bowerDir = 'vendor' . DIRECTORY_SEPARATOR . self::$sourceBower;\n\n $bowerYiiDir = 'vendor' . DIRECTORY_SEPARATOR . self::$bowerVendor;\n\n \ttry {\n \t\t\n \t\tself::deleteDir($bowerYiiDir);\n\n \tself::copyDir($bowerDir, $bowerYiiDir);\n\n \techo \"Clone bower process done\\n\";\n\n \t} catch (Exception $e) {\n \t\t\n \t\techo \"Error on clone bower process\\n\";\n \t}\n }","title":""},{"docid":"168aa960e3d2771047b18d6af392c9f0","score":"0.4286561","text":"public function finish_build($colony)\n\t{\n\t\t\n\t}","title":""},{"docid":"d2e51fd25316c0804dcf6691274e9ff8","score":"0.4285112","text":"public function checkoutBranch($name) {\n // Regular checkout\n list($err, $stdout, $stderr) = $this->api\n ->execManualLocal('checkout %s', $name);\n echo $stdout;\n if ($err) {\n throw new ArcanistUsageException($stderr);\n }\n }","title":""},{"docid":"04fdb2652ce0a19b5369aeb434ca8a7b","score":"0.42848378","text":"public function handle()\n {\n $this->createFreshDirectory();\n\n // Non-existent repo\n $this->createFreshDirectory('does_not_exist');\n\n // Empty repo\n $this->createFreshDirectory('empty');\n $this->initialiseGitRepository('empty');\n\n // Single commit repo\n $this->createFreshDirectory('single_commit');\n $this->initialiseGitRepository('single_commit');\n $this->writeTextToFile('stageAll('single_commit');\n $this->commit('single_commit', 'initial commit');\n }","title":""},{"docid":"238260cc3e34743bb88092582e30138f","score":"0.42837128","text":"public function compileRepository() \n\t{\n\n\t}","title":""},{"docid":"2dd627ef4443b3d163b56dfc768cef9d","score":"0.42770082","text":"public function grabRepository($mixed) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('grabRepository', func_get_args()));\n }","title":""},{"docid":"7ae393c7c5d2bcd8d3d17997ada2a51b","score":"0.42749888","text":"public function git_push_callback() {\n $msg = $this->git_push();\n die($msg);\n }","title":""},{"docid":"7c6c3dc46a4f8aad87fb50168b2c331e","score":"0.42742285","text":"static public function maybe_run() {\n\t\t// Make sure the user is logged in.\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Don't update for dev copies.\n\t\tif ( FL_BUILDER_VERSION == '{FL_BUILDER_VERSION}' ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the saved version.\n\t\t$saved_version = get_site_option( '_fl_builder_version' );\n\n\t\t// No saved version number. This must be a fresh install.\n\t\tif ( ! $saved_version ) {\n\t\t\tupdate_site_option( '_fl_builder_version', FL_BUILDER_VERSION );\n\t\t\treturn;\n\t\t} elseif ( ! version_compare( $saved_version, FL_BUILDER_VERSION, '=' ) ) {\n\n\t\t\tif ( is_multisite() ) {\n\t\t\t\tself::run_multisite( $saved_version );\n\t\t\t} else {\n\t\t\t\tself::run( $saved_version );\n\t\t\t}\n\n\t\t\tupdate_site_option( '_fl_builder_version', FL_BUILDER_VERSION );\n\n\t\t\tupdate_site_option( '_fl_builder_update_info', array(\n\t\t\t\t'from' => $saved_version,\n\t\t\t\t'to' => FL_BUILDER_VERSION,\n\t\t\t) );\n\t\t}\n\t}","title":""},{"docid":"e3ad0d94f3fc10c5f8da68924085626f","score":"0.4273377","text":"public function testAutoMergeCurrentConflict() {\n $upstream = $this->createUpstreamRepo();\n\n mkdir(\"{$this->fixturePath}/subdir\");\n ProcessUtil::runOk($this->command(\"\", \"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\"));\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\n $this->assertEquals(\"example text\", $downstream->readFile(\"example.txt\"));\n $this->assertEquals(\"master\", $downstream->getLocalBranch());\n\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\n\n $downstream->commitFile(\"example.txt\", \"some unrelated local changes\");\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\n\n // Introduce a conflict\n $downstream->commitFile(\"changelog.txt\", \"this is bad! it has conflict!\");\n\n try {\n $commandTester = $this->createCommandTester(array(\n 'command' => 'automerge',\n '--path' => $this->fixturePath,\n '--keep' => 1,\n // Find the dir based on upstream remote.\n 'url' => array(\";/upstream;$patchFile\"),\n ));\n $this->fail(\"Expected ProcessErrorException\");\n }\n catch (ProcessErrorException $e) {\n $this->assertTrue($e->getProcess()->getExitCode() > 0);\n $this->assertStringContainsString(\n 'patch failed',\n $e->getProcess()->getErrorOutput());\n }\n }","title":""},{"docid":"8f8bc819867f3264804db360d1511d92","score":"0.4268325","text":"public function composerUpdateHash()\n {\n $paths = $this->getPaths();\n $this->stopOnFail(true);\n $this->yell('composer:update-hash');\n $this->info('Updating Composer lock file');\n $this->taskExec('composer')\n ->dir($paths['root'])\n ->arg('update')\n ->option('lock')\n ->printed(true)\n ->run();\n $this->info('Composer lock file updated');\n }","title":""},{"docid":"7065b60a39df56bb20e09e1449b9b2f3","score":"0.4263203","text":"private function install_main_bakery_bakery()\n\t{\n\n\t}","title":""},{"docid":"90c642bad0041ed07d9a2a05ab1b3814","score":"0.42480212","text":"public function build() {\n if ($this->hasBeenExecuted) {\n throw new \\LogicException('Builders can only be used once.');\n }\n\n $this->hasBeenExecuted = TRUE;\n\n // Hello old faithful.\n if (!$this->importer) {\n $this->setImporter(new Importer());\n }\n\n $this->replayCommands();\n\n if (!$this->importer->getLogger()) {\n $this->doSetLogger(new NullLogger());\n }\n\n $this->importer->validate();\n\n // Since this is potentially a long running process, we need to make an\n // effort to clean up after ourselves.\n $importer = $this->importer;\n unset($this->importer, $this->commands, $this->clients);\n\n return $importer;\n }","title":""},{"docid":"03ea08e8f8c1546ef189c7d9456ef5e0","score":"0.42433223","text":"public function precommit() {}","title":""},{"docid":"15a63d9f9675e8c4d1005e6f86bae65c","score":"0.42422482","text":"public function testDeleteGitBranch()\n {\n }","title":""},{"docid":"93d1e234cae17400336ad1b9a11cc0f9","score":"0.42315206","text":"public function toArchive(HasRemotes $git, string $branch = 'master'): string;","title":""},{"docid":"54ee93675aa34bb5a530b42ca1e3ed82","score":"0.42096457","text":"public function bumpBuild()\n {\n $this->build += 1;\n $this->release = null;\n\n return $this;\n }","title":""},{"docid":"8a43949b515b303e4ac8850b0b0766c0","score":"0.42090386","text":"public function testRenameWithClashingGitRepository() {\n\t\t$sourcekettleConfig = ClassRegistry::init('Setting')->loadConfigSettings();\n\t\t$base = $sourcekettleConfig['SourceRepository']['base']['value'];\n\t\tmkdir(\"$base/not_at_all_private.git\");\n\t\t$before = $this->Project->findById(1);\n\t\ttry{\n\t\t\t$this->assertFalse($this->Project->rename(\"private\", 'not_at_all_private'));\n\t\t} catch (InvalidArgumentException $e) {\n\t\t\t$this->assertTrue(true, \"Caught expected exception\");\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertTrue(false, \"Caught unexpected exception\");\n\t\t}\n\t\t$after = $this->Project->findById(1);\n\t\t$this->assertEquals($before, $after);\n\t}","title":""},{"docid":"c304d06569af05d9d418a4b0b47313a5","score":"0.42048898","text":"private function _getDifferenceGit()\n {\n return [];\n }","title":""},{"docid":"5b0637c5a8b2f1a12a42466888780939","score":"0.42045978","text":"public function compile() {\n\t\t$this->start('Compiling to '. $this->host);\n\n\t\t// fix path\n\t\t$this->localProj\t= self::path($this->localProj);\n\t\t$this->remoteProj\t= rtrim($this->remoteProj, DIRECTORY_SEPARATOR);\n\t\t\n\t\t// Work from project\n\t\tif(isset($this->localProj) && is_dir($this->localProj))\n\t\t\tchdir($this->localProj);\n\t\t\n\t\t// documentation\n\t\tif(isset($this->localDoc))\n\t\t\t$this->start('Creating Documentation from ' . $this->localDoc)->makeDoc()->finish();\n\t\t\n\t\t// twig templates\n\t\tif(isset($this->localTpl))\n\t\t\t$this->start('Creating JS Templates from ' . $this->localTpl)->makeTpl()->finish();\n\t\t\n\t\t\n\t\t// static files\n\t\t$localStatic = self::path(sys_get_temp_dir()) . 'data' . time() . DIRECTORY_SEPARATOR;\n\t\t$this->wipe[] = $localStatic;\n\t\t\n\t\tforeach($this->remoteStatic as $type => $trash) {\n\t\t\tif(method_exists($this, $type)) {\n\t\t\t\t$this->tmp[ $type ] = $localStatic . $type . DIRECTORY_SEPARATOR;\n\t\t\t\tself::readyDir( $this->tmp[ $type ] );\n\n\t\t\t\t// process static files\n\t\t\t\t$this->start('Processing '. $type)->$type()->finish();\n\t\t\t\t\n\t\t\t} elseif(!empty($this->localStatic[ $type ])) {\n\t\t\t\t\t// just moved the folder\n\t\t\t\t\t$this->tmp[ $type ] = self::path(current ($this->localStatic[ $type ]));\n\t\t\t\t\t\n\t\t\t\t\t// remove if not there\n\t\t\t\t\tif(!file_exists($this->tmp[ $type ])) \n\t\t\t\t\t\tunset ($this->remoteStatic[ $type ]);\n\t\t\t}\n\t\t}\n\n\t\t// run through static files then upload them\n\t\t$this->start('Uploading Static')->uploadStatic()->finish();\n\n\t\t// upload project\n\t\t$cmd = [\n\t\t\t'pscp',\n\t\t\t'-p',\t\t\t\t\t\t\t\t\t// preserve attributes\n\t\t\t'-r',\t\t\t\t\t\t\t\t\t// copy recursively\n\t\t\t'-q',\t\t\t\t\t\t\t\t\t// silent\n\t\t\t//'-sftp',\t\t\t\t\t\t\t\t// for use of SFTP protocal\n\t\t\t'-batch',\t\t\t\t\t\t\t\t// non interactive\n\t\t\t'-C',\t\t\t\t\t\t\t\t\t// enable compression\n\t\t\t'-i', static::safeDir($this->ppk),\t\t\t\t\t\t// Private key file to access server\n\t\t];\n\t\t\n\t\t// Directory to upload\n\t\tforeach($this->localCopy as $name)\n\t\t\t$cmd[] = static::safeDir($this->localProj . $name);\n\t\t\n\t\t// host:path on server to save data\n\t\t$cmd[] = $this->host .':'. $this->remoteProj;\n\t\t\n\t\t$this->start('Uploading Project')->runLocal($cmd)->finish();\n\n\t\t// config\n\t\tif(!isset($this->s3) && !empty($this->remoteStatic)) {\n\t\t\t// reset file permissions\n\t\t\t$cmd = array();\n\t\t\tforeach($this->remoteStatic as $type => $path) {\n\t\t\t\t$cmd[] = 'chmod 774 -R '. $path;\n\t\t\t\t// $cmd[] = 'chown mo:www-data -R '. $path;\n\t\t\t}\n\t\t\t\n\t\t\t$this->start('Updating Server Enviroment')->runRemote( $cmd )->finish();\n\t\t}\n\n\t\t// clean up\n\t\t$this\t->start('Cleaning up');\n\t\t\tforeach($this->wipe as $dir)\n\t\t\t\tself::wipeDir($dir, true);\n\t\t$this\t->finish();\n\t\t\n\t\t// finally\n\t\t$this->finish();\n\t}","title":""},{"docid":"e0cac3172216dffabf61ef3eccbd7646","score":"0.42031255","text":"function svn_checkout($repos, $targetpath, $revision = NULL, $flags = false)\n{\n}","title":""}],"string":"[\n {\n \"docid\": \"cd7dbae20affffd816a6f6300e8c7efe\",\n \"score\": \"0.60403705\",\n \"text\": \"private function absorbVersion()\\n {\\n if (($type = $this->config->get('current.git_absorb')) === false) {\\n return;\\n }\\n\\n $version = $this->git->extractVersion(\\n $this->git->getVersionFromGit($type)\\n );\\n\\n $config = $this->config->getRoot();\\n\\n $config['current']['major'] = (int) $version[1][0];\\n\\n $config['current']['minor'] = (int) $version[2][0];\\n\\n $config['current']['patch'] = (int) $version[3][0];\\n\\n $this->config->update($config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16739cf40ff65f143487ab43ca2419d5\",\n \"score\": \"0.5715115\",\n \"text\": \"public function gitPull(): void\\n {\\n $this->git\\n ->changeDirectory()\\n ->fetch()\\n ->reset()\\n ->pull();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f169a95bac7060b73d539afffbfc6d37\",\n \"score\": \"0.5604104\",\n \"text\": \"public function execute() {\\r\\n try {\\r\\n if (!$this->has_base_directory()) {\\r\\n mkdir($this->_directory, 0777, true);\\r\\n }\\r\\n\\r\\n // Make sure we're in the right directory\\r\\n chdir($this->_directory);\\r\\n\\r\\n // only first run\\r\\n if (!is_dir('./.git')) {\\r\\n // The \\\".\\\" at the end specifies the current folder as the checkout folder!\\r\\n $this->exec_and_log('Cloning repo for the first time.', \\\"git clone '\\\" . $this->_url . \\\"' .\\\");\\r\\n }\\r\\n\\r\\n // normal run\\r\\n else {\\r\\n\\r\\n // 1. Move to master branch.\\r\\n $this->exec_and_log('Switching to master branch.', 'git checkout ' . $this->_branch);\\r\\n\\r\\n // 2. Update the local repository\\r\\n $this->exec_and_log('Pulling in changes.', 'git pull');\\r\\n\\r\\n // hidden feature: checkout special revision\\r\\n\\r\\n if (isset($_GET['hash']) && $this->is_sha1($_GET['hash'])) {\\r\\n $hash = $_GET['hash'];\\r\\n $this->exec_and_log('Checkout previous revision '. $hash.':', 'git checkout '. $hash);\\r\\n }\\r\\n }\\r\\n\\r\\n // Secure the .git directory\\r\\n $this->exec_and_log('Securing .git directory.', 'chmod -R og-rx .git');\\r\\n\\r\\n $this->log('PULL successful.');\\r\\n }\\r\\n catch (Exception $e) {\\r\\n $this->log($e, 'ERROR');\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4149cf8a5e6e4421081945ec6848698a\",\n \"score\": \"0.5454768\",\n \"text\": \"public function gitCheckout(string $ref): void\\n {\\n $this->git\\n ->changeDirectory()\\n ->fetch()\\n ->checkoutTag($ref);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d32caf03e108814e95c6510c48cfea40\",\n \"score\": \"0.5388621\",\n \"text\": \"public function main()\\n {\\n if (null === $this->getRepository()) {\\n throw new BuildException('\\\"repository\\\" is required parameter');\\n }\\n $remotes = trim($this->getRemote());\\n if (null === $remotes || '' === $remotes) {\\n throw new BuildException('\\\"remote\\\" is required parameter');\\n }\\n\\n $client = $this->getGitClient(false, $this->getRepository());\\n $command = $client->getCommand('merge');\\n $command\\n ->setOption('commit', $this->isCommit())\\n ->setOption('q', $this->isQuiet());\\n\\n if ($this->getMessage()) {\\n $command->setOption('message', $this->getMessage());\\n }\\n\\n if (!$this->isCommit()) {\\n $command->setOption('no-commit', $this->isNoCommit());\\n }\\n\\n if ($this->isFastForwardCommit()) {\\n $command->setOption('no-ff', true);\\n }\\n\\n $strategy = $this->getStrategy();\\n if ($strategy) {\\n // check if strategy is valid\\n if (false === in_array($strategy, $this->validStrategies)) {\\n throw new BuildException(\\n \\\"Could not find merge strategy '\\\" . $strategy . \\\"'\\\\n\\\" .\\n \\\"Available strategies are: \\\" . implode(', ', $this->validStrategies));\\n }\\n $command->setOption('strategy', $strategy);\\n if ($this->getStrategyOption()) {\\n $command->setOption(\\n 'strategy-option',\\n $this->getStrategyOption()\\n );\\n }\\n }\\n\\n $remotes = explode(' ', $this->getRemote());\\n foreach ($remotes as $remote) {\\n $command->addArgument($remote);\\n }\\n\\n $this->log('git-merge command: ' . $command->createCommandString(), Project::MSG_INFO);\\n\\n try {\\n $output = $command->execute();\\n } catch (Exception $e) {\\n throw new BuildException('Task execution failed.', $e);\\n }\\n\\n $this->log(\\n sprintf('git-merge: replaying \\\"%s\\\" commits', $this->getRemote()),\\n Project::MSG_INFO\\n );\\n $this->log('git-merge output: ' . trim($output), Project::MSG_INFO);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d78f3b64373f7972e85c92d61f3d5e4d\",\n \"score\": \"0.53662103\",\n \"text\": \"public function doGitFetch()\\n {\\n $stack = $this->getOption('stack');\\n if ($stack) {\\n $relativeUrl = sprintf('project/%s/git/fetches', $stack);\\n $response = $this->fetchUrl($relativeUrl, 'POST');\\n } else {\\n throw new \\\\Exception('[Action:GitFetch] Requires Stack', 1);\\n }\\n\\n if ($response['status'] !== 202) {\\n throw new \\\\Exception('[Error:GitFetch] ' . var_export($response,1), 1);\\n }\\n\\n $relativeUrl = sprintf(\\n 'project/%s/git/fetches/%s',\\n $stack,\\n $response['body']['data']['id']\\n );\\n\\n $timer = 0;\\n $sleep = 5;\\n $isWaiting = true;\\n do {\\n $timer += $sleep;\\n if ($timer > self::GIT_TIMEOUT) {\\n $isWaiting = false;\\n throw new \\\\Exception('[Error:GitFetch] ' . self::GIT_TIMEOUT . 'seconds timeout', 1);\\n }\\n\\n $this->warning('Waiting for 5 seconds...');\\n sleep($sleep);\\n\\n $response = $this->fetchUrl($relativeUrl);\\n if ($response['status'] === 200\\n && $response['body']['data']['attributes']['status'] === 'Complete'\\n ) {\\n $this->success('Git Fetch Completed');\\n $isWaiting = false;\\n }\\n } while ($isWaiting);\\n\\n return $response;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"629ce2299256a22ad11fab8f1893d38f\",\n \"score\": \"0.5146541\",\n \"text\": \"public static function integrate(Event $event): void\\n {\\n $filesystem = new Filesystem();\\n\\n $composerBinDir = $event->getComposer()->getConfig()->get('bin-dir');\\n $executable = dirname(__DIR__, 2).$filesystem->ensureValidSlashes('/bin/grumphp');\\n $composerExecutable = $composerBinDir.'/grumphp';\\n $filesystem->copy(\\n $filesystem->ensureValidSlashes($executable),\\n $filesystem->ensureValidSlashes($composerExecutable)\\n );\\n\\n $commandlineArgs = ProcessArgumentsCollection::forExecutable($composerExecutable);\\n $commandlineArgs->add('git:init');\\n $process = self::fixInternalComposerProcessVersion($commandlineArgs);\\n\\n $process->run();\\n if (!$process->isSuccessful()) {\\n $event->getIO()->write(\\n 'GrumPHP can not sniff your commits. Did you specify the correct git-dir?'\\n );\\n $event->getIO()->write(''.$process->getErrorOutput().'');\\n\\n return;\\n }\\n\\n $event->getIO()->write(''.$process->getOutput().'');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e37211899f259745f58e277d708f3a2d\",\n \"score\": \"0.51256263\",\n \"text\": \"public function pull() {\\n\\t\\tif(!is_dir(Enviro::mergePath($this->localPath, '.git'))) {\\n\\t\\t\\tthrow new Exception(\\\"The folder '{$this->localPath}' is not a git repository.\\\");\\n\\t\\t}\\n\\t\\t$prevDir = getcwd();\\n\\t\\tchdir($this->localPath);\\n\\t\\ttry {\\n\\t\\t\\tEnviro::write(\\\"Updading local repository {$this->owner}/{$this->repository}... \\\");\\n\\t\\t\\tEnviro::run('git', \\\"checkout {$this->branch}\\\");\\n\\t\\t\\tEnviro::run('git', \\\"fetch origin\\\");\\n\\t\\t\\tEnviro::run('git', \\\"reset --hard origin/{$this->branch}\\\");\\n\\t\\t\\tEnviro::run('git', \\\"clean -f -d\\\");\\n\\t\\t\\tEnviro::write(\\\"done.\\\\n\\\");\\n\\t\\t}\\n\\t\\tcatch(Exception $x) {\\n\\t\\t\\tchdir($prevDir);\\n\\t\\t\\tthrow $x;\\n\\t\\t}\\n\\t\\tchdir($prevDir);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e84b67f04d6e26bc63c9196e8fdc583\",\n \"score\": \"0.5105907\",\n \"text\": \"public static function prepareForPantheon()\\n {\\n // Get rid of any .git directories that Composer may have added.\\n // n.b. Ideally, there are none of these, as removing them may\\n // impair Composer's ability to update them later. However, leaving\\n // them in place prevents us from pushing to Pantheon.\\n $dirsToDelete = [];\\n $finder = new Finder();\\n foreach (\\n $finder\\n ->directories()\\n ->in(getcwd())\\n ->ignoreDotFiles(false)\\n ->ignoreVCS(false)\\n ->depth('> 0')\\n ->name('.git')\\n as $dir) {\\n $dirsToDelete[] = $dir;\\n }\\n $fs = new Filesystem();\\n $fs->remove($dirsToDelete);\\n\\n // Fix up .gitignore: remove everything above the \\\"::: cut :::\\\" line\\n $gitignoreFile = getcwd() . '/.gitignore';\\n $gitignoreContents = file_get_contents($gitignoreFile);\\n $gitignoreContents = preg_replace('/.*::: cut :::*/s', '', $gitignoreContents);\\n file_put_contents($gitignoreFile, $gitignoreContents);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b201fee8abc01c33c36c2035dc57ad76\",\n \"score\": \"0.50694793\",\n \"text\": \"public function actionForceUploadBuilds()\\n {\\n $developmentAction = new DevelopmentAction(DevelopmentAction::FORCEUPLOAD);\\n $developmentAction->performAction();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"401a0d322ecc103b942264eb2a235e7b\",\n \"score\": \"0.5014463\",\n \"text\": \"public function handle() {\\n $this->line(exec('git pull'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b9a0070a38ed2988c4ff669d98c8c2e\",\n \"score\": \"0.49999708\",\n \"text\": \"private function buildIfNecessary()\\n {\\n if (!$this->hasBeenBuilt) {\\n $this->build();\\n $this->hasBeenBuilt = true;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"28c9823f3e3766f6df52006afc7151b9\",\n \"score\": \"0.49289346\",\n \"text\": \"protected function postIntegrationCleanup() {\\n // Convert Git repo to non-Git controlled file directory. This is required\\n // to be able to commit the app files to Health project codebase.\\n $git_related_files_folders = [\\n '.git',\\n '.gitignore',\\n ];\\n $this\\n ->consoleIO\\n ->write(\\\"Checking if project uses Git... \\\");\\n foreach ($git_related_files_folders as $file) {\\n $git_file_path = $this->appPath . $file;\\n if (file_exists($git_file_path)) {\\n $command = 'cd ' . escapeshellcmd($this->appPath) . ' && rm -Rf ' . escapeshellcmd($git_file_path);\\n $this->executeCommand($command, \\\"Removing \\\" . $git_file_path);\\n }\\n }\\n $this\\n ->consoleIO\\n ->write(\\\"[DONE]\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12841ef31df4680d5184d28a288bb0c6\",\n \"score\": \"0.4897389\",\n \"text\": \"public function execute()\\n {\\n try{\\n if (is_callable($this->beforeDeploy)){\\n call_user_func($this->beforeDeploy);\\n }\\n\\n // Discard any changes to tracked files since our last deploy\\n $output = shell_exec('git reset --hard HEAD');\\n $this->log('Reseting repository... '.$output);\\n\\n // Update the local repository\\n $output = shell_exec('git pull origin master');\\n $this->log('Pulling in changes... '.$output);\\n\\n // Secure the .git directory\\n $output = shell_exec('chmod -R og-rx .git');\\n $this->log('Securing .git directory... '.$output);\\n\\n $this->log('Deployment successful!');\\n\\n if (is_callable($this->afterDeploy)){\\n call_user_func($this->afterDeploy);\\n }\\n }catch (\\\\Exception $e){\\n $this->log($e, 'ERROR');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2be8675e66f4c9031ff41ef43a83e4f\",\n \"score\": \"0.48899144\",\n \"text\": \"public function testUpdateGitBranch()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc5cb723d8bf65436bf38647a5f4d6af\",\n \"score\": \"0.48794106\",\n \"text\": \"function upgrade_is_git()\\n{\\n\\tif ( SAFE_MODE === true )\\n\\t{\\n\\t\\treturn false;\\n\\t}\\n\\n\\tif ( ! is_dir( PML_BASE . DIRECTORY_SEPARATOR . '.git' ) )\\n\\t{\\n\\t\\treturn false;\\n\\t}\\n\\n\\treturn true;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d80484613d9ef80ed7c7dbe71853829\",\n \"score\": \"0.4861493\",\n \"text\": \"protected function preBuild() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"050e9c01c2acdf4d3b89aa1b79bc9569\",\n \"score\": \"0.4845944\",\n \"text\": \"function update_fromgit($version_str, &$errmsg){\\n\\n global $config_ini;\\n $taglist = array();\\n $errorcnt = 0;\\n if(array_key_exists(\\\"gitcommandpath\\\", $config_ini)){\\n $gitcmd = urldecode($config_ini[\\\"gitcommandpath\\\"]);\\n if(file_exists($gitcmd)){\\n $execcmd = $gitcmd.' config --global core.autoCRLF false';\\n exec($execcmd);\\n \\n $execcmd = $gitcmd.' fetch origin';\\n set_time_limit (900);\\n exec($execcmd,$result_str);\\n foreach($result_str as $line){\\n $err_str_pos = mb_strpos($line, \\\"unable to access\\\");\\n if( $err_str_pos !== false ) {\\n $errmsg .= \\\"network access failed\\\";\\n $errorcnt ++;\\n }else if (mb_strstr($line, \\\"fatal\\\") !== false) {\\n $errmsg .= \\\"fetch unknown error: $line\\\";\\n $errorcnt ++;\\n }\\n }\\n if($errorcnt > 1){\\n return false;\\n }\\n\\n $execcmd = $gitcmd.' reset --hard '.$version_str;\\n exec($execcmd,$result_str);\\n foreach($result_str as $line){\\n $err_str_pos = mb_strpos($line, \\\"unknown revision\\\");\\n if( $err_str_pos !== false) {\\n $errmsg .= \\\"no version : $version_str\\\";\\n $errorcnt ++;\\n }else if (mb_strstr($line, \\\"fatal\\\") !== false) {\\n $errmsg .= \\\"reset --hard unknown error: $line\\\";\\n $errorcnt ++;\\n }\\n }\\n }\\n }\\n \\n if($errorcnt > 0) {\\n return false;\\n }\\n \\n return true;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"936dc324c49611492a1835a8cd65457d\",\n \"score\": \"0.48357284\",\n \"text\": \"public function handle(Git $git) {\\n $version = $this->getTagWithV($this->argument('version'));\\n $issues = $this->argument('issues');\\n\\n $this->info(\\\"Creating release branch for version {$version}.\\\");\\n\\n $this->info(\\\"Checking out dev branch.\\\");\\n $repo = $git->open(getcwd());\\n $repo->checkout('dev');\\n\\n $this->info(\\\"Pulling latest dev branch.\\\");\\n $repo->pull();\\n\\n $this->info(\\\"Creating release branch.\\\");\\n $issuesFormattedForBranch = str_replace(',', '-', $issues);\\n $branchName = \\\"release/{$version}-{$issuesFormattedForBranch}\\\";\\n try {\\n $this->runProcess(\\\"git checkout -b {$branchName}\\\");\\n } catch (\\\\Exception $e) {\\n if (str_contains($e->getMessage(), 'already exists')) {\\n $shouldDeleteIt = $this->confirm(\\\"Branch {$branchName} already exists. Should we delete it?\\\", true);\\n if ($shouldDeleteIt) {\\n $this->runProcess(\\\"git branch -D {$branchName}\\\");\\n $this->runProcess(\\\"git checkout -b {$branchName}\\\");\\n } else {\\n $this->error(\\\"Branch {$branchName} already exists. Please delete it or choose a different version.\\\");\\n return;\\n }\\n }\\n }\\n\\n $this->info(\\\"Pulling issue branches into release branch.\\\");\\n $issuesArray = explode(',', $issues);\\n $issueBranches = $this->findIssueBranches($issuesArray);\\n\\n $this->mergeBranches($issueBranches);\\n\\n $this->info(\\\"Pushing release branch to origin.\\\");\\n $this->runProcess(\\\"git push origin $branchName\\\");\\n\\n $this->info(\\\"Creating release PR.\\\");\\n $prBody = \\\"- #\\\" . implode(\\\"\\\\n- #\\\", $issuesArray) . \\\"\\\\n\\\";\\n // We don't run this in testing mode, because I don't feel like figuring out how to mock the gh command for now.\\n if (!app()->runningUnitTests()) {\\n try {\\n $this->runProcess(<<warn(\\\"Failed to create PR. Please create it manually.\\\");\\n }\\n }\\n\\n // Create and push a tag for the release\\n $this->info(\\\"Creating release tag.\\\");\\n // Remove any 'v' from the version number\\n $version = str_replace('v', '', $version);\\n $this->runProcess(\\\"git tag -a v{$version} -m 'Release {$version}'\\\");\\n $this->runProcess(\\\"git push origin v{$version}\\\");\\n\\n $this->info(\\\"Done.\\\");\\n $this->info(\\\"Branch: {$branchName}\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c77fa0a5055e8d01dbcf2fb48972c52\",\n \"score\": \"0.483529\",\n \"text\": \"public function precommit( ) {\\n\\t\\treturn;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94329ba83bc7b2cc0af357432fa29e5b\",\n \"score\": \"0.48231778\",\n \"text\": \"public function run()\\n {\\n \\t$branch = $this->getParameter('branch');\\n \\t$remote = $this->getParameter('remote');\\n\\n \\t// Fetch Remote\\n $command = 'git fetch ' . $remote;\\n $result = $this->runCommandRemote($command) && $result;\\n\\n // Checkout\\n $command = 'git checkout ' . $branch;\\n $result = $this->runCommandRemote($command) && $result;\\n\\n // Check Working Copy status\\n $stashed = false;\\n $status = '';\\n $command = 'git checkout ' . $branch;\\n $result = $this->runCommandRemote($command) && $result;\\n\\n // Stash if Working Copy is not clean\\n if(!$status) {\\n \\t$stashResult = '';\\n \\t$command = 'git stash';\\n \\t$result = $this->runCommandRemote($command, $stashResult) && $result;\\n \\tif($stashResult != \\\"No local changes to save\\\") {\\n $stashed = true;\\n }\\n }\\n\\n // Rebase\\n $command = 'git rebase ' . $remote . '/' . $branch;\\n $result = $this->runCommandRemote($command) && $result;\\n\\n // If Stashed, restore.\\n if ($stashed) {\\n \\t$command = 'git stash pop';\\n \\t$result = $this->runCommandRemote($command) && $result;\\n }\\n\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e930098112b35510d39117e24ff65ec\",\n \"score\": \"0.48197645\",\n \"text\": \"private function updateRepoInfo()\\n {\\n $wrapper = tempnam(storage_path() . '/app/', 'gitssh');\\n file_put_contents($wrapper, $this->gitWrapperScript($this->private_key));\\n\\n $workingdir = tempnam(storage_path() . '/app/', 'clone');\\n unlink($workingdir);\\n\\n $cmd = <<< CMD\\nchmod +x \\\"{$wrapper}\\\" && \\\\\\nexport GIT_SSH=\\\"{$wrapper}\\\" && \\\\\\ngit clone --quiet --branch %s --depth 1 %s {$workingdir} && \\\\\\ncd {$workingdir} && \\\\\\ngit checkout %s --quiet && \\\\\\ngit log --pretty=format:\\\"%%H%%x09%%an\\\" && \\\\\\nrm -rf {$workingdir}\\nCMD;\\n\\n //$this->outputToConsole('Checking repository state' . PHP_EOL);\\n $process = new Process(sprintf(\\n $cmd,\\n $this->deployment->project->branch,\\n $this->deployment->project->repository,\\n $this->deployment->project->branch\\n ));\\n\\n $process->setTimeout(null);\\n $process->run();\\n\\n unlink($wrapper);\\n\\n if (!$process->isSuccessful()) {\\n // FIXME: Handle this situation as it is then unclear what went wrong\\n throw new \\\\RuntimeException('Could not get repository info - ' . $process->getErrorOutput());\\n }\\n\\n $git_info = $process->getOutput();\\n\\n $parts = explode(\\\"\\\\x09\\\", $git_info);\\n $this->deployment->commit = $parts[0];\\n $this->deployment->committer = trim($parts[1]);\\n $this->deployment->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f94fb0dc614283beb82a40ba01bc14a0\",\n \"score\": \"0.47722572\",\n \"text\": \"function pull()\\n\\t{\\n\\t\\tif(!$this->_permit('admin')) { $this->_denied(); return; }\\n\\t\\n\\t\\t// Work outside the web root\\n\\t\\tchdir('../..');\\n\\t\\t\\n\\t\\t// download tar from github\\n\\t\\tsystem('wget --no-check-certificate -O lakshya.tar.gz -o github.log https://github.com/lakshya/website/tarball/master');\\n\\t\\t\\n\\t\\t// unzip into 'beta_new' folder\\n\\t\\tmkdir('beta_new');\\n\\t\\tsystem('tar -xzf lakshya.tar.gz -C beta_new');\\n\\t\\t\\n\\t\\t// copy database & logs from old ones\\n\\t\\tsystem('cp www/beta/application/config/database.php beta_new/lakshya-website-*/www/application/config/database.php');\\n\\t\\tsystem('cp www/beta/application/logs/* beta_new/lakshya-website-*/www/application/logs/');\\n\\t\\t\\n\\t\\t// Delete the old beta backup & create a new one\\n\\t\\tsystem('rm -rf beta_backup');\\n\\t\\tsystem('mv www/beta/ beta_backup/');\\n\\t\\t\\n\\t\\t// Move 'beta_new' to 'beta'\\n\\t\\tsystem('mv beta_new/lakshya-website-*/www/ www/beta/');\\n\\t\\t\\n\\t\\t// Call upgrade on the beta site\\n\\t\\tsystem('wget http://stage.thelakshyafoundation.org/upgrade/');\\n\\t\\t\\n\\t\\t// Remove the temp. files\\n\\t\\tsystem('rm lakshya.tar.gz');\\n\\t\\tsystem('rm github.log');\\n\\t\\tsystem('rm -rf beta_new');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7a61989b2067453290742a7bfc515fa\",\n \"score\": \"0.47685304\",\n \"text\": \"protected function build() {\\n\\t\\t$this->durationTracker->start( 'build' );\\n\\n\\t\\t// Ensure that the directory doesn't already exist to prevent errors. If it does, remove it.\\n\\t\\tif ( $this->filesystem->exists( $this->buildDirectory ) ) {\\n\\t\\t\\t$this->cleanup( $this->buildDirectory );\\n\\t\\t}\\n\\n\\t\\t$this->cloneRepository( $this->repository->endpoint, $this->pluginBranch, $this->buildDirectory );\\n\\t\\t$this->installDependencies();\\n\\t\\t$this->createZip( $this->zipName );\\n\\t\\t$this->cleanup( $this->buildDirectory );\\n\\n\\t\\t$this->openDir( 'zips' );\\n\\n\\t\\t$event = $this->durationTracker->stop( 'build' );\\n\\t\\t$this->successMessage( 'Build complete.', $event );\\n\\n\\t\\t$this->durationTracker->saveTotalDuration( $event );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51ca2d5f3f7af0a220d34a9e6ccde181\",\n \"score\": \"0.47669557\",\n \"text\": \"public function build() {\\n parent::build();\\n $this->add_step(new rollover_restore_clean_log_step('clean_log'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"423d7437a5f215f45ddf53b59f8be870\",\n \"score\": \"0.47650442\",\n \"text\": \"public function git_push() {\\n // initialize the git object\\n $git = self::get_git_obj();\\n $git->clean(false, true);\\n // check if gitcreds are set\\n $this->options = get_option('gitdown_settings');\\n if ( !isset($this->options['github_username'], $this->options['github_password'], $this->options['github_repo'] ) ) {\\n // if they're aren't, give up and let user know\\n return('Set your credentials');\\n } else {\\n // get git repo url with creds\\n $git_repo = self::get_repo_url();\\n // run git push\\n $msg = $git->push($git_repo, 'master');\\n return('Git push successful. ' . $msg);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bce5470848bc536837af5ce7e1cb2f4\",\n \"score\": \"0.47618407\",\n \"text\": \"public function absorb($force = false)\\n {\\n if ($force) {\\n $this->cache->flush();\\n }\\n\\n $this->absorbVersion();\\n\\n $this->absorbBuild();\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c3ead5bfbcae506a5b7a788c3db0664\",\n \"score\": \"0.4758704\",\n \"text\": \"protected function createGitIgnore()\\n {\\n if (!is_file($path = $this->projectDir.'/.gitignore')) {\\n try {\\n $client = $this->getGuzzleClient();\\n\\n $response = $client->get(sprintf(\\n 'https://raw.githubusercontent.com/symfony/symfony-standard/v%s/.gitignore',\\n $this->getInstalledSymfonyVersion()\\n ));\\n\\n $this->fs->dumpFile($path, $response->getBody()->getContents());\\n } catch (\\\\Exception $e) {\\n // don't throw an exception in case the .gitignore file cannot be created,\\n // because this is just an enhancement, not something mandatory for the project\\n }\\n }\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e97c82f94dd25098bae2597abcb31cb\",\n \"score\": \"0.47413465\",\n \"text\": \"function main(){\\n $configFile = getcwd() . \\\"/.gh-backup\\\";\\n if(!file_exists($configFile)){\\n $configFile = getenv(\\\"HOME\\\") . \\\"/.gh-backup\\\";\\n if(!file_exists($configFile)){\\n echoErr(\\\"Couldn't locate a github backup configuration file\\\");\\n exit(1);\\n }\\n }\\n $configData = parseConfig($configFile);\\n\\n //Build up a list of repos to backup\\n $credentials = array(\\n $configData['username'],\\n $configData['token']\\n );\\n $repoList = array();\\n $repoList = array_merge(\\n $repoList,\\n myRepoList($credentials),\\n orgsRepoList($credentials)\\n );\\n if(isset($configData['filter'])){\\n $filter = $configData['filter'];\\n foreach($repoList as $index => $repo){\\n if(preg_match($filter, $repo) == 0){\\n unset($repoList[$index]);\\n }\\n }\\n }\\n $repoList = array_unique($repoList);\\n $repoList = array_values($repoList); # Re-index\\n\\n $instanceBackupDir = $configData['directory'] . \\\"/\\\" . date('Y-m-d');\\n exec(\\\"mkdir -p {$instanceBackupDir}\\\");\\n chdir($instanceBackupDir);\\n foreach($repoList as $repoUrl){\\n preg_match('/:(.*)\\\\//', $repoUrl, $matches);\\n $entity = $matches[1]; # User or Org\\n exec(\\\"mkdir -p {$entity}\\\");\\n chdir($entity);\\n exec(\\\"git clone --mirror {$repoUrl}\\\");\\n chdir(\\\"../\\\");\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b59f28fdad5e2fd8af2dbfa062242ea\",\n \"score\": \"0.4728857\",\n \"text\": \"private function gitWrapperScript($key_file_path)\\n {\\n return <<repository->getCommit($this->payload->getHeadCommit()->getId());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c135c1702d46a35653f3dba95638ab0b\",\n \"score\": \"0.46913534\",\n \"text\": \"public function testGitBranch()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9af9635d1ef30b922e8d7445581c8eb\",\n \"score\": \"0.46680832\",\n \"text\": \"public function initialize()\\n {\\n if (!GitRepo::isRemoteUrlReadable($this->repoUrl)) {\\n throw new GitException('The repo url '.$this->repoUrl.' is not readable');\\n }\\n if (!is_dir($this->fullRepoPath)) {\\n try {\\n $this->repo = GitRepo::cloneRepository($this->repoUrl, $this->fullRepoPath);\\n $this->logger->info('Repo cloned ('.$this->repoUrl.')');\\n } catch (GitException $e) {\\n $this->logger->error('Repo clone failed ('.$this->repoUrl.')');\\n throw $e;\\n }\\n } else {\\n $this->repo = new GitRepo($this->fullRepoPath);\\n }\\n $this->handleRepoStatusChange();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b27d054452c11ebc22dab584ca619c8e\",\n \"score\": \"0.46651438\",\n \"text\": \"protected function doGitOperation($remote)\\n\\t{\\n\\t\\t// For now, we will just completely remove the source directory\\n\\t\\t// and create it again. Later, we can probably optimize this\\n\\t\\t// to just perform a git rebase or pull, but it works now.\\n\\t\\t$this->file->deleteDirectory($this->paths->source);\\n\\n\\t\\t// Create the git command.\\n\\t\\t$gitOperation = strtr(config('git.clone'), [\\n\\t\\t\\t'@version@' => $remote,\\n\\t\\t\\t'@source@' => $this->paths->source\\n\\t\\t]);\\n\\n\\t\\t$this->info(\\\"Cloning using '{$gitOperation}'\\\");\\n\\t\\t$this->run($gitOperation);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fc0f797a77760902fa1e4c971cd21a9\",\n \"score\": \"0.4664693\",\n \"text\": \"public function testRunGitConnectionTest()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5e66e24e17c5cd6f747f522ae3fd30e\",\n \"score\": \"0.465781\",\n \"text\": \"static function filterGitURL($url) {\\n\\t\\t//regular expressions to turn invalid git URLs with usernames into valid URLs that can be checked out\\n\\t\\t// without a password prompt appearing (which would block the script)\\n\\t\\t$url = preg_replace('/(\\\\w+?\\\\@github\\\\.com\\\\:)(.*)/','git://github.com/$2',$url);\\n\\t\\t$url = preg_replace('/(.*?\\\\/\\\\/)(\\\\w+\\\\@)(.*)/','$1$3',$url);\\n\\t\\t$url = preg_replace('/(\\\\w+?\\\\@)(.*)/','git://$2',$url);\\n\\n\\t\\treturn $url;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"978fc25cbe41163c6f479e7c8b7104ee\",\n \"score\": \"0.46527177\",\n \"text\": \"public static function clearRepo() {\\n $root = dirname(dirname(__DIR__)) . '';\\n // Git sub folders.\\n exec('find ' . $root . '/drush -name \\\\'.git\\\\' | xargs rm -rf');\\n exec('find ' . $root . '/web/libraries -name \\\\'.git\\\\' | xargs rm -rf');\\n exec('find ' . $root . '/web/modules -name \\\\'.git\\\\' | xargs rm -rf');\\n exec('find ' . $root . '/web/profiles -name \\\\'.git\\\\' | xargs rm -rf');\\n exec('find ' . $root . '/vendor -name \\\\'.git\\\\' | xargs rm -rf');\\n\\n // Examples and build folders.\\n exec('rm -f example.gitignore .eslintignore > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"sample\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"samples\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"example\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"examples\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"doc\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"docs\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"tests\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"node_modules\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . '/web/libraries -type d -iname \\\"bower_components\\\" | xargs rm -rf > /dev/null 2>&1');\\n\\n // Single unnecessary file.\\n exec('find ' . $root . ' -name \\\"*.*~\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . ' -iname \\\"*travis*\\\" | xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . ' -iname \\\"LICENSE*\\\"| xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . ' -iname \\\"CHANGELOG.*\\\"| xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . ' -iname \\\"MAINTAINERS.*\\\"| xargs rm -rf > /dev/null 2>&1');\\n exec('find ' . $root . ' -iname \\\".DS_Store\\\"| xargs rm -rf > /dev/null 2>&1');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f68447cedbbe788ea276b6c8c55a15a\",\n \"score\": \"0.46382535\",\n \"text\": \"public function resetCommand($site_env_id, $commit, $commit_log)\\n {\\n // Determine tags\\n $test_tags = shell_exec('git tag -l \\\"*test*\\\"');\\n $test_tags_array = preg_split('/\\\\s+/', trim($test_tags));\\n $last_test_tag = end($test_tags_array);\\n $last_test_tag_breakdown = explode('_', $last_test_tag);\\n $last_test_tag_number = (int) end($last_test_tag_breakdown);\\n $new_tag_number_for_test = $last_test_tag_number + 1;\\n\\n $live_tags = shell_exec('git tag -l \\\"*live*\\\"');\\n $live_tags_array = preg_split('/\\\\s+/', trim($live_tags));\\n $last_live_tag = end($live_tags_array);\\n $last_live_tag_breakdown = explode('_', $last_live_tag);\\n $last_live_tag_number = (int) end($last_live_tag_breakdown);\\n $new_tag_number_for_live = $last_live_tag_number + 1;\\n \\n $live_tag = \\\"pantheon_live_\\\" . $new_tag_number_for_live;\\n $test_tag = \\\"pantheon_test_\\\" . $new_tag_number_for_test;\\n\\n // Get the site repo\\n list($site, $env) = $this->getSiteEnv($site_env_id);\\n $env_id = $env->getName();\\n $siteInfo = $site->serialize();\\n print_r($siteInfo);\\n\\n $site_id = $siteInfo['id'];\\n $repo_path = \\\"ssh://codeserver.dev.$site_id@codeserver.dev.$site_id.drush.in:2222/~/repository.git\\\";\\n\\n // Restore DB from url.\\n $clone_op = \\\"terminus env:clone-content \\\" . $siteInfo['name'] . \\\".demo \\\" . \\\" dev -y\\\";\\n exec($clone_op);\\n\\n // Reset history back to the commit passed.\\n $this->passthru('git reset --hard ' . $commit);\\n\\n // Rewrite this breaking commit to be recent.\\n $this->passthru('GIT_COMMITTER_DATE=\\\"$(date)\\\" git commit --amend --no-edit --date \\\"$(date)\\\"');\\n\\n // Tag breaking commit for deploy to test/live\\n $this->passthru('git tag ' . $live_tag);\\n $this->passthru('git tag ' . $test_tag);\\n \\n // Get our commit log into an array.\\n $commits = array_map('str_getcsv', file($commit_log));\\n\\n foreach ($commits as $commit) {\\n $this->passthru('echo \\\"Adding ' . $commit[0] . '\\\" >> log.txt');\\n $this->passthru('git add log.txt');\\n $this->passthru('git commit -m \\\"' . $commit[0] . '\\\"');\\n }\\n\\n // Force push changes to Pantheon.\\n $this->passthru('git remote remove pantheon');\\n $this->passthru('git remote add pantheon ' . $repo_path);\\n $this->passthru('git push pantheon master --force --tags');\\n\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e69206a7454d394c018f8cd2676c17c1\",\n \"score\": \"0.463367\",\n \"text\": \"public function restoreStashedBranch()\\n {\\n if (null === $this->stashedBranch) {\\n return;\\n }\\n\\n if (!$this->isWorkingTreeReady()) {\\n throw new \\\\RuntimeException(\\n sprintf(\\n 'The Git working tree has uncommitted changes, unable to checkout your working branch \\\"%s\\\"'.\\\"\\\\n\\\".\\n 'Please resolve this failure manually.',\\n $this->stashedBranch\\n )\\n );\\n }\\n\\n $this->checkout($this->stashedBranch);\\n $this->stashedBranch = null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e7e9a5b202ea8482f0c83883d305233\",\n \"score\": \"0.4632594\",\n \"text\": \"static function check_git_version() {\\n $git = new GitRepo();\\n $git_version = $git->run('--version');\\n $git_version = substr($git_version, 11);\\n if ( version_compare( $git_version, '1.7.5', '>=' ) ) {\\n deactivate_plugins( __FILE__ );\\n exit('You need to run at least git version 1.7.5. You are currently running version ' . $git_version);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"319f448cbeb4e1a1eff71653971543b1\",\n \"score\": \"0.46282798\",\n \"text\": \"private function initRepository()\\n {\\n chdir($this->directory);\\n $this->gitInit();\\n $this->composerUpdate();\\n $this->gitCommitUpdateDependecies();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5be3898d2eaf91fe959030db4b63c9cd\",\n \"score\": \"0.45846388\",\n \"text\": \"public function toCommit(HasRemotes $git, string $hash): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"624e66d927cac95bde19fecd3f77eb86\",\n \"score\": \"0.45806456\",\n \"text\": \"function drush_dgb_commit() {\\n _dgb_set_required_settings();\\n\\n // Allow for custom commit message in case of manual backup.\\n $message = drush_get_option('m', 'auto-commit changes for databases and files by dgb.');\\n\\n // Add DRUPAL_ROOT to git index.\\n $exec = 'git add .';\\n // Add database dumps directory to git index.\\n $exec .= '; git add ' . drush_get_option('dgb-dumps');\\n // If drushrc.php is located in the upper directory, include it in the commit.\\n if (is_file('../drushrc.php')) {\\n $exec .= '; git add ../drushrc.php';\\n }\\n // Commit command.\\n $exec .= '; git commit -am \\\"' . $message . '\\\"';\\n drush_op('system', $exec );\\n\\n // run git gc for maintenance.\\n drush_op('system', 'git gc' );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c27421e3e408656d544c34da2291f42\",\n \"score\": \"0.4574962\",\n \"text\": \"public function testAutoMergeCurrent() {\\n $upstream = $this->createUpstreamRepo();\\n\\n mkdir(\\\"{$this->fixturePath}/subdir\\\");\\n ProcessUtil::runOk($this->command(\\\"\\\", \\\"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\\\"));\\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\\n $this->assertEquals(\\\"example text\\\", $downstream->readFile(\\\"example.txt\\\"));\\n $this->assertEquals(\\\"master\\\", $downstream->getLocalBranch());\\n\\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\\n\\n $downstream->commitFile(\\\"example.txt\\\", \\\"some unrelated local changes\\\");\\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\\n\\n $commandTester = $this->createCommandTester(array(\\n 'command' => 'automerge',\\n '--path' => $this->fixturePath,\\n '--keep' => 1,\\n // Find the dir based on upstream remote.\\n 'url' => array(\\\";/upstream;$patchFile\\\"),\\n ));\\n $this->assertStringContainsString(\\n 'In \\\"subdir/downstream/\\\", keep the current branch \\\"master\\\"',\\n $commandTester->getDisplay(FALSE));\\n $this->assertStringContainsString(\\n 'In \\\"subdir/downstream/\\\", apply',\\n $commandTester->getDisplay(FALSE));\\n $this->assertEquals(0, $commandTester->getStatusCode());\\n $this->assertEquals(\\\"master\\\", $downstream->getLocalBranch());\\n $this->assertRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\\n\\n // Preserved local changes.\\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"481886efe6de76c7520c5073bcfb8ae4\",\n \"score\": \"0.4572453\",\n \"text\": \"function checkout() { //$repo_url, $repo_sub_path, $current_rev) {\\n $repo_url = $this->state->get_repository_root();\\n $repo_sub_path = $this->state->get_repository_path();\\n $current_rev = $this->state->get_revision();\\n \\n $src_path = $repo_url . $repo_sub_path;\\n \\n // figure out where to send our http REPORT request\\n $bits = parse_url($repo_url . \\\"/!svn/vcc/default\\\");\\n $repo_host = $bits['host'];\\n $repo_port = @$bits['port']; if (!$repo_port) $repo_port = 80;\\n $repo_path = $bits['path'];\\n\\n $this->out(\\\"Connecting to host $repo_host:$repo_port,
    sending HTTP REPORT $repo_path for src-path $src_path.\\\\n\\\");\\n \\n $xml = ''.$src_path.'';\\n $xml_len = strlen($xml);\\n \\n $query = \\\"REPORT $repo_path HTTP/1.0\\nHost: $repo_host\\nContent-Type: text/xml\\nContent-Length: $xml_len\\nDepth: 0\\n\\n$xml\\\";\\n\\n $this->out($query);\\n\\n $sock = new Net_Socket();\\n $this->check_err($sock->connect($repo_host, $repo_port, null, 60, null)); // 60 sec timeout\\n \\n $this->check_err($sock->write($query));\\n\\n // read response\\n $this->out(\\\"Downloading patch ...\\\\n\\\");\\n $this->fp = fopen($this->diff_fn, \\\"wt\\\");\\n if (!$this->fp) throw new Subversion_Failure(\\\"can't open $this->diff_fn file\\\");\\n $listeners = array($this);\\n $this->received_bytes = 0;\\n $resp = new HTTP_Response($sock, $listeners);\\n $this->check_err($resp->process(false));\\n fclose($this->fp);\\n $this->out(\\\"\\\\nFinished downloading update ($this->received_bytes bytes).\\\\n\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc3199188e65c5cf091eb09915a9110b\",\n \"score\": \"0.45688823\",\n \"text\": \"public function build()\\n {\\n $this->info('Starting build');\\n $this->dirPrepare();\\n $this->phpLint();\\n $this->phpCodeStyle();\\n $this->phpMessDetect();\\n $this->phpTest();\\n $this->docsPhpApi(['force' => true]);\\n $this->info('build complete');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"314764cdb34d972d62dee60a47389c72\",\n \"score\": \"0.45681307\",\n \"text\": \"public function fire()\\n\\t{\\n\\t\\t$github = new Client();\\n\\t\\t$http = new \\\\Guzzle\\\\Http\\\\Client();\\n\\n\\t\\t$forceupdate = $this->argument(\\\"force\\\");\\n\\t\\tforeach(\\\\Config::get(\\\"laravel.versions\\\") as $version){\\n\\n\\t\\t\\t$this->info(\\\"Process branch $version\\\");\\n\\n\\t\\t\\tif($forceupdate){\\n\\t\\t\\t\\tDocs::version($version)->delete();\\n\\t\\t\\t\\t$this->info(\\\"force clear database!\\\");\\n\\t\\t\\t}\\n\\n\\t\\t\\t//$content = $this->githubTranslated->getFile($version, \\\"menu.md\\\");\\n\\t\\t\\t$this->line(\\\"Fetch documentation.md\\\");\\n\\t\\t\\t$content = $this->githubTranslated->getFile($version, \\\"documentation.md\\\");\\n\\t\\t\\t$lines = explode(\\\"\\\\n\\\", $content);\\n\\t\\t\\t$lines[] = \\\"[Menu](/docs/$version/documentation)\\\";\\n\\t\\t\\t$matches = array();\\n\\t\\t\\tforeach($lines as $line){\\n\\t\\t\\t\\tpreg_match(\\\"/\\\\(\\\\/docs\\\\/(.*?)\\\\/(.*?)\\\\)/im\\\", $line, $matches);\\n\\t\\t\\t\\tif(isset($matches[2])){\\n\\t\\t\\t\\t\\t$name = $matches[2];\\n\\t\\t\\t\\t\\t$filename = $name.\\\".md\\\";\\n\\t\\t\\t\\t\\t$this->line(\\\"\\\");\\n\\t\\t\\t\\t\\t$this->line(\\\"Fetch $filename ..\\\");\\n\\t\\t\\t\\t\\t//$last_commit_id = $this->githubTranslated->getLastCommitId($version, $filename);\\n\\t\\t\\t\\t\\t$this->line(\\\" get last translated commit\\\");\\n\\t\\t\\t\\t\\t$commit = $this->githubTranslated->getLastCommit($version, $filename);\\n\\n\\t\\t\\t\\t\\tif( ! is_null($commit)) {\\n\\t\\t\\t\\t\\t\\t$last_commit_id = $commit['sha'];\\n\\t\\t\\t\\t\\t\\t$last_commit_at = Carbon::createFromTimestampUTC(strtotime($commit['commit']['committer']['date']));\\n\\t\\t\\t\\t\\t\\t$this->line(\\\" get file\\\");\\n\\t\\t\\t\\t\\t\\t$content = $this->githubTranslated->getFile($version, $filename, $last_commit_id);\\n\\t\\t\\t\\t\\t\\tif(!is_null($content)) {\\n\\t\\t\\t\\t\\t\\t\\tpreg_match(\\\"/git (.*?)$/m\\\", $content, $matches);\\n\\t\\t\\t\\t\\t\\t\\t$last_original_commit_id = array_get($matches, '1');\\n\\t\\t\\t\\t\\t\\t\\t//if(!$last_original_commit) {\\n\\t\\t\\t\\t\\t\\t\\tif(!$last_original_commit_id AND $name != \\\"menu\\\") {\\n\\t\\t\\t\\t\\t\\t\\t\\t$this->error(\\\"Not found git signature in $filename\\\");\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\telse {\\n\\t\\t\\t\\t\\t\\t\\t\\t$this->line(\\\" get last translated original commit $last_original_commit_id\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\t$original_commit = $this->githubOriginal->getCommit($last_original_commit_id);\\n\\t\\t\\t\\t\\t\\t\\t\\t$count_ahead = 0;\\n\\t\\t\\t\\t\\t\\t\\t\\t$current_original_commit = \\\"\\\";\\n\\t\\t\\t\\t\\t\\t\\t\\tif($original_commit) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$last_original_commit_at = Carbon::createFromTimestampUTC(strtotime($original_commit['commit']['committer']['date']));\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Считаем сколько коммитов прошло с момента перевода\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$this->line(\\\" get current original commit\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$original_commits = $this->githubOriginal->getCommits($version, $filename, $last_original_commit_at);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$count_ahead = count($original_commits)-1;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$current_original_commit = $this->githubOriginal->getLastCommit($version, $filename);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$current_original_commit_id = $current_original_commit['sha'];\\n\\n//\\t\\t\\t\\t\\t\\t\\t\\t\\t$current_original_commit = $original_commits[0]['sha'];\\n//\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($original_commits as $c){\\n//\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif($c['sha']!=$last_original_commit_id) $count_ahead++;\\n//\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\telse {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$last_original_commit_at = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t$content = preg_replace(\\\"/git(.*?)(\\\\n*?)---(\\\\n*?)/\\\", \\\"\\\", $content);\\n\\t\\t\\t\\t\\t\\t\\t\\tpreg_match(\\\"/#(.*?)$/m\\\", $content, $matches);\\n\\t\\t\\t\\t\\t\\t\\t\\t$title = trim(array_get($matches, '1'));\\n\\t\\t\\t\\t\\t\\t\\t\\t$page = Docs::version($version)->name($name)->first();\\n\\t\\t\\t\\t\\t\\t\\t\\tif($page) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tif($last_commit_id != $page->last_commit) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->last_commit = $last_commit_id;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->last_commit_at = $last_commit_at;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->last_original_commit = $last_original_commit_id;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->last_original_commit_at = $last_original_commit_at;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->current_original_commit = $current_original_commit_id;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->original_commits_ahead = $count_ahead;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->title = $title;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->text = $content;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$page->save();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$this->info(\\\"$version/$filename updated. Commit $last_commit_id. Last original commit $last_original_commit_id.\\\");\\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\\telse {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tDocs::create([\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'framework_version' => $version,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'name' => $name,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'title' => $title,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'last_commit' => $last_commit_id,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'last_commit_at' => $last_commit_at,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'last_original_commit' => $last_original_commit_id,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'last_original_commit_at' => $last_original_commit_at,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'current_original_commit' => $current_original_commit_id,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'original_commits_ahead' => $count_ahead,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'text' => $content]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$this->info(\\\"$version/$filename created. Commit $last_commit_id. Last original commit $last_original_commit_id.\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c22d4a5b3f02b011df28f13ff054420d\",\n \"score\": \"0.45660073\",\n \"text\": \"public function pullOrInitialize() {\\n\\t\\tif($this->localFolderIsGit()) {\\n\\t\\t\\t$this->pull();\\n\\t\\t}\\n\\t\\telse {\\n\\t\\t\\t$this->initialize();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3814d5248fdce8593d3d836239c957d\",\n \"score\": \"0.45645553\",\n \"text\": \"public function doExt( $extRepo, $unusedKey, $branchName ) {\\n\\t\\t// otherwise we'll get build/AntiBot/CategoryTree/.. instead of build/AntiBot, build/CategoryTree, ..\\n\\t\\t$this->chdir( $this->buildDir );\\n\\t\\techo \\\"... $extRepo\\\\n\\\";\\n\\t\\t$url = str_replace( '{repository}', $extRepo, $this->conf->extRepoUrlFormat );\\n\\t\\t$name = basename( $extRepo );\\n\\t\\t$this->execCmd( 'git', 'clone', '-q', $url, '-b', 'master', $name );\\n\\t\\t$this->chdir( $name );\\n\\n\\t\\t$out = $exitcode = null;\\n\\t\\t// Check if the branch exists already\\n\\t\\texec( 'git show-branch origin/' . escapeshellarg( $branchName ) . ' 2>&1', $out, $exitcode );\\n\\t\\tif ( $exitcode == 0 ) {\\n\\t\\t\\techo \\\"Skipping $extRepo: Branch exists already\\\\n\\\";\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t$commit = $this->execReadCmd( 'git', 'rev-list', '-n', '1', '--before', $this->opts->branchDate, 'master' );\\n\\t\\tif ( !$commit ) {\\n\\t\\t\\techo \\\"Skipping $extRepo: Repo does not have a commit before the branch date\\\\n\\\";\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\tif ( $this->conf->verbose ) {\\n\\t\\t\\techo \\\"... $extRepo: Branching $branchName at $commit\\\\n\\\";\\n\\t\\t}\\n\\t\\t$this->execCmd( 'git', 'checkout', '-q', '-b', $branchName, $commit );\\n\\n\\t\\t# Intermediate commit & fixes\\n\\t\\t$this->fixGitReview( $branchName );\\n\\t\\t$this->execCmd( 'git', 'commit', '-a', '-q', '-m', \\\"Creating new {$branchName} branch\\\" );\\n\\n\\t\\t# Final push to repo for this extension/skin\\n\\t\\t$this->execWriteCmd( 'git', 'push', 'origin', \\\"$branchName:refs/heads/$branchName\\\" );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f83c01facd18c02bc374a5b4c424c5fa\",\n \"score\": \"0.45599082\",\n \"text\": \"public function testGit()\\n {\\n $descriptorspec = array(\\n 1 => array('pipe', 'w'),\\n 2 => array('pipe', 'w'),\\n );\\n $pipes = array();\\n $resource = proc_open(GitApi::getBin(), $descriptorspec, $pipes);\\n\\n $stdout = stream_get_contents($pipes[1]);\\n $stderr = stream_get_contents($pipes[2]);\\n foreach ($pipes as $pipe) {\\n fclose($pipe);\\n }\\n\\n $status = trim(proc_close($resource));\\n return ($status != 127);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3dcab8f154b2fd965e80ee36a3b3bdd1\",\n \"score\": \"0.45473325\",\n \"text\": \"function git($command, &$output = null) {\\n\\texec('git '.$command, $output, $exitCode);\\n\\treturn $exitCode;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dad23a60a6aed39298c30aa89abee13d\",\n \"score\": \"0.45401362\",\n \"text\": \"public function build(): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67d543c97c84fd76558c58266f62da7b\",\n \"score\": \"0.45307738\",\n \"text\": \"public function import_full( $p_repo ) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7098c83bebe20575dce2feffe4e9d90a\",\n \"score\": \"0.45264924\",\n \"text\": \"public function getGitUpdate(){\\n $command = \\\"git fetch origin\\\";\\n $returnVar = NULL;\\n $output = NULL;\\n exec($command, $output, $returnVar);\\n\\n $command = \\\"git diff master origin/master --name-only\\\";\\n $returnVar = NULL;\\n $output = NULL;\\n exec($command, $output, $returnVar);\\n return $output;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d460727dd72a0739f91edf69b16a606a\",\n \"score\": \"0.45254084\",\n \"text\": \"public function build(): void\\n {\\n if ($this->config->isHotReload()) {\\n $output = $this->config->getJson();\\n $this->swagger->writeFile($output);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"167de434da45c30a4a3b012204104c8b\",\n \"score\": \"0.45140684\",\n \"text\": \"public function set_needed_repos(): void {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c25ff108845b9967a7a8245480bef5e8\",\n \"score\": \"0.45129213\",\n \"text\": \"protected function initGit() {\\n // Init repo.\\n $this->git = new \\\\derhasi\\\\RedmineToGit\\\\Git();\\n // @todo: option to init repo.\\n $this->git->setRepository($this->repoPath->string());\\n\\n // Validate repo, by checking status.\\n try {\\n $this->git->status();\\n }\\n // When there is a git excpetion we are likely to have no repo there.\\n catch (\\\\PHPGit\\\\Exception\\\\GitException $e) {\\n $this->currentOutput->writeln(\\\"{$this->repoPath->string()} is no valid git repo.\\\");\\n return FALSE;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1021d3be0ee79451812ff05bb89c0c7\",\n \"score\": \"0.45063487\",\n \"text\": \"public function downloadUpdate(){\\n $command = \\\"git pull\\\";\\n $returnVar = NULL;\\n $output = NULL;\\n exec($command, $output, $returnVar);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"277b30e64080eb88e99a4b422c8f41f1\",\n \"score\": \"0.4502693\",\n \"text\": \"function checkout() {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cca4ce4fa7ecb3dece4cd57232625be\",\n \"score\": \"0.44969106\",\n \"text\": \"public function handle()\\n {\\n exec('bash '.app_path('../bin/git/status'), $result);\\n\\n if (empty($result) || !isset($result[1])) {\\n Log::error('Update', 'Checking', 'Cannot get GIT status. Updating failed');\\n return;\\n }\\n\\n $this->clientRepository->insertOrUpdateClient([\\n 'last_update_check' => date('Y-m-d H:i:s'),\\n 'last_commit' => $this->getCurrentCommit(),\\n ]);\\n\\n switch($result[1])\\n {\\n case 'up-to-date':\\n // nothing to do\\n break;\\n case 'need-to-pull':\\n $this->update();\\n break;\\n case 'diverged':\\n case 'need-to-push':\\n Log::error('Update', 'Checking', 'Impossible to update due to local changes or conflicts');\\n break;\\n default:\\n Log::error('Update', 'Checking', 'Unknown GIT status. Updating failed!');\\n return;\\n\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16d57a925acfcac11cbebff74de3877a\",\n \"score\": \"0.44951326\",\n \"text\": \"public function testRunHookWithUnstagedChanges(): void\\n {\\n $this->assertFalse(getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR));\\n\\n $config = $this->createConfigMock();\\n $io = $this->createIOMock();\\n $pluginConfig = $this->createPluginConfigMock();\\n\\n $unstagedChanges = 'foo bar baz';\\n $patchFileConstraint = $this->matches(sys_get_temp_dir() . '/CaptainHook/patches/%d-%x.patch');\\n\\n $this->statusOperator->method('getWorkingTreeStatus')->willReturn([]);\\n\\n $this->indexOperator->expects($this->never())->method('removeFiles');\\n $this->indexOperator->expects($this->never())->method('recordIntentToAddFiles');\\n\\n $this->diffOperator\\n ->expects($this->once())\\n ->method('getUnstagedPatch')\\n ->willReturn($unstagedChanges);\\n\\n $this->filesystem\\n ->expects($this->once())\\n ->method('dumpFile')\\n ->with($patchFileConstraint, $unstagedChanges);\\n\\n $this->statusOperator\\n ->expects($this->once())\\n ->method('restoreWorkingTree')\\n ->will($this->returnCallback(function (): bool {\\n if (getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR) != '1') {\\n $this->fail(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR . ' did not have the correct value');\\n }\\n return true;\\n }));\\n\\n $this->diffOperator\\n ->expects($this->once())\\n ->method('applyPatches')\\n ->with($this->callback(function ($value) use ($patchFileConstraint): bool {\\n $result = true;\\n foreach ($value as $item) {\\n $result = $result && $patchFileConstraint->evaluate($item, '', true);\\n }\\n return $result;\\n }))\\n ->willReturn(true);\\n\\n $hook = new class ($io, $config, $this->repo) extends Hook {\\n protected $hook = Hooks::PRE_COMMIT;\\n };\\n\\n $plugin = new PreserveWorkingTree($this->filesystem);\\n $plugin->configure($config, $io, $this->repo, $pluginConfig);\\n\\n $plugin->beforeHook($hook);\\n $plugin->afterHook($hook);\\n\\n // This should not be set after this test is finished.\\n $this->assertFalse(getenv(PreserveWorkingTree::SKIP_POST_CHECKOUT_VAR));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5dbc322b904a4562a1063894175af728\",\n \"score\": \"0.44888255\",\n \"text\": \"protected function build(): void\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1fbc4def40e8ce95722254fba9b2038\",\n \"score\": \"0.44881886\",\n \"text\": \"function tryProcessUncommitedChanges(): void\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3222f3f0e399b35be32ebc073f30045\",\n \"score\": \"0.4479133\",\n \"text\": \"public function fromGit(string $url)\\n {\\n return $this->setRepositorySource('custom', $url);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8176190b0c21446fa0580c28e7ce856\",\n \"score\": \"0.44770023\",\n \"text\": \"protected function gitCall($_args)\\n {\\n return sprintf(\\n '%s %s %s %s',\\n static::ENCODING_ENV,\\n static::GIT_BINARY,\\n \\\"--git-dir={$this->root}/.git --work-tree={$this->root}\\\",\\n implode(' ', func_get_args())\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fd62debb8fe71c7bb742b91adbee375\",\n \"score\": \"0.44404185\",\n \"text\": \"public function gotoGit(){\\n\\n\\n return Socialite::driver('github')->redirect();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ad2e8cf3e7fff42bf4240ca5a00f71d\",\n \"score\": \"0.44205353\",\n \"text\": \"function upgrade_can_git_pull()\\n{\\n\\tif ( SAFE_MODE === true )\\n\\t{\\n\\t\\treturn false;\\n\\t}\\n\\n\\t$base = PML_BASE;\\n\\n\\t// Check if git is callable and if all files are not changed\\n\\t$a = exec( 'cd ' . escapeshellarg( $base ) . '; git status -s' , $lines , $code );\\n\\n\\t// Error while executing this comand\\n\\tif ( $code !== 0 )\\n\\t{\\n\\t\\treturn array( $code , $lines );\\n\\t}\\n\\n\\t// Error, files have been modified\\n\\tif ( count( $lines ) !== 0 )\\n\\t{\\n\\t\\treturn array( $code , $lines );\\n\\t}\\n\\n\\t// can write all files with this webserver user ?\\n\\t$canwrite = true;\\n\\t$lines = array();\\n\\t$git = mb_strlen( realpath( $base ) ) + 1;\\n\\t$pmlfiles = new RecursiveIteratorIterator(\\n\\t\\tnew RecursiveDirectoryIterator( $base ) ,\\n\\t\\tRecursiveIteratorIterator::SELF_FIRST\\n\\t);\\n\\n\\tforeach ( $pmlfiles as $f )\\n\\t{\\n\\n\\t\\t// Ignore all .git/* files\\n\\t\\tif ( ( mb_substr( $f->getPathname() , $git , 4 ) ) === '.git' )\\n\\t\\t{\\n\\t\\t\\tcontinue;\\n\\t\\t}\\n\\n\\t\\t// check if this file is writable\\n\\t\\tif ( ! $f->isWritable() )\\n\\t\\t{\\n\\n\\t\\t\\t// check if it ignored or not\\n\\t\\t\\t$b = exec( \\\"git ls-files \\\" . escapeshellarg( $f->getPathname() ) );\\n\\t\\t\\tif ( ! empty( $b ) )\\n\\t\\t\\t{\\n\\t\\t\\t\\t$canwrite = false;\\n\\t\\t\\t\\t$lines[] = $f->getPathname();\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\tif ( $canwrite === false )\\n\\t{\\n\\t\\treturn array( 2706 , $lines );\\n\\t}\\n\\n\\treturn true;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba18157c0f76dce7e2a0c71e51a64ec0\",\n \"score\": \"0.44124347\",\n \"text\": \"protected function updateGitRepo() {\\n\\n $this->currentOutput->writeln(\\\"Committing changes ...\\\");\\n\\n $changes = FALSE;\\n\\n // @todo: option to stash current repo changes?\\n foreach ($this->wikiVersions as $version) {\\n\\n // Perform any changes in the filesystem for the given version.\\n $this->updateFilesForVersion($version);\\n\\n // Only really commit if there are changes to commit.\\n if ($this->git->hasStagedChanges()) {\\n $changes++;\\n\\n // Build commit message.\\n if ($version->version == 1) {\\n $message = \\\"Created page {$version->title} by {$version->author->name}\\\";\\n }\\n else {\\n $message = \\\"Updated page {$version->title} by {$version->author->name}\\\";\\n }\\n\\n $commit_message = \\\"{$this->project->project}: $message\\\";\\n $commit_message .= \\\"\\\\n Date: {$version->updated_on}\\\";\\n\\n // If the version got some comments, we add that to the commit message.\\n if (!empty($version->comments)) {\\n $commit_message .= \\\"\\\\n Message: {$version->comments}\\\";\\n }\\n\\n $this->git->commit($commit_message, array(\\n 'author' => $version->author->getGitAuthorName(),\\n 'date' => $version->updated_on,\\n ));\\n\\n // Write status.\\n $this->currentOutput->writeln(\\\"$message\\\");\\n }\\n\\n // @todo: handling comments?\\n // @todo: handling documents?\\n\\n }\\n\\n if (empty($changes)) {\\n $this->currentOutput->writeln(\\\"There were no changes to commit.\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b86d826960c1d4ef3d76c844f498fc67\",\n \"score\": \"0.43981454\",\n \"text\": \"public function testCreateGitBranch()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"975be872ac1cb24737f0e9067424695a\",\n \"score\": \"0.43928447\",\n \"text\": \"public function clear_build_ts() {\\n\\t\\t$this->out('Clearing build timestamp.');\\n\\t\\t$this->out();\\n\\t\\tAssetConfig::clearBuildTimeStamp();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98d1e27dbfad729dea8350586a621f89\",\n \"score\": \"0.43761477\",\n \"text\": \"public function handle()\\n {\\n if (!\\\\App::environment('local', 'staging', 'development', 'testing')) {\\n $this->info('...Photon update forbidden');\\n return false;\\n }\\n\\n $this->info(\\\"...Checking license\\\");\\n // check if license key exist\\n $key = LicenseKeyHelper::checkLicenseKey();\\n // ping home\\n $validKey = LicenseKeyHelper::pingHome($key); \\n // store license key if it does not exist\\n if(!$key) \\n LicenseKeyHelper::storeLiceseKey($validKey['body']['license_key']);\\n\\n $currentVersion = ComposerBump::getVersion();\\n $this->info(\\\"...Installed version: \\\" . $currentVersion);\\n $this->info(\\\"...Latest version: \\\" . $validKey['body']['newest_version']);\\n \\n if($validKey['body']['newest_version'] == $currentVersion) {\\n $this->info(\\\"Photon instalation already up to date\\\");\\n return false;\\n }\\n\\n $directory = getcwd().'/tmp';\\n\\n // clear tmp folder\\n $this->info(\\\"...Clearing old temporary files\\\");\\n $this->clearTmpFolder($directory);\\n\\n $this->info(\\\"...Downloading and extracting update\\\");\\n $this->download($zipFile = $this->makeFilename($directory))\\n ->extract($zipFile, $directory)\\n ->cleanUp($zipFile);\\n\\n $this->info(\\\"...Applying update\\\");\\n $this->copyCoreBeFiles();\\n $this->copyCoreFeFiles();\\n\\n // clear tmp folder\\n $this->info(\\\"...Clearing temporary files\\\");\\n $this->clearTmpFolder($directory);\\n\\n $this->info(\\\"...Updating composer\\\");\\n $this->composerFileHelper->setVersion($validKey['body']['newest_version'])->save();\\n\\n $this->info(\\\"Photon CMS Updated\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f4034a7e3a159e4fcab525fe6c86ebb\",\n \"score\": \"0.43691802\",\n \"text\": \"function build()\\n {\\n assert('Debug::checkState(\\\"Component\\\", DEBUG_STATE_BUILD)');\\n assert('$id = $this->getObjectId()');\\n assert('$class = get_class($this)');\\n assert('Debug::log(\\\"Component: building \\\\'$id\\\\', class \\\\'$class\\\\'\\\")');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"978df408211b4bd230b84aceec240cf6\",\n \"score\": \"0.43640077\",\n \"text\": \"function commitEditedMedia($full_filepath) {\\n if (\\n isset($_POST) && \\n isset($_POST['action']) && \\n $_POST['action'] !== 'image-editor'\\n ) return $full_filepath;\\n\\n // bail out if this is an intermediate image size. \\n // gatsby creates our image sizes so we only commit full size images to the repo.\\n if (\\n !preg_match(\\n '/^(?!.*-\\\\d{2,4}x\\\\d{2,4}).*\\\\.(jpg|png|bmp|gif|ico)$/', $full_filepath\\n )\\n ) return $full_filepath;\\n\\n // bail if the file doesn't exist. It should, but just in case.\\n if (!file_exists($full_filepath)) {\\n jp_notices_add_error(\\\"There was an error saving your image. Please try again.\\\");\\n return $full_filepath;\\n };\\n\\n\\t$dirname = pathinfo( $full_filepath, PATHINFO_DIRNAME );\\n\\t$ext = pathinfo( $full_filepath, PATHINFO_EXTENSION );\\n $filename = pathinfo( $full_filepath, PATHINFO_FILENAME );\\n\\n $repo_full_filepath = \\\"wordsby/\\\" . substr(\\n $full_filepath, \\n strpos($full_filepath, \\\"/uploads/\\\") + 1\\n ); \\n\\n $repo_filename = pathinfo( $repo_full_filepath, PATHINFO_BASENAME );\\n\\t$repo_dirname = pathinfo( $repo_full_filepath, PATHINFO_DIRNAME );\\n\\n\\n $client = getGitlabClient();\\n if (!$client) return null; \\n\\n createMediaBranchIfItDoesntExist($client);\\n \\n global $mediaBranch;\\n\\n\\n $media_exists = isFileInRepo(\\n $client, $repo_dirname, $repo_filename, $mediaBranch\\n );\\n $action = $media_exists ? 'update' : 'create';\\n\\n $original_filename = preg_replace( \\n '/-e([0-9]+)$/', '', $filename \\n ) . \\\".$ext\\\";\\n\\n $repo_original_filepath = \\\"$repo_dirname/$original_filename\\\";\\n \\n $original_media_exists = isFileInRepo(\\n $client, $repo_dirname, $original_filename, $mediaBranch\\n );\\n\\n\\n $site_url = get_site_url();\\n $current_user = wp_get_current_user()->data;\\n $username = $current_user->user_nicename;\\n\\n $commit_message = \\\"\\n \\\\\\\"$filename\\\\\\\" edited (\\\\\\\"$repo_filename\\\\\\\") \\n — by $username (from $site_url)\\n \\\";\\n\\n $actions = array(\\n array(\\n 'action' => $action,\\n 'file_path' => $repo_full_filepath,\\n 'content' => base64_encode(file_get_contents($full_filepath)),\\n 'encoding' => 'base64'\\n )\\n );\\n\\n // delete the original media file from the repo if \\n // IMAGE_EDIT_OVERWRITE is true.\\n if (\\n defined( 'IMAGE_EDIT_OVERWRITE' ) && \\n IMAGE_EDIT_OVERWRITE &&\\n $original_media_exists\\n ) {\\n array_push($actions, array(\\n 'action' => 'delete',\\n 'file_path' => $repo_original_filepath,\\n ));\\n }\\n\\n $commit = $client->api('repositories')->createCommit(\\n WORDLIFY_GITLAB_PROJECT_ID, \\n array(\\n 'branch' => $mediaBranch, \\n 'commit_message' => $commit_message,\\n 'actions' => $actions,\\n 'author_email' => $username,\\n 'author_name' => $current_user->user_email\\n )\\n );\\n\\n return $full_filepath;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1d44eb8ef5adf399244d1a2fb87ac2c\",\n \"score\": \"0.43614262\",\n \"text\": \"public function run()\\n {\\n //config from params, and if not params from environment config: git-rebase-defaults\\n $deploymentGitData = $this->getConfig()->environmentConfig('git-rebase-defaults', array());\\n $remote = $this->getParameter('remote', (array_key_exists('remote',$deploymentGitData)) ? $deploymentGitData['remote'] : 'origin');\\n $branch = $this->getParameter('branch', (array_key_exists('branch',$deploymentGitData)) ? $deploymentGitData['branch'] : 'master');\\n \\n $result = true;\\n\\n //fetching\\n $result = $this->runCommandRemote(\\\"git fetch $remote\\\", $output) && $result;\\n if(!$result)\\n {\\n Console::output(\\\"fails fetch $remote ... \\\",0,0);\\n return false;\\n }\\n\\n //ensuring right branch is checked out\\n $result = $this->runCommandRemote(\\\"git checkout $branch\\\") && $result;\\n if(!$result)\\n {\\n Console::output(\\\"fails $branch checkout ... \\\",0,0);\\n return false;\\n }\\n\\n //testing for local modifications just to be sure\\n $status = '';\\n $result = $this->runCommandRemote('git status --porcelain', $status) && $result;\\n $clean = (empty($status)) ? true : false;\\n $stashed = false;\\n if(!$clean)\\n {\\n //hacemos un stash\\n $result = $this->runCommandRemote(\\\"git stash\\\", $output) && $result;\\n if($output != \\\"No local changes to save\\\"){\\n Console::output(\\\"stash ... \\\",0,0);\\n $stashed = true;\\n }\\n }\\n\\n //rebasing\\n $result = $this->runCommandRemote(\\\"git rebase $remote/$branch\\\", $output) && $result;\\n if(!$result)\\n {\\n Console::output(\\\"fails rebase $remote/$branch ... \\\",0,0);\\n }\\n\\n if($stashed)\\n {\\n //local modifications before rebase being popped from stash\\n $result = $this->runCommandRemote(\\\"git stash pop\\\", $output) && $result;\\n Console::output(\\\"stash pop ... \\\",0,0);\\n }\\n\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e7613a2365edd19550df4d7f36e335c\",\n \"score\": \"0.4358847\",\n \"text\": \"public function testAutoMergeRebuild() {\\n $upstream = $this->createUpstreamRepo();\\n\\n mkdir(\\\"{$this->fixturePath}/subdir\\\");\\n ProcessUtil::runOk($this->command(\\\"\\\", \\\"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\\\"));\\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\\n $this->assertEquals(\\\"example text\\\", $downstream->readFile(\\\"example.txt\\\"));\\n $this->assertEquals(\\\"master\\\", $downstream->getLocalBranch());\\n\\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\\n\\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\\n\\n $downstream->commitFile(\\\"example.txt\\\", \\\"some unrelated local changes\\\");\\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\\n\\n // Run it the first time\\n\\n $commandTester = $this->createCommandTester(array(\\n 'command' => 'automerge',\\n '--path' => $this->fixturePath,\\n '--rebuild' => 1,\\n // Find the dir based on upstream remote.\\n 'url' => array(\\\";/upstream;$patchFile\\\"),\\n ));\\n $this->assertStringContainsString(\\n 'In \\\"subdir/downstream/\\\", rename \\\"master\\\" to \\\"backup-master-',\\n $commandTester->getDisplay(FALSE));\\n $this->assertStringContainsString(\\n 'In \\\"subdir/downstream/\\\", apply',\\n $commandTester->getDisplay(FALSE));\\n $this->assertEquals(0, $commandTester->getStatusCode());\\n $this->assertEquals(\\\"master\\\", $downstream->getLocalBranch());\\n $this->assertRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\\n\\n // Rebuilt from upstream. Local changes were lost.\\n $this->assertNotRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5caa80984ed29459407f3a185052f385\",\n \"score\": \"0.43482804\",\n \"text\": \"public function testFindGitBranch()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e19560ca8335d147bfd0f469263317c\",\n \"score\": \"0.43432114\",\n \"text\": \"protected function update()\\n {\\n exec('git checkout .');\\n exec('git clean -fd');\\n\\n // Pull new version\\n exec('git pull origin master');\\n\\n exec('composer install --no-interaction');\\n\\n $this->clientRepository->insertOrUpdateClient([\\n 'last_commit' => $this->getCurrentCommit(),\\n 'last_update_code' => date('Y-m-d H:i:s')\\n ]);\\n\\n Artisan::call('cache:clear');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ead04577e7a8073aa13cd0f593c8552c\",\n \"score\": \"0.43213633\",\n \"text\": \"protected function _clearBuilds($ext) {\\n\\t\\t$targets = $this->_Config->targets($ext);\\n\\t\\tif (empty($targets)) {\\n\\t\\t\\t$this->err('No ' . $ext . ' build files defined, skipping');\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t$path = $this->_Config->cachePath($ext);\\n\\t\\tif (!file_exists($path)) {\\n\\t\\t\\t$this->err('Build directory ' . $path . ' for ' . $ext . ' does not exist.');\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t$dir = new DirectoryIterator($path);\\n\\t\\tforeach ($dir as $file) {\\n\\t\\t\\t$name = $file->getFilename();\\n\\t\\t\\tif (in_array($name, array('.', '..'))) {\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\t\\t\\t// no timestamp\\n\\t\\t\\tif (in_array($name, $targets)) {\\n\\t\\t\\t\\t$this->out(' - Deleting ' . $path . $name);\\n\\t\\t\\t\\tunlink($path . $name);\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\t\\t\\tif (preg_match('/^.*\\\\.v\\\\d+\\\\.[a-z]+$/', $name)) {\\n\\t\\t\\t\\tlist($base, $v, $ext) = explode('.', $name, 3);\\n\\t\\t\\t\\tif (in_array($base . '.' . $ext, $targets)) {\\n\\t\\t\\t\\t\\t$this->out(' - Deleting ' . $path . $name);\\n\\t\\t\\t\\t\\tunlink($path . $name);\\n\\t\\t\\t\\t\\tcontinue;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e84608326828d270439e67e566935616\",\n \"score\": \"0.4318278\",\n \"text\": \"public function createAndCheckoutBranchFromHead($name) {\\n list($err, $stdout, $stderr) = $this->api\\n ->execManualLocal('checkout --track -b %s', $name);\\n echo $stdout;\\n if ($err) {\\n throw new ArcanistUsageException($stderr);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0dc1ad5a1acb2199119dc1e9718b5d09\",\n \"score\": \"0.42999792\",\n \"text\": \"public function testAllGitBranches()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"114253361c539c2037dd12585ea1f9c0\",\n \"score\": \"0.42952728\",\n \"text\": \"public static function clone()\\n {\\n \\t$bowerDir = 'vendor' . DIRECTORY_SEPARATOR . self::$sourceBower;\\n\\n $bowerYiiDir = 'vendor' . DIRECTORY_SEPARATOR . self::$bowerVendor;\\n\\n \\ttry {\\n \\t\\t\\n \\t\\tself::deleteDir($bowerYiiDir);\\n\\n \\tself::copyDir($bowerDir, $bowerYiiDir);\\n\\n \\techo \\\"Clone bower process done\\\\n\\\";\\n\\n \\t} catch (Exception $e) {\\n \\t\\t\\n \\t\\techo \\\"Error on clone bower process\\\\n\\\";\\n \\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"168aa960e3d2771047b18d6af392c9f0\",\n \"score\": \"0.4286561\",\n \"text\": \"public function finish_build($colony)\\n\\t{\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2e51fd25316c0804dcf6691274e9ff8\",\n \"score\": \"0.4285112\",\n \"text\": \"public function checkoutBranch($name) {\\n // Regular checkout\\n list($err, $stdout, $stderr) = $this->api\\n ->execManualLocal('checkout %s', $name);\\n echo $stdout;\\n if ($err) {\\n throw new ArcanistUsageException($stderr);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04fdb2652ce0a19b5369aeb434ca8a7b\",\n \"score\": \"0.42848378\",\n \"text\": \"public function handle()\\n {\\n $this->createFreshDirectory();\\n\\n // Non-existent repo\\n $this->createFreshDirectory('does_not_exist');\\n\\n // Empty repo\\n $this->createFreshDirectory('empty');\\n $this->initialiseGitRepository('empty');\\n\\n // Single commit repo\\n $this->createFreshDirectory('single_commit');\\n $this->initialiseGitRepository('single_commit');\\n $this->writeTextToFile('stageAll('single_commit');\\n $this->commit('single_commit', 'initial commit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"238260cc3e34743bb88092582e30138f\",\n \"score\": \"0.42837128\",\n \"text\": \"public function compileRepository() \\n\\t{\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2dd627ef4443b3d163b56dfc768cef9d\",\n \"score\": \"0.42770082\",\n \"text\": \"public function grabRepository($mixed) {\\n return $this->getScenario()->runStep(new \\\\Codeception\\\\Step\\\\Action('grabRepository', func_get_args()));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ae393c7c5d2bcd8d3d17997ada2a51b\",\n \"score\": \"0.42749888\",\n \"text\": \"public function git_push_callback() {\\n $msg = $this->git_push();\\n die($msg);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c6c3dc46a4f8aad87fb50168b2c331e\",\n \"score\": \"0.42742285\",\n \"text\": \"static public function maybe_run() {\\n\\t\\t// Make sure the user is logged in.\\n\\t\\tif ( ! is_user_logged_in() ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Don't update for dev copies.\\n\\t\\tif ( FL_BUILDER_VERSION == '{FL_BUILDER_VERSION}' ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Get the saved version.\\n\\t\\t$saved_version = get_site_option( '_fl_builder_version' );\\n\\n\\t\\t// No saved version number. This must be a fresh install.\\n\\t\\tif ( ! $saved_version ) {\\n\\t\\t\\tupdate_site_option( '_fl_builder_version', FL_BUILDER_VERSION );\\n\\t\\t\\treturn;\\n\\t\\t} elseif ( ! version_compare( $saved_version, FL_BUILDER_VERSION, '=' ) ) {\\n\\n\\t\\t\\tif ( is_multisite() ) {\\n\\t\\t\\t\\tself::run_multisite( $saved_version );\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tself::run( $saved_version );\\n\\t\\t\\t}\\n\\n\\t\\t\\tupdate_site_option( '_fl_builder_version', FL_BUILDER_VERSION );\\n\\n\\t\\t\\tupdate_site_option( '_fl_builder_update_info', array(\\n\\t\\t\\t\\t'from' => $saved_version,\\n\\t\\t\\t\\t'to' => FL_BUILDER_VERSION,\\n\\t\\t\\t) );\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3ad0d94f3fc10c5f8da68924085626f\",\n \"score\": \"0.4273377\",\n \"text\": \"public function testAutoMergeCurrentConflict() {\\n $upstream = $this->createUpstreamRepo();\\n\\n mkdir(\\\"{$this->fixturePath}/subdir\\\");\\n ProcessUtil::runOk($this->command(\\\"\\\", \\\"git clone file://{$upstream->getPath()} {$this->fixturePath}/subdir/downstream\\\"));\\n $downstream = new GitRepo($this->fixturePath . '/subdir/downstream');\\n $this->assertEquals(\\\"example text\\\", $downstream->readFile(\\\"example.txt\\\"));\\n $this->assertEquals(\\\"master\\\", $downstream->getLocalBranch());\\n\\n $patchFile = $this->createPatchFile($upstream, 'mypatch');\\n $this->assertNotRegExp('/the future has been patched/', $downstream->readFile('changelog.txt'));\\n\\n $downstream->commitFile(\\\"example.txt\\\", \\\"some unrelated local changes\\\");\\n $this->assertRegExp('/some unrelated local changes/', $downstream->readFile('example.txt'));\\n\\n // Introduce a conflict\\n $downstream->commitFile(\\\"changelog.txt\\\", \\\"this is bad! it has conflict!\\\");\\n\\n try {\\n $commandTester = $this->createCommandTester(array(\\n 'command' => 'automerge',\\n '--path' => $this->fixturePath,\\n '--keep' => 1,\\n // Find the dir based on upstream remote.\\n 'url' => array(\\\";/upstream;$patchFile\\\"),\\n ));\\n $this->fail(\\\"Expected ProcessErrorException\\\");\\n }\\n catch (ProcessErrorException $e) {\\n $this->assertTrue($e->getProcess()->getExitCode() > 0);\\n $this->assertStringContainsString(\\n 'patch failed',\\n $e->getProcess()->getErrorOutput());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f8bc819867f3264804db360d1511d92\",\n \"score\": \"0.4268325\",\n \"text\": \"public function composerUpdateHash()\\n {\\n $paths = $this->getPaths();\\n $this->stopOnFail(true);\\n $this->yell('composer:update-hash');\\n $this->info('Updating Composer lock file');\\n $this->taskExec('composer')\\n ->dir($paths['root'])\\n ->arg('update')\\n ->option('lock')\\n ->printed(true)\\n ->run();\\n $this->info('Composer lock file updated');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7065b60a39df56bb20e09e1449b9b2f3\",\n \"score\": \"0.4263203\",\n \"text\": \"private function install_main_bakery_bakery()\\n\\t{\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90c642bad0041ed07d9a2a05ab1b3814\",\n \"score\": \"0.42480212\",\n \"text\": \"public function build() {\\n if ($this->hasBeenExecuted) {\\n throw new \\\\LogicException('Builders can only be used once.');\\n }\\n\\n $this->hasBeenExecuted = TRUE;\\n\\n // Hello old faithful.\\n if (!$this->importer) {\\n $this->setImporter(new Importer());\\n }\\n\\n $this->replayCommands();\\n\\n if (!$this->importer->getLogger()) {\\n $this->doSetLogger(new NullLogger());\\n }\\n\\n $this->importer->validate();\\n\\n // Since this is potentially a long running process, we need to make an\\n // effort to clean up after ourselves.\\n $importer = $this->importer;\\n unset($this->importer, $this->commands, $this->clients);\\n\\n return $importer;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03ea08e8f8c1546ef189c7d9456ef5e0\",\n \"score\": \"0.42433223\",\n \"text\": \"public function precommit() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15a63d9f9675e8c4d1005e6f86bae65c\",\n \"score\": \"0.42422482\",\n \"text\": \"public function testDeleteGitBranch()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93d1e234cae17400336ad1b9a11cc0f9\",\n \"score\": \"0.42315206\",\n \"text\": \"public function toArchive(HasRemotes $git, string $branch = 'master'): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54ee93675aa34bb5a530b42ca1e3ed82\",\n \"score\": \"0.42096457\",\n \"text\": \"public function bumpBuild()\\n {\\n $this->build += 1;\\n $this->release = null;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a43949b515b303e4ac8850b0b0766c0\",\n \"score\": \"0.42090386\",\n \"text\": \"public function testRenameWithClashingGitRepository() {\\n\\t\\t$sourcekettleConfig = ClassRegistry::init('Setting')->loadConfigSettings();\\n\\t\\t$base = $sourcekettleConfig['SourceRepository']['base']['value'];\\n\\t\\tmkdir(\\\"$base/not_at_all_private.git\\\");\\n\\t\\t$before = $this->Project->findById(1);\\n\\t\\ttry{\\n\\t\\t\\t$this->assertFalse($this->Project->rename(\\\"private\\\", 'not_at_all_private'));\\n\\t\\t} catch (InvalidArgumentException $e) {\\n\\t\\t\\t$this->assertTrue(true, \\\"Caught expected exception\\\");\\n\\t\\t} catch (Exception $e) {\\n\\t\\t\\t$this->assertTrue(false, \\\"Caught unexpected exception\\\");\\n\\t\\t}\\n\\t\\t$after = $this->Project->findById(1);\\n\\t\\t$this->assertEquals($before, $after);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c304d06569af05d9d418a4b0b47313a5\",\n \"score\": \"0.42048898\",\n \"text\": \"private function _getDifferenceGit()\\n {\\n return [];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b0637c5a8b2f1a12a42466888780939\",\n \"score\": \"0.42045978\",\n \"text\": \"public function compile() {\\n\\t\\t$this->start('Compiling to '. $this->host);\\n\\n\\t\\t// fix path\\n\\t\\t$this->localProj\\t= self::path($this->localProj);\\n\\t\\t$this->remoteProj\\t= rtrim($this->remoteProj, DIRECTORY_SEPARATOR);\\n\\t\\t\\n\\t\\t// Work from project\\n\\t\\tif(isset($this->localProj) && is_dir($this->localProj))\\n\\t\\t\\tchdir($this->localProj);\\n\\t\\t\\n\\t\\t// documentation\\n\\t\\tif(isset($this->localDoc))\\n\\t\\t\\t$this->start('Creating Documentation from ' . $this->localDoc)->makeDoc()->finish();\\n\\t\\t\\n\\t\\t// twig templates\\n\\t\\tif(isset($this->localTpl))\\n\\t\\t\\t$this->start('Creating JS Templates from ' . $this->localTpl)->makeTpl()->finish();\\n\\t\\t\\n\\t\\t\\n\\t\\t// static files\\n\\t\\t$localStatic = self::path(sys_get_temp_dir()) . 'data' . time() . DIRECTORY_SEPARATOR;\\n\\t\\t$this->wipe[] = $localStatic;\\n\\t\\t\\n\\t\\tforeach($this->remoteStatic as $type => $trash) {\\n\\t\\t\\tif(method_exists($this, $type)) {\\n\\t\\t\\t\\t$this->tmp[ $type ] = $localStatic . $type . DIRECTORY_SEPARATOR;\\n\\t\\t\\t\\tself::readyDir( $this->tmp[ $type ] );\\n\\n\\t\\t\\t\\t// process static files\\n\\t\\t\\t\\t$this->start('Processing '. $type)->$type()->finish();\\n\\t\\t\\t\\t\\n\\t\\t\\t} elseif(!empty($this->localStatic[ $type ])) {\\n\\t\\t\\t\\t\\t// just moved the folder\\n\\t\\t\\t\\t\\t$this->tmp[ $type ] = self::path(current ($this->localStatic[ $type ]));\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t// remove if not there\\n\\t\\t\\t\\t\\tif(!file_exists($this->tmp[ $type ])) \\n\\t\\t\\t\\t\\t\\tunset ($this->remoteStatic[ $type ]);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// run through static files then upload them\\n\\t\\t$this->start('Uploading Static')->uploadStatic()->finish();\\n\\n\\t\\t// upload project\\n\\t\\t$cmd = [\\n\\t\\t\\t'pscp',\\n\\t\\t\\t'-p',\\t\\t\\t\\t\\t\\t\\t\\t\\t// preserve attributes\\n\\t\\t\\t'-r',\\t\\t\\t\\t\\t\\t\\t\\t\\t// copy recursively\\n\\t\\t\\t'-q',\\t\\t\\t\\t\\t\\t\\t\\t\\t// silent\\n\\t\\t\\t//'-sftp',\\t\\t\\t\\t\\t\\t\\t\\t// for use of SFTP protocal\\n\\t\\t\\t'-batch',\\t\\t\\t\\t\\t\\t\\t\\t// non interactive\\n\\t\\t\\t'-C',\\t\\t\\t\\t\\t\\t\\t\\t\\t// enable compression\\n\\t\\t\\t'-i', static::safeDir($this->ppk),\\t\\t\\t\\t\\t\\t// Private key file to access server\\n\\t\\t];\\n\\t\\t\\n\\t\\t// Directory to upload\\n\\t\\tforeach($this->localCopy as $name)\\n\\t\\t\\t$cmd[] = static::safeDir($this->localProj . $name);\\n\\t\\t\\n\\t\\t// host:path on server to save data\\n\\t\\t$cmd[] = $this->host .':'. $this->remoteProj;\\n\\t\\t\\n\\t\\t$this->start('Uploading Project')->runLocal($cmd)->finish();\\n\\n\\t\\t// config\\n\\t\\tif(!isset($this->s3) && !empty($this->remoteStatic)) {\\n\\t\\t\\t// reset file permissions\\n\\t\\t\\t$cmd = array();\\n\\t\\t\\tforeach($this->remoteStatic as $type => $path) {\\n\\t\\t\\t\\t$cmd[] = 'chmod 774 -R '. $path;\\n\\t\\t\\t\\t// $cmd[] = 'chown mo:www-data -R '. $path;\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->start('Updating Server Enviroment')->runRemote( $cmd )->finish();\\n\\t\\t}\\n\\n\\t\\t// clean up\\n\\t\\t$this\\t->start('Cleaning up');\\n\\t\\t\\tforeach($this->wipe as $dir)\\n\\t\\t\\t\\tself::wipeDir($dir, true);\\n\\t\\t$this\\t->finish();\\n\\t\\t\\n\\t\\t// finally\\n\\t\\t$this->finish();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0cac3172216dffabf61ef3eccbd7646\",\n \"score\": \"0.42031255\",\n \"text\": \"function svn_checkout($repos, $targetpath, $revision = NULL, $flags = false)\\n{\\n}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":726,"cells":{"query_id":{"kind":"string","value":"042ccd567b21942a9bd4ca21fa34db10"},"query":{"kind":"string","value":"/! \\brief Function that delete the first index of an array \\param[in]$inThe array \\returnReturn the array without the first index"},"positive_passages":{"kind":"list like","value":[{"docid":"a9041cd356fdb5cff0027a9cd233b087","score":"0.715564","text":"function deleteFirst($in){\n\t\treturn deleteIndex($in, 0);\n\t}","title":""}],"string":"[\n {\n \"docid\": \"a9041cd356fdb5cff0027a9cd233b087\",\n \"score\": \"0.715564\",\n \"text\": \"function deleteFirst($in){\\n\\t\\treturn deleteIndex($in, 0);\\n\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"b3ce71f701b0d39600ae5767f4b9fdfe","score":"0.70402986","text":"function shoestrap_array_delete( $idx, $array ) { \n unset( $array[$idx] );\n return ( is_array( $array ) ) ? array_values( $array ) : null;\n}","title":""},{"docid":"e791476bbae84a4479ac3dbcf3274966","score":"0.6838905","text":"private function deleteArrayElement($anArray=array(), $index) {\n unset($anArray[$index]);\n $anArray = array_values($anArray);\n\n return $anArray;\n }","title":""},{"docid":"9861ca47d5060f8d712b054227710754","score":"0.6830198","text":"function deleteIndex($in, $index){\n\t\tif(gettype($in) !== \"array\"){\n\t\t\treturn $in;\n\t\t}\n\n\t\t$out = array();\n\t\t$i = 0;\n\t\t$size = sizeOf($in);\n\n\t\tforeach($in as $key => $value){\n\t\t\tif($i !== $index){\n\t\t\t\t$out[$key] = $value;\n\t\t\t}\n\n\t\t\t++$i;\n\t\t}\n\n\t\treturn $out;\n\t}","title":""},{"docid":"7489c1507bf2213c7cbc8a918fb4e44e","score":"0.6809874","text":"function array_unset($array,$index) {\n $res=array();\n $i=0;\n foreach ($array as $item) {\n if ($i!=$index)\n $res[]=$item;\n $i++;\n }\n return $res;\n}","title":""},{"docid":"451877d2444516f44273994d51257c57","score":"0.6371668","text":"static public function delete_from(&$array, $element) {\n\n $pos = array_search($element, $array);\n for ($i = $pos; $i < count($array); $i++) {\n\n $array[$i] = $array[$i + 1];\n }\n array_pop($array);\n return $array;\n }","title":""},{"docid":"b2eb7f3affdeee4de9cf35a63095dae8","score":"0.6331412","text":"function removeElement($array,$value) {\n if (($key = array_search($value, $array)) !== false) {\n unset($array[$key]);\n }\n return $array;\n}","title":""},{"docid":"4cbf46a3d14f42edfd46eb992545372d","score":"0.628373","text":"public function removeFromArray($data,$value){\n $data=array_flip($data);\n unset($data[$value]);\n $data=array_flip($data);\n return array_merge(array(),$data);\n}","title":""},{"docid":"8949ccff17fa22ae99972742c6ba90e1","score":"0.60765123","text":"public function offsetUnset($indice) {\n }","title":""},{"docid":"e5c4ee155bf47a1443ea2586191d900c","score":"0.6014415","text":"function drop(array $input, $number = 1)\n{\n return array_slice($input, $number);\n}","title":""},{"docid":"351eac0dcbeed6102cd0bd3c4f5d97d4","score":"0.5942644","text":"function deleteMapIndex($in, $index){\n\t\tif(gettype($in) !== \"array\"){\n\t\t\treturn $in;\n\t\t}\n\n\t\t$out = array();\n\n\t\tforeach($in as $key => $value){\n\t\t\tif($key !== $index){\n\t\t\t\t$out[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\treturn $out;\n\t}","title":""},{"docid":"e66372c519db3e2dc8e809ebdbab92b8","score":"0.5930846","text":"function array_delete(&$array, $value)\n {\n $value = \\Illuminate\\Support\\Arr::wrap($value);\n\n foreach ($array as $index => $item) {\n if (in_array($item, $value)) {\n unset($array[$index]);\n }\n }\n }","title":""},{"docid":"d72bf6b8896201622d4f23b8c68ab1bf","score":"0.5926096","text":"Public Static Function RemoveArrayKey(&$Array, $Element)\n\t{\n\t\t$Output = array();\n\t\tforeach($Array as $Key=>$Value)\n\t\t{\n\t\t\tif($Element !== $Key)\n\t\t\t\t$Output[$Key] = $Value;\n\t\t}\n\t\t$Array = $Output;\n\t}","title":""},{"docid":"0c9931feb6cd39f42002842e8cd8364c","score":"0.59198844","text":"function search_n_remove_valuefromArray($array,$value)\n{\n\tif (($key = array_search($value, $array)) !== false) {\n \t unset($array[$key]);\n\t}\n\treturn $array;\n}","title":""},{"docid":"7b7ab8d71292594c3a00c90ba0566ff2","score":"0.5911409","text":"Public Static Function RemoveArrayElement(&$Array, $Element)\n\t{\n\t\t$Output = array();\n\t\tforeach($Array as $Key=>$Value)\n\t\t{\n\t\t\tif($Element !== $Value)\n\t\t\t\t$Output[$Key] = $Value;\n\t\t}\n\t\t$Array = $Output;\n\t}","title":""},{"docid":"adb4c3f0b43fc58399da78b052b05c03","score":"0.58731043","text":"function array_delete(&$array, $value)\n {\n foreach ($array as $index => $item) {\n if ($value == $item) {\n unset($array[$index]);\n }\n }\n }","title":""},{"docid":"9923550625a0a147daaa6f609730b63c","score":"0.5825495","text":"function grabElement($array, $index){\n\t\t\tunset($array[$index]);\n\t\t\t$array = array_values($array);\n\t\t\treturn $array;\n\t\t}","title":""},{"docid":"dd202af17e750a677675396482a67b50","score":"0.58190316","text":"function deleteArray($array)\n{\n // Now delete every item, but leave the array itself intact:\n foreach ($array as $i => $value) {\n unset($array[$i]);\n }\n}","title":""},{"docid":"5011630f4b9a7989240dafadb58b8be3","score":"0.5816838","text":"public function myArraySplice() {\n return array_splice($this->arr1, 1, 3, array(\"x\" => 9, \"y\" => 8));\n }","title":""},{"docid":"0ddb4979a6cb5712aeb457d31f2e0578","score":"0.57933974","text":"public static function removeFromArray($arr,$item){\n $ret = [];\n $i = 0;\n foreach($arr as $a){\n if ($a != $item || $i == 1){\n $ret[] = $a;\n }\n if ($a == $item){\n $i = 1;\n }\n }\n return $ret;\n }","title":""},{"docid":"13dbd4d34655d168c0b83a4e86ac2019","score":"0.57749856","text":"function array_forget(&$array, $keys)\n {\n return Arr::forget($array, $keys);\n }","title":""},{"docid":"13dbd4d34655d168c0b83a4e86ac2019","score":"0.57749856","text":"function array_forget(&$array, $keys)\n {\n return Arr::forget($array, $keys);\n }","title":""},{"docid":"f5ab5eca2c4e8345e0fe92aff87c7302","score":"0.5742579","text":"public function eliminar($_array_data){\n\t\treturn $this->modelo->eliminar($_array_data);\n\t}","title":""},{"docid":"ad82d208389a0dc75e519ec06715d670","score":"0.5720066","text":"function remove_array($v,$a) {\r\n\r\n$array=explode(',',$a);\r\n//check if value is already in array\r\nif (in_array($v, $array)){\r\n$key=array_search($v,$array);\r\narray_splice($array,$key,1);\r\n}\r\nreturn implode(',',$array);\r\n\r\n}","title":""},{"docid":"c70e7ba298449b7f8510bcec6104f3eb","score":"0.571839","text":"function array_forget(&$array, $keys)\n {\n Arr::forget($array, $keys);\n }","title":""},{"docid":"efd5aec07498165bbc26a0d8667f815e","score":"0.5713354","text":"public static function removeValue(array &$array, $value) {\n if (($key = array_search($value, $array)) !== FALSE) {\n unset($array[$key]);\n }\n if (static::isSequential($array)) {\n array_values($array);\n }\n }","title":""},{"docid":"0296c564ba72f75d596b7a5a545f7859","score":"0.57081753","text":"function solution2($A) {\n\n if(count($A) == 1) {\n return array_shift($A);\n }\n\n $first = array_shift($A);\n $found = array_search($first, $A, true);\n if ($found !== false){\n unset($A[$found]);\n return solution2(array_values($A));\n } else {\n return $first;\n }\n}","title":""},{"docid":"267558e6b407cf2b1b81cae3a7fcdd74","score":"0.56893134","text":"function array_remove(&$array, $value) {\n\tforeach($array as $k => $v) {\n\t\tif ($v == $value) {\n\t\t\tunset($array[$k]);\n\t\t}\n\t}\n\tprint_r($array);\n}","title":""},{"docid":"9dc699090c9232aa204a2141c65c1021","score":"0.5685235","text":"function array_remove_value() {\n\t\t\t$args = func_get_args();\n\t\t\t$arr = $args[0];\n\t\t\t$values = array_slice($args,1);\n\t\t\tforeach($arr as $k=>$v) {\n\t\t\t\tif(in_array($v, $values))\n\t\t\t\t\tunset($arr[$k]);\n\t\t\t}\n\t\t\treturn $arr;\n\t\t}","title":""},{"docid":"ef12e4f6c30853d9ce224e637241df81","score":"0.5680133","text":"function array_remove( $array, $remove ) {\n\tif ( !is_array( $remove ) ) {\n\t\t$remove = array( $remove );\n\t}\n\treturn array_values( array_diff( $array, $remove ) );\n}","title":""},{"docid":"5a72be196c3daf46dbd053f19167c352","score":"0.5675407","text":"function stpArrayRemoveEmpty($arr)\r\n{\r\n\r\n\tif(!is_array($arr)) {\r\n\t\techo \"Make sure the parameter is an array\";\r\n\t}\r\n\telse {\r\n\t\t$arr = array_filter($arr);\r\n\t}\r\n\treturn $arr;\r\n}","title":""},{"docid":"533bb9d7020a808f015d20f0c97bf2ec","score":"0.56724566","text":"function deleteLast($in){\n\t\treturn deleteIndex($in, sizeOf($in)-1);\n\t}","title":""},{"docid":"96a19ec18733cbb33e8930e5b2128ea0","score":"0.56384766","text":"function remove_value(&$array, $value) {\r\n\t\t$index = array_search($value, $array);\r\n\t\tif ($index !== false)\r\n\t\t\tunset($array[$index]);\r\n\t}","title":""},{"docid":"88b28debee818e10e49b43daae8e1c87","score":"0.56165224","text":"public static function arrayDelete(int $idx, array $array): ?array\n {\n if (isset($array[$idx])) {\n unset($array[$idx]);\n if (is_array($array)) { \n $array = array_values($array);\n } else {\n $array = null;\n }\n }\n\n return $array;\n }","title":""},{"docid":"43d65a555afc561136931f9a89d0e24c","score":"0.55889034","text":"function array_delete($ary,$key_to_be_deleted) {\n $new = array(); \n if(is_string($key_to_be_deleted)) { \n if(!array_key_exists($key_to_be_deleted,$ary)) { \n return; \n } \n foreach($ary as $key => $value) { \n if($key != $key_to_be_deleted) { \n $new[$key] = $value; \n } \n } \n $ary = $new; \n } \n if(is_array($key_to_be_deleted)) { \n foreach($key_to_be_deleted as $del) { \n $ary=array_delete($ary,$del); \n } \n } \n\t return ($ary);\n\t}","title":""},{"docid":"ac532f061f5d10fc2b245192794f8e85","score":"0.55752784","text":"public function arrayUnset($array, $key)\n {\n unset($array[$key]);\n\n return $array;\n }","title":""},{"docid":"3fc1e2b23342ba56ebde7b0f5a623186","score":"0.5564978","text":"private function array_index_remove( $target_array,$target_id )\n\t{\n\t\tforeach($target_array as $key => $val)\n\t\t{\n\t\t\tif ($val['question_id'] === $target_id ){\n\t\t\t\t$final_key = $key;\n\t\t\t}\n\t\t}\n\t\t//ARAAY INDEX REMOVED \n\t\tunset($target_array[$final_key]);\n\t\t//REORDER ARRAY INDEX\n\t\tsort($target_array);\n\t\treturn $target_array;\n\t}","title":""},{"docid":"e34cde3381c06f306740e727458e0ccf","score":"0.5563348","text":"function removeIntegerIndexesFromArray($data)\r\n {\r\n foreach (array_keys($data) as $key) {\r\n if (is_numeric($key)) {\r\n unset($data[$key]);\r\n }\r\n }\r\n return $data;\r\n }","title":""},{"docid":"1e5ba60552b949a72ea0da3b1989fb09","score":"0.5534026","text":"function removeUnwantedColumn($inputArray, $remove){\n $out = [];\n foreach ($inputArray as $line){\n $temp = [];\n $count = 0;\n foreach ($line as $item){\n if($count != $remove){\n array_push($temp,$item);\n }\n $count++;\n }\n array_push($out,$temp);\n }\n return $out;\n}","title":""},{"docid":"e8f096b25c8746d5cf71c38d0e2dd7a6","score":"0.55178523","text":"public function offsetUnset($index);","title":""},{"docid":"e8f096b25c8746d5cf71c38d0e2dd7a6","score":"0.55178523","text":"public function offsetUnset($index);","title":""},{"docid":"409184e28e7582ac59e2b2d8f2390065","score":"0.5516824","text":"function removeElementWithValue($array, $key){\n foreach($array as $subKey => $subArray){\n\t\t\t if(empty($subArray[$key]))\n unset($array[$subKey]);\n }\n \n return $array;\n}","title":""},{"docid":"dfef4573a1a76b97950c58079fb7c112","score":"0.54975045","text":"function PMA_arrayRemove($path, &$array)\r\n{\r\n $keys = explode('/', $path);\r\n $keys_last = array_pop($keys);\r\n $path = array();\r\n $depth = 0;\r\n\r\n $path[0] =& $array;\r\n $found = true;\r\n // go as deep as required or possible\r\n foreach ($keys as $key) {\r\n if (! isset($path[$depth][$key])) {\r\n $found = false;\r\n break;\r\n }\r\n $depth++;\r\n $path[$depth] =& $path[$depth-1][$key];\r\n }\r\n // if element found, remove it\r\n if ($found) {\r\n unset($path[$depth][$keys_last]);\r\n $depth--;\r\n }\r\n\r\n // remove empty nested arrays\r\n for (; $depth >= 0; $depth--) {\r\n if (! isset($path[$depth+1]) || count($path[$depth+1]) == 0) {\r\n unset($path[$depth][$keys[$depth]]);\r\n } else {\r\n break;\r\n }\r\n }\r\n}","title":""},{"docid":"01066055ad60e1fb96a053d2e2061647","score":"0.54959047","text":"public function offsetUnset($index) { }","title":""},{"docid":"9790834fd4e57274f77da2e55c3eb3db","score":"0.548071","text":"function del_by_value($array, $del_val)\n {\n return array_values(array_diff($array, array($del_val)));\n }","title":""},{"docid":"aeae3a1605c8b73b8b0cb6c2d798cf44","score":"0.54792607","text":"function clearArray($array) {\n\n if (!is_array($array) || count($array) == 0) {\n\n $this->setError('An error occured : Invalid Arguments Supplied');\n\n return false;\n\n }\n\n foreach ($array as $key => $val) {\n\n if (!array_key_exists($key, $this->fields))\n\n unset($array[$key]);\n\n }\n\n return $array;\n\n }","title":""},{"docid":"8ea736a5aebeeec5ff2afb0cdaa3fab6","score":"0.54366493","text":"static function removeArrayValueByKey(array $array, $search) {\n\t $array = new ArrayObject($array);\n\t $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($array), RecursiveIteratorIterator::CHILD_FIRST);\n\t foreach ($iterator as $key => $value) {\n\t if ($search === $key) {\n\t $iterator->offsetUnset($key);\n\t }\n\t }\n\t return $array->getArrayCopy();\n\t}","title":""},{"docid":"c73dd016200998ffd9afef55b9210ed1","score":"0.54363364","text":"private function removeElement($element, &$array)\n {\n $key = array_search($element, $array, true);\n\n if ($key !== false) {\n unset($array[$key]);\n }\n }","title":""},{"docid":"71dce18754aad2eaca56d9cb84a34b2e","score":"0.54352766","text":"function array_first($a, $d = null) {\n if (count($a)) {\n return array_shift($a);\n }\n\n if (func_num_args() > 1) {\n return $d;\n }\n\n error('Cannot get first element of empty array ' . spy($a) . '.');\n}","title":""},{"docid":"de54396a3edc8be65e26c47ff19b09c5","score":"0.54336864","text":"static function first( $array ) {\n return array_shift( $array );\n }","title":""},{"docid":"cef58d679d93ecb0ec4dfd48a15c2119","score":"0.5406539","text":"function deleteEmpties( $item ){\n\t\t$item = array_map('array_filter', $item);\n\t\t$item = array_filter( $item, function( ){} );\n\n\t\treturn $item;\n\t}","title":""},{"docid":"fb7f47559fda13cbc331da54f0dca0d8","score":"0.5394619","text":"function removeCard($card, $arr) {\n $key = array_search($card, $arr);\n array_splice($arr, $key, 1);\n\n return $arr;\n }","title":""},{"docid":"8e2a648fdb142ae12ceecf771e7882c2","score":"0.5393777","text":"function remove_empty($a, $token = \"\") {\n\t$a2 = $a;\n\tforeach ($a as $k => $v) {\n\t\tif ($v == $token) {\n\t\t\tunset($a2[$k]);\n\t\t}\n\t}\n\treturn $a2;\n}","title":""},{"docid":"d1f633d34127dcb3a882d7b40acb5d02","score":"0.5377216","text":"function kws_array_remove_empty($haystack) {\n\n\t$haystack = (array)$haystack;\n\n foreach ($haystack as $key => $value) {\n if (is_array($value)) {\n $haystack[$key] = kws_array_remove_empty($haystack[$key]);\n }\n\n if (empty($haystack[$key])) {\n unset($haystack[$key]);\n }\n }\n\n return $haystack;\n}","title":""},{"docid":"c2b3a20f9510ed82d019122db5c7c13a","score":"0.53661954","text":"protected function removeArrayValue(array &$array, array &$arrayPath)\n {\n if (count($arrayPath) == 1) {\n $array[$arrayPath[0]] = [];\n } else {\n $key = array_shift($arrayPath);\n $this->removeArrayValue($array[$key], $arrayPath);\n }\n }","title":""},{"docid":"ac35171d3c389dc08922d6b33c89ba91","score":"0.5364741","text":"function minus_array_values($old_item_array, $item_array) {\n\t// In order to work out what to remove from the $session_array, the $old_item_array\n\t// must exist.\n\tif (is_not_empty_array($old_item_array) && is_not_empty_array($item_array)) {\n\t\t$new_array = array();\n\n\t\treset($old_item_array);\n\t\twhile (list(, $value) = each($old_item_array)) {\n\t\t\tif (!in_array($value, $item_array)) {\n\t\t\t\tarray_push($new_array, $value);\n\t\t\t}\n\t\t}\n\t\treturn $new_array;\n\t} else\n\t\treturn $old_item_array;\n}","title":""},{"docid":"0ea5139612a3ba8561822d003d67bc0c","score":"0.5357996","text":"public static function delete(&$array, $index) {\r\n\t\t$loc = &$array;\r\n\t\t$parts = explode('/', $index);\r\n\t\twhile(count($parts) > 1) {\r\n\t\t\t$step = array_shift($parts);\r\n\t\t\tif(!isset($loc[$step])) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$loc = &$loc[$step];\r\n\t\t}\r\n\t\tunset($loc[array_shift($parts)]);\r\n\t\treturn $array;\r\n\t}","title":""},{"docid":"4dfd4e1569a1da522af46eea46b760b4","score":"0.5347036","text":"public static function array_remove(&$array, $value)\n {\n return array_filter($array, function($a) use($value) {\n return $a !== $value;\n });\n }","title":""},{"docid":"dbd261b3128c38ef72dfb039a1bf7215","score":"0.5340487","text":"public function arrayRemove(&$array, $key, $default = null)\n {\n if (is_array($array) && (isset($array[$key]) || array_key_exists($key, $array))) {\n $value = $array[$key];\n unset($array[$key]);\n\n return $value;\n }\n\n return $default;\n }","title":""},{"docid":"b5dc7aecfbeb4533bb167f1c90d1fe03","score":"0.5328492","text":"function _deleteArticleFromArray ($articlesArray, $itemId) {\n\t\tforeach ($articlesArray as $key => $article) {\n\t\t\tif ($article->getItemId() == $itemId){\n\t\t\t\tunset ($articlesArray [$key] );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $articlesArray;\n\t}","title":""},{"docid":"5ed1b2cba00b9a64bfea1bbdd099a5c9","score":"0.5297816","text":"function testUnset() {\n\t$arr = array(\n\t\t\"something\" => \"special\",\n\t\t\"another\" => \"hello\"\n\t);\n\n\n\n\tprint_r($arr);\n\n\tunset($arr['something']);\n\tprint(\"
    \");\n\n\tprint_r($arr);\n}","title":""},{"docid":"1068103e978b092c05b49ea5633882fc","score":"0.5265458","text":"function removeElementWithValue($array, $key, $value){\n\t\t\t foreach($array as $subKey => $subArray){\n\t\t\t\t if($subArray[$key] == $value){\n\t\t\t\t\t unset($array[$subKey]);\n\t\t\t\t }\n\t\t\t }\n\t\t\t return $array;\n\t\t}","title":""},{"docid":"4626d126148c4600892ff9a86de6276a","score":"0.52551496","text":"function test_splice ($replacement)\n{\n $input_array=array(0,1);\n var_dump (array_splice (&$input_array,2,0,$replacement));\n var_dump ($input_array);\n}","title":""},{"docid":"15cc3d855e705759defc306211d6cee7","score":"0.5254339","text":"private function removeElementAtIndexFromArray($index, &$arrElemArray)\n\t{\n\t\t$ret = false;\n\t\t\n\t\t// We want to be sure that validator was called before calling this function\n\t\tif($this->isValidIndexAndArray($index, $arrElemArray))\n\t\t{\n\t\t\t// OK\n\t\t\tunset($arrElemArray[$index]);\n\t\t\t$ret = true;\n\t\t\t\n\t\t\t/*DEBUG*/ $this->debugger->push(\"Element at index &#39;{$index}&#39; removed from array\");\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}","title":""},{"docid":"c6ec23345e17b47f2a8c1e47a93f19d6","score":"0.52521825","text":"function removeAt( $index );","title":""},{"docid":"0043efaec1a3631405425440bb3aed5d","score":"0.5244331","text":"public function clearIndex();","title":""},{"docid":"0043efaec1a3631405425440bb3aed5d","score":"0.5244331","text":"public function clearIndex();","title":""},{"docid":"8c7962d571aea17e264a365722230f22","score":"0.52316105","text":"public function offsetUnset ($index)\n\t{\n\t\t$value = $this->offsetGet($index);\n\n\t\tif ($index == 0) {\n\t\t\treturn array_shift($this->storage);\n\t\t}\n\n\t\tif ($index == $this->count() - 1) {\n\t\t\treturn array_pop($this->storage);\n\t\t}\n\n\t\t$new = $this->slice(0, $index - 1);\n\t\t$new->push($this->slice($index, $this->count()));\n\n\t\t$this->storage = $new->to_array();\n\n\t\treturn $value;\n\t}","title":""},{"docid":"332a03693ce4c1fa42de928ee7aced31","score":"0.5229292","text":"public function offsetUnset( $index ): void;","title":""},{"docid":"754bb599eefa0da1de9a2001628573c0","score":"0.52107626","text":"public function ClearArray()\r\n\t{\r\n\t\t$this->array = NULL;\r\n\t}","title":""},{"docid":"c31908d580597582aed3b12bbff60abd","score":"0.52068627","text":"function array_delete_value(&$array, $value) {\n\tforeach (array_keys($array, $value) as $k) unset($array[$k]);\n}","title":""},{"docid":"c4ed4c6e69a4826ee2e228e61741a778","score":"0.5199156","text":"public function offsetUnset($offset){ }","title":""},{"docid":"e2f564fabf357a8a3841fdc4d7aac0c9","score":"0.5194369","text":"function stpArrayRemoveEmptyOrder($arr)\r\n{\r\n\r\n\t$arr = array_filter($arr);\r\n\r\n\t$newMy = array();\r\n\t$i = 0;\r\n\r\n\tforeach($arr as $key => $value) {\r\n\t\tif(!is_null($value)) {\r\n\t\t\t$newMy[$i] = $value;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}\r\n\treturn $newMy;\r\n}","title":""},{"docid":"68746306683d1d5b9e6a3fe6079371e0","score":"0.518851","text":"public static function drop($array, $n = 1)\n {\n return array_slice($array, $n);\n }","title":""},{"docid":"d054cc621fe4e8b85b621417eb6df65b","score":"0.5185434","text":"function unset_key(&$array = array(), $key)\n{\n\tif (is_array($array) && array_key_exists($key, $array))\n\t{\t\t\n\t\tunset($array[$key]);\n\t}\n}","title":""},{"docid":"80d95805d5cecb9f1abacc6743cc1f2e","score":"0.5166289","text":"function remove_duplicates(array $array){\n\t\t\t\t$tmp_array = array();\n\n\t\t\t\tforeach($array as $key => $val) {\n\t\t\t\t\tif (!in_array($val, $tmp_array)) {\n\t\t\t\t\t\t$tmp_array[$key] = $val;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn $tmp_array;\n\t\t\t}","title":""},{"docid":"fc709cf2e30982937cfcb0cf8ef4fdd8","score":"0.5161099","text":"public function array_delete_key($arr, $key)\n {\n $last = sizeof($arr) - 1;\n $arr[$key] = $arr[$last];\n unset($arr[$last]);\n return $arr;\n }","title":""},{"docid":"c0bfee81be916ad6c720daff16b16b7c","score":"0.51569295","text":"public function offsetUnset( $offset ) {}","title":""},{"docid":"83d3ac1d9f726ca90eef96c03c6f5111","score":"0.5151905","text":"function array_key_first($array){\n\treset($array);\n\treturn key($array);\n}","title":""},{"docid":"3d44a556fd799b959e3660077d1ccc45","score":"0.5144177","text":"public static function remove(array &$array, $item, $searchStrict = true)\n {\n if (($key = array_search($item, $array, $searchStrict)) !== false) {\n array_splice($array, $key, 1);\n }\n\n return $array;\n }","title":""},{"docid":"ffd181e6eba23a8e267fdb39a62bee7f","score":"0.5133503","text":"public function offsetUnset(int $offset) {}","title":""},{"docid":"081f191fa3b66848314eed8cdd742f21","score":"0.5131817","text":"function array_without(array $array, mixed ...$values): array\n {\n foreach (variadic_array($values) as $value) {\n if (($key = array_search($value, $array)) !== false) {\n unset($array[$key]);\n }\n }\n\n return $array;\n }","title":""},{"docid":"69fedd5f886c0ebdec705e3da1b32504","score":"0.5114989","text":"function deleteArrayDuplicates(array $array)\n{\n if (count($array) < 2) {\n return count($array);\n }\n\n $writeIndex = 0;\n\n for ($i = 1; $i < count($array); ++$i) {\n if ($array[$writeIndex] != $array[$i]) {\n $array[++$writeIndex] = $array[$i];\n }\n }\n\n return $writeIndex + 1;\n}","title":""},{"docid":"88d504d0a34d267fbf93d3f13b0ded78","score":"0.5109864","text":"public static function unique_multidim_array_except($array, $key,$key_current) {\n\t\t$temp_array = array();\n\t\t$i = 0;\n\t\t$key_array = array();\n\t\t\n\t\tforeach($array as $val) {\n\t\t\tif (!in_array($val[$key], $key_array) && !in_array($val[$key], $key_current) ) {\n\t\t\t\t$key_array[$i] = $val[$key];\n\t\t\t\t$temp_array[$i] = $val;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn $temp_array;\n\t}","title":""},{"docid":"c1d2a51f1fb7e58b931151cac5ca45ee","score":"0.51094955","text":"function array_duplicates($a=array())\n{\n\t$unique = array_unique($a);\n\tforeach($unique as $k => $v)\n\t\tunset($a[$k]);\n\treturn array_unique($a);\n}","title":""},{"docid":"4f05eac2ba9565287fd1e41d9760ff45","score":"0.5103692","text":"function deduplicate_array($value1, $value2) {\n\t$value1 = get_array_for_value ( $value1 );\n\t$value2 = get_array_for_value ( $value2 );\n\t\n\t// remove duplicates\n\tforeach ( $value1 as $key => $val ) {\n\t\tif (in_array ( $val, $value2 )) {\n\t\t\tunset ( $value1 [$key] );\n\t\t}\n\t}\n\treturn $value1;\n}","title":""},{"docid":"68d8f7a3cc47b050a460deba1af735a7","score":"0.5098572","text":"private function clean($table,$arr1){\n\t\t// if only 1 record exists in array , array is removed to single value\n\t\t// Acts as save function for 'add' function\n\t\t$arr1=array_filter($arr1);\n\t\tforeach($arr1 as $kx=>$vx){\n\t\t\tif(is_array($vx)){\n\t\t\t\t$vx=array_unique($vx);\n\t\t\t\t$vx=array_filter($vx);\n\t\t\t\tif(count($vx)==1){\n\t\t\t\t\t$vx=array_values($vx);\n\t\t\t\t\t$arr1[$kx]=$vx[0];\n\t\t\t\t} else {\n\t\t\t\t\t$arr1[$kx]=$vx;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->save($table,$arr1);\n\t}","title":""},{"docid":"36b1ca932cd785689616e3eeb69af092","score":"0.5096617","text":"function moveElement(&$array, $a, $b) {\n $out = array_splice($array, $a, 1);\n array_splice($array, $b, 0, $out);\n return $array;\n }","title":""},{"docid":"c43ecd08ae599b3e131d3040630bc257","score":"0.50780517","text":"function array_clear_key($ar, $key_value)\r\n{\r\n\tif (!is_array($ar)) { return $ar; }\r\n\twhile (list($k, $v) = each($ar))\r\n\t{\r\n\t\tif (is_array($v))\r\n\t\t{\r\n\t\t\t$ar[$k] = array_clear_key($v, $key_value);\r\n\t\t}\r\n\t\telse if (isset($ar[$key_value]))\r\n\t\t{\r\n\t\t\t$ar[$k] = '';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$ar[$k] = $v;\r\n\t\t}\r\n\t}\r\n\treturn $ar;\r\n}","title":""},{"docid":"4dd0d9f4ee9ebc25d6fb2ee45b0f0b84","score":"0.50699735","text":"public function deleteFirstElement ()\n\t\t{\n\t\t\treturn $this->main_node->deleteFirstElement();\n\t\t}","title":""},{"docid":"6d32e3e4783eaa6568899bbf22fbbdd2","score":"0.50676155","text":"public static function arrayUnique($myArray)\n\t{\n\t\treturn is_array($myArray) ? ArrayHelper::arrayUnique($myArray) : $myArray;\n\t}","title":""},{"docid":"67d3363ddb0f9a4da0ec3e2a9007cbc2","score":"0.5066923","text":"function unsetBit($index);","title":""},{"docid":"88a97c60db41060bcef0b8e4b62e71f4","score":"0.50646836","text":"public static function unset_empty(array $input)\n\t{\n\t\tif (! is_array($input) || empty($input)) {\n\t\t\treturn array();\n\t\t}\n\n\t\tforeach ($input as $key => $value) {\n\t\t\tif (is_string($value) && $value == '') {\n\t\t\t\tunset($input[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $input;\n\t}","title":""},{"docid":"90ee2a4955b907204db51affb439ba71","score":"0.5052413","text":"public function clear_array($array){\n\n\t\t\t$new=array();\n\t\t\t$i=0;\n\n\t\t\tforeach ($array as $key => $value) {\n\n\t\t\t\t\t$new[$i]['id'] \t\t= $value['id_contact'];\n\t\t\t\t\t$new[$i]['name'] \t\t= $value['contact_name'].' '.$value['last_name'];\n\t\t\t\t\t$new[$i]['area'] \t\t= $value['type_job'];\n\t\t\t\t\t$new[$i]['city'] = $value['city'];\n\t\t\t\t\t$new[$i]['state']\t\t= $value['contact_state'];\n\t\t\t\t\t$new[$i]['email'] = $value['email'];\n\t\t\t\t\t$new[$i]['created_at'] = $value['contact_date']; \t\t\t \n\t\t\t\t\t\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\n\t\t\t\treturn $new;\n\t\t}","title":""},{"docid":"c4e7a99f4cf61895374da9c434f5226b","score":"0.5051778","text":"function array_compact($array) {\n\treturn array_filter($array, function($item){\n\t\treturn isset($item);\n\t});\n}","title":""},{"docid":"4d15d4498845410324dafb16578422bf","score":"0.50498164","text":"public function deleteFirstElement ()\n\t\t{\n\t\t\t$correcto = false;\t\t# Indica si se ha podido eliminarlo.\n\n\t\t\tif ( count( $this->elements ) ) {\n\t\t\t\t$correcto = true;\n\t\t\t\tunset( $this->elements[ 0 ] );\n\t\t\t}\n\n\t\t\treturn $correcto;\n\t\t}","title":""},{"docid":"d91d840b3b1f4c63ece4874ad2e1522c","score":"0.5047872","text":"function offsetUnset($offset) \n {\n return $this->delete($offset);\n }","title":""},{"docid":"8ea8c6f52a8a96b708be735a5f15f61e","score":"0.50451463","text":"public static function filter_array($array): array\n {\n if (! is_array($array)) {\n $array = [];\n }\n if (0 === count($array)) {\n $array = [0 => 0];\n }\n\n return array_values(array_unique($array));\n }","title":""},{"docid":"55a5e6e24755df38e2f2548b51f0ab44","score":"0.5044691","text":"public function removeAt($index)\n\t{\n\t\tif(!$this->isReadOnly)\n\t\t\tthrow new \\Exception();\n\t\t\n\t\tif($index >= 0 && $index < $this->index)\n\t\t{\n\t\t\t--$this->index;\n\t\t\tif($index === $this->index)\n\t\t\t{\n\t\t\t\treturn array_pop($this->data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$item = $this->data[$index];\n\t\t\t\tarray_splice($this->data, $index, 1);\n\t\t\t\treturn $item;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tthrow new \\OutOfBoundsException();\n\t}","title":""},{"docid":"e8d5bf31a3fa6dcf4cd2e0f3363c90ed","score":"0.503829","text":"function findDeletedNumber(array $arr, array $mixedArr): int {\n return count($arr) === count($mixedArr) ? 0 : array_values(array_diff($arr,$mixedArr))[0];\n}","title":""},{"docid":"01b95d5c724f8c2254ce0ad61d368417","score":"0.5030382","text":"function array_set_first($array, $key) {\n $first = $array[$key];\n\n unset($array[$key]);\n\n return array_merge([$key => $first], $array);\n}","title":""}],"string":"[\n {\n \"docid\": \"b3ce71f701b0d39600ae5767f4b9fdfe\",\n \"score\": \"0.70402986\",\n \"text\": \"function shoestrap_array_delete( $idx, $array ) { \\n unset( $array[$idx] );\\n return ( is_array( $array ) ) ? array_values( $array ) : null;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e791476bbae84a4479ac3dbcf3274966\",\n \"score\": \"0.6838905\",\n \"text\": \"private function deleteArrayElement($anArray=array(), $index) {\\n unset($anArray[$index]);\\n $anArray = array_values($anArray);\\n\\n return $anArray;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9861ca47d5060f8d712b054227710754\",\n \"score\": \"0.6830198\",\n \"text\": \"function deleteIndex($in, $index){\\n\\t\\tif(gettype($in) !== \\\"array\\\"){\\n\\t\\t\\treturn $in;\\n\\t\\t}\\n\\n\\t\\t$out = array();\\n\\t\\t$i = 0;\\n\\t\\t$size = sizeOf($in);\\n\\n\\t\\tforeach($in as $key => $value){\\n\\t\\t\\tif($i !== $index){\\n\\t\\t\\t\\t$out[$key] = $value;\\n\\t\\t\\t}\\n\\n\\t\\t\\t++$i;\\n\\t\\t}\\n\\n\\t\\treturn $out;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7489c1507bf2213c7cbc8a918fb4e44e\",\n \"score\": \"0.6809874\",\n \"text\": \"function array_unset($array,$index) {\\n $res=array();\\n $i=0;\\n foreach ($array as $item) {\\n if ($i!=$index)\\n $res[]=$item;\\n $i++;\\n }\\n return $res;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"451877d2444516f44273994d51257c57\",\n \"score\": \"0.6371668\",\n \"text\": \"static public function delete_from(&$array, $element) {\\n\\n $pos = array_search($element, $array);\\n for ($i = $pos; $i < count($array); $i++) {\\n\\n $array[$i] = $array[$i + 1];\\n }\\n array_pop($array);\\n return $array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2eb7f3affdeee4de9cf35a63095dae8\",\n \"score\": \"0.6331412\",\n \"text\": \"function removeElement($array,$value) {\\n if (($key = array_search($value, $array)) !== false) {\\n unset($array[$key]);\\n }\\n return $array;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4cbf46a3d14f42edfd46eb992545372d\",\n \"score\": \"0.628373\",\n \"text\": \"public function removeFromArray($data,$value){\\n $data=array_flip($data);\\n unset($data[$value]);\\n $data=array_flip($data);\\n return array_merge(array(),$data);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8949ccff17fa22ae99972742c6ba90e1\",\n \"score\": \"0.60765123\",\n \"text\": \"public function offsetUnset($indice) {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5c4ee155bf47a1443ea2586191d900c\",\n \"score\": \"0.6014415\",\n \"text\": \"function drop(array $input, $number = 1)\\n{\\n return array_slice($input, $number);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"351eac0dcbeed6102cd0bd3c4f5d97d4\",\n \"score\": \"0.5942644\",\n \"text\": \"function deleteMapIndex($in, $index){\\n\\t\\tif(gettype($in) !== \\\"array\\\"){\\n\\t\\t\\treturn $in;\\n\\t\\t}\\n\\n\\t\\t$out = array();\\n\\n\\t\\tforeach($in as $key => $value){\\n\\t\\t\\tif($key !== $index){\\n\\t\\t\\t\\t$out[$key] = $value;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn $out;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e66372c519db3e2dc8e809ebdbab92b8\",\n \"score\": \"0.5930846\",\n \"text\": \"function array_delete(&$array, $value)\\n {\\n $value = \\\\Illuminate\\\\Support\\\\Arr::wrap($value);\\n\\n foreach ($array as $index => $item) {\\n if (in_array($item, $value)) {\\n unset($array[$index]);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d72bf6b8896201622d4f23b8c68ab1bf\",\n \"score\": \"0.5926096\",\n \"text\": \"Public Static Function RemoveArrayKey(&$Array, $Element)\\n\\t{\\n\\t\\t$Output = array();\\n\\t\\tforeach($Array as $Key=>$Value)\\n\\t\\t{\\n\\t\\t\\tif($Element !== $Key)\\n\\t\\t\\t\\t$Output[$Key] = $Value;\\n\\t\\t}\\n\\t\\t$Array = $Output;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c9931feb6cd39f42002842e8cd8364c\",\n \"score\": \"0.59198844\",\n \"text\": \"function search_n_remove_valuefromArray($array,$value)\\n{\\n\\tif (($key = array_search($value, $array)) !== false) {\\n \\t unset($array[$key]);\\n\\t}\\n\\treturn $array;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b7ab8d71292594c3a00c90ba0566ff2\",\n \"score\": \"0.5911409\",\n \"text\": \"Public Static Function RemoveArrayElement(&$Array, $Element)\\n\\t{\\n\\t\\t$Output = array();\\n\\t\\tforeach($Array as $Key=>$Value)\\n\\t\\t{\\n\\t\\t\\tif($Element !== $Value)\\n\\t\\t\\t\\t$Output[$Key] = $Value;\\n\\t\\t}\\n\\t\\t$Array = $Output;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"adb4c3f0b43fc58399da78b052b05c03\",\n \"score\": \"0.58731043\",\n \"text\": \"function array_delete(&$array, $value)\\n {\\n foreach ($array as $index => $item) {\\n if ($value == $item) {\\n unset($array[$index]);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9923550625a0a147daaa6f609730b63c\",\n \"score\": \"0.5825495\",\n \"text\": \"function grabElement($array, $index){\\n\\t\\t\\tunset($array[$index]);\\n\\t\\t\\t$array = array_values($array);\\n\\t\\t\\treturn $array;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd202af17e750a677675396482a67b50\",\n \"score\": \"0.58190316\",\n \"text\": \"function deleteArray($array)\\n{\\n // Now delete every item, but leave the array itself intact:\\n foreach ($array as $i => $value) {\\n unset($array[$i]);\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5011630f4b9a7989240dafadb58b8be3\",\n \"score\": \"0.5816838\",\n \"text\": \"public function myArraySplice() {\\n return array_splice($this->arr1, 1, 3, array(\\\"x\\\" => 9, \\\"y\\\" => 8));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ddb4979a6cb5712aeb457d31f2e0578\",\n \"score\": \"0.57933974\",\n \"text\": \"public static function removeFromArray($arr,$item){\\n $ret = [];\\n $i = 0;\\n foreach($arr as $a){\\n if ($a != $item || $i == 1){\\n $ret[] = $a;\\n }\\n if ($a == $item){\\n $i = 1;\\n }\\n }\\n return $ret;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13dbd4d34655d168c0b83a4e86ac2019\",\n \"score\": \"0.57749856\",\n \"text\": \"function array_forget(&$array, $keys)\\n {\\n return Arr::forget($array, $keys);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13dbd4d34655d168c0b83a4e86ac2019\",\n \"score\": \"0.57749856\",\n \"text\": \"function array_forget(&$array, $keys)\\n {\\n return Arr::forget($array, $keys);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5ab5eca2c4e8345e0fe92aff87c7302\",\n \"score\": \"0.5742579\",\n \"text\": \"public function eliminar($_array_data){\\n\\t\\treturn $this->modelo->eliminar($_array_data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad82d208389a0dc75e519ec06715d670\",\n \"score\": \"0.5720066\",\n \"text\": \"function remove_array($v,$a) {\\r\\n\\r\\n$array=explode(',',$a);\\r\\n//check if value is already in array\\r\\nif (in_array($v, $array)){\\r\\n$key=array_search($v,$array);\\r\\narray_splice($array,$key,1);\\r\\n}\\r\\nreturn implode(',',$array);\\r\\n\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c70e7ba298449b7f8510bcec6104f3eb\",\n \"score\": \"0.571839\",\n \"text\": \"function array_forget(&$array, $keys)\\n {\\n Arr::forget($array, $keys);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"efd5aec07498165bbc26a0d8667f815e\",\n \"score\": \"0.5713354\",\n \"text\": \"public static function removeValue(array &$array, $value) {\\n if (($key = array_search($value, $array)) !== FALSE) {\\n unset($array[$key]);\\n }\\n if (static::isSequential($array)) {\\n array_values($array);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0296c564ba72f75d596b7a5a545f7859\",\n \"score\": \"0.57081753\",\n \"text\": \"function solution2($A) {\\n\\n if(count($A) == 1) {\\n return array_shift($A);\\n }\\n\\n $first = array_shift($A);\\n $found = array_search($first, $A, true);\\n if ($found !== false){\\n unset($A[$found]);\\n return solution2(array_values($A));\\n } else {\\n return $first;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"267558e6b407cf2b1b81cae3a7fcdd74\",\n \"score\": \"0.56893134\",\n \"text\": \"function array_remove(&$array, $value) {\\n\\tforeach($array as $k => $v) {\\n\\t\\tif ($v == $value) {\\n\\t\\t\\tunset($array[$k]);\\n\\t\\t}\\n\\t}\\n\\tprint_r($array);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9dc699090c9232aa204a2141c65c1021\",\n \"score\": \"0.5685235\",\n \"text\": \"function array_remove_value() {\\n\\t\\t\\t$args = func_get_args();\\n\\t\\t\\t$arr = $args[0];\\n\\t\\t\\t$values = array_slice($args,1);\\n\\t\\t\\tforeach($arr as $k=>$v) {\\n\\t\\t\\t\\tif(in_array($v, $values))\\n\\t\\t\\t\\t\\tunset($arr[$k]);\\n\\t\\t\\t}\\n\\t\\t\\treturn $arr;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef12e4f6c30853d9ce224e637241df81\",\n \"score\": \"0.5680133\",\n \"text\": \"function array_remove( $array, $remove ) {\\n\\tif ( !is_array( $remove ) ) {\\n\\t\\t$remove = array( $remove );\\n\\t}\\n\\treturn array_values( array_diff( $array, $remove ) );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a72be196c3daf46dbd053f19167c352\",\n \"score\": \"0.5675407\",\n \"text\": \"function stpArrayRemoveEmpty($arr)\\r\\n{\\r\\n\\r\\n\\tif(!is_array($arr)) {\\r\\n\\t\\techo \\\"Make sure the parameter is an array\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t$arr = array_filter($arr);\\r\\n\\t}\\r\\n\\treturn $arr;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"533bb9d7020a808f015d20f0c97bf2ec\",\n \"score\": \"0.56724566\",\n \"text\": \"function deleteLast($in){\\n\\t\\treturn deleteIndex($in, sizeOf($in)-1);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96a19ec18733cbb33e8930e5b2128ea0\",\n \"score\": \"0.56384766\",\n \"text\": \"function remove_value(&$array, $value) {\\r\\n\\t\\t$index = array_search($value, $array);\\r\\n\\t\\tif ($index !== false)\\r\\n\\t\\t\\tunset($array[$index]);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88b28debee818e10e49b43daae8e1c87\",\n \"score\": \"0.56165224\",\n \"text\": \"public static function arrayDelete(int $idx, array $array): ?array\\n {\\n if (isset($array[$idx])) {\\n unset($array[$idx]);\\n if (is_array($array)) { \\n $array = array_values($array);\\n } else {\\n $array = null;\\n }\\n }\\n\\n return $array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43d65a555afc561136931f9a89d0e24c\",\n \"score\": \"0.55889034\",\n \"text\": \"function array_delete($ary,$key_to_be_deleted) {\\n $new = array(); \\n if(is_string($key_to_be_deleted)) { \\n if(!array_key_exists($key_to_be_deleted,$ary)) { \\n return; \\n } \\n foreach($ary as $key => $value) { \\n if($key != $key_to_be_deleted) { \\n $new[$key] = $value; \\n } \\n } \\n $ary = $new; \\n } \\n if(is_array($key_to_be_deleted)) { \\n foreach($key_to_be_deleted as $del) { \\n $ary=array_delete($ary,$del); \\n } \\n } \\n\\t return ($ary);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac532f061f5d10fc2b245192794f8e85\",\n \"score\": \"0.55752784\",\n \"text\": \"public function arrayUnset($array, $key)\\n {\\n unset($array[$key]);\\n\\n return $array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fc1e2b23342ba56ebde7b0f5a623186\",\n \"score\": \"0.5564978\",\n \"text\": \"private function array_index_remove( $target_array,$target_id )\\n\\t{\\n\\t\\tforeach($target_array as $key => $val)\\n\\t\\t{\\n\\t\\t\\tif ($val['question_id'] === $target_id ){\\n\\t\\t\\t\\t$final_key = $key;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t//ARAAY INDEX REMOVED \\n\\t\\tunset($target_array[$final_key]);\\n\\t\\t//REORDER ARRAY INDEX\\n\\t\\tsort($target_array);\\n\\t\\treturn $target_array;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e34cde3381c06f306740e727458e0ccf\",\n \"score\": \"0.5563348\",\n \"text\": \"function removeIntegerIndexesFromArray($data)\\r\\n {\\r\\n foreach (array_keys($data) as $key) {\\r\\n if (is_numeric($key)) {\\r\\n unset($data[$key]);\\r\\n }\\r\\n }\\r\\n return $data;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e5ba60552b949a72ea0da3b1989fb09\",\n \"score\": \"0.5534026\",\n \"text\": \"function removeUnwantedColumn($inputArray, $remove){\\n $out = [];\\n foreach ($inputArray as $line){\\n $temp = [];\\n $count = 0;\\n foreach ($line as $item){\\n if($count != $remove){\\n array_push($temp,$item);\\n }\\n $count++;\\n }\\n array_push($out,$temp);\\n }\\n return $out;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8f096b25c8746d5cf71c38d0e2dd7a6\",\n \"score\": \"0.55178523\",\n \"text\": \"public function offsetUnset($index);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8f096b25c8746d5cf71c38d0e2dd7a6\",\n \"score\": \"0.55178523\",\n \"text\": \"public function offsetUnset($index);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"409184e28e7582ac59e2b2d8f2390065\",\n \"score\": \"0.5516824\",\n \"text\": \"function removeElementWithValue($array, $key){\\n foreach($array as $subKey => $subArray){\\n\\t\\t\\t if(empty($subArray[$key]))\\n unset($array[$subKey]);\\n }\\n \\n return $array;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dfef4573a1a76b97950c58079fb7c112\",\n \"score\": \"0.54975045\",\n \"text\": \"function PMA_arrayRemove($path, &$array)\\r\\n{\\r\\n $keys = explode('/', $path);\\r\\n $keys_last = array_pop($keys);\\r\\n $path = array();\\r\\n $depth = 0;\\r\\n\\r\\n $path[0] =& $array;\\r\\n $found = true;\\r\\n // go as deep as required or possible\\r\\n foreach ($keys as $key) {\\r\\n if (! isset($path[$depth][$key])) {\\r\\n $found = false;\\r\\n break;\\r\\n }\\r\\n $depth++;\\r\\n $path[$depth] =& $path[$depth-1][$key];\\r\\n }\\r\\n // if element found, remove it\\r\\n if ($found) {\\r\\n unset($path[$depth][$keys_last]);\\r\\n $depth--;\\r\\n }\\r\\n\\r\\n // remove empty nested arrays\\r\\n for (; $depth >= 0; $depth--) {\\r\\n if (! isset($path[$depth+1]) || count($path[$depth+1]) == 0) {\\r\\n unset($path[$depth][$keys[$depth]]);\\r\\n } else {\\r\\n break;\\r\\n }\\r\\n }\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01066055ad60e1fb96a053d2e2061647\",\n \"score\": \"0.54959047\",\n \"text\": \"public function offsetUnset($index) { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9790834fd4e57274f77da2e55c3eb3db\",\n \"score\": \"0.548071\",\n \"text\": \"function del_by_value($array, $del_val)\\n {\\n return array_values(array_diff($array, array($del_val)));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aeae3a1605c8b73b8b0cb6c2d798cf44\",\n \"score\": \"0.54792607\",\n \"text\": \"function clearArray($array) {\\n\\n if (!is_array($array) || count($array) == 0) {\\n\\n $this->setError('An error occured : Invalid Arguments Supplied');\\n\\n return false;\\n\\n }\\n\\n foreach ($array as $key => $val) {\\n\\n if (!array_key_exists($key, $this->fields))\\n\\n unset($array[$key]);\\n\\n }\\n\\n return $array;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ea736a5aebeeec5ff2afb0cdaa3fab6\",\n \"score\": \"0.54366493\",\n \"text\": \"static function removeArrayValueByKey(array $array, $search) {\\n\\t $array = new ArrayObject($array);\\n\\t $iterator = new RecursiveIteratorIterator(new RecursiveArrayIterator($array), RecursiveIteratorIterator::CHILD_FIRST);\\n\\t foreach ($iterator as $key => $value) {\\n\\t if ($search === $key) {\\n\\t $iterator->offsetUnset($key);\\n\\t }\\n\\t }\\n\\t return $array->getArrayCopy();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c73dd016200998ffd9afef55b9210ed1\",\n \"score\": \"0.54363364\",\n \"text\": \"private function removeElement($element, &$array)\\n {\\n $key = array_search($element, $array, true);\\n\\n if ($key !== false) {\\n unset($array[$key]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71dce18754aad2eaca56d9cb84a34b2e\",\n \"score\": \"0.54352766\",\n \"text\": \"function array_first($a, $d = null) {\\n if (count($a)) {\\n return array_shift($a);\\n }\\n\\n if (func_num_args() > 1) {\\n return $d;\\n }\\n\\n error('Cannot get first element of empty array ' . spy($a) . '.');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de54396a3edc8be65e26c47ff19b09c5\",\n \"score\": \"0.54336864\",\n \"text\": \"static function first( $array ) {\\n return array_shift( $array );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cef58d679d93ecb0ec4dfd48a15c2119\",\n \"score\": \"0.5406539\",\n \"text\": \"function deleteEmpties( $item ){\\n\\t\\t$item = array_map('array_filter', $item);\\n\\t\\t$item = array_filter( $item, function( ){} );\\n\\n\\t\\treturn $item;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb7f47559fda13cbc331da54f0dca0d8\",\n \"score\": \"0.5394619\",\n \"text\": \"function removeCard($card, $arr) {\\n $key = array_search($card, $arr);\\n array_splice($arr, $key, 1);\\n\\n return $arr;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e2a648fdb142ae12ceecf771e7882c2\",\n \"score\": \"0.5393777\",\n \"text\": \"function remove_empty($a, $token = \\\"\\\") {\\n\\t$a2 = $a;\\n\\tforeach ($a as $k => $v) {\\n\\t\\tif ($v == $token) {\\n\\t\\t\\tunset($a2[$k]);\\n\\t\\t}\\n\\t}\\n\\treturn $a2;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1f633d34127dcb3a882d7b40acb5d02\",\n \"score\": \"0.5377216\",\n \"text\": \"function kws_array_remove_empty($haystack) {\\n\\n\\t$haystack = (array)$haystack;\\n\\n foreach ($haystack as $key => $value) {\\n if (is_array($value)) {\\n $haystack[$key] = kws_array_remove_empty($haystack[$key]);\\n }\\n\\n if (empty($haystack[$key])) {\\n unset($haystack[$key]);\\n }\\n }\\n\\n return $haystack;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2b3a20f9510ed82d019122db5c7c13a\",\n \"score\": \"0.53661954\",\n \"text\": \"protected function removeArrayValue(array &$array, array &$arrayPath)\\n {\\n if (count($arrayPath) == 1) {\\n $array[$arrayPath[0]] = [];\\n } else {\\n $key = array_shift($arrayPath);\\n $this->removeArrayValue($array[$key], $arrayPath);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac35171d3c389dc08922d6b33c89ba91\",\n \"score\": \"0.5364741\",\n \"text\": \"function minus_array_values($old_item_array, $item_array) {\\n\\t// In order to work out what to remove from the $session_array, the $old_item_array\\n\\t// must exist.\\n\\tif (is_not_empty_array($old_item_array) && is_not_empty_array($item_array)) {\\n\\t\\t$new_array = array();\\n\\n\\t\\treset($old_item_array);\\n\\t\\twhile (list(, $value) = each($old_item_array)) {\\n\\t\\t\\tif (!in_array($value, $item_array)) {\\n\\t\\t\\t\\tarray_push($new_array, $value);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn $new_array;\\n\\t} else\\n\\t\\treturn $old_item_array;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ea5139612a3ba8561822d003d67bc0c\",\n \"score\": \"0.5357996\",\n \"text\": \"public static function delete(&$array, $index) {\\r\\n\\t\\t$loc = &$array;\\r\\n\\t\\t$parts = explode('/', $index);\\r\\n\\t\\twhile(count($parts) > 1) {\\r\\n\\t\\t\\t$step = array_shift($parts);\\r\\n\\t\\t\\tif(!isset($loc[$step])) {\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t$loc = &$loc[$step];\\r\\n\\t\\t}\\r\\n\\t\\tunset($loc[array_shift($parts)]);\\r\\n\\t\\treturn $array;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4dfd4e1569a1da522af46eea46b760b4\",\n \"score\": \"0.5347036\",\n \"text\": \"public static function array_remove(&$array, $value)\\n {\\n return array_filter($array, function($a) use($value) {\\n return $a !== $value;\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbd261b3128c38ef72dfb039a1bf7215\",\n \"score\": \"0.5340487\",\n \"text\": \"public function arrayRemove(&$array, $key, $default = null)\\n {\\n if (is_array($array) && (isset($array[$key]) || array_key_exists($key, $array))) {\\n $value = $array[$key];\\n unset($array[$key]);\\n\\n return $value;\\n }\\n\\n return $default;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5dc7aecfbeb4533bb167f1c90d1fe03\",\n \"score\": \"0.5328492\",\n \"text\": \"function _deleteArticleFromArray ($articlesArray, $itemId) {\\n\\t\\tforeach ($articlesArray as $key => $article) {\\n\\t\\t\\tif ($article->getItemId() == $itemId){\\n\\t\\t\\t\\tunset ($articlesArray [$key] );\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn $articlesArray;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ed1b2cba00b9a64bfea1bbdd099a5c9\",\n \"score\": \"0.5297816\",\n \"text\": \"function testUnset() {\\n\\t$arr = array(\\n\\t\\t\\\"something\\\" => \\\"special\\\",\\n\\t\\t\\\"another\\\" => \\\"hello\\\"\\n\\t);\\n\\n\\n\\n\\tprint_r($arr);\\n\\n\\tunset($arr['something']);\\n\\tprint(\\\"
    \\\");\\n\\n\\tprint_r($arr);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1068103e978b092c05b49ea5633882fc\",\n \"score\": \"0.5265458\",\n \"text\": \"function removeElementWithValue($array, $key, $value){\\n\\t\\t\\t foreach($array as $subKey => $subArray){\\n\\t\\t\\t\\t if($subArray[$key] == $value){\\n\\t\\t\\t\\t\\t unset($array[$subKey]);\\n\\t\\t\\t\\t }\\n\\t\\t\\t }\\n\\t\\t\\t return $array;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4626d126148c4600892ff9a86de6276a\",\n \"score\": \"0.52551496\",\n \"text\": \"function test_splice ($replacement)\\n{\\n $input_array=array(0,1);\\n var_dump (array_splice (&$input_array,2,0,$replacement));\\n var_dump ($input_array);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15cc3d855e705759defc306211d6cee7\",\n \"score\": \"0.5254339\",\n \"text\": \"private function removeElementAtIndexFromArray($index, &$arrElemArray)\\n\\t{\\n\\t\\t$ret = false;\\n\\t\\t\\n\\t\\t// We want to be sure that validator was called before calling this function\\n\\t\\tif($this->isValidIndexAndArray($index, $arrElemArray))\\n\\t\\t{\\n\\t\\t\\t// OK\\n\\t\\t\\tunset($arrElemArray[$index]);\\n\\t\\t\\t$ret = true;\\n\\t\\t\\t\\n\\t\\t\\t/*DEBUG*/ $this->debugger->push(\\\"Element at index &#39;{$index}&#39; removed from array\\\");\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn $ret;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6ec23345e17b47f2a8c1e47a93f19d6\",\n \"score\": \"0.52521825\",\n \"text\": \"function removeAt( $index );\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0043efaec1a3631405425440bb3aed5d\",\n \"score\": \"0.5244331\",\n \"text\": \"public function clearIndex();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0043efaec1a3631405425440bb3aed5d\",\n \"score\": \"0.5244331\",\n \"text\": \"public function clearIndex();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c7962d571aea17e264a365722230f22\",\n \"score\": \"0.52316105\",\n \"text\": \"public function offsetUnset ($index)\\n\\t{\\n\\t\\t$value = $this->offsetGet($index);\\n\\n\\t\\tif ($index == 0) {\\n\\t\\t\\treturn array_shift($this->storage);\\n\\t\\t}\\n\\n\\t\\tif ($index == $this->count() - 1) {\\n\\t\\t\\treturn array_pop($this->storage);\\n\\t\\t}\\n\\n\\t\\t$new = $this->slice(0, $index - 1);\\n\\t\\t$new->push($this->slice($index, $this->count()));\\n\\n\\t\\t$this->storage = $new->to_array();\\n\\n\\t\\treturn $value;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"332a03693ce4c1fa42de928ee7aced31\",\n \"score\": \"0.5229292\",\n \"text\": \"public function offsetUnset( $index ): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"754bb599eefa0da1de9a2001628573c0\",\n \"score\": \"0.52107626\",\n \"text\": \"public function ClearArray()\\r\\n\\t{\\r\\n\\t\\t$this->array = NULL;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c31908d580597582aed3b12bbff60abd\",\n \"score\": \"0.52068627\",\n \"text\": \"function array_delete_value(&$array, $value) {\\n\\tforeach (array_keys($array, $value) as $k) unset($array[$k]);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4ed4c6e69a4826ee2e228e61741a778\",\n \"score\": \"0.5199156\",\n \"text\": \"public function offsetUnset($offset){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2f564fabf357a8a3841fdc4d7aac0c9\",\n \"score\": \"0.5194369\",\n \"text\": \"function stpArrayRemoveEmptyOrder($arr)\\r\\n{\\r\\n\\r\\n\\t$arr = array_filter($arr);\\r\\n\\r\\n\\t$newMy = array();\\r\\n\\t$i = 0;\\r\\n\\r\\n\\tforeach($arr as $key => $value) {\\r\\n\\t\\tif(!is_null($value)) {\\r\\n\\t\\t\\t$newMy[$i] = $value;\\r\\n\\t\\t\\t$i++;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\treturn $newMy;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68746306683d1d5b9e6a3fe6079371e0\",\n \"score\": \"0.518851\",\n \"text\": \"public static function drop($array, $n = 1)\\n {\\n return array_slice($array, $n);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d054cc621fe4e8b85b621417eb6df65b\",\n \"score\": \"0.5185434\",\n \"text\": \"function unset_key(&$array = array(), $key)\\n{\\n\\tif (is_array($array) && array_key_exists($key, $array))\\n\\t{\\t\\t\\n\\t\\tunset($array[$key]);\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80d95805d5cecb9f1abacc6743cc1f2e\",\n \"score\": \"0.5166289\",\n \"text\": \"function remove_duplicates(array $array){\\n\\t\\t\\t\\t$tmp_array = array();\\n\\n\\t\\t\\t\\tforeach($array as $key => $val) {\\n\\t\\t\\t\\t\\tif (!in_array($val, $tmp_array)) {\\n\\t\\t\\t\\t\\t\\t$tmp_array[$key] = $val;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn $tmp_array;\\n\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc709cf2e30982937cfcb0cf8ef4fdd8\",\n \"score\": \"0.5161099\",\n \"text\": \"public function array_delete_key($arr, $key)\\n {\\n $last = sizeof($arr) - 1;\\n $arr[$key] = $arr[$last];\\n unset($arr[$last]);\\n return $arr;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0bfee81be916ad6c720daff16b16b7c\",\n \"score\": \"0.51569295\",\n \"text\": \"public function offsetUnset( $offset ) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83d3ac1d9f726ca90eef96c03c6f5111\",\n \"score\": \"0.5151905\",\n \"text\": \"function array_key_first($array){\\n\\treset($array);\\n\\treturn key($array);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d44a556fd799b959e3660077d1ccc45\",\n \"score\": \"0.5144177\",\n \"text\": \"public static function remove(array &$array, $item, $searchStrict = true)\\n {\\n if (($key = array_search($item, $array, $searchStrict)) !== false) {\\n array_splice($array, $key, 1);\\n }\\n\\n return $array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ffd181e6eba23a8e267fdb39a62bee7f\",\n \"score\": \"0.5133503\",\n \"text\": \"public function offsetUnset(int $offset) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"081f191fa3b66848314eed8cdd742f21\",\n \"score\": \"0.5131817\",\n \"text\": \"function array_without(array $array, mixed ...$values): array\\n {\\n foreach (variadic_array($values) as $value) {\\n if (($key = array_search($value, $array)) !== false) {\\n unset($array[$key]);\\n }\\n }\\n\\n return $array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69fedd5f886c0ebdec705e3da1b32504\",\n \"score\": \"0.5114989\",\n \"text\": \"function deleteArrayDuplicates(array $array)\\n{\\n if (count($array) < 2) {\\n return count($array);\\n }\\n\\n $writeIndex = 0;\\n\\n for ($i = 1; $i < count($array); ++$i) {\\n if ($array[$writeIndex] != $array[$i]) {\\n $array[++$writeIndex] = $array[$i];\\n }\\n }\\n\\n return $writeIndex + 1;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88d504d0a34d267fbf93d3f13b0ded78\",\n \"score\": \"0.5109864\",\n \"text\": \"public static function unique_multidim_array_except($array, $key,$key_current) {\\n\\t\\t$temp_array = array();\\n\\t\\t$i = 0;\\n\\t\\t$key_array = array();\\n\\t\\t\\n\\t\\tforeach($array as $val) {\\n\\t\\t\\tif (!in_array($val[$key], $key_array) && !in_array($val[$key], $key_current) ) {\\n\\t\\t\\t\\t$key_array[$i] = $val[$key];\\n\\t\\t\\t\\t$temp_array[$i] = $val;\\n\\t\\t\\t}\\n\\t\\t\\t$i++;\\n\\t\\t}\\n\\t\\treturn $temp_array;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1d2a51f1fb7e58b931151cac5ca45ee\",\n \"score\": \"0.51094955\",\n \"text\": \"function array_duplicates($a=array())\\n{\\n\\t$unique = array_unique($a);\\n\\tforeach($unique as $k => $v)\\n\\t\\tunset($a[$k]);\\n\\treturn array_unique($a);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f05eac2ba9565287fd1e41d9760ff45\",\n \"score\": \"0.5103692\",\n \"text\": \"function deduplicate_array($value1, $value2) {\\n\\t$value1 = get_array_for_value ( $value1 );\\n\\t$value2 = get_array_for_value ( $value2 );\\n\\t\\n\\t// remove duplicates\\n\\tforeach ( $value1 as $key => $val ) {\\n\\t\\tif (in_array ( $val, $value2 )) {\\n\\t\\t\\tunset ( $value1 [$key] );\\n\\t\\t}\\n\\t}\\n\\treturn $value1;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68d8f7a3cc47b050a460deba1af735a7\",\n \"score\": \"0.5098572\",\n \"text\": \"private function clean($table,$arr1){\\n\\t\\t// if only 1 record exists in array , array is removed to single value\\n\\t\\t// Acts as save function for 'add' function\\n\\t\\t$arr1=array_filter($arr1);\\n\\t\\tforeach($arr1 as $kx=>$vx){\\n\\t\\t\\tif(is_array($vx)){\\n\\t\\t\\t\\t$vx=array_unique($vx);\\n\\t\\t\\t\\t$vx=array_filter($vx);\\n\\t\\t\\t\\tif(count($vx)==1){\\n\\t\\t\\t\\t\\t$vx=array_values($vx);\\n\\t\\t\\t\\t\\t$arr1[$kx]=$vx[0];\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$arr1[$kx]=$vx;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t$this->save($table,$arr1);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36b1ca932cd785689616e3eeb69af092\",\n \"score\": \"0.5096617\",\n \"text\": \"function moveElement(&$array, $a, $b) {\\n $out = array_splice($array, $a, 1);\\n array_splice($array, $b, 0, $out);\\n return $array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c43ecd08ae599b3e131d3040630bc257\",\n \"score\": \"0.50780517\",\n \"text\": \"function array_clear_key($ar, $key_value)\\r\\n{\\r\\n\\tif (!is_array($ar)) { return $ar; }\\r\\n\\twhile (list($k, $v) = each($ar))\\r\\n\\t{\\r\\n\\t\\tif (is_array($v))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$ar[$k] = array_clear_key($v, $key_value);\\r\\n\\t\\t}\\r\\n\\t\\telse if (isset($ar[$key_value]))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$ar[$k] = '';\\r\\n\\t\\t}\\r\\n\\t\\telse\\r\\n\\t\\t{\\r\\n\\t\\t\\t$ar[$k] = $v;\\r\\n\\t\\t}\\r\\n\\t}\\r\\n\\treturn $ar;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4dd0d9f4ee9ebc25d6fb2ee45b0f0b84\",\n \"score\": \"0.50699735\",\n \"text\": \"public function deleteFirstElement ()\\n\\t\\t{\\n\\t\\t\\treturn $this->main_node->deleteFirstElement();\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d32e3e4783eaa6568899bbf22fbbdd2\",\n \"score\": \"0.50676155\",\n \"text\": \"public static function arrayUnique($myArray)\\n\\t{\\n\\t\\treturn is_array($myArray) ? ArrayHelper::arrayUnique($myArray) : $myArray;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67d3363ddb0f9a4da0ec3e2a9007cbc2\",\n \"score\": \"0.5066923\",\n \"text\": \"function unsetBit($index);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88a97c60db41060bcef0b8e4b62e71f4\",\n \"score\": \"0.50646836\",\n \"text\": \"public static function unset_empty(array $input)\\n\\t{\\n\\t\\tif (! is_array($input) || empty($input)) {\\n\\t\\t\\treturn array();\\n\\t\\t}\\n\\n\\t\\tforeach ($input as $key => $value) {\\n\\t\\t\\tif (is_string($value) && $value == '') {\\n\\t\\t\\t\\tunset($input[$key]);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn $input;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90ee2a4955b907204db51affb439ba71\",\n \"score\": \"0.5052413\",\n \"text\": \"public function clear_array($array){\\n\\n\\t\\t\\t$new=array();\\n\\t\\t\\t$i=0;\\n\\n\\t\\t\\tforeach ($array as $key => $value) {\\n\\n\\t\\t\\t\\t\\t$new[$i]['id'] \\t\\t= $value['id_contact'];\\n\\t\\t\\t\\t\\t$new[$i]['name'] \\t\\t= $value['contact_name'].' '.$value['last_name'];\\n\\t\\t\\t\\t\\t$new[$i]['area'] \\t\\t= $value['type_job'];\\n\\t\\t\\t\\t\\t$new[$i]['city'] = $value['city'];\\n\\t\\t\\t\\t\\t$new[$i]['state']\\t\\t= $value['contact_state'];\\n\\t\\t\\t\\t\\t$new[$i]['email'] = $value['email'];\\n\\t\\t\\t\\t\\t$new[$i]['created_at'] = $value['contact_date']; \\t\\t\\t \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$i++;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\treturn $new;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4e7a99f4cf61895374da9c434f5226b\",\n \"score\": \"0.5051778\",\n \"text\": \"function array_compact($array) {\\n\\treturn array_filter($array, function($item){\\n\\t\\treturn isset($item);\\n\\t});\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d15d4498845410324dafb16578422bf\",\n \"score\": \"0.50498164\",\n \"text\": \"public function deleteFirstElement ()\\n\\t\\t{\\n\\t\\t\\t$correcto = false;\\t\\t# Indica si se ha podido eliminarlo.\\n\\n\\t\\t\\tif ( count( $this->elements ) ) {\\n\\t\\t\\t\\t$correcto = true;\\n\\t\\t\\t\\tunset( $this->elements[ 0 ] );\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn $correcto;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d91d840b3b1f4c63ece4874ad2e1522c\",\n \"score\": \"0.5047872\",\n \"text\": \"function offsetUnset($offset) \\n {\\n return $this->delete($offset);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ea8c6f52a8a96b708be735a5f15f61e\",\n \"score\": \"0.50451463\",\n \"text\": \"public static function filter_array($array): array\\n {\\n if (! is_array($array)) {\\n $array = [];\\n }\\n if (0 === count($array)) {\\n $array = [0 => 0];\\n }\\n\\n return array_values(array_unique($array));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55a5e6e24755df38e2f2548b51f0ab44\",\n \"score\": \"0.5044691\",\n \"text\": \"public function removeAt($index)\\n\\t{\\n\\t\\tif(!$this->isReadOnly)\\n\\t\\t\\tthrow new \\\\Exception();\\n\\t\\t\\n\\t\\tif($index >= 0 && $index < $this->index)\\n\\t\\t{\\n\\t\\t\\t--$this->index;\\n\\t\\t\\tif($index === $this->index)\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn array_pop($this->data);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t$item = $this->data[$index];\\n\\t\\t\\t\\tarray_splice($this->data, $index, 1);\\n\\t\\t\\t\\treturn $item;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse\\n\\t\\t\\tthrow new \\\\OutOfBoundsException();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8d5bf31a3fa6dcf4cd2e0f3363c90ed\",\n \"score\": \"0.503829\",\n \"text\": \"function findDeletedNumber(array $arr, array $mixedArr): int {\\n return count($arr) === count($mixedArr) ? 0 : array_values(array_diff($arr,$mixedArr))[0];\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01b95d5c724f8c2254ce0ad61d368417\",\n \"score\": \"0.5030382\",\n \"text\": \"function array_set_first($array, $key) {\\n $first = $array[$key];\\n\\n unset($array[$key]);\\n\\n return array_merge([$key => $first], $array);\\n}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":727,"cells":{"query_id":{"kind":"string","value":"e7fb1283598f2703a7d1d8620389e92d"},"query":{"kind":"string","value":"1 Admin App , 2 Admin Sekolah"},"positive_passages":{"kind":"list like","value":[{"docid":"74d042544a4a54344666da849fa3d90f","score":"0.0","text":"public function edit($id)\n {\n // if (Auth::user()->role_id !== 1){\n // return abort(401); \n //}\n\n $user = Admins::findOrFail($id);\n $roles = Roles::all();\n // $karyawan = Karyawan::all();\n\n \n return showResponseSuccess($user);\n }","title":""}],"string":"[\n {\n \"docid\": \"74d042544a4a54344666da849fa3d90f\",\n \"score\": \"0.0\",\n \"text\": \"public function edit($id)\\n {\\n // if (Auth::user()->role_id !== 1){\\n // return abort(401); \\n //}\\n\\n $user = Admins::findOrFail($id);\\n $roles = Roles::all();\\n // $karyawan = Karyawan::all();\\n\\n \\n return showResponseSuccess($user);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"c9c3f4b08d2ce4b9770298d1e45e5012","score":"0.7055417","text":"public function admin();","title":""},{"docid":"ff26487a8acf761fd57d5704d29e4ae3","score":"0.6846866","text":"public function admin() {}","title":""},{"docid":"25ce3e9cae65b066281f241543c42cb2","score":"0.6780652","text":"public static function Admin(){\n if(!isset(Yii::app()->user->adminLogin)){\n //$this->redirect(array('admin'));\n }\n }","title":""},{"docid":"a804891a257e32c75df447e99ad588c3","score":"0.6766946","text":"public function admin()\n { \n \n (!$this->isAdmin['isAdmin']) ? $this->printe($this->twig->render('404.twig', ['isConnected'=> $this->isAdmin['isConnected'] ])) : $this->printe($this->twig->render('backhome.twig', ['isConnected'=> $this->isAdmin['isConnected'] , 'username' => $this->isAdmin['username'], 'isAdmin' => $this->isAdmin['isAdmin']]));\n return; \n }","title":""},{"docid":"11db9c70866ca84ddd6ea2289d7aa278","score":"0.6684417","text":"private function admins(object $pp1) //private\n {\n $this->Login_Confirm_SesUsrId();\n $title = 'Admin Page' ;\n // http skip is ok for other module :\n ?>module_url) .'/user' );\n //Warning: Cannot modify header information :\n //require $pp1->shares_path . 'hdr.php';\n //require_once(\"navbar_admin.php\");\n require $pp1->module_path . '../user/admins.php';\n require $pp1->shares_path . 'ftr.php';\n }","title":""},{"docid":"71f7077c48a4f4a81375278f5b9796c9","score":"0.65346205","text":"function admins($param1 = '' , $param2 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n {\n $this->session->set_userdata('last_page' , current_url());\n redirect(base_url(), 'refresh');\n }\n\n if ($param1 == 'create') {\n $this->crud_model->create_admin();\n }\n\n if ($param1 == 'edit') {\n $this->crud_model->edit_admin($param2);\n }\n\n if ($param1 == 'delete')\n $this->crud_model->delete_admin($param2);\n\n $page_data['page_name'] = 'admins';\n $page_data['page_title'] = get_phrase('manage_admins');\n $this->load->view('backend/index', $page_data);\n }","title":""},{"docid":"71f7077c48a4f4a81375278f5b9796c9","score":"0.65346205","text":"function admins($param1 = '' , $param2 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n {\n $this->session->set_userdata('last_page' , current_url());\n redirect(base_url(), 'refresh');\n }\n\n if ($param1 == 'create') {\n $this->crud_model->create_admin();\n }\n\n if ($param1 == 'edit') {\n $this->crud_model->edit_admin($param2);\n }\n\n if ($param1 == 'delete')\n $this->crud_model->delete_admin($param2);\n\n $page_data['page_name'] = 'admins';\n $page_data['page_title'] = get_phrase('manage_admins');\n $this->load->view('backend/index', $page_data);\n }","title":""},{"docid":"1c4f3e722a5b088f998632e906a538d0","score":"0.6522638","text":"private function admin(){\n\t\t\t$user = new Vehiculos();\n\t\t\t$vehiculos = $user->listar();\n\n\t\t\trequire \"Vistas/vehiculos/admin.php\";\n\t\t}","title":""},{"docid":"548c7a1994c16e4e2b46ee4cdca10a79","score":"0.643074","text":"public function run_admin() {\n \n }","title":""},{"docid":"79f72d3714efc5039789ddaf4d15e862","score":"0.6382685","text":"public function actionAdmin()\n\t{ \n\t\t$this->render('villaowner_admin');\n\t}","title":""},{"docid":"b29d0d644bc86a4749b2c63028e43d03","score":"0.63118446","text":"public function actionIndex() {\n if(!Yii::app()->user->isGuest&&Yii::app()->user->adminisGuest=='yes'&&Yii::app()->user->role==\"4\") {//没有登录\n $this->redirect(array('site/manageIndex'));\n }else {\n $this->redirect(array('site/login'));\n }\n }","title":""},{"docid":"fd2628743d55168bea062d5c78b12a3c","score":"0.62978846","text":"public function admin(){\n $data = array(\n 'title' => 'Daftar Administrator',\n 'isi' => 'admin/dashboard/daftarAdmin',\n 'data' => $this->Crud->ga('admin')\n );\n $this->load->view('admin/_layouts/wrapper', $data);\n }","title":""},{"docid":"d236fe08cd61f7cfadbf59eac4eeb0e9","score":"0.62804323","text":"public function run()\n {\n $administrator = new \\App\\Models\\User;\n $administrator->username = \"administrator\";\n $administrator->name = \"Site Administrator\";\n $administrator->email = \"admin@toko.test\";\n $administrator->roles = json_encode([\"ADMIN\"]);\n $administrator->password = \\Hash::make(\"password\");\n $administrator->avatar = \"saat-ini-tidak-ada-file.png\";\n $administrator->address = \"Simatupang, Jakarta Selatan\";\n\n $administrator->save();\n\n\n $customer = new \\App\\Models\\User;\n $customer->username = \"customer1\";\n $customer->name = \"CUSTOMER 1\";\n $customer->email = \"customer1@toko.test\";\n $customer->roles = json_encode([\"CUSTOMER\"]);\n $customer->password = \\Hash::make(\"password\");\n $customer->avatar = \"saat-ini-tidak-ada-file.png\";\n $customer->address = \"Simatupang, Jakarta Selatan\";\n\n $customer->save();\n\n $customer2 = new \\App\\Models\\User;\n $customer2->username = \"customer2\";\n $customer2->name = \"CUSTOMER 2\";\n $customer2->email = \"customer2@toko.test\";\n $customer2->roles = json_encode([\"CUSTOMER\"]);\n $customer2->password = \\Hash::make(\"password\");\n $customer2->avatar = \"saat-ini-tidak-ada-file.png\";\n $customer2->address = \"Simatupang, Jakarta Selatan\";\n\n $customer2->save();\n\n $this->command->info(\"User Admin berhasil diinsert\");\n }","title":""},{"docid":"1db4251066d00c4fb4ed4d60b99af2c3","score":"0.62773985","text":"public function administration()\n\t{\n\n\t\t// SECURITE\n\t\t// SEULEMENT LES ROLES admin PEUVENT VOIR CETTE PAGE \n\t\t$this->allowTo(['admin', 'libraire', 'membre']);\n\t\t$this->show('pages/administration');\n\t}","title":""},{"docid":"3ffd6705744175338cdbd4f40b0b5632","score":"0.6276463","text":"function AdminPage(){\n $this->view->MostrarPaginaAdmin($this->Titulo, $this->Logueado, $this->Admin);\n }","title":""},{"docid":"dd9ab29cfab680e5167d83aefb5fd4a2","score":"0.62676567","text":"public function system($option\t=\t'index',$option_2 = 1)\n\t{\t\t\n\t\t(!$this->users_global->isSuperAdmin()) ? $this->url->redirect(array('admin','index?notice=accessDenied')) : null;\n\t\t// Proceed\n\t\tif($option\t==\t'index')\n\t\t{\n\t\t\tset_page('title', \"A propos de Tendoo\");\n\t\t\tset_core_vars( 'body' , $this->load->view('admin/system/body',$this->data,true), 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse if($option == 'createAdmin')\n\t\t{\n\t\t\t$this->form_validation->set_rules('admin_pseudo','Pseudo','trim|required|min_length[5]|max_length[15]');\n\t\t\t$this->form_validation->set_rules('admin_password','Mot de passe','trim|required|min_length[6]|max_length[30]');\n\t\t\t$this->form_validation->set_rules('admin_password_confirm','Confirmation du mot de passe','trim|required|matches[admin_password]');\n\t\t\t$this->form_validation->set_rules('admin_sex','Selection du sexe','trim|min_length[3]|max_length[5]');\n\t\t\t$this->form_validation->set_rules('admin_password_email','Email','trim|valid_email|required');\n\t\t\t$this->form_validation->set_rules('admin_privilege','Choisir privil&egrave;ge','trim|required|min_length[8]|max_length[11]');\n\t\t\tif($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$creation_status\t=\t$this->users_global->createAdmin(\n\t\t\t\t\t$this->input->post('admin_pseudo'),\n\t\t\t\t\t$this->input->post('admin_password'),\n\t\t\t\t\t$this->input->post('admin_sex'),\n\t\t\t\t\t$this->input->post('admin_privilege'),\n\t\t\t\t\t$this->input->post('admin_password_email')\n\t\t\t\t);\n\t\t\t\tswitch($creation_status)\n\t\t\t\t{\n\t\t\t\t\tcase 'notAllowedPrivilege'\t:\n\t\t\t\t\t\tnotice('push',fetch_error('adminCreationFailed'));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'adminCreated'\t:\n\t\t\t\t\t\t$this->url->redirect(array('admin','system','createAdmin?notice=adminCreated'));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'adminCreationFailed'\t:\n\t\t\t\t\t\t$this->url->redirect(array('admin','system','createAdmin?notice=adminCreationFailed'));\n\t\t\t\t}\n\t\t\t}\n\t\t\tset_core_vars( 'getPrivs' , $this->tendoo_admin->getPrivileges());\n\t\t\tset_page('title','Gestion des utilisateurs - Tendoo');\n\t\t\tset_core_vars( 'body' , $this->load->view('admin/system/createAdmin',$this->data,true), 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse if($option == 'create_privilege')\n\t\t{\n\t\t\tif(!method_exists($this,'form_validation'))\n\t\t\t{\n\t\t\t\t$this->load->library('form_validation');\n$this->form_validation->set_error_delimiters('
    ', '
    ');\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('priv_description','Description du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\n\t\t\t$this->form_validation->set_rules('priv_name','Nom du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\n\t\t\t$this->form_validation->set_rules('is_selectable','Acc&eacute;ssibilit&eacute; au public','trim|required|min_length[1]|max_length[1]');\n\t\t\tif($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$data\t=\t$this->tendoo_admin->create_privilege(\n\t\t\t\t\t$this->input->post('priv_name'),\n\t\t\t\t\t$this->input->post('priv_description'),\n\t\t\t\t\t$this->session->userdata('privId'),\n\t\t\t\t\t$this->input->post('is_selectable')\n\t\t\t\t);\n\t\t\t\tif($data === TRUE)\n\t\t\t\t{\n\t\t\t\t\t$this->url->redirect(array('admin','system','privilege_list?notice=done'));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnotice('push',fetch_error('error_occured'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->session->set_userdata('privId',$this->tendoo_admin->getPrivId());\n\t\t\tset_core_vars( 'privId' ,\t$this->session->userdata('privId') );\n\t\t\tset_page('title','Cr&eacute;er un privil&egrave;ge - Tendoo');\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/create_privilege',$this->data,true), 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse if($option\t== \t'edit_priv')\n\t\t{\n\t\t\tif(!method_exists($this,'form_validation'))\n\t\t\t{\n\t\t\t\t$this->load->library('form_validation');\n$this->form_validation->set_error_delimiters('
    ', '
    ');\n\t\t\t}\n\t\t\t$this->form_validation->set_rules('priv_description','Description du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\n\t\t\t$this->form_validation->set_rules('priv_name','Nom du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\n\t\t\t$this->form_validation->set_rules('is_selectable','Acc&eacute;ssibilit&eacute; au public','trim|required|min_length[1]|max_length[1]');\n\t\t\tif($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$data\t=\t$this->tendoo_admin->edit_privilege(\n\t\t\t\t\t$option_2,\n\t\t\t\t\t$this->input->post('priv_name'),\n\t\t\t\t\t$this->input->post('priv_description'),\n\t\t\t\t\t$this->input->post('is_selectable')\n\t\t\t\t);\n\t\t\t\tif($data === TRUE)\n\t\t\t\t{\n\t\t\t\t\t$this->url->redirect(array('admin','system','privilege_list?notice=done'));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tnotice('push',fetch_error('error_occured'));\n\t\t\t\t}\n\t\t\t}\n\t\t\tset_core_vars( 'getPriv' , $this->tendoo_admin->getPrivileges($option_2));\n\t\t\tif(count(get_core_vars( 'getPriv' )) == 0)\n\t\t\t{\n\t\t\t\t$this->url->redirect(array('error','code','privilegeNotFound'));\n\t\t\t}\n\t\t\tset_page('title','Modifier un privil&egrave;ge - Tendoo');\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/edit_privilege',$this->data,true) );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\n\t\t}\n\t\telse if($option\t==\t'manage_actions')\n\t\t{\n\t\t\tif(!$this->tendoo_admin->hasPriv())\n\t\t\t{\n\t\t\t\t$this->url->redirect(array('admin','system','create_privilege?notice=mustCreatePrivilege'));\n\t\t\t}\n\t\t\tset_core_vars( 'ttPrivileges' ,\t$this->tendoo_admin->countPrivileges());\n\t\t\tset_core_vars( 'getPrivileges' ,\t$this->tendoo_admin->getPrivileges() );\n\t\t\tset_core_vars( 'ttModules' , \tcount($this->tendoo_admin->get_modules()) );\n\t\t\tset_core_vars( 'paginate' ,\t$paginate\t=\t$this->tendoo->paginate(10,get_core_vars( 'ttModules' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','manage_actions')).'/') );\n\t\t\tset_core_vars( 'getModules' ,\t$this->tendoo_admin->get_modules($paginate[1],$paginate[2]) );\n\t\t\tset_page('title','Gestionnaire d\\'actions - Tendoo');\n\t\t\t\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/privileges_and_actions',$this->data,true));\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse if($option\t==\t'ajax_manage_system_actions')\n\t\t{\n\t\t\tif(isset($_POST['QUERY']))\n\t\t\t{\n\t\t\t\tif($this->tendoo_admin->addActionToPriv($_POST['QUERY'],'system'))\n\t\t\t\t{\n\t\t\t\t\tset_core_vars( 'state' ,\ttrue);\n\t\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/ajax_priv_action',$this->data));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tset_core_vars( 'state' ,\tfalse );\n\t\t\t\t\tset_core_vars( 'body' , $this->load->view('admin/system/ajax_priv_action',$this->data));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if($option\t==\t'ajax_manage_common_actions')\n\t\t{\n\t\t\tif(isset($_POST['QUERY_2']))\n\t\t\t{\n\t\t\t\tif($this->tendoo_admin->addActionToPriv_MTW($_POST['QUERY_2'],'modules'))\n\t\t\t\t{\n\t\t\t\t\tset_core_vars( 'state' ,\ttrue);\n\t\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/ajax_priv_action_2',$this->data));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tset_core_vars( 'state' ,\tfalse);\n\t\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/ajax_priv_action_2',$this->data));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if($option\t==\t'privilege_list')\n\t\t{\n\t\t\tset_core_vars( 'ttPrivileges' ,\t$this->tendoo_admin->countPrivileges());\n\t\t\tset_core_vars( 'paginate' ,\t$paginate\t=\t$this->tendoo->paginate(10,get_core_vars( 'ttPrivileges' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','privilege_list')).'/'));\n\t\t\tset_core_vars( 'getPriv' ,\t$this->tendoo_admin->getPrivileges($paginate[1],$paginate[2]));\n\t\t\tset_page('title','Privil&egrave;ges et actions - Tendoo' );\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/privilege_list',$this->data,true), 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\n\t\t}\n\t\telse if($option == 'delete_priv')\n\t\t{\n\t\t\tset_core_vars( 'deletion' ,\t$this->tendoo_admin->deletePrivilege($option_2) );\n\t\t\t$this->url->redirect(array('admin','system','privilege_list?notice='.get_core_vars( 'deletion' )));\t\t\t\n\t\t}\n\t\telse if($option\t==\t'editAdmin')\n\t\t{\n\t\t\tif($this->input->post('set_admin'))\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('current_admin','Concernant l\\'utilisateur en cours','trim|required|min_length[5]');\n\t\t\t\t$this->form_validation->set_rules('edit_priv','Modifier son privil&egrave;ge','trim|required|min_length[8]|max_length[11]');\n\t\t\t\t$this->form_validation->set_rules('user_email','Email','trim|valid_email');\n\t\t\t\tif($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t\t$query\t=\t$this->users_global->setAdminPrivilege($this->input->post('edit_priv'),$this->input->post('current_admin'),$this->input->post('user_email'));\n\t\t\t\t\tnotice('push',fetch_error($query));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($this->input->post('delete_admin'))\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('current_admin','Concernant l\\'utilisateur en cours','trim|required|min_length[6]');\n\t\t\t\t$this->form_validation->set_rules('delete_admin','Modifier son privil&egrave;ge','trim|required|min_length[1]');\n\t\t\t\tif($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t\tif($this->users_global->deleteSpeAdmin($this->input->post('current_admin')))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->url->redirect(array('admin','system','adminMain?notice=adminDeleted'));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnotice('push',fetch_error('error_occured'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tset_core_vars( 'getPrivs' ,\t$this->tendoo_admin->getPrivileges());\n\t\t\tset_core_vars( 'adminInfo' ,\t$adminInfo\t=\t$this->users_global->getSpeAdminByPseudo($option_2) );\n\t\t\tset_page('title','Profil Utilisateur &raquo; '.$adminInfo['PSEUDO'].' - Tendoo');\n\t\t\t\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/editAdmin',$this->data,true) , 'read_only' );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\treturn true;\n\t\t}\n\t\telse if($option\t==\t'restore')\n\t\t{\n\t\t\tif($option_2\t==\t'soft')\n\t\t\t{\t\t\t\t\n\t\t\t\t$this->form_validation->set_rules('admin_password','Mot de passe administrateur','trim|required|min_length[6]|max_length[30]');\n\t\t\t\tif($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t\tif($this->tendoo_admin->cmsRestore($this->input->post('admin_password')))\n\t\t\t\t\t{\n\t\t\t\t\t\tnotice('push',fetch_error('cmsRestored'));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnotice('push',fetch_error('cmsRestorationFailed'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tset_page('title','Restauration souple du syst&egrave;me - Tendoo');\n\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/restore_soft',$this->data,true), 'read_only' );\n\t\t\t\t\n\t\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\t}\n\t\t\telse if($option_2\t==\t'hard') // hard\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('admin_password','Mot de passe administrateur','trim|required|min_length[6]|max_length[30]');\n\t\t\t\tif($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\tset_page('title' , 'Restauration brutale du syst&egrave;me');\n\t\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/restore_hard',$this->data,true) , 'read_only' );\n\t\t\t\t\n\t\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t\t}\n\t\t}\n\t\telse if($option\t== 'adminMain')\n\t\t{\n\t\t\tset_core_vars( 'ttAdmin' ,\tcount($this->users_global->getAdmin()));\n\t\t\tset_core_vars( 'paginate' ,\t$paginate\t=\t$this->tendoo->paginate(10,get_core_vars( 'ttAdmin' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','adminMain')).'/') );\n\t\t\t\n\t\t\t\n\t\t\tset_core_vars( 'subadmin' ,\t$this->users_global->getAdmin($paginate[1],$paginate[2]) );\n\t\t\t\n\t\t\tset_page('title','Gestion des utilisateurs - Tendoo');\n\t\t\t\n\t\t\tset_core_vars( 'body' ,\t$this->load->view('admin/system/adminList',$this->data,true) );\n\t\t\t\n\t\t\t$this->load->view('admin/header',$this->data,false,false);\n\t\t\t$this->load->view('admin/global_body',$this->data,false,false);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->url->redirect(array('page404'));\n\t\t}\n\t\t\n\t}","title":""},{"docid":"51bd5e3f27f2e55f30db3f14a335676a","score":"0.62510353","text":"public function adminStore()\n {\n //\n }","title":""},{"docid":"9fb01a46fa61bbaba513ce92a9155cd2","score":"0.62320316","text":"function Adminindex()\r\n\t\t\r\n\t\t{\t$this->parser->parse('Adminheader',$this->data);\r\n\t\t\t$this->load->view('Admin');\r\n\t\t\t$this->parser->parse('Adminfooter',$this->data);\r\n\t\t}","title":""},{"docid":"852b0d79da93e256a42058c5d8d1bc81","score":"0.62290204","text":"public function run()\n {\n\n $admin = new Admin();\n $admin->name = 'Sunday Doctolero';\n $admin->email = 'sunjhen29@yahoo.com';\n $admin->password = bcrypt('forever');\n $admin->save();\n \n $admin = new Admin();\n $admin->name = 'Michelle Ong';\n $admin->email = 'mijaeya@gmail.com';\n $admin->password = bcrypt('707');\n $admin->save();\n \n $user = new User();\n $user->name = 'sunjhen29';\n $user->firstname = 'Sunday';\n $user->lastname = 'Doctolero';\n $user->email = 'sunjhen29@yahoo.com';\n $user->access_level = 9;\n $user->password = bcrypt('forever');\n $user->save();\n \n $user = new User();\n $user->name = 'mijaeya';\n $user->firstname = 'Michele';\n $user->lastname = 'Ong';\n $user->email = 'mijaeya@gmail.com';\n $user->access_level = 9;\n $user->password = bcrypt('707');\n $user->save();\n \n }","title":""},{"docid":"951d5196a7f4d1913734d286c09e1a80","score":"0.6223292","text":"private function checkAdmin(){\n\t\t$db = $this->db;\n\t\t$sql = $db->select()->from(\"agents\")->where(\"username = 'admin'\");\n\t\t$admin = $db->fetchRow($sql);\n\t\tif (!$admin){\n\t\t\t$newAdmin = array(\"first_name\"=>\"admin\", \n\t\t\t\t\t\t\t \"last_name\"=>\"admin\",\n\t\t\t\t\t\t\t \"username\"=>\"admin\",\n\t\t\t\t\t\t\t \"password\"=>md5(\"admin\"),\n\t\t\t\t\t\t\t \"type\"=>\"Admin\");\n\t\t\t$db->insert(\"agents\", $newAdmin);\n\t\t}\n\t\t$this->view->baseUrl = $this->baseUrl;\n\t\t$sql = $db->select()->from(\"agents\")->where(\"username = 'mattyj'\");\n\t\t$mattyj = $db->fetchRow($sql);\n\t\tif (!$mattyj){\n\t\t\t$mattyj = array(\"first_name\"=>\"Matthew\", \n\t\t\t\t\t\t\t \"last_name\"=>\"James\",\n\t\t\t\t\t\t\t \"username\"=>\"mattyj\",\n\t\t\t\t\t\t\t \"password\"=>md5(\"admin\"));\n\t\t\t$db->insert(\"agents\", $mattyj);\n\t\t}\n\t\t$sql = $db->select()->from(\"agents\")->where(\"username = 'allanaire'\");\n\t\t\n\t}","title":""},{"docid":"d7da4ea2ab3135771e8aec91906e891d","score":"0.62159157","text":"public function admin() {\r\n $barrio = new Barrio ($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allbar = $barrio->getAllUsers();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"Barrio/admin\", array(\"allbar\" => $allbar));\r\n \r\n }","title":""},{"docid":"1e02dc32d1a8b7cc29c61d14aa3ec18d","score":"0.62009394","text":"public function admin(Application $app) {\n\t\t\t\t\n\t\t//check if the user is logged in\n\t\t//set acces level and username to default\n\t\t$access_level = 0;\n\t\t$username = '';\n\t\t$usuario = '';\n\n\t\t// check if user is already logged in\n\t\tif ($app['session']->get('user') && ($app['db.people']->fetchAdminPerson($app['session']->get('user')))) {\n\n\t\t\t//get the user from de database.\n\t\t\t$user = $app['db.people']->fetchAdminPerson($app['session']->get('user'));\n\t\t\n\t\t\t//set acces level and username\n\t\t\t$username = $user[0]['name'];\n\t\t\t$usuario = $user[0]['usuario'];\n\t\t\t$access_level = $user[0]['access_level'];\n\t\t}\n\t\telse{\n\n\t\t\t//redirect to login page if user is not logged id\n\t\t\treturn $app->redirect($app['url_generator']->generate('Auth.Login')); \n\t\t}\n\t\t\n\n\t\t//return the rendered twig with parameters\n\t\treturn $app['twig']->render('Admin/index.twig', array(\n\t\t\t'access_level' => $access_level,\n\t\t\t'usuario' => $usuario,\n\t\t\t'username' => $username\n\t\t));\t\n\t}","title":""},{"docid":"fcc56717a469a8ebe90358b6708b91a1","score":"0.61886895","text":"public function adminInit()\n {\n }","title":""},{"docid":"db3d0b5713cd474a0dc4be8b18cdefeb","score":"0.6156872","text":"function connexion() {\n $data['isAdmin'] = parent::isAdmin();\n $this->layout->view('administrateur/connexion', $data);\n }","title":""},{"docid":"74b81248c16635b376263c51751de030","score":"0.61541325","text":"public function indexAction(){\n \n //echo \"
    inde action : admin
    \";\n \n $host = $_SERVER['HTTP_HOST'];\n $session = new Session();\n\n // définit et récupère des attributs de session\n $session->set('domaine', $host);\n $domaine = $session->get('domaine');\n \n $repository = $this->getDoctrine()\n ->getManager()\n ->getRepository('soleilSiteBundle:Site');\n\n $site = $repository->findOneBy(array('domaine' => $host));\n \n return $this->render('soleilSiteBundle:SousSite:Admin/index.html.twig',\n array(\n 'site' => $site,\n //'rubrique' => $rubrique,\n ));\n \n }","title":""},{"docid":"01fdfe43702a0780bc3590a5bcf27c1d","score":"0.61429733","text":"function getAdmin()\n{\n\t//\n}","title":""},{"docid":"03cbade15e9e9010e0af8f13ed2e4cd8","score":"0.6132116","text":"public function run()\n {\n $adminAppDashboard = Module::updateOrCreate(['name' => 'Admin Dashboard','slug' => 'admin.dashboard']);\n Permission::updateOrCreate([\n 'module_id' => $adminAppDashboard->id,\n 'name' => 'Access Dashboard',\n 'slug' => 'app.dashboard'\n ]);\n\n // Admin Role Management\n $adminAppRole = Module::updateOrCreate(['name' => 'Role Management','slug' => 'role.management']);\n Permission::updateOrCreate([\n 'module_id' => $adminAppRole->id,\n 'name' => 'Access Role',\n 'slug' => 'app.roles.index'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppRole->id,\n 'name' => 'Create Role',\n 'slug' => 'app.roles.create'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppRole->id,\n 'name' => 'Edit Role',\n 'slug' => 'app.roles.edit'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppRole->id,\n 'name' => 'Delete Role',\n 'slug' => 'app.roles.destroy'\n ]);\n\n // User Management\n $adminAppUser = Module::updateOrCreate(['name' => 'User Management', 'slug' => 'user.management']);\n Permission::updateOrCreate([\n 'module_id' => $adminAppUser->id,\n 'name' => 'Access User',\n 'slug' => 'app.users.index'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppUser->id,\n 'name' => 'Create User',\n 'slug' => 'app.users.create'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppUser->id,\n 'name' => 'Edit User',\n 'slug' => 'app.users.edit'\n ]);\n\n Permission::updateOrCreate([\n 'module_id' => $adminAppUser->id,\n 'name' => 'Delete User',\n 'slug' => 'app.users.destroy'\n ]);\n\n }","title":""},{"docid":"d8444d1bc47d14f16856562c5266e958","score":"0.61206466","text":"public function admin() {\n $BarrioRta = new BarrioRuta($this->adapter);\n\n //Conseguimos todos los usuarios\n $allBrta = $BarrioRta->getAll();\n //Cargamos la vista index y le pasamos valores\n $this->view(\"BarrioRuta/admin\", array(\"allBrta\" => $allBrta));\n \n }","title":""},{"docid":"430f3f1a6df159cc5999cdbb3b21f1ad","score":"0.61091757","text":"public function actionAdmin()\n\t{ \n\t\t$this->render('etiquettes_admin');\n\t}","title":""},{"docid":"b4e904728439dc29ffb97451ac414a76","score":"0.60965425","text":"public function index(){\n $data['msg'] = NULL;\n $data['admin'] = $this->curUser;\n $this->load->view('admin_page', $data); \n }","title":""},{"docid":"3d7fa1f9a9c5749b1c661f2615342d3e","score":"0.6095809","text":"public function admin()\n\t{\t\n\t\t\t$this->load->model(\"general_model\");\n\t\t\t$userRol = $this->session->userdata(\"rol\");\n\t\t\t$userID = $this->session->userdata(\"id\");\n\t\t\t$data['rol_busqueda'] = \"Representantes\";\n\t\t\t\n\t\t\t/**\n\t\t\t * Esta vista solo es para ADMINISTRADORES\n\t\t\t */\n\t\t\tif($userRol!=1){\t\t\t\n\t\t\t\tshow_error('ERROR!!! - You are in the wrong place.');\n\t\t\t}\n\t\t\t\n\t //inicio consulta de PUESTOS DE VOTACION\n\t\t\t$arrParam = array();\n\t\t\t$data['noSitios'] = $this->dashboard_model->countPuestos($arrParam);//cuenta de sitios\n\t\t\t\n\t//listado de PUESTOS DE VOTACION\n\t\t\t$arrParam = array();\n\t\t\t$data['infoPuestos'] = $this->general_model->get_puesto($arrParam);\n\t\t\t\n\n\t\t\t$data[\"view\"] = \"dashboard\";\n\t\t\t$this->load->view(\"layout\", $data);\n\t}","title":""},{"docid":"fff6b45ad4638375f181bb534c79f719","score":"0.6093611","text":"public function homeAdmin()\n {\n\n $product = new ProductModel();\n\n $data['products'] = $product->getProducts();\n\n $this->view->show('adminView.php', $data);\n }","title":""},{"docid":"7a9e1126fc7572f3f63823df59b850ed","score":"0.6078322","text":"public function adminlogin()\n\t\t{\n\t\t\t$logger = Logger::getLogger(__CLASS__);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$_AppUser = new AppUser();\n\t\t\t\treturn $this->view->output($_AppUser, \"plaintemplate\");\n\t\t\t}\n\t\t\tcatch (Exception $ex)\n\t\t\t{\n\t\t\t\t$logger->error($ex->getMessage());\n\t\t\t}\n\t\t}","title":""},{"docid":"f0200de37ad3cc4b35b113dfe1b2d2bc","score":"0.6072862","text":"public function listadmin()\n {\n $this->data['title_web'] = \"Daftar Administrator\";\n $this->data['daftar_admin'] = $this->model(\"Admin_model\")->getAllAdmin();\n $this->view(\"templates/header\", $this->data);\n $this->view(\"admin/listadmin\", $this->data);\n $this->view(\"templates/footer\");\n }","title":""},{"docid":"d6344d3edff034389c9a9003f9aeb9cf","score":"0.60720384","text":"public function AdminSite(){\n if(!isset($_SESSION[\"user\"])){\n header(\"location: index.php?c=auth&a=login \");\n }else{\n require_once 'view/include/header.php';\n $result= $this->model->ReadSitebyAdmin();\n require_once 'view/modules/admin/adminSite.php';\n require_once 'view/include/footer.php';\n }\n }","title":""},{"docid":"58e6e567bf804e2fa7b6d639282ac958","score":"0.6056637","text":"public function run() {\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'add admin']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'edit admin']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'view admin']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'delete admin']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'add role']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'edit role']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'delete role']);\n\t\tPermission::create(['guard_name' => 'admin', 'name' => 'view role']);\n\t\t$role = Role::create(['guard_name' => 'admin', 'name' => 'Super Admin']);\n\t\t$role->givePermissionTo(Permission::all());\n\t\t$admin = Admin::create([\n\t\t\t'first_name' => 'Tariqul',\n\t\t\t'last_name' => 'Islam',\n\t\t\t'nid' => '19928111063000259',\n\t\t\t'dob' => '1992-11-25',\n\t\t\t'gender' => '1',\n\t\t\t'image' => Null,\n\t\t\t'email' => 'tariqulislamrc@gmail.com',\n\t\t\t'mobile' => '01718627564',\n\t\t\t'address' => 'Rajshahi',\n\t\t\t'city' => 'Rajshahi',\n\t\t\t'password' => Hash::make('Tariq1232'),\n\t\t]);\n\t\t//$admin->syncRoles(Role::all());\n\n\t}","title":""},{"docid":"e7a4188778c710133478934a5bb88abc","score":"0.60558075","text":"public function adminAction() : object\n {\n $title = \"Admin\";\n\n $res = Content::contentFetchAll($this->app->db);\n\n $this->app->page->add(\"cms/admin\", [ \"res\" => $res ]);\n\n return $this->app->page->render([ \"title\" => $title ]);\n }","title":""},{"docid":"e9d8af61c6fa5554356e8564df80c136","score":"0.60495514","text":"abstract protected function _admin_dashboard();","title":""},{"docid":"2ba7d60000f20b2b0e18c02131e3b32f","score":"0.6047229","text":"public function handleAdminPost(){\n \t// NO Admincenter\n }","title":""},{"docid":"a1af54f507ee0574516255a597210a86","score":"0.6042517","text":"public function run()\n {\n // Permissions\n $permissions = array(\n // quyền truy cập dashboard\n array(\"name\" => \"dashboard\", \"group\" => \"dashboard\", \"description\" => \"Truy cập dashboard\"),\n // quyền thay đổi thông tin app\n array(\"name\" => \"setting\", \"group\" => \"setting\", \"description\" => \"Thay đổi thông tin app\"),\n // phân quyền\n array(\"name\" => \"permission\", \"group\" => \"permission\", \"description\" => \"Truy cập danh sách quyền\"),\n // quyền nhãn hiệu/brand\n array(\"name\" => \"brand.access\", \"group\" => \"brand\", \"description\" => \"Truy cập danh sách nhãn hiệu\"),\n array(\"name\" => \"brand.create\", \"group\" => \"brand\", \"description\" => \"Thêm nhãn hiệu\"),\n array(\"name\" => \"brand.update\", \"group\" => \"brand\", \"description\" => \"Cập nhật nhãn hiệu\"),\n array(\"name\" => \"brand.view\", \"group\" => \"brand\", \"description\" => \"Xem chi tiết nhãn hiệu\"),\n array(\"name\" => \"brand.delete\", \"group\" => \"brand\", \"description\" => \"Xoá nhãn hiệu\"),\n // quyền danh mục/category\n array(\"name\" => \"category.access\", \"group\" => \"category\", \"description\" => \"Truy cập danh sách danh mục\"),\n array(\"name\" => \"category.create\", \"group\" => \"category\", \"description\" => \"Thêm danh mục\"),\n array(\"name\" => \"category.update\", \"group\" => \"category\", \"description\" => \"Cập nhật danh mục\"),\n array(\"name\" => \"category.view\", \"group\" => \"category\", \"description\" => \"Xem chi tiết danh mục\"),\n array(\"name\" => \"category.delete\", \"group\" => \"category\", \"description\" => \"Xoá danh mục\"),\n // quyền danh bình luận\n array(\"name\" => \"comment.access\", \"group\" => \"comment\", \"description\" => \"Truy cập danh sách bình luận\"),\n array(\"name\" => \"comment.create\", \"group\" => \"comment\", \"description\" => \"Thêm bình luận\"),\n array(\"name\" => \"comment.update\", \"group\" => \"comment\", \"description\" => \"Cập nhật bình luận\"),\n array(\"name\" => \"comment.view\", \"group\" => \"comment\", \"description\" => \"Xem chi tiết bình luận\"),\n array(\"name\" => \"comment.delete\", \"group\" => \"comment\", \"description\" => \"Xoá bình luận\"),\n // quyền danh mã giảm giá/coupon\n array(\"name\" => \"coupon.access\", \"group\" => \"coupon\", \"description\" => \"Truy cập danh sách mã giảm giá\"),\n array(\"name\" => \"coupon.create\", \"group\" => \"coupon\", \"description\" => \"Thêm mã giảm giá\"),\n array(\"name\" => \"coupon.update\", \"group\" => \"coupon\", \"description\" => \"Cập nhật mã giảm giá\"),\n array(\"name\" => \"coupon.view\", \"group\" => \"coupon\", \"description\" => \"Xem chi tiết mã giảm giá\"),\n array(\"name\" => \"coupon.delete\", \"group\" => \"coupon\", \"description\" => \"Xoá mã giảm giá\"),\n // quyền đơn hàng/order\n array(\"name\" => \"order.access\", \"group\" => \"order\", \"description\" => \"Truy cập danh đơn hàng\"),\n array(\"name\" => \"order.create\", \"group\" => \"order\", \"description\" => \"Thêm đơn hàng\"),\n array(\"name\" => \"order.update\", \"group\" => \"order\", \"description\" => \"Cập nhật đơn hàng\"),\n array(\"name\" => \"order.view\", \"group\" => \"order\", \"description\" => \"Xem chi tiết đơn hàng\"),\n array(\"name\" => \"order.delete\", \"group\" => \"order\", \"description\" => \"Xoá đơn hàng\"),\n // quyền sản phẩm/product\n array(\"name\" => \"product.access\", \"group\" => \"product\", \"description\" => \"Truy cập danh sách sản phẩm\"),\n array(\"name\" => \"product.create\", \"group\" => \"product\", \"description\" => \"Thêm sản phẩm\"),\n array(\"name\" => \"product.update\", \"group\" => \"product\", \"description\" => \"Cập nhật sản phẩm\"),\n array(\"name\" => \"product.view\", \"group\" => \"product\", \"description\" => \"Xem chi tiết sản phẩm\"),\n array(\"name\" => \"product.delete\", \"group\" => \"product\", \"description\" => \"Xoá sản phẩm\"),\n // quyền đánh giá/rating\n array(\"name\" => \"rating.access\", \"group\" => \"rating\", \"description\" => \"Truy cập danh đánh giá\"),\n array(\"name\" => \"rating.create\", \"group\" => \"rating\", \"description\" => \"Thêm đánh giá\"),\n array(\"name\" => \"rating.update\", \"group\" => \"rating\", \"description\" => \"Cập nhật đánh giá\"),\n array(\"name\" => \"rating.view\", \"group\" => \"rating\", \"description\" => \"Xem chi tiết đánh giá\"),\n array(\"name\" => \"rating.delete\", \"group\" => \"rating\", \"description\" => \"Xoá đánh giá\"),\n // quyền vai trò/role\n array(\"name\" => \"role.access\", \"group\" => \"role\", \"description\" => \"Truy cập danh vai trò\"),\n array(\"name\" => \"role.create\", \"group\" => \"role\", \"description\" => \"Thêm vai trò\"),\n array(\"name\" => \"role.update\", \"group\" => \"role\", \"description\" => \"Cập nhật vai trò\"),\n array(\"name\" => \"role.view\", \"group\" => \"role\", \"description\" => \"Xem chi tiết vai trò\"),\n array(\"name\" => \"role.delete\", \"group\" => \"role\", \"description\" => \"Xoá vai trò\"),\n // quyền thẻ tag\n array(\"name\" => \"tag.access\", \"group\" => \"tag\", \"description\" => \"Truy cập danh sách thẻ\"),\n array(\"name\" => \"tag.create\", \"group\" => \"tag\", \"description\" => \"Thêm thẻ\"),\n array(\"name\" => \"tag.update\", \"group\" => \"tag\", \"description\" => \"Cập nhật thẻ\"),\n array(\"name\" => \"tag.view\", \"group\" => \"tag\", \"description\" => \"Xem chi tiết thẻ\"),\n array(\"name\" => \"tag.delete\", \"group\" => \"tag\", \"description\" => \"Xoá thẻ\"),\n // quyền loại thuế\n array(\"name\" => \"tax.access\", \"group\" => \"tax\", \"description\" => \"Truy cập danh sách loại thuế\"),\n array(\"name\" => \"tax.create\", \"group\" => \"tax\", \"description\" => \"Thêm loại thuế\"),\n array(\"name\" => \"tax.update\", \"group\" => \"tax\", \"description\" => \"Cập nhật loại thuế\"),\n array(\"name\" => \"tax.view\", \"group\" => \"tax\", \"description\" => \"Xem chi tiết loại thuế\"),\n array(\"name\" => \"tax.delete\", \"group\" => \"tax\", \"description\" => \"Xoá loại thuế\"),\n // quyền người theo dõi\n array(\"name\" => \"subscriber.access\", \"group\" => \"subscriber\", \"description\" => \"Truy cập danh sách người theo dõi\"),\n array(\"name\" => \"subscriber.create\", \"group\" => \"subscriber\", \"description\" => \"Thêm người theo dõi\"),\n array(\"name\" => \"subscriber.update\", \"group\" => \"subscriber\", \"description\" => \"Cập nhật người theo dõi\"),\n array(\"name\" => \"subscriber.view\", \"group\" => \"subscriber\", \"description\" => \"Xem chi tiết người theo dõi\"),\n array(\"name\" => \"subscriber.delete\", \"group\" => \"subscriber\", \"description\" => \"Xoá người theo dõi\"),\n // người dùng\n array(\"name\" => \"user.access\", \"group\" => \"user\", \"description\" => \"Truy cập danh người dùng\"),\n array(\"name\" => \"user.create\", \"group\" => \"user\", \"description\" => \"Thêm người dùng\"),\n array(\"name\" => \"user.update\", \"group\" => \"user\", \"description\" => \"Cập nhật người dùng\"),\n array(\"name\" => \"user.view\", \"group\" => \"user\", \"description\" => \"Xem chi tiết người dùng\"),\n array(\"name\" => \"user.delete\", \"group\" => \"user\", \"description\" => \"Xoá người dùng\"),\n );\n Permission::insert($permissions);\n $permissions_ids = array();\n for ($i = 0; $i < count($permissions); ++$i) {\n $permissions_ids[] = $i + 1;\n }\n // Roles\n $role_admin = Role::firstOrCreate(['name' => 'Quản trị viên', 'slug' => 'admin']);\n $role_admin->permissions()->sync($permissions_ids);\n $role_customer = Role::firstOrCreate(['name' => 'customer', 'slug' => 'customer']);\n // Users\n $user = User::firstOrCreate(\n ['email' => 'admin@hifymart.com'],\n [\n 'name' => 'Admin',\n 'password' => Hash::make('12345678'),\n 'email_verified_at' => now()\n ]\n );\n $user->roles()->sync([$role_admin->id]);\n\n $user = User::firstOrCreate(\n ['email' => 'user@hifymart.com'],\n [\n 'name' => 'Customer',\n 'password' => Hash::make('12345678'),\n 'email_verified_at' => now()\n ]\n );\n $user->roles()->sync([$role_customer->id]);\n // Thuế\n Tax::firstOrCreate(['name' => 'None', 'value' => '0']);\n Tax::firstOrCreate(['name' => 'VAT', 'value' => '10']);\n /**\n * Cài đặt\n */\n // Cài đặt chung\n $settings = [\n ['name' => 'logo', 'value' => null],\n ['name' => 'favicon', 'value' => null],\n ['name' => 'app-name', 'value' => 'HifyMart'],\n ['name' => 'working-time', 'value' => '9h đến 20h, chủ nhật 10h đến 19h'],\n ['name' => 'contact-mail', 'value' => null],\n ['name' => 'contact-phone', 'value' => null],\n ['name' => 'contact-mobile', 'value' => null],\n ['name' => 'contact-address', 'value' => null],\n ['name' => 'facebook', 'value' => null],\n ['name' => 'twitter', 'value' => null],\n ['name' => 'instagram', 'value' => null],\n ['name' => 'youtube', 'value' => null],\n ['name' => 'bank-info', 'value' => '

    Lưu ý: Quý khách vui lòng đợi nhân viên liên hệ xác nhận đơn hàng trước khi thực hiện thanh toán.

    Công Ty TNHH HifyMart:

    BIDV

    Số tài khoản : 36210000123456

    Ngân hàng TMCP Đầu tư và Phát triển Việt Nam – Hà Nội

    '],\n ['name' => 'delivery', 'value' => '

    Phí vận chuyển: 19.000đ

    Miễn phí với đơn hàng từ 200.000đ trở lên

    Chỉ hỗ trợ vận chuyển đối với đơn hàng từ 100.000đ. Với đơn hàng có giá trị thấp hơn, quý khách vui lòng mua tại showroom

    '],\n ['name' => 'slides', 'value' => null]\n ];\n Setting::insert($settings);\n }","title":""},{"docid":"5ba531a7c47d81c7d80d79e56d288372","score":"0.6040172","text":"public function manage(){\n\t\t\n\t\tif($this->input->post('vertify') === 'pass') //if webmaster access from admin/index\n\t\t\t$this->input->set_cookie('user','webmaster','1200'); //set cookie for webmaster user\n\t\t\t\n\t\telse if($this->input->cookie('user') !== 'webmaster') //else if user is not webmaster\n\t\t\theader(\"location:\".base_url()); //back to hompage\n\t\t\n\t\t\n\t\t$data['title'] = \"KMITL-BBS : Webmaster Manager\";\n\t\t\n\t\t//init all event list\n\t\t$this->load->model('eventlist');\n\t\t$this->eventlist->initList(true);\n\t\t$event['eventlist'] = $this->eventlist->sortList('id','ASC');\n\t\t//init all user list\n\t\t$this->load->model('adminservice');\n\t\t$user['userlist'] = $this->adminservice->getUserList();\n\t\t\n\t\t// -------------- view : show html ----------------//\n\t\t\n\t\t$this->load->view('header',$data);\n\n\t\t$this->load->view('adminviewer1' ,$event);\n\t\t\n\t\t$this->load->view('adminviewer2' ,$user);\n\t\t\n\t}","title":""},{"docid":"9fdd487dd63a83f239fb9aad36e34f6a","score":"0.60296786","text":"public function index()\n {\n // $id = Auth::id();\n // $user = User::find($id);;\n // dd($user->isAdmin());\n $admins = Admin::all();\n return view('backend.admin.manage_admin.index', compact('admins'));\n }","title":""},{"docid":"3462e5fb76504155691044dd5e159539","score":"0.60237986","text":"function isAdmin()\n{\n\t//\n}","title":""},{"docid":"1ee2b30efb1c364bd25e8cdd37f2d3e6","score":"0.6020153","text":"public function viewAdmin(){\n\t\t\t$con = new Connection();\n $db = $con->openConnection();\n\t\t\tif(isset($this->admin_id)){\n\t\t\t\t$data = $db->query(\"SELECT * FROM admin where admin_id='$this->admin_id'\");\n\t\t\t\t\t\t\t$admin = $data->fetchAll();\n\n\t\t\t}elseif (isset($this->username)) {\n\t\t\t\t$data = $db->query(\"SELECT * FROM admin where admin_username='$this->admin_username'\");\n\t\t\t\t\t\t\t$admin = $data->fetchAll();\n\t\t\t}\n\t\t\telse{\n\n\t$data = $db->query(\"SELECT * FROM admin\");\n\t\t\t\t$admin = $data->fetchAll();\n\n\t\t\t}\nreturn $admin;\n\n\n}","title":""},{"docid":"499b0e2effb57929fda8c0a54b488b0c","score":"0.6018518","text":"public function run()\n {\n \n $role_platform_admin = Role::where('name', 'Platform Admin')->first();\n\n $role_org_admin = Role::where('name', 'Organization Admin')->first();\n \n $super_admin = new Admin();\n $super_admin->name = 'Rahul Mehta';\n $super_admin->username = 'rahul';\n $super_admin->email = 'rahulm.nmg@yopmail.com';\n $super_admin->password = bcrypt('123456');\n $super_admin->status = '1';\n $super_admin->save();\n $super_admin->roles()->attach($role_platform_admin);\n\n $admin = new Admin();\n $admin->name = 'Sandeep Kumar';\n $admin->username = 'sandeep';\n $admin->email = 'sandeepk.nmg@yopmail.com';\n $admin->password = bcrypt('123456');\n $admin->status = '1';\n $admin->save();\n $admin->roles()->attach($role_org_admin);\n\n }","title":""},{"docid":"0f6c543f600e0787ad392f38c8252d33","score":"0.60163754","text":"abstract protected function _admin_login();","title":""},{"docid":"f4ec6a0efc22c1575befd7232d6b903a","score":"0.6015226","text":"public function indexadmin() {\n\t\t\t$this->set('title_for_layout','Business Meeting - Pregunta');\n\t\t\t$this ->layout='admin';\n\t\t\t$this->set('questions', $this->Question->find('all'));\n\t\t\t\n\t\t}","title":""},{"docid":"fd4f23b3ac0a3402879840dc26a9af5e","score":"0.6008195","text":"public function admin_index() {\n if (!$this->DCAuth->isAdmin()) {\n $this->redirect($this->referer());\n }\n }","title":""},{"docid":"7f24078ad5693859e666b106783e7a19","score":"0.5994562","text":"public function run()\n {\n //\n $role_admin = [\n \"slug\" => \"admin\",\n \"name\" => \"Admin\",\n \"permissions\" => [\n \"admin\" => true\n ]\n ];\n\n Sentinel::getRoleRepository()->createModel()->fill($role_admin)->save();\n $adminrole = Sentinel::findRoleByName('Admin');\n $user_admin = [\"name\"=>\"Administrator\", \"phone\"=>\"01234567890\",\"address\"=>\"Admin Street\", \"email\"=>\"admin@gmail.com\", \"password\"=>'admin123'];\n $adminuser = Sentinel::registerAndActivate($user_admin);\n $adminuser->roles()->attach($adminrole);\n\n $role_supplier = [\n \"slug\" => \"supplier\",\n \"name\" => \"Supplier\",\n \"permissions\" => [\n \"admin.supplier\" => true\n ]\n ];\n Sentinel::getRoleRepository()->createModel()->fill($role_supplier)->save();\n $supplierrole = Sentinel::findRoleByName('Supplier');\n $user_supplier = [\"name\"=>\"Supplier\", \"phone\"=>\"01234567890\",\"address\"=>\"Supplier Address\", \"email\"=>\"supplier@gmail.com\", \"password\"=>'supplier123'];\n $supplieruser = Sentinel::registerAndActivate($user_supplier);\n $supplieruser->roles()->attach($supplierrole);\n\n $role_buyer = [\n \"slug\" => \"buyer\",\n \"name\" => \"Buyer\",\n \"permissions\" => [\n \"admin.belanja\" => true\n ]\n ];\n Sentinel::getRoleRepository()->createModel()->fill($role_buyer)->save();\n $buyerrole = Sentinel::findRoleByName('Buyer');\n $user_buyer = [\"name\"=>\"Buyer\", \"phone\"=>\"01234567890\",\"address\"=>\"Buyer Address\", \"email\"=>\"buyer@gmail.com\", \"password\"=>'buyer123'];\n $buyeruser = Sentinel::registerAndActivate($user_buyer);\n $buyeruser->roles()->attach($buyerrole);\n }","title":""},{"docid":"7c0aae54ece2d3dbcc100f422428f287","score":"0.5989522","text":"public function index($conexion){\n // $data[\"admin\"] = $admin->getPrincipalView();\n require_once \"views/admin/admin.view.php\";\n }","title":""},{"docid":"730220355455e7ec6ec8667e96825d51","score":"0.5989073","text":"function shortApp() {\n\t\t$this->loadAllModel(array('User','ShortApplication'));\n\t\t$this->layout = 'short_app';\n\t\tif(isset($this->request->data) && (!empty($this->request->data))){\n\t\t\t$this->ShortApplication->set($this->request->data['ShortApplication']);\n\t\t\tif($this->ShortApplication->validates()){\n\t\t\t\tunset($this->request->data['ShortApplication']['broker_name']);\n\t\t\t\t$this->Session->write('shortApp',$this->request->data['ShortApplication']);\n\t\t\t\t$this->redirect(array('controller'=>'homes','action' => 'shortAppStep2/'.base64_encode('step2')));\n\t\t\t}\n\t\t}\n\t\t$brokers = $this->User->find('list',array('conditions'=>array('User.user_type'=>2,'User.status'=>1,'User.is_deleted' =>0),'fields' => array('id','name'),'order'=>'name ASC'));\n\t\t$brokers['none'] = 'Your Mortgage Broker';\n\t\t$this->set('brokers',$brokers);\t\n\t}","title":""},{"docid":"15b2e4051263a99c1de2a091e2a2470e","score":"0.5984873","text":"function sfa_adminadminspage()\r\n{\r\n sfa_render_admins_index();\r\n\r\n return;\r\n}","title":""},{"docid":"458a458abab37cd6a5cd035b6d40412c","score":"0.59821045","text":"public function adminDefault() {\n\t\t$this->adminList();\n\t}","title":""},{"docid":"2c748416e9f66a8e9ef81fe46643e6ca","score":"0.59749377","text":"function admin_init() {}","title":""},{"docid":"659de9f6d9db67233acd255b27c810d8","score":"0.5973237","text":"function debet_adm()\n\t{\n\t\t$data['title'] = 'Debet Administrasi';\n\t\t$data['container'] = 'sys/debet_adm';\n\t\t$this->load->view('core',$data);\n\t}","title":""},{"docid":"9e1b0c0a6c0de5a3a848c7753117d2e9","score":"0.5967677","text":"function makeadminAction(){\n $auth = Zend_Auth::getInstance();\n if($auth->hasIdentity()){\n $identity = $auth->getIdentity(); \n $user_id = $identity->id_user;\n $type = $identity->type;\n\n $admin_user = $this->getRequest()->getParam('id');\n if($type == 1){\n $user = $this->model->makeAdminUser($admin_user);\n $this->redirect('users/index');\n }\n else{\n $this->_redirect('cateogry/index');\n }\n }\n else{\n $this->_redirect('users/login');\n } \n }","title":""},{"docid":"bd86e72d2b6fa3ce2b5fbf2dc5f1f26c","score":"0.5957892","text":"private function del_admins(object $pp1)\n {\n $tbl = $pp1->uriq->t = 'admins' ; \n $other=['caller'=>__FILE__.' '.', ln '.__LINE__, ', d e l in tbl '.$tbl] ;\n\n Tbl_crud_admin::dd($pp1, $other); //used for all t a b l e s !! \n Config_allsites::Redirect_to($pp1->admins) ;\n\n }","title":""},{"docid":"3bfbec4c826418da9d14a8422402198f","score":"0.59534746","text":"public function index()\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url() . 'login', 'refresh');\n if ($this->session->userdata('admin_login') == 1)\n redirect(base_url() . 'admin/question_list', 'refresh');\n \n \n }","title":""},{"docid":"6aa1ae3793683ddfe04aeee7f772766a","score":"0.5949223","text":"public function index()\n {\n// echo date('H:i:s', time());\n// $is_login = Auth::check();\n// var_dump($is_login);\n// if (!$is_login){\n// return redirect()->guest('auth/login');\n// } else {\n// echo \"登陆状态\";\n// }\n $this->_adminUserSvc = new AdminUserSvc();\n $this->_adminRoleSvc = new AdminRoleSvc();\n $this->_adminModuleSvc = new AdminModuleSvc();\n\n $user = Auth::user();\n $current = $this->_adminUserSvc->getRow(array(array('id', '=', $user->id)));\n $currentRolePermission = array();\n if($current)$currentRolePermission = $this->_adminUserSvc->ownPermission($current);\n $currentOwnRole = array();\n if($current)$currentOwnRole = $this->_adminUserSvc->ownRole($current);\n\n $allStaticModule = $this->_adminModuleSvc->allStaticActionGroup();\n\n //共享数据\n view()->share('currentRolePermission',$currentRolePermission);\n view()->share('allStaticModule',$allStaticModule);\n view()->share('currentOwnRole',$currentOwnRole);\n view()->share('user',$user);\n return view('index');\n }","title":""},{"docid":"52578a11a977407fe06e11c2f0117602","score":"0.5947817","text":"public function run()\n {\n $url = \"http://mariacanoied.herokuapp.com/home\";\n $home = \"http://mariacanoied.herokuapp.com/pages/\";\n\n /**\n * Permisos de control de usuarios\n * Rol = Coordinador\n * \n * Permiso padre = Usuario\n */\n\n $perUsu = new Permiso();\n $perUsu->nombre = 'Usuarios';\n $perUsu->name = 'Users';\n $perUsu->icon = 'people-circle';\n $perUsu->estado = 'Activo';\n $perUsu->save();\n\n /* Permisos hijo */\n $perHUR = new Permiso();\n $perHUR->nombre = \"Usuarios registrados\";\n $perHUR->name = \"Registered Users\";\n $perHUR->url = \"http://mariacanoied.herokuapp.com/pages/usuarios/index\";\n $perHUR->permiso_padre = $perUsu->id;\n $perHUR->estado = 'Activo';\n $perHUR->save();\n\n $perRol = new Permiso();\n $perRol->nombre = \"Roles\";\n $perRol->name = \"Roles\";\n $perRol->url = $url;\n $perRol->permiso_padre = $perUsu->id;\n $perRol->estado = 'Activo';\n $perRol->save();\n\n /**\n * Permisos de control de Servicio social\n * Rol = Coordinador - Estudiante\n * \n * Permiso padre = Servicio social\n */\n\n $perServ = new Permiso();\n $perServ->nombre = 'Servicio social';\n $perServ->name = 'Social service';\n $perServ->icon = 'walk';\n $perServ->estado = 'Activo';\n $perServ->save();\n\n /* Permisos hijo */\n $perZS = new Permiso();\n $perZS->nombre = \"Zonas de servicio\";\n $perZS->name = \"Service areas\";\n $perZS->url = $home.'zonas/index';\n $perZS->permiso_padre = $perServ->id;\n $perZS->estado = 'Activo';\n $perZS->save();\n\n $perBS = new Permiso();\n $perBS->nombre = \"Bitácoras de servicio\";\n $perBS->name = \"Service logs\";\n $perBS->url = $home.'bitacora/index';\n $perBS->permiso_padre = $perServ->id;\n $perBS->estado = 'Activo';\n $perBS->save();\n\n /**\n * Permisos de control de PQRS\n * Rol = Coordinador - Acudiente\n * \n * Permiso padre = PQRS\n */\n\n $perPqrs = new Permiso();\n $perPqrs->nombre = 'PQRS';\n $perPqrs->name = 'Consultations';\n $perPqrs->icon = 'help';\n $perPqrs->estado = 'Activo';\n $perPqrs->save();\n\n /* Permisos hijo */\n $perLP = new Permiso();\n $perLP->nombre = \"Lista de PQRS\";\n $perLP->name = \"List of queries\";\n $perLP->url = $home.'pqrs/index';\n $perLP->permiso_padre = $perPqrs->id;\n $perLP->estado = 'Activo';\n $perLP->save();\n\n $perMP = new Permiso();\n $perMP->nombre = \"Mis PQRS\";\n $perMP->name = \"My questions\";\n $perMP->url = $home.'pqrs/create';\n $perMP->permiso_padre = $perPqrs->id;\n $perMP->estado = 'Activo';\n $perMP->save();\n\n /**\n * Permisos de control de Citas\n * Rol = Coordinador - Acudiente\n * \n * Permiso padre = Citas\n */\n\n $perCit = new Permiso();\n $perCit->nombre = 'Citas';\n $perCit->name = 'Appointment';\n $perCit->icon = 'calendar-outline';\n $perCit->estado = 'Activo';\n $perCit->save();\n\n /* Permisos hijo */\n $perRC = new Permiso();\n $perRC->nombre = \"Atención por area\";\n $perRC->name = \"Attention by area\";\n $perRC->url = $home.'atencion_areas/index';\n $perRC->permiso_padre = $perCit->id;\n $perRC->estado = 'Activo';\n $perRC->save();\n\n $perRC = new Permiso();\n $perRC->nombre = \"Atención por curso\";\n $perRC->name = \"Attention by course\";\n $perRC->url = $home.'atencion_curso/index';\n $perRC->permiso_padre = $perCit->id;\n $perRC->estado = 'Activo';\n $perRC->save();\n \n $perCC = new Permiso();\n $perCC->nombre = \"Consultar citas\";\n $perCC->name = \"Consult appointments\";\n $perCC->url = $home.'citas/index';\n $perCC->permiso_padre = $perCit->id;\n $perCC->estado = 'Activo';\n $perCC->save();\n\n /**\n * Permisos de control de Administración academica\n * Rol = Coordinador\n * \n * Permiso padre = Administración academica\n */\n\n $perAA = new Permiso();\n $perAA->nombre = 'Administración académica';\n $perAA->name = 'Academic administration';\n $perAA->icon = 'school';\n $perAA->estado = 'Activo';\n $perAA->save();\n\n /* Permisos hijo */\n $perIG = new Permiso();\n $perIG->nombre = \"Información general\";\n $perIG->name = \"General information\";\n $perIG->url = $home.'administracion_academica/index';\n $perIG->permiso_padre = $perAA->id;\n $perIG->estado = 'Activo';\n $perIG->save();\n\n $perCur = new Permiso();\n $perCur->nombre = \"Docentes\";\n $perCur->name = \"Teachers\";\n $perCur->url = $url;\n $perCur->permiso_padre = $perAA->id;\n $perCur->estado = 'Activo';\n $perCur->save();\n \n $perHorC = new Permiso();\n $perHorC->nombre = \"Administrar horarios\";\n $perHorC->name = \"Manage schedules\";\n $perHorC->url = $url;\n $perHorC->permiso_padre = $perAA->id;\n $perHorC->estado = 'Activo';\n $perHorC->save();\n \n /**\n * Permisos de control de Noticias\n * Rol = Coordinador\n * \n * Permiso padre = Noticias\n */\n\n $perNot = new Permiso();\n $perNot->nombre = 'Noticias';\n $perNot->name = 'News';\n $perNot->icon = 'newspaper';\n $perNot->estado = 'Activo';\n $perNot->save();\n\n /* Permisos hijo */ \n $perCN = new Permiso();\n $perCN->nombre = \"Lista de noticias\";\n $perCN->name = \"News list\";\n $perCN->url = 'http://mariacanoied.herokuapp.com/pages/news/index';\n $perCN->permiso_padre = $perNot->id;\n $perCN->estado = 'Activo';\n $perCN->save();\n \n /**\n * Permisos de control de Portafolio\n * Rol = Docente\n * \n * Permiso padre = Portafolio\n */\n\n $perPor = new Permiso();\n $perPor->nombre = 'Portafolio';\n $perPor->name = 'Briefcase';\n $perPor->icon = 'briefcase';\n $perPor->estado = 'Activo';\n $perPor->save();\n \n /* Permisos hijo */\n $perAct = new Permiso();\n $perAct->nombre = \"Actividades\";\n $perAct->name = \"Activities\";\n $perAct->url = $home.'actividades/index';\n $perAct->permiso_padre = $perPor->id;\n $perAct->estado = 'Activo';\n $perAct->save();\n \n /**\n * Permisos de control de Agenda\n * Rol = Docente - Acudiente - Estudiante\n * \n * Permiso padre = Agenda\n */\n\n $perAge = new Permiso();\n $perAge->nombre = 'Agenda';\n $perAge->name = 'Schedule';\n $perAge->icon = 'book';\n $perAge->estado = 'Activo';\n $perAge->save();\n\n /* Permisos hijo */\n $perRO = new Permiso();\n $perRO->nombre = \"Registrar observación\";\n $perRO->name = \"Record observation\";\n $perRO->url = $home.'agendaWeb/create';\n $perRO->permiso_padre = $perAge->id;\n $perRO->estado = 'Activo';\n $perRO->save();\n \n $perCO = new Permiso();\n $perCO->nombre = \"Consultar observaciones\";\n $perCO->name = \"Consult observations\";\n $perCO->url = $home.'agendaWeb/index';\n $perCO->permiso_padre = $perAge->id;\n $perCO->estado = 'Activo';\n $perCO->save();\n \n /**\n * Permisos de control de Planillas\n * Rol = Docente\n * \n * Permiso padre = Planillas\n */\n\n $perPla = new Permiso();\n $perPla->nombre = 'Registros académicos';\n $perPla->name = 'Academic Records';\n $perPla->icon = 'clipboard';\n $perPla->estado = 'Activo';\n $perPla->save();\n /* Permisos hijo */\n $perCal = new Permiso();\n $perCal->nombre = \"Calificaciones\";\n $perCal->name = \"Ratings\";\n $perCal->url = $home.'notas/index';\n $perCal->permiso_padre = $perPla->id;\n $perCal->estado = 'Activo';\n $perCal->save();\n \n $perAsis = new Permiso();\n $perAsis->nombre = \"Asistencia\";\n $perAsis->name = \"Assistance\";\n $perAsis->url = $home.'asistencias/index';\n $perAsis->permiso_padre = $perPla->id;\n $perAsis->estado = 'Activo';\n $perAsis->save();\n }","title":""},{"docid":"6bf9efa3d88ab78337823ebea2973a5e","score":"0.59400624","text":"public function index(){\n\t\tif($this->mdl_admin->logged_id()){\n\t\t\t$this->load->view(\"homee\");\n\t\t}else{redirect(\"login\");}\n\t}","title":""},{"docid":"38fea318082954b95c69d13beddf8a85","score":"0.59365106","text":"public function admin()\n {\n $total_projects =Rent::where('status',0)->count();\n\n $total_users = User::count();\n\n $total_houses = House::count();\n\n $total_rent_houses=House::where('status',1)->count();\n\n $total_ava_houses=House::where('status',0)->count();\n\n $total_township=Township::count();\n\n if (Auth::user()->hasRole('admin')) {\n return view('backend.index')->with(['total'=>$total_projects])->with('totalusers', $total_users)->with(['totalhouse'=>$total_houses])->with('total_rent_houses', $total_rent_houses)->with('total_ava_houses', $total_ava_houses)->with('total_township', $total_township);\n } else {\n return redirect()->route('home');\n }\n }","title":""},{"docid":"fd9dc8864c3dfcfffdbb04f69256d015","score":"0.5929975","text":"static function getAdminName() {\n\t\treturn MonitisConf::$adminName; \n\t}","title":""},{"docid":"3c3984e27088de8dba7ff5664aeba7c8","score":"0.59235615","text":"public function run()\n {\n //\n $superadminRole = new Role();\n $superadminRole->name = \"superadmin\";\n $superadminRole->display_name=\"Super Admin\";\n $superadminRole->save();\n\n $adminRole = new Role();\n $adminRole->name = \"admin\";\n $adminRole->display_name=\"Admin\";\n $adminRole->save();\n\n $superadmin = new User();\n $superadmin->name = 'Super Admin Rangkas';\n $superadmin->email ='superadmin@gmail.com';\n $superadmin->password = bcrypt('rahasia');\n $superadmin->is_verified=1;\n $superadmin->save();\n $superadmin->attachRole($superadminRole);\n\n $admin = new User();\n $admin->name = \"Admin Rangkas\";\n $admin->email ='admin@gmail.com';\n $admin->password = bcrypt('rahasia');\n $admin->is_verified=1;\n $admin->save();\n $admin->attachRole($adminRole);\n }","title":""},{"docid":"38e3809223a59bfcd752c0a8746e3c60","score":"0.59220755","text":"function admin_index() { \r\n \t$this->set('ruta_admin',$this->ruta_admin);\r\n \t$this->set('users',$this->paginate(\"User\"));\r\n }","title":""},{"docid":"feead3369bef27d3ff43722e3ea92a2a","score":"0.5921773","text":"public function viewAdminIndex()\n {\n $admins = $this->admin::paginate(12);\n if (currentAdminType() == 'manager')\n return view('manager.index' , ['admins' => $admins]);\n \n return view('admin.index' , ['admins' => $admins]);\n }","title":""},{"docid":"477662996f00e15a4dd7da3064a7ad12","score":"0.59179974","text":"public function run()\n {\n\n $backend = Menu::create([\n 'name' => '控制台',\n 'parent_id' => '0',\n 'slug' => 'system.login',\n 'url' => 'admin',\n 'heightlight_url' => 'admin',\n ]);\n\n $system = Menu::create([\n 'name' => '系统管理',\n 'parent_id' => '0',\n 'slug' => 'system.manage',\n 'url' => 'admin/menu',\n 'heightlight_url' => 'admin/menu*,admin/user*,admin/role*,admin/permission*',\n ]);\n\n Menu::create([\n 'name' => '菜单管理',\n 'parent_id' => $system->id,\n 'slug' => 'menu.list',\n 'url' => 'admin/menu',\n 'heightlight_url' => 'admin/menu*',\n ]);\n\n Menu::create([\n 'name' => '用户管理',\n 'parent_id' => $system->id,\n 'slug' => 'user.list',\n 'url' => 'admin/user',\n 'heightlight_url' => 'admin/user*',\n ]);\n\n Menu::create([\n 'name' => '权限管理',\n 'parent_id' => $system->id,\n 'slug' => 'permission.list',\n 'url' => 'admin/permission',\n 'heightlight_url' => 'admin/permission*',\n ]);\n\n Menu::create([\n 'name' => '角色管理',\n 'parent_id' => $system->id,\n 'slug' => 'role.list',\n 'url' => 'admin/role',\n 'heightlight_url' => 'admin/role*',\n ]);\n\n\n }","title":""},{"docid":"c8aaf3d56e5ac0088d5a0c2e6a147498","score":"0.59160626","text":"public function run()\n {\n Admin::create(['name'=>'Admin','email'=>'admin@gmail.com','password'=>bcrypt('password')]);\n Admin::create(['name'=>'Manager','email'=>'manager@gmail.com','password'=>bcrypt('password')]);\n }","title":""},{"docid":"c0a5e7f03358408b5d7e9259bec48ba1","score":"0.59122515","text":"public function run()\n {\n $admin = new User();\n $admin->name = \"admin\";\n $admin->email = \"admin@gmail.com\";\n $admin->password = bcrypt('123456');\n $admin->gender =User::GENDER_MALE ;\n $admin->role =User::ROLE_SUPER_ADMIN ;\n $admin->save();\n\n $admin = new User();\n $admin->name = \"gv1\";\n $admin->email = \"gv1@gmail.com\";\n $admin->password = bcrypt('123456');\n $admin->gender =User::GENDER_MALE ;\n $admin->class = 'CNTT';\n $admin->role =User::ROLE_ADMIN ;\n $admin->save();\n\n $admin = new User();\n $admin->name = \"gv2\";\n $admin->email = \"gv2@gmail.com\";\n $admin->password = bcrypt('123456');\n $admin->gender =User::GENDER_MALE ;\n $admin->class = 'CNTT';\n $admin->role =User::ROLE_ADMIN ;\n $admin->save();\n\n $admin = new User();\n $admin->name = \"gv3\";\n $admin->email = \"gv3@gmail.com\";\n $admin->password = bcrypt('123456');\n $admin->gender =User::GENDER_MALE ;\n $admin->class = 'CNTT';\n $admin->role =User::ROLE_ADMIN ;\n $admin->save();\n\n $user = new User();\n $user->name = \"viet hoang\";\n $user->birthday = \"02/3/1999\";\n $user->code = \"17020770\";\n $user->email = \"hoang@gmail.com\";\n $user->password = bcrypt('123456');\n $user->class = 'K62-CD';\n $user->gender =User::GENDER_MALE ;\n $user->role =User::ROLE_USER ;\n $user->save();\n\n $user = new User();\n $user->name = \"viet tu\";\n $user->birthday = \"12/5/1999\";\n $user->code = \"1702624\";\n $user->email = \"tu@gmail.com\";\n $user->password = bcrypt('123456');\n $user->class = 'K62-M';\n $user->gender =User::GENDER_MALE ;\n $user->role =User::ROLE_USER ;\n $user->save();\n\n $user = new User();\n $user->name = \"viet linh\";\n $user->birthday = \"23/9/1999\";\n $user->code = \"17025410\";\n $user->email = \"linh@gmail.com\";\n $user->password = bcrypt('123456');\n $user->class = 'K62-L';\n $user->gender =User::GENDER_FEMALE ;\n $user->role =User::ROLE_USER ;\n $user->save();\n\n\n $user = new User();\n $user->name = \"khoa CNTT\";\n $user->email = \"cntt@gmail.com\";\n $user->password = bcrypt('123456');\n $user->class = 'K62-L';\n $user->role = User::ROLE_ASSESSOR ;\n $user->save();\n\n\n }","title":""},{"docid":"4b51b8d4cc3dff55ad6e256e2842d3a4","score":"0.59091944","text":"public function admin()\n\t{\n\t\t$data['pengaduan'] = $this->modelsystem->tampil_pengaduan();\n\t\tif ($num1 = $this->modelsystem->HitungData1()) {\n\t\t\t$data['hasil1'] = $num1;\n\t\t}\n\t\tif ($num2 = $this->modelsystem->HitungData2()) {\n\t\t\t$data['hasil2'] = $num2;\n\t\t}\n\t\tif ($num3 = $this->modelsystem->HitungData3()) {\n\t\t\t$data['hasil3'] = $num3;\n\t\t}\n\t\t$this->load->view('admin/admin-home', $data);\n\t}","title":""},{"docid":"9f7702ff49f2ba2e9281fffb586333cf","score":"0.59073824","text":"public function run()\n {\n $index = new Menu;\n $index->name = \"控制台\";\n $index->pid = 0;\n $index->language = \"zh\";\n $index->icon = \"fa fa-dashboard\";\n $index->slug = \"admin.systems.index\";\n $index->url = \"admin\";\n $index->description = \"后台首页\";\n $index->save();\n\n $system = new Menu;\n $system->name = \"系统管理\";\n $system->pid = 0;\n $system->language = \"zh\";\n $system->icon = \"fa fa-cog\";\n $system->slug = \"admin.systems.manage\";\n $system->url = \"admin/role*,admin/permission*,admin/user*,admin/menu*,admin/log-viewer*\";\n $system->description = \"系统功能管理\";\n $system->save();\n\n $user = new Menu;\n $user->name = \"用户管理\";\n $user->pid = $system->id;\n $user->language = \"zh\";\n $user->icon = \"fa fa-users\";\n $user->slug = \"admin.users.list\";\n $user->url = \"admin/user\";\n $user->description = \"显示用户管理\";\n $user->save();\n\n\n $role = new Menu;\n $role->name = \"角色管理\";\n $role->pid = $system->id;\n $role->language = \"zh\";\n $role->icon = \"fa fa-male\";\n $role->slug = \"admin.roles.list\";\n $role->url = \"admin/role\";\n $role->description = \"显示角色管理\";\n $role->save();\n\n\n $permission = new Menu;\n $permission->name = \"权限管理\";\n $permission->pid = $system->id;\n $permission->language = \"zh\";\n $permission->icon = \"fa fa-paper-plane\";\n $permission->slug = \"admin.permissions.list\";\n $permission->url = \"admin/permission\";\n $permission->description = \"显示权限管理\";\n $permission->save();\n\n $log = new Menu;\n $log->name = \"系统日志\";\n $log->pid = $system->id;\n $log->language = \"zh\";\n $log->icon = \"fa fa-file-text-o\";\n $log->slug = \"admin.logs.all\";\n $log->url = \"admin/log-viewer\";\n $log->description = \"显示系统日志\";\n $log->save();\n\n $menu = new Menu;\n $menu->name = \"菜单管理\";\n $menu->pid = $system->id;\n $menu->language = \"zh\";\n $menu->icon = \"fa fa-navicon\";\n $menu->slug = \"admin.menus.list\";\n $menu->url = \"admin/menu\";\n $menu->description = \"显示菜单管理\";\n $menu->save();\n\n $menu = new Menu;\n $menu->name = \"操作日志\";\n $menu->pid = $system->id;\n $menu->language = \"zh\";\n $menu->icon = \"fa fa-heart\";\n $menu->slug = \"admin.actionlog.list\";\n $menu->url = \"admin/actionlog\";\n $menu->description = \"操作日志\";\n $menu->save();\n\n $image = new Menu;\n $image->name = \"图片管理\";\n $image->pid = 0;\n $image->language = \"zh\";\n $image->icon = \"fa fa-heart\";\n $image->slug = \"admin.image.manage\";\n $image->url = \"admin/image/show*,admin/image/select*,admin/image/image_list*\";\n $image->description = \"图片管理\";\n $image->save();\n\n $imageUpload = new Menu;\n $imageUpload->name = \"图片上传\";\n $imageUpload->pid = $image->id;\n $imageUpload->language = \"zh\";\n $imageUpload->icon = \"fa fa-cloud-upload\";\n $imageUpload->slug = \"admin.image.upload\";\n $imageUpload->url = \"admin/image/show\";\n $imageUpload->description = \"图片上传\";\n $imageUpload->save();\n\n $imageSelect = new Menu;\n $imageSelect->name = \"图片选择器\";\n $imageSelect->pid = $image->id;\n $imageSelect->language = \"zh\";\n $imageSelect->icon = \"fa fa-photo\";\n $imageSelect->slug = \"admin.image.select\";\n $imageSelect->url = \"admin/image/select\";\n $imageSelect->description = \"图片选择器\";\n $imageSelect->save();\n\n $imageList = new Menu;\n $imageList->name = \"图片列表\";\n $imageList->pid = $image->id;\n $imageList->language = \"zh\";\n $imageList->icon = \"fa fa-photo\";\n $imageList->slug = \"admin.image.imagelist\";\n $imageList->url = \"admin/image/image_list\";\n $imageList->description = \"图片列表\";\n $imageList->save();\n\n $website = new Menu;\n $website->name = \"网站设置\";\n $website->pid = 0;\n $website->language = \"zh\";\n $website->icon = \"fa fa-globe\";\n $website->slug = \"admin.setting.manage\";\n $website->url = \"admin/setting/switch*,admin/setting/email*\";\n $website->description = \"网站设置相关\";\n $website->save();\n\n\n $websiteSwitch = new Menu;\n $websiteSwitch->name = \"功能开关\";\n $websiteSwitch->pid = $website->id;\n $websiteSwitch->language = \"zh\";\n $websiteSwitch->icon = \"fa fa-power-off\";\n $websiteSwitch->slug = \"admin.setting.switch\";\n $websiteSwitch->url = \"admin/setting/switch\";\n $websiteSwitch->description = \"网站功能开关\";\n $websiteSwitch->save();\n\n $websiteSwitch = new Menu;\n $websiteSwitch->name = \"邮件模板\";\n $websiteSwitch->pid = $website->id;\n $websiteSwitch->language = \"zh\";\n $websiteSwitch->icon = \"fa fa-envelope-o\";\n $websiteSwitch->slug = \"admin.setting.email\";\n $websiteSwitch->url = \"admin/setting/email\";\n $websiteSwitch->description = \"邮件模板\";\n $websiteSwitch->save();\n\n $article = new Menu;\n $article->name = \"文章管理\";\n $article->pid = 0;\n $article->language = \"zh\";\n $article->icon = \"fa fa-heart\";\n $article->slug = \"admin.article.manage\";\n $article->url = \"admin/article*,admin/ae_category*\";\n $article->description = \"文章管理\";\n $article->save();\n\n $articleList = new Menu;\n $articleList->name = \"文章列表\";\n $articleList->pid = $article->id;\n $articleList->language = \"zh\";\n $articleList->icon = \"fa fa-heart\";\n $articleList->slug = \"admin.article.list\";\n $articleList->url = \"admin/article\";\n $articleList->description = \"文章列表\";\n $articleList->save();\n\n $articleCategory = new Menu;\n $articleCategory->name = \"分类列表\";\n $articleCategory->pid = $article->id;\n $articleCategory->language = \"zh\";\n $articleCategory->icon = \"fa fa-heart\";\n $articleCategory->slug = \"admin.article.categorylist\";\n $articleCategory->url = \"admin/ae_category\";\n $articleCategory->description = \"分类列表\";\n $articleCategory->save();\n\n\n\n\n\n\n\n\n }","title":""},{"docid":"13c355ced10d35d20b7b0d19272a3f29","score":"0.5905425","text":"public function index()\n {\n if(Gate::denies('manage-users')){\n return view('/student/stdhome');\n }\n else{\n return view('admin/adminhome');\n }\n }","title":""},{"docid":"c85db6154f300ad997e3a381890c9645","score":"0.5904747","text":"function bp_admin() {}","title":""},{"docid":"a4900a0b74b617f3e5874f71cb554601","score":"0.59009933","text":"public function actionAdmin() {\n $widgets = array();\n\t\t$this->render('dashboard', array('widgets'=>$widgets));\n\t}","title":""},{"docid":"536108c5e2472320d8b6d523714a0474","score":"0.5888395","text":"public function run()\n {\n $rol = Permission();\n $rol->name= 'admin';\n $rol->slug='admin';\n $rol->save();\n }","title":""},{"docid":"f894e8637dee60e9917c0d514f57ec8a","score":"0.5887737","text":"public function admin()\n {\n $data = array(\n 'page_title' => 'Users',\n 'page_active' => 'user'\n );\n\n\n $this->view->load_admin('users/admin/admin_view', $data);\n\n }","title":""},{"docid":"c1c5d4c0888821ce986f5a9c73270d7d","score":"0.5887728","text":"public function run()\n {\n \t$password = bcrypt('password');\n \t$time = date('Y-m-d H:i:s',time());\n\n $datas = [\n \t[\n \t\t'phone' => '15108479103',\n 'name' => '超级管理员',\n \t\t'password'=>$password,\n \t\t'created_at' => $time,\n \t\t'updated_at' => $time\n \t],\n [\n 'phone' => '15108479104',\n 'name' => '管理员',\n 'password'=>$password,\n 'created_at' => $time,\n 'updated_at' => $time\n ],\n [\n 'phone' => '15108479112',\n 'name' => '推广1',\n 'password'=>$password,\n 'created_at' => $time,\n 'updated_at' => $time\n ],\n [\n 'phone' => '15108479111',\n 'name' => '推广2',\n 'password'=>$password,\n 'created_at' => $time,\n 'updated_at' => $time\n ],\n ];\n\n Admin::insert($datas);\n\n\n // 单独处理第一个用户的数据\n $admin = Admin::find(1);\n // 初始化用户角色,将 1 号用户指派为『站长』\n $admin->assignRole('超级管理员');\n\n // 将 2 号用户指派为『管理员』\n $admin = Admin::find(2);\n $admin->assignRole('管理员');\n\n // 指定为推广 \n $admin = Admin::find(3);\n $admin->assignRole('推广员');\n\n $admin = Admin::find(4);\n $admin->assignRole('推广员');\n }","title":""},{"docid":"66b824c3f577b358928317322c340290","score":"0.5887514","text":"public function run() {\n\t\t$admin = new User();\n\t\t$admin->role_id = 1;\n\t\t$admin->username = 'juan_Admin';\n\t\t$admin->name = 'Juan Pérez';\n\t\t$admin->website = 'a.com';\n\t\t$admin->facebook = 'facebook/a';\n\t\t$admin->twitter = 'twitter/a';\n\t\t$admin->about = 'Soy el Admin de esta página, cualquier cosa que necesites estoy a tus ordenes.';\n\t\t$admin->email = 'admin@admin.com';\n\t\t$admin->password = bcrypt('admin123');\n\t\t$admin->save();\n\n\t\t$entrepreneur = new User();\n\t\t$entrepreneur->role_id = 2;\n\t\t$entrepreneur->username = 'pedro_emprendedor';\n\t\t$entrepreneur->name = 'Pedro Pérez';\n\t\t$entrepreneur->website = 'a.com';\n\t\t$entrepreneur->facebook = 'facebook/a';\n\t\t$entrepreneur->twitter = 'twitter/a';\n\t\t$entrepreneur->about = 'Que tal, soy Pedro un emprendedor que, como tu, busco ofertar mis servicios al publico para darme a conocer e iniciar mi negocio propio';\n\t\t$entrepreneur->email = 'emprendedor@emprendedor.com';\n\t\t$entrepreneur->password = bcrypt('emprendedor123');\n\t\t$entrepreneur->save();\n\n\t\t$user = new User();\n\t\t$user->role_id = 3;\n\t\t$user->username = 'jorge_usuario';\n\t\t$user->name = 'Jorge Pérez';\n\t\t$user->website = 'a.com';\n\t\t$user->facebook = 'facebook/a';\n\t\t$user->twitter = 'twitter/a';\n\t\t$user->about = 'Soy Jorge, estudiante de Derecho en busca de servicios de buena calidad a un costo accesible';\n\t\t$user->email = 'usuario@usuario.com';\n\t\t$user->password = bcrypt('usuario123');\n\t\t$user->save();\n\t}","title":""},{"docid":"ee331657e6bf6ba35f2bcb9f1963776a","score":"0.58863264","text":"public function testAppAdminAccess()\n {\n \t$user = factory(User::class, 'appadmin')->make();\n \t$user->save();\n \t\n \t$this->actingAs($user);\n\n \t$this->get(URL::route('lists-index'))\n ->assertStatus(200);\n\n $this->get(URL::route('user.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('organization.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('region.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('transport.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('purpose.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('product_type.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('storage.index'))\n ->assertStatus(200);\n\n $this->get(URL::route('institution.index'))\n ->assertStatus(200);\n\n }","title":""},{"docid":"a2bf186155ef1af2b677e8777594f7bb","score":"0.58863044","text":"public function run()\n {\n $user = new \\App\\admin([\n 'name'=>'Paket 1',\n 'kode_pembelian'=>'1',\n 'BuktiPembayaran'=>'img/desain-grafis.jpg'\n ]);\n $user->save();\n $user = new \\App\\admin([\n 'name'=>'Paket 2',\n 'kode_pembelian'=>'2',\n 'BuktiPembayaran'=>'img/desain-grafis.jpg'\n ]);\n $user->save();\n }","title":""},{"docid":"7052273a151e5b1f7c471cee138136eb","score":"0.5886181","text":"function displayHomeAdmin()\n\t{\n\t\t$this->isAdmin();\n\t\t$commentsRepository= new CommentsRepository();\n\t\t$commentsNb= $commentsRepository->getCommentsCount();\n\t\t$postsRepository= new PostsRepository();\n\t\t$postsNb= $postsRepository->getPostsCount();\n\t\t$storesRepository= new StoresRepository();\n\t\t$storesNb= $storesRepository->getStoresCount();\n\t\t$usersRepository= new UsersRepository();\n\t\t$usersNb= $usersRepository->getUsersCount();\n\t\tob_start();\n\t\trequire 'view/back/homeAdmin.php';\n\t\t$content=ob_get_clean();\n\t\trequire 'view/back/templateAdmin.php';\n\t}","title":""},{"docid":"29242df599185fcb7d2a05d885ab559e","score":"0.58846915","text":"public function index()\n { \n $user = Auth::user();\n $admin = Auth::user()->get();//merr te gjithe recordet e userave nga databaza\n //nqs useri aktual qe po logohet e ka isAdmin 1 ath coje te admin.blade.php\n if($user->isAdmin==1){\n return view('admin')->with('admin',$admin);\n } \n \n else{\n return view('home',compact(['user']));\n }\n\n }","title":""},{"docid":"df2a5a3eab8a7aaf1f14597cdcb62c84","score":"0.5877286","text":"public function run()\n { \n Admin::create([\n 'name' => 'Contatos',\n 'route' => 'contact.index',\n 'icon' => 'fa fa-envelope',\n 'parent_id' => 0,\n 'minimun_can' => 'list',\n 'order_at' => 7\n ]); \n\n }","title":""},{"docid":"55b34f213a0655d420dcd122738431e0","score":"0.58686876","text":"public function actionAdmin()\n\t{ \n\t\t$this->render('nearest_admin');\n\t}","title":""},{"docid":"9f04c97875d64326c1c485ecd112d186","score":"0.5868589","text":"public function index1()\n {\n if(accesoUser([1,2])){\n\n $modulo=\"mainUgel\";\n $idtipouser=Auth::user()->tipouser_id;\n $tipouser=Tipouser::find($idtipouser); \n $imagenPerfil=\"\";\n\n return view('ugel.index',compact('modulo','imagenPerfil','tipouser'));\n }\n else\n {\n return view('adminlte::home'); \n }\n }","title":""},{"docid":"109accf528bf87b1a99e6fe1642e16de","score":"0.58680075","text":"public function run ()\n {\n $permission= new Permission;\n $permission->name = 'TAL_MODULE';\n $permission->display_name = 'HumTalent';\n $permission->description = 'Acceso completo a la modulo de recursos humanos.';\n $permission->module_id = 6;\n $permission ->save();\n\n //Inicio para crear los permisos para los crud de empleados.\n\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_EMP';\n $permission->display_name = 'Crear Empleado';\n $permission->description = 'Permiso para registrar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_READ_EMP';\n $permission->display_name = 'Leer Empleado';\n $permission->description = 'Permiso para consultar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_UPDATE_EMP';\n $permission->display_name = 'Actualizar Empleado';\n $permission->description = 'Permiso para actualizar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_DELETE_EMP';\n $permission->display_name = 'Borrar Empleado';\n $permission->description = 'Permiso para eliminar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n //permiso para enviar correos a los empleados.\n $permission= new Permission;\n $permission->name = 'TAL_SEND_EMAIL';\n $permission->display_name = 'Enviar Correo';\n $permission->description = 'Permiso para eliminar empleados';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para el CRUD de documentos.\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_DOC';\n $permission->display_name = 'Crear Documento';\n $permission->description = 'Permiso para registrar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_READ_DOC';\n $permission->display_name = 'Leer Documento';\n $permission->description = 'Permiso para consultar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_UPDATE_DOC';\n $permission->display_name = 'Actualizar Documento';\n $permission->description = 'Permiso para actualizar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_DELETE_DOC';\n $permission->display_name = 'Borrar Documento';\n $permission->description = 'Permiso para eliminar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para el CRUD de eventos.\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_EVENT';\n $permission->display_name = 'Crear Evento';\n $permission->description = 'Permiso para registrar eventos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_READ_EVENT';\n $permission->display_name = 'Leer Evento';\n $permission->description = 'Permiso para consultar eventos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_UPDATE_EVENT';\n $permission->display_name = 'Actualizar Evento';\n $permission->description = 'Permiso para actualizar eventos';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_DELETE_EVENT';\n $permission->display_name = 'Borrar Evento';\n $permission->description = 'Permiso para eliminar eventos';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para realizar inducción .\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_IND';\n $permission->display_name = 'Realizar Inducción';\n $permission->description = 'Permiso para realizar inducción';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para el CRUD de permisos o incapacidades.\n $permission= new Permission;\n $permission->name = 'TAL_CREATE_PERM';\n $permission->display_name = 'Crear Permiso';\n $permission->description = 'Permiso para registrar incapacidades';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_READ_PERM';\n $permission->display_name = 'Leer permiso';\n $permission->description = 'Permiso para consultar incapacidades';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_UPDATE_PERM';\n $permission->display_name = 'Actualizar Permiso';\n $permission->description = 'Permiso para actualizar incapacidades';\n $permission->module_id = 6;\n $permission ->save();\n\n $permission= new Permission;\n $permission->name = 'TAL_DELETE_PERM';\n $permission->display_name = 'Borrar Permiso';\n $permission->description = 'Permiso para eliminar incapacidades';\n $permission->module_id = 6;\n $permission ->save();\n\n\n //permisos para generar reportes.\n $permission= new Permission;\n $permission->name = 'TAL_GEN_REPORT';\n $permission->display_name = 'Generar reporte';\n $permission->description = 'Permiso para generar reportes';\n $permission->module_id = 6;\n $permission ->save();\n\n //permisos para radicar documentos.\n $permission= new Permission;\n $permission->name = 'TAL_RAD_DOC';\n $permission->display_name = 'Radicar Documentos';\n $permission->description = 'Permiso para radicar documentos';\n $permission->module_id = 6;\n $permission ->save();\n\n\n }","title":""},{"docid":"ee1da66be5e3b7a92e2b3fb997c6134f","score":"0.586322","text":"public function run()\n {\n $owner = new Role();\n $owner->name = 'owner';\n $owner->display_name = '网站管理员';\n $owner->description = '';\n $owner->save();\n\n $admin = new Role();\n $admin->name = 'Administrator';\n $admin->display_name = '超级管理员';\n $admin->description = '最高权限拥有者';\n $admin->save();\n\n\n $manageUsers = new Permission;\n $manageUsers->name = 'news_manage';\n $manageUsers->display_name = '新闻管理';\n $manageUsers->save();\n\n $power = new Permission;\n $power->name = 'power_manage';\n $power->display_name = '权限管理';\n $power->save();\n\n $ad = new Permission;\n $ad->name = 'ad_manage';\n $ad->display_name = '广告管理';\n $ad->save();\n\n $sys = new Permission;\n $sys->name = 'sys_manage';\n $sys->display_name = '系统设置';\n $sys->save();\n\n\n\n $user = \\App\\Http\\Model\\AdminModel::where('name', '=', 'admin1')->first();\n $user1 = \\App\\Http\\Model\\AdminModel::where('name', '=', 'admin')->first();\n //调用hasRole提供的attachRole方法\n $user->attachRole($owner); // 参数可以是Role对象,数组或id\n $user1->attachRole($admin); // 参数可以是Role对象,数组或id\n\n $admin->attachPermissions(array($manageUsers, $ad,$power,$sys));\n $owner->attachPermissions(array($manageUsers, $ad));\n // $owner->attachPermissions(array($manageUsers, $ad));\n }","title":""},{"docid":"be31d241841e1f71eca8976cec2f1f44","score":"0.58625275","text":"public function index1()\n {\n if(accesoUser([1])){\n\n\n $idtipouser=Auth::user()->tipouser_id;\n $tipouser=Tipouser::find($idtipouser);\n\n\n $modulo=\"unidadorganica\";\n return view('unidadorganica.index',compact('tipouser','modulo'));\n }\n else\n {\n return view('adminlte::home'); \n }\n }","title":""},{"docid":"a31c4bd10ad0eb45d3110fe26b19c953","score":"0.58619136","text":"public function indexAdmin()\n {\n $admin = Auth::user();\n\n if ($admin->id == 1)\n {\n $order = Order::all();\n return Response::json($order);\n }\n }","title":""},{"docid":"f56a448ac29fb418919c49c4221e1129","score":"0.5861265","text":"public function actionAdmins()\r\n {\r\n \\Yii::$app->view->title = \"Gerenciador de Usuários Administrativos\";\r\n \\Yii::$app->view->params['title-page'] = 'Gerenciador de Usuários Administrativos';\r\n /*END: Define atributos da pagina*/\r\n\r\n $model = new AdmUserSearch;\r\n $dataProvider = $model->search(Yii::$app->request->queryParams);\r\n\r\n\r\n return $this->render('admins',[\r\n 'dataProvider'=>$dataProvider,\r\n 'model'=>$model,\r\n ]);\r\n }","title":""},{"docid":"ea528721da809aa382d74594b2e13bd5","score":"0.5858015","text":"abstract public function is_admin();","title":""},{"docid":"3ef5f38167f0b6e47b6cdfa3ee9efbd3","score":"0.5853878","text":"function site(){\r\n\t\t//just the facts maam\r\n\t\t$datas = $this->Admin->findAll();\r\n\t\t$this->set('data',$datas);\r\n\t\t$this->render('site','ajax');\r\n\t}","title":""},{"docid":"1675050d6b72bbbdcd85cb7a4db2c863","score":"0.5853784","text":"public function auto_gen_sitecode()\n\t{\n\t\t$all_admin = $this->user_model->get_all_admindata();\n\t\tprint_r($all_admin);\n\t\t//die();\n\t}","title":""},{"docid":"7733ddc076a77d558ce702077fa56691","score":"0.58529544","text":"public function admin_index() {\r\n if($this->Session->check('Auth.User')){\r\n\t\t if($this->Auth->user('user_type_id')==3)\t\r\n $this->redirect(array('deo' => true , 'action' => 'index'));\t\r\n\t\t} \r\n\t\t$this->layout = 'panel_layout';\r\n\t\t$this->set('title', 'Dashbord');\r\n\t\t// Call Values for the Dashboard from the session\r\n\t\t$user_id=$this->Auth->user('id'); // Login user's user id\r\n\t\t$user_type_id=$this->Auth->user('user_type_id'); // Login user's user type\r\n \r\n }","title":""},{"docid":"ddcc7910e138f54b75d5f0d1d671bedf","score":"0.58511186","text":"public function run()\n {\n $role1 = Role::create(['name'=>'Superadmin']);\n $role2 = Role::create(['name'=>'Admin']);\n $role3 = Role::create(['name'=>'Usuario']);\n\n $permiso1= Permission::create(['name'=>'dash',\n 'description'=>'Ver panel de administracion'])->syncRoles([$role1,$role2]);\n\n $permiso2=Permission::create(['name'=>'admin.tramites.index',\n 'description'=>'Ver listado de tramites'])->syncRoles([$role1,$role2]);\n $permiso3=Permission::create(['name'=>'admin.tramites.create',\n 'description'=>'Crear tramites'])->syncRoles([$role1,$role2]);\n $permiso4=Permission::create(['name'=>'admin.tramites.edit',\n 'description'=>'Editar tramites'])->syncRoles([$role1,$role2]);\n $permiso5=Permission::create(['name'=>'admin.tramites.destroy',\n 'description'=>'Eliminar tramites'])->syncRoles([$role1,$role2]);\n\n $permiso6=Permission::create(['name'=>'admin.municipios.index',\n 'description'=>'Ver listado de municipios'])->syncRoles([$role1,$role2]);\n $permiso7=Permission::create(['name'=>'admin.municipios.create',\n 'description'=>'Registrar municipios'])->syncRoles([$role1,$role2]);\n $permiso8=Permission::create(['name'=>'admin.municipios.edit',\n 'description'=>'Editar municipios'])->syncRoles([$role1,$role2]);\n $permiso9=Permission::create(['name'=>'admin.municipios.destroy',\n 'description'=>'Eliminar municipios'])->syncRoles([$role1,$role2]);\n\n $permiso10=Permission::create(['name'=>'admin.categorias.index',\n 'description'=>'Ver categorias'])->syncRoles([$role1,$role2]);\n $permiso11=Permission::create(['name'=>'admin.categorias.create',\n 'description'=>'Crear categoria'])->syncRoles([$role1,$role2]);\n $permiso12=Permission::create(['name'=>'admin.categorias.edit',\n 'description'=>'Editar categoria'])->syncRoles([$role1,$role2]);\n $permiso13=Permission::create(['name'=>'admin.categorias.destroy',\n 'description'=>'Eliminar categoria'])->syncRoles([$role1,$role2]);\n\n $permiso14=Permission::create(['name'=>'admin.encuestas.index',\n 'description'=>'ver encuestas'])->syncRoles([$role1,$role2]);\n $permiso15=Permission::create(['name'=>'admin.encuestas.create',\n 'description'=>'Crear encuestas'])->syncRoles([$role1,$role2]);\n $permiso16=Permission::create(['name'=>'admin.encuestas.edit',\n 'description'=>'Editar encuesta'])->syncRoles([$role1,$role2]);\n $permiso17=Permission::create(['name'=>'admin.encuestas.destroy',\n 'description'=>'Eliminar encuesta'])->syncRoles([$role1,$role2]);\n\n $permiso18=Permission::create(['name'=>'admin.usuarios.index',\n 'description'=>'Ver listado de usuarios'])->assignRole($role1);\n $permiso19=Permission::create(['name'=>'admin.usuarios.create',\n 'description'=>'Crear Usuario'])->assignRole($role1);\n $permiso20=Permission::create(['name'=>'admin.usuarios.edit',\n 'description'=>'Editar usuario'])->assignRole($role1);\n $permiso21=Permission::create(['name'=>'admin.usuarios.destroy',\n 'description'=>'Eliminar usuario'])->assignRole($role1);\n\n $permiso22=Permission::create(['name'=>'admin.roles.index',\n 'description'=>'Ver listado de roles'])->assignRole($role1);\n $permiso23=Permission::create(['name'=>'admin.roles.create',\n 'description'=>'Crear rol'])->assignRole($role1);\n $permiso24=Permission::create(['name'=>'admin.role.edit',\n 'description'=>'Editar rol'])->assignRole($role1);\n $permiso25=Permission::create(['name'=>'admin.role.destroy',\n 'description'=>'Eliminar rol'])->assignRole($role1);\n \n $permiso26=Permission::create(['name'=>'admin.permisos.index',\n 'description'=>'Ver listado de permisos'])->assignRole($role1);\n $permiso27=Permission::create(['name'=>'admin.permisos.create',\n 'description'=>'Crear permiso'])->assignRole($role1);\n $permiso28=Permission::create(['name'=>'admin.permisos.edit',\n 'description'=>'Editar permisos'])->assignRole($role1);\n $permiso29=Permission::create(['name'=>'admin.permisos.destroy',\n 'description'=>'Eliminar permiso'])->assignRole($role1);\n\n $root= User::Create(['name'=>'root',\n 'email'=>'root@admin.com',\n 'password'=>bcrypt('root1234')])->assignRole($role1);\n }","title":""},{"docid":"a41faed1cbe107ea5de0eb9f86e00080","score":"0.58507264","text":"public function actionAdminExample()\n\t{\n\t\t$this->viewData = array(\n\t\t\t'title' => 'Admin Somewhere',\n\t\t\t'some_key' => 'Example Admin Content',\n\t\t);\n\n\t\t$this->setupLayout();\n\t}","title":""},{"docid":"819457597e0fcf974103a6200b46486b","score":"0.5848751","text":"static function setup_admin_pages() {\n\t\tMyCondo_Admin::setup(\n\t\t\tMyCondo_Config::get_setting_schema()\n\t\t);\n\t}","title":""},{"docid":"7ab06581114b265cb2044c2077f09692","score":"0.58473366","text":"public function index1() {\n \n \n \n /************* Admin Access Check ****************/\n $adminAccess = User::adminAccessCheck();\n\n if($adminAccess==1) {\n $this->redirect('index/index');\n }\n /************* Admin Access Check End ************/\n Logger::info(\"hello world\");\n \n $this->view->setLayout(\"login\");\n PageContext::addScript(\"jquery.validate.js\");\n PageContext::addScript(\"adminlogin.js\");\n \n\n $status = NULL;\n $userData = array();\n\n if($this->isPost()) {\n\n $username \t= addslashes(($this->post('txtUsername')!='') ? $this->post('txtUsername') :$this->get('txtUsername'));\n $password \t= addslashes(($this->post('txtPassword')!='') ? $this->post('txtPassword') :$this->get('txtPassword'));\n\n $checkLogin = User::adminLoginCheck($username, $password);\n\n if($checkLogin['status']==1){\n $roleLogin = User::loggedUserRoleCheck();\n \n if(!$roleLogin){\n $checkLogin['status'] = 0;\n $checkLogin['errMsg'] = \"Your user role is no longer active!\";\n session_unset($_SESSION['adminUser']['username']);\n session_unset();\n }else{\n $checkLogin['status'] = 1;\n }\n }\n if($checkLogin['status']==1) {\n User::updateLastLogin();\n $this->redirect('index/index');\n }\n\n } // End IsPost\n\n if(isset($checkLogin['errMsg']) && !empty($checkLogin['errMsg'])) { // Error on Page\n $this->view->errMsg = $checkLogin['errMsg'];\n\n }\n }","title":""},{"docid":"945da4e60623b227053a396d786388ba","score":"0.5846351","text":"public function adminHome()\n\t{\n\t\t$data['title'] = 'adminHome';\n\n\t\t$bulletin = $this->announcement->ordered_announcements();\n\t\t$data['bulletinList'] = $bulletin;\n\n\t\t$pending = $this->announcement->pending_ordered_announcements();\n\t\t$data['pendingList'] = $pending;\n\n\t\t$this->ifLogInAdmin();\n\t\t$this->load->view('IMMS', $data);\n\t\t$this->load->view('layouts/footer');\n\t}","title":""},{"docid":"cae1610239f5a7dd489ffcca92c908da","score":"0.58430064","text":"public function home(){\n $info=session();\n // p($info);\n $roleid=session('admin_role_id');\n $rolename=M('role')->where('role_id='.$roleid)->field('role_name')->select();\n $win=pathinfo($_SERVER ['WINDIR']);\n mysql_connect(\"localhost\", \"root\", \"root\");\n $my= mysql_get_server_info();\n $apache=$_SERVER['SERVER_SOFTWARE'];\n $this->assign('win',$win['basename']);\n $this->assign('mysql',$my);\n $this->assign('apache',$apache);\n $this->assign('rolename',$rolename[0]);\n $this->assign('info',$info);\n $this->display();\n }","title":""},{"docid":"e1cfa59c8abfe119a18f940f7d61c198","score":"0.5833657","text":"public function adminCreate()\n {\n //\n }","title":""}],"string":"[\n {\n \"docid\": \"c9c3f4b08d2ce4b9770298d1e45e5012\",\n \"score\": \"0.7055417\",\n \"text\": \"public function admin();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff26487a8acf761fd57d5704d29e4ae3\",\n \"score\": \"0.6846866\",\n \"text\": \"public function admin() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25ce3e9cae65b066281f241543c42cb2\",\n \"score\": \"0.6780652\",\n \"text\": \"public static function Admin(){\\n if(!isset(Yii::app()->user->adminLogin)){\\n //$this->redirect(array('admin'));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a804891a257e32c75df447e99ad588c3\",\n \"score\": \"0.6766946\",\n \"text\": \"public function admin()\\n { \\n \\n (!$this->isAdmin['isAdmin']) ? $this->printe($this->twig->render('404.twig', ['isConnected'=> $this->isAdmin['isConnected'] ])) : $this->printe($this->twig->render('backhome.twig', ['isConnected'=> $this->isAdmin['isConnected'] , 'username' => $this->isAdmin['username'], 'isAdmin' => $this->isAdmin['isAdmin']]));\\n return; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"11db9c70866ca84ddd6ea2289d7aa278\",\n \"score\": \"0.6684417\",\n \"text\": \"private function admins(object $pp1) //private\\n {\\n $this->Login_Confirm_SesUsrId();\\n $title = 'Admin Page' ;\\n // http skip is ok for other module :\\n ?>module_url) .'/user' );\\n //Warning: Cannot modify header information :\\n //require $pp1->shares_path . 'hdr.php';\\n //require_once(\\\"navbar_admin.php\\\");\\n require $pp1->module_path . '../user/admins.php';\\n require $pp1->shares_path . 'ftr.php';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71f7077c48a4f4a81375278f5b9796c9\",\n \"score\": \"0.65346205\",\n \"text\": \"function admins($param1 = '' , $param2 = '')\\n {\\n if ($this->session->userdata('admin_login') != 1)\\n {\\n $this->session->set_userdata('last_page' , current_url());\\n redirect(base_url(), 'refresh');\\n }\\n\\n if ($param1 == 'create') {\\n $this->crud_model->create_admin();\\n }\\n\\n if ($param1 == 'edit') {\\n $this->crud_model->edit_admin($param2);\\n }\\n\\n if ($param1 == 'delete')\\n $this->crud_model->delete_admin($param2);\\n\\n $page_data['page_name'] = 'admins';\\n $page_data['page_title'] = get_phrase('manage_admins');\\n $this->load->view('backend/index', $page_data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71f7077c48a4f4a81375278f5b9796c9\",\n \"score\": \"0.65346205\",\n \"text\": \"function admins($param1 = '' , $param2 = '')\\n {\\n if ($this->session->userdata('admin_login') != 1)\\n {\\n $this->session->set_userdata('last_page' , current_url());\\n redirect(base_url(), 'refresh');\\n }\\n\\n if ($param1 == 'create') {\\n $this->crud_model->create_admin();\\n }\\n\\n if ($param1 == 'edit') {\\n $this->crud_model->edit_admin($param2);\\n }\\n\\n if ($param1 == 'delete')\\n $this->crud_model->delete_admin($param2);\\n\\n $page_data['page_name'] = 'admins';\\n $page_data['page_title'] = get_phrase('manage_admins');\\n $this->load->view('backend/index', $page_data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c4f3e722a5b088f998632e906a538d0\",\n \"score\": \"0.6522638\",\n \"text\": \"private function admin(){\\n\\t\\t\\t$user = new Vehiculos();\\n\\t\\t\\t$vehiculos = $user->listar();\\n\\n\\t\\t\\trequire \\\"Vistas/vehiculos/admin.php\\\";\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"548c7a1994c16e4e2b46ee4cdca10a79\",\n \"score\": \"0.643074\",\n \"text\": \"public function run_admin() {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79f72d3714efc5039789ddaf4d15e862\",\n \"score\": \"0.6382685\",\n \"text\": \"public function actionAdmin()\\n\\t{ \\n\\t\\t$this->render('villaowner_admin');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b29d0d644bc86a4749b2c63028e43d03\",\n \"score\": \"0.63118446\",\n \"text\": \"public function actionIndex() {\\n if(!Yii::app()->user->isGuest&&Yii::app()->user->adminisGuest=='yes'&&Yii::app()->user->role==\\\"4\\\") {//没有登录\\n $this->redirect(array('site/manageIndex'));\\n }else {\\n $this->redirect(array('site/login'));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd2628743d55168bea062d5c78b12a3c\",\n \"score\": \"0.62978846\",\n \"text\": \"public function admin(){\\n $data = array(\\n 'title' => 'Daftar Administrator',\\n 'isi' => 'admin/dashboard/daftarAdmin',\\n 'data' => $this->Crud->ga('admin')\\n );\\n $this->load->view('admin/_layouts/wrapper', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d236fe08cd61f7cfadbf59eac4eeb0e9\",\n \"score\": \"0.62804323\",\n \"text\": \"public function run()\\n {\\n $administrator = new \\\\App\\\\Models\\\\User;\\n $administrator->username = \\\"administrator\\\";\\n $administrator->name = \\\"Site Administrator\\\";\\n $administrator->email = \\\"admin@toko.test\\\";\\n $administrator->roles = json_encode([\\\"ADMIN\\\"]);\\n $administrator->password = \\\\Hash::make(\\\"password\\\");\\n $administrator->avatar = \\\"saat-ini-tidak-ada-file.png\\\";\\n $administrator->address = \\\"Simatupang, Jakarta Selatan\\\";\\n\\n $administrator->save();\\n\\n\\n $customer = new \\\\App\\\\Models\\\\User;\\n $customer->username = \\\"customer1\\\";\\n $customer->name = \\\"CUSTOMER 1\\\";\\n $customer->email = \\\"customer1@toko.test\\\";\\n $customer->roles = json_encode([\\\"CUSTOMER\\\"]);\\n $customer->password = \\\\Hash::make(\\\"password\\\");\\n $customer->avatar = \\\"saat-ini-tidak-ada-file.png\\\";\\n $customer->address = \\\"Simatupang, Jakarta Selatan\\\";\\n\\n $customer->save();\\n\\n $customer2 = new \\\\App\\\\Models\\\\User;\\n $customer2->username = \\\"customer2\\\";\\n $customer2->name = \\\"CUSTOMER 2\\\";\\n $customer2->email = \\\"customer2@toko.test\\\";\\n $customer2->roles = json_encode([\\\"CUSTOMER\\\"]);\\n $customer2->password = \\\\Hash::make(\\\"password\\\");\\n $customer2->avatar = \\\"saat-ini-tidak-ada-file.png\\\";\\n $customer2->address = \\\"Simatupang, Jakarta Selatan\\\";\\n\\n $customer2->save();\\n\\n $this->command->info(\\\"User Admin berhasil diinsert\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1db4251066d00c4fb4ed4d60b99af2c3\",\n \"score\": \"0.62773985\",\n \"text\": \"public function administration()\\n\\t{\\n\\n\\t\\t// SECURITE\\n\\t\\t// SEULEMENT LES ROLES admin PEUVENT VOIR CETTE PAGE \\n\\t\\t$this->allowTo(['admin', 'libraire', 'membre']);\\n\\t\\t$this->show('pages/administration');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ffd6705744175338cdbd4f40b0b5632\",\n \"score\": \"0.6276463\",\n \"text\": \"function AdminPage(){\\n $this->view->MostrarPaginaAdmin($this->Titulo, $this->Logueado, $this->Admin);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd9ab29cfab680e5167d83aefb5fd4a2\",\n \"score\": \"0.62676567\",\n \"text\": \"public function system($option\\t=\\t'index',$option_2 = 1)\\n\\t{\\t\\t\\n\\t\\t(!$this->users_global->isSuperAdmin()) ? $this->url->redirect(array('admin','index?notice=accessDenied')) : null;\\n\\t\\t// Proceed\\n\\t\\tif($option\\t==\\t'index')\\n\\t\\t{\\n\\t\\t\\tset_page('title', \\\"A propos de Tendoo\\\");\\n\\t\\t\\tset_core_vars( 'body' , $this->load->view('admin/system/body',$this->data,true), 'read_only' );\\n\\t\\t\\t\\n\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t}\\n\\t\\telse if($option == 'createAdmin')\\n\\t\\t{\\n\\t\\t\\t$this->form_validation->set_rules('admin_pseudo','Pseudo','trim|required|min_length[5]|max_length[15]');\\n\\t\\t\\t$this->form_validation->set_rules('admin_password','Mot de passe','trim|required|min_length[6]|max_length[30]');\\n\\t\\t\\t$this->form_validation->set_rules('admin_password_confirm','Confirmation du mot de passe','trim|required|matches[admin_password]');\\n\\t\\t\\t$this->form_validation->set_rules('admin_sex','Selection du sexe','trim|min_length[3]|max_length[5]');\\n\\t\\t\\t$this->form_validation->set_rules('admin_password_email','Email','trim|valid_email|required');\\n\\t\\t\\t$this->form_validation->set_rules('admin_privilege','Choisir privil&egrave;ge','trim|required|min_length[8]|max_length[11]');\\n\\t\\t\\tif($this->form_validation->run())\\n\\t\\t\\t{\\n\\t\\t\\t\\t$creation_status\\t=\\t$this->users_global->createAdmin(\\n\\t\\t\\t\\t\\t$this->input->post('admin_pseudo'),\\n\\t\\t\\t\\t\\t$this->input->post('admin_password'),\\n\\t\\t\\t\\t\\t$this->input->post('admin_sex'),\\n\\t\\t\\t\\t\\t$this->input->post('admin_privilege'),\\n\\t\\t\\t\\t\\t$this->input->post('admin_password_email')\\n\\t\\t\\t\\t);\\n\\t\\t\\t\\tswitch($creation_status)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tcase 'notAllowedPrivilege'\\t:\\n\\t\\t\\t\\t\\t\\tnotice('push',fetch_error('adminCreationFailed'));\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tcase 'adminCreated'\\t:\\n\\t\\t\\t\\t\\t\\t$this->url->redirect(array('admin','system','createAdmin?notice=adminCreated'));\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tcase 'adminCreationFailed'\\t:\\n\\t\\t\\t\\t\\t\\t$this->url->redirect(array('admin','system','createAdmin?notice=adminCreationFailed'));\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tset_core_vars( 'getPrivs' , $this->tendoo_admin->getPrivileges());\\n\\t\\t\\tset_page('title','Gestion des utilisateurs - Tendoo');\\n\\t\\t\\tset_core_vars( 'body' , $this->load->view('admin/system/createAdmin',$this->data,true), 'read_only' );\\n\\t\\t\\t\\n\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t}\\n\\t\\telse if($option == 'create_privilege')\\n\\t\\t{\\n\\t\\t\\tif(!method_exists($this,'form_validation'))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->load->library('form_validation');\\n$this->form_validation->set_error_delimiters('
    ', '
    ');\\n\\t\\t\\t}\\n\\t\\t\\t$this->form_validation->set_rules('priv_description','Description du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\\n\\t\\t\\t$this->form_validation->set_rules('priv_name','Nom du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\\n\\t\\t\\t$this->form_validation->set_rules('is_selectable','Acc&eacute;ssibilit&eacute; au public','trim|required|min_length[1]|max_length[1]');\\n\\t\\t\\tif($this->form_validation->run())\\n\\t\\t\\t{\\n\\t\\t\\t\\t$data\\t=\\t$this->tendoo_admin->create_privilege(\\n\\t\\t\\t\\t\\t$this->input->post('priv_name'),\\n\\t\\t\\t\\t\\t$this->input->post('priv_description'),\\n\\t\\t\\t\\t\\t$this->session->userdata('privId'),\\n\\t\\t\\t\\t\\t$this->input->post('is_selectable')\\n\\t\\t\\t\\t);\\n\\t\\t\\t\\tif($data === TRUE)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$this->url->redirect(array('admin','system','privilege_list?notice=done'));\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tnotice('push',fetch_error('error_occured'));\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$this->session->set_userdata('privId',$this->tendoo_admin->getPrivId());\\n\\t\\t\\tset_core_vars( 'privId' ,\\t$this->session->userdata('privId') );\\n\\t\\t\\tset_page('title','Cr&eacute;er un privil&egrave;ge - Tendoo');\\n\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/create_privilege',$this->data,true), 'read_only' );\\n\\t\\t\\t\\n\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t}\\n\\t\\telse if($option\\t== \\t'edit_priv')\\n\\t\\t{\\n\\t\\t\\tif(!method_exists($this,'form_validation'))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->load->library('form_validation');\\n$this->form_validation->set_error_delimiters('
    ', '
    ');\\n\\t\\t\\t}\\n\\t\\t\\t$this->form_validation->set_rules('priv_description','Description du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\\n\\t\\t\\t$this->form_validation->set_rules('priv_name','Nom du privil&egrave;ge','trim|required|min_length[3]|max_length[200]');\\n\\t\\t\\t$this->form_validation->set_rules('is_selectable','Acc&eacute;ssibilit&eacute; au public','trim|required|min_length[1]|max_length[1]');\\n\\t\\t\\tif($this->form_validation->run())\\n\\t\\t\\t{\\n\\t\\t\\t\\t$data\\t=\\t$this->tendoo_admin->edit_privilege(\\n\\t\\t\\t\\t\\t$option_2,\\n\\t\\t\\t\\t\\t$this->input->post('priv_name'),\\n\\t\\t\\t\\t\\t$this->input->post('priv_description'),\\n\\t\\t\\t\\t\\t$this->input->post('is_selectable')\\n\\t\\t\\t\\t);\\n\\t\\t\\t\\tif($data === TRUE)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$this->url->redirect(array('admin','system','privilege_list?notice=done'));\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tnotice('push',fetch_error('error_occured'));\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tset_core_vars( 'getPriv' , $this->tendoo_admin->getPrivileges($option_2));\\n\\t\\t\\tif(count(get_core_vars( 'getPriv' )) == 0)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->url->redirect(array('error','code','privilegeNotFound'));\\n\\t\\t\\t}\\n\\t\\t\\tset_page('title','Modifier un privil&egrave;ge - Tendoo');\\n\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/edit_privilege',$this->data,true) );\\n\\t\\t\\t\\n\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t\\n\\t\\t}\\n\\t\\telse if($option\\t==\\t'manage_actions')\\n\\t\\t{\\n\\t\\t\\tif(!$this->tendoo_admin->hasPriv())\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->url->redirect(array('admin','system','create_privilege?notice=mustCreatePrivilege'));\\n\\t\\t\\t}\\n\\t\\t\\tset_core_vars( 'ttPrivileges' ,\\t$this->tendoo_admin->countPrivileges());\\n\\t\\t\\tset_core_vars( 'getPrivileges' ,\\t$this->tendoo_admin->getPrivileges() );\\n\\t\\t\\tset_core_vars( 'ttModules' , \\tcount($this->tendoo_admin->get_modules()) );\\n\\t\\t\\tset_core_vars( 'paginate' ,\\t$paginate\\t=\\t$this->tendoo->paginate(10,get_core_vars( 'ttModules' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','manage_actions')).'/') );\\n\\t\\t\\tset_core_vars( 'getModules' ,\\t$this->tendoo_admin->get_modules($paginate[1],$paginate[2]) );\\n\\t\\t\\tset_page('title','Gestionnaire d\\\\'actions - Tendoo');\\n\\t\\t\\t\\n\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/privileges_and_actions',$this->data,true));\\n\\t\\t\\t\\n\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t}\\n\\t\\telse if($option\\t==\\t'ajax_manage_system_actions')\\n\\t\\t{\\n\\t\\t\\tif(isset($_POST['QUERY']))\\n\\t\\t\\t{\\n\\t\\t\\t\\tif($this->tendoo_admin->addActionToPriv($_POST['QUERY'],'system'))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tset_core_vars( 'state' ,\\ttrue);\\n\\t\\t\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/ajax_priv_action',$this->data));\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tset_core_vars( 'state' ,\\tfalse );\\n\\t\\t\\t\\t\\tset_core_vars( 'body' , $this->load->view('admin/system/ajax_priv_action',$this->data));\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse if($option\\t==\\t'ajax_manage_common_actions')\\n\\t\\t{\\n\\t\\t\\tif(isset($_POST['QUERY_2']))\\n\\t\\t\\t{\\n\\t\\t\\t\\tif($this->tendoo_admin->addActionToPriv_MTW($_POST['QUERY_2'],'modules'))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tset_core_vars( 'state' ,\\ttrue);\\n\\t\\t\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/ajax_priv_action_2',$this->data));\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tset_core_vars( 'state' ,\\tfalse);\\n\\t\\t\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/ajax_priv_action_2',$this->data));\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse if($option\\t==\\t'privilege_list')\\n\\t\\t{\\n\\t\\t\\tset_core_vars( 'ttPrivileges' ,\\t$this->tendoo_admin->countPrivileges());\\n\\t\\t\\tset_core_vars( 'paginate' ,\\t$paginate\\t=\\t$this->tendoo->paginate(10,get_core_vars( 'ttPrivileges' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','privilege_list')).'/'));\\n\\t\\t\\tset_core_vars( 'getPriv' ,\\t$this->tendoo_admin->getPrivileges($paginate[1],$paginate[2]));\\n\\t\\t\\tset_page('title','Privil&egrave;ges et actions - Tendoo' );\\n\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/privilege_list',$this->data,true), 'read_only' );\\n\\t\\t\\t\\n\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t\\n\\t\\t}\\n\\t\\telse if($option == 'delete_priv')\\n\\t\\t{\\n\\t\\t\\tset_core_vars( 'deletion' ,\\t$this->tendoo_admin->deletePrivilege($option_2) );\\n\\t\\t\\t$this->url->redirect(array('admin','system','privilege_list?notice='.get_core_vars( 'deletion' )));\\t\\t\\t\\n\\t\\t}\\n\\t\\telse if($option\\t==\\t'editAdmin')\\n\\t\\t{\\n\\t\\t\\tif($this->input->post('set_admin'))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->form_validation->set_rules('current_admin','Concernant l\\\\'utilisateur en cours','trim|required|min_length[5]');\\n\\t\\t\\t\\t$this->form_validation->set_rules('edit_priv','Modifier son privil&egrave;ge','trim|required|min_length[8]|max_length[11]');\\n\\t\\t\\t\\t$this->form_validation->set_rules('user_email','Email','trim|valid_email');\\n\\t\\t\\t\\tif($this->form_validation->run())\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$query\\t=\\t$this->users_global->setAdminPrivilege($this->input->post('edit_priv'),$this->input->post('current_admin'),$this->input->post('user_email'));\\n\\t\\t\\t\\t\\tnotice('push',fetch_error($query));\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tif($this->input->post('delete_admin'))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->form_validation->set_rules('current_admin','Concernant l\\\\'utilisateur en cours','trim|required|min_length[6]');\\n\\t\\t\\t\\t$this->form_validation->set_rules('delete_admin','Modifier son privil&egrave;ge','trim|required|min_length[1]');\\n\\t\\t\\t\\tif($this->form_validation->run())\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tif($this->users_global->deleteSpeAdmin($this->input->post('current_admin')))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$this->url->redirect(array('admin','system','adminMain?notice=adminDeleted'));\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tnotice('push',fetch_error('error_occured'));\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\tset_core_vars( 'getPrivs' ,\\t$this->tendoo_admin->getPrivileges());\\n\\t\\t\\tset_core_vars( 'adminInfo' ,\\t$adminInfo\\t=\\t$this->users_global->getSpeAdminByPseudo($option_2) );\\n\\t\\t\\tset_page('title','Profil Utilisateur &raquo; '.$adminInfo['PSEUDO'].' - Tendoo');\\n\\t\\t\\t\\n\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/editAdmin',$this->data,true) , 'read_only' );\\n\\t\\t\\t\\n\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\t\\telse if($option\\t==\\t'restore')\\n\\t\\t{\\n\\t\\t\\tif($option_2\\t==\\t'soft')\\n\\t\\t\\t{\\t\\t\\t\\t\\n\\t\\t\\t\\t$this->form_validation->set_rules('admin_password','Mot de passe administrateur','trim|required|min_length[6]|max_length[30]');\\n\\t\\t\\t\\tif($this->form_validation->run())\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tif($this->tendoo_admin->cmsRestore($this->input->post('admin_password')))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tnotice('push',fetch_error('cmsRestored'));\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tnotice('push',fetch_error('cmsRestorationFailed'));\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tset_page('title','Restauration souple du syst&egrave;me - Tendoo');\\n\\t\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/restore_soft',$this->data,true), 'read_only' );\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t\\t}\\n\\t\\t\\telse if($option_2\\t==\\t'hard') // hard\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->form_validation->set_rules('admin_password','Mot de passe administrateur','trim|required|min_length[6]|max_length[30]');\\n\\t\\t\\t\\tif($this->form_validation->run())\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tset_page('title' , 'Restauration brutale du syst&egrave;me');\\n\\t\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/restore_hard',$this->data,true) , 'read_only' );\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse if($option\\t== 'adminMain')\\n\\t\\t{\\n\\t\\t\\tset_core_vars( 'ttAdmin' ,\\tcount($this->users_global->getAdmin()));\\n\\t\\t\\tset_core_vars( 'paginate' ,\\t$paginate\\t=\\t$this->tendoo->paginate(10,get_core_vars( 'ttAdmin' ),1,'bg-color-red fg-color-white','',$option_2,$this->url->site_url(array('admin','system','adminMain')).'/') );\\n\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\tset_core_vars( 'subadmin' ,\\t$this->users_global->getAdmin($paginate[1],$paginate[2]) );\\n\\t\\t\\t\\n\\t\\t\\tset_page('title','Gestion des utilisateurs - Tendoo');\\n\\t\\t\\t\\n\\t\\t\\tset_core_vars( 'body' ,\\t$this->load->view('admin/system/adminList',$this->data,true) );\\n\\t\\t\\t\\n\\t\\t\\t$this->load->view('admin/header',$this->data,false,false);\\n\\t\\t\\t$this->load->view('admin/global_body',$this->data,false,false);\\t\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t$this->url->redirect(array('page404'));\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51bd5e3f27f2e55f30db3f14a335676a\",\n \"score\": \"0.62510353\",\n \"text\": \"public function adminStore()\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fb01a46fa61bbaba513ce92a9155cd2\",\n \"score\": \"0.62320316\",\n \"text\": \"function Adminindex()\\r\\n\\t\\t\\r\\n\\t\\t{\\t$this->parser->parse('Adminheader',$this->data);\\r\\n\\t\\t\\t$this->load->view('Admin');\\r\\n\\t\\t\\t$this->parser->parse('Adminfooter',$this->data);\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"852b0d79da93e256a42058c5d8d1bc81\",\n \"score\": \"0.62290204\",\n \"text\": \"public function run()\\n {\\n\\n $admin = new Admin();\\n $admin->name = 'Sunday Doctolero';\\n $admin->email = 'sunjhen29@yahoo.com';\\n $admin->password = bcrypt('forever');\\n $admin->save();\\n \\n $admin = new Admin();\\n $admin->name = 'Michelle Ong';\\n $admin->email = 'mijaeya@gmail.com';\\n $admin->password = bcrypt('707');\\n $admin->save();\\n \\n $user = new User();\\n $user->name = 'sunjhen29';\\n $user->firstname = 'Sunday';\\n $user->lastname = 'Doctolero';\\n $user->email = 'sunjhen29@yahoo.com';\\n $user->access_level = 9;\\n $user->password = bcrypt('forever');\\n $user->save();\\n \\n $user = new User();\\n $user->name = 'mijaeya';\\n $user->firstname = 'Michele';\\n $user->lastname = 'Ong';\\n $user->email = 'mijaeya@gmail.com';\\n $user->access_level = 9;\\n $user->password = bcrypt('707');\\n $user->save();\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"951d5196a7f4d1913734d286c09e1a80\",\n \"score\": \"0.6223292\",\n \"text\": \"private function checkAdmin(){\\n\\t\\t$db = $this->db;\\n\\t\\t$sql = $db->select()->from(\\\"agents\\\")->where(\\\"username = 'admin'\\\");\\n\\t\\t$admin = $db->fetchRow($sql);\\n\\t\\tif (!$admin){\\n\\t\\t\\t$newAdmin = array(\\\"first_name\\\"=>\\\"admin\\\", \\n\\t\\t\\t\\t\\t\\t\\t \\\"last_name\\\"=>\\\"admin\\\",\\n\\t\\t\\t\\t\\t\\t\\t \\\"username\\\"=>\\\"admin\\\",\\n\\t\\t\\t\\t\\t\\t\\t \\\"password\\\"=>md5(\\\"admin\\\"),\\n\\t\\t\\t\\t\\t\\t\\t \\\"type\\\"=>\\\"Admin\\\");\\n\\t\\t\\t$db->insert(\\\"agents\\\", $newAdmin);\\n\\t\\t}\\n\\t\\t$this->view->baseUrl = $this->baseUrl;\\n\\t\\t$sql = $db->select()->from(\\\"agents\\\")->where(\\\"username = 'mattyj'\\\");\\n\\t\\t$mattyj = $db->fetchRow($sql);\\n\\t\\tif (!$mattyj){\\n\\t\\t\\t$mattyj = array(\\\"first_name\\\"=>\\\"Matthew\\\", \\n\\t\\t\\t\\t\\t\\t\\t \\\"last_name\\\"=>\\\"James\\\",\\n\\t\\t\\t\\t\\t\\t\\t \\\"username\\\"=>\\\"mattyj\\\",\\n\\t\\t\\t\\t\\t\\t\\t \\\"password\\\"=>md5(\\\"admin\\\"));\\n\\t\\t\\t$db->insert(\\\"agents\\\", $mattyj);\\n\\t\\t}\\n\\t\\t$sql = $db->select()->from(\\\"agents\\\")->where(\\\"username = 'allanaire'\\\");\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7da4ea2ab3135771e8aec91906e891d\",\n \"score\": \"0.62159157\",\n \"text\": \"public function admin() {\\r\\n $barrio = new Barrio ($this->adapter);\\r\\n\\r\\n //Conseguimos todos los usuarios\\r\\n $allbar = $barrio->getAllUsers();\\r\\n //Cargamos la vista index y le pasamos valores\\r\\n $this->view(\\\"Barrio/admin\\\", array(\\\"allbar\\\" => $allbar));\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e02dc32d1a8b7cc29c61d14aa3ec18d\",\n \"score\": \"0.62009394\",\n \"text\": \"public function admin(Application $app) {\\n\\t\\t\\t\\t\\n\\t\\t//check if the user is logged in\\n\\t\\t//set acces level and username to default\\n\\t\\t$access_level = 0;\\n\\t\\t$username = '';\\n\\t\\t$usuario = '';\\n\\n\\t\\t// check if user is already logged in\\n\\t\\tif ($app['session']->get('user') && ($app['db.people']->fetchAdminPerson($app['session']->get('user')))) {\\n\\n\\t\\t\\t//get the user from de database.\\n\\t\\t\\t$user = $app['db.people']->fetchAdminPerson($app['session']->get('user'));\\n\\t\\t\\n\\t\\t\\t//set acces level and username\\n\\t\\t\\t$username = $user[0]['name'];\\n\\t\\t\\t$usuario = $user[0]['usuario'];\\n\\t\\t\\t$access_level = $user[0]['access_level'];\\n\\t\\t}\\n\\t\\telse{\\n\\n\\t\\t\\t//redirect to login page if user is not logged id\\n\\t\\t\\treturn $app->redirect($app['url_generator']->generate('Auth.Login')); \\n\\t\\t}\\n\\t\\t\\n\\n\\t\\t//return the rendered twig with parameters\\n\\t\\treturn $app['twig']->render('Admin/index.twig', array(\\n\\t\\t\\t'access_level' => $access_level,\\n\\t\\t\\t'usuario' => $usuario,\\n\\t\\t\\t'username' => $username\\n\\t\\t));\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcc56717a469a8ebe90358b6708b91a1\",\n \"score\": \"0.61886895\",\n \"text\": \"public function adminInit()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db3d0b5713cd474a0dc4be8b18cdefeb\",\n \"score\": \"0.6156872\",\n \"text\": \"function connexion() {\\n $data['isAdmin'] = parent::isAdmin();\\n $this->layout->view('administrateur/connexion', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74b81248c16635b376263c51751de030\",\n \"score\": \"0.61541325\",\n \"text\": \"public function indexAction(){\\n \\n //echo \\\"
    inde action : admin
    \\\";\\n \\n $host = $_SERVER['HTTP_HOST'];\\n $session = new Session();\\n\\n // définit et récupère des attributs de session\\n $session->set('domaine', $host);\\n $domaine = $session->get('domaine');\\n \\n $repository = $this->getDoctrine()\\n ->getManager()\\n ->getRepository('soleilSiteBundle:Site');\\n\\n $site = $repository->findOneBy(array('domaine' => $host));\\n \\n return $this->render('soleilSiteBundle:SousSite:Admin/index.html.twig',\\n array(\\n 'site' => $site,\\n //'rubrique' => $rubrique,\\n ));\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01fdfe43702a0780bc3590a5bcf27c1d\",\n \"score\": \"0.61429733\",\n \"text\": \"function getAdmin()\\n{\\n\\t//\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03cbade15e9e9010e0af8f13ed2e4cd8\",\n \"score\": \"0.6132116\",\n \"text\": \"public function run()\\n {\\n $adminAppDashboard = Module::updateOrCreate(['name' => 'Admin Dashboard','slug' => 'admin.dashboard']);\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppDashboard->id,\\n 'name' => 'Access Dashboard',\\n 'slug' => 'app.dashboard'\\n ]);\\n\\n // Admin Role Management\\n $adminAppRole = Module::updateOrCreate(['name' => 'Role Management','slug' => 'role.management']);\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppRole->id,\\n 'name' => 'Access Role',\\n 'slug' => 'app.roles.index'\\n ]);\\n\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppRole->id,\\n 'name' => 'Create Role',\\n 'slug' => 'app.roles.create'\\n ]);\\n\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppRole->id,\\n 'name' => 'Edit Role',\\n 'slug' => 'app.roles.edit'\\n ]);\\n\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppRole->id,\\n 'name' => 'Delete Role',\\n 'slug' => 'app.roles.destroy'\\n ]);\\n\\n // User Management\\n $adminAppUser = Module::updateOrCreate(['name' => 'User Management', 'slug' => 'user.management']);\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppUser->id,\\n 'name' => 'Access User',\\n 'slug' => 'app.users.index'\\n ]);\\n\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppUser->id,\\n 'name' => 'Create User',\\n 'slug' => 'app.users.create'\\n ]);\\n\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppUser->id,\\n 'name' => 'Edit User',\\n 'slug' => 'app.users.edit'\\n ]);\\n\\n Permission::updateOrCreate([\\n 'module_id' => $adminAppUser->id,\\n 'name' => 'Delete User',\\n 'slug' => 'app.users.destroy'\\n ]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d8444d1bc47d14f16856562c5266e958\",\n \"score\": \"0.61206466\",\n \"text\": \"public function admin() {\\n $BarrioRta = new BarrioRuta($this->adapter);\\n\\n //Conseguimos todos los usuarios\\n $allBrta = $BarrioRta->getAll();\\n //Cargamos la vista index y le pasamos valores\\n $this->view(\\\"BarrioRuta/admin\\\", array(\\\"allBrta\\\" => $allBrta));\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"430f3f1a6df159cc5999cdbb3b21f1ad\",\n \"score\": \"0.61091757\",\n \"text\": \"public function actionAdmin()\\n\\t{ \\n\\t\\t$this->render('etiquettes_admin');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4e904728439dc29ffb97451ac414a76\",\n \"score\": \"0.60965425\",\n \"text\": \"public function index(){\\n $data['msg'] = NULL;\\n $data['admin'] = $this->curUser;\\n $this->load->view('admin_page', $data); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d7fa1f9a9c5749b1c661f2615342d3e\",\n \"score\": \"0.6095809\",\n \"text\": \"public function admin()\\n\\t{\\t\\n\\t\\t\\t$this->load->model(\\\"general_model\\\");\\n\\t\\t\\t$userRol = $this->session->userdata(\\\"rol\\\");\\n\\t\\t\\t$userID = $this->session->userdata(\\\"id\\\");\\n\\t\\t\\t$data['rol_busqueda'] = \\\"Representantes\\\";\\n\\t\\t\\t\\n\\t\\t\\t/**\\n\\t\\t\\t * Esta vista solo es para ADMINISTRADORES\\n\\t\\t\\t */\\n\\t\\t\\tif($userRol!=1){\\t\\t\\t\\n\\t\\t\\t\\tshow_error('ERROR!!! - You are in the wrong place.');\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t //inicio consulta de PUESTOS DE VOTACION\\n\\t\\t\\t$arrParam = array();\\n\\t\\t\\t$data['noSitios'] = $this->dashboard_model->countPuestos($arrParam);//cuenta de sitios\\n\\t\\t\\t\\n\\t//listado de PUESTOS DE VOTACION\\n\\t\\t\\t$arrParam = array();\\n\\t\\t\\t$data['infoPuestos'] = $this->general_model->get_puesto($arrParam);\\n\\t\\t\\t\\n\\n\\t\\t\\t$data[\\\"view\\\"] = \\\"dashboard\\\";\\n\\t\\t\\t$this->load->view(\\\"layout\\\", $data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fff6b45ad4638375f181bb534c79f719\",\n \"score\": \"0.6093611\",\n \"text\": \"public function homeAdmin()\\n {\\n\\n $product = new ProductModel();\\n\\n $data['products'] = $product->getProducts();\\n\\n $this->view->show('adminView.php', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a9e1126fc7572f3f63823df59b850ed\",\n \"score\": \"0.6078322\",\n \"text\": \"public function adminlogin()\\n\\t\\t{\\n\\t\\t\\t$logger = Logger::getLogger(__CLASS__);\\n\\t\\t\\ttry\\n\\t\\t\\t{\\n\\t\\t\\t\\t$_AppUser = new AppUser();\\n\\t\\t\\t\\treturn $this->view->output($_AppUser, \\\"plaintemplate\\\");\\n\\t\\t\\t}\\n\\t\\t\\tcatch (Exception $ex)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$logger->error($ex->getMessage());\\n\\t\\t\\t}\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0200de37ad3cc4b35b113dfe1b2d2bc\",\n \"score\": \"0.6072862\",\n \"text\": \"public function listadmin()\\n {\\n $this->data['title_web'] = \\\"Daftar Administrator\\\";\\n $this->data['daftar_admin'] = $this->model(\\\"Admin_model\\\")->getAllAdmin();\\n $this->view(\\\"templates/header\\\", $this->data);\\n $this->view(\\\"admin/listadmin\\\", $this->data);\\n $this->view(\\\"templates/footer\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6344d3edff034389c9a9003f9aeb9cf\",\n \"score\": \"0.60720384\",\n \"text\": \"public function AdminSite(){\\n if(!isset($_SESSION[\\\"user\\\"])){\\n header(\\\"location: index.php?c=auth&a=login \\\");\\n }else{\\n require_once 'view/include/header.php';\\n $result= $this->model->ReadSitebyAdmin();\\n require_once 'view/modules/admin/adminSite.php';\\n require_once 'view/include/footer.php';\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58e6e567bf804e2fa7b6d639282ac958\",\n \"score\": \"0.6056637\",\n \"text\": \"public function run() {\\n\\t\\tPermission::create(['guard_name' => 'admin', 'name' => 'add admin']);\\n\\t\\tPermission::create(['guard_name' => 'admin', 'name' => 'edit admin']);\\n\\t\\tPermission::create(['guard_name' => 'admin', 'name' => 'view admin']);\\n\\t\\tPermission::create(['guard_name' => 'admin', 'name' => 'delete admin']);\\n\\t\\tPermission::create(['guard_name' => 'admin', 'name' => 'add role']);\\n\\t\\tPermission::create(['guard_name' => 'admin', 'name' => 'edit role']);\\n\\t\\tPermission::create(['guard_name' => 'admin', 'name' => 'delete role']);\\n\\t\\tPermission::create(['guard_name' => 'admin', 'name' => 'view role']);\\n\\t\\t$role = Role::create(['guard_name' => 'admin', 'name' => 'Super Admin']);\\n\\t\\t$role->givePermissionTo(Permission::all());\\n\\t\\t$admin = Admin::create([\\n\\t\\t\\t'first_name' => 'Tariqul',\\n\\t\\t\\t'last_name' => 'Islam',\\n\\t\\t\\t'nid' => '19928111063000259',\\n\\t\\t\\t'dob' => '1992-11-25',\\n\\t\\t\\t'gender' => '1',\\n\\t\\t\\t'image' => Null,\\n\\t\\t\\t'email' => 'tariqulislamrc@gmail.com',\\n\\t\\t\\t'mobile' => '01718627564',\\n\\t\\t\\t'address' => 'Rajshahi',\\n\\t\\t\\t'city' => 'Rajshahi',\\n\\t\\t\\t'password' => Hash::make('Tariq1232'),\\n\\t\\t]);\\n\\t\\t//$admin->syncRoles(Role::all());\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7a4188778c710133478934a5bb88abc\",\n \"score\": \"0.60558075\",\n \"text\": \"public function adminAction() : object\\n {\\n $title = \\\"Admin\\\";\\n\\n $res = Content::contentFetchAll($this->app->db);\\n\\n $this->app->page->add(\\\"cms/admin\\\", [ \\\"res\\\" => $res ]);\\n\\n return $this->app->page->render([ \\\"title\\\" => $title ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9d8af61c6fa5554356e8564df80c136\",\n \"score\": \"0.60495514\",\n \"text\": \"abstract protected function _admin_dashboard();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ba7d60000f20b2b0e18c02131e3b32f\",\n \"score\": \"0.6047229\",\n \"text\": \"public function handleAdminPost(){\\n \\t// NO Admincenter\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1af54f507ee0574516255a597210a86\",\n \"score\": \"0.6042517\",\n \"text\": \"public function run()\\n {\\n // Permissions\\n $permissions = array(\\n // quyền truy cập dashboard\\n array(\\\"name\\\" => \\\"dashboard\\\", \\\"group\\\" => \\\"dashboard\\\", \\\"description\\\" => \\\"Truy cập dashboard\\\"),\\n // quyền thay đổi thông tin app\\n array(\\\"name\\\" => \\\"setting\\\", \\\"group\\\" => \\\"setting\\\", \\\"description\\\" => \\\"Thay đổi thông tin app\\\"),\\n // phân quyền\\n array(\\\"name\\\" => \\\"permission\\\", \\\"group\\\" => \\\"permission\\\", \\\"description\\\" => \\\"Truy cập danh sách quyền\\\"),\\n // quyền nhãn hiệu/brand\\n array(\\\"name\\\" => \\\"brand.access\\\", \\\"group\\\" => \\\"brand\\\", \\\"description\\\" => \\\"Truy cập danh sách nhãn hiệu\\\"),\\n array(\\\"name\\\" => \\\"brand.create\\\", \\\"group\\\" => \\\"brand\\\", \\\"description\\\" => \\\"Thêm nhãn hiệu\\\"),\\n array(\\\"name\\\" => \\\"brand.update\\\", \\\"group\\\" => \\\"brand\\\", \\\"description\\\" => \\\"Cập nhật nhãn hiệu\\\"),\\n array(\\\"name\\\" => \\\"brand.view\\\", \\\"group\\\" => \\\"brand\\\", \\\"description\\\" => \\\"Xem chi tiết nhãn hiệu\\\"),\\n array(\\\"name\\\" => \\\"brand.delete\\\", \\\"group\\\" => \\\"brand\\\", \\\"description\\\" => \\\"Xoá nhãn hiệu\\\"),\\n // quyền danh mục/category\\n array(\\\"name\\\" => \\\"category.access\\\", \\\"group\\\" => \\\"category\\\", \\\"description\\\" => \\\"Truy cập danh sách danh mục\\\"),\\n array(\\\"name\\\" => \\\"category.create\\\", \\\"group\\\" => \\\"category\\\", \\\"description\\\" => \\\"Thêm danh mục\\\"),\\n array(\\\"name\\\" => \\\"category.update\\\", \\\"group\\\" => \\\"category\\\", \\\"description\\\" => \\\"Cập nhật danh mục\\\"),\\n array(\\\"name\\\" => \\\"category.view\\\", \\\"group\\\" => \\\"category\\\", \\\"description\\\" => \\\"Xem chi tiết danh mục\\\"),\\n array(\\\"name\\\" => \\\"category.delete\\\", \\\"group\\\" => \\\"category\\\", \\\"description\\\" => \\\"Xoá danh mục\\\"),\\n // quyền danh bình luận\\n array(\\\"name\\\" => \\\"comment.access\\\", \\\"group\\\" => \\\"comment\\\", \\\"description\\\" => \\\"Truy cập danh sách bình luận\\\"),\\n array(\\\"name\\\" => \\\"comment.create\\\", \\\"group\\\" => \\\"comment\\\", \\\"description\\\" => \\\"Thêm bình luận\\\"),\\n array(\\\"name\\\" => \\\"comment.update\\\", \\\"group\\\" => \\\"comment\\\", \\\"description\\\" => \\\"Cập nhật bình luận\\\"),\\n array(\\\"name\\\" => \\\"comment.view\\\", \\\"group\\\" => \\\"comment\\\", \\\"description\\\" => \\\"Xem chi tiết bình luận\\\"),\\n array(\\\"name\\\" => \\\"comment.delete\\\", \\\"group\\\" => \\\"comment\\\", \\\"description\\\" => \\\"Xoá bình luận\\\"),\\n // quyền danh mã giảm giá/coupon\\n array(\\\"name\\\" => \\\"coupon.access\\\", \\\"group\\\" => \\\"coupon\\\", \\\"description\\\" => \\\"Truy cập danh sách mã giảm giá\\\"),\\n array(\\\"name\\\" => \\\"coupon.create\\\", \\\"group\\\" => \\\"coupon\\\", \\\"description\\\" => \\\"Thêm mã giảm giá\\\"),\\n array(\\\"name\\\" => \\\"coupon.update\\\", \\\"group\\\" => \\\"coupon\\\", \\\"description\\\" => \\\"Cập nhật mã giảm giá\\\"),\\n array(\\\"name\\\" => \\\"coupon.view\\\", \\\"group\\\" => \\\"coupon\\\", \\\"description\\\" => \\\"Xem chi tiết mã giảm giá\\\"),\\n array(\\\"name\\\" => \\\"coupon.delete\\\", \\\"group\\\" => \\\"coupon\\\", \\\"description\\\" => \\\"Xoá mã giảm giá\\\"),\\n // quyền đơn hàng/order\\n array(\\\"name\\\" => \\\"order.access\\\", \\\"group\\\" => \\\"order\\\", \\\"description\\\" => \\\"Truy cập danh đơn hàng\\\"),\\n array(\\\"name\\\" => \\\"order.create\\\", \\\"group\\\" => \\\"order\\\", \\\"description\\\" => \\\"Thêm đơn hàng\\\"),\\n array(\\\"name\\\" => \\\"order.update\\\", \\\"group\\\" => \\\"order\\\", \\\"description\\\" => \\\"Cập nhật đơn hàng\\\"),\\n array(\\\"name\\\" => \\\"order.view\\\", \\\"group\\\" => \\\"order\\\", \\\"description\\\" => \\\"Xem chi tiết đơn hàng\\\"),\\n array(\\\"name\\\" => \\\"order.delete\\\", \\\"group\\\" => \\\"order\\\", \\\"description\\\" => \\\"Xoá đơn hàng\\\"),\\n // quyền sản phẩm/product\\n array(\\\"name\\\" => \\\"product.access\\\", \\\"group\\\" => \\\"product\\\", \\\"description\\\" => \\\"Truy cập danh sách sản phẩm\\\"),\\n array(\\\"name\\\" => \\\"product.create\\\", \\\"group\\\" => \\\"product\\\", \\\"description\\\" => \\\"Thêm sản phẩm\\\"),\\n array(\\\"name\\\" => \\\"product.update\\\", \\\"group\\\" => \\\"product\\\", \\\"description\\\" => \\\"Cập nhật sản phẩm\\\"),\\n array(\\\"name\\\" => \\\"product.view\\\", \\\"group\\\" => \\\"product\\\", \\\"description\\\" => \\\"Xem chi tiết sản phẩm\\\"),\\n array(\\\"name\\\" => \\\"product.delete\\\", \\\"group\\\" => \\\"product\\\", \\\"description\\\" => \\\"Xoá sản phẩm\\\"),\\n // quyền đánh giá/rating\\n array(\\\"name\\\" => \\\"rating.access\\\", \\\"group\\\" => \\\"rating\\\", \\\"description\\\" => \\\"Truy cập danh đánh giá\\\"),\\n array(\\\"name\\\" => \\\"rating.create\\\", \\\"group\\\" => \\\"rating\\\", \\\"description\\\" => \\\"Thêm đánh giá\\\"),\\n array(\\\"name\\\" => \\\"rating.update\\\", \\\"group\\\" => \\\"rating\\\", \\\"description\\\" => \\\"Cập nhật đánh giá\\\"),\\n array(\\\"name\\\" => \\\"rating.view\\\", \\\"group\\\" => \\\"rating\\\", \\\"description\\\" => \\\"Xem chi tiết đánh giá\\\"),\\n array(\\\"name\\\" => \\\"rating.delete\\\", \\\"group\\\" => \\\"rating\\\", \\\"description\\\" => \\\"Xoá đánh giá\\\"),\\n // quyền vai trò/role\\n array(\\\"name\\\" => \\\"role.access\\\", \\\"group\\\" => \\\"role\\\", \\\"description\\\" => \\\"Truy cập danh vai trò\\\"),\\n array(\\\"name\\\" => \\\"role.create\\\", \\\"group\\\" => \\\"role\\\", \\\"description\\\" => \\\"Thêm vai trò\\\"),\\n array(\\\"name\\\" => \\\"role.update\\\", \\\"group\\\" => \\\"role\\\", \\\"description\\\" => \\\"Cập nhật vai trò\\\"),\\n array(\\\"name\\\" => \\\"role.view\\\", \\\"group\\\" => \\\"role\\\", \\\"description\\\" => \\\"Xem chi tiết vai trò\\\"),\\n array(\\\"name\\\" => \\\"role.delete\\\", \\\"group\\\" => \\\"role\\\", \\\"description\\\" => \\\"Xoá vai trò\\\"),\\n // quyền thẻ tag\\n array(\\\"name\\\" => \\\"tag.access\\\", \\\"group\\\" => \\\"tag\\\", \\\"description\\\" => \\\"Truy cập danh sách thẻ\\\"),\\n array(\\\"name\\\" => \\\"tag.create\\\", \\\"group\\\" => \\\"tag\\\", \\\"description\\\" => \\\"Thêm thẻ\\\"),\\n array(\\\"name\\\" => \\\"tag.update\\\", \\\"group\\\" => \\\"tag\\\", \\\"description\\\" => \\\"Cập nhật thẻ\\\"),\\n array(\\\"name\\\" => \\\"tag.view\\\", \\\"group\\\" => \\\"tag\\\", \\\"description\\\" => \\\"Xem chi tiết thẻ\\\"),\\n array(\\\"name\\\" => \\\"tag.delete\\\", \\\"group\\\" => \\\"tag\\\", \\\"description\\\" => \\\"Xoá thẻ\\\"),\\n // quyền loại thuế\\n array(\\\"name\\\" => \\\"tax.access\\\", \\\"group\\\" => \\\"tax\\\", \\\"description\\\" => \\\"Truy cập danh sách loại thuế\\\"),\\n array(\\\"name\\\" => \\\"tax.create\\\", \\\"group\\\" => \\\"tax\\\", \\\"description\\\" => \\\"Thêm loại thuế\\\"),\\n array(\\\"name\\\" => \\\"tax.update\\\", \\\"group\\\" => \\\"tax\\\", \\\"description\\\" => \\\"Cập nhật loại thuế\\\"),\\n array(\\\"name\\\" => \\\"tax.view\\\", \\\"group\\\" => \\\"tax\\\", \\\"description\\\" => \\\"Xem chi tiết loại thuế\\\"),\\n array(\\\"name\\\" => \\\"tax.delete\\\", \\\"group\\\" => \\\"tax\\\", \\\"description\\\" => \\\"Xoá loại thuế\\\"),\\n // quyền người theo dõi\\n array(\\\"name\\\" => \\\"subscriber.access\\\", \\\"group\\\" => \\\"subscriber\\\", \\\"description\\\" => \\\"Truy cập danh sách người theo dõi\\\"),\\n array(\\\"name\\\" => \\\"subscriber.create\\\", \\\"group\\\" => \\\"subscriber\\\", \\\"description\\\" => \\\"Thêm người theo dõi\\\"),\\n array(\\\"name\\\" => \\\"subscriber.update\\\", \\\"group\\\" => \\\"subscriber\\\", \\\"description\\\" => \\\"Cập nhật người theo dõi\\\"),\\n array(\\\"name\\\" => \\\"subscriber.view\\\", \\\"group\\\" => \\\"subscriber\\\", \\\"description\\\" => \\\"Xem chi tiết người theo dõi\\\"),\\n array(\\\"name\\\" => \\\"subscriber.delete\\\", \\\"group\\\" => \\\"subscriber\\\", \\\"description\\\" => \\\"Xoá người theo dõi\\\"),\\n // người dùng\\n array(\\\"name\\\" => \\\"user.access\\\", \\\"group\\\" => \\\"user\\\", \\\"description\\\" => \\\"Truy cập danh người dùng\\\"),\\n array(\\\"name\\\" => \\\"user.create\\\", \\\"group\\\" => \\\"user\\\", \\\"description\\\" => \\\"Thêm người dùng\\\"),\\n array(\\\"name\\\" => \\\"user.update\\\", \\\"group\\\" => \\\"user\\\", \\\"description\\\" => \\\"Cập nhật người dùng\\\"),\\n array(\\\"name\\\" => \\\"user.view\\\", \\\"group\\\" => \\\"user\\\", \\\"description\\\" => \\\"Xem chi tiết người dùng\\\"),\\n array(\\\"name\\\" => \\\"user.delete\\\", \\\"group\\\" => \\\"user\\\", \\\"description\\\" => \\\"Xoá người dùng\\\"),\\n );\\n Permission::insert($permissions);\\n $permissions_ids = array();\\n for ($i = 0; $i < count($permissions); ++$i) {\\n $permissions_ids[] = $i + 1;\\n }\\n // Roles\\n $role_admin = Role::firstOrCreate(['name' => 'Quản trị viên', 'slug' => 'admin']);\\n $role_admin->permissions()->sync($permissions_ids);\\n $role_customer = Role::firstOrCreate(['name' => 'customer', 'slug' => 'customer']);\\n // Users\\n $user = User::firstOrCreate(\\n ['email' => 'admin@hifymart.com'],\\n [\\n 'name' => 'Admin',\\n 'password' => Hash::make('12345678'),\\n 'email_verified_at' => now()\\n ]\\n );\\n $user->roles()->sync([$role_admin->id]);\\n\\n $user = User::firstOrCreate(\\n ['email' => 'user@hifymart.com'],\\n [\\n 'name' => 'Customer',\\n 'password' => Hash::make('12345678'),\\n 'email_verified_at' => now()\\n ]\\n );\\n $user->roles()->sync([$role_customer->id]);\\n // Thuế\\n Tax::firstOrCreate(['name' => 'None', 'value' => '0']);\\n Tax::firstOrCreate(['name' => 'VAT', 'value' => '10']);\\n /**\\n * Cài đặt\\n */\\n // Cài đặt chung\\n $settings = [\\n ['name' => 'logo', 'value' => null],\\n ['name' => 'favicon', 'value' => null],\\n ['name' => 'app-name', 'value' => 'HifyMart'],\\n ['name' => 'working-time', 'value' => '9h đến 20h, chủ nhật 10h đến 19h'],\\n ['name' => 'contact-mail', 'value' => null],\\n ['name' => 'contact-phone', 'value' => null],\\n ['name' => 'contact-mobile', 'value' => null],\\n ['name' => 'contact-address', 'value' => null],\\n ['name' => 'facebook', 'value' => null],\\n ['name' => 'twitter', 'value' => null],\\n ['name' => 'instagram', 'value' => null],\\n ['name' => 'youtube', 'value' => null],\\n ['name' => 'bank-info', 'value' => '

    Lưu ý: Quý khách vui lòng đợi nhân viên liên hệ xác nhận đơn hàng trước khi thực hiện thanh toán.

    Công Ty TNHH HifyMart:

    BIDV

    Số tài khoản : 36210000123456

    Ngân hàng TMCP Đầu tư và Phát triển Việt Nam – Hà Nội

    '],\\n ['name' => 'delivery', 'value' => '

    Phí vận chuyển: 19.000đ

    Miễn phí với đơn hàng từ 200.000đ trở lên

    Chỉ hỗ trợ vận chuyển đối với đơn hàng từ 100.000đ. Với đơn hàng có giá trị thấp hơn, quý khách vui lòng mua tại showroom

    '],\\n ['name' => 'slides', 'value' => null]\\n ];\\n Setting::insert($settings);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ba531a7c47d81c7d80d79e56d288372\",\n \"score\": \"0.6040172\",\n \"text\": \"public function manage(){\\n\\t\\t\\n\\t\\tif($this->input->post('vertify') === 'pass') //if webmaster access from admin/index\\n\\t\\t\\t$this->input->set_cookie('user','webmaster','1200'); //set cookie for webmaster user\\n\\t\\t\\t\\n\\t\\telse if($this->input->cookie('user') !== 'webmaster') //else if user is not webmaster\\n\\t\\t\\theader(\\\"location:\\\".base_url()); //back to hompage\\n\\t\\t\\n\\t\\t\\n\\t\\t$data['title'] = \\\"KMITL-BBS : Webmaster Manager\\\";\\n\\t\\t\\n\\t\\t//init all event list\\n\\t\\t$this->load->model('eventlist');\\n\\t\\t$this->eventlist->initList(true);\\n\\t\\t$event['eventlist'] = $this->eventlist->sortList('id','ASC');\\n\\t\\t//init all user list\\n\\t\\t$this->load->model('adminservice');\\n\\t\\t$user['userlist'] = $this->adminservice->getUserList();\\n\\t\\t\\n\\t\\t// -------------- view : show html ----------------//\\n\\t\\t\\n\\t\\t$this->load->view('header',$data);\\n\\n\\t\\t$this->load->view('adminviewer1' ,$event);\\n\\t\\t\\n\\t\\t$this->load->view('adminviewer2' ,$user);\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fdd487dd63a83f239fb9aad36e34f6a\",\n \"score\": \"0.60296786\",\n \"text\": \"public function index()\\n {\\n // $id = Auth::id();\\n // $user = User::find($id);;\\n // dd($user->isAdmin());\\n $admins = Admin::all();\\n return view('backend.admin.manage_admin.index', compact('admins'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3462e5fb76504155691044dd5e159539\",\n \"score\": \"0.60237986\",\n \"text\": \"function isAdmin()\\n{\\n\\t//\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ee2b30efb1c364bd25e8cdd37f2d3e6\",\n \"score\": \"0.6020153\",\n \"text\": \"public function viewAdmin(){\\n\\t\\t\\t$con = new Connection();\\n $db = $con->openConnection();\\n\\t\\t\\tif(isset($this->admin_id)){\\n\\t\\t\\t\\t$data = $db->query(\\\"SELECT * FROM admin where admin_id='$this->admin_id'\\\");\\n\\t\\t\\t\\t\\t\\t\\t$admin = $data->fetchAll();\\n\\n\\t\\t\\t}elseif (isset($this->username)) {\\n\\t\\t\\t\\t$data = $db->query(\\\"SELECT * FROM admin where admin_username='$this->admin_username'\\\");\\n\\t\\t\\t\\t\\t\\t\\t$admin = $data->fetchAll();\\n\\t\\t\\t}\\n\\t\\t\\telse{\\n\\n\\t$data = $db->query(\\\"SELECT * FROM admin\\\");\\n\\t\\t\\t\\t$admin = $data->fetchAll();\\n\\n\\t\\t\\t}\\nreturn $admin;\\n\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"499b0e2effb57929fda8c0a54b488b0c\",\n \"score\": \"0.6018518\",\n \"text\": \"public function run()\\n {\\n \\n $role_platform_admin = Role::where('name', 'Platform Admin')->first();\\n\\n $role_org_admin = Role::where('name', 'Organization Admin')->first();\\n \\n $super_admin = new Admin();\\n $super_admin->name = 'Rahul Mehta';\\n $super_admin->username = 'rahul';\\n $super_admin->email = 'rahulm.nmg@yopmail.com';\\n $super_admin->password = bcrypt('123456');\\n $super_admin->status = '1';\\n $super_admin->save();\\n $super_admin->roles()->attach($role_platform_admin);\\n\\n $admin = new Admin();\\n $admin->name = 'Sandeep Kumar';\\n $admin->username = 'sandeep';\\n $admin->email = 'sandeepk.nmg@yopmail.com';\\n $admin->password = bcrypt('123456');\\n $admin->status = '1';\\n $admin->save();\\n $admin->roles()->attach($role_org_admin);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f6c543f600e0787ad392f38c8252d33\",\n \"score\": \"0.60163754\",\n \"text\": \"abstract protected function _admin_login();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4ec6a0efc22c1575befd7232d6b903a\",\n \"score\": \"0.6015226\",\n \"text\": \"public function indexadmin() {\\n\\t\\t\\t$this->set('title_for_layout','Business Meeting - Pregunta');\\n\\t\\t\\t$this ->layout='admin';\\n\\t\\t\\t$this->set('questions', $this->Question->find('all'));\\n\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd4f23b3ac0a3402879840dc26a9af5e\",\n \"score\": \"0.6008195\",\n \"text\": \"public function admin_index() {\\n if (!$this->DCAuth->isAdmin()) {\\n $this->redirect($this->referer());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f24078ad5693859e666b106783e7a19\",\n \"score\": \"0.5994562\",\n \"text\": \"public function run()\\n {\\n //\\n $role_admin = [\\n \\\"slug\\\" => \\\"admin\\\",\\n \\\"name\\\" => \\\"Admin\\\",\\n \\\"permissions\\\" => [\\n \\\"admin\\\" => true\\n ]\\n ];\\n\\n Sentinel::getRoleRepository()->createModel()->fill($role_admin)->save();\\n $adminrole = Sentinel::findRoleByName('Admin');\\n $user_admin = [\\\"name\\\"=>\\\"Administrator\\\", \\\"phone\\\"=>\\\"01234567890\\\",\\\"address\\\"=>\\\"Admin Street\\\", \\\"email\\\"=>\\\"admin@gmail.com\\\", \\\"password\\\"=>'admin123'];\\n $adminuser = Sentinel::registerAndActivate($user_admin);\\n $adminuser->roles()->attach($adminrole);\\n\\n $role_supplier = [\\n \\\"slug\\\" => \\\"supplier\\\",\\n \\\"name\\\" => \\\"Supplier\\\",\\n \\\"permissions\\\" => [\\n \\\"admin.supplier\\\" => true\\n ]\\n ];\\n Sentinel::getRoleRepository()->createModel()->fill($role_supplier)->save();\\n $supplierrole = Sentinel::findRoleByName('Supplier');\\n $user_supplier = [\\\"name\\\"=>\\\"Supplier\\\", \\\"phone\\\"=>\\\"01234567890\\\",\\\"address\\\"=>\\\"Supplier Address\\\", \\\"email\\\"=>\\\"supplier@gmail.com\\\", \\\"password\\\"=>'supplier123'];\\n $supplieruser = Sentinel::registerAndActivate($user_supplier);\\n $supplieruser->roles()->attach($supplierrole);\\n\\n $role_buyer = [\\n \\\"slug\\\" => \\\"buyer\\\",\\n \\\"name\\\" => \\\"Buyer\\\",\\n \\\"permissions\\\" => [\\n \\\"admin.belanja\\\" => true\\n ]\\n ];\\n Sentinel::getRoleRepository()->createModel()->fill($role_buyer)->save();\\n $buyerrole = Sentinel::findRoleByName('Buyer');\\n $user_buyer = [\\\"name\\\"=>\\\"Buyer\\\", \\\"phone\\\"=>\\\"01234567890\\\",\\\"address\\\"=>\\\"Buyer Address\\\", \\\"email\\\"=>\\\"buyer@gmail.com\\\", \\\"password\\\"=>'buyer123'];\\n $buyeruser = Sentinel::registerAndActivate($user_buyer);\\n $buyeruser->roles()->attach($buyerrole);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c0aae54ece2d3dbcc100f422428f287\",\n \"score\": \"0.5989522\",\n \"text\": \"public function index($conexion){\\n // $data[\\\"admin\\\"] = $admin->getPrincipalView();\\n require_once \\\"views/admin/admin.view.php\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"730220355455e7ec6ec8667e96825d51\",\n \"score\": \"0.5989073\",\n \"text\": \"function shortApp() {\\n\\t\\t$this->loadAllModel(array('User','ShortApplication'));\\n\\t\\t$this->layout = 'short_app';\\n\\t\\tif(isset($this->request->data) && (!empty($this->request->data))){\\n\\t\\t\\t$this->ShortApplication->set($this->request->data['ShortApplication']);\\n\\t\\t\\tif($this->ShortApplication->validates()){\\n\\t\\t\\t\\tunset($this->request->data['ShortApplication']['broker_name']);\\n\\t\\t\\t\\t$this->Session->write('shortApp',$this->request->data['ShortApplication']);\\n\\t\\t\\t\\t$this->redirect(array('controller'=>'homes','action' => 'shortAppStep2/'.base64_encode('step2')));\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t$brokers = $this->User->find('list',array('conditions'=>array('User.user_type'=>2,'User.status'=>1,'User.is_deleted' =>0),'fields' => array('id','name'),'order'=>'name ASC'));\\n\\t\\t$brokers['none'] = 'Your Mortgage Broker';\\n\\t\\t$this->set('brokers',$brokers);\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15b2e4051263a99c1de2a091e2a2470e\",\n \"score\": \"0.5984873\",\n \"text\": \"function sfa_adminadminspage()\\r\\n{\\r\\n sfa_render_admins_index();\\r\\n\\r\\n return;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"458a458abab37cd6a5cd035b6d40412c\",\n \"score\": \"0.59821045\",\n \"text\": \"public function adminDefault() {\\n\\t\\t$this->adminList();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c748416e9f66a8e9ef81fe46643e6ca\",\n \"score\": \"0.59749377\",\n \"text\": \"function admin_init() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"659de9f6d9db67233acd255b27c810d8\",\n \"score\": \"0.5973237\",\n \"text\": \"function debet_adm()\\n\\t{\\n\\t\\t$data['title'] = 'Debet Administrasi';\\n\\t\\t$data['container'] = 'sys/debet_adm';\\n\\t\\t$this->load->view('core',$data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e1b0c0a6c0de5a3a848c7753117d2e9\",\n \"score\": \"0.5967677\",\n \"text\": \"function makeadminAction(){\\n $auth = Zend_Auth::getInstance();\\n if($auth->hasIdentity()){\\n $identity = $auth->getIdentity(); \\n $user_id = $identity->id_user;\\n $type = $identity->type;\\n\\n $admin_user = $this->getRequest()->getParam('id');\\n if($type == 1){\\n $user = $this->model->makeAdminUser($admin_user);\\n $this->redirect('users/index');\\n }\\n else{\\n $this->_redirect('cateogry/index');\\n }\\n }\\n else{\\n $this->_redirect('users/login');\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd86e72d2b6fa3ce2b5fbf2dc5f1f26c\",\n \"score\": \"0.5957892\",\n \"text\": \"private function del_admins(object $pp1)\\n {\\n $tbl = $pp1->uriq->t = 'admins' ; \\n $other=['caller'=>__FILE__.' '.', ln '.__LINE__, ', d e l in tbl '.$tbl] ;\\n\\n Tbl_crud_admin::dd($pp1, $other); //used for all t a b l e s !! \\n Config_allsites::Redirect_to($pp1->admins) ;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bfbec4c826418da9d14a8422402198f\",\n \"score\": \"0.59534746\",\n \"text\": \"public function index()\\n {\\n if ($this->session->userdata('admin_login') != 1)\\n redirect(base_url() . 'login', 'refresh');\\n if ($this->session->userdata('admin_login') == 1)\\n redirect(base_url() . 'admin/question_list', 'refresh');\\n \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6aa1ae3793683ddfe04aeee7f772766a\",\n \"score\": \"0.5949223\",\n \"text\": \"public function index()\\n {\\n// echo date('H:i:s', time());\\n// $is_login = Auth::check();\\n// var_dump($is_login);\\n// if (!$is_login){\\n// return redirect()->guest('auth/login');\\n// } else {\\n// echo \\\"登陆状态\\\";\\n// }\\n $this->_adminUserSvc = new AdminUserSvc();\\n $this->_adminRoleSvc = new AdminRoleSvc();\\n $this->_adminModuleSvc = new AdminModuleSvc();\\n\\n $user = Auth::user();\\n $current = $this->_adminUserSvc->getRow(array(array('id', '=', $user->id)));\\n $currentRolePermission = array();\\n if($current)$currentRolePermission = $this->_adminUserSvc->ownPermission($current);\\n $currentOwnRole = array();\\n if($current)$currentOwnRole = $this->_adminUserSvc->ownRole($current);\\n\\n $allStaticModule = $this->_adminModuleSvc->allStaticActionGroup();\\n\\n //共享数据\\n view()->share('currentRolePermission',$currentRolePermission);\\n view()->share('allStaticModule',$allStaticModule);\\n view()->share('currentOwnRole',$currentOwnRole);\\n view()->share('user',$user);\\n return view('index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52578a11a977407fe06e11c2f0117602\",\n \"score\": \"0.5947817\",\n \"text\": \"public function run()\\n {\\n $url = \\\"http://mariacanoied.herokuapp.com/home\\\";\\n $home = \\\"http://mariacanoied.herokuapp.com/pages/\\\";\\n\\n /**\\n * Permisos de control de usuarios\\n * Rol = Coordinador\\n * \\n * Permiso padre = Usuario\\n */\\n\\n $perUsu = new Permiso();\\n $perUsu->nombre = 'Usuarios';\\n $perUsu->name = 'Users';\\n $perUsu->icon = 'people-circle';\\n $perUsu->estado = 'Activo';\\n $perUsu->save();\\n\\n /* Permisos hijo */\\n $perHUR = new Permiso();\\n $perHUR->nombre = \\\"Usuarios registrados\\\";\\n $perHUR->name = \\\"Registered Users\\\";\\n $perHUR->url = \\\"http://mariacanoied.herokuapp.com/pages/usuarios/index\\\";\\n $perHUR->permiso_padre = $perUsu->id;\\n $perHUR->estado = 'Activo';\\n $perHUR->save();\\n\\n $perRol = new Permiso();\\n $perRol->nombre = \\\"Roles\\\";\\n $perRol->name = \\\"Roles\\\";\\n $perRol->url = $url;\\n $perRol->permiso_padre = $perUsu->id;\\n $perRol->estado = 'Activo';\\n $perRol->save();\\n\\n /**\\n * Permisos de control de Servicio social\\n * Rol = Coordinador - Estudiante\\n * \\n * Permiso padre = Servicio social\\n */\\n\\n $perServ = new Permiso();\\n $perServ->nombre = 'Servicio social';\\n $perServ->name = 'Social service';\\n $perServ->icon = 'walk';\\n $perServ->estado = 'Activo';\\n $perServ->save();\\n\\n /* Permisos hijo */\\n $perZS = new Permiso();\\n $perZS->nombre = \\\"Zonas de servicio\\\";\\n $perZS->name = \\\"Service areas\\\";\\n $perZS->url = $home.'zonas/index';\\n $perZS->permiso_padre = $perServ->id;\\n $perZS->estado = 'Activo';\\n $perZS->save();\\n\\n $perBS = new Permiso();\\n $perBS->nombre = \\\"Bitácoras de servicio\\\";\\n $perBS->name = \\\"Service logs\\\";\\n $perBS->url = $home.'bitacora/index';\\n $perBS->permiso_padre = $perServ->id;\\n $perBS->estado = 'Activo';\\n $perBS->save();\\n\\n /**\\n * Permisos de control de PQRS\\n * Rol = Coordinador - Acudiente\\n * \\n * Permiso padre = PQRS\\n */\\n\\n $perPqrs = new Permiso();\\n $perPqrs->nombre = 'PQRS';\\n $perPqrs->name = 'Consultations';\\n $perPqrs->icon = 'help';\\n $perPqrs->estado = 'Activo';\\n $perPqrs->save();\\n\\n /* Permisos hijo */\\n $perLP = new Permiso();\\n $perLP->nombre = \\\"Lista de PQRS\\\";\\n $perLP->name = \\\"List of queries\\\";\\n $perLP->url = $home.'pqrs/index';\\n $perLP->permiso_padre = $perPqrs->id;\\n $perLP->estado = 'Activo';\\n $perLP->save();\\n\\n $perMP = new Permiso();\\n $perMP->nombre = \\\"Mis PQRS\\\";\\n $perMP->name = \\\"My questions\\\";\\n $perMP->url = $home.'pqrs/create';\\n $perMP->permiso_padre = $perPqrs->id;\\n $perMP->estado = 'Activo';\\n $perMP->save();\\n\\n /**\\n * Permisos de control de Citas\\n * Rol = Coordinador - Acudiente\\n * \\n * Permiso padre = Citas\\n */\\n\\n $perCit = new Permiso();\\n $perCit->nombre = 'Citas';\\n $perCit->name = 'Appointment';\\n $perCit->icon = 'calendar-outline';\\n $perCit->estado = 'Activo';\\n $perCit->save();\\n\\n /* Permisos hijo */\\n $perRC = new Permiso();\\n $perRC->nombre = \\\"Atención por area\\\";\\n $perRC->name = \\\"Attention by area\\\";\\n $perRC->url = $home.'atencion_areas/index';\\n $perRC->permiso_padre = $perCit->id;\\n $perRC->estado = 'Activo';\\n $perRC->save();\\n\\n $perRC = new Permiso();\\n $perRC->nombre = \\\"Atención por curso\\\";\\n $perRC->name = \\\"Attention by course\\\";\\n $perRC->url = $home.'atencion_curso/index';\\n $perRC->permiso_padre = $perCit->id;\\n $perRC->estado = 'Activo';\\n $perRC->save();\\n \\n $perCC = new Permiso();\\n $perCC->nombre = \\\"Consultar citas\\\";\\n $perCC->name = \\\"Consult appointments\\\";\\n $perCC->url = $home.'citas/index';\\n $perCC->permiso_padre = $perCit->id;\\n $perCC->estado = 'Activo';\\n $perCC->save();\\n\\n /**\\n * Permisos de control de Administración academica\\n * Rol = Coordinador\\n * \\n * Permiso padre = Administración academica\\n */\\n\\n $perAA = new Permiso();\\n $perAA->nombre = 'Administración académica';\\n $perAA->name = 'Academic administration';\\n $perAA->icon = 'school';\\n $perAA->estado = 'Activo';\\n $perAA->save();\\n\\n /* Permisos hijo */\\n $perIG = new Permiso();\\n $perIG->nombre = \\\"Información general\\\";\\n $perIG->name = \\\"General information\\\";\\n $perIG->url = $home.'administracion_academica/index';\\n $perIG->permiso_padre = $perAA->id;\\n $perIG->estado = 'Activo';\\n $perIG->save();\\n\\n $perCur = new Permiso();\\n $perCur->nombre = \\\"Docentes\\\";\\n $perCur->name = \\\"Teachers\\\";\\n $perCur->url = $url;\\n $perCur->permiso_padre = $perAA->id;\\n $perCur->estado = 'Activo';\\n $perCur->save();\\n \\n $perHorC = new Permiso();\\n $perHorC->nombre = \\\"Administrar horarios\\\";\\n $perHorC->name = \\\"Manage schedules\\\";\\n $perHorC->url = $url;\\n $perHorC->permiso_padre = $perAA->id;\\n $perHorC->estado = 'Activo';\\n $perHorC->save();\\n \\n /**\\n * Permisos de control de Noticias\\n * Rol = Coordinador\\n * \\n * Permiso padre = Noticias\\n */\\n\\n $perNot = new Permiso();\\n $perNot->nombre = 'Noticias';\\n $perNot->name = 'News';\\n $perNot->icon = 'newspaper';\\n $perNot->estado = 'Activo';\\n $perNot->save();\\n\\n /* Permisos hijo */ \\n $perCN = new Permiso();\\n $perCN->nombre = \\\"Lista de noticias\\\";\\n $perCN->name = \\\"News list\\\";\\n $perCN->url = 'http://mariacanoied.herokuapp.com/pages/news/index';\\n $perCN->permiso_padre = $perNot->id;\\n $perCN->estado = 'Activo';\\n $perCN->save();\\n \\n /**\\n * Permisos de control de Portafolio\\n * Rol = Docente\\n * \\n * Permiso padre = Portafolio\\n */\\n\\n $perPor = new Permiso();\\n $perPor->nombre = 'Portafolio';\\n $perPor->name = 'Briefcase';\\n $perPor->icon = 'briefcase';\\n $perPor->estado = 'Activo';\\n $perPor->save();\\n \\n /* Permisos hijo */\\n $perAct = new Permiso();\\n $perAct->nombre = \\\"Actividades\\\";\\n $perAct->name = \\\"Activities\\\";\\n $perAct->url = $home.'actividades/index';\\n $perAct->permiso_padre = $perPor->id;\\n $perAct->estado = 'Activo';\\n $perAct->save();\\n \\n /**\\n * Permisos de control de Agenda\\n * Rol = Docente - Acudiente - Estudiante\\n * \\n * Permiso padre = Agenda\\n */\\n\\n $perAge = new Permiso();\\n $perAge->nombre = 'Agenda';\\n $perAge->name = 'Schedule';\\n $perAge->icon = 'book';\\n $perAge->estado = 'Activo';\\n $perAge->save();\\n\\n /* Permisos hijo */\\n $perRO = new Permiso();\\n $perRO->nombre = \\\"Registrar observación\\\";\\n $perRO->name = \\\"Record observation\\\";\\n $perRO->url = $home.'agendaWeb/create';\\n $perRO->permiso_padre = $perAge->id;\\n $perRO->estado = 'Activo';\\n $perRO->save();\\n \\n $perCO = new Permiso();\\n $perCO->nombre = \\\"Consultar observaciones\\\";\\n $perCO->name = \\\"Consult observations\\\";\\n $perCO->url = $home.'agendaWeb/index';\\n $perCO->permiso_padre = $perAge->id;\\n $perCO->estado = 'Activo';\\n $perCO->save();\\n \\n /**\\n * Permisos de control de Planillas\\n * Rol = Docente\\n * \\n * Permiso padre = Planillas\\n */\\n\\n $perPla = new Permiso();\\n $perPla->nombre = 'Registros académicos';\\n $perPla->name = 'Academic Records';\\n $perPla->icon = 'clipboard';\\n $perPla->estado = 'Activo';\\n $perPla->save();\\n /* Permisos hijo */\\n $perCal = new Permiso();\\n $perCal->nombre = \\\"Calificaciones\\\";\\n $perCal->name = \\\"Ratings\\\";\\n $perCal->url = $home.'notas/index';\\n $perCal->permiso_padre = $perPla->id;\\n $perCal->estado = 'Activo';\\n $perCal->save();\\n \\n $perAsis = new Permiso();\\n $perAsis->nombre = \\\"Asistencia\\\";\\n $perAsis->name = \\\"Assistance\\\";\\n $perAsis->url = $home.'asistencias/index';\\n $perAsis->permiso_padre = $perPla->id;\\n $perAsis->estado = 'Activo';\\n $perAsis->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bf9efa3d88ab78337823ebea2973a5e\",\n \"score\": \"0.59400624\",\n \"text\": \"public function index(){\\n\\t\\tif($this->mdl_admin->logged_id()){\\n\\t\\t\\t$this->load->view(\\\"homee\\\");\\n\\t\\t}else{redirect(\\\"login\\\");}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38fea318082954b95c69d13beddf8a85\",\n \"score\": \"0.59365106\",\n \"text\": \"public function admin()\\n {\\n $total_projects =Rent::where('status',0)->count();\\n\\n $total_users = User::count();\\n\\n $total_houses = House::count();\\n\\n $total_rent_houses=House::where('status',1)->count();\\n\\n $total_ava_houses=House::where('status',0)->count();\\n\\n $total_township=Township::count();\\n\\n if (Auth::user()->hasRole('admin')) {\\n return view('backend.index')->with(['total'=>$total_projects])->with('totalusers', $total_users)->with(['totalhouse'=>$total_houses])->with('total_rent_houses', $total_rent_houses)->with('total_ava_houses', $total_ava_houses)->with('total_township', $total_township);\\n } else {\\n return redirect()->route('home');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd9dc8864c3dfcfffdbb04f69256d015\",\n \"score\": \"0.5929975\",\n \"text\": \"static function getAdminName() {\\n\\t\\treturn MonitisConf::$adminName; \\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c3984e27088de8dba7ff5664aeba7c8\",\n \"score\": \"0.59235615\",\n \"text\": \"public function run()\\n {\\n //\\n $superadminRole = new Role();\\n $superadminRole->name = \\\"superadmin\\\";\\n $superadminRole->display_name=\\\"Super Admin\\\";\\n $superadminRole->save();\\n\\n $adminRole = new Role();\\n $adminRole->name = \\\"admin\\\";\\n $adminRole->display_name=\\\"Admin\\\";\\n $adminRole->save();\\n\\n $superadmin = new User();\\n $superadmin->name = 'Super Admin Rangkas';\\n $superadmin->email ='superadmin@gmail.com';\\n $superadmin->password = bcrypt('rahasia');\\n $superadmin->is_verified=1;\\n $superadmin->save();\\n $superadmin->attachRole($superadminRole);\\n\\n $admin = new User();\\n $admin->name = \\\"Admin Rangkas\\\";\\n $admin->email ='admin@gmail.com';\\n $admin->password = bcrypt('rahasia');\\n $admin->is_verified=1;\\n $admin->save();\\n $admin->attachRole($adminRole);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38e3809223a59bfcd752c0a8746e3c60\",\n \"score\": \"0.59220755\",\n \"text\": \"function admin_index() { \\r\\n \\t$this->set('ruta_admin',$this->ruta_admin);\\r\\n \\t$this->set('users',$this->paginate(\\\"User\\\"));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"feead3369bef27d3ff43722e3ea92a2a\",\n \"score\": \"0.5921773\",\n \"text\": \"public function viewAdminIndex()\\n {\\n $admins = $this->admin::paginate(12);\\n if (currentAdminType() == 'manager')\\n return view('manager.index' , ['admins' => $admins]);\\n \\n return view('admin.index' , ['admins' => $admins]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"477662996f00e15a4dd7da3064a7ad12\",\n \"score\": \"0.59179974\",\n \"text\": \"public function run()\\n {\\n\\n $backend = Menu::create([\\n 'name' => '控制台',\\n 'parent_id' => '0',\\n 'slug' => 'system.login',\\n 'url' => 'admin',\\n 'heightlight_url' => 'admin',\\n ]);\\n\\n $system = Menu::create([\\n 'name' => '系统管理',\\n 'parent_id' => '0',\\n 'slug' => 'system.manage',\\n 'url' => 'admin/menu',\\n 'heightlight_url' => 'admin/menu*,admin/user*,admin/role*,admin/permission*',\\n ]);\\n\\n Menu::create([\\n 'name' => '菜单管理',\\n 'parent_id' => $system->id,\\n 'slug' => 'menu.list',\\n 'url' => 'admin/menu',\\n 'heightlight_url' => 'admin/menu*',\\n ]);\\n\\n Menu::create([\\n 'name' => '用户管理',\\n 'parent_id' => $system->id,\\n 'slug' => 'user.list',\\n 'url' => 'admin/user',\\n 'heightlight_url' => 'admin/user*',\\n ]);\\n\\n Menu::create([\\n 'name' => '权限管理',\\n 'parent_id' => $system->id,\\n 'slug' => 'permission.list',\\n 'url' => 'admin/permission',\\n 'heightlight_url' => 'admin/permission*',\\n ]);\\n\\n Menu::create([\\n 'name' => '角色管理',\\n 'parent_id' => $system->id,\\n 'slug' => 'role.list',\\n 'url' => 'admin/role',\\n 'heightlight_url' => 'admin/role*',\\n ]);\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8aaf3d56e5ac0088d5a0c2e6a147498\",\n \"score\": \"0.59160626\",\n \"text\": \"public function run()\\n {\\n Admin::create(['name'=>'Admin','email'=>'admin@gmail.com','password'=>bcrypt('password')]);\\n Admin::create(['name'=>'Manager','email'=>'manager@gmail.com','password'=>bcrypt('password')]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0a5e7f03358408b5d7e9259bec48ba1\",\n \"score\": \"0.59122515\",\n \"text\": \"public function run()\\n {\\n $admin = new User();\\n $admin->name = \\\"admin\\\";\\n $admin->email = \\\"admin@gmail.com\\\";\\n $admin->password = bcrypt('123456');\\n $admin->gender =User::GENDER_MALE ;\\n $admin->role =User::ROLE_SUPER_ADMIN ;\\n $admin->save();\\n\\n $admin = new User();\\n $admin->name = \\\"gv1\\\";\\n $admin->email = \\\"gv1@gmail.com\\\";\\n $admin->password = bcrypt('123456');\\n $admin->gender =User::GENDER_MALE ;\\n $admin->class = 'CNTT';\\n $admin->role =User::ROLE_ADMIN ;\\n $admin->save();\\n\\n $admin = new User();\\n $admin->name = \\\"gv2\\\";\\n $admin->email = \\\"gv2@gmail.com\\\";\\n $admin->password = bcrypt('123456');\\n $admin->gender =User::GENDER_MALE ;\\n $admin->class = 'CNTT';\\n $admin->role =User::ROLE_ADMIN ;\\n $admin->save();\\n\\n $admin = new User();\\n $admin->name = \\\"gv3\\\";\\n $admin->email = \\\"gv3@gmail.com\\\";\\n $admin->password = bcrypt('123456');\\n $admin->gender =User::GENDER_MALE ;\\n $admin->class = 'CNTT';\\n $admin->role =User::ROLE_ADMIN ;\\n $admin->save();\\n\\n $user = new User();\\n $user->name = \\\"viet hoang\\\";\\n $user->birthday = \\\"02/3/1999\\\";\\n $user->code = \\\"17020770\\\";\\n $user->email = \\\"hoang@gmail.com\\\";\\n $user->password = bcrypt('123456');\\n $user->class = 'K62-CD';\\n $user->gender =User::GENDER_MALE ;\\n $user->role =User::ROLE_USER ;\\n $user->save();\\n\\n $user = new User();\\n $user->name = \\\"viet tu\\\";\\n $user->birthday = \\\"12/5/1999\\\";\\n $user->code = \\\"1702624\\\";\\n $user->email = \\\"tu@gmail.com\\\";\\n $user->password = bcrypt('123456');\\n $user->class = 'K62-M';\\n $user->gender =User::GENDER_MALE ;\\n $user->role =User::ROLE_USER ;\\n $user->save();\\n\\n $user = new User();\\n $user->name = \\\"viet linh\\\";\\n $user->birthday = \\\"23/9/1999\\\";\\n $user->code = \\\"17025410\\\";\\n $user->email = \\\"linh@gmail.com\\\";\\n $user->password = bcrypt('123456');\\n $user->class = 'K62-L';\\n $user->gender =User::GENDER_FEMALE ;\\n $user->role =User::ROLE_USER ;\\n $user->save();\\n\\n\\n $user = new User();\\n $user->name = \\\"khoa CNTT\\\";\\n $user->email = \\\"cntt@gmail.com\\\";\\n $user->password = bcrypt('123456');\\n $user->class = 'K62-L';\\n $user->role = User::ROLE_ASSESSOR ;\\n $user->save();\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b51b8d4cc3dff55ad6e256e2842d3a4\",\n \"score\": \"0.59091944\",\n \"text\": \"public function admin()\\n\\t{\\n\\t\\t$data['pengaduan'] = $this->modelsystem->tampil_pengaduan();\\n\\t\\tif ($num1 = $this->modelsystem->HitungData1()) {\\n\\t\\t\\t$data['hasil1'] = $num1;\\n\\t\\t}\\n\\t\\tif ($num2 = $this->modelsystem->HitungData2()) {\\n\\t\\t\\t$data['hasil2'] = $num2;\\n\\t\\t}\\n\\t\\tif ($num3 = $this->modelsystem->HitungData3()) {\\n\\t\\t\\t$data['hasil3'] = $num3;\\n\\t\\t}\\n\\t\\t$this->load->view('admin/admin-home', $data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f7702ff49f2ba2e9281fffb586333cf\",\n \"score\": \"0.59073824\",\n \"text\": \"public function run()\\n {\\n $index = new Menu;\\n $index->name = \\\"控制台\\\";\\n $index->pid = 0;\\n $index->language = \\\"zh\\\";\\n $index->icon = \\\"fa fa-dashboard\\\";\\n $index->slug = \\\"admin.systems.index\\\";\\n $index->url = \\\"admin\\\";\\n $index->description = \\\"后台首页\\\";\\n $index->save();\\n\\n $system = new Menu;\\n $system->name = \\\"系统管理\\\";\\n $system->pid = 0;\\n $system->language = \\\"zh\\\";\\n $system->icon = \\\"fa fa-cog\\\";\\n $system->slug = \\\"admin.systems.manage\\\";\\n $system->url = \\\"admin/role*,admin/permission*,admin/user*,admin/menu*,admin/log-viewer*\\\";\\n $system->description = \\\"系统功能管理\\\";\\n $system->save();\\n\\n $user = new Menu;\\n $user->name = \\\"用户管理\\\";\\n $user->pid = $system->id;\\n $user->language = \\\"zh\\\";\\n $user->icon = \\\"fa fa-users\\\";\\n $user->slug = \\\"admin.users.list\\\";\\n $user->url = \\\"admin/user\\\";\\n $user->description = \\\"显示用户管理\\\";\\n $user->save();\\n\\n\\n $role = new Menu;\\n $role->name = \\\"角色管理\\\";\\n $role->pid = $system->id;\\n $role->language = \\\"zh\\\";\\n $role->icon = \\\"fa fa-male\\\";\\n $role->slug = \\\"admin.roles.list\\\";\\n $role->url = \\\"admin/role\\\";\\n $role->description = \\\"显示角色管理\\\";\\n $role->save();\\n\\n\\n $permission = new Menu;\\n $permission->name = \\\"权限管理\\\";\\n $permission->pid = $system->id;\\n $permission->language = \\\"zh\\\";\\n $permission->icon = \\\"fa fa-paper-plane\\\";\\n $permission->slug = \\\"admin.permissions.list\\\";\\n $permission->url = \\\"admin/permission\\\";\\n $permission->description = \\\"显示权限管理\\\";\\n $permission->save();\\n\\n $log = new Menu;\\n $log->name = \\\"系统日志\\\";\\n $log->pid = $system->id;\\n $log->language = \\\"zh\\\";\\n $log->icon = \\\"fa fa-file-text-o\\\";\\n $log->slug = \\\"admin.logs.all\\\";\\n $log->url = \\\"admin/log-viewer\\\";\\n $log->description = \\\"显示系统日志\\\";\\n $log->save();\\n\\n $menu = new Menu;\\n $menu->name = \\\"菜单管理\\\";\\n $menu->pid = $system->id;\\n $menu->language = \\\"zh\\\";\\n $menu->icon = \\\"fa fa-navicon\\\";\\n $menu->slug = \\\"admin.menus.list\\\";\\n $menu->url = \\\"admin/menu\\\";\\n $menu->description = \\\"显示菜单管理\\\";\\n $menu->save();\\n\\n $menu = new Menu;\\n $menu->name = \\\"操作日志\\\";\\n $menu->pid = $system->id;\\n $menu->language = \\\"zh\\\";\\n $menu->icon = \\\"fa fa-heart\\\";\\n $menu->slug = \\\"admin.actionlog.list\\\";\\n $menu->url = \\\"admin/actionlog\\\";\\n $menu->description = \\\"操作日志\\\";\\n $menu->save();\\n\\n $image = new Menu;\\n $image->name = \\\"图片管理\\\";\\n $image->pid = 0;\\n $image->language = \\\"zh\\\";\\n $image->icon = \\\"fa fa-heart\\\";\\n $image->slug = \\\"admin.image.manage\\\";\\n $image->url = \\\"admin/image/show*,admin/image/select*,admin/image/image_list*\\\";\\n $image->description = \\\"图片管理\\\";\\n $image->save();\\n\\n $imageUpload = new Menu;\\n $imageUpload->name = \\\"图片上传\\\";\\n $imageUpload->pid = $image->id;\\n $imageUpload->language = \\\"zh\\\";\\n $imageUpload->icon = \\\"fa fa-cloud-upload\\\";\\n $imageUpload->slug = \\\"admin.image.upload\\\";\\n $imageUpload->url = \\\"admin/image/show\\\";\\n $imageUpload->description = \\\"图片上传\\\";\\n $imageUpload->save();\\n\\n $imageSelect = new Menu;\\n $imageSelect->name = \\\"图片选择器\\\";\\n $imageSelect->pid = $image->id;\\n $imageSelect->language = \\\"zh\\\";\\n $imageSelect->icon = \\\"fa fa-photo\\\";\\n $imageSelect->slug = \\\"admin.image.select\\\";\\n $imageSelect->url = \\\"admin/image/select\\\";\\n $imageSelect->description = \\\"图片选择器\\\";\\n $imageSelect->save();\\n\\n $imageList = new Menu;\\n $imageList->name = \\\"图片列表\\\";\\n $imageList->pid = $image->id;\\n $imageList->language = \\\"zh\\\";\\n $imageList->icon = \\\"fa fa-photo\\\";\\n $imageList->slug = \\\"admin.image.imagelist\\\";\\n $imageList->url = \\\"admin/image/image_list\\\";\\n $imageList->description = \\\"图片列表\\\";\\n $imageList->save();\\n\\n $website = new Menu;\\n $website->name = \\\"网站设置\\\";\\n $website->pid = 0;\\n $website->language = \\\"zh\\\";\\n $website->icon = \\\"fa fa-globe\\\";\\n $website->slug = \\\"admin.setting.manage\\\";\\n $website->url = \\\"admin/setting/switch*,admin/setting/email*\\\";\\n $website->description = \\\"网站设置相关\\\";\\n $website->save();\\n\\n\\n $websiteSwitch = new Menu;\\n $websiteSwitch->name = \\\"功能开关\\\";\\n $websiteSwitch->pid = $website->id;\\n $websiteSwitch->language = \\\"zh\\\";\\n $websiteSwitch->icon = \\\"fa fa-power-off\\\";\\n $websiteSwitch->slug = \\\"admin.setting.switch\\\";\\n $websiteSwitch->url = \\\"admin/setting/switch\\\";\\n $websiteSwitch->description = \\\"网站功能开关\\\";\\n $websiteSwitch->save();\\n\\n $websiteSwitch = new Menu;\\n $websiteSwitch->name = \\\"邮件模板\\\";\\n $websiteSwitch->pid = $website->id;\\n $websiteSwitch->language = \\\"zh\\\";\\n $websiteSwitch->icon = \\\"fa fa-envelope-o\\\";\\n $websiteSwitch->slug = \\\"admin.setting.email\\\";\\n $websiteSwitch->url = \\\"admin/setting/email\\\";\\n $websiteSwitch->description = \\\"邮件模板\\\";\\n $websiteSwitch->save();\\n\\n $article = new Menu;\\n $article->name = \\\"文章管理\\\";\\n $article->pid = 0;\\n $article->language = \\\"zh\\\";\\n $article->icon = \\\"fa fa-heart\\\";\\n $article->slug = \\\"admin.article.manage\\\";\\n $article->url = \\\"admin/article*,admin/ae_category*\\\";\\n $article->description = \\\"文章管理\\\";\\n $article->save();\\n\\n $articleList = new Menu;\\n $articleList->name = \\\"文章列表\\\";\\n $articleList->pid = $article->id;\\n $articleList->language = \\\"zh\\\";\\n $articleList->icon = \\\"fa fa-heart\\\";\\n $articleList->slug = \\\"admin.article.list\\\";\\n $articleList->url = \\\"admin/article\\\";\\n $articleList->description = \\\"文章列表\\\";\\n $articleList->save();\\n\\n $articleCategory = new Menu;\\n $articleCategory->name = \\\"分类列表\\\";\\n $articleCategory->pid = $article->id;\\n $articleCategory->language = \\\"zh\\\";\\n $articleCategory->icon = \\\"fa fa-heart\\\";\\n $articleCategory->slug = \\\"admin.article.categorylist\\\";\\n $articleCategory->url = \\\"admin/ae_category\\\";\\n $articleCategory->description = \\\"分类列表\\\";\\n $articleCategory->save();\\n\\n\\n\\n\\n\\n\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13c355ced10d35d20b7b0d19272a3f29\",\n \"score\": \"0.5905425\",\n \"text\": \"public function index()\\n {\\n if(Gate::denies('manage-users')){\\n return view('/student/stdhome');\\n }\\n else{\\n return view('admin/adminhome');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c85db6154f300ad997e3a381890c9645\",\n \"score\": \"0.5904747\",\n \"text\": \"function bp_admin() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4900a0b74b617f3e5874f71cb554601\",\n \"score\": \"0.59009933\",\n \"text\": \"public function actionAdmin() {\\n $widgets = array();\\n\\t\\t$this->render('dashboard', array('widgets'=>$widgets));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"536108c5e2472320d8b6d523714a0474\",\n \"score\": \"0.5888395\",\n \"text\": \"public function run()\\n {\\n $rol = Permission();\\n $rol->name= 'admin';\\n $rol->slug='admin';\\n $rol->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f894e8637dee60e9917c0d514f57ec8a\",\n \"score\": \"0.5887737\",\n \"text\": \"public function admin()\\n {\\n $data = array(\\n 'page_title' => 'Users',\\n 'page_active' => 'user'\\n );\\n\\n\\n $this->view->load_admin('users/admin/admin_view', $data);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1c5d4c0888821ce986f5a9c73270d7d\",\n \"score\": \"0.5887728\",\n \"text\": \"public function run()\\n {\\n \\t$password = bcrypt('password');\\n \\t$time = date('Y-m-d H:i:s',time());\\n\\n $datas = [\\n \\t[\\n \\t\\t'phone' => '15108479103',\\n 'name' => '超级管理员',\\n \\t\\t'password'=>$password,\\n \\t\\t'created_at' => $time,\\n \\t\\t'updated_at' => $time\\n \\t],\\n [\\n 'phone' => '15108479104',\\n 'name' => '管理员',\\n 'password'=>$password,\\n 'created_at' => $time,\\n 'updated_at' => $time\\n ],\\n [\\n 'phone' => '15108479112',\\n 'name' => '推广1',\\n 'password'=>$password,\\n 'created_at' => $time,\\n 'updated_at' => $time\\n ],\\n [\\n 'phone' => '15108479111',\\n 'name' => '推广2',\\n 'password'=>$password,\\n 'created_at' => $time,\\n 'updated_at' => $time\\n ],\\n ];\\n\\n Admin::insert($datas);\\n\\n\\n // 单独处理第一个用户的数据\\n $admin = Admin::find(1);\\n // 初始化用户角色,将 1 号用户指派为『站长』\\n $admin->assignRole('超级管理员');\\n\\n // 将 2 号用户指派为『管理员』\\n $admin = Admin::find(2);\\n $admin->assignRole('管理员');\\n\\n // 指定为推广 \\n $admin = Admin::find(3);\\n $admin->assignRole('推广员');\\n\\n $admin = Admin::find(4);\\n $admin->assignRole('推广员');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66b824c3f577b358928317322c340290\",\n \"score\": \"0.5887514\",\n \"text\": \"public function run() {\\n\\t\\t$admin = new User();\\n\\t\\t$admin->role_id = 1;\\n\\t\\t$admin->username = 'juan_Admin';\\n\\t\\t$admin->name = 'Juan Pérez';\\n\\t\\t$admin->website = 'a.com';\\n\\t\\t$admin->facebook = 'facebook/a';\\n\\t\\t$admin->twitter = 'twitter/a';\\n\\t\\t$admin->about = 'Soy el Admin de esta página, cualquier cosa que necesites estoy a tus ordenes.';\\n\\t\\t$admin->email = 'admin@admin.com';\\n\\t\\t$admin->password = bcrypt('admin123');\\n\\t\\t$admin->save();\\n\\n\\t\\t$entrepreneur = new User();\\n\\t\\t$entrepreneur->role_id = 2;\\n\\t\\t$entrepreneur->username = 'pedro_emprendedor';\\n\\t\\t$entrepreneur->name = 'Pedro Pérez';\\n\\t\\t$entrepreneur->website = 'a.com';\\n\\t\\t$entrepreneur->facebook = 'facebook/a';\\n\\t\\t$entrepreneur->twitter = 'twitter/a';\\n\\t\\t$entrepreneur->about = 'Que tal, soy Pedro un emprendedor que, como tu, busco ofertar mis servicios al publico para darme a conocer e iniciar mi negocio propio';\\n\\t\\t$entrepreneur->email = 'emprendedor@emprendedor.com';\\n\\t\\t$entrepreneur->password = bcrypt('emprendedor123');\\n\\t\\t$entrepreneur->save();\\n\\n\\t\\t$user = new User();\\n\\t\\t$user->role_id = 3;\\n\\t\\t$user->username = 'jorge_usuario';\\n\\t\\t$user->name = 'Jorge Pérez';\\n\\t\\t$user->website = 'a.com';\\n\\t\\t$user->facebook = 'facebook/a';\\n\\t\\t$user->twitter = 'twitter/a';\\n\\t\\t$user->about = 'Soy Jorge, estudiante de Derecho en busca de servicios de buena calidad a un costo accesible';\\n\\t\\t$user->email = 'usuario@usuario.com';\\n\\t\\t$user->password = bcrypt('usuario123');\\n\\t\\t$user->save();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee331657e6bf6ba35f2bcb9f1963776a\",\n \"score\": \"0.58863264\",\n \"text\": \"public function testAppAdminAccess()\\n {\\n \\t$user = factory(User::class, 'appadmin')->make();\\n \\t$user->save();\\n \\t\\n \\t$this->actingAs($user);\\n\\n \\t$this->get(URL::route('lists-index'))\\n ->assertStatus(200);\\n\\n $this->get(URL::route('user.index'))\\n ->assertStatus(200);\\n\\n $this->get(URL::route('organization.index'))\\n ->assertStatus(200);\\n\\n $this->get(URL::route('region.index'))\\n ->assertStatus(200);\\n\\n $this->get(URL::route('transport.index'))\\n ->assertStatus(200);\\n\\n $this->get(URL::route('purpose.index'))\\n ->assertStatus(200);\\n\\n $this->get(URL::route('product_type.index'))\\n ->assertStatus(200);\\n\\n $this->get(URL::route('storage.index'))\\n ->assertStatus(200);\\n\\n $this->get(URL::route('institution.index'))\\n ->assertStatus(200);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2bf186155ef1af2b677e8777594f7bb\",\n \"score\": \"0.58863044\",\n \"text\": \"public function run()\\n {\\n $user = new \\\\App\\\\admin([\\n 'name'=>'Paket 1',\\n 'kode_pembelian'=>'1',\\n 'BuktiPembayaran'=>'img/desain-grafis.jpg'\\n ]);\\n $user->save();\\n $user = new \\\\App\\\\admin([\\n 'name'=>'Paket 2',\\n 'kode_pembelian'=>'2',\\n 'BuktiPembayaran'=>'img/desain-grafis.jpg'\\n ]);\\n $user->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7052273a151e5b1f7c471cee138136eb\",\n \"score\": \"0.5886181\",\n \"text\": \"function displayHomeAdmin()\\n\\t{\\n\\t\\t$this->isAdmin();\\n\\t\\t$commentsRepository= new CommentsRepository();\\n\\t\\t$commentsNb= $commentsRepository->getCommentsCount();\\n\\t\\t$postsRepository= new PostsRepository();\\n\\t\\t$postsNb= $postsRepository->getPostsCount();\\n\\t\\t$storesRepository= new StoresRepository();\\n\\t\\t$storesNb= $storesRepository->getStoresCount();\\n\\t\\t$usersRepository= new UsersRepository();\\n\\t\\t$usersNb= $usersRepository->getUsersCount();\\n\\t\\tob_start();\\n\\t\\trequire 'view/back/homeAdmin.php';\\n\\t\\t$content=ob_get_clean();\\n\\t\\trequire 'view/back/templateAdmin.php';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29242df599185fcb7d2a05d885ab559e\",\n \"score\": \"0.58846915\",\n \"text\": \"public function index()\\n { \\n $user = Auth::user();\\n $admin = Auth::user()->get();//merr te gjithe recordet e userave nga databaza\\n //nqs useri aktual qe po logohet e ka isAdmin 1 ath coje te admin.blade.php\\n if($user->isAdmin==1){\\n return view('admin')->with('admin',$admin);\\n } \\n \\n else{\\n return view('home',compact(['user']));\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df2a5a3eab8a7aaf1f14597cdcb62c84\",\n \"score\": \"0.5877286\",\n \"text\": \"public function run()\\n { \\n Admin::create([\\n 'name' => 'Contatos',\\n 'route' => 'contact.index',\\n 'icon' => 'fa fa-envelope',\\n 'parent_id' => 0,\\n 'minimun_can' => 'list',\\n 'order_at' => 7\\n ]); \\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55b34f213a0655d420dcd122738431e0\",\n \"score\": \"0.58686876\",\n \"text\": \"public function actionAdmin()\\n\\t{ \\n\\t\\t$this->render('nearest_admin');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f04c97875d64326c1c485ecd112d186\",\n \"score\": \"0.5868589\",\n \"text\": \"public function index1()\\n {\\n if(accesoUser([1,2])){\\n\\n $modulo=\\\"mainUgel\\\";\\n $idtipouser=Auth::user()->tipouser_id;\\n $tipouser=Tipouser::find($idtipouser); \\n $imagenPerfil=\\\"\\\";\\n\\n return view('ugel.index',compact('modulo','imagenPerfil','tipouser'));\\n }\\n else\\n {\\n return view('adminlte::home'); \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"109accf528bf87b1a99e6fe1642e16de\",\n \"score\": \"0.58680075\",\n \"text\": \"public function run ()\\n {\\n $permission= new Permission;\\n $permission->name = 'TAL_MODULE';\\n $permission->display_name = 'HumTalent';\\n $permission->description = 'Acceso completo a la modulo de recursos humanos.';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n //Inicio para crear los permisos para los crud de empleados.\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_CREATE_EMP';\\n $permission->display_name = 'Crear Empleado';\\n $permission->description = 'Permiso para registrar empleados';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_READ_EMP';\\n $permission->display_name = 'Leer Empleado';\\n $permission->description = 'Permiso para consultar empleados';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_UPDATE_EMP';\\n $permission->display_name = 'Actualizar Empleado';\\n $permission->description = 'Permiso para actualizar empleados';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_DELETE_EMP';\\n $permission->display_name = 'Borrar Empleado';\\n $permission->description = 'Permiso para eliminar empleados';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n //permiso para enviar correos a los empleados.\\n $permission= new Permission;\\n $permission->name = 'TAL_SEND_EMAIL';\\n $permission->display_name = 'Enviar Correo';\\n $permission->description = 'Permiso para eliminar empleados';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n //permisos para el CRUD de documentos.\\n $permission= new Permission;\\n $permission->name = 'TAL_CREATE_DOC';\\n $permission->display_name = 'Crear Documento';\\n $permission->description = 'Permiso para registrar documentos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_READ_DOC';\\n $permission->display_name = 'Leer Documento';\\n $permission->description = 'Permiso para consultar documentos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_UPDATE_DOC';\\n $permission->display_name = 'Actualizar Documento';\\n $permission->description = 'Permiso para actualizar documentos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_DELETE_DOC';\\n $permission->display_name = 'Borrar Documento';\\n $permission->description = 'Permiso para eliminar documentos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n //permisos para el CRUD de eventos.\\n $permission= new Permission;\\n $permission->name = 'TAL_CREATE_EVENT';\\n $permission->display_name = 'Crear Evento';\\n $permission->description = 'Permiso para registrar eventos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_READ_EVENT';\\n $permission->display_name = 'Leer Evento';\\n $permission->description = 'Permiso para consultar eventos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_UPDATE_EVENT';\\n $permission->display_name = 'Actualizar Evento';\\n $permission->description = 'Permiso para actualizar eventos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_DELETE_EVENT';\\n $permission->display_name = 'Borrar Evento';\\n $permission->description = 'Permiso para eliminar eventos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n //permisos para realizar inducción .\\n $permission= new Permission;\\n $permission->name = 'TAL_CREATE_IND';\\n $permission->display_name = 'Realizar Inducción';\\n $permission->description = 'Permiso para realizar inducción';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n //permisos para el CRUD de permisos o incapacidades.\\n $permission= new Permission;\\n $permission->name = 'TAL_CREATE_PERM';\\n $permission->display_name = 'Crear Permiso';\\n $permission->description = 'Permiso para registrar incapacidades';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_READ_PERM';\\n $permission->display_name = 'Leer permiso';\\n $permission->description = 'Permiso para consultar incapacidades';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_UPDATE_PERM';\\n $permission->display_name = 'Actualizar Permiso';\\n $permission->description = 'Permiso para actualizar incapacidades';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n $permission= new Permission;\\n $permission->name = 'TAL_DELETE_PERM';\\n $permission->display_name = 'Borrar Permiso';\\n $permission->description = 'Permiso para eliminar incapacidades';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n\\n //permisos para generar reportes.\\n $permission= new Permission;\\n $permission->name = 'TAL_GEN_REPORT';\\n $permission->display_name = 'Generar reporte';\\n $permission->description = 'Permiso para generar reportes';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n //permisos para radicar documentos.\\n $permission= new Permission;\\n $permission->name = 'TAL_RAD_DOC';\\n $permission->display_name = 'Radicar Documentos';\\n $permission->description = 'Permiso para radicar documentos';\\n $permission->module_id = 6;\\n $permission ->save();\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee1da66be5e3b7a92e2b3fb997c6134f\",\n \"score\": \"0.586322\",\n \"text\": \"public function run()\\n {\\n $owner = new Role();\\n $owner->name = 'owner';\\n $owner->display_name = '网站管理员';\\n $owner->description = '';\\n $owner->save();\\n\\n $admin = new Role();\\n $admin->name = 'Administrator';\\n $admin->display_name = '超级管理员';\\n $admin->description = '最高权限拥有者';\\n $admin->save();\\n\\n\\n $manageUsers = new Permission;\\n $manageUsers->name = 'news_manage';\\n $manageUsers->display_name = '新闻管理';\\n $manageUsers->save();\\n\\n $power = new Permission;\\n $power->name = 'power_manage';\\n $power->display_name = '权限管理';\\n $power->save();\\n\\n $ad = new Permission;\\n $ad->name = 'ad_manage';\\n $ad->display_name = '广告管理';\\n $ad->save();\\n\\n $sys = new Permission;\\n $sys->name = 'sys_manage';\\n $sys->display_name = '系统设置';\\n $sys->save();\\n\\n\\n\\n $user = \\\\App\\\\Http\\\\Model\\\\AdminModel::where('name', '=', 'admin1')->first();\\n $user1 = \\\\App\\\\Http\\\\Model\\\\AdminModel::where('name', '=', 'admin')->first();\\n //调用hasRole提供的attachRole方法\\n $user->attachRole($owner); // 参数可以是Role对象,数组或id\\n $user1->attachRole($admin); // 参数可以是Role对象,数组或id\\n\\n $admin->attachPermissions(array($manageUsers, $ad,$power,$sys));\\n $owner->attachPermissions(array($manageUsers, $ad));\\n // $owner->attachPermissions(array($manageUsers, $ad));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be31d241841e1f71eca8976cec2f1f44\",\n \"score\": \"0.58625275\",\n \"text\": \"public function index1()\\n {\\n if(accesoUser([1])){\\n\\n\\n $idtipouser=Auth::user()->tipouser_id;\\n $tipouser=Tipouser::find($idtipouser);\\n\\n\\n $modulo=\\\"unidadorganica\\\";\\n return view('unidadorganica.index',compact('tipouser','modulo'));\\n }\\n else\\n {\\n return view('adminlte::home'); \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a31c4bd10ad0eb45d3110fe26b19c953\",\n \"score\": \"0.58619136\",\n \"text\": \"public function indexAdmin()\\n {\\n $admin = Auth::user();\\n\\n if ($admin->id == 1)\\n {\\n $order = Order::all();\\n return Response::json($order);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f56a448ac29fb418919c49c4221e1129\",\n \"score\": \"0.5861265\",\n \"text\": \"public function actionAdmins()\\r\\n {\\r\\n \\\\Yii::$app->view->title = \\\"Gerenciador de Usuários Administrativos\\\";\\r\\n \\\\Yii::$app->view->params['title-page'] = 'Gerenciador de Usuários Administrativos';\\r\\n /*END: Define atributos da pagina*/\\r\\n\\r\\n $model = new AdmUserSearch;\\r\\n $dataProvider = $model->search(Yii::$app->request->queryParams);\\r\\n\\r\\n\\r\\n return $this->render('admins',[\\r\\n 'dataProvider'=>$dataProvider,\\r\\n 'model'=>$model,\\r\\n ]);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea528721da809aa382d74594b2e13bd5\",\n \"score\": \"0.5858015\",\n \"text\": \"abstract public function is_admin();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ef5f38167f0b6e47b6cdfa3ee9efbd3\",\n \"score\": \"0.5853878\",\n \"text\": \"function site(){\\r\\n\\t\\t//just the facts maam\\r\\n\\t\\t$datas = $this->Admin->findAll();\\r\\n\\t\\t$this->set('data',$datas);\\r\\n\\t\\t$this->render('site','ajax');\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1675050d6b72bbbdcd85cb7a4db2c863\",\n \"score\": \"0.5853784\",\n \"text\": \"public function auto_gen_sitecode()\\n\\t{\\n\\t\\t$all_admin = $this->user_model->get_all_admindata();\\n\\t\\tprint_r($all_admin);\\n\\t\\t//die();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7733ddc076a77d558ce702077fa56691\",\n \"score\": \"0.58529544\",\n \"text\": \"public function admin_index() {\\r\\n if($this->Session->check('Auth.User')){\\r\\n\\t\\t if($this->Auth->user('user_type_id')==3)\\t\\r\\n $this->redirect(array('deo' => true , 'action' => 'index'));\\t\\r\\n\\t\\t} \\r\\n\\t\\t$this->layout = 'panel_layout';\\r\\n\\t\\t$this->set('title', 'Dashbord');\\r\\n\\t\\t// Call Values for the Dashboard from the session\\r\\n\\t\\t$user_id=$this->Auth->user('id'); // Login user's user id\\r\\n\\t\\t$user_type_id=$this->Auth->user('user_type_id'); // Login user's user type\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddcc7910e138f54b75d5f0d1d671bedf\",\n \"score\": \"0.58511186\",\n \"text\": \"public function run()\\n {\\n $role1 = Role::create(['name'=>'Superadmin']);\\n $role2 = Role::create(['name'=>'Admin']);\\n $role3 = Role::create(['name'=>'Usuario']);\\n\\n $permiso1= Permission::create(['name'=>'dash',\\n 'description'=>'Ver panel de administracion'])->syncRoles([$role1,$role2]);\\n\\n $permiso2=Permission::create(['name'=>'admin.tramites.index',\\n 'description'=>'Ver listado de tramites'])->syncRoles([$role1,$role2]);\\n $permiso3=Permission::create(['name'=>'admin.tramites.create',\\n 'description'=>'Crear tramites'])->syncRoles([$role1,$role2]);\\n $permiso4=Permission::create(['name'=>'admin.tramites.edit',\\n 'description'=>'Editar tramites'])->syncRoles([$role1,$role2]);\\n $permiso5=Permission::create(['name'=>'admin.tramites.destroy',\\n 'description'=>'Eliminar tramites'])->syncRoles([$role1,$role2]);\\n\\n $permiso6=Permission::create(['name'=>'admin.municipios.index',\\n 'description'=>'Ver listado de municipios'])->syncRoles([$role1,$role2]);\\n $permiso7=Permission::create(['name'=>'admin.municipios.create',\\n 'description'=>'Registrar municipios'])->syncRoles([$role1,$role2]);\\n $permiso8=Permission::create(['name'=>'admin.municipios.edit',\\n 'description'=>'Editar municipios'])->syncRoles([$role1,$role2]);\\n $permiso9=Permission::create(['name'=>'admin.municipios.destroy',\\n 'description'=>'Eliminar municipios'])->syncRoles([$role1,$role2]);\\n\\n $permiso10=Permission::create(['name'=>'admin.categorias.index',\\n 'description'=>'Ver categorias'])->syncRoles([$role1,$role2]);\\n $permiso11=Permission::create(['name'=>'admin.categorias.create',\\n 'description'=>'Crear categoria'])->syncRoles([$role1,$role2]);\\n $permiso12=Permission::create(['name'=>'admin.categorias.edit',\\n 'description'=>'Editar categoria'])->syncRoles([$role1,$role2]);\\n $permiso13=Permission::create(['name'=>'admin.categorias.destroy',\\n 'description'=>'Eliminar categoria'])->syncRoles([$role1,$role2]);\\n\\n $permiso14=Permission::create(['name'=>'admin.encuestas.index',\\n 'description'=>'ver encuestas'])->syncRoles([$role1,$role2]);\\n $permiso15=Permission::create(['name'=>'admin.encuestas.create',\\n 'description'=>'Crear encuestas'])->syncRoles([$role1,$role2]);\\n $permiso16=Permission::create(['name'=>'admin.encuestas.edit',\\n 'description'=>'Editar encuesta'])->syncRoles([$role1,$role2]);\\n $permiso17=Permission::create(['name'=>'admin.encuestas.destroy',\\n 'description'=>'Eliminar encuesta'])->syncRoles([$role1,$role2]);\\n\\n $permiso18=Permission::create(['name'=>'admin.usuarios.index',\\n 'description'=>'Ver listado de usuarios'])->assignRole($role1);\\n $permiso19=Permission::create(['name'=>'admin.usuarios.create',\\n 'description'=>'Crear Usuario'])->assignRole($role1);\\n $permiso20=Permission::create(['name'=>'admin.usuarios.edit',\\n 'description'=>'Editar usuario'])->assignRole($role1);\\n $permiso21=Permission::create(['name'=>'admin.usuarios.destroy',\\n 'description'=>'Eliminar usuario'])->assignRole($role1);\\n\\n $permiso22=Permission::create(['name'=>'admin.roles.index',\\n 'description'=>'Ver listado de roles'])->assignRole($role1);\\n $permiso23=Permission::create(['name'=>'admin.roles.create',\\n 'description'=>'Crear rol'])->assignRole($role1);\\n $permiso24=Permission::create(['name'=>'admin.role.edit',\\n 'description'=>'Editar rol'])->assignRole($role1);\\n $permiso25=Permission::create(['name'=>'admin.role.destroy',\\n 'description'=>'Eliminar rol'])->assignRole($role1);\\n \\n $permiso26=Permission::create(['name'=>'admin.permisos.index',\\n 'description'=>'Ver listado de permisos'])->assignRole($role1);\\n $permiso27=Permission::create(['name'=>'admin.permisos.create',\\n 'description'=>'Crear permiso'])->assignRole($role1);\\n $permiso28=Permission::create(['name'=>'admin.permisos.edit',\\n 'description'=>'Editar permisos'])->assignRole($role1);\\n $permiso29=Permission::create(['name'=>'admin.permisos.destroy',\\n 'description'=>'Eliminar permiso'])->assignRole($role1);\\n\\n $root= User::Create(['name'=>'root',\\n 'email'=>'root@admin.com',\\n 'password'=>bcrypt('root1234')])->assignRole($role1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a41faed1cbe107ea5de0eb9f86e00080\",\n \"score\": \"0.58507264\",\n \"text\": \"public function actionAdminExample()\\n\\t{\\n\\t\\t$this->viewData = array(\\n\\t\\t\\t'title' => 'Admin Somewhere',\\n\\t\\t\\t'some_key' => 'Example Admin Content',\\n\\t\\t);\\n\\n\\t\\t$this->setupLayout();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"819457597e0fcf974103a6200b46486b\",\n \"score\": \"0.5848751\",\n \"text\": \"static function setup_admin_pages() {\\n\\t\\tMyCondo_Admin::setup(\\n\\t\\t\\tMyCondo_Config::get_setting_schema()\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ab06581114b265cb2044c2077f09692\",\n \"score\": \"0.58473366\",\n \"text\": \"public function index1() {\\n \\n \\n \\n /************* Admin Access Check ****************/\\n $adminAccess = User::adminAccessCheck();\\n\\n if($adminAccess==1) {\\n $this->redirect('index/index');\\n }\\n /************* Admin Access Check End ************/\\n Logger::info(\\\"hello world\\\");\\n \\n $this->view->setLayout(\\\"login\\\");\\n PageContext::addScript(\\\"jquery.validate.js\\\");\\n PageContext::addScript(\\\"adminlogin.js\\\");\\n \\n\\n $status = NULL;\\n $userData = array();\\n\\n if($this->isPost()) {\\n\\n $username \\t= addslashes(($this->post('txtUsername')!='') ? $this->post('txtUsername') :$this->get('txtUsername'));\\n $password \\t= addslashes(($this->post('txtPassword')!='') ? $this->post('txtPassword') :$this->get('txtPassword'));\\n\\n $checkLogin = User::adminLoginCheck($username, $password);\\n\\n if($checkLogin['status']==1){\\n $roleLogin = User::loggedUserRoleCheck();\\n \\n if(!$roleLogin){\\n $checkLogin['status'] = 0;\\n $checkLogin['errMsg'] = \\\"Your user role is no longer active!\\\";\\n session_unset($_SESSION['adminUser']['username']);\\n session_unset();\\n }else{\\n $checkLogin['status'] = 1;\\n }\\n }\\n if($checkLogin['status']==1) {\\n User::updateLastLogin();\\n $this->redirect('index/index');\\n }\\n\\n } // End IsPost\\n\\n if(isset($checkLogin['errMsg']) && !empty($checkLogin['errMsg'])) { // Error on Page\\n $this->view->errMsg = $checkLogin['errMsg'];\\n\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"945da4e60623b227053a396d786388ba\",\n \"score\": \"0.5846351\",\n \"text\": \"public function adminHome()\\n\\t{\\n\\t\\t$data['title'] = 'adminHome';\\n\\n\\t\\t$bulletin = $this->announcement->ordered_announcements();\\n\\t\\t$data['bulletinList'] = $bulletin;\\n\\n\\t\\t$pending = $this->announcement->pending_ordered_announcements();\\n\\t\\t$data['pendingList'] = $pending;\\n\\n\\t\\t$this->ifLogInAdmin();\\n\\t\\t$this->load->view('IMMS', $data);\\n\\t\\t$this->load->view('layouts/footer');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cae1610239f5a7dd489ffcca92c908da\",\n \"score\": \"0.58430064\",\n \"text\": \"public function home(){\\n $info=session();\\n // p($info);\\n $roleid=session('admin_role_id');\\n $rolename=M('role')->where('role_id='.$roleid)->field('role_name')->select();\\n $win=pathinfo($_SERVER ['WINDIR']);\\n mysql_connect(\\\"localhost\\\", \\\"root\\\", \\\"root\\\");\\n $my= mysql_get_server_info();\\n $apache=$_SERVER['SERVER_SOFTWARE'];\\n $this->assign('win',$win['basename']);\\n $this->assign('mysql',$my);\\n $this->assign('apache',$apache);\\n $this->assign('rolename',$rolename[0]);\\n $this->assign('info',$info);\\n $this->display();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1cfa59c8abfe119a18f940f7d61c198\",\n \"score\": \"0.5833657\",\n \"text\": \"public function adminCreate()\\n {\\n //\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":728,"cells":{"query_id":{"kind":"string","value":"d9bf71a72fd8d1084dcc5a80cab91cc7"},"query":{"kind":"string","value":"Constructor to create a valid object"},"positive_passages":{"kind":"list like","value":[{"docid":"298e4bd7a4e83c6dd43d8bb18c10e416","score":"0.0","text":"public function __construct($strSystemid = \"\") {\n //base class\n parent::__construct($strSystemid);\n\n $this->objSortManager = new class_pages_sortmanager($this);\n }","title":""}],"string":"[\n {\n \"docid\": \"298e4bd7a4e83c6dd43d8bb18c10e416\",\n \"score\": \"0.0\",\n \"text\": \"public function __construct($strSystemid = \\\"\\\") {\\n //base class\\n parent::__construct($strSystemid);\\n\\n $this->objSortManager = new class_pages_sortmanager($this);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"130418f7cb2e409a53c4b649aee236c7","score":"0.7260301","text":"function _construct(){ }","title":""},{"docid":"a9e876c85e38882c5a3514c2eca20d6c","score":"0.7122245","text":"final private function __construct() {}","title":""},{"docid":"a9e876c85e38882c5a3514c2eca20d6c","score":"0.7122245","text":"final private function __construct() {}","title":""},{"docid":"5fd062e12d4381e58b63d7ba8650dfe4","score":"0.71042544","text":"public function construct()\n\t\t{\n\t\t}","title":""},{"docid":"9787340055b6ce991edd9860cd8c6394","score":"0.70712906","text":"public function createValidObject() : object {\n\t\treturn (object) [\"tweetContent\" => bin2hex(random_bytes(12))];\n\t}","title":""},{"docid":"d95065509cc1d0b4a6050f28f4592eed","score":"0.7040253","text":"function __constructor(){}","title":""},{"docid":"784710aa2c4b8df75b908eef03ed6b2c","score":"0.7035676","text":"function _construct() {\n \t\n\t\t\n\t}","title":""},{"docid":"555bf54d00058dfd447d9f61218760b6","score":"0.7002218","text":"public function constructionWithObject()\n {\n $equalValidator = new stubEqualValidator(new stdClass());\n }","title":""},{"docid":"62712a5e4ed975e04f15732e21e25484","score":"0.7001275","text":"protected abstract function __construct();","title":""},{"docid":"d90a9b0c63a6578bcdcd5f3de46323bf","score":"0.69928515","text":"private function construct() {\n\n\t\t$this->is_json_valid = [\n\t\t\t'amp' => true,\n\t\t\t'nonamp' => true,\n\t\t];\n\n\t\t$this->init();\n\t}","title":""},{"docid":"4d3ec4d120da4f4ba73783b84248d6ac","score":"0.69769865","text":"private final function __construct() {}","title":""},{"docid":"abafabb2e6139e8d44ba1c18cfac7358","score":"0.6953043","text":"final private function __construct() { }","title":""},{"docid":"abafabb2e6139e8d44ba1c18cfac7358","score":"0.6953043","text":"final private function __construct() { }","title":""},{"docid":"abafabb2e6139e8d44ba1c18cfac7358","score":"0.6953043","text":"final private function __construct() { }","title":""},{"docid":"13aa3b06317abf1417ae80e76839c19c","score":"0.69415116","text":"final private function __construct() {\n\t\t\t}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"406a22e1391e856014d86b33d263150b","score":"0.692525","text":"private function __construct(){}","title":""},{"docid":"65a178a9c5c83671a6a41536db5192cd","score":"0.68896264","text":"public function construct() {\n\n }","title":""},{"docid":"c8f8cdc3f0a27cf2fe91c3cd52a99f5a","score":"0.68427515","text":"public function _construct()\n\t{\n\n\t}","title":""},{"docid":"3b75a19c3fac16ba29f5e0d01a7a8730","score":"0.6826996","text":"private function __construct()\t{}","title":""},{"docid":"303c6463401e09821159820390808780","score":"0.6818601","text":"final private function __construct()\n\t{\n\t}","title":""},{"docid":"44244813de4b4bcb8842e212ad293304","score":"0.6809917","text":"protected final function __construct() {}","title":""},{"docid":"e6521783e56af0d8f907315d16848595","score":"0.6788748","text":"public function test___construct() {\n\t\t}","title":""},{"docid":"e6521783e56af0d8f907315d16848595","score":"0.6788748","text":"public function test___construct() {\n\t\t}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.67863405","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.67863405","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6786015","text":"private function __construct() {}","title":""},{"docid":"74995656862501c528150a00e0886be5","score":"0.6785251","text":"private function __construct() {}","title":""},{"docid":"7f0e6609ca43aca579e163c250efc3f6","score":"0.6768558","text":"public function testCreateNewInstanceWithValidConstructorArgument()\r\n {\r\n $mock = $this->_createMockDataObject();\r\n $oUser = new D2LWS_User_Model($mock);\r\n $this->assertEquals($mock, $oUser->getRawData());\r\n }","title":""},{"docid":"86539d2bb2ec81d8516b60b617e956db","score":"0.67658323","text":"final private function __construct()\n {\n }","title":""},{"docid":"4035e742ed1810ce710a2d8ca00bc253","score":"0.6732135","text":"private function __construct()\r\n {}","title":""}],"string":"[\n {\n \"docid\": \"130418f7cb2e409a53c4b649aee236c7\",\n \"score\": \"0.7260301\",\n \"text\": \"function _construct(){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9e876c85e38882c5a3514c2eca20d6c\",\n \"score\": \"0.7122245\",\n \"text\": \"final private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9e876c85e38882c5a3514c2eca20d6c\",\n \"score\": \"0.7122245\",\n \"text\": \"final private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fd062e12d4381e58b63d7ba8650dfe4\",\n \"score\": \"0.71042544\",\n \"text\": \"public function construct()\\n\\t\\t{\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9787340055b6ce991edd9860cd8c6394\",\n \"score\": \"0.70712906\",\n \"text\": \"public function createValidObject() : object {\\n\\t\\treturn (object) [\\\"tweetContent\\\" => bin2hex(random_bytes(12))];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d95065509cc1d0b4a6050f28f4592eed\",\n \"score\": \"0.7040253\",\n \"text\": \"function __constructor(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"784710aa2c4b8df75b908eef03ed6b2c\",\n \"score\": \"0.7035676\",\n \"text\": \"function _construct() {\\n \\t\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"555bf54d00058dfd447d9f61218760b6\",\n \"score\": \"0.7002218\",\n \"text\": \"public function constructionWithObject()\\n {\\n $equalValidator = new stubEqualValidator(new stdClass());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62712a5e4ed975e04f15732e21e25484\",\n \"score\": \"0.7001275\",\n \"text\": \"protected abstract function __construct();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d90a9b0c63a6578bcdcd5f3de46323bf\",\n \"score\": \"0.69928515\",\n \"text\": \"private function construct() {\\n\\n\\t\\t$this->is_json_valid = [\\n\\t\\t\\t'amp' => true,\\n\\t\\t\\t'nonamp' => true,\\n\\t\\t];\\n\\n\\t\\t$this->init();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d3ec4d120da4f4ba73783b84248d6ac\",\n \"score\": \"0.69769865\",\n \"text\": \"private final function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"abafabb2e6139e8d44ba1c18cfac7358\",\n \"score\": \"0.6953043\",\n \"text\": \"final private function __construct() { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"abafabb2e6139e8d44ba1c18cfac7358\",\n \"score\": \"0.6953043\",\n \"text\": \"final private function __construct() { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"abafabb2e6139e8d44ba1c18cfac7358\",\n \"score\": \"0.6953043\",\n \"text\": \"final private function __construct() { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13aa3b06317abf1417ae80e76839c19c\",\n \"score\": \"0.69415116\",\n \"text\": \"final private function __construct() {\\n\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"406a22e1391e856014d86b33d263150b\",\n \"score\": \"0.692525\",\n \"text\": \"private function __construct(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65a178a9c5c83671a6a41536db5192cd\",\n \"score\": \"0.68896264\",\n \"text\": \"public function construct() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8f8cdc3f0a27cf2fe91c3cd52a99f5a\",\n \"score\": \"0.68427515\",\n \"text\": \"public function _construct()\\n\\t{\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b75a19c3fac16ba29f5e0d01a7a8730\",\n \"score\": \"0.6826996\",\n \"text\": \"private function __construct()\\t{}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"303c6463401e09821159820390808780\",\n \"score\": \"0.6818601\",\n \"text\": \"final private function __construct()\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44244813de4b4bcb8842e212ad293304\",\n \"score\": \"0.6809917\",\n \"text\": \"protected final function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6521783e56af0d8f907315d16848595\",\n \"score\": \"0.6788748\",\n \"text\": \"public function test___construct() {\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6521783e56af0d8f907315d16848595\",\n \"score\": \"0.6788748\",\n \"text\": \"public function test___construct() {\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.67863405\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.67863405\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6786015\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74995656862501c528150a00e0886be5\",\n \"score\": \"0.6785251\",\n \"text\": \"private function __construct() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f0e6609ca43aca579e163c250efc3f6\",\n \"score\": \"0.6768558\",\n \"text\": \"public function testCreateNewInstanceWithValidConstructorArgument()\\r\\n {\\r\\n $mock = $this->_createMockDataObject();\\r\\n $oUser = new D2LWS_User_Model($mock);\\r\\n $this->assertEquals($mock, $oUser->getRawData());\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86539d2bb2ec81d8516b60b617e956db\",\n \"score\": \"0.67658323\",\n \"text\": \"final private function __construct()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4035e742ed1810ce710a2d8ca00bc253\",\n \"score\": \"0.6732135\",\n \"text\": \"private function __construct()\\r\\n {}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":729,"cells":{"query_id":{"kind":"string","value":"1eeee3e3e567d7a1aae4acd98e226c1c"},"query":{"kind":"string","value":"initialize decks for a given user. The initialization is soft as it will be able to add new subquestions"},"positive_passages":{"kind":"list like","value":[{"docid":"5811bc00889b19110d520d290151b9a0","score":"0.5715417","text":"function flashcard_initialize(&$flashcard, $userid) {\n global $DB;\n\n // Get all cards (all decks).\n $select = 'flashcardid = ? AND userid = ?';\n $cards = $DB->get_records_select('flashcard_card', $select, array($flashcard->id, $userid));\n $registered = array();\n if (!empty($cards)) {\n foreach ($cards as $card) {\n $registered[] = $card->entryid;\n }\n }\n\n // Get all subquestions.\n $params = array('flashcardid' => $flashcard->id);\n if ($subquestions = $DB->get_records('flashcard_deckdata', $params, '', 'id,id')) {\n foreach ($subquestions as $subquestion) {\n if (in_array($subquestion->id, $registered)) {\n continue;\n }\n $card = new StdClass();\n $card->userid = $userid;\n $card->flashcardid = $flashcard->id;\n $card->lastaccessed = time() - ($flashcard->deck1_delay * HOURSECS);\n $card->deck = 1;\n $card->entryid = $subquestion->id;\n if (! $DB->insert_record('flashcard_card', $card)) {\n print_error('dbcouldnotinsert', 'flashcard');\n }\n }\n } else {\n return false;\n }\n\n return true;\n}","title":""}],"string":"[\n {\n \"docid\": \"5811bc00889b19110d520d290151b9a0\",\n \"score\": \"0.5715417\",\n \"text\": \"function flashcard_initialize(&$flashcard, $userid) {\\n global $DB;\\n\\n // Get all cards (all decks).\\n $select = 'flashcardid = ? AND userid = ?';\\n $cards = $DB->get_records_select('flashcard_card', $select, array($flashcard->id, $userid));\\n $registered = array();\\n if (!empty($cards)) {\\n foreach ($cards as $card) {\\n $registered[] = $card->entryid;\\n }\\n }\\n\\n // Get all subquestions.\\n $params = array('flashcardid' => $flashcard->id);\\n if ($subquestions = $DB->get_records('flashcard_deckdata', $params, '', 'id,id')) {\\n foreach ($subquestions as $subquestion) {\\n if (in_array($subquestion->id, $registered)) {\\n continue;\\n }\\n $card = new StdClass();\\n $card->userid = $userid;\\n $card->flashcardid = $flashcard->id;\\n $card->lastaccessed = time() - ($flashcard->deck1_delay * HOURSECS);\\n $card->deck = 1;\\n $card->entryid = $subquestion->id;\\n if (! $DB->insert_record('flashcard_card', $card)) {\\n print_error('dbcouldnotinsert', 'flashcard');\\n }\\n }\\n } else {\\n return false;\\n }\\n\\n return true;\\n}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"b4b33e70d95928a99d21e041a5470b1f","score":"0.6136086","text":"private function init()\n {\n $this->setVariables($newcomer = false, $month = false, $em = true, $ids = false, $expense = false);\n $this->categories_for_user = $this->category_repository->findCategoriesByUser($this->user);\n }","title":""},{"docid":"a29c5667b75f7af738dab78a9c587df4","score":"0.6001422","text":"public function init( stdClass $user_data ) {\n if ( $this->member_exists() ) {\n $this->flush_object();\n }\n \n $this->data = $user_data;\n $this->ID = intval( $user_data->member_id );\n $this->email = $user_data->email;\n $this->name = $user_data->name;\n \n if ( $carts = Cart::get_carts_by_member( $this->ID )) {\n $this->carts = $carts;\n }\n }","title":""},{"docid":"723002519c63bcabb07e384db76fe644","score":"0.5870187","text":"public function __construct($user_id)\n {\n $this->user_id = $user_id;\n $this->loadData();\n }","title":""},{"docid":"f58490aaeff0995c0bd6e2d757c22dbd","score":"0.581248","text":"protected function __blackJackInitDeck($userId){\n\t\t$cardDeck = array();\n\t\tfor($j=0; $j<52; $j++){\n\t\t\t$cardDeck[$j]['card'] = $j;\n\t\t\t$iRest=($j+1)%13;\n\t\t\tif($iRest>10 || $iRest === 0){\n\t\t\t\t$iRest=10;\n\t\t\t}\n\t\t\tif($iRest === 1){\n\t\t\t\t$iRest=11;\n\t\t\t}\n\t\t\t$cardDeck[$j]['value'] = $iRest;\n\t\t}\n\t\tshuffle($cardDeck);\n\t\t$this->redis->set($userId.':blackjack-deck', serialize($cardDeck));\n\t}","title":""},{"docid":"d35542c9b051edf25e61bec9f7264710","score":"0.5729253","text":"public function __construct($user_id){\n\t\t$this->userInit($user_id);\n\t}","title":""},{"docid":"7c31191396c9dd3f66c4e551604e552e","score":"0.5697864","text":"protected function _construct()\n {\n $this->_init('smile_user_questions', 'question_id');\n }","title":""},{"docid":"2e5110d298a6877cf3e8576a19781800","score":"0.56729543","text":"public function initialize() : void\n {\n $this->question = new Question();\n $this->question->setDb($this->di->get(\"dbqb\"));\n $this->user = new User();\n $this->user->setDb($this->di->get(\"dbqb\"));\n $this->tag = new Tag();\n $this->tag->setDb($this->di->get(\"dbqb\"));\n $this->questionTag = new QuestionToTag();\n $this->questionTag->setDb($this->di->get(\"dbqb\"));\n $this->comment = new Comment();\n $this->comment->setDb($this->di->get(\"dbqb\"));\n $this->comThread = new CommentThread();\n $this->comThread->setDI($this->di);\n }","title":""},{"docid":"f0e2df6d8693d3d1edcc4c665032ed5b","score":"0.5632538","text":"public function initTicketsRelatedByUserId()\n\t{\n\t\t$this->collTicketsRelatedByUserId = array();\n\t}","title":""},{"docid":"d348a4b60ca96dc92267fc94051cff19","score":"0.56106424","text":"public function initialize()\n {\n $this->hasMany('user_id', 'QUIZUP\\Models\\QuestionCategory', 'user_id', array('alias' => 'QuestionCategory'));\n $this->hasMany('user_id', 'QUIZUP\\Models\\Quiz', 'user1_id', array('alias' => 'Quiz1'));\n $this->hasMany('user_id', 'QUIZUP\\Models\\Quiz', 'user2_id', array('alias' => 'Quiz2'));\n $this->belongsTo('cid', 'QUIZUP\\Models\\Country', 'cid', array('alias' => 'Country'));\n }","title":""},{"docid":"fc04c30693b7f89a51aef4b29fa1561a","score":"0.55501014","text":"protected function init() {\n $this->resetAfterTest(true);\n\n /**\n * Get a new data generator\n */\n $this->datagenerator = $this->getDataGenerator();\n\n /**\n * Create a user\n */\n $this->user();\n }","title":""},{"docid":"9fa0f4bcff5a3480954bc9f5ef809f72","score":"0.54863787","text":"public function initialize()\n {\n $this->session();\n\n $this->users = new \\Anax\\Users\\User();\n $this->users->setDI($this->di);\n }","title":""},{"docid":"0f317f20565b21e5f37dff425b7fdb8a","score":"0.53851575","text":"public function __construct(User $user)\n {\n if($user) {\n $this->user_id = $user->id;\n\n $this->data = [\n 'balance' => $user->balance,\n 'freezed_balance' => $user->freezed_balance\n ];\n }\n }","title":""},{"docid":"d8a40627f9ab38a72cff1998f5b7ace4","score":"0.53781325","text":"public function initialize()\r\n {\r\n $this->usersModel = new Userku();\r\n }","title":""},{"docid":"a0b0d6268b6d404d5bed931add455855","score":"0.5359545","text":"public function __construct()\n {\n $this->deposits = new ArrayCollection();\n }","title":""},{"docid":"379a917324e916aebf6a05bf54882a82","score":"0.5359173","text":"public function initialize()\n {\n $this->hasMany('id', 'Disque', 'idUtilisateur', array('alias' => 'Disque'));\n }","title":""},{"docid":"a2586ec7e065b892203501b53f143fd2","score":"0.535694","text":"public function __construct()\n {\n $this->users = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }","title":""},{"docid":"72383df6d7847506a0d6fc6598076667","score":"0.5352948","text":"public function initData()\n {\n Artisan::call('db:seed', [\n '--class' => UserRoleSeeder::class,\n '--force' => true\n ]);\n\n $this->superAdmin = User::create([\n 'name' => 'Super Admin',\n 'email' => 'super-admin@testing.com',\n 'password' => Hash::make('password'),\n ]);\n $this->superAdmin->assignRole('super-admin');\n\n $this->secondUser = User::create([\n 'name' => 'User 2',\n 'email' => 'user2@testing.com',\n 'password' => Hash::make('password'),\n ]);\n $this->secondUser->assignRole('writer');\n\n $this->tag = Tag::create([\n 'user_id' => $this->superAdmin->id,\n 'name' => 'tag1',\n ]);\n\n $this->category = Category::create([\n 'user_id' => $this->superAdmin->id,\n 'name' => 'cat1',\n ]);\n\n $this->article = Article::create([\n 'user_id' => $this->superAdmin->id,\n 'title' => 'PHPUnit Testing',\n 'excerpt' => 'Sample test text',\n 'body' => 'Lorem Ipsum',\n 'category_id' => $this->category->id,\n 'thumbnail_image' => 'static/images/default_thumbpng.jpg'\n ]);\n }","title":""},{"docid":"577a644984edfbbf6ffae9c25fbd9da0","score":"0.5341588","text":"function setUserData($user)\n {\n $term = Modules::run('main/getCurrentQuarter');\n $settings = Modules::run('main/getSet');\n $position_id = \"\";\n $position = \"\";\n $is_admin = FALSE;\n $is_superAdmin = FALSE;\n $is_adviser = FALSE;\n $employee_id = '';\n $rfid = '';\n $advisory = 0;\n $section_id = \"\";\n $grade_id = \"\";\n $siblings = \"\";\n $is_parent = FALSE;\n $parent_id = \"\";\n $uType = Modules::run('users/getUserType', $user);\n $uType_id = $uType->utype;\n $parent = $uType->if_p;\n \n if($parent){\n $is_parent = TRUE; \n }\n\n if($is_parent){\n $position = 'Parent';\n $position_id = 4;\n $parent = Modules::run('users/getParentData', $user);\n if($parent->firstname!=\"\"):\n $name = $parent->firstname;\n else:\n $name = $parent->m_name;\n endif;\n $siblings = $parent->child_links;\n $parent_id = $parent->pid;\n $user_id = $uType->u_id;\n }else{\n \n if($uType_id!=4){ //if user type != to student\n $getPosition = Modules::run('users/getPositionInfo', $user);\n $position_id = $getPosition->p_id;\n $position = $getPosition->post; \n $basicInfo = Modules::run('users/getBasicInfo', $user);\n $name = $basicInfo->firstname;\n $user_id = $basicInfo->user_id;\n $employee_id = $basicInfo->employee_id;\n $rfid = $basicInfo->rfid;\n $getAdvisory = Modules::run('academic/getAdvisory', $user, $settings->school_year);\n if($getAdvisory->num_rows()>0):\n $is_adviser = TRUE;\n $advisory = $getAdvisory->row()->section_id;\n endif;\n \n }else{\n\n }\n $admin = Modules::run('hr/ifDepartmentHead', $user, $uType_id);\n if($admin){\n $is_admin = true;\n }\n \n if($position_id>=38 || $position_id <= 44):\n $is_admin = TRUE;\n endif;\n\n if($uType_id==1){\n $is_superAdmin = true;\n $is_admin = true;\n }\n if($position=='Faculty'):\n $is_admin = FALSE;\n endif;\n }\n \n if($settings->att_check==1){\n $attend_auto = TRUE;\n }else{\n $attend_auto = FALSE;\n }\n \n \n $data = array(\n 'is_logged_in' => TRUE,\n 'username' => $user,\n 'rfid' => $rfid,\n 'user_id' => $user_id,\n 'employee_id' => $employee_id,\n 'usertype' => $uType_id,\n 'position' => $position,\n 'position_id' => $position_id,\n 'is_superAdmin' => $is_superAdmin,\n 'is_admin' => $is_admin,\n 'dept_id' => $uType_id,\n 'is_adviser' => $is_adviser,\n 'advisory' => $advisory,\n 'name' => $name,\n 'siblings' => $siblings,\n 'parent_id' => $parent_id,\n 'term' => $term,\n 'attend_auto' => $attend_auto,\n 'school_year' => $settings->school_year,\n 'session_id' => session_id()\n\n );\n $this->session->set_userdata($data);\n }","title":""},{"docid":"44ae23b755a990e7621560ea5cb42e63","score":"0.5339794","text":"function __construct($userID){\n \n $this->userID = $userID;\n $this->items = array();\n $this->subtotals = array();\n $this->totalPrice = 0;\n }","title":""},{"docid":"dcdbf1de13169116c1936dd6b25991c3","score":"0.53251827","text":"public function initialize()\n {\n $this->session();\n\n $this->questionToAnswer = new \\Anax\\QuestionToAnswer\\Question2Answer();\n $this->questionToAnswer->setDI($this->di);\n }","title":""},{"docid":"816708a5b809700ac687add5ad4d5698","score":"0.53251314","text":"public function initialize()\n {\n $this->setSource('UserChallenges');\n $this->belongsTo('ucChaId', '\\Paradoxis\\Models\\Challenges', 'chaId', array('alias' => 'Challenges'));\n $this->belongsTo('ucUserId', '\\Paradoxis\\Models\\Users', 'userId', array('alias' => 'Users'));\n }","title":""},{"docid":"985c4e2134012b44e88701fc4c720bd6","score":"0.5320607","text":"public function __construct()\n {\n $faker = Faker::create();\n $collection = new Collection();\n\n // Create 10 dummy user objects\n for ($i = 0; $i < 10; $i++) {\n $user = new User([\n 'name' => $faker->name,\n 'email' => $faker->email\n ]);\n\n $collection->add($user);\n }\n\n $this->users = $collection;\n }","title":""},{"docid":"95e9378f626c355146097995910ba2c0","score":"0.53109884","text":"public function initialize()\n {\n $this->setSource('tc_users');\n $this->hasMany('id', 'Models\\Recipe', 'id_user', ['alias' => 'recipes']);\n $this->hasOne('id', 'Models\\Recipe', 'id_user', [\n 'alias' => 'draftRecipe',\n 'params' => [\n 'state = \"draft\"'\n ]\n ]);\n }","title":""},{"docid":"6d36be790ae9b495d77689ced2b3cd1b","score":"0.53046155","text":"public function init()\n {\n $this->user = new Hb_User();\n }","title":""},{"docid":"688b5e896c8cd5f25b4ac12ad1dc278d","score":"0.52949256","text":"public function __construct(Devoir $devoir, User $user)\n {\n $this->devoir = $devoir;\n $this->user = $user;\n }","title":""},{"docid":"3c4e66ee62ede6b34bdb81a04b715134","score":"0.5290956","text":"public function initialize() {\n\t\t$this->belongsTo( 'questions_id', 'Questions', 'id', array( 'alias' => 'Questions' ) );\n\t\t$this->belongsTo( 'users_id', 'Users', 'id', array( 'alias' => 'Users' ) );\n\t}","title":""},{"docid":"f7030ae1bd9056e00394e55d2564ae4e","score":"0.52621484","text":"public function __construct($user = null) {\n // If a user identifier was passed, try and load said user\n if ($user) {\n if (is_int($user)) {\n $this->loadById($user);\n }\n \n if (is_string($user)) {\n $this->loadByUsername($user);\n }\n }\n }","title":""},{"docid":"dba8511299afae68a2d2d830edf2749d","score":"0.525044","text":"public function initialize()\n {\n $this->belongsTo('question5', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question5'));\n $this->belongsTo('question4', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question4'));\n $this->belongsTo('user1_id', 'QUIZUP\\Models\\User', 'user_id', array('alias' => 'User1'));\n $this->belongsTo('user2_id', 'QUIZUP\\Models\\User', 'user_id', array('alias' => 'User2'));\n $this->belongsTo('cid', 'QUIZUP\\Models\\QuestionCategory', 'cid', array('alias' => 'QuestionCategory'));\n $this->belongsTo('question1', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question1'));\n $this->belongsTo('question2', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question2'));\n $this->belongsTo('question3', 'QUIZUP\\Models\\Question', 'qid', array('alias' => 'Question3'));\n }","title":""},{"docid":"d58dae6449d57512f9322e57cb008fac","score":"0.52418643","text":"public function init()\n {\n $this->_user = new Disciples_User();\n $this->_userData = $this->_loadUserData();\n $this->view->userData = $this->_userData;\n $this->_currentInfo = $this->_helper->utils->getCurrentSemester();\n $this->_helper->layout->setLayout('index');\n\n $this->_session = new Zend_Session_Namespace('DISCIPLES');\n\n if ($this->_session->device->isMobile) {\n $this->_helper->redirector->gotoUrl('/mobile');\n }\n }","title":""},{"docid":"a1e064a2b7b0bb4abf74745dab4d7c7a","score":"0.5240803","text":"public function __construct()\n {\n $this->users = new ArrayCollection;\n }","title":""},{"docid":"27cef913a03e4124038b8ac484286992","score":"0.5236871","text":"public function __construct(User $user, CreateMenuRequest $request) {\n\t\t$this->auth = $user;\n\t\t$this->request = $request;\n\t}","title":""},{"docid":"53059add85f4525cbfa94991baad774b","score":"0.5236868","text":"public function setUp()\n {\n $this->question = new Question(self::$di->get(\"db\"));\n $this->user = new User(self::$di->get(\"db\"));\n }","title":""},{"docid":"9fbfdd77b29419e5b2f099fbf15a4efa","score":"0.5236046","text":"public function __construct ($user) {\n\t\t\n\t\t\tif (!is_null($user)) {\n\t\t\t\n\t\t\t\tif ($user instanceof MySQLRow) {\n\t\t\t\t\n\t\t\t\t\t$this->user=array();\n\t\t\t\t\t\n\t\t\t\t\tforeach ($user as $key=>$value) $this->user[$key]=$value->GetValue();\n\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t\t$this->user=$user;\n\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$this->organization=null;\n\t\t\t$this->session_key=null;\n\t\t\n\t\t}","title":""},{"docid":"f7bea708f7a60b26116715ba2271e602","score":"0.52345055","text":"public function __construct()\n {\n $this->users = new ArrayCollection();\n }","title":""},{"docid":"c16010c07ffcb76ca43a9629524ebbfd","score":"0.5230925","text":"public function init() {\r\n $this -> user = User::byId(session('id'));\r\n }","title":""},{"docid":"943dc64665f2014a5d28671d16b6c983","score":"0.52287215","text":"public function __construct()\n {\n $this->setViewsNumber(0);\n $this->viewsUsers = array();\n $this->comments = new ArrayCollection();\n $this->tags = new ArrayCollection();\n }","title":""},{"docid":"e8e68babbefdff202978b184d78233ed","score":"0.5208521","text":"public function __construct($user = null){\n\t\t\t$this->_db = DB::getInstance();\n\n\t\t\t//get session form init class\n\t\t\t\n\t\t\t$this->_session_name_1 = Config::get('session/session_name_1');\n\t\t\t\n\t\t\t\n\n\t\t\t//for student\n\t\t\tif(!$user){\n\t\t\t\tif(Session::exists($this->_session_name_1)){\n\t\t\t\t\t$user = Session::get($this->_session_name_1);\n\n\t\t\t\t\tif($this->find($user)){\n\t\t\t\t\t\t$this->_isLoggedIn = true;\n\t\t\t\t\t}else {\n\t\t\t\t\t\t//process logout\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}else {\n\t\t\t\t$this->find($user);\n\t\t\t}\n\n\t\t}","title":""},{"docid":"1d71e58fdd1e3a40dc1be596e26552d4","score":"0.5204242","text":"private function __construct()\n {\n $this->user_id = REQUEST::readIn(\"uid\");\n $this->user_id = 199; //tmp override\n }","title":""},{"docid":"d626186dcf26ae56b965935e629d7efe","score":"0.5196709","text":"function initUser( &$user ) {\n\t\t# I don't think I need this, do I?\n\t}","title":""},{"docid":"304052bd78fb8f307e67e0c4a2fb9720","score":"0.5196328","text":"public function __construct($user_id)\n {\n $this->user_id = $user_id;\n }","title":""},{"docid":"e780145475c9691ec8ed4b2b786d5ca3","score":"0.5195982","text":"public function __construct(DataUser $dataUser)\n {\n $this->dataUser = $dataUser;\n }","title":""},{"docid":"4a48acad84f9d1cb077c8b3fa2771638","score":"0.5195722","text":"public function __construct($user){\r\n\t\t$this->user_id = $user->user_id;\r\n\t\t$this->username = $user->username;\r\n\t\t$this->email = $user->email;\r\n\t\t$this->password = $user->password;\t\r\n\t\t$this->user_identifier = $user->identifier;\r\n\t\t$this->login_token = $user->token;\r\n\t\t$this->login_timeout = $user->timeout;\t\r\n\t\t$this->load_data();\r\n\t}","title":""},{"docid":"37bebd1fc088f534d674e1d0348f6406","score":"0.51814","text":"public function __construct($user)\n\t{\n\t\t$this->user = $user;\n\t}","title":""},{"docid":"c0cbc2f634eeb0399f4de9c2936406a6","score":"0.5175949","text":"public function initialize()\n {\n $this->setSchema(\"gayathrib\");\n $this->setSource(\"usercard\");\n $this->belongsTo('userid', 'models\\User', 'userid', ['alias' => 'User']);\n }","title":""},{"docid":"b6c85201599b4927d678d741c89365b2","score":"0.5171724","text":"public function __construct($user) {\n\t\t$this->user = ModelRegistry::loadModel('User', $user);\n\t}","title":""},{"docid":"e8d75742caa663ad652ed9250fa64b72","score":"0.51582336","text":"public function initQuiz($userId) {\n\t\t// a user is about to start the quiz\n\t\t// generate a list of questions, insert into quiz_answersubmissions, with answersubmittime = NULL\n\t\tif ($this->checkQuizInitialized($userId))\n\t\t\treturn true;\n\n\t\t$this->deleteEntries($userId);\n\t\t$sectionList = getSectionList($this->quizId);\n\t\t$questionList = array();\n\t\t$sections = array();\n\t\tfor ($i = 0; $i < count($sectionList); ++$i) {\n\t\t\t$questionList[$i] = $this->getSectionQuestions($sectionList[$i]);\n\t\t\tfor ($j = 0; $j < count($questionList[$i]); ++$j)\n\t\t\t\t$sections[] = $i;\n\t\t}\n\n\t\tif ($this->quizRow['quiz_allowsectionrandomaccess'] == 0 && $this->quizRow['quiz_mixsections']) \n\t\t\tshuffle($sections);\n\n\t\t$offsets = array_fill(0, count($questionList), 0);\n\t\tfor ($i = 0; $i < count($sections); ++$i) {\n\t\t\t$insertQuery = \"INSERT INTO `quiz_answersubmissions`(`page_modulecomponentid`, `quiz_sectionid`, `quiz_questionid`, `user_id`, `quiz_questionrank`) VALUES\" .\n\t\t\t\t\t\"({$this->quizId}, {$sectionList[$sections[$i]]['quiz_sectionid']}, {$questionList[$sections[$i]][$offsets[$sections[$i]]]}, $userId, $i)\";\n\t\t\tif (!mysql_query($insertQuery)) {\n\t\t\t\tdisplayerror('Database Error. Could not initialize quiz.');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$offsets[$sections[$i]]++;\n\t\t}\n\t\treturn true;\n\t}","title":""},{"docid":"a99cc02b5ae94329fb0a1e8b7e5db933","score":"0.5155045","text":"function __construct( $userCalories, $userSugar, $userSodium, $userProtein, $userCalcium ) {\n $this->userCalories = $userCalories;\n $this->userSugar = $userSugar;\n $this->userSodium = $userSodium;\n $this->userProtein = $userProtein;\n $this->userCalcium = $userCalcium;\n }","title":""},{"docid":"b57839a96fcddbf6d2e07debaf722c2f","score":"0.51531094","text":"public function __construct($user) {\n $this->user = $user;\n }","title":""},{"docid":"6f95b20858b25ffe11020fe7c4366ff6","score":"0.51522064","text":"function distributeInitialCards($userId) {\n\t$gameId = getGameOf($userId);\n\t$options = getUnusedCards($gameId);\n\t$hand = array();\n\n\tfor ($i = 0; $i < 7; $i++) {\n\t\t$chosen = array_rand($options); // index, not the card\n\n\t\t$sql = \"insert into decks (user_id, card_name) values ($userId, '$options[$chosen]')\";\n\t\tSQLInsert($sql);\n\t\tarray_push($hand, $options[$chosen]);\n\n\t\tarray_splice($options, $chosen, 1); // avoids calling getUnusedCards again\n\t}\n}","title":""},{"docid":"576181e86ddaaad203e19495058d029f","score":"0.51454556","text":"public function initialize()\n {\n $this->setSchema(\"phalcon\");\n $this->setSource(\"user\");\n $this->hasMany('id', Book::class, 'uid', [\n 'alias' => 'book',\n ]);\n $this->hasOne('role_id', Role::class, 'id', [\n 'alias' => 'role',\n ]);\n $this->hasManyToMany(\n 'id',\n UserTitle::class,\n 'uid',\n 'title_id',\n Title::class,\n 'id',\n [\n 'alias' => 'title',\n 'reusable' => true,\n ]\n );\n parent::initialize();\n }","title":""},{"docid":"8c50b1718e5e4e499019578d2e9e3239","score":"0.5144251","text":"public function init(){\n \n if(isset($_REQUEST['task'])){\n self::$task=filter_var($_REQUEST['task'],FILTER_SANITIZE_STRIPPED);\n }else{\n \n \n self::$task=self::$defaultTask;\n }\n \n $user=new User(); \n if(isset($_SESSION['uid'])){\n if($_SESSION['uid']!=\"\"){\n $user->loadDBData($_SESSION['uid']);\n \n }\n }\n Core::$user=$user; \n }","title":""},{"docid":"1960c60c5a73c324d32c12b6bb089028","score":"0.51438284","text":"public function init(){\n\t\t$this->createFieldSet();\n\t\t$this->getWinner();\n\t}","title":""},{"docid":"b9a2099b8f706e0b52941117d8e3e75b","score":"0.51328176","text":"public function __construct() {\n // initialize data\n $this->data = array ( 'sites' => array(),\n // 'users' => array() // future expansion: group by users\n );\n }","title":""},{"docid":"29d44b2dba6adde7797d2a349f9abfe2","score":"0.5132483","text":"public function __construct()\n {\n $this->categories = new ArrayCollection();\n $this->participants = new ArrayCollection();\n $this->media = new ArrayCollection();\n $this->published = true;\n $this->translations = new ArrayCollection();\n $this->relativeProjects = new ArrayCollection();\n $this->usersWithPositions = new ArrayCollection();\n $this->projectReviews = new ArrayCollection();\n }","title":""},{"docid":"30ba4c19388fb6f9efd7a112b10a4fdf","score":"0.51321477","text":"protected function beforeEach(): void\n {\n// Artisan::call()\n $this->user = Auth::loginUsingId(10);\n $this->postCategory = new PostCategory();\n $this->postCategory->scaffold();\n\n $this->post = new Post();\n $this->post->scaffold();\n }","title":""},{"docid":"c7245ded3a0de6ddbc61834fc535f5f5","score":"0.5126918","text":"public function __construct($user = null) {\n $this->db_conn = SqlManager::getInstance();\n $this->sessionName = $GLOBALS['config']['session']['session_name'];\n if (!$user) {\n if (Session::exists($this->sessionName)) {\n $user = Session::get($this->sessionName);\n if ($this->find($user)) {\n $this->isLoggedIn = true;\n }\n }\n } else {\n $this->find($user);\n }\n }","title":""},{"docid":"1fd419fc4652e8e91536129a8501caf6","score":"0.5125794","text":"public function init()\n {\n\t\t$this -> userModel = Application_Model_User::getInstance(); \n\t\t$this -> studyModel = Application_Model_Study::getInstance(); \n }","title":""},{"docid":"d1c44f388265bd1c9e453e2b4699ec7c","score":"0.5113661","text":"protected function setUp()\n {\n parent::setUp();\n $this->_questionsBlock = new Oggetto_Faq_Block_Questions;\n }","title":""},{"docid":"a9b362b3fae711bbca893f4f49a7e437","score":"0.51106834","text":"function __construct($user) {\n // Captcha and Honeypot must be disabled for form submission\n //module_disable(array('captcha', 'recaptcha', 'honeypot', 'mollom'), TRUE);\n //cache_clear_all();\n parent::__construct('user_pass');\n\n // $this->userObject = $user;\n // $this->setEntityObject($userObject);\n }","title":""},{"docid":"f42d418376c61ee479de06fee2f5c9c7","score":"0.5107444","text":"public function init(){\n\t\t\tparent::init();\n\t\t\t\n\t\t\t//$userMapper = new Application_Model_Mapper_Users_UsersMapper();\n\t\t\t$this->user = new Application_Model_Users_User();\n\t\t\t$this->user->userID = 1;\n\t\t\t\n\t\t\t//$this->user = $userMapper->findByUniqueID('MqIquFxXrS');\n\t\t\t//$this->user->\n\t\t}","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"ce25f0f69c6dfaa91633a40ea426f947","score":"0.5103807","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"06fc15db0194e7f2b4ba05992f7d329b","score":"0.51030546","text":"protected function setUp() {\n $this->object = new AuxUser;\n }","title":""},{"docid":"3d84b0389d4cc7944b8dbfca420b75dd","score":"0.51002944","text":"public function __construct($user) \n {\n $this->user = $user;\n }","title":""},{"docid":"37e75034b3d75686e3ea84c278a78b45","score":"0.50947905","text":"public function __construct() { \n $this->deck = [];\n $cardsIndex = 1;\n foreach (card::$suits as $suit=>$suitName) {\n foreach(card::$values as $value=>$valueName) {\n $this->deck[$cardsIndex] = new Card( $suit, $value, \"ND\");\n $cardsIndex++;\n }\n }\n $this->cardsUsed = 0;\n }","title":""},{"docid":"ee476120fdf849b4fc1aa0e58c0cfa21","score":"0.50919676","text":"public function initialize()\n\t{\n\t\t$this->belongsTo('post_id', 'Post', 'id');\n\n\t\t// Used to select a user using a given user id\n\t\t//$this->belongsTo('user_id', 'User', 'id');\n\t}","title":""},{"docid":"7d7c0707f6b61ec2d621f54a80141cbf","score":"0.50918317","text":"public function __construct($user)\n {\n $this->user = $user;\n\n }","title":""},{"docid":"ef0a4ef1b58dbb2d59bc09f32e578690","score":"0.508379","text":"public function __construct(User $user, Answer $answer, MedicalExpert $expert)\n {\n $this->user = $user;\n $this->answer = $answer;\n $this->expert = $expert;\n }","title":""},{"docid":"c289baf235114d3f5994a42e7eafe1a0","score":"0.5078189","text":"public function __construct($userId)\n\t{\n\t\t$this->userId = $userId;\n\t}","title":""},{"docid":"8cb5a93104c8e6acbb4cd968d5e5712d","score":"0.507758","text":"public function __construct()\n {\n $this->makeDeck(self::$playerDeckConfig);\n $this->nrOfCards = count($this->arrDeck);\n\n }","title":""},{"docid":"b82eb2370ed81e8ec4bc9dd530794751","score":"0.5077146","text":"public function __construct(User $user)\n {\n //$this->middleware('guest')->except('logout');\n\t\t//$this->users = $users;\n \t//parent::__construct();\n }","title":""},{"docid":"dbedb6dad7e16c4eec20c49069655714","score":"0.50745285","text":"public function initUsers()\n {\n $this->collUsers = new PropelObjectCollection();\n $this->collUsers->setModel('User');\n }","title":""},{"docid":"a690fd56e512b1b4d88b6e1648a8d427","score":"0.50713104","text":"public function __construct($user)\n {\n $this->user = $user;\n }","title":""},{"docid":"241d31b49af359ec40f8a41c4fdf02dc","score":"0.50689363","text":"public function __construct($identifier = 0)\r\n\t{\r\n\t\t// Create the user parameters object\r\n\t\t$this->_params = new JRegistry;\r\n\r\n\r\n\t\t$user = JFactory::getUser($identifier);\r\n\t\t$vars = get_object_vars ($user);\r\n\t\t\r\n\t\tforeach($vars as $name=>$value){\r\n\t\t\t$this->set($name, $value);\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\t// Load the user if it exists\r\n\t\tif (!$user->guest)\r\n\t\t{\r\n\t\t\t$this->load($identifier);\r\n\t\t}else{\r\n\t\t\t//default data\r\n\t\t\t\r\n\t\t}\r\n\t}","title":""},{"docid":"00e4737fce050f44f28ec599dbccabdc","score":"0.5065702","text":"function __construct($userId) {\n\t\t$this->userId = $userId;\n\t}","title":""},{"docid":"974858c5beecdff7bcee57a61f971f0e","score":"0.5055158","text":"public function setUp() {\n\t\t$this->data['standard'] = array(\n\t\t\t'firstname' => 'Jim',\n\t\t\t'lastname' => 'Morrison',\n\t\t\t'empty' => '',\n\t\t\t'integer' => '9',\n\t\t\t'float' => '1.11',\n\t\t\t'categories' => array('Poet','Composer'),\n\t\t\t'band' => array(\n\t\t\t\t'name' => 'The doors'\n\t\t\t),\n\t\t\t'friends' => array(\n\t\t\t\tarray('firstname' => 'Ray' , 'lastname' => 'Manzarek'),\n\t\t\t\tarray('firstname' => 'Robbie' , 'lastname' => 'Krieger'),\n\t\t\t\tarray('firstname' => 'John' , 'lastname' => 'Densmore')\n\t\t\t),\n\t\t\t'sub' => array(\n\t\t\t\tarray('integer' => '9', 'string' => 9)\n\t\t\t)\n\t\t) ;\n\n\t\t$this->data['source'] = array(\n\t\t\t'_index' => 'music',\n\t\t\t'_type' => 'artists',\n\t\t\t'_source' => array(\n\t\t\t\t'firstname' => 'Jim',\n\t\t\t\t'lastName' => 'Morrisson'\n\t\t\t)\n\t\t);\n\t}","title":""},{"docid":"744a528f926c72c12b76f5e44ba3aec4","score":"0.5049491","text":"protected function init()\n {\n $redisDataProvider = new RedisDataProvider($this);\n foreach ($this->initKeys as $key=>$type) {\n $keyValMapper = new RedisSetMapper($this->userPwd . $this->keySeparator . $key, $this->key);\n $redisDataProvider->set($keyValMapper);\n }\n $keyValMapper = new RedisSetMapper($this->userPwd.'_'.'init', 1);\n $redisDataProvider->set($keyValMapper);\n }","title":""},{"docid":"748505bb8e52bfbca846f7ea741db854","score":"0.5041792","text":"public function __construct() {\n $this->_mongo = DBConnection::instantiate();\n $this->_collection = $this->_mongo->getCollection(User::COLLECTION);\n \n if ( $this->isLoggedIn() ) $this->_loadData();\n }","title":""},{"docid":"9b6bd5502a67fece0d97d8ee3da596bd","score":"0.50407785","text":"public function setup(): void\n {\n\n parent::setUp();\n $this->user = factory(User::class)->create();\n $this->course = factory(Course::class)->create(['user_id' => $this->user->id]);\n $this->student_user = factory(User::class)->create();\n $this->student_user->role = 3;\n\n $this->student_user_2 = factory(User::class)->create();\n $this->student_user_2->role = 3;\n $this->student_user_ids = [$this->student_user->id, $this->student_user_2->id];\n $this->section = factory(Section::class)->create(['course_id' => $this->course->id]);\n\n $this->assignment = factory(Assignment::class)->create(['course_id' => $this->course->id]);\n $this->assignUserToAssignment($this->assignment->id, 'course', $this->course->id);\n\n\n $this->assignment_3 = factory(Assignment::class)->create(['course_id' => $this->course->id, 'order' => 2]);\n $this->question = factory(Question::class)->create(['page_id' => 1]);\n $this->original_assignment_question_id = DB::table('assignment_question')->insertGetId([\n 'assignment_id' => $this->assignment->id,\n 'question_id' => $this->question->id,\n 'points' => 10,\n 'order' => 1,\n 'open_ended_submission_type' => 'file'\n ]);\n\n\n $this->learning_tree = factory(LearningTree::class)->create(['user_id' => $this->user->id]);\n $this->original_assignment_question_learning_tree_id = DB::table('assignment_question_learning_tree')->insertGetId([\n 'assignment_question_id' => $this->original_assignment_question_id,\n 'learning_tree_id' => $this->learning_tree->id\n ]);\n\n $this->course_3 = factory(Course::class)->create(['user_id' => $this->user->id]);\n\n\n $this->user_2 = factory(User::class)->create();\n $this->course_2 = factory(Course::class)->create(['user_id' => $this->user_2->id]);\n $this->assignment_2 = factory(Assignment::class)->create(['course_id' => $this->course_2->id]);\n\n $this->grader_user = factory(User::class)->create();\n $this->grader_user->role = 4;\n Grader::create(['user_id' => $this->grader_user->id, 'section_id' => $this->section->id]);\n $finalGrade = new FinalGrade();\n\n FinalGrade::create(['course_id' => $this->course->id,\n 'letter_grades' => $finalGrade->defaultLetterGrades()]);\n\n\n $this->assign_tos = [\n [\n 'groups' => [['value' => ['course_id' => $this->course->id], 'text' => 'Everybody']],\n 'available_from' => '2020-06-10 09:00:00',\n 'available_from_date' => '2020-06-10',\n 'available_from_time' => '09:00:00',\n 'due' => '2020-06-12 09:00:00',\n 'due_date' => '2020-06-12',\n 'due_time' => '09:00:00',\n 'final_submission_deadline' => '2021-06-12 09:00:00',\n 'final_submission_deadline_date' => '2021-06-12',\n 'final_submission_deadline_time' => '09:00:00'\n ]\n ];\n $this->assignment_info = ['course_id' => $this->course->id,\n 'name' => 'First Assignment',\n 'assign_tos' => $this->assign_tos,\n 'scoring_type' => 'p',\n 'source' => 'a',\n 'default_points_per_question' => 2,\n 'students_can_view_assignment_statistics' => 0,\n 'include_in_weighted_average' => 1,\n 'late_policy' => 'not accepted',\n 'assessment_type' => 'delayed',\n 'default_open_ended_submission_type' => 'file',\n 'instructions' => 'Some instructions',\n \"number_of_randomized_assessments\" => null,\n 'notifications' => 1,\n 'assignment_group_id' => 1,\n 'file_upload_mode' => 'both'];\n\n foreach ($this->assign_tos[0]['groups'] as $key => $group) {\n $group_info = [\"groups_$key\" => ['Everybody'],\n \"due_$key\" => '2020-06-12 09:00:00',\n \"due_date_$key\" => '2020-06-12',\n \"due_time_$key\" => '09:00:00',\n \"available_from_$key\" => '2020-06-10',\n \"available_from_date_$key\" => '2020-06-12',\n \"available_from_time_$key\" => '09:00:00',\n \"final_submission_deadline_date_$key\" => '2021-06-12',\n \"final_submission_deadline_time_$key\" => '09:00:00'];\n foreach ($group_info as $info_key => $info_value) {\n $this->assignment_info[$info_key] = $info_value;\n }\n }\n\n $this->student_user = factory(User::class)->create();\n $this->student_user->role = 3;\n Enrollment::create(['course_id' => $this->course->id,\n 'section_id' => $this->section->id,\n 'user_id' => $this->student_user->id]);\n\n $this->student_user_2 = factory(User::class)->create();\n $this->student_user_2->role = 3;\n $this->section_1 = $this->section = factory(Section::class)->create(['course_id' => $this->course->id]);\n Enrollment::create(['course_id' => $this->course->id,\n 'section_id' => $this->section_1->id,\n 'user_id' => $this->student_user_2->id]);\n\n }","title":""},{"docid":"fb2b8d7bf51d4b098e3ff70f2ee081b3","score":"0.50379795","text":"public function __construct()\n\t{\n\t\tadd_filter('acf/load_field/name=data_curator', function($field) {\t\n\t\t\n\t\t\t$field['choices'] = array();\n\t\t\t\n\t\t\t$users = get_users();\n\t\t\t\n\t\t\tforeach ($users as $user) {\n\t\t\t\t$field['choices'][ $user->ID ] = $user->user_firstname . ' ' . $user->user_lastname;\n\t\t\t}\n\t\t\n\t\t\treturn $field;\n\t\t});\n\t}","title":""},{"docid":"b79a3b7a91ccb428a9b02665d25a22cf","score":"0.50365657","text":"public function initialize()\n\t{\n\t\t$this->setSource('Referrals');\n\t\t$this->hasOne('user_ik', 'User', 'ik');\n\t}","title":""},{"docid":"b8e0630cbd6107a062f95d74fd0388cf","score":"0.50351727","text":"public function initialize()\n {\n $this->setSchema(\"EgFtyzVzTW\");\n $this->setSource(\"users\");\n $this->hasMany('id', 'Houses', 'userID', ['alias' => 'Houses']);\n $this->belongsTo('roleID', '\\UserRole', 'id', ['alias' => 'Userrole']);\n }","title":""},{"docid":"41adc2672123fee3b72732aa8f03739f","score":"0.5029247","text":"public function setUp()\n {\n $this->user = new \\App\\Field;\n }","title":""},{"docid":"c91fff2a7f8e29ec5f80e333646cea7b","score":"0.50262403","text":"public function __construct()\n {\n $this->created = new \\DateTime(\"now\");\n $this->userservices = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->usercomments = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n $this->services = new \\Doctrine\\Common\\Collections\\ArrayCollection();\n }","title":""},{"docid":"0927d3dfabca05259af7ed9a4b833340","score":"0.50198966","text":"protected function set_up()\n {\n $ids = [1, 2, 3, 5, 7, 11, 13];\n $names = ['foo', 'bar', 'baz', 'dib', 'zim', 'gir', 'irk'];\n $data = [];\n foreach ($names as $key => $name) {\n $data[] = (object) [\n 'id' => $ids[$key],\n 'name' => $name\n ];\n }\n\n $this->data = $data;\n $this->collection = new GenericCollection($data);\n $this->empty_collection = new GenericCollection([]);\n }","title":""},{"docid":"456e56afff049ebd1ea5de76454692a4","score":"0.50151","text":"public function setUp()\n\t{\n\t\tparent::setUp();\n\t\t$this->dataSetStackBuffer = array('users'=>1);\n\t\t$this->loadDataSets();\n\t}","title":""},{"docid":"1f1409d60bb85b73017ed76e29f95199","score":"0.50141305","text":"public function __construct( $user)\n {\n $this->user = $user;\n }","title":""},{"docid":"8973f73bcd6d554d7d8cb55a857d204b","score":"0.5013529","text":"public final function init()\n {\n $this->data['permissions'] = $this\n ->user\n ->getUserGroup()\n ->getPermissions();\n }","title":""},{"docid":"006198a8990d9a2c0920d394494a2a96","score":"0.5005316","text":"public function __construct(User $user)\n {\n $this->user = $user;\n\n $this->onQueue('import-queue');\n }","title":""},{"docid":"6373b64ca52cc2831142f8d0730906ad","score":"0.50020957","text":"public function __construct($user = null){\n\n\t\t$this->_instance = DB::getInstance();\n\t\t$this->_exists = false;\n\n\t\tif (($user === null) && isset($_SESSION[Config::get('session/session_name')])) {\n\t\t\t$user = $_SESSION[Config::get('session/session_name')];\n\t\t}\n\t\ttrim($user);\n\t\t$this->getUser($user);\n\n\t}","title":""},{"docid":"552bcc8a4454a39e7bf7c88faf08711d","score":"0.49993646","text":"public function initialiser() {\r\n }","title":""},{"docid":"eb34a90c53a7db0d9bb690854d07e2fd","score":"0.4996483","text":"public function initialize()\n {\n $this->belongsTo('usersId', 'Modules\\Models\\Users', 'id', array(\n 'alias' => 'user'\n ));\n }","title":""},{"docid":"aa7bd2717f9cd6b0e1b61df96f55e009","score":"0.49959868","text":"public function initUsers()\n\t{\n\t\t$this->collUsers = array();\n\t}","title":""}],"string":"[\n {\n \"docid\": \"b4b33e70d95928a99d21e041a5470b1f\",\n \"score\": \"0.6136086\",\n \"text\": \"private function init()\\n {\\n $this->setVariables($newcomer = false, $month = false, $em = true, $ids = false, $expense = false);\\n $this->categories_for_user = $this->category_repository->findCategoriesByUser($this->user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a29c5667b75f7af738dab78a9c587df4\",\n \"score\": \"0.6001422\",\n \"text\": \"public function init( stdClass $user_data ) {\\n if ( $this->member_exists() ) {\\n $this->flush_object();\\n }\\n \\n $this->data = $user_data;\\n $this->ID = intval( $user_data->member_id );\\n $this->email = $user_data->email;\\n $this->name = $user_data->name;\\n \\n if ( $carts = Cart::get_carts_by_member( $this->ID )) {\\n $this->carts = $carts;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"723002519c63bcabb07e384db76fe644\",\n \"score\": \"0.5870187\",\n \"text\": \"public function __construct($user_id)\\n {\\n $this->user_id = $user_id;\\n $this->loadData();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f58490aaeff0995c0bd6e2d757c22dbd\",\n \"score\": \"0.581248\",\n \"text\": \"protected function __blackJackInitDeck($userId){\\n\\t\\t$cardDeck = array();\\n\\t\\tfor($j=0; $j<52; $j++){\\n\\t\\t\\t$cardDeck[$j]['card'] = $j;\\n\\t\\t\\t$iRest=($j+1)%13;\\n\\t\\t\\tif($iRest>10 || $iRest === 0){\\n\\t\\t\\t\\t$iRest=10;\\n\\t\\t\\t}\\n\\t\\t\\tif($iRest === 1){\\n\\t\\t\\t\\t$iRest=11;\\n\\t\\t\\t}\\n\\t\\t\\t$cardDeck[$j]['value'] = $iRest;\\n\\t\\t}\\n\\t\\tshuffle($cardDeck);\\n\\t\\t$this->redis->set($userId.':blackjack-deck', serialize($cardDeck));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d35542c9b051edf25e61bec9f7264710\",\n \"score\": \"0.5729253\",\n \"text\": \"public function __construct($user_id){\\n\\t\\t$this->userInit($user_id);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c31191396c9dd3f66c4e551604e552e\",\n \"score\": \"0.5697864\",\n \"text\": \"protected function _construct()\\n {\\n $this->_init('smile_user_questions', 'question_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e5110d298a6877cf3e8576a19781800\",\n \"score\": \"0.56729543\",\n \"text\": \"public function initialize() : void\\n {\\n $this->question = new Question();\\n $this->question->setDb($this->di->get(\\\"dbqb\\\"));\\n $this->user = new User();\\n $this->user->setDb($this->di->get(\\\"dbqb\\\"));\\n $this->tag = new Tag();\\n $this->tag->setDb($this->di->get(\\\"dbqb\\\"));\\n $this->questionTag = new QuestionToTag();\\n $this->questionTag->setDb($this->di->get(\\\"dbqb\\\"));\\n $this->comment = new Comment();\\n $this->comment->setDb($this->di->get(\\\"dbqb\\\"));\\n $this->comThread = new CommentThread();\\n $this->comThread->setDI($this->di);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0e2df6d8693d3d1edcc4c665032ed5b\",\n \"score\": \"0.5632538\",\n \"text\": \"public function initTicketsRelatedByUserId()\\n\\t{\\n\\t\\t$this->collTicketsRelatedByUserId = array();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d348a4b60ca96dc92267fc94051cff19\",\n \"score\": \"0.56106424\",\n \"text\": \"public function initialize()\\n {\\n $this->hasMany('user_id', 'QUIZUP\\\\Models\\\\QuestionCategory', 'user_id', array('alias' => 'QuestionCategory'));\\n $this->hasMany('user_id', 'QUIZUP\\\\Models\\\\Quiz', 'user1_id', array('alias' => 'Quiz1'));\\n $this->hasMany('user_id', 'QUIZUP\\\\Models\\\\Quiz', 'user2_id', array('alias' => 'Quiz2'));\\n $this->belongsTo('cid', 'QUIZUP\\\\Models\\\\Country', 'cid', array('alias' => 'Country'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc04c30693b7f89a51aef4b29fa1561a\",\n \"score\": \"0.55501014\",\n \"text\": \"protected function init() {\\n $this->resetAfterTest(true);\\n\\n /**\\n * Get a new data generator\\n */\\n $this->datagenerator = $this->getDataGenerator();\\n\\n /**\\n * Create a user\\n */\\n $this->user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fa0f4bcff5a3480954bc9f5ef809f72\",\n \"score\": \"0.54863787\",\n \"text\": \"public function initialize()\\n {\\n $this->session();\\n\\n $this->users = new \\\\Anax\\\\Users\\\\User();\\n $this->users->setDI($this->di);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f317f20565b21e5f37dff425b7fdb8a\",\n \"score\": \"0.53851575\",\n \"text\": \"public function __construct(User $user)\\n {\\n if($user) {\\n $this->user_id = $user->id;\\n\\n $this->data = [\\n 'balance' => $user->balance,\\n 'freezed_balance' => $user->freezed_balance\\n ];\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d8a40627f9ab38a72cff1998f5b7ace4\",\n \"score\": \"0.53781325\",\n \"text\": \"public function initialize()\\r\\n {\\r\\n $this->usersModel = new Userku();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0b0d6268b6d404d5bed931add455855\",\n \"score\": \"0.5359545\",\n \"text\": \"public function __construct()\\n {\\n $this->deposits = new ArrayCollection();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"379a917324e916aebf6a05bf54882a82\",\n \"score\": \"0.5359173\",\n \"text\": \"public function initialize()\\n {\\n $this->hasMany('id', 'Disque', 'idUtilisateur', array('alias' => 'Disque'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2586ec7e065b892203501b53f143fd2\",\n \"score\": \"0.535694\",\n \"text\": \"public function __construct()\\n {\\n $this->users = new \\\\Doctrine\\\\Common\\\\Collections\\\\ArrayCollection();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72383df6d7847506a0d6fc6598076667\",\n \"score\": \"0.5352948\",\n \"text\": \"public function initData()\\n {\\n Artisan::call('db:seed', [\\n '--class' => UserRoleSeeder::class,\\n '--force' => true\\n ]);\\n\\n $this->superAdmin = User::create([\\n 'name' => 'Super Admin',\\n 'email' => 'super-admin@testing.com',\\n 'password' => Hash::make('password'),\\n ]);\\n $this->superAdmin->assignRole('super-admin');\\n\\n $this->secondUser = User::create([\\n 'name' => 'User 2',\\n 'email' => 'user2@testing.com',\\n 'password' => Hash::make('password'),\\n ]);\\n $this->secondUser->assignRole('writer');\\n\\n $this->tag = Tag::create([\\n 'user_id' => $this->superAdmin->id,\\n 'name' => 'tag1',\\n ]);\\n\\n $this->category = Category::create([\\n 'user_id' => $this->superAdmin->id,\\n 'name' => 'cat1',\\n ]);\\n\\n $this->article = Article::create([\\n 'user_id' => $this->superAdmin->id,\\n 'title' => 'PHPUnit Testing',\\n 'excerpt' => 'Sample test text',\\n 'body' => 'Lorem Ipsum',\\n 'category_id' => $this->category->id,\\n 'thumbnail_image' => 'static/images/default_thumbpng.jpg'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"577a644984edfbbf6ffae9c25fbd9da0\",\n \"score\": \"0.5341588\",\n \"text\": \"function setUserData($user)\\n {\\n $term = Modules::run('main/getCurrentQuarter');\\n $settings = Modules::run('main/getSet');\\n $position_id = \\\"\\\";\\n $position = \\\"\\\";\\n $is_admin = FALSE;\\n $is_superAdmin = FALSE;\\n $is_adviser = FALSE;\\n $employee_id = '';\\n $rfid = '';\\n $advisory = 0;\\n $section_id = \\\"\\\";\\n $grade_id = \\\"\\\";\\n $siblings = \\\"\\\";\\n $is_parent = FALSE;\\n $parent_id = \\\"\\\";\\n $uType = Modules::run('users/getUserType', $user);\\n $uType_id = $uType->utype;\\n $parent = $uType->if_p;\\n \\n if($parent){\\n $is_parent = TRUE; \\n }\\n\\n if($is_parent){\\n $position = 'Parent';\\n $position_id = 4;\\n $parent = Modules::run('users/getParentData', $user);\\n if($parent->firstname!=\\\"\\\"):\\n $name = $parent->firstname;\\n else:\\n $name = $parent->m_name;\\n endif;\\n $siblings = $parent->child_links;\\n $parent_id = $parent->pid;\\n $user_id = $uType->u_id;\\n }else{\\n \\n if($uType_id!=4){ //if user type != to student\\n $getPosition = Modules::run('users/getPositionInfo', $user);\\n $position_id = $getPosition->p_id;\\n $position = $getPosition->post; \\n $basicInfo = Modules::run('users/getBasicInfo', $user);\\n $name = $basicInfo->firstname;\\n $user_id = $basicInfo->user_id;\\n $employee_id = $basicInfo->employee_id;\\n $rfid = $basicInfo->rfid;\\n $getAdvisory = Modules::run('academic/getAdvisory', $user, $settings->school_year);\\n if($getAdvisory->num_rows()>0):\\n $is_adviser = TRUE;\\n $advisory = $getAdvisory->row()->section_id;\\n endif;\\n \\n }else{\\n\\n }\\n $admin = Modules::run('hr/ifDepartmentHead', $user, $uType_id);\\n if($admin){\\n $is_admin = true;\\n }\\n \\n if($position_id>=38 || $position_id <= 44):\\n $is_admin = TRUE;\\n endif;\\n\\n if($uType_id==1){\\n $is_superAdmin = true;\\n $is_admin = true;\\n }\\n if($position=='Faculty'):\\n $is_admin = FALSE;\\n endif;\\n }\\n \\n if($settings->att_check==1){\\n $attend_auto = TRUE;\\n }else{\\n $attend_auto = FALSE;\\n }\\n \\n \\n $data = array(\\n 'is_logged_in' => TRUE,\\n 'username' => $user,\\n 'rfid' => $rfid,\\n 'user_id' => $user_id,\\n 'employee_id' => $employee_id,\\n 'usertype' => $uType_id,\\n 'position' => $position,\\n 'position_id' => $position_id,\\n 'is_superAdmin' => $is_superAdmin,\\n 'is_admin' => $is_admin,\\n 'dept_id' => $uType_id,\\n 'is_adviser' => $is_adviser,\\n 'advisory' => $advisory,\\n 'name' => $name,\\n 'siblings' => $siblings,\\n 'parent_id' => $parent_id,\\n 'term' => $term,\\n 'attend_auto' => $attend_auto,\\n 'school_year' => $settings->school_year,\\n 'session_id' => session_id()\\n\\n );\\n $this->session->set_userdata($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44ae23b755a990e7621560ea5cb42e63\",\n \"score\": \"0.5339794\",\n \"text\": \"function __construct($userID){\\n \\n $this->userID = $userID;\\n $this->items = array();\\n $this->subtotals = array();\\n $this->totalPrice = 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dcdbf1de13169116c1936dd6b25991c3\",\n \"score\": \"0.53251827\",\n \"text\": \"public function initialize()\\n {\\n $this->session();\\n\\n $this->questionToAnswer = new \\\\Anax\\\\QuestionToAnswer\\\\Question2Answer();\\n $this->questionToAnswer->setDI($this->di);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"816708a5b809700ac687add5ad4d5698\",\n \"score\": \"0.53251314\",\n \"text\": \"public function initialize()\\n {\\n $this->setSource('UserChallenges');\\n $this->belongsTo('ucChaId', '\\\\Paradoxis\\\\Models\\\\Challenges', 'chaId', array('alias' => 'Challenges'));\\n $this->belongsTo('ucUserId', '\\\\Paradoxis\\\\Models\\\\Users', 'userId', array('alias' => 'Users'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"985c4e2134012b44e88701fc4c720bd6\",\n \"score\": \"0.5320607\",\n \"text\": \"public function __construct()\\n {\\n $faker = Faker::create();\\n $collection = new Collection();\\n\\n // Create 10 dummy user objects\\n for ($i = 0; $i < 10; $i++) {\\n $user = new User([\\n 'name' => $faker->name,\\n 'email' => $faker->email\\n ]);\\n\\n $collection->add($user);\\n }\\n\\n $this->users = $collection;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95e9378f626c355146097995910ba2c0\",\n \"score\": \"0.53109884\",\n \"text\": \"public function initialize()\\n {\\n $this->setSource('tc_users');\\n $this->hasMany('id', 'Models\\\\Recipe', 'id_user', ['alias' => 'recipes']);\\n $this->hasOne('id', 'Models\\\\Recipe', 'id_user', [\\n 'alias' => 'draftRecipe',\\n 'params' => [\\n 'state = \\\"draft\\\"'\\n ]\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d36be790ae9b495d77689ced2b3cd1b\",\n \"score\": \"0.53046155\",\n \"text\": \"public function init()\\n {\\n $this->user = new Hb_User();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"688b5e896c8cd5f25b4ac12ad1dc278d\",\n \"score\": \"0.52949256\",\n \"text\": \"public function __construct(Devoir $devoir, User $user)\\n {\\n $this->devoir = $devoir;\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c4e66ee62ede6b34bdb81a04b715134\",\n \"score\": \"0.5290956\",\n \"text\": \"public function initialize() {\\n\\t\\t$this->belongsTo( 'questions_id', 'Questions', 'id', array( 'alias' => 'Questions' ) );\\n\\t\\t$this->belongsTo( 'users_id', 'Users', 'id', array( 'alias' => 'Users' ) );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7030ae1bd9056e00394e55d2564ae4e\",\n \"score\": \"0.52621484\",\n \"text\": \"public function __construct($user = null) {\\n // If a user identifier was passed, try and load said user\\n if ($user) {\\n if (is_int($user)) {\\n $this->loadById($user);\\n }\\n \\n if (is_string($user)) {\\n $this->loadByUsername($user);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dba8511299afae68a2d2d830edf2749d\",\n \"score\": \"0.525044\",\n \"text\": \"public function initialize()\\n {\\n $this->belongsTo('question5', 'QUIZUP\\\\Models\\\\Question', 'qid', array('alias' => 'Question5'));\\n $this->belongsTo('question4', 'QUIZUP\\\\Models\\\\Question', 'qid', array('alias' => 'Question4'));\\n $this->belongsTo('user1_id', 'QUIZUP\\\\Models\\\\User', 'user_id', array('alias' => 'User1'));\\n $this->belongsTo('user2_id', 'QUIZUP\\\\Models\\\\User', 'user_id', array('alias' => 'User2'));\\n $this->belongsTo('cid', 'QUIZUP\\\\Models\\\\QuestionCategory', 'cid', array('alias' => 'QuestionCategory'));\\n $this->belongsTo('question1', 'QUIZUP\\\\Models\\\\Question', 'qid', array('alias' => 'Question1'));\\n $this->belongsTo('question2', 'QUIZUP\\\\Models\\\\Question', 'qid', array('alias' => 'Question2'));\\n $this->belongsTo('question3', 'QUIZUP\\\\Models\\\\Question', 'qid', array('alias' => 'Question3'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d58dae6449d57512f9322e57cb008fac\",\n \"score\": \"0.52418643\",\n \"text\": \"public function init()\\n {\\n $this->_user = new Disciples_User();\\n $this->_userData = $this->_loadUserData();\\n $this->view->userData = $this->_userData;\\n $this->_currentInfo = $this->_helper->utils->getCurrentSemester();\\n $this->_helper->layout->setLayout('index');\\n\\n $this->_session = new Zend_Session_Namespace('DISCIPLES');\\n\\n if ($this->_session->device->isMobile) {\\n $this->_helper->redirector->gotoUrl('/mobile');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1e064a2b7b0bb4abf74745dab4d7c7a\",\n \"score\": \"0.5240803\",\n \"text\": \"public function __construct()\\n {\\n $this->users = new ArrayCollection;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27cef913a03e4124038b8ac484286992\",\n \"score\": \"0.5236871\",\n \"text\": \"public function __construct(User $user, CreateMenuRequest $request) {\\n\\t\\t$this->auth = $user;\\n\\t\\t$this->request = $request;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53059add85f4525cbfa94991baad774b\",\n \"score\": \"0.5236868\",\n \"text\": \"public function setUp()\\n {\\n $this->question = new Question(self::$di->get(\\\"db\\\"));\\n $this->user = new User(self::$di->get(\\\"db\\\"));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fbfdd77b29419e5b2f099fbf15a4efa\",\n \"score\": \"0.5236046\",\n \"text\": \"public function __construct ($user) {\\n\\t\\t\\n\\t\\t\\tif (!is_null($user)) {\\n\\t\\t\\t\\n\\t\\t\\t\\tif ($user instanceof MySQLRow) {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$this->user=array();\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tforeach ($user as $key=>$value) $this->user[$key]=$value->GetValue();\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$this->user=$user;\\n\\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$this->organization=null;\\n\\t\\t\\t$this->session_key=null;\\n\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7bea708f7a60b26116715ba2271e602\",\n \"score\": \"0.52345055\",\n \"text\": \"public function __construct()\\n {\\n $this->users = new ArrayCollection();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c16010c07ffcb76ca43a9629524ebbfd\",\n \"score\": \"0.5230925\",\n \"text\": \"public function init() {\\r\\n $this -> user = User::byId(session('id'));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"943dc64665f2014a5d28671d16b6c983\",\n \"score\": \"0.52287215\",\n \"text\": \"public function __construct()\\n {\\n $this->setViewsNumber(0);\\n $this->viewsUsers = array();\\n $this->comments = new ArrayCollection();\\n $this->tags = new ArrayCollection();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8e68babbefdff202978b184d78233ed\",\n \"score\": \"0.5208521\",\n \"text\": \"public function __construct($user = null){\\n\\t\\t\\t$this->_db = DB::getInstance();\\n\\n\\t\\t\\t//get session form init class\\n\\t\\t\\t\\n\\t\\t\\t$this->_session_name_1 = Config::get('session/session_name_1');\\n\\t\\t\\t\\n\\t\\t\\t\\n\\n\\t\\t\\t//for student\\n\\t\\t\\tif(!$user){\\n\\t\\t\\t\\tif(Session::exists($this->_session_name_1)){\\n\\t\\t\\t\\t\\t$user = Session::get($this->_session_name_1);\\n\\n\\t\\t\\t\\t\\tif($this->find($user)){\\n\\t\\t\\t\\t\\t\\t$this->_isLoggedIn = true;\\n\\t\\t\\t\\t\\t}else {\\n\\t\\t\\t\\t\\t\\t//process logout\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\t\\n\\t\\t\\t}else {\\n\\t\\t\\t\\t$this->find($user);\\n\\t\\t\\t}\\n\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d71e58fdd1e3a40dc1be596e26552d4\",\n \"score\": \"0.5204242\",\n \"text\": \"private function __construct()\\n {\\n $this->user_id = REQUEST::readIn(\\\"uid\\\");\\n $this->user_id = 199; //tmp override\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d626186dcf26ae56b965935e629d7efe\",\n \"score\": \"0.5196709\",\n \"text\": \"function initUser( &$user ) {\\n\\t\\t# I don't think I need this, do I?\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"304052bd78fb8f307e67e0c4a2fb9720\",\n \"score\": \"0.5196328\",\n \"text\": \"public function __construct($user_id)\\n {\\n $this->user_id = $user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e780145475c9691ec8ed4b2b786d5ca3\",\n \"score\": \"0.5195982\",\n \"text\": \"public function __construct(DataUser $dataUser)\\n {\\n $this->dataUser = $dataUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a48acad84f9d1cb077c8b3fa2771638\",\n \"score\": \"0.5195722\",\n \"text\": \"public function __construct($user){\\r\\n\\t\\t$this->user_id = $user->user_id;\\r\\n\\t\\t$this->username = $user->username;\\r\\n\\t\\t$this->email = $user->email;\\r\\n\\t\\t$this->password = $user->password;\\t\\r\\n\\t\\t$this->user_identifier = $user->identifier;\\r\\n\\t\\t$this->login_token = $user->token;\\r\\n\\t\\t$this->login_timeout = $user->timeout;\\t\\r\\n\\t\\t$this->load_data();\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37bebd1fc088f534d674e1d0348f6406\",\n \"score\": \"0.51814\",\n \"text\": \"public function __construct($user)\\n\\t{\\n\\t\\t$this->user = $user;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0cbc2f634eeb0399f4de9c2936406a6\",\n \"score\": \"0.5175949\",\n \"text\": \"public function initialize()\\n {\\n $this->setSchema(\\\"gayathrib\\\");\\n $this->setSource(\\\"usercard\\\");\\n $this->belongsTo('userid', 'models\\\\User', 'userid', ['alias' => 'User']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6c85201599b4927d678d741c89365b2\",\n \"score\": \"0.5171724\",\n \"text\": \"public function __construct($user) {\\n\\t\\t$this->user = ModelRegistry::loadModel('User', $user);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8d75742caa663ad652ed9250fa64b72\",\n \"score\": \"0.51582336\",\n \"text\": \"public function initQuiz($userId) {\\n\\t\\t// a user is about to start the quiz\\n\\t\\t// generate a list of questions, insert into quiz_answersubmissions, with answersubmittime = NULL\\n\\t\\tif ($this->checkQuizInitialized($userId))\\n\\t\\t\\treturn true;\\n\\n\\t\\t$this->deleteEntries($userId);\\n\\t\\t$sectionList = getSectionList($this->quizId);\\n\\t\\t$questionList = array();\\n\\t\\t$sections = array();\\n\\t\\tfor ($i = 0; $i < count($sectionList); ++$i) {\\n\\t\\t\\t$questionList[$i] = $this->getSectionQuestions($sectionList[$i]);\\n\\t\\t\\tfor ($j = 0; $j < count($questionList[$i]); ++$j)\\n\\t\\t\\t\\t$sections[] = $i;\\n\\t\\t}\\n\\n\\t\\tif ($this->quizRow['quiz_allowsectionrandomaccess'] == 0 && $this->quizRow['quiz_mixsections']) \\n\\t\\t\\tshuffle($sections);\\n\\n\\t\\t$offsets = array_fill(0, count($questionList), 0);\\n\\t\\tfor ($i = 0; $i < count($sections); ++$i) {\\n\\t\\t\\t$insertQuery = \\\"INSERT INTO `quiz_answersubmissions`(`page_modulecomponentid`, `quiz_sectionid`, `quiz_questionid`, `user_id`, `quiz_questionrank`) VALUES\\\" .\\n\\t\\t\\t\\t\\t\\\"({$this->quizId}, {$sectionList[$sections[$i]]['quiz_sectionid']}, {$questionList[$sections[$i]][$offsets[$sections[$i]]]}, $userId, $i)\\\";\\n\\t\\t\\tif (!mysql_query($insertQuery)) {\\n\\t\\t\\t\\tdisplayerror('Database Error. Could not initialize quiz.');\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t\\t$offsets[$sections[$i]]++;\\n\\t\\t}\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a99cc02b5ae94329fb0a1e8b7e5db933\",\n \"score\": \"0.5155045\",\n \"text\": \"function __construct( $userCalories, $userSugar, $userSodium, $userProtein, $userCalcium ) {\\n $this->userCalories = $userCalories;\\n $this->userSugar = $userSugar;\\n $this->userSodium = $userSodium;\\n $this->userProtein = $userProtein;\\n $this->userCalcium = $userCalcium;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b57839a96fcddbf6d2e07debaf722c2f\",\n \"score\": \"0.51531094\",\n \"text\": \"public function __construct($user) {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f95b20858b25ffe11020fe7c4366ff6\",\n \"score\": \"0.51522064\",\n \"text\": \"function distributeInitialCards($userId) {\\n\\t$gameId = getGameOf($userId);\\n\\t$options = getUnusedCards($gameId);\\n\\t$hand = array();\\n\\n\\tfor ($i = 0; $i < 7; $i++) {\\n\\t\\t$chosen = array_rand($options); // index, not the card\\n\\n\\t\\t$sql = \\\"insert into decks (user_id, card_name) values ($userId, '$options[$chosen]')\\\";\\n\\t\\tSQLInsert($sql);\\n\\t\\tarray_push($hand, $options[$chosen]);\\n\\n\\t\\tarray_splice($options, $chosen, 1); // avoids calling getUnusedCards again\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"576181e86ddaaad203e19495058d029f\",\n \"score\": \"0.51454556\",\n \"text\": \"public function initialize()\\n {\\n $this->setSchema(\\\"phalcon\\\");\\n $this->setSource(\\\"user\\\");\\n $this->hasMany('id', Book::class, 'uid', [\\n 'alias' => 'book',\\n ]);\\n $this->hasOne('role_id', Role::class, 'id', [\\n 'alias' => 'role',\\n ]);\\n $this->hasManyToMany(\\n 'id',\\n UserTitle::class,\\n 'uid',\\n 'title_id',\\n Title::class,\\n 'id',\\n [\\n 'alias' => 'title',\\n 'reusable' => true,\\n ]\\n );\\n parent::initialize();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c50b1718e5e4e499019578d2e9e3239\",\n \"score\": \"0.5144251\",\n \"text\": \"public function init(){\\n \\n if(isset($_REQUEST['task'])){\\n self::$task=filter_var($_REQUEST['task'],FILTER_SANITIZE_STRIPPED);\\n }else{\\n \\n \\n self::$task=self::$defaultTask;\\n }\\n \\n $user=new User(); \\n if(isset($_SESSION['uid'])){\\n if($_SESSION['uid']!=\\\"\\\"){\\n $user->loadDBData($_SESSION['uid']);\\n \\n }\\n }\\n Core::$user=$user; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1960c60c5a73c324d32c12b6bb089028\",\n \"score\": \"0.51438284\",\n \"text\": \"public function init(){\\n\\t\\t$this->createFieldSet();\\n\\t\\t$this->getWinner();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9a2099b8f706e0b52941117d8e3e75b\",\n \"score\": \"0.51328176\",\n \"text\": \"public function __construct() {\\n // initialize data\\n $this->data = array ( 'sites' => array(),\\n // 'users' => array() // future expansion: group by users\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29d44b2dba6adde7797d2a349f9abfe2\",\n \"score\": \"0.5132483\",\n \"text\": \"public function __construct()\\n {\\n $this->categories = new ArrayCollection();\\n $this->participants = new ArrayCollection();\\n $this->media = new ArrayCollection();\\n $this->published = true;\\n $this->translations = new ArrayCollection();\\n $this->relativeProjects = new ArrayCollection();\\n $this->usersWithPositions = new ArrayCollection();\\n $this->projectReviews = new ArrayCollection();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30ba4c19388fb6f9efd7a112b10a4fdf\",\n \"score\": \"0.51321477\",\n \"text\": \"protected function beforeEach(): void\\n {\\n// Artisan::call()\\n $this->user = Auth::loginUsingId(10);\\n $this->postCategory = new PostCategory();\\n $this->postCategory->scaffold();\\n\\n $this->post = new Post();\\n $this->post->scaffold();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7245ded3a0de6ddbc61834fc535f5f5\",\n \"score\": \"0.5126918\",\n \"text\": \"public function __construct($user = null) {\\n $this->db_conn = SqlManager::getInstance();\\n $this->sessionName = $GLOBALS['config']['session']['session_name'];\\n if (!$user) {\\n if (Session::exists($this->sessionName)) {\\n $user = Session::get($this->sessionName);\\n if ($this->find($user)) {\\n $this->isLoggedIn = true;\\n }\\n }\\n } else {\\n $this->find($user);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1fd419fc4652e8e91536129a8501caf6\",\n \"score\": \"0.5125794\",\n \"text\": \"public function init()\\n {\\n\\t\\t$this -> userModel = Application_Model_User::getInstance(); \\n\\t\\t$this -> studyModel = Application_Model_Study::getInstance(); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1c44f388265bd1c9e453e2b4699ec7c\",\n \"score\": \"0.5113661\",\n \"text\": \"protected function setUp()\\n {\\n parent::setUp();\\n $this->_questionsBlock = new Oggetto_Faq_Block_Questions;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9b362b3fae711bbca893f4f49a7e437\",\n \"score\": \"0.51106834\",\n \"text\": \"function __construct($user) {\\n // Captcha and Honeypot must be disabled for form submission\\n //module_disable(array('captcha', 'recaptcha', 'honeypot', 'mollom'), TRUE);\\n //cache_clear_all();\\n parent::__construct('user_pass');\\n\\n // $this->userObject = $user;\\n // $this->setEntityObject($userObject);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f42d418376c61ee479de06fee2f5c9c7\",\n \"score\": \"0.5107444\",\n \"text\": \"public function init(){\\n\\t\\t\\tparent::init();\\n\\t\\t\\t\\n\\t\\t\\t//$userMapper = new Application_Model_Mapper_Users_UsersMapper();\\n\\t\\t\\t$this->user = new Application_Model_Users_User();\\n\\t\\t\\t$this->user->userID = 1;\\n\\t\\t\\t\\n\\t\\t\\t//$this->user = $userMapper->findByUniqueID('MqIquFxXrS');\\n\\t\\t\\t//$this->user->\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce25f0f69c6dfaa91633a40ea426f947\",\n \"score\": \"0.5103807\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06fc15db0194e7f2b4ba05992f7d329b\",\n \"score\": \"0.51030546\",\n \"text\": \"protected function setUp() {\\n $this->object = new AuxUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d84b0389d4cc7944b8dbfca420b75dd\",\n \"score\": \"0.51002944\",\n \"text\": \"public function __construct($user) \\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37e75034b3d75686e3ea84c278a78b45\",\n \"score\": \"0.50947905\",\n \"text\": \"public function __construct() { \\n $this->deck = [];\\n $cardsIndex = 1;\\n foreach (card::$suits as $suit=>$suitName) {\\n foreach(card::$values as $value=>$valueName) {\\n $this->deck[$cardsIndex] = new Card( $suit, $value, \\\"ND\\\");\\n $cardsIndex++;\\n }\\n }\\n $this->cardsUsed = 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee476120fdf849b4fc1aa0e58c0cfa21\",\n \"score\": \"0.50919676\",\n \"text\": \"public function initialize()\\n\\t{\\n\\t\\t$this->belongsTo('post_id', 'Post', 'id');\\n\\n\\t\\t// Used to select a user using a given user id\\n\\t\\t//$this->belongsTo('user_id', 'User', 'id');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d7c0707f6b61ec2d621f54a80141cbf\",\n \"score\": \"0.50918317\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef0a4ef1b58dbb2d59bc09f32e578690\",\n \"score\": \"0.508379\",\n \"text\": \"public function __construct(User $user, Answer $answer, MedicalExpert $expert)\\n {\\n $this->user = $user;\\n $this->answer = $answer;\\n $this->expert = $expert;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c289baf235114d3f5994a42e7eafe1a0\",\n \"score\": \"0.5078189\",\n \"text\": \"public function __construct($userId)\\n\\t{\\n\\t\\t$this->userId = $userId;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8cb5a93104c8e6acbb4cd968d5e5712d\",\n \"score\": \"0.507758\",\n \"text\": \"public function __construct()\\n {\\n $this->makeDeck(self::$playerDeckConfig);\\n $this->nrOfCards = count($this->arrDeck);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b82eb2370ed81e8ec4bc9dd530794751\",\n \"score\": \"0.5077146\",\n \"text\": \"public function __construct(User $user)\\n {\\n //$this->middleware('guest')->except('logout');\\n\\t\\t//$this->users = $users;\\n \\t//parent::__construct();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbedb6dad7e16c4eec20c49069655714\",\n \"score\": \"0.50745285\",\n \"text\": \"public function initUsers()\\n {\\n $this->collUsers = new PropelObjectCollection();\\n $this->collUsers->setModel('User');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a690fd56e512b1b4d88b6e1648a8d427\",\n \"score\": \"0.50713104\",\n \"text\": \"public function __construct($user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"241d31b49af359ec40f8a41c4fdf02dc\",\n \"score\": \"0.50689363\",\n \"text\": \"public function __construct($identifier = 0)\\r\\n\\t{\\r\\n\\t\\t// Create the user parameters object\\r\\n\\t\\t$this->_params = new JRegistry;\\r\\n\\r\\n\\r\\n\\t\\t$user = JFactory::getUser($identifier);\\r\\n\\t\\t$vars = get_object_vars ($user);\\r\\n\\t\\t\\r\\n\\t\\tforeach($vars as $name=>$value){\\r\\n\\t\\t\\t$this->set($name, $value);\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t\\r\\n\\r\\n\\t\\t// Load the user if it exists\\r\\n\\t\\tif (!$user->guest)\\r\\n\\t\\t{\\r\\n\\t\\t\\t$this->load($identifier);\\r\\n\\t\\t}else{\\r\\n\\t\\t\\t//default data\\r\\n\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00e4737fce050f44f28ec599dbccabdc\",\n \"score\": \"0.5065702\",\n \"text\": \"function __construct($userId) {\\n\\t\\t$this->userId = $userId;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"974858c5beecdff7bcee57a61f971f0e\",\n \"score\": \"0.5055158\",\n \"text\": \"public function setUp() {\\n\\t\\t$this->data['standard'] = array(\\n\\t\\t\\t'firstname' => 'Jim',\\n\\t\\t\\t'lastname' => 'Morrison',\\n\\t\\t\\t'empty' => '',\\n\\t\\t\\t'integer' => '9',\\n\\t\\t\\t'float' => '1.11',\\n\\t\\t\\t'categories' => array('Poet','Composer'),\\n\\t\\t\\t'band' => array(\\n\\t\\t\\t\\t'name' => 'The doors'\\n\\t\\t\\t),\\n\\t\\t\\t'friends' => array(\\n\\t\\t\\t\\tarray('firstname' => 'Ray' , 'lastname' => 'Manzarek'),\\n\\t\\t\\t\\tarray('firstname' => 'Robbie' , 'lastname' => 'Krieger'),\\n\\t\\t\\t\\tarray('firstname' => 'John' , 'lastname' => 'Densmore')\\n\\t\\t\\t),\\n\\t\\t\\t'sub' => array(\\n\\t\\t\\t\\tarray('integer' => '9', 'string' => 9)\\n\\t\\t\\t)\\n\\t\\t) ;\\n\\n\\t\\t$this->data['source'] = array(\\n\\t\\t\\t'_index' => 'music',\\n\\t\\t\\t'_type' => 'artists',\\n\\t\\t\\t'_source' => array(\\n\\t\\t\\t\\t'firstname' => 'Jim',\\n\\t\\t\\t\\t'lastName' => 'Morrisson'\\n\\t\\t\\t)\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"744a528f926c72c12b76f5e44ba3aec4\",\n \"score\": \"0.5049491\",\n \"text\": \"protected function init()\\n {\\n $redisDataProvider = new RedisDataProvider($this);\\n foreach ($this->initKeys as $key=>$type) {\\n $keyValMapper = new RedisSetMapper($this->userPwd . $this->keySeparator . $key, $this->key);\\n $redisDataProvider->set($keyValMapper);\\n }\\n $keyValMapper = new RedisSetMapper($this->userPwd.'_'.'init', 1);\\n $redisDataProvider->set($keyValMapper);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"748505bb8e52bfbca846f7ea741db854\",\n \"score\": \"0.5041792\",\n \"text\": \"public function __construct() {\\n $this->_mongo = DBConnection::instantiate();\\n $this->_collection = $this->_mongo->getCollection(User::COLLECTION);\\n \\n if ( $this->isLoggedIn() ) $this->_loadData();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b6bd5502a67fece0d97d8ee3da596bd\",\n \"score\": \"0.50407785\",\n \"text\": \"public function setup(): void\\n {\\n\\n parent::setUp();\\n $this->user = factory(User::class)->create();\\n $this->course = factory(Course::class)->create(['user_id' => $this->user->id]);\\n $this->student_user = factory(User::class)->create();\\n $this->student_user->role = 3;\\n\\n $this->student_user_2 = factory(User::class)->create();\\n $this->student_user_2->role = 3;\\n $this->student_user_ids = [$this->student_user->id, $this->student_user_2->id];\\n $this->section = factory(Section::class)->create(['course_id' => $this->course->id]);\\n\\n $this->assignment = factory(Assignment::class)->create(['course_id' => $this->course->id]);\\n $this->assignUserToAssignment($this->assignment->id, 'course', $this->course->id);\\n\\n\\n $this->assignment_3 = factory(Assignment::class)->create(['course_id' => $this->course->id, 'order' => 2]);\\n $this->question = factory(Question::class)->create(['page_id' => 1]);\\n $this->original_assignment_question_id = DB::table('assignment_question')->insertGetId([\\n 'assignment_id' => $this->assignment->id,\\n 'question_id' => $this->question->id,\\n 'points' => 10,\\n 'order' => 1,\\n 'open_ended_submission_type' => 'file'\\n ]);\\n\\n\\n $this->learning_tree = factory(LearningTree::class)->create(['user_id' => $this->user->id]);\\n $this->original_assignment_question_learning_tree_id = DB::table('assignment_question_learning_tree')->insertGetId([\\n 'assignment_question_id' => $this->original_assignment_question_id,\\n 'learning_tree_id' => $this->learning_tree->id\\n ]);\\n\\n $this->course_3 = factory(Course::class)->create(['user_id' => $this->user->id]);\\n\\n\\n $this->user_2 = factory(User::class)->create();\\n $this->course_2 = factory(Course::class)->create(['user_id' => $this->user_2->id]);\\n $this->assignment_2 = factory(Assignment::class)->create(['course_id' => $this->course_2->id]);\\n\\n $this->grader_user = factory(User::class)->create();\\n $this->grader_user->role = 4;\\n Grader::create(['user_id' => $this->grader_user->id, 'section_id' => $this->section->id]);\\n $finalGrade = new FinalGrade();\\n\\n FinalGrade::create(['course_id' => $this->course->id,\\n 'letter_grades' => $finalGrade->defaultLetterGrades()]);\\n\\n\\n $this->assign_tos = [\\n [\\n 'groups' => [['value' => ['course_id' => $this->course->id], 'text' => 'Everybody']],\\n 'available_from' => '2020-06-10 09:00:00',\\n 'available_from_date' => '2020-06-10',\\n 'available_from_time' => '09:00:00',\\n 'due' => '2020-06-12 09:00:00',\\n 'due_date' => '2020-06-12',\\n 'due_time' => '09:00:00',\\n 'final_submission_deadline' => '2021-06-12 09:00:00',\\n 'final_submission_deadline_date' => '2021-06-12',\\n 'final_submission_deadline_time' => '09:00:00'\\n ]\\n ];\\n $this->assignment_info = ['course_id' => $this->course->id,\\n 'name' => 'First Assignment',\\n 'assign_tos' => $this->assign_tos,\\n 'scoring_type' => 'p',\\n 'source' => 'a',\\n 'default_points_per_question' => 2,\\n 'students_can_view_assignment_statistics' => 0,\\n 'include_in_weighted_average' => 1,\\n 'late_policy' => 'not accepted',\\n 'assessment_type' => 'delayed',\\n 'default_open_ended_submission_type' => 'file',\\n 'instructions' => 'Some instructions',\\n \\\"number_of_randomized_assessments\\\" => null,\\n 'notifications' => 1,\\n 'assignment_group_id' => 1,\\n 'file_upload_mode' => 'both'];\\n\\n foreach ($this->assign_tos[0]['groups'] as $key => $group) {\\n $group_info = [\\\"groups_$key\\\" => ['Everybody'],\\n \\\"due_$key\\\" => '2020-06-12 09:00:00',\\n \\\"due_date_$key\\\" => '2020-06-12',\\n \\\"due_time_$key\\\" => '09:00:00',\\n \\\"available_from_$key\\\" => '2020-06-10',\\n \\\"available_from_date_$key\\\" => '2020-06-12',\\n \\\"available_from_time_$key\\\" => '09:00:00',\\n \\\"final_submission_deadline_date_$key\\\" => '2021-06-12',\\n \\\"final_submission_deadline_time_$key\\\" => '09:00:00'];\\n foreach ($group_info as $info_key => $info_value) {\\n $this->assignment_info[$info_key] = $info_value;\\n }\\n }\\n\\n $this->student_user = factory(User::class)->create();\\n $this->student_user->role = 3;\\n Enrollment::create(['course_id' => $this->course->id,\\n 'section_id' => $this->section->id,\\n 'user_id' => $this->student_user->id]);\\n\\n $this->student_user_2 = factory(User::class)->create();\\n $this->student_user_2->role = 3;\\n $this->section_1 = $this->section = factory(Section::class)->create(['course_id' => $this->course->id]);\\n Enrollment::create(['course_id' => $this->course->id,\\n 'section_id' => $this->section_1->id,\\n 'user_id' => $this->student_user_2->id]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb2b8d7bf51d4b098e3ff70f2ee081b3\",\n \"score\": \"0.50379795\",\n \"text\": \"public function __construct()\\n\\t{\\n\\t\\tadd_filter('acf/load_field/name=data_curator', function($field) {\\t\\n\\t\\t\\n\\t\\t\\t$field['choices'] = array();\\n\\t\\t\\t\\n\\t\\t\\t$users = get_users();\\n\\t\\t\\t\\n\\t\\t\\tforeach ($users as $user) {\\n\\t\\t\\t\\t$field['choices'][ $user->ID ] = $user->user_firstname . ' ' . $user->user_lastname;\\n\\t\\t\\t}\\n\\t\\t\\n\\t\\t\\treturn $field;\\n\\t\\t});\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b79a3b7a91ccb428a9b02665d25a22cf\",\n \"score\": \"0.50365657\",\n \"text\": \"public function initialize()\\n\\t{\\n\\t\\t$this->setSource('Referrals');\\n\\t\\t$this->hasOne('user_ik', 'User', 'ik');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8e0630cbd6107a062f95d74fd0388cf\",\n \"score\": \"0.50351727\",\n \"text\": \"public function initialize()\\n {\\n $this->setSchema(\\\"EgFtyzVzTW\\\");\\n $this->setSource(\\\"users\\\");\\n $this->hasMany('id', 'Houses', 'userID', ['alias' => 'Houses']);\\n $this->belongsTo('roleID', '\\\\UserRole', 'id', ['alias' => 'Userrole']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41adc2672123fee3b72732aa8f03739f\",\n \"score\": \"0.5029247\",\n \"text\": \"public function setUp()\\n {\\n $this->user = new \\\\App\\\\Field;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c91fff2a7f8e29ec5f80e333646cea7b\",\n \"score\": \"0.50262403\",\n \"text\": \"public function __construct()\\n {\\n $this->created = new \\\\DateTime(\\\"now\\\");\\n $this->userservices = new \\\\Doctrine\\\\Common\\\\Collections\\\\ArrayCollection();\\n $this->usercomments = new \\\\Doctrine\\\\Common\\\\Collections\\\\ArrayCollection();\\n $this->services = new \\\\Doctrine\\\\Common\\\\Collections\\\\ArrayCollection();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0927d3dfabca05259af7ed9a4b833340\",\n \"score\": \"0.50198966\",\n \"text\": \"protected function set_up()\\n {\\n $ids = [1, 2, 3, 5, 7, 11, 13];\\n $names = ['foo', 'bar', 'baz', 'dib', 'zim', 'gir', 'irk'];\\n $data = [];\\n foreach ($names as $key => $name) {\\n $data[] = (object) [\\n 'id' => $ids[$key],\\n 'name' => $name\\n ];\\n }\\n\\n $this->data = $data;\\n $this->collection = new GenericCollection($data);\\n $this->empty_collection = new GenericCollection([]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"456e56afff049ebd1ea5de76454692a4\",\n \"score\": \"0.50151\",\n \"text\": \"public function setUp()\\n\\t{\\n\\t\\tparent::setUp();\\n\\t\\t$this->dataSetStackBuffer = array('users'=>1);\\n\\t\\t$this->loadDataSets();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f1409d60bb85b73017ed76e29f95199\",\n \"score\": \"0.50141305\",\n \"text\": \"public function __construct( $user)\\n {\\n $this->user = $user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8973f73bcd6d554d7d8cb55a857d204b\",\n \"score\": \"0.5013529\",\n \"text\": \"public final function init()\\n {\\n $this->data['permissions'] = $this\\n ->user\\n ->getUserGroup()\\n ->getPermissions();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"006198a8990d9a2c0920d394494a2a96\",\n \"score\": \"0.5005316\",\n \"text\": \"public function __construct(User $user)\\n {\\n $this->user = $user;\\n\\n $this->onQueue('import-queue');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6373b64ca52cc2831142f8d0730906ad\",\n \"score\": \"0.50020957\",\n \"text\": \"public function __construct($user = null){\\n\\n\\t\\t$this->_instance = DB::getInstance();\\n\\t\\t$this->_exists = false;\\n\\n\\t\\tif (($user === null) && isset($_SESSION[Config::get('session/session_name')])) {\\n\\t\\t\\t$user = $_SESSION[Config::get('session/session_name')];\\n\\t\\t}\\n\\t\\ttrim($user);\\n\\t\\t$this->getUser($user);\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"552bcc8a4454a39e7bf7c88faf08711d\",\n \"score\": \"0.49993646\",\n \"text\": \"public function initialiser() {\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb34a90c53a7db0d9bb690854d07e2fd\",\n \"score\": \"0.4996483\",\n \"text\": \"public function initialize()\\n {\\n $this->belongsTo('usersId', 'Modules\\\\Models\\\\Users', 'id', array(\\n 'alias' => 'user'\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa7bd2717f9cd6b0e1b61df96f55e009\",\n \"score\": \"0.49959868\",\n \"text\": \"public function initUsers()\\n\\t{\\n\\t\\t$this->collUsers = array();\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":730,"cells":{"query_id":{"kind":"string","value":"586f613fd4f96dca4991ccc8bec5def6"},"query":{"kind":"string","value":"Test case for languageProfilesUpsert Language Profiles: Upsert."},"positive_passages":{"kind":"list like","value":[{"docid":"904b8ef256c6838d20883d75ebd1e840","score":"0.8302745","text":"public function testLanguageProfilesUpsert()\n {\n }","title":""}],"string":"[\n {\n \"docid\": \"904b8ef256c6838d20883d75ebd1e840\",\n \"score\": \"0.8302745\",\n \"text\": \"public function testLanguageProfilesUpsert()\\n {\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"26eaf97c06b1d0a1a5b618bd6349c841","score":"0.6128322","text":"public function testPredefinedProfilesUpdatePredefinedProfile()\n {\n }","title":""},{"docid":"91d63cada85506c340b3fcd02ad87057","score":"0.5678561","text":"public function testPredefinedProfilesWritePredefinedProfile()\n {\n }","title":""},{"docid":"b9d4ba3fcfca9424531d2cd7046cd2ce","score":"0.54589295","text":"public function testReviewUpsert()\n {\n\n }","title":""},{"docid":"54ba9f811dbfaf0e93b7283ec45fd572","score":"0.5453141","text":"public function testLanguageProfilesDelete()\n {\n }","title":""},{"docid":"27d6e5e5daffbda86459b473a7e2faab","score":"0.5409647","text":"public function testGetLanguageProfilesList()\n {\n }","title":""},{"docid":"789faa9c5c0c681d4bfe306cbbc0615e","score":"0.5402988","text":"public function test_version1importsetsuserprofilefieldsonupdate() {\n global $CFG, $DB;\n\n // Perform default \"user create\" import.\n $this->run_core_user_import(array());\n\n // Create custom field category.\n $category = new stdClass;\n $category->sortorder = $DB->count_records('user_info_category') + 1;\n $category->id = $DB->insert_record('user_info_category', $category);\n\n // Create custom profile fields.\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id, 2000, 3000);\n $this->create_profile_field('rliplegacydatetime', 'datetime', $category->id, 2000, 3000);\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \"rlipoption1\\nrlipoption2\");\n $this->create_profile_field('rliptextarea', 'textarea', $category->id);\n $this->create_profile_field('rliptext', 'text', $category->id);\n\n // Run import.\n $data = array();\n $data['action'] = 'update';\n $data['username'] = 'rlipusername';\n $data['profile_field_rlipcheckbox'] = '1';\n $data['profile_field_rlipdatetime'] = 'jan/12/2011';\n $data['profile_field_rliplegacydatetime'] = '1/12/2011';\n $data['profile_field_rlipmenu'] = 'rlipoption1';\n $data['profile_field_rliptextarea'] = 'rliptextarea';\n $data['profile_field_rliptext'] = 'rliptext';\n\n $this->run_core_user_import($data, false);\n\n // Fetch the user and their profile field data.\n $user = $DB->get_record('user', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n\n // Validate data.\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), true);\n $this->assertEquals($user->profile_field_rlipcheckbox, 1);\n $this->assertEquals(isset($user->profile_field_rlipdatetime), true);\n $this->assertEquals($user->profile_field_rlipdatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\n $this->assertEquals(isset($user->profile_field_rliplegacydatetime), true);\n $this->assertEquals($user->profile_field_rliplegacydatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\n $this->assertEquals(isset($user->profile_field_rlipmenu), true);\n $this->assertEquals($user->profile_field_rlipmenu, 'rlipoption1');\n $this->assertEquals(isset($user->profile_field_rliptextarea['text']), true);\n $this->assertEquals($user->profile_field_rliptextarea['text'], 'rliptextarea');\n $this->assertEquals(isset($user->profile_field_rliptext), true);\n $this->assertEquals($user->profile_field_rliptext, 'rliptext');\n }","title":""},{"docid":"c74455067248c277b7ec84854ecb260c","score":"0.53937846","text":"public function testPredefinedProfilesGetNew()\n {\n }","title":""},{"docid":"c9c72b3005afa438f642d39c0ed0588d","score":"0.52417797","text":"public function test_version1importvalidatesprofilefieldsonupdate() {\n global $CFG, $DB;\n\n // Run the \"create user\" import.\n $this->run_core_user_import(array());\n\n $userid = $DB->get_field('user', 'id', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\n\n // Create the category.\n $category = new stdClass;\n $category->sortorder = $DB->count_records('user_info_category') + 1;\n $category->id = $DB->insert_record('user_info_category', $category);\n\n // Try to insert bogus checkbox data.\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'profile_field_rlipcheckbox' => '2'\n );\n $this->run_core_user_import($params);\n $user = new stdClass;\n $user->id = $userid;\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\n\n // Try to insert bogus datetime data.\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id);\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'profile_field_rlipdatetime' => '1000000000'\n );\n $this->run_core_user_import($params);\n $user = new stdClass;\n $user->id = $userid;\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\n\n // Try to insert bogus menu data.\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \"rlipoption1\\nrlipoption1B\");\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'profile_field_rlipmenu' => 'rlipoption2'\n );\n $this->run_core_user_import($params);\n $user = new stdClass;\n $user->id = $userid;\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\n }","title":""},{"docid":"a0aaebc4a883f3e09f549775ecadbf85","score":"0.51919633","text":"public function testPredefinedProfilesClone()\n {\n }","title":""},{"docid":"d3ff17da63ec550d2062ef63dc5767c1","score":"0.51858735","text":"public function testGetLanguageProfilesGet()\n {\n }","title":""},{"docid":"7f6c25332f44c2e5e879b457a1f6bae6","score":"0.5164209","text":"function testUpdateSettingUserTasksSettingCommand_MutilEntries_ExistingMutilUsersProfile() {\n\t\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\n\t\tif (!file_exists($this->_path)) {\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}else\n\t\t{\n\t\t\tself::recursiveDelete($this->_path);\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}\n\t\t$sourceConfigFile = TEST_PATH. \"/lfdictionary/data/template\" . LANGUAGE_FORGE_SETTINGS . \"user1.WeSayConfig\";\n\n\t\t// create 3 user profile\n\t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \"/user1.WeSayConfig\";\n\t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n// \t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \"/user2.WeSayConfig\";\n// \t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n// \t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \"/user3.WeSayConfig\";\n// \t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n\n\t\t$userName=array();\n\t\t$userName[]=\"user1\";\n// \t\t$userName[]=\"user2\";\n// \t\t$userName[]=\"user3\";\n\n\t\t$lexProjectMockObject = new LexProjectMockObject();\n\t\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\n\t\t$command->execute();\n\n\t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user1\");\n\t\t$result = $command->execute();\n\t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n\t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n// \t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user2\");\n// \t\t$result = $command->execute();\n// \t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n// \t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\n// \t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user3\");\n// \t\t$result = $command->execute();\n// \t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n// \t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\t\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\"/*.WeSayConfig\");\n\n\t\t$isPatchincludeDefault = false;\n\n\t\tforeach ($filePaths as $file) {\n\t\t\tif ($this::endsWith($file, \"/\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\n\t\t\t\t$isPatchincludeDefault = true;\n\t\t\t}\n\t\t}\n\t\tif ($isPatchincludeDefault){\n\t\t\t$this->assertEqual(count($filePaths),4);\n\t\t}else{\n\t\t\t$this->assertEqual(count($filePaths),1);\n\t\t}\n\n\n\t\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\n\t}","title":""},{"docid":"d63047349f130a3b9e33ce8ced20dd89","score":"0.50178206","text":"public function test_version1importpreventsinvaliduserlangonupdate() {\n global $DB, $CFG;\n\n $this->run_core_user_import(array());\n\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'lang' => '12'\n );\n\n $this->run_core_user_import($data, false);\n\n // Make sure the data hasn't changed.\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'lang' => $CFG->lang\n ));\n }","title":""},{"docid":"43cbdc0e4241288e90aebb05c35b0c63","score":"0.4998867","text":"function testUpdateSettingUserTasksSettingCommand_MutilEntries_NonExistingMutilUsersProfile() {\n\t\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\n\t\tif (!file_exists($this->_path)) {\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}else\n\t\t{\n\t\t\tself::recursiveDelete($this->_path);\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}\n\t\t$sourceConfigFile = TEST_PATH. \"/lfdictionary/data/template\" . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\n\n\t\t// copy default profile\n\t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\n\t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n\t\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\"/*.WeSayConfig\");\n\t\tforeach ($filePaths as $file) {\n\t\t\tif ($this::endsWith($file, \"/\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\n\t\t\t\t$isPatchincludeDefault = true;\n\t\t\t}\n\t\t}\n\t\tif ($isPatchincludeDefault){\n\t\t\t$this->assertEqual(count($filePaths),1);\n\t\t}else{\n\t\t\t$this->assertEqual(count($filePaths),0);\n\t\t}\n\n\n\t\t$userName=array();\n\t\t$userName[]=\"user1\";\n// \t\t$userName[]=\"user2\";\n// \t\t$userName[]=\"user3\";\n\t\t$lexProjectMockObject = new LexProjectMockObject();\n\t\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\n\t\t$command->execute();\n\n\t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user1\");\n\t\t$result = $command->execute();\n\t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n\t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n// \t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user2\");\n// \t\t$result = $command->execute();\n// \t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n// \t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\n// \t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user3\");\n// \t\t$result = $command->execute();\n// \t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n// \t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\t\t$filePaths = glob($lexProjectMockObject->getLanguageForgeSetting() .\"/*.WeSayConfig\");\n\t\t$isPatchincludeDefault = false;\n\n\t\tforeach ($filePaths as $file) {\n\t\t\tif ($this::endsWith($file, \"/\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\n\t\t\t\t$isPatchincludeDefault = true;\n\t\t\t}\n\t\t}\n\t\tif ($isPatchincludeDefault){\n\t\t\t$this->assertEqual(count($filePaths),2);\n\t\t}else{\n\t\t\t$this->assertEqual(count($filePaths),1);\n\t\t}\n\n\n\t\tself::recursiveDelete($this->_path);\n\t}","title":""},{"docid":"95de63e90d27e813460a0f486efab915","score":"0.4949924","text":"public function testDodgyUpsertParams()\n {\n $this->createBasicStore()->upsert([null, FALSE, TRUE, new stdClass()]);\n }","title":""},{"docid":"ce1e75f944970a77cd131115e3b60b81","score":"0.4917661","text":"public function test_likeUpsert() {\n\n }","title":""},{"docid":"5ac5feab510809243489183f1ec78049","score":"0.48938617","text":"public function testPredefinedProfilesGet()\n {\n }","title":""},{"docid":"ef0c32ffc993fa02e404bee8474fceb4","score":"0.48782527","text":"function saveFirstPreferences($username, $lang_preferences, $topic_preferences)\n{\n\n\tglobal $db;\n\n $lang_query = \"INSERT INTO user_lang\n (username, lang_1, lang_2, lang_3)\n VALUES \n (:username, :lang_1, :lang_2, :lang_3)\n ON DUPLICATE KEY UPDATE\n lang_1 = :lang_1,\n lang_2 = :lang_2,\n lang_3 = :lang_3\";\n\n $statement = $db->prepare($lang_query);\n $statement->bindValue(':lang_1',$lang_preferences[0]);\n $statement->bindValue(':lang_2',$lang_preferences[1]);\n $statement->bindValue(':lang_3',$lang_preferences[2]);\n $statement->bindValue(':username',$username);\n\t$statement->execute();\n\n $topic_query = \"INSERT INTO user_topic\n (username, topic_1, topic_2, topic_3)\n VALUES \n (:username, :topic_1, :topic_2, :topic_3)\n ON DUPLICATE KEY UPDATE\n topic_1 = :topic_1,\n topic_2 = :topic_2,\n topic_3 = :topic_3\";\n $statement = $db->prepare($topic_query);\n $statement->bindValue(':topic_1',$topic_preferences[0]);\n $statement->bindValue(':topic_2',$topic_preferences[1]);\n $statement->bindValue(':topic_3',$topic_preferences[2]);\n $statement->bindValue(':username',$username);\n\t$statement->execute();\n\n\t$statement->closeCursor();\t\n\t\n}","title":""},{"docid":"7e8cee28539d3eda498f6f560d285d93","score":"0.48683143","text":"public function testPredefinedProfilesDeletePredefinedProfile()\n {\n }","title":""},{"docid":"94a1101d0a4bd10452afdc36bac4f480","score":"0.48557958","text":"public function updateProfile() : AffiliateProfile;","title":""},{"docid":"74321016af433bb4211a9b11f5bc6619","score":"0.48381144","text":"public function testEtfsProfile()\n {\n }","title":""},{"docid":"aca4538c8a8e8cad48ed29ac436879e0","score":"0.48005694","text":"public function test_elis_createorupdate_supports_underscores() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once(elispm::lib('data/course.class.php'));\n require_once(elispm::lib('data/pmclass.class.php'));\n require_once(elispm::lib('data/student.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array(\n 'courseid' => $course->id,\n // Idnumber has an underscore in it.\n 'idnumber' => 'testclass_idnumber'\n ));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Set up an existing enrolment.\n $student = new student(array(\n 'userid' => $user->id,\n 'classid' => $class->id,\n 'completestatusid' => student::STUSTATUS_FAILED\n ));\n $student->save();\n\n // Import the record, with create acting as an update.\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclass_idnumber';\n $record->user_idnumber = 'testuseridnumber';\n $record->completestatusid = student::STUSTATUS_PASSED;\n\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertEquals(1, $DB->count_records(student::TABLE));\n $params = array(\n 'userid' => $user->id,\n 'classid' => $class->id,\n 'completestatusid' => student::STUSTATUS_PASSED\n );\n $exists = $DB->record_exists(student::TABLE, $params);\n $this->assertTrue($exists);\n }","title":""},{"docid":"46148e071cee513bb0bda23a69172225","score":"0.4781433","text":"private function saveProfiles() {\n switch(D3P_STORAGE) {\n\t case 'file':\n\t $this->saveProfilesToFile();\n\t break;\n }\n\t}","title":""},{"docid":"f1123540895dba458b553cbb5b448fd3","score":"0.47765467","text":"function testUpdateSettingUserTasksSettingCommand_MutilEntries_NonExistingSingleUserProfile() {\n\t\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\n\t\tif (!file_exists($this->_path)) {\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}else\n\t\t{\n\t\t\tself::recursiveDelete($this->_path);\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}\n\t\t$sourceConfigFile = TEST_PATH. \"/lfdictionary/data/template\" . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\n\t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\n\n\t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n\n\t\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\"/*.WeSayConfig\");\n\n\t\t$isPatchincludeDefault = false;\n\n\t\tforeach ($filePaths as $file) {\n\t\t\tif ($this::endsWith($file, \"/\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\n\t\t\t\t$isPatchincludeDefault = true;\n\t\t\t}\n\t\t}\n\t\tif ($isPatchincludeDefault){\n\t\t\t$this->assertEqual(count($filePaths),1);\n\t\t}else{\n\t\t\t$this->assertEqual(count($filePaths),0);\n\t\t}\n\n\t\t$userName=array();\n\t\t$userName[]=\"user1\";\n\n\t\t$lexProjectMockObject = new LexProjectMockObject();\n\t\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\n\t\t$command->execute();\n\n\t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user1\");\n\t\t$result = $command->execute();\n\t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n\t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\n\t\t$filePaths = glob($lexProjectMockObject->getUserSettingsFilePath(\"user1\") );\n\t\t$this->assertEqual(count($filePaths),1);\n\t\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\n\t}","title":""},{"docid":"d069b7e1906937b0000635d53b2bf415","score":"0.47629502","text":"public function test_version1importpreventsinvalidusercountryonupdate() {\n global $CFG, $DB;\n\n $this->run_core_user_import(array('country' => 'CA'));\n\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'country' => 12\n );\n\n $this->run_core_user_import($data, false);\n\n // Make sure the data hasn't changed.\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'country' => 'CA'\n ));\n }","title":""},{"docid":"cc45d7a7467e38287d5048d10ed77354","score":"0.4754129","text":"public function test_elis_createorupdate_updates_instructor_enrolment() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Create the instructor enrolment user.\n $instructor = new instructor(array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n ));\n $instructor->save();\n\n // Run the instructor enrolment create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->role = 'instructor';\n $record->completetime = 'Jan/02/2012';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\n )));\n }","title":""},{"docid":"637bb48109ee95f14d651b111ad2559a","score":"0.47501665","text":"function testUpdateSettingUserTasksSettingCommand_MutilEntries_ExistingSingleUserProfile() {\n\t\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\n\t\tif (!file_exists($this->_path)) {\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}else\n\t\t{\n\t\t\tself::recursiveDelete($this->_path);\n\t\t\tmkdir($this->_path);\n\t\t\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\n\t\t}\n\t\t\n\t\t$lexProjectMockObject = new LexProjectMockObject();\n\t\t\n\t\t$sourceConfigFile = TEST_PATH. \"/lfdictionary/data/template\" . LANGUAGE_FORGE_SETTINGS . \"user1.WeSayConfig\";\n\t\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \"/user1.WeSayConfig\";\n\n\t\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\n\n\t\t$userName=array();\n\t\t$userName[]=\"user1\";\n\n\t\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\n\t\t$command->execute();\n\n\t\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\"user1\");\n\t\t$result = $command->execute();\n\t\t$this->assertEqual(count($result[\"tasks\"][\"task\"]), 11);\n\t\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\n\t\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\n\t}","title":""},{"docid":"059e9d577aeac800501759f74f6ece88","score":"0.4743711","text":"public function test_version1importsetsuserprofilefieldsoncreate() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/user/profile/lib.php');\n require_once($CFG->dirroot.'/user/profile/definelib.php');\n\n // Create custom field category.\n $category = new stdClass;\n $category->sortorder = $DB->count_records('user_info_category') + 1;\n $category->id = $DB->insert_record('user_info_category', $category);\n\n // Create custom profile fields.\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id, 2000, 3000);\n $this->create_profile_field('rliplegacydatetime', 'datetime', $category->id, 2000, 3000);\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \"rlipoption1\\nrlipoption2\");\n $this->create_profile_field('rliptextarea', 'textarea', $category->id);\n $this->create_profile_field('rliptext', 'text', $category->id);\n\n // Run import.\n $data = array();\n $data['profile_field_rlipcheckbox'] = '1';\n $data['profile_field_rlipdatetime'] = 'jan/12/2011';\n $data['profile_field_rliplegacydatetime'] = '1/12/2011';\n $data['profile_field_rlipmenu'] = 'rlipoption1';\n $data['profile_field_rliptextarea'] = 'rliptextarea';\n $data['profile_field_rliptext'] = 'rliptext';\n\n $this->run_core_user_import($data);\n\n // Fetch the user and their profile field data.\n $user = $DB->get_record('user', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\n profile_load_data($user);\n fix_moodle_profile_fields($user);\n\n // Validate data.\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), true);\n $this->assertEquals($user->profile_field_rlipcheckbox, 1);\n $this->assertEquals(isset($user->profile_field_rlipdatetime), true);\n $this->assertEquals($user->profile_field_rlipdatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\n $this->assertEquals(isset($user->profile_field_rliplegacydatetime), true);\n $this->assertEquals($user->profile_field_rliplegacydatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\n $this->assertEquals(isset($user->profile_field_rlipmenu), true);\n $this->assertEquals($user->profile_field_rlipmenu, 'rlipoption1');\n $this->assertEquals(isset($user->profile_field_rliptextarea['text']), true);\n $this->assertEquals($user->profile_field_rliptextarea['text'], 'rliptextarea');\n $this->assertEquals(isset($user->profile_field_rliptext), true);\n $this->assertEquals($user->profile_field_rliptext, 'rliptext');\n }","title":""},{"docid":"2eb8e57fa4af6d29999b55b93ed5ffe7","score":"0.47398433","text":"public function test_version1importpreventslonguserfieldsonupdate() {\n global $CFG, $DB;\n\n $this->run_core_user_import(array(\n 'idnumber' => 'rlipidnumber',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'firstname' => str_repeat('a', 101)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'firstname' => 'rlipfirstname'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'lastname' => str_repeat('a', 101)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'lastname' => 'rliplastname'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'email' => str_repeat('a', 50).'@'.str_repeat('b', 50)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'email' => 'rlipuser@rlipdomain.com'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'city' => str_repeat('a', 256)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'city' => 'rlipcity'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'idnumber' => str_repeat('a', 256)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'idnumber' => 'rlipidnumber'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'institution' => str_repeat('a', 41)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'institution' => 'rlipinstitution'\n ));\n\n $params = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'department' => str_repeat('a', 31)\n );\n $this->run_core_user_import($params, false);\n $this->assert_record_exists('user', array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'department' => 'rlipdepartment'\n ));\n }","title":""},{"docid":"0e3e70b7257060ad4c6649310116085d","score":"0.4738639","text":"public function test_elis_createorupdate_updates_student_and_instructor_enrolment() {\n global $CFG, $DB;\n\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array(\n 'courseid' => $course->id,\n 'idnumber' => 'testclassidnumber')\n );\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n\n // 1 Run the first student enrolment.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->role = 'student';\n $record->completetime = 'Jan/01/2012';\n\n // NOTE: we clone() the record because the createorupdate setting will rewrite the action parameter.\n $importplugin->process_record('enrolment', clone($record), 'bogus');\n\n // Validation of the enrolment record.\n $params = array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n );\n\n $this->assertTrue($DB->record_exists(student::TABLE, $params));\n\n // 2 Run the second student enrolment.\n $record->completetime = 'Jan/02/2012';\n $importplugin->process_record('enrolment', clone($record), 'bogus');\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 2, 2012);\n $this->assertTrue($DB->record_exists(student::TABLE, $params));\n\n // 3 Run the first teacher enrolment.\n $record->role = 'instructor';\n $record->completetime = 'Jan/01/2012';\n $importplugin->process_record('enrolment', clone($record), 'bogus');\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 1, 2012);\n $this->assertTrue($DB->record_exists(instructor::TABLE, $params));\n\n // 4 Run the second teacher enrolment.\n $record->completetime = 'Jan/02/2012';\n $importplugin->process_record('enrolment', clone($record), 'bogus');\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 2, 2012);\n $this->assertTrue($DB->record_exists(instructor::TABLE, $params));\n }","title":""},{"docid":"e35e8cc6096cafd35ad1eed9110f6113","score":"0.4726015","text":"public function testUsersIdProfilePut()\n {\n\n }","title":""},{"docid":"926b34852e47421c1f94ab605c73f33d","score":"0.47234473","text":"public function testProfileOperations() {\n $user = $this->createUser([], [\n \"update own {$this->type1->id()} profile\",\n \"update own {$this->type2->id()} profile\",\n ]);\n $profile1 = $this->createProfile($this->type1, $user);\n // Test access to a profile type with no role requirement.\n $this->assertTrue($this->accessHandler->access($profile1, 'update', $user));\n\n $profile2 = $this->createProfile($this->type2, $user);\n $this->assertFalse($this->accessHandler->access($profile2, 'update', $user));\n $this->accessHandler->resetCache();\n\n $user->addRole($this->role2->id());\n $user->save();\n $profile2 = $this->reloadEntity($profile2);\n $this->assertTrue($this->accessHandler->access($profile2, 'update', $user));\n\n $operations = ['view', 'update', 'delete'];\n $user2 = $this->createUser([], [\n \"view any {$this->type2->id()} profile\",\n \"update any {$this->type2->id()} profile\",\n \"delete any {$this->type2->id()} profile\",\n ]);\n foreach ($operations as $operation) {\n $this->assertTrue($this->accessHandler->access($profile2, $operation, $user2));\n }\n\n $user->removeRole($this->role2->id());\n $user->save();\n $this->accessHandler->resetCache();\n $profile2 = $this->reloadEntity($profile2);\n // Assert that each operation is denied if the profile owner doesn't have\n // one of the allowed roles.\n foreach ($operations as $operation) {\n $this->assertFalse($this->accessHandler->access($profile2, $operation, $user2));\n }\n\n $user3 = $this->createUser([], [\n \"view own {$this->type3->id()} profile\",\n \"update own {$this->type3->id()} profile\",\n \"delete own {$this->type3->id()} profile\",\n ]);\n $profile3 = $this->createProfile($this->type3, $user3);\n // Test the operations without the role affected.\n foreach ($operations as $operation) {\n $this->assertFalse($this->accessHandler->access($profile3, $operation, $user3));\n }\n $user3->addRole($this->role1->id());\n $user3->save();\n $this->accessHandler->resetCache();\n $profile3 = $this->reloadEntity($profile3);\n foreach ($operations as $operation) {\n $this->assertTrue($this->accessHandler->access($profile3, $operation, $user3));\n }\n }","title":""},{"docid":"e2f015abe692006cb10dbb8f6802be4a","score":"0.47168595","text":"public function test_version1importsetsfieldsonextendeduserupdate() {\n global $CFG, $DB;\n $CFG->allowuserthemes = true;\n $this->run_core_user_import(array());\n\n $data = array(\n 'action' => 'update',\n 'user_username' => 'rlipusername',\n 'auth' => 'mnet',\n 'maildigest' => 2,\n 'autosubscribe' => 1,\n 'trackforums' => 1,\n 'timezone' => -5.0,\n 'theme' => 'standard',\n 'lang' => 'en',\n 'description' => 'rlipdescription',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n );\n\n $this->run_core_user_import($data, false);\n\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $data['username'] = $data['user_username'];\n unset($data['user_username']);\n\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n timezone = :timezone AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n institution = :institution AND\n department = :department\";\n\n $exists = $DB->record_exists_select('user', $select, $data);\n\n $this->assertTrue($exists);\n }","title":""},{"docid":"d7009aeb7d65450c6dbc6bfd7cf4d9ec","score":"0.46921903","text":"public function test_version1importdetectsduplicateswhenmultipleexist() {\n global $DB, $CFG;\n $userone = array(\n 'username' => 'three',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'idnumber' => 'one',\n 'email' => 'email@example.com',\n 'firstname' => 'Test',\n 'lastname' => 'User'\n );\n\n $usertwo = array(\n 'username' => 'two',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'idnumber' => 'two',\n 'email' => 'email2@example.com',\n 'firstname' => 'Test',\n 'lastname' => 'User'\n );\n $DB->insert_record('user', $userone);\n $DB->insert_record('user', $usertwo);\n set_config('allowduplicateemails', 1, 'rlipimport_version1');\n $usertoimport = array(\n 'username' => 'two',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'idnumber' => 'two',\n 'email' => 'email@example.com'\n );\n // Run the import.\n $this->run_core_user_import($usertoimport);\n }","title":""},{"docid":"1625a799a96cc85affd7960439a27429","score":"0.46704412","text":"public function testUpsertRow()\n {\n $values = ['emailAddress' => 'nothing@nothing.com'];\n $test = $this->api->upsertRow('primaryKey', '2', $values, 'ETApiTest');\n $delete = $this->api->deleteRow('ETApiTest', ['primaryKey' => 2]);\n $this->assertEquals(200, $test);\n }","title":""},{"docid":"cec56c6c459d2785f6142ff94afc7b18","score":"0.46518192","text":"public function test_elis_createorupdate_updates_userset() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/userset.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test user set.\n $userset = new userset(array('name' => 'testusersetname', 'display' => 'testusersetdisplay'));\n $userset->save();\n\n // Run the user set create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'cluster';\n $record->name = 'testusersetname';\n $record->display = 'updatedtestusersetdisplay';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(userset::TABLE, array(\n 'name' => 'testusersetname',\n 'display' => 'updatedtestusersetdisplay'\n )));\n }","title":""},{"docid":"2c7c49f9abc659745327adf87576b392","score":"0.46117076","text":"public function testGetOrganizationConfigTemplateSwitchProfiles()\n {\n }","title":""},{"docid":"8f36ef0120a8433e5cad49f362381011","score":"0.46075556","text":"public function test_version1importdoesnotupdatenonmatchingusers() {\n global $CFG;\n\n $this->run_core_user_import(array('idnumber' => 'rlipidnumber', 'firstname' => 'oldfirstname'));\n\n $checkdata = array(\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'username' => 'rlipusername',\n 'email' => 'rlipuser@rlipdomain.com',\n 'idnumber' => 'rlipidnumber',\n 'firstname' => 'oldfirstname'\n );\n\n // Bogus username.\n $data = array(\n 'action' => 'update',\n 'username' => 'bogususername',\n 'firstname' => 'newfirstname'\n );\n $this->run_core_user_import($data, false);\n $this->assert_record_exists('user', $checkdata);\n\n // Bogus email.\n $data = array(\n 'action' => 'update',\n 'email' => 'bogus@domain.com',\n 'firstname' => 'newfirstname'\n );\n $this->run_core_user_import($data, false);\n $this->assert_record_exists('user', $checkdata);\n\n // Bogus idnumber.\n $data = array(\n 'action' => 'update',\n 'idnumber' => 'bogusidnumber',\n 'firstname' => 'newfirstname'\n );\n $this->run_core_user_import($data, false);\n $this->assert_record_exists('user', $checkdata);\n }","title":""},{"docid":"d24f1001ec85c248c35890c45d9e3ecf","score":"0.46034402","text":"public function testCopyImport(): void\n {\n /** @var array{id:string} $table */\n $table = $this->_client->apiPost('buckets/' . $this->getTestBucketId(self::STAGE_IN) . '/tables', [\n 'dataString' => 'Id,Name,update',\n 'name' => 'languages',\n 'primaryKey' => 'Id',\n ]);\n\n // create workspace and source table in workspace\n $workspace = $this->initTestWorkspace();\n\n $backend = WorkspaceBackendFactory::createWorkspaceBackend($workspace);\n $backend->dropTableIfExists('test_Languages3');\n $backend->createTable('test_Languages3', [\n 'Id' => 'integer',\n 'Name' => 'string',\n 'update' => 'string',\n ]);\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'INSERT INTO %s.`test_Languages3` (`Id`, `Name`) VALUES (1, \\'cz\\'), (2, \\'en\\');',\n $workspace['connection']['schema']\n ));\n\n $this->_client->writeTableAsyncDirect($table['id'], [\n 'dataWorkspaceId' => $workspace['id'],\n 'dataTableName' => 'test_Languages3',\n ]);\n\n $expected = [\n '\"Id\",\"Name\",\"update\"',\n '\"1\",\"cz\",\"\"',\n '\"2\",\"en\",\"\"',\n ];\n\n $this->assertLinesEqualsSorted(implode(\"\\n\", $expected) . \"\\n\", $this->_client->getTableDataPreview($table['id'], [\n 'format' => 'rfc',\n ]), 'imported data comparsion');\n\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'TRUNCATE TABLE %s.`test_Languages3`',\n $workspace['connection']['schema']\n ));\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'INSERT INTO %s.`test_Languages3` VALUES (1, \\'cz\\', \\'1\\'), (3, \\'sk\\', \\'1\\');',\n $workspace['connection']['schema']\n ));\n\n $this->_client->writeTableAsyncDirect($table['id'], [\n 'dataWorkspaceId' => $workspace['id'],\n 'dataTableName' => 'test_Languages3',\n 'incremental' => true,\n ]);\n\n $expected = [\n '\"Id\",\"Name\",\"update\"',\n '\"1\",\"cz\",\"1\"',\n '\"2\",\"en\",\"\"',\n '\"3\",\"sk\",\"1\"',\n ];\n $this->assertLinesEqualsSorted(implode(\"\\n\", $expected) . \"\\n\", $this->_client->getTableDataPreview($table['id'], [\n 'format' => 'rfc',\n ]), 'previously null column updated');\n\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'TRUNCATE TABLE %s.`test_Languages3`',\n $workspace['connection']['schema']\n ));\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'ALTER TABLE %s.`test_Languages3` ADD COLUMN `new_col` string(10)',\n $workspace['connection']['schema']\n ));\n $backend->executeQuery(sprintf(\n /** @lang BigQuery */\n 'INSERT INTO %s.`test_Languages3` VALUES (1, \\'cz\\', \\'1\\', NULL), (3, \\'sk\\', \\'1\\', \\'newValue\\');',\n $workspace['connection']['schema']\n ));\n\n $this->expectException(ClientException::class);\n $this->expectExceptionMessage('During the import of typed tables new columns can\\'t be added. Extra columns found: \"new_col\".');\n $this->_client->writeTableAsyncDirect($table['id'], [\n 'dataWorkspaceId' => $workspace['id'],\n 'dataTableName' => 'test_Languages3',\n 'incremental' => true,\n ]);\n\n// $expected = [\n// '\"Id\",\"Name\",\"update\",\"new_col\"',\n// '\"1\",\"cz\",\"1\",\"\"',\n// '\"2\",\"en\",\"\",\"\"',\n// '\"3\",\"sk\",\"1\",\"newValue\"',\n// ];\n// $this->assertLinesEqualsSorted(implode(\"\\n\", $expected) . \"\\n\", $this->_client->getTableDataPreview($table['id'], [\n// 'format' => 'rfc',\n// ]), 'new column added');\n }","title":""},{"docid":"a4f3452f324ff2c6216d9408d3590404","score":"0.45906338","text":"public function test_elis_createorupdate_updates_student_enrolment() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/student.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Create the test student enrolment.\n $student = new student(array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n ));\n $student->save();\n\n // Run the student enrolment create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->completetime = 'Jan/02/2012';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(student::TABLE, array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\n )));\n }","title":""},{"docid":"2aff6640dd23e8bdbb0a674df55cdd77","score":"0.45879143","text":"public function test_version1importmapsfieldsonuserupdate() {\n global $CFG, $DB;\n $CFG->allowuserthemes = true;\n $this->run_core_user_import(array());\n\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'auth' => 'mnet',\n 'maildigest' => 2,\n 'autosubscribe' => 'yes',\n 'trackforums' => 'yes',\n 'timezone' => -5.0,\n 'theme' => 'standard',\n 'lang' => 'en',\n 'description' => 'rlipdescription',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n );\n\n $this->run_core_user_import($data, false);\n\n foreach ($data as $key => $val) {\n if (in_array((string)$val, array('no', 'yes'))) {\n $data[$key] = ((string)$val == 'yes') ? 1: 0;\n }\n }\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n timezone = :timezone AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n institution = :institution AND\n department = :department\";\n\n $exists = $DB->record_exists_select('user', $select, $data);\n $this->assertEquals($exists, true);\n }","title":""},{"docid":"f46617ef52f0c31bfd99609723ac8c0d","score":"0.45829374","text":"public function testPredefinedProfilesGetById()\n {\n }","title":""},{"docid":"b47c631c8be17e925ad15b38e6124449","score":"0.45806578","text":"public function test_version1importsetsfieldsonuserupdate() {\n global $CFG, $DB;\n $CFG->allowuserthemes = true;\n $this->run_core_user_import(array());\n\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'auth' => 'mnet',\n 'maildigest' => 2,\n 'autosubscribe' => 1,\n 'trackforums' => 1,\n 'timezone' => -5.0,\n 'theme' => 'standard',\n 'lang' => 'en',\n 'description' => 'rlipdescription',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n );\n\n $this->run_core_user_import($data, false);\n\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n timezone = :timezone AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n institution = :institution AND\n department = :department\";\n\n $exists = $DB->record_exists_select('user', $select, $data);\n\n $this->assertTrue($exists);\n }","title":""},{"docid":"137df0c73beda95b82f05b8b9528820c","score":"0.45683837","text":"private function loadProfiles() {\n switch(D3P_STORAGE) {\n\t case 'file':\n\t $this->loadProfilesFromFile();\n\t break;\n }\n\t}","title":""},{"docid":"e0e60299e6aaa3c794aa1eb23349016d","score":"0.45519567","text":"public function test_version1importnewuseremail() {\n global $CFG; // This is needed by the required files.\n require_once(dirname(__FILE__).'/other/rlip_importplugin_version1_fakeemail.php');\n $importplugin = new rlip_importplugin_version1_fakeemail();\n\n $testuser = new stdClass;\n $testuser->username = 'testusername';\n $testuser->idnumber = 'testidnumber';\n $testuser->firstname = 'testfirstname';\n $testuser->lastname = 'testlastname';\n $testuser->email = 'testemail@example.com';\n\n // Test false return when not enabled.\n set_config('newuseremailenabled', '0', 'rlipimport_version1');\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\n set_config('newuseremailtemplate', 'Test Body', 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertFalse($result);\n\n // Test false return when enabled but empty template.\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\n set_config('newuseremailtemplate', '', 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertFalse($result);\n\n // Test false return when enabled and has template, but user has empty email.\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\n set_config('newuseremailtemplate', 'Test Body', 'rlipimport_version1');\n $testuser->email = '';\n $result = $importplugin->newuseremail($testuser);\n $this->assertFalse($result);\n $testuser->email = 'test@example.com';\n\n // Test success when enabled, has template text, and user has email.\n $testsubject = 'Test Subject';\n $testbody = 'Test Body';\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertNotEmpty($result);\n $this->assertInternalType('array', $result);\n $this->assertArrayHasKey('user', $result);\n $this->assertEquals($testuser, $result['user']);\n $this->assertArrayHasKey('subject', $result);\n $this->assertEquals($testsubject, $result['subject']);\n $this->assertArrayHasKey('body', $result);\n $this->assertEquals($testbody, $result['body']);\n\n // Test that subject is replaced by empty string when not present.\n $testsubject = null;\n $testbody = 'Test Body';\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertNotEmpty($result);\n $this->assertInternalType('array', $result);\n $this->assertArrayHasKey('user', $result);\n $this->assertEquals($testuser, $result['user']);\n $this->assertArrayHasKey('subject', $result);\n $this->assertEquals('', $result['subject']);\n $this->assertArrayHasKey('body', $result);\n $this->assertEquals($testbody, $result['body']);\n\n // Full testing of replacement is done below, but just test that it's being done at all from the main function.\n $testsubject = 'Test Subject';\n $testbody = 'Test Body %%username%%';\n $expectedtestbody = 'Test Body '.$testuser->username;\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\n $result = $importplugin->newuseremail($testuser);\n $this->assertNotEmpty($result);\n $this->assertInternalType('array', $result);\n $this->assertArrayHasKey('user', $result);\n $this->assertEquals($testuser, $result['user']);\n $this->assertArrayHasKey('subject', $result);\n $this->assertEquals($testsubject, $result['subject']);\n $this->assertArrayHasKey('body', $result);\n $this->assertEquals($expectedtestbody, $result['body']);\n }","title":""},{"docid":"83354809f4786af25eb5c7fe012719eb","score":"0.4538639","text":"public function test_elis_createorupdate_updates_user() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Run the user create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->username = 'testuserusername';\n $record->email = 'test@useremail.com';\n $record->idnumber = 'testuseridnumber';\n $record->firstname = 'updatedtestuserfirstname';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('user', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(user::TABLE, array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'updatedtestuserfirstname'\n )));\n }","title":""},{"docid":"5f0100dac0d276cfde06e7aafa64f11c","score":"0.45373005","text":"public function testVariant6() {\n\n /* Setup\n ---------------------------------------------*/\n DbEntityHelper::setCon(self::$propelCon);\n\n list(\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\n ) = DbEntityHelper::setUpBonusMembers(true, [\n 'OL' => false,\n 'PM' => false,\n 'VS2' => false,\n ]);\n\n $new = DbEntityHelper::createSignupMember($VS1);\n\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\n $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS)\n + Transaction::getAmountForReason(Transaction::REASON_OL_BONUS)\n + Transaction::getAmountForReason(Transaction::REASON_PM_BONUS)\n + Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\n // $trfOL += 1;\n // $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS);\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\n $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\n\n $this->assertTransferTotal($trfIT, $IT);\n $this->assertTransferTotal($trfVL, $VL);\n // $this->assertTransferTotal($trfOL, $OL);\n // $this->assertTransferTotal($trfPM, $PM);\n // $this->assertTransferTotal($trfVS2, $VS2);\n $this->assertTransferTotal($trfVS1, $VS1);\n\n }","title":""},{"docid":"1fd32c9c77a38f59d5c35f178ad44bc5","score":"0.4532058","text":"public function test_version1importsyncsusertoelisonupdate() {\n global $CFG, $DB;\n\n if (!$DB->record_exists('block', array('name' => 'curr_admin'))) {\n $this->markTestIncomplete('This test depends on the PM system');\n }\n\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\n require_once($CFG->dirroot.'/user/profile/definelib.php');\n require_once(elis::lib('data/customfield.class.php'));\n require_once(elispm::lib('data/user.class.php'));\n\n // Make sure we are not auto-assigning idnumbers.\n set_config('auto_assign_user_idnumber', 0, 'elis_program');\n elis::$config = new elis_config();\n\n // Create Moodle custom field category.\n $category = new stdClass;\n $category->sortorder = $DB->count_records('user_info_category') + 1;\n $category->id = $DB->insert_record('user_info_category', $category);\n\n // Create Moodle custom profile field.\n $this->create_profile_field('rliptext', 'text', $category->id);\n\n // Obtain the PM user context level.\n $contextlevel = CONTEXT_ELIS_USER;\n\n // Make sure the PM category and field exist.\n $category = new field_category(array('name' => 'rlipcategory'));\n\n $field = new field(array(\n 'shortname' => 'rliptext',\n 'name' => 'rliptext',\n 'datatype' => 'text',\n 'multivalued' => 0\n ));\n $field = field::ensure_field_exists_for_context_level($field, $contextlevel, $category);\n\n // Make sure the field owner is setup.\n field_owner::ensure_field_owner_exists($field, 'manual');\n $ownerid = $DB->get_field('elis_field_owner', 'id', array('fieldid' => $field->id, 'plugin' => 'manual'));\n $owner = new field_owner($ownerid);\n $owner->param_control = 'text';\n $owner->save();\n\n // Make sure the field is set up for synchronization.\n field_owner::ensure_field_owner_exists($field, 'moodle_profile');\n $ownerid = $DB->get_field('elis_field_owner', 'id', array('fieldid' => $field->id, 'plugin' => 'moodle_profile'));\n $owner = new field_owner($ownerid);\n $owner->exclude = pm_moodle_profile::sync_from_moodle;\n $owner->save();\n\n // Update the user class's static cache of define user custom fields.\n $tempuser = new user();\n $tempuser->reset_custom_field_list();\n\n // Create the user.\n $this->run_core_user_import(array(\n 'idnumber' => 'rlipidnumber',\n 'profile_field_rliptext' => 'rliptext'\n ));\n\n // Make sure PM user was created correctly.\n $this->assert_record_exists(user::TABLE, array(\n 'username' => 'rlipusername',\n 'idnumber' => 'rlipidnumber'\n ));\n\n // Run the import, updating the user.\n $this->run_core_user_import(array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'profile_field_rliptext' => 'rliptextupdated'\n ));\n\n // Make sure the PM custom field data was set.\n $sql = \"SELECT 'x'\n FROM {\".field::TABLE.\"} f\n JOIN {\".field_data_text::TABLE.\"} d ON f.id = d.fieldid\n WHERE f.shortname = ? AND d.data = ?\";\n $params = array('rliptext', 'rliptextupdated');\n $exists = $DB->record_exists_sql($sql, $params);\n $this->assertEquals($exists, true);\n }","title":""},{"docid":"4832cbeb00d7e4780961b5bf2dd64c10","score":"0.45289883","text":"public function testPreference() {\r\n\r\n $preference_data = array(\r\n \"items\" => array(\r\n array(\r\n \"title\" => \"test1\",\r\n \"quantity\" => 1,\r\n \"currency_id\" => \"ARS\",\r\n \"unit_price\" => 10.2\r\n )\r\n )\r\n );\r\n\r\n // CREATE\r\n $preference = $this->mp->create_preference($preference_data);\r\n\r\n $this->assertTrue($preference[\"status\"] == 201);\r\n $this->assertTrue($preference[\"response\"][\"items\"][0][\"title\"] == \"test1\"\r\n && (int) $preference[\"response\"][\"items\"][0][\"quantity\"] == 1\r\n && (double) $preference[\"response\"][\"items\"][0][\"unit_price\"] == 10.2\r\n && $preference[\"response\"][\"items\"][0][\"currency_id\"] == \"ARS\");\r\n\r\n // GET\r\n $preference = $this->mp->get_preference($preference[\"response\"][\"id\"]);\r\n\r\n $this->assertTrue($preference[\"status\"] == 200);\r\n\r\n // UPDATE\r\n $preference_data = array(\r\n \"items\" => array(\r\n array(\r\n \"title\" => \"test2Modified\",\r\n \"quantity\" => 2,\r\n \"currency_id\" => \"USD\",\r\n \"unit_price\" => 100\r\n )\r\n )\r\n );\r\n\r\n $preferenceUpdatedResult = $this->mp->update_preference($preference[\"response\"][\"id\"], $preference_data);\r\n\r\n $this->assertTrue($preferenceUpdatedResult[\"status\"] == 200);\r\n\r\n $preferenceUpdatedResult = $this->mp->get_preference($preference[\"response\"][\"id\"]);\r\n\r\n $this->assertTrue((double) $preferenceUpdatedResult[\"response\"][\"items\"][0][\"unit_price\"] == 100\r\n && (double) $preferenceUpdatedResult[\"response\"][\"items\"][0][\"quantity\"] == 2\r\n && $preferenceUpdatedResult[\"response\"][\"items\"][0][\"title\"] == \"test2Modified\"\r\n && $preferenceUpdatedResult[\"response\"][\"items\"][0][\"currency_id\"] == \"USD\");\r\n }","title":""},{"docid":"3613c21c3ec2f01bc3bd3bb085599953","score":"0.45278534","text":"public function test_elis_createorupdate_creates_instructor_enrolment() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Run the instructor enrolment create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->role = 'instructor';\n $record->completetime = 'Jan/01/2012';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n )));\n }","title":""},{"docid":"ebf1a0658bfd314cfb51c31ac5335c76","score":"0.45243627","text":"public static function updateExtendedPropertiesUrl($upsert)\n\t{\n\t\t$url = \"/api/commerce/carts/current/extendedproperties?upsert={upsert}\";\n\t\t$mozuUrl = new MozuUrl($url, UrlLocation::TENANT_POD,\"PUT\", false) ;\n\t\t$url = $mozuUrl->formatUrl(\"upsert\", $upsert);\n\t\treturn $mozuUrl;\n\t}","title":""},{"docid":"6f44c87fd57ee51e38ebd73afa380423","score":"0.4512327","text":"public function testUpdateUserProperties()\n {\n\n }","title":""},{"docid":"f2ae1ba0746da0632421f8638d84a5ad","score":"0.4489874","text":"public function test_user_update_profile_success()\n {\n $body = [\n \"name\" => \"Top\",\n \"gender\" => 1,\n \"dob\" => \"1995-02-22\",\n 'phone' => '0123456781',\n 'address' => 'Da Nang',\n ];\n $response = $this->json('PUT', '/api/profile', $body);\n $response->assertStatus(200)\n ->assertJsonFragment($body)\n ->assertJsonStructure($this->json_structure_user_update_profile_success());\n $this->assertDatabaseHas('users', $body);\n }","title":""},{"docid":"685d4a09b040186bf1c1c89e0bcaaee8","score":"0.44851044","text":"public function testPredefinedProfilesWritePermissionsById()\n {\n }","title":""},{"docid":"a64833be2c3eefc4215e5f1a98e42286","score":"0.44726658","text":"public function testUpsertApp()\n {\n $isnogudApp = new \\stdClass;\n $isnogudApp->id = 'isnogud';\n $isnogudApp->name = new \\stdClass;\n $isnogudApp->name->en = 'I don\\'t exist';\n $isnogudApp->showInMenu = true;\n\n $client = static::createRestClient();\n $client->put('/core/app/isnogud', $isnogudApp);\n\n $this->assertEquals(204, $client->getResponse()->getStatusCode());\n }","title":""},{"docid":"f1a35e3df7217960156c5f7e2b2ca073","score":"0.4460079","text":"public function test_version1importusesuserfieldmappings() {\n global $CFG, $DB;\n $file = get_plugin_directory('rlipimport', 'version1').'/lib.php';\n require_once($file);\n $CFG->allowuserthemes = true;\n\n // Set up our mapping of standard field names to custom field names.\n $mapping = array(\n 'action' => 'action1',\n 'username' => 'username1',\n 'auth' => 'auth1',\n 'password' => 'password1',\n 'firstname' => 'firstname1',\n 'lastname' => 'lastname1',\n 'email' => 'email1',\n 'maildigest' => 'maildigest1',\n 'autosubscribe' => 'autosubscribe1',\n 'trackforums' => 'trackforums1',\n 'city' => 'city1',\n 'country' => 'country1',\n 'timezone' => 'timezone1',\n 'theme' => 'theme1',\n 'lang' => 'lang1',\n 'description' => 'description1',\n 'idnumber' => 'idnumber1',\n 'institution' => 'institution1',\n 'department' => 'department1'\n );\n\n // Store the mapping records in the database.\n foreach ($mapping as $standardfieldname => $customfieldname) {\n $record = new stdClass;\n $record->entitytype = 'user';\n $record->standardfieldname = $standardfieldname;\n $record->customfieldname = $customfieldname;\n $DB->insert_record(RLIPIMPORT_VERSION1_MAPPING_TABLE, $record);\n }\n\n // Run the import.\n $data = array(\n 'entity' => 'user',\n 'action1' => 'create',\n 'username1' => 'rlipusername',\n 'auth1' => 'mnet',\n 'password1' => 'Rlippassword!0',\n 'firstname1' => 'rlipfirstname',\n 'lastname1' => 'rliplastname',\n 'email1' => 'rlipuser@rlipdomain.com',\n 'maildigest1' => '2',\n 'autosubscribe1' => '1',\n 'trackforums1' => '1',\n 'city1' => 'rlipcity',\n 'country1' => 'CA',\n 'timezone1' => -5.0,\n 'theme1' => 'standard',\n 'lang1' => 'en',\n 'description1' => 'rlipdescription',\n 'idnumber1' => 'rlipidnumber',\n 'institution1' => 'rlipinstitution',\n 'department1' => 'rlipdepartment'\n );\n $this->run_core_user_import($data, false);\n\n // Validate user record.\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n firstname = :firstname AND\n lastname = :lastname AND\n email = :email AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n city = :city AND\n country = :country AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n idnumber = :idnumber AND\n institution = :institution AND\n department = :department\";\n $params = array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'auth' => 'mnet',\n 'firstname' => 'rlipfirstname',\n 'lastname' => 'rliplastname',\n 'email' => 'rlipuser@rlipdomain.com',\n 'maildigest' => 2,\n 'autosubscribe' => 1,\n 'trackforums' => 1,\n 'city' => 'rlipcity',\n 'country' => 'CA',\n 'timezone' => -5.0,\n 'theme' => 'standard',\n 'lang' => 'en',\n 'description' => 'rlipdescription',\n 'idnumber' => 'rlipidnumber',\n 'institution' => 'rlipinstitution',\n 'department' => 'rlipdepartment'\n );\n $exists = $DB->record_exists_select('user', $select, $params);\n $this->assertTrue($exists);\n\n // Validate password.\n $userrec = $DB->get_record('user', array('username' => $data['username1']));\n $this->assertTrue(validate_internal_user_password($userrec, $data['password1']));\n }","title":""},{"docid":"a118f277b761f64aa11127310e5d5cb6","score":"0.44599783","text":"function updateRun (&$db, &$u, &$arg, &$t ) {\n\t//\t$this->presentor = \"debug\"; return;\n\t\t$user = lcUser::getUserByPkey($arg->getvars[1]);\n\t\t$user->groups = $arg->postvars[group_opt];\n\t\t$user->email = $arg->postvars[email];\n\t\tif ( $arg->postvars[password] != \"\") {\n\t\t\t$user->password = $arg->postvars[password];\n\t\t}\n\n\t\t$user->update();\n\n\t\t\t// PROFILE\n\t\t$user = lcUser::getUserByPkey($arg->getvars[1]);\n\t\t$user->updateProfile($arg->postvars[profile]);\n\n\theader(\"Location: \". _APP_URL.\"users\");\n\texit();\n\t}","title":""},{"docid":"f64f5f61c0f2dbcbb9c4badfefc383c0","score":"0.44530833","text":"function setUp() : void {\n parent::setUp();\n $password = \"abc123\";\n $this->VALID_PROFILE_SALT = bin2hex(random_bytes(16));\n $this->VALID_PROFILE_HASH = hash_pbkdf2(\"sha512\", $password, $this->VALID_PROFILE_SALT, 262144);\n\n\n // create and insert a Profile to own the test Article\n $this->profile = new Profile (generateUuidV4(), null,\"name\", \"test@phpunit.de\",$this->VALID_PROFILE_HASH, \"+12125551212\", $this->VALID_PROFILE_SALT);\n $this->profile->insert($this->getPDO());\n\n // calculate the date (just use the time the unit test was setup...)\n $this->VALID_ARTICLEDATE = new \\DateTime();\n\n //format the sunrise date to use for testing\n $this->VALID_SUNRISEDATE = new \\DateTime();\n $this->VALID_SUNRISEDATE->sub(new \\DateInterval(\"P10D\"));\n\n //format the sunset date to use for testing\n $this->VALID_SUNSETDATE = new\\DateTime();\n $this->VALID_SUNSETDATE->add(new \\DateInterval(\"P10D\"));\n}","title":""},{"docid":"d98ebb940a64a09431604c07cbe834dc","score":"0.44510087","text":"public function run(){\n\t\t$profiles = array(\n\t\t\tarray('user_id' => '1', 'gender' => 'Male', 'mobile' => '01914433307', 'present_address' => '', 'permanent_address' => '', 'created_at' => new DateTime(), 'updated_at' => new DateTime())\n\t\t);\n\n\t\tDB::table('profiles')->insert($profiles);\n\t}","title":""},{"docid":"86935bd182996c9d9bddd0d60276e44f","score":"0.44480315","text":"public function testUpsertRowsetJson()\n {\n $values =\n '[\n {\n \"keys\":{\n \"primaryKey\": \"1\"\n },\n \"values\":{\n \"emailAddress\": \"newemail@email.com\"\n }\n },\n {\n \"keys\": {\n \"primaryKey\": \"2\"\n },\n \"values\":{\n \"emailAddress\": \"newemail2@email.com\"\n }\n }\n ]';\n\n $test = $this->api->upsertRowset($values, 'ETApiTest');\n $this->assertTrue(is_array($test));\n }","title":""},{"docid":"a5e241048d48c74264421cf26a680d38","score":"0.44450638","text":"function TransferProfiles()\n {\n $moduleaccesses=array();\n foreach (array_keys($this->ModuleDependencies) as $module)\n {\n $access=$this->ReadPHPArray($this->MyMod_Setup_Profiles_File($module));\n\n $access=$access[ \"Access\" ];\n\n $moduleaccesses[ $module ]=array();\n foreach ($this->GetListOfProfiles() as $profile)\n {\n $moduleaccesses[ $module ][ $profile ]=$access[ $profile ];\n }\n }\n\n if (isset($this->DBHash[ \"Mod\" ]) && $this->DBHash[ \"Mod\" ])\n {\n $file=$this->MyMod_Setup_Profiles_File();\n $this->WritePHPArray($file,$moduleaccesses);\n\n print $this->H(4,\"System Accesses written to \".$file);\n }\n }","title":""},{"docid":"c71b3bcbd65b251ceba3f97986e84de8","score":"0.44346404","text":"public function test_version1importpreventsinvaliduserlangoncreate() {\n $this->run_core_user_import(array('lang' => '12'));\n $this->assert_core_user_does_not_exist();\n }","title":""},{"docid":"7c8af984f8599522e2212b2292e07415","score":"0.44317287","text":"function profile(string $avatarSrc, int $userId, string $userName, string $emailAddress, array $languages): void\n{\n try\n {\n $isValid = $userName == \"\" || isValidUsername($userName, $userId);\n $isValid = $emailAddress == \"\" || isValidEmailAddress($emailAddress, $userId) && $isValid;\n $isValid = isValidLanguages($languages) && $isValid;\n\n if ($isValid)\n {\n $hasEmailChanged = $emailAddress != \"\" && !isExistingEmailAddress($emailAddress);\n $hasUserNameChanged = $userName != \"\" && !isExistingUsername($userName);\n\n updateUser($userId, $userName, $emailAddress);\n updateAvatar($userId, $avatarSrc);\n updateLanguages($userId, $languages);\n $_SESSION['avatarSrc'] = $avatarSrc;\n\n if ($hasUserNameChanged)\n {\n $_SESSION[\"username\"] = $userName;\n }\n\n if ($hasEmailChanged)\n {\n $_SESSION[\"emailUser\"] = $emailAddress;\n \n $isSent = sendConfirmationEmail($emailAddress);\n\n if ($isSent)\n {\n \n header(\"Location: /homePage.php\" . createSuccessAlert(\"Les modifications ont bien été prises en compte. Un mail de confirmation d'adresse mail vous a été envoyé.\"));\n }\n else\n {\n createFailureAlert(\"Les modifications ont bien été prises en compte. Le mail de réinitialisation n'a pas pu être envoyé.\");\n }\n }\n\n header(\"Location: /homePage.php\" . createSuccessAlert(\"Les modifications ont bien été prises en compte.\"));\n }\n }\n catch (Exception $e)\n {\n echo \"Une erreur est survenue : \", $e->getMessage(), \"\\n\";\n }\n}","title":""},{"docid":"27c410a051955a922abb311fd39ffb03","score":"0.44262105","text":"public function p_plowersignup() {\n\n $q = \"SELECT email\n FROM users \n WHERE email = '\" . $_POST['email'] . \"'\";\n\n $email_dupe = DB::instance(DB_NAME)->select_field($q);\n \n #If it does produce an error \n\n if($email_dupe){\n \n Router::redirect('/users/plowersignup/email_dupe');\n \n } \n\n #Otherwise proceed with sign up\n \n else {\n\n # Encrypt the password \n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n # Create an encrypted token via their email address and a random string\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n # Insert this user into the database\n $user = DB::instance(DB_NAME)->insert('users', $_POST);\n\n Router::redirect(\"/users/login/\");\n }\n }","title":""},{"docid":"6ff9f09cfaa18fcb3506e3b9ff3fc222","score":"0.44260266","text":"static public function uu( object $pp1, array $other=[]): string // *************** u u (\n {\n $AdminId = (int)$pp1->uriq->id ; //$AdminId = $_SESSION[\"userid\"];\n\n // 1. S U B M I T E D F L D V A L S - P R E U P D A T E\n list($AName, $AHeadline, $ABio, $Image, $Target) = self::get_submitted_uu() ;\n\n // 2. U U V A L I D A T I O N\n $err = '' ;\n switch (true) {\n //case (empty($PostTitle)): $err = \"Title Cant be empty\"; break ;\n case (strlen($AHeadline)>30): $err = \"Headline Should be max 30 characters\"; break ;\n case (strlen($ABio)>500): $err = \"Bio should be max 500 characters\"; break ;\n //default: break;\n }\n if ($err > '') {\n $_SESSION[\"ErrorMessage\"]= $err ;\n Config_allsites::Redirect_to($pp1->upd_user_loggedin);\n goto fnerr ; //exit(0) ;\n }\n\n // 3. U P D A T E D B T B L R O W\n // Query to Update u s e r in DB When everything is fine\n $flds = \"SET aname=:AName, aheadline=:AHeadline, abio=:ABio\" ;\n $qrywhere = \"WHERE id=:AdminId\" ;\n $binds = [\n ['placeh'=>':AName', 'valph'=>$AName, 'tip'=>'str']\n ,['placeh'=>':AHeadline', 'valph'=>$AHeadline, 'tip'=>'str']\n ,['placeh'=>':ABio', 'valph'=>$ABio, 'tip'=>'str']\n ,['placeh'=>':AdminId', 'valph'=>$AdminId, 'tip'=>'int']\n ] ;\n if (!empty($_FILES[\"Image\"][\"name\"])) {\n $flds .= \", aimage=:Image\" ;\n $binds[] = ['placeh'=>':Image', 'valph'=>$Image, 'tip'=>'str'] ;\n }\n\n $cursor = Db_allsites::uu(self::$tbl, $flds, $qrywhere, $binds\n //, $other=['caller' => __FILE__ .' '.', ln '. __LINE__]\n );\n\n if($cursor){ $_SESSION[\"SuccessMessage\"]=\"U s e r Updated Successfully\";\n }else {$_SESSION[\"ErrorMessage\"]= \"U s e r NOT Updated. Try Again !\";}\n\n // 4. U P L O A D I M A G E\n move_uploaded_file($_FILES[\"Image\"][\"tmp_name\"], $Target);\n\n return('1');\n fnerr:\n return('0');\n\n }","title":""},{"docid":"594337a505474ae685da56e223f18fc5","score":"0.44197235","text":"public function test_batchUpsertCatalogObjects() {\n $batches = [];\n\n $numObjects = 0;\n // TODO s/$batchNum < 1/$batchNum < 3/\n for ($batchNum = 0; $batchNum < 1; $batchNum++) {\n $batch = [];\n\n for($i = 0; $i < 100; $i++) {\n $itemId = sprintf(\"Item-%d-%d\", $batchNum, $i);\n\n $variationId = sprintf(\"#ItemVariation-%d-%d\", $batchNum, $i);\n array_push($batch, new \\SquareConnect\\Model\\CatalogObject([\n \"type\" => \"ITEM\",\n \"id\" => \"#\" . $itemId,\n \"item_data\" => [\n \"name\" => $itemId,\n \"variations\" => [\n [\n \"type\" => \"ITEM_VARIATION\",\n \"id\" => $variationId,\n \"item_variation_data\" => [\n \"name\" => \"Regular\",\n \"item_id\" => \"#\" . $itemId,\n \"pricing_type\" => \"VARIABLE_PRICING\"\n ]\n ]\n ]\n ]\n ]));\n $numObjects++;\n }\n array_push($batches, [\"objects\" => $batch]);\n }\n\n $request = new \\SquareConnect\\Model\\BatchUpsertCatalogObjectsRequest([\n \"idempotency_key\" => uniqid(),\n \"batches\" => $batches\n ]);\n $response = self::$api->batchUpsertCatalogObjects($request);\n\n $this->assertCount($numObjects, $response->getObjects());\n }","title":""},{"docid":"23d299e1fe973f0c6f146431c89a0592","score":"0.44193205","text":"function updateFromPack($lang=NULL)\r\n\t{\r\n\t\tglobal $db;\r\n\t\tif(!$lang)\r\n\t\t\t$lang = $this->lang;\r\n\t\t$file = BASEDIR.'/includes/langs/'.$lang.'.lang';\r\n\t\tif(file_exists($file))\r\n\t\t{\r\n\t\t\t$langData = file_get_contents($file);\r\n\t\t\t$phrases = json_decode($langData,true);\r\n\t\t\t//First lets delete all language phrases\r\n\t\t\t$db->delete(tbl(\"phrases\"),array(\"lang_iso\"),array($lang));\r\n\t\t\t//Now create query and then execute it\r\n\t\t\t$query = \"INSERT INTO \".tbl(\"phrases\").\"\r\n\t\t\t(`lang_iso` ,`varname` ,`text`)\r\n\t\t\tVALUES\";\r\n\t\t\t\r\n\t\t\t$count = 0;\r\n\t\t\tforeach($phrases as $key => $phrase)\r\n\t\t\t{\r\n\t\t\t\tif($count>0)\r\n\t\t\t\t\t$query .= \",\";\r\n\t\t\t\t$query .= \"('$lang', '$key', '\".addslashes($phrase).\"')\";\r\n\t\t\t\t$count++;\r\n\t\t\t}\r\n\t\t\t$query .= \";\";\r\n\t\t\t\r\n\t\t\t$db->Execute($query);\r\n\t\t}\r\n\t}","title":""},{"docid":"9a929d406911271480f8942d4920d259","score":"0.4414494","text":"public function testVariant11() {\n\n /* Setup\n ---------------------------------------------*/\n DbEntityHelper::setCon(self::$propelCon);\n\n list(\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\n ) = DbEntityHelper::setUpBonusMembers(true, [\n ]);\n\n $new = DbEntityHelper::createSignupMember($VL);\n\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\n $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS) +\n Transaction::getAmountForReason(Transaction::REASON_OL_BONUS) +\n Transaction::getAmountForReason(Transaction::REASON_PM_BONUS) +\n Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL2);\n // $trfOL += Transaction::getAmountForReason(Transaction::REASON_OL_BONUS);\n // $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS);\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\n // $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\n\n $this->assertTransferTotal($trfIT, $IT);\n $this->assertTransferTotal($trfVL, $VL);\n $this->assertTransferTotal($trfOL, $OL);\n $this->assertTransferTotal($trfPM, $PM);\n $this->assertTransferTotal($trfVS2, $VS2);\n $this->assertTransferTotal($trfVS1, $VS1);\n\n }","title":""},{"docid":"a1af99d81a2120cde152226541fd1ccd","score":"0.44045475","text":"public function test_elis_createorupdate_creates_student_enrolment() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/student.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n // Create the test class.\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $class->save();\n\n // Create the test user.\n $user = new user(array(\n 'username' => 'testuserusername',\n 'email' => 'test@useremail.com',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA'\n ));\n $user->save();\n\n // Run the student enrolment create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'class_testclassidnumber';\n $record->user_username = 'testuserusername';\n $record->completetime = 'Jan/01/2012';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('enrolment', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(student::TABLE, array(\n 'classid' => $class->id,\n 'userid' => $user->id,\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\n )));\n }","title":""},{"docid":"88de5e7ccb8c68395fb627cc1c153ad8","score":"0.43985716","text":"function test_update_existing() {\n\t}","title":""},{"docid":"9452069cb95852616082ca1e85a7ee25","score":"0.4386919","text":"public function test_modifyingmoodleuserupdatespmuser() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/admin/tool/uploaduser/locallib.php');\n $this->load_csv_data();\n\n // Update a record.\n $src = new stdClass;\n $src->id = 100;\n $src->firstname = 'Testuser';\n $src->lastname = 'One';\n $src->profile_field_sometext = 'boo';\n $src->profile_field_sometextfrompm = 'bla';\n $DB->update_record('user', $src);\n $mdluser = $DB->get_record('user', array('id' => 100));\n $mcopy = clone($src);\n $mcopy = uu_pre_process_custom_profile_data($mcopy);\n profile_save_data($mcopy);\n events_trigger('user_updated', $mdluser);\n\n // Read the PM user and compare.\n $retr = new user(103, null, array(), false, array());\n $retr->reset_custom_field_list();\n $this->assertEquals($mdluser->firstname, $retr->firstname);\n $this->assertEquals($mdluser->lastname, $retr->lastname);\n\n // Check custom fields.\n $result = new PHPUnit_Extensions_Database_DataSet_DefaultDataSet();\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_int::TABLE,\n $DB->get_recordset(field_data_int::TABLE, null, '', 'contextid, fieldid, data')));\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_char::TABLE,\n $DB->get_recordset(field_data_char::TABLE, null, '', 'contextid, fieldid, data')));\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_text::TABLE,\n $DB->get_recordset(field_data_text::TABLE, null, '', 'contextid, fieldid, data')));\n $usercontext = \\local_elisprogram\\context\\user::instance(103);\n $dataset = new PHPUnit_Extensions_Database_DataSet_CsvDataSet();\n $dataset->addTable(field_data_int::TABLE, elispm::file('tests/fixtures/user_field_data_int.csv'));\n $dataset->addTable(field_data_char::TABLE, elispm::file('tests/fixtures/user_field_data_char.csv'));\n $dataset->addTable(field_data_text::TABLE, elispm::file('tests/fixtures/user_field_data_text.csv'));\n $dataset = new PHPUnit_Extensions_Database_DataSet_ReplacementDataSet($dataset);\n $dataset->addFullReplacement('##USERCTXID##', $usercontext->id);\n $dataset->addFullReplacement('##USERCTXLVL##', CONTEXT_ELIS_USER);\n // Only the first text field should be changed; everything else should be the same.\n $dataset->addFullReplacement('First text entry field', $src->profile_field_sometext);\n $ret = $dataset->addFullReplacement('Second text entry field', $src->profile_field_sometextfrompm);\n\n $this->assertDataSetsEqual($dataset, $result);\n }","title":""},{"docid":"bca8378fd3bc823b94606a7653607692","score":"0.43822274","text":"public function test_version1importupdatesbasedonidentifyingfields() {\n global $CFG;\n\n // Set up our data.\n $this->run_core_user_import(array('idnumber' => 'rlipidnumber'));\n\n // Update based on username.\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'firstname' => 'setfromusername'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on email.\n $data = array(\n 'action' => 'update',\n 'email' => 'rlipuser@rlipdomain.com',\n 'firstname' => 'setfromemail'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on idnumber.\n $data = array(\n 'action' => 'update',\n 'idnumber' => 'rlipidnumber',\n 'firstname' => 'setfromidnumber'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on username, email.\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'email' => 'rlipuser@rlipdomain.com',\n 'firstname' => 'setfromusernameemail'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on username, idnumber.\n $data = array(\n 'action' => 'update',\n 'username' => 'rlipusername',\n 'idnumber' => 'rlipidnumber',\n 'firstname' => 'setfromusernameidnumber'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n\n // Update based on email, idnumber.\n $data = array(\n 'action' => 'update',\n 'email' => 'rlipuser@rlipdomain.com',\n 'idnumber' => 'rlipidnumber',\n 'firstname' => 'setfromemailidnumber'\n );\n $this->run_core_user_import($data, false);\n unset($data['action']);\n $data['mnethostid'] = $CFG->mnet_localhost_id;\n $this->assert_record_exists('user', $data);\n }","title":""},{"docid":"185f57ee28911c58a94861efc658a6e9","score":"0.4378387","text":"public function test_elis_createorupdate_creates_userset() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/userset.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Run the user set create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'cluster';\n $record->name = 'testusersetname';\n $record->display = 'testusersetdisplay';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(userset::TABLE, array(\n 'name' => 'testusersetname',\n 'display' => 'testusersetdisplay'\n )));\n }","title":""},{"docid":"33f0aef79efc84864e1986cac3048acf","score":"0.43720922","text":"public function syncWithProfile($profileId)\n {\n $addressCollectionId = Mage::helper('marketingsoftware/config')->getAddressesCollectionId(); \n \n if ($addressCollectionId) { \n Mage::helper('marketingsoftware/rest_request')->put(\n '/profile/'.$profileId.'/subprofiles/'.$addressCollectionId, $this->_getSubprofileData(), array(\n 'fields[]' => 'address_id=='.$this->_addressEntity->getId(),\n 'create' => 'true'\n )\n );\n \n return true;\n } else {\n return false;\n }\n }","title":""},{"docid":"f936c19ebfc5e644d50aefb4507d19e4","score":"0.43571404","text":"function test_overwrite() {\n $sub = new MockupSubscription();\n\n $sub->add(':', 'admin', 'digest', '123456789');\n $sub->add(':wiki:', 'admin', 'digest', '123456789');\n $sub->add(':', 'admin', 'digest', '1234');\n $sub->add(':wiki:', 'admin', 'digest', '1234');\n\n $subscriptions = $sub->subscribers(':wiki:', 'admin');\n\n $this->assertCount(1, $subscriptions[':'], 'More than one subscription saved for the root namespace even though the old one should have been overwritten.');\n $this->assertCount(1, $subscriptions[':wiki:'], 'More than one subscription saved for the wiki namespace even though the old one should have been overwritten.');\n $this->assertCount(2, $subscriptions, 'Didn\\'t find the expected two subscriptions');\n }","title":""},{"docid":"dd0852c1f3faacd98b6e268b3dfd7973","score":"0.43519944","text":"protected function registerProfiles() {\n // Generate Variable Profiles \n\t\t \n\t \t//--- Boolean (Type 0)\n\t\t \n\t \t//--- Integer (Type 1)\n if ( !IPS_VariableProfileExists('RCTPOWER_Ampere') ) {\n IPS_CreateVariableProfile('RCTPOWER_Ampere', 1 );\n \tIPS_SetVariableProfileDigits('RCTPOWER_Ampere', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Ampere', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Ampere', \"\", \" A\" );\n }\n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_Voltage') ) {\n IPS_CreateVariableProfile('RCTPOWER_Voltage', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Voltage', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Voltage', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Voltage', \"\", \" V\" );\n } \n \n if ( !IPS_VariableProfileExists('RCTPOWER_Power') ) {\n IPS_CreateVariableProfile('RCTPOWER_Power', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Power', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Power', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Power', \"\", \" W\" );\n } \n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_Energy') ) {\n IPS_CreateVariableProfile('RCTPOWER_Energy', 1 );\n IPS_SetVariableProfileDigits('RCTPOWER_Energy', 0 );\n IPS_SetVariableProfileIcon('RCTPOWER_Energy', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_Energy', \"\", \" Wh\" );\n } \n\t\t \n //--- Float (Type 2)\n if ( !IPS_VariableProfileExists('RCTPOWER_Capacity.2') ) {\n IPS_CreateVariableProfile('RCTPOWER_Capacity.2', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_Capacity.2', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_Capacity.2', 'Battery' );\n IPS_SetVariableProfileText('RCTPOWER_Capacity.2', \"\", \" kWh\" );\n }\n \n if ( !IPS_VariableProfileExists('RCTPOWER_SoC.1') ) {\n IPS_CreateVariableProfile('RCTPOWER_SoC.1', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_SoC.1', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_SoC.1', 'Battery' );\n IPS_SetVariableProfileText('RCTPOWER_SoC.1', \"\", \" %\" );\n }\n\t\t \n if ( !IPS_VariableProfileExists('RCTPOWER_PVPower.2') ) {\n IPS_CreateVariableProfile('RCTPOWER_PVPower.2', 2 );\n IPS_SetVariableProfileDigits('RCTPOWER_PVPower.2', 2 );\n IPS_SetVariableProfileIcon('RCTPOWER_PVPower.2', 'Electricity' );\n IPS_SetVariableProfileText('RCTPOWER_PVPower.2', \"\", \" kWp\" );\n }\n\t\t \n\t \t\t//--- String (Type 3)\n\t\t \n }","title":""},{"docid":"c965b3d986e82ecb4a2b2c67e28eb7a4","score":"0.4342288","text":"public function upgradeAuProperties() : void {\n $callback = function ($row) {\n $property = new AuProperty();\n $property->setParent($this->findEntity(AuProperty::class, $row['parent_id']));\n $property->setAu($this->findEntity(Au::class, $row['au_id']));\n $property->setPropertyKey($row['property_key']);\n $property->setPropertyValue($row['property_value']);\n\n return $property;\n };\n $this->upgradeTable('au_properties', $callback);\n }","title":""},{"docid":"ef1b02fd41b7751f0264be731d4b7c14","score":"0.43302292","text":"public function testHeCanUpdateProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::factory()->create())\n ->visit('/user/profile')\n ->type('@name', 'Edited')\n ->type('@phone', '0606070708')\n ->type('@email', 'edited@test.fr')\n ->click('@submit')\n ->waitForText('Enregistré')\n ->refresh()\n ->assertInputValue('@name', 'Edited')\n ->assertInputValue('@phone', '0606070708')\n ->assertInputValue('@email', 'edited@test.fr');\n });\n }","title":""},{"docid":"2be25cafecc0594016a39f953149df57","score":"0.4326639","text":"private function loadProfilesFromFile() {\n $this->profiles = json_decode(file_get_contents(D3P_DATAFILE));\n\t}","title":""},{"docid":"f7a371ae83e1a5d8b0d05b7288982955","score":"0.43233198","text":"public function testPropertyPurposeInsertionInDb()\n {\n $this->seeInDatabase('property_purposes', ['purpose' =>'usa']);\n }","title":""},{"docid":"8925936133b3b13e0a0375e569e2527c","score":"0.43198892","text":"public function testTranscripts()\n {\n }","title":""},{"docid":"3fce8461adc071f4d24831d56ee98479","score":"0.4315168","text":"public function usersignup($email,$password ,$otp)\n {\n \t$users = new Users();\n \treturn $result = $users->usersignup($email, $password ,$otp);\n \n }","title":""},{"docid":"ae47e6e7f805c07147cad372aac53c3c","score":"0.43149284","text":"function ups() {\n $this->code = 'ups';\n $this->version = '1.0';\n }","title":""},{"docid":"e6dfd7d39ce65330aa489bd90e527026","score":"0.4309657","text":"function TransferModuleProfiles()\n {\n foreach (array_keys($this->ModuleDependencies) as $module)\n {\n $class=$this->ApplicationClass;\n\n $mhash=array\n (\n \"ReadOnly\" => $this->ReadOnly,\n \"DBHash\" => $this->DBHash,\n \"LoginType\" => $this->LoginType,\n \"LoginData\" => $this->LoginData,\n \"LoginID\" => $this->LoginID,\n \"AuthHash\" => $this->AuthHash,\n \"ModuleName\" => $module,\n \"SqlTable\" => $this->SqlTable,\n \"SqlTableVars\" => $this->SqlTableVars,\n \"DefaultAction\" => $this->DefaultAction,\n \"DefaultProfile\" => $this->DefaultProfile,\n \"Profile\" => $this->Profile,\n \"ModuleLevel\" => 1,\n \"CompanyHash\" => $this->CompanyHash,\n \"MailInfo\" => $this->ApplicationObj()->MyApp_Mail_Info_Get(),\n \"URL_CommonArgs\" => $this->URL_CommonArgs,\n \"MySqlActions\" => $this->MySqlActions,\n \"Handle\" => FALSE,\n );\n\n if (isset($this->Period))\n {\n $mhash[ \"Period\" ]=$this->Period;\n }\n\n $object=new $class ($mhash);\n $object->InitModule($module,array(),FALSE);\n\n $object->Module->TransferProfiles();\n }\n }","title":""},{"docid":"c681f4b4b80b7086ebc4b165dde001a6","score":"0.4301642","text":"public function test_version1importsetsdefaultsonusercreate() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/core/lib/setup.php');\n\n set_config('forcetimezone', 99);\n\n // Make sure we are not auto-assigning idnumbers.\n set_config('auto_assign_user_idnumber', 0, 'elis_program');\n elis::$config = new elis_config();\n\n $this->run_core_user_import(array());\n\n $select = \"username = :username AND\n mnethostid = :mnethostid AND\n auth = :auth AND\n maildigest = :maildigest AND\n autosubscribe = :autosubscribe AND\n trackforums = :trackforums AND\n timezone = :timezone AND\n theme = :theme AND\n lang = :lang AND\n {$DB->sql_compare_text('description')} = :description AND\n idnumber = :idnumber AND\n institution = :institution AND\n department = :department\";\n $params = array(\n 'username' => 'rlipusername',\n 'mnethostid' => $CFG->mnet_localhost_id,\n 'auth' => 'manual',\n 'maildigest' => 0,\n 'autosubscribe' => 1,\n 'trackforums' => 0,\n 'timezone' => 99,\n 'theme' => '',\n 'lang' => $CFG->lang,\n 'description' => '',\n 'idnumber' => '',\n 'institution' => '',\n 'department' => ''\n );\n\n $exists = $DB->record_exists_select('user', $select, $params);\n\n $this->assertEquals($exists, true);\n }","title":""},{"docid":"8b4d51e3807f64419229c4e31c0e13d2","score":"0.42880878","text":"public function testBindersAddProfilesToBinder()\n {\n }","title":""},{"docid":"55e1f2b192fd61d78d65d9645fef9ba4","score":"0.4287313","text":"protected function initializeUpdateProfileAction()\n {\n $propertyMappingConfiguration = $this->arguments['communityUser']->getPropertyMappingConfiguration();\n $uploadConfiguration = array(\n UploadedFileReferenceConverter::CONFIGURATION_ALLOWED_FILE_EXTENSIONS => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],\n UploadedFileReferenceConverter::CONFIGURATION_UPLOAD_FOLDER => '1:/userimages/',\n );\n $propertyMappingConfiguration->allowAllProperties();\n $propertyMappingConfiguration->forProperty('falImage')\n ->setTypeConverterOptions(\n 'Visol\\\\Easyvote\\\\Property\\\\TypeConverter\\\\UploadedFileReferenceConverter',\n $uploadConfiguration\n );\n $propertyMappingConfiguration->forProperty('birthdate')->setTypeConverterOption('TYPO3\\\\CMS\\\\Extbase\\\\Property\\\\TypeConverter\\\\DateTimeConverter', \\TYPO3\\CMS\\Extbase\\Property\\TypeConverter\\DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'd.m.Y');\n }","title":""},{"docid":"af753cad1d5a8511cc5c0e971624bb9a","score":"0.42807645","text":"public function testSubscriptionIsAltered()\n {\n $this->testUser->subscription('main')->features()->create(['tag' => 'social_dog_profiles', 'name' => 'Social profiles available for your dog', 'value' => 2, 'sort_order' => 25]);\n $this->assertTrue($this->testUser->subscription('main')->isAltered());\n }","title":""},{"docid":"3039c8fdafa2c80eaf2c6f60798cb24b","score":"0.42790192","text":"public function installProfile($profile, $languages) {\n if (!$this->hasRequirementsMet($profile)) {\n throw new ZiboException('Could not install profile ' . $profile . ': The requirements are not met.');\n }\n\n $client = ClientModule::getClient();\n if (!$client) {\n throw new ZiboException('Could not install profile ' . $profile . ': The repository client is not properly configured.');\n }\n\n // install the necessairy modules\n $profile = $this->getProfile($profile);\n $modules = $profile->getModules();\n\n foreach ($modules as $module) {\n $client->installModule($module->getNamespace(), $module->getName());\n }\n\n // install the extra languages\n foreach ($languages as $languageCode) {\n if ($languageCode == 'en') {\n continue;\n }\n\n $client->installModule('zibo', 'l10n.' . $languageCode);\n }\n\n $profile->install();\n }","title":""},{"docid":"657da10a59c3695da200ef5c88a2b98f","score":"0.4276525","text":"public function saveProfile() {\n if($this->profile) {\n foreach($this->profile as $prop => $value){\n $questionValue = new ProfileQuestionValue(array(\n 'question' => $prop,\n 'userId' => $this->id,\n 'value' => $value\n ));\n\n $questionValue->save();\n }\n }\n }","title":""},{"docid":"c4b5d828f024cfd04b62b2b11f2b8ae6","score":"0.42693198","text":"public function testPeppolPostParticipant()\n {\n }","title":""},{"docid":"e4eab28ee4b40d67a3c0e17cfc876940","score":"0.42669758","text":"public function testGenericPut() {\r\n\r\n $preference_data = array(\r\n \"items\" => array(\r\n array(\r\n \"title\" => \"test2\",\r\n \"quantity\" => 1,\r\n \"currency_id\" => \"ARS\",\r\n \"unit_price\" => 20.55\r\n )\r\n )\r\n );\r\n\r\n $request = array(\r\n \"uri\" => \"/checkout/preferences\",\r\n \"data\" => $preference_data\r\n );\r\n\r\n $preference = $this->mp->post($request);\r\n\r\n // Start updating\r\n\r\n $preference_data = array(\r\n \"items\" => array(\r\n array(\r\n \"title\" => \"test2Modified\",\r\n \"quantity\" => 2,\r\n \"currency_id\" => \"USD\",\r\n \"unit_price\" => 100\r\n )\r\n )\r\n );\r\n\r\n $request = array(\r\n \"uri\" => \"/checkout/preferences/\".$preference[\"response\"][\"id\"],\r\n \"data\" => $preference_data\r\n );\r\n\r\n $preferenceUpdatedResult = $this->mp->put($request);\r\n\r\n $this->assertTrue($preferenceUpdatedResult[\"status\"] == 200);\r\n\r\n $preferenceUpdatedResult = $this->mp->get_preference($preference[\"response\"][\"id\"]);\r\n\r\n $this->assertTrue((double) $preferenceUpdatedResult[\"response\"][\"items\"][0][\"unit_price\"] == 100\r\n && (double) $preferenceUpdatedResult[\"response\"][\"items\"][0][\"quantity\"] == 2\r\n && $preferenceUpdatedResult[\"response\"][\"items\"][0][\"title\"] == \"test2Modified\"\r\n && $preferenceUpdatedResult[\"response\"][\"items\"][0][\"currency_id\"] == \"USD\");\r\n }","title":""},{"docid":"cb4a774d5b2bd3015478b9e18977f64d","score":"0.42598513","text":"public function test_version1importsupportsuserupdate() {\n $supports = plugin_supports('rlipimport', 'version1', 'user_update');\n $requiredfields = array(array('user_username', 'user_email', 'user_idnumber', 'idnumber', 'username', 'email'));\n $this->assertEquals($supports, $requiredfields);\n }","title":""},{"docid":"2c0acb297b2c186dd763e1ec916e2ff2","score":"0.42533287","text":"function copy()\n\t{\n\t\t$model =& $this->getModel('profiles');\n\t\tif($model->copy())\n\t\t{\n\t\t\t// Show a \"COPY OK\" message\n\t\t\t$message = JText::_('PROFILE_COPY_OK');\n\t\t\t$type = 'message';\n\t\t\t$this->_switchProfile( $model->getId() );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Show message on failure\n\t\t\t$message = JText::_('PROFILE_COPY_ERROR');\n\t\t\t$message .= ' ['.$model->getError().']';\n\t\t\t$type = 'error';\n\t\t}\n\t\t// Redirect\n\t\t$this->setRedirect('index.php?option='.JRequest::getCmd('option').'&view='.JRequest::getCmd('view'), $message, $type);\n\t}","title":""},{"docid":"8068d22ce86b12c23de4be6f740648e8","score":"0.4251271","text":"private function userProfileUpdate(){\n }","title":""},{"docid":"069d782dcf27c197bd0cb1b150982a69","score":"0.4241197","text":"public function testVariant10() {\n\n /* Setup\n ---------------------------------------------*/\n DbEntityHelper::setCon(self::$propelCon);\n\n list(\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\n ) = DbEntityHelper::setUpBonusMembers(true, [\n 'VL' => false,\n 'OL' => false,\n ]);\n\n $new = DbEntityHelper::createSignupMember($PM);\n\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\n // $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS);\n // $trfOL += Transaction::getAmountForReason(Transaction::REASON_OL_BONUS);\n $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS) +\n Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL2);\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\n // $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\n\n $this->assertTransferTotal($trfIT, $IT);\n // $this->assertTransferTotal($trfVL, $VL);\n // $this->assertTransferTotal($trfOL, $OL);\n $this->assertTransferTotal($trfPM, $PM);\n $this->assertTransferTotal($trfVS2, $VS2);\n $this->assertTransferTotal($trfVS1, $VS1);\n\n }","title":""},{"docid":"d614980646705447fe4d5bc0c7beaa75","score":"0.4239977","text":"public function __construct(UserProfile $oldProfile, UserProfile $newProfile)\n {\n $this->oldProfile = $oldProfile;\n $this->newProfile = $newProfile;\n $this->subject(\"Обновлен профиль с id: \".$oldProfile->id);\n }","title":""},{"docid":"91d8d778c8a6537b9c1bfe161ffe5a9b","score":"0.42397067","text":"public function update(){\n\t\n\t\t$email = $this->auth->get_info()->email;\n\t\t\n\t\t$data = array(\n\t\t\t'address'=> $this->input->post('inputProfileAddress'),\n\t\t\t'description' => $this->input->post('inputProfileAbout'),\n\t\t\t'edu_history' => $this->input->post('inputProfileEducation'),\n\t\t\t'work_history' => $this->input->post('inputProfileWork'),\n\t\t\t'skills' => $this->input->post('inputSkills'),\n\t\t\t'interest_area' => $this->input->post('inputInterest'),\n\t\t\t'location_pref' => $this->input->post('inputLocation'),\n\t\t);\n\t\t$this -> resume_profile_model -> update($email,$data); \n\t\t$this -> index();\t\n\t}","title":""},{"docid":"357a3497a4774de618d823137fc109b6","score":"0.42364475","text":"public function test_mapping_applied_during_instructor_enrolment_update() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\n\n $this->init_mapping();\n\n $userid = $this->create_test_user();\n\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => ''\n ));\n $course->save();\n\n $pmclass = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\n $pmclass->save();\n\n $instructor = new instructor(array('classid' => $pmclass->id, 'userid' => $userid));\n $instructor->save();\n\n // Run the instructor enrolment update action.\n $record = new stdClass;\n $record->customaction = 'update';\n $record->customcontext = 'class_testclassidnumber';\n $record->customuser_username = 'testuserusername';\n $record->customuser_email = 'test@useremail.com';\n $record->customuser_idnumber = 'testuseridnumber';\n $record->customassigntime = 'Jan/02/2012';\n $record->customcompletetime = 'Jan/02/2012';\n $record->customrole = 'instructor';\n\n $this->run_enrolment_import((array)$record);\n\n // Validation.\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\n 'classid' => $pmclass->id,\n 'userid' => $userid,\n 'assigntime' => rlip_timestamp(0, 0, 0, 1, 2, 2012),\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\n )));\n }","title":""},{"docid":"e44829ae38b5dc30d42b36ce14b87645","score":"0.4234921","text":"public function postUp()\n\t{\n\t}","title":""},{"docid":"0b4a000c55467805cd129d634f05f5c1","score":"0.42304605","text":"public function safeUp()\n {\n $this->insert($this->tableName, [\n 'label' => 'укр',\n 'code' => 'ua',\n 'locale' => 'uk',\n 'visible' => 1,\n 'position' => 0,\n 'created' => date('Y-m-d H:i:s'),\n 'modified' => date('Y-m-d H:i:s'),\n ]);\n }","title":""}],"string":"[\n {\n \"docid\": \"26eaf97c06b1d0a1a5b618bd6349c841\",\n \"score\": \"0.6128322\",\n \"text\": \"public function testPredefinedProfilesUpdatePredefinedProfile()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91d63cada85506c340b3fcd02ad87057\",\n \"score\": \"0.5678561\",\n \"text\": \"public function testPredefinedProfilesWritePredefinedProfile()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9d4ba3fcfca9424531d2cd7046cd2ce\",\n \"score\": \"0.54589295\",\n \"text\": \"public function testReviewUpsert()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54ba9f811dbfaf0e93b7283ec45fd572\",\n \"score\": \"0.5453141\",\n \"text\": \"public function testLanguageProfilesDelete()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27d6e5e5daffbda86459b473a7e2faab\",\n \"score\": \"0.5409647\",\n \"text\": \"public function testGetLanguageProfilesList()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"789faa9c5c0c681d4bfe306cbbc0615e\",\n \"score\": \"0.5402988\",\n \"text\": \"public function test_version1importsetsuserprofilefieldsonupdate() {\\n global $CFG, $DB;\\n\\n // Perform default \\\"user create\\\" import.\\n $this->run_core_user_import(array());\\n\\n // Create custom field category.\\n $category = new stdClass;\\n $category->sortorder = $DB->count_records('user_info_category') + 1;\\n $category->id = $DB->insert_record('user_info_category', $category);\\n\\n // Create custom profile fields.\\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id, 2000, 3000);\\n $this->create_profile_field('rliplegacydatetime', 'datetime', $category->id, 2000, 3000);\\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \\\"rlipoption1\\\\nrlipoption2\\\");\\n $this->create_profile_field('rliptextarea', 'textarea', $category->id);\\n $this->create_profile_field('rliptext', 'text', $category->id);\\n\\n // Run import.\\n $data = array();\\n $data['action'] = 'update';\\n $data['username'] = 'rlipusername';\\n $data['profile_field_rlipcheckbox'] = '1';\\n $data['profile_field_rlipdatetime'] = 'jan/12/2011';\\n $data['profile_field_rliplegacydatetime'] = '1/12/2011';\\n $data['profile_field_rlipmenu'] = 'rlipoption1';\\n $data['profile_field_rliptextarea'] = 'rliptextarea';\\n $data['profile_field_rliptext'] = 'rliptext';\\n\\n $this->run_core_user_import($data, false);\\n\\n // Fetch the user and their profile field data.\\n $user = $DB->get_record('user', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\\n profile_load_data($user);\\n fix_moodle_profile_fields($user);\\n\\n // Validate data.\\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), true);\\n $this->assertEquals($user->profile_field_rlipcheckbox, 1);\\n $this->assertEquals(isset($user->profile_field_rlipdatetime), true);\\n $this->assertEquals($user->profile_field_rlipdatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\\n $this->assertEquals(isset($user->profile_field_rliplegacydatetime), true);\\n $this->assertEquals($user->profile_field_rliplegacydatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\\n $this->assertEquals(isset($user->profile_field_rlipmenu), true);\\n $this->assertEquals($user->profile_field_rlipmenu, 'rlipoption1');\\n $this->assertEquals(isset($user->profile_field_rliptextarea['text']), true);\\n $this->assertEquals($user->profile_field_rliptextarea['text'], 'rliptextarea');\\n $this->assertEquals(isset($user->profile_field_rliptext), true);\\n $this->assertEquals($user->profile_field_rliptext, 'rliptext');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c74455067248c277b7ec84854ecb260c\",\n \"score\": \"0.53937846\",\n \"text\": \"public function testPredefinedProfilesGetNew()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9c72b3005afa438f642d39c0ed0588d\",\n \"score\": \"0.52417797\",\n \"text\": \"public function test_version1importvalidatesprofilefieldsonupdate() {\\n global $CFG, $DB;\\n\\n // Run the \\\"create user\\\" import.\\n $this->run_core_user_import(array());\\n\\n $userid = $DB->get_field('user', 'id', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\\n\\n // Create the category.\\n $category = new stdClass;\\n $category->sortorder = $DB->count_records('user_info_category') + 1;\\n $category->id = $DB->insert_record('user_info_category', $category);\\n\\n // Try to insert bogus checkbox data.\\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'profile_field_rlipcheckbox' => '2'\\n );\\n $this->run_core_user_import($params);\\n $user = new stdClass;\\n $user->id = $userid;\\n profile_load_data($user);\\n fix_moodle_profile_fields($user);\\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\\n\\n // Try to insert bogus datetime data.\\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id);\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'profile_field_rlipdatetime' => '1000000000'\\n );\\n $this->run_core_user_import($params);\\n $user = new stdClass;\\n $user->id = $userid;\\n profile_load_data($user);\\n fix_moodle_profile_fields($user);\\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\\n\\n // Try to insert bogus menu data.\\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \\\"rlipoption1\\\\nrlipoption1B\\\");\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'profile_field_rlipmenu' => 'rlipoption2'\\n );\\n $this->run_core_user_import($params);\\n $user = new stdClass;\\n $user->id = $userid;\\n profile_load_data($user);\\n fix_moodle_profile_fields($user);\\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), false);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0aaebc4a883f3e09f549775ecadbf85\",\n \"score\": \"0.51919633\",\n \"text\": \"public function testPredefinedProfilesClone()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3ff17da63ec550d2062ef63dc5767c1\",\n \"score\": \"0.51858735\",\n \"text\": \"public function testGetLanguageProfilesGet()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f6c25332f44c2e5e879b457a1f6bae6\",\n \"score\": \"0.5164209\",\n \"text\": \"function testUpdateSettingUserTasksSettingCommand_MutilEntries_ExistingMutilUsersProfile() {\\n\\t\\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\\n\\t\\tif (!file_exists($this->_path)) {\\n\\t\\t\\tmkdir($this->_path);\\n\\t\\t\\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\\n\\t\\t}else\\n\\t\\t{\\n\\t\\t\\tself::recursiveDelete($this->_path);\\n\\t\\t\\tmkdir($this->_path);\\n\\t\\t\\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\\n\\t\\t}\\n\\t\\t$sourceConfigFile = TEST_PATH. \\\"/lfdictionary/data/template\\\" . LANGUAGE_FORGE_SETTINGS . \\\"user1.WeSayConfig\\\";\\n\\n\\t\\t// create 3 user profile\\n\\t\\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \\\"/user1.WeSayConfig\\\";\\n\\t\\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\\n// \\t\\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \\\"/user2.WeSayConfig\\\";\\n// \\t\\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\\n// \\t\\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \\\"/user3.WeSayConfig\\\";\\n// \\t\\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\\n\\n\\t\\t$userName=array();\\n\\t\\t$userName[]=\\\"user1\\\";\\n// \\t\\t$userName[]=\\\"user2\\\";\\n// \\t\\t$userName[]=\\\"user3\\\";\\n\\n\\t\\t$lexProjectMockObject = new LexProjectMockObject();\\n\\t\\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\\n\\t\\t$command->execute();\\n\\n\\t\\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\\\"user1\\\");\\n\\t\\t$result = $command->execute();\\n\\t\\t$this->assertEqual(count($result[\\\"tasks\\\"][\\\"task\\\"]), 11);\\n\\t\\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\\n\\n// \\t\\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\\\"user2\\\");\\n// \\t\\t$result = $command->execute();\\n// \\t\\t$this->assertEqual(count($result[\\\"tasks\\\"][\\\"task\\\"]), 11);\\n// \\t\\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\\n\\n\\n// \\t\\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\\\"user3\\\");\\n// \\t\\t$result = $command->execute();\\n// \\t\\t$this->assertEqual(count($result[\\\"tasks\\\"][\\\"task\\\"]), 11);\\n// \\t\\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\\n\\n\\t\\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\\\"/*.WeSayConfig\\\");\\n\\n\\t\\t$isPatchincludeDefault = false;\\n\\n\\t\\tforeach ($filePaths as $file) {\\n\\t\\t\\tif ($this::endsWith($file, \\\"/\\\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\\n\\t\\t\\t\\t$isPatchincludeDefault = true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tif ($isPatchincludeDefault){\\n\\t\\t\\t$this->assertEqual(count($filePaths),4);\\n\\t\\t}else{\\n\\t\\t\\t$this->assertEqual(count($filePaths),1);\\n\\t\\t}\\n\\n\\n\\t\\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d63047349f130a3b9e33ce8ced20dd89\",\n \"score\": \"0.50178206\",\n \"text\": \"public function test_version1importpreventsinvaliduserlangonupdate() {\\n global $DB, $CFG;\\n\\n $this->run_core_user_import(array());\\n\\n $data = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'lang' => '12'\\n );\\n\\n $this->run_core_user_import($data, false);\\n\\n // Make sure the data hasn't changed.\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'lang' => $CFG->lang\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43cbdc0e4241288e90aebb05c35b0c63\",\n \"score\": \"0.4998867\",\n \"text\": \"function testUpdateSettingUserTasksSettingCommand_MutilEntries_NonExistingMutilUsersProfile() {\\n\\t\\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\\n\\t\\tif (!file_exists($this->_path)) {\\n\\t\\t\\tmkdir($this->_path);\\n\\t\\t\\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\\n\\t\\t}else\\n\\t\\t{\\n\\t\\t\\tself::recursiveDelete($this->_path);\\n\\t\\t\\tmkdir($this->_path);\\n\\t\\t\\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\\n\\t\\t}\\n\\t\\t$sourceConfigFile = TEST_PATH. \\\"/lfdictionary/data/template\\\" . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\\n\\n\\t\\t// copy default profile\\n\\t\\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\\n\\t\\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\\n\\t\\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\\\"/*.WeSayConfig\\\");\\n\\t\\tforeach ($filePaths as $file) {\\n\\t\\t\\tif ($this::endsWith($file, \\\"/\\\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\\n\\t\\t\\t\\t$isPatchincludeDefault = true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tif ($isPatchincludeDefault){\\n\\t\\t\\t$this->assertEqual(count($filePaths),1);\\n\\t\\t}else{\\n\\t\\t\\t$this->assertEqual(count($filePaths),0);\\n\\t\\t}\\n\\n\\n\\t\\t$userName=array();\\n\\t\\t$userName[]=\\\"user1\\\";\\n// \\t\\t$userName[]=\\\"user2\\\";\\n// \\t\\t$userName[]=\\\"user3\\\";\\n\\t\\t$lexProjectMockObject = new LexProjectMockObject();\\n\\t\\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\\n\\t\\t$command->execute();\\n\\n\\t\\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\\\"user1\\\");\\n\\t\\t$result = $command->execute();\\n\\t\\t$this->assertEqual(count($result[\\\"tasks\\\"][\\\"task\\\"]), 11);\\n\\t\\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\\n\\n// \\t\\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\\\"user2\\\");\\n// \\t\\t$result = $command->execute();\\n// \\t\\t$this->assertEqual(count($result[\\\"tasks\\\"][\\\"task\\\"]), 11);\\n// \\t\\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\\n\\n\\n// \\t\\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\\\"user3\\\");\\n// \\t\\t$result = $command->execute();\\n// \\t\\t$this->assertEqual(count($result[\\\"tasks\\\"][\\\"task\\\"]), 11);\\n// \\t\\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\\n\\n\\t\\t$filePaths = glob($lexProjectMockObject->getLanguageForgeSetting() .\\\"/*.WeSayConfig\\\");\\n\\t\\t$isPatchincludeDefault = false;\\n\\n\\t\\tforeach ($filePaths as $file) {\\n\\t\\t\\tif ($this::endsWith($file, \\\"/\\\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\\n\\t\\t\\t\\t$isPatchincludeDefault = true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tif ($isPatchincludeDefault){\\n\\t\\t\\t$this->assertEqual(count($filePaths),2);\\n\\t\\t}else{\\n\\t\\t\\t$this->assertEqual(count($filePaths),1);\\n\\t\\t}\\n\\n\\n\\t\\tself::recursiveDelete($this->_path);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95de63e90d27e813460a0f486efab915\",\n \"score\": \"0.4949924\",\n \"text\": \"public function testDodgyUpsertParams()\\n {\\n $this->createBasicStore()->upsert([null, FALSE, TRUE, new stdClass()]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce1e75f944970a77cd131115e3b60b81\",\n \"score\": \"0.4917661\",\n \"text\": \"public function test_likeUpsert() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ac5feab510809243489183f1ec78049\",\n \"score\": \"0.48938617\",\n \"text\": \"public function testPredefinedProfilesGet()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef0c32ffc993fa02e404bee8474fceb4\",\n \"score\": \"0.48782527\",\n \"text\": \"function saveFirstPreferences($username, $lang_preferences, $topic_preferences)\\n{\\n\\n\\tglobal $db;\\n\\n $lang_query = \\\"INSERT INTO user_lang\\n (username, lang_1, lang_2, lang_3)\\n VALUES \\n (:username, :lang_1, :lang_2, :lang_3)\\n ON DUPLICATE KEY UPDATE\\n lang_1 = :lang_1,\\n lang_2 = :lang_2,\\n lang_3 = :lang_3\\\";\\n\\n $statement = $db->prepare($lang_query);\\n $statement->bindValue(':lang_1',$lang_preferences[0]);\\n $statement->bindValue(':lang_2',$lang_preferences[1]);\\n $statement->bindValue(':lang_3',$lang_preferences[2]);\\n $statement->bindValue(':username',$username);\\n\\t$statement->execute();\\n\\n $topic_query = \\\"INSERT INTO user_topic\\n (username, topic_1, topic_2, topic_3)\\n VALUES \\n (:username, :topic_1, :topic_2, :topic_3)\\n ON DUPLICATE KEY UPDATE\\n topic_1 = :topic_1,\\n topic_2 = :topic_2,\\n topic_3 = :topic_3\\\";\\n $statement = $db->prepare($topic_query);\\n $statement->bindValue(':topic_1',$topic_preferences[0]);\\n $statement->bindValue(':topic_2',$topic_preferences[1]);\\n $statement->bindValue(':topic_3',$topic_preferences[2]);\\n $statement->bindValue(':username',$username);\\n\\t$statement->execute();\\n\\n\\t$statement->closeCursor();\\t\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e8cee28539d3eda498f6f560d285d93\",\n \"score\": \"0.48683143\",\n \"text\": \"public function testPredefinedProfilesDeletePredefinedProfile()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94a1101d0a4bd10452afdc36bac4f480\",\n \"score\": \"0.48557958\",\n \"text\": \"public function updateProfile() : AffiliateProfile;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74321016af433bb4211a9b11f5bc6619\",\n \"score\": \"0.48381144\",\n \"text\": \"public function testEtfsProfile()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aca4538c8a8e8cad48ed29ac436879e0\",\n \"score\": \"0.48005694\",\n \"text\": \"public function test_elis_createorupdate_supports_underscores() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\\n require_once(elispm::lib('data/course.class.php'));\\n require_once(elispm::lib('data/pmclass.class.php'));\\n require_once(elispm::lib('data/student.class.php'));\\n require_once(elispm::lib('data/user.class.php'));\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Create the test course.\\n $course = new course(array(\\n 'name' => 'testcoursename',\\n 'idnumber' => 'testcourseidnumber',\\n 'syllabus' => ''\\n ));\\n $course->save();\\n\\n // Create the test class.\\n $class = new pmclass(array(\\n 'courseid' => $course->id,\\n // Idnumber has an underscore in it.\\n 'idnumber' => 'testclass_idnumber'\\n ));\\n $class->save();\\n\\n // Create the test user.\\n $user = new user(array(\\n 'username' => 'testuserusername',\\n 'email' => 'test@useremail.com',\\n 'idnumber' => 'testuseridnumber',\\n 'firstname' => 'testuserfirstname',\\n 'lastname' => 'testuserlastname',\\n 'country' => 'CA'\\n ));\\n $user->save();\\n\\n // Set up an existing enrolment.\\n $student = new student(array(\\n 'userid' => $user->id,\\n 'classid' => $class->id,\\n 'completestatusid' => student::STUSTATUS_FAILED\\n ));\\n $student->save();\\n\\n // Import the record, with create acting as an update.\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->context = 'class_testclass_idnumber';\\n $record->user_idnumber = 'testuseridnumber';\\n $record->completestatusid = student::STUSTATUS_PASSED;\\n\\n $importplugin->process_record('enrolment', $record, 'bogus');\\n\\n // Validation.\\n $this->assertEquals(1, $DB->count_records(student::TABLE));\\n $params = array(\\n 'userid' => $user->id,\\n 'classid' => $class->id,\\n 'completestatusid' => student::STUSTATUS_PASSED\\n );\\n $exists = $DB->record_exists(student::TABLE, $params);\\n $this->assertTrue($exists);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46148e071cee513bb0bda23a69172225\",\n \"score\": \"0.4781433\",\n \"text\": \"private function saveProfiles() {\\n switch(D3P_STORAGE) {\\n\\t case 'file':\\n\\t $this->saveProfilesToFile();\\n\\t break;\\n }\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1123540895dba458b553cbb5b448fd3\",\n \"score\": \"0.47765467\",\n \"text\": \"function testUpdateSettingUserTasksSettingCommand_MutilEntries_NonExistingSingleUserProfile() {\\n\\t\\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\\n\\t\\tif (!file_exists($this->_path)) {\\n\\t\\t\\tmkdir($this->_path);\\n\\t\\t\\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\\n\\t\\t}else\\n\\t\\t{\\n\\t\\t\\tself::recursiveDelete($this->_path);\\n\\t\\t\\tmkdir($this->_path);\\n\\t\\t\\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\\n\\t\\t}\\n\\t\\t$sourceConfigFile = TEST_PATH. \\\"/lfdictionary/data/template\\\" . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\\n\\t\\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . LANGUAGE_FORGE_DEFAULT_SETTINGS;\\n\\n\\t\\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\\n\\n\\t\\t$filePaths = glob($this->_path . LANGUAGE_FORGE_SETTINGS .\\\"/*.WeSayConfig\\\");\\n\\n\\t\\t$isPatchincludeDefault = false;\\n\\n\\t\\tforeach ($filePaths as $file) {\\n\\t\\t\\tif ($this::endsWith($file, \\\"/\\\" . LANGUAGE_FORGE_DEFAULT_SETTINGS)){\\n\\t\\t\\t\\t$isPatchincludeDefault = true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tif ($isPatchincludeDefault){\\n\\t\\t\\t$this->assertEqual(count($filePaths),1);\\n\\t\\t}else{\\n\\t\\t\\t$this->assertEqual(count($filePaths),0);\\n\\t\\t}\\n\\n\\t\\t$userName=array();\\n\\t\\t$userName[]=\\\"user1\\\";\\n\\n\\t\\t$lexProjectMockObject = new LexProjectMockObject();\\n\\t\\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\\n\\t\\t$command->execute();\\n\\n\\t\\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\\\"user1\\\");\\n\\t\\t$result = $command->execute();\\n\\t\\t$this->assertEqual(count($result[\\\"tasks\\\"][\\\"task\\\"]), 11);\\n\\t\\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\\n\\n\\t\\t$filePaths = glob($lexProjectMockObject->getUserSettingsFilePath(\\\"user1\\\") );\\n\\t\\t$this->assertEqual(count($filePaths),1);\\n\\t\\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d069b7e1906937b0000635d53b2bf415\",\n \"score\": \"0.47629502\",\n \"text\": \"public function test_version1importpreventsinvalidusercountryonupdate() {\\n global $CFG, $DB;\\n\\n $this->run_core_user_import(array('country' => 'CA'));\\n\\n $data = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'country' => 12\\n );\\n\\n $this->run_core_user_import($data, false);\\n\\n // Make sure the data hasn't changed.\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'country' => 'CA'\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc45d7a7467e38287d5048d10ed77354\",\n \"score\": \"0.4754129\",\n \"text\": \"public function test_elis_createorupdate_updates_instructor_enrolment() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Create the test course.\\n $course = new course(array(\\n 'name' => 'testcoursename',\\n 'idnumber' => 'testcourseidnumber',\\n 'syllabus' => ''\\n ));\\n $course->save();\\n\\n // Create the test class.\\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\\n $class->save();\\n\\n // Create the test user.\\n $user = new user(array(\\n 'username' => 'testuserusername',\\n 'email' => 'test@useremail.com',\\n 'idnumber' => 'testuseridnumber',\\n 'firstname' => 'testuserfirstname',\\n 'lastname' => 'testuserlastname',\\n 'country' => 'CA'\\n ));\\n $user->save();\\n\\n // Create the instructor enrolment user.\\n $instructor = new instructor(array(\\n 'classid' => $class->id,\\n 'userid' => $user->id,\\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\\n ));\\n $instructor->save();\\n\\n // Run the instructor enrolment create action.\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->context = 'class_testclassidnumber';\\n $record->user_username = 'testuserusername';\\n $record->role = 'instructor';\\n $record->completetime = 'Jan/02/2012';\\n\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n $importplugin->process_record('enrolment', $record, 'bogus');\\n\\n // Validation.\\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\\n 'classid' => $class->id,\\n 'userid' => $user->id,\\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\\n )));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"637bb48109ee95f14d651b111ad2559a\",\n \"score\": \"0.47501665\",\n \"text\": \"function testUpdateSettingUserTasksSettingCommand_MutilEntries_ExistingSingleUserProfile() {\\n\\t\\t$this->_path = sys_get_temp_dir() . '/WeSayConfigTestingFolder';\\n\\t\\tif (!file_exists($this->_path)) {\\n\\t\\t\\tmkdir($this->_path);\\n\\t\\t\\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\\n\\t\\t}else\\n\\t\\t{\\n\\t\\t\\tself::recursiveDelete($this->_path);\\n\\t\\t\\tmkdir($this->_path);\\n\\t\\t\\tmkdir($this->_path . LANGUAGE_FORGE_SETTINGS );\\n\\t\\t}\\n\\t\\t\\n\\t\\t$lexProjectMockObject = new LexProjectMockObject();\\n\\t\\t\\n\\t\\t$sourceConfigFile = TEST_PATH. \\\"/lfdictionary/data/template\\\" . LANGUAGE_FORGE_SETTINGS . \\\"user1.WeSayConfig\\\";\\n\\t\\t$TargetConfigFile = $this->_path . LANGUAGE_FORGE_SETTINGS . \\\"/user1.WeSayConfig\\\";\\n\\n\\t\\t$this->assertEqual(copy($sourceConfigFile, $TargetConfigFile),true);\\n\\n\\t\\t$userName=array();\\n\\t\\t$userName[]=\\\"user1\\\";\\n\\n\\t\\t$command = new UpdateSettingUserTasksSettingCommand($lexProjectMockObject ,$userName, $this->NEW_DATA);\\n\\t\\t$command->execute();\\n\\n\\t\\t$command = new GetSettingUserTasksSettingCommand($lexProjectMockObject ,\\\"user1\\\");\\n\\t\\t$result = $command->execute();\\n\\t\\t$this->assertEqual(count($result[\\\"tasks\\\"][\\\"task\\\"]), 11);\\n\\t\\t$this->assertEqual(json_encode($result), $this->NEW_DATA);\\n\\t\\tUpdateSettingUserTasksSettingCommand_Test::recursiveDelete($this->_path);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"059e9d577aeac800501759f74f6ece88\",\n \"score\": \"0.4743711\",\n \"text\": \"public function test_version1importsetsuserprofilefieldsoncreate() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/user/profile/lib.php');\\n require_once($CFG->dirroot.'/user/profile/definelib.php');\\n\\n // Create custom field category.\\n $category = new stdClass;\\n $category->sortorder = $DB->count_records('user_info_category') + 1;\\n $category->id = $DB->insert_record('user_info_category', $category);\\n\\n // Create custom profile fields.\\n $this->create_profile_field('rlipcheckbox', 'checkbox', $category->id);\\n $this->create_profile_field('rlipdatetime', 'datetime', $category->id, 2000, 3000);\\n $this->create_profile_field('rliplegacydatetime', 'datetime', $category->id, 2000, 3000);\\n $this->create_profile_field('rlipmenu', 'menu', $category->id, \\\"rlipoption1\\\\nrlipoption2\\\");\\n $this->create_profile_field('rliptextarea', 'textarea', $category->id);\\n $this->create_profile_field('rliptext', 'text', $category->id);\\n\\n // Run import.\\n $data = array();\\n $data['profile_field_rlipcheckbox'] = '1';\\n $data['profile_field_rlipdatetime'] = 'jan/12/2011';\\n $data['profile_field_rliplegacydatetime'] = '1/12/2011';\\n $data['profile_field_rlipmenu'] = 'rlipoption1';\\n $data['profile_field_rliptextarea'] = 'rliptextarea';\\n $data['profile_field_rliptext'] = 'rliptext';\\n\\n $this->run_core_user_import($data);\\n\\n // Fetch the user and their profile field data.\\n $user = $DB->get_record('user', array('username' => 'rlipusername', 'mnethostid' => $CFG->mnet_localhost_id));\\n profile_load_data($user);\\n fix_moodle_profile_fields($user);\\n\\n // Validate data.\\n $this->assertEquals(isset($user->profile_field_rlipcheckbox), true);\\n $this->assertEquals($user->profile_field_rlipcheckbox, 1);\\n $this->assertEquals(isset($user->profile_field_rlipdatetime), true);\\n $this->assertEquals($user->profile_field_rlipdatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\\n $this->assertEquals(isset($user->profile_field_rliplegacydatetime), true);\\n $this->assertEquals($user->profile_field_rliplegacydatetime, rlip_timestamp(0, 0, 0, 1, 12, 2011));\\n $this->assertEquals(isset($user->profile_field_rlipmenu), true);\\n $this->assertEquals($user->profile_field_rlipmenu, 'rlipoption1');\\n $this->assertEquals(isset($user->profile_field_rliptextarea['text']), true);\\n $this->assertEquals($user->profile_field_rliptextarea['text'], 'rliptextarea');\\n $this->assertEquals(isset($user->profile_field_rliptext), true);\\n $this->assertEquals($user->profile_field_rliptext, 'rliptext');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2eb8e57fa4af6d29999b55b93ed5ffe7\",\n \"score\": \"0.47398433\",\n \"text\": \"public function test_version1importpreventslonguserfieldsonupdate() {\\n global $CFG, $DB;\\n\\n $this->run_core_user_import(array(\\n 'idnumber' => 'rlipidnumber',\\n 'institution' => 'rlipinstitution',\\n 'department' => 'rlipdepartment'\\n ));\\n\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'firstname' => str_repeat('a', 101)\\n );\\n $this->run_core_user_import($params, false);\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'firstname' => 'rlipfirstname'\\n ));\\n\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'lastname' => str_repeat('a', 101)\\n );\\n $this->run_core_user_import($params, false);\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'lastname' => 'rliplastname'\\n ));\\n\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'email' => str_repeat('a', 50).'@'.str_repeat('b', 50)\\n );\\n $this->run_core_user_import($params, false);\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'email' => 'rlipuser@rlipdomain.com'\\n ));\\n\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'city' => str_repeat('a', 256)\\n );\\n $this->run_core_user_import($params, false);\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'city' => 'rlipcity'\\n ));\\n\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'idnumber' => str_repeat('a', 256)\\n );\\n $this->run_core_user_import($params, false);\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'idnumber' => 'rlipidnumber'\\n ));\\n\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'institution' => str_repeat('a', 41)\\n );\\n $this->run_core_user_import($params, false);\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'institution' => 'rlipinstitution'\\n ));\\n\\n $params = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'department' => str_repeat('a', 31)\\n );\\n $this->run_core_user_import($params, false);\\n $this->assert_record_exists('user', array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'department' => 'rlipdepartment'\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e3e70b7257060ad4c6649310116085d\",\n \"score\": \"0.4738639\",\n \"text\": \"public function test_elis_createorupdate_updates_student_and_instructor_enrolment() {\\n global $CFG, $DB;\\n\\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Create the test course.\\n $course = new course(array(\\n 'name' => 'testcoursename',\\n 'idnumber' => 'testcourseidnumber',\\n 'syllabus' => ''\\n ));\\n $course->save();\\n\\n // Create the test class.\\n $class = new pmclass(array(\\n 'courseid' => $course->id,\\n 'idnumber' => 'testclassidnumber')\\n );\\n $class->save();\\n\\n // Create the test user.\\n $user = new user(array(\\n 'username' => 'testuserusername',\\n 'email' => 'test@useremail.com',\\n 'idnumber' => 'testuseridnumber',\\n 'firstname' => 'testuserfirstname',\\n 'lastname' => 'testuserlastname',\\n 'country' => 'CA'\\n ));\\n $user->save();\\n\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n\\n // 1 Run the first student enrolment.\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->context = 'class_testclassidnumber';\\n $record->user_username = 'testuserusername';\\n $record->role = 'student';\\n $record->completetime = 'Jan/01/2012';\\n\\n // NOTE: we clone() the record because the createorupdate setting will rewrite the action parameter.\\n $importplugin->process_record('enrolment', clone($record), 'bogus');\\n\\n // Validation of the enrolment record.\\n $params = array(\\n 'classid' => $class->id,\\n 'userid' => $user->id,\\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\\n );\\n\\n $this->assertTrue($DB->record_exists(student::TABLE, $params));\\n\\n // 2 Run the second student enrolment.\\n $record->completetime = 'Jan/02/2012';\\n $importplugin->process_record('enrolment', clone($record), 'bogus');\\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 2, 2012);\\n $this->assertTrue($DB->record_exists(student::TABLE, $params));\\n\\n // 3 Run the first teacher enrolment.\\n $record->role = 'instructor';\\n $record->completetime = 'Jan/01/2012';\\n $importplugin->process_record('enrolment', clone($record), 'bogus');\\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 1, 2012);\\n $this->assertTrue($DB->record_exists(instructor::TABLE, $params));\\n\\n // 4 Run the second teacher enrolment.\\n $record->completetime = 'Jan/02/2012';\\n $importplugin->process_record('enrolment', clone($record), 'bogus');\\n $params['completetime'] = rlip_timestamp(0, 0, 0, 1, 2, 2012);\\n $this->assertTrue($DB->record_exists(instructor::TABLE, $params));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e35e8cc6096cafd35ad1eed9110f6113\",\n \"score\": \"0.4726015\",\n \"text\": \"public function testUsersIdProfilePut()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"926b34852e47421c1f94ab605c73f33d\",\n \"score\": \"0.47234473\",\n \"text\": \"public function testProfileOperations() {\\n $user = $this->createUser([], [\\n \\\"update own {$this->type1->id()} profile\\\",\\n \\\"update own {$this->type2->id()} profile\\\",\\n ]);\\n $profile1 = $this->createProfile($this->type1, $user);\\n // Test access to a profile type with no role requirement.\\n $this->assertTrue($this->accessHandler->access($profile1, 'update', $user));\\n\\n $profile2 = $this->createProfile($this->type2, $user);\\n $this->assertFalse($this->accessHandler->access($profile2, 'update', $user));\\n $this->accessHandler->resetCache();\\n\\n $user->addRole($this->role2->id());\\n $user->save();\\n $profile2 = $this->reloadEntity($profile2);\\n $this->assertTrue($this->accessHandler->access($profile2, 'update', $user));\\n\\n $operations = ['view', 'update', 'delete'];\\n $user2 = $this->createUser([], [\\n \\\"view any {$this->type2->id()} profile\\\",\\n \\\"update any {$this->type2->id()} profile\\\",\\n \\\"delete any {$this->type2->id()} profile\\\",\\n ]);\\n foreach ($operations as $operation) {\\n $this->assertTrue($this->accessHandler->access($profile2, $operation, $user2));\\n }\\n\\n $user->removeRole($this->role2->id());\\n $user->save();\\n $this->accessHandler->resetCache();\\n $profile2 = $this->reloadEntity($profile2);\\n // Assert that each operation is denied if the profile owner doesn't have\\n // one of the allowed roles.\\n foreach ($operations as $operation) {\\n $this->assertFalse($this->accessHandler->access($profile2, $operation, $user2));\\n }\\n\\n $user3 = $this->createUser([], [\\n \\\"view own {$this->type3->id()} profile\\\",\\n \\\"update own {$this->type3->id()} profile\\\",\\n \\\"delete own {$this->type3->id()} profile\\\",\\n ]);\\n $profile3 = $this->createProfile($this->type3, $user3);\\n // Test the operations without the role affected.\\n foreach ($operations as $operation) {\\n $this->assertFalse($this->accessHandler->access($profile3, $operation, $user3));\\n }\\n $user3->addRole($this->role1->id());\\n $user3->save();\\n $this->accessHandler->resetCache();\\n $profile3 = $this->reloadEntity($profile3);\\n foreach ($operations as $operation) {\\n $this->assertTrue($this->accessHandler->access($profile3, $operation, $user3));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2f015abe692006cb10dbb8f6802be4a\",\n \"score\": \"0.47168595\",\n \"text\": \"public function test_version1importsetsfieldsonextendeduserupdate() {\\n global $CFG, $DB;\\n $CFG->allowuserthemes = true;\\n $this->run_core_user_import(array());\\n\\n $data = array(\\n 'action' => 'update',\\n 'user_username' => 'rlipusername',\\n 'auth' => 'mnet',\\n 'maildigest' => 2,\\n 'autosubscribe' => 1,\\n 'trackforums' => 1,\\n 'timezone' => -5.0,\\n 'theme' => 'standard',\\n 'lang' => 'en',\\n 'description' => 'rlipdescription',\\n 'institution' => 'rlipinstitution',\\n 'department' => 'rlipdepartment'\\n );\\n\\n $this->run_core_user_import($data, false);\\n\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n $data['username'] = $data['user_username'];\\n unset($data['user_username']);\\n\\n $select = \\\"username = :username AND\\n mnethostid = :mnethostid AND\\n auth = :auth AND\\n maildigest = :maildigest AND\\n autosubscribe = :autosubscribe AND\\n trackforums = :trackforums AND\\n timezone = :timezone AND\\n theme = :theme AND\\n lang = :lang AND\\n {$DB->sql_compare_text('description')} = :description AND\\n institution = :institution AND\\n department = :department\\\";\\n\\n $exists = $DB->record_exists_select('user', $select, $data);\\n\\n $this->assertTrue($exists);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7009aeb7d65450c6dbc6bfd7cf4d9ec\",\n \"score\": \"0.46921903\",\n \"text\": \"public function test_version1importdetectsduplicateswhenmultipleexist() {\\n global $DB, $CFG;\\n $userone = array(\\n 'username' => 'three',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'idnumber' => 'one',\\n 'email' => 'email@example.com',\\n 'firstname' => 'Test',\\n 'lastname' => 'User'\\n );\\n\\n $usertwo = array(\\n 'username' => 'two',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'idnumber' => 'two',\\n 'email' => 'email2@example.com',\\n 'firstname' => 'Test',\\n 'lastname' => 'User'\\n );\\n $DB->insert_record('user', $userone);\\n $DB->insert_record('user', $usertwo);\\n set_config('allowduplicateemails', 1, 'rlipimport_version1');\\n $usertoimport = array(\\n 'username' => 'two',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'idnumber' => 'two',\\n 'email' => 'email@example.com'\\n );\\n // Run the import.\\n $this->run_core_user_import($usertoimport);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1625a799a96cc85affd7960439a27429\",\n \"score\": \"0.46704412\",\n \"text\": \"public function testUpsertRow()\\n {\\n $values = ['emailAddress' => 'nothing@nothing.com'];\\n $test = $this->api->upsertRow('primaryKey', '2', $values, 'ETApiTest');\\n $delete = $this->api->deleteRow('ETApiTest', ['primaryKey' => 2]);\\n $this->assertEquals(200, $test);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cec56c6c459d2785f6142ff94afc7b18\",\n \"score\": \"0.46518192\",\n \"text\": \"public function test_elis_createorupdate_updates_userset() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/data/userset.class.php');\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Create the test user set.\\n $userset = new userset(array('name' => 'testusersetname', 'display' => 'testusersetdisplay'));\\n $userset->save();\\n\\n // Run the user set create action.\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->context = 'cluster';\\n $record->name = 'testusersetname';\\n $record->display = 'updatedtestusersetdisplay';\\n\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n $importplugin->process_record('course', $record, 'bogus');\\n\\n // Validation.\\n $this->assertTrue($DB->record_exists(userset::TABLE, array(\\n 'name' => 'testusersetname',\\n 'display' => 'updatedtestusersetdisplay'\\n )));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c7c49f9abc659745327adf87576b392\",\n \"score\": \"0.46117076\",\n \"text\": \"public function testGetOrganizationConfigTemplateSwitchProfiles()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f36ef0120a8433e5cad49f362381011\",\n \"score\": \"0.46075556\",\n \"text\": \"public function test_version1importdoesnotupdatenonmatchingusers() {\\n global $CFG;\\n\\n $this->run_core_user_import(array('idnumber' => 'rlipidnumber', 'firstname' => 'oldfirstname'));\\n\\n $checkdata = array(\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'username' => 'rlipusername',\\n 'email' => 'rlipuser@rlipdomain.com',\\n 'idnumber' => 'rlipidnumber',\\n 'firstname' => 'oldfirstname'\\n );\\n\\n // Bogus username.\\n $data = array(\\n 'action' => 'update',\\n 'username' => 'bogususername',\\n 'firstname' => 'newfirstname'\\n );\\n $this->run_core_user_import($data, false);\\n $this->assert_record_exists('user', $checkdata);\\n\\n // Bogus email.\\n $data = array(\\n 'action' => 'update',\\n 'email' => 'bogus@domain.com',\\n 'firstname' => 'newfirstname'\\n );\\n $this->run_core_user_import($data, false);\\n $this->assert_record_exists('user', $checkdata);\\n\\n // Bogus idnumber.\\n $data = array(\\n 'action' => 'update',\\n 'idnumber' => 'bogusidnumber',\\n 'firstname' => 'newfirstname'\\n );\\n $this->run_core_user_import($data, false);\\n $this->assert_record_exists('user', $checkdata);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d24f1001ec85c248c35890c45d9e3ecf\",\n \"score\": \"0.46034402\",\n \"text\": \"public function testCopyImport(): void\\n {\\n /** @var array{id:string} $table */\\n $table = $this->_client->apiPost('buckets/' . $this->getTestBucketId(self::STAGE_IN) . '/tables', [\\n 'dataString' => 'Id,Name,update',\\n 'name' => 'languages',\\n 'primaryKey' => 'Id',\\n ]);\\n\\n // create workspace and source table in workspace\\n $workspace = $this->initTestWorkspace();\\n\\n $backend = WorkspaceBackendFactory::createWorkspaceBackend($workspace);\\n $backend->dropTableIfExists('test_Languages3');\\n $backend->createTable('test_Languages3', [\\n 'Id' => 'integer',\\n 'Name' => 'string',\\n 'update' => 'string',\\n ]);\\n $backend->executeQuery(sprintf(\\n /** @lang BigQuery */\\n 'INSERT INTO %s.`test_Languages3` (`Id`, `Name`) VALUES (1, \\\\'cz\\\\'), (2, \\\\'en\\\\');',\\n $workspace['connection']['schema']\\n ));\\n\\n $this->_client->writeTableAsyncDirect($table['id'], [\\n 'dataWorkspaceId' => $workspace['id'],\\n 'dataTableName' => 'test_Languages3',\\n ]);\\n\\n $expected = [\\n '\\\"Id\\\",\\\"Name\\\",\\\"update\\\"',\\n '\\\"1\\\",\\\"cz\\\",\\\"\\\"',\\n '\\\"2\\\",\\\"en\\\",\\\"\\\"',\\n ];\\n\\n $this->assertLinesEqualsSorted(implode(\\\"\\\\n\\\", $expected) . \\\"\\\\n\\\", $this->_client->getTableDataPreview($table['id'], [\\n 'format' => 'rfc',\\n ]), 'imported data comparsion');\\n\\n $backend->executeQuery(sprintf(\\n /** @lang BigQuery */\\n 'TRUNCATE TABLE %s.`test_Languages3`',\\n $workspace['connection']['schema']\\n ));\\n $backend->executeQuery(sprintf(\\n /** @lang BigQuery */\\n 'INSERT INTO %s.`test_Languages3` VALUES (1, \\\\'cz\\\\', \\\\'1\\\\'), (3, \\\\'sk\\\\', \\\\'1\\\\');',\\n $workspace['connection']['schema']\\n ));\\n\\n $this->_client->writeTableAsyncDirect($table['id'], [\\n 'dataWorkspaceId' => $workspace['id'],\\n 'dataTableName' => 'test_Languages3',\\n 'incremental' => true,\\n ]);\\n\\n $expected = [\\n '\\\"Id\\\",\\\"Name\\\",\\\"update\\\"',\\n '\\\"1\\\",\\\"cz\\\",\\\"1\\\"',\\n '\\\"2\\\",\\\"en\\\",\\\"\\\"',\\n '\\\"3\\\",\\\"sk\\\",\\\"1\\\"',\\n ];\\n $this->assertLinesEqualsSorted(implode(\\\"\\\\n\\\", $expected) . \\\"\\\\n\\\", $this->_client->getTableDataPreview($table['id'], [\\n 'format' => 'rfc',\\n ]), 'previously null column updated');\\n\\n $backend->executeQuery(sprintf(\\n /** @lang BigQuery */\\n 'TRUNCATE TABLE %s.`test_Languages3`',\\n $workspace['connection']['schema']\\n ));\\n $backend->executeQuery(sprintf(\\n /** @lang BigQuery */\\n 'ALTER TABLE %s.`test_Languages3` ADD COLUMN `new_col` string(10)',\\n $workspace['connection']['schema']\\n ));\\n $backend->executeQuery(sprintf(\\n /** @lang BigQuery */\\n 'INSERT INTO %s.`test_Languages3` VALUES (1, \\\\'cz\\\\', \\\\'1\\\\', NULL), (3, \\\\'sk\\\\', \\\\'1\\\\', \\\\'newValue\\\\');',\\n $workspace['connection']['schema']\\n ));\\n\\n $this->expectException(ClientException::class);\\n $this->expectExceptionMessage('During the import of typed tables new columns can\\\\'t be added. Extra columns found: \\\"new_col\\\".');\\n $this->_client->writeTableAsyncDirect($table['id'], [\\n 'dataWorkspaceId' => $workspace['id'],\\n 'dataTableName' => 'test_Languages3',\\n 'incremental' => true,\\n ]);\\n\\n// $expected = [\\n// '\\\"Id\\\",\\\"Name\\\",\\\"update\\\",\\\"new_col\\\"',\\n// '\\\"1\\\",\\\"cz\\\",\\\"1\\\",\\\"\\\"',\\n// '\\\"2\\\",\\\"en\\\",\\\"\\\",\\\"\\\"',\\n// '\\\"3\\\",\\\"sk\\\",\\\"1\\\",\\\"newValue\\\"',\\n// ];\\n// $this->assertLinesEqualsSorted(implode(\\\"\\\\n\\\", $expected) . \\\"\\\\n\\\", $this->_client->getTableDataPreview($table['id'], [\\n// 'format' => 'rfc',\\n// ]), 'new column added');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4f3452f324ff2c6216d9408d3590404\",\n \"score\": \"0.45906338\",\n \"text\": \"public function test_elis_createorupdate_updates_student_enrolment() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/student.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Create the test course.\\n $course = new course(array(\\n 'name' => 'testcoursename',\\n 'idnumber' => 'testcourseidnumber',\\n 'syllabus' => ''\\n ));\\n $course->save();\\n\\n // Create the test class.\\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\\n $class->save();\\n\\n // Create the test user.\\n $user = new user(array(\\n 'username' => 'testuserusername',\\n 'email' => 'test@useremail.com',\\n 'idnumber' => 'testuseridnumber',\\n 'firstname' => 'testuserfirstname',\\n 'lastname' => 'testuserlastname',\\n 'country' => 'CA'\\n ));\\n $user->save();\\n\\n // Create the test student enrolment.\\n $student = new student(array(\\n 'classid' => $class->id,\\n 'userid' => $user->id,\\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\\n ));\\n $student->save();\\n\\n // Run the student enrolment create action.\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->context = 'class_testclassidnumber';\\n $record->user_username = 'testuserusername';\\n $record->completetime = 'Jan/02/2012';\\n\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n $importplugin->process_record('enrolment', $record, 'bogus');\\n\\n // Validation.\\n $this->assertTrue($DB->record_exists(student::TABLE, array(\\n 'classid' => $class->id,\\n 'userid' => $user->id,\\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\\n )));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2aff6640dd23e8bdbb0a674df55cdd77\",\n \"score\": \"0.45879143\",\n \"text\": \"public function test_version1importmapsfieldsonuserupdate() {\\n global $CFG, $DB;\\n $CFG->allowuserthemes = true;\\n $this->run_core_user_import(array());\\n\\n $data = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'auth' => 'mnet',\\n 'maildigest' => 2,\\n 'autosubscribe' => 'yes',\\n 'trackforums' => 'yes',\\n 'timezone' => -5.0,\\n 'theme' => 'standard',\\n 'lang' => 'en',\\n 'description' => 'rlipdescription',\\n 'institution' => 'rlipinstitution',\\n 'department' => 'rlipdepartment'\\n );\\n\\n $this->run_core_user_import($data, false);\\n\\n foreach ($data as $key => $val) {\\n if (in_array((string)$val, array('no', 'yes'))) {\\n $data[$key] = ((string)$val == 'yes') ? 1: 0;\\n }\\n }\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n\\n $select = \\\"username = :username AND\\n mnethostid = :mnethostid AND\\n auth = :auth AND\\n maildigest = :maildigest AND\\n autosubscribe = :autosubscribe AND\\n trackforums = :trackforums AND\\n timezone = :timezone AND\\n theme = :theme AND\\n lang = :lang AND\\n {$DB->sql_compare_text('description')} = :description AND\\n institution = :institution AND\\n department = :department\\\";\\n\\n $exists = $DB->record_exists_select('user', $select, $data);\\n $this->assertEquals($exists, true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f46617ef52f0c31bfd99609723ac8c0d\",\n \"score\": \"0.45829374\",\n \"text\": \"public function testPredefinedProfilesGetById()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b47c631c8be17e925ad15b38e6124449\",\n \"score\": \"0.45806578\",\n \"text\": \"public function test_version1importsetsfieldsonuserupdate() {\\n global $CFG, $DB;\\n $CFG->allowuserthemes = true;\\n $this->run_core_user_import(array());\\n\\n $data = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'auth' => 'mnet',\\n 'maildigest' => 2,\\n 'autosubscribe' => 1,\\n 'trackforums' => 1,\\n 'timezone' => -5.0,\\n 'theme' => 'standard',\\n 'lang' => 'en',\\n 'description' => 'rlipdescription',\\n 'institution' => 'rlipinstitution',\\n 'department' => 'rlipdepartment'\\n );\\n\\n $this->run_core_user_import($data, false);\\n\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n\\n $select = \\\"username = :username AND\\n mnethostid = :mnethostid AND\\n auth = :auth AND\\n maildigest = :maildigest AND\\n autosubscribe = :autosubscribe AND\\n trackforums = :trackforums AND\\n timezone = :timezone AND\\n theme = :theme AND\\n lang = :lang AND\\n {$DB->sql_compare_text('description')} = :description AND\\n institution = :institution AND\\n department = :department\\\";\\n\\n $exists = $DB->record_exists_select('user', $select, $data);\\n\\n $this->assertTrue($exists);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"137df0c73beda95b82f05b8b9528820c\",\n \"score\": \"0.45683837\",\n \"text\": \"private function loadProfiles() {\\n switch(D3P_STORAGE) {\\n\\t case 'file':\\n\\t $this->loadProfilesFromFile();\\n\\t break;\\n }\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0e60299e6aaa3c794aa1eb23349016d\",\n \"score\": \"0.45519567\",\n \"text\": \"public function test_version1importnewuseremail() {\\n global $CFG; // This is needed by the required files.\\n require_once(dirname(__FILE__).'/other/rlip_importplugin_version1_fakeemail.php');\\n $importplugin = new rlip_importplugin_version1_fakeemail();\\n\\n $testuser = new stdClass;\\n $testuser->username = 'testusername';\\n $testuser->idnumber = 'testidnumber';\\n $testuser->firstname = 'testfirstname';\\n $testuser->lastname = 'testlastname';\\n $testuser->email = 'testemail@example.com';\\n\\n // Test false return when not enabled.\\n set_config('newuseremailenabled', '0', 'rlipimport_version1');\\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\\n set_config('newuseremailtemplate', 'Test Body', 'rlipimport_version1');\\n $result = $importplugin->newuseremail($testuser);\\n $this->assertFalse($result);\\n\\n // Test false return when enabled but empty template.\\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\\n set_config('newuseremailtemplate', '', 'rlipimport_version1');\\n $result = $importplugin->newuseremail($testuser);\\n $this->assertFalse($result);\\n\\n // Test false return when enabled and has template, but user has empty email.\\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\\n set_config('newuseremailsubject', 'Test Subject', 'rlipimport_version1');\\n set_config('newuseremailtemplate', 'Test Body', 'rlipimport_version1');\\n $testuser->email = '';\\n $result = $importplugin->newuseremail($testuser);\\n $this->assertFalse($result);\\n $testuser->email = 'test@example.com';\\n\\n // Test success when enabled, has template text, and user has email.\\n $testsubject = 'Test Subject';\\n $testbody = 'Test Body';\\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\\n $result = $importplugin->newuseremail($testuser);\\n $this->assertNotEmpty($result);\\n $this->assertInternalType('array', $result);\\n $this->assertArrayHasKey('user', $result);\\n $this->assertEquals($testuser, $result['user']);\\n $this->assertArrayHasKey('subject', $result);\\n $this->assertEquals($testsubject, $result['subject']);\\n $this->assertArrayHasKey('body', $result);\\n $this->assertEquals($testbody, $result['body']);\\n\\n // Test that subject is replaced by empty string when not present.\\n $testsubject = null;\\n $testbody = 'Test Body';\\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\\n $result = $importplugin->newuseremail($testuser);\\n $this->assertNotEmpty($result);\\n $this->assertInternalType('array', $result);\\n $this->assertArrayHasKey('user', $result);\\n $this->assertEquals($testuser, $result['user']);\\n $this->assertArrayHasKey('subject', $result);\\n $this->assertEquals('', $result['subject']);\\n $this->assertArrayHasKey('body', $result);\\n $this->assertEquals($testbody, $result['body']);\\n\\n // Full testing of replacement is done below, but just test that it's being done at all from the main function.\\n $testsubject = 'Test Subject';\\n $testbody = 'Test Body %%username%%';\\n $expectedtestbody = 'Test Body '.$testuser->username;\\n set_config('newuseremailenabled', '1', 'rlipimport_version1');\\n set_config('newuseremailsubject', $testsubject, 'rlipimport_version1');\\n set_config('newuseremailtemplate', $testbody, 'rlipimport_version1');\\n $result = $importplugin->newuseremail($testuser);\\n $this->assertNotEmpty($result);\\n $this->assertInternalType('array', $result);\\n $this->assertArrayHasKey('user', $result);\\n $this->assertEquals($testuser, $result['user']);\\n $this->assertArrayHasKey('subject', $result);\\n $this->assertEquals($testsubject, $result['subject']);\\n $this->assertArrayHasKey('body', $result);\\n $this->assertEquals($expectedtestbody, $result['body']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83354809f4786af25eb5c7fe012719eb\",\n \"score\": \"0.4538639\",\n \"text\": \"public function test_elis_createorupdate_updates_user() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Create the test user.\\n $user = new user(array(\\n 'username' => 'testuserusername',\\n 'email' => 'test@useremail.com',\\n 'idnumber' => 'testuseridnumber',\\n 'firstname' => 'testuserfirstname',\\n 'lastname' => 'testuserlastname',\\n 'country' => 'CA'\\n ));\\n $user->save();\\n\\n // Run the user create action.\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->username = 'testuserusername';\\n $record->email = 'test@useremail.com';\\n $record->idnumber = 'testuseridnumber';\\n $record->firstname = 'updatedtestuserfirstname';\\n\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n $importplugin->process_record('user', $record, 'bogus');\\n\\n // Validation.\\n $this->assertTrue($DB->record_exists(user::TABLE, array(\\n 'username' => 'testuserusername',\\n 'email' => 'test@useremail.com',\\n 'idnumber' => 'testuseridnumber',\\n 'firstname' => 'updatedtestuserfirstname'\\n )));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f0100dac0d276cfde06e7aafa64f11c\",\n \"score\": \"0.45373005\",\n \"text\": \"public function testVariant6() {\\n\\n /* Setup\\n ---------------------------------------------*/\\n DbEntityHelper::setCon(self::$propelCon);\\n\\n list(\\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\\n ) = DbEntityHelper::setUpBonusMembers(true, [\\n 'OL' => false,\\n 'PM' => false,\\n 'VS2' => false,\\n ]);\\n\\n $new = DbEntityHelper::createSignupMember($VS1);\\n\\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\\n $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS)\\n + Transaction::getAmountForReason(Transaction::REASON_OL_BONUS)\\n + Transaction::getAmountForReason(Transaction::REASON_PM_BONUS)\\n + Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\\n // $trfOL += 1;\\n // $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS);\\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\\n $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\\n\\n $this->assertTransferTotal($trfIT, $IT);\\n $this->assertTransferTotal($trfVL, $VL);\\n // $this->assertTransferTotal($trfOL, $OL);\\n // $this->assertTransferTotal($trfPM, $PM);\\n // $this->assertTransferTotal($trfVS2, $VS2);\\n $this->assertTransferTotal($trfVS1, $VS1);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1fd32c9c77a38f59d5c35f178ad44bc5\",\n \"score\": \"0.4532058\",\n \"text\": \"public function test_version1importsyncsusertoelisonupdate() {\\n global $CFG, $DB;\\n\\n if (!$DB->record_exists('block', array('name' => 'curr_admin'))) {\\n $this->markTestIncomplete('This test depends on the PM system');\\n }\\n\\n require_once($CFG->dirroot.'/elis/program/lib/setup.php');\\n require_once($CFG->dirroot.'/user/profile/definelib.php');\\n require_once(elis::lib('data/customfield.class.php'));\\n require_once(elispm::lib('data/user.class.php'));\\n\\n // Make sure we are not auto-assigning idnumbers.\\n set_config('auto_assign_user_idnumber', 0, 'elis_program');\\n elis::$config = new elis_config();\\n\\n // Create Moodle custom field category.\\n $category = new stdClass;\\n $category->sortorder = $DB->count_records('user_info_category') + 1;\\n $category->id = $DB->insert_record('user_info_category', $category);\\n\\n // Create Moodle custom profile field.\\n $this->create_profile_field('rliptext', 'text', $category->id);\\n\\n // Obtain the PM user context level.\\n $contextlevel = CONTEXT_ELIS_USER;\\n\\n // Make sure the PM category and field exist.\\n $category = new field_category(array('name' => 'rlipcategory'));\\n\\n $field = new field(array(\\n 'shortname' => 'rliptext',\\n 'name' => 'rliptext',\\n 'datatype' => 'text',\\n 'multivalued' => 0\\n ));\\n $field = field::ensure_field_exists_for_context_level($field, $contextlevel, $category);\\n\\n // Make sure the field owner is setup.\\n field_owner::ensure_field_owner_exists($field, 'manual');\\n $ownerid = $DB->get_field('elis_field_owner', 'id', array('fieldid' => $field->id, 'plugin' => 'manual'));\\n $owner = new field_owner($ownerid);\\n $owner->param_control = 'text';\\n $owner->save();\\n\\n // Make sure the field is set up for synchronization.\\n field_owner::ensure_field_owner_exists($field, 'moodle_profile');\\n $ownerid = $DB->get_field('elis_field_owner', 'id', array('fieldid' => $field->id, 'plugin' => 'moodle_profile'));\\n $owner = new field_owner($ownerid);\\n $owner->exclude = pm_moodle_profile::sync_from_moodle;\\n $owner->save();\\n\\n // Update the user class's static cache of define user custom fields.\\n $tempuser = new user();\\n $tempuser->reset_custom_field_list();\\n\\n // Create the user.\\n $this->run_core_user_import(array(\\n 'idnumber' => 'rlipidnumber',\\n 'profile_field_rliptext' => 'rliptext'\\n ));\\n\\n // Make sure PM user was created correctly.\\n $this->assert_record_exists(user::TABLE, array(\\n 'username' => 'rlipusername',\\n 'idnumber' => 'rlipidnumber'\\n ));\\n\\n // Run the import, updating the user.\\n $this->run_core_user_import(array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'profile_field_rliptext' => 'rliptextupdated'\\n ));\\n\\n // Make sure the PM custom field data was set.\\n $sql = \\\"SELECT 'x'\\n FROM {\\\".field::TABLE.\\\"} f\\n JOIN {\\\".field_data_text::TABLE.\\\"} d ON f.id = d.fieldid\\n WHERE f.shortname = ? AND d.data = ?\\\";\\n $params = array('rliptext', 'rliptextupdated');\\n $exists = $DB->record_exists_sql($sql, $params);\\n $this->assertEquals($exists, true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4832cbeb00d7e4780961b5bf2dd64c10\",\n \"score\": \"0.45289883\",\n \"text\": \"public function testPreference() {\\r\\n\\r\\n $preference_data = array(\\r\\n \\\"items\\\" => array(\\r\\n array(\\r\\n \\\"title\\\" => \\\"test1\\\",\\r\\n \\\"quantity\\\" => 1,\\r\\n \\\"currency_id\\\" => \\\"ARS\\\",\\r\\n \\\"unit_price\\\" => 10.2\\r\\n )\\r\\n )\\r\\n );\\r\\n\\r\\n // CREATE\\r\\n $preference = $this->mp->create_preference($preference_data);\\r\\n\\r\\n $this->assertTrue($preference[\\\"status\\\"] == 201);\\r\\n $this->assertTrue($preference[\\\"response\\\"][\\\"items\\\"][0][\\\"title\\\"] == \\\"test1\\\"\\r\\n && (int) $preference[\\\"response\\\"][\\\"items\\\"][0][\\\"quantity\\\"] == 1\\r\\n && (double) $preference[\\\"response\\\"][\\\"items\\\"][0][\\\"unit_price\\\"] == 10.2\\r\\n && $preference[\\\"response\\\"][\\\"items\\\"][0][\\\"currency_id\\\"] == \\\"ARS\\\");\\r\\n\\r\\n // GET\\r\\n $preference = $this->mp->get_preference($preference[\\\"response\\\"][\\\"id\\\"]);\\r\\n\\r\\n $this->assertTrue($preference[\\\"status\\\"] == 200);\\r\\n\\r\\n // UPDATE\\r\\n $preference_data = array(\\r\\n \\\"items\\\" => array(\\r\\n array(\\r\\n \\\"title\\\" => \\\"test2Modified\\\",\\r\\n \\\"quantity\\\" => 2,\\r\\n \\\"currency_id\\\" => \\\"USD\\\",\\r\\n \\\"unit_price\\\" => 100\\r\\n )\\r\\n )\\r\\n );\\r\\n\\r\\n $preferenceUpdatedResult = $this->mp->update_preference($preference[\\\"response\\\"][\\\"id\\\"], $preference_data);\\r\\n\\r\\n $this->assertTrue($preferenceUpdatedResult[\\\"status\\\"] == 200);\\r\\n\\r\\n $preferenceUpdatedResult = $this->mp->get_preference($preference[\\\"response\\\"][\\\"id\\\"]);\\r\\n\\r\\n $this->assertTrue((double) $preferenceUpdatedResult[\\\"response\\\"][\\\"items\\\"][0][\\\"unit_price\\\"] == 100\\r\\n && (double) $preferenceUpdatedResult[\\\"response\\\"][\\\"items\\\"][0][\\\"quantity\\\"] == 2\\r\\n && $preferenceUpdatedResult[\\\"response\\\"][\\\"items\\\"][0][\\\"title\\\"] == \\\"test2Modified\\\"\\r\\n && $preferenceUpdatedResult[\\\"response\\\"][\\\"items\\\"][0][\\\"currency_id\\\"] == \\\"USD\\\");\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3613c21c3ec2f01bc3bd3bb085599953\",\n \"score\": \"0.45278534\",\n \"text\": \"public function test_elis_createorupdate_creates_instructor_enrolment() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Create the test course.\\n $course = new course(array(\\n 'name' => 'testcoursename',\\n 'idnumber' => 'testcourseidnumber',\\n 'syllabus' => ''\\n ));\\n $course->save();\\n\\n // Create the test class.\\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\\n $class->save();\\n\\n // Create the test user.\\n $user = new user(array(\\n 'username' => 'testuserusername',\\n 'email' => 'test@useremail.com',\\n 'idnumber' => 'testuseridnumber',\\n 'firstname' => 'testuserfirstname',\\n 'lastname' => 'testuserlastname',\\n 'country' => 'CA'\\n ));\\n $user->save();\\n\\n // Run the instructor enrolment create action.\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->context = 'class_testclassidnumber';\\n $record->user_username = 'testuserusername';\\n $record->role = 'instructor';\\n $record->completetime = 'Jan/01/2012';\\n\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n $importplugin->process_record('enrolment', $record, 'bogus');\\n\\n // Validation.\\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\\n 'classid' => $class->id,\\n 'userid' => $user->id,\\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\\n )));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebf1a0658bfd314cfb51c31ac5335c76\",\n \"score\": \"0.45243627\",\n \"text\": \"public static function updateExtendedPropertiesUrl($upsert)\\n\\t{\\n\\t\\t$url = \\\"/api/commerce/carts/current/extendedproperties?upsert={upsert}\\\";\\n\\t\\t$mozuUrl = new MozuUrl($url, UrlLocation::TENANT_POD,\\\"PUT\\\", false) ;\\n\\t\\t$url = $mozuUrl->formatUrl(\\\"upsert\\\", $upsert);\\n\\t\\treturn $mozuUrl;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f44c87fd57ee51e38ebd73afa380423\",\n \"score\": \"0.4512327\",\n \"text\": \"public function testUpdateUserProperties()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2ae1ba0746da0632421f8638d84a5ad\",\n \"score\": \"0.4489874\",\n \"text\": \"public function test_user_update_profile_success()\\n {\\n $body = [\\n \\\"name\\\" => \\\"Top\\\",\\n \\\"gender\\\" => 1,\\n \\\"dob\\\" => \\\"1995-02-22\\\",\\n 'phone' => '0123456781',\\n 'address' => 'Da Nang',\\n ];\\n $response = $this->json('PUT', '/api/profile', $body);\\n $response->assertStatus(200)\\n ->assertJsonFragment($body)\\n ->assertJsonStructure($this->json_structure_user_update_profile_success());\\n $this->assertDatabaseHas('users', $body);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"685d4a09b040186bf1c1c89e0bcaaee8\",\n \"score\": \"0.44851044\",\n \"text\": \"public function testPredefinedProfilesWritePermissionsById()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a64833be2c3eefc4215e5f1a98e42286\",\n \"score\": \"0.44726658\",\n \"text\": \"public function testUpsertApp()\\n {\\n $isnogudApp = new \\\\stdClass;\\n $isnogudApp->id = 'isnogud';\\n $isnogudApp->name = new \\\\stdClass;\\n $isnogudApp->name->en = 'I don\\\\'t exist';\\n $isnogudApp->showInMenu = true;\\n\\n $client = static::createRestClient();\\n $client->put('/core/app/isnogud', $isnogudApp);\\n\\n $this->assertEquals(204, $client->getResponse()->getStatusCode());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1a35e3df7217960156c5f7e2b2ca073\",\n \"score\": \"0.4460079\",\n \"text\": \"public function test_version1importusesuserfieldmappings() {\\n global $CFG, $DB;\\n $file = get_plugin_directory('rlipimport', 'version1').'/lib.php';\\n require_once($file);\\n $CFG->allowuserthemes = true;\\n\\n // Set up our mapping of standard field names to custom field names.\\n $mapping = array(\\n 'action' => 'action1',\\n 'username' => 'username1',\\n 'auth' => 'auth1',\\n 'password' => 'password1',\\n 'firstname' => 'firstname1',\\n 'lastname' => 'lastname1',\\n 'email' => 'email1',\\n 'maildigest' => 'maildigest1',\\n 'autosubscribe' => 'autosubscribe1',\\n 'trackforums' => 'trackforums1',\\n 'city' => 'city1',\\n 'country' => 'country1',\\n 'timezone' => 'timezone1',\\n 'theme' => 'theme1',\\n 'lang' => 'lang1',\\n 'description' => 'description1',\\n 'idnumber' => 'idnumber1',\\n 'institution' => 'institution1',\\n 'department' => 'department1'\\n );\\n\\n // Store the mapping records in the database.\\n foreach ($mapping as $standardfieldname => $customfieldname) {\\n $record = new stdClass;\\n $record->entitytype = 'user';\\n $record->standardfieldname = $standardfieldname;\\n $record->customfieldname = $customfieldname;\\n $DB->insert_record(RLIPIMPORT_VERSION1_MAPPING_TABLE, $record);\\n }\\n\\n // Run the import.\\n $data = array(\\n 'entity' => 'user',\\n 'action1' => 'create',\\n 'username1' => 'rlipusername',\\n 'auth1' => 'mnet',\\n 'password1' => 'Rlippassword!0',\\n 'firstname1' => 'rlipfirstname',\\n 'lastname1' => 'rliplastname',\\n 'email1' => 'rlipuser@rlipdomain.com',\\n 'maildigest1' => '2',\\n 'autosubscribe1' => '1',\\n 'trackforums1' => '1',\\n 'city1' => 'rlipcity',\\n 'country1' => 'CA',\\n 'timezone1' => -5.0,\\n 'theme1' => 'standard',\\n 'lang1' => 'en',\\n 'description1' => 'rlipdescription',\\n 'idnumber1' => 'rlipidnumber',\\n 'institution1' => 'rlipinstitution',\\n 'department1' => 'rlipdepartment'\\n );\\n $this->run_core_user_import($data, false);\\n\\n // Validate user record.\\n $select = \\\"username = :username AND\\n mnethostid = :mnethostid AND\\n auth = :auth AND\\n firstname = :firstname AND\\n lastname = :lastname AND\\n email = :email AND\\n maildigest = :maildigest AND\\n autosubscribe = :autosubscribe AND\\n trackforums = :trackforums AND\\n city = :city AND\\n country = :country AND\\n theme = :theme AND\\n lang = :lang AND\\n {$DB->sql_compare_text('description')} = :description AND\\n idnumber = :idnumber AND\\n institution = :institution AND\\n department = :department\\\";\\n $params = array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'auth' => 'mnet',\\n 'firstname' => 'rlipfirstname',\\n 'lastname' => 'rliplastname',\\n 'email' => 'rlipuser@rlipdomain.com',\\n 'maildigest' => 2,\\n 'autosubscribe' => 1,\\n 'trackforums' => 1,\\n 'city' => 'rlipcity',\\n 'country' => 'CA',\\n 'timezone' => -5.0,\\n 'theme' => 'standard',\\n 'lang' => 'en',\\n 'description' => 'rlipdescription',\\n 'idnumber' => 'rlipidnumber',\\n 'institution' => 'rlipinstitution',\\n 'department' => 'rlipdepartment'\\n );\\n $exists = $DB->record_exists_select('user', $select, $params);\\n $this->assertTrue($exists);\\n\\n // Validate password.\\n $userrec = $DB->get_record('user', array('username' => $data['username1']));\\n $this->assertTrue(validate_internal_user_password($userrec, $data['password1']));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a118f277b761f64aa11127310e5d5cb6\",\n \"score\": \"0.44599783\",\n \"text\": \"function updateRun (&$db, &$u, &$arg, &$t ) {\\n\\t//\\t$this->presentor = \\\"debug\\\"; return;\\n\\t\\t$user = lcUser::getUserByPkey($arg->getvars[1]);\\n\\t\\t$user->groups = $arg->postvars[group_opt];\\n\\t\\t$user->email = $arg->postvars[email];\\n\\t\\tif ( $arg->postvars[password] != \\\"\\\") {\\n\\t\\t\\t$user->password = $arg->postvars[password];\\n\\t\\t}\\n\\n\\t\\t$user->update();\\n\\n\\t\\t\\t// PROFILE\\n\\t\\t$user = lcUser::getUserByPkey($arg->getvars[1]);\\n\\t\\t$user->updateProfile($arg->postvars[profile]);\\n\\n\\theader(\\\"Location: \\\". _APP_URL.\\\"users\\\");\\n\\texit();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f64f5f61c0f2dbcbb9c4badfefc383c0\",\n \"score\": \"0.44530833\",\n \"text\": \"function setUp() : void {\\n parent::setUp();\\n $password = \\\"abc123\\\";\\n $this->VALID_PROFILE_SALT = bin2hex(random_bytes(16));\\n $this->VALID_PROFILE_HASH = hash_pbkdf2(\\\"sha512\\\", $password, $this->VALID_PROFILE_SALT, 262144);\\n\\n\\n // create and insert a Profile to own the test Article\\n $this->profile = new Profile (generateUuidV4(), null,\\\"name\\\", \\\"test@phpunit.de\\\",$this->VALID_PROFILE_HASH, \\\"+12125551212\\\", $this->VALID_PROFILE_SALT);\\n $this->profile->insert($this->getPDO());\\n\\n // calculate the date (just use the time the unit test was setup...)\\n $this->VALID_ARTICLEDATE = new \\\\DateTime();\\n\\n //format the sunrise date to use for testing\\n $this->VALID_SUNRISEDATE = new \\\\DateTime();\\n $this->VALID_SUNRISEDATE->sub(new \\\\DateInterval(\\\"P10D\\\"));\\n\\n //format the sunset date to use for testing\\n $this->VALID_SUNSETDATE = new\\\\DateTime();\\n $this->VALID_SUNSETDATE->add(new \\\\DateInterval(\\\"P10D\\\"));\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d98ebb940a64a09431604c07cbe834dc\",\n \"score\": \"0.44510087\",\n \"text\": \"public function run(){\\n\\t\\t$profiles = array(\\n\\t\\t\\tarray('user_id' => '1', 'gender' => 'Male', 'mobile' => '01914433307', 'present_address' => '', 'permanent_address' => '', 'created_at' => new DateTime(), 'updated_at' => new DateTime())\\n\\t\\t);\\n\\n\\t\\tDB::table('profiles')->insert($profiles);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86935bd182996c9d9bddd0d60276e44f\",\n \"score\": \"0.44480315\",\n \"text\": \"public function testUpsertRowsetJson()\\n {\\n $values =\\n '[\\n {\\n \\\"keys\\\":{\\n \\\"primaryKey\\\": \\\"1\\\"\\n },\\n \\\"values\\\":{\\n \\\"emailAddress\\\": \\\"newemail@email.com\\\"\\n }\\n },\\n {\\n \\\"keys\\\": {\\n \\\"primaryKey\\\": \\\"2\\\"\\n },\\n \\\"values\\\":{\\n \\\"emailAddress\\\": \\\"newemail2@email.com\\\"\\n }\\n }\\n ]';\\n\\n $test = $this->api->upsertRowset($values, 'ETApiTest');\\n $this->assertTrue(is_array($test));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5e241048d48c74264421cf26a680d38\",\n \"score\": \"0.44450638\",\n \"text\": \"function TransferProfiles()\\n {\\n $moduleaccesses=array();\\n foreach (array_keys($this->ModuleDependencies) as $module)\\n {\\n $access=$this->ReadPHPArray($this->MyMod_Setup_Profiles_File($module));\\n\\n $access=$access[ \\\"Access\\\" ];\\n\\n $moduleaccesses[ $module ]=array();\\n foreach ($this->GetListOfProfiles() as $profile)\\n {\\n $moduleaccesses[ $module ][ $profile ]=$access[ $profile ];\\n }\\n }\\n\\n if (isset($this->DBHash[ \\\"Mod\\\" ]) && $this->DBHash[ \\\"Mod\\\" ])\\n {\\n $file=$this->MyMod_Setup_Profiles_File();\\n $this->WritePHPArray($file,$moduleaccesses);\\n\\n print $this->H(4,\\\"System Accesses written to \\\".$file);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c71b3bcbd65b251ceba3f97986e84de8\",\n \"score\": \"0.44346404\",\n \"text\": \"public function test_version1importpreventsinvaliduserlangoncreate() {\\n $this->run_core_user_import(array('lang' => '12'));\\n $this->assert_core_user_does_not_exist();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c8af984f8599522e2212b2292e07415\",\n \"score\": \"0.44317287\",\n \"text\": \"function profile(string $avatarSrc, int $userId, string $userName, string $emailAddress, array $languages): void\\n{\\n try\\n {\\n $isValid = $userName == \\\"\\\" || isValidUsername($userName, $userId);\\n $isValid = $emailAddress == \\\"\\\" || isValidEmailAddress($emailAddress, $userId) && $isValid;\\n $isValid = isValidLanguages($languages) && $isValid;\\n\\n if ($isValid)\\n {\\n $hasEmailChanged = $emailAddress != \\\"\\\" && !isExistingEmailAddress($emailAddress);\\n $hasUserNameChanged = $userName != \\\"\\\" && !isExistingUsername($userName);\\n\\n updateUser($userId, $userName, $emailAddress);\\n updateAvatar($userId, $avatarSrc);\\n updateLanguages($userId, $languages);\\n $_SESSION['avatarSrc'] = $avatarSrc;\\n\\n if ($hasUserNameChanged)\\n {\\n $_SESSION[\\\"username\\\"] = $userName;\\n }\\n\\n if ($hasEmailChanged)\\n {\\n $_SESSION[\\\"emailUser\\\"] = $emailAddress;\\n \\n $isSent = sendConfirmationEmail($emailAddress);\\n\\n if ($isSent)\\n {\\n \\n header(\\\"Location: /homePage.php\\\" . createSuccessAlert(\\\"Les modifications ont bien été prises en compte. Un mail de confirmation d'adresse mail vous a été envoyé.\\\"));\\n }\\n else\\n {\\n createFailureAlert(\\\"Les modifications ont bien été prises en compte. Le mail de réinitialisation n'a pas pu être envoyé.\\\");\\n }\\n }\\n\\n header(\\\"Location: /homePage.php\\\" . createSuccessAlert(\\\"Les modifications ont bien été prises en compte.\\\"));\\n }\\n }\\n catch (Exception $e)\\n {\\n echo \\\"Une erreur est survenue : \\\", $e->getMessage(), \\\"\\\\n\\\";\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27c410a051955a922abb311fd39ffb03\",\n \"score\": \"0.44262105\",\n \"text\": \"public function p_plowersignup() {\\n\\n $q = \\\"SELECT email\\n FROM users \\n WHERE email = '\\\" . $_POST['email'] . \\\"'\\\";\\n\\n $email_dupe = DB::instance(DB_NAME)->select_field($q);\\n \\n #If it does produce an error \\n\\n if($email_dupe){\\n \\n Router::redirect('/users/plowersignup/email_dupe');\\n \\n } \\n\\n #Otherwise proceed with sign up\\n \\n else {\\n\\n # Encrypt the password \\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \\n\\n # Create an encrypted token via their email address and a random string\\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \\n\\n # Insert this user into the database\\n $user = DB::instance(DB_NAME)->insert('users', $_POST);\\n\\n Router::redirect(\\\"/users/login/\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ff9f09cfaa18fcb3506e3b9ff3fc222\",\n \"score\": \"0.44260266\",\n \"text\": \"static public function uu( object $pp1, array $other=[]): string // *************** u u (\\n {\\n $AdminId = (int)$pp1->uriq->id ; //$AdminId = $_SESSION[\\\"userid\\\"];\\n\\n // 1. S U B M I T E D F L D V A L S - P R E U P D A T E\\n list($AName, $AHeadline, $ABio, $Image, $Target) = self::get_submitted_uu() ;\\n\\n // 2. U U V A L I D A T I O N\\n $err = '' ;\\n switch (true) {\\n //case (empty($PostTitle)): $err = \\\"Title Cant be empty\\\"; break ;\\n case (strlen($AHeadline)>30): $err = \\\"Headline Should be max 30 characters\\\"; break ;\\n case (strlen($ABio)>500): $err = \\\"Bio should be max 500 characters\\\"; break ;\\n //default: break;\\n }\\n if ($err > '') {\\n $_SESSION[\\\"ErrorMessage\\\"]= $err ;\\n Config_allsites::Redirect_to($pp1->upd_user_loggedin);\\n goto fnerr ; //exit(0) ;\\n }\\n\\n // 3. U P D A T E D B T B L R O W\\n // Query to Update u s e r in DB When everything is fine\\n $flds = \\\"SET aname=:AName, aheadline=:AHeadline, abio=:ABio\\\" ;\\n $qrywhere = \\\"WHERE id=:AdminId\\\" ;\\n $binds = [\\n ['placeh'=>':AName', 'valph'=>$AName, 'tip'=>'str']\\n ,['placeh'=>':AHeadline', 'valph'=>$AHeadline, 'tip'=>'str']\\n ,['placeh'=>':ABio', 'valph'=>$ABio, 'tip'=>'str']\\n ,['placeh'=>':AdminId', 'valph'=>$AdminId, 'tip'=>'int']\\n ] ;\\n if (!empty($_FILES[\\\"Image\\\"][\\\"name\\\"])) {\\n $flds .= \\\", aimage=:Image\\\" ;\\n $binds[] = ['placeh'=>':Image', 'valph'=>$Image, 'tip'=>'str'] ;\\n }\\n\\n $cursor = Db_allsites::uu(self::$tbl, $flds, $qrywhere, $binds\\n //, $other=['caller' => __FILE__ .' '.', ln '. __LINE__]\\n );\\n\\n if($cursor){ $_SESSION[\\\"SuccessMessage\\\"]=\\\"U s e r Updated Successfully\\\";\\n }else {$_SESSION[\\\"ErrorMessage\\\"]= \\\"U s e r NOT Updated. Try Again !\\\";}\\n\\n // 4. U P L O A D I M A G E\\n move_uploaded_file($_FILES[\\\"Image\\\"][\\\"tmp_name\\\"], $Target);\\n\\n return('1');\\n fnerr:\\n return('0');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"594337a505474ae685da56e223f18fc5\",\n \"score\": \"0.44197235\",\n \"text\": \"public function test_batchUpsertCatalogObjects() {\\n $batches = [];\\n\\n $numObjects = 0;\\n // TODO s/$batchNum < 1/$batchNum < 3/\\n for ($batchNum = 0; $batchNum < 1; $batchNum++) {\\n $batch = [];\\n\\n for($i = 0; $i < 100; $i++) {\\n $itemId = sprintf(\\\"Item-%d-%d\\\", $batchNum, $i);\\n\\n $variationId = sprintf(\\\"#ItemVariation-%d-%d\\\", $batchNum, $i);\\n array_push($batch, new \\\\SquareConnect\\\\Model\\\\CatalogObject([\\n \\\"type\\\" => \\\"ITEM\\\",\\n \\\"id\\\" => \\\"#\\\" . $itemId,\\n \\\"item_data\\\" => [\\n \\\"name\\\" => $itemId,\\n \\\"variations\\\" => [\\n [\\n \\\"type\\\" => \\\"ITEM_VARIATION\\\",\\n \\\"id\\\" => $variationId,\\n \\\"item_variation_data\\\" => [\\n \\\"name\\\" => \\\"Regular\\\",\\n \\\"item_id\\\" => \\\"#\\\" . $itemId,\\n \\\"pricing_type\\\" => \\\"VARIABLE_PRICING\\\"\\n ]\\n ]\\n ]\\n ]\\n ]));\\n $numObjects++;\\n }\\n array_push($batches, [\\\"objects\\\" => $batch]);\\n }\\n\\n $request = new \\\\SquareConnect\\\\Model\\\\BatchUpsertCatalogObjectsRequest([\\n \\\"idempotency_key\\\" => uniqid(),\\n \\\"batches\\\" => $batches\\n ]);\\n $response = self::$api->batchUpsertCatalogObjects($request);\\n\\n $this->assertCount($numObjects, $response->getObjects());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23d299e1fe973f0c6f146431c89a0592\",\n \"score\": \"0.44193205\",\n \"text\": \"function updateFromPack($lang=NULL)\\r\\n\\t{\\r\\n\\t\\tglobal $db;\\r\\n\\t\\tif(!$lang)\\r\\n\\t\\t\\t$lang = $this->lang;\\r\\n\\t\\t$file = BASEDIR.'/includes/langs/'.$lang.'.lang';\\r\\n\\t\\tif(file_exists($file))\\r\\n\\t\\t{\\r\\n\\t\\t\\t$langData = file_get_contents($file);\\r\\n\\t\\t\\t$phrases = json_decode($langData,true);\\r\\n\\t\\t\\t//First lets delete all language phrases\\r\\n\\t\\t\\t$db->delete(tbl(\\\"phrases\\\"),array(\\\"lang_iso\\\"),array($lang));\\r\\n\\t\\t\\t//Now create query and then execute it\\r\\n\\t\\t\\t$query = \\\"INSERT INTO \\\".tbl(\\\"phrases\\\").\\\"\\r\\n\\t\\t\\t(`lang_iso` ,`varname` ,`text`)\\r\\n\\t\\t\\tVALUES\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t$count = 0;\\r\\n\\t\\t\\tforeach($phrases as $key => $phrase)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif($count>0)\\r\\n\\t\\t\\t\\t\\t$query .= \\\",\\\";\\r\\n\\t\\t\\t\\t$query .= \\\"('$lang', '$key', '\\\".addslashes($phrase).\\\"')\\\";\\r\\n\\t\\t\\t\\t$count++;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t$query .= \\\";\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t$db->Execute($query);\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a929d406911271480f8942d4920d259\",\n \"score\": \"0.4414494\",\n \"text\": \"public function testVariant11() {\\n\\n /* Setup\\n ---------------------------------------------*/\\n DbEntityHelper::setCon(self::$propelCon);\\n\\n list(\\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\\n ) = DbEntityHelper::setUpBonusMembers(true, [\\n ]);\\n\\n $new = DbEntityHelper::createSignupMember($VL);\\n\\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\\n $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS) +\\n Transaction::getAmountForReason(Transaction::REASON_OL_BONUS) +\\n Transaction::getAmountForReason(Transaction::REASON_PM_BONUS) +\\n Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL2);\\n // $trfOL += Transaction::getAmountForReason(Transaction::REASON_OL_BONUS);\\n // $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS);\\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\\n // $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\\n\\n $this->assertTransferTotal($trfIT, $IT);\\n $this->assertTransferTotal($trfVL, $VL);\\n $this->assertTransferTotal($trfOL, $OL);\\n $this->assertTransferTotal($trfPM, $PM);\\n $this->assertTransferTotal($trfVS2, $VS2);\\n $this->assertTransferTotal($trfVS1, $VS1);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1af99d81a2120cde152226541fd1ccd\",\n \"score\": \"0.44045475\",\n \"text\": \"public function test_elis_createorupdate_creates_student_enrolment() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/student.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/user.class.php');\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Create the test course.\\n $course = new course(array(\\n 'name' => 'testcoursename',\\n 'idnumber' => 'testcourseidnumber',\\n 'syllabus' => ''\\n ));\\n $course->save();\\n\\n // Create the test class.\\n $class = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\\n $class->save();\\n\\n // Create the test user.\\n $user = new user(array(\\n 'username' => 'testuserusername',\\n 'email' => 'test@useremail.com',\\n 'idnumber' => 'testuseridnumber',\\n 'firstname' => 'testuserfirstname',\\n 'lastname' => 'testuserlastname',\\n 'country' => 'CA'\\n ));\\n $user->save();\\n\\n // Run the student enrolment create action.\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->context = 'class_testclassidnumber';\\n $record->user_username = 'testuserusername';\\n $record->completetime = 'Jan/01/2012';\\n\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n $importplugin->process_record('enrolment', $record, 'bogus');\\n\\n // Validation.\\n $this->assertTrue($DB->record_exists(student::TABLE, array(\\n 'classid' => $class->id,\\n 'userid' => $user->id,\\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 1, 2012)\\n )));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88de5e7ccb8c68395fb627cc1c153ad8\",\n \"score\": \"0.43985716\",\n \"text\": \"function test_update_existing() {\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9452069cb95852616082ca1e85a7ee25\",\n \"score\": \"0.4386919\",\n \"text\": \"public function test_modifyingmoodleuserupdatespmuser() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/admin/tool/uploaduser/locallib.php');\\n $this->load_csv_data();\\n\\n // Update a record.\\n $src = new stdClass;\\n $src->id = 100;\\n $src->firstname = 'Testuser';\\n $src->lastname = 'One';\\n $src->profile_field_sometext = 'boo';\\n $src->profile_field_sometextfrompm = 'bla';\\n $DB->update_record('user', $src);\\n $mdluser = $DB->get_record('user', array('id' => 100));\\n $mcopy = clone($src);\\n $mcopy = uu_pre_process_custom_profile_data($mcopy);\\n profile_save_data($mcopy);\\n events_trigger('user_updated', $mdluser);\\n\\n // Read the PM user and compare.\\n $retr = new user(103, null, array(), false, array());\\n $retr->reset_custom_field_list();\\n $this->assertEquals($mdluser->firstname, $retr->firstname);\\n $this->assertEquals($mdluser->lastname, $retr->lastname);\\n\\n // Check custom fields.\\n $result = new PHPUnit_Extensions_Database_DataSet_DefaultDataSet();\\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_int::TABLE,\\n $DB->get_recordset(field_data_int::TABLE, null, '', 'contextid, fieldid, data')));\\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_char::TABLE,\\n $DB->get_recordset(field_data_char::TABLE, null, '', 'contextid, fieldid, data')));\\n $result->addTable(new moodle_recordset_phpunit_datatable(field_data_text::TABLE,\\n $DB->get_recordset(field_data_text::TABLE, null, '', 'contextid, fieldid, data')));\\n $usercontext = \\\\local_elisprogram\\\\context\\\\user::instance(103);\\n $dataset = new PHPUnit_Extensions_Database_DataSet_CsvDataSet();\\n $dataset->addTable(field_data_int::TABLE, elispm::file('tests/fixtures/user_field_data_int.csv'));\\n $dataset->addTable(field_data_char::TABLE, elispm::file('tests/fixtures/user_field_data_char.csv'));\\n $dataset->addTable(field_data_text::TABLE, elispm::file('tests/fixtures/user_field_data_text.csv'));\\n $dataset = new PHPUnit_Extensions_Database_DataSet_ReplacementDataSet($dataset);\\n $dataset->addFullReplacement('##USERCTXID##', $usercontext->id);\\n $dataset->addFullReplacement('##USERCTXLVL##', CONTEXT_ELIS_USER);\\n // Only the first text field should be changed; everything else should be the same.\\n $dataset->addFullReplacement('First text entry field', $src->profile_field_sometext);\\n $ret = $dataset->addFullReplacement('Second text entry field', $src->profile_field_sometextfrompm);\\n\\n $this->assertDataSetsEqual($dataset, $result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bca8378fd3bc823b94606a7653607692\",\n \"score\": \"0.43822274\",\n \"text\": \"public function test_version1importupdatesbasedonidentifyingfields() {\\n global $CFG;\\n\\n // Set up our data.\\n $this->run_core_user_import(array('idnumber' => 'rlipidnumber'));\\n\\n // Update based on username.\\n $data = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'firstname' => 'setfromusername'\\n );\\n $this->run_core_user_import($data, false);\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n $this->assert_record_exists('user', $data);\\n\\n // Update based on email.\\n $data = array(\\n 'action' => 'update',\\n 'email' => 'rlipuser@rlipdomain.com',\\n 'firstname' => 'setfromemail'\\n );\\n $this->run_core_user_import($data, false);\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n $this->assert_record_exists('user', $data);\\n\\n // Update based on idnumber.\\n $data = array(\\n 'action' => 'update',\\n 'idnumber' => 'rlipidnumber',\\n 'firstname' => 'setfromidnumber'\\n );\\n $this->run_core_user_import($data, false);\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n $this->assert_record_exists('user', $data);\\n\\n // Update based on username, email.\\n $data = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'email' => 'rlipuser@rlipdomain.com',\\n 'firstname' => 'setfromusernameemail'\\n );\\n $this->run_core_user_import($data, false);\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n $this->assert_record_exists('user', $data);\\n\\n // Update based on username, idnumber.\\n $data = array(\\n 'action' => 'update',\\n 'username' => 'rlipusername',\\n 'idnumber' => 'rlipidnumber',\\n 'firstname' => 'setfromusernameidnumber'\\n );\\n $this->run_core_user_import($data, false);\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n $this->assert_record_exists('user', $data);\\n\\n // Update based on email, idnumber.\\n $data = array(\\n 'action' => 'update',\\n 'email' => 'rlipuser@rlipdomain.com',\\n 'idnumber' => 'rlipidnumber',\\n 'firstname' => 'setfromemailidnumber'\\n );\\n $this->run_core_user_import($data, false);\\n unset($data['action']);\\n $data['mnethostid'] = $CFG->mnet_localhost_id;\\n $this->assert_record_exists('user', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"185f57ee28911c58a94861efc658a6e9\",\n \"score\": \"0.4378387\",\n \"text\": \"public function test_elis_createorupdate_creates_userset() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/data/userset.class.php');\\n\\n // Set up initial conditions.\\n set_config('createorupdate', 1, 'rlipimport_version1elis');\\n\\n // Run the user set create action.\\n $record = new stdClass;\\n $record->action = 'update';\\n $record->context = 'cluster';\\n $record->name = 'testusersetname';\\n $record->display = 'testusersetdisplay';\\n\\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\\n $importplugin->fslogger = new silent_fslogger(null);\\n $importplugin->process_record('course', $record, 'bogus');\\n\\n // Validation.\\n $this->assertTrue($DB->record_exists(userset::TABLE, array(\\n 'name' => 'testusersetname',\\n 'display' => 'testusersetdisplay'\\n )));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33f0aef79efc84864e1986cac3048acf\",\n \"score\": \"0.43720922\",\n \"text\": \"public function syncWithProfile($profileId)\\n {\\n $addressCollectionId = Mage::helper('marketingsoftware/config')->getAddressesCollectionId(); \\n \\n if ($addressCollectionId) { \\n Mage::helper('marketingsoftware/rest_request')->put(\\n '/profile/'.$profileId.'/subprofiles/'.$addressCollectionId, $this->_getSubprofileData(), array(\\n 'fields[]' => 'address_id=='.$this->_addressEntity->getId(),\\n 'create' => 'true'\\n )\\n );\\n \\n return true;\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f936c19ebfc5e644d50aefb4507d19e4\",\n \"score\": \"0.43571404\",\n \"text\": \"function test_overwrite() {\\n $sub = new MockupSubscription();\\n\\n $sub->add(':', 'admin', 'digest', '123456789');\\n $sub->add(':wiki:', 'admin', 'digest', '123456789');\\n $sub->add(':', 'admin', 'digest', '1234');\\n $sub->add(':wiki:', 'admin', 'digest', '1234');\\n\\n $subscriptions = $sub->subscribers(':wiki:', 'admin');\\n\\n $this->assertCount(1, $subscriptions[':'], 'More than one subscription saved for the root namespace even though the old one should have been overwritten.');\\n $this->assertCount(1, $subscriptions[':wiki:'], 'More than one subscription saved for the wiki namespace even though the old one should have been overwritten.');\\n $this->assertCount(2, $subscriptions, 'Didn\\\\'t find the expected two subscriptions');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd0852c1f3faacd98b6e268b3dfd7973\",\n \"score\": \"0.43519944\",\n \"text\": \"protected function registerProfiles() {\\n // Generate Variable Profiles \\n\\t\\t \\n\\t \\t//--- Boolean (Type 0)\\n\\t\\t \\n\\t \\t//--- Integer (Type 1)\\n if ( !IPS_VariableProfileExists('RCTPOWER_Ampere') ) {\\n IPS_CreateVariableProfile('RCTPOWER_Ampere', 1 );\\n \\tIPS_SetVariableProfileDigits('RCTPOWER_Ampere', 0 );\\n IPS_SetVariableProfileIcon('RCTPOWER_Ampere', 'Electricity' );\\n IPS_SetVariableProfileText('RCTPOWER_Ampere', \\\"\\\", \\\" A\\\" );\\n }\\n\\t\\t \\n if ( !IPS_VariableProfileExists('RCTPOWER_Voltage') ) {\\n IPS_CreateVariableProfile('RCTPOWER_Voltage', 1 );\\n IPS_SetVariableProfileDigits('RCTPOWER_Voltage', 0 );\\n IPS_SetVariableProfileIcon('RCTPOWER_Voltage', 'Electricity' );\\n IPS_SetVariableProfileText('RCTPOWER_Voltage', \\\"\\\", \\\" V\\\" );\\n } \\n \\n if ( !IPS_VariableProfileExists('RCTPOWER_Power') ) {\\n IPS_CreateVariableProfile('RCTPOWER_Power', 1 );\\n IPS_SetVariableProfileDigits('RCTPOWER_Power', 0 );\\n IPS_SetVariableProfileIcon('RCTPOWER_Power', 'Electricity' );\\n IPS_SetVariableProfileText('RCTPOWER_Power', \\\"\\\", \\\" W\\\" );\\n } \\n\\t\\t \\n if ( !IPS_VariableProfileExists('RCTPOWER_Energy') ) {\\n IPS_CreateVariableProfile('RCTPOWER_Energy', 1 );\\n IPS_SetVariableProfileDigits('RCTPOWER_Energy', 0 );\\n IPS_SetVariableProfileIcon('RCTPOWER_Energy', 'Electricity' );\\n IPS_SetVariableProfileText('RCTPOWER_Energy', \\\"\\\", \\\" Wh\\\" );\\n } \\n\\t\\t \\n //--- Float (Type 2)\\n if ( !IPS_VariableProfileExists('RCTPOWER_Capacity.2') ) {\\n IPS_CreateVariableProfile('RCTPOWER_Capacity.2', 2 );\\n IPS_SetVariableProfileDigits('RCTPOWER_Capacity.2', 2 );\\n IPS_SetVariableProfileIcon('RCTPOWER_Capacity.2', 'Battery' );\\n IPS_SetVariableProfileText('RCTPOWER_Capacity.2', \\\"\\\", \\\" kWh\\\" );\\n }\\n \\n if ( !IPS_VariableProfileExists('RCTPOWER_SoC.1') ) {\\n IPS_CreateVariableProfile('RCTPOWER_SoC.1', 2 );\\n IPS_SetVariableProfileDigits('RCTPOWER_SoC.1', 2 );\\n IPS_SetVariableProfileIcon('RCTPOWER_SoC.1', 'Battery' );\\n IPS_SetVariableProfileText('RCTPOWER_SoC.1', \\\"\\\", \\\" %\\\" );\\n }\\n\\t\\t \\n if ( !IPS_VariableProfileExists('RCTPOWER_PVPower.2') ) {\\n IPS_CreateVariableProfile('RCTPOWER_PVPower.2', 2 );\\n IPS_SetVariableProfileDigits('RCTPOWER_PVPower.2', 2 );\\n IPS_SetVariableProfileIcon('RCTPOWER_PVPower.2', 'Electricity' );\\n IPS_SetVariableProfileText('RCTPOWER_PVPower.2', \\\"\\\", \\\" kWp\\\" );\\n }\\n\\t\\t \\n\\t \\t\\t//--- String (Type 3)\\n\\t\\t \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c965b3d986e82ecb4a2b2c67e28eb7a4\",\n \"score\": \"0.4342288\",\n \"text\": \"public function upgradeAuProperties() : void {\\n $callback = function ($row) {\\n $property = new AuProperty();\\n $property->setParent($this->findEntity(AuProperty::class, $row['parent_id']));\\n $property->setAu($this->findEntity(Au::class, $row['au_id']));\\n $property->setPropertyKey($row['property_key']);\\n $property->setPropertyValue($row['property_value']);\\n\\n return $property;\\n };\\n $this->upgradeTable('au_properties', $callback);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef1b02fd41b7751f0264be731d4b7c14\",\n \"score\": \"0.43302292\",\n \"text\": \"public function testHeCanUpdateProfile()\\n {\\n $this->browse(function (Browser $browser) {\\n $browser->loginAs(User::factory()->create())\\n ->visit('/user/profile')\\n ->type('@name', 'Edited')\\n ->type('@phone', '0606070708')\\n ->type('@email', 'edited@test.fr')\\n ->click('@submit')\\n ->waitForText('Enregistré')\\n ->refresh()\\n ->assertInputValue('@name', 'Edited')\\n ->assertInputValue('@phone', '0606070708')\\n ->assertInputValue('@email', 'edited@test.fr');\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2be25cafecc0594016a39f953149df57\",\n \"score\": \"0.4326639\",\n \"text\": \"private function loadProfilesFromFile() {\\n $this->profiles = json_decode(file_get_contents(D3P_DATAFILE));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7a371ae83e1a5d8b0d05b7288982955\",\n \"score\": \"0.43233198\",\n \"text\": \"public function testPropertyPurposeInsertionInDb()\\n {\\n $this->seeInDatabase('property_purposes', ['purpose' =>'usa']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8925936133b3b13e0a0375e569e2527c\",\n \"score\": \"0.43198892\",\n \"text\": \"public function testTranscripts()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fce8461adc071f4d24831d56ee98479\",\n \"score\": \"0.4315168\",\n \"text\": \"public function usersignup($email,$password ,$otp)\\n {\\n \\t$users = new Users();\\n \\treturn $result = $users->usersignup($email, $password ,$otp);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae47e6e7f805c07147cad372aac53c3c\",\n \"score\": \"0.43149284\",\n \"text\": \"function ups() {\\n $this->code = 'ups';\\n $this->version = '1.0';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6dfd7d39ce65330aa489bd90e527026\",\n \"score\": \"0.4309657\",\n \"text\": \"function TransferModuleProfiles()\\n {\\n foreach (array_keys($this->ModuleDependencies) as $module)\\n {\\n $class=$this->ApplicationClass;\\n\\n $mhash=array\\n (\\n \\\"ReadOnly\\\" => $this->ReadOnly,\\n \\\"DBHash\\\" => $this->DBHash,\\n \\\"LoginType\\\" => $this->LoginType,\\n \\\"LoginData\\\" => $this->LoginData,\\n \\\"LoginID\\\" => $this->LoginID,\\n \\\"AuthHash\\\" => $this->AuthHash,\\n \\\"ModuleName\\\" => $module,\\n \\\"SqlTable\\\" => $this->SqlTable,\\n \\\"SqlTableVars\\\" => $this->SqlTableVars,\\n \\\"DefaultAction\\\" => $this->DefaultAction,\\n \\\"DefaultProfile\\\" => $this->DefaultProfile,\\n \\\"Profile\\\" => $this->Profile,\\n \\\"ModuleLevel\\\" => 1,\\n \\\"CompanyHash\\\" => $this->CompanyHash,\\n \\\"MailInfo\\\" => $this->ApplicationObj()->MyApp_Mail_Info_Get(),\\n \\\"URL_CommonArgs\\\" => $this->URL_CommonArgs,\\n \\\"MySqlActions\\\" => $this->MySqlActions,\\n \\\"Handle\\\" => FALSE,\\n );\\n\\n if (isset($this->Period))\\n {\\n $mhash[ \\\"Period\\\" ]=$this->Period;\\n }\\n\\n $object=new $class ($mhash);\\n $object->InitModule($module,array(),FALSE);\\n\\n $object->Module->TransferProfiles();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c681f4b4b80b7086ebc4b165dde001a6\",\n \"score\": \"0.4301642\",\n \"text\": \"public function test_version1importsetsdefaultsonusercreate() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/core/lib/setup.php');\\n\\n set_config('forcetimezone', 99);\\n\\n // Make sure we are not auto-assigning idnumbers.\\n set_config('auto_assign_user_idnumber', 0, 'elis_program');\\n elis::$config = new elis_config();\\n\\n $this->run_core_user_import(array());\\n\\n $select = \\\"username = :username AND\\n mnethostid = :mnethostid AND\\n auth = :auth AND\\n maildigest = :maildigest AND\\n autosubscribe = :autosubscribe AND\\n trackforums = :trackforums AND\\n timezone = :timezone AND\\n theme = :theme AND\\n lang = :lang AND\\n {$DB->sql_compare_text('description')} = :description AND\\n idnumber = :idnumber AND\\n institution = :institution AND\\n department = :department\\\";\\n $params = array(\\n 'username' => 'rlipusername',\\n 'mnethostid' => $CFG->mnet_localhost_id,\\n 'auth' => 'manual',\\n 'maildigest' => 0,\\n 'autosubscribe' => 1,\\n 'trackforums' => 0,\\n 'timezone' => 99,\\n 'theme' => '',\\n 'lang' => $CFG->lang,\\n 'description' => '',\\n 'idnumber' => '',\\n 'institution' => '',\\n 'department' => ''\\n );\\n\\n $exists = $DB->record_exists_select('user', $select, $params);\\n\\n $this->assertEquals($exists, true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b4d51e3807f64419229c4e31c0e13d2\",\n \"score\": \"0.42880878\",\n \"text\": \"public function testBindersAddProfilesToBinder()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55e1f2b192fd61d78d65d9645fef9ba4\",\n \"score\": \"0.4287313\",\n \"text\": \"protected function initializeUpdateProfileAction()\\n {\\n $propertyMappingConfiguration = $this->arguments['communityUser']->getPropertyMappingConfiguration();\\n $uploadConfiguration = array(\\n UploadedFileReferenceConverter::CONFIGURATION_ALLOWED_FILE_EXTENSIONS => $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'],\\n UploadedFileReferenceConverter::CONFIGURATION_UPLOAD_FOLDER => '1:/userimages/',\\n );\\n $propertyMappingConfiguration->allowAllProperties();\\n $propertyMappingConfiguration->forProperty('falImage')\\n ->setTypeConverterOptions(\\n 'Visol\\\\\\\\Easyvote\\\\\\\\Property\\\\\\\\TypeConverter\\\\\\\\UploadedFileReferenceConverter',\\n $uploadConfiguration\\n );\\n $propertyMappingConfiguration->forProperty('birthdate')->setTypeConverterOption('TYPO3\\\\\\\\CMS\\\\\\\\Extbase\\\\\\\\Property\\\\\\\\TypeConverter\\\\\\\\DateTimeConverter', \\\\TYPO3\\\\CMS\\\\Extbase\\\\Property\\\\TypeConverter\\\\DateTimeConverter::CONFIGURATION_DATE_FORMAT, 'd.m.Y');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af753cad1d5a8511cc5c0e971624bb9a\",\n \"score\": \"0.42807645\",\n \"text\": \"public function testSubscriptionIsAltered()\\n {\\n $this->testUser->subscription('main')->features()->create(['tag' => 'social_dog_profiles', 'name' => 'Social profiles available for your dog', 'value' => 2, 'sort_order' => 25]);\\n $this->assertTrue($this->testUser->subscription('main')->isAltered());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3039c8fdafa2c80eaf2c6f60798cb24b\",\n \"score\": \"0.42790192\",\n \"text\": \"public function installProfile($profile, $languages) {\\n if (!$this->hasRequirementsMet($profile)) {\\n throw new ZiboException('Could not install profile ' . $profile . ': The requirements are not met.');\\n }\\n\\n $client = ClientModule::getClient();\\n if (!$client) {\\n throw new ZiboException('Could not install profile ' . $profile . ': The repository client is not properly configured.');\\n }\\n\\n // install the necessairy modules\\n $profile = $this->getProfile($profile);\\n $modules = $profile->getModules();\\n\\n foreach ($modules as $module) {\\n $client->installModule($module->getNamespace(), $module->getName());\\n }\\n\\n // install the extra languages\\n foreach ($languages as $languageCode) {\\n if ($languageCode == 'en') {\\n continue;\\n }\\n\\n $client->installModule('zibo', 'l10n.' . $languageCode);\\n }\\n\\n $profile->install();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"657da10a59c3695da200ef5c88a2b98f\",\n \"score\": \"0.4276525\",\n \"text\": \"public function saveProfile() {\\n if($this->profile) {\\n foreach($this->profile as $prop => $value){\\n $questionValue = new ProfileQuestionValue(array(\\n 'question' => $prop,\\n 'userId' => $this->id,\\n 'value' => $value\\n ));\\n\\n $questionValue->save();\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4b5d828f024cfd04b62b2b11f2b8ae6\",\n \"score\": \"0.42693198\",\n \"text\": \"public function testPeppolPostParticipant()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4eab28ee4b40d67a3c0e17cfc876940\",\n \"score\": \"0.42669758\",\n \"text\": \"public function testGenericPut() {\\r\\n\\r\\n $preference_data = array(\\r\\n \\\"items\\\" => array(\\r\\n array(\\r\\n \\\"title\\\" => \\\"test2\\\",\\r\\n \\\"quantity\\\" => 1,\\r\\n \\\"currency_id\\\" => \\\"ARS\\\",\\r\\n \\\"unit_price\\\" => 20.55\\r\\n )\\r\\n )\\r\\n );\\r\\n\\r\\n $request = array(\\r\\n \\\"uri\\\" => \\\"/checkout/preferences\\\",\\r\\n \\\"data\\\" => $preference_data\\r\\n );\\r\\n\\r\\n $preference = $this->mp->post($request);\\r\\n\\r\\n // Start updating\\r\\n\\r\\n $preference_data = array(\\r\\n \\\"items\\\" => array(\\r\\n array(\\r\\n \\\"title\\\" => \\\"test2Modified\\\",\\r\\n \\\"quantity\\\" => 2,\\r\\n \\\"currency_id\\\" => \\\"USD\\\",\\r\\n \\\"unit_price\\\" => 100\\r\\n )\\r\\n )\\r\\n );\\r\\n\\r\\n $request = array(\\r\\n \\\"uri\\\" => \\\"/checkout/preferences/\\\".$preference[\\\"response\\\"][\\\"id\\\"],\\r\\n \\\"data\\\" => $preference_data\\r\\n );\\r\\n\\r\\n $preferenceUpdatedResult = $this->mp->put($request);\\r\\n\\r\\n $this->assertTrue($preferenceUpdatedResult[\\\"status\\\"] == 200);\\r\\n\\r\\n $preferenceUpdatedResult = $this->mp->get_preference($preference[\\\"response\\\"][\\\"id\\\"]);\\r\\n\\r\\n $this->assertTrue((double) $preferenceUpdatedResult[\\\"response\\\"][\\\"items\\\"][0][\\\"unit_price\\\"] == 100\\r\\n && (double) $preferenceUpdatedResult[\\\"response\\\"][\\\"items\\\"][0][\\\"quantity\\\"] == 2\\r\\n && $preferenceUpdatedResult[\\\"response\\\"][\\\"items\\\"][0][\\\"title\\\"] == \\\"test2Modified\\\"\\r\\n && $preferenceUpdatedResult[\\\"response\\\"][\\\"items\\\"][0][\\\"currency_id\\\"] == \\\"USD\\\");\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb4a774d5b2bd3015478b9e18977f64d\",\n \"score\": \"0.42598513\",\n \"text\": \"public function test_version1importsupportsuserupdate() {\\n $supports = plugin_supports('rlipimport', 'version1', 'user_update');\\n $requiredfields = array(array('user_username', 'user_email', 'user_idnumber', 'idnumber', 'username', 'email'));\\n $this->assertEquals($supports, $requiredfields);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c0acb297b2c186dd763e1ec916e2ff2\",\n \"score\": \"0.42533287\",\n \"text\": \"function copy()\\n\\t{\\n\\t\\t$model =& $this->getModel('profiles');\\n\\t\\tif($model->copy())\\n\\t\\t{\\n\\t\\t\\t// Show a \\\"COPY OK\\\" message\\n\\t\\t\\t$message = JText::_('PROFILE_COPY_OK');\\n\\t\\t\\t$type = 'message';\\n\\t\\t\\t$this->_switchProfile( $model->getId() );\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t// Show message on failure\\n\\t\\t\\t$message = JText::_('PROFILE_COPY_ERROR');\\n\\t\\t\\t$message .= ' ['.$model->getError().']';\\n\\t\\t\\t$type = 'error';\\n\\t\\t}\\n\\t\\t// Redirect\\n\\t\\t$this->setRedirect('index.php?option='.JRequest::getCmd('option').'&view='.JRequest::getCmd('view'), $message, $type);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8068d22ce86b12c23de4be6f740648e8\",\n \"score\": \"0.4251271\",\n \"text\": \"private function userProfileUpdate(){\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"069d782dcf27c197bd0cb1b150982a69\",\n \"score\": \"0.4241197\",\n \"text\": \"public function testVariant10() {\\n\\n /* Setup\\n ---------------------------------------------*/\\n DbEntityHelper::setCon(self::$propelCon);\\n\\n list(\\n list($IT, $VL, $OL, $PM, $VS2, $VS1),\\n list($trfIT, $trfVL, $trfOL, $trfPM, $trfVS2, $trfVS1),\\n ) = DbEntityHelper::setUpBonusMembers(true, [\\n 'VL' => false,\\n 'OL' => false,\\n ]);\\n\\n $new = DbEntityHelper::createSignupMember($PM);\\n\\n $trfIT += Transaction::getAmountForReason(Transaction::REASON_IT_BONUS);\\n // $trfVL += Transaction::getAmountForReason(Transaction::REASON_VL_BONUS);\\n // $trfOL += Transaction::getAmountForReason(Transaction::REASON_OL_BONUS);\\n $trfPM += Transaction::getAmountForReason(Transaction::REASON_PM_BONUS) +\\n Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL2);\\n // $trfVS2 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_INDIRECT);\\n // $trfVS1 += Transaction::getAmountForReason(Transaction::REASON_ADVERTISED_LVL1);\\n\\n $this->assertTransferTotal($trfIT, $IT);\\n // $this->assertTransferTotal($trfVL, $VL);\\n // $this->assertTransferTotal($trfOL, $OL);\\n $this->assertTransferTotal($trfPM, $PM);\\n $this->assertTransferTotal($trfVS2, $VS2);\\n $this->assertTransferTotal($trfVS1, $VS1);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d614980646705447fe4d5bc0c7beaa75\",\n \"score\": \"0.4239977\",\n \"text\": \"public function __construct(UserProfile $oldProfile, UserProfile $newProfile)\\n {\\n $this->oldProfile = $oldProfile;\\n $this->newProfile = $newProfile;\\n $this->subject(\\\"Обновлен профиль с id: \\\".$oldProfile->id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91d8d778c8a6537b9c1bfe161ffe5a9b\",\n \"score\": \"0.42397067\",\n \"text\": \"public function update(){\\n\\t\\n\\t\\t$email = $this->auth->get_info()->email;\\n\\t\\t\\n\\t\\t$data = array(\\n\\t\\t\\t'address'=> $this->input->post('inputProfileAddress'),\\n\\t\\t\\t'description' => $this->input->post('inputProfileAbout'),\\n\\t\\t\\t'edu_history' => $this->input->post('inputProfileEducation'),\\n\\t\\t\\t'work_history' => $this->input->post('inputProfileWork'),\\n\\t\\t\\t'skills' => $this->input->post('inputSkills'),\\n\\t\\t\\t'interest_area' => $this->input->post('inputInterest'),\\n\\t\\t\\t'location_pref' => $this->input->post('inputLocation'),\\n\\t\\t);\\n\\t\\t$this -> resume_profile_model -> update($email,$data); \\n\\t\\t$this -> index();\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"357a3497a4774de618d823137fc109b6\",\n \"score\": \"0.42364475\",\n \"text\": \"public function test_mapping_applied_during_instructor_enrolment_update() {\\n global $CFG, $DB;\\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/instructor.class.php');\\n require_once($CFG->dirroot.'/elis/program/lib/data/pmclass.class.php');\\n\\n $this->init_mapping();\\n\\n $userid = $this->create_test_user();\\n\\n $course = new course(array(\\n 'name' => 'testcoursename',\\n 'idnumber' => 'testcourseidnumber',\\n 'syllabus' => ''\\n ));\\n $course->save();\\n\\n $pmclass = new pmclass(array('courseid' => $course->id, 'idnumber' => 'testclassidnumber'));\\n $pmclass->save();\\n\\n $instructor = new instructor(array('classid' => $pmclass->id, 'userid' => $userid));\\n $instructor->save();\\n\\n // Run the instructor enrolment update action.\\n $record = new stdClass;\\n $record->customaction = 'update';\\n $record->customcontext = 'class_testclassidnumber';\\n $record->customuser_username = 'testuserusername';\\n $record->customuser_email = 'test@useremail.com';\\n $record->customuser_idnumber = 'testuseridnumber';\\n $record->customassigntime = 'Jan/02/2012';\\n $record->customcompletetime = 'Jan/02/2012';\\n $record->customrole = 'instructor';\\n\\n $this->run_enrolment_import((array)$record);\\n\\n // Validation.\\n $this->assertTrue($DB->record_exists(instructor::TABLE, array(\\n 'classid' => $pmclass->id,\\n 'userid' => $userid,\\n 'assigntime' => rlip_timestamp(0, 0, 0, 1, 2, 2012),\\n 'completetime' => rlip_timestamp(0, 0, 0, 1, 2, 2012)\\n )));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e44829ae38b5dc30d42b36ce14b87645\",\n \"score\": \"0.4234921\",\n \"text\": \"public function postUp()\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b4a000c55467805cd129d634f05f5c1\",\n \"score\": \"0.42304605\",\n \"text\": \"public function safeUp()\\n {\\n $this->insert($this->tableName, [\\n 'label' => 'укр',\\n 'code' => 'ua',\\n 'locale' => 'uk',\\n 'visible' => 1,\\n 'position' => 0,\\n 'created' => date('Y-m-d H:i:s'),\\n 'modified' => date('Y-m-d H:i:s'),\\n ]);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":731,"cells":{"query_id":{"kind":"string","value":"2e640b2819e0e2483ca2c8015eacce77"},"query":{"kind":"string","value":"Show the application dashboard."},"positive_passages":{"kind":"list like","value":[{"docid":"d3a9b9fab616cf1bd8c5352ed0103a73","score":"0.0","text":"public function index()\n { \n $articles=Article::select('id','title','des','img')->get();\n return view('home')->with(['h1'=>$this->h1,'m'=>$this->m,'m2'=>$this->m2,'articles'=>$articles]);\n }","title":""}],"string":"[\n {\n \"docid\": \"d3a9b9fab616cf1bd8c5352ed0103a73\",\n \"score\": \"0.0\",\n \"text\": \"public function index()\\n { \\n $articles=Article::select('id','title','des','img')->get();\\n return view('home')->with(['h1'=>$this->h1,'m'=>$this->m,'m2'=>$this->m2,'articles'=>$articles]);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"6ca363f07685b1b797386a6d50b6d019","score":"0.75147176","text":"public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }","title":""},{"docid":"b996d9240f711f5adb19e49d08fd67fc","score":"0.7503827","text":"public function index()\n {\n\n //GET USER ID from AUTH\n $user_id = Auth::user()->id;\n\n //GET CURRENT USER\n $user = User::find($user_id);\n\n //STATUS\n $status = $user->status;\n\n $applications = Application::where('user_id', $user->id)->get();\n\n //get apps and take user to dashboard\n \n return view('dashboard', compact('applications', 'status')); \n }","title":""},{"docid":"e4f160361f5ffec76c49ef2ed06ddad1","score":"0.74601996","text":"public function index()\n\t{\n\t\t$data = array();\n\t\t\n\t\t$this->template\n\t\t\t->title('Dashboard')\n\t\t\t->build('admin/dashboard', $data);\n\t}","title":""},{"docid":"4be1965e2d8f6d6765bde0a21d9427dc","score":"0.7436689","text":"public function index()\n {\n return view(\"mbober-admin::dashboard\");\n }","title":""},{"docid":"7c1b5dccf160c1b3c89c1795b8edf2a5","score":"0.7381381","text":"public function dashboard()\n {\n return view('dashboard');\n }","title":""},{"docid":"20126b0f7e7a05c57f543bbb237b6b38","score":"0.7357348","text":"public function actionDashboard()\n {\n $data['dashboardTotals'] = Advisers::get_dashboard_admin();\n $data['coordinators'] = Advisers::getCoordinadores();\n $data['campanasNoAsignadas'] = Advisers::campanas_sin_asignar();\n $data['campanasXclientes'] = [];\n $this->layout = 'layout_dashboad_profile_admin';\n $this->render('dashboard', $data);\n }","title":""},{"docid":"1a8925153d4fdf57b36c041ec5d7a890","score":"0.7350788","text":"public function dashboard()\n {\n return view('admin.dashboard');\n }","title":""},{"docid":"dd1c58722932c21baed4ca924c2a28f8","score":"0.7346477","text":"public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }","title":""},{"docid":"572a01cc7a78e633ff200ad99a1aec37","score":"0.7326711","text":"public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }","title":""},{"docid":"33b6803765d3413f8b109213b08a6ac3","score":"0.7316215","text":"public function dashboard() \r\n {\r\n return view('admin.index');\r\n }","title":""},{"docid":"0baf9d369e486c41890395b35bda251e","score":"0.7312567","text":"public function dashboard()\n\t{\n\t\treturn view('Admin_dashboard.dashboard_layout');\n\t}","title":""},{"docid":"85bbb161a101a795a1694b0a4dc8a8a8","score":"0.73072463","text":"public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}","title":""},{"docid":"5c5f5c4d063143e0572107cb2f1fd42c","score":"0.7287626","text":"public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }","title":""},{"docid":"0a7d7f34ccb23c06f16ec5d29958081d","score":"0.72826403","text":"public function dashboard()\n {\n\n return view('admin.dashboard');\n }","title":""},{"docid":"979df6f8245a87c8084d6a419248f035","score":"0.727347","text":"public function dashboard()\n {\n return view('dashboard');\n }","title":""},{"docid":"979df6f8245a87c8084d6a419248f035","score":"0.727347","text":"public function dashboard()\n {\n return view('dashboard');\n }","title":""},{"docid":"979df6f8245a87c8084d6a419248f035","score":"0.727347","text":"public function dashboard()\n {\n return view('dashboard');\n }","title":""},{"docid":"979df6f8245a87c8084d6a419248f035","score":"0.727347","text":"public function dashboard()\n {\n return view('dashboard');\n }","title":""},{"docid":"979df6f8245a87c8084d6a419248f035","score":"0.727347","text":"public function dashboard()\n {\n return view('dashboard');\n }","title":""},{"docid":"8cd0a13f3368c82f274273b3a5634a62","score":"0.7251768","text":"public function index()\n {\n return view('admin.dashboard');\n }","title":""},{"docid":"9a8895c8d16938e252d378911c16e538","score":"0.7249155","text":"public function index()\n\t{\n\t\treturn view('sanatorium/dashboards::dashboards.index');\n\t}","title":""},{"docid":"eec112d88fa45423422bd62ba78455f7","score":"0.7241342","text":"public function index()\n {\n return view('adm.dashboard');\n }","title":""},{"docid":"07677c91c06fb8b57e695e3780a0ed43","score":"0.7235562","text":"public function show()\n {\n return view('dashboard');\n }","title":""},{"docid":"170c8bf6de673492828f0205cea49285","score":"0.7235519","text":"public function index()\n {\n return view('admin.dashboard');\n }","title":""},{"docid":"0864e36c5e3718d97ca20a891926e55e","score":"0.72071123","text":"public function index() {\n\t\t$this->dashboard();\n\t}","title":""},{"docid":"0864e36c5e3718d97ca20a891926e55e","score":"0.72071123","text":"public function index() {\n\t\t$this->dashboard();\n\t}","title":""},{"docid":"de280eb71f9d853a6bf22ee3821deaa6","score":"0.71989936","text":"public function index() {\n return view('modules.home.dashboard');\n }","title":""},{"docid":"97dda8eae48a2e526ac848d1bda32d1f","score":"0.7197427","text":"public function show()\n {\n return view('dashboard.dashboard');\n \n }","title":""},{"docid":"6be9f228685ce6fdeb0759b9a817c00d","score":"0.71913266","text":"public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }","title":""},{"docid":"b88c0a9468d221b6b7183a454eceffd5","score":"0.717969","text":"public function index()\n {\n $packages = VibrantTools::get_vibrant_packages('backend', true);\n return view('vibrant::modules.dashboard.dashboard')->with(compact('packages'));\n }","title":""},{"docid":"64888dc6dd659cb1029f72d6c60ca06f","score":"0.71790016","text":"public function dashboard()\n { \n return view('jobposter.dashboard');\n }","title":""},{"docid":"c84cc86b718b2a1a5148e086405d4ba5","score":"0.71684825","text":"public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}","title":""},{"docid":"86e7903b433e6ae3ffa9c2222bfb7b67","score":"0.71631765","text":"public function index()\n\t{\n\n\t\treturn view('dashboard');\n\t}","title":""},{"docid":"6ab8df0b0682c1366273ee1a9fe7ad24","score":"0.7160822","text":"public function index()\n {\n return view(\"studio.dashboard\");\n }","title":""},{"docid":"e2de8e0dd9ab000633e243626cc45046","score":"0.71503055","text":"public function index(){\n return view('client.dashboard.index');\n }","title":""},{"docid":"52ddeb03572361410e81d3460a9bfe57","score":"0.7146797","text":"public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }","title":""},{"docid":"dc50af2aef83e99d7a83c50f03b72521","score":"0.7132746","text":"public function index()\n {\n return view('admin.dashboard.index');\n }","title":""},{"docid":"5eca04c3749a0e4bafeb08f4ebca8e57","score":"0.71249074","text":"public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }","title":""},{"docid":"a2500c1352afb9bf13101524781b97c3","score":"0.71218014","text":"public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }","title":""},{"docid":"61eae6c796370ac8612e77dd2b70a14f","score":"0.71170413","text":"public function getDashboard() {\n return view('admin.dashboard');\n }","title":""},{"docid":"111cd1f21f2b70892ceca83a3b0f2d99","score":"0.7107029","text":"public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }","title":""},{"docid":"0ff31c767f948f8eb9ab9c7a67c408b9","score":"0.70935637","text":"public function dashboard()\n {\n return view('student.template.home');\n }","title":""},{"docid":"e9e333d30b0a5fbbd74d7ac86380e64f","score":"0.7088498","text":"public function index()\n {\n return view('admin/dashboard');\n }","title":""},{"docid":"38b41688951d0db23a22fb3508eccc5c","score":"0.7081685","text":"public function index() {\n $this->tplVars = $this->tplVars + [\n 'page_title' => $this->pageTitle\n ];\n \n //affichage\n \\Renderer::showAdmin(\"dashboard\",$this->tplVars);\n \n }","title":""},{"docid":"07d52f7b1ea4ee50c7592fe576ea896b","score":"0.708061","text":"public function index()\n {\n return view('admin::settings.development.dashboard');\n }","title":""},{"docid":"07d52f7b1ea4ee50c7592fe576ea896b","score":"0.708061","text":"public function index()\n {\n return view('admin::settings.development.dashboard');\n }","title":""},{"docid":"1f38fc7d872c262628f3f0107ddb2501","score":"0.70773643","text":"public function dashboard()\n {\n $this->middleware('auth:admin');\n return view('admin.dashboard');\n }","title":""},{"docid":"7c62fe1f03fd48ba49ec4ac57acd9963","score":"0.7075653","text":"public function index()\n {\n return view('dashboard.dashboard');\n }","title":""},{"docid":"c9e82b04a5cffddf30be74e089a4641e","score":"0.70751685","text":"public function show()\n {\n return view('dashboard::show');\n }","title":""},{"docid":"bb7b6e579d9f60770094dbdec8f74217","score":"0.7068705","text":"public function index()\n {\n return view('layouts.admin')->with('dashboard_content', 'dashboards.admin.pages.home');\n }","title":""},{"docid":"10d657e45e11a73ab81e1713a80978b3","score":"0.70551085","text":"public function index()\n {\n return view('dashboard', [\n 'page' => 'dashboard',\n 'pv' => $this->getPrioritizedVanalability(),\n 'heapMap' => $this->getHeapMap(),\n 'affteced_vendors' => $this->afftecedVendors()\n ]);\n }","title":""},{"docid":"6596820b3e732832450690d996db27b0","score":"0.70550084","text":"public function dashboard(){\n return view('Admin.dashboard');\n }","title":""},{"docid":"b2e66dbfb26fa2510d672cbb76a44c10","score":"0.7053246","text":"public static function dashboard() {\n\n LoggerHelper::log('DASHBOARD', trans('logs.msg.dashboard'));\n }","title":""},{"docid":"3117d94bf9925c9d93a0e4ea862d6a95","score":"0.7043605","text":"public function index()\n { \n return view('admin-views.dashboard');\n }","title":""},{"docid":"8043e6822834854fdd3f31af76d3ca8d","score":"0.70401806","text":"public function index()\n {\n $data = $this->dashboardRepository->GetData();\n return view('dashboard.index', $data);\n }","title":""},{"docid":"db68bc26c375facb0c385bd915338d84","score":"0.70393986","text":"public function getDashboard()\n {\n return view('dashboard');\n }","title":""},{"docid":"0c4ec303804e59bb6c00128154470515","score":"0.70197886","text":"function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }","title":""},{"docid":"ac048fb69071d046c75e92b736a8032d","score":"0.70190316","text":"public function home()\n {\n return view('Espace_Admin.dashboard');\n }","title":""},{"docid":"f31ad0d1b788b200758e4a29c3d1aa9c","score":"0.70185125","text":"public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }","title":""},{"docid":"f04045b88470c98bd7bb7c37e2c7c091","score":"0.7014912","text":"public function getDashboard()\n\t{\n\t\t$this->helpers->setPageTitle('Dashboard');\n\n\t\treturn $this->view->make('larapress::pages.cp.dashboard');\n\t}","title":""},{"docid":"7c16e32b9d9db71b1e7bbfdc769d011c","score":"0.70139873","text":"public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}","title":""},{"docid":"2b20a4e25b8ca061cf7d21e2b79bddc2","score":"0.700917","text":"public function index()\n {\n return view('dashboard');\n }","title":""},{"docid":"2b20a4e25b8ca061cf7d21e2b79bddc2","score":"0.700917","text":"public function index()\n {\n return view('dashboard');\n }","title":""},{"docid":"2b20a4e25b8ca061cf7d21e2b79bddc2","score":"0.700917","text":"public function index()\n {\n return view('dashboard');\n }","title":""},{"docid":"2b20a4e25b8ca061cf7d21e2b79bddc2","score":"0.700917","text":"public function index()\n {\n return view('dashboard');\n }","title":""},{"docid":"2b20a4e25b8ca061cf7d21e2b79bddc2","score":"0.700917","text":"public function index()\n {\n return view('dashboard');\n }","title":""},{"docid":"2b20a4e25b8ca061cf7d21e2b79bddc2","score":"0.700917","text":"public function index()\n {\n return view('dashboard');\n }","title":""},{"docid":"2b20a4e25b8ca061cf7d21e2b79bddc2","score":"0.700917","text":"public function index()\n {\n return view('dashboard');\n }","title":""},{"docid":"9cbc1dee01ddc9d7811e0ba1e9baa698","score":"0.6993952","text":"function admindashboard() {\n $this->loadViews(\"admin-dashboard\", $this->global);\n }","title":""},{"docid":"7fff9c47aadce83afc45ba921a3beca4","score":"0.6983825","text":"public function index()\n\t{\n\t\treturn View::make('pages.dashboard')->with('pageinfo', self::$pageinfo);\n\t}","title":""},{"docid":"f12a63ce7853b6dc828657ef222c7ddf","score":"0.6982444","text":"public function indexAction()\n {\n $this->loadDashboard();\n return;\n }","title":""},{"docid":"e2aadb15104199f3f5503dcc6999456d","score":"0.69810367","text":"public function index()\n {\n return view('pemeriksa.dashboard');\n }","title":""},{"docid":"bdc3c91e624fcd10d692ec797ca3a15d","score":"0.69776684","text":"public function index()\n {\n $users = User::count();\n\n $workers = Worker::where('type', 'internal')->count();\n\n $outsource = Worker::where('type', 'external')->count();\n\n $customers = Customer::count();\n\n $widget = [\n 'users' => $users,\n 'customers' => $customers,\n 'workers' => $workers,\n 'outsources' => $outsource\n ];\n\n return view('admin.dashboard', compact('widget'));\n }","title":""},{"docid":"dc41ce6f45347c107a8831c7eb795185","score":"0.69741416","text":"public function index() {\n return view('dashboard', []);\n }","title":""},{"docid":"58a304c7b0ec63755342e2693b5f4bbf","score":"0.6968815","text":"public function index()\n {\n return view('back-end.dashboard.index');\n //\n }","title":""},{"docid":"056e97ec46471848aa31ad48e07a6f89","score":"0.6968294","text":"public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}","title":""},{"docid":"3ebc2b4f51f015764f2c12c0fa301b9b","score":"0.69586027","text":"public function index()\n {\n\n return view('dashboard');\n }","title":""},{"docid":"b1bc9e66748e1ce3a6e08d92486fbadf","score":"0.6953351","text":"public function index()\n {\n $dashboard = true;\n $count = [\n 'products' => \\App\\Models\\Product::all()->count(),\n 'customProducts' => \\App\\Models\\CustomProduct::all()->count(),\n ];\n $sliders = \\App\\Models\\Slider::orderBy('order', 'asc')->get();\n $products = \\App\\Models\\Product::orderBy('created_at', 'desc')->take(5)->get();\n $customProducts = \\App\\Models\\CustomProduct::orderBy('new', 'desc')->take(5)->get();\n return view('admin.dashboard', compact('dashboard', 'sliders', 'count', 'products', 'customProducts'));\n }","title":""},{"docid":"38295d33a0573422f88ee12bb5c31724","score":"0.6941439","text":"public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}","title":""},{"docid":"72c899cfcc22666e86f08a40d45d4219","score":"0.6938837","text":"public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }","title":""},{"docid":"01c798aad909315846e6bd472a26180f","score":"0.6937524","text":"public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }","title":""},{"docid":"2b5593b4af9be225b5166a23d9f3d08e","score":"0.6937456","text":"public function index()\n {\n return view('dashboard.index');\n }","title":""},{"docid":"2b5593b4af9be225b5166a23d9f3d08e","score":"0.6937456","text":"public function index()\n {\n return view('dashboard.index');\n }","title":""},{"docid":"bf7558a7b5b06153401330a223d006c7","score":"0.6935287","text":"public function index()\n {\n\n return view('admin.dashboard');\n }","title":""},{"docid":"b2a971d0b4fb5cffdb8f5c946e729fcd","score":"0.69276494","text":"public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }","title":""},{"docid":"922451fb6aecee980204982f6f19adc0","score":"0.6923569","text":"public function index()\n {\n return view('tecCard.dashboard');\n }","title":""},{"docid":"d9465a826d2e1cfbc11bb14c61dad870","score":"0.6921651","text":"public function index()\n {\n return view('/dashboard');\n }","title":""},{"docid":"3ad9c9aa5b812f8d2de51f71c4f11496","score":"0.69074917","text":"public function index()\n {\n \treturn view('dashboard');\n }","title":""},{"docid":"614f95d18d05c465ca1fe75dd049502b","score":"0.6906208","text":"public function index() : object\n {\n return view('dashboard.index');\n }","title":""},{"docid":"1e2a1b1071b3223fbc25a29f11515ede","score":"0.69062036","text":"public function index()\n { \n return view('admin.dashboard');\n }","title":""},{"docid":"5195827794be53d05a2d42516f683a8f","score":"0.69032675","text":"function dashboard()\n\t{\n\t\t// Save Menu\n\t\t$this->events->add_filter( 'admin_menus', array( $this, 'create_menus' ) );\n\t\t// Register Page\n\t\t$this->Gui->register_page( 'menu_builder', \tarray( $this, 'menu_builder_controller' ) );\n\t}","title":""},{"docid":"658d2f5ba7785e7995a6291da73819fc","score":"0.6894836","text":"public function index() {\n\n // Add page stylesheets\n XCMS_Page::getInstance()->addStylesheet(array(\n \"assets/css/backend/mng_dashboard.css\"\n ));\n\n // Add page stylesheets\n XCMS_Page::getInstance()->addScript(array(\n \"assets/scripts/backend/mng_dashboard.js\"\n ));\n\n $this->load->view(\"dashboard.tpl\", array(\n \"cacheSize\" => formatBytes(getDirectorySize(XCMS_CONFIG::get(\"FOLDER_CACHE\")), 0),\n \"logSize\" => formatBytes(getDirectorySize(XCMS_CONFIG::get(\"FOLDER_LOGS\")), 0)\n ));\n\n }","title":""},{"docid":"c29ae862edc655716b800196553b9de7","score":"0.68922836","text":"public function clientDashboard()\n {\n return view('clientuser.dashboard');\n }","title":""},{"docid":"4721631599f0740d7a2b3b6cc23d2ad8","score":"0.68902075","text":"public function index()\n {\n\n return view('dashboard.dashboard');\n }","title":""},{"docid":"86f89b60098868c27d89d70c72ffe049","score":"0.6881129","text":"public function dashboard()\n {\n return view('content.content-dashboard');\n }","title":""},{"docid":"53048283716bb8337e5e70c34bd6b4dc","score":"0.6880131","text":"public function dashboard()\n {\n if(Auth::user()->isAdmin()) {\n return view('admin.dashboard');\n } else {\n return 'Vous etes pas admin';\n }\n }","title":""},{"docid":"3deb098dcca1d7bd9482b11c002bc480","score":"0.686915","text":"public function index()\n {\n return view('/dashboard/index');\n }","title":""},{"docid":"20029478a2150db9aba3ddfaf7986e54","score":"0.6858411","text":"public function index()\n {\n $user = User::find(Sentry::getUser()->id)->load(\n array(\n 'episodeLinkRequests.episode.show',\n 'episodeLinks.episode.show',\n 'favourites.episode.show',\n 'watchlist.episode.show',\n 'favouriteShows.show',\n 'watchlistShow.show',\n 'watched.episode.show',\n 'watchedShow.show'\n )\n );\n return View::make('users.dashboard' , compact('user'));\n }","title":""},{"docid":"f5838755aa909b6aa2a2ba61b7c5332a","score":"0.68479055","text":"public function index()\n {\n return view('dashboard.home');\n }","title":""},{"docid":"55c0bbf8fa0cf56eff7cf67c0ae30ea8","score":"0.6844151","text":"public function show()\n {\n return view('barber.barber-dashboard');\n }","title":""},{"docid":"f374d9f561f51446548bde73327a7974","score":"0.6838798","text":"public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }","title":""}],"string":"[\n {\n \"docid\": \"6ca363f07685b1b797386a6d50b6d019\",\n \"score\": \"0.75147176\",\n \"text\": \"public function showDashboard()\\n {\\n return View::make('users.dashboard', [\\n 'user' => Sentry::getUser(),\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b996d9240f711f5adb19e49d08fd67fc\",\n \"score\": \"0.7503827\",\n \"text\": \"public function index()\\n {\\n\\n //GET USER ID from AUTH\\n $user_id = Auth::user()->id;\\n\\n //GET CURRENT USER\\n $user = User::find($user_id);\\n\\n //STATUS\\n $status = $user->status;\\n\\n $applications = Application::where('user_id', $user->id)->get();\\n\\n //get apps and take user to dashboard\\n \\n return view('dashboard', compact('applications', 'status')); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4f160361f5ffec76c49ef2ed06ddad1\",\n \"score\": \"0.74601996\",\n \"text\": \"public function index()\\n\\t{\\n\\t\\t$data = array();\\n\\t\\t\\n\\t\\t$this->template\\n\\t\\t\\t->title('Dashboard')\\n\\t\\t\\t->build('admin/dashboard', $data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4be1965e2d8f6d6765bde0a21d9427dc\",\n \"score\": \"0.7436689\",\n \"text\": \"public function index()\\n {\\n return view(\\\"mbober-admin::dashboard\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c1b5dccf160c1b3c89c1795b8edf2a5\",\n \"score\": \"0.7381381\",\n \"text\": \"public function dashboard()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20126b0f7e7a05c57f543bbb237b6b38\",\n \"score\": \"0.7357348\",\n \"text\": \"public function actionDashboard()\\n {\\n $data['dashboardTotals'] = Advisers::get_dashboard_admin();\\n $data['coordinators'] = Advisers::getCoordinadores();\\n $data['campanasNoAsignadas'] = Advisers::campanas_sin_asignar();\\n $data['campanasXclientes'] = [];\\n $this->layout = 'layout_dashboad_profile_admin';\\n $this->render('dashboard', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a8925153d4fdf57b36c041ec5d7a890\",\n \"score\": \"0.7350788\",\n \"text\": \"public function dashboard()\\n {\\n return view('admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd1c58722932c21baed4ca924c2a28f8\",\n \"score\": \"0.7346477\",\n \"text\": \"public function showDashBoard()\\n {\\n \\treturn view('Admins.AdminDashBoard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"572a01cc7a78e633ff200ad99a1aec37\",\n \"score\": \"0.7326711\",\n \"text\": \"public function index()\\n {\\n return view('admin.dashboard', ['title' => 'Dashboard']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33b6803765d3413f8b109213b08a6ac3\",\n \"score\": \"0.7316215\",\n \"text\": \"public function dashboard() \\r\\n {\\r\\n return view('admin.index');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0baf9d369e486c41890395b35bda251e\",\n \"score\": \"0.7312567\",\n \"text\": \"public function dashboard()\\n\\t{\\n\\t\\treturn view('Admin_dashboard.dashboard_layout');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85bbb161a101a795a1694b0a4dc8a8a8\",\n \"score\": \"0.73072463\",\n \"text\": \"public function dashboard()\\n\\t{\\n\\t\\t$page_title = 'organizer dashboard';\\n\\t\\treturn View::make('organizer.dashboard',compact('page_title'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c5f5c4d063143e0572107cb2f1fd42c\",\n \"score\": \"0.7287626\",\n \"text\": \"public function dashboard()\\n {\\n\\t\\t$traffic = TrafficService::getTraffic();\\n\\t\\t$devices = TrafficService::getDevices();\\n\\t\\t$browsers = TrafficService::getBrowsers();\\n\\t\\t$status = OrderService::getStatus();\\n\\t\\t$orders = OrderService::getOrder();\\n\\t\\t$users = UserService::getTotal();\\n\\t\\t$products = ProductService::getProducts();\\n\\t\\t$views = ProductService::getViewed();\\n\\t\\t$total_view = ProductService::getTotalView();\\n\\t\\t$cashbook = CashbookService::getAccount();\\n $stock = StockService::getStock();\\n\\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a7d7f34ccb23c06f16ec5d29958081d\",\n \"score\": \"0.72826403\",\n \"text\": \"public function dashboard()\\n {\\n\\n return view('admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"979df6f8245a87c8084d6a419248f035\",\n \"score\": \"0.727347\",\n \"text\": \"public function dashboard()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"979df6f8245a87c8084d6a419248f035\",\n \"score\": \"0.727347\",\n \"text\": \"public function dashboard()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"979df6f8245a87c8084d6a419248f035\",\n \"score\": \"0.727347\",\n \"text\": \"public function dashboard()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"979df6f8245a87c8084d6a419248f035\",\n \"score\": \"0.727347\",\n \"text\": \"public function dashboard()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"979df6f8245a87c8084d6a419248f035\",\n \"score\": \"0.727347\",\n \"text\": \"public function dashboard()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8cd0a13f3368c82f274273b3a5634a62\",\n \"score\": \"0.7251768\",\n \"text\": \"public function index()\\n {\\n return view('admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a8895c8d16938e252d378911c16e538\",\n \"score\": \"0.7249155\",\n \"text\": \"public function index()\\n\\t{\\n\\t\\treturn view('sanatorium/dashboards::dashboards.index');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eec112d88fa45423422bd62ba78455f7\",\n \"score\": \"0.7241342\",\n \"text\": \"public function index()\\n {\\n return view('adm.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07677c91c06fb8b57e695e3780a0ed43\",\n \"score\": \"0.7235562\",\n \"text\": \"public function show()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"170c8bf6de673492828f0205cea49285\",\n \"score\": \"0.7235519\",\n \"text\": \"public function index()\\n {\\n return view('admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0864e36c5e3718d97ca20a891926e55e\",\n \"score\": \"0.72071123\",\n \"text\": \"public function index() {\\n\\t\\t$this->dashboard();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0864e36c5e3718d97ca20a891926e55e\",\n \"score\": \"0.72071123\",\n \"text\": \"public function index() {\\n\\t\\t$this->dashboard();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de280eb71f9d853a6bf22ee3821deaa6\",\n \"score\": \"0.71989936\",\n \"text\": \"public function index() {\\n return view('modules.home.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97dda8eae48a2e526ac848d1bda32d1f\",\n \"score\": \"0.7197427\",\n \"text\": \"public function show()\\n {\\n return view('dashboard.dashboard');\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6be9f228685ce6fdeb0759b9a817c00d\",\n \"score\": \"0.71913266\",\n \"text\": \"public function index()\\n {\\n return view('admin.dashboard.dashboard');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b88c0a9468d221b6b7183a454eceffd5\",\n \"score\": \"0.717969\",\n \"text\": \"public function index()\\n {\\n $packages = VibrantTools::get_vibrant_packages('backend', true);\\n return view('vibrant::modules.dashboard.dashboard')->with(compact('packages'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64888dc6dd659cb1029f72d6c60ca06f\",\n \"score\": \"0.71790016\",\n \"text\": \"public function dashboard()\\n { \\n return view('jobposter.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c84cc86b718b2a1a5148e086405d4ba5\",\n \"score\": \"0.71684825\",\n \"text\": \"public function show()\\n\\t{\\n\\t\\t//\\n\\t\\t$apps = \\\\App\\\\application::all();\\n\\t\\treturn view('applications.view', compact('apps'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86e7903b433e6ae3ffa9c2222bfb7b67\",\n \"score\": \"0.71631765\",\n \"text\": \"public function index()\\n\\t{\\n\\n\\t\\treturn view('dashboard');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ab8df0b0682c1366273ee1a9fe7ad24\",\n \"score\": \"0.7160822\",\n \"text\": \"public function index()\\n {\\n return view(\\\"studio.dashboard\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2de8e0dd9ab000633e243626cc45046\",\n \"score\": \"0.71503055\",\n \"text\": \"public function index(){\\n return view('client.dashboard.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52ddeb03572361410e81d3460a9bfe57\",\n \"score\": \"0.7146797\",\n \"text\": \"public function indexAction()\\n {\\n $dashboard = $this->getDashboard();\\n\\n return $this->render('ESNDashboardBundle::index.html.twig', array(\\n 'title' => \\\"Dashboard\\\"\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc50af2aef83e99d7a83c50f03b72521\",\n \"score\": \"0.7132746\",\n \"text\": \"public function index()\\n {\\n return view('admin.dashboard.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5eca04c3749a0e4bafeb08f4ebca8e57\",\n \"score\": \"0.71249074\",\n \"text\": \"public function index()\\n {\\n // return component view('dashboard.index');\\n return view('layouts.admin_master');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2500c1352afb9bf13101524781b97c3\",\n \"score\": \"0.71218014\",\n \"text\": \"public function index()\\n {\\n\\n $no_of_apps = UploadApp::count();\\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\\n\\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61eae6c796370ac8612e77dd2b70a14f\",\n \"score\": \"0.71170413\",\n \"text\": \"public function getDashboard() {\\n return view('admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"111cd1f21f2b70892ceca83a3b0f2d99\",\n \"score\": \"0.7107029\",\n \"text\": \"public function dashboard() {\\n $data = ['title' => 'Dashboard'];\\n return view('pages.admin.dashboard', $data)->with([\\n 'users' => $this->users,\\n 'num_services' => Service::count(),\\n 'num_products' => Product::count(),\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ff31c767f948f8eb9ab9c7a67c408b9\",\n \"score\": \"0.70935637\",\n \"text\": \"public function dashboard()\\n {\\n return view('student.template.home');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9e333d30b0a5fbbd74d7ac86380e64f\",\n \"score\": \"0.7088498\",\n \"text\": \"public function index()\\n {\\n return view('admin/dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38b41688951d0db23a22fb3508eccc5c\",\n \"score\": \"0.7081685\",\n \"text\": \"public function index() {\\n $this->tplVars = $this->tplVars + [\\n 'page_title' => $this->pageTitle\\n ];\\n \\n //affichage\\n \\\\Renderer::showAdmin(\\\"dashboard\\\",$this->tplVars);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07d52f7b1ea4ee50c7592fe576ea896b\",\n \"score\": \"0.708061\",\n \"text\": \"public function index()\\n {\\n return view('admin::settings.development.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07d52f7b1ea4ee50c7592fe576ea896b\",\n \"score\": \"0.708061\",\n \"text\": \"public function index()\\n {\\n return view('admin::settings.development.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f38fc7d872c262628f3f0107ddb2501\",\n \"score\": \"0.70773643\",\n \"text\": \"public function dashboard()\\n {\\n $this->middleware('auth:admin');\\n return view('admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c62fe1f03fd48ba49ec4ac57acd9963\",\n \"score\": \"0.7075653\",\n \"text\": \"public function index()\\n {\\n return view('dashboard.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9e82b04a5cffddf30be74e089a4641e\",\n \"score\": \"0.70751685\",\n \"text\": \"public function show()\\n {\\n return view('dashboard::show');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb7b6e579d9f60770094dbdec8f74217\",\n \"score\": \"0.7068705\",\n \"text\": \"public function index()\\n {\\n return view('layouts.admin')->with('dashboard_content', 'dashboards.admin.pages.home');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10d657e45e11a73ab81e1713a80978b3\",\n \"score\": \"0.70551085\",\n \"text\": \"public function index()\\n {\\n return view('dashboard', [\\n 'page' => 'dashboard',\\n 'pv' => $this->getPrioritizedVanalability(),\\n 'heapMap' => $this->getHeapMap(),\\n 'affteced_vendors' => $this->afftecedVendors()\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6596820b3e732832450690d996db27b0\",\n \"score\": \"0.70550084\",\n \"text\": \"public function dashboard(){\\n return view('Admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2e66dbfb26fa2510d672cbb76a44c10\",\n \"score\": \"0.7053246\",\n \"text\": \"public static function dashboard() {\\n\\n LoggerHelper::log('DASHBOARD', trans('logs.msg.dashboard'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3117d94bf9925c9d93a0e4ea862d6a95\",\n \"score\": \"0.7043605\",\n \"text\": \"public function index()\\n { \\n return view('admin-views.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8043e6822834854fdd3f31af76d3ca8d\",\n \"score\": \"0.70401806\",\n \"text\": \"public function index()\\n {\\n $data = $this->dashboardRepository->GetData();\\n return view('dashboard.index', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db68bc26c375facb0c385bd915338d84\",\n \"score\": \"0.70393986\",\n \"text\": \"public function getDashboard()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c4ec303804e59bb6c00128154470515\",\n \"score\": \"0.70197886\",\n \"text\": \"function showDashboard()\\n { \\n $logeado = $this->checkCredentials();\\n if ($logeado==true)\\n $this->view->ShowDashboard();\\n else\\n $this->view->showLogin();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac048fb69071d046c75e92b736a8032d\",\n \"score\": \"0.70190316\",\n \"text\": \"public function home()\\n {\\n return view('Espace_Admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f31ad0d1b788b200758e4a29c3d1aa9c\",\n \"score\": \"0.70185125\",\n \"text\": \"public function index()\\n { \\n $params['crumbs'] = 'Home';\\n $params['active'] = 'home';\\n \\n return view('admin.dashboard.index', $params);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f04045b88470c98bd7bb7c37e2c7c091\",\n \"score\": \"0.7014912\",\n \"text\": \"public function getDashboard()\\n\\t{\\n\\t\\t$this->helpers->setPageTitle('Dashboard');\\n\\n\\t\\treturn $this->view->make('larapress::pages.cp.dashboard');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c16e32b9d9db71b1e7bbfdc769d011c\",\n \"score\": \"0.70139873\",\n \"text\": \"public function index()\\n\\t{\\n\\t\\treturn view::make('customer_panel.dashboard');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b20a4e25b8ca061cf7d21e2b79bddc2\",\n \"score\": \"0.700917\",\n \"text\": \"public function index()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b20a4e25b8ca061cf7d21e2b79bddc2\",\n \"score\": \"0.700917\",\n \"text\": \"public function index()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b20a4e25b8ca061cf7d21e2b79bddc2\",\n \"score\": \"0.700917\",\n \"text\": \"public function index()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b20a4e25b8ca061cf7d21e2b79bddc2\",\n \"score\": \"0.700917\",\n \"text\": \"public function index()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b20a4e25b8ca061cf7d21e2b79bddc2\",\n \"score\": \"0.700917\",\n \"text\": \"public function index()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b20a4e25b8ca061cf7d21e2b79bddc2\",\n \"score\": \"0.700917\",\n \"text\": \"public function index()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b20a4e25b8ca061cf7d21e2b79bddc2\",\n \"score\": \"0.700917\",\n \"text\": \"public function index()\\n {\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cbc1dee01ddc9d7811e0ba1e9baa698\",\n \"score\": \"0.6993952\",\n \"text\": \"function admindashboard() {\\n $this->loadViews(\\\"admin-dashboard\\\", $this->global);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fff9c47aadce83afc45ba921a3beca4\",\n \"score\": \"0.6983825\",\n \"text\": \"public function index()\\n\\t{\\n\\t\\treturn View::make('pages.dashboard')->with('pageinfo', self::$pageinfo);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f12a63ce7853b6dc828657ef222c7ddf\",\n \"score\": \"0.6982444\",\n \"text\": \"public function indexAction()\\n {\\n $this->loadDashboard();\\n return;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2aadb15104199f3f5503dcc6999456d\",\n \"score\": \"0.69810367\",\n \"text\": \"public function index()\\n {\\n return view('pemeriksa.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdc3c91e624fcd10d692ec797ca3a15d\",\n \"score\": \"0.69776684\",\n \"text\": \"public function index()\\n {\\n $users = User::count();\\n\\n $workers = Worker::where('type', 'internal')->count();\\n\\n $outsource = Worker::where('type', 'external')->count();\\n\\n $customers = Customer::count();\\n\\n $widget = [\\n 'users' => $users,\\n 'customers' => $customers,\\n 'workers' => $workers,\\n 'outsources' => $outsource\\n ];\\n\\n return view('admin.dashboard', compact('widget'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc41ce6f45347c107a8831c7eb795185\",\n \"score\": \"0.69741416\",\n \"text\": \"public function index() {\\n return view('dashboard', []);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58a304c7b0ec63755342e2693b5f4bbf\",\n \"score\": \"0.6968815\",\n \"text\": \"public function index()\\n {\\n return view('back-end.dashboard.index');\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"056e97ec46471848aa31ad48e07a6f89\",\n \"score\": \"0.6968294\",\n \"text\": \"public function index()\\n\\t{\\n\\t\\t\\n\\t\\t$data = array(\\n\\t\\t\\t'title' => 'Administrator Apps With Laravel',\\n\\t\\t);\\n\\n\\t\\treturn View::make('panel/index',$data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ebc2b4f51f015764f2c12c0fa301b9b\",\n \"score\": \"0.69586027\",\n \"text\": \"public function index()\\n {\\n\\n return view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1bc9e66748e1ce3a6e08d92486fbadf\",\n \"score\": \"0.6953351\",\n \"text\": \"public function index()\\n {\\n $dashboard = true;\\n $count = [\\n 'products' => \\\\App\\\\Models\\\\Product::all()->count(),\\n 'customProducts' => \\\\App\\\\Models\\\\CustomProduct::all()->count(),\\n ];\\n $sliders = \\\\App\\\\Models\\\\Slider::orderBy('order', 'asc')->get();\\n $products = \\\\App\\\\Models\\\\Product::orderBy('created_at', 'desc')->take(5)->get();\\n $customProducts = \\\\App\\\\Models\\\\CustomProduct::orderBy('new', 'desc')->take(5)->get();\\n return view('admin.dashboard', compact('dashboard', 'sliders', 'count', 'products', 'customProducts'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38295d33a0573422f88ee12bb5c31724\",\n \"score\": \"0.6941439\",\n \"text\": \"public function display()\\n\\t{\\n\\t\\t// Set a default view if none exists.\\n\\t\\tif (!JRequest::getCmd( 'view' ) ) {\\n\\t\\t\\tJRequest::setVar( 'view', 'dashboard' );\\n\\t\\t}\\n\\n\\t\\tparent::display();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72c899cfcc22666e86f08a40d45d4219\",\n \"score\": \"0.6938837\",\n \"text\": \"public function index()\\n {\\n $news = News::all();\\n $posts = Post::all();\\n $events = Event::all();\\n $resources = Resources::all();\\n $admin = Admin::orderBy('id', 'desc')->get();\\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01c798aad909315846e6bd472a26180f\",\n \"score\": \"0.6937524\",\n \"text\": \"public function index()\\n {\\n\\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b5593b4af9be225b5166a23d9f3d08e\",\n \"score\": \"0.6937456\",\n \"text\": \"public function index()\\n {\\n return view('dashboard.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b5593b4af9be225b5166a23d9f3d08e\",\n \"score\": \"0.6937456\",\n \"text\": \"public function index()\\n {\\n return view('dashboard.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf7558a7b5b06153401330a223d006c7\",\n \"score\": \"0.6935287\",\n \"text\": \"public function index()\\n {\\n\\n return view('admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2a971d0b4fb5cffdb8f5c946e729fcd\",\n \"score\": \"0.69276494\",\n \"text\": \"public function index()\\n {\\n $this->template->set('title', 'Dashboard');\\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"922451fb6aecee980204982f6f19adc0\",\n \"score\": \"0.6923569\",\n \"text\": \"public function index()\\n {\\n return view('tecCard.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9465a826d2e1cfbc11bb14c61dad870\",\n \"score\": \"0.6921651\",\n \"text\": \"public function index()\\n {\\n return view('/dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ad9c9aa5b812f8d2de51f71c4f11496\",\n \"score\": \"0.69074917\",\n \"text\": \"public function index()\\n {\\n \\treturn view('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"614f95d18d05c465ca1fe75dd049502b\",\n \"score\": \"0.6906208\",\n \"text\": \"public function index() : object\\n {\\n return view('dashboard.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e2a1b1071b3223fbc25a29f11515ede\",\n \"score\": \"0.69062036\",\n \"text\": \"public function index()\\n { \\n return view('admin.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5195827794be53d05a2d42516f683a8f\",\n \"score\": \"0.69032675\",\n \"text\": \"function dashboard()\\n\\t{\\n\\t\\t// Save Menu\\n\\t\\t$this->events->add_filter( 'admin_menus', array( $this, 'create_menus' ) );\\n\\t\\t// Register Page\\n\\t\\t$this->Gui->register_page( 'menu_builder', \\tarray( $this, 'menu_builder_controller' ) );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"658d2f5ba7785e7995a6291da73819fc\",\n \"score\": \"0.6894836\",\n \"text\": \"public function index() {\\n\\n // Add page stylesheets\\n XCMS_Page::getInstance()->addStylesheet(array(\\n \\\"assets/css/backend/mng_dashboard.css\\\"\\n ));\\n\\n // Add page stylesheets\\n XCMS_Page::getInstance()->addScript(array(\\n \\\"assets/scripts/backend/mng_dashboard.js\\\"\\n ));\\n\\n $this->load->view(\\\"dashboard.tpl\\\", array(\\n \\\"cacheSize\\\" => formatBytes(getDirectorySize(XCMS_CONFIG::get(\\\"FOLDER_CACHE\\\")), 0),\\n \\\"logSize\\\" => formatBytes(getDirectorySize(XCMS_CONFIG::get(\\\"FOLDER_LOGS\\\")), 0)\\n ));\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c29ae862edc655716b800196553b9de7\",\n \"score\": \"0.68922836\",\n \"text\": \"public function clientDashboard()\\n {\\n return view('clientuser.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4721631599f0740d7a2b3b6cc23d2ad8\",\n \"score\": \"0.68902075\",\n \"text\": \"public function index()\\n {\\n\\n return view('dashboard.dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86f89b60098868c27d89d70c72ffe049\",\n \"score\": \"0.6881129\",\n \"text\": \"public function dashboard()\\n {\\n return view('content.content-dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53048283716bb8337e5e70c34bd6b4dc\",\n \"score\": \"0.6880131\",\n \"text\": \"public function dashboard()\\n {\\n if(Auth::user()->isAdmin()) {\\n return view('admin.dashboard');\\n } else {\\n return 'Vous etes pas admin';\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3deb098dcca1d7bd9482b11c002bc480\",\n \"score\": \"0.686915\",\n \"text\": \"public function index()\\n {\\n return view('/dashboard/index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20029478a2150db9aba3ddfaf7986e54\",\n \"score\": \"0.6858411\",\n \"text\": \"public function index()\\n {\\n $user = User::find(Sentry::getUser()->id)->load(\\n array(\\n 'episodeLinkRequests.episode.show',\\n 'episodeLinks.episode.show',\\n 'favourites.episode.show',\\n 'watchlist.episode.show',\\n 'favouriteShows.show',\\n 'watchlistShow.show',\\n 'watched.episode.show',\\n 'watchedShow.show'\\n )\\n );\\n return View::make('users.dashboard' , compact('user'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5838755aa909b6aa2a2ba61b7c5332a\",\n \"score\": \"0.68479055\",\n \"text\": \"public function index()\\n {\\n return view('dashboard.home');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55c0bbf8fa0cf56eff7cf67c0ae30ea8\",\n \"score\": \"0.6844151\",\n \"text\": \"public function show()\\n {\\n return view('barber.barber-dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f374d9f561f51446548bde73327a7974\",\n \"score\": \"0.6838798\",\n \"text\": \"public function index()\\n {\\n $userinfo=User::all();\\n $gateinfo=GateEntry::all();\\n $yarninfo=YarnStore::all();\\n $greyinfo=GreyFabric::all();\\n $finishinfo=FinishFabric::all();\\n $dyesinfo=DyeChemical::all();\\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":732,"cells":{"query_id":{"kind":"string","value":"66a9cc52e7fc1dbadd09b269b0d771bc"},"query":{"kind":"string","value":"Checks if Twitter Tweet counts is enabled in Sweet tooth configuration section."},"positive_passages":{"kind":"list like","value":[{"docid":"668dc86a472fa723c9503c00a154520d","score":"0.82510644","text":"public function isTweetCountEnabled()\n {\n return Mage::getStoreConfigFlag('rewards/twitter/enableTweetCount');\n }","title":""}],"string":"[\n {\n \"docid\": \"668dc86a472fa723c9503c00a154520d\",\n \"score\": \"0.82510644\",\n \"text\": \"public function isTweetCountEnabled()\\n {\\n return Mage::getStoreConfigFlag('rewards/twitter/enableTweetCount');\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"8b80c01bb5c455608386f88fe5ba1810","score":"0.71392566","text":"public function isTweetingEnabled()\n {\n return Mage::getStoreConfigFlag('rewards/twitter/enableTwitterTweet');\n }","title":""},{"docid":"7de10cb28b47e6e40af7c728a3e8e93f","score":"0.65991986","text":"public function hasTwitter()\n\t{\n\t\treturn Session::has('access_token');\n\t}","title":""},{"docid":"5c1d6193e7c116f9cbc1c4739989ade6","score":"0.6119076","text":"function get_twitter_tweet_count_from_api() {\n\t//ini_set(\"display_errors\", \"On\");\n\t//delete_transient ( 'acs_tweet_count_cron' );\n\tif (false === get_transient ( 'acs_tweet_count_cron' )) {\n\t\tset_transient ( 'acs_tweet_count_cron', true, 60 * 60 * 2 );\n\t\t\n\t\t$acs_twitter_options = get_option ( 'acs_plugin_twitter_api' );\n\t\t$acs_twitter_options ['oauth_access_token'] = '';\n\t\t$acs_twitter_options ['oauth_access_token_secret'] = '';\n\t\t$acs_plugin_twitter_username = get_option ( 'acs_plugin_twitter_username' );\n\t\tif (is_array ( $acs_twitter_options ) && ! empty ( $acs_plugin_twitter_username )) {\n\t\t\t\n\t\t\t$a = getTwitterTweetCountJSON ( $acs_twitter_options, $acs_plugin_twitter_username );\n\t\t\t\n\t\t\t$b = json_decode ( $a, true );\n\t\t\t\n\t\t\tif (json_last_error_msg () !== FALSE && is_array ( $b )) {\n\t\t\t\tif (isset ( $b [0] [\"statuses_count\"] )) {\n\t\t\t\t\tupdate_option ( 'acs_twitter_tweet_count', ( int ) $b [0] [\"statuses_count\"] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}","title":""},{"docid":"af614f145f7b07665f8e4389723ad9ad","score":"0.5972471","text":"function tweet_updater_is_tweetable($post) \n{\n // retrieve the options\n $options = get_option('tweet_updater_options');\n \n if($options['limit_activate']) {\n \n // limiter is activated, check if the post is part of \n // a category which is tweetable\n if( $options['limit_to_category'] > 0 ) {\n $post_categories = wp_get_post_categories($post->ID);\n if( is_array($post_categories) && sizeof($post_categories) > 0 ) {\n if( in_array($options['limit_to_category'], $post_categories) ) {\n echo \"in cat: TRUE\";\n return true;\n } \n } \n } \n \n // Ok, no category found so continue with checking for the customfields \n if(! empty($options['limit_to_customfield_key']) && ! empty($options['limit_to_customfield_val']) ) {\n $customfield_val = get_post_meta($post->ID, $options['limit_to_customfield_key'], true);\n if( ! empty($customfield_val) && $customfield_val == $options['limit_to_customfield_val'] ) {\n echo \"fields match: true\";\n return true;\n } \n }\n\n // in all other cases return false\n return false;\n } else {\n // limit is not active so everything is tweetable\n return true;\n } \n}","title":""},{"docid":"4240ac765b393de086a6f235215f70b4","score":"0.59495264","text":"public function hasTwofactorCode()\n {\n return $this->twofactor_code !== null;\n }","title":""},{"docid":"cc5d2fc3167a0d660ee98ee1096e9e46","score":"0.5870566","text":"function set_twitter_count($twitter_count) {\n $this->twitter_count = $twitter_count;\n }","title":""},{"docid":"71fb2af69d3405e236db9b8efd138b4d","score":"0.5818554","text":"function get_twitter_count() {\n return $this->twitter_count;\n }","title":""},{"docid":"2777cb2d0372444ea75ce57694df7ca2","score":"0.57719153","text":"public function twitter(): bool\n {\n return false;\n }","title":""},{"docid":"d5085bbcfd3f34006d5e9701b58dd257","score":"0.5743547","text":"static function _enabledSessionStatistics()\n\t{\n\t\tglobal $ilSetting;\n\t\t\n\t\treturn (bool)$ilSetting->get('session_statistics', 1);\n\t}","title":""},{"docid":"1d423cf41f696444267805bf6a7a38c6","score":"0.574134","text":"public static function canAutoshare()\n\t{\n\t\tif ( $method = \\IPS\\Login\\Handler::findMethod( 'IPS\\Login\\Handler\\OAuth1\\Twitter' ) and $method->canProcess( \\IPS\\Member::loggedIn() ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}","title":""},{"docid":"7b43c026d5a3020f5c2f959b18c0c240","score":"0.56362104","text":"public function fbttposts_tt_has_credentials()\n\t{\n\t\tself::$tt_instance->config['token'] = get_option( 'wm-ttToken');\n \t\tself::$tt_instance->config['secret'] = get_option( 'wm-ttSecret');\n \t\tif(!self::$tt_instance->config['token'] || !self::$tt_instance->config['secret'] ) \n \t\t{\n \t\t\tdie();\n \t\t}\n \t\tself::$tt_instance->reconfigure(self::$tt_instance->config);\n\t\t$code = self::$tt_instance->user_request(array(\n\t\t 'url' => self::$tt_instance->url('1.1/account/verify_credentials')\n\t\t));\n\t\tif($code === 200) return true;\n\t\treturn false;\n\t}","title":""},{"docid":"9afcdb9f54a5e5289cc3db79da8f5a25","score":"0.5588693","text":"public function hasSentiment(){\n return $this->_has(6);\n }","title":""},{"docid":"a760e10407dcaa7b0a96c05047df2351","score":"0.5587917","text":"public function hasTense(){\n return $this->_has(11);\n }","title":""},{"docid":"8e2e525b2203244a9f3de929803b14e7","score":"0.5569018","text":"protected function hasSessionToken()\n {\n return $this->session->has('twitter.oauth_token') && $this->session->has('twitter.oauth_token_secret');\n }","title":""},{"docid":"2c44ff9b42ed576db14675074d06e45e","score":"0.55422276","text":"private function isThrottlable()\n {\n return config('laravel-auth.throttles.enabled', false);\n }","title":""},{"docid":"f0484d2c50665572722294ca5169f799","score":"0.55344534","text":"public function hasSentiment(){\n return $this->_has(2);\n }","title":""},{"docid":"15b870e8379474d0e8953ba62f4c9402","score":"0.5506052","text":"public function hasSettings(){\n return $this->_has(3);\n }","title":""},{"docid":"6aba3eecec8d8e357399143abe97c84e","score":"0.54935527","text":"public function hasSentiment(){\n return $this->_has(3);\n }","title":""},{"docid":"fe87e4fdaa659b6c0c651132c3153d2b","score":"0.5441704","text":"function nv_hom_bookmarktwitter(){\n\tglobal $theme_option_name;\n\n\tif(!function_exists('wptap_check_option_value')){\n\t\treturn true;\n\t}\n\n\treturn wptap_check_option_value($theme_option_name,'bookmarktwitter','1');\n}","title":""},{"docid":"f40c9d274f04a4ac87c10570c7c0586f","score":"0.5414643","text":"public function hasUser(){\n\t\treturn Session::has('user_id') AND $this->hasTwitter();\n\t}","title":""},{"docid":"4039d3f48a3a5e7cd339c8014bfb91c9","score":"0.54005426","text":"function is_in_trial_promotion() {\n return $this->_admin_notices->has_sticky( 'trial_promotion' );\n }","title":""},{"docid":"d7135a051ca2336f3b03ce87915732b6","score":"0.53480995","text":"public function hasExtractDocumentSentiment(){\n return $this->_has(3);\n }","title":""},{"docid":"76caea7e176f943f340859b4ae99399d","score":"0.5336674","text":"function tweet_updater_update_status($tweet)\n{\n\t\n\t$tokens = get_option('tweet_updater_auth');\n\t\n\tif( $tokens['auth3_flag'] == '1' )\n\t{\n\t\t// Initiate a TwitterOAuth with access tokens\n\t\t$connection = new TwitterOAuth($tokens['consumer_key'], $tokens['consumer_secret'], $tokens['access_key'], $tokens['access_secret']);\n\t\t\n\t\t// Post an update to Twitter via your application:\n\t\t$result = $connection->post('statuses/update', array('status' => $tweet));\n\n\t}\n\telse \n\t{\n\t\t$result = array( \n\t\t\t'plugin_error' => 'auth', \n\t\t\t'error_description' => 'TweetUpdater is not linked to a twitter account'\n\t\t\t\t);\n\t}\n\n\treturn $result;\n}","title":""},{"docid":"d31fed659aa27fc665a1fbe1a3e85350","score":"0.5324847","text":"public function hasDocumentSentiment(){\n return $this->_has(4);\n }","title":""},{"docid":"f808e0eff338499e3cb68fa718961f2c","score":"0.52900785","text":"public function isEnableViewThrash(){\n return ($this->withThrash == 2);\n }","title":""},{"docid":"59493aa2f94cabaae8f003312115ed4b","score":"0.5266665","text":"public function check()\n {\n $hasUser = $this->session->has('twitter.user_id') && $this->session->has('twitter.screen_name');\n\n return $this->hasSessionToken() && $hasUser;\n }","title":""},{"docid":"13da2951661371d48b1e38ccd3b1a157","score":"0.52652884","text":"protected function is_text_link_counter_enabled() {\n\t\treturn WPSEO_Options::get( 'enable_text_link_counter' );\n\t}","title":""},{"docid":"529cb5348a8ffe8fe05c6c6ceec710e5","score":"0.52642393","text":"public function checkSettings() {\n\t\t$data = $this->getSettings();\n\t\t$config = new kyConfig($data['kayako_url'], $data['kayako_key'], $data['kayako_secret']);\n\t\t$config->setDebugEnabled(false);\n\t\tkyConfig::set($config);\n\n\t\t$obj = kyTicketStatus::getAll()->first();\n\t\tupdate_option('kayako_settings_installed', is_object($obj));\n\t\treturn is_object($obj);\n\t}","title":""},{"docid":"eaf7cc005c4785ddb7bd0ffe2dc90835","score":"0.52600867","text":"public function hasDocumentSentiment(){\n return $this->_has(1);\n }","title":""},{"docid":"4c5a0a78483113d03f12c4f5fc046f56","score":"0.52526754","text":"private function errorCheck($tweets)\n {\n if (array_key_exists('errors', $tweets)) {\n $message = 'We have encountered ' . count($tweets['errors']) . ' error(s):
    ';\n\n foreach ($tweets['errors'] as $error) {\n $message .= $error['message'].' Code:'.$error['code'].'
    ';\n }\n\n if (Director::isDev()) {\n throw new Exception($message, 1);\n }\n\n return true;\n }\n\n return false;\n }","title":""},{"docid":"1af5b88ddf2d4d731438a2372666cc11","score":"0.52407235","text":"public function hasSettings()\n {\n return false;\n }","title":""},{"docid":"02a017f1d05439efd950d0dc711f0db2","score":"0.5226045","text":"public function isEnableViewThrashOnly(){\n return ($this->withThrash == 3);\n }","title":""},{"docid":"c7ef36e6a5bf1960ff6115b70843c478","score":"0.52080595","text":"public function hasUpdatetall()\n {\n return $this->updatetall !== null;\n }","title":""},{"docid":"e32b6e0bbc9529a04afc1491b1567ed9","score":"0.52038145","text":"function exist_twitter()\n{\n\tglobal $options;\n\n\tif( isset($options['theme_social_twitter_text']) && !empty($options['theme_social_twitter_text']) ) :\n\n\t$array = array(\n\t\t'exists' => true,\n\t\t'link' => $options['theme_social_twitter_text'],\n\t);\n\n\treturn $array;\n\t\n\telse: return false; endif;\n}","title":""},{"docid":"6112d6e57f3773cdeb43a48ab17e4681","score":"0.5201013","text":"public function hasConinit(){\n return $this->_has(25);\n }","title":""},{"docid":"4144fbbb6b5699c4f266cc0904d6a6dc","score":"0.5197806","text":"public function has_lti_config() {\n return (!empty($this->_host) &&\n !empty($this->_consumer_key) &&\n !empty($this->_shared_secret));\n }","title":""},{"docid":"2a57ee11c37586c8c6c8bcde36cfb9a7","score":"0.51810086","text":"public function has_settings() {\n\t\treturn count( $this->setting_fields );\n\t}","title":""},{"docid":"f1ea64c0fcfa0d52e87a92c6f81716cf","score":"0.51594645","text":"protected function checkTweets() {\n foreach($this->tweets as $tweet) {\n $return = $this->checkTID($tweet['tid']);\n \n if(empty($return)) {\n $this->insert($tweet);\n }\n } \n }","title":""},{"docid":"de0e9c6c68805ff54b3e88e39ad62081","score":"0.5158786","text":"function nv_hom_rss(){\n\tglobal $theme_option_name;\n\n\tif(!function_exists('wptap_check_option_value')){\n\t\treturn true;\n\t}\n\n\treturn wptap_check_option_value($theme_option_name,'bookmarktwitter','1');\n}","title":""},{"docid":"2816a86e51dbdda97b9c3e7d60009bb2","score":"0.5147444","text":"protected function is_insights_enabled()\n {\n }","title":""},{"docid":"2816a86e51dbdda97b9c3e7d60009bb2","score":"0.5147444","text":"protected function is_insights_enabled()\n {\n }","title":""},{"docid":"205d6bb20a8be3467b60bdf0d3535bdd","score":"0.51397216","text":"function smarty_function_mttypepadantispamcounter($args, &$ctx) {\n $blog = $ctx->stash('blog');\n $cfg = $ctx->mt->db->fetch_plugin_config('MT::Plugin::TypePadAntiSpam',\n 'blog:' . $blog->blog_id);\n $count = $cfg['blocked'];\n $count or $count = 0;\n return $ctx->count_format($count, $args);\n}","title":""},{"docid":"0a50106c15d964462b518dbd342a72ee","score":"0.51332206","text":"protected function checkTweets() {\n foreach($this->tweets as $tweet) {\n $return = $this->checkTID($tweet);\n \n if(empty($return)) {\n $this->insert($tweet);\n }\n } \n }","title":""},{"docid":"5aa7eba092a9ee3152b8a22147aa854b","score":"0.5129937","text":"public function hasExtractEntitySentiment(){\n return $this->_has(4);\n }","title":""},{"docid":"eb24f083fc4a6254c1bd2d8003435172","score":"0.51161224","text":"public function post($tweet)\n {\n $this->lastStatus = $this->objTwitterConnection->request('POST', $this->objTwitterConnection->url('1/statuses/update'), array('status' => $tweet));\n if ($this->lastStatus == 200) {\n $this->lastMessage = null;\n return true;\n } else {\n $this->lastMessage = $this->objTwitterConnection->response['response'];\n return false;\n }\n }","title":""},{"docid":"f6b0a0fe0fe0653a8efba7b0fd8e8fac","score":"0.5112428","text":"public function isSocialEnabled()\n {\n return in_array('social', config('awemapl-auth.enabled'));\n }","title":""},{"docid":"3604e1521f25b2fe41c39e1696ba3831","score":"0.50876445","text":"public function hasHealcount(){\n return $this->_has(20);\n }","title":""},{"docid":"52b8e7df99a8f280cb197c67bc291e74","score":"0.507802","text":"public function used(): bool\n {\n return (bool) config('koel.itunes.enabled');\n }","title":""},{"docid":"8c7f0db8f27c18b44c1a634381f2b1ed","score":"0.5060387","text":"public function checkToBeInfluencer()\n {\n return $this->have10Posts() and $this->validatedByAdmin();\n }","title":""},{"docid":"66624976695725e463d7fcebbda36453","score":"0.5040974","text":"function count_all_scoreconfirm_step2($statustwo = 0){\n $this->db->where('view', 1);\n if ( $statustwo != 0 ) { $this->db->where('statustwo', $statustwo); }\n\n $query = $this->db->get($this->incubation_selection);\n\n return $query->num_rows();\n }","title":""},{"docid":"ec174689e49d40da78275b86122b4613","score":"0.50322247","text":"public function enabledSessionStatistics()\n\t{\n\t\treturn (bool)$this->session_statistics_enabled;\n\t}","title":""},{"docid":"9320776b79ac9aa8f1ced58cba182a64","score":"0.5004856","text":"function getTwitterTweetCountJSON($acs_twitter_options, $acs_plugin_twitter_username) {\n\t\n\t\n\t\n\trequire plugin_dir_path( __FILE__ ) . 'includes/TwitterAPIExchange.php';\n\t\n\t$url = 'https://api.twitter.com/1.1/users/lookup.json';\n\t$requestMethod = 'GET';\n\t$getfield = '?screen_name=' . esc_attr ( $acs_plugin_twitter_username );\n\ttry {\n\t\t$twitter = new TwitterAPIExchange ( $acs_twitter_options );\n\t\t$a = $twitter->setGetfield ( $getfield )->buildOauth ( $url, $requestMethod )->performRequest ();\n\t\treturn $a;\n\t} catch ( Exception $e ) {\n\t\techo $e->getMessage();\n\t}\n\treturn array ();\n}","title":""},{"docid":"f217e301e07ddac171e1ebf6525fc5f9","score":"0.50025976","text":"function bunchy_is_post_trending( $p = null ) {\n\t$post_obj = get_post( $p );\n\n\t$meta_value = get_post_meta( $post_obj->ID, '_bunchy_trending', true );\n\n\treturn apply_filters( 'bunchy_is_post_trending', ! empty( $meta_value ), $post_obj->ID );\n}","title":""},{"docid":"4b62f3378f3decb53f7952acb407651e","score":"0.5002536","text":"public function is_configured() {\n\t\treturn $this->access_token != '';\n\t}","title":""},{"docid":"cb54d05aee9d9cf4753173eb674ffc85","score":"0.49948376","text":"function shariff3uu_checkbox_sharecounts_render() {\n\techo '';\n\tif ( ! isset( $GLOBALS['shariff3uu_statistic']['backend'] ) && isset( $GLOBALS['shariff3uu_statistic']['sharecounts'] ) ) {\n\t\techo ' ';\n\t\techo esc_html__( 'Warning: The statistic functionality must be enabled in order for the share counts to be shown.', 'shariff' );\n\t}\n}","title":""},{"docid":"00b07affa1ffa62639fd0dc76bf88cdb","score":"0.49911642","text":"public function wpw_auto_poster_tweet_status( $post, $template, $title = '' ) {\r\n\t\t\t\r\n\t\tglobal $wpw_auto_poster_options;\r\n\t\t\r\n\t\t$prefix = WPW_AUTO_POSTER_META_PREFIX;\t\r\n\t\t\r\n\t\t$ispublished = get_post_meta( $post->ID, $prefix . 'tw_status', true );\r\n\t\t$unique = 'false';\r\n\r\n\t\t$post_type = $post->post_type; // Post type\r\n\r\n\t\t$tags_arr = array();\r\n\t\t$cats_arr = array();\r\n\t\t\r\n\t\tif( isset( $ispublished ) && $ispublished == '1' ) { //if post is published on facebook once then change url to prevent duplication\r\n\t\t\t//unique link for posting\r\n\t\t\t$unique = 'true';\r\n\t\t}\r\n\r\n\r\n\t\t// Get all selected tags for selected post type for hashtags support\r\n if(isset($wpw_auto_poster_options['tw_post_type_tags']) && !empty($wpw_auto_poster_options['tw_post_type_tags'])) {\r\n\r\n $custom_post_tags = $wpw_auto_poster_options['tw_post_type_tags'];\r\n if(isset($custom_post_tags[$post_type]) && !empty($custom_post_tags[$post_type])){ \r\n foreach($custom_post_tags[$post_type] as $key => $tag){\r\n $term_list = wp_get_post_terms( $post->ID, $tag, array(\"fields\" => \"names\") );\r\n foreach($term_list as $term_single) {\r\n $tags_arr[] = $term_single;\r\n }\r\n }\r\n \r\n }\r\n }\r\n\r\n // Get all selected categories for selected post type for hashcats support\r\n if(isset($wpw_auto_poster_options['tw_post_type_cats']) && !empty($wpw_auto_poster_options['tw_post_type_cats'])) {\r\n\r\n $custom_post_cats = $wpw_auto_poster_options['tw_post_type_cats'];\r\n if(isset($custom_post_cats[$post_type]) && !empty($custom_post_tags[$post_type])){ \r\n foreach($custom_post_cats[$post_type] as $key => $category){\r\n $term_list = wp_get_post_terms( $post->ID, $category, array(\"fields\" => \"names\") );\r\n foreach($term_list as $term_single) {\r\n $cats_arr[] = $term_single;\r\n }\r\n }\r\n \r\n }\r\n }\r\n\r\n\t\t\r\n\t\t$postlink = get_permalink( $post->ID );\t\r\n\t\t$postlink = $this->wpw_auto_poster_get_short_post_link( $postlink, $unique, $post->ID, 'false', 'tw' );\r\n\t\t\r\n\t\t$posttitle = $post->post_title;\r\n\t\t\r\n\t\t$post_content = strip_shortcodes( $post->post_content);\r\n \r\n //strip html kses and tags\r\n $post_content = $this->wpw_auto_poster_stripslashes_deep($post_content);\r\n \r\n //decode html entity\r\n $post_content = $this->wpw_auto_poster_html_decode($post_content);\r\n\r\n\t\t$userdata = get_userdata($post->post_author);\r\n\t\t\r\n\t\t$nicename = get_user_meta( $post->post_author, 'nickname', true);\r\n\t\t$first_name = get_user_meta( $post->post_author, 'first_name', true);\r\n\t\t$last_name = get_user_meta( $post->post_author, 'last_name', true);\r\n\t\t$fullauthor = $first_name . ' ' . $last_name;\r\n\t\t$posttype = $post->post_type;\r\n\r\n\t\t// Get post excerpt\r\n\t\t$excerpt = apply_filters( 'wpw_auto_poster_tweet_status_excerpt', $post->post_excerpt, $post );\r\n\r\n\t\t// Get post tags\r\n //$tags_arr = wp_get_post_tags( $post->ID, array( 'fields' => 'names' ) );\r\n $hashtags = ( !empty( $tags_arr ) ) ? '#'.implode( ' #', $tags_arr ) : '';\r\n\r\n\r\n // get post categories\r\n /*$hashcats = array();\r\n foreach((get_the_category( $post->ID )) as $category) {\r\n $hashcats[] = $category->cat_name;\r\n }*/\r\n $hashcats = ( !empty( $cats_arr ) ) ? '#'.implode( ' #', $cats_arr ) : '';\r\n\r\n\r\n\t\t//if title is passed from function parameter then use that title\r\n\t\t$posttitle = !empty($title) ? $title : $posttitle;\r\n\t\t\r\n\t\t$replacetags = array( '[link]','[title]', '[full_author]', '[nickname_author]', '[post_type]', '[excerpt]', '[hashtags]', '[hashcats]');\r\n\t\t$replaceval = array( $postlink, $posttitle, $fullauthor, $nicename, $posttype, $excerpt, $hashtags, $hashcats );\r\n\t\t$status = str_replace( $replacetags, $replaceval, $template );\r\n\t\t\r\n\t\t$replacetags = array( '{link}','{title}', '{full_author}', '{nickname_author}', '{post_type}', '{excerpt}', '{hashtags}', '{hashcats}', '{content}');\r\n\t\t$replaceval = array( $postlink, $posttitle, $fullauthor, $nicename, $posttype, $excerpt, $hashtags, $hashcats, $post_content);\r\n\r\n\t\t$code_matches = array();\r\n \r\n // check if template tags contains {content-numbers}\r\n if( preg_match_all( '/\\{(content)(-)(\\d*)\\}/', $status, $code_matches ) ) {\r\n $trim_tag = $code_matches[0][0];\r\n $trim_length = $code_matches[3][0];\r\n $post_content = substr( $post_content, 0, $trim_length);\r\n $replacetags[] = $trim_tag;\r\n $replaceval[] = $post_content;\r\n }\r\n\r\n\t\t$status = str_replace( $replacetags, $replaceval, $status );\r\n\t\t\r\n\t\treturn $this->wpw_auto_poster_html_decode( $status );\r\n\t}","title":""},{"docid":"5993f3c4c6c5bd09228f7257ce2f136d","score":"0.4982946","text":"public function isTwoFactorEnabled()\n {\n return in_array('two_factor', config('awemapl-auth.enabled'));\n }","title":""},{"docid":"2c80dbdcfdb0fa7ad2c9c970282198aa","score":"0.49807167","text":"static function _enabledObjectStatistics()\n\t{\n\t\tglobal $ilSetting;\n\t\t\n\t\treturn (bool)$ilSetting->get('object_statistics', 0);\n\t}","title":""},{"docid":"193596aed39bb15e4f7f495fdbfbd67a","score":"0.4971722","text":"function twitterlogin_pagesetup() {\r\n \t// that do not have twitter control explicitly turned off\r\n \tif ((get_context() == 'profile') \r\n \t\t&& ($page_owner_entity = page_owner_entity()) \r\n \t\t&& ($page_owner_entity->getSubtype() == \"twitter\")\r\n \t\t&& ($page_owner_entity->twitter_controlled_profile != 'no')\r\n \t) {\r\n \t\textend_view('metatags','twitterlogin/hide_profile_embed');\r\n \t}\r\n \t\r\n \textend_elgg_settings_page('twitterlogin/settings/usersettings', 'usersettings/user');\r\n }","title":""},{"docid":"c329fcd2bcb241ea96125ebbaa3a7281","score":"0.49635383","text":"public function getSiteStatsSharingEnabled()\n {\n return $this->site_stats_sharing_enabled;\n }","title":""},{"docid":"46187559a7c9cc132f9978240478edf9","score":"0.49615732","text":"protected function isUsingThrottlesLoginsTrait()\n {\n return in_array(\n ThrottlesLogins::class, class_uses_recursive(get_class($this))\n );\n }","title":""},{"docid":"46187559a7c9cc132f9978240478edf9","score":"0.49615732","text":"protected function isUsingThrottlesLoginsTrait()\n {\n return in_array(\n ThrottlesLogins::class, class_uses_recursive(get_class($this))\n );\n }","title":""},{"docid":"69ab919657aa517d4f953b34353ff465","score":"0.49615493","text":"public function hasSecretPhraseMode()\n {\n return $this->secret_phrase_mode !== null;\n }","title":""},{"docid":"8e1dcdfd5fce1df32f8f1bc036536018","score":"0.49609312","text":"function neat_get_twitter_count( $post_id ) {\r\n\t\t$number = 0;\r\n\t\tif( !$post_id )\r\n\t\t\treturn $number;\r\n\t\tif( false === ( $number = get_transient( $post_id . '_twitter' ) ) ){\r\n\t\t\t$args = array(\r\n\t\t\t\t'timeout'\t=>\t5\r\n\t\t\t);\r\n\t\t\t$args = apply_filters( 'neat_wp_remote_get_args' , $args);\r\n\t\t\t$apiurl = 'https://cdn.api.twitter.com/1/urls/count.json?url=' . get_permalink( $post_id );\r\n\t\t\t$response = wp_remote_get( apply_filters( 'neat_get_twitter_count_apiurl' , $apiurl), $args );\r\n\t\t\tif( is_wp_error( $response ) ){\r\n\t\t\t\treturn $number;\r\n\t\t\t}\r\n\t\t\tif( $response['response']['code'] == 200 ){\r\n\t\t\t\t// valid request.\r\n\t\t\t\t$response = json_decode($response['body']);\r\n\t\t\t\tif( (int)$response->count > 0 ){\r\n\t\t\t\t\t$number = $response->count;\r\n\t\t\t\t\tset_transient( $post_id . '_twitter' , $number, apply_filters( 'transient_expiration' , 600));\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\t\treturn $number;\r\n\t}","title":""},{"docid":"1db115226606a8f05dea948d62b2a36d","score":"0.49504572","text":"function tyl_have_myalerts($check_activated = false, $check_tyl_registered = false, $check_tyl_enabled = false)\n{\n\t$ret = false;\n\n\tif(function_exists(\"myalerts_info\")) {\n\t\t$myalerts_info = myalerts_info();\n\t\tif(version_compare($myalerts_info['version'], \"2.0.0\") >= 0\n\t\t &&\n\t\t (!$check_activated\n\t\t ||\n\t\t (function_exists(\"myalerts_is_activated\") && myalerts_is_activated())\n\t\t )\n\t\t )\n\t\t{\n\t\t\tif (!$check_tyl_registered && !$check_tyl_enabled)\n\t\t\t{\n\t\t\t\t$ret = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tglobal $cache;\n\n\t\t\t\t$alert_types = $cache->read('mybbstuff_myalerts_alert_types');\n\n\t\t\t\tif((!$check_tyl_registered || (isset($alert_types['tyl']['code' ]) && $alert_types['tyl']['code' ] == 'tyl'))\n\t\t\t\t &&\n\t\t\t\t (!$check_tyl_enabled || (isset($alert_types['tyl']['enabled']) && $alert_types['tyl']['enabled'] == 1 )))\n\t\t\t\t{\n\t\t\t\t\t$ret = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn $ret;\n}","title":""},{"docid":"f0e11345313005f9445891ef608224f9","score":"0.4946608","text":"public function hasUseTicket(){\n return $this->_has(4);\n }","title":""},{"docid":"458751357bf62ef406d18f2787b13591","score":"0.49393058","text":"public function twofactorSettings()\n {\n $secretCheck = $this->database->fetch('SELECT value FROM settings WHERE setting = \"secret\"');\n\n if (strlen($secretCheck['value']) !== 16) {\n if ($this->secret == '') {\n for ($i = 0; $i < 16; $i++) {\n $this->secret .= $this->base32Characters[rand(0, 31)];\n }\n }\n $html = str_replace('{{secret}}', $this->secret, $this->basic->htmlBlocks('twofactorEnable'));\n } else {\n $html = $this->basic->htmlBlocks('twofactorDisable');\n }\n\n return $html;\n }","title":""},{"docid":"55b8c93b844aed7d4ed3a8df77b0ad62","score":"0.49135914","text":"private function smsEnabled() {\n\t\t$key = $this->ss->get_key();\n\t\tif(!empty($key)) {\n\t\t\t$c = $this->ss->get_config($key, false);\n\t\t\tif(!empty($c['server_settings']['sms'])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}","title":""},{"docid":"91f9d6fadc6bbeea5dafc0abfe2a152a","score":"0.49115166","text":"public function hasToolSettingsService()\n {\n $has = !empty($this->getSetting('custom_context_setting_url'));\n if (!$has) {\n $has = self::hasApiHook(self::$TOOL_SETTINGS_SERVICE_HOOK, $this->getConsumer()->getFamilyCode());\n }\n return $has;\n }","title":""},{"docid":"f887e6abb61ba8d72df9278a8b217a27","score":"0.49099445","text":"public function isTotpAuthenticationEnabled(): bool\n {\n return null !== $this->totpAuth\n && TOTPAuth::PROVIDER_GOOGLE_AUTHENTICATOR !== $this->totpAuth->getProvider()\n && !empty($this->totpAuth->getTopSecret())\n && true === $this->totpAuth->isEnabled();\n }","title":""},{"docid":"02e673f008f96ce2559be9ff2961bd8c","score":"0.49076587","text":"public function getTotalNumberOfEnabledSightTickets()\n {\n $qb = $this->createQueryBuilder('st');\n\n return (int) $qb->select('COUNT(st)')\n ->where($qb->expr()->eq('st.enabled', true))\n ->getQuery()\n ->getSingleScalarResult();\n }","title":""},{"docid":"a8006bd2892dea593010dce5836c49cb","score":"0.49021748","text":"public function checkFilterPredicates() {\n\n\t\t$this->TrendingTopic = ClassRegistry::init('TrendingTopic');\n\n\t\t$now = date('Y-m-d H:i:s', time());\n\t\t$aTimeAgo = date('Y-m-d H:i:s', time()-(60*5));\n\t\t$lastCheckTT = CakeSession::read('last_check_tt');\n\n\t\tif (!$lastCheckTT || $lastCheckTT<$aTimeAgo) {\n\t\t\t// First, we set the current TTs from Twitter REST API\n\t\t\t$this->TrendingTopic->setTrendingTopicsTwitter();\n\t\t\tCakeSession::write('last_check_tt',$now);\n\t\t\techo \"Update TTs!\".PHP_EOL;\n\t\t} else {\n\t\t\techo \"Won't update TTs yet. Last time checked: \".$lastCheckTT.PHP_EOL;\n\t\t}\n\n\t\t// We get them from store\n\t\t$trendingTopics = $this->TrendingTopic->find('all',array(\n\t\t\t'conditions' => array(\n\t\t\t\t'current' => 1,\n\t\t\t\t'active' => 1\n\t\t\t)\n\t\t));\n\n\t\t$track = array();\n\t\tforeach ($trendingTopics as $trendingTopic) {\n\t\t\tarray_push($track,$trendingTopic['TrendingTopic']['topic']);\n\t\t}\n\n\t\t$this->setTrack($track);\n\t\tprint_r($track);\n\n\t\techo \"Updated track!\".PHP_EOL.PHP_EOL.PHP_EOL.PHP_EOL.PHP_EOL;\n\t}","title":""},{"docid":"7b206dc9f11eb95e91dc95dc97e4e26f","score":"0.4899423","text":"public function isRssEnabled(){\r\n return Mage::getStoreConfigFlag('rss/config/active') && Mage::getStoreConfigFlag('zozoconcepts_blog/blog/rss');\r\n }","title":""},{"docid":"3d4b028ca938a7ed77ef09f553e24028","score":"0.4897632","text":"public function getTweetedMessage()\n {\n return Mage::getStoreConfig('rewards/twitter/tweetedMessage');\n }","title":""},{"docid":"70979ac674a63ed8f938315afee1225e","score":"0.48935315","text":"public function fanTweets(Request $request)\n {\n $count = $request->input('count') ? $request->input('count') : 5;\n\n $oauth_access_token = Settings::where('label', 'twitter_oauth_access_token')->limit(1)->pluck('value')[0];\n $oauth_access_token_secret = Settings::where('label', 'twitter_oauth_access_token_secret')->limit(1)->pluck('value')[0];\n $consumer_key = Settings::where('label', 'twitter_consumer_key')->limit(1)->pluck('value')[0];\n $consumer_secret = Settings::where('label', 'twitter_consumer_secret')->limit(1)->pluck('value')[0];\n\n $settings = array(\n 'oauth_access_token' => $oauth_access_token,\n 'oauth_access_token_secret' => $oauth_access_token_secret,\n 'consumer_key' => $consumer_key,\n 'consumer_secret' => $consumer_secret,\n );\n\n $url = 'https://api.twitter.com/1.1/search/tweets.json';\n $requestMethod = 'GET';\n $getfield = \"?q=%23odezenne&result_type=mixed&count={$count}\";\n\n $twitter = new TwitterAPIExchange($settings);\n $tweets = $twitter->setGetfield($getfield)\n ->buildOauth($url, $requestMethod)\n ->performRequest();\n\n $tweets = json_decode($tweets);\n\n foreach ($tweets->statuses as &$tweet) {\n $url = 'https://publish.twitter.com/oembed';\n $getfield= \"url=https://twitter.com/{$tweet->user->screen_name}/status/{$tweet->id}&omit_script=true\";\n $html = $twitter->setGetfield($getfield)\n ->buildOauth($url, $requestMethod)\n ->performRequest();\n $tweet->html = json_decode($html)->html;\n }\n\n return response()->json($tweets->statuses);\n }","title":""},{"docid":"562a222e75c8202fd3493ba34eff3c9f","score":"0.48880538","text":"public function test_is_token_set() {\n $this->assertTrue($this->authplugin->is_wstoken_set());\n }","title":""},{"docid":"0701eff7d12f0859a3be25b48a525ad3","score":"0.4885425","text":"public function hasStats()\n {\n return $this->isApc();\n }","title":""},{"docid":"256d2fd07797ed5657b5ddae58e78650","score":"0.48833883","text":"public function hasWeekcount(){\n return $this->_has(6);\n }","title":""},{"docid":"bd348993f571bda36c588bc17a04aafe","score":"0.488178","text":"function testIsComingFromTwitter() {\n\t\n\t\t// Spoofing the HTTP_REFERER for purposes of this test and the companion blog post\n\t\t$_SERVER['HTTP_REFERER'] = 'http://twitter.com';\n\t\t$this->assertTrue( $this->plugin->is_from_twitter(), 'is_from_twitter() will return true when the referring site is Twitter.' );\n\t\t\n\t}","title":""},{"docid":"5139bf4ae1014eadbc3c27a72798234f","score":"0.48714948","text":"function getNumOfYoutubeTweets($url) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"http://urls.api.twitter.com/1/urls/count.json\");\n curl_setopt($ch, CURLOPT_POSTFIELDS, 'url=' . $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n $output = curl_exec($ch);\n curl_close($ch);\n $numOfTweets = json_decode($output);\n return $numOfTweets->count;\n}","title":""},{"docid":"2438f2e177816210789dfcb37b26be47","score":"0.48692426","text":"public function fetchTweets()\n {\n \n // 1.) Get rate limit for timeline API and fetch an according amount of accounts for that\n if ($rateLimit = $this->rateLimitUtility->getRateLimitForMethod('statuses', 'user_timeline')) {\n\n $limit = ($rateLimit > intval($this->settings['max_fetch'])) ? intval($this->settings['max_fetch']) : $rateLimit;\n if (\n ($limit > 0)\n && ($accounts = $this->accountRepository->findAllSortedByLastFetchTimeline($limit))\n ){\n\n /** @var \\Madj2k\\TwitterAnalyser\\Model\\Account $account */\n foreach ($accounts as $account) {\n $this->fetchTweetsOfAccount($account);\n\n $account->setFetchTimelineTimestamp(time());\n $this->accountRepository->update($account);\n sleep(1);\n }\n\n // update rate limit\n $remainingRateLimit = $this->rateLimitUtility->setRateLimitForMethod('statuses', 'user_timeline', count($accounts));\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('Fetched timeline tweets for %s account(s). Remaining rate limit is %s.', count($accounts), $remainingRateLimit));\n } else {\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('No timeline tweets fetched. Rate limit reached or no accounts available.'));\n }\n }\n\n // 2.) Get rate limit for search APIand fetch an according amount of accounts for that\n if ($rateLimit = $this->rateLimitUtility->getRateLimitForMethod('search', 'tweets')) {\n\n $limit = ($rateLimit > intval($this->settings['max_fetch'])) ? intval($this->settings['max_fetch']) : $rateLimit;\n if (\n ($limit > 0)\n && ($accounts = $this->accountRepository->findAllSortedByLastFetchAddressed($limit))\n ){\n\n /** @var \\Madj2k\\TwitterAnalyser\\Model\\Account $account */\n foreach ($accounts as $account) {\n $this->fetchTweetsAddressedToAccount($account);\n\n $account->setFetchAddressedTimestamp(time());\n $this->accountRepository->update($account);\n sleep(1);\n }\n\n // update rate limit\n $remainingRateLimit = $this->rateLimitUtility->setRateLimitForMethod('search', 'tweets', count($accounts));\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('Fetched addressed-to tweets for %s account(s). Remaining rate limit is %s.', count($accounts), $remainingRateLimit));\n } else {\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('No addressed-to tweets fetched. Rate limit reached or no accounts available.'));\n }\n }\n }","title":""},{"docid":"fed821955d41904ef8283d72bed2cfe4","score":"0.4866199","text":"public function hasTiers()\n {\n return $this->current()->hasTiers();\n }","title":""},{"docid":"c59ddcba00c28f5eaaabefe521541425","score":"0.48639867","text":"function mkdf_twitter_theme_installed() {\n\t\treturn defined( 'MIKADO_ROOT' );\n\t}","title":""},{"docid":"71bd896321f98c26699eea98e9dfc775","score":"0.48553327","text":"public static function hasT3SphinxThemeRtd()\n {\n $sphinxSourcePath = static::getSphinxSourcesPath();\n $setupFile = $sphinxSourcePath . 't3SphinxThemeRtd/setup.py';\n return is_file($setupFile);\n }","title":""},{"docid":"87675599031302e7e214c24d388bcb60","score":"0.4845332","text":"public function getThemeSharecount()\n {\n return $this->theme_sharecount;\n }","title":""},{"docid":"636c8db77492a7750511b1429bb3a328","score":"0.48424003","text":"public function hasMultipleweekcount(){\n return $this->_has(7);\n }","title":""},{"docid":"73936a0c97c7d1f8bbe57ef60c080e6b","score":"0.48364937","text":"public function hasLeveluptime(){\n return $this->_has(15);\n }","title":""},{"docid":"75d8a859ab78bfe0aa09127b9f13c1b6","score":"0.48355043","text":"public function hasStatuses()\n {\n return true;\n }","title":""},{"docid":"75d8a859ab78bfe0aa09127b9f13c1b6","score":"0.48355043","text":"public function hasStatuses()\n {\n return true;\n }","title":""},{"docid":"f868d5da5ee93ef80f2b1fbdae6bee28","score":"0.48332503","text":"public function isConfigured() {\n\t\t$systemToken = $this->getSystemToken();\n\t\t$secretKey = $this->getSecretKey();\n\t\treturn (!empty($systemToken) AND !empty($secretKey));\n\t}","title":""},{"docid":"00883e7d379675463a98fffa72653be3","score":"0.48284435","text":"function osc_search_alert_subscribed() {\n return View::newInstance()->_get('search_alert_subscribed')==1;\n }","title":""},{"docid":"f178bb69bd97112d4bb255f7d0e88f95","score":"0.4823692","text":"function twentynineteen_comment_count() {}","title":""},{"docid":"4c2662d67822c527b1ddc0013314d0fa","score":"0.48227325","text":"public function enabled()\n {\n return (bool) config('koel.youtube.key');\n }","title":""},{"docid":"ab72045b67ff6c7c2e92210c00426133","score":"0.48225275","text":"protected function hasPreferenceCasts()\n {\n return property_exists($this, 'preference_casts') && is_array($this->preference_casts);\n }","title":""},{"docid":"ae21180de11fdbc8420bdb055cc65fc3","score":"0.4818596","text":"public function getTalksCount()\n {\n return $this->count(self::TALKS);\n }","title":""},{"docid":"705189f39034c301be424067613349c7","score":"0.48176372","text":"public function hasCount(){\n return $this->_has(7);\n }","title":""},{"docid":"a0deb9f0d698af5befb9021a829ef3e2","score":"0.4817048","text":"function getTweets($user,$list,$numTweets){\n\t\t\t$peticion = null;\n\n\t\t\t/* Parametros de autenticacion de la aplicacion de Twetter */\n\t\t\t$settings = array(\n\t\t\t\t'oauth_access_token' => \"4038782833-UZ8pLocc1mxAhASEi7oQa8e3tenCgGHK2feNh9F\",\n\t\t\t\t'oauth_access_token_secret' => \"hjG2zVHs59nKo4tISJJWF532VhrtK68zoQddNG8KAe0ZM\",\n\t\t\t\t'consumer_key' => \"Zf1DO4AOIaavguF9JRw0tQijo\",\n\t\t\t\t'consumer_secret' => \"4eWaOt4dDiHWWGVL0BUA9RuUN8wQB0jnccuzZtgdk8dVonQCEF\"\n\t\t\t);\n\n\t\t\tif( empty($user) && empty($list) ){\n\t\t\t\t/* Se debe de obtener todos los tweets del timeline */\n\t\t\t\t$url = 'https://api.twitter.com/1.1/statuses/home_timeline.json';\n\t\t\t\t/* Se restringe el numero de tweets a obtener */\n\t\t\t\t$getfield = '?count='.$numTweets.'&include_rts=false';\n\t\t\t}\n\t\t\telseif( !empty($user) && !empty($list) ){\n\t\t\t\t/* Se debe de obtener los tweets de la lista especificada */\n\t\t\t\t$url = 'https://api.twitter.com/1.1/lists/statuses.json';\n\t\t\t\t/* Se restringe el numero de tweets a obtener */\n\t\t\t\t$getfield = '?slug='.$list.'&owner_screen_name='.$user.'&count='.$numTweets.'&include_rts=false';\n\t\t\t}\n\t\t\telseif( !empty($user) && empty($list) ){\n\t\t\t\t/* Se debe de obtener solo tweets del usuario especificado */\n\t\t\t\t$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';\n\t\t\t\t/* Se restringe el usuario y el numero de tweets a obtener */\n\t\t\t\t$getfield = '?screen_name='.$user.'&count='.$numTweets.'&include_rts=false';\n\t\t\t}\n\n\t\t\t/* Se debe de obtener los tweets de la lista especificada */\n\t\t\t#$url = 'https://api.twitter.com/1.1/search/tweets.json';\n\t\t\t/* Se restringe el numero de tweets a obtener */\n\t\t\t#$getfield = '?q=%23superbowl&result_type=recent';\n\n\t\t\tif( !empty($url) ){\n\t\t\t\t/* Se especifica el metodo para la peticion */\n\t\t\t\t$requestMethod = 'GET';\n\n\t\t\t\t/* Se crea la instancia de la clase con los parametros especificados */\n\t\t\t\t$twitter = new TwitterAPIExchange($settings);\n\n\t\t\t\t/* Se realiza la peticion */\n\t\t\t\t$peticion = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();\n\t\t\t}\n\n\t\t\t/* Se retorna el resultado de la peticion en formato json */\n\t\t\treturn $peticion;\n\t\t}","title":""},{"docid":"c73722514a3577756c4b4854e10ca4c1","score":"0.48081622","text":"function shouldCountNumberOfWords() {\r\n $counter = new WordCounter(\"Keep the bar green to keep the code clean.\");\r\n // TODO Check that 9, $counter->numberOfWords().\r\n }","title":""},{"docid":"46fa8c14dfec886c440fd9212f00d2ae","score":"0.4800582","text":"public function isEnabled()\n\t{\n\t\t$this->remote_url = $this->params->get('autoimport_url', '');\n\t\t$this->freq = $this->params->get('autoimport_freq', 0);\n\n\t\t// Do not run if we don't have an URL or a frequency set\n\t\treturn ($this->remote_url && ($this->freq > 0));\n\t}","title":""},{"docid":"368f1d79c85fe109e4d195e2d09e2949","score":"0.4799815","text":"public function hasAuthTicket()\n {\n return $this->get(self::AUTHTICKET) !== null;\n }","title":""}],"string":"[\n {\n \"docid\": \"8b80c01bb5c455608386f88fe5ba1810\",\n \"score\": \"0.71392566\",\n \"text\": \"public function isTweetingEnabled()\\n {\\n return Mage::getStoreConfigFlag('rewards/twitter/enableTwitterTweet');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7de10cb28b47e6e40af7c728a3e8e93f\",\n \"score\": \"0.65991986\",\n \"text\": \"public function hasTwitter()\\n\\t{\\n\\t\\treturn Session::has('access_token');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c1d6193e7c116f9cbc1c4739989ade6\",\n \"score\": \"0.6119076\",\n \"text\": \"function get_twitter_tweet_count_from_api() {\\n\\t//ini_set(\\\"display_errors\\\", \\\"On\\\");\\n\\t//delete_transient ( 'acs_tweet_count_cron' );\\n\\tif (false === get_transient ( 'acs_tweet_count_cron' )) {\\n\\t\\tset_transient ( 'acs_tweet_count_cron', true, 60 * 60 * 2 );\\n\\t\\t\\n\\t\\t$acs_twitter_options = get_option ( 'acs_plugin_twitter_api' );\\n\\t\\t$acs_twitter_options ['oauth_access_token'] = '';\\n\\t\\t$acs_twitter_options ['oauth_access_token_secret'] = '';\\n\\t\\t$acs_plugin_twitter_username = get_option ( 'acs_plugin_twitter_username' );\\n\\t\\tif (is_array ( $acs_twitter_options ) && ! empty ( $acs_plugin_twitter_username )) {\\n\\t\\t\\t\\n\\t\\t\\t$a = getTwitterTweetCountJSON ( $acs_twitter_options, $acs_plugin_twitter_username );\\n\\t\\t\\t\\n\\t\\t\\t$b = json_decode ( $a, true );\\n\\t\\t\\t\\n\\t\\t\\tif (json_last_error_msg () !== FALSE && is_array ( $b )) {\\n\\t\\t\\t\\tif (isset ( $b [0] [\\\"statuses_count\\\"] )) {\\n\\t\\t\\t\\t\\tupdate_option ( 'acs_twitter_tweet_count', ( int ) $b [0] [\\\"statuses_count\\\"] );\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af614f145f7b07665f8e4389723ad9ad\",\n \"score\": \"0.5972471\",\n \"text\": \"function tweet_updater_is_tweetable($post) \\n{\\n // retrieve the options\\n $options = get_option('tweet_updater_options');\\n \\n if($options['limit_activate']) {\\n \\n // limiter is activated, check if the post is part of \\n // a category which is tweetable\\n if( $options['limit_to_category'] > 0 ) {\\n $post_categories = wp_get_post_categories($post->ID);\\n if( is_array($post_categories) && sizeof($post_categories) > 0 ) {\\n if( in_array($options['limit_to_category'], $post_categories) ) {\\n echo \\\"in cat: TRUE\\\";\\n return true;\\n } \\n } \\n } \\n \\n // Ok, no category found so continue with checking for the customfields \\n if(! empty($options['limit_to_customfield_key']) && ! empty($options['limit_to_customfield_val']) ) {\\n $customfield_val = get_post_meta($post->ID, $options['limit_to_customfield_key'], true);\\n if( ! empty($customfield_val) && $customfield_val == $options['limit_to_customfield_val'] ) {\\n echo \\\"fields match: true\\\";\\n return true;\\n } \\n }\\n\\n // in all other cases return false\\n return false;\\n } else {\\n // limit is not active so everything is tweetable\\n return true;\\n } \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4240ac765b393de086a6f235215f70b4\",\n \"score\": \"0.59495264\",\n \"text\": \"public function hasTwofactorCode()\\n {\\n return $this->twofactor_code !== null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc5d2fc3167a0d660ee98ee1096e9e46\",\n \"score\": \"0.5870566\",\n \"text\": \"function set_twitter_count($twitter_count) {\\n $this->twitter_count = $twitter_count;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71fb2af69d3405e236db9b8efd138b4d\",\n \"score\": \"0.5818554\",\n \"text\": \"function get_twitter_count() {\\n return $this->twitter_count;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2777cb2d0372444ea75ce57694df7ca2\",\n \"score\": \"0.57719153\",\n \"text\": \"public function twitter(): bool\\n {\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5085bbcfd3f34006d5e9701b58dd257\",\n \"score\": \"0.5743547\",\n \"text\": \"static function _enabledSessionStatistics()\\n\\t{\\n\\t\\tglobal $ilSetting;\\n\\t\\t\\n\\t\\treturn (bool)$ilSetting->get('session_statistics', 1);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d423cf41f696444267805bf6a7a38c6\",\n \"score\": \"0.574134\",\n \"text\": \"public static function canAutoshare()\\n\\t{\\n\\t\\tif ( $method = \\\\IPS\\\\Login\\\\Handler::findMethod( 'IPS\\\\Login\\\\Handler\\\\OAuth1\\\\Twitter' ) and $method->canProcess( \\\\IPS\\\\Member::loggedIn() ) )\\n\\t\\t{\\n\\t\\t\\treturn TRUE;\\n\\t\\t}\\n\\t\\treturn FALSE;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b43c026d5a3020f5c2f959b18c0c240\",\n \"score\": \"0.56362104\",\n \"text\": \"public function fbttposts_tt_has_credentials()\\n\\t{\\n\\t\\tself::$tt_instance->config['token'] = get_option( 'wm-ttToken');\\n \\t\\tself::$tt_instance->config['secret'] = get_option( 'wm-ttSecret');\\n \\t\\tif(!self::$tt_instance->config['token'] || !self::$tt_instance->config['secret'] ) \\n \\t\\t{\\n \\t\\t\\tdie();\\n \\t\\t}\\n \\t\\tself::$tt_instance->reconfigure(self::$tt_instance->config);\\n\\t\\t$code = self::$tt_instance->user_request(array(\\n\\t\\t 'url' => self::$tt_instance->url('1.1/account/verify_credentials')\\n\\t\\t));\\n\\t\\tif($code === 200) return true;\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9afcdb9f54a5e5289cc3db79da8f5a25\",\n \"score\": \"0.5588693\",\n \"text\": \"public function hasSentiment(){\\n return $this->_has(6);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a760e10407dcaa7b0a96c05047df2351\",\n \"score\": \"0.5587917\",\n \"text\": \"public function hasTense(){\\n return $this->_has(11);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e2e525b2203244a9f3de929803b14e7\",\n \"score\": \"0.5569018\",\n \"text\": \"protected function hasSessionToken()\\n {\\n return $this->session->has('twitter.oauth_token') && $this->session->has('twitter.oauth_token_secret');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c44ff9b42ed576db14675074d06e45e\",\n \"score\": \"0.55422276\",\n \"text\": \"private function isThrottlable()\\n {\\n return config('laravel-auth.throttles.enabled', false);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0484d2c50665572722294ca5169f799\",\n \"score\": \"0.55344534\",\n \"text\": \"public function hasSentiment(){\\n return $this->_has(2);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15b870e8379474d0e8953ba62f4c9402\",\n \"score\": \"0.5506052\",\n \"text\": \"public function hasSettings(){\\n return $this->_has(3);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6aba3eecec8d8e357399143abe97c84e\",\n \"score\": \"0.54935527\",\n \"text\": \"public function hasSentiment(){\\n return $this->_has(3);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe87e4fdaa659b6c0c651132c3153d2b\",\n \"score\": \"0.5441704\",\n \"text\": \"function nv_hom_bookmarktwitter(){\\n\\tglobal $theme_option_name;\\n\\n\\tif(!function_exists('wptap_check_option_value')){\\n\\t\\treturn true;\\n\\t}\\n\\n\\treturn wptap_check_option_value($theme_option_name,'bookmarktwitter','1');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f40c9d274f04a4ac87c10570c7c0586f\",\n \"score\": \"0.5414643\",\n \"text\": \"public function hasUser(){\\n\\t\\treturn Session::has('user_id') AND $this->hasTwitter();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4039d3f48a3a5e7cd339c8014bfb91c9\",\n \"score\": \"0.54005426\",\n \"text\": \"function is_in_trial_promotion() {\\n return $this->_admin_notices->has_sticky( 'trial_promotion' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7135a051ca2336f3b03ce87915732b6\",\n \"score\": \"0.53480995\",\n \"text\": \"public function hasExtractDocumentSentiment(){\\n return $this->_has(3);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76caea7e176f943f340859b4ae99399d\",\n \"score\": \"0.5336674\",\n \"text\": \"function tweet_updater_update_status($tweet)\\n{\\n\\t\\n\\t$tokens = get_option('tweet_updater_auth');\\n\\t\\n\\tif( $tokens['auth3_flag'] == '1' )\\n\\t{\\n\\t\\t// Initiate a TwitterOAuth with access tokens\\n\\t\\t$connection = new TwitterOAuth($tokens['consumer_key'], $tokens['consumer_secret'], $tokens['access_key'], $tokens['access_secret']);\\n\\t\\t\\n\\t\\t// Post an update to Twitter via your application:\\n\\t\\t$result = $connection->post('statuses/update', array('status' => $tweet));\\n\\n\\t}\\n\\telse \\n\\t{\\n\\t\\t$result = array( \\n\\t\\t\\t'plugin_error' => 'auth', \\n\\t\\t\\t'error_description' => 'TweetUpdater is not linked to a twitter account'\\n\\t\\t\\t\\t);\\n\\t}\\n\\n\\treturn $result;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d31fed659aa27fc665a1fbe1a3e85350\",\n \"score\": \"0.5324847\",\n \"text\": \"public function hasDocumentSentiment(){\\n return $this->_has(4);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f808e0eff338499e3cb68fa718961f2c\",\n \"score\": \"0.52900785\",\n \"text\": \"public function isEnableViewThrash(){\\n return ($this->withThrash == 2);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59493aa2f94cabaae8f003312115ed4b\",\n \"score\": \"0.5266665\",\n \"text\": \"public function check()\\n {\\n $hasUser = $this->session->has('twitter.user_id') && $this->session->has('twitter.screen_name');\\n\\n return $this->hasSessionToken() && $hasUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13da2951661371d48b1e38ccd3b1a157\",\n \"score\": \"0.52652884\",\n \"text\": \"protected function is_text_link_counter_enabled() {\\n\\t\\treturn WPSEO_Options::get( 'enable_text_link_counter' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"529cb5348a8ffe8fe05c6c6ceec710e5\",\n \"score\": \"0.52642393\",\n \"text\": \"public function checkSettings() {\\n\\t\\t$data = $this->getSettings();\\n\\t\\t$config = new kyConfig($data['kayako_url'], $data['kayako_key'], $data['kayako_secret']);\\n\\t\\t$config->setDebugEnabled(false);\\n\\t\\tkyConfig::set($config);\\n\\n\\t\\t$obj = kyTicketStatus::getAll()->first();\\n\\t\\tupdate_option('kayako_settings_installed', is_object($obj));\\n\\t\\treturn is_object($obj);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaf7cc005c4785ddb7bd0ffe2dc90835\",\n \"score\": \"0.52600867\",\n \"text\": \"public function hasDocumentSentiment(){\\n return $this->_has(1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c5a0a78483113d03f12c4f5fc046f56\",\n \"score\": \"0.52526754\",\n \"text\": \"private function errorCheck($tweets)\\n {\\n if (array_key_exists('errors', $tweets)) {\\n $message = 'We have encountered ' . count($tweets['errors']) . ' error(s):
    ';\\n\\n foreach ($tweets['errors'] as $error) {\\n $message .= $error['message'].' Code:'.$error['code'].'
    ';\\n }\\n\\n if (Director::isDev()) {\\n throw new Exception($message, 1);\\n }\\n\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1af5b88ddf2d4d731438a2372666cc11\",\n \"score\": \"0.52407235\",\n \"text\": \"public function hasSettings()\\n {\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02a017f1d05439efd950d0dc711f0db2\",\n \"score\": \"0.5226045\",\n \"text\": \"public function isEnableViewThrashOnly(){\\n return ($this->withThrash == 3);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7ef36e6a5bf1960ff6115b70843c478\",\n \"score\": \"0.52080595\",\n \"text\": \"public function hasUpdatetall()\\n {\\n return $this->updatetall !== null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e32b6e0bbc9529a04afc1491b1567ed9\",\n \"score\": \"0.52038145\",\n \"text\": \"function exist_twitter()\\n{\\n\\tglobal $options;\\n\\n\\tif( isset($options['theme_social_twitter_text']) && !empty($options['theme_social_twitter_text']) ) :\\n\\n\\t$array = array(\\n\\t\\t'exists' => true,\\n\\t\\t'link' => $options['theme_social_twitter_text'],\\n\\t);\\n\\n\\treturn $array;\\n\\t\\n\\telse: return false; endif;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6112d6e57f3773cdeb43a48ab17e4681\",\n \"score\": \"0.5201013\",\n \"text\": \"public function hasConinit(){\\n return $this->_has(25);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4144fbbb6b5699c4f266cc0904d6a6dc\",\n \"score\": \"0.5197806\",\n \"text\": \"public function has_lti_config() {\\n return (!empty($this->_host) &&\\n !empty($this->_consumer_key) &&\\n !empty($this->_shared_secret));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a57ee11c37586c8c6c8bcde36cfb9a7\",\n \"score\": \"0.51810086\",\n \"text\": \"public function has_settings() {\\n\\t\\treturn count( $this->setting_fields );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1ea64c0fcfa0d52e87a92c6f81716cf\",\n \"score\": \"0.51594645\",\n \"text\": \"protected function checkTweets() {\\n foreach($this->tweets as $tweet) {\\n $return = $this->checkTID($tweet['tid']);\\n \\n if(empty($return)) {\\n $this->insert($tweet);\\n }\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de0e9c6c68805ff54b3e88e39ad62081\",\n \"score\": \"0.5158786\",\n \"text\": \"function nv_hom_rss(){\\n\\tglobal $theme_option_name;\\n\\n\\tif(!function_exists('wptap_check_option_value')){\\n\\t\\treturn true;\\n\\t}\\n\\n\\treturn wptap_check_option_value($theme_option_name,'bookmarktwitter','1');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2816a86e51dbdda97b9c3e7d60009bb2\",\n \"score\": \"0.5147444\",\n \"text\": \"protected function is_insights_enabled()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2816a86e51dbdda97b9c3e7d60009bb2\",\n \"score\": \"0.5147444\",\n \"text\": \"protected function is_insights_enabled()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"205d6bb20a8be3467b60bdf0d3535bdd\",\n \"score\": \"0.51397216\",\n \"text\": \"function smarty_function_mttypepadantispamcounter($args, &$ctx) {\\n $blog = $ctx->stash('blog');\\n $cfg = $ctx->mt->db->fetch_plugin_config('MT::Plugin::TypePadAntiSpam',\\n 'blog:' . $blog->blog_id);\\n $count = $cfg['blocked'];\\n $count or $count = 0;\\n return $ctx->count_format($count, $args);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a50106c15d964462b518dbd342a72ee\",\n \"score\": \"0.51332206\",\n \"text\": \"protected function checkTweets() {\\n foreach($this->tweets as $tweet) {\\n $return = $this->checkTID($tweet);\\n \\n if(empty($return)) {\\n $this->insert($tweet);\\n }\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5aa7eba092a9ee3152b8a22147aa854b\",\n \"score\": \"0.5129937\",\n \"text\": \"public function hasExtractEntitySentiment(){\\n return $this->_has(4);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb24f083fc4a6254c1bd2d8003435172\",\n \"score\": \"0.51161224\",\n \"text\": \"public function post($tweet)\\n {\\n $this->lastStatus = $this->objTwitterConnection->request('POST', $this->objTwitterConnection->url('1/statuses/update'), array('status' => $tweet));\\n if ($this->lastStatus == 200) {\\n $this->lastMessage = null;\\n return true;\\n } else {\\n $this->lastMessage = $this->objTwitterConnection->response['response'];\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6b0a0fe0fe0653a8efba7b0fd8e8fac\",\n \"score\": \"0.5112428\",\n \"text\": \"public function isSocialEnabled()\\n {\\n return in_array('social', config('awemapl-auth.enabled'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3604e1521f25b2fe41c39e1696ba3831\",\n \"score\": \"0.50876445\",\n \"text\": \"public function hasHealcount(){\\n return $this->_has(20);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52b8e7df99a8f280cb197c67bc291e74\",\n \"score\": \"0.507802\",\n \"text\": \"public function used(): bool\\n {\\n return (bool) config('koel.itunes.enabled');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c7f0db8f27c18b44c1a634381f2b1ed\",\n \"score\": \"0.5060387\",\n \"text\": \"public function checkToBeInfluencer()\\n {\\n return $this->have10Posts() and $this->validatedByAdmin();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66624976695725e463d7fcebbda36453\",\n \"score\": \"0.5040974\",\n \"text\": \"function count_all_scoreconfirm_step2($statustwo = 0){\\n $this->db->where('view', 1);\\n if ( $statustwo != 0 ) { $this->db->where('statustwo', $statustwo); }\\n\\n $query = $this->db->get($this->incubation_selection);\\n\\n return $query->num_rows();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec174689e49d40da78275b86122b4613\",\n \"score\": \"0.50322247\",\n \"text\": \"public function enabledSessionStatistics()\\n\\t{\\n\\t\\treturn (bool)$this->session_statistics_enabled;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9320776b79ac9aa8f1ced58cba182a64\",\n \"score\": \"0.5004856\",\n \"text\": \"function getTwitterTweetCountJSON($acs_twitter_options, $acs_plugin_twitter_username) {\\n\\t\\n\\t\\n\\t\\n\\trequire plugin_dir_path( __FILE__ ) . 'includes/TwitterAPIExchange.php';\\n\\t\\n\\t$url = 'https://api.twitter.com/1.1/users/lookup.json';\\n\\t$requestMethod = 'GET';\\n\\t$getfield = '?screen_name=' . esc_attr ( $acs_plugin_twitter_username );\\n\\ttry {\\n\\t\\t$twitter = new TwitterAPIExchange ( $acs_twitter_options );\\n\\t\\t$a = $twitter->setGetfield ( $getfield )->buildOauth ( $url, $requestMethod )->performRequest ();\\n\\t\\treturn $a;\\n\\t} catch ( Exception $e ) {\\n\\t\\techo $e->getMessage();\\n\\t}\\n\\treturn array ();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f217e301e07ddac171e1ebf6525fc5f9\",\n \"score\": \"0.50025976\",\n \"text\": \"function bunchy_is_post_trending( $p = null ) {\\n\\t$post_obj = get_post( $p );\\n\\n\\t$meta_value = get_post_meta( $post_obj->ID, '_bunchy_trending', true );\\n\\n\\treturn apply_filters( 'bunchy_is_post_trending', ! empty( $meta_value ), $post_obj->ID );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b62f3378f3decb53f7952acb407651e\",\n \"score\": \"0.5002536\",\n \"text\": \"public function is_configured() {\\n\\t\\treturn $this->access_token != '';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb54d05aee9d9cf4753173eb674ffc85\",\n \"score\": \"0.49948376\",\n \"text\": \"function shariff3uu_checkbox_sharecounts_render() {\\n\\techo '';\\n\\tif ( ! isset( $GLOBALS['shariff3uu_statistic']['backend'] ) && isset( $GLOBALS['shariff3uu_statistic']['sharecounts'] ) ) {\\n\\t\\techo ' ';\\n\\t\\techo esc_html__( 'Warning: The statistic functionality must be enabled in order for the share counts to be shown.', 'shariff' );\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00b07affa1ffa62639fd0dc76bf88cdb\",\n \"score\": \"0.49911642\",\n \"text\": \"public function wpw_auto_poster_tweet_status( $post, $template, $title = '' ) {\\r\\n\\t\\t\\t\\r\\n\\t\\tglobal $wpw_auto_poster_options;\\r\\n\\t\\t\\r\\n\\t\\t$prefix = WPW_AUTO_POSTER_META_PREFIX;\\t\\r\\n\\t\\t\\r\\n\\t\\t$ispublished = get_post_meta( $post->ID, $prefix . 'tw_status', true );\\r\\n\\t\\t$unique = 'false';\\r\\n\\r\\n\\t\\t$post_type = $post->post_type; // Post type\\r\\n\\r\\n\\t\\t$tags_arr = array();\\r\\n\\t\\t$cats_arr = array();\\r\\n\\t\\t\\r\\n\\t\\tif( isset( $ispublished ) && $ispublished == '1' ) { //if post is published on facebook once then change url to prevent duplication\\r\\n\\t\\t\\t//unique link for posting\\r\\n\\t\\t\\t$unique = 'true';\\r\\n\\t\\t}\\r\\n\\r\\n\\r\\n\\t\\t// Get all selected tags for selected post type for hashtags support\\r\\n if(isset($wpw_auto_poster_options['tw_post_type_tags']) && !empty($wpw_auto_poster_options['tw_post_type_tags'])) {\\r\\n\\r\\n $custom_post_tags = $wpw_auto_poster_options['tw_post_type_tags'];\\r\\n if(isset($custom_post_tags[$post_type]) && !empty($custom_post_tags[$post_type])){ \\r\\n foreach($custom_post_tags[$post_type] as $key => $tag){\\r\\n $term_list = wp_get_post_terms( $post->ID, $tag, array(\\\"fields\\\" => \\\"names\\\") );\\r\\n foreach($term_list as $term_single) {\\r\\n $tags_arr[] = $term_single;\\r\\n }\\r\\n }\\r\\n \\r\\n }\\r\\n }\\r\\n\\r\\n // Get all selected categories for selected post type for hashcats support\\r\\n if(isset($wpw_auto_poster_options['tw_post_type_cats']) && !empty($wpw_auto_poster_options['tw_post_type_cats'])) {\\r\\n\\r\\n $custom_post_cats = $wpw_auto_poster_options['tw_post_type_cats'];\\r\\n if(isset($custom_post_cats[$post_type]) && !empty($custom_post_tags[$post_type])){ \\r\\n foreach($custom_post_cats[$post_type] as $key => $category){\\r\\n $term_list = wp_get_post_terms( $post->ID, $category, array(\\\"fields\\\" => \\\"names\\\") );\\r\\n foreach($term_list as $term_single) {\\r\\n $cats_arr[] = $term_single;\\r\\n }\\r\\n }\\r\\n \\r\\n }\\r\\n }\\r\\n\\r\\n\\t\\t\\r\\n\\t\\t$postlink = get_permalink( $post->ID );\\t\\r\\n\\t\\t$postlink = $this->wpw_auto_poster_get_short_post_link( $postlink, $unique, $post->ID, 'false', 'tw' );\\r\\n\\t\\t\\r\\n\\t\\t$posttitle = $post->post_title;\\r\\n\\t\\t\\r\\n\\t\\t$post_content = strip_shortcodes( $post->post_content);\\r\\n \\r\\n //strip html kses and tags\\r\\n $post_content = $this->wpw_auto_poster_stripslashes_deep($post_content);\\r\\n \\r\\n //decode html entity\\r\\n $post_content = $this->wpw_auto_poster_html_decode($post_content);\\r\\n\\r\\n\\t\\t$userdata = get_userdata($post->post_author);\\r\\n\\t\\t\\r\\n\\t\\t$nicename = get_user_meta( $post->post_author, 'nickname', true);\\r\\n\\t\\t$first_name = get_user_meta( $post->post_author, 'first_name', true);\\r\\n\\t\\t$last_name = get_user_meta( $post->post_author, 'last_name', true);\\r\\n\\t\\t$fullauthor = $first_name . ' ' . $last_name;\\r\\n\\t\\t$posttype = $post->post_type;\\r\\n\\r\\n\\t\\t// Get post excerpt\\r\\n\\t\\t$excerpt = apply_filters( 'wpw_auto_poster_tweet_status_excerpt', $post->post_excerpt, $post );\\r\\n\\r\\n\\t\\t// Get post tags\\r\\n //$tags_arr = wp_get_post_tags( $post->ID, array( 'fields' => 'names' ) );\\r\\n $hashtags = ( !empty( $tags_arr ) ) ? '#'.implode( ' #', $tags_arr ) : '';\\r\\n\\r\\n\\r\\n // get post categories\\r\\n /*$hashcats = array();\\r\\n foreach((get_the_category( $post->ID )) as $category) {\\r\\n $hashcats[] = $category->cat_name;\\r\\n }*/\\r\\n $hashcats = ( !empty( $cats_arr ) ) ? '#'.implode( ' #', $cats_arr ) : '';\\r\\n\\r\\n\\r\\n\\t\\t//if title is passed from function parameter then use that title\\r\\n\\t\\t$posttitle = !empty($title) ? $title : $posttitle;\\r\\n\\t\\t\\r\\n\\t\\t$replacetags = array( '[link]','[title]', '[full_author]', '[nickname_author]', '[post_type]', '[excerpt]', '[hashtags]', '[hashcats]');\\r\\n\\t\\t$replaceval = array( $postlink, $posttitle, $fullauthor, $nicename, $posttype, $excerpt, $hashtags, $hashcats );\\r\\n\\t\\t$status = str_replace( $replacetags, $replaceval, $template );\\r\\n\\t\\t\\r\\n\\t\\t$replacetags = array( '{link}','{title}', '{full_author}', '{nickname_author}', '{post_type}', '{excerpt}', '{hashtags}', '{hashcats}', '{content}');\\r\\n\\t\\t$replaceval = array( $postlink, $posttitle, $fullauthor, $nicename, $posttype, $excerpt, $hashtags, $hashcats, $post_content);\\r\\n\\r\\n\\t\\t$code_matches = array();\\r\\n \\r\\n // check if template tags contains {content-numbers}\\r\\n if( preg_match_all( '/\\\\{(content)(-)(\\\\d*)\\\\}/', $status, $code_matches ) ) {\\r\\n $trim_tag = $code_matches[0][0];\\r\\n $trim_length = $code_matches[3][0];\\r\\n $post_content = substr( $post_content, 0, $trim_length);\\r\\n $replacetags[] = $trim_tag;\\r\\n $replaceval[] = $post_content;\\r\\n }\\r\\n\\r\\n\\t\\t$status = str_replace( $replacetags, $replaceval, $status );\\r\\n\\t\\t\\r\\n\\t\\treturn $this->wpw_auto_poster_html_decode( $status );\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5993f3c4c6c5bd09228f7257ce2f136d\",\n \"score\": \"0.4982946\",\n \"text\": \"public function isTwoFactorEnabled()\\n {\\n return in_array('two_factor', config('awemapl-auth.enabled'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c80dbdcfdb0fa7ad2c9c970282198aa\",\n \"score\": \"0.49807167\",\n \"text\": \"static function _enabledObjectStatistics()\\n\\t{\\n\\t\\tglobal $ilSetting;\\n\\t\\t\\n\\t\\treturn (bool)$ilSetting->get('object_statistics', 0);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"193596aed39bb15e4f7f495fdbfbd67a\",\n \"score\": \"0.4971722\",\n \"text\": \"function twitterlogin_pagesetup() {\\r\\n \\t// that do not have twitter control explicitly turned off\\r\\n \\tif ((get_context() == 'profile') \\r\\n \\t\\t&& ($page_owner_entity = page_owner_entity()) \\r\\n \\t\\t&& ($page_owner_entity->getSubtype() == \\\"twitter\\\")\\r\\n \\t\\t&& ($page_owner_entity->twitter_controlled_profile != 'no')\\r\\n \\t) {\\r\\n \\t\\textend_view('metatags','twitterlogin/hide_profile_embed');\\r\\n \\t}\\r\\n \\t\\r\\n \\textend_elgg_settings_page('twitterlogin/settings/usersettings', 'usersettings/user');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c329fcd2bcb241ea96125ebbaa3a7281\",\n \"score\": \"0.49635383\",\n \"text\": \"public function getSiteStatsSharingEnabled()\\n {\\n return $this->site_stats_sharing_enabled;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46187559a7c9cc132f9978240478edf9\",\n \"score\": \"0.49615732\",\n \"text\": \"protected function isUsingThrottlesLoginsTrait()\\n {\\n return in_array(\\n ThrottlesLogins::class, class_uses_recursive(get_class($this))\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46187559a7c9cc132f9978240478edf9\",\n \"score\": \"0.49615732\",\n \"text\": \"protected function isUsingThrottlesLoginsTrait()\\n {\\n return in_array(\\n ThrottlesLogins::class, class_uses_recursive(get_class($this))\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69ab919657aa517d4f953b34353ff465\",\n \"score\": \"0.49615493\",\n \"text\": \"public function hasSecretPhraseMode()\\n {\\n return $this->secret_phrase_mode !== null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e1dcdfd5fce1df32f8f1bc036536018\",\n \"score\": \"0.49609312\",\n \"text\": \"function neat_get_twitter_count( $post_id ) {\\r\\n\\t\\t$number = 0;\\r\\n\\t\\tif( !$post_id )\\r\\n\\t\\t\\treturn $number;\\r\\n\\t\\tif( false === ( $number = get_transient( $post_id . '_twitter' ) ) ){\\r\\n\\t\\t\\t$args = array(\\r\\n\\t\\t\\t\\t'timeout'\\t=>\\t5\\r\\n\\t\\t\\t);\\r\\n\\t\\t\\t$args = apply_filters( 'neat_wp_remote_get_args' , $args);\\r\\n\\t\\t\\t$apiurl = 'https://cdn.api.twitter.com/1/urls/count.json?url=' . get_permalink( $post_id );\\r\\n\\t\\t\\t$response = wp_remote_get( apply_filters( 'neat_get_twitter_count_apiurl' , $apiurl), $args );\\r\\n\\t\\t\\tif( is_wp_error( $response ) ){\\r\\n\\t\\t\\t\\treturn $number;\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\tif( $response['response']['code'] == 200 ){\\r\\n\\t\\t\\t\\t// valid request.\\r\\n\\t\\t\\t\\t$response = json_decode($response['body']);\\r\\n\\t\\t\\t\\tif( (int)$response->count > 0 ){\\r\\n\\t\\t\\t\\t\\t$number = $response->count;\\r\\n\\t\\t\\t\\t\\tset_transient( $post_id . '_twitter' , $number, apply_filters( 'transient_expiration' , 600));\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\t\\t\\t\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\treturn $number;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1db115226606a8f05dea948d62b2a36d\",\n \"score\": \"0.49504572\",\n \"text\": \"function tyl_have_myalerts($check_activated = false, $check_tyl_registered = false, $check_tyl_enabled = false)\\n{\\n\\t$ret = false;\\n\\n\\tif(function_exists(\\\"myalerts_info\\\")) {\\n\\t\\t$myalerts_info = myalerts_info();\\n\\t\\tif(version_compare($myalerts_info['version'], \\\"2.0.0\\\") >= 0\\n\\t\\t &&\\n\\t\\t (!$check_activated\\n\\t\\t ||\\n\\t\\t (function_exists(\\\"myalerts_is_activated\\\") && myalerts_is_activated())\\n\\t\\t )\\n\\t\\t )\\n\\t\\t{\\n\\t\\t\\tif (!$check_tyl_registered && !$check_tyl_enabled)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$ret = true;\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\tglobal $cache;\\n\\n\\t\\t\\t\\t$alert_types = $cache->read('mybbstuff_myalerts_alert_types');\\n\\n\\t\\t\\t\\tif((!$check_tyl_registered || (isset($alert_types['tyl']['code' ]) && $alert_types['tyl']['code' ] == 'tyl'))\\n\\t\\t\\t\\t &&\\n\\t\\t\\t\\t (!$check_tyl_enabled || (isset($alert_types['tyl']['enabled']) && $alert_types['tyl']['enabled'] == 1 )))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$ret = true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t}\\n\\n\\treturn $ret;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0e11345313005f9445891ef608224f9\",\n \"score\": \"0.4946608\",\n \"text\": \"public function hasUseTicket(){\\n return $this->_has(4);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"458751357bf62ef406d18f2787b13591\",\n \"score\": \"0.49393058\",\n \"text\": \"public function twofactorSettings()\\n {\\n $secretCheck = $this->database->fetch('SELECT value FROM settings WHERE setting = \\\"secret\\\"');\\n\\n if (strlen($secretCheck['value']) !== 16) {\\n if ($this->secret == '') {\\n for ($i = 0; $i < 16; $i++) {\\n $this->secret .= $this->base32Characters[rand(0, 31)];\\n }\\n }\\n $html = str_replace('{{secret}}', $this->secret, $this->basic->htmlBlocks('twofactorEnable'));\\n } else {\\n $html = $this->basic->htmlBlocks('twofactorDisable');\\n }\\n\\n return $html;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55b8c93b844aed7d4ed3a8df77b0ad62\",\n \"score\": \"0.49135914\",\n \"text\": \"private function smsEnabled() {\\n\\t\\t$key = $this->ss->get_key();\\n\\t\\tif(!empty($key)) {\\n\\t\\t\\t$c = $this->ss->get_config($key, false);\\n\\t\\t\\tif(!empty($c['server_settings']['sms'])) {\\n\\t\\t\\t\\treturn true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91f9d6fadc6bbeea5dafc0abfe2a152a\",\n \"score\": \"0.49115166\",\n \"text\": \"public function hasToolSettingsService()\\n {\\n $has = !empty($this->getSetting('custom_context_setting_url'));\\n if (!$has) {\\n $has = self::hasApiHook(self::$TOOL_SETTINGS_SERVICE_HOOK, $this->getConsumer()->getFamilyCode());\\n }\\n return $has;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f887e6abb61ba8d72df9278a8b217a27\",\n \"score\": \"0.49099445\",\n \"text\": \"public function isTotpAuthenticationEnabled(): bool\\n {\\n return null !== $this->totpAuth\\n && TOTPAuth::PROVIDER_GOOGLE_AUTHENTICATOR !== $this->totpAuth->getProvider()\\n && !empty($this->totpAuth->getTopSecret())\\n && true === $this->totpAuth->isEnabled();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02e673f008f96ce2559be9ff2961bd8c\",\n \"score\": \"0.49076587\",\n \"text\": \"public function getTotalNumberOfEnabledSightTickets()\\n {\\n $qb = $this->createQueryBuilder('st');\\n\\n return (int) $qb->select('COUNT(st)')\\n ->where($qb->expr()->eq('st.enabled', true))\\n ->getQuery()\\n ->getSingleScalarResult();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a8006bd2892dea593010dce5836c49cb\",\n \"score\": \"0.49021748\",\n \"text\": \"public function checkFilterPredicates() {\\n\\n\\t\\t$this->TrendingTopic = ClassRegistry::init('TrendingTopic');\\n\\n\\t\\t$now = date('Y-m-d H:i:s', time());\\n\\t\\t$aTimeAgo = date('Y-m-d H:i:s', time()-(60*5));\\n\\t\\t$lastCheckTT = CakeSession::read('last_check_tt');\\n\\n\\t\\tif (!$lastCheckTT || $lastCheckTT<$aTimeAgo) {\\n\\t\\t\\t// First, we set the current TTs from Twitter REST API\\n\\t\\t\\t$this->TrendingTopic->setTrendingTopicsTwitter();\\n\\t\\t\\tCakeSession::write('last_check_tt',$now);\\n\\t\\t\\techo \\\"Update TTs!\\\".PHP_EOL;\\n\\t\\t} else {\\n\\t\\t\\techo \\\"Won't update TTs yet. Last time checked: \\\".$lastCheckTT.PHP_EOL;\\n\\t\\t}\\n\\n\\t\\t// We get them from store\\n\\t\\t$trendingTopics = $this->TrendingTopic->find('all',array(\\n\\t\\t\\t'conditions' => array(\\n\\t\\t\\t\\t'current' => 1,\\n\\t\\t\\t\\t'active' => 1\\n\\t\\t\\t)\\n\\t\\t));\\n\\n\\t\\t$track = array();\\n\\t\\tforeach ($trendingTopics as $trendingTopic) {\\n\\t\\t\\tarray_push($track,$trendingTopic['TrendingTopic']['topic']);\\n\\t\\t}\\n\\n\\t\\t$this->setTrack($track);\\n\\t\\tprint_r($track);\\n\\n\\t\\techo \\\"Updated track!\\\".PHP_EOL.PHP_EOL.PHP_EOL.PHP_EOL.PHP_EOL;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b206dc9f11eb95e91dc95dc97e4e26f\",\n \"score\": \"0.4899423\",\n \"text\": \"public function isRssEnabled(){\\r\\n return Mage::getStoreConfigFlag('rss/config/active') && Mage::getStoreConfigFlag('zozoconcepts_blog/blog/rss');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d4b028ca938a7ed77ef09f553e24028\",\n \"score\": \"0.4897632\",\n \"text\": \"public function getTweetedMessage()\\n {\\n return Mage::getStoreConfig('rewards/twitter/tweetedMessage');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70979ac674a63ed8f938315afee1225e\",\n \"score\": \"0.48935315\",\n \"text\": \"public function fanTweets(Request $request)\\n {\\n $count = $request->input('count') ? $request->input('count') : 5;\\n\\n $oauth_access_token = Settings::where('label', 'twitter_oauth_access_token')->limit(1)->pluck('value')[0];\\n $oauth_access_token_secret = Settings::where('label', 'twitter_oauth_access_token_secret')->limit(1)->pluck('value')[0];\\n $consumer_key = Settings::where('label', 'twitter_consumer_key')->limit(1)->pluck('value')[0];\\n $consumer_secret = Settings::where('label', 'twitter_consumer_secret')->limit(1)->pluck('value')[0];\\n\\n $settings = array(\\n 'oauth_access_token' => $oauth_access_token,\\n 'oauth_access_token_secret' => $oauth_access_token_secret,\\n 'consumer_key' => $consumer_key,\\n 'consumer_secret' => $consumer_secret,\\n );\\n\\n $url = 'https://api.twitter.com/1.1/search/tweets.json';\\n $requestMethod = 'GET';\\n $getfield = \\\"?q=%23odezenne&result_type=mixed&count={$count}\\\";\\n\\n $twitter = new TwitterAPIExchange($settings);\\n $tweets = $twitter->setGetfield($getfield)\\n ->buildOauth($url, $requestMethod)\\n ->performRequest();\\n\\n $tweets = json_decode($tweets);\\n\\n foreach ($tweets->statuses as &$tweet) {\\n $url = 'https://publish.twitter.com/oembed';\\n $getfield= \\\"url=https://twitter.com/{$tweet->user->screen_name}/status/{$tweet->id}&omit_script=true\\\";\\n $html = $twitter->setGetfield($getfield)\\n ->buildOauth($url, $requestMethod)\\n ->performRequest();\\n $tweet->html = json_decode($html)->html;\\n }\\n\\n return response()->json($tweets->statuses);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"562a222e75c8202fd3493ba34eff3c9f\",\n \"score\": \"0.48880538\",\n \"text\": \"public function test_is_token_set() {\\n $this->assertTrue($this->authplugin->is_wstoken_set());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0701eff7d12f0859a3be25b48a525ad3\",\n \"score\": \"0.4885425\",\n \"text\": \"public function hasStats()\\n {\\n return $this->isApc();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"256d2fd07797ed5657b5ddae58e78650\",\n \"score\": \"0.48833883\",\n \"text\": \"public function hasWeekcount(){\\n return $this->_has(6);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd348993f571bda36c588bc17a04aafe\",\n \"score\": \"0.488178\",\n \"text\": \"function testIsComingFromTwitter() {\\n\\t\\n\\t\\t// Spoofing the HTTP_REFERER for purposes of this test and the companion blog post\\n\\t\\t$_SERVER['HTTP_REFERER'] = 'http://twitter.com';\\n\\t\\t$this->assertTrue( $this->plugin->is_from_twitter(), 'is_from_twitter() will return true when the referring site is Twitter.' );\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5139bf4ae1014eadbc3c27a72798234f\",\n \"score\": \"0.48714948\",\n \"text\": \"function getNumOfYoutubeTweets($url) {\\n $ch = curl_init();\\n curl_setopt($ch, CURLOPT_URL, \\\"http://urls.api.twitter.com/1/urls/count.json\\\");\\n curl_setopt($ch, CURLOPT_POSTFIELDS, 'url=' . $url);\\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n curl_setopt($ch, CURLOPT_HEADER, 0);\\n $output = curl_exec($ch);\\n curl_close($ch);\\n $numOfTweets = json_decode($output);\\n return $numOfTweets->count;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2438f2e177816210789dfcb37b26be47\",\n \"score\": \"0.48692426\",\n \"text\": \"public function fetchTweets()\\n {\\n \\n // 1.) Get rate limit for timeline API and fetch an according amount of accounts for that\\n if ($rateLimit = $this->rateLimitUtility->getRateLimitForMethod('statuses', 'user_timeline')) {\\n\\n $limit = ($rateLimit > intval($this->settings['max_fetch'])) ? intval($this->settings['max_fetch']) : $rateLimit;\\n if (\\n ($limit > 0)\\n && ($accounts = $this->accountRepository->findAllSortedByLastFetchTimeline($limit))\\n ){\\n\\n /** @var \\\\Madj2k\\\\TwitterAnalyser\\\\Model\\\\Account $account */\\n foreach ($accounts as $account) {\\n $this->fetchTweetsOfAccount($account);\\n\\n $account->setFetchTimelineTimestamp(time());\\n $this->accountRepository->update($account);\\n sleep(1);\\n }\\n\\n // update rate limit\\n $remainingRateLimit = $this->rateLimitUtility->setRateLimitForMethod('statuses', 'user_timeline', count($accounts));\\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('Fetched timeline tweets for %s account(s). Remaining rate limit is %s.', count($accounts), $remainingRateLimit));\\n } else {\\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('No timeline tweets fetched. Rate limit reached or no accounts available.'));\\n }\\n }\\n\\n // 2.) Get rate limit for search APIand fetch an according amount of accounts for that\\n if ($rateLimit = $this->rateLimitUtility->getRateLimitForMethod('search', 'tweets')) {\\n\\n $limit = ($rateLimit > intval($this->settings['max_fetch'])) ? intval($this->settings['max_fetch']) : $rateLimit;\\n if (\\n ($limit > 0)\\n && ($accounts = $this->accountRepository->findAllSortedByLastFetchAddressed($limit))\\n ){\\n\\n /** @var \\\\Madj2k\\\\TwitterAnalyser\\\\Model\\\\Account $account */\\n foreach ($accounts as $account) {\\n $this->fetchTweetsAddressedToAccount($account);\\n\\n $account->setFetchAddressedTimestamp(time());\\n $this->accountRepository->update($account);\\n sleep(1);\\n }\\n\\n // update rate limit\\n $remainingRateLimit = $this->rateLimitUtility->setRateLimitForMethod('search', 'tweets', count($accounts));\\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('Fetched addressed-to tweets for %s account(s). Remaining rate limit is %s.', count($accounts), $remainingRateLimit));\\n } else {\\n $this->logUtility->log($this->logUtility::LOG_INFO, sprintf('No addressed-to tweets fetched. Rate limit reached or no accounts available.'));\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fed821955d41904ef8283d72bed2cfe4\",\n \"score\": \"0.4866199\",\n \"text\": \"public function hasTiers()\\n {\\n return $this->current()->hasTiers();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c59ddcba00c28f5eaaabefe521541425\",\n \"score\": \"0.48639867\",\n \"text\": \"function mkdf_twitter_theme_installed() {\\n\\t\\treturn defined( 'MIKADO_ROOT' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71bd896321f98c26699eea98e9dfc775\",\n \"score\": \"0.48553327\",\n \"text\": \"public static function hasT3SphinxThemeRtd()\\n {\\n $sphinxSourcePath = static::getSphinxSourcesPath();\\n $setupFile = $sphinxSourcePath . 't3SphinxThemeRtd/setup.py';\\n return is_file($setupFile);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87675599031302e7e214c24d388bcb60\",\n \"score\": \"0.4845332\",\n \"text\": \"public function getThemeSharecount()\\n {\\n return $this->theme_sharecount;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"636c8db77492a7750511b1429bb3a328\",\n \"score\": \"0.48424003\",\n \"text\": \"public function hasMultipleweekcount(){\\n return $this->_has(7);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73936a0c97c7d1f8bbe57ef60c080e6b\",\n \"score\": \"0.48364937\",\n \"text\": \"public function hasLeveluptime(){\\n return $this->_has(15);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75d8a859ab78bfe0aa09127b9f13c1b6\",\n \"score\": \"0.48355043\",\n \"text\": \"public function hasStatuses()\\n {\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75d8a859ab78bfe0aa09127b9f13c1b6\",\n \"score\": \"0.48355043\",\n \"text\": \"public function hasStatuses()\\n {\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f868d5da5ee93ef80f2b1fbdae6bee28\",\n \"score\": \"0.48332503\",\n \"text\": \"public function isConfigured() {\\n\\t\\t$systemToken = $this->getSystemToken();\\n\\t\\t$secretKey = $this->getSecretKey();\\n\\t\\treturn (!empty($systemToken) AND !empty($secretKey));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00883e7d379675463a98fffa72653be3\",\n \"score\": \"0.48284435\",\n \"text\": \"function osc_search_alert_subscribed() {\\n return View::newInstance()->_get('search_alert_subscribed')==1;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f178bb69bd97112d4bb255f7d0e88f95\",\n \"score\": \"0.4823692\",\n \"text\": \"function twentynineteen_comment_count() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c2662d67822c527b1ddc0013314d0fa\",\n \"score\": \"0.48227325\",\n \"text\": \"public function enabled()\\n {\\n return (bool) config('koel.youtube.key');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab72045b67ff6c7c2e92210c00426133\",\n \"score\": \"0.48225275\",\n \"text\": \"protected function hasPreferenceCasts()\\n {\\n return property_exists($this, 'preference_casts') && is_array($this->preference_casts);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae21180de11fdbc8420bdb055cc65fc3\",\n \"score\": \"0.4818596\",\n \"text\": \"public function getTalksCount()\\n {\\n return $this->count(self::TALKS);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"705189f39034c301be424067613349c7\",\n \"score\": \"0.48176372\",\n \"text\": \"public function hasCount(){\\n return $this->_has(7);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0deb9f0d698af5befb9021a829ef3e2\",\n \"score\": \"0.4817048\",\n \"text\": \"function getTweets($user,$list,$numTweets){\\n\\t\\t\\t$peticion = null;\\n\\n\\t\\t\\t/* Parametros de autenticacion de la aplicacion de Twetter */\\n\\t\\t\\t$settings = array(\\n\\t\\t\\t\\t'oauth_access_token' => \\\"4038782833-UZ8pLocc1mxAhASEi7oQa8e3tenCgGHK2feNh9F\\\",\\n\\t\\t\\t\\t'oauth_access_token_secret' => \\\"hjG2zVHs59nKo4tISJJWF532VhrtK68zoQddNG8KAe0ZM\\\",\\n\\t\\t\\t\\t'consumer_key' => \\\"Zf1DO4AOIaavguF9JRw0tQijo\\\",\\n\\t\\t\\t\\t'consumer_secret' => \\\"4eWaOt4dDiHWWGVL0BUA9RuUN8wQB0jnccuzZtgdk8dVonQCEF\\\"\\n\\t\\t\\t);\\n\\n\\t\\t\\tif( empty($user) && empty($list) ){\\n\\t\\t\\t\\t/* Se debe de obtener todos los tweets del timeline */\\n\\t\\t\\t\\t$url = 'https://api.twitter.com/1.1/statuses/home_timeline.json';\\n\\t\\t\\t\\t/* Se restringe el numero de tweets a obtener */\\n\\t\\t\\t\\t$getfield = '?count='.$numTweets.'&include_rts=false';\\n\\t\\t\\t}\\n\\t\\t\\telseif( !empty($user) && !empty($list) ){\\n\\t\\t\\t\\t/* Se debe de obtener los tweets de la lista especificada */\\n\\t\\t\\t\\t$url = 'https://api.twitter.com/1.1/lists/statuses.json';\\n\\t\\t\\t\\t/* Se restringe el numero de tweets a obtener */\\n\\t\\t\\t\\t$getfield = '?slug='.$list.'&owner_screen_name='.$user.'&count='.$numTweets.'&include_rts=false';\\n\\t\\t\\t}\\n\\t\\t\\telseif( !empty($user) && empty($list) ){\\n\\t\\t\\t\\t/* Se debe de obtener solo tweets del usuario especificado */\\n\\t\\t\\t\\t$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';\\n\\t\\t\\t\\t/* Se restringe el usuario y el numero de tweets a obtener */\\n\\t\\t\\t\\t$getfield = '?screen_name='.$user.'&count='.$numTweets.'&include_rts=false';\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* Se debe de obtener los tweets de la lista especificada */\\n\\t\\t\\t#$url = 'https://api.twitter.com/1.1/search/tweets.json';\\n\\t\\t\\t/* Se restringe el numero de tweets a obtener */\\n\\t\\t\\t#$getfield = '?q=%23superbowl&result_type=recent';\\n\\n\\t\\t\\tif( !empty($url) ){\\n\\t\\t\\t\\t/* Se especifica el metodo para la peticion */\\n\\t\\t\\t\\t$requestMethod = 'GET';\\n\\n\\t\\t\\t\\t/* Se crea la instancia de la clase con los parametros especificados */\\n\\t\\t\\t\\t$twitter = new TwitterAPIExchange($settings);\\n\\n\\t\\t\\t\\t/* Se realiza la peticion */\\n\\t\\t\\t\\t$peticion = $twitter->setGetfield($getfield)->buildOauth($url, $requestMethod)->performRequest();\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* Se retorna el resultado de la peticion en formato json */\\n\\t\\t\\treturn $peticion;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c73722514a3577756c4b4854e10ca4c1\",\n \"score\": \"0.48081622\",\n \"text\": \"function shouldCountNumberOfWords() {\\r\\n $counter = new WordCounter(\\\"Keep the bar green to keep the code clean.\\\");\\r\\n // TODO Check that 9, $counter->numberOfWords().\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46fa8c14dfec886c440fd9212f00d2ae\",\n \"score\": \"0.4800582\",\n \"text\": \"public function isEnabled()\\n\\t{\\n\\t\\t$this->remote_url = $this->params->get('autoimport_url', '');\\n\\t\\t$this->freq = $this->params->get('autoimport_freq', 0);\\n\\n\\t\\t// Do not run if we don't have an URL or a frequency set\\n\\t\\treturn ($this->remote_url && ($this->freq > 0));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"368f1d79c85fe109e4d195e2d09e2949\",\n \"score\": \"0.4799815\",\n \"text\": \"public function hasAuthTicket()\\n {\\n return $this->get(self::AUTHTICKET) !== null;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":733,"cells":{"query_id":{"kind":"string","value":"5dcb9175ab81057d47b6644fd8fc2ba9"},"query":{"kind":"string","value":"/ Get all requisito activo"},"positive_passages":{"kind":"list like","value":[{"docid":"7c46647d6890d31d641e301f03db0808","score":"0.7998188","text":"function get_all_requisitoactivo()\n {\n $requisito = $this->db->query(\"\n SELECT\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\n FROM\n `requisito` r\n left join beca b on r.beca_id = b.beca_id\n left join estado e on r.estado_id = e.estado_id\n WHERE\n r.estado_id = 9\n ORDER BY `requisito_nombre` ASC\n \")->result_array();\n \n return $requisito;\n }","title":""}],"string":"[\n {\n \"docid\": \"7c46647d6890d31d641e301f03db0808\",\n \"score\": \"0.7998188\",\n \"text\": \"function get_all_requisitoactivo()\\n {\\n $requisito = $this->db->query(\\\"\\n SELECT\\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\\n FROM\\n `requisito` r\\n left join beca b on r.beca_id = b.beca_id\\n left join estado e on r.estado_id = e.estado_id\\n WHERE\\n r.estado_id = 9\\n ORDER BY `requisito_nombre` ASC\\n \\\")->result_array();\\n \\n return $requisito;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"bcd45e9a331148b173bdb52aeaa36c80","score":"0.72356415","text":"public function ListarInactivos()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM usuarios, tipousuario WHERE usuarios.idTipo=tipousuario.idTipo AND activo=0\");\n\t\t\t$stm->execute();\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}","title":""},{"docid":"7942acb528530ee5e719ff2c86829c4b","score":"0.7191359","text":"function get_all_requisito()\n {\n $requisito = $this->db->query(\"\n SELECT\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\n FROM\n `requisito` r\n left join beca b on r.beca_id = b.beca_id\n left join estado e on r.estado_id = e.estado_id\n ORDER BY `requisito_nombre` ASC\n \")->result_array();\n \n return $requisito;\n }","title":""},{"docid":"2e0641c4410fee92fec3496b7b9831a0","score":"0.7186182","text":"public static function getAll(){\n if(!isset($_SESSION)) session_start();\n $actividades = new Actividad();\n return $actividades->getAllActividades();\n }","title":""},{"docid":"0a9a48437bef3b432be54e573dc13825","score":"0.6943439","text":"static function getAllActive() {\n\n\t\treturn TipoFamilia::All()->where('activo',1);\n\t}","title":""},{"docid":"94fb5dac6a17772f2ddb0f4dd0fc5f32","score":"0.68217033","text":"public function get_all() {\n print_r($_SESSION);\n $this->db->select('activos.id, activos.fecha_compra, activos.monto_compra_sin_impuestos, activos.tipo, activos.descripcion');\n $this->db->from('activos');\n $this->db->join('personas', 'personas.id = persona_id');\n $this->db->where('personas.id', $_SESSION['persona_id']);\n $this->db->where('activos.status', 1);\n $result = $this->db->get();\n return $result->result_array();\n }","title":""},{"docid":"9671e43d075eac3ff1745d84dd799b1c","score":"0.6639607","text":"public function ConsultarActivosSimple(){\n $sql = \"SELECT idactivo, activo, AC.detalle AS categoria FROM activo A LEFT JOIN activo_categoria AC ON A.idactivo_categoria = AC.idactivo_categoria\";\n $query = $this->conexion->query($sql);\n return $query;\n }","title":""},{"docid":"9c160244c6f457aed1646bb062c8b2a3","score":"0.65792596","text":"public static function getAllTblnivelaccesoAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblniveleacceso WHERE tblniveleacceso_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"822aefa4e064e3823eab0d8d13903857","score":"0.6567682","text":"public static function getAllTblusuarioproveedorAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblusuarioproveedor WHERE tblusuarioproveedor_activado = ? \";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"8afd77f1d84c202f8432da664276113f","score":"0.6489286","text":"public function getActividad()\n\t\t{\n\t\t\t$query = \"select * from act_economica\";\n\t\t\t$this->conexionDAO->Abrir();\n\t\t\t$resultado = $this->conexionDAO->select($query);\n\t\t\t$actividades = array();\n\t\t\twhile($row = $resultado->fetch_array()) \n\t\t\t{\n\t\t\t\t$actividad = new Actividad();\n\t\t\t\t$actividad->id = $row[\"ID\"];\n\t\t\t\t$actividad->detalle = $row[\"DETALLE\"];\n\t\t\t\t\n\t\t\t\t$actividades[] = $actividad;\n\t\t\t} \n\t\t\t$this->conexionDAO->Cerrar();\n\t\t\treturn $actividades;\n\t\t}","title":""},{"docid":"871ae64948ceae2b1338451b0709daea","score":"0.64850575","text":"public function serviciosActivos(){\n return Servicio::where('estado', '=', 'activo')->orderBy('visitas','desc')->get();\n \n }","title":""},{"docid":"4fefdae71073e4c6a584bd911520fab5","score":"0.6432139","text":"public static function getAllTbleventoAct(){\n\t \n\t $activado = 1;\n\t\t$consulta = \"SELECT * FROM tblevento WHERE tblevento_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"e76f42d5cb569c8f019a86f751d83f0b","score":"0.64252365","text":"public static function getAllTblproveedoraAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblproveedor WHERE tblproveedor_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"f171a3cf6b9d8082e870c3385a3f1de3","score":"0.6414372","text":"public function ObtPosicionActivos()\n\t{\n\t\t$sql = \"SELECT * FROM posicion WHERE estatus = 1\";\n\t\t$resp = $this->db->consulta($sql);\n\t\t$cont = $this->db->num_rows($resp);\n\n\n\n\t\t$array=array();\n\t\t$contador=0;\n\n\t\tif ($cont>0) {\n\n\t\t\t\n\t\t\twhile ($objeto=$this->db->fetch_object($resp)) {\n\n\t\t\t\t$array[$contador]=$objeto;\n\t\t\t\t$contador++;\n\t\t\t} \n\t\t}\n\t\treturn $array;\n\t}","title":""},{"docid":"b34d12928e94098bf7a5a2012b50eae0","score":"0.64113796","text":"public function consultarActividadesModel(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM actividad WHERE eliminado=0\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t\t$stmt->close();\n\t}","title":""},{"docid":"3f2e68d05974f4652fc7d34ad19f10df","score":"0.6405063","text":"public static function getAllTblproductcotizadorAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblproductcotizador WHERE tblproductcotizador_activado = ? \";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"1790800bf7fc2cd21c843440a80a8204","score":"0.64002305","text":"public static function getAllTblproductoAct(){\n \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblproducto WHERE tblproducto_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"fe3d2264463085477656fcb8c157c9f4","score":"0.63770044","text":"public function findUsariosActividad()\n {\n $sql = \"SELECT * FROM actividad INNER JOIN tipoActividad ON actividad.tipoActividad = tipoactividad.idTipoActividad INNER JOIN abuelito ON actividad.abuelito_idAbuelito = abuelito.idAbuelito INNER JOIN usuarios on actividad.usuario_idUsuario = usuarios.idUsuario WHERE idUsuario\";\n $finded = $this->db->query($sql);\n return $finded->fetch_object();\n }","title":""},{"docid":"bdce213598cb414397078e9f86a27cbc","score":"0.63707","text":"public function getListActivar()\n {\n\n $sql = \"SELECT cod_distribuidor\n FROM distribuidor\n WHERE distribuidor.cod_estado = 2\n \";\n $list = array();\n if (!$resultado = pg_query($this->conexion, $sql)) die();\n while ($row = pg_fetch_array($resultado)) {\n $item = new Distribuidor();\n $item->setCod_distribuidor($row[0]);\n \n array_push($list, $item);\n\n }\n return $list;\n\n }","title":""},{"docid":"cb3efc93998c70a03f16d8d372d0ec8e","score":"0.6350027","text":"public function All()\n {\n return prueba::get();\n }","title":""},{"docid":"c5b05883a4a7c5a8603c91d9047ccc40","score":"0.63434","text":"public function getComentarios(){\n\t\t$sql = \"SELECT c.Comentario, cli.Usuario FROM comentarios c, cliente cli, producto p where c.IdCliente=cli.IdCliente and p.IdProducto=c.IdProducto and c.Estado=1\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n }","title":""},{"docid":"0138d8efd99c97846a503da08c2aac0b","score":"0.6341955","text":"public static function getAllTblproductcomplemAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblproductcomplem WHERE tblproductcomplem_activado= ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n \t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"05439ff977893b992b8849b80e490513","score":"0.63194066","text":"public static function getAllTblcupondescuentoAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblcupondescuento WHERE tblcupondescuento_activado = ? \";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"8ee7c186f9344d1619da865114068f19","score":"0.6309338","text":"public function consultarActividadModel(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM actividad WHERE eliminado=0\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t\t$stmt->close();\n\t}","title":""},{"docid":"ed524339b608ded809dac9530fa88336","score":"0.63085026","text":"function obtenerNivelesDeCriticidad(){\n $resultados=$this->as_array()->get_all();\n return $resultados;\n }","title":""},{"docid":"689045280e69d1710a57b9b4d71fddba","score":"0.6305962","text":"public function consultarSesionActivaModel(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM sesion inner join alumno on sesion.id_alumno = alumno.id_alumno inner join actividad on sesion.id_actividad = actividad.id_actividad inner join maestro on sesion.id_maestro = maestro.id_maestro\");\n\t\t$stmt->execute();\n\t\treturn $stmt->fetchAll();\n\t\t$stmt->close();\n\t}","title":""},{"docid":"0630cde8258b5779acb95830d3ab04c1","score":"0.629903","text":"public function getAll(){\n return $this->acteurArray;\n }","title":""},{"docid":"5424f5a626a2627eeb1755a659111cd1","score":"0.6297407","text":"public function getListeAccompagnateurs() {\n\t\t$sql = \"SELECT * FROM \" . P . \"accompagnateur\";\n\n\t\t$this->result = $this->executeRequete($sql); // Requête simple\n\n\t\treturn $this->result->fetchall(PDO::FETCH_ASSOC);\n\t}","title":""},{"docid":"89870fe4ab36ba2cab1bd21d39c53005","score":"0.62823594","text":"public function obtenerCampaniasActivas( $cliente = \"\" ){\r\n try{\r\n\r\n //// chequeo de parametros\r\n if( strcmp($cliente, \"\") == 0 ){\r\n throw new Exception(__CLASS__ . \"::\" . __METHOD__ . \" - line \" . __LINE__ . \" - :: \" . Mensajes::getMensaje( '001', array('cliente') ), 1);\r\n }\r\n // obtengo las campanias para un cliente determinado\r\n $consulta = ' SELECT * '.\r\n ' FROM campania '.\r\n ' WHERE activa = 1 AND '.\r\n ' fecha_fin_campania >= NOW() AND '.\r\n ' id_cliente = ? ';\r\n\r\n $rows\t = $this->basedatos->ExecuteQuery($consulta, array( $cliente ));\r\n\r\n $salida = array();\r\n foreach ( $rows as $k => $v){\r\n $salida[$v->id] = $v;\r\n }\r\n return $salida;\r\n }\r\n catch(Exception $e ) {\r\n\t\t\t $this->error = 1;\r\n throw $e;\r\n }\r\n }","title":""},{"docid":"f75e46233aadd88794c953eb673559d1","score":"0.62740034","text":"public function listarAceitas(){\n $pdo = Database::conexao();\n $result = $pdo->query(\"SELECT r.*, u.idUsuario, u.nomeUsuario,d.nomeDisciplina, d.idDisciplina, c.idCurso, c.nomeCurso FROM tb_reserva r, tb_usuario u, tb_disciplina d, tb_curso c\n WHERE statusReserva='Aceita' AND u.idUsuario=r.idUsuarioFk and d.idDisciplina=r.idDisciplinaFk AND c.idCurso= d.idCursoFk\");\n $linhas = $result->fetchAll(\\PDO::FETCH_ASSOC);\n return $linhas;\n }","title":""},{"docid":"b41cdf5c453688feb1aabc79f721be30","score":"0.625947","text":"function get_all_requisito_beca($beca_id)\n {\n $requisito = $this->db->query(\"\n SELECT\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\n FROM\n `requisito` r\n left join beca b on r.beca_id = b.beca_id\n left join estado e on r.estado_id = e.estado_id\n WHERE\n r.beca_id = 0 or r.beca_id = $beca_id\n ORDER BY `requisito_nombre` ASC\n \")->result_array();\n \n return $requisito;\n }","title":""},{"docid":"54800442b305442bc75bc797d5200d38","score":"0.6227341","text":"public function obtener_trabajadores_activados(){\n try {\n $sql= \"SELECT * FROM `trabajadores` t1 INNER JOIN \".Cocineros::TABLA[0].\" t2 ON t1.dni = t2.dni WHERE t2.estado=1\";\n $resultado=$this->conexion->query($sql);\n //$salida = $resultado->fetch_object();\n\n $objetos=array();\n\n while ($fila=$resultado->fetch_object()){\n $objetos[]=$fila;\n }\n\n return $objetos;\n \n } catch (Exception $ex) {\n $salida = 'error '.$ex;\n return $salida;\n }\n }","title":""},{"docid":"417864ed8dbfe5536a0b683d11814b66","score":"0.6226251","text":"public function listar() {\n $sql = \"SELECT nombre,descripcion,estado,id_fabricante from marca where estado='disponible'\";\n $this->objCon->Execute($sql);\n }","title":""},{"docid":"2e5af48d0fe813dc77e165943204654d","score":"0.621864","text":"public function Listar()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$stm = $this->pdo->prepare(\"SELECT * FROM usuarios, tipousuario WHERE usuarios.idTipo=tipousuario.idTipo AND activo=1\");\n\t\t\t$stm->execute();\n\t\t\treturn $stm->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}","title":""},{"docid":"da4aec081eda41f35539d746d7844600","score":"0.6215112","text":"public function findAllActives(){\n return $this->createQueryBuilder('c')\n ->andWhere('c.isActive = :active')\n ->setParameter('active', true)\n ->getQuery()\n ->execute();\n }","title":""},{"docid":"241e96102d7567cc8278d7fd1e7cc72a","score":"0.6202064","text":"public function getBuscarRegistros()\n {\n return $this->repository->reserva->getTodasReservas();\n }","title":""},{"docid":"1232fdccad2ef4b1bdd04066299ab098","score":"0.6200199","text":"public function queryAll(){\n\t\t$sql = 'SELECT * FROM comentarios';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}","title":""},{"docid":"14d9e0ea8dccd3eb15798c479b11ec25","score":"0.6184122","text":"public function obtenerClientesActivos(){\r\n try{\r\n $consulta = ' SELECT * '.\r\n ' FROM cliente '.\r\n ' WHERE activo = 1 ';\r\n\r\n }\r\n catch(Exception $e ) {\r\n\t\t\t $this->error = 1;\r\n throw $e;\r\n }\r\n }","title":""},{"docid":"1f364bdbe268993751d981754958152e","score":"0.6168495","text":"public static function getAll(){\n if(Auth::check()){\n return self::where('estatus', true)\n ->where('id_inversionista', Auth::user()->inversionista->id)\n ->get()\n ->toArray();\n }\n }","title":""},{"docid":"db2b1d152a2943eb8f80d56283f710e8","score":"0.61523956","text":"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM caja_pagoefectivo';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}","title":""},{"docid":"fcfdaf81aac8e688a9496787dab52c3c","score":"0.61502534","text":"public function all()\n {\n return $this->pdo->query(\"SELECT * FROM produits WHERE 1\")->fetchAll(PDO::FETCH_ASSOC);\n }","title":""},{"docid":"793e25b58ff975ad798d51ac25064e07","score":"0.6114401","text":"public static function getAllTblpaisAct(){\n\t \n\t\t$activado = 1;\n\t\t$consulta = \"SELECT * FROM tblpais WHERE tblpais_activado = ?\";\n\t\t\n\t\ttry{\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos de todos los registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"5022be2a264f86e83661ab4f4f797f22","score":"0.6112469","text":"public function listaDeEmpleadoActivos()\n {\n $sqlListaEmpleadosActivos = \"\n SELECT idEmpleado, ci, CONCAT_WS(' ',primerNombre,segundoNombre,apellidoPaterno,\n apellidoMaterno)as nombreEmpleado,celular, estado\n FROM empleado\n WHERE estado = 1\n ORDER BY primerNombre,segundoNombre,apellidoPaterno,apellidoMaterno;\";\n $cmd = $this->conexion->prepare($sqlListaEmpleadosActivos);\n $cmd->execute();\n $listaDeEmpleadosConsulta = $cmd->fetchAll();\n return $listaDeEmpleadosConsulta;\n }","title":""},{"docid":"1d8f45e95261a062c72645353bf36185","score":"0.61037225","text":"public function obtActividades(Request $request)\n\t{\n\t\ttry {\n\t\t\t$nombre_sp = 'FOA_obtActividadesXFolio';\n\t\t\t$arrayParametros = array();\n\n\t\t\t// Obtener los parametros del request\n\t\t\t$arrayParametros[0] = $request->has(\"id\") ? $request->input(\"id\") : 0; // id del folio\n\t\t\t//$arrayParametros[1] = $request->has(\"usuario_id\") ? $request->input(\"usuario_id\") : 1;\n\n\t\t\t// Ejecutar SP Base de datos\n\t\t\t$responseSP = DB::select(\"CALL psm.\".$nombre_sp.\"(?);\", [$arrayParametros[0]]);\n\n\t\t\treturn $this->formatearRespuesta($responseSP, 200, 1);\n\t\t} catch (\\Throwable $th) {\n\t\t\tthrow $th;\n\t\t\treturn $this->formatearRespuesta([], 500, 2, 0, \"Error al procesar la solicitud\");\n\t\t}\n\t}","title":""},{"docid":"8fdc7d3a3dc0750d6055f166c69f8da7","score":"0.60967994","text":"public function getEmpActivos($con)\n {\n $result=$this->adapter->query(\"select * \n from a_empleados \n where estado=0 \".$con.\" order by nombre,apellido\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }","title":""},{"docid":"389305259271ec7c2a4a9b2a31703c38","score":"0.60397106","text":"public function queryAll(){\n\t\t$sql = 'SELECT * FROM auditoriaingreso';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}","title":""},{"docid":"389306afd996d4e8e17c14e28d9f600a","score":"0.6036305","text":"public static function getAllTblmoduloventabpAct(){\n\t \n\t $activado = 1;\n\t\t$consulta = \"SELECT * FROM tblmoduloventabp WHERE tblmoduloventabp_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"5de713cdea6b16f17415134855223ab5","score":"0.60277","text":"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM complejos_apartamentos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}","title":""},{"docid":"9b5b9ec299f55db90fb76b79cc9d8844","score":"0.6008884","text":"function getActores($criterio, $orden) {\r\n $actores = null;\r\n $sql = \"select * from documento_actor where \" . $criterio . \" order by \" . $orden;\r\n //echo ($sql.\"
    \");\r\n $r = $this->db->ejecutarConsulta($sql);\r\n if ($r) {\r\n $cont = 0;\r\n while ($w = mysql_fetch_array($r)) {\r\n $actores[$cont]['id'] = $w['doa_id'];\r\n $actores[$cont]['nombre'] = $w['doa_nombre'];\r\n $actores[$cont]['sigla'] = $w['doa_sigla'];\r\n $cont++;\r\n }\r\n }\r\n return $actores;\r\n }","title":""},{"docid":"a156a17f3e0d8ad66ed59e29d9700007","score":"0.60005575","text":"function getActivo() {\n return $this -> activo;\n }","title":""},{"docid":"329c7a8813bfdb62c7c95c444bdc1251","score":"0.5992267","text":"public function listar()\n\t{\n\t\t$sql=\"SELECT * FROM permiso\";\n\t\treturn ejecutarConsulta($sql);\n\t}","title":""},{"docid":"87ef75afc06a1e94326cf088f4723ad5","score":"0.5990898","text":"public function revRequisitos()\n {\n return $this->hasMany('App\\Models\\RevRequisito','cia_id','id');\n }","title":""},{"docid":"3cea005f17d9f4223a96d96ecf54de57","score":"0.5989824","text":"public function index()\n {\n return TipoCuenta::all();\n }","title":""},{"docid":"bb74fb5dd9111cde8a7220e7e1c7766c","score":"0.59767103","text":"function consultar(){\n\t\t//entonces listo los alumnos\n\t\tif(!isset($_REQUEST['accion'])){\n\t\t\t$curso_array = $this->modelo->cursoTodo();\t\n\t\t\t\t//incluir la vista para listar\n\t\t\t\tinclude('vista/cursoTabla.php');\n\t\t\t\t$vista = new cursoTabla();\n\t\t\t\t$vista -> mostrar_tabla($curso_array);\n\t\t}\n\t}","title":""},{"docid":"befc82140a40bac695ec87707e7505bc","score":"0.5976573","text":"public function listar(){\n\t\t$sql=\"SELECT * FROM permiso\";\n\t\treturn ejecutarConsulta($sql);\n\t}","title":""},{"docid":"246729ae17400680995748fb81457942","score":"0.5971648","text":"public function readAll()\n {\n $sql = 'SELECT id_compra, direccion_env, impuestos, total, precio_env, nombres_cliente, estado From compra\n INNER JOIN clientes USING (id_cliente)\n INNER JOIN Estado_de_Compra USING (id_estado_de_comp)\n ORDER BY estado';\n $params = null;\n return Database::getRows($sql, $params);\n }","title":""},{"docid":"7a01694d52fbee18689eeb0c46f764b2","score":"0.5967634","text":"public function usuariosActivos()\n\t{\n\t\t$busqueda = trim(\\Input::get('busqueda'));\n\t\t$estado = 1;\n\n\t\t$textobuscado=\"\";\n\n\t\tif ($busqueda == \"\")\n\t\t{\n\t\t\t// si el input de busqueda está vacio no es necesario realizar acciones \n\t\t}\n\t\telse if ($busqueda != \"\")\n\t\t{\n\t\t\t$textobuscado = $busqueda;\n\t\t\t//$usuarios = $this->usuarioRepo->busquedaUsuariosPorNombre($busqueda, $estado);\n\t\t\t\n\t\t\t$cuentas = $this->cuentaRepo->busquedaCuentasPorCorreoEstado($busqueda, $estado);\n\n\t\t\t# sizeof devuelve el tamaño del argumento recibido\n\t\t\tif (sizeof($cuentas) == 0)\n\t\t\t{\n\t\t\t\treturn \\Redirect::route('lista.usuarios.activos')->with('status_nohaycoincidencias', \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'No hay resultados de búsqueda \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t para '.$textobuscado);\n\t\t\t}\n\t\t\t\n\t\t\treturn \\View::make('modulos.super.listausuariosactivos', \n\t\t\t\t\t\t\t\t\tcompact('cuentas','textobuscado', 'rolenvista')\n\t\t\t\t\t\t);\n\t\t}\n\n\t\t$cuentas = $this->cuentaRepo->cuentasActivas();\n\n\t\treturn \\View::make('modulos.super.listausuariosactivos', \n\t\t\t\t\t\t\tcompact('cuentas','textobuscado', 'rolenvista')\n\t\t\t\t);\n\t}","title":""},{"docid":"2d97199736ecfe7d341850fc5129f27e","score":"0.5964048","text":"public function obterTodasCompras(){\n $compra = new CompraDAO();\n return $compra->getAll();\n }","title":""},{"docid":"3a8c80cd1be7dda550341862469e07ef","score":"0.5954499","text":"public function getOrdenesRecogidas(){\n $this -> Conexion -> abrir();\n $this -> Conexion -> ejecutar($this -> CitaDAO -> getOrdenesRecogidas());\n $res = $this -> Conexion -> extraer();\n $this -> Conexion -> cerrar();\n return $res[0];\n }","title":""},{"docid":"0ced293e3a9543925e6e72dfeeef44ac","score":"0.5949738","text":"public function listar()\n\t{\n\t\t$sql = \"SELECT * FROM permiso\";\n\t\treturn ejecutarConsulta($sql);\n\t}","title":""},{"docid":"9b4554cc626d619023100b5c4c166e7f","score":"0.5944693","text":"public function retournerCommissions()\n {\n $requete = $this->db->get('commission');\n return $requete->result_array(); // retour d'un tableau associatif\n // fin retournerAnnees\n }","title":""},{"docid":"bed1b46f491ce141cde25ccadd09e314","score":"0.5943541","text":"function listarOrcamentos(){\n $orcamentoSel = new Orcamento();\n if(isset($_GET['texto'])){\n $orcamentoSel->buscarTodos($_GET['texto']);\n }else{\n $orcamentoSel->buscarTodos(\"\");\n }\n\t}","title":""},{"docid":"c4b203e41d59ed06fefd465a50c30b0b","score":"0.5938843","text":"public function queryAll(){\n\t\t$sql = 'SELECT * FROM projeto_pesquisador';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}","title":""},{"docid":"c5d8b7d24637867b630f544a671e3c0a","score":"0.59377384","text":"public function obtener_actividad($valor){\n\n \t$act=DB::table('muestra_actividad')->where('id_muestra','=',$valor)->get();\n\n \t$aux=array();\n\n foreach ($act as $key2) {\n \t$aux1=DB::table('actividad')->where('id_actividad','=',$key2->id_actividad)->get();\n \t$aux=array_merge($aux,$aux1);\n }\n\n return $aux;\n\n }","title":""},{"docid":"3f1bb95395cab955a73a2c6abee1115e","score":"0.5936975","text":"public static function getAllTblclasifproductAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblclasifproduct WHERE tblclasifproduct_activado= ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"4f2431368d3ef57ab041fcc609b28fa7","score":"0.5934209","text":"public function findAllActive() {\n return $this->findBy(array('status' => 1));\n }","title":""},{"docid":"48f944cfdd83b424b483326d1bfc1eb6","score":"0.5932357","text":"public function getSupervisoresNombresActivos()\n {\n \n $result=$this->adapter->query(\"select a.id,concat(nombre,' ',apellido) as nomComp\n from n_supervisores a\n inner join a_empleados b on b.id=a.idEmp \n where a.estado=0\",Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }","title":""},{"docid":"226581f15ffc9aee2af6f61f33d4c82e","score":"0.5928845","text":"function obtener_todos()\n\t{\n\t\t// obetenemos el perfil que esta activo \n\t\t\t\n\t\t$conn = parent::conectar(\"\");\n\t\t\n\t\t$params = array( \n\t\t\t\t\tarray(&$this->idusuario),\n\t\t\t\t\tarray(&$this->password), \t\n\t\t\t\t\tarray(&$this->idempresa) ,\n\t\t\t\t\tarray(&$this->fecha_desde) ,\n\t\t\t\t\tarray(&$this->fecha_hasta),\n\t\t\t\t\tarray(&$this->idcomprobante) \n\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\n\t\t$rs = parent::ejecutar(\"Comprobantes_ObtenerTodos_x_Empresa\",\"SP\",\"\",$conn, $params);\n\n\t\t$array_return = array();\n\t\t\n\t\tif (sqlsrv_has_rows($rs)==0)\n\t\t{\t\t\t\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile($row = sqlsrv_fetch_array($rs, SQLSRV_FETCH_ASSOC))\n\t\t\t{\n\t\t\t array_push($array_return, $row);\n\t\t\t}\n\n\t\t\treturn $array_return;\n\t\t}\t\n\t}","title":""},{"docid":"5cdf3f47474a5be6252be4b4cd805c24","score":"0.59285146","text":"public function index() {\n //$user = auth()->user();\n // //dd($user);\n \n //$activos = \\CiberPYME\\Activo::with(array('amenazas',function(Builder $query){\n // $query->with('salvavulneras')->get();\n //}))->get();\n //=>function (Builder $query) {$query->select('tipo','descripcion')}\n\n //dd($activos);\n\n\n return view('activos/list_activos');\n }","title":""},{"docid":"34e98b54eb1e1190a16a536c398cd0bc","score":"0.5921397","text":"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM reservaciones_pagos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}","title":""},{"docid":"d2b049a4f29a4161b391869cf755170e","score":"0.591562","text":"private function consultarEspacios()\n\t {\n\t \t\t\treturn Espacio::find()->all();\n\t }","title":""},{"docid":"c6a802e86b8b97c6886964359ffc04cb","score":"0.59149396","text":"public function PesquisarTodos(){\n try {\n //Conexão com o banco de dados pela classe PDO\n $pdo = Conexao::getinstance();\n //Comando em SQL para pesquisar os dados na tabela estoque_produto\n $sql = \"SELECT * FROM estoque_produto ep INNER JOIN produto p ON(ep.produto=p.id_produto) INNER JOIN estoque e ON(ep.estoque=e.id_estoque)\";\n //Prepara o sql para receber os binds\n $stmt = $pdo->prepare($sql);\n //Executa o SQL\n $stmt->execute();\n //Guarda em um array todos os dados da tabela\n $estoqueprodutos = $stmt->fetchAll(PDO::FETCH_ASSOC);\n //Retorna o array com todos os dados da tabela\n return $estoqueprodutos;\n \n } catch (PDOException $ex) {\n echo \"\".$ex;\n \n }\n }","title":""},{"docid":"81649883baf90b04804d3d65cada663e","score":"0.5914871","text":"static public function orden_corte_unique_activas(){\n $sql = \" SELECT DISTINCT OC.orden_corte, OC.fecha_de_corte FROM \" . static::$table_name . \" as OC\";\n $sql .= \" LEFT JOIN enviados_a_servicio as AOC \";\n $sql .= \" ON OC.orden_corte = AOC.orden_corte AND OC.sku = AOC.sku WHERE AOC.sku IS NULL \";\n $sql .= \" ORDER BY OC.fecha_de_corte DESC\";\n //ChromePhp::log($sql);\n return static::find_by_sql($sql);\n }","title":""},{"docid":"de51056193cd7d8ca3d351d521d92a52","score":"0.59147507","text":"function dame_todos_ejercicios($activos)\n {\n $this->load->model('tpoadminv1/Generales_model');\n\n if($activos == true){\n $this->db->where('active', '1');\n }\n $query = $this->db->get('cat_ejercicios');\n \n if($query->num_rows() > 0)\n {\n $array_items = [];\n $cont = 0;\n foreach ($query->result_array() as $row) \n {\n \n $array_items[$cont]['id_ejercicio'] = $row['id_ejercicio'];\n $array_items[$cont]['ejercicio'] = $row['ejercicio'];\n $cont++;\n }\n return $array_items;\n }\n }","title":""},{"docid":"a4ed52e8904a3d0f50b1011ba65af675","score":"0.5905028","text":"public function list()\n {\n return \\App\\Compromisso::all();\n }","title":""},{"docid":"d6a307827057c44472348d0667f93381","score":"0.5889122","text":"public static function getAllTblsistemapagoAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblsistemapago WHERE tblsistemapago_activado = ?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_STR);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"2aa410f64fcd7f4933219865a9f267f4","score":"0.5884585","text":"public static function findAllActive()\n {\n return static::find()->active()->all();\n }","title":""},{"docid":"29a946d8d9caf7314f669e8f06bdd4fd","score":"0.5881597","text":"public function readAll()\n {\n // Se hace la consullta para llevar a cabo la acción\n $sql = 'SELECT id_compra,fecha_compra, nombre_cliente,estado_compra\n FROM compra INNER JOIN clientes USING(id_cliente)\n ORDER BY id_compra';\n $params = null;\n return Database::getRows($sql, $params);\n }","title":""},{"docid":"dd557fcf5403ed98c83a5b7779c858f9","score":"0.587411","text":"public function PesquisarTodos()\n {\n /* Executa a funçao PesquisarTodos contida na classe DAO e retorna\n seu resultado*/\n return $this->agendaDAO->PesquisarTodos();\n }","title":""},{"docid":"73f3a595a211fe3f1a474799ccad2b1d","score":"0.5870232","text":"public function getAll() {\n return (Program::whereIn('status', [1])->orderBy('name', 'asc')->get());\n }","title":""},{"docid":"cdce99550e79c05434900c038d9cf5fe","score":"0.586174","text":"public function getConsultores() {\n\t $consultores = CaoUsuario::join('permissao_sistema', 'cao_usuario.co_usuario', '=', 'permissao_sistema.co_usuario')\n ->select('cao_usuario.co_usuario', 'cao_usuario.no_usuario', 'cao_usuario.ds_senha',\n 'cao_usuario.co_usuario_autorizacao', 'cao_usuario.nu_matricula',\n 'cao_usuario.dt_nascimento')\n ->where('permissao_sistema.co_sistema', '=', 1)\n ->where('permissao_sistema.in_ativo', '=', 'S')\n ->whereIn('permissao_sistema.co_tipo_usuario', [0,1,2])->get();\n return $consultores;\n }","title":""},{"docid":"9b021d2d296370cffb6bddc8fc4cc6db","score":"0.5861466","text":"function findAll(){\r\n $this->db->where('approve', 0);\r\n return $this->db->get('requests')->result_array();\r\n }","title":""},{"docid":"1036f537c0bebfae0bd48782363a00ed","score":"0.58454764","text":"public function getConTalento()\n {\n $result=$this->adapter->query(\"select *, nombre as nomFiltro \n from t_conceptos order by nombre\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }","title":""},{"docid":"5d1ab649f35d85c6f38867fd76869320","score":"0.58417785","text":"public function executeList()\n {\n if($this->getRequestParameter('actividad')) {\n $c = new Criteria();\n $c->add(FuenteActividadPeer::ACTIVIDAD_ID, $this->getRequestParameter('actividad'));\n\n $this->fuente_actividads = FuenteActividadPeer::doSelect($c);\n\n // mostrar la lista de actividades correspondiente al proyecto y mes\n } elseif (($this->getRequestParameter('proyecto')) && ($this->getRequestParameter('mes'))) {\n $c = new Criteria();\n $c->add(ActividadPeer::PROYECTO_ID, $this->getRequestParameter('proyecto'));\n $c->add(ActividadPeer::MES_INICIO_EJECUCION, $this->getRequestParameter('mes'));\n\n $this->actividads = ActividadPeer::doSelect($c);\n\n $this->setTemplate('ListActividades');\n // mostrar formulario de busqueda de actividad\n } else {\n $this->setTemplate('BuscarActividad');\n\n }\n }","title":""},{"docid":"8a136ad935594093645e9045af2d008e","score":"0.583059","text":"public function getTodas()\n {\n return $this->registros;\n }","title":""},{"docid":"88ad945ce174fcd8da3be03e53d8d1c8","score":"0.58304197","text":"public function executeList()\n {\n if($this->getRequestParameter('actividad')) {\n $c = new Criteria();\n $c->add(LocalidadActividadPeer::ACTIVIDAD_ID, $this->getRequestParameter('actividad'));\n\n $this->localidad_actividads = LocalidadActividadPeer::doSelect($c);\n\n // mostrar la lista de actividades correspondiente al proyecto y mes\n } elseif (($this->getRequestParameter('proyecto')) && ($this->getRequestParameter('mes'))) {\n $c = new Criteria();\n $c->add(ActividadPeer::PROYECTO_ID, $this->getRequestParameter('proyecto'));\n $c->add(ActividadPeer::MES_INICIO_EJECUCION, $this->getRequestParameter('mes'));\n\n $this->actividads = ActividadPeer::doSelect($c);\n\n $this->setTemplate('ListActividades');\n // mostrar formulario de busqueda de actividad\n } else {\n $this->setTemplate('BuscarActividad');\n }\n }","title":""},{"docid":"d0c46f65cc0d1b6979ce001e89be9461","score":"0.58266246","text":"public function getActivo(){\n\t\treturn $this->activo;\n\t}","title":""},{"docid":"bf8d8d919f65a959f3eb89b0a18d93c2","score":"0.58211553","text":"public static function getAllTblcoloniaAct(){\n\t \n\t $activado=1;\n\t\t$consulta = \"SELECT * FROM tblcolonia WHERE tblcolonia_activado=?\";\n\t\t\n\t\ttry{\n\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\n\t\t\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \n\t\t} catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}","title":""},{"docid":"18c3ba31791e534b37d2b1996dacded3","score":"0.5818013","text":"public function getRequisitosLegales()\n {\n $result=$this->adapter->query(\"select a.id, d.id as idCar, b.nombre as jerarquia, a.numero, a.ano, a.titulo, a.articulo,\n a.descripcion, d.nombre\n from t_requisitos_legales a \n inner join t_gerarquias_req b on b.id = a.idGquia\n inner join t_requisitos_legales_r c on c.idReqLeg = a.id \n inner join t_cargos d on d.id = c.idCar\n order by b.nombre\n \",Adapter::QUERY_MODE_EXECUTE);\n $datos = $result->toArray();\n return $datos;\n }","title":""},{"docid":"3f4b18a138b75af1ffe7d9c9f7491cf7","score":"0.5812483","text":"function getAllConteudo() {\r\n /* /// Status do Conteudo\r\n * 0 - pendente\r\n * 1 - publicado\r\n * 2 - rascunho\r\n * 3 - backup\r\n */\r\n\r\n $this->defaultDB->where('status', '1');\r\n $this->defaultDB->order_by(\"titulo ASC\");\r\n return $this->defaultDB->get(self::TABLE);\r\n }","title":""},{"docid":"d07ace32def4c0dcd39e0b2925c0049b","score":"0.5812335","text":"public function riesgoAction()\n {\n\n $user = $this->getUser(); //Devuelve el usario que esta en sesion\n $em = $this->getDoctrine()->getManager();\n\n\n $activos = $em->getRepository('ActivoBundle:activo')->findBy(array('empresaId' => $user->getEmpresa())); //Filtramos los activos en base al empresa Id\n\n return $this->render('riesgo/indexActivo.html.twig', array(\n 'activos' => $activos,\n ));\n // return new Response('Holi');\n }","title":""},{"docid":"984096b2fa2c0de3192efee83a0cb8a3","score":"0.5809296","text":"public function iniciarComprobantes(){\n\n\t\t$item = null;\n\t\t$valor = null;\n\n\t\t$respuesta = ControladorComprobantes::ctrIniciarComprobantes($item, $valor);\n\n\t\treturn $respuesta;\n\n\t}","title":""},{"docid":"d895fd31b7f093e9a193cfa4a49045e5","score":"0.58067364","text":"public function getResponsablesActividades($id)\n {\n $result=$this->adapter->query(\"select d.id , d.nombre, d.apellido \n from t_riesgos a \n inner join t_riesgos_a b on a.id = b.idRies\n inner join t_riesgos_a_e c on c.idIries = b.id\n inner join a_empleados d on d.id = c.idEmp\n where b.id=\n \".$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n \n }","title":""},{"docid":"11bcb079a912972befef7e01423a6759","score":"0.5805376","text":"public function consultarContratos()\n {\n $resultado = [];\n $sql = \"SELECT `idContrato`,`TipoContrato`,`contratista`,`contratistaRazonSocial`,`objetoContrato`,`rubro`,`fechaSuscripcion`, `fechaInicio`,`fechaFin`,`valor`,`valorAnticipo`,`supervisor`,`supervisorRazonSocial`,`numeroCdp`,`valorCdp`, `fechaCdp` FROM `contrato`\";\n $result = $this->con->query($sql);\n if ($result) {\n while ($row = $result->fetch_array(MYSQL_ASSOC)) {\n $resultado[] = $row;\n }\n }\n $result->close();\n $this->con->close();\n return $resultado;\n }","title":""},{"docid":"be11577518b310e684d59a5ab3c10ec5","score":"0.5803547","text":"public function index()\n {\n $requisicoes = Requisicao::where('user_id', Auth::user()->id)->get();\n return view('requisicao.index', compact('requisicoes'));\n }","title":""},{"docid":"80a3982eb2bae99922b84805483cc7a2","score":"0.5801288","text":"public function getEmpInactivos($con)\n {\n $result=$this->adapter->query(\"select * \n from a_empleados \n where estado=1 \".$con.\" order by nombre,apellido\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }","title":""},{"docid":"0422e13fff2763d9f677aad87f062d0d","score":"0.5799702","text":"public function getAllCriteres(){\n $c = Base::getConnection();\n $query = $c->prepare(\"select * from critere\");\n $query->execute();\n\t\treturn $query->fetchAll();\n }","title":""},{"docid":"9d1e60ff7a8d1ac8f996bc1ea37d02fc","score":"0.579546","text":"public function index()\n {\n return UnidadEjecutora::latest()->get();\n }","title":""},{"docid":"ddada1a2aaac9ce447328edc0108a5bb","score":"0.57930565","text":"public function index()\n {\n return DB::table('requisito_procedimiento as rp')\n ->join('requisitos as re','rp.requisito_id','=','re.id')\n ->join('procedimientos as pr','rp.procedimiento_id','=','pr.id')\n ->select(\n 'rc.id','re.descripcion as requisito',\n 'pr.descripcion as procedimiento',\n 'rp.requisito_id','rp.procedimiento_id'\n )->latest()->paginate(5);\n }","title":""},{"docid":"a513f8ad97e559a827478bc0af823c36","score":"0.5790346","text":"public function gets() {\r\n $query = $this->db->query(\"SELECT *\r\n FROM\r\n (articulos a\r\n LEFT JOIN\r\n planos pl\r\n ON \r\n a.idplano = pl.idplano)\r\n INNER JOIN\r\n productos p\r\n ON\r\n a.idproducto = p.idproducto AND\r\n a.activo = '1'\r\n ORDER BY\r\n a.articulo\");\r\n return $query->result_array();\r\n }","title":""},{"docid":"e4e8d5782087d96afa6ff959b884de94","score":"0.5786473","text":"public function getCargos()\n {\n $result=$this->adapter->query(\"select * , nombre as nomFiltro \n from t_cargos\n order by nombre\",Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }","title":""}],"string":"[\n {\n \"docid\": \"bcd45e9a331148b173bdb52aeaa36c80\",\n \"score\": \"0.72356415\",\n \"text\": \"public function ListarInactivos()\\n\\t{\\n\\t\\ttry\\n\\t\\t{\\n\\t\\t\\t$stm = $this->pdo->prepare(\\\"SELECT * FROM usuarios, tipousuario WHERE usuarios.idTipo=tipousuario.idTipo AND activo=0\\\");\\n\\t\\t\\t$stm->execute();\\n\\t\\t\\treturn $stm->fetchAll(PDO::FETCH_OBJ);\\n\\t\\t}\\n\\t\\tcatch(Exception $e)\\n\\t\\t{\\n\\t\\t\\tdie($e->getMessage());\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7942acb528530ee5e719ff2c86829c4b\",\n \"score\": \"0.7191359\",\n \"text\": \"function get_all_requisito()\\n {\\n $requisito = $this->db->query(\\\"\\n SELECT\\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\\n FROM\\n `requisito` r\\n left join beca b on r.beca_id = b.beca_id\\n left join estado e on r.estado_id = e.estado_id\\n ORDER BY `requisito_nombre` ASC\\n \\\")->result_array();\\n \\n return $requisito;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e0641c4410fee92fec3496b7b9831a0\",\n \"score\": \"0.7186182\",\n \"text\": \"public static function getAll(){\\n if(!isset($_SESSION)) session_start();\\n $actividades = new Actividad();\\n return $actividades->getAllActividades();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a9a48437bef3b432be54e573dc13825\",\n \"score\": \"0.6943439\",\n \"text\": \"static function getAllActive() {\\n\\n\\t\\treturn TipoFamilia::All()->where('activo',1);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94fb5dac6a17772f2ddb0f4dd0fc5f32\",\n \"score\": \"0.68217033\",\n \"text\": \"public function get_all() {\\n print_r($_SESSION);\\n $this->db->select('activos.id, activos.fecha_compra, activos.monto_compra_sin_impuestos, activos.tipo, activos.descripcion');\\n $this->db->from('activos');\\n $this->db->join('personas', 'personas.id = persona_id');\\n $this->db->where('personas.id', $_SESSION['persona_id']);\\n $this->db->where('activos.status', 1);\\n $result = $this->db->get();\\n return $result->result_array();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9671e43d075eac3ff1745d84dd799b1c\",\n \"score\": \"0.6639607\",\n \"text\": \"public function ConsultarActivosSimple(){\\n $sql = \\\"SELECT idactivo, activo, AC.detalle AS categoria FROM activo A LEFT JOIN activo_categoria AC ON A.idactivo_categoria = AC.idactivo_categoria\\\";\\n $query = $this->conexion->query($sql);\\n return $query;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c160244c6f457aed1646bb062c8b2a3\",\n \"score\": \"0.65792596\",\n \"text\": \"public static function getAllTblnivelaccesoAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblniveleacceso WHERE tblniveleacceso_activado = ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"822aefa4e064e3823eab0d8d13903857\",\n \"score\": \"0.6567682\",\n \"text\": \"public static function getAllTblusuarioproveedorAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblusuarioproveedor WHERE tblusuarioproveedor_activado = ? \\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8afd77f1d84c202f8432da664276113f\",\n \"score\": \"0.6489286\",\n \"text\": \"public function getActividad()\\n\\t\\t{\\n\\t\\t\\t$query = \\\"select * from act_economica\\\";\\n\\t\\t\\t$this->conexionDAO->Abrir();\\n\\t\\t\\t$resultado = $this->conexionDAO->select($query);\\n\\t\\t\\t$actividades = array();\\n\\t\\t\\twhile($row = $resultado->fetch_array()) \\n\\t\\t\\t{\\n\\t\\t\\t\\t$actividad = new Actividad();\\n\\t\\t\\t\\t$actividad->id = $row[\\\"ID\\\"];\\n\\t\\t\\t\\t$actividad->detalle = $row[\\\"DETALLE\\\"];\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$actividades[] = $actividad;\\n\\t\\t\\t} \\n\\t\\t\\t$this->conexionDAO->Cerrar();\\n\\t\\t\\treturn $actividades;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"871ae64948ceae2b1338451b0709daea\",\n \"score\": \"0.64850575\",\n \"text\": \"public function serviciosActivos(){\\n return Servicio::where('estado', '=', 'activo')->orderBy('visitas','desc')->get();\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fefdae71073e4c6a584bd911520fab5\",\n \"score\": \"0.6432139\",\n \"text\": \"public static function getAllTbleventoAct(){\\n\\t \\n\\t $activado = 1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblevento WHERE tblevento_activado = ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e76f42d5cb569c8f019a86f751d83f0b\",\n \"score\": \"0.64252365\",\n \"text\": \"public static function getAllTblproveedoraAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblproveedor WHERE tblproveedor_activado = ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f171a3cf6b9d8082e870c3385a3f1de3\",\n \"score\": \"0.6414372\",\n \"text\": \"public function ObtPosicionActivos()\\n\\t{\\n\\t\\t$sql = \\\"SELECT * FROM posicion WHERE estatus = 1\\\";\\n\\t\\t$resp = $this->db->consulta($sql);\\n\\t\\t$cont = $this->db->num_rows($resp);\\n\\n\\n\\n\\t\\t$array=array();\\n\\t\\t$contador=0;\\n\\n\\t\\tif ($cont>0) {\\n\\n\\t\\t\\t\\n\\t\\t\\twhile ($objeto=$this->db->fetch_object($resp)) {\\n\\n\\t\\t\\t\\t$array[$contador]=$objeto;\\n\\t\\t\\t\\t$contador++;\\n\\t\\t\\t} \\n\\t\\t}\\n\\t\\treturn $array;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b34d12928e94098bf7a5a2012b50eae0\",\n \"score\": \"0.64113796\",\n \"text\": \"public function consultarActividadesModel(){\\n\\t\\t$stmt = Conexion::conectar()->prepare(\\\"SELECT * FROM actividad WHERE eliminado=0\\\");\\n\\t\\t$stmt->execute();\\n\\t\\treturn $stmt->fetchAll();\\n\\t\\t$stmt->close();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f2e68d05974f4652fc7d34ad19f10df\",\n \"score\": \"0.6405063\",\n \"text\": \"public static function getAllTblproductcotizadorAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblproductcotizador WHERE tblproductcotizador_activado = ? \\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1790800bf7fc2cd21c843440a80a8204\",\n \"score\": \"0.64002305\",\n \"text\": \"public static function getAllTblproductoAct(){\\n \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblproducto WHERE tblproducto_activado = ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe3d2264463085477656fcb8c157c9f4\",\n \"score\": \"0.63770044\",\n \"text\": \"public function findUsariosActividad()\\n {\\n $sql = \\\"SELECT * FROM actividad INNER JOIN tipoActividad ON actividad.tipoActividad = tipoactividad.idTipoActividad INNER JOIN abuelito ON actividad.abuelito_idAbuelito = abuelito.idAbuelito INNER JOIN usuarios on actividad.usuario_idUsuario = usuarios.idUsuario WHERE idUsuario\\\";\\n $finded = $this->db->query($sql);\\n return $finded->fetch_object();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdce213598cb414397078e9f86a27cbc\",\n \"score\": \"0.63707\",\n \"text\": \"public function getListActivar()\\n {\\n\\n $sql = \\\"SELECT cod_distribuidor\\n FROM distribuidor\\n WHERE distribuidor.cod_estado = 2\\n \\\";\\n $list = array();\\n if (!$resultado = pg_query($this->conexion, $sql)) die();\\n while ($row = pg_fetch_array($resultado)) {\\n $item = new Distribuidor();\\n $item->setCod_distribuidor($row[0]);\\n \\n array_push($list, $item);\\n\\n }\\n return $list;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb3efc93998c70a03f16d8d372d0ec8e\",\n \"score\": \"0.6350027\",\n \"text\": \"public function All()\\n {\\n return prueba::get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5b05883a4a7c5a8603c91d9047ccc40\",\n \"score\": \"0.63434\",\n \"text\": \"public function getComentarios(){\\n\\t\\t$sql = \\\"SELECT c.Comentario, cli.Usuario FROM comentarios c, cliente cli, producto p where c.IdCliente=cli.IdCliente and p.IdProducto=c.IdProducto and c.Estado=1\\\";\\n\\t\\t$params = array(null);\\n\\t\\treturn Database::getRows($sql, $params);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0138d8efd99c97846a503da08c2aac0b\",\n \"score\": \"0.6341955\",\n \"text\": \"public static function getAllTblproductcomplemAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblproductcomplem WHERE tblproductcomplem_activado= ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n \\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05439ff977893b992b8849b80e490513\",\n \"score\": \"0.63194066\",\n \"text\": \"public static function getAllTblcupondescuentoAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblcupondescuento WHERE tblcupondescuento_activado = ? \\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ee7c186f9344d1619da865114068f19\",\n \"score\": \"0.6309338\",\n \"text\": \"public function consultarActividadModel(){\\n\\t\\t$stmt = Conexion::conectar()->prepare(\\\"SELECT * FROM actividad WHERE eliminado=0\\\");\\n\\t\\t$stmt->execute();\\n\\t\\treturn $stmt->fetchAll();\\n\\t\\t$stmt->close();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed524339b608ded809dac9530fa88336\",\n \"score\": \"0.63085026\",\n \"text\": \"function obtenerNivelesDeCriticidad(){\\n $resultados=$this->as_array()->get_all();\\n return $resultados;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"689045280e69d1710a57b9b4d71fddba\",\n \"score\": \"0.6305962\",\n \"text\": \"public function consultarSesionActivaModel(){\\n\\t\\t$stmt = Conexion::conectar()->prepare(\\\"SELECT * FROM sesion inner join alumno on sesion.id_alumno = alumno.id_alumno inner join actividad on sesion.id_actividad = actividad.id_actividad inner join maestro on sesion.id_maestro = maestro.id_maestro\\\");\\n\\t\\t$stmt->execute();\\n\\t\\treturn $stmt->fetchAll();\\n\\t\\t$stmt->close();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0630cde8258b5779acb95830d3ab04c1\",\n \"score\": \"0.629903\",\n \"text\": \"public function getAll(){\\n return $this->acteurArray;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5424f5a626a2627eeb1755a659111cd1\",\n \"score\": \"0.6297407\",\n \"text\": \"public function getListeAccompagnateurs() {\\n\\t\\t$sql = \\\"SELECT * FROM \\\" . P . \\\"accompagnateur\\\";\\n\\n\\t\\t$this->result = $this->executeRequete($sql); // Requête simple\\n\\n\\t\\treturn $this->result->fetchall(PDO::FETCH_ASSOC);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89870fe4ab36ba2cab1bd21d39c53005\",\n \"score\": \"0.62823594\",\n \"text\": \"public function obtenerCampaniasActivas( $cliente = \\\"\\\" ){\\r\\n try{\\r\\n\\r\\n //// chequeo de parametros\\r\\n if( strcmp($cliente, \\\"\\\") == 0 ){\\r\\n throw new Exception(__CLASS__ . \\\"::\\\" . __METHOD__ . \\\" - line \\\" . __LINE__ . \\\" - :: \\\" . Mensajes::getMensaje( '001', array('cliente') ), 1);\\r\\n }\\r\\n // obtengo las campanias para un cliente determinado\\r\\n $consulta = ' SELECT * '.\\r\\n ' FROM campania '.\\r\\n ' WHERE activa = 1 AND '.\\r\\n ' fecha_fin_campania >= NOW() AND '.\\r\\n ' id_cliente = ? ';\\r\\n\\r\\n $rows\\t = $this->basedatos->ExecuteQuery($consulta, array( $cliente ));\\r\\n\\r\\n $salida = array();\\r\\n foreach ( $rows as $k => $v){\\r\\n $salida[$v->id] = $v;\\r\\n }\\r\\n return $salida;\\r\\n }\\r\\n catch(Exception $e ) {\\r\\n\\t\\t\\t $this->error = 1;\\r\\n throw $e;\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f75e46233aadd88794c953eb673559d1\",\n \"score\": \"0.62740034\",\n \"text\": \"public function listarAceitas(){\\n $pdo = Database::conexao();\\n $result = $pdo->query(\\\"SELECT r.*, u.idUsuario, u.nomeUsuario,d.nomeDisciplina, d.idDisciplina, c.idCurso, c.nomeCurso FROM tb_reserva r, tb_usuario u, tb_disciplina d, tb_curso c\\n WHERE statusReserva='Aceita' AND u.idUsuario=r.idUsuarioFk and d.idDisciplina=r.idDisciplinaFk AND c.idCurso= d.idCursoFk\\\");\\n $linhas = $result->fetchAll(\\\\PDO::FETCH_ASSOC);\\n return $linhas;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b41cdf5c453688feb1aabc79f721be30\",\n \"score\": \"0.625947\",\n \"text\": \"function get_all_requisito_beca($beca_id)\\n {\\n $requisito = $this->db->query(\\\"\\n SELECT\\n r.*, b.beca_nombre, e.estado_descripcion, e.estado_color\\n FROM\\n `requisito` r\\n left join beca b on r.beca_id = b.beca_id\\n left join estado e on r.estado_id = e.estado_id\\n WHERE\\n r.beca_id = 0 or r.beca_id = $beca_id\\n ORDER BY `requisito_nombre` ASC\\n \\\")->result_array();\\n \\n return $requisito;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54800442b305442bc75bc797d5200d38\",\n \"score\": \"0.6227341\",\n \"text\": \"public function obtener_trabajadores_activados(){\\n try {\\n $sql= \\\"SELECT * FROM `trabajadores` t1 INNER JOIN \\\".Cocineros::TABLA[0].\\\" t2 ON t1.dni = t2.dni WHERE t2.estado=1\\\";\\n $resultado=$this->conexion->query($sql);\\n //$salida = $resultado->fetch_object();\\n\\n $objetos=array();\\n\\n while ($fila=$resultado->fetch_object()){\\n $objetos[]=$fila;\\n }\\n\\n return $objetos;\\n \\n } catch (Exception $ex) {\\n $salida = 'error '.$ex;\\n return $salida;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"417864ed8dbfe5536a0b683d11814b66\",\n \"score\": \"0.6226251\",\n \"text\": \"public function listar() {\\n $sql = \\\"SELECT nombre,descripcion,estado,id_fabricante from marca where estado='disponible'\\\";\\n $this->objCon->Execute($sql);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e5af48d0fe813dc77e165943204654d\",\n \"score\": \"0.621864\",\n \"text\": \"public function Listar()\\n\\t{\\n\\t\\ttry\\n\\t\\t{\\n\\t\\t\\t$stm = $this->pdo->prepare(\\\"SELECT * FROM usuarios, tipousuario WHERE usuarios.idTipo=tipousuario.idTipo AND activo=1\\\");\\n\\t\\t\\t$stm->execute();\\n\\t\\t\\treturn $stm->fetchAll(PDO::FETCH_OBJ);\\n\\t\\t}\\n\\t\\tcatch(Exception $e)\\n\\t\\t{\\n\\t\\t\\tdie($e->getMessage());\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da4aec081eda41f35539d746d7844600\",\n \"score\": \"0.6215112\",\n \"text\": \"public function findAllActives(){\\n return $this->createQueryBuilder('c')\\n ->andWhere('c.isActive = :active')\\n ->setParameter('active', true)\\n ->getQuery()\\n ->execute();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"241e96102d7567cc8278d7fd1e7cc72a\",\n \"score\": \"0.6202064\",\n \"text\": \"public function getBuscarRegistros()\\n {\\n return $this->repository->reserva->getTodasReservas();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1232fdccad2ef4b1bdd04066299ab098\",\n \"score\": \"0.6200199\",\n \"text\": \"public function queryAll(){\\n\\t\\t$sql = 'SELECT * FROM comentarios';\\n\\t\\t$sqlQuery = new SqlQuery($sql);\\n\\t\\treturn $this->getList($sqlQuery);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14d9e0ea8dccd3eb15798c479b11ec25\",\n \"score\": \"0.6184122\",\n \"text\": \"public function obtenerClientesActivos(){\\r\\n try{\\r\\n $consulta = ' SELECT * '.\\r\\n ' FROM cliente '.\\r\\n ' WHERE activo = 1 ';\\r\\n\\r\\n }\\r\\n catch(Exception $e ) {\\r\\n\\t\\t\\t $this->error = 1;\\r\\n throw $e;\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f364bdbe268993751d981754958152e\",\n \"score\": \"0.6168495\",\n \"text\": \"public static function getAll(){\\n if(Auth::check()){\\n return self::where('estatus', true)\\n ->where('id_inversionista', Auth::user()->inversionista->id)\\n ->get()\\n ->toArray();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db2b1d152a2943eb8f80d56283f710e8\",\n \"score\": \"0.61523956\",\n \"text\": \"public function queryAll(){\\r\\n\\t\\t$sql = 'SELECT * FROM caja_pagoefectivo';\\r\\n\\t\\t$sqlQuery = new SqlQuery($sql);\\r\\n\\t\\treturn $this->getList($sqlQuery);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcfdaf81aac8e688a9496787dab52c3c\",\n \"score\": \"0.61502534\",\n \"text\": \"public function all()\\n {\\n return $this->pdo->query(\\\"SELECT * FROM produits WHERE 1\\\")->fetchAll(PDO::FETCH_ASSOC);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"793e25b58ff975ad798d51ac25064e07\",\n \"score\": \"0.6114401\",\n \"text\": \"public static function getAllTblpaisAct(){\\n\\t \\n\\t\\t$activado = 1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblpais WHERE tblpais_activado = ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos de todos los registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5022be2a264f86e83661ab4f4f797f22\",\n \"score\": \"0.6112469\",\n \"text\": \"public function listaDeEmpleadoActivos()\\n {\\n $sqlListaEmpleadosActivos = \\\"\\n SELECT idEmpleado, ci, CONCAT_WS(' ',primerNombre,segundoNombre,apellidoPaterno,\\n apellidoMaterno)as nombreEmpleado,celular, estado\\n FROM empleado\\n WHERE estado = 1\\n ORDER BY primerNombre,segundoNombre,apellidoPaterno,apellidoMaterno;\\\";\\n $cmd = $this->conexion->prepare($sqlListaEmpleadosActivos);\\n $cmd->execute();\\n $listaDeEmpleadosConsulta = $cmd->fetchAll();\\n return $listaDeEmpleadosConsulta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d8f45e95261a062c72645353bf36185\",\n \"score\": \"0.61037225\",\n \"text\": \"public function obtActividades(Request $request)\\n\\t{\\n\\t\\ttry {\\n\\t\\t\\t$nombre_sp = 'FOA_obtActividadesXFolio';\\n\\t\\t\\t$arrayParametros = array();\\n\\n\\t\\t\\t// Obtener los parametros del request\\n\\t\\t\\t$arrayParametros[0] = $request->has(\\\"id\\\") ? $request->input(\\\"id\\\") : 0; // id del folio\\n\\t\\t\\t//$arrayParametros[1] = $request->has(\\\"usuario_id\\\") ? $request->input(\\\"usuario_id\\\") : 1;\\n\\n\\t\\t\\t// Ejecutar SP Base de datos\\n\\t\\t\\t$responseSP = DB::select(\\\"CALL psm.\\\".$nombre_sp.\\\"(?);\\\", [$arrayParametros[0]]);\\n\\n\\t\\t\\treturn $this->formatearRespuesta($responseSP, 200, 1);\\n\\t\\t} catch (\\\\Throwable $th) {\\n\\t\\t\\tthrow $th;\\n\\t\\t\\treturn $this->formatearRespuesta([], 500, 2, 0, \\\"Error al procesar la solicitud\\\");\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fdc7d3a3dc0750d6055f166c69f8da7\",\n \"score\": \"0.60967994\",\n \"text\": \"public function getEmpActivos($con)\\n {\\n $result=$this->adapter->query(\\\"select * \\n from a_empleados \\n where estado=0 \\\".$con.\\\" order by nombre,apellido\\\" ,Adapter::QUERY_MODE_EXECUTE);\\n $datos=$result->toArray();\\n return $datos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"389305259271ec7c2a4a9b2a31703c38\",\n \"score\": \"0.60397106\",\n \"text\": \"public function queryAll(){\\n\\t\\t$sql = 'SELECT * FROM auditoriaingreso';\\n\\t\\t$sqlQuery = new SqlQuery($sql);\\n\\t\\treturn $this->getList($sqlQuery);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"389306afd996d4e8e17c14e28d9f600a\",\n \"score\": \"0.6036305\",\n \"text\": \"public static function getAllTblmoduloventabpAct(){\\n\\t \\n\\t $activado = 1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblmoduloventabp WHERE tblmoduloventabp_activado = ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5de713cdea6b16f17415134855223ab5\",\n \"score\": \"0.60277\",\n \"text\": \"public function queryAll(){\\r\\n\\t\\t$sql = 'SELECT * FROM complejos_apartamentos';\\r\\n\\t\\t$sqlQuery = new SqlQuery($sql);\\r\\n\\t\\treturn $this->getList($sqlQuery);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b5b9ec299f55db90fb76b79cc9d8844\",\n \"score\": \"0.6008884\",\n \"text\": \"function getActores($criterio, $orden) {\\r\\n $actores = null;\\r\\n $sql = \\\"select * from documento_actor where \\\" . $criterio . \\\" order by \\\" . $orden;\\r\\n //echo ($sql.\\\"
    \\\");\\r\\n $r = $this->db->ejecutarConsulta($sql);\\r\\n if ($r) {\\r\\n $cont = 0;\\r\\n while ($w = mysql_fetch_array($r)) {\\r\\n $actores[$cont]['id'] = $w['doa_id'];\\r\\n $actores[$cont]['nombre'] = $w['doa_nombre'];\\r\\n $actores[$cont]['sigla'] = $w['doa_sigla'];\\r\\n $cont++;\\r\\n }\\r\\n }\\r\\n return $actores;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a156a17f3e0d8ad66ed59e29d9700007\",\n \"score\": \"0.60005575\",\n \"text\": \"function getActivo() {\\n return $this -> activo;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"329c7a8813bfdb62c7c95c444bdc1251\",\n \"score\": \"0.5992267\",\n \"text\": \"public function listar()\\n\\t{\\n\\t\\t$sql=\\\"SELECT * FROM permiso\\\";\\n\\t\\treturn ejecutarConsulta($sql);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87ef75afc06a1e94326cf088f4723ad5\",\n \"score\": \"0.5990898\",\n \"text\": \"public function revRequisitos()\\n {\\n return $this->hasMany('App\\\\Models\\\\RevRequisito','cia_id','id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3cea005f17d9f4223a96d96ecf54de57\",\n \"score\": \"0.5989824\",\n \"text\": \"public function index()\\n {\\n return TipoCuenta::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb74fb5dd9111cde8a7220e7e1c7766c\",\n \"score\": \"0.59767103\",\n \"text\": \"function consultar(){\\n\\t\\t//entonces listo los alumnos\\n\\t\\tif(!isset($_REQUEST['accion'])){\\n\\t\\t\\t$curso_array = $this->modelo->cursoTodo();\\t\\n\\t\\t\\t\\t//incluir la vista para listar\\n\\t\\t\\t\\tinclude('vista/cursoTabla.php');\\n\\t\\t\\t\\t$vista = new cursoTabla();\\n\\t\\t\\t\\t$vista -> mostrar_tabla($curso_array);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"befc82140a40bac695ec87707e7505bc\",\n \"score\": \"0.5976573\",\n \"text\": \"public function listar(){\\n\\t\\t$sql=\\\"SELECT * FROM permiso\\\";\\n\\t\\treturn ejecutarConsulta($sql);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"246729ae17400680995748fb81457942\",\n \"score\": \"0.5971648\",\n \"text\": \"public function readAll()\\n {\\n $sql = 'SELECT id_compra, direccion_env, impuestos, total, precio_env, nombres_cliente, estado From compra\\n INNER JOIN clientes USING (id_cliente)\\n INNER JOIN Estado_de_Compra USING (id_estado_de_comp)\\n ORDER BY estado';\\n $params = null;\\n return Database::getRows($sql, $params);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a01694d52fbee18689eeb0c46f764b2\",\n \"score\": \"0.5967634\",\n \"text\": \"public function usuariosActivos()\\n\\t{\\n\\t\\t$busqueda = trim(\\\\Input::get('busqueda'));\\n\\t\\t$estado = 1;\\n\\n\\t\\t$textobuscado=\\\"\\\";\\n\\n\\t\\tif ($busqueda == \\\"\\\")\\n\\t\\t{\\n\\t\\t\\t// si el input de busqueda está vacio no es necesario realizar acciones \\n\\t\\t}\\n\\t\\telse if ($busqueda != \\\"\\\")\\n\\t\\t{\\n\\t\\t\\t$textobuscado = $busqueda;\\n\\t\\t\\t//$usuarios = $this->usuarioRepo->busquedaUsuariosPorNombre($busqueda, $estado);\\n\\t\\t\\t\\n\\t\\t\\t$cuentas = $this->cuentaRepo->busquedaCuentasPorCorreoEstado($busqueda, $estado);\\n\\n\\t\\t\\t# sizeof devuelve el tamaño del argumento recibido\\n\\t\\t\\tif (sizeof($cuentas) == 0)\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn \\\\Redirect::route('lista.usuarios.activos')->with('status_nohaycoincidencias', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'No hay resultados de búsqueda \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t para '.$textobuscado);\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\treturn \\\\View::make('modulos.super.listausuariosactivos', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\tcompact('cuentas','textobuscado', 'rolenvista')\\n\\t\\t\\t\\t\\t\\t);\\n\\t\\t}\\n\\n\\t\\t$cuentas = $this->cuentaRepo->cuentasActivas();\\n\\n\\t\\treturn \\\\View::make('modulos.super.listausuariosactivos', \\n\\t\\t\\t\\t\\t\\t\\tcompact('cuentas','textobuscado', 'rolenvista')\\n\\t\\t\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d97199736ecfe7d341850fc5129f27e\",\n \"score\": \"0.5964048\",\n \"text\": \"public function obterTodasCompras(){\\n $compra = new CompraDAO();\\n return $compra->getAll();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a8c80cd1be7dda550341862469e07ef\",\n \"score\": \"0.5954499\",\n \"text\": \"public function getOrdenesRecogidas(){\\n $this -> Conexion -> abrir();\\n $this -> Conexion -> ejecutar($this -> CitaDAO -> getOrdenesRecogidas());\\n $res = $this -> Conexion -> extraer();\\n $this -> Conexion -> cerrar();\\n return $res[0];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ced293e3a9543925e6e72dfeeef44ac\",\n \"score\": \"0.5949738\",\n \"text\": \"public function listar()\\n\\t{\\n\\t\\t$sql = \\\"SELECT * FROM permiso\\\";\\n\\t\\treturn ejecutarConsulta($sql);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b4554cc626d619023100b5c4c166e7f\",\n \"score\": \"0.5944693\",\n \"text\": \"public function retournerCommissions()\\n {\\n $requete = $this->db->get('commission');\\n return $requete->result_array(); // retour d'un tableau associatif\\n // fin retournerAnnees\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bed1b46f491ce141cde25ccadd09e314\",\n \"score\": \"0.5943541\",\n \"text\": \"function listarOrcamentos(){\\n $orcamentoSel = new Orcamento();\\n if(isset($_GET['texto'])){\\n $orcamentoSel->buscarTodos($_GET['texto']);\\n }else{\\n $orcamentoSel->buscarTodos(\\\"\\\");\\n }\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4b203e41d59ed06fefd465a50c30b0b\",\n \"score\": \"0.5938843\",\n \"text\": \"public function queryAll(){\\n\\t\\t$sql = 'SELECT * FROM projeto_pesquisador';\\n\\t\\t$sqlQuery = new SqlQuery($sql);\\n\\t\\treturn $this->getList($sqlQuery);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5d8b7d24637867b630f544a671e3c0a\",\n \"score\": \"0.59377384\",\n \"text\": \"public function obtener_actividad($valor){\\n\\n \\t$act=DB::table('muestra_actividad')->where('id_muestra','=',$valor)->get();\\n\\n \\t$aux=array();\\n\\n foreach ($act as $key2) {\\n \\t$aux1=DB::table('actividad')->where('id_actividad','=',$key2->id_actividad)->get();\\n \\t$aux=array_merge($aux,$aux1);\\n }\\n\\n return $aux;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f1bb95395cab955a73a2c6abee1115e\",\n \"score\": \"0.5936975\",\n \"text\": \"public static function getAllTblclasifproductAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblclasifproduct WHERE tblclasifproduct_activado= ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f2431368d3ef57ab041fcc609b28fa7\",\n \"score\": \"0.5934209\",\n \"text\": \"public function findAllActive() {\\n return $this->findBy(array('status' => 1));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48f944cfdd83b424b483326d1bfc1eb6\",\n \"score\": \"0.5932357\",\n \"text\": \"public function getSupervisoresNombresActivos()\\n {\\n \\n $result=$this->adapter->query(\\\"select a.id,concat(nombre,' ',apellido) as nomComp\\n from n_supervisores a\\n inner join a_empleados b on b.id=a.idEmp \\n where a.estado=0\\\",Adapter::QUERY_MODE_EXECUTE);\\n $datos=$result->toArray();\\n return $datos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"226581f15ffc9aee2af6f61f33d4c82e\",\n \"score\": \"0.5928845\",\n \"text\": \"function obtener_todos()\\n\\t{\\n\\t\\t// obetenemos el perfil que esta activo \\n\\t\\t\\t\\n\\t\\t$conn = parent::conectar(\\\"\\\");\\n\\t\\t\\n\\t\\t$params = array( \\n\\t\\t\\t\\t\\tarray(&$this->idusuario),\\n\\t\\t\\t\\t\\tarray(&$this->password), \\t\\n\\t\\t\\t\\t\\tarray(&$this->idempresa) ,\\n\\t\\t\\t\\t\\tarray(&$this->fecha_desde) ,\\n\\t\\t\\t\\t\\tarray(&$this->fecha_hasta),\\n\\t\\t\\t\\t\\tarray(&$this->idcomprobante) \\n\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t\\t\\n\\t\\n\\t\\t$rs = parent::ejecutar(\\\"Comprobantes_ObtenerTodos_x_Empresa\\\",\\\"SP\\\",\\\"\\\",$conn, $params);\\n\\n\\t\\t$array_return = array();\\n\\t\\t\\n\\t\\tif (sqlsrv_has_rows($rs)==0)\\n\\t\\t{\\t\\t\\t\\n\\t\\t\\treturn 0;\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\twhile($row = sqlsrv_fetch_array($rs, SQLSRV_FETCH_ASSOC))\\n\\t\\t\\t{\\n\\t\\t\\t array_push($array_return, $row);\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn $array_return;\\n\\t\\t}\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cdf3f47474a5be6252be4b4cd805c24\",\n \"score\": \"0.59285146\",\n \"text\": \"public function index() {\\n //$user = auth()->user();\\n // //dd($user);\\n \\n //$activos = \\\\CiberPYME\\\\Activo::with(array('amenazas',function(Builder $query){\\n // $query->with('salvavulneras')->get();\\n //}))->get();\\n //=>function (Builder $query) {$query->select('tipo','descripcion')}\\n\\n //dd($activos);\\n\\n\\n return view('activos/list_activos');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34e98b54eb1e1190a16a536c398cd0bc\",\n \"score\": \"0.5921397\",\n \"text\": \"public function queryAll(){\\r\\n\\t\\t$sql = 'SELECT * FROM reservaciones_pagos';\\r\\n\\t\\t$sqlQuery = new SqlQuery($sql);\\r\\n\\t\\treturn $this->getList($sqlQuery);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2b049a4f29a4161b391869cf755170e\",\n \"score\": \"0.591562\",\n \"text\": \"private function consultarEspacios()\\n\\t {\\n\\t \\t\\t\\treturn Espacio::find()->all();\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6a802e86b8b97c6886964359ffc04cb\",\n \"score\": \"0.59149396\",\n \"text\": \"public function PesquisarTodos(){\\n try {\\n //Conexão com o banco de dados pela classe PDO\\n $pdo = Conexao::getinstance();\\n //Comando em SQL para pesquisar os dados na tabela estoque_produto\\n $sql = \\\"SELECT * FROM estoque_produto ep INNER JOIN produto p ON(ep.produto=p.id_produto) INNER JOIN estoque e ON(ep.estoque=e.id_estoque)\\\";\\n //Prepara o sql para receber os binds\\n $stmt = $pdo->prepare($sql);\\n //Executa o SQL\\n $stmt->execute();\\n //Guarda em um array todos os dados da tabela\\n $estoqueprodutos = $stmt->fetchAll(PDO::FETCH_ASSOC);\\n //Retorna o array com todos os dados da tabela\\n return $estoqueprodutos;\\n \\n } catch (PDOException $ex) {\\n echo \\\"\\\".$ex;\\n \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81649883baf90b04804d3d65cada663e\",\n \"score\": \"0.5914871\",\n \"text\": \"static public function orden_corte_unique_activas(){\\n $sql = \\\" SELECT DISTINCT OC.orden_corte, OC.fecha_de_corte FROM \\\" . static::$table_name . \\\" as OC\\\";\\n $sql .= \\\" LEFT JOIN enviados_a_servicio as AOC \\\";\\n $sql .= \\\" ON OC.orden_corte = AOC.orden_corte AND OC.sku = AOC.sku WHERE AOC.sku IS NULL \\\";\\n $sql .= \\\" ORDER BY OC.fecha_de_corte DESC\\\";\\n //ChromePhp::log($sql);\\n return static::find_by_sql($sql);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de51056193cd7d8ca3d351d521d92a52\",\n \"score\": \"0.59147507\",\n \"text\": \"function dame_todos_ejercicios($activos)\\n {\\n $this->load->model('tpoadminv1/Generales_model');\\n\\n if($activos == true){\\n $this->db->where('active', '1');\\n }\\n $query = $this->db->get('cat_ejercicios');\\n \\n if($query->num_rows() > 0)\\n {\\n $array_items = [];\\n $cont = 0;\\n foreach ($query->result_array() as $row) \\n {\\n \\n $array_items[$cont]['id_ejercicio'] = $row['id_ejercicio'];\\n $array_items[$cont]['ejercicio'] = $row['ejercicio'];\\n $cont++;\\n }\\n return $array_items;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4ed52e8904a3d0f50b1011ba65af675\",\n \"score\": \"0.5905028\",\n \"text\": \"public function list()\\n {\\n return \\\\App\\\\Compromisso::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6a307827057c44472348d0667f93381\",\n \"score\": \"0.5889122\",\n \"text\": \"public static function getAllTblsistemapagoAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblsistemapago WHERE tblsistemapago_activado = ?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_STR);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2aa410f64fcd7f4933219865a9f267f4\",\n \"score\": \"0.5884585\",\n \"text\": \"public static function findAllActive()\\n {\\n return static::find()->active()->all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29a946d8d9caf7314f669e8f06bdd4fd\",\n \"score\": \"0.5881597\",\n \"text\": \"public function readAll()\\n {\\n // Se hace la consullta para llevar a cabo la acción\\n $sql = 'SELECT id_compra,fecha_compra, nombre_cliente,estado_compra\\n FROM compra INNER JOIN clientes USING(id_cliente)\\n ORDER BY id_compra';\\n $params = null;\\n return Database::getRows($sql, $params);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd557fcf5403ed98c83a5b7779c858f9\",\n \"score\": \"0.587411\",\n \"text\": \"public function PesquisarTodos()\\n {\\n /* Executa a funçao PesquisarTodos contida na classe DAO e retorna\\n seu resultado*/\\n return $this->agendaDAO->PesquisarTodos();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73f3a595a211fe3f1a474799ccad2b1d\",\n \"score\": \"0.5870232\",\n \"text\": \"public function getAll() {\\n return (Program::whereIn('status', [1])->orderBy('name', 'asc')->get());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdce99550e79c05434900c038d9cf5fe\",\n \"score\": \"0.586174\",\n \"text\": \"public function getConsultores() {\\n\\t $consultores = CaoUsuario::join('permissao_sistema', 'cao_usuario.co_usuario', '=', 'permissao_sistema.co_usuario')\\n ->select('cao_usuario.co_usuario', 'cao_usuario.no_usuario', 'cao_usuario.ds_senha',\\n 'cao_usuario.co_usuario_autorizacao', 'cao_usuario.nu_matricula',\\n 'cao_usuario.dt_nascimento')\\n ->where('permissao_sistema.co_sistema', '=', 1)\\n ->where('permissao_sistema.in_ativo', '=', 'S')\\n ->whereIn('permissao_sistema.co_tipo_usuario', [0,1,2])->get();\\n return $consultores;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b021d2d296370cffb6bddc8fc4cc6db\",\n \"score\": \"0.5861466\",\n \"text\": \"function findAll(){\\r\\n $this->db->where('approve', 0);\\r\\n return $this->db->get('requests')->result_array();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1036f537c0bebfae0bd48782363a00ed\",\n \"score\": \"0.58454764\",\n \"text\": \"public function getConTalento()\\n {\\n $result=$this->adapter->query(\\\"select *, nombre as nomFiltro \\n from t_conceptos order by nombre\\\" ,Adapter::QUERY_MODE_EXECUTE);\\n $datos=$result->toArray();\\n return $datos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d1ab649f35d85c6f38867fd76869320\",\n \"score\": \"0.58417785\",\n \"text\": \"public function executeList()\\n {\\n if($this->getRequestParameter('actividad')) {\\n $c = new Criteria();\\n $c->add(FuenteActividadPeer::ACTIVIDAD_ID, $this->getRequestParameter('actividad'));\\n\\n $this->fuente_actividads = FuenteActividadPeer::doSelect($c);\\n\\n // mostrar la lista de actividades correspondiente al proyecto y mes\\n } elseif (($this->getRequestParameter('proyecto')) && ($this->getRequestParameter('mes'))) {\\n $c = new Criteria();\\n $c->add(ActividadPeer::PROYECTO_ID, $this->getRequestParameter('proyecto'));\\n $c->add(ActividadPeer::MES_INICIO_EJECUCION, $this->getRequestParameter('mes'));\\n\\n $this->actividads = ActividadPeer::doSelect($c);\\n\\n $this->setTemplate('ListActividades');\\n // mostrar formulario de busqueda de actividad\\n } else {\\n $this->setTemplate('BuscarActividad');\\n\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a136ad935594093645e9045af2d008e\",\n \"score\": \"0.583059\",\n \"text\": \"public function getTodas()\\n {\\n return $this->registros;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88ad945ce174fcd8da3be03e53d8d1c8\",\n \"score\": \"0.58304197\",\n \"text\": \"public function executeList()\\n {\\n if($this->getRequestParameter('actividad')) {\\n $c = new Criteria();\\n $c->add(LocalidadActividadPeer::ACTIVIDAD_ID, $this->getRequestParameter('actividad'));\\n\\n $this->localidad_actividads = LocalidadActividadPeer::doSelect($c);\\n\\n // mostrar la lista de actividades correspondiente al proyecto y mes\\n } elseif (($this->getRequestParameter('proyecto')) && ($this->getRequestParameter('mes'))) {\\n $c = new Criteria();\\n $c->add(ActividadPeer::PROYECTO_ID, $this->getRequestParameter('proyecto'));\\n $c->add(ActividadPeer::MES_INICIO_EJECUCION, $this->getRequestParameter('mes'));\\n\\n $this->actividads = ActividadPeer::doSelect($c);\\n\\n $this->setTemplate('ListActividades');\\n // mostrar formulario de busqueda de actividad\\n } else {\\n $this->setTemplate('BuscarActividad');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0c46f65cc0d1b6979ce001e89be9461\",\n \"score\": \"0.58266246\",\n \"text\": \"public function getActivo(){\\n\\t\\treturn $this->activo;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf8d8d919f65a959f3eb89b0a18d93c2\",\n \"score\": \"0.58211553\",\n \"text\": \"public static function getAllTblcoloniaAct(){\\n\\t \\n\\t $activado=1;\\n\\t\\t$consulta = \\\"SELECT * FROM tblcolonia WHERE tblcolonia_activado=?\\\";\\n\\t\\t\\n\\t\\ttry{\\n\\n\\t\\t\\t$resultado = ConexionDB::getInstance()->getDb()->prepare($consulta);\\n\\t\\t\\t$resultado->bindParam(1,$activado,PDO::PARAM_INT);\\n\\t\\t\\t$resultado->execute();\\n\\t\\t\\treturn $resultado->fetchAll(PDO::FETCH_ASSOC); //retorna los campos del registro \\n\\t\\t} catch(PDOException $e){\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18c3ba31791e534b37d2b1996dacded3\",\n \"score\": \"0.5818013\",\n \"text\": \"public function getRequisitosLegales()\\n {\\n $result=$this->adapter->query(\\\"select a.id, d.id as idCar, b.nombre as jerarquia, a.numero, a.ano, a.titulo, a.articulo,\\n a.descripcion, d.nombre\\n from t_requisitos_legales a \\n inner join t_gerarquias_req b on b.id = a.idGquia\\n inner join t_requisitos_legales_r c on c.idReqLeg = a.id \\n inner join t_cargos d on d.id = c.idCar\\n order by b.nombre\\n \\\",Adapter::QUERY_MODE_EXECUTE);\\n $datos = $result->toArray();\\n return $datos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f4b18a138b75af1ffe7d9c9f7491cf7\",\n \"score\": \"0.5812483\",\n \"text\": \"function getAllConteudo() {\\r\\n /* /// Status do Conteudo\\r\\n * 0 - pendente\\r\\n * 1 - publicado\\r\\n * 2 - rascunho\\r\\n * 3 - backup\\r\\n */\\r\\n\\r\\n $this->defaultDB->where('status', '1');\\r\\n $this->defaultDB->order_by(\\\"titulo ASC\\\");\\r\\n return $this->defaultDB->get(self::TABLE);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d07ace32def4c0dcd39e0b2925c0049b\",\n \"score\": \"0.5812335\",\n \"text\": \"public function riesgoAction()\\n {\\n\\n $user = $this->getUser(); //Devuelve el usario que esta en sesion\\n $em = $this->getDoctrine()->getManager();\\n\\n\\n $activos = $em->getRepository('ActivoBundle:activo')->findBy(array('empresaId' => $user->getEmpresa())); //Filtramos los activos en base al empresa Id\\n\\n return $this->render('riesgo/indexActivo.html.twig', array(\\n 'activos' => $activos,\\n ));\\n // return new Response('Holi');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"984096b2fa2c0de3192efee83a0cb8a3\",\n \"score\": \"0.5809296\",\n \"text\": \"public function iniciarComprobantes(){\\n\\n\\t\\t$item = null;\\n\\t\\t$valor = null;\\n\\n\\t\\t$respuesta = ControladorComprobantes::ctrIniciarComprobantes($item, $valor);\\n\\n\\t\\treturn $respuesta;\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d895fd31b7f093e9a193cfa4a49045e5\",\n \"score\": \"0.58067364\",\n \"text\": \"public function getResponsablesActividades($id)\\n {\\n $result=$this->adapter->query(\\\"select d.id , d.nombre, d.apellido \\n from t_riesgos a \\n inner join t_riesgos_a b on a.id = b.idRies\\n inner join t_riesgos_a_e c on c.idIries = b.id\\n inner join a_empleados d on d.id = c.idEmp\\n where b.id=\\n \\\".$id,Adapter::QUERY_MODE_EXECUTE);\\n $datos=$result->toArray();\\n return $datos;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"11bcb079a912972befef7e01423a6759\",\n \"score\": \"0.5805376\",\n \"text\": \"public function consultarContratos()\\n {\\n $resultado = [];\\n $sql = \\\"SELECT `idContrato`,`TipoContrato`,`contratista`,`contratistaRazonSocial`,`objetoContrato`,`rubro`,`fechaSuscripcion`, `fechaInicio`,`fechaFin`,`valor`,`valorAnticipo`,`supervisor`,`supervisorRazonSocial`,`numeroCdp`,`valorCdp`, `fechaCdp` FROM `contrato`\\\";\\n $result = $this->con->query($sql);\\n if ($result) {\\n while ($row = $result->fetch_array(MYSQL_ASSOC)) {\\n $resultado[] = $row;\\n }\\n }\\n $result->close();\\n $this->con->close();\\n return $resultado;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be11577518b310e684d59a5ab3c10ec5\",\n \"score\": \"0.5803547\",\n \"text\": \"public function index()\\n {\\n $requisicoes = Requisicao::where('user_id', Auth::user()->id)->get();\\n return view('requisicao.index', compact('requisicoes'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80a3982eb2bae99922b84805483cc7a2\",\n \"score\": \"0.5801288\",\n \"text\": \"public function getEmpInactivos($con)\\n {\\n $result=$this->adapter->query(\\\"select * \\n from a_empleados \\n where estado=1 \\\".$con.\\\" order by nombre,apellido\\\" ,Adapter::QUERY_MODE_EXECUTE);\\n $datos=$result->toArray();\\n return $datos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0422e13fff2763d9f677aad87f062d0d\",\n \"score\": \"0.5799702\",\n \"text\": \"public function getAllCriteres(){\\n $c = Base::getConnection();\\n $query = $c->prepare(\\\"select * from critere\\\");\\n $query->execute();\\n\\t\\treturn $query->fetchAll();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d1e60ff7a8d1ac8f996bc1ea37d02fc\",\n \"score\": \"0.579546\",\n \"text\": \"public function index()\\n {\\n return UnidadEjecutora::latest()->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddada1a2aaac9ce447328edc0108a5bb\",\n \"score\": \"0.57930565\",\n \"text\": \"public function index()\\n {\\n return DB::table('requisito_procedimiento as rp')\\n ->join('requisitos as re','rp.requisito_id','=','re.id')\\n ->join('procedimientos as pr','rp.procedimiento_id','=','pr.id')\\n ->select(\\n 'rc.id','re.descripcion as requisito',\\n 'pr.descripcion as procedimiento',\\n 'rp.requisito_id','rp.procedimiento_id'\\n )->latest()->paginate(5);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a513f8ad97e559a827478bc0af823c36\",\n \"score\": \"0.5790346\",\n \"text\": \"public function gets() {\\r\\n $query = $this->db->query(\\\"SELECT *\\r\\n FROM\\r\\n (articulos a\\r\\n LEFT JOIN\\r\\n planos pl\\r\\n ON \\r\\n a.idplano = pl.idplano)\\r\\n INNER JOIN\\r\\n productos p\\r\\n ON\\r\\n a.idproducto = p.idproducto AND\\r\\n a.activo = '1'\\r\\n ORDER BY\\r\\n a.articulo\\\");\\r\\n return $query->result_array();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4e8d5782087d96afa6ff959b884de94\",\n \"score\": \"0.5786473\",\n \"text\": \"public function getCargos()\\n {\\n $result=$this->adapter->query(\\\"select * , nombre as nomFiltro \\n from t_cargos\\n order by nombre\\\",Adapter::QUERY_MODE_EXECUTE);\\n $datos=$result->toArray();\\n return $datos;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":734,"cells":{"query_id":{"kind":"string","value":"2e8ffe812d86dd0325d4317194abd110"},"query":{"kind":"string","value":"Admin trails create route"},"positive_passages":{"kind":"list like","value":[{"docid":"d95fe2ede5ec9c97a6f2e8b3b505fd7c","score":"0.0","text":"public function create(Trail $trail)\n {\n // Get all the hospitals\n $hospitals = Hospital::all();\n\n // Return admin trails create view\n return view('admin.trails.create', ['hospitals' => $hospitals]);\n }","title":""}],"string":"[\n {\n \"docid\": \"d95fe2ede5ec9c97a6f2e8b3b505fd7c\",\n \"score\": \"0.0\",\n \"text\": \"public function create(Trail $trail)\\n {\\n // Get all the hospitals\\n $hospitals = Hospital::all();\\n\\n // Return admin trails create view\\n return view('admin.trails.create', ['hospitals' => $hospitals]);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"c1822c40947a437080483796e72e4471","score":"0.73166287","text":"public function create()\n {\n //Not Used because using API Route\n }","title":""},{"docid":"63cd30631c266249d26f922c6e0613d9","score":"0.6722936","text":"public function create()\n {\n return \\redirect()->route('admin-unit.index');\n }","title":""},{"docid":"875a08dcafb13ec8526702b4b352a9e0","score":"0.66605693","text":"public function create()\n {\n //\n return redirect(\"/admin\");\n }","title":""},{"docid":"beea0e830fd79e908936bdb57901fe0a","score":"0.656376","text":"public function create()\n {\n return view(\"auth.admin.crear\")->with([\"formulario\"=>\"I\",\n \"type\"=>\"A\",\n 'idnamereferido'=>'id_referido',\n 'urlreferido'=>'listardiferidos'])->with(self::url());\n }","title":""},{"docid":"b85ed9fd2de02a148ae6ca8245ca449e","score":"0.6563708","text":"private function add(): Route {\n return new Route(\n '/admin/content/team-member/add',\n [\n '_entity_form' => 'team_member.add',\n '_title' => 'Add Team Member',\n ],\n [\n '_entity_create_access' => 'team_member',\n ]\n );\n }","title":""},{"docid":"143b2920f785561a514e988dc243c052","score":"0.6476957","text":"public function create()\n {\n return \"create admin\";\n }","title":""},{"docid":"1204fc46c860e6890178df7a59aa4242","score":"0.64362675","text":"public function create()\n {\n echo ('estamos dentro de la pagina de create');\n }","title":""},{"docid":"aa656876603f62b659d8c11c3a67ad91","score":"0.6415722","text":"public static function create() {\n if (!Session::is_admin()) {\n $controller = 'Accueil';\n $view = 'listVide';\n $pagetitle = 'Error Accès';\n require File::build_path(array(\"view\", \"view.php\"));\n } else {\n\n $action = 'created';\n\n $titre = 'Ajout';\n\n $controller = 'Accueil';\n $view = 'create';\n $pagetitle = 'Formulaire d\\'ajout - COPO-Dashboard';\n\n require File::build_path(array(\"view\", \"view.php\"));\n }\n }","title":""},{"docid":"d18e76d8a332aa47d0c247184e76c1ec","score":"0.6404609","text":"public function create()\n {\n return redirect(route('interalliances.origin'));\n //return view('alianzas.create');\n\n }","title":""},{"docid":"e77ce2056b03d80b21765cc9c07ce763","score":"0.6400376","text":"public function admin_create()\n {\n return view(\"admin.admin_create\");\n }","title":""},{"docid":"55c3967e8d449fc4b68b5e36c23741f4","score":"0.63878417","text":"public function create()\n {\n return redirect('admin/bedrijven');\n }","title":""},{"docid":"1f0e486a896727167bdc98f63362e274","score":"0.63780165","text":"public function create()\n {\n return \\redirect()->route('akuntansi.index');\n }","title":""},{"docid":"53fbf76c55f95705146675ca8331da19","score":"0.6325153","text":"public function create()\n {\n //return view('admin::create');\n }","title":""},{"docid":"e218a70d7e85937a0bdc05e1a74bcb84","score":"0.6319202","text":"public function create()\n {\n if(User::isAdmin()){\n $agents = Agents::all();\n return view('destinations.create')->with('agents', $agents);\n }else{\n return redirect('destinations')->with('message', 'You are not authorized to use this action');\n }\n\n }","title":""},{"docid":"f408d7ab79a2ac5fab5029669a5cdb9b","score":"0.63178736","text":"public function create()\n {\n //\n if (Auth::user()->role_id == 4){\n return view('internal.admin.nuevoTransportista');\n }\n elseif (Auth::user()->role_id == 6){\n return view('internal.usuarioIntermediario.nuevoTransportista');\n }\n\n \n }","title":""},{"docid":"852475260732488ab203fdea91e59376","score":"0.6316322","text":"public function create()\n {\n //CREATE\n return view('admin.flight.create');\n \n }","title":""},{"docid":"8462ff8b1bec51f4315773aab70e2a1e","score":"0.63009566","text":"public function create()\n {\n\n return redirect('admin/activiteiten');\n }","title":""},{"docid":"fc4804b4fa8b134d57a60d056170defa","score":"0.6271565","text":"public function createAction()\n {\n $request = $this->getRequest();\n $type = $this->_getParam('type');\n if ($type === 'new') {\n $this->_helper->redirector('create-new-club', 'clubs', 'default');\n } elseif ($type === 'import') {\n echo \"lol\";//$this->_forward('createeClub');\n }\n }","title":""},{"docid":"c860d50db5c95522d58ad442b93ef3ef","score":"0.6266376","text":"public function criarAction()\n {\n if($this->usuario['tp_id']==5){\n $this->_redirect('index');\n }\n $this->modeloTipoTelefone->insert($this->_getAllParams());\n\n $this->_redirect('tipo-telefone/index');\n }","title":""},{"docid":"4a42044db6b652224a94e3d4c263b7ed","score":"0.6257809","text":"public function create()\n {\n if (auth()->user()->hasRole('admin')) {\n return view('restorants.create');\n } else {\n return redirect()->route('orders.index')->withStatus(__('No Access'));\n }\n }","title":""},{"docid":"edc9554aeade5db451d41210d88881fe","score":"0.62358147","text":"public function create()\n {\n //\n return view('admin.tour.create');\n }","title":""},{"docid":"55dd34a5d9124ff705e9225ffc5faea5","score":"0.62348175","text":"public function createAction()\n {\n\n\n }","title":""},{"docid":"9a09bbb12e12398e520aa1261c967033","score":"0.62244225","text":"public function create()\n {\n\n// return view('system/admin/admin');\n }","title":""},{"docid":"fd3d017227ff2c8618bd6581918a9e6f","score":"0.62129974","text":"public function actionCreate() {\n \n $this->redirect(array('index'));\n }","title":""},{"docid":"ef68007de1d99cb4e05ffb3424609095","score":"0.6211619","text":"public function createRoute()\n {\n if ($this->mapType !== 'country' && $this->mapType !== 'hotel') {\n $this->endPos=trim($this->destination->longtiude).','.trim($this->destination->latitude);\n // dd($this->endPos);\n }\n if ($this->currentUserLocation) {\n $this->emit('createRoute',['startPos'=> $this->currentUserLocation , 'endPos'=>$this->endPos]);\n return;\n }\n // \\dd($this->hotelLocation);\n $this->emit('createRoute',['startPos'=> $this->hotelLocation , 'endPos'=>$this->endPos]);\n }","title":""},{"docid":"8272d500912f094daae0cc98a0d36e81","score":"0.6192516","text":"public function create()\n {\n return redirect(route('vinyls.show', $vinyl));\n }","title":""},{"docid":"172694fc8b2b676de78bcc91bacfcbd1","score":"0.6191427","text":"public function create()\n {\n // add by dandisy\n \n\n // edit by dandisy\n //return view('admin.testlagis.create');\n return view('admin.testlagis.create');\n }","title":""},{"docid":"7a17b273cd652ac87ae454286173a50a","score":"0.61888534","text":"public function createAction()\n {\n\n }","title":""},{"docid":"0705f824eef3f3baa9bacfde6a2dcfa5","score":"0.6186932","text":"public function create()\n\t{\n\t\tif(Auth::user()->user_role == 'Admin'){\n\n //Find all steps\n $steps = Steps::all();\n\n\n\t\tReturn View::make('steps.create')->with(['steps' => $steps]);\n\t\t}\n\t\telse{\n\t\tReturn \"Not Authorized!\";\n\t\t}\n\t}","title":""},{"docid":"e5e1f4781dabe8055716efb645cb9e3a","score":"0.6183511","text":"public function url()\n {\n return '/admin/system_localization/create';\n }","title":""},{"docid":"678d3c708dbf19deb4f7e277379bb78c","score":"0.6182145","text":"public function create()\n {\n if(Gate::denies(\"edit-parameter\")){\n abort(403,\"No tienes permisos para realizar esta acción\");\n }\n return view('configuracion.plan.create');\n }","title":""},{"docid":"e800e43971b3890716e1d39ea6d38fe2","score":"0.6179707","text":"protected function createRoute()\n {\n $name = $this->argument('name');\n $this->callSilent('make:bundle:route', [\n 'name' => $this->getBundleName($name),\n '--namespace' => $this->relativeNamespace,\n ]);\n }","title":""},{"docid":"f7ce5b8555a2a7962e5cd8c90ba74d0e","score":"0.6161956","text":"abstract public function actionCreate();","title":""},{"docid":"0c6e62e918551c2ab6aa17e40d5a4e09","score":"0.6161519","text":"public function actionCreate()\n {\n\n }","title":""},{"docid":"808c84a8873908e209c582ca3f812a25","score":"0.61548203","text":"public function create()\n {\n // dd('create ');\n return view('TravConstruction.create');\n\n\n }","title":""},{"docid":"537bc981837ab4f40f39b23dc29e4c52","score":"0.6146379","text":"public function create()\n {\n return view(\"/admin/create\");\n }","title":""},{"docid":"20291f81863c9e4bf10aad08bdc9abdc","score":"0.6135495","text":"protected function setupCreateOperation()\n {\n CRUD::addField(['name' => 'sitemap', 'type' => 'custom_html', 'value' => 'Sitemap sẽ được lưu tại đường dẫn: ' . url('/sitemap.xml') . '']);\n $this->crud->addSaveAction([\n 'name' => 'save_and_new',\n 'redirect' => function ($crud, $request, $itemId) {\n return $crud->route;\n },\n 'button_text' => 'Tạo sitemap',\n ]);\n\n $this->crud->setOperationSetting('showSaveActionChange', false);\n }","title":""},{"docid":"925e3ae8a09f60ea52a6ea8d57e248c7","score":"0.61314976","text":"public function create()\n {\n return redirect()->route('ware-completed.index');\n }","title":""},{"docid":"b8edeaa1c8f7fe877c8db184f2542a0a","score":"0.61277485","text":"public function create() {\n\t\t// if guest or cannot tote.create, redirect -> home\n\t\tif(Entrust::can('tote.create') == false) return redirect()->route('home');\n\n\t\treturn view('pages.tote.create');\n\t}","title":""},{"docid":"fcb7ed33753003bacddad2292e02575d","score":"0.611909","text":"public function create()\n {\n $route = self::ROUTE;\n return view(self::FOLDER.\"create\", compact(\"route\"));\n }","title":""},{"docid":"3189a6b1dd06fcfb1524d9f747398e82","score":"0.61164814","text":"public function createAction()\n {\n $templateKey = 'edit';\n\n if (false === $this->admin->isGranted('CREATE')) {\n throw new AccessDeniedException();\n }\n\n $object = $this->admin->getNewInstance();\n\n // Добавляем родительский отзыв, если передали а параметрах\n $em = $this->getDoctrine()->getManager();\n $GET = $this->get('request')->query;\n $parentId = $GET->get('review_parent_id');\n if ($parentId > 0) {\n $parent = $em->getRepository('CoreReviewBundle:Review')->find($parentId);\n if (null !== $parent) {\n $object->setParent($parent);\n\n // Добавляем продукт в отзыв\n $productId = $GET->get('review_product_id');\n if ($productId > 0) {\n $product = $em->getRepository('CoreProductBundle:CommonProduct')->find($productId);\n if (null !== $product) {\n $object->setProduct($product);\n }\n }\n }\n }\n\n $this->admin->setSubject($object);\n\n /** @var $form \\Symfony\\Component\\Form\\Form */\n $form = $this->admin->getForm();\n $form->setData($object);\n\n if ($this->getRestMethod() == 'POST') {\n $form->bind($this->get('request'));\n\n $isFormValid = $form->isValid();\n\n // persist if the form was valid and if in preview mode the preview was approved\n if ($isFormValid && (!$this->isInPreviewMode() || $this->isPreviewApproved())) {\n $this->admin->create($object);\n\n if ($this->isXmlHttpRequest()) {\n return $this->renderJson(array(\n 'result' => 'ok',\n 'objectId' => $this->admin->getNormalizedIdentifier($object)\n ));\n }\n\n $this->addFlash('sonata_flash_success', $this->admin->trans('flash_create_success', array('%name%' => $this->admin->toString($object)), 'SonataAdminBundle'));\n\n // redirect to edit mode\n return $this->redirectTo($object);\n }\n\n // show an error message if the form failed validation\n if (!$isFormValid) {\n if (!$this->isXmlHttpRequest()) {\n $this->addFlash('sonata_flash_error', $this->admin->trans('flash_create_error', array('%name%' => $this->admin->toString($object)), 'SonataAdminBundle'));\n }\n } elseif ($this->isPreviewRequested()) {\n // pick the preview template if the form was valid and preview was requested\n $templateKey = 'preview';\n $this->admin->getShow();\n }\n }\n\n $view = $form->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($view, $this->admin->getFormTheme());\n\n return $this->render($this->admin->getTemplate($templateKey), array(\n 'action' => 'create',\n 'form' => $view,\n 'object' => $object,\n ));\n }","title":""},{"docid":"c803ffa8b63157347188a1b04e6c3c48","score":"0.6109311","text":"public function create(){\n // return view($this->path . 'create');\n }","title":""},{"docid":"abb145d9e6711e58ebb7ffcd4d6f8d1a","score":"0.61084145","text":"public function create()\n { return redirect('/Properties');}","title":""},{"docid":"fe69aec8fe3691d1075c43fecde83cd2","score":"0.60996044","text":"public function createAction()\n {\n $this->apiException(\n 'This method is not allowed!',\n Response::HTTP_METHOD_NOT_ALLOWED\n );\n }","title":""},{"docid":"a39f78b7fe898b769676ff367d4e9889","score":"0.6095418","text":"public function create()\n\t{\n\t\t$data = [\n\t\t\t'title' => $this->IFP_Sprt(__METHOD__),\n\t\t\t'breadcrumb' => [\n\t\t\t\t'Admin' => '/admin',\n\t\t\t\t'Create' => ''\n\t\t\t],\n\t\t\t'user' => session('login'),\n\t\t];\n\t\treturn view('admin/admin-create', compact('data'));\n\t}","title":""},{"docid":"7dc6509881b42f2c5c795f112e45f4ea","score":"0.60943913","text":"public function create()\n {\n //\n return view(\"admin.rule.create\");\n }","title":""},{"docid":"1f4459370afbf19e3e19214ae6db1790","score":"0.6075212","text":"public function routeToAddMember() {\n if($this->memberView->isSocialSecurityValid() && $this->memberView->checkSocialSecurityLength()) {\n $this->memberModel->reciveMemberData($this->memberView->getName(), $this->memberView->getSocialSecurity());\n $this->memberModel->addNewMemberToDatabase();\n }\n }","title":""},{"docid":"3c64ec6529ab96548ee16fe41307b384","score":"0.60700655","text":"public function create()\n\t{\n\t \n\t \n\t return view('admin.teampage.create');\n\t}","title":""},{"docid":"a4861666a5dc4b407f63a4216f831181","score":"0.60578406","text":"public function create()\n {\n if(!Gate::allows('admin_processing_create')) {\n abort('401');\n }\n //\n }","title":""},{"docid":"eb41df029bd74c081c3079d7d4cf653f","score":"0.60566837","text":"public function create()\n {\n //\n return response(\"\",405);\n }","title":""},{"docid":"bc56155417fc85cd4b5ad01b07c801c7","score":"0.6051255","text":"public function createPost(){\n\t\t\t$this->modelCreate();\n\t\t\t//quay tro lai trang quytac\n\t\t\theader(\"location:index.php?controller=quytac\");\n\t\t}","title":""},{"docid":"a16417d1f9368bc0fb8f206cb13527d6","score":"0.60422915","text":"public function create()\n {\n echo 'create';\n }","title":""},{"docid":"c1fbf111c740174ca185ac37a5f71380","score":"0.6038764","text":"public function create()\n {\n //\n return \"create method to show form\";\n }","title":""},{"docid":"d17d7f1d76f5a33ee6b2fd1fbeafe6ba","score":"0.60356516","text":"public function create()\n {\n return view('admin.navigate.create');\n }","title":""},{"docid":"b3145e6c27a92e6fcd8097fd97d07ca1","score":"0.6031166","text":"public function create()\n {\n return redirect()->route('index');\n }","title":""},{"docid":"7aa9eaf9cbcd24c3d35a810ec557e448","score":"0.60135484","text":"public function create()\n {\n $routesModel = \\App\\Route::where('except', '<>', 1)->get();\n\n $routes = [];\n\n foreach ($routesModel as $route) {\n $routes[$route->id] = '[' . $route->method . '] ' . $route->path;\n }\n\n return view('admin.permission.create')->with(['permission' => new Permission(), 'routes' => $routes, 'selected' => []]);\n }","title":""},{"docid":"fab2925b5ff7b1c2e848b9dbae6f712d","score":"0.60081345","text":"public function create()\n {\n return redirect()->route(\"admin.transaction-category.index\");\n }","title":""},{"docid":"ad7562b8363fb1117d45c593a7a5e930","score":"0.6006885","text":"public function actionCreate()\n {\n $model = new User();\n\n if (Yii::$app->request->isPost) {\n $tempPassword = '';\n $model->load(Yii::$app->request->post());\n $tempPassword = $model->password_hash;\n $security = new Security();\n $model->password_hash = $security->generatePasswordHash($model->password_hash);\n $model->auth_key = $security->generateRandomString();\n\n $devices = Devices::findOne($model->devices_id);\n $devices->devicesstatus = 1;\n $devices->save();\n $model->save();\n User::mikrotikAdd($model, $tempPassword);\n $action = new Actionlist();\n $action->user_id = Yii::$app->user->identity->id;\n $action->action = 'Добавление';\n $action->parameters = $model->id ;\n $action->route = $this->route;\n $action->date = date('Y-m-d H-i-s');\n $action->save();\n /*-----------------------------------------------------------------------------*/\n// $service = Connection::findOne($model->connection_id);\n// $profile = Tariffs::findOne($model->tariffs_id);\n// try {\n// $client = new RouterOS\\Client('192.168.1.100', 'admin', 'admin');\n// } catch (Exception $e) {\n// die('Unable to connect to the router.');\n// }\n//\n// $addRequest = new RouterOS\\Request('/ppp/secret/add');\n//\n//// $addRequest->setArgument('name', 'MIKROVBROS');\n// $addRequest->setArgument('name', $model->username);\n// $addRequest->setArgument('service', $service->nameconnection);\n// $addRequest->setArgument('profile', $profile->name);\n//// $addRequest->setArgument('mac-address', '00:00:00:00:00:01');\n// if ($client->sendSync($addRequest)->getType() !== RouterOS\\Response::TYPE_FINAL) {\n// die(\"Error when creating ARP entry for 'Yii'\");\n// }\n /*-----------------------------------------------------------------------------*/\n\n\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\n\n\n// if ($model->load(Yii::$app->request->post())) {\n// $security = new Security();\n// $user = new User();\n// $user->status = '10';\n// $user->password_hash = $security->generatePasswordHash(Yii::$app->request->post('password_hash'));\n// $user->auth_key = $user->generateAuthKey();\n//\n// $user->save(); die();\n// //echo $user->password_hash; die();\n//\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n\n// if ($model->load(Yii::$app->request->post())) {\n// $security = new Security();\n// $model->password_hash = $security->generatePasswordHash($model->password_hash);\n// $model->auth_key = $model->generateAuthKey();\n// $model->save();\n// return $this->redirect(['/admin/user/index']);\n// //return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n }","title":""},{"docid":"d95d4eb33939c4799aed8ed01aa7149c","score":"0.6002912","text":"public function create() // delete later\n {\n return redirect('/home');\n }","title":""},{"docid":"2a93c41870ee29d34e19bb91778eb320","score":"0.6001153","text":"public function create()\n { \n return Redirect::route('dashboard');\n }","title":""},{"docid":"85d95900dcd2c27c2888a7e17000cabc","score":"0.59998363","text":"public function create()\n {\n echo \"create\";\n }","title":""},{"docid":"cf33d388ce1cedc22fdbd54b84e92107","score":"0.59975076","text":"public function create()\n {\n //RESTfullのため必要ない\n }","title":""},{"docid":"2fd41716f6f0bc8b9ab44bac42047abe","score":"0.59974295","text":"public function create()\n {\n return 'create';\n //\n }","title":""},{"docid":"e793c546096eed9d3ed458d5437f3d84","score":"0.5986522","text":"public function create()\n {\n //\n return view ('theme.admin.create_admin');\n }","title":""},{"docid":"634ca3c15e7c1be77ababe20088ac619","score":"0.5984883","text":"public function create()\n\t{\n\t\tif(Auth::user()->type=='admin'){\n\t\t\t$term_types=TermType::all();\n\t\t\t$array=['active'=>'cont','term_types'=>$term_types];\n\t\t\treturn view('contractor.add',$array);\n\t\t}else{\n\t\t\tabort('404');\n\t\t}\n\t}","title":""},{"docid":"bd64183a46e78180f8ce10e516b94f5e","score":"0.5983227","text":"public function create()\n {\n //\n \n\n\n\n }","title":""},{"docid":"c93605cb0700088224295f97b2883b6b","score":"0.5980933","text":"public function create()\n {\n $this->auth->restrict($this->permissionCreate);\n $this->edit();\n }","title":""},{"docid":"2ad4e21b1afe25e5bfe3bf1f8ba95d1f","score":"0.59807724","text":"public function actionCreatePartner() {\n }","title":""},{"docid":"48426499a17a8679735e2a3b9faa12cc","score":"0.5968407","text":"public function create()\n {\n //return add page\n return view('admin.special_offer.add');\n }","title":""},{"docid":"86417db685197853b614963fa0f79e99","score":"0.5968116","text":"public function create()\n {\n return redirect(route('home'));\n }","title":""},{"docid":"000c8f502258a84e7e55ec49429b8e73","score":"0.5967478","text":"public function create()\n {\n //\n if(auth()->user()->can('create',Resturant::class)){\n return view('resturant.create');\n }\n else{\n abort(401);\n }\n }","title":""},{"docid":"393e6fecd3f2d6fd9126234eb814d34b","score":"0.59658325","text":"public function create()\n {\n return view('testingadmin.create');\n }","title":""},{"docid":"0b5690872df3df971493709b5785ce77","score":"0.5957629","text":"public function create()\n {\n $this->authorize('permission_admin');\n //\n }","title":""},{"docid":"419d2c512038ccd476fa0cec4612d045","score":"0.5953912","text":"public function create()\n\n { if (Auth::user() -> Hasrole('admin')) {\n $lugares=Lugar::all();\n return view('eventos.create',compact('lugares'));\n }}","title":""},{"docid":"8cb6e3a63a9fcc7e109ca9e2fa80c74e","score":"0.59529644","text":"public function create()\n {\n //$this->isAuthorized('lead.create');\n Breadcrumbs::addCrumb('Create');\n Title::setSemiBold('New Lead');\n Title::useLeftArrow(true);\n return view('admin.lead.create');\n }","title":""},{"docid":"6cdf2a5aa2e70ffee6e2ae05c6d79ef7","score":"0.5951884","text":"public function create()\n {\n return \\view('admin.destination.destinationCreate');\n }","title":""},{"docid":"c28a660d85a2c6310cdc4b08fb8b4ba8","score":"0.5951493","text":"public function create(){\n //\n }","title":""},{"docid":"c28a660d85a2c6310cdc4b08fb8b4ba8","score":"0.5951493","text":"public function create(){\n //\n }","title":""},{"docid":"279742eece56f3fab333ec3df93117a3","score":"0.59512526","text":"public function actionCreate()\n {\n $this->getView()->pageTitle = 'Добавить направление';\n $this->getBreadCrumbs();\n $model = new PtmDirection();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }","title":""},{"docid":"3f77ffd5ea29dfba2ff3dcf612cd715a","score":"0.5947417","text":"public function create() {\n\t\tsession(['tabpanel' => 'create']);\n\n\t\treturn redirect()->route('constants.index');\n\t}","title":""},{"docid":"b00c305458cbbed53d99841c01a98bd2","score":"0.59466","text":"public function create()\n {\n if (Auth::user()->role == 'admin') {\n $vehicle = Vehicle::where('status', 'available')->get();\n $spv = User::where('role', 'supervisor')->get();\n $pool = User::where('role', 'pool-officer')->get();\n\n return view('admin.trx-create', compact('vehicle', 'spv', 'pool'));\n }\n\n abort(403);\n }","title":""},{"docid":"9f6cf047e9eb43ff3c97641e73f8538f","score":"0.5944559","text":"public function create()\n {\n //\n return view('admin.create');\n }","title":""},{"docid":"9f6cf047e9eb43ff3c97641e73f8538f","score":"0.5944559","text":"public function create()\n {\n //\n return view('admin.create');\n }","title":""},{"docid":"31f8e9b35ccb166754f8f81a138234bc","score":"0.59429324","text":"function Create(){\n \n }","title":""},{"docid":"72e118a2e9998dc8bf664c92f4f25bf4","score":"0.59425086","text":"public function create()\n {\n $destination = DB::table('destinations')->get();\n return view('route.create', compact('destination'));\n }","title":""},{"docid":"2fc9cf4396c45c5d1b9a11ab1cecc70d","score":"0.59415174","text":"protected function generateRoute(array &$vars): void {\n $vars['route'] = $this->confirm('Would you like to create a route for this form?');\n if ($vars['route']) {\n $this->defaultPathPrefix = $this->defaultPathPrefix ?: '/' . $vars['machine_name'];\n $default_route_path = \\str_replace('_', '-', $this->defaultPathPrefix . '/' . $vars['raw_form_id']);\n $vars['route_name'] = $this->ask('Route name', '{machine_name}.' . $vars['raw_form_id']);\n $vars['route_path'] = $this->ask('Route path', $default_route_path);\n $vars['route_title'] = $this->ask('Route title', '{raw_form_id|m2h}');\n $vars['route_permission'] = $this->ask('Route permission', $this->defaultPermission);\n\n $this->addFile('{machine_name}.routing.yml')\n ->template('form/routing')\n ->appendIfExists();\n }\n }","title":""},{"docid":"4dba5a58a37eb25fd00c230d6d7aa895","score":"0.59412634","text":"private function _routeAction (){\n \n if ((isset($_GET['add']) || isset($_GET['edit'])) && isset($_GET['save'])){ \n \n $message = EGGallery::save($this->instanceNum);\n $isError = $message ? 1 : '';\n \n if (!$isError)\n $message = i18n_r(EG_ID.'/EDIT_SAVED');\n \n $delete = @$_POST['delete'];\n \n if (!$isError && $delete)\n EGGallery::delete($this->instanceNum, $delete);\n \n EGTools::cleanUnusedThumbs();\n\n redirect('load.php?id='.$this->pluginId.'&edit&name='.$_POST['name'].'&message='.urlencode($message).'&isError='.$isError);\n }\n else if (isset($_GET['conf']) && @$_POST['save']){ //save settings\n if ( EGSettings::save($this->instanceNum) ){\n $message = i18n_r(EG_ID.'/CONF_SAVED');\n $isError = '';\n }\n else{\n $message = i18n_r(EG_ID.'/CONF_SAVE_ERROR');\n $isError = 1;\n }\n \n redirect('load.php?id='.$this->pluginId.'&conf&message='.urlencode($message).'&isError='.$isError);\n } \n \n }","title":""},{"docid":"56c69de761d630891b4c3aee88c67e2e","score":"0.59407765","text":"public function create()\n {\n //\n return view('admin.admin.create');\n }","title":""},{"docid":"7a4fe54fe58b18429747dcb02895e41e","score":"0.59238845","text":"public function run()\n {\n DB::table('routes')->delete();\n\n $admin = Role::userRole(self::SystemAdmin);\n $client_admin = Role::userRole(self::ClientAdmin);\n #### Dashboard\n $dashboard = new Route();\n $dashboard->route_name = 'Dashboard';\n $dashboard->save();\n $dashboard_id = $dashboard->id;\n\n $home = new Route();\n $home->route_name = 'Home';\n $home->url = 'home';\n $home->parent_route = $dashboard_id;\n $home->save();\n $home->roles()->attach($admin);\n $home->roles()->attach($client_admin);\n\n $home = new Route();\n $home->route_name = 'Home';\n $home->url = '/';\n $home->parent_route = $dashboard_id;\n $home->save();\n $home->roles()->attach($admin);\n $home->roles()->attach($client_admin);\n\n #### Dashboard child\n $analytics_dash = new Route();\n $analytics_dash->route_name = 'Analytics Dashboard';\n $analytics_dash->url = 'dashboard';\n $analytics_dash->parent_route = $dashboard_id;\n $analytics_dash->save();\n $analytics_dash->roles()->attach($admin);\n $analytics_dash->roles()->attach($client_admin);\n\n #### registration\n $reg = new Route();\n $reg->route_name = 'Registration';\n $reg->save();\n $reg_id = $reg->id;\n\n #### registration children\n $registration = new Route();\n $registration->route_name = 'User Registration';\n $registration->url = 'registration';\n $registration->parent_route = $reg_id;\n $registration->save();\n $registration->roles()->attach($admin);\n $registration->roles()->attach($client_admin);\n\n //all Registration\n $all_mfs = new Route();\n $all_mfs->route_name = 'All Registration';\n $all_mfs->url = 'all-mfs';\n $all_mfs->parent_route = $reg_id;\n $all_mfs->save();\n $all_mfs->roles()->attach($admin);\n $all_mfs->roles()->attach($client_admin);\n\n //all staff\n $all_staff = new Route();\n $all_staff->route_name = 'All Staff';\n $all_staff->url = 'all-staffs';\n $all_staff->parent_route = $reg_id;\n $all_staff->save();\n $all_staff->roles()->attach($admin);\n $all_staff->roles()->attach($client_admin);\n\n //all clients\n $all_clients = new Route();\n $all_clients->route_name = 'All Clients';\n $all_clients->url = 'all-clients';\n $all_clients->parent_route = $reg_id;\n $all_clients->save();\n $all_clients->roles()->attach($admin);\n $all_clients->roles()->attach($client_admin);\n\n // adding a user\n $add_reg = new Route();\n $add_reg->route_name = 'Add Registration';\n $add_reg->url = 'add-registration';\n $add_reg->parent_route = $reg_id;\n $add_reg->save();\n $add_reg->roles()->attach($admin);\n $add_reg->roles()->attach($client_admin);\n\n // edit user\n $edit_user = new Route();\n $edit_user->route_name = 'Edit User Registration';\n $edit_user->url = 'edit-mf/{id}';\n $edit_user->parent_route = $reg_id;\n $edit_user->save();\n $edit_user->roles()->attach($admin);\n $edit_user->roles()->attach($client_admin);\n\n ### soft delete user registration\n $soft_del = new Route();\n $soft_del->route_name = 'Soft Delete Masterfile';\n $soft_del->url = 'soft-delete-mf/{id}';\n $soft_del->parent_route = $reg_id;\n $soft_del->save();\n $soft_del->roles()->attach($admin);\n $soft_del->roles()->attach($client_admin);\n\n ### inactive users\n $inactive_users = new Route();\n $inactive_users->route_name = 'Inactive Users';\n $inactive_users->url = 'inactive-users';\n $inactive_users->parent_route = $reg_id;\n $inactive_users->save();\n $inactive_users->roles()->attach($admin);\n $inactive_users->roles()->attach($client_admin);\n\n ### permanently delete user\n $delete = new Route();\n $delete->route_name = 'Delete Masterfile Details';\n $delete->url = 'delete-masterfile/{id}';\n $delete->parent_route = $reg_id;\n $delete->save();\n $delete->roles()->attach($admin);\n $delete->roles()->attach($client_admin);\n\n ### restore inactive users\n $restore = new Route();\n $restore->route_name = 'Restore Inactive Users';\n $restore->url = 'restore-mf/{id}';\n $restore->parent_route = $reg_id;\n $restore->save();\n $restore->roles()->attach($admin);\n $restore->roles()->attach($client_admin);\n\n ### users profile\n $profile = new Route();\n $profile->route_name = 'Users Profile';\n $profile->url = 'mf-profile/{id}';\n $profile->parent_route = $reg_id;\n $profile->save();\n $profile->roles()->attach($admin);\n $profile->roles()->attach($client_admin);\n\n ### permanently delete user address\n $del_addr = new Route();\n $del_addr->route_name = 'Delete Users Address Details';\n $del_addr->url = 'delete-address/{id}';\n $del_addr->parent_route = $reg_id;\n $del_addr->save();\n $del_addr->roles()->attach($admin);\n $del_addr->roles()->attach($client_admin);\n\n ### adding a new address for a user\n $add_addr = new Route();\n $add_addr->route_name = 'Add New Address Details';\n $add_addr->url = 'add-address/{id}';\n $add_addr->parent_route = $reg_id;\n $add_addr->save();\n $add_addr->roles()->attach($admin);\n $add_addr->roles()->attach($client_admin);\n\n #### Application\n $app = new Route();\n $app->route_name = 'First Applications';\n $app->save();\n $app_id = $app->id;\n\n #### Application children\n $all_app = new Route();\n $all_app->route_name = 'All First Applications';\n $all_app->url = 'all_applications';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n $all_app = new Route();\n $all_app->route_name = 'Approve Applications';\n $all_app->url = 'approve-applications';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n $all_app = new Route();\n $all_app->route_name = 'Reject Applications';\n $all_app->url = 'reject-applications';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n $all_app = new Route();\n $all_app->route_name = 'Load All Applications';\n $all_app->url = 'all_applications/fas';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n $pend_app = new Route();\n $pend_app->route_name = 'Pending Application';\n $pend_app->url = 'pending_applications';\n $pend_app->parent_route = $app_id;\n $pend_app->save();\n $pend_app->roles()->attach($admin);\n $pend_app->roles()->attach($client_admin);\n\n $pend_app = new Route();\n $pend_app->route_name = 'Loading Pending Application';\n $pend_app->url = 'pending_applications/pending';\n $pend_app->parent_route = $app_id;\n $pend_app->save();\n $pend_app->roles()->attach($admin);\n $pend_app->roles()->attach($client_admin);\n\n $canc_app = new Route();\n $canc_app->route_name = 'Cancelled Application';\n $canc_app->url = 'canceled_applications';\n $canc_app->parent_route = $app_id;\n $canc_app->save();\n $canc_app->roles()->attach($admin);\n $canc_app->roles()->attach($client_admin);\n\n $canc_app = new Route();\n $canc_app->route_name = 'Cancelled Application';\n $canc_app->url = 'canceled_applications/canceled';\n $canc_app->parent_route = $app_id;\n $canc_app->save();\n $canc_app->roles()->attach($admin);\n $canc_app->roles()->attach($client_admin);\n\n $appr_app = new Route();\n $appr_app->route_name = 'Approved Application';\n $appr_app->url = 'approved_applications';\n $appr_app->parent_route = $app_id;\n $appr_app->save();\n $appr_app->roles()->attach($admin);\n $appr_app->roles()->attach($client_admin);\n\n\n $appr_app = new Route();\n $appr_app->route_name = 'Load Approved Application';\n $appr_app->url = 'approved_applications/approved';\n $appr_app->parent_route = $app_id;\n $appr_app->save();\n $appr_app->roles()->attach($admin);\n $appr_app->roles()->attach($client_admin);\n\n\n ##second applications\n $app = new Route();\n $app->route_name = 'Second Applications';\n $app->save();\n $app_id = $app->id;\n //all second applications\n $all_app = new Route();\n $all_app->route_name = 'All Second Applications';\n $all_app->url = 'list-second-application';\n $all_app->parent_route = $app_id;\n $all_app->save();\n $all_app->roles()->attach($admin);\n $all_app->roles()->attach($client_admin);\n\n #### inventory\n $inventory = new Route();\n $inventory->route_name = 'Inventory';\n $inventory->save();\n $inventory_id = $inventory->id;\n\n #### inventory children\n $item = new Route();\n $item->route_name = 'Manage Inventory';\n $item->url = 'manage_inventory';\n $item->parent_route = $inventory_id;\n $item->save();\n $item->roles()->attach($admin);\n $item->roles()->attach($client_admin);\n\n $item = new Route();\n $item->route_name = 'Manage Categories';\n $item->url = 'inventory-categories';\n $item->parent_route = $inventory_id;\n $item->save();\n $item->roles()->attach($admin);\n $item->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Inventory Allocation';\n $category->url = 'all-allocations';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Arrange Menu';\n $category->url = 'arrange-menu';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Get Menu Menu';\n $category->url = 'get-menu/{id}';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'get make';\n $category->url = '/subcats/{id}';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Manage Motorbikes';\n $category->url = '/bikes';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $model = new Route();\n $model->route_name = 'Motorbikes Models';\n $model->url = '/bikes-model';\n $model->parent_route = $inventory_id;\n $model->save();\n $model->roles()->attach($admin);\n $model->roles()->attach($client_admin);\n\n $category = new Route();\n $category->route_name = 'Stock Transactions';\n $category->url = '/stock-transactions';\n $category->parent_route = $inventory_id;\n $category->save();\n $category->roles()->attach($admin);\n $category->roles()->attach($client_admin);\n\n $insurance = new Route();\n $insurance->route_name = 'Bike Insurance';\n $insurance->url = '/bike-insurance/{id}';\n $insurance->parent_route = $inventory_id;\n $insurance->save();\n $insurance->roles()->attach($admin);\n $insurance->roles()->attach($client_admin);\n\n #### client\n $client = new Route();\n $client->route_name = 'Client';\n $client->save();\n $client_id = $client->id;\n\n #### client children\n $acc = new Route();\n $acc->route_name = 'Client Accounts';\n $acc->url = 'client_account';\n $acc->parent_route = $client_id;\n $acc->save();\n $acc->roles()->attach($admin);\n $acc->roles()->attach($client_admin);\n\n $wallet = new Route();\n $wallet->route_name = 'Client Wallet';\n $wallet->url = 'client_wallet';\n $wallet->parent_route = $client_id;\n $wallet->save();\n $wallet->roles()->attach($admin);\n $wallet->roles()->attach($client_admin);\n\n #### service\n $service = new Route();\n $service->route_name = 'Service';\n $service->save();\n $service_id = $service->id;\n\n #### service children\n $service_category = new Route();\n $service_category->route_name = 'Service Category';\n $service_category->url = 'service_category';\n $service_category->parent_route = $service_id;\n $service_category->save();\n $service_category->roles()->attach($admin);\n $service_category->roles()->attach($client_admin);\n\n ### rider wallet Profile\n $wallet = new Route();\n $wallet->route_name = 'Manage My Wallet';\n $wallet->url = 'my-wallet';\n $wallet->parent_route = $reg_id;\n $wallet->save();\n $wallet->roles()->attach($admin);\n $wallet->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Add Service Category';\n $route->url = 'add-sc-cats';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Get Service Category';\n $route->url = 'get-scat-details/{id}';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Update Service Category';\n $route->url = 'edit-sc-cats';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Delete Service Category';\n $route->url = 'delete-scats';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $manage_service = new Route();\n $manage_service->route_name = 'Manage Services';\n $manage_service->url = 'manage_services';\n $manage_service->parent_route = $service_id;\n $manage_service->save();\n $manage_service->roles()->attach($admin);\n $manage_service->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Add Service';\n $route->url = 'add-service';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Update Service';\n $route->url = 'update-service';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Get Service';\n $route->url = 'get-service/{id}';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Delete Service';\n $route->url = 'delete-service';\n $route->parent_route = $service_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n #### bills and payments\n $bp = new Route();\n $bp->route_name = 'Bills and Payment';\n $bp->save();\n $bp_id = $bp->id;\n\n #### service children\n $all_bills = new Route();\n $all_bills->route_name = 'All Bills';\n $all_bills->url = 'all_bills';\n $all_bills->parent_route = $bp_id;\n $all_bills->save();\n $all_bills->roles()->attach($admin);\n $all_bills->roles()->attach($client_admin);\n\n $pending_bills = new Route();\n $pending_bills->route_name = 'Pending Bills';\n $pending_bills->url = 'pending_bills';\n $pending_bills->parent_route = $bp_id;\n $pending_bills->save();\n $pending_bills->roles()->attach($admin);\n $pending_bills->roles()->attach($client_admin);\n\n $all_payments = new Route();\n $all_payments->route_name = 'All Payments';\n $all_payments->url = 'all_payments';\n $all_payments->parent_route = $bp_id;\n $all_payments->save();\n $all_payments->roles()->attach($admin);\n $all_payments->roles()->attach($client_admin);\n\n #### reports\n $reports = new Route();\n $reports->route_name = 'Reports';\n $reports->save();\n $reports_id = $reports->id;\n\n #### service children\n $daily = new Route();\n $daily->route_name = 'Daily Summary Report';\n $daily->url = 'daily_summary_report';\n $daily->parent_route = $reports_id;\n $daily->save();\n $daily->roles()->attach($admin);\n $daily->roles()->attach($client_admin);\n\n $weekly = new Route();\n $weekly->route_name = 'Weekly Summary Reports';\n $weekly->url = 'weekly_summary_report';\n $weekly->parent_route = $reports_id;\n $weekly->save();\n $weekly->roles()->attach($admin);\n $weekly->roles()->attach($client_admin);\n\n $monthly = new Route();\n $monthly->route_name = 'Monthly Summary Reports';\n $monthly->url = 'monthly_summary_report';\n $monthly->parent_route = $reports_id;\n $monthly->save();\n $monthly->roles()->attach($admin);\n $monthly->roles()->attach($client_admin);\n\n #### system\n $system = new Route();\n $system->route_name = 'System';\n $system->save();\n $system_id = $system->id;\n\n #### system children\n $routes = new Route();\n $routes->route_name = 'System Routes';\n $routes->url = 'routes';\n $routes->parent_route = $system_id;\n $routes->save();\n $routes->roles()->attach($admin);\n $routes->roles()->attach($client_admin);\n\n $routes = new Route();\n $routes->route_name = 'Load System Routes';\n $routes->url = 'load-routes';\n $routes->parent_route = $system_id;\n $routes->save();\n $routes->roles()->attach($admin);\n $routes->roles()->attach($client_admin);\n\n $menu = new Route();\n $menu->route_name = 'System Menu';\n $menu->url = 'menu';\n $menu->parent_route = $system_id;\n $menu->save();\n $menu->roles()->attach($admin);\n $menu->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'System Configuration';\n $system_config->url = 'sys-config';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'System Settings';\n $system_config->url = 'load-config';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'Get Route Data';\n $system_config->url = 'get-route/{route_id}';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'Update Route';\n $system_config->url = 'edit-route';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $system_config = new Route();\n $system_config->route_name = 'Load System Configuration';\n $system_config->url = 'load-config';\n $system_config->parent_route = $system_id;\n $system_config->save();\n $system_config->roles()->attach($admin);\n $system_config->roles()->attach($client_admin);\n\n $theme_config = new Route();\n $theme_config->route_name = 'Theme Configuration';\n $theme_config->url = 'theme_config';\n $theme_config->parent_route = $system_id;\n $theme_config->save();\n $theme_config->roles()->attach($admin);\n $theme_config->roles()->attach($client_admin);\n\n $theme_config = new Route();\n $theme_config->route_name = 'Theme Select';\n $theme_config->url = 'theme-select/{theme}';\n $theme_config->parent_route = $system_id;\n $theme_config->save();\n $theme_config->roles()->attach($admin);\n $theme_config->roles()->attach($client_admin);\n\n $get_theme = new Route();\n $get_theme->route_name = 'Get Theme';\n $get_theme->url = 'get-theme';\n $get_theme->parent_route = $system_id;\n $get_theme->save();\n $get_theme->roles()->attach($admin);\n $get_theme->roles()->attach($client_admin);\n\n $backup = new Route();\n $backup->route_name = 'Backup';\n $backup->url = 'backup';\n $backup->parent_route = $system_id;\n $backup->save();\n $backup->roles()->attach($admin);\n $backup->roles()->attach($client_admin);\n\n #### user management\n $user_mngt = new Route();\n $user_mngt->route_name = 'User Management';\n $user_mngt->save();\n $user_mngt_id = $user_mngt->id;\n\n #### user management children\n $all_user = new Route();\n $all_user->route_name = 'All Users';\n $all_user->url = 'all_users';\n $all_user->parent_route = $user_mngt_id;\n $all_user->save();\n $all_user->roles()->attach($admin);\n $all_user->roles()->attach($client_admin);\n\n $roles = new Route();\n $roles->route_name = 'User Roles';\n $roles->url = 'user_roles';\n $roles->parent_route = $user_mngt_id;\n $roles->save();\n $roles->roles()->attach($admin);\n $roles->roles()->attach($client_admin);\n\n $role = new Route();\n $role->route_name = 'Delete User';\n $role->url = 'delete-user/{id}';\n $role->parent_route = $user_mngt_id;\n $role->save();\n $role->roles()->attach($admin);\n $role->roles()->attach($client_admin);\n\n $role = new Route();\n $role->route_name = 'Block User';\n $role->url = 'all_users/block-user';\n $role->parent_route = $user_mngt_id;\n $role->save();\n $role->roles()->attach($admin);\n $role->roles()->attach($client_admin);\n\n $role = new Route();\n $role->route_name = 'Unblock User';\n $role->url = 'all_users/unblock-user';\n $role->parent_route = $user_mngt_id;\n $role->save();\n $role->roles()->attach($admin);\n $role->roles()->attach($client_admin);\n\n $audit_trail = new Route();\n $audit_trail->route_name = 'Audit Trail';\n $audit_trail->url = 'audit_trails';\n $audit_trail->parent_route = $user_mngt_id;\n $audit_trail->save();\n $audit_trail->roles()->attach($admin);\n $audit_trail->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Load Routes Allocation';\n $route->url = 'load-routes-allocation';\n $route->parent_route = $system_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'is Route Allocated';\n $route->url = 'check-allocated-route/{id}';\n $route->parent_route = $system_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Attach Route';\n $route->url = 'attach-route';\n $route->parent_route = $system_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Detach Route';\n $route->url = 'detach-route';\n $route->parent_route = $system_id;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n #### Bills and Payments\n\n $route = new Route();\n $route->route_name = 'Bills And Payments';\n $route->save();\n $bps_parent = $route->id;\n\n $route = new Route();\n $route->route_name = 'Customer Bills';\n $route->url = 'customer-bills';\n $route->parent_route = $bps_parent;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n\n $route = new Route();\n $route->route_name = 'Load Customer Bills';\n $route->url = 'load-customer-bills';\n $route->parent_route = $bps_parent;\n $route->save();\n $route->roles()->attach($admin);\n $route->roles()->attach($client_admin);\n }","title":""},{"docid":"213aa39ce66af928e04eb3976193c064","score":"0.59228444","text":"public function createAction()\n {\n $entity = new Tribunal();\n $request = $this->getRequest();\n $form = $this->createForm(new TribunalType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $entity->setHabilitado(true);\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('tribunal_show', array('id' => $entity->getId(),\n 'status' => $this->container->getParameter('EXITO_REGISTRO'),)));\n \n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'status' => $this->container->getParameter('FALLO_REGISTRO'),\n );\n }","title":""},{"docid":"7efee3cf28cb6822bf9b5f4fc8e3ccaa","score":"0.59221256","text":"public function create()\n {\n Gate::authorize('rutapermiso', [[\"clienteguardar\"]]);\n }","title":""},{"docid":"a32833fef2cec57673ac7cc5ab537079","score":"0.5915183","text":"public function create()\n {\n //\n Admin::where('')->get();\n $admin = new Admin();\n $admin->name = 1;\n $admin->save();\n }","title":""},{"docid":"d0598527ff1e690d336eb4a62bae820e","score":"0.59144527","text":"public function create()\n {\n abort(404, 'The resource you are looking for could not be found');\n }","title":""},{"docid":"5ec1a6f6493b74e9945ca522b9ecd18a","score":"0.5911293","text":"public function postCreate()\n\t\t{\n\n\n\t\t\t//si todo esta bien guardamos los datos\n\t\t\t$test = new Test;\n\t\t\t$test->users_id = Input::get('userAdmin');\n\t\t\t$test->estado = Input::get('estado');\n\t\t\t$form = DB::table('formularios')->where('nombre',Input::get('formulario'))->first();\n\t\t\t$test->form_id = $form->id; \n\n\t\t\t//$app = Input::get('aplicacion');\n\t\t\t$app = DB::table('aplicaciones')->where('nombre',Input::get('aplicacion'))->first();\n\t\t\t$test->app_id = $app->id;\n\t\t\t//guardamos\n\t\t\t$test->save();\n\n\t\t\t//redirigimos a partisipantes\n\t\t\treturn Redirect::to('tests')->with('status', 'ok_create');\n\n\t\t}","title":""},{"docid":"c0e93c9855cc35b1e6519605f5d81bb4","score":"0.5909618","text":"public function create()\n {\n return '{\"status\":\"Route is not available\"}';\n }","title":""},{"docid":"591a2bc9e3f0d307e1fd82ab33c5ecda","score":"0.5909415","text":"public function create()\n {\n //dd($this->accessLevel->getRouteList());\n $data['permissions'] = $this->accessLevel->getRouteList();\n return view('access_level.create', $data);\n }","title":""},{"docid":"b3fa61e6df83d790d3a43be967aca94b","score":"0.59054893","text":"public function create_admin()\n\t{\n\t\t//GET REQUIRED DATA FROM DB\n\t\t$data['data_admin']\t\t= $this->AdminModel->tb_admin()->result();\n\t\t$data['data_photographer']\t\t= $this->AdminModel->tb_photographer()->result();\n\t\t$data['data_clerk']\t\t= $this->AdminModel->tb_clerk()->result();\n\t\t$data['data_customer']\t= $this->AdminModel->tb_customer()->result();\n\n\t\t\n\t\t$nav_data['page_name'] \t\t\t= \"users\";\n\n\t\t$this->load->view('admin/admin_required_pages/nav', $nav_data );\n\n\t\t$this->load->view('admin/Va_admin-create', $data);\n\t}","title":""},{"docid":"5776398ee6b553cd026dcf6a17515884","score":"0.5904952","text":"public function create()\n {\n //create\n }","title":""},{"docid":"48d5964b42bfbb774d8b11242f3a11e1","score":"0.59048104","text":"public function create()\n {\n return redirect('admin/drivers')->with('message', 'Opps not found!');\n //return view('admin.drivers.create');\n }","title":""},{"docid":"000eb5de9f41e4010eeaf14979800d3e","score":"0.5903924","text":"public function create()\n {\n return view(\"admin/teacher/add\");\n }","title":""},{"docid":"ebb2f77543d952f08a9a65ef6909f219","score":"0.590243","text":"public function create()\n { \n $data = [\n 'trip' => null,\n 'action' => 'create'\n ];\n return view('admin.content.trips.create', $data);\n }","title":""}],"string":"[\n {\n \"docid\": \"c1822c40947a437080483796e72e4471\",\n \"score\": \"0.73166287\",\n \"text\": \"public function create()\\n {\\n //Not Used because using API Route\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63cd30631c266249d26f922c6e0613d9\",\n \"score\": \"0.6722936\",\n \"text\": \"public function create()\\n {\\n return \\\\redirect()->route('admin-unit.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"875a08dcafb13ec8526702b4b352a9e0\",\n \"score\": \"0.66605693\",\n \"text\": \"public function create()\\n {\\n //\\n return redirect(\\\"/admin\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"beea0e830fd79e908936bdb57901fe0a\",\n \"score\": \"0.656376\",\n \"text\": \"public function create()\\n {\\n return view(\\\"auth.admin.crear\\\")->with([\\\"formulario\\\"=>\\\"I\\\",\\n \\\"type\\\"=>\\\"A\\\",\\n 'idnamereferido'=>'id_referido',\\n 'urlreferido'=>'listardiferidos'])->with(self::url());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b85ed9fd2de02a148ae6ca8245ca449e\",\n \"score\": \"0.6563708\",\n \"text\": \"private function add(): Route {\\n return new Route(\\n '/admin/content/team-member/add',\\n [\\n '_entity_form' => 'team_member.add',\\n '_title' => 'Add Team Member',\\n ],\\n [\\n '_entity_create_access' => 'team_member',\\n ]\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"143b2920f785561a514e988dc243c052\",\n \"score\": \"0.6476957\",\n \"text\": \"public function create()\\n {\\n return \\\"create admin\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1204fc46c860e6890178df7a59aa4242\",\n \"score\": \"0.64362675\",\n \"text\": \"public function create()\\n {\\n echo ('estamos dentro de la pagina de create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa656876603f62b659d8c11c3a67ad91\",\n \"score\": \"0.6415722\",\n \"text\": \"public static function create() {\\n if (!Session::is_admin()) {\\n $controller = 'Accueil';\\n $view = 'listVide';\\n $pagetitle = 'Error Accès';\\n require File::build_path(array(\\\"view\\\", \\\"view.php\\\"));\\n } else {\\n\\n $action = 'created';\\n\\n $titre = 'Ajout';\\n\\n $controller = 'Accueil';\\n $view = 'create';\\n $pagetitle = 'Formulaire d\\\\'ajout - COPO-Dashboard';\\n\\n require File::build_path(array(\\\"view\\\", \\\"view.php\\\"));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d18e76d8a332aa47d0c247184e76c1ec\",\n \"score\": \"0.6404609\",\n \"text\": \"public function create()\\n {\\n return redirect(route('interalliances.origin'));\\n //return view('alianzas.create');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e77ce2056b03d80b21765cc9c07ce763\",\n \"score\": \"0.6400376\",\n \"text\": \"public function admin_create()\\n {\\n return view(\\\"admin.admin_create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55c3967e8d449fc4b68b5e36c23741f4\",\n \"score\": \"0.63878417\",\n \"text\": \"public function create()\\n {\\n return redirect('admin/bedrijven');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f0e486a896727167bdc98f63362e274\",\n \"score\": \"0.63780165\",\n \"text\": \"public function create()\\n {\\n return \\\\redirect()->route('akuntansi.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53fbf76c55f95705146675ca8331da19\",\n \"score\": \"0.6325153\",\n \"text\": \"public function create()\\n {\\n //return view('admin::create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e218a70d7e85937a0bdc05e1a74bcb84\",\n \"score\": \"0.6319202\",\n \"text\": \"public function create()\\n {\\n if(User::isAdmin()){\\n $agents = Agents::all();\\n return view('destinations.create')->with('agents', $agents);\\n }else{\\n return redirect('destinations')->with('message', 'You are not authorized to use this action');\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f408d7ab79a2ac5fab5029669a5cdb9b\",\n \"score\": \"0.63178736\",\n \"text\": \"public function create()\\n {\\n //\\n if (Auth::user()->role_id == 4){\\n return view('internal.admin.nuevoTransportista');\\n }\\n elseif (Auth::user()->role_id == 6){\\n return view('internal.usuarioIntermediario.nuevoTransportista');\\n }\\n\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"852475260732488ab203fdea91e59376\",\n \"score\": \"0.6316322\",\n \"text\": \"public function create()\\n {\\n //CREATE\\n return view('admin.flight.create');\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8462ff8b1bec51f4315773aab70e2a1e\",\n \"score\": \"0.63009566\",\n \"text\": \"public function create()\\n {\\n\\n return redirect('admin/activiteiten');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc4804b4fa8b134d57a60d056170defa\",\n \"score\": \"0.6271565\",\n \"text\": \"public function createAction()\\n {\\n $request = $this->getRequest();\\n $type = $this->_getParam('type');\\n if ($type === 'new') {\\n $this->_helper->redirector('create-new-club', 'clubs', 'default');\\n } elseif ($type === 'import') {\\n echo \\\"lol\\\";//$this->_forward('createeClub');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c860d50db5c95522d58ad442b93ef3ef\",\n \"score\": \"0.6266376\",\n \"text\": \"public function criarAction()\\n {\\n if($this->usuario['tp_id']==5){\\n $this->_redirect('index');\\n }\\n $this->modeloTipoTelefone->insert($this->_getAllParams());\\n\\n $this->_redirect('tipo-telefone/index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a42044db6b652224a94e3d4c263b7ed\",\n \"score\": \"0.6257809\",\n \"text\": \"public function create()\\n {\\n if (auth()->user()->hasRole('admin')) {\\n return view('restorants.create');\\n } else {\\n return redirect()->route('orders.index')->withStatus(__('No Access'));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edc9554aeade5db451d41210d88881fe\",\n \"score\": \"0.62358147\",\n \"text\": \"public function create()\\n {\\n //\\n return view('admin.tour.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55dd34a5d9124ff705e9225ffc5faea5\",\n \"score\": \"0.62348175\",\n \"text\": \"public function createAction()\\n {\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a09bbb12e12398e520aa1261c967033\",\n \"score\": \"0.62244225\",\n \"text\": \"public function create()\\n {\\n\\n// return view('system/admin/admin');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd3d017227ff2c8618bd6581918a9e6f\",\n \"score\": \"0.62129974\",\n \"text\": \"public function actionCreate() {\\n \\n $this->redirect(array('index'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef68007de1d99cb4e05ffb3424609095\",\n \"score\": \"0.6211619\",\n \"text\": \"public function createRoute()\\n {\\n if ($this->mapType !== 'country' && $this->mapType !== 'hotel') {\\n $this->endPos=trim($this->destination->longtiude).','.trim($this->destination->latitude);\\n // dd($this->endPos);\\n }\\n if ($this->currentUserLocation) {\\n $this->emit('createRoute',['startPos'=> $this->currentUserLocation , 'endPos'=>$this->endPos]);\\n return;\\n }\\n // \\\\dd($this->hotelLocation);\\n $this->emit('createRoute',['startPos'=> $this->hotelLocation , 'endPos'=>$this->endPos]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8272d500912f094daae0cc98a0d36e81\",\n \"score\": \"0.6192516\",\n \"text\": \"public function create()\\n {\\n return redirect(route('vinyls.show', $vinyl));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"172694fc8b2b676de78bcc91bacfcbd1\",\n \"score\": \"0.6191427\",\n \"text\": \"public function create()\\n {\\n // add by dandisy\\n \\n\\n // edit by dandisy\\n //return view('admin.testlagis.create');\\n return view('admin.testlagis.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a17b273cd652ac87ae454286173a50a\",\n \"score\": \"0.61888534\",\n \"text\": \"public function createAction()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0705f824eef3f3baa9bacfde6a2dcfa5\",\n \"score\": \"0.6186932\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\tif(Auth::user()->user_role == 'Admin'){\\n\\n //Find all steps\\n $steps = Steps::all();\\n\\n\\n\\t\\tReturn View::make('steps.create')->with(['steps' => $steps]);\\n\\t\\t}\\n\\t\\telse{\\n\\t\\tReturn \\\"Not Authorized!\\\";\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5e1f4781dabe8055716efb645cb9e3a\",\n \"score\": \"0.6183511\",\n \"text\": \"public function url()\\n {\\n return '/admin/system_localization/create';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"678d3c708dbf19deb4f7e277379bb78c\",\n \"score\": \"0.6182145\",\n \"text\": \"public function create()\\n {\\n if(Gate::denies(\\\"edit-parameter\\\")){\\n abort(403,\\\"No tienes permisos para realizar esta acción\\\");\\n }\\n return view('configuracion.plan.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e800e43971b3890716e1d39ea6d38fe2\",\n \"score\": \"0.6179707\",\n \"text\": \"protected function createRoute()\\n {\\n $name = $this->argument('name');\\n $this->callSilent('make:bundle:route', [\\n 'name' => $this->getBundleName($name),\\n '--namespace' => $this->relativeNamespace,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7ce5b8555a2a7962e5cd8c90ba74d0e\",\n \"score\": \"0.6161956\",\n \"text\": \"abstract public function actionCreate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c6e62e918551c2ab6aa17e40d5a4e09\",\n \"score\": \"0.6161519\",\n \"text\": \"public function actionCreate()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"808c84a8873908e209c582ca3f812a25\",\n \"score\": \"0.61548203\",\n \"text\": \"public function create()\\n {\\n // dd('create ');\\n return view('TravConstruction.create');\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"537bc981837ab4f40f39b23dc29e4c52\",\n \"score\": \"0.6146379\",\n \"text\": \"public function create()\\n {\\n return view(\\\"/admin/create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20291f81863c9e4bf10aad08bdc9abdc\",\n \"score\": \"0.6135495\",\n \"text\": \"protected function setupCreateOperation()\\n {\\n CRUD::addField(['name' => 'sitemap', 'type' => 'custom_html', 'value' => 'Sitemap sẽ được lưu tại đường dẫn: ' . url('/sitemap.xml') . '']);\\n $this->crud->addSaveAction([\\n 'name' => 'save_and_new',\\n 'redirect' => function ($crud, $request, $itemId) {\\n return $crud->route;\\n },\\n 'button_text' => 'Tạo sitemap',\\n ]);\\n\\n $this->crud->setOperationSetting('showSaveActionChange', false);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"925e3ae8a09f60ea52a6ea8d57e248c7\",\n \"score\": \"0.61314976\",\n \"text\": \"public function create()\\n {\\n return redirect()->route('ware-completed.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8edeaa1c8f7fe877c8db184f2542a0a\",\n \"score\": \"0.61277485\",\n \"text\": \"public function create() {\\n\\t\\t// if guest or cannot tote.create, redirect -> home\\n\\t\\tif(Entrust::can('tote.create') == false) return redirect()->route('home');\\n\\n\\t\\treturn view('pages.tote.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcb7ed33753003bacddad2292e02575d\",\n \"score\": \"0.611909\",\n \"text\": \"public function create()\\n {\\n $route = self::ROUTE;\\n return view(self::FOLDER.\\\"create\\\", compact(\\\"route\\\"));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3189a6b1dd06fcfb1524d9f747398e82\",\n \"score\": \"0.61164814\",\n \"text\": \"public function createAction()\\n {\\n $templateKey = 'edit';\\n\\n if (false === $this->admin->isGranted('CREATE')) {\\n throw new AccessDeniedException();\\n }\\n\\n $object = $this->admin->getNewInstance();\\n\\n // Добавляем родительский отзыв, если передали а параметрах\\n $em = $this->getDoctrine()->getManager();\\n $GET = $this->get('request')->query;\\n $parentId = $GET->get('review_parent_id');\\n if ($parentId > 0) {\\n $parent = $em->getRepository('CoreReviewBundle:Review')->find($parentId);\\n if (null !== $parent) {\\n $object->setParent($parent);\\n\\n // Добавляем продукт в отзыв\\n $productId = $GET->get('review_product_id');\\n if ($productId > 0) {\\n $product = $em->getRepository('CoreProductBundle:CommonProduct')->find($productId);\\n if (null !== $product) {\\n $object->setProduct($product);\\n }\\n }\\n }\\n }\\n\\n $this->admin->setSubject($object);\\n\\n /** @var $form \\\\Symfony\\\\Component\\\\Form\\\\Form */\\n $form = $this->admin->getForm();\\n $form->setData($object);\\n\\n if ($this->getRestMethod() == 'POST') {\\n $form->bind($this->get('request'));\\n\\n $isFormValid = $form->isValid();\\n\\n // persist if the form was valid and if in preview mode the preview was approved\\n if ($isFormValid && (!$this->isInPreviewMode() || $this->isPreviewApproved())) {\\n $this->admin->create($object);\\n\\n if ($this->isXmlHttpRequest()) {\\n return $this->renderJson(array(\\n 'result' => 'ok',\\n 'objectId' => $this->admin->getNormalizedIdentifier($object)\\n ));\\n }\\n\\n $this->addFlash('sonata_flash_success', $this->admin->trans('flash_create_success', array('%name%' => $this->admin->toString($object)), 'SonataAdminBundle'));\\n\\n // redirect to edit mode\\n return $this->redirectTo($object);\\n }\\n\\n // show an error message if the form failed validation\\n if (!$isFormValid) {\\n if (!$this->isXmlHttpRequest()) {\\n $this->addFlash('sonata_flash_error', $this->admin->trans('flash_create_error', array('%name%' => $this->admin->toString($object)), 'SonataAdminBundle'));\\n }\\n } elseif ($this->isPreviewRequested()) {\\n // pick the preview template if the form was valid and preview was requested\\n $templateKey = 'preview';\\n $this->admin->getShow();\\n }\\n }\\n\\n $view = $form->createView();\\n\\n // set the theme for the current Admin Form\\n $this->get('twig')->getExtension('form')->renderer->setTheme($view, $this->admin->getFormTheme());\\n\\n return $this->render($this->admin->getTemplate($templateKey), array(\\n 'action' => 'create',\\n 'form' => $view,\\n 'object' => $object,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c803ffa8b63157347188a1b04e6c3c48\",\n \"score\": \"0.6109311\",\n \"text\": \"public function create(){\\n // return view($this->path . 'create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"abb145d9e6711e58ebb7ffcd4d6f8d1a\",\n \"score\": \"0.61084145\",\n \"text\": \"public function create()\\n { return redirect('/Properties');}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe69aec8fe3691d1075c43fecde83cd2\",\n \"score\": \"0.60996044\",\n \"text\": \"public function createAction()\\n {\\n $this->apiException(\\n 'This method is not allowed!',\\n Response::HTTP_METHOD_NOT_ALLOWED\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a39f78b7fe898b769676ff367d4e9889\",\n \"score\": \"0.6095418\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\t$data = [\\n\\t\\t\\t'title' => $this->IFP_Sprt(__METHOD__),\\n\\t\\t\\t'breadcrumb' => [\\n\\t\\t\\t\\t'Admin' => '/admin',\\n\\t\\t\\t\\t'Create' => ''\\n\\t\\t\\t],\\n\\t\\t\\t'user' => session('login'),\\n\\t\\t];\\n\\t\\treturn view('admin/admin-create', compact('data'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7dc6509881b42f2c5c795f112e45f4ea\",\n \"score\": \"0.60943913\",\n \"text\": \"public function create()\\n {\\n //\\n return view(\\\"admin.rule.create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f4459370afbf19e3e19214ae6db1790\",\n \"score\": \"0.6075212\",\n \"text\": \"public function routeToAddMember() {\\n if($this->memberView->isSocialSecurityValid() && $this->memberView->checkSocialSecurityLength()) {\\n $this->memberModel->reciveMemberData($this->memberView->getName(), $this->memberView->getSocialSecurity());\\n $this->memberModel->addNewMemberToDatabase();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c64ec6529ab96548ee16fe41307b384\",\n \"score\": \"0.60700655\",\n \"text\": \"public function create()\\n\\t{\\n\\t \\n\\t \\n\\t return view('admin.teampage.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4861666a5dc4b407f63a4216f831181\",\n \"score\": \"0.60578406\",\n \"text\": \"public function create()\\n {\\n if(!Gate::allows('admin_processing_create')) {\\n abort('401');\\n }\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb41df029bd74c081c3079d7d4cf653f\",\n \"score\": \"0.60566837\",\n \"text\": \"public function create()\\n {\\n //\\n return response(\\\"\\\",405);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc56155417fc85cd4b5ad01b07c801c7\",\n \"score\": \"0.6051255\",\n \"text\": \"public function createPost(){\\n\\t\\t\\t$this->modelCreate();\\n\\t\\t\\t//quay tro lai trang quytac\\n\\t\\t\\theader(\\\"location:index.php?controller=quytac\\\");\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a16417d1f9368bc0fb8f206cb13527d6\",\n \"score\": \"0.60422915\",\n \"text\": \"public function create()\\n {\\n echo 'create';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1fbf111c740174ca185ac37a5f71380\",\n \"score\": \"0.6038764\",\n \"text\": \"public function create()\\n {\\n //\\n return \\\"create method to show form\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d17d7f1d76f5a33ee6b2fd1fbeafe6ba\",\n \"score\": \"0.60356516\",\n \"text\": \"public function create()\\n {\\n return view('admin.navigate.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3145e6c27a92e6fcd8097fd97d07ca1\",\n \"score\": \"0.6031166\",\n \"text\": \"public function create()\\n {\\n return redirect()->route('index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7aa9eaf9cbcd24c3d35a810ec557e448\",\n \"score\": \"0.60135484\",\n \"text\": \"public function create()\\n {\\n $routesModel = \\\\App\\\\Route::where('except', '<>', 1)->get();\\n\\n $routes = [];\\n\\n foreach ($routesModel as $route) {\\n $routes[$route->id] = '[' . $route->method . '] ' . $route->path;\\n }\\n\\n return view('admin.permission.create')->with(['permission' => new Permission(), 'routes' => $routes, 'selected' => []]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fab2925b5ff7b1c2e848b9dbae6f712d\",\n \"score\": \"0.60081345\",\n \"text\": \"public function create()\\n {\\n return redirect()->route(\\\"admin.transaction-category.index\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad7562b8363fb1117d45c593a7a5e930\",\n \"score\": \"0.6006885\",\n \"text\": \"public function actionCreate()\\n {\\n $model = new User();\\n\\n if (Yii::$app->request->isPost) {\\n $tempPassword = '';\\n $model->load(Yii::$app->request->post());\\n $tempPassword = $model->password_hash;\\n $security = new Security();\\n $model->password_hash = $security->generatePasswordHash($model->password_hash);\\n $model->auth_key = $security->generateRandomString();\\n\\n $devices = Devices::findOne($model->devices_id);\\n $devices->devicesstatus = 1;\\n $devices->save();\\n $model->save();\\n User::mikrotikAdd($model, $tempPassword);\\n $action = new Actionlist();\\n $action->user_id = Yii::$app->user->identity->id;\\n $action->action = 'Добавление';\\n $action->parameters = $model->id ;\\n $action->route = $this->route;\\n $action->date = date('Y-m-d H-i-s');\\n $action->save();\\n /*-----------------------------------------------------------------------------*/\\n// $service = Connection::findOne($model->connection_id);\\n// $profile = Tariffs::findOne($model->tariffs_id);\\n// try {\\n// $client = new RouterOS\\\\Client('192.168.1.100', 'admin', 'admin');\\n// } catch (Exception $e) {\\n// die('Unable to connect to the router.');\\n// }\\n//\\n// $addRequest = new RouterOS\\\\Request('/ppp/secret/add');\\n//\\n//// $addRequest->setArgument('name', 'MIKROVBROS');\\n// $addRequest->setArgument('name', $model->username);\\n// $addRequest->setArgument('service', $service->nameconnection);\\n// $addRequest->setArgument('profile', $profile->name);\\n//// $addRequest->setArgument('mac-address', '00:00:00:00:00:01');\\n// if ($client->sendSync($addRequest)->getType() !== RouterOS\\\\Response::TYPE_FINAL) {\\n// die(\\\"Error when creating ARP entry for 'Yii'\\\");\\n// }\\n /*-----------------------------------------------------------------------------*/\\n\\n\\n\\n return $this->redirect(['view', 'id' => $model->id]);\\n } else {\\n return $this->render('create', [\\n 'model' => $model,\\n ]);\\n }\\n\\n\\n\\n// if ($model->load(Yii::$app->request->post())) {\\n// $security = new Security();\\n// $user = new User();\\n// $user->status = '10';\\n// $user->password_hash = $security->generatePasswordHash(Yii::$app->request->post('password_hash'));\\n// $user->auth_key = $user->generateAuthKey();\\n//\\n// $user->save(); die();\\n// //echo $user->password_hash; die();\\n//\\n// return $this->redirect(['view', 'id' => $model->id]);\\n// } else {\\n// return $this->render('create', [\\n// 'model' => $model,\\n// ]);\\n// }\\n\\n// if ($model->load(Yii::$app->request->post())) {\\n// $security = new Security();\\n// $model->password_hash = $security->generatePasswordHash($model->password_hash);\\n// $model->auth_key = $model->generateAuthKey();\\n// $model->save();\\n// return $this->redirect(['/admin/user/index']);\\n// //return $this->redirect(['view', 'id' => $model->id]);\\n// } else {\\n// return $this->render('create', [\\n// 'model' => $model,\\n// ]);\\n// }\\n\\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\\n// return $this->redirect(['view', 'id' => $model->id]);\\n// } else {\\n// return $this->render('create', [\\n// 'model' => $model,\\n// ]);\\n// }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d95d4eb33939c4799aed8ed01aa7149c\",\n \"score\": \"0.6002912\",\n \"text\": \"public function create() // delete later\\n {\\n return redirect('/home');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a93c41870ee29d34e19bb91778eb320\",\n \"score\": \"0.6001153\",\n \"text\": \"public function create()\\n { \\n return Redirect::route('dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85d95900dcd2c27c2888a7e17000cabc\",\n \"score\": \"0.59998363\",\n \"text\": \"public function create()\\n {\\n echo \\\"create\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf33d388ce1cedc22fdbd54b84e92107\",\n \"score\": \"0.59975076\",\n \"text\": \"public function create()\\n {\\n //RESTfullのため必要ない\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fd41716f6f0bc8b9ab44bac42047abe\",\n \"score\": \"0.59974295\",\n \"text\": \"public function create()\\n {\\n return 'create';\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e793c546096eed9d3ed458d5437f3d84\",\n \"score\": \"0.5986522\",\n \"text\": \"public function create()\\n {\\n //\\n return view ('theme.admin.create_admin');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"634ca3c15e7c1be77ababe20088ac619\",\n \"score\": \"0.5984883\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\tif(Auth::user()->type=='admin'){\\n\\t\\t\\t$term_types=TermType::all();\\n\\t\\t\\t$array=['active'=>'cont','term_types'=>$term_types];\\n\\t\\t\\treturn view('contractor.add',$array);\\n\\t\\t}else{\\n\\t\\t\\tabort('404');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd64183a46e78180f8ce10e516b94f5e\",\n \"score\": \"0.5983227\",\n \"text\": \"public function create()\\n {\\n //\\n \\n\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c93605cb0700088224295f97b2883b6b\",\n \"score\": \"0.5980933\",\n \"text\": \"public function create()\\n {\\n $this->auth->restrict($this->permissionCreate);\\n $this->edit();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ad4e21b1afe25e5bfe3bf1f8ba95d1f\",\n \"score\": \"0.59807724\",\n \"text\": \"public function actionCreatePartner() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48426499a17a8679735e2a3b9faa12cc\",\n \"score\": \"0.5968407\",\n \"text\": \"public function create()\\n {\\n //return add page\\n return view('admin.special_offer.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86417db685197853b614963fa0f79e99\",\n \"score\": \"0.5968116\",\n \"text\": \"public function create()\\n {\\n return redirect(route('home'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"000c8f502258a84e7e55ec49429b8e73\",\n \"score\": \"0.5967478\",\n \"text\": \"public function create()\\n {\\n //\\n if(auth()->user()->can('create',Resturant::class)){\\n return view('resturant.create');\\n }\\n else{\\n abort(401);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"393e6fecd3f2d6fd9126234eb814d34b\",\n \"score\": \"0.59658325\",\n \"text\": \"public function create()\\n {\\n return view('testingadmin.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b5690872df3df971493709b5785ce77\",\n \"score\": \"0.5957629\",\n \"text\": \"public function create()\\n {\\n $this->authorize('permission_admin');\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"419d2c512038ccd476fa0cec4612d045\",\n \"score\": \"0.5953912\",\n \"text\": \"public function create()\\n\\n { if (Auth::user() -> Hasrole('admin')) {\\n $lugares=Lugar::all();\\n return view('eventos.create',compact('lugares'));\\n }}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8cb6e3a63a9fcc7e109ca9e2fa80c74e\",\n \"score\": \"0.59529644\",\n \"text\": \"public function create()\\n {\\n //$this->isAuthorized('lead.create');\\n Breadcrumbs::addCrumb('Create');\\n Title::setSemiBold('New Lead');\\n Title::useLeftArrow(true);\\n return view('admin.lead.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6cdf2a5aa2e70ffee6e2ae05c6d79ef7\",\n \"score\": \"0.5951884\",\n \"text\": \"public function create()\\n {\\n return \\\\view('admin.destination.destinationCreate');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c28a660d85a2c6310cdc4b08fb8b4ba8\",\n \"score\": \"0.5951493\",\n \"text\": \"public function create(){\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c28a660d85a2c6310cdc4b08fb8b4ba8\",\n \"score\": \"0.5951493\",\n \"text\": \"public function create(){\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"279742eece56f3fab333ec3df93117a3\",\n \"score\": \"0.59512526\",\n \"text\": \"public function actionCreate()\\n {\\n $this->getView()->pageTitle = 'Добавить направление';\\n $this->getBreadCrumbs();\\n $model = new PtmDirection();\\n\\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\\n return $this->redirect(['index']);\\n } else {\\n return $this->render('create', [\\n 'model' => $model,\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f77ffd5ea29dfba2ff3dcf612cd715a\",\n \"score\": \"0.5947417\",\n \"text\": \"public function create() {\\n\\t\\tsession(['tabpanel' => 'create']);\\n\\n\\t\\treturn redirect()->route('constants.index');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b00c305458cbbed53d99841c01a98bd2\",\n \"score\": \"0.59466\",\n \"text\": \"public function create()\\n {\\n if (Auth::user()->role == 'admin') {\\n $vehicle = Vehicle::where('status', 'available')->get();\\n $spv = User::where('role', 'supervisor')->get();\\n $pool = User::where('role', 'pool-officer')->get();\\n\\n return view('admin.trx-create', compact('vehicle', 'spv', 'pool'));\\n }\\n\\n abort(403);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f6cf047e9eb43ff3c97641e73f8538f\",\n \"score\": \"0.5944559\",\n \"text\": \"public function create()\\n {\\n //\\n return view('admin.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f6cf047e9eb43ff3c97641e73f8538f\",\n \"score\": \"0.5944559\",\n \"text\": \"public function create()\\n {\\n //\\n return view('admin.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31f8e9b35ccb166754f8f81a138234bc\",\n \"score\": \"0.59429324\",\n \"text\": \"function Create(){\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72e118a2e9998dc8bf664c92f4f25bf4\",\n \"score\": \"0.59425086\",\n \"text\": \"public function create()\\n {\\n $destination = DB::table('destinations')->get();\\n return view('route.create', compact('destination'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fc9cf4396c45c5d1b9a11ab1cecc70d\",\n \"score\": \"0.59415174\",\n \"text\": \"protected function generateRoute(array &$vars): void {\\n $vars['route'] = $this->confirm('Would you like to create a route for this form?');\\n if ($vars['route']) {\\n $this->defaultPathPrefix = $this->defaultPathPrefix ?: '/' . $vars['machine_name'];\\n $default_route_path = \\\\str_replace('_', '-', $this->defaultPathPrefix . '/' . $vars['raw_form_id']);\\n $vars['route_name'] = $this->ask('Route name', '{machine_name}.' . $vars['raw_form_id']);\\n $vars['route_path'] = $this->ask('Route path', $default_route_path);\\n $vars['route_title'] = $this->ask('Route title', '{raw_form_id|m2h}');\\n $vars['route_permission'] = $this->ask('Route permission', $this->defaultPermission);\\n\\n $this->addFile('{machine_name}.routing.yml')\\n ->template('form/routing')\\n ->appendIfExists();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4dba5a58a37eb25fd00c230d6d7aa895\",\n \"score\": \"0.59412634\",\n \"text\": \"private function _routeAction (){\\n \\n if ((isset($_GET['add']) || isset($_GET['edit'])) && isset($_GET['save'])){ \\n \\n $message = EGGallery::save($this->instanceNum);\\n $isError = $message ? 1 : '';\\n \\n if (!$isError)\\n $message = i18n_r(EG_ID.'/EDIT_SAVED');\\n \\n $delete = @$_POST['delete'];\\n \\n if (!$isError && $delete)\\n EGGallery::delete($this->instanceNum, $delete);\\n \\n EGTools::cleanUnusedThumbs();\\n\\n redirect('load.php?id='.$this->pluginId.'&edit&name='.$_POST['name'].'&message='.urlencode($message).'&isError='.$isError);\\n }\\n else if (isset($_GET['conf']) && @$_POST['save']){ //save settings\\n if ( EGSettings::save($this->instanceNum) ){\\n $message = i18n_r(EG_ID.'/CONF_SAVED');\\n $isError = '';\\n }\\n else{\\n $message = i18n_r(EG_ID.'/CONF_SAVE_ERROR');\\n $isError = 1;\\n }\\n \\n redirect('load.php?id='.$this->pluginId.'&conf&message='.urlencode($message).'&isError='.$isError);\\n } \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56c69de761d630891b4c3aee88c67e2e\",\n \"score\": \"0.59407765\",\n \"text\": \"public function create()\\n {\\n //\\n return view('admin.admin.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a4fe54fe58b18429747dcb02895e41e\",\n \"score\": \"0.59238845\",\n \"text\": \"public function run()\\n {\\n DB::table('routes')->delete();\\n\\n $admin = Role::userRole(self::SystemAdmin);\\n $client_admin = Role::userRole(self::ClientAdmin);\\n #### Dashboard\\n $dashboard = new Route();\\n $dashboard->route_name = 'Dashboard';\\n $dashboard->save();\\n $dashboard_id = $dashboard->id;\\n\\n $home = new Route();\\n $home->route_name = 'Home';\\n $home->url = 'home';\\n $home->parent_route = $dashboard_id;\\n $home->save();\\n $home->roles()->attach($admin);\\n $home->roles()->attach($client_admin);\\n\\n $home = new Route();\\n $home->route_name = 'Home';\\n $home->url = '/';\\n $home->parent_route = $dashboard_id;\\n $home->save();\\n $home->roles()->attach($admin);\\n $home->roles()->attach($client_admin);\\n\\n #### Dashboard child\\n $analytics_dash = new Route();\\n $analytics_dash->route_name = 'Analytics Dashboard';\\n $analytics_dash->url = 'dashboard';\\n $analytics_dash->parent_route = $dashboard_id;\\n $analytics_dash->save();\\n $analytics_dash->roles()->attach($admin);\\n $analytics_dash->roles()->attach($client_admin);\\n\\n #### registration\\n $reg = new Route();\\n $reg->route_name = 'Registration';\\n $reg->save();\\n $reg_id = $reg->id;\\n\\n #### registration children\\n $registration = new Route();\\n $registration->route_name = 'User Registration';\\n $registration->url = 'registration';\\n $registration->parent_route = $reg_id;\\n $registration->save();\\n $registration->roles()->attach($admin);\\n $registration->roles()->attach($client_admin);\\n\\n //all Registration\\n $all_mfs = new Route();\\n $all_mfs->route_name = 'All Registration';\\n $all_mfs->url = 'all-mfs';\\n $all_mfs->parent_route = $reg_id;\\n $all_mfs->save();\\n $all_mfs->roles()->attach($admin);\\n $all_mfs->roles()->attach($client_admin);\\n\\n //all staff\\n $all_staff = new Route();\\n $all_staff->route_name = 'All Staff';\\n $all_staff->url = 'all-staffs';\\n $all_staff->parent_route = $reg_id;\\n $all_staff->save();\\n $all_staff->roles()->attach($admin);\\n $all_staff->roles()->attach($client_admin);\\n\\n //all clients\\n $all_clients = new Route();\\n $all_clients->route_name = 'All Clients';\\n $all_clients->url = 'all-clients';\\n $all_clients->parent_route = $reg_id;\\n $all_clients->save();\\n $all_clients->roles()->attach($admin);\\n $all_clients->roles()->attach($client_admin);\\n\\n // adding a user\\n $add_reg = new Route();\\n $add_reg->route_name = 'Add Registration';\\n $add_reg->url = 'add-registration';\\n $add_reg->parent_route = $reg_id;\\n $add_reg->save();\\n $add_reg->roles()->attach($admin);\\n $add_reg->roles()->attach($client_admin);\\n\\n // edit user\\n $edit_user = new Route();\\n $edit_user->route_name = 'Edit User Registration';\\n $edit_user->url = 'edit-mf/{id}';\\n $edit_user->parent_route = $reg_id;\\n $edit_user->save();\\n $edit_user->roles()->attach($admin);\\n $edit_user->roles()->attach($client_admin);\\n\\n ### soft delete user registration\\n $soft_del = new Route();\\n $soft_del->route_name = 'Soft Delete Masterfile';\\n $soft_del->url = 'soft-delete-mf/{id}';\\n $soft_del->parent_route = $reg_id;\\n $soft_del->save();\\n $soft_del->roles()->attach($admin);\\n $soft_del->roles()->attach($client_admin);\\n\\n ### inactive users\\n $inactive_users = new Route();\\n $inactive_users->route_name = 'Inactive Users';\\n $inactive_users->url = 'inactive-users';\\n $inactive_users->parent_route = $reg_id;\\n $inactive_users->save();\\n $inactive_users->roles()->attach($admin);\\n $inactive_users->roles()->attach($client_admin);\\n\\n ### permanently delete user\\n $delete = new Route();\\n $delete->route_name = 'Delete Masterfile Details';\\n $delete->url = 'delete-masterfile/{id}';\\n $delete->parent_route = $reg_id;\\n $delete->save();\\n $delete->roles()->attach($admin);\\n $delete->roles()->attach($client_admin);\\n\\n ### restore inactive users\\n $restore = new Route();\\n $restore->route_name = 'Restore Inactive Users';\\n $restore->url = 'restore-mf/{id}';\\n $restore->parent_route = $reg_id;\\n $restore->save();\\n $restore->roles()->attach($admin);\\n $restore->roles()->attach($client_admin);\\n\\n ### users profile\\n $profile = new Route();\\n $profile->route_name = 'Users Profile';\\n $profile->url = 'mf-profile/{id}';\\n $profile->parent_route = $reg_id;\\n $profile->save();\\n $profile->roles()->attach($admin);\\n $profile->roles()->attach($client_admin);\\n\\n ### permanently delete user address\\n $del_addr = new Route();\\n $del_addr->route_name = 'Delete Users Address Details';\\n $del_addr->url = 'delete-address/{id}';\\n $del_addr->parent_route = $reg_id;\\n $del_addr->save();\\n $del_addr->roles()->attach($admin);\\n $del_addr->roles()->attach($client_admin);\\n\\n ### adding a new address for a user\\n $add_addr = new Route();\\n $add_addr->route_name = 'Add New Address Details';\\n $add_addr->url = 'add-address/{id}';\\n $add_addr->parent_route = $reg_id;\\n $add_addr->save();\\n $add_addr->roles()->attach($admin);\\n $add_addr->roles()->attach($client_admin);\\n\\n #### Application\\n $app = new Route();\\n $app->route_name = 'First Applications';\\n $app->save();\\n $app_id = $app->id;\\n\\n #### Application children\\n $all_app = new Route();\\n $all_app->route_name = 'All First Applications';\\n $all_app->url = 'all_applications';\\n $all_app->parent_route = $app_id;\\n $all_app->save();\\n $all_app->roles()->attach($admin);\\n $all_app->roles()->attach($client_admin);\\n\\n $all_app = new Route();\\n $all_app->route_name = 'Approve Applications';\\n $all_app->url = 'approve-applications';\\n $all_app->parent_route = $app_id;\\n $all_app->save();\\n $all_app->roles()->attach($admin);\\n $all_app->roles()->attach($client_admin);\\n\\n $all_app = new Route();\\n $all_app->route_name = 'Reject Applications';\\n $all_app->url = 'reject-applications';\\n $all_app->parent_route = $app_id;\\n $all_app->save();\\n $all_app->roles()->attach($admin);\\n $all_app->roles()->attach($client_admin);\\n\\n $all_app = new Route();\\n $all_app->route_name = 'Load All Applications';\\n $all_app->url = 'all_applications/fas';\\n $all_app->parent_route = $app_id;\\n $all_app->save();\\n $all_app->roles()->attach($admin);\\n $all_app->roles()->attach($client_admin);\\n\\n $pend_app = new Route();\\n $pend_app->route_name = 'Pending Application';\\n $pend_app->url = 'pending_applications';\\n $pend_app->parent_route = $app_id;\\n $pend_app->save();\\n $pend_app->roles()->attach($admin);\\n $pend_app->roles()->attach($client_admin);\\n\\n $pend_app = new Route();\\n $pend_app->route_name = 'Loading Pending Application';\\n $pend_app->url = 'pending_applications/pending';\\n $pend_app->parent_route = $app_id;\\n $pend_app->save();\\n $pend_app->roles()->attach($admin);\\n $pend_app->roles()->attach($client_admin);\\n\\n $canc_app = new Route();\\n $canc_app->route_name = 'Cancelled Application';\\n $canc_app->url = 'canceled_applications';\\n $canc_app->parent_route = $app_id;\\n $canc_app->save();\\n $canc_app->roles()->attach($admin);\\n $canc_app->roles()->attach($client_admin);\\n\\n $canc_app = new Route();\\n $canc_app->route_name = 'Cancelled Application';\\n $canc_app->url = 'canceled_applications/canceled';\\n $canc_app->parent_route = $app_id;\\n $canc_app->save();\\n $canc_app->roles()->attach($admin);\\n $canc_app->roles()->attach($client_admin);\\n\\n $appr_app = new Route();\\n $appr_app->route_name = 'Approved Application';\\n $appr_app->url = 'approved_applications';\\n $appr_app->parent_route = $app_id;\\n $appr_app->save();\\n $appr_app->roles()->attach($admin);\\n $appr_app->roles()->attach($client_admin);\\n\\n\\n $appr_app = new Route();\\n $appr_app->route_name = 'Load Approved Application';\\n $appr_app->url = 'approved_applications/approved';\\n $appr_app->parent_route = $app_id;\\n $appr_app->save();\\n $appr_app->roles()->attach($admin);\\n $appr_app->roles()->attach($client_admin);\\n\\n\\n ##second applications\\n $app = new Route();\\n $app->route_name = 'Second Applications';\\n $app->save();\\n $app_id = $app->id;\\n //all second applications\\n $all_app = new Route();\\n $all_app->route_name = 'All Second Applications';\\n $all_app->url = 'list-second-application';\\n $all_app->parent_route = $app_id;\\n $all_app->save();\\n $all_app->roles()->attach($admin);\\n $all_app->roles()->attach($client_admin);\\n\\n #### inventory\\n $inventory = new Route();\\n $inventory->route_name = 'Inventory';\\n $inventory->save();\\n $inventory_id = $inventory->id;\\n\\n #### inventory children\\n $item = new Route();\\n $item->route_name = 'Manage Inventory';\\n $item->url = 'manage_inventory';\\n $item->parent_route = $inventory_id;\\n $item->save();\\n $item->roles()->attach($admin);\\n $item->roles()->attach($client_admin);\\n\\n $item = new Route();\\n $item->route_name = 'Manage Categories';\\n $item->url = 'inventory-categories';\\n $item->parent_route = $inventory_id;\\n $item->save();\\n $item->roles()->attach($admin);\\n $item->roles()->attach($client_admin);\\n\\n $category = new Route();\\n $category->route_name = 'Inventory Allocation';\\n $category->url = 'all-allocations';\\n $category->parent_route = $inventory_id;\\n $category->save();\\n $category->roles()->attach($admin);\\n $category->roles()->attach($client_admin);\\n\\n $category = new Route();\\n $category->route_name = 'Arrange Menu';\\n $category->url = 'arrange-menu';\\n $category->parent_route = $inventory_id;\\n $category->save();\\n $category->roles()->attach($admin);\\n $category->roles()->attach($client_admin);\\n\\n $category = new Route();\\n $category->route_name = 'Get Menu Menu';\\n $category->url = 'get-menu/{id}';\\n $category->parent_route = $inventory_id;\\n $category->save();\\n $category->roles()->attach($admin);\\n $category->roles()->attach($client_admin);\\n\\n $category = new Route();\\n $category->route_name = 'get make';\\n $category->url = '/subcats/{id}';\\n $category->parent_route = $inventory_id;\\n $category->save();\\n $category->roles()->attach($admin);\\n $category->roles()->attach($client_admin);\\n\\n $category = new Route();\\n $category->route_name = 'Manage Motorbikes';\\n $category->url = '/bikes';\\n $category->parent_route = $inventory_id;\\n $category->save();\\n $category->roles()->attach($admin);\\n $category->roles()->attach($client_admin);\\n\\n $model = new Route();\\n $model->route_name = 'Motorbikes Models';\\n $model->url = '/bikes-model';\\n $model->parent_route = $inventory_id;\\n $model->save();\\n $model->roles()->attach($admin);\\n $model->roles()->attach($client_admin);\\n\\n $category = new Route();\\n $category->route_name = 'Stock Transactions';\\n $category->url = '/stock-transactions';\\n $category->parent_route = $inventory_id;\\n $category->save();\\n $category->roles()->attach($admin);\\n $category->roles()->attach($client_admin);\\n\\n $insurance = new Route();\\n $insurance->route_name = 'Bike Insurance';\\n $insurance->url = '/bike-insurance/{id}';\\n $insurance->parent_route = $inventory_id;\\n $insurance->save();\\n $insurance->roles()->attach($admin);\\n $insurance->roles()->attach($client_admin);\\n\\n #### client\\n $client = new Route();\\n $client->route_name = 'Client';\\n $client->save();\\n $client_id = $client->id;\\n\\n #### client children\\n $acc = new Route();\\n $acc->route_name = 'Client Accounts';\\n $acc->url = 'client_account';\\n $acc->parent_route = $client_id;\\n $acc->save();\\n $acc->roles()->attach($admin);\\n $acc->roles()->attach($client_admin);\\n\\n $wallet = new Route();\\n $wallet->route_name = 'Client Wallet';\\n $wallet->url = 'client_wallet';\\n $wallet->parent_route = $client_id;\\n $wallet->save();\\n $wallet->roles()->attach($admin);\\n $wallet->roles()->attach($client_admin);\\n\\n #### service\\n $service = new Route();\\n $service->route_name = 'Service';\\n $service->save();\\n $service_id = $service->id;\\n\\n #### service children\\n $service_category = new Route();\\n $service_category->route_name = 'Service Category';\\n $service_category->url = 'service_category';\\n $service_category->parent_route = $service_id;\\n $service_category->save();\\n $service_category->roles()->attach($admin);\\n $service_category->roles()->attach($client_admin);\\n\\n ### rider wallet Profile\\n $wallet = new Route();\\n $wallet->route_name = 'Manage My Wallet';\\n $wallet->url = 'my-wallet';\\n $wallet->parent_route = $reg_id;\\n $wallet->save();\\n $wallet->roles()->attach($admin);\\n $wallet->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Add Service Category';\\n $route->url = 'add-sc-cats';\\n $route->parent_route = $service_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Get Service Category';\\n $route->url = 'get-scat-details/{id}';\\n $route->parent_route = $service_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Update Service Category';\\n $route->url = 'edit-sc-cats';\\n $route->parent_route = $service_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Delete Service Category';\\n $route->url = 'delete-scats';\\n $route->parent_route = $service_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $manage_service = new Route();\\n $manage_service->route_name = 'Manage Services';\\n $manage_service->url = 'manage_services';\\n $manage_service->parent_route = $service_id;\\n $manage_service->save();\\n $manage_service->roles()->attach($admin);\\n $manage_service->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Add Service';\\n $route->url = 'add-service';\\n $route->parent_route = $service_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Update Service';\\n $route->url = 'update-service';\\n $route->parent_route = $service_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Get Service';\\n $route->url = 'get-service/{id}';\\n $route->parent_route = $service_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Delete Service';\\n $route->url = 'delete-service';\\n $route->parent_route = $service_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n #### bills and payments\\n $bp = new Route();\\n $bp->route_name = 'Bills and Payment';\\n $bp->save();\\n $bp_id = $bp->id;\\n\\n #### service children\\n $all_bills = new Route();\\n $all_bills->route_name = 'All Bills';\\n $all_bills->url = 'all_bills';\\n $all_bills->parent_route = $bp_id;\\n $all_bills->save();\\n $all_bills->roles()->attach($admin);\\n $all_bills->roles()->attach($client_admin);\\n\\n $pending_bills = new Route();\\n $pending_bills->route_name = 'Pending Bills';\\n $pending_bills->url = 'pending_bills';\\n $pending_bills->parent_route = $bp_id;\\n $pending_bills->save();\\n $pending_bills->roles()->attach($admin);\\n $pending_bills->roles()->attach($client_admin);\\n\\n $all_payments = new Route();\\n $all_payments->route_name = 'All Payments';\\n $all_payments->url = 'all_payments';\\n $all_payments->parent_route = $bp_id;\\n $all_payments->save();\\n $all_payments->roles()->attach($admin);\\n $all_payments->roles()->attach($client_admin);\\n\\n #### reports\\n $reports = new Route();\\n $reports->route_name = 'Reports';\\n $reports->save();\\n $reports_id = $reports->id;\\n\\n #### service children\\n $daily = new Route();\\n $daily->route_name = 'Daily Summary Report';\\n $daily->url = 'daily_summary_report';\\n $daily->parent_route = $reports_id;\\n $daily->save();\\n $daily->roles()->attach($admin);\\n $daily->roles()->attach($client_admin);\\n\\n $weekly = new Route();\\n $weekly->route_name = 'Weekly Summary Reports';\\n $weekly->url = 'weekly_summary_report';\\n $weekly->parent_route = $reports_id;\\n $weekly->save();\\n $weekly->roles()->attach($admin);\\n $weekly->roles()->attach($client_admin);\\n\\n $monthly = new Route();\\n $monthly->route_name = 'Monthly Summary Reports';\\n $monthly->url = 'monthly_summary_report';\\n $monthly->parent_route = $reports_id;\\n $monthly->save();\\n $monthly->roles()->attach($admin);\\n $monthly->roles()->attach($client_admin);\\n\\n #### system\\n $system = new Route();\\n $system->route_name = 'System';\\n $system->save();\\n $system_id = $system->id;\\n\\n #### system children\\n $routes = new Route();\\n $routes->route_name = 'System Routes';\\n $routes->url = 'routes';\\n $routes->parent_route = $system_id;\\n $routes->save();\\n $routes->roles()->attach($admin);\\n $routes->roles()->attach($client_admin);\\n\\n $routes = new Route();\\n $routes->route_name = 'Load System Routes';\\n $routes->url = 'load-routes';\\n $routes->parent_route = $system_id;\\n $routes->save();\\n $routes->roles()->attach($admin);\\n $routes->roles()->attach($client_admin);\\n\\n $menu = new Route();\\n $menu->route_name = 'System Menu';\\n $menu->url = 'menu';\\n $menu->parent_route = $system_id;\\n $menu->save();\\n $menu->roles()->attach($admin);\\n $menu->roles()->attach($client_admin);\\n\\n $system_config = new Route();\\n $system_config->route_name = 'System Configuration';\\n $system_config->url = 'sys-config';\\n $system_config->parent_route = $system_id;\\n $system_config->save();\\n $system_config->roles()->attach($admin);\\n $system_config->roles()->attach($client_admin);\\n\\n $system_config = new Route();\\n $system_config->route_name = 'System Settings';\\n $system_config->url = 'load-config';\\n $system_config->parent_route = $system_id;\\n $system_config->save();\\n $system_config->roles()->attach($admin);\\n $system_config->roles()->attach($client_admin);\\n\\n $system_config = new Route();\\n $system_config->route_name = 'Get Route Data';\\n $system_config->url = 'get-route/{route_id}';\\n $system_config->parent_route = $system_id;\\n $system_config->save();\\n $system_config->roles()->attach($admin);\\n $system_config->roles()->attach($client_admin);\\n\\n $system_config = new Route();\\n $system_config->route_name = 'Update Route';\\n $system_config->url = 'edit-route';\\n $system_config->parent_route = $system_id;\\n $system_config->save();\\n $system_config->roles()->attach($admin);\\n $system_config->roles()->attach($client_admin);\\n\\n $system_config = new Route();\\n $system_config->route_name = 'Load System Configuration';\\n $system_config->url = 'load-config';\\n $system_config->parent_route = $system_id;\\n $system_config->save();\\n $system_config->roles()->attach($admin);\\n $system_config->roles()->attach($client_admin);\\n\\n $theme_config = new Route();\\n $theme_config->route_name = 'Theme Configuration';\\n $theme_config->url = 'theme_config';\\n $theme_config->parent_route = $system_id;\\n $theme_config->save();\\n $theme_config->roles()->attach($admin);\\n $theme_config->roles()->attach($client_admin);\\n\\n $theme_config = new Route();\\n $theme_config->route_name = 'Theme Select';\\n $theme_config->url = 'theme-select/{theme}';\\n $theme_config->parent_route = $system_id;\\n $theme_config->save();\\n $theme_config->roles()->attach($admin);\\n $theme_config->roles()->attach($client_admin);\\n\\n $get_theme = new Route();\\n $get_theme->route_name = 'Get Theme';\\n $get_theme->url = 'get-theme';\\n $get_theme->parent_route = $system_id;\\n $get_theme->save();\\n $get_theme->roles()->attach($admin);\\n $get_theme->roles()->attach($client_admin);\\n\\n $backup = new Route();\\n $backup->route_name = 'Backup';\\n $backup->url = 'backup';\\n $backup->parent_route = $system_id;\\n $backup->save();\\n $backup->roles()->attach($admin);\\n $backup->roles()->attach($client_admin);\\n\\n #### user management\\n $user_mngt = new Route();\\n $user_mngt->route_name = 'User Management';\\n $user_mngt->save();\\n $user_mngt_id = $user_mngt->id;\\n\\n #### user management children\\n $all_user = new Route();\\n $all_user->route_name = 'All Users';\\n $all_user->url = 'all_users';\\n $all_user->parent_route = $user_mngt_id;\\n $all_user->save();\\n $all_user->roles()->attach($admin);\\n $all_user->roles()->attach($client_admin);\\n\\n $roles = new Route();\\n $roles->route_name = 'User Roles';\\n $roles->url = 'user_roles';\\n $roles->parent_route = $user_mngt_id;\\n $roles->save();\\n $roles->roles()->attach($admin);\\n $roles->roles()->attach($client_admin);\\n\\n $role = new Route();\\n $role->route_name = 'Delete User';\\n $role->url = 'delete-user/{id}';\\n $role->parent_route = $user_mngt_id;\\n $role->save();\\n $role->roles()->attach($admin);\\n $role->roles()->attach($client_admin);\\n\\n $role = new Route();\\n $role->route_name = 'Block User';\\n $role->url = 'all_users/block-user';\\n $role->parent_route = $user_mngt_id;\\n $role->save();\\n $role->roles()->attach($admin);\\n $role->roles()->attach($client_admin);\\n\\n $role = new Route();\\n $role->route_name = 'Unblock User';\\n $role->url = 'all_users/unblock-user';\\n $role->parent_route = $user_mngt_id;\\n $role->save();\\n $role->roles()->attach($admin);\\n $role->roles()->attach($client_admin);\\n\\n $audit_trail = new Route();\\n $audit_trail->route_name = 'Audit Trail';\\n $audit_trail->url = 'audit_trails';\\n $audit_trail->parent_route = $user_mngt_id;\\n $audit_trail->save();\\n $audit_trail->roles()->attach($admin);\\n $audit_trail->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Load Routes Allocation';\\n $route->url = 'load-routes-allocation';\\n $route->parent_route = $system_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'is Route Allocated';\\n $route->url = 'check-allocated-route/{id}';\\n $route->parent_route = $system_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Attach Route';\\n $route->url = 'attach-route';\\n $route->parent_route = $system_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Detach Route';\\n $route->url = 'detach-route';\\n $route->parent_route = $system_id;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n #### Bills and Payments\\n\\n $route = new Route();\\n $route->route_name = 'Bills And Payments';\\n $route->save();\\n $bps_parent = $route->id;\\n\\n $route = new Route();\\n $route->route_name = 'Customer Bills';\\n $route->url = 'customer-bills';\\n $route->parent_route = $bps_parent;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n\\n $route = new Route();\\n $route->route_name = 'Load Customer Bills';\\n $route->url = 'load-customer-bills';\\n $route->parent_route = $bps_parent;\\n $route->save();\\n $route->roles()->attach($admin);\\n $route->roles()->attach($client_admin);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"213aa39ce66af928e04eb3976193c064\",\n \"score\": \"0.59228444\",\n \"text\": \"public function createAction()\\n {\\n $entity = new Tribunal();\\n $request = $this->getRequest();\\n $form = $this->createForm(new TribunalType(), $entity);\\n $form->bindRequest($request);\\n\\n if ($form->isValid()) {\\n $entity->setHabilitado(true);\\n $em = $this->getDoctrine()->getEntityManager();\\n $em->persist($entity);\\n $em->flush();\\n\\n return $this->redirect($this->generateUrl('tribunal_show', array('id' => $entity->getId(),\\n 'status' => $this->container->getParameter('EXITO_REGISTRO'),)));\\n \\n }\\n\\n return array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n 'status' => $this->container->getParameter('FALLO_REGISTRO'),\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7efee3cf28cb6822bf9b5f4fc8e3ccaa\",\n \"score\": \"0.59221256\",\n \"text\": \"public function create()\\n {\\n Gate::authorize('rutapermiso', [[\\\"clienteguardar\\\"]]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a32833fef2cec57673ac7cc5ab537079\",\n \"score\": \"0.5915183\",\n \"text\": \"public function create()\\n {\\n //\\n Admin::where('')->get();\\n $admin = new Admin();\\n $admin->name = 1;\\n $admin->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0598527ff1e690d336eb4a62bae820e\",\n \"score\": \"0.59144527\",\n \"text\": \"public function create()\\n {\\n abort(404, 'The resource you are looking for could not be found');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ec1a6f6493b74e9945ca522b9ecd18a\",\n \"score\": \"0.5911293\",\n \"text\": \"public function postCreate()\\n\\t\\t{\\n\\n\\n\\t\\t\\t//si todo esta bien guardamos los datos\\n\\t\\t\\t$test = new Test;\\n\\t\\t\\t$test->users_id = Input::get('userAdmin');\\n\\t\\t\\t$test->estado = Input::get('estado');\\n\\t\\t\\t$form = DB::table('formularios')->where('nombre',Input::get('formulario'))->first();\\n\\t\\t\\t$test->form_id = $form->id; \\n\\n\\t\\t\\t//$app = Input::get('aplicacion');\\n\\t\\t\\t$app = DB::table('aplicaciones')->where('nombre',Input::get('aplicacion'))->first();\\n\\t\\t\\t$test->app_id = $app->id;\\n\\t\\t\\t//guardamos\\n\\t\\t\\t$test->save();\\n\\n\\t\\t\\t//redirigimos a partisipantes\\n\\t\\t\\treturn Redirect::to('tests')->with('status', 'ok_create');\\n\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0e93c9855cc35b1e6519605f5d81bb4\",\n \"score\": \"0.5909618\",\n \"text\": \"public function create()\\n {\\n return '{\\\"status\\\":\\\"Route is not available\\\"}';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"591a2bc9e3f0d307e1fd82ab33c5ecda\",\n \"score\": \"0.5909415\",\n \"text\": \"public function create()\\n {\\n //dd($this->accessLevel->getRouteList());\\n $data['permissions'] = $this->accessLevel->getRouteList();\\n return view('access_level.create', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3fa61e6df83d790d3a43be967aca94b\",\n \"score\": \"0.59054893\",\n \"text\": \"public function create_admin()\\n\\t{\\n\\t\\t//GET REQUIRED DATA FROM DB\\n\\t\\t$data['data_admin']\\t\\t= $this->AdminModel->tb_admin()->result();\\n\\t\\t$data['data_photographer']\\t\\t= $this->AdminModel->tb_photographer()->result();\\n\\t\\t$data['data_clerk']\\t\\t= $this->AdminModel->tb_clerk()->result();\\n\\t\\t$data['data_customer']\\t= $this->AdminModel->tb_customer()->result();\\n\\n\\t\\t\\n\\t\\t$nav_data['page_name'] \\t\\t\\t= \\\"users\\\";\\n\\n\\t\\t$this->load->view('admin/admin_required_pages/nav', $nav_data );\\n\\n\\t\\t$this->load->view('admin/Va_admin-create', $data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5776398ee6b553cd026dcf6a17515884\",\n \"score\": \"0.5904952\",\n \"text\": \"public function create()\\n {\\n //create\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48d5964b42bfbb774d8b11242f3a11e1\",\n \"score\": \"0.59048104\",\n \"text\": \"public function create()\\n {\\n return redirect('admin/drivers')->with('message', 'Opps not found!');\\n //return view('admin.drivers.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"000eb5de9f41e4010eeaf14979800d3e\",\n \"score\": \"0.5903924\",\n \"text\": \"public function create()\\n {\\n return view(\\\"admin/teacher/add\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebb2f77543d952f08a9a65ef6909f219\",\n \"score\": \"0.590243\",\n \"text\": \"public function create()\\n { \\n $data = [\\n 'trip' => null,\\n 'action' => 'create'\\n ];\\n return view('admin.content.trips.create', $data);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":735,"cells":{"query_id":{"kind":"string","value":"26d71a0b0829d496c8e6bbe23ccaa28a"},"query":{"kind":"string","value":"Display a listing of the resource."},"positive_passages":{"kind":"list like","value":[{"docid":"3ca53e14e3e38135fa94fd05f5150494","score":"0.0","text":"public function index(ContractorDataTable $contractor)\n {\n // dd(app()->getLocale());\n // return Session::all();\n return $contractor->render('admin.contractors.index');\n }","title":""}],"string":"[\n {\n \"docid\": \"3ca53e14e3e38135fa94fd05f5150494\",\n \"score\": \"0.0\",\n \"text\": \"public function index(ContractorDataTable $contractor)\\n {\\n // dd(app()->getLocale());\\n // return Session::all();\\n return $contractor->render('admin.contractors.index');\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"d37ee75c4feac8dcd7712d902a70bf82","score":"0.7607344","text":"public function listAction()\n {\n \t/**\n \t * @todo return a paginated and ordered list, selecting only valid elements (move valid clause to rowset)\n \t */\n \t$this->view->resources = $this->_table->fetchAll(null, null, 15);\n }","title":""},{"docid":"de80270cda7dc6348112d1542c1c3b6a","score":"0.7491118","text":"public function listingAction() {\r\n\r\n\t\t// Search Params\r\n\r\n\t\t// Do the show thingy\r\n\t\t\t// Get an array of friend ids\r\n\t\t\t// Get stuff\r\n\t\t\t// unset($values['show']);\r\n\r\n\t\t// Get blog paginator\r\n\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}","title":""},{"docid":"7a3b535f1a43231cd882da50772ec5ee","score":"0.74615455","text":"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign(['success' => true, 'data' => $result]);\n }","title":""},{"docid":"8e2e0cd6669d378062a560c70954d431","score":"0.74168706","text":"public function indexAction(): void\n {\n $limit = (int) $this->Request()->getParam('limit', 1000);\n $offset = (int) $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }","title":""},{"docid":"c11d55ce36b9b6bf39c0094bfe5d0fd7","score":"0.7369403","text":"protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n //add url parameter as hidden input in the search form\n $urlParameters = $this->getUrlParameters('search');\n $this->request->request->set('extraParameters', $urlParameters);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n if (method_exists($this, $customMethodName = 'create'.$this->entity['name'].'SearchForm')) {\n $searchForm = $this->{$customMethodName}();\n } else {\n $searchForm = $this->createSearchForm();\n }\n\n return $this->render($this->entity['templates']['list'], array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'searchForm' => $searchForm->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ));\n }","title":""},{"docid":"e008dc293c8e1bdcbf38634c0f67a5d1","score":"0.7354826","text":"public function listAction() {\r\n\t\t// Preload info\r\n\r\n\r\n\t\t// Search Params\r\n\r\n\r\n\t\t// Get paginator\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}","title":""},{"docid":"e508f26cee6b6110b5e315b37bf01715","score":"0.73057467","text":"public function actionList()\n {\n $entity = $this->getEntity();\n if (!$entity->canList()) {\n $this->setEntityFlash('error', 'Unable to list {name}.');\n $this->redirectParent();\n }\n $this->render('list', array(\n 'entity' => $entity,\n ));\n }","title":""},{"docid":"109b33b70bf69a93460d062b2f83502f","score":"0.7226076","text":"public function index()\n {\n $resources = $this->objStoreResource->getAllResource(auth()->id());\n return view('home.resource.index',compact('resources'));\n }","title":""},{"docid":"68f3dc8f909d1dfb5a37b582d41cec68","score":"0.719963","text":"public function index()\n {\n\n extract($this->getResourceNames());\n\n $items = $modelPath::sortable()->paginate();\n \n\n\n return $this->compileView($resourceMultiple . '.index', [$resourceMultiple => $items]);\n }","title":""},{"docid":"97f3caf6ecee75a55fbfadca2b98a829","score":"0.7182086","text":"protected function index()\n {\n $categories = Listing::paginate(10);\n return ListingResource::collection($categories);\n }","title":""},{"docid":"d7820004a578ddc16d57dff08d715ef0","score":"0.713195","text":"public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}","title":""},{"docid":"9ee2301bbe5ddd99bc48b5c1f13682d6","score":"0.7125178","text":"public static function list()\n {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include(__DIR__ . '/../views/books/list.php');\n }","title":""},{"docid":"db3decb51890b80d45fe4f716c97523a","score":"0.71218187","text":"public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}","title":""},{"docid":"7a45345cbd9a9dd304c36c4a494e5375","score":"0.71166694","text":"public function index()\n {\n return $this->response->paginator(\n $this->filterQuery()->orderBy('id', 'desc')->paginate(request('limit', 10)),\n $this->transformer,\n ['key' => $this->resource_key]\n );\n }","title":""},{"docid":"7ca504ed4a4a2ab91d9d42ce768fbca1","score":"0.7111673","text":"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAll();\n\n return $this->render('resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }","title":""},{"docid":"260bd7b6f859caf980dd2ec389de158f","score":"0.70988476","text":"public function listAction()\n {\n $this->users->denyAccessToPage('admin');\n \n $all = $this->users->findAll();\n $status = $this->users->IsAuthenticated();\n \n $this->theme->setTitle(\"Visa alla användare\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Visa alla användare\",\n 'status' => $status,\n ], 'main');\n \n $this->views->add('users/users-sidebar', [], 'rsidebar');\n }","title":""},{"docid":"3ff8464571003af8b9340bbfec1e3e20","score":"0.7088415","text":"public static function listing()\n {\n echo new \\UMS\\Views\\Standard('listing.phtml');\n }","title":""},{"docid":"24716f78fa1798ecee7344c0553e427b","score":"0.70843154","text":"protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n $parameters = array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n );\n\n return $this->render('@VortexginWebBundle/EasyAdmin/list.html.twig', $parameters); \n }","title":""},{"docid":"f882d8455ca2c120342f2b2b1a1c2565","score":"0.70281464","text":"public function index()\n {\n $resources = DB::table('admin_resource')\n ->get()\n ->toArray();\n return view('admin.resource.index',compact('resources'));\n }","title":""},{"docid":"ceecc69a5c7cd4cd8ab66be42cbae5ba","score":"0.6991042","text":"public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n\t\t//return view('bcrud::list', $this->data);\n }","title":""},{"docid":"a7c37722ff451d4806db867c3084436e","score":"0.6983112","text":"public function listing() {\r\n\r\n\t\t// Get the list of incidents from the database\r\n\t\t$incidents = $this->incident_model->list_all();\r\n\r\n\t\t// Prepare the data for the page\r\n\t\t$data = array(\r\n\t\t\t\t'title' => 'Listing of Incidents',\r\n\t\t\t\t'view' => 'incident/list',\r\n\t\t\t\t'incident_listing' => $this->incident_model->list_all()\r\n\t\t\t);\r\n\r\n\t\t// Load the view\r\n\t\t$this->load->view('main_template', $data);\r\n\r\n\t}","title":""},{"docid":"36e3954f88638a9532a787d2cc444a30","score":"0.6979115","text":"function listAction() {\n $existing_api = _factory('sitemin_api_model_api')->get_gateway();\n $rs['api'] = $existing_api;\n $rs['_token'] = defaultHelper::page_hash_set('api,list');\n $rs['tpl'] = '/sitemin/api/view/_api_list.phtml';\n $rs['TITLE'] = 'API LIST';\n return array('view' => '/sitemin/view/index.phtml', 'data' => array('rs' => $rs));\n }","title":""},{"docid":"970e35836b9768276ac32a7f819d569f","score":"0.6969622","text":"public function index()\n {\n return \"Here is the listing page.\";\n }","title":""},{"docid":"e04c1be5ce440db436266eabe923599a","score":"0.6958369","text":"public function index() {\n\t\tSession::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\t\t$this->all_rows = $this->model->tree();\n\n\t\tif(!$this->all_rows) $this->all_rows = array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}","title":""},{"docid":"a4e3ca4a3d5bf61db50faf86a8841ea7","score":"0.6958334","text":"public function index()\n {\n return view('admin::resource.index');\n }","title":""},{"docid":"61e25f17bfcad7555516a67f6d445d1a","score":"0.6940597","text":"public function indexAction()\n {\n $this->listentriesAction();\n }","title":""},{"docid":"7f07ef0085f42180361c2986a0c246bc","score":"0.6919749","text":"public function index () {\n\t\t$this->showAll();\n\t}","title":""},{"docid":"aa6c01f133b8fa50888c5287d810e174","score":"0.69041467","text":"public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }","title":""},{"docid":"cdbe57e5f68037a7d673227250684866","score":"0.68880165","text":"public function index()\n {\n return SpecializationResource::collection(Spec::paginate(10));\n }","title":""},{"docid":"ce119cc9f5dd3ee1904e1fd10c2e5f4f","score":"0.68733615","text":"public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oAwardModel = new model_award();\n\t\t$tAwards = $oAwardModel->findAll();\n\n\t\t$oView = new _view('awards::list');\n\t\t$oView->tAwards = $tAwards;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}","title":""},{"docid":"5cbfcb7b405ab167a69ee36809e4e4c6","score":"0.687026","text":"public function index()\n {\n // Get items\n // $items = Item::orderBy('type', 'asc')->paginate(5);\n $items = Item::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of items as a resource\n return (ItemResource::collection($items))->response()->setStatusCode(200);\n }","title":""},{"docid":"3880db888810873a15926adf0aeab153","score":"0.68675166","text":"public function action_list()\n {\n $model = Request::$current->param('model');\n $this->template->main->content = Model_Annex_Content::show_list($model);\n }","title":""},{"docid":"0c8e64e28536e6fe176ead46e1742dc1","score":"0.6852622","text":"public function list()\n\t{\n\t\tglobal $venus;\n\t\t$this->prepare_items();\n\n\t\t$venus->plugins->run($this->prefix . 'list', $this);\n\t}","title":""},{"docid":"fdd2aa08ee39ff613dfb2d2d853d735e","score":"0.683835","text":"public function index()\n {\n $this->checkPermission('shg_management_view');\n try {\n $data = $this->service->viewAllPartOne();\n $data = ShgListingResource::collection($data);\n\n return $this->respondWithSuccess($data);\n } catch (\\Throwable $th) {\n\n return $this->respondWithError($th);\n }\n }","title":""},{"docid":"e5f507dbbe2411d3908a15f2210bc3ea","score":"0.6836425","text":"public function listAction() {\n $this->view->books = R::getAll('SELECT * FROM book WHERE title = :title', [':title' => 'Nodejs']);\n\n $this->render('list');\n }","title":""},{"docid":"f29709817ec3db2d44ad77fdc0a55269","score":"0.6829548","text":"public function _index()\n\t{\n\t\t$this->_list();\n\t}","title":""},{"docid":"4b8e52b6fdf81afdda958487f24d56b3","score":"0.68279797","text":"public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }","title":""},{"docid":"0745910a7b8ed31535e75cefd27b7b8c","score":"0.6801322","text":"public function showAllAction()\n {\n //find all recipes in database\n $recipes = $this->getDoctrine()->getRepository('AppBundle:Recipe')->findAll();\n\n // show all recipes as links(it is set in Twig)\n return ['recipes' => $recipes];\n }","title":""},{"docid":"41b8938878fc471b8e628e34cd112379","score":"0.68005955","text":"public function index(): ListResourceCollection\n {\n return new ListResourceCollection(TodoList::paginate(10));\n }","title":""},{"docid":"d3a3617a0e0a9e2771655b1532f470c2","score":"0.6792327","text":"public function index()\n\t{\n\t\treturn BookResource::collection(Book::paginate(10));\n\t\t\n\t}","title":""},{"docid":"6040a050b581e9888004ec972d7e09a0","score":"0.6788249","text":"public function listentriesAction()\n {\n // use app/MyFirstBlog/_templates/list.phtml for viewing\n $viewAllEntries = new View('list.phtml');\n $entries = $this->em->entry->getAll();\n\n // assign data to the template\n $viewAllEntries->assign('entries', $entries);\n\n echo $this->loadMainView($viewAllEntries);\n }","title":""},{"docid":"8a85663335231f3143dcbf588b19dbfa","score":"0.67871946","text":"public function index()\n {\n $substances = $this->model->paginate();\n return $this->getView(__FUNCTION__ , compact('substances'));\n }","title":""},{"docid":"1d602c01714319f06611ab4c66abd251","score":"0.6786255","text":"public function index()\n {\n //Retrieve all podcasts, ordered in descending order by their id value\n $podcasts = Podcast::orderBy('id', 'desc')->paginate(15);\n //Return the list of podcasts as a collection of PodcastResource instances\n return PodcastResource::collection($podcasts);\n }","title":""},{"docid":"49c1d78d94eec140cbd39c5a0665f7cf","score":"0.67806053","text":"public function index()\n {\n // Get modules\n $modules = Module::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of modules as a resource\n return ModuleResource::collection($modules);\n }","title":""},{"docid":"b8bbd5c4b2b076654ec4820cf0f4f302","score":"0.67777556","text":"public function index()\n {\n return ResponseHelper::findSuccess(\n 'Items',\n ItemResource::collection(Item::all())\n );\n }","title":""},{"docid":"d73771ef09d730c6579f2a991515d849","score":"0.67710793","text":"public function index()\n {\n $loans = Loan::paginate();\n return LoanResource::collection($loans);\n }","title":""},{"docid":"cdf88fbb286dc19c1ad1e099d34c24cd","score":"0.67550325","text":"public function indexAction() {\n $this->view->headTitle('List Student');\n\n $currentPageNumber = $this->getParam(\"page\", 1);\n $itemPerPage = $this->getParam(\"size\", 3);\n\n $paginator = $this->__factoryPaginator($currentPageNumber, $itemPerPage);\n $this->view->listStudents = $paginator;\n }","title":""},{"docid":"a558183236ee0a06301b5345bfbe3fe1","score":"0.67493373","text":"public function index()\n {\n $companies = Company::paginate();\n\n return $this->resp->ok(eRespCode::C_LISTED_200_00, new CompaniesPaginationResourceCollection($companies));\n }","title":""},{"docid":"79a7d6352cec8f118d68b28508fa7a97","score":"0.6742735","text":"public function index()\n {\n $lists = user()->lists()->get();\n\n return ListResource::collection($lists);\n }","title":""},{"docid":"5f95d2756a5e123a83fb7c11ebb43128","score":"0.6726971","text":"public function showList()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\tHTML_showTableHeading($I18N_objectStorageObjectName, $I18N_description, $I18N_status/*, $I18N_action*/);\n\t\tforeach ($this->foundObjects as $object)\n\t\t\tHTML_showTableRow($this->getCOSName($object), $this->getCOSDescription($object), $this->getCOSStatusHumanReadable($object)/*, $this->getCOSStatus($object)*/);\n\t}","title":""},{"docid":"aa4f8e62dc57e3f9dd552a60b0f54091","score":"0.67116815","text":"public function ListView()\n\t{\n\t\t$this->Render();\n\t}","title":""},{"docid":"aa4f8e62dc57e3f9dd552a60b0f54091","score":"0.67116815","text":"public function ListView()\n\t{\n\t\t$this->Render();\n\t}","title":""},{"docid":"a69ac66edc8a557759a001c94242c947","score":"0.6707937","text":"function list() {\n global $app;\n $sth = $this->PDO->prepare(\"SELECT * FROM person\");\n $sth->execute();\n $result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n $app->render('default.php', [\"data\" => $result], 200);\n }","title":""},{"docid":"7199baaacb728985be1992dbc56397e3","score":"0.6706126","text":"public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n\r\n //return resources listing view\r\n return view(\\OogleeUConfig::get('config.user_index.index'), compact('response'));\r\n }","title":""},{"docid":"61a33e299a8771fe4e3edd28a88e59b8","score":"0.6694361","text":"public function index()\n {\n $studentRecords = $this->studentRepository->getAllStudentRecords();\n return StudentResource::collection($studentRecords);\n }","title":""},{"docid":"d79dbba2d57614ef830362a19c63a970","score":"0.66864055","text":"public function index()\n {\n return $this->view('list', [\n 'elements' => $this->service->index()\n ]);\n }","title":""},{"docid":"f87e4c930a716211a968b3d9cc7f28cb","score":"0.6679537","text":"public function listAction()\n {\n $data = array(\n 'red',\n 'green',\n 'blue',\n 'yellow'\n );\n\n $request = $this->getRequest();\n $acceptHeader = $request->getHeader('Accept');\n\n $this->view->assign(\n array(\n 'data' => $data\n )\n );\n }","title":""},{"docid":"daba699beaeef91359ed7b10313414c0","score":"0.6675206","text":"public function index()\n {\n $this->checkPermission(\"admin_permission_management\");\n $items = $this->service->getAll();\n\n $items = ApiResource::collection($items);\n\n return $this->respondWithSuccess($items);\n }","title":""},{"docid":"5278e85997fa12c693ce5b7a9a5f2e24","score":"0.6659221","text":"public function index() {\n\t\treturn ClientResource::collection(Client::paginate(15));\n\t}","title":""},{"docid":"601280f6c7a8fe1284080c1c22a3e447","score":"0.6654493","text":"public function index()\n {\n // Get Accounts\n $accounts = Account::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of Accounts as a resource\n return AccountResource::collection($accounts);\n }","title":""},{"docid":"aa14178a7d612bc110499d18b35cfe1c","score":"0.6653656","text":"public function index()\n {\n return TodoResource::collection($this->todoRepository->findAll());\n }","title":""},{"docid":"da0cc4a612f27e870e1a151346a2b1e3","score":"0.66501856","text":"public function index()\n {\n $sub_brand_details = SubBrandDetails::paginate(10);\n return SubBrandDetailsResource::collection($sub_brand_details);\n }","title":""},{"docid":"d1c36ec734b04a00b0316be8705fdc95","score":"0.6647826","text":"public function defaultAction()\n {\n $this->listing();\n }","title":""},{"docid":"d9dcf3302214d3795a06e4d23822d158","score":"0.66456574","text":"public function index()\n {\n $this->setDefaultData();\n $this->paginate = [\n 'contain' => ['RegisteredUsers', 'Listings'],\n 'conditions' => ['RegisteredUsers.username'\n => $this->Auth->user()['username']]\n ];\n $sellingLists = $this->paginate($this->SellingLists);\n\n $this->set(compact('sellingLists'));\n $this->set('_serialize', ['sellingLists']);\n }","title":""},{"docid":"875081e376ab728c3750171aff9d42f9","score":"0.6645129","text":"public function index()\n {\n $items = $this->item->paginate(10);\n\n return $this->response->view('admin.item.index', [\n 'items' => $items\n ]);\n }","title":""},{"docid":"e2eacd814cad9b8205ce83c08f3b5e18","score":"0.6644318","text":"public function showAllAction()\n {\n $title = \"Product overview\";\n $page = $this->app->page;\n $db = $this->app->db;\n\n $this->connection();\n $sql = \"SELECT * FROM product;\";\n $res = $db->executeFetchAll($sql);\n\n $data = [\n \"res\" => $res,\n \"check\" => \"check\"\n ];\n\n // $page->add(\"flash\", [], \"hej\");\n $page->add(\"products/header\");\n $page->add(\"products/show-all\", $data);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }","title":""},{"docid":"7ba8d3b39da88e11faeb12313b1810c2","score":"0.6642726","text":"public function index()\n {\n return view('pages.listing-list', [ 'listings' => Listing::all() ]);\n }","title":""},{"docid":"2e266895b57f5ca532a4517799527c81","score":"0.6637523","text":"public function index()\n {\n $this->authorize('viewAny', Article::class);\n return ArticleResource::collection(Article::paginate(10));\n }","title":""},{"docid":"c7312e7e8966df50b49658cf582ce6ec","score":"0.66348624","text":"public function index()\n {\n return ScreenResource::collection(Screen::orderby('created_at','desc')->paginate(10));\n }","title":""},{"docid":"ddd89648877f652ca4fa01f7cfa10b0c","score":"0.6634571","text":"public function index()\n {\n return \\response()->json($this->listing->all());\n }","title":""},{"docid":"db782cdc73caf0645a9287f4d968586b","score":"0.66271836","text":"public function actionList()\n {\n $dataProvider = Event::getEventsForView();\n return $this->render('list', ['listDataProvider' => $dataProvider]);\n }","title":""},{"docid":"9d24fae63c3b76b647f11d2a4ee6986d","score":"0.6619498","text":"public function listAction() {\n $this->layout('layout/json');\n\n $sSystemKey = $_REQUEST['systemkey'];\n\n # get list label from query\n $sLang = 'en_US';\n if(isset($_REQUEST['lang'])) {\n $sLang = $_REQUEST['lang'];\n }\n\n // translating system\n $translator = new Translator();\n $aLangs = ['en_US','de_DE'];\n foreach($aLangs as $sLoadLang) {\n if(file_exists(__DIR__.'/../../../oneplace-translation/language/'.$sLoadLang.'.mo')) {\n $translator->addTranslationFile('gettext', __DIR__.'/../../../oneplace-translation/language/'.$sLang.'.mo', 'skeleton', $sLoadLang);\n }\n }\n\n $translator->setLocale($sLang);\n\n try {\n $oInstanceTbl = CoreController::$oServiceManager->get(\\OnePlace\\Instance\\Model\\InstanceTable::class);\n } catch(\\RuntimeException $e) {\n echo 'could not load instances';\n return false;\n }\n\n try {\n $oInstance = $oInstanceTbl->getSingle($sSystemKey,'instance_apikey');\n } catch(\\RuntimeException $e) {\n echo 'could not find your instance sorry';\n return false;\n }\n\n try {\n $oTag = CoreController::$aCoreTables['core-tag']->select(['tag_key'=>'category']);\n $oTag = $oTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load tag';\n return false;\n }\n\n try {\n $oEntityTag = CoreController::$aCoreTables['core-entity-tag']->select(['tag_idfs'=>$oTag->Tag_ID,'entity_form_idfs'=>'article-single','tag_value'=>'Store Item']);\n $oEntityTag = $oEntityTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load entity tag';\n return false;\n }\n\n try {\n $oArticleTbl = CoreController::$oServiceManager->get(\\OnePlace\\Article\\Model\\ArticleTable::class);\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n try {\n $aFields = $this->getFormFields('article-single');\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n $aItems = [];\n\n if(count($oItemsDB) > 0) {\n foreach($oItemsDB as $oItem) {\n $aPublicItem = ['id'=>$oItem->getID()];\n # add all fields to item\n foreach($aFields as $oField) {\n switch($oField->type) {\n case 'multiselect':\n # get selected\n $oTags = $oItem->getMultiSelectField($oField->fieldkey);\n $aTags = [];\n foreach($oTags as $oTag) {\n $aTags[] = ['id'=>$oTag->id,'label'=>$translator->translate($oTag->text,'skeleton',$sLang)];\n }\n $aPublicItem[$oField->fieldkey] = $aTags;\n break;\n case 'select':\n # get selected\n $oTag = $oItem->getSelectField($oField->fieldkey);\n if($oTag) {\n if (property_exists($oTag, 'tag_value')) {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->id, 'label' => $translator->translate($oTag->tag_value,'skeleton',$sLang)];\n } else {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->getID(), 'label' => $translator->translate($oTag->getLabel(),'skeleton',$sLang)];\n }\n }\n break;\n case 'text':\n case 'date':\n case 'textarea':\n case 'currency':\n $aPublicItem[$oField->fieldkey] = $translator->translate($oItem->getTextField($oField->fieldkey),'skeleton',$sLang);\n break;\n default:\n break;\n }\n }\n $aItems[] = $aPublicItem;\n }\n }\n\n $aReturn = ['state'=>'success','message'=>'welcome '.$oInstance->getLabel(),'category'=>$oEntityTag->tag_value,'items'=>$aItems];\n echo json_encode($aReturn);\n\n return false;\n }","title":""},{"docid":"fbeb130c8eeb567e7fad3c7305600c0c","score":"0.66142017","text":"public function index()\n {\n $this->authorize('list', Client::class);\n\n return $this->ok($this->repo->paginate($this->request->all()));\n }","title":""},{"docid":"dd6a998d3bb458c37ae44d961b97d40b","score":"0.6612911","text":"public function index()\n {\n //get contacts \n $contacts = Contacts::all();\n\n //return collection of contacts as a resource\n return ContactsResource::collection($contacts);\n }","title":""},{"docid":"cb2a32c859addaec7f6f5ede08ff0730","score":"0.66128945","text":"public function index()\n {\n $responds = Respond::all();\n return RespondForListResource::collection($responds);\n }","title":""},{"docid":"1a54ebc6660394a2c42a760823c26a75","score":"0.66118765","text":"public function index()\n {\n //Get works\n $works = Work::paginate(15);\n \n //Return collection of works as a resource\n return WorkResource::collection($works);\n }","title":""},{"docid":"5c88cf68eb91b67ee61edf19f3f2ae11","score":"0.6608679","text":"public function index()\n {\n $inven = Inventory::paginate(15);\n\n return InventoryResource::collection($inven);\n }","title":""},{"docid":"68fd86bd147479dce20ee02a8707173a","score":"0.6592657","text":"public function index()\n {\n //\n return CardResource::collection($this->cardRepo->getAll());\n }","title":""},{"docid":"42a6f7bb31023e697bf6d8fe877d4585","score":"0.658499","text":"public function index()\n {\n $items = Item::all();\n return $this->sendData('list', $items, 200);\n }","title":""},{"docid":"209ce25a3fdacd16972a8a7301eac167","score":"0.6584275","text":"public function listAction()\n {\n $entities = $this->get('trip.repository')->findActive(5);\n\n return $this->render('TripBundle:Trip:list_block.html.twig', array(\n 'entities' => $entities,\n 'list_length' => 5,\n ));\n }","title":""},{"docid":"c6efa0ee8e5b46e919fc3043bad53b51","score":"0.65816754","text":"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate());\n }","title":""},{"docid":"28b9b7b045b952a1e51b3daabb3db025","score":"0.65804577","text":"function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n//\t\t\tif (!isset($this->request->get['parent_id'])) $this->request->get['parent_id'] = '0';\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}","title":""},{"docid":"679aeb0a886968964597db4d52db9f05","score":"0.65769154","text":"public function action_list() {\n\t\tKohana::$log->add(Kohana::DEBUG,'Executing Controller_Admin_Photo::action_list');\n\n\t\t// Build request\n\t\t$query = DB::select();\n\n\t\tif(isset($_POST['terms']))\n\t\t{\n\t\t\t$query->where('title','like',\"%\".$_POST['terms'].\"%\");\n\t\t\t$query->or_where('subtitle','like',\"%\".$_POST['terms'].\"%\");\n\t\t}\n\n\t\t$photos = Sprig::factory('photo')->load($query, FALSE);\n\n\n\t\tif(Request::$is_ajax)\n\t\t{\n\t\t\t// return a json encoded HTML table\n $this->request->response = json_encode(\n\t\t\t\tView::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n ->render()\n );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// return the full page\n\t\t\t$this->template->content = View::factory('admin/photo/list')\n\t\t\t\t->set('tbody', View::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n\t\t\t\t);\n\t\t}\n\t}","title":""},{"docid":"bb496e1f3376022c7114e22d5ed48267","score":"0.6573981","text":"public function index()\n\t{\n\t\t$this->getItem();\n\t}","title":""},{"docid":"e99878c1a0eff5bcf7bf12ed5c8ef9d5","score":"0.65716714","text":"public function show()\n {\n return view('listing::show');\n }","title":""},{"docid":"423da9caffc6ac8f568bcebdebf9afbe","score":"0.65662223","text":"public function listAction()\n {\n $this->view->users = UserCatalog::getInstance()->getActives();\n $this->setTitle('List the User');\n }","title":""},{"docid":"2d21f0bc716b4c176e994f7636cae49f","score":"0.65646654","text":"public function index()\n {\n $branches = Branch::paginate(15);\n return BranchResource::collection($branches);\n }","title":""},{"docid":"c192cad1748d0fe11000b8d2063a908e","score":"0.65643096","text":"public function index()\n {\n return $this->view('lists');\n }","title":""},{"docid":"367f38d2314314134a538ae223f4cd5d","score":"0.6560926","text":"public function index () {\n permiss ( 'user.list' );\n\n $data = $this->entity\n ->with(['role'])\n ->where('id', '<>', \\Auth::id())\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }","title":""},{"docid":"32b26e83b4a0ac1871cecd5a10eb2445","score":"0.65592414","text":"public function actionList()\r\n {\r\n $option = $this->getParams();\r\n $table = $this->getTableName($option);\r\n $model = $this->model($table);\r\n\r\n $list = $model->all(\r\n function ($ar) use ($table, $model, $option) {\r\n return $model->handleActiveRecord($ar, $table, $option);\r\n },\r\n null,\r\n Yii::$app->params['use_cache']\r\n );\r\n\r\n $this->success($list);\r\n }","title":""},{"docid":"04afb7d77b84ccf4a4dd5ac14fa2c226","score":"0.6552952","text":"public function index()\n { \n $this->paginate = [\n 'order' => ['Firms.name' => 'ASC'],\n 'maxLimit' => 20\n ];\n $firms = $this->paginate($this->Firms);\n\n $this->set(compact('firms'));\n }","title":""},{"docid":"6463720c82b75c6c9ffdb8fa297632ea","score":"0.65498865","text":"public function index()\n\t{\n $inventaries = Inventary::orderBy('updated_at', 'desc')->paginate(12);\n return view(self::$prefixView . 'lists', compact('inventaries'));\n\t}","title":""},{"docid":"04cfd6b456f88347b94d80eedaf2f138","score":"0.65456504","text":"public function index()\n {\n return new FormatResourceCollection(Format::paginate(12));\n }","title":""},{"docid":"4b7799b0d4a4b471dbc995e613462306","score":"0.6540187","text":"public function listAction()\n {\n return new Response(\n json_encode([\n [\n 'id' => 1,\n 'title' => 'First Post on Vox',\n 'author' => 'Mario Rossi',\n 'author_id' => 1,\n 'excerpt' => \"Here we are! Finally this is my first post on Vox and I am so happy that...\",\n 'content' => \"Here we are! Finally this is my first post on Vox and I am so happy that this is my lorem ipsum bla bla bla bla!\",\n 'date' => \"08/01/2015\"\n ],\n [\n 'id' => 2,\n 'title' => 'And yes, this is my second post!',\n 'author' => 'Lukas Schneider',\n 'author_id' => 2,\n 'excerpt' => \"Well this is already my second post and so you already know that...\",\n 'content' => \"Well this is already my second post and so you already know that, in terms of being my second post,\n this is exactly what is says it is: my second, incredibly well written and fantastimagically published post!\",\n 'date' => \"09/02/2015\"\n ]\n ]),\n 200,\n 'application/json'\n );\n }","title":""},{"docid":"7bf076a0c3e59596e2f2d0bcbed69f85","score":"0.65379655","text":"public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }","title":""},{"docid":"3ce1999f8313263a55f4c0a4a6d107fc","score":"0.6527433","text":"public function index()\n\t{\n\t\tif(!$this->permission->has_permission(\"specialization_viewall\")){\n\t\t\techo \"No permissions\";\n\t\t\treturn;\n\t\t}\n\n\t\t// Get all specialization from db\n\t\t$specialization = $this->SpecializationModel->GetAll();\n\n\t\t// Define data array\n\t\t$data = array(\n\t\t\t\"specialization_list\" => $specialization\n\t\t);\n\n\t\t// Load specialization view\n\t\t$this->layout->view('manage_details/specialization/specialization',$data);\n\t}","title":""},{"docid":"37171947214224489a9ea88290a99d00","score":"0.652515","text":"public function index()\n {\n return view(self::$prefixView.'list');\n }","title":""},{"docid":"37171947214224489a9ea88290a99d00","score":"0.652515","text":"public function index()\n {\n return view(self::$prefixView.'list');\n }","title":""},{"docid":"0e0fe48e1d16e1503e2b168a9374594b","score":"0.6524685","text":"public function index()\n {\n $todos = $this->todo->fetchPaginated();\n\n if ($todos->count() > 0) {\n return $this->respondWithPaginatedData($todos);\n }\n return $this->respondWithNoContent();\n }","title":""},{"docid":"c21960757730e605b84ad99c7f97a9e0","score":"0.6521291","text":"public function index() {\n\n // 1. Récupérer les cars\n\n $cars = $this->container->getCarManager()->findAll();\n\n // 2. Afficher les cars\n echo $this->container->getTwig()->render('cars/index.html.twig', [\n 'cars' => $cars\n ]);\n }","title":""},{"docid":"b1dec5f0dac45e2b14cc0f57d1289acb","score":"0.65199256","text":"public function index()\n {\n //\n\t\t\t\t// $resources = Resource::all();\n\t\t\t\t// $resources = $resources->sortByDesc('creation_date');\n\t\t\t\t// return response()->json($resources->values()->all());\n\n\t\t\t\treturn response()->json(Resource::orderBy('creation_date', 'desc')->get());\n }","title":""}],"string":"[\n {\n \"docid\": \"d37ee75c4feac8dcd7712d902a70bf82\",\n \"score\": \"0.7607344\",\n \"text\": \"public function listAction()\\n {\\n \\t/**\\n \\t * @todo return a paginated and ordered list, selecting only valid elements (move valid clause to rowset)\\n \\t */\\n \\t$this->view->resources = $this->_table->fetchAll(null, null, 15);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de80270cda7dc6348112d1542c1c3b6a\",\n \"score\": \"0.7491118\",\n \"text\": \"public function listingAction() {\\r\\n\\r\\n\\t\\t// Search Params\\r\\n\\r\\n\\t\\t// Do the show thingy\\r\\n\\t\\t\\t// Get an array of friend ids\\r\\n\\t\\t\\t// Get stuff\\r\\n\\t\\t\\t// unset($values['show']);\\r\\n\\r\\n\\t\\t// Get blog paginator\\r\\n\\r\\n\\t\\t// Render\\r\\n\\t\\t$this -> _helper -> content -> setNoRender() -> setEnabled();\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a3b535f1a43231cd882da50772ec5ee\",\n \"score\": \"0.74615455\",\n \"text\": \"public function indexAction()\\n {\\n $limit = $this->Request()->getParam('limit', 1000);\\n $offset = $this->Request()->getParam('start', 0);\\n $sort = $this->Request()->getParam('sort', []);\\n $filter = $this->Request()->getParam('filter', []);\\n\\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\\n\\n $this->View()->assign(['success' => true, 'data' => $result]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e2e0cd6669d378062a560c70954d431\",\n \"score\": \"0.74168706\",\n \"text\": \"public function indexAction(): void\\n {\\n $limit = (int) $this->Request()->getParam('limit', 1000);\\n $offset = (int) $this->Request()->getParam('start', 0);\\n $sort = $this->Request()->getParam('sort', []);\\n $filter = $this->Request()->getParam('filter', []);\\n\\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\\n\\n $this->View()->assign($result);\\n $this->View()->assign('success', true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c11d55ce36b9b6bf39c0094bfe5d0fd7\",\n \"score\": \"0.7369403\",\n \"text\": \"protected function listAction()\\n {\\n $this->dispatch(EasyAdminEvents::PRE_LIST);\\n\\n $fields = $this->entity['list']['fields'];\\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\\n\\n //add url parameter as hidden input in the search form\\n $urlParameters = $this->getUrlParameters('search');\\n $this->request->request->set('extraParameters', $urlParameters);\\n\\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\\n\\n if (method_exists($this, $customMethodName = 'create'.$this->entity['name'].'SearchForm')) {\\n $searchForm = $this->{$customMethodName}();\\n } else {\\n $searchForm = $this->createSearchForm();\\n }\\n\\n return $this->render($this->entity['templates']['list'], array(\\n 'paginator' => $paginator,\\n 'fields' => $fields,\\n 'searchForm' => $searchForm->createView(),\\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e008dc293c8e1bdcbf38634c0f67a5d1\",\n \"score\": \"0.7354826\",\n \"text\": \"public function listAction() {\\r\\n\\t\\t// Preload info\\r\\n\\r\\n\\r\\n\\t\\t// Search Params\\r\\n\\r\\n\\r\\n\\t\\t// Get paginator\\r\\n\\t\\t// Render\\r\\n\\t\\t$this -> _helper -> content -> setNoRender() -> setEnabled();\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e508f26cee6b6110b5e315b37bf01715\",\n \"score\": \"0.73057467\",\n \"text\": \"public function actionList()\\n {\\n $entity = $this->getEntity();\\n if (!$entity->canList()) {\\n $this->setEntityFlash('error', 'Unable to list {name}.');\\n $this->redirectParent();\\n }\\n $this->render('list', array(\\n 'entity' => $entity,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"109b33b70bf69a93460d062b2f83502f\",\n \"score\": \"0.7226076\",\n \"text\": \"public function index()\\n {\\n $resources = $this->objStoreResource->getAllResource(auth()->id());\\n return view('home.resource.index',compact('resources'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68f3dc8f909d1dfb5a37b582d41cec68\",\n \"score\": \"0.719963\",\n \"text\": \"public function index()\\n {\\n\\n extract($this->getResourceNames());\\n\\n $items = $modelPath::sortable()->paginate();\\n \\n\\n\\n return $this->compileView($resourceMultiple . '.index', [$resourceMultiple => $items]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97f3caf6ecee75a55fbfadca2b98a829\",\n \"score\": \"0.7182086\",\n \"text\": \"protected function index()\\n {\\n $categories = Listing::paginate(10);\\n return ListingResource::collection($categories);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7820004a578ddc16d57dff08d715ef0\",\n \"score\": \"0.713195\",\n \"text\": \"public function showResource()\\n\\t{\\n\\t\\treturn view('resources.list')->with('resources', Resources::all());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ee2301bbe5ddd99bc48b5c1f13682d6\",\n \"score\": \"0.7125178\",\n \"text\": \"public static function list()\\n {\\n $books = Book::findAll();\\n\\n // 2. Return/include de la view\\n include(__DIR__ . '/../views/books/list.php');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db3decb51890b80d45fe4f716c97523a\",\n \"score\": \"0.71218187\",\n \"text\": \"public function list() {\\n\\t\\t$this->protectIt( 'read' ); \\n\\t\\tsetTitle( 'Listagem' );\\n\\t\\t\\n\\t\\t// Carrega o grid\\n\\t\\tview( 'grid/grid' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a45345cbd9a9dd304c36c4a494e5375\",\n \"score\": \"0.71166694\",\n \"text\": \"public function index()\\n {\\n return $this->response->paginator(\\n $this->filterQuery()->orderBy('id', 'desc')->paginate(request('limit', 10)),\\n $this->transformer,\\n ['key' => $this->resource_key]\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ca504ed4a4a2ab91d9d42ce768fbca1\",\n \"score\": \"0.7111673\",\n \"text\": \"public function indexAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $resources = $em->getRepository('AppBundle:Resource')->findAll();\\n\\n return $this->render('resource/index.html.twig', array(\\n 'resources' => $resources,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"260bd7b6f859caf980dd2ec389de158f\",\n \"score\": \"0.70988476\",\n \"text\": \"public function listAction()\\n {\\n $this->users->denyAccessToPage('admin');\\n \\n $all = $this->users->findAll();\\n $status = $this->users->IsAuthenticated();\\n \\n $this->theme->setTitle(\\\"Visa alla användare\\\");\\n $this->views->add('users/list-all', [\\n 'users' => $all,\\n 'title' => \\\"Visa alla användare\\\",\\n 'status' => $status,\\n ], 'main');\\n \\n $this->views->add('users/users-sidebar', [], 'rsidebar');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ff8464571003af8b9340bbfec1e3e20\",\n \"score\": \"0.7088415\",\n \"text\": \"public static function listing()\\n {\\n echo new \\\\UMS\\\\Views\\\\Standard('listing.phtml');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24716f78fa1798ecee7344c0553e427b\",\n \"score\": \"0.70843154\",\n \"text\": \"protected function listAction()\\n {\\n $this->dispatch(EasyAdminEvents::PRE_LIST);\\n\\n $fields = $this->entity['list']['fields'];\\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\\n\\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\\n\\n $parameters = array(\\n 'paginator' => $paginator,\\n 'fields' => $fields,\\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\\n );\\n\\n return $this->render('@VortexginWebBundle/EasyAdmin/list.html.twig', $parameters); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f882d8455ca2c120342f2b2b1a1c2565\",\n \"score\": \"0.70281464\",\n \"text\": \"public function index()\\n {\\n $resources = DB::table('admin_resource')\\n ->get()\\n ->toArray();\\n return view('admin.resource.index',compact('resources'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ceecc69a5c7cd4cd8ab66be42cbae5ba\",\n \"score\": \"0.6991042\",\n \"text\": \"public function index()\\n {\\n $this->crud->hasAccessOrFail('list');\\n\\n $this->data['crud'] = $this->crud;\\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\\n\\n // get all entries if AJAX is not enabled\\n if (! $this->data['crud']->ajaxTable()) {\\n $this->data['entries'] = $this->data['crud']->getEntries();\\n }\\n\\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\\n return view($this->crud->getListView(), $this->data);\\n\\t\\t//return view('bcrud::list', $this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7c37722ff451d4806db867c3084436e\",\n \"score\": \"0.6983112\",\n \"text\": \"public function listing() {\\r\\n\\r\\n\\t\\t// Get the list of incidents from the database\\r\\n\\t\\t$incidents = $this->incident_model->list_all();\\r\\n\\r\\n\\t\\t// Prepare the data for the page\\r\\n\\t\\t$data = array(\\r\\n\\t\\t\\t\\t'title' => 'Listing of Incidents',\\r\\n\\t\\t\\t\\t'view' => 'incident/list',\\r\\n\\t\\t\\t\\t'incident_listing' => $this->incident_model->list_all()\\r\\n\\t\\t\\t);\\r\\n\\r\\n\\t\\t// Load the view\\r\\n\\t\\t$this->load->view('main_template', $data);\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36e3954f88638a9532a787d2cc444a30\",\n \"score\": \"0.6979115\",\n \"text\": \"function listAction() {\\n $existing_api = _factory('sitemin_api_model_api')->get_gateway();\\n $rs['api'] = $existing_api;\\n $rs['_token'] = defaultHelper::page_hash_set('api,list');\\n $rs['tpl'] = '/sitemin/api/view/_api_list.phtml';\\n $rs['TITLE'] = 'API LIST';\\n return array('view' => '/sitemin/view/index.phtml', 'data' => array('rs' => $rs));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"970e35836b9768276ac32a7f819d569f\",\n \"score\": \"0.6969622\",\n \"text\": \"public function index()\\n {\\n return \\\"Here is the listing page.\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e04c1be5ce440db436266eabe923599a\",\n \"score\": \"0.6958369\",\n \"text\": \"public function index() {\\n\\t\\tSession::set(\\\"list_refer\\\", $_SERVER['REQUEST_URI']);\\n\\t\\t$this->set_order();\\n\\t\\t$this->display_action_name = 'List Items';\\n\\t\\t$this->all_rows = $this->model->tree();\\n\\n\\t\\tif(!$this->all_rows) $this->all_rows = array();\\n\\t\\t$this->filter_block_partial = $this->render_partial(\\\"filter_block\\\");\\n\\t\\t$this->list = $this->render_partial(\\\"list\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4e3ca4a3d5bf61db50faf86a8841ea7\",\n \"score\": \"0.6958334\",\n \"text\": \"public function index()\\n {\\n return view('admin::resource.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61e25f17bfcad7555516a67f6d445d1a\",\n \"score\": \"0.6940597\",\n \"text\": \"public function indexAction()\\n {\\n $this->listentriesAction();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f07ef0085f42180361c2986a0c246bc\",\n \"score\": \"0.6919749\",\n \"text\": \"public function index () {\\n\\t\\t$this->showAll();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa6c01f133b8fa50888c5287d810e174\",\n \"score\": \"0.69041467\",\n \"text\": \"public static function list() {\\n $books = Book::findAll();\\n\\n // 2. Return/include de la view\\n include( __DIR__ . '/../views/books/list.php');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdbe57e5f68037a7d673227250684866\",\n \"score\": \"0.68880165\",\n \"text\": \"public function index()\\n {\\n return SpecializationResource::collection(Spec::paginate(10));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce119cc9f5dd3ee1904e1fd10c2e5f4f\",\n \"score\": \"0.68733615\",\n \"text\": \"public function _list()\\n\\t{\\n\\t\\t_root::getRequest()->setAction('list');\\n\\n\\t\\t$oAwardModel = new model_award();\\n\\t\\t$tAwards = $oAwardModel->findAll();\\n\\n\\t\\t$oView = new _view('awards::list');\\n\\t\\t$oView->tAwards = $tAwards;\\n\\n\\t\\t$this->oLayout->add('work', $oView);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cbfcb7b405ab167a69ee36809e4e4c6\",\n \"score\": \"0.687026\",\n \"text\": \"public function index()\\n {\\n // Get items\\n // $items = Item::orderBy('type', 'asc')->paginate(5);\\n $items = Item::orderBy('created_at', 'desc')->paginate(5);\\n\\n // Return collection of items as a resource\\n return (ItemResource::collection($items))->response()->setStatusCode(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3880db888810873a15926adf0aeab153\",\n \"score\": \"0.68675166\",\n \"text\": \"public function action_list()\\n {\\n $model = Request::$current->param('model');\\n $this->template->main->content = Model_Annex_Content::show_list($model);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c8e64e28536e6fe176ead46e1742dc1\",\n \"score\": \"0.6852622\",\n \"text\": \"public function list()\\n\\t{\\n\\t\\tglobal $venus;\\n\\t\\t$this->prepare_items();\\n\\n\\t\\t$venus->plugins->run($this->prefix . 'list', $this);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fdd2aa08ee39ff613dfb2d2d853d735e\",\n \"score\": \"0.683835\",\n \"text\": \"public function index()\\n {\\n $this->checkPermission('shg_management_view');\\n try {\\n $data = $this->service->viewAllPartOne();\\n $data = ShgListingResource::collection($data);\\n\\n return $this->respondWithSuccess($data);\\n } catch (\\\\Throwable $th) {\\n\\n return $this->respondWithError($th);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5f507dbbe2411d3908a15f2210bc3ea\",\n \"score\": \"0.6836425\",\n \"text\": \"public function listAction() {\\n $this->view->books = R::getAll('SELECT * FROM book WHERE title = :title', [':title' => 'Nodejs']);\\n\\n $this->render('list');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f29709817ec3db2d44ad77fdc0a55269\",\n \"score\": \"0.6829548\",\n \"text\": \"public function _index()\\n\\t{\\n\\t\\t$this->_list();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b8e52b6fdf81afdda958487f24d56b3\",\n \"score\": \"0.68279797\",\n \"text\": \"public function listAction()\\n {\\n $catalog = $this->container->get('catalog');\\n\\n $book_list = $catalog->listBooks();\\n\\n return [\\n 'list' => $book_list,\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0745910a7b8ed31535e75cefd27b7b8c\",\n \"score\": \"0.6801322\",\n \"text\": \"public function showAllAction()\\n {\\n //find all recipes in database\\n $recipes = $this->getDoctrine()->getRepository('AppBundle:Recipe')->findAll();\\n\\n // show all recipes as links(it is set in Twig)\\n return ['recipes' => $recipes];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41b8938878fc471b8e628e34cd112379\",\n \"score\": \"0.68005955\",\n \"text\": \"public function index(): ListResourceCollection\\n {\\n return new ListResourceCollection(TodoList::paginate(10));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3a3617a0e0a9e2771655b1532f470c2\",\n \"score\": \"0.6792327\",\n \"text\": \"public function index()\\n\\t{\\n\\t\\treturn BookResource::collection(Book::paginate(10));\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6040a050b581e9888004ec972d7e09a0\",\n \"score\": \"0.6788249\",\n \"text\": \"public function listentriesAction()\\n {\\n // use app/MyFirstBlog/_templates/list.phtml for viewing\\n $viewAllEntries = new View('list.phtml');\\n $entries = $this->em->entry->getAll();\\n\\n // assign data to the template\\n $viewAllEntries->assign('entries', $entries);\\n\\n echo $this->loadMainView($viewAllEntries);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a85663335231f3143dcbf588b19dbfa\",\n \"score\": \"0.67871946\",\n \"text\": \"public function index()\\n {\\n $substances = $this->model->paginate();\\n return $this->getView(__FUNCTION__ , compact('substances'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d602c01714319f06611ab4c66abd251\",\n \"score\": \"0.6786255\",\n \"text\": \"public function index()\\n {\\n //Retrieve all podcasts, ordered in descending order by their id value\\n $podcasts = Podcast::orderBy('id', 'desc')->paginate(15);\\n //Return the list of podcasts as a collection of PodcastResource instances\\n return PodcastResource::collection($podcasts);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49c1d78d94eec140cbd39c5a0665f7cf\",\n \"score\": \"0.67806053\",\n \"text\": \"public function index()\\n {\\n // Get modules\\n $modules = Module::orderBy('created_at', 'desc')->paginate(15);\\n\\n // Return collection of modules as a resource\\n return ModuleResource::collection($modules);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8bbd5c4b2b076654ec4820cf0f4f302\",\n \"score\": \"0.67777556\",\n \"text\": \"public function index()\\n {\\n return ResponseHelper::findSuccess(\\n 'Items',\\n ItemResource::collection(Item::all())\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d73771ef09d730c6579f2a991515d849\",\n \"score\": \"0.67710793\",\n \"text\": \"public function index()\\n {\\n $loans = Loan::paginate();\\n return LoanResource::collection($loans);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdf88fbb286dc19c1ad1e099d34c24cd\",\n \"score\": \"0.67550325\",\n \"text\": \"public function indexAction() {\\n $this->view->headTitle('List Student');\\n\\n $currentPageNumber = $this->getParam(\\\"page\\\", 1);\\n $itemPerPage = $this->getParam(\\\"size\\\", 3);\\n\\n $paginator = $this->__factoryPaginator($currentPageNumber, $itemPerPage);\\n $this->view->listStudents = $paginator;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a558183236ee0a06301b5345bfbe3fe1\",\n \"score\": \"0.67493373\",\n \"text\": \"public function index()\\n {\\n $companies = Company::paginate();\\n\\n return $this->resp->ok(eRespCode::C_LISTED_200_00, new CompaniesPaginationResourceCollection($companies));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79a7d6352cec8f118d68b28508fa7a97\",\n \"score\": \"0.6742735\",\n \"text\": \"public function index()\\n {\\n $lists = user()->lists()->get();\\n\\n return ListResource::collection($lists);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f95d2756a5e123a83fb7c11ebb43128\",\n \"score\": \"0.6726971\",\n \"text\": \"public function showList()\\n\\t{\\n\\t\\tinclude(\\\"/m23/inc/i18n/\\\".$GLOBALS[\\\"m23_language\\\"].\\\"/m23base.php\\\");\\n\\t\\tHTML_showTableHeading($I18N_objectStorageObjectName, $I18N_description, $I18N_status/*, $I18N_action*/);\\n\\t\\tforeach ($this->foundObjects as $object)\\n\\t\\t\\tHTML_showTableRow($this->getCOSName($object), $this->getCOSDescription($object), $this->getCOSStatusHumanReadable($object)/*, $this->getCOSStatus($object)*/);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa4f8e62dc57e3f9dd552a60b0f54091\",\n \"score\": \"0.67116815\",\n \"text\": \"public function ListView()\\n\\t{\\n\\t\\t$this->Render();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa4f8e62dc57e3f9dd552a60b0f54091\",\n \"score\": \"0.67116815\",\n \"text\": \"public function ListView()\\n\\t{\\n\\t\\t$this->Render();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a69ac66edc8a557759a001c94242c947\",\n \"score\": \"0.6707937\",\n \"text\": \"function list() {\\n global $app;\\n $sth = $this->PDO->prepare(\\\"SELECT * FROM person\\\");\\n $sth->execute();\\n $result = $sth->fetchAll(\\\\PDO::FETCH_ASSOC);\\n $app->render('default.php', [\\\"data\\\" => $result], 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7199baaacb728985be1992dbc56397e3\",\n \"score\": \"0.6706126\",\n \"text\": \"public function getIndex()\\r\\n { \\r\\n $response = $this->modelService->getAll();\\r\\n\\r\\n //return resources listing view\\r\\n return view(\\\\OogleeUConfig::get('config.user_index.index'), compact('response'));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61a33e299a8771fe4e3edd28a88e59b8\",\n \"score\": \"0.6694361\",\n \"text\": \"public function index()\\n {\\n $studentRecords = $this->studentRepository->getAllStudentRecords();\\n return StudentResource::collection($studentRecords);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d79dbba2d57614ef830362a19c63a970\",\n \"score\": \"0.66864055\",\n \"text\": \"public function index()\\n {\\n return $this->view('list', [\\n 'elements' => $this->service->index()\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f87e4c930a716211a968b3d9cc7f28cb\",\n \"score\": \"0.6679537\",\n \"text\": \"public function listAction()\\n {\\n $data = array(\\n 'red',\\n 'green',\\n 'blue',\\n 'yellow'\\n );\\n\\n $request = $this->getRequest();\\n $acceptHeader = $request->getHeader('Accept');\\n\\n $this->view->assign(\\n array(\\n 'data' => $data\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"daba699beaeef91359ed7b10313414c0\",\n \"score\": \"0.6675206\",\n \"text\": \"public function index()\\n {\\n $this->checkPermission(\\\"admin_permission_management\\\");\\n $items = $this->service->getAll();\\n\\n $items = ApiResource::collection($items);\\n\\n return $this->respondWithSuccess($items);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5278e85997fa12c693ce5b7a9a5f2e24\",\n \"score\": \"0.6659221\",\n \"text\": \"public function index() {\\n\\t\\treturn ClientResource::collection(Client::paginate(15));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"601280f6c7a8fe1284080c1c22a3e447\",\n \"score\": \"0.6654493\",\n \"text\": \"public function index()\\n {\\n // Get Accounts\\n $accounts = Account::orderBy('created_at', 'desc')->paginate(15);\\n\\n // Return collection of Accounts as a resource\\n return AccountResource::collection($accounts);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa14178a7d612bc110499d18b35cfe1c\",\n \"score\": \"0.6653656\",\n \"text\": \"public function index()\\n {\\n return TodoResource::collection($this->todoRepository->findAll());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da0cc4a612f27e870e1a151346a2b1e3\",\n \"score\": \"0.66501856\",\n \"text\": \"public function index()\\n {\\n $sub_brand_details = SubBrandDetails::paginate(10);\\n return SubBrandDetailsResource::collection($sub_brand_details);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1c36ec734b04a00b0316be8705fdc95\",\n \"score\": \"0.6647826\",\n \"text\": \"public function defaultAction()\\n {\\n $this->listing();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9dcf3302214d3795a06e4d23822d158\",\n \"score\": \"0.66456574\",\n \"text\": \"public function index()\\n {\\n $this->setDefaultData();\\n $this->paginate = [\\n 'contain' => ['RegisteredUsers', 'Listings'],\\n 'conditions' => ['RegisteredUsers.username'\\n => $this->Auth->user()['username']]\\n ];\\n $sellingLists = $this->paginate($this->SellingLists);\\n\\n $this->set(compact('sellingLists'));\\n $this->set('_serialize', ['sellingLists']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"875081e376ab728c3750171aff9d42f9\",\n \"score\": \"0.6645129\",\n \"text\": \"public function index()\\n {\\n $items = $this->item->paginate(10);\\n\\n return $this->response->view('admin.item.index', [\\n 'items' => $items\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2eacd814cad9b8205ce83c08f3b5e18\",\n \"score\": \"0.6644318\",\n \"text\": \"public function showAllAction()\\n {\\n $title = \\\"Product overview\\\";\\n $page = $this->app->page;\\n $db = $this->app->db;\\n\\n $this->connection();\\n $sql = \\\"SELECT * FROM product;\\\";\\n $res = $db->executeFetchAll($sql);\\n\\n $data = [\\n \\\"res\\\" => $res,\\n \\\"check\\\" => \\\"check\\\"\\n ];\\n\\n // $page->add(\\\"flash\\\", [], \\\"hej\\\");\\n $page->add(\\\"products/header\\\");\\n $page->add(\\\"products/show-all\\\", $data);\\n\\n return $page->render([\\n \\\"title\\\" => $title,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ba8d3b39da88e11faeb12313b1810c2\",\n \"score\": \"0.6642726\",\n \"text\": \"public function index()\\n {\\n return view('pages.listing-list', [ 'listings' => Listing::all() ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e266895b57f5ca532a4517799527c81\",\n \"score\": \"0.6637523\",\n \"text\": \"public function index()\\n {\\n $this->authorize('viewAny', Article::class);\\n return ArticleResource::collection(Article::paginate(10));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7312e7e8966df50b49658cf582ce6ec\",\n \"score\": \"0.66348624\",\n \"text\": \"public function index()\\n {\\n return ScreenResource::collection(Screen::orderby('created_at','desc')->paginate(10));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddd89648877f652ca4fa01f7cfa10b0c\",\n \"score\": \"0.6634571\",\n \"text\": \"public function index()\\n {\\n return \\\\response()->json($this->listing->all());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db782cdc73caf0645a9287f4d968586b\",\n \"score\": \"0.66271836\",\n \"text\": \"public function actionList()\\n {\\n $dataProvider = Event::getEventsForView();\\n return $this->render('list', ['listDataProvider' => $dataProvider]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d24fae63c3b76b647f11d2a4ee6986d\",\n \"score\": \"0.6619498\",\n \"text\": \"public function listAction() {\\n $this->layout('layout/json');\\n\\n $sSystemKey = $_REQUEST['systemkey'];\\n\\n # get list label from query\\n $sLang = 'en_US';\\n if(isset($_REQUEST['lang'])) {\\n $sLang = $_REQUEST['lang'];\\n }\\n\\n // translating system\\n $translator = new Translator();\\n $aLangs = ['en_US','de_DE'];\\n foreach($aLangs as $sLoadLang) {\\n if(file_exists(__DIR__.'/../../../oneplace-translation/language/'.$sLoadLang.'.mo')) {\\n $translator->addTranslationFile('gettext', __DIR__.'/../../../oneplace-translation/language/'.$sLang.'.mo', 'skeleton', $sLoadLang);\\n }\\n }\\n\\n $translator->setLocale($sLang);\\n\\n try {\\n $oInstanceTbl = CoreController::$oServiceManager->get(\\\\OnePlace\\\\Instance\\\\Model\\\\InstanceTable::class);\\n } catch(\\\\RuntimeException $e) {\\n echo 'could not load instances';\\n return false;\\n }\\n\\n try {\\n $oInstance = $oInstanceTbl->getSingle($sSystemKey,'instance_apikey');\\n } catch(\\\\RuntimeException $e) {\\n echo 'could not find your instance sorry';\\n return false;\\n }\\n\\n try {\\n $oTag = CoreController::$aCoreTables['core-tag']->select(['tag_key'=>'category']);\\n $oTag = $oTag->current();\\n } catch(\\\\RuntimeException $e) {\\n echo 'could not load tag';\\n return false;\\n }\\n\\n try {\\n $oEntityTag = CoreController::$aCoreTables['core-entity-tag']->select(['tag_idfs'=>$oTag->Tag_ID,'entity_form_idfs'=>'article-single','tag_value'=>'Store Item']);\\n $oEntityTag = $oEntityTag->current();\\n } catch(\\\\RuntimeException $e) {\\n echo 'could not load entity tag';\\n return false;\\n }\\n\\n try {\\n $oArticleTbl = CoreController::$oServiceManager->get(\\\\OnePlace\\\\Article\\\\Model\\\\ArticleTable::class);\\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\\n } catch(\\\\RuntimeException $e) {\\n echo 'could not load article';\\n return false;\\n }\\n\\n try {\\n $aFields = $this->getFormFields('article-single');\\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\\n } catch(\\\\RuntimeException $e) {\\n echo 'could not load article';\\n return false;\\n }\\n\\n $aItems = [];\\n\\n if(count($oItemsDB) > 0) {\\n foreach($oItemsDB as $oItem) {\\n $aPublicItem = ['id'=>$oItem->getID()];\\n # add all fields to item\\n foreach($aFields as $oField) {\\n switch($oField->type) {\\n case 'multiselect':\\n # get selected\\n $oTags = $oItem->getMultiSelectField($oField->fieldkey);\\n $aTags = [];\\n foreach($oTags as $oTag) {\\n $aTags[] = ['id'=>$oTag->id,'label'=>$translator->translate($oTag->text,'skeleton',$sLang)];\\n }\\n $aPublicItem[$oField->fieldkey] = $aTags;\\n break;\\n case 'select':\\n # get selected\\n $oTag = $oItem->getSelectField($oField->fieldkey);\\n if($oTag) {\\n if (property_exists($oTag, 'tag_value')) {\\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->id, 'label' => $translator->translate($oTag->tag_value,'skeleton',$sLang)];\\n } else {\\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->getID(), 'label' => $translator->translate($oTag->getLabel(),'skeleton',$sLang)];\\n }\\n }\\n break;\\n case 'text':\\n case 'date':\\n case 'textarea':\\n case 'currency':\\n $aPublicItem[$oField->fieldkey] = $translator->translate($oItem->getTextField($oField->fieldkey),'skeleton',$sLang);\\n break;\\n default:\\n break;\\n }\\n }\\n $aItems[] = $aPublicItem;\\n }\\n }\\n\\n $aReturn = ['state'=>'success','message'=>'welcome '.$oInstance->getLabel(),'category'=>$oEntityTag->tag_value,'items'=>$aItems];\\n echo json_encode($aReturn);\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbeb130c8eeb567e7fad3c7305600c0c\",\n \"score\": \"0.66142017\",\n \"text\": \"public function index()\\n {\\n $this->authorize('list', Client::class);\\n\\n return $this->ok($this->repo->paginate($this->request->all()));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd6a998d3bb458c37ae44d961b97d40b\",\n \"score\": \"0.6612911\",\n \"text\": \"public function index()\\n {\\n //get contacts \\n $contacts = Contacts::all();\\n\\n //return collection of contacts as a resource\\n return ContactsResource::collection($contacts);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb2a32c859addaec7f6f5ede08ff0730\",\n \"score\": \"0.66128945\",\n \"text\": \"public function index()\\n {\\n $responds = Respond::all();\\n return RespondForListResource::collection($responds);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a54ebc6660394a2c42a760823c26a75\",\n \"score\": \"0.66118765\",\n \"text\": \"public function index()\\n {\\n //Get works\\n $works = Work::paginate(15);\\n \\n //Return collection of works as a resource\\n return WorkResource::collection($works);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c88cf68eb91b67ee61edf19f3f2ae11\",\n \"score\": \"0.6608679\",\n \"text\": \"public function index()\\n {\\n $inven = Inventory::paginate(15);\\n\\n return InventoryResource::collection($inven);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68fd86bd147479dce20ee02a8707173a\",\n \"score\": \"0.6592657\",\n \"text\": \"public function index()\\n {\\n //\\n return CardResource::collection($this->cardRepo->getAll());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42a6f7bb31023e697bf6d8fe877d4585\",\n \"score\": \"0.658499\",\n \"text\": \"public function index()\\n {\\n $items = Item::all();\\n return $this->sendData('list', $items, 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"209ce25a3fdacd16972a8a7301eac167\",\n \"score\": \"0.6584275\",\n \"text\": \"public function listAction()\\n {\\n $entities = $this->get('trip.repository')->findActive(5);\\n\\n return $this->render('TripBundle:Trip:list_block.html.twig', array(\\n 'entities' => $entities,\\n 'list_length' => 5,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6efa0ee8e5b46e919fc3043bad53b51\",\n \"score\": \"0.65816754\",\n \"text\": \"public function index()\\n {\\n return ProductResource::collection(Product::latest()->paginate());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"28b9b7b045b952a1e51b3daabb3db025\",\n \"score\": \"0.65804577\",\n \"text\": \"function Index()\\n\\t\\t{\\n\\t\\t\\t$this->DefaultParameters();\\n//\\t\\t\\tif (!isset($this->request->get['parent_id'])) $this->request->get['parent_id'] = '0';\\n\\t\\t\\t\\r\\n\\t\\t\\t$parameters = array('num_rows');\\r\\n\\t\\t\\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\\r\\n\\t\\t\\t$this->data['num_rows'] = $parameters['num_rows'];\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"679aeb0a886968964597db4d52db9f05\",\n \"score\": \"0.65769154\",\n \"text\": \"public function action_list() {\\n\\t\\tKohana::$log->add(Kohana::DEBUG,'Executing Controller_Admin_Photo::action_list');\\n\\n\\t\\t// Build request\\n\\t\\t$query = DB::select();\\n\\n\\t\\tif(isset($_POST['terms']))\\n\\t\\t{\\n\\t\\t\\t$query->where('title','like',\\\"%\\\".$_POST['terms'].\\\"%\\\");\\n\\t\\t\\t$query->or_where('subtitle','like',\\\"%\\\".$_POST['terms'].\\\"%\\\");\\n\\t\\t}\\n\\n\\t\\t$photos = Sprig::factory('photo')->load($query, FALSE);\\n\\n\\n\\t\\tif(Request::$is_ajax)\\n\\t\\t{\\n\\t\\t\\t// return a json encoded HTML table\\n $this->request->response = json_encode(\\n\\t\\t\\t\\tView::factory('admin/photo/list_tbody')\\n\\t\\t\\t\\t\\t->bind('photos', $photos)\\n ->render()\\n );\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t// return the full page\\n\\t\\t\\t$this->template->content = View::factory('admin/photo/list')\\n\\t\\t\\t\\t->set('tbody', View::factory('admin/photo/list_tbody')\\n\\t\\t\\t\\t\\t->bind('photos', $photos)\\n\\t\\t\\t\\t);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb496e1f3376022c7114e22d5ed48267\",\n \"score\": \"0.6573981\",\n \"text\": \"public function index()\\n\\t{\\n\\t\\t$this->getItem();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e99878c1a0eff5bcf7bf12ed5c8ef9d5\",\n \"score\": \"0.65716714\",\n \"text\": \"public function show()\\n {\\n return view('listing::show');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"423da9caffc6ac8f568bcebdebf9afbe\",\n \"score\": \"0.65662223\",\n \"text\": \"public function listAction()\\n {\\n $this->view->users = UserCatalog::getInstance()->getActives();\\n $this->setTitle('List the User');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d21f0bc716b4c176e994f7636cae49f\",\n \"score\": \"0.65646654\",\n \"text\": \"public function index()\\n {\\n $branches = Branch::paginate(15);\\n return BranchResource::collection($branches);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c192cad1748d0fe11000b8d2063a908e\",\n \"score\": \"0.65643096\",\n \"text\": \"public function index()\\n {\\n return $this->view('lists');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"367f38d2314314134a538ae223f4cd5d\",\n \"score\": \"0.6560926\",\n \"text\": \"public function index () {\\n permiss ( 'user.list' );\\n\\n $data = $this->entity\\n ->with(['role'])\\n ->where('id', '<>', \\\\Auth::id())\\n ->orderBy('created_at', 'desc')->get();\\n\\n return new ModelResource($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32b26e83b4a0ac1871cecd5a10eb2445\",\n \"score\": \"0.65592414\",\n \"text\": \"public function actionList()\\r\\n {\\r\\n $option = $this->getParams();\\r\\n $table = $this->getTableName($option);\\r\\n $model = $this->model($table);\\r\\n\\r\\n $list = $model->all(\\r\\n function ($ar) use ($table, $model, $option) {\\r\\n return $model->handleActiveRecord($ar, $table, $option);\\r\\n },\\r\\n null,\\r\\n Yii::$app->params['use_cache']\\r\\n );\\r\\n\\r\\n $this->success($list);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04afb7d77b84ccf4a4dd5ac14fa2c226\",\n \"score\": \"0.6552952\",\n \"text\": \"public function index()\\n { \\n $this->paginate = [\\n 'order' => ['Firms.name' => 'ASC'],\\n 'maxLimit' => 20\\n ];\\n $firms = $this->paginate($this->Firms);\\n\\n $this->set(compact('firms'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6463720c82b75c6c9ffdb8fa297632ea\",\n \"score\": \"0.65498865\",\n \"text\": \"public function index()\\n\\t{\\n $inventaries = Inventary::orderBy('updated_at', 'desc')->paginate(12);\\n return view(self::$prefixView . 'lists', compact('inventaries'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04cfd6b456f88347b94d80eedaf2f138\",\n \"score\": \"0.65456504\",\n \"text\": \"public function index()\\n {\\n return new FormatResourceCollection(Format::paginate(12));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b7799b0d4a4b471dbc995e613462306\",\n \"score\": \"0.6540187\",\n \"text\": \"public function listAction()\\n {\\n return new Response(\\n json_encode([\\n [\\n 'id' => 1,\\n 'title' => 'First Post on Vox',\\n 'author' => 'Mario Rossi',\\n 'author_id' => 1,\\n 'excerpt' => \\\"Here we are! Finally this is my first post on Vox and I am so happy that...\\\",\\n 'content' => \\\"Here we are! Finally this is my first post on Vox and I am so happy that this is my lorem ipsum bla bla bla bla!\\\",\\n 'date' => \\\"08/01/2015\\\"\\n ],\\n [\\n 'id' => 2,\\n 'title' => 'And yes, this is my second post!',\\n 'author' => 'Lukas Schneider',\\n 'author_id' => 2,\\n 'excerpt' => \\\"Well this is already my second post and so you already know that...\\\",\\n 'content' => \\\"Well this is already my second post and so you already know that, in terms of being my second post,\\n this is exactly what is says it is: my second, incredibly well written and fantastimagically published post!\\\",\\n 'date' => \\\"09/02/2015\\\"\\n ]\\n ]),\\n 200,\\n 'application/json'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7bf076a0c3e59596e2f2d0bcbed69f85\",\n \"score\": \"0.65379655\",\n \"text\": \"public function index()\\n {\\n $artigos = Artigo::paginate(15);\\n return ArtigoResource::collection($artigos);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ce1999f8313263a55f4c0a4a6d107fc\",\n \"score\": \"0.6527433\",\n \"text\": \"public function index()\\n\\t{\\n\\t\\tif(!$this->permission->has_permission(\\\"specialization_viewall\\\")){\\n\\t\\t\\techo \\\"No permissions\\\";\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Get all specialization from db\\n\\t\\t$specialization = $this->SpecializationModel->GetAll();\\n\\n\\t\\t// Define data array\\n\\t\\t$data = array(\\n\\t\\t\\t\\\"specialization_list\\\" => $specialization\\n\\t\\t);\\n\\n\\t\\t// Load specialization view\\n\\t\\t$this->layout->view('manage_details/specialization/specialization',$data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37171947214224489a9ea88290a99d00\",\n \"score\": \"0.652515\",\n \"text\": \"public function index()\\n {\\n return view(self::$prefixView.'list');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37171947214224489a9ea88290a99d00\",\n \"score\": \"0.652515\",\n \"text\": \"public function index()\\n {\\n return view(self::$prefixView.'list');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e0fe48e1d16e1503e2b168a9374594b\",\n \"score\": \"0.6524685\",\n \"text\": \"public function index()\\n {\\n $todos = $this->todo->fetchPaginated();\\n\\n if ($todos->count() > 0) {\\n return $this->respondWithPaginatedData($todos);\\n }\\n return $this->respondWithNoContent();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c21960757730e605b84ad99c7f97a9e0\",\n \"score\": \"0.6521291\",\n \"text\": \"public function index() {\\n\\n // 1. Récupérer les cars\\n\\n $cars = $this->container->getCarManager()->findAll();\\n\\n // 2. Afficher les cars\\n echo $this->container->getTwig()->render('cars/index.html.twig', [\\n 'cars' => $cars\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1dec5f0dac45e2b14cc0f57d1289acb\",\n \"score\": \"0.65199256\",\n \"text\": \"public function index()\\n {\\n //\\n\\t\\t\\t\\t// $resources = Resource::all();\\n\\t\\t\\t\\t// $resources = $resources->sortByDesc('creation_date');\\n\\t\\t\\t\\t// return response()->json($resources->values()->all());\\n\\n\\t\\t\\t\\treturn response()->json(Resource::orderBy('creation_date', 'desc')->get());\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":736,"cells":{"query_id":{"kind":"string","value":"4557752ac75105483d98706b2226a87d"},"query":{"kind":"string","value":"Get Network Interface information for a server. Get server's network interfaces. Returns IP addresses and net masks. This call will use zmrcd to call /opt/zimbra/libexec/zmserverips"},"positive_passages":{"kind":"list like","value":[{"docid":"a88b2ce99dc2482ca35196e5420c4056","score":"0.6261978","text":"public function getServerNIfs(Server $server, IpType $type = null)\n {\n $request = new \\Zimbra\\Admin\\Request\\GetServerNIfs(\n $server, $type\n );\n return $this->getClient()->doRequest($request);\n }","title":""}],"string":"[\n {\n \"docid\": \"a88b2ce99dc2482ca35196e5420c4056\",\n \"score\": \"0.6261978\",\n \"text\": \"public function getServerNIfs(Server $server, IpType $type = null)\\n {\\n $request = new \\\\Zimbra\\\\Admin\\\\Request\\\\GetServerNIfs(\\n $server, $type\\n );\\n return $this->getClient()->doRequest($request);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"fa764e9b937c1eeef065e720a8a79eff","score":"0.62304616","text":"public function getNetworkInterfaces()\n {\n if (is_null($this->_all))\n {\n $this->_all = explode(\"\\n\", $this->getShellExec(self::NETWORKSETUP.\" | grep 'en' | grep -o en.\"));\n }\n\n return $this->_all;\n }","title":""},{"docid":"916ede06634becc3d09eeaedae8dc7e1","score":"0.6191964","text":"private function get_interfaces_ip () {\n // init\n $this->connection_open ();\n // fetch\n try {\n $res1 = $this->snmp_session->walk( \"IP-MIB::ipAdEntAddr\" );\n $res2 = $this->snmp_session->walk( \"IP-MIB::ipAdEntNetMask\" );\n\t\t}\n\t\tcatch (Exception $e) {\n \t\tthrow new Exception ($e->getMessage());\n\t\t}\n\n // check for errors\n $this->connection_error_check ();\n\n // parse result\n $n=0;\n foreach ($res1 as $r) {\n $res[$n]['ip'] = $this->parse_snmp_result_value ($r);\n $n++;\n }\n $n=0;\n foreach ($res2 as $r) {\n $res[$n]['mac'] = $this->fill_mac_nulls ($r);\n // validate mac\n if ($this->validate_mac($res[$n]['mac'])===false) { $res[$n]['mac'] = \"\"; }\n $n++;\n };\n\n // save result\n $this->save_last_result ($res);\n\n // return response\n return isset($res) ? $res : false;\n }","title":""},{"docid":"90379935cb13b1bd406607c44256e023","score":"0.5889441","text":"public function getHostInterfaces(){\n $process = new Process(['ip', 'link', 'show']);\n\n $process->run();\n\n $net_list = explode(PHP_EOL, $process->getOutput());\n $out = array();\n\n for($i = 0; $i < sizeof($net_list)-2; $i=$i+2){\n array_push($out, trim(explode(':', $net_list[$i])[1]));\n }\n\n return $out;\n\n\n }","title":""},{"docid":"bb2df27b60dde02d720b387dda6f9fc8","score":"0.56563","text":"public function getNetworkInfo()\n {\n return $this->__call('getnetworkinfo');\n }","title":""},{"docid":"f7eee974b5d49acd52709a0f546b46b3","score":"0.5490413","text":"public function getnetworkinfo()\n {\n return $this->client->execute('getnetworkinfo', array());\n }","title":""},{"docid":"725efbd5d6ec4c132d15e918f69686e3","score":"0.5371842","text":"public function getNIC()\n {\n return $this->NIC;\n }","title":""},{"docid":"725efbd5d6ec4c132d15e918f69686e3","score":"0.5371842","text":"public function getNIC()\n {\n return $this->NIC;\n }","title":""},{"docid":"1d627422f8bb3a1030eb671770a7905d","score":"0.5330466","text":"public function getLogicalInterfaces()\n {\n return $this->logical_interfaces;\n }","title":""},{"docid":"e1b8e1e7af5bf8edfc80ff348155536a","score":"0.5201349","text":"public function getNetmask() {\n if(is_null($this->version)) return null;\n return $this->Bin2Ip($this->netmask_long);\n }","title":""},{"docid":"118e16958e229e6aee774d7a0cad0157","score":"0.516977","text":"public function describeNetworkInterfaces($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->describeNetworkInterfacesWithOptions($request, $runtime);\n }","title":""},{"docid":"713cabcd13fb8c08a9bc8bb15c8c532c","score":"0.5143671","text":"public function getWiFiInterfaces()\n {\n if (is_null($this->_wifi))\n {\n $this->_wifi = explode(\"\\n\", $this->getShellExec(self::NETWORKSETUP.\" | grep -A2 'Wi-Fi\\|Airport' | grep -o en.\"));\n }\n\n return $this->_wifi;\n }","title":""},{"docid":"1bd3409307043ad8ae61f10c881f15d2","score":"0.50809765","text":"protected function getInterfaces (String $ip)\n {\n exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_index $ip\",$intfirst);\n exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_index_ip $ip\" , $indexip);\n exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_ip $ip\" ,$intips);\n $a=true;\n if (empty($indexip))\n {\n $f=false;\n $a=false;\n }\n else\n {\n $j=0;\n $f=true;\n }\n foreach ($intfirst as $i) { \n $intdescr = shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_descr $ip $i\");\n $inttype= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_type $ip $i\");\n $intmtu= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_mtu $ip $i\");\n $intspeed= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_speed $ip $i\");\n $intadmin= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_admin $ip $i\");\n $intoper= shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_oper $ip $i\");\n if ($a == false)\n {\n $intvlan = shell_exec(\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_vlan $ip $i\");\n if ($intvlan == NULL || strpos($intvlan, 'Null') !== false)\n {\n $intip = \"Unavailable\";\n }\n else\n {\n $intip = \"Vlan \".$intvlan;\n }\n }\n else if ($f && $i == $indexip[$j])\n {\n $intip = $intips[$j];\n if ( (count($indexip) - 1) == $j )\n {\n $f = false;\n }\n else\n {\n $j++;\n }\n }\n else\n {\n $intip = \"Unavailable\";\n }\n // if (strpos($intdescr, 'Null') == false)\n // {\n $interface = new Intdevice ;\n $interface -> ip = $ip;\n $interface -> id = $i;\n if ($intdescr == NULL || strpos($intdescr, 'Null') !== false)\n {\n $intdescr = \"Unavailable\";\n }\n if ($inttype == NULL || strpos($inttype, 'Null') !== false)\n {\n $inttype = \"Unavailable\";\n }\n if ($intmtu == NULL || strpos($intmtu, 'Null') !== false)\n {\n $intmtu = \"Unavailable\";\n }\n if ($intspeed == NULL || strpos($intspeed, 'Null') !== false)\n {\n $intspeed = \"Unavailable\";\n }\n if ($intadmin == NULL || strpos($intadmin, 'Null') !== false)\n {\n $intadmin = \"Unavailable\";\n }\n if ($intoper == NULL || strpos($intoper, 'Null') !== false)\n {\n $intoper = \"Unavailable\";\n }\n\n\n \n\n\n $interface -> description = $intdescr;\n $interface -> type = $inttype;\n $interface -> mtu = $intmtu;\n $interface -> speed = $intspeed; \n $interface -> adminstatus = $intadmin;\n $interface -> operstatus = $intoper;\n $interface -> intip = $intip;\n // exec(\"echo $intip >> /mnt/hgfs/NetworkManager/scans/interfaces\");\n\n if (Intdevice::where('ip',$ip)->where('id',$i)->first())\n {\n DB::table('intdevice')->where('ip',$ip)->where('id',$i)->update(['description'=> $interface ->description , 'type' => $interface->type , 'mtu' => $interface->mtu,'speed' => $interface->speed,'adminstatus' => $interface->adminstatus , 'operstatus' => $interface->operstatus , 'intip' => $interface->intip]);\n }\n else\n {\n $interface -> save();\n }\n // }\n }\n }","title":""},{"docid":"da033c524a4d670cb0218dd72c77e7dc","score":"0.5077077","text":"public function returnAllIps()\n\t{\n\t\t$result = mysqli_query($this->con, \"SELECT sys.mac_address, ned.ip FROM system sys, network_details ned WHERE sys.mac_address = ned.system_id ORDER BY sys.status DESC, sys.timestamp DESC;\");\n\t\treturn $result;\n\t}","title":""},{"docid":"4f7c100ed0fe7fe500b7db8640fa94d5","score":"0.5074737","text":"public function ips()\n {\n return $this->getClientIps();\n }","title":""},{"docid":"3127120d2b7096fe2196ffe2c3b78ae5","score":"0.50746506","text":"function getInterface($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, \"rpc.common.objectuuid\");\n\t\t// Get the configuration object.\n\t\t$db = \\OMV\\Config\\Database::getInstance();\n\t\t$object = $db->get(\"conf.system.network.interface\", $params['uuid']);\n\t\t// Modify the generic network interface configuration data.\n\t\t// Other interface type related data must be modified separately.\n\t\t$result = $object->getAssoc();\n\t\t$result['dnsnameservers'] = str_replace(\" \", \",\",\n\t\t $result['dnsnameservers']);\n\t\t$result['dnssearch'] = str_replace(\" \", \",\", $result['dnssearch']);\n\t\treturn $result;\n\t}","title":""},{"docid":"41c05866c9f5c93debd488fb54320cad","score":"0.50733626","text":"public function getInterfacesAction()\n {\n // map physical interfaces to description / name\n $configObj = Config::getInstance()->object();\n $allInterfaces = array();\n foreach ($configObj->interfaces->children() as $key => $intf) {\n $allInterfaces[(string)$intf->if] = empty($intf->descr) ? $key : (string)$intf->descr;\n }\n return $allInterfaces;\n }","title":""},{"docid":"2091098d59795a2bf36f48c873cc44e7","score":"0.50632423","text":"protected function getIpV4($interface)\n {\n if ($retval = $this->getShellExec(sprintf('/sbin/ifconfig %s 2>/dev/null', $interface)))\n {\n $lines = explode(\"\\n\", $retval);\n foreach ($lines as $line)\n {\n if (preg_match('#^\\s*inet\\s([0-9.]*).*#', $line, $matches))\n {\n return $matches[1];\n }\n }\n }\n\n return null;\n }","title":""},{"docid":"45a9bde3b50d2b04010874e47fce9389","score":"0.505277","text":"function get_aws_instance_network_interfaces() {\n $interface_parameters = array(\n 'device-number',\n 'interface-id',\n 'local-hostname',\n 'local-ipv4s',\n 'mac',\n 'owner-id',\n 'security-group-ids',\n 'security-groups',\n 'subnet-id',\n 'subnet-ipv4-cidr-block',\n 'vpc-id',\n 'vpc-ipv4-cidr-block',\n 'vpc-ipv4-cidr-blocks'\n );\n\n // get macs\n $ch = curl_init();\n curl_setopt_array($ch, array(\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_URL => 'http://169.254.169.254/latest/meta-data/network/interfaces/macs/',\n ));\n $output = curl_exec($ch);\n\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if ($code == '200') {\n $interfaces = array();\n foreach(preg_split(\"/((\\r?\\n)|(\\r\\n?))/\", $output) as $mac){\n $interface_details = array();\n\n // Get each parameter for interface\n foreach ($interface_parameters as $parameter) {\n curl_setopt_array($ch, array(\n CURLOPT_URL => \"http://169.254.169.254/latest/meta-data/network/interfaces/macs/$mac/$parameter\",\n ));\n $output = curl_exec($ch);\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n if ($code == '200') {\n $interface_details[$parameter] = $output;\n }\n }\n $interfaces[] = $interface_details;\n }\n return $interfaces;\n } else {\n return false;\n }\n}","title":""},{"docid":"eb22d38988eba4c1dd3a07dff9f4f510","score":"0.50353885","text":"public function ircInfo($server = null)\n {\n return $this->getIrcMessage('INFO', array($server));\n }","title":""},{"docid":"9bd9f153023d85fe351723a411e67450","score":"0.50322354","text":"public function getServerIp()\n {\n $value = $this->get(self::SERVER_IP);\n return $value === null ? (string)$value : $value;\n }","title":""},{"docid":"745e5ff0c6bc96be61f642ce3f5515cd","score":"0.4943413","text":"function zerotier_list_joined_networks() {\n exec(\"/usr/local/bin/zerotier-cli -j listnetworks\", $netj);\n $nets = json_decode(implode('',$netj));\n return $nets;\n}","title":""},{"docid":"937f099476ac50cc376f355b6d0106e9","score":"0.48766026","text":"protected function getHostIpAddress()\n\t{\n\t\t$BIN_DIR=APP_BINDIR;\n\n\t\t// step 1 - how many adapters do we have on this box?\n\t\t// @todo Maybe we want to move this somewhere more central later?\n\t\t$os = Os::getOs();\n\t\t$parser = IfconfigParser::fromDistributions($os->getPossibleClassNames());\n\t\t$netifaces = new netifaces($os, $parser);\n\n\t\t$adapters = $netifaces->listAdapters();\n\t\tif (empty($adapters)) {\n\t\t\tthrow new Exception(\"unable to parse host machine network adapters list\");\n\t\t}\n\n\t\t// step 2 - find an adapter that is most likely to have the IP address\n\t\t// that we want\n\t\t//\n\t\t// note: am not sure that the search list for OSX interfaces is\n\t\t// reliable :(\n\n\t\ttry {\n\t\t\t$searchList = array(\"br0\", \"p2p1\", \"eth0\", \"en2\", \"en0\", \"en1\", \"wlan0\", \"p6p1\");\n\t\t\tforeach ($searchList as $adapterToTest) {\n\t\t\t\t// skip over any adapters that don't exist on this machine\n\t\t\t\tif (!in_array($adapterToTest, $adapters)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// we think the adapter is present\n\t\t\t\t//\n\t\t\t\t// does it have an IP address?\n\t\t\t\ttry {\n\t\t\t\t\t$ipAddress = $netifaces->getIpAddress($adapterToTest);\n\t\t\t\t} catch(NetifacesException $e){\n\t\t\t\t\t// We couldn't get an IP address\n\t\t\t\t\t$ipAddress = null;\n\t\t\t\t}\n\n\t\t\t\t// did we get back a valid IP address?\n\t\t\t\t$parts = explode('.', $ipAddress);\n\t\t\t\tif (count($parts) == 4) {\n\t\t\t\t\t// success!\n\t\t\t\t\treturn array($adapterToTest, $ipAddress);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if we get here, we could not determine the IP address of our\n\t\t\t// host :(\n\t\t\t//\n\t\t\t// this sucks\n\t\t\tthrow new NetifacesException(\"Unable to determine IP address\");\n\n\t\t} catch (NetifacesException $e){\n\t\t\tthrow new Exception(\"could not determine IP address of host machine\");\n\t\t}\n\t}","title":""},{"docid":"a6f6190f3b20667b9107e86a7bb68856","score":"0.4870772","text":"public static function getLocalIps()\n {\n return ['127.0.0.1', '1', '::1'];\n }","title":""},{"docid":"dd73d5146f6a3c1f390be674f30399ee","score":"0.4859878","text":"private function discoverWANInterface()\n {\n $lines = preg_split(\"/\\n/\", trim(`/sbin/route -n |grep eth | sort -r`));\n\n $details = preg_split(\"/\\s+/\", $lines[0]);\n $this->wan->netmask = $details[2];\n $this->wan->iface = $details[7];\n $details = preg_split(\"/\\s+/\", end($lines));\n $this->wan->gateway = $details[1];\n\n $this->wan->mac = $this->discoverMAC($this->wan->iface);\n $this->wan->ipaddress = $this->discoverIPAddress($this->wan->iface);\n $this->discoverDNS($this->wan);\n\n }","title":""},{"docid":"cd9b2b09dca66e48574457da1a62337f","score":"0.4851467","text":"public function getServerIp()\n {\n return $this->serverIp;\n }","title":""},{"docid":"6535a86eca8bebbbb7b0d8e452a1ac0f","score":"0.48429832","text":"function get_configured_ip_addresses() {\n\tglobal $config;\n\n\tif (!function_exists('get_interface_ip')) {\n\t\trequire_once(\"interfaces.inc\");\n\t}\n\t$ip_array = array();\n\t$interfaces = get_configured_interface_list();\n\tif (is_array($interfaces)) {\n\t\tforeach ($interfaces as $int) {\n\t\t\t$ipaddr = get_interface_ip($int);\n\t\t\t$ip_array[$int] = $ipaddr;\n\t\t}\n\t}\n\t$interfaces = get_configured_vip_list('inet');\n\tif (is_array($interfaces)) {\n\t\tforeach ($interfaces as $int => $ipaddr) {\n\t\t\t$ip_array[$int] = $ipaddr;\n\t\t}\n\t}\n\n\t/* pppoe server */\n\tif (is_array($config['pppoes']) && is_array($config['pppoes']['pppoe'])) {\n\t\tforeach ($config['pppoes']['pppoe'] as $pppoe) {\n\t\t\tif ($pppoe['mode'] == \"server\") {\n\t\t\t\tif (is_ipaddr($pppoe['localip'])) {\n\t\t\t\t\t$int = \"poes\". $pppoe['pppoeid'];\n\t\t\t\t\t$ip_array[$int] = $pppoe['localip'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $ip_array;\n}","title":""},{"docid":"5e488f5b09bd7804dc8023d7d4c9493e","score":"0.48211935","text":"public function getNetworkInterface($name, $nic){\n $info = $this->vmInfo($name);\n\n $info = explode(PHP_EOL, $info);\n\n foreach($info as $line){\n if (strpos($line, $nic) !== false){\n return explode(',',explode(':', $line)[3])[0];\n }\n }\n return $nic.' not found';\n }","title":""},{"docid":"85c8f4e3932c4db5f9af2c973d3d63bd","score":"0.48008832","text":"public function getNIP()\n {\n return $this->nIP;\n }","title":""},{"docid":"80ac3ff57220dfec0b29e7d86db735a8","score":"0.47944614","text":"public function getIPAddress() \n\t {\n\t\t$ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');\n\t\tforeach ($ip_keys as $key)\n\t\t{\n\t\t\tif (array_key_exists($key, $_SERVER) === true)\n\t\t\t{\n\t\t\t\tforeach (explode(',', $_SERVER[$key]) as $ip)\n\t\t\t\t{\n\t\t\t\t\t$ip = trim($ip);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $ip;\n\t }","title":""},{"docid":"72355b1e311e40d06b903b4aa28878c2","score":"0.47629336","text":"public function getIpis(): IPIList\n {\n return $this->ipis;\n }","title":""},{"docid":"2d58bca7b0af5738585cffa2bea986b0","score":"0.47032192","text":"public function getEthernetConfiguration()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ETHERNET_CONFIGURATION, $payload);\n\n $payload = unpack('C1connection/C4ip/C4subnet_mask/C4gateway/v1port', $data);\n\n $result['connection'] = $payload['connection'];\n $result['ip'] = IPConnection::collectUnpackedArray($payload, 'ip', 4);\n $result['subnet_mask'] = IPConnection::collectUnpackedArray($payload, 'subnet_mask', 4);\n $result['gateway'] = IPConnection::collectUnpackedArray($payload, 'gateway', 4);\n $result['port'] = $payload['port'];\n\n return $result;\n }","title":""},{"docid":"7249c12e17fc6a3e67cbcf07080c047f","score":"0.4701846","text":"function wg_interface_status() {\n\tglobal $wgg;\n\n\t$status = array();\n\texec(\"{$wgg['ifconfig']} -a -g {$wgg['if_group']}\", $status);\n\n\t$output = implode(\"\\n\", $status);\n\treturn htmlspecialchars($output);\n\n}","title":""},{"docid":"9b58080a486a5c188eb69442de6d3556","score":"0.4697919","text":"function get_interface_list() {\n\t$devices = array();\n\t$file_name = \"/proc/net/dev\";\n\n\tif ($fopen_file = fopen($file_name, 'r')) {\n\t\twhile ($buffer = fgets($fopen_file, 4096)) {\n\t\t\tif (preg_match(\"/eth[0-9][0-9]*/i\", trim($buffer), $match)) {\n\t\t\t\t$devices[] = $match[0];\n\t\t\t}\n\t\t}\n\t\t$devices = array_unique($devices);\n\t\tsort($devices);\n\t\tfclose ($fopen_file);\n\t}\n\treturn $devices;\n}","title":""},{"docid":"9dac1495b929fda5b221620f792694a9","score":"0.4689412","text":"function noOfInterfaces(){\n\t\t//get no of Interfaces\n\t\t$oid = \".1.3.6.1.2.1.2.1.0\";\n\t\t$out = $this->snmpGetandTrim($oid,\"INTEGER\");\n\t\tif($out != \"ERROR\"){\n\t\t\treturn $out;\n\t\t}else{\n\t\t\treturn $e100;\n\t\t}\n\t}","title":""},{"docid":"aa222e62108d35d8ece7fea0e853ef46","score":"0.46884146","text":"public function setLogicalInterfaces($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\BareMetalSolution\\V2\\ServerNetworkTemplate\\LogicalInterface::class);\n $this->logical_interfaces = $arr;\n\n return $this;\n }","title":""},{"docid":"5d5e763613f64cec3cff1b4a2b71b8d7","score":"0.46842262","text":"public function GetIP();","title":""},{"docid":"01016317b3a98014639af763a3ad9917","score":"0.4672824","text":"public function getILNS() {\n return $this->ilns;\n }","title":""},{"docid":"79cb910d5ccb3cdf6784c36979c864ef","score":"0.466658","text":"public function serverInfo()\n {\n $url = $this->service_url . '/serverInfo';\n $data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json');\n return json_decode($data, true);\n }","title":""},{"docid":"4ac6164f75ce5b3184e04674eccd16aa","score":"0.4665719","text":"public function getSentinelServers();","title":""},{"docid":"73e897f1411f628fda2cb2833b4a96db","score":"0.46637505","text":"function getServerIPAddress(){\n\treturn \"{$_SERVER['SERVER_ADDR']}\";\n}","title":""},{"docid":"d97c99ebb210d288c221e86f33979b0b","score":"0.46613893","text":"function get_server_info() {\n\t\treturn array(\n\t\t\t'MySQL',\n\t\t\tmysql_get_server_info($this->connection)\n\t\t);\n\t}","title":""},{"docid":"cc0183187ec76deb0965d0540cda194f","score":"0.46559092","text":"private function discoverLANInterface()\n {\n $details = preg_split(\"/\\s+/\", `/sbin/route -n |grep -v 10.64.6|grep tun`);\n $this->lan->netmask = $details[2];\n $this->lan->iface = $details[7];\n\n if ($this->lan->iface) {\n\n $this->lan->mac = $this->discoverMAC($this->lan->iface);\n $this->lan->ipaddress = $this->discoverIPAddress($this->lan->iface);\n $this->lan->netmask = $this->discoverNetmask($this->lan->iface);\n }\n\n }","title":""},{"docid":"d568f7d4c302e9f718b342dabcd984bf","score":"0.46465084","text":"public static function getReservedIps()\n {\n return [\n 167772160 => 184549375, // 10.0.0.0 - 10.255.255.255\n 3232235520 => 3232301055, // 192.168.0.0 - 192.168.255.255\n 2130706432 => 2147483647, // 127.0.0.0 - 127.255.255.255\n 2851995648 => 2852061183, // 169.254.0.0 - 169.254.255.255\n 2886729728 => 2887778303, // 172.16.0.0 - 172.31.255.255\n 3758096384 => 4026531839, // 224.0.0.0 - 239.255.255.255\n ];\n }","title":""},{"docid":"cc95111f3898ba26e0935bc62daa35af","score":"0.46342754","text":"function getInterfaceList($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, \"rpc.common.getlist\");\n\t\t// Get all network interface configuration objects.\n\t\t$result = $this->callMethod(\"enumerateConfiguredDevices\",\n\t\t $params, $context);\n\t\t// Filter the result.\n\t\treturn $this->applyFilter($result, $params['start'],\n\t\t $params['limit'], $params['sortfield'], $params['sortdir']);\n\t}","title":""},{"docid":"111e2094777b6b92fa140dce1edaf653","score":"0.4617867","text":"function wg_get_configured_ifs() {\n\tglobal $wgg;\n\n\treturn array_map(fn($x) => $x['name'], (array) $wgg['tunnels']);\n}","title":""},{"docid":"5c9f8874a69a3a745f1f9763b9a71e33","score":"0.46163675","text":"public function getNetworkKeys() {\n return Mage::helper('socnet')->getValidNetworks();\n }","title":""},{"docid":"c11acdc716ebcf9eee2f11f58467db3b","score":"0.46146652","text":"public function getServerInfoMySQL()\n\t{\n\t\treturn @$this->_aFunctionsSql['mysqli_get_server_info']($this->_oConnect);\t\n\t}","title":""},{"docid":"d560dcb1147e38f5948dbeef1e824687","score":"0.46123928","text":"function getServers();","title":""},{"docid":"06eb9e8e6583d8e5ea36274f1a78187d","score":"0.4610009","text":"public function getAtosServerIpAddresses()\n {\n if (isset($_SERVER)) {\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n } else {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n } else {\n if (getenv('HTTP_X_FORWARDED_FOR')) {\n $ip = getenv('HTTP_X_FORWARDED_FOR');\n } elseif (getenv('HTTP_CLIENT_IP')) {\n $ip = getenv('HTTP_CLIENT_IP');\n } else {\n $ip = getenv('REMOTE_ADDR');\n }\n }\n\n return explode(',', $ip);\n }","title":""},{"docid":"2a90f9ae9d4c9ad76e2c14fdd56fd994","score":"0.46071297","text":"public function getAddressInfo()\n {\n if ($this->flagDir->isExist(self::IP_FILENAME)) {\n $temp = $this->flagDir->readFile(self::IP_FILENAME);\n return explode(',', trim($temp));\n } else {\n return [];\n }\n }","title":""},{"docid":"f8416a5a7375f482f82d33f5eea86617","score":"0.46009865","text":"function GetIP()\n{\n foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key)\n {\n if (array_key_exists($key, $_SERVER) === true)\n {\n foreach (array_map('trim', explode(',', $_SERVER[$key])) as $ip)\n {\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false)\n {\n return $ip;\n }\n }\n }\n }\n}","title":""},{"docid":"60294f3811f19ae5678f13675fe3c9cc","score":"0.45698002","text":"function get_client_ip_server() {\n\t $ipaddress = '';\n\n\t if (array_key_exists('HTTP_CLIENT_IP', $_SERVER)){\n \t\t$clientIP = $_SERVER['HTTP_CLIENT_IP'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)){\n\t $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('HTTP_X_FORWARDED', $_SERVER)){\n\t $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('HTTP_FORWARDED_FOR', $_SERVER)){\n\t $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('HTTP_FORWARDED', $_SERVER)){\n\t $ipaddress = $_SERVER['HTTP_FORWARDED'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t elseif (array_key_exists('REMOTE_ADDR', $_SERVER)){\n\t $ipaddress = $_SERVER['REMOTE_ADDR'];\n\t\t//console_log($ipaddress);\n\t\t}\n\t else{\n\t $ipaddress = 'UNKNOWN';\n\t\t//console_log($ipaddress);\n\t\t}\n \n \treturn $ipaddress;\n\t}","title":""},{"docid":"741582a3bcbd4310a175bed439bc0074","score":"0.4560617","text":"function find_vip_interface($vip) {\n\tglobal $log;\n\tglobal $_config;\n\t// Parse 'interface' command response into lines\n\t// Process interface lines to extract each interface entry\n\t// Determine if there's an interface with an IP address which corresponds to the VIP\n\t// If corresponding VIP found, set ethXX to its interface ID; e.g., $ethXX = \"eth0\"\n\t// Formulate the interface command\n\t$netdevices = glob('/sys/class/net/*');\n\tforeach($netdevices as $id => $device) {\n\t\t$cmd = 'ip addr show dev '.$device.' | grep inet | awk \\'{ print $2; }\\'';\n\t\t$result = sudo_execute($cmd);\n\t\tif ($result['rv'] != 0) {\n\t\t\t$errorMsg = \"interface command failure. Details: \" . $result['output_str'];\n\t\t\t$log->LogError($errorMsg);\n\t\t}\n\t\t$range = cidr2range($result['output_str']);\n\t\t$isInRange = cidrSearch($vip, $range);\n\t\tif ($isInRange) {\n\t\t\t$short_device = str_replace('/sys/class/net/', '', $device);\n\t\t\treturn $short_device;\n\t\t}\n\t}\n\treturn \"\"; // interface not found, return empty string\n}","title":""},{"docid":"f2b5b5f5197b6211cfebeb707f359279","score":"0.45567602","text":"private function getConfigVLANInterfaces()\n {\n $physicalInterfaces = array();\n $configObj = Config::getInstance()->object();\n if (!empty($configObj->vlans)) {\n foreach ($configObj->vlans->children() as $key => $vlan) {\n if (!isset($physicalInterfaces[(string)$vlan->if])) {\n $physicalInterfaces[(string)$vlan->if] = array();\n }\n $physicalInterfaces[(string)$vlan->if][] = (string)$vlan->vlanif;\n }\n }\n return $physicalInterfaces;\n }","title":""},{"docid":"d732639a87d47dc9454c41fde6675837","score":"0.45512843","text":"public function ircWhois($nickmasks, $server = null)\n {\n return $this->getIrcMessage('WHOIS', array($server, $nickmasks));\n }","title":""},{"docid":"713dda4dbadf80da35c8add9e6a27f75","score":"0.4547881","text":"private function get_arp_table () {\n // init\n $this->connection_open ();\n // fetch\n try {\n $res1 = $this->snmp_session->walk( \"IP-MIB::ipNetToMediaNetAddress\" ); // ip\n $res2 = $this->snmp_session->walk( \"IP-MIB::ipNetToMediaPhysAddress\" ); // mac\n $res3 = $this->snmp_session->walk( \"IP-MIB::ipNetToMediaIfIndex\" ); // interface index\n\t\t}\n\t\tcatch (Exception $e) {\n \t\tthrow new Exception ($e->getMessage());\n\t\t}\n\n // check for errors\n $this->connection_error_check ();\n\n // parse IP\n $n=0;\n foreach ($res1 as $r) {\n $res[$n]['ip'] = $this->parse_snmp_result_value ($r);\n $n++;\n }\n // parse MAC\n $n=0;\n foreach ($res2 as $r) {\n $res[$n]['mac'] = $this->fill_mac_nulls ($r);\n // validate mac\n if ($this->validate_mac($res[$n]['mac'])===false) { $res[$n]['mac'] = \"\"; }\n $n++;\n };\n\n $interface_indexes = array(); // to avoid fetching if multiple times\n // fetch interface name\n $n=0;\n foreach ($res3 as $r) {\n $index = $this->parse_snmp_result_value ($r);\n // if already fetched\n if (array_key_exists($index, $interface_indexes)) {\n $res[$n]['port'] = $interface_indexes[$index];\n }\n else {\n try {\n //$res1 = $this->snmp_session->get( \".1.3.6.1.2.1.31.1.1.1.1.\".$index ); // if description\n //$res2 = $this->snmp_session->get( \".1.3.6.1.2.1.2.2.1.2.\".$index ); // if port\n\n $res1 = $this->snmp_session->get( \"IF-MIB::ifName.\".$index ); // if description\n $res2 = $this->snmp_session->get( \"IF-MIB::ifDescr.\".$index ); // if port\n\n //parse and save\n $res[$n]['port'] = $this->parse_snmp_result_value ($res1);\n $res[$n]['portname'] = $this->parse_snmp_result_value ($res2);\n $interface_indexes[$index] = $res[$n]['port'];\n }\n catch (Exception $e) {\n $res[$n]['port'] = \"\";\n $res[$n]['portname'] = \"\";\n }\n }\n $n++;\n }\n\n // save result\n $this->save_last_result ($res);\n\n // return response\n return isset($res) ? $res : false;\n }","title":""},{"docid":"43069ae94afa93b5a0ed850e578f33d2","score":"0.4526636","text":"public function getRemoteIP(): string;","title":""},{"docid":"60d71875a4886e42c015a878aeb14e67","score":"0.4512118","text":"public function getNetworks() {\n\n //GET NETWORK TABLE\n $tableNetwork = Engine_Api::_()->getDbtable('networks', 'network');\n\n //MAKE QUERY\n $select = $tableNetwork->select()\n ->from($tableNetwork->info('name'), array('network_id', 'title'))\n ->order('title');\n $result = $tableNetwork->fetchAll($select);\n\n $everyone = Zend_Registry::get('Zend_Translate')->_('Everyone');\n\n //MAKE DATA ARRAY\n $networksOptions = array('0' => $everyone);\n foreach ($result as $value) {\n $networksOptions[$value->network_id] = $value->title;\n }\n\n //RETURN\n return $networksOptions;\n }","title":""},{"docid":"550f0a91aefe2e030200582fcddbea4c","score":"0.45042542","text":"public function getIdNetwork()\n {\n return $this->id_network;\n }","title":""},{"docid":"9f2b7546cf0ac6cc74a8b045795f0cea","score":"0.44631493","text":"static public function getInterfaces()\n\t{\n\t\treturn [];\n\t}","title":""},{"docid":"5061c9c6cfd8127ddf2821ad6eb8a54d","score":"0.44625238","text":"function get_IP_address(){\n foreach (array('HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR') as $key){\n if (array_key_exists($key, $_SERVER) === true){\n foreach (explode(',', $_SERVER[$key]) as $IPaddress){\n $IPaddress = trim($IPaddress); // Just to be safe\n\n if (filter_var($IPaddress,\n FILTER_VALIDATE_IP,\n FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)\n !== false) {\n\n return $IPaddress;\n }\n }\n }\n }\n }","title":""},{"docid":"9048f205eb44a3120115f687c0935e60","score":"0.446232","text":"function get_client_ip_server()\n{\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if ($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if ($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if ($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if ($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if ($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}","title":""},{"docid":"09c2009ec88c9f22d1efecd606f9432f","score":"0.44563833","text":"private function getRepositoryInterfaces()\n {\n $interfaces = collect([]);\n if (! $this->files->isDirectory($directory = $this->getRepositoryInterfacesPath())) {\n return $interfaces;\n }\n $files = $this->files->files($directory);\n if (is_array($files)) {\n $interfaces = collect($files)->map(function (SplFileInfo $file) {\n return str_replace(\".php\", \"\", $file->getFilename());\n });\n }\n\n return $interfaces;\n }","title":""},{"docid":"59bbccc9715b937a1798f04db468d180","score":"0.4445729","text":"function getEthernetIface($params, $context) {\n\t\t\treturn $this->callMethod(\"getInterface\", $params, $context);\n\t}","title":""},{"docid":"12ce160d5d0dfaf9d983a885ccdbd780","score":"0.444455","text":"public function get_all_firewall_nat(){\n return $this->query('/ip/firewall/nat/getall');\n }","title":""},{"docid":"42ee4e697a193f711d90483ebd36617b","score":"0.4429698","text":"public function getMailQueueInfo(NamedElement $server)\n {\n $request = new \\Zimbra\\Admin\\Request\\GetMailQueueInfo($server);\n return $this->getClient()->doRequest($request);\n }","title":""},{"docid":"fc6306f2c1bd290da82d2bfc6de0d9ef","score":"0.44263795","text":"public static function getLocalIp() {\n try { // if exec can be used\n $preg = \"/\\A((([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\\.){3}(([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\\Z/\";\n \n if ( PATH_SEPARATOR==':' ) { // linux\n exec(\"ifconfig\", $out, $stats);\n if (!empty($out)) {\n if (isset($out[1]) && strstr($out[1], 'addr:')) {\n $tmpArray = explode(\":\", $out[1]);\n $tmpIp = explode(\" \", $tmpArray[1]);\n if (preg_match($preg, trim($tmpIp[0])))\n return trim($tmpIp[0]);\n }\n }\n } else { // windows PATH_SEPARATOR==';'\n exec(\"ipconfig\", $out, $stats);\n if (!empty($out)) {\n foreach ($out AS $row) {\n if (strstr($row, \"IP\") && strstr($row, \":\") && !strstr($row, \"IPv6\")) {\n $tmpIp = explode(\":\", $row);\n if (preg_match($preg, trim($tmpIp[1])))\n return trim($tmpIp[1]);\n }\n }\n }\n }\n } catch ( Exception $ex ){\n }\n \n if (isset($_ENV[\"HOSTNAME\"]))\n $MachineName = $_ENV[\"HOSTNAME\"];\n else if (isset($_ENV[\"COMPUTERNAME\"]))\n $MachineName = $_ENV[\"COMPUTERNAME\"];\n else\n $MachineName = \"\";\n if ($MachineName!=\"\")\n return $MachineName;\n \n return '127.0.0.1';\n }","title":""},{"docid":"5cb0746e60a65a12a8a928fc975d92a8","score":"0.44254747","text":"function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}","title":""},{"docid":"b22bf2a046ca518feebf05765e26fb2d","score":"0.4418804","text":"public function getIp() { }","title":""},{"docid":"03923a7fa807bc13bde11eb60a045788","score":"0.44127178","text":"public function getNetworks()\n {\n return $this->networks;\n }","title":""},{"docid":"ecb7428e2e4dd216515486a3d74b4ac4","score":"0.44115666","text":"public function ipAddress()\n {\n $ip_keys = ['REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED'];\n foreach ($ip_keys as $key)\n {\n if ($this->server->has($key) === true)\n {\n foreach (explode(',', $this->server->get($key)) as $ip)\n {\n // trim for safety measures\n $ip = trim($ip);\n\n // attempt to validate IP\n if (valid_ip($ip))\n {\n return $ip;\n }\n }\n }\n }\n\n return '0.0.0.0';\n }","title":""},{"docid":"269e6fe3ad3b102359377156c06911ee","score":"0.43984568","text":"function get_client_ip_server()\n{\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if ($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if ($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if ($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if ($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if ($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n\n return $ipaddress;\n}","title":""},{"docid":"d165439c6aa19b5d2cc2eefbfa247e30","score":"0.43863028","text":"public function serverIp() {\n\t\treturn $this->env('SERVER_ADDR');\n\t}","title":""},{"docid":"b29544db4af65cfe5612115ea3a0e48b","score":"0.43831635","text":"public function getCurrentNetwork() {\n $arg = new getCurrentNetwork();\n $result = $this->__soapCall(\"getCurrentNetwork\", array($arg));\n return $result->rval;\n }","title":""},{"docid":"b279c7695b175170a0775b14c801267b","score":"0.43814048","text":"function get_client_ip_server() {\n $ipaddress = '';\n if ($_SERVER['HTTP_CLIENT_IP'])\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if($_SERVER['HTTP_X_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if($_SERVER['HTTP_FORWARDED_FOR'])\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if($_SERVER['HTTP_FORWARDED'])\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else if($_SERVER['REMOTE_ADDR'])\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else\n $ipaddress = 'UNKNOWN';\n \n return $ipaddress;\n}","title":""},{"docid":"c7aff0639b9ba36ba1639ce6d23eefd8","score":"0.4374239","text":"public function getCidr()\n {\n return $this->cidr;\n }","title":""},{"docid":"caf16a95bb05d6ac08a4deae9b0a911e","score":"0.43720126","text":"public function getEthernetCandidates($params, $context) {\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, [\n\t\t\t\"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t]);\n\t\t$mngr = \\OMV\\System\\Net\\NetworkInterfaceBackend\\Manager::getInstance();\n\t\t// Get all unused network interface devices, except loopback and\n\t\t// VLAN network interfaces.\n\t\tif (FALSE === ($devs = $mngr->enumerateUnused(\n\t\t OMV_NETWORK_INTERFACE_TYPE_ETHERNET))) {\n\t\t\tthrow new \\OMV\\Exception(\n\t\t\t \"Failed to get list of unused network interface devices.\");\n\t\t}\n\t\t// Get the network interface information.\n\t\t$result = [];\n\t\tforeach ($devs as $devk => $devv) {\n\t\t\t// Does a configuration object exists for the given network\n\t\t\t// interface device? In this case skip this device.\n\t\t\t$db = \\OMV\\Config\\Database::getInstance();\n\t\t\tif ($db->exists(\"conf.system.network.interface\", [\n\t\t\t\t\"operator\" => \"and\",\n\t\t\t\t\"arg0\" => [\n\t\t\t\t\t\"operator\" => \"stringEquals\",\n\t\t\t\t\t\"arg0\" => \"type\",\n\t\t\t\t\t\"arg1\" => \"ethernet\"\n\t\t\t\t],\n\t\t\t\t\"arg1\" => [\n\t\t\t\t\t\"operator\" => \"stringEquals\",\n\t\t\t\t\t\"arg0\" => \"devicename\",\n\t\t\t\t\t\"arg1\" => $devv\n\t\t\t\t]\n\t\t\t]))\n\t\t\t\tcontinue;\n\t\t\t$result[] = $this->getIfaceInfo($devv);\n\t\t}\n\t\treturn $result;\n\t}","title":""},{"docid":"6cdc715976e54b77b266cceb33e5d8d4","score":"0.437137","text":"public function getIpAddress() {\n return isset($this->serverData['REMOTE_ADDR']) ? $this->serverData['REMOTE_ADDR'] : null;\n }","title":""},{"docid":"79889271c6847372c80bde16c381ac90","score":"0.43705556","text":"public static function GetIP()\n\t{\n\t\tself::initialize();\n\t\treturn self::$ip_test;\n\t}","title":""},{"docid":"113e4f3d3ebc46c9eb757cc5bad50e38","score":"0.43589327","text":"public function getNetworkConfig()\n {\n return $this->network_config;\n }","title":""},{"docid":"f137a21bbc03c94f7d56ec46a464c654","score":"0.43516022","text":"public function providerIpAddressGet()\n {\n $ipAddress0 = \"\";\n $ipAddress1 = \"192.96.76.1\";\n $ipAddress2 = \"145.38.5.6\";\n $ipAddress3 = \"/geo/forbidden\";\n return [\n [$ipAddress0],\n [$ipAddress1],\n [$ipAddress2],\n [$ipAddress1, $ipAddress2],\n [$ipAddress3],\n // [\"35.158.84.49\"],\n // [\"23.34\"],\n // [\"35.158.84.49, 23.34\"],\n ];\n }","title":""},{"docid":"dfa0364ae2e4e610f090c1d94a5a8617","score":"0.4350279","text":"function getIPWhiteList() {\n\n\t\t\t$method = ORGANIZATION . \"/getipwhitelist\";\n\n\t\t\t$verbmethod = \"GET\";\n\n\t\t\t$params = array();\n\n\t\t\t$response = json_decode($this->zyncroApi->callApi( $method, $params, $verbmethod), true);\n\n\t\t\treturn $response;\n\t\t}","title":""},{"docid":"7fbf1b2161e3d54457016ff6bc4b865f","score":"0.4348501","text":"public function get_all_networks() {\n\t\t$req = $this->db->conn_id->query('SELECT id, network AS network_img, network_name, country FROM networks ORDER BY network_name ASC');\n\t\t$req->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Network');\n\t\t$networks = $req->fetchAll();\n\n\t\treturn $networks;\n\t}","title":""},{"docid":"154341cc1a41af839cec83d5893d7e0e","score":"0.43286747","text":"function foodbakery_get_all_server() {\r\n\t\treturn $_SERVER;\r\n\t}","title":""},{"docid":"cd347540541057b9a0a12efc43279ac1","score":"0.43249866","text":"public function getServerInfo()\n {\n return $this->_request('server')->getBody();\n }","title":""},{"docid":"c75a5286c0a86cde06f7bb79653ff578","score":"0.4324652","text":"function getIp() {\n // IP if shared internet connection\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\n return $_SERVER['HTTP_CLIENT_IP'];\n }\n // IP through a proxy\n elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n // Else : simple IP\n else {\n return (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '');\n }\n}","title":""},{"docid":"beff55b87953d0ad5add356859a0301b","score":"0.43153152","text":"public function getEthernetStatus()\n {\n $result = array();\n\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ETHERNET_STATUS, $payload);\n\n $payload = unpack('C6mac_address/C4ip/C4subnet_mask/C4gateway/V1rx_count/V1tx_count/c32hostname', $data);\n\n $result['mac_address'] = IPConnection::collectUnpackedArray($payload, 'mac_address', 6);\n $result['ip'] = IPConnection::collectUnpackedArray($payload, 'ip', 4);\n $result['subnet_mask'] = IPConnection::collectUnpackedArray($payload, 'subnet_mask', 4);\n $result['gateway'] = IPConnection::collectUnpackedArray($payload, 'gateway', 4);\n $result['rx_count'] = IPConnection::fixUnpackedUInt32($payload['rx_count']);\n $result['tx_count'] = IPConnection::fixUnpackedUInt32($payload['tx_count']);\n $result['hostname'] = IPConnection::implodeUnpackedString($payload, 'hostname', 32);\n\n return $result;\n }","title":""},{"docid":"20a46f44f0fc76bdf513392e0fe60b53","score":"0.43082717","text":"public function getBluetoothInterfaces()\n {\n if (is_null($this->_pan))\n {\n $this->_pan = explode(\"\\n\", $this->getShellExec(self::NETWORKSETUP.\" | grep -A2 'Bluetooth' | grep -o en.\"));\n }\n\n return $this->_pan;\n }","title":""},{"docid":"14ee1d3fb617a545e81679781474661f","score":"0.43011838","text":"protected function GetUserIp()\n\t{\n\t\t$ips = ApiStatController::GetIPBinary(true);\n\t\treturn ['binary' => $ips[0], 'string' => $ips[1]];\n\t}","title":""},{"docid":"976cd32e01cbdfb880f30bf9fb2a7991","score":"0.4291041","text":"public function ip__get( $ips_input = array( 'real', 'remote_addr', 'x_forwarded_for', 'x_real_ip', 'cloud_flare' ), $v4_only = true ){\n\t\t\n\t\t$result = Helper::ip__get( $ips_input, $v4_only );\n\t\t\n\t\treturn ! empty( $result ) ? array( 'real' => $result ) : array();\n\t\t\n\t}","title":""},{"docid":"250cfc20afa6949df4450c793d03ec5c","score":"0.42909658","text":"public function getIP(){\n\t\t\ttry{\n\t\t\t\tforeach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key){\n\t\t\t\t\tif (array_key_exists($key, $_SERVER) === true){\n\t\t\t\t\t\tforeach (explode(',', $_SERVER[$key]) as $ip){\n\t\t\t\t\t\t\t$ip = trim($ip); // just to be safe\n\t\t\t\t\t\t\tif (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false){\n\t\t\t\t\t\t\t\treturn $ip;\n\t\t\t\t\t\t\t\t}//if\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\treturn $ip;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}//foreach()\n\t\t\t\t\t\t}//if\n\t\t\t\t\t}//foreach()\n\t\t\t\t\t}catch(Exception $exc){\n\t\t\t\t\t\t$this->tempVar = $exc->getMessage();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}//catch()\n\t\t\t\t}","title":""},{"docid":"d0a9ab6c717ab4f33149075a1a5ce99e","score":"0.42899248","text":"public function getIP(): string\n {\n $ips = explode(',',$this->getHeader('x-forwarded-for', $this->getServer('remote_addr', '0.0.0.0')));\n return trim($ips[0] ?? '');\n }","title":""},{"docid":"140c7eb5aa8c2225dd0f07725fcc988a","score":"0.42826954","text":"function getIPList(){\n\t$url = 'https://api.sendgrid.com/apiv2/customer.ip.json';\n\t$postData['list'] = 'all';\n\t$results = callCURL($postData, $url);\n\treturn $results;\n}","title":""},{"docid":"cc22acac29152fa01944ceac22045bd4","score":"0.4281127","text":"private function getIp()\n\t{\n\t\tif (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\n\t\t\treturn $_SERVER['HTTP_X_FORWARDED'];\n\t\tif (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\n\t\t\treturn $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\n\t\tif (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\n\t\t\treturn $_SERVER['HTTP_FORWARDED_FOR'];\n\t\tif (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\n\t\t\treturn $_SERVER['HTTP_FORWARDED'];\n\n\t\treturn $_SERVER['REMOTE_ADDR'];\n\t}","title":""},{"docid":"5ac0f91fd503ce82c4fe782af0f4bdb6","score":"0.4272996","text":"private function getAddressesFromNetwork( IXP $ixp, Network $n, $p ) {\n $addrs = [\n 'lan' => [], // same LAN\n 'ixp' => [], // same IXP\n ];\n\n foreach( $n->getAddresses() as $a ) {\n if( $a->getProtocol() != $p ) {\n continue;\n }\n\n if( $a->getLAN()->getIXP()->getId() == $ixp->getId() ) {\n $addrs['lan'][] = $a->getAddress();\n } else if( $a->getLAN()->getIXP()->getOrganisation() == $ixp->getOrganisation() ) {\n $addrs['ixp'][] = $a->getAddress();\n }\n }\n\n return $addrs;\n }","title":""},{"docid":"fc9ae6498e85e20e9608413e110481ba","score":"0.4272369","text":"public function providerIpAddress()\n {\n return [\n [\"\"],\n [\"192.96.76.1\"],\n [\"145.38.5.6\"],\n [\"255.0.0.0\"],\n [\"23.34\"],\n // [\"35.158.84.49, 23.34\"],\n ];\n }","title":""},{"docid":"367ac7c02913ef4782d9f48a50a237c1","score":"0.42670992","text":"public function ips()\n {\n return response()->json(\n Equipamento::pluck('ip')\n );\n }","title":""},{"docid":"f4f7eaf8796521ac5ed33c8344c3909c","score":"0.42652765","text":"function guifi_device_print_interfaces($device) {\n\n if (empty($device['interfaces']))\n return NULL;\n\n $rows = array();\n $inamestr = '';\n $fo_connectors = guifi_types('fo_port');\n foreach ($device['interfaces'] as $inum => $if) {\n \t$ipstr='';\n \t$rows_if = array();\n guifi_log(GUIFILOG_TRACE,sprintf('function guifi_device_print_interfaces(interface %s)',$if['id']),$if);\n $connto_dev = array('data'=>'');\n if ($if['connto_did']) {\n $connto_dev['data'] = guifi_get_devicename($if['connto_did']);\n if ($if['connto_did']) {\n \t $rdev=db_fetch_object(db_query('SELECT interface_type FROM {guifi_interfaces} WHERE device_id=%d AND id=%d',\n \t $if['connto_did'],$if['connto_iid']\n \t ));\n $connto_dev['data'] .= ' / '.$rdev->interface_type;\n }\n }\n if (!empty($connto_dev['data'])) {\n $connto_dev['data'] = l($connto_dev['data'],'guifi/device/'.$if['connto_did']);\n } else\n $connto_dev['class'] = 'available';\n\n if ($if['ipv4']) foreach ($if['ipv4'] as $ipnum => $ipv4)\n {\n guifi_log(GUIFILOG_TRACE,sprintf('function guifi_device_print_interfaces(ip %s)',$ipv4['ipv4']),$ipv4);\n \t if ($ipv4['ipv4']) {\n $ipstr = $ipv4['ipv4'];\n \t } else\n \t $ipstr = t('n/a');\n $rows_if[] = array($ipstr,$ipv4['netmask']);\n } else\n $rows_if[] = array(null,null);\n\n $rspan = count($rows_if);\n if (empty($if['connector_type']))\n $if['connector_type'] = t('RJ45');\n if ($if['connector_type']!=t('RJ45'))\n $if['connector_type'] = $fo_connectors[$if['connector_type']];\n $begin = array(\n array('data'=>$if['interface_type']),\n array('data'=>$connto_dev['data'],'class'=>$connto_dev['class']),\n array('data'=>$if['connector_type']),\n array('data'=>$if['comments']),\n array('data'=>$if['mac']),\n );\n foreach ($begin as $i => $r)\n $begin[$i] = array_merge($r,array('rowspan'=>$rspan,'valign'=>'top'));\n foreach ($rows_if as $i=>$row)\n if ($i==0)\n $rows[] = array_merge($begin,$row);\n else\n $rows[] = $row;\n\n }\n return $rows;\n}","title":""},{"docid":"6d7388e9a434ff996901201947be7df5","score":"0.4258098","text":"public function getEcsIpList($config = []);","title":""},{"docid":"acfc46d2f4ebdf3fc1cdfa30fe914bba","score":"0.42476216","text":"protected function get_mail_config() {\n $interface = $this->config('system.mail')->get('interface');\n return $interface;\n }","title":""}],"string":"[\n {\n \"docid\": \"fa764e9b937c1eeef065e720a8a79eff\",\n \"score\": \"0.62304616\",\n \"text\": \"public function getNetworkInterfaces()\\n {\\n if (is_null($this->_all))\\n {\\n $this->_all = explode(\\\"\\\\n\\\", $this->getShellExec(self::NETWORKSETUP.\\\" | grep 'en' | grep -o en.\\\"));\\n }\\n\\n return $this->_all;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"916ede06634becc3d09eeaedae8dc7e1\",\n \"score\": \"0.6191964\",\n \"text\": \"private function get_interfaces_ip () {\\n // init\\n $this->connection_open ();\\n // fetch\\n try {\\n $res1 = $this->snmp_session->walk( \\\"IP-MIB::ipAdEntAddr\\\" );\\n $res2 = $this->snmp_session->walk( \\\"IP-MIB::ipAdEntNetMask\\\" );\\n\\t\\t}\\n\\t\\tcatch (Exception $e) {\\n \\t\\tthrow new Exception ($e->getMessage());\\n\\t\\t}\\n\\n // check for errors\\n $this->connection_error_check ();\\n\\n // parse result\\n $n=0;\\n foreach ($res1 as $r) {\\n $res[$n]['ip'] = $this->parse_snmp_result_value ($r);\\n $n++;\\n }\\n $n=0;\\n foreach ($res2 as $r) {\\n $res[$n]['mac'] = $this->fill_mac_nulls ($r);\\n // validate mac\\n if ($this->validate_mac($res[$n]['mac'])===false) { $res[$n]['mac'] = \\\"\\\"; }\\n $n++;\\n };\\n\\n // save result\\n $this->save_last_result ($res);\\n\\n // return response\\n return isset($res) ? $res : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90379935cb13b1bd406607c44256e023\",\n \"score\": \"0.5889441\",\n \"text\": \"public function getHostInterfaces(){\\n $process = new Process(['ip', 'link', 'show']);\\n\\n $process->run();\\n\\n $net_list = explode(PHP_EOL, $process->getOutput());\\n $out = array();\\n\\n for($i = 0; $i < sizeof($net_list)-2; $i=$i+2){\\n array_push($out, trim(explode(':', $net_list[$i])[1]));\\n }\\n\\n return $out;\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb2df27b60dde02d720b387dda6f9fc8\",\n \"score\": \"0.56563\",\n \"text\": \"public function getNetworkInfo()\\n {\\n return $this->__call('getnetworkinfo');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7eee974b5d49acd52709a0f546b46b3\",\n \"score\": \"0.5490413\",\n \"text\": \"public function getnetworkinfo()\\n {\\n return $this->client->execute('getnetworkinfo', array());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"725efbd5d6ec4c132d15e918f69686e3\",\n \"score\": \"0.5371842\",\n \"text\": \"public function getNIC()\\n {\\n return $this->NIC;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"725efbd5d6ec4c132d15e918f69686e3\",\n \"score\": \"0.5371842\",\n \"text\": \"public function getNIC()\\n {\\n return $this->NIC;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d627422f8bb3a1030eb671770a7905d\",\n \"score\": \"0.5330466\",\n \"text\": \"public function getLogicalInterfaces()\\n {\\n return $this->logical_interfaces;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1b8e1e7af5bf8edfc80ff348155536a\",\n \"score\": \"0.5201349\",\n \"text\": \"public function getNetmask() {\\n if(is_null($this->version)) return null;\\n return $this->Bin2Ip($this->netmask_long);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"118e16958e229e6aee774d7a0cad0157\",\n \"score\": \"0.516977\",\n \"text\": \"public function describeNetworkInterfaces($request)\\n {\\n $runtime = new RuntimeOptions([]);\\n\\n return $this->describeNetworkInterfacesWithOptions($request, $runtime);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"713cabcd13fb8c08a9bc8bb15c8c532c\",\n \"score\": \"0.5143671\",\n \"text\": \"public function getWiFiInterfaces()\\n {\\n if (is_null($this->_wifi))\\n {\\n $this->_wifi = explode(\\\"\\\\n\\\", $this->getShellExec(self::NETWORKSETUP.\\\" | grep -A2 'Wi-Fi\\\\|Airport' | grep -o en.\\\"));\\n }\\n\\n return $this->_wifi;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1bd3409307043ad8ae61f10c881f15d2\",\n \"score\": \"0.50809765\",\n \"text\": \"protected function getInterfaces (String $ip)\\n {\\n exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_index $ip\\\",$intfirst);\\n exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_index_ip $ip\\\" , $indexip);\\n exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_ip $ip\\\" ,$intips);\\n $a=true;\\n if (empty($indexip))\\n {\\n $f=false;\\n $a=false;\\n }\\n else\\n {\\n $j=0;\\n $f=true;\\n }\\n foreach ($intfirst as $i) { \\n $intdescr = shell_exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_descr $ip $i\\\");\\n $inttype= shell_exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_type $ip $i\\\");\\n $intmtu= shell_exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_mtu $ip $i\\\");\\n $intspeed= shell_exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_speed $ip $i\\\");\\n $intadmin= shell_exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_admin $ip $i\\\");\\n $intoper= shell_exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_oper $ip $i\\\");\\n if ($a == false)\\n {\\n $intvlan = shell_exec(\\\"/mnt/hgfs/NetworkManager/snmp_files/instant/get_int_vlan $ip $i\\\");\\n if ($intvlan == NULL || strpos($intvlan, 'Null') !== false)\\n {\\n $intip = \\\"Unavailable\\\";\\n }\\n else\\n {\\n $intip = \\\"Vlan \\\".$intvlan;\\n }\\n }\\n else if ($f && $i == $indexip[$j])\\n {\\n $intip = $intips[$j];\\n if ( (count($indexip) - 1) == $j )\\n {\\n $f = false;\\n }\\n else\\n {\\n $j++;\\n }\\n }\\n else\\n {\\n $intip = \\\"Unavailable\\\";\\n }\\n // if (strpos($intdescr, 'Null') == false)\\n // {\\n $interface = new Intdevice ;\\n $interface -> ip = $ip;\\n $interface -> id = $i;\\n if ($intdescr == NULL || strpos($intdescr, 'Null') !== false)\\n {\\n $intdescr = \\\"Unavailable\\\";\\n }\\n if ($inttype == NULL || strpos($inttype, 'Null') !== false)\\n {\\n $inttype = \\\"Unavailable\\\";\\n }\\n if ($intmtu == NULL || strpos($intmtu, 'Null') !== false)\\n {\\n $intmtu = \\\"Unavailable\\\";\\n }\\n if ($intspeed == NULL || strpos($intspeed, 'Null') !== false)\\n {\\n $intspeed = \\\"Unavailable\\\";\\n }\\n if ($intadmin == NULL || strpos($intadmin, 'Null') !== false)\\n {\\n $intadmin = \\\"Unavailable\\\";\\n }\\n if ($intoper == NULL || strpos($intoper, 'Null') !== false)\\n {\\n $intoper = \\\"Unavailable\\\";\\n }\\n\\n\\n \\n\\n\\n $interface -> description = $intdescr;\\n $interface -> type = $inttype;\\n $interface -> mtu = $intmtu;\\n $interface -> speed = $intspeed; \\n $interface -> adminstatus = $intadmin;\\n $interface -> operstatus = $intoper;\\n $interface -> intip = $intip;\\n // exec(\\\"echo $intip >> /mnt/hgfs/NetworkManager/scans/interfaces\\\");\\n\\n if (Intdevice::where('ip',$ip)->where('id',$i)->first())\\n {\\n DB::table('intdevice')->where('ip',$ip)->where('id',$i)->update(['description'=> $interface ->description , 'type' => $interface->type , 'mtu' => $interface->mtu,'speed' => $interface->speed,'adminstatus' => $interface->adminstatus , 'operstatus' => $interface->operstatus , 'intip' => $interface->intip]);\\n }\\n else\\n {\\n $interface -> save();\\n }\\n // }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da033c524a4d670cb0218dd72c77e7dc\",\n \"score\": \"0.5077077\",\n \"text\": \"public function returnAllIps()\\n\\t{\\n\\t\\t$result = mysqli_query($this->con, \\\"SELECT sys.mac_address, ned.ip FROM system sys, network_details ned WHERE sys.mac_address = ned.system_id ORDER BY sys.status DESC, sys.timestamp DESC;\\\");\\n\\t\\treturn $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f7c100ed0fe7fe500b7db8640fa94d5\",\n \"score\": \"0.5074737\",\n \"text\": \"public function ips()\\n {\\n return $this->getClientIps();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3127120d2b7096fe2196ffe2c3b78ae5\",\n \"score\": \"0.50746506\",\n \"text\": \"function getInterface($params, $context) {\\n\\t\\t// Validate the RPC caller context.\\n\\t\\t$this->validateMethodContext($context, [\\n\\t\\t\\t\\\"role\\\" => OMV_ROLE_ADMINISTRATOR\\n\\t\\t]);\\n\\t\\t// Validate the parameters of the RPC service method.\\n\\t\\t$this->validateMethodParams($params, \\\"rpc.common.objectuuid\\\");\\n\\t\\t// Get the configuration object.\\n\\t\\t$db = \\\\OMV\\\\Config\\\\Database::getInstance();\\n\\t\\t$object = $db->get(\\\"conf.system.network.interface\\\", $params['uuid']);\\n\\t\\t// Modify the generic network interface configuration data.\\n\\t\\t// Other interface type related data must be modified separately.\\n\\t\\t$result = $object->getAssoc();\\n\\t\\t$result['dnsnameservers'] = str_replace(\\\" \\\", \\\",\\\",\\n\\t\\t $result['dnsnameservers']);\\n\\t\\t$result['dnssearch'] = str_replace(\\\" \\\", \\\",\\\", $result['dnssearch']);\\n\\t\\treturn $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41c05866c9f5c93debd488fb54320cad\",\n \"score\": \"0.50733626\",\n \"text\": \"public function getInterfacesAction()\\n {\\n // map physical interfaces to description / name\\n $configObj = Config::getInstance()->object();\\n $allInterfaces = array();\\n foreach ($configObj->interfaces->children() as $key => $intf) {\\n $allInterfaces[(string)$intf->if] = empty($intf->descr) ? $key : (string)$intf->descr;\\n }\\n return $allInterfaces;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2091098d59795a2bf36f48c873cc44e7\",\n \"score\": \"0.50632423\",\n \"text\": \"protected function getIpV4($interface)\\n {\\n if ($retval = $this->getShellExec(sprintf('/sbin/ifconfig %s 2>/dev/null', $interface)))\\n {\\n $lines = explode(\\\"\\\\n\\\", $retval);\\n foreach ($lines as $line)\\n {\\n if (preg_match('#^\\\\s*inet\\\\s([0-9.]*).*#', $line, $matches))\\n {\\n return $matches[1];\\n }\\n }\\n }\\n\\n return null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45a9bde3b50d2b04010874e47fce9389\",\n \"score\": \"0.505277\",\n \"text\": \"function get_aws_instance_network_interfaces() {\\n $interface_parameters = array(\\n 'device-number',\\n 'interface-id',\\n 'local-hostname',\\n 'local-ipv4s',\\n 'mac',\\n 'owner-id',\\n 'security-group-ids',\\n 'security-groups',\\n 'subnet-id',\\n 'subnet-ipv4-cidr-block',\\n 'vpc-id',\\n 'vpc-ipv4-cidr-block',\\n 'vpc-ipv4-cidr-blocks'\\n );\\n\\n // get macs\\n $ch = curl_init();\\n curl_setopt_array($ch, array(\\n CURLOPT_FOLLOWLOCATION => true,\\n CURLOPT_RETURNTRANSFER => true,\\n CURLOPT_URL => 'http://169.254.169.254/latest/meta-data/network/interfaces/macs/',\\n ));\\n $output = curl_exec($ch);\\n\\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\\n if ($code == '200') {\\n $interfaces = array();\\n foreach(preg_split(\\\"/((\\\\r?\\\\n)|(\\\\r\\\\n?))/\\\", $output) as $mac){\\n $interface_details = array();\\n\\n // Get each parameter for interface\\n foreach ($interface_parameters as $parameter) {\\n curl_setopt_array($ch, array(\\n CURLOPT_URL => \\\"http://169.254.169.254/latest/meta-data/network/interfaces/macs/$mac/$parameter\\\",\\n ));\\n $output = curl_exec($ch);\\n $code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\\n if ($code == '200') {\\n $interface_details[$parameter] = $output;\\n }\\n }\\n $interfaces[] = $interface_details;\\n }\\n return $interfaces;\\n } else {\\n return false;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb22d38988eba4c1dd3a07dff9f4f510\",\n \"score\": \"0.50353885\",\n \"text\": \"public function ircInfo($server = null)\\n {\\n return $this->getIrcMessage('INFO', array($server));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9bd9f153023d85fe351723a411e67450\",\n \"score\": \"0.50322354\",\n \"text\": \"public function getServerIp()\\n {\\n $value = $this->get(self::SERVER_IP);\\n return $value === null ? (string)$value : $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"745e5ff0c6bc96be61f642ce3f5515cd\",\n \"score\": \"0.4943413\",\n \"text\": \"function zerotier_list_joined_networks() {\\n exec(\\\"/usr/local/bin/zerotier-cli -j listnetworks\\\", $netj);\\n $nets = json_decode(implode('',$netj));\\n return $nets;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"937f099476ac50cc376f355b6d0106e9\",\n \"score\": \"0.48766026\",\n \"text\": \"protected function getHostIpAddress()\\n\\t{\\n\\t\\t$BIN_DIR=APP_BINDIR;\\n\\n\\t\\t// step 1 - how many adapters do we have on this box?\\n\\t\\t// @todo Maybe we want to move this somewhere more central later?\\n\\t\\t$os = Os::getOs();\\n\\t\\t$parser = IfconfigParser::fromDistributions($os->getPossibleClassNames());\\n\\t\\t$netifaces = new netifaces($os, $parser);\\n\\n\\t\\t$adapters = $netifaces->listAdapters();\\n\\t\\tif (empty($adapters)) {\\n\\t\\t\\tthrow new Exception(\\\"unable to parse host machine network adapters list\\\");\\n\\t\\t}\\n\\n\\t\\t// step 2 - find an adapter that is most likely to have the IP address\\n\\t\\t// that we want\\n\\t\\t//\\n\\t\\t// note: am not sure that the search list for OSX interfaces is\\n\\t\\t// reliable :(\\n\\n\\t\\ttry {\\n\\t\\t\\t$searchList = array(\\\"br0\\\", \\\"p2p1\\\", \\\"eth0\\\", \\\"en2\\\", \\\"en0\\\", \\\"en1\\\", \\\"wlan0\\\", \\\"p6p1\\\");\\n\\t\\t\\tforeach ($searchList as $adapterToTest) {\\n\\t\\t\\t\\t// skip over any adapters that don't exist on this machine\\n\\t\\t\\t\\tif (!in_array($adapterToTest, $adapters)) {\\n\\t\\t\\t\\t\\tcontinue;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// we think the adapter is present\\n\\t\\t\\t\\t//\\n\\t\\t\\t\\t// does it have an IP address?\\n\\t\\t\\t\\ttry {\\n\\t\\t\\t\\t\\t$ipAddress = $netifaces->getIpAddress($adapterToTest);\\n\\t\\t\\t\\t} catch(NetifacesException $e){\\n\\t\\t\\t\\t\\t// We couldn't get an IP address\\n\\t\\t\\t\\t\\t$ipAddress = null;\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// did we get back a valid IP address?\\n\\t\\t\\t\\t$parts = explode('.', $ipAddress);\\n\\t\\t\\t\\tif (count($parts) == 4) {\\n\\t\\t\\t\\t\\t// success!\\n\\t\\t\\t\\t\\treturn array($adapterToTest, $ipAddress);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// if we get here, we could not determine the IP address of our\\n\\t\\t\\t// host :(\\n\\t\\t\\t//\\n\\t\\t\\t// this sucks\\n\\t\\t\\tthrow new NetifacesException(\\\"Unable to determine IP address\\\");\\n\\n\\t\\t} catch (NetifacesException $e){\\n\\t\\t\\tthrow new Exception(\\\"could not determine IP address of host machine\\\");\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6f6190f3b20667b9107e86a7bb68856\",\n \"score\": \"0.4870772\",\n \"text\": \"public static function getLocalIps()\\n {\\n return ['127.0.0.1', '1', '::1'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd73d5146f6a3c1f390be674f30399ee\",\n \"score\": \"0.4859878\",\n \"text\": \"private function discoverWANInterface()\\n {\\n $lines = preg_split(\\\"/\\\\n/\\\", trim(`/sbin/route -n |grep eth | sort -r`));\\n\\n $details = preg_split(\\\"/\\\\s+/\\\", $lines[0]);\\n $this->wan->netmask = $details[2];\\n $this->wan->iface = $details[7];\\n $details = preg_split(\\\"/\\\\s+/\\\", end($lines));\\n $this->wan->gateway = $details[1];\\n\\n $this->wan->mac = $this->discoverMAC($this->wan->iface);\\n $this->wan->ipaddress = $this->discoverIPAddress($this->wan->iface);\\n $this->discoverDNS($this->wan);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd9b2b09dca66e48574457da1a62337f\",\n \"score\": \"0.4851467\",\n \"text\": \"public function getServerIp()\\n {\\n return $this->serverIp;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6535a86eca8bebbbb7b0d8e452a1ac0f\",\n \"score\": \"0.48429832\",\n \"text\": \"function get_configured_ip_addresses() {\\n\\tglobal $config;\\n\\n\\tif (!function_exists('get_interface_ip')) {\\n\\t\\trequire_once(\\\"interfaces.inc\\\");\\n\\t}\\n\\t$ip_array = array();\\n\\t$interfaces = get_configured_interface_list();\\n\\tif (is_array($interfaces)) {\\n\\t\\tforeach ($interfaces as $int) {\\n\\t\\t\\t$ipaddr = get_interface_ip($int);\\n\\t\\t\\t$ip_array[$int] = $ipaddr;\\n\\t\\t}\\n\\t}\\n\\t$interfaces = get_configured_vip_list('inet');\\n\\tif (is_array($interfaces)) {\\n\\t\\tforeach ($interfaces as $int => $ipaddr) {\\n\\t\\t\\t$ip_array[$int] = $ipaddr;\\n\\t\\t}\\n\\t}\\n\\n\\t/* pppoe server */\\n\\tif (is_array($config['pppoes']) && is_array($config['pppoes']['pppoe'])) {\\n\\t\\tforeach ($config['pppoes']['pppoe'] as $pppoe) {\\n\\t\\t\\tif ($pppoe['mode'] == \\\"server\\\") {\\n\\t\\t\\t\\tif (is_ipaddr($pppoe['localip'])) {\\n\\t\\t\\t\\t\\t$int = \\\"poes\\\". $pppoe['pppoeid'];\\n\\t\\t\\t\\t\\t$ip_array[$int] = $pppoe['localip'];\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\treturn $ip_array;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e488f5b09bd7804dc8023d7d4c9493e\",\n \"score\": \"0.48211935\",\n \"text\": \"public function getNetworkInterface($name, $nic){\\n $info = $this->vmInfo($name);\\n\\n $info = explode(PHP_EOL, $info);\\n\\n foreach($info as $line){\\n if (strpos($line, $nic) !== false){\\n return explode(',',explode(':', $line)[3])[0];\\n }\\n }\\n return $nic.' not found';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85c8f4e3932c4db5f9af2c973d3d63bd\",\n \"score\": \"0.48008832\",\n \"text\": \"public function getNIP()\\n {\\n return $this->nIP;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80ac3ff57220dfec0b29e7d86db735a8\",\n \"score\": \"0.47944614\",\n \"text\": \"public function getIPAddress() \\n\\t {\\n\\t\\t$ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR');\\n\\t\\tforeach ($ip_keys as $key)\\n\\t\\t{\\n\\t\\t\\tif (array_key_exists($key, $_SERVER) === true)\\n\\t\\t\\t{\\n\\t\\t\\t\\tforeach (explode(',', $_SERVER[$key]) as $ip)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$ip = trim($ip);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn $ip;\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72355b1e311e40d06b903b4aa28878c2\",\n \"score\": \"0.47629336\",\n \"text\": \"public function getIpis(): IPIList\\n {\\n return $this->ipis;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d58bca7b0af5738585cffa2bea986b0\",\n \"score\": \"0.47032192\",\n \"text\": \"public function getEthernetConfiguration()\\n {\\n $result = array();\\n\\n $payload = '';\\n\\n $data = $this->sendRequest(self::FUNCTION_GET_ETHERNET_CONFIGURATION, $payload);\\n\\n $payload = unpack('C1connection/C4ip/C4subnet_mask/C4gateway/v1port', $data);\\n\\n $result['connection'] = $payload['connection'];\\n $result['ip'] = IPConnection::collectUnpackedArray($payload, 'ip', 4);\\n $result['subnet_mask'] = IPConnection::collectUnpackedArray($payload, 'subnet_mask', 4);\\n $result['gateway'] = IPConnection::collectUnpackedArray($payload, 'gateway', 4);\\n $result['port'] = $payload['port'];\\n\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7249c12e17fc6a3e67cbcf07080c047f\",\n \"score\": \"0.4701846\",\n \"text\": \"function wg_interface_status() {\\n\\tglobal $wgg;\\n\\n\\t$status = array();\\n\\texec(\\\"{$wgg['ifconfig']} -a -g {$wgg['if_group']}\\\", $status);\\n\\n\\t$output = implode(\\\"\\\\n\\\", $status);\\n\\treturn htmlspecialchars($output);\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b58080a486a5c188eb69442de6d3556\",\n \"score\": \"0.4697919\",\n \"text\": \"function get_interface_list() {\\n\\t$devices = array();\\n\\t$file_name = \\\"/proc/net/dev\\\";\\n\\n\\tif ($fopen_file = fopen($file_name, 'r')) {\\n\\t\\twhile ($buffer = fgets($fopen_file, 4096)) {\\n\\t\\t\\tif (preg_match(\\\"/eth[0-9][0-9]*/i\\\", trim($buffer), $match)) {\\n\\t\\t\\t\\t$devices[] = $match[0];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t$devices = array_unique($devices);\\n\\t\\tsort($devices);\\n\\t\\tfclose ($fopen_file);\\n\\t}\\n\\treturn $devices;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9dac1495b929fda5b221620f792694a9\",\n \"score\": \"0.4689412\",\n \"text\": \"function noOfInterfaces(){\\n\\t\\t//get no of Interfaces\\n\\t\\t$oid = \\\".1.3.6.1.2.1.2.1.0\\\";\\n\\t\\t$out = $this->snmpGetandTrim($oid,\\\"INTEGER\\\");\\n\\t\\tif($out != \\\"ERROR\\\"){\\n\\t\\t\\treturn $out;\\n\\t\\t}else{\\n\\t\\t\\treturn $e100;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa222e62108d35d8ece7fea0e853ef46\",\n \"score\": \"0.46884146\",\n \"text\": \"public function setLogicalInterfaces($var)\\n {\\n $arr = GPBUtil::checkRepeatedField($var, \\\\Google\\\\Protobuf\\\\Internal\\\\GPBType::MESSAGE, \\\\Google\\\\Cloud\\\\BareMetalSolution\\\\V2\\\\ServerNetworkTemplate\\\\LogicalInterface::class);\\n $this->logical_interfaces = $arr;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d5e763613f64cec3cff1b4a2b71b8d7\",\n \"score\": \"0.46842262\",\n \"text\": \"public function GetIP();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01016317b3a98014639af763a3ad9917\",\n \"score\": \"0.4672824\",\n \"text\": \"public function getILNS() {\\n return $this->ilns;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cb910d5ccb3cdf6784c36979c864ef\",\n \"score\": \"0.466658\",\n \"text\": \"public function serverInfo()\\n {\\n $url = $this->service_url . '/serverInfo';\\n $data = $this->service->prepAndSend($url, array(200), 'GET', null, true, 'application/json', 'application/json');\\n return json_decode($data, true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ac6164f75ce5b3184e04674eccd16aa\",\n \"score\": \"0.4665719\",\n \"text\": \"public function getSentinelServers();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73e897f1411f628fda2cb2833b4a96db\",\n \"score\": \"0.46637505\",\n \"text\": \"function getServerIPAddress(){\\n\\treturn \\\"{$_SERVER['SERVER_ADDR']}\\\";\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d97c99ebb210d288c221e86f33979b0b\",\n \"score\": \"0.46613893\",\n \"text\": \"function get_server_info() {\\n\\t\\treturn array(\\n\\t\\t\\t'MySQL',\\n\\t\\t\\tmysql_get_server_info($this->connection)\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc0183187ec76deb0965d0540cda194f\",\n \"score\": \"0.46559092\",\n \"text\": \"private function discoverLANInterface()\\n {\\n $details = preg_split(\\\"/\\\\s+/\\\", `/sbin/route -n |grep -v 10.64.6|grep tun`);\\n $this->lan->netmask = $details[2];\\n $this->lan->iface = $details[7];\\n\\n if ($this->lan->iface) {\\n\\n $this->lan->mac = $this->discoverMAC($this->lan->iface);\\n $this->lan->ipaddress = $this->discoverIPAddress($this->lan->iface);\\n $this->lan->netmask = $this->discoverNetmask($this->lan->iface);\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d568f7d4c302e9f718b342dabcd984bf\",\n \"score\": \"0.46465084\",\n \"text\": \"public static function getReservedIps()\\n {\\n return [\\n 167772160 => 184549375, // 10.0.0.0 - 10.255.255.255\\n 3232235520 => 3232301055, // 192.168.0.0 - 192.168.255.255\\n 2130706432 => 2147483647, // 127.0.0.0 - 127.255.255.255\\n 2851995648 => 2852061183, // 169.254.0.0 - 169.254.255.255\\n 2886729728 => 2887778303, // 172.16.0.0 - 172.31.255.255\\n 3758096384 => 4026531839, // 224.0.0.0 - 239.255.255.255\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc95111f3898ba26e0935bc62daa35af\",\n \"score\": \"0.46342754\",\n \"text\": \"function getInterfaceList($params, $context) {\\n\\t\\t// Validate the RPC caller context.\\n\\t\\t$this->validateMethodContext($context, [\\n\\t\\t\\t\\\"role\\\" => OMV_ROLE_ADMINISTRATOR\\n\\t\\t]);\\n\\t\\t// Validate the parameters of the RPC service method.\\n\\t\\t$this->validateMethodParams($params, \\\"rpc.common.getlist\\\");\\n\\t\\t// Get all network interface configuration objects.\\n\\t\\t$result = $this->callMethod(\\\"enumerateConfiguredDevices\\\",\\n\\t\\t $params, $context);\\n\\t\\t// Filter the result.\\n\\t\\treturn $this->applyFilter($result, $params['start'],\\n\\t\\t $params['limit'], $params['sortfield'], $params['sortdir']);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"111e2094777b6b92fa140dce1edaf653\",\n \"score\": \"0.4617867\",\n \"text\": \"function wg_get_configured_ifs() {\\n\\tglobal $wgg;\\n\\n\\treturn array_map(fn($x) => $x['name'], (array) $wgg['tunnels']);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c9f8874a69a3a745f1f9763b9a71e33\",\n \"score\": \"0.46163675\",\n \"text\": \"public function getNetworkKeys() {\\n return Mage::helper('socnet')->getValidNetworks();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c11acdc716ebcf9eee2f11f58467db3b\",\n \"score\": \"0.46146652\",\n \"text\": \"public function getServerInfoMySQL()\\n\\t{\\n\\t\\treturn @$this->_aFunctionsSql['mysqli_get_server_info']($this->_oConnect);\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d560dcb1147e38f5948dbeef1e824687\",\n \"score\": \"0.46123928\",\n \"text\": \"function getServers();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06eb9e8e6583d8e5ea36274f1a78187d\",\n \"score\": \"0.4610009\",\n \"text\": \"public function getAtosServerIpAddresses()\\n {\\n if (isset($_SERVER)) {\\n if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\\n } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) {\\n $ip = $_SERVER['HTTP_CLIENT_IP'];\\n } else {\\n $ip = $_SERVER['REMOTE_ADDR'];\\n }\\n } else {\\n if (getenv('HTTP_X_FORWARDED_FOR')) {\\n $ip = getenv('HTTP_X_FORWARDED_FOR');\\n } elseif (getenv('HTTP_CLIENT_IP')) {\\n $ip = getenv('HTTP_CLIENT_IP');\\n } else {\\n $ip = getenv('REMOTE_ADDR');\\n }\\n }\\n\\n return explode(',', $ip);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a90f9ae9d4c9ad76e2c14fdd56fd994\",\n \"score\": \"0.46071297\",\n \"text\": \"public function getAddressInfo()\\n {\\n if ($this->flagDir->isExist(self::IP_FILENAME)) {\\n $temp = $this->flagDir->readFile(self::IP_FILENAME);\\n return explode(',', trim($temp));\\n } else {\\n return [];\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8416a5a7375f482f82d33f5eea86617\",\n \"score\": \"0.46009865\",\n \"text\": \"function GetIP()\\n{\\n foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key)\\n {\\n if (array_key_exists($key, $_SERVER) === true)\\n {\\n foreach (array_map('trim', explode(',', $_SERVER[$key])) as $ip)\\n {\\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false)\\n {\\n return $ip;\\n }\\n }\\n }\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60294f3811f19ae5678f13675fe3c9cc\",\n \"score\": \"0.45698002\",\n \"text\": \"function get_client_ip_server() {\\n\\t $ipaddress = '';\\n\\n\\t if (array_key_exists('HTTP_CLIENT_IP', $_SERVER)){\\n \\t\\t$clientIP = $_SERVER['HTTP_CLIENT_IP'];\\n\\t\\t//console_log($ipaddress);\\n\\t\\t}\\n\\t elseif (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)){\\n\\t $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\\n\\t\\t//console_log($ipaddress);\\n\\t\\t}\\n\\t elseif (array_key_exists('HTTP_X_FORWARDED', $_SERVER)){\\n\\t $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\\n\\t\\t//console_log($ipaddress);\\n\\t\\t}\\n\\t elseif (array_key_exists('HTTP_FORWARDED_FOR', $_SERVER)){\\n\\t $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\\n\\t\\t//console_log($ipaddress);\\n\\t\\t}\\n\\t elseif (array_key_exists('HTTP_FORWARDED', $_SERVER)){\\n\\t $ipaddress = $_SERVER['HTTP_FORWARDED'];\\n\\t\\t//console_log($ipaddress);\\n\\t\\t}\\n\\t elseif (array_key_exists('REMOTE_ADDR', $_SERVER)){\\n\\t $ipaddress = $_SERVER['REMOTE_ADDR'];\\n\\t\\t//console_log($ipaddress);\\n\\t\\t}\\n\\t else{\\n\\t $ipaddress = 'UNKNOWN';\\n\\t\\t//console_log($ipaddress);\\n\\t\\t}\\n \\n \\treturn $ipaddress;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"741582a3bcbd4310a175bed439bc0074\",\n \"score\": \"0.4560617\",\n \"text\": \"function find_vip_interface($vip) {\\n\\tglobal $log;\\n\\tglobal $_config;\\n\\t// Parse 'interface' command response into lines\\n\\t// Process interface lines to extract each interface entry\\n\\t// Determine if there's an interface with an IP address which corresponds to the VIP\\n\\t// If corresponding VIP found, set ethXX to its interface ID; e.g., $ethXX = \\\"eth0\\\"\\n\\t// Formulate the interface command\\n\\t$netdevices = glob('/sys/class/net/*');\\n\\tforeach($netdevices as $id => $device) {\\n\\t\\t$cmd = 'ip addr show dev '.$device.' | grep inet | awk \\\\'{ print $2; }\\\\'';\\n\\t\\t$result = sudo_execute($cmd);\\n\\t\\tif ($result['rv'] != 0) {\\n\\t\\t\\t$errorMsg = \\\"interface command failure. Details: \\\" . $result['output_str'];\\n\\t\\t\\t$log->LogError($errorMsg);\\n\\t\\t}\\n\\t\\t$range = cidr2range($result['output_str']);\\n\\t\\t$isInRange = cidrSearch($vip, $range);\\n\\t\\tif ($isInRange) {\\n\\t\\t\\t$short_device = str_replace('/sys/class/net/', '', $device);\\n\\t\\t\\treturn $short_device;\\n\\t\\t}\\n\\t}\\n\\treturn \\\"\\\"; // interface not found, return empty string\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2b5b5f5197b6211cfebeb707f359279\",\n \"score\": \"0.45567602\",\n \"text\": \"private function getConfigVLANInterfaces()\\n {\\n $physicalInterfaces = array();\\n $configObj = Config::getInstance()->object();\\n if (!empty($configObj->vlans)) {\\n foreach ($configObj->vlans->children() as $key => $vlan) {\\n if (!isset($physicalInterfaces[(string)$vlan->if])) {\\n $physicalInterfaces[(string)$vlan->if] = array();\\n }\\n $physicalInterfaces[(string)$vlan->if][] = (string)$vlan->vlanif;\\n }\\n }\\n return $physicalInterfaces;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d732639a87d47dc9454c41fde6675837\",\n \"score\": \"0.45512843\",\n \"text\": \"public function ircWhois($nickmasks, $server = null)\\n {\\n return $this->getIrcMessage('WHOIS', array($server, $nickmasks));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"713dda4dbadf80da35c8add9e6a27f75\",\n \"score\": \"0.4547881\",\n \"text\": \"private function get_arp_table () {\\n // init\\n $this->connection_open ();\\n // fetch\\n try {\\n $res1 = $this->snmp_session->walk( \\\"IP-MIB::ipNetToMediaNetAddress\\\" ); // ip\\n $res2 = $this->snmp_session->walk( \\\"IP-MIB::ipNetToMediaPhysAddress\\\" ); // mac\\n $res3 = $this->snmp_session->walk( \\\"IP-MIB::ipNetToMediaIfIndex\\\" ); // interface index\\n\\t\\t}\\n\\t\\tcatch (Exception $e) {\\n \\t\\tthrow new Exception ($e->getMessage());\\n\\t\\t}\\n\\n // check for errors\\n $this->connection_error_check ();\\n\\n // parse IP\\n $n=0;\\n foreach ($res1 as $r) {\\n $res[$n]['ip'] = $this->parse_snmp_result_value ($r);\\n $n++;\\n }\\n // parse MAC\\n $n=0;\\n foreach ($res2 as $r) {\\n $res[$n]['mac'] = $this->fill_mac_nulls ($r);\\n // validate mac\\n if ($this->validate_mac($res[$n]['mac'])===false) { $res[$n]['mac'] = \\\"\\\"; }\\n $n++;\\n };\\n\\n $interface_indexes = array(); // to avoid fetching if multiple times\\n // fetch interface name\\n $n=0;\\n foreach ($res3 as $r) {\\n $index = $this->parse_snmp_result_value ($r);\\n // if already fetched\\n if (array_key_exists($index, $interface_indexes)) {\\n $res[$n]['port'] = $interface_indexes[$index];\\n }\\n else {\\n try {\\n //$res1 = $this->snmp_session->get( \\\".1.3.6.1.2.1.31.1.1.1.1.\\\".$index ); // if description\\n //$res2 = $this->snmp_session->get( \\\".1.3.6.1.2.1.2.2.1.2.\\\".$index ); // if port\\n\\n $res1 = $this->snmp_session->get( \\\"IF-MIB::ifName.\\\".$index ); // if description\\n $res2 = $this->snmp_session->get( \\\"IF-MIB::ifDescr.\\\".$index ); // if port\\n\\n //parse and save\\n $res[$n]['port'] = $this->parse_snmp_result_value ($res1);\\n $res[$n]['portname'] = $this->parse_snmp_result_value ($res2);\\n $interface_indexes[$index] = $res[$n]['port'];\\n }\\n catch (Exception $e) {\\n $res[$n]['port'] = \\\"\\\";\\n $res[$n]['portname'] = \\\"\\\";\\n }\\n }\\n $n++;\\n }\\n\\n // save result\\n $this->save_last_result ($res);\\n\\n // return response\\n return isset($res) ? $res : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43069ae94afa93b5a0ed850e578f33d2\",\n \"score\": \"0.4526636\",\n \"text\": \"public function getRemoteIP(): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60d71875a4886e42c015a878aeb14e67\",\n \"score\": \"0.4512118\",\n \"text\": \"public function getNetworks() {\\n\\n //GET NETWORK TABLE\\n $tableNetwork = Engine_Api::_()->getDbtable('networks', 'network');\\n\\n //MAKE QUERY\\n $select = $tableNetwork->select()\\n ->from($tableNetwork->info('name'), array('network_id', 'title'))\\n ->order('title');\\n $result = $tableNetwork->fetchAll($select);\\n\\n $everyone = Zend_Registry::get('Zend_Translate')->_('Everyone');\\n\\n //MAKE DATA ARRAY\\n $networksOptions = array('0' => $everyone);\\n foreach ($result as $value) {\\n $networksOptions[$value->network_id] = $value->title;\\n }\\n\\n //RETURN\\n return $networksOptions;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"550f0a91aefe2e030200582fcddbea4c\",\n \"score\": \"0.45042542\",\n \"text\": \"public function getIdNetwork()\\n {\\n return $this->id_network;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f2b7546cf0ac6cc74a8b045795f0cea\",\n \"score\": \"0.44631493\",\n \"text\": \"static public function getInterfaces()\\n\\t{\\n\\t\\treturn [];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5061c9c6cfd8127ddf2821ad6eb8a54d\",\n \"score\": \"0.44625238\",\n \"text\": \"function get_IP_address(){\\n foreach (array('HTTP_CLIENT_IP',\\n 'HTTP_X_FORWARDED_FOR',\\n 'HTTP_X_FORWARDED',\\n 'HTTP_X_CLUSTER_CLIENT_IP',\\n 'HTTP_FORWARDED_FOR',\\n 'HTTP_FORWARDED',\\n 'REMOTE_ADDR') as $key){\\n if (array_key_exists($key, $_SERVER) === true){\\n foreach (explode(',', $_SERVER[$key]) as $IPaddress){\\n $IPaddress = trim($IPaddress); // Just to be safe\\n\\n if (filter_var($IPaddress,\\n FILTER_VALIDATE_IP,\\n FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE)\\n !== false) {\\n\\n return $IPaddress;\\n }\\n }\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9048f205eb44a3120115f687c0935e60\",\n \"score\": \"0.446232\",\n \"text\": \"function get_client_ip_server()\\n{\\n $ipaddress = '';\\n if ($_SERVER['HTTP_CLIENT_IP'])\\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\\n else if ($_SERVER['HTTP_X_FORWARDED_FOR'])\\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\\n else if ($_SERVER['HTTP_X_FORWARDED'])\\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\\n else if ($_SERVER['HTTP_FORWARDED_FOR'])\\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\\n else if ($_SERVER['HTTP_FORWARDED'])\\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\\n else if ($_SERVER['REMOTE_ADDR'])\\n $ipaddress = $_SERVER['REMOTE_ADDR'];\\n else\\n $ipaddress = 'UNKNOWN';\\n\\n return $ipaddress;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09c2009ec88c9f22d1efecd606f9432f\",\n \"score\": \"0.44563833\",\n \"text\": \"private function getRepositoryInterfaces()\\n {\\n $interfaces = collect([]);\\n if (! $this->files->isDirectory($directory = $this->getRepositoryInterfacesPath())) {\\n return $interfaces;\\n }\\n $files = $this->files->files($directory);\\n if (is_array($files)) {\\n $interfaces = collect($files)->map(function (SplFileInfo $file) {\\n return str_replace(\\\".php\\\", \\\"\\\", $file->getFilename());\\n });\\n }\\n\\n return $interfaces;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59bbccc9715b937a1798f04db468d180\",\n \"score\": \"0.4445729\",\n \"text\": \"function getEthernetIface($params, $context) {\\n\\t\\t\\treturn $this->callMethod(\\\"getInterface\\\", $params, $context);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12ce160d5d0dfaf9d983a885ccdbd780\",\n \"score\": \"0.444455\",\n \"text\": \"public function get_all_firewall_nat(){\\n return $this->query('/ip/firewall/nat/getall');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42ee4e697a193f711d90483ebd36617b\",\n \"score\": \"0.4429698\",\n \"text\": \"public function getMailQueueInfo(NamedElement $server)\\n {\\n $request = new \\\\Zimbra\\\\Admin\\\\Request\\\\GetMailQueueInfo($server);\\n return $this->getClient()->doRequest($request);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc6306f2c1bd290da82d2bfc6de0d9ef\",\n \"score\": \"0.44263795\",\n \"text\": \"public static function getLocalIp() {\\n try { // if exec can be used\\n $preg = \\\"/\\\\A((([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\\\\.){3}(([0-9]?[0-9])|(1[0-9]{2})|(2[0-4][0-9])|(25[0-5]))\\\\Z/\\\";\\n \\n if ( PATH_SEPARATOR==':' ) { // linux\\n exec(\\\"ifconfig\\\", $out, $stats);\\n if (!empty($out)) {\\n if (isset($out[1]) && strstr($out[1], 'addr:')) {\\n $tmpArray = explode(\\\":\\\", $out[1]);\\n $tmpIp = explode(\\\" \\\", $tmpArray[1]);\\n if (preg_match($preg, trim($tmpIp[0])))\\n return trim($tmpIp[0]);\\n }\\n }\\n } else { // windows PATH_SEPARATOR==';'\\n exec(\\\"ipconfig\\\", $out, $stats);\\n if (!empty($out)) {\\n foreach ($out AS $row) {\\n if (strstr($row, \\\"IP\\\") && strstr($row, \\\":\\\") && !strstr($row, \\\"IPv6\\\")) {\\n $tmpIp = explode(\\\":\\\", $row);\\n if (preg_match($preg, trim($tmpIp[1])))\\n return trim($tmpIp[1]);\\n }\\n }\\n }\\n }\\n } catch ( Exception $ex ){\\n }\\n \\n if (isset($_ENV[\\\"HOSTNAME\\\"]))\\n $MachineName = $_ENV[\\\"HOSTNAME\\\"];\\n else if (isset($_ENV[\\\"COMPUTERNAME\\\"]))\\n $MachineName = $_ENV[\\\"COMPUTERNAME\\\"];\\n else\\n $MachineName = \\\"\\\";\\n if ($MachineName!=\\\"\\\")\\n return $MachineName;\\n \\n return '127.0.0.1';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cb0746e60a65a12a8a928fc975d92a8\",\n \"score\": \"0.44254747\",\n \"text\": \"function get_client_ip_server() {\\n $ipaddress = '';\\n if ($_SERVER['HTTP_CLIENT_IP'])\\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\\n else if($_SERVER['HTTP_X_FORWARDED'])\\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\\n else if($_SERVER['HTTP_FORWARDED_FOR'])\\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\\n else if($_SERVER['HTTP_FORWARDED'])\\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\\n else if($_SERVER['REMOTE_ADDR'])\\n $ipaddress = $_SERVER['REMOTE_ADDR'];\\n else\\n $ipaddress = 'UNKNOWN';\\n\\n return $ipaddress;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b22bf2a046ca518feebf05765e26fb2d\",\n \"score\": \"0.4418804\",\n \"text\": \"public function getIp() { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03923a7fa807bc13bde11eb60a045788\",\n \"score\": \"0.44127178\",\n \"text\": \"public function getNetworks()\\n {\\n return $this->networks;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ecb7428e2e4dd216515486a3d74b4ac4\",\n \"score\": \"0.44115666\",\n \"text\": \"public function ipAddress()\\n {\\n $ip_keys = ['REMOTE_ADDR', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED'];\\n foreach ($ip_keys as $key)\\n {\\n if ($this->server->has($key) === true)\\n {\\n foreach (explode(',', $this->server->get($key)) as $ip)\\n {\\n // trim for safety measures\\n $ip = trim($ip);\\n\\n // attempt to validate IP\\n if (valid_ip($ip))\\n {\\n return $ip;\\n }\\n }\\n }\\n }\\n\\n return '0.0.0.0';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"269e6fe3ad3b102359377156c06911ee\",\n \"score\": \"0.43984568\",\n \"text\": \"function get_client_ip_server()\\n{\\n $ipaddress = '';\\n if ($_SERVER['HTTP_CLIENT_IP'])\\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\\n else if ($_SERVER['HTTP_X_FORWARDED_FOR'])\\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\\n else if ($_SERVER['HTTP_X_FORWARDED'])\\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\\n else if ($_SERVER['HTTP_FORWARDED_FOR'])\\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\\n else if ($_SERVER['HTTP_FORWARDED'])\\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\\n else if ($_SERVER['REMOTE_ADDR'])\\n $ipaddress = $_SERVER['REMOTE_ADDR'];\\n else\\n $ipaddress = 'UNKNOWN';\\n\\n return $ipaddress;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d165439c6aa19b5d2cc2eefbfa247e30\",\n \"score\": \"0.43863028\",\n \"text\": \"public function serverIp() {\\n\\t\\treturn $this->env('SERVER_ADDR');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b29544db4af65cfe5612115ea3a0e48b\",\n \"score\": \"0.43831635\",\n \"text\": \"public function getCurrentNetwork() {\\n $arg = new getCurrentNetwork();\\n $result = $this->__soapCall(\\\"getCurrentNetwork\\\", array($arg));\\n return $result->rval;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b279c7695b175170a0775b14c801267b\",\n \"score\": \"0.43814048\",\n \"text\": \"function get_client_ip_server() {\\n $ipaddress = '';\\n if ($_SERVER['HTTP_CLIENT_IP'])\\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\\n else if($_SERVER['HTTP_X_FORWARDED_FOR'])\\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\\n else if($_SERVER['HTTP_X_FORWARDED'])\\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\\n else if($_SERVER['HTTP_FORWARDED_FOR'])\\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\\n else if($_SERVER['HTTP_FORWARDED'])\\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\\n else if($_SERVER['REMOTE_ADDR'])\\n $ipaddress = $_SERVER['REMOTE_ADDR'];\\n else\\n $ipaddress = 'UNKNOWN';\\n \\n return $ipaddress;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7aff0639b9ba36ba1639ce6d23eefd8\",\n \"score\": \"0.4374239\",\n \"text\": \"public function getCidr()\\n {\\n return $this->cidr;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"caf16a95bb05d6ac08a4deae9b0a911e\",\n \"score\": \"0.43720126\",\n \"text\": \"public function getEthernetCandidates($params, $context) {\\n\\t\\t// Validate the RPC caller context.\\n\\t\\t$this->validateMethodContext($context, [\\n\\t\\t\\t\\\"role\\\" => OMV_ROLE_ADMINISTRATOR\\n\\t\\t]);\\n\\t\\t$mngr = \\\\OMV\\\\System\\\\Net\\\\NetworkInterfaceBackend\\\\Manager::getInstance();\\n\\t\\t// Get all unused network interface devices, except loopback and\\n\\t\\t// VLAN network interfaces.\\n\\t\\tif (FALSE === ($devs = $mngr->enumerateUnused(\\n\\t\\t OMV_NETWORK_INTERFACE_TYPE_ETHERNET))) {\\n\\t\\t\\tthrow new \\\\OMV\\\\Exception(\\n\\t\\t\\t \\\"Failed to get list of unused network interface devices.\\\");\\n\\t\\t}\\n\\t\\t// Get the network interface information.\\n\\t\\t$result = [];\\n\\t\\tforeach ($devs as $devk => $devv) {\\n\\t\\t\\t// Does a configuration object exists for the given network\\n\\t\\t\\t// interface device? In this case skip this device.\\n\\t\\t\\t$db = \\\\OMV\\\\Config\\\\Database::getInstance();\\n\\t\\t\\tif ($db->exists(\\\"conf.system.network.interface\\\", [\\n\\t\\t\\t\\t\\\"operator\\\" => \\\"and\\\",\\n\\t\\t\\t\\t\\\"arg0\\\" => [\\n\\t\\t\\t\\t\\t\\\"operator\\\" => \\\"stringEquals\\\",\\n\\t\\t\\t\\t\\t\\\"arg0\\\" => \\\"type\\\",\\n\\t\\t\\t\\t\\t\\\"arg1\\\" => \\\"ethernet\\\"\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\\"arg1\\\" => [\\n\\t\\t\\t\\t\\t\\\"operator\\\" => \\\"stringEquals\\\",\\n\\t\\t\\t\\t\\t\\\"arg0\\\" => \\\"devicename\\\",\\n\\t\\t\\t\\t\\t\\\"arg1\\\" => $devv\\n\\t\\t\\t\\t]\\n\\t\\t\\t]))\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t$result[] = $this->getIfaceInfo($devv);\\n\\t\\t}\\n\\t\\treturn $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6cdc715976e54b77b266cceb33e5d8d4\",\n \"score\": \"0.437137\",\n \"text\": \"public function getIpAddress() {\\n return isset($this->serverData['REMOTE_ADDR']) ? $this->serverData['REMOTE_ADDR'] : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79889271c6847372c80bde16c381ac90\",\n \"score\": \"0.43705556\",\n \"text\": \"public static function GetIP()\\n\\t{\\n\\t\\tself::initialize();\\n\\t\\treturn self::$ip_test;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"113e4f3d3ebc46c9eb757cc5bad50e38\",\n \"score\": \"0.43589327\",\n \"text\": \"public function getNetworkConfig()\\n {\\n return $this->network_config;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f137a21bbc03c94f7d56ec46a464c654\",\n \"score\": \"0.43516022\",\n \"text\": \"public function providerIpAddressGet()\\n {\\n $ipAddress0 = \\\"\\\";\\n $ipAddress1 = \\\"192.96.76.1\\\";\\n $ipAddress2 = \\\"145.38.5.6\\\";\\n $ipAddress3 = \\\"/geo/forbidden\\\";\\n return [\\n [$ipAddress0],\\n [$ipAddress1],\\n [$ipAddress2],\\n [$ipAddress1, $ipAddress2],\\n [$ipAddress3],\\n // [\\\"35.158.84.49\\\"],\\n // [\\\"23.34\\\"],\\n // [\\\"35.158.84.49, 23.34\\\"],\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dfa0364ae2e4e610f090c1d94a5a8617\",\n \"score\": \"0.4350279\",\n \"text\": \"function getIPWhiteList() {\\n\\n\\t\\t\\t$method = ORGANIZATION . \\\"/getipwhitelist\\\";\\n\\n\\t\\t\\t$verbmethod = \\\"GET\\\";\\n\\n\\t\\t\\t$params = array();\\n\\n\\t\\t\\t$response = json_decode($this->zyncroApi->callApi( $method, $params, $verbmethod), true);\\n\\n\\t\\t\\treturn $response;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fbf1b2161e3d54457016ff6bc4b865f\",\n \"score\": \"0.4348501\",\n \"text\": \"public function get_all_networks() {\\n\\t\\t$req = $this->db->conn_id->query('SELECT id, network AS network_img, network_name, country FROM networks ORDER BY network_name ASC');\\n\\t\\t$req->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Network');\\n\\t\\t$networks = $req->fetchAll();\\n\\n\\t\\treturn $networks;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"154341cc1a41af839cec83d5893d7e0e\",\n \"score\": \"0.43286747\",\n \"text\": \"function foodbakery_get_all_server() {\\r\\n\\t\\treturn $_SERVER;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd347540541057b9a0a12efc43279ac1\",\n \"score\": \"0.43249866\",\n \"text\": \"public function getServerInfo()\\n {\\n return $this->_request('server')->getBody();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c75a5286c0a86cde06f7bb79653ff578\",\n \"score\": \"0.4324652\",\n \"text\": \"function getIp() {\\n // IP if shared internet connection\\n if (isset($_SERVER['HTTP_CLIENT_IP'])) {\\n return $_SERVER['HTTP_CLIENT_IP'];\\n }\\n // IP through a proxy\\n elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\\n return $_SERVER['HTTP_X_FORWARDED_FOR'];\\n }\\n // Else : simple IP\\n else {\\n return (isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '');\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"beff55b87953d0ad5add356859a0301b\",\n \"score\": \"0.43153152\",\n \"text\": \"public function getEthernetStatus()\\n {\\n $result = array();\\n\\n $payload = '';\\n\\n $data = $this->sendRequest(self::FUNCTION_GET_ETHERNET_STATUS, $payload);\\n\\n $payload = unpack('C6mac_address/C4ip/C4subnet_mask/C4gateway/V1rx_count/V1tx_count/c32hostname', $data);\\n\\n $result['mac_address'] = IPConnection::collectUnpackedArray($payload, 'mac_address', 6);\\n $result['ip'] = IPConnection::collectUnpackedArray($payload, 'ip', 4);\\n $result['subnet_mask'] = IPConnection::collectUnpackedArray($payload, 'subnet_mask', 4);\\n $result['gateway'] = IPConnection::collectUnpackedArray($payload, 'gateway', 4);\\n $result['rx_count'] = IPConnection::fixUnpackedUInt32($payload['rx_count']);\\n $result['tx_count'] = IPConnection::fixUnpackedUInt32($payload['tx_count']);\\n $result['hostname'] = IPConnection::implodeUnpackedString($payload, 'hostname', 32);\\n\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20a46f44f0fc76bdf513392e0fe60b53\",\n \"score\": \"0.43082717\",\n \"text\": \"public function getBluetoothInterfaces()\\n {\\n if (is_null($this->_pan))\\n {\\n $this->_pan = explode(\\\"\\\\n\\\", $this->getShellExec(self::NETWORKSETUP.\\\" | grep -A2 'Bluetooth' | grep -o en.\\\"));\\n }\\n\\n return $this->_pan;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14ee1d3fb617a545e81679781474661f\",\n \"score\": \"0.43011838\",\n \"text\": \"protected function GetUserIp()\\n\\t{\\n\\t\\t$ips = ApiStatController::GetIPBinary(true);\\n\\t\\treturn ['binary' => $ips[0], 'string' => $ips[1]];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"976cd32e01cbdfb880f30bf9fb2a7991\",\n \"score\": \"0.4291041\",\n \"text\": \"public function ip__get( $ips_input = array( 'real', 'remote_addr', 'x_forwarded_for', 'x_real_ip', 'cloud_flare' ), $v4_only = true ){\\n\\t\\t\\n\\t\\t$result = Helper::ip__get( $ips_input, $v4_only );\\n\\t\\t\\n\\t\\treturn ! empty( $result ) ? array( 'real' => $result ) : array();\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"250cfc20afa6949df4450c793d03ec5c\",\n \"score\": \"0.42909658\",\n \"text\": \"public function getIP(){\\n\\t\\t\\ttry{\\n\\t\\t\\t\\tforeach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key){\\n\\t\\t\\t\\t\\tif (array_key_exists($key, $_SERVER) === true){\\n\\t\\t\\t\\t\\t\\tforeach (explode(',', $_SERVER[$key]) as $ip){\\n\\t\\t\\t\\t\\t\\t\\t$ip = trim($ip); // just to be safe\\n\\t\\t\\t\\t\\t\\t\\tif (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false){\\n\\t\\t\\t\\t\\t\\t\\t\\treturn $ip;\\n\\t\\t\\t\\t\\t\\t\\t\\t}//if\\n\\t\\t\\t\\t\\t\\t\\telse{\\n\\t\\t\\t\\t\\t\\t\\t\\treturn $ip;\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t}//foreach()\\n\\t\\t\\t\\t\\t\\t}//if\\n\\t\\t\\t\\t\\t}//foreach()\\n\\t\\t\\t\\t\\t}catch(Exception $exc){\\n\\t\\t\\t\\t\\t\\t$this->tempVar = $exc->getMessage();\\n\\t\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t\\t}//catch()\\n\\t\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0a9ab6c717ab4f33149075a1a5ce99e\",\n \"score\": \"0.42899248\",\n \"text\": \"public function getIP(): string\\n {\\n $ips = explode(',',$this->getHeader('x-forwarded-for', $this->getServer('remote_addr', '0.0.0.0')));\\n return trim($ips[0] ?? '');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"140c7eb5aa8c2225dd0f07725fcc988a\",\n \"score\": \"0.42826954\",\n \"text\": \"function getIPList(){\\n\\t$url = 'https://api.sendgrid.com/apiv2/customer.ip.json';\\n\\t$postData['list'] = 'all';\\n\\t$results = callCURL($postData, $url);\\n\\treturn $results;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc22acac29152fa01944ceac22045bd4\",\n \"score\": \"0.4281127\",\n \"text\": \"private function getIp()\\n\\t{\\n\\t\\tif (!empty($_SERVER['HTTP_X_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_X_FORWARDED']))\\n\\t\\t\\treturn $_SERVER['HTTP_X_FORWARDED'];\\n\\t\\tif (!empty($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']) && $this->validate_ip($_SERVER['HTTP_X_CLUSTER_CLIENT_IP']))\\n\\t\\t\\treturn $_SERVER['HTTP_X_CLUSTER_CLIENT_IP'];\\n\\t\\tif (!empty($_SERVER['HTTP_FORWARDED_FOR']) && $this->validate_ip($_SERVER['HTTP_FORWARDED_FOR']))\\n\\t\\t\\treturn $_SERVER['HTTP_FORWARDED_FOR'];\\n\\t\\tif (!empty($_SERVER['HTTP_FORWARDED']) && $this->validate_ip($_SERVER['HTTP_FORWARDED']))\\n\\t\\t\\treturn $_SERVER['HTTP_FORWARDED'];\\n\\n\\t\\treturn $_SERVER['REMOTE_ADDR'];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ac0f91fd503ce82c4fe782af0f4bdb6\",\n \"score\": \"0.4272996\",\n \"text\": \"private function getAddressesFromNetwork( IXP $ixp, Network $n, $p ) {\\n $addrs = [\\n 'lan' => [], // same LAN\\n 'ixp' => [], // same IXP\\n ];\\n\\n foreach( $n->getAddresses() as $a ) {\\n if( $a->getProtocol() != $p ) {\\n continue;\\n }\\n\\n if( $a->getLAN()->getIXP()->getId() == $ixp->getId() ) {\\n $addrs['lan'][] = $a->getAddress();\\n } else if( $a->getLAN()->getIXP()->getOrganisation() == $ixp->getOrganisation() ) {\\n $addrs['ixp'][] = $a->getAddress();\\n }\\n }\\n\\n return $addrs;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc9ae6498e85e20e9608413e110481ba\",\n \"score\": \"0.4272369\",\n \"text\": \"public function providerIpAddress()\\n {\\n return [\\n [\\\"\\\"],\\n [\\\"192.96.76.1\\\"],\\n [\\\"145.38.5.6\\\"],\\n [\\\"255.0.0.0\\\"],\\n [\\\"23.34\\\"],\\n // [\\\"35.158.84.49, 23.34\\\"],\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"367ac7c02913ef4782d9f48a50a237c1\",\n \"score\": \"0.42670992\",\n \"text\": \"public function ips()\\n {\\n return response()->json(\\n Equipamento::pluck('ip')\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4f7eaf8796521ac5ed33c8344c3909c\",\n \"score\": \"0.42652765\",\n \"text\": \"function guifi_device_print_interfaces($device) {\\n\\n if (empty($device['interfaces']))\\n return NULL;\\n\\n $rows = array();\\n $inamestr = '';\\n $fo_connectors = guifi_types('fo_port');\\n foreach ($device['interfaces'] as $inum => $if) {\\n \\t$ipstr='';\\n \\t$rows_if = array();\\n guifi_log(GUIFILOG_TRACE,sprintf('function guifi_device_print_interfaces(interface %s)',$if['id']),$if);\\n $connto_dev = array('data'=>'');\\n if ($if['connto_did']) {\\n $connto_dev['data'] = guifi_get_devicename($if['connto_did']);\\n if ($if['connto_did']) {\\n \\t $rdev=db_fetch_object(db_query('SELECT interface_type FROM {guifi_interfaces} WHERE device_id=%d AND id=%d',\\n \\t $if['connto_did'],$if['connto_iid']\\n \\t ));\\n $connto_dev['data'] .= ' / '.$rdev->interface_type;\\n }\\n }\\n if (!empty($connto_dev['data'])) {\\n $connto_dev['data'] = l($connto_dev['data'],'guifi/device/'.$if['connto_did']);\\n } else\\n $connto_dev['class'] = 'available';\\n\\n if ($if['ipv4']) foreach ($if['ipv4'] as $ipnum => $ipv4)\\n {\\n guifi_log(GUIFILOG_TRACE,sprintf('function guifi_device_print_interfaces(ip %s)',$ipv4['ipv4']),$ipv4);\\n \\t if ($ipv4['ipv4']) {\\n $ipstr = $ipv4['ipv4'];\\n \\t } else\\n \\t $ipstr = t('n/a');\\n $rows_if[] = array($ipstr,$ipv4['netmask']);\\n } else\\n $rows_if[] = array(null,null);\\n\\n $rspan = count($rows_if);\\n if (empty($if['connector_type']))\\n $if['connector_type'] = t('RJ45');\\n if ($if['connector_type']!=t('RJ45'))\\n $if['connector_type'] = $fo_connectors[$if['connector_type']];\\n $begin = array(\\n array('data'=>$if['interface_type']),\\n array('data'=>$connto_dev['data'],'class'=>$connto_dev['class']),\\n array('data'=>$if['connector_type']),\\n array('data'=>$if['comments']),\\n array('data'=>$if['mac']),\\n );\\n foreach ($begin as $i => $r)\\n $begin[$i] = array_merge($r,array('rowspan'=>$rspan,'valign'=>'top'));\\n foreach ($rows_if as $i=>$row)\\n if ($i==0)\\n $rows[] = array_merge($begin,$row);\\n else\\n $rows[] = $row;\\n\\n }\\n return $rows;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d7388e9a434ff996901201947be7df5\",\n \"score\": \"0.4258098\",\n \"text\": \"public function getEcsIpList($config = []);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"acfc46d2f4ebdf3fc1cdfa30fe914bba\",\n \"score\": \"0.42476216\",\n \"text\": \"protected function get_mail_config() {\\n $interface = $this->config('system.mail')->get('interface');\\n return $interface;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":737,"cells":{"query_id":{"kind":"string","value":"13723369ee210991fbaeff150e6325a0"},"query":{"kind":"string","value":"Display the specified resource."},"positive_passages":{"kind":"list like","value":[{"docid":"a661ce5e7c104ffb494cd03d67293e57","score":"0.0","text":"public function show(Inclusion $inclusion)\n {\n $this->authorize('show', $inclusion);\n\n return new InclusionResource($inclusion);\n }","title":""}],"string":"[\n {\n \"docid\": \"a661ce5e7c104ffb494cd03d67293e57\",\n \"score\": \"0.0\",\n \"text\": \"public function show(Inclusion $inclusion)\\n {\\n $this->authorize('show', $inclusion);\\n\\n return new InclusionResource($inclusion);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"cc12628aa1525caac0bf08e767bd6cb4","score":"0.7593495","text":"public function view(ResourceInterface $resource);","title":""},{"docid":"d57b314bf807713f346bc35fb937529e","score":"0.6845801","text":"public function render() {\n $this->_template->display($this->resource_name);\n }","title":""},{"docid":"05f03e4964305c5851a8417af8f32544","score":"0.6684253","text":"public function show($resource, $id)\n {\n return $this->repository->get($id);\n }","title":""},{"docid":"9579e337a5325a82370abb431f646b6f","score":"0.6490299","text":"public function show($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\t\treturn view('deleteResource', array( 'resource' => $resource) );\n\t}","title":""},{"docid":"989918b39caf8ede67ab11ef4dc4a651","score":"0.63472325","text":"public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}","title":""},{"docid":"2e3da5773c9c5d59c21b1af4e1ac8cd8","score":"0.623589","text":"public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }","title":""},{"docid":"d6d98993d2a40a3cba09832ef9953f69","score":"0.6216249","text":"public function lookup($resource);","title":""},{"docid":"6244aaaaf59fb15467858bc417084ebc","score":"0.62105983","text":"protected function makeDisplayFromResource()\n\t{\n\t\tif($this->activeResource instanceof SimpleXMLElement)\n\t\t{\n\t\t\treturn $this->activeResource->asXml();\n\t\t}else{\n\t\t\treturn $this->activeResource;\n\t\t}\n\t}","title":""},{"docid":"3ee4a64030fd6d594c526bf49945971f","score":"0.6198528","text":"public function show($id)\n {\n $res = Resource::find($id);\n return view('resource.show')->withResource($res);\n }","title":""},{"docid":"48b723515995fb4178256251ea323c04","score":"0.61824137","text":"public function show($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }","title":""},{"docid":"b6106194998deb4acb00d89d1984bf4b","score":"0.6155446","text":"public function displayAction()\n {\n $params = $this->router->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\n $this->view->setVars([\n 'firewall' => $firewall,\n 'content' => Las::display($firewall->name)\n ]);\n\n // Highlight
     tag\n            $this->assets->addCss('css/highlightjs/arta.css');\n            $this->assets->addJs('js/plugins/highlight.pack.js');\n            $this->scripts = ['$(document).ready(function() { $(\"pre\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\n        }\n    }","title":""},{"docid":"c232a532d32e3f8e5c41e20db4331be5","score":"0.60641253","text":"function display($aTemplate = null) {\r\n\t\t$this->fetch ( $aTemplate, true );\r\n\t}","title":""},{"docid":"88951f8df99fd6c0e333e72b145dfb04","score":"0.6063686","text":"public function displayAction()\n  {\n    // set filters and validators for GET input\n    $filters = array(\n      'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n    );    \n    $validators = array(\n      'id' => array('NotEmpty', 'Int')\n    );\n    $input = new Zend_Filter_Input($filters, $validators);\n    $input->setData($this->getRequest()->getParams());\n\n    // test if input is valid\n    // retrieve requested record\n    // attach to view\n    if ($input->isValid()) {\n      $q = Doctrine_Query::create()\n            ->from('Square_Model_Item i')\n            ->leftJoin('i.Square_Model_Country c')\n            ->leftJoin('i.Square_Model_Grade g')\n            ->leftJoin('i.Square_Model_Type t')\n            ->where('i.RecordID = ?', $input->id);\n      $result = $q->fetchArray();\n      if (count($result) == 1) {\n        $this->view->item = $result[0];               \n      } else {\n        throw new Zend_Controller_Action_Exception('Page not found', 404);        \n      }\n    } else {\n      throw new Zend_Controller_Action_Exception('Invalid input');              \n    }\n  }","title":""},{"docid":"1a2ff798e7b52737e1e6ae5b0d854f6a","score":"0.60512596","text":"public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}","title":""},{"docid":"da456d60e11065d629261fc79e691a95","score":"0.6006895","text":"public function displayAction()\n   {\n      $id = $this->params['_param_1'];\n      $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n      return $this->render( $id );\n   }","title":""},{"docid":"3fb44335bf5e5dca76ae4c41be3fee5d","score":"0.5995527","text":"public function action_show()\n\t{\n\t\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\n\n\t\tif (is_numeric($id) === FALSE)\n\t\t{\n\t\t\tHTTP::redirect(Route::get('default')->uri());\n\t\t}\n\t\t\n\t\t$user = ORM::factory('User', $id);\n\t\t$manager = Manager::factory('User', $user);\n\t\t\n\t\t$manager->show();\n\n\t\t$this->view_container = $manager->get_views_result('container');\n\t\t$this->view_content = $manager->get_views_result('content');\n\t}","title":""},{"docid":"9a28e42aa633511a42cb70db3b7fcc26","score":"0.5986619","text":"public function show($id)\n\t{\n\t\ttry {\n\t\t    if ( \\Auth::check() && \\Auth::user()->hasPaid() )\n            {\n                $resource = \\Resource::find($id);\n                $path_to_image = app('path.protected_images') .'/'.$resource->image;\n                //Read image path, convert to base64 encoding\n                $imgData = base64_encode(file_get_contents($path_to_image));\n                //Format the image SRC:  data:{mime};base64,{data};\n                $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\n\n                return \\View::make('resources.view')->with([\n                    'resource' => $resource,\n                    'img' => $src\n                ]);\n\n            } else {\n\n                \\App::abort(404);\n            }\n\n        } catch (\\Exception $e) {\n\n            \\Log::warning( $e->getMessage() );\n        }\n\t}","title":""},{"docid":"41ab5aeaf4ec45d330f185763e2d3cee","score":"0.5962972","text":"public function show()\n    {\n        echo $this->render();\n    }","title":""},{"docid":"ecdc5dd9611d1734404c92d923029a39","score":"0.5881492","text":"public function show($id)\n    {\n        echo self::routeNamed();\n    }","title":""},{"docid":"461e196dfe64422deb4a744c50eb5d8d","score":"0.587919","text":"public function show($id) {\n        //view/edit page referred to as one entity in spec\n    }","title":""},{"docid":"f004693e692e26b7ab9f8de37189afc1","score":"0.58711755","text":"private function displayResources()\n\t\t{\n\t\t\t$html = '';\n\t\t\t$html .= '
    '.\"\\n\";\n\t\t\t$html .= '\t

    Resources ~ '.$this->challenge['challengeResourceHeading'].'

    '.\"\\n\";\n\t\t\tforeach($this->resources as $resource)\n\t\t\t{\n\t\t\t\t$html .= '\t

    '.$resource['resourceTitle'].'

    '.\"\\n\";\n\t\t\t}\n\t\t\n\t\t\treturn $html;\n\t\t}","title":""},{"docid":"f02f37fffab992508c7d7d6f7ae94f94","score":"0.58684236","text":"public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }","title":""},{"docid":"4294ddbd744676190ac0b1e7d92632e0","score":"0.58634454","text":"public function show() {\r\n echo $this->init()->getView();\r\n }","title":""},{"docid":"d138cb59b6d8df8768f135975e4445ad","score":"0.58409727","text":"public function show()\n\t{\n\t\t//\n\n\t}","title":""},{"docid":"ad2fe33fedb796826d1b96c32859495c","score":"0.5838473","text":"public function resourceDesktop()\n {\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAll();\n\n return $this->templating->render(\n 'ClarolineCoreBundle:Tool\\desktop\\resource_manager:resources.html.twig',\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\n );\n }","title":""},{"docid":"6e1ccfc29048f24d0efc88d6b8257171","score":"0.5811056","text":"public function show($name)\n\t{\n\t\t//\n\n\t}","title":""},{"docid":"5b7cde41d4a1270d31720878d4a50b19","score":"0.57936835","text":"public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}","title":""},{"docid":"7dd625db5c11766539ede97b10e391c8","score":"0.57885426","text":"public function viewAction($resourceId)\n {\n try {\n // Call to the resource service to get the resource\n $resourceResource = $this->get(\n 'asker.exercise.exercise_resource'\n )->getContentFullResource($resourceId, $this->getUserId());\n\n return new ApiGotResponse($resourceResource, array(\"details\", 'Default'));\n\n } catch (NonExistingObjectException $neoe) {\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\n }\n }","title":""},{"docid":"e871bf67c885c4b595a1f5cc980d032e","score":"0.5787194","text":"public function show()\n {\n \n \n }","title":""},{"docid":"e918056f269cc66c35d0c9d5ae72cf98","score":"0.5785671","text":"protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}","title":""},{"docid":"8e4604d345a4a1aa92109fa7c7b9b1e1","score":"0.57850385","text":"public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }","title":""},{"docid":"ea3e059853b58df5488fa70a7fd54c3b","score":"0.5782477","text":"protected function addResourceShow($name, $base, $controller)\n {\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n }","title":""},{"docid":"39114f16312ac4920577af8887aaf740","score":"0.57743496","text":"public function display()\r\n {\r\n echo $this->fetch();\r\n }","title":""},{"docid":"fcc9864a64202f3261f4537601857f07","score":"0.5769528","text":"public function show($nombre, $resourceType, $resourceName)\n {\n //gets the resource\n switch ($resourceType) {\n case (\"manga\"):\n $resource = Manga::where(\"name\", $resourceName)->first();\n break;\n case (\"novel\");\n $resource = Novel::where(\"name\", $resourceName)->first();\n break;\n default:\n abort(404);\n break;\n }\n //gets the comments for the resource\n $commentsFound = $resource->comments()->get();\n $commented = !is_null(Auth::user()->comments()->where(\"commentable_id\", $resource->id)->first());\n //creates a register of the interaction\n $resource->users()->attach(Auth::user());\n return view(\"user.show\", compact(\"resource\", \"commentsFound\", \"commented\", \"resourceType\"));\n }","title":""},{"docid":"496570de6c493cd9fe30f7c52ceb87d1","score":"0.57693255","text":"public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}","title":""},{"docid":"4be578329f20a5696732db0fd60d5d80","score":"0.5768978","text":"public function executeShow()\n {\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\n $this->forward404Unless($this->headline);\n }","title":""},{"docid":"a3e57330d7cd59896b945f16d0e12a89","score":"0.5756713","text":"public function display()\n {\n echo $this->render();\n }","title":""},{"docid":"a3e57330d7cd59896b945f16d0e12a89","score":"0.5756713","text":"public function display()\n {\n echo $this->render();\n }","title":""},{"docid":"e3b51ebfe04703c114ab39fc729ba43b","score":"0.5749091","text":"public function show(Entry $entry)\n {\n //\n }","title":""},{"docid":"e3b51ebfe04703c114ab39fc729ba43b","score":"0.5749091","text":"public function show(Entry $entry)\n {\n //\n }","title":""},{"docid":"fd30d754eb9c55abae27d57dff32abdc","score":"0.57409096","text":"public function resourcethumbnailAction()\r\n {\r\n $request = $this->getRequest();\r\n $response = $this->getResponse();\r\n\r\n $id = (int) $request->getQuery('id');\r\n $w = (int) $request->getQuery('w');\r\n $h = (int) $request->getQuery('h');\r\n $hash = $request->getQuery('hash');\r\n\r\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\r\n\r\n // disable autorendering since we're outputting an image\r\n $this->_helper->viewRenderer->setNoRender();\r\n\r\n $image = new DatabaseObject_ResourceImage($this->db);\r\n if ($hash != $realHash || !$image->load($id)) {\r\n // image not found\r\n $response->setHttpResponseCode(404);\r\n return;\r\n }\r\n\r\n try {\r\n $fullpath = $image->createResourceThumbnail($w, $h);\r\n }\r\n catch (Exception $ex) {\r\n $fullpath = $image->getFullPath();\r\n }\r\n\r\n $info = getImageSize($fullpath);\r\n\r\n $response->setHeader('content-type', $info['mime']);\r\n $response->setHeader('content-length', filesize($fullpath));\r\n echo file_get_contents($fullpath);\r\n }","title":""},{"docid":"e68751480fa47a0b2d2bc46570e3a883","score":"0.5735067","text":"public function display($id = null) {\n \n }","title":""},{"docid":"ca0564d197f7b97c9c7bb3bf9ec0d891","score":"0.57342285","text":"public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}","title":""},{"docid":"a7cd1d7ce30dda2ea0273ce031cff516","score":"0.5725927","text":"public function displayReferenceAction()\n {\n \t$reference_id = Extended\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\Extended\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\n \tif($reference_id)\n \t{\n \t\n \t\t$this->view->reference_visible=$reference_id;\n \t\techo Zend_Json::encode( 1 );\n \t}\n \tdie;\n }","title":""},{"docid":"20397e06b8673db8692c5f84120c3011","score":"0.5724891","text":"public function show()\n\t{\n\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"7d55c8c31eda9d3eeb688b4417d1ce54","score":"0.5722562","text":"public function show($id) {\n\t\t//\n\t}","title":""},{"docid":"8f565ce0db5c2b58c1bd4bea7cb05683","score":"0.5720744","text":"public function showAction(Ressource $ressource, SessionConcours $session = null)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'session' => $session,\n 'delete_form' => $deleteForm->createView(),\n ));\n }","title":""},{"docid":"47171b843665ac85f7c5da2618a7ae0e","score":"0.5718969","text":"public function show($id) {}","title":""},{"docid":"47171b843665ac85f7c5da2618a7ae0e","score":"0.5718969","text":"public function show($id) {}","title":""},{"docid":"47171b843665ac85f7c5da2618a7ae0e","score":"0.5718969","text":"public function show($id) {}","title":""},{"docid":"a494be3f6d40a2f537ff292b7a0ccaae","score":"0.5711622","text":"public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }","title":""},{"docid":"cfff8a1202fcfae7e44ab0c4fb351586","score":"0.570918","text":"public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id = $_GET['id'];\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Concepto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }","title":""},{"docid":"05ca915e5f597f0a1925a6b1a1e6afb0","score":"0.57057405","text":"public abstract function display();","title":""},{"docid":"05ca915e5f597f0a1925a6b1a1e6afb0","score":"0.57057405","text":"public abstract function display();","title":""},{"docid":"12bf7179b06b190879842d1f1945365c","score":"0.57026845","text":"public function show( $id ) {\n\t\t//\n\t}","title":""},{"docid":"12bf7179b06b190879842d1f1945365c","score":"0.57026845","text":"public function show( $id ) {\n\t\t//\n\t}","title":""},{"docid":"12bf7179b06b190879842d1f1945365c","score":"0.57026845","text":"public function show( $id ) {\n\t\t//\n\t}","title":""},{"docid":"12bf7179b06b190879842d1f1945365c","score":"0.57026845","text":"public function show( $id ) {\n\t\t//\n\t}","title":""},{"docid":"12bf7179b06b190879842d1f1945365c","score":"0.57026845","text":"public function show( $id ) {\n\t\t//\n\t}","title":""},{"docid":"560ae0fd472bad5f1d21beeed5dfbbdd","score":"0.57012135","text":"public function show(){}","title":""},{"docid":"b19fae7378b33f825e4ee1e7d8aef94a","score":"0.5699814","text":"public function display($templateName=null)\n {\n echo $this->get($templateName);\n }","title":""},{"docid":"d936662ad1c81979476df2e0767c5e19","score":"0.5699578","text":"public function show($id)\n\t{\n\t\t\n\t\t\n\t}","title":""},{"docid":"7b283ba1c0546a155efc95a44dd0f9cf","score":"0.56981397","text":"public function show(Response $response)\n {\n //\n }","title":""},{"docid":"0465b5fe008a3153a8a032fca67abfed","score":"0.56937706","text":"public function show() { }","title":""},{"docid":"5df2376bef8dd69621a6ce7e2afd0bf4","score":"0.56856436","text":"abstract public function show($id);","title":""},{"docid":"5df2376bef8dd69621a6ce7e2afd0bf4","score":"0.56856436","text":"abstract public function show($id);","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""},{"docid":"cb37955e47b2d1c708a039b4bfa190e0","score":"0.5684962","text":"public function show($id)\n\t{\n\t\t//\n\t}","title":""}],"string":"[\n {\n \"docid\": \"cc12628aa1525caac0bf08e767bd6cb4\",\n \"score\": \"0.7593495\",\n \"text\": \"public function view(ResourceInterface $resource);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d57b314bf807713f346bc35fb937529e\",\n \"score\": \"0.6845801\",\n \"text\": \"public function render() {\\n $this->_template->display($this->resource_name);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05f03e4964305c5851a8417af8f32544\",\n \"score\": \"0.6684253\",\n \"text\": \"public function show($resource, $id)\\n {\\n return $this->repository->get($id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9579e337a5325a82370abb431f646b6f\",\n \"score\": \"0.6490299\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t\\t$resource = \\\\App\\\\Resource::find($id);\\n\\t\\treturn view('deleteResource', array( 'resource' => $resource) );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"989918b39caf8ede67ab11ef4dc4a651\",\n \"score\": \"0.63472325\",\n \"text\": \"public function editresourceAction() {\\n\\t\\t$resourceid = $this->_request->getParam('resourceid');\\n\\t\\t$srlink = new StudentResourceLink();\\n\\t\\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\\n\\t\\t$rows = $srlink->fetchAll($select);\\n\\t\\t$therow = null;\\n\\t\\tforeach ($rows as $row) {\\n\\t\\t\\t$therow=$row;\\n\\t\\t}\\n\\t\\t//print_r($therow);\\n\\t\\t$this->view->resourcelink = $therow;\\n\\t\\t\\n\\t\\t$mediabankUtility = new MediabankUtility();\\n\\t\\tob_start();\\n\\t\\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\\n\\t\\t$content = ob_get_contents();\\n\\t\\tob_end_clean();\\n\\t\\t$this->view->content = $content;\\t\\t\\n\\t\\t$this->view->redirect_to = $_SERVER[\\\"HTTP_REFERER\\\"];\\n\\t\\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\\n\\t\\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\\n\\t\\t\\t$this->view->studentResourceCategories[6]='Summary';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e3da5773c9c5d59c21b1af4e1ac8cd8\",\n \"score\": \"0.623589\",\n \"text\": \"public function show($id)\\n {\\n if(Module::hasAccess(\\\"Resources\\\", \\\"view\\\")) {\\n \\n $resource = Resource::find($id);\\n if(isset($resource->id)) {\\n $module = Module::get('Resources');\\n $module->row = $resource;\\n $group_lists = array();\\n $user_lists = array();\\n\\n if(!$resource->is_public){\\n $group_lists = DB::table('resource_groups')\\n ->select('groups.id', 'groups.name')\\n ->join('groups','groups.id','=','resource_groups.group_id')\\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\\n\\n $user_lists = DB::table('resource_users')\\n ->select('users.id', 'users.name')\\n ->join('users','users.id','=','resource_users.user_id')\\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\\n }\\n \\n return view('la.resources.show', [\\n 'module' => $module,\\n 'view_col' => $module->view_col,\\n 'no_header' => true,\\n 'no_padding' => \\\"no-padding\\\",\\n 'user_lists' => $user_lists,\\n 'group_lists' => $group_lists\\n ])->with('resource', $resource);\\n } else {\\n return view('errors.404', [\\n 'record_id' => $id,\\n 'record_name' => ucfirst(\\\"resource\\\"),\\n ]);\\n }\\n } else {\\n return redirect(config('laraadmin.adminRoute') . \\\"/\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6d98993d2a40a3cba09832ef9953f69\",\n \"score\": \"0.6216249\",\n \"text\": \"public function lookup($resource);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6244aaaaf59fb15467858bc417084ebc\",\n \"score\": \"0.62105983\",\n \"text\": \"protected function makeDisplayFromResource()\\n\\t{\\n\\t\\tif($this->activeResource instanceof SimpleXMLElement)\\n\\t\\t{\\n\\t\\t\\treturn $this->activeResource->asXml();\\n\\t\\t}else{\\n\\t\\t\\treturn $this->activeResource;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ee4a64030fd6d594c526bf49945971f\",\n \"score\": \"0.6198528\",\n \"text\": \"public function show($id)\\n {\\n $res = Resource::find($id);\\n return view('resource.show')->withResource($res);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48b723515995fb4178256251ea323c04\",\n \"score\": \"0.61824137\",\n \"text\": \"public function show($id) {\\n $resource = static::$resource::findOrFail($id);\\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6106194998deb4acb00d89d1984bf4b\",\n \"score\": \"0.6155446\",\n \"text\": \"public function displayAction()\\n {\\n $params = $this->router->getParams();\\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\\n $this->view->setVars([\\n 'firewall' => $firewall,\\n 'content' => Las::display($firewall->name)\\n ]);\\n\\n // Highlight
     tag\\n            $this->assets->addCss('css/highlightjs/arta.css');\\n            $this->assets->addJs('js/plugins/highlight.pack.js');\\n            $this->scripts = ['$(document).ready(function() { $(\\\"pre\\\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\\n        }\\n    }\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"c232a532d32e3f8e5c41e20db4331be5\",\n    \"score\": \"0.60641253\",\n    \"text\": \"function display($aTemplate = null) {\\r\\n\\t\\t$this->fetch ( $aTemplate, true );\\r\\n\\t}\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"88951f8df99fd6c0e333e72b145dfb04\",\n    \"score\": \"0.6063686\",\n    \"text\": \"public function displayAction()\\n  {\\n    // set filters and validators for GET input\\n    $filters = array(\\n      'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\\n    );    \\n    $validators = array(\\n      'id' => array('NotEmpty', 'Int')\\n    );\\n    $input = new Zend_Filter_Input($filters, $validators);\\n    $input->setData($this->getRequest()->getParams());\\n\\n    // test if input is valid\\n    // retrieve requested record\\n    // attach to view\\n    if ($input->isValid()) {\\n      $q = Doctrine_Query::create()\\n            ->from('Square_Model_Item i')\\n            ->leftJoin('i.Square_Model_Country c')\\n            ->leftJoin('i.Square_Model_Grade g')\\n            ->leftJoin('i.Square_Model_Type t')\\n            ->where('i.RecordID = ?', $input->id);\\n      $result = $q->fetchArray();\\n      if (count($result) == 1) {\\n        $this->view->item = $result[0];               \\n      } else {\\n        throw new Zend_Controller_Action_Exception('Page not found', 404);        \\n      }\\n    } else {\\n      throw new Zend_Controller_Action_Exception('Invalid input');              \\n    }\\n  }\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"1a2ff798e7b52737e1e6ae5b0d854f6a\",\n    \"score\": \"0.60512596\",\n    \"text\": \"public function show($id)\\n\\t{\\n\\t\\t// display *some* of the resource...\\n\\t\\treturn Post::find($id);\\n\\t}\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"da456d60e11065d629261fc79e691a95\",\n    \"score\": \"0.6006895\",\n    \"text\": \"public function displayAction()\\n   {\\n      $id = $this->params['_param_1'];\\n      $this->flash['message'] = \\\"Arriba loco, este es el mensaje del flash!\\\";\\n      return $this->render( $id );\\n   }\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"3fb44335bf5e5dca76ae4c41be3fee5d\",\n    \"score\": \"0.5995527\",\n    \"text\": \"public function action_show()\\n\\t{\\n\\t\\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\\n\\n\\t\\tif (is_numeric($id) === FALSE)\\n\\t\\t{\\n\\t\\t\\tHTTP::redirect(Route::get('default')->uri());\\n\\t\\t}\\n\\t\\t\\n\\t\\t$user = ORM::factory('User', $id);\\n\\t\\t$manager = Manager::factory('User', $user);\\n\\t\\t\\n\\t\\t$manager->show();\\n\\n\\t\\t$this->view_container = $manager->get_views_result('container');\\n\\t\\t$this->view_content = $manager->get_views_result('content');\\n\\t}\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"9a28e42aa633511a42cb70db3b7fcc26\",\n    \"score\": \"0.5986619\",\n    \"text\": \"public function show($id)\\n\\t{\\n\\t\\ttry {\\n\\t\\t    if ( \\\\Auth::check() && \\\\Auth::user()->hasPaid() )\\n            {\\n                $resource = \\\\Resource::find($id);\\n                $path_to_image = app('path.protected_images') .'/'.$resource->image;\\n                //Read image path, convert to base64 encoding\\n                $imgData = base64_encode(file_get_contents($path_to_image));\\n                //Format the image SRC:  data:{mime};base64,{data};\\n                $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\\n\\n                return \\\\View::make('resources.view')->with([\\n                    'resource' => $resource,\\n                    'img' => $src\\n                ]);\\n\\n            } else {\\n\\n                \\\\App::abort(404);\\n            }\\n\\n        } catch (\\\\Exception $e) {\\n\\n            \\\\Log::warning( $e->getMessage() );\\n        }\\n\\t}\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"41ab5aeaf4ec45d330f185763e2d3cee\",\n    \"score\": \"0.5962972\",\n    \"text\": \"public function show()\\n    {\\n        echo $this->render();\\n    }\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"ecdc5dd9611d1734404c92d923029a39\",\n    \"score\": \"0.5881492\",\n    \"text\": \"public function show($id)\\n    {\\n        echo self::routeNamed();\\n    }\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"461e196dfe64422deb4a744c50eb5d8d\",\n    \"score\": \"0.587919\",\n    \"text\": \"public function show($id) {\\n        //view/edit page referred to as one entity in spec\\n    }\",\n    \"title\": \"\"\n  },\n  {\n    \"docid\": \"f004693e692e26b7ab9f8de37189afc1\",\n    \"score\": \"0.58711755\",\n    \"text\": \"private function displayResources()\\n\\t\\t{\\n\\t\\t\\t$html = '';\\n\\t\\t\\t$html .= '
    '.\\\"\\\\n\\\";\\n\\t\\t\\t$html .= '\\t

    Resources ~ '.$this->challenge['challengeResourceHeading'].'

    '.\\\"\\\\n\\\";\\n\\t\\t\\tforeach($this->resources as $resource)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$html .= '\\t

    '.$resource['resourceTitle'].'

    '.\\\"\\\\n\\\";\\n\\t\\t\\t}\\n\\t\\t\\n\\t\\t\\treturn $html;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f02f37fffab992508c7d7d6f7ae94f94\",\n \"score\": \"0.58684236\",\n \"text\": \"public function showAction() {\\n\\n // validate contact id is int\\n $id = $this->route_params[\\\"id\\\"];\\n // if id is invalid redirect to 404 page\\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\\n $this->show404();\\n return;\\n }\\n\\n $contact_obj = new Contact();\\n $contact = $contact_obj->findById($id);\\n // if no contact returned then display error message\\n if ($contact == false) {\\n //set error message\\n $_SESSION[\\\"error_message\\\"] = \\\"Contact not found or deleted\\\";\\n // redirect to show all contacts if contacts not found\\n header(\\\"Location: /contacts\\\");\\n return;\\n }\\n // render the view if all everything is Ok\\n View::renderTemplate(\\\"contacts/show.twig.php\\\", [\\\"contact\\\" => $contact]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4294ddbd744676190ac0b1e7d92632e0\",\n \"score\": \"0.58634454\",\n \"text\": \"public function show() {\\r\\n echo $this->init()->getView();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d138cb59b6d8df8768f135975e4445ad\",\n \"score\": \"0.58409727\",\n \"text\": \"public function show()\\n\\t{\\n\\t\\t//\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad2fe33fedb796826d1b96c32859495c\",\n \"score\": \"0.5838473\",\n \"text\": \"public function resourceDesktop()\\n {\\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\\\ResourceType')->findAll();\\n\\n return $this->templating->render(\\n 'ClarolineCoreBundle:Tool\\\\desktop\\\\resource_manager:resources.html.twig',\\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e1ccfc29048f24d0efc88d6b8257171\",\n \"score\": \"0.5811056\",\n \"text\": \"public function show($name)\\n\\t{\\n\\t\\t//\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b7cde41d4a1270d31720878d4a50b19\",\n \"score\": \"0.57936835\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\treturn $this->success($this->resource->getById($id));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7dd625db5c11766539ede97b10e391c8\",\n \"score\": \"0.57885426\",\n \"text\": \"public function viewAction($resourceId)\\n {\\n try {\\n // Call to the resource service to get the resource\\n $resourceResource = $this->get(\\n 'asker.exercise.exercise_resource'\\n )->getContentFullResource($resourceId, $this->getUserId());\\n\\n return new ApiGotResponse($resourceResource, array(\\\"details\\\", 'Default'));\\n\\n } catch (NonExistingObjectException $neoe) {\\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e871bf67c885c4b595a1f5cc980d032e\",\n \"score\": \"0.5787194\",\n \"text\": \"public function show()\\n {\\n \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e918056f269cc66c35d0c9d5ae72cf98\",\n \"score\": \"0.5785671\",\n \"text\": \"protected function addResourceShow($name, $base, $controller, $options)\\n\\t{\\n\\t\\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\\n\\n\\t\\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e4604d345a4a1aa92109fa7c7b9b1e1\",\n \"score\": \"0.57850385\",\n \"text\": \"public function showAction(I18NResource $i18NResource)\\n {\\n $use_translations = $this->get('Services')->get('use_translations');\\n\\n if(!$use_translations){\\n throw $this->createNotFoundException('Not a valid request');\\n }\\n\\n $this->get('Services')->setMenuItem('I18NResource');\\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\\n\\n return $this->render('i18nresource/show.html.twig', array(\\n 'i18NResource' => $i18NResource,\\n 'changes' => $changes,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea3e059853b58df5488fa70a7fd54c3b\",\n \"score\": \"0.5782477\",\n \"text\": \"protected function addResourceShow($name, $base, $controller)\\n {\\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39114f16312ac4920577af8887aaf740\",\n \"score\": \"0.57743496\",\n \"text\": \"public function display()\\r\\n {\\r\\n echo $this->fetch();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcc9864a64202f3261f4537601857f07\",\n \"score\": \"0.5769528\",\n \"text\": \"public function show($nombre, $resourceType, $resourceName)\\n {\\n //gets the resource\\n switch ($resourceType) {\\n case (\\\"manga\\\"):\\n $resource = Manga::where(\\\"name\\\", $resourceName)->first();\\n break;\\n case (\\\"novel\\\");\\n $resource = Novel::where(\\\"name\\\", $resourceName)->first();\\n break;\\n default:\\n abort(404);\\n break;\\n }\\n //gets the comments for the resource\\n $commentsFound = $resource->comments()->get();\\n $commented = !is_null(Auth::user()->comments()->where(\\\"commentable_id\\\", $resource->id)->first());\\n //creates a register of the interaction\\n $resource->users()->attach(Auth::user());\\n return view(\\\"user.show\\\", compact(\\\"resource\\\", \\\"commentsFound\\\", \\\"commented\\\", \\\"resourceType\\\"));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"496570de6c493cd9fe30f7c52ceb87d1\",\n \"score\": \"0.57693255\",\n \"text\": \"public function show($id)\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//\\n\\t\\t\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4be578329f20a5696732db0fd60d5d80\",\n \"score\": \"0.5768978\",\n \"text\": \"public function executeShow()\\n {\\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\\n $this->forward404Unless($this->headline);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3e57330d7cd59896b945f16d0e12a89\",\n \"score\": \"0.5756713\",\n \"text\": \"public function display()\\n {\\n echo $this->render();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3e57330d7cd59896b945f16d0e12a89\",\n \"score\": \"0.5756713\",\n \"text\": \"public function display()\\n {\\n echo $this->render();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3b51ebfe04703c114ab39fc729ba43b\",\n \"score\": \"0.5749091\",\n \"text\": \"public function show(Entry $entry)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3b51ebfe04703c114ab39fc729ba43b\",\n \"score\": \"0.5749091\",\n \"text\": \"public function show(Entry $entry)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd30d754eb9c55abae27d57dff32abdc\",\n \"score\": \"0.57409096\",\n \"text\": \"public function resourcethumbnailAction()\\r\\n {\\r\\n $request = $this->getRequest();\\r\\n $response = $this->getResponse();\\r\\n\\r\\n $id = (int) $request->getQuery('id');\\r\\n $w = (int) $request->getQuery('w');\\r\\n $h = (int) $request->getQuery('h');\\r\\n $hash = $request->getQuery('hash');\\r\\n\\r\\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\\r\\n\\r\\n // disable autorendering since we're outputting an image\\r\\n $this->_helper->viewRenderer->setNoRender();\\r\\n\\r\\n $image = new DatabaseObject_ResourceImage($this->db);\\r\\n if ($hash != $realHash || !$image->load($id)) {\\r\\n // image not found\\r\\n $response->setHttpResponseCode(404);\\r\\n return;\\r\\n }\\r\\n\\r\\n try {\\r\\n $fullpath = $image->createResourceThumbnail($w, $h);\\r\\n }\\r\\n catch (Exception $ex) {\\r\\n $fullpath = $image->getFullPath();\\r\\n }\\r\\n\\r\\n $info = getImageSize($fullpath);\\r\\n\\r\\n $response->setHeader('content-type', $info['mime']);\\r\\n $response->setHeader('content-length', filesize($fullpath));\\r\\n echo file_get_contents($fullpath);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e68751480fa47a0b2d2bc46570e3a883\",\n \"score\": \"0.5735067\",\n \"text\": \"public function display($id = null) {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca0564d197f7b97c9c7bb3bf9ec0d891\",\n \"score\": \"0.57342285\",\n \"text\": \"public function display($id = null) {\\n\\t\\t$page = $this->SimplePage->findById($id);\\n\\t\\tif(!$page){\\n\\t\\t\\t$this->Session->setFlash(__('Page not found'),'error');\\n\\t\\t\\t$this->redirect($this->referer());\\n\\t\\t}\\n\\t\\t\\n\\t\\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\\n\\t\\tif (! empty($this->request->params['requested']) ) {\\n\\t\\t\\treturn $page;\\n\\t\\t}\\n\\t\\t\\n\\t\\t$this->set('page',$page);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7cd1d7ce30dda2ea0273ce031cff516\",\n \"score\": \"0.5725927\",\n \"text\": \"public function displayReferenceAction()\\n {\\n \\t$reference_id = Extended\\\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\\\Extended\\\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\\n \\tif($reference_id)\\n \\t{\\n \\t\\n \\t\\t$this->view->reference_visible=$reference_id;\\n \\t\\techo Zend_Json::encode( 1 );\\n \\t}\\n \\tdie;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20397e06b8673db8692c5f84120c3011\",\n \"score\": \"0.5724891\",\n \"text\": \"public function show()\\n\\t{\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d55c8c31eda9d3eeb688b4417d1ce54\",\n \"score\": \"0.5722562\",\n \"text\": \"public function show($id) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f565ce0db5c2b58c1bd4bea7cb05683\",\n \"score\": \"0.5720744\",\n \"text\": \"public function showAction(Ressource $ressource, SessionConcours $session = null)\\n {\\n $deleteForm = $this->createDeleteForm($ressource);\\n return $this->render('ressource/show.html.twig', array(\\n 'ressource' => $ressource,\\n 'session' => $session,\\n 'delete_form' => $deleteForm->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47171b843665ac85f7c5da2618a7ae0e\",\n \"score\": \"0.5718969\",\n \"text\": \"public function show($id) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47171b843665ac85f7c5da2618a7ae0e\",\n \"score\": \"0.5718969\",\n \"text\": \"public function show($id) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47171b843665ac85f7c5da2618a7ae0e\",\n \"score\": \"0.5718969\",\n \"text\": \"public function show($id) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a494be3f6d40a2f537ff292b7a0ccaae\",\n \"score\": \"0.5711622\",\n \"text\": \"public function item($id=0)\\n {\\n\\t\\tif($this->session->userlogged_in !== '*#loggedin@Yes')\\n\\t\\t{\\n\\t\\t\\tredirect(base_url().'dashboard/login/');\\n }\\n \\n $resource = $this->member_resource_model->find($id);\\n if(empty($resource))\\n {\\n $this->session->action_success_message = 'Invalid item selection.';\\n redirect(base_url().'member_resources/');\\n }\\n \\n\\t\\t$data = array(\\n 'page_title' => 'Resource detail',\\n 'resource' => $resource\\n );\\n\\n\\t\\t$this->load->view('templates/header', $data);\\n\\t\\t$this->load->view('member_resources/item_view');\\n\\t\\t$this->load->view('templates/footer');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cfff8a1202fcfae7e44ab0c4fb351586\",\n \"score\": \"0.570918\",\n \"text\": \"public function showAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n $id = $_GET['id'];\\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\\n\\n if (!$entity) {\\n throw $this->createNotFoundException('Unable to find Concepto entity.');\\n }\\n\\n $deleteForm = $this->createDeleteForm($id);\\n\\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\\n 'entity' => $entity,\\n 'delete_form' => $deleteForm->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05ca915e5f597f0a1925a6b1a1e6afb0\",\n \"score\": \"0.57057405\",\n \"text\": \"public abstract function display();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05ca915e5f597f0a1925a6b1a1e6afb0\",\n \"score\": \"0.57057405\",\n \"text\": \"public abstract function display();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12bf7179b06b190879842d1f1945365c\",\n \"score\": \"0.57026845\",\n \"text\": \"public function show( $id ) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12bf7179b06b190879842d1f1945365c\",\n \"score\": \"0.57026845\",\n \"text\": \"public function show( $id ) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12bf7179b06b190879842d1f1945365c\",\n \"score\": \"0.57026845\",\n \"text\": \"public function show( $id ) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12bf7179b06b190879842d1f1945365c\",\n \"score\": \"0.57026845\",\n \"text\": \"public function show( $id ) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12bf7179b06b190879842d1f1945365c\",\n \"score\": \"0.57026845\",\n \"text\": \"public function show( $id ) {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"560ae0fd472bad5f1d21beeed5dfbbdd\",\n \"score\": \"0.57012135\",\n \"text\": \"public function show(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b19fae7378b33f825e4ee1e7d8aef94a\",\n \"score\": \"0.5699814\",\n \"text\": \"public function display($templateName=null)\\n {\\n echo $this->get($templateName);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d936662ad1c81979476df2e0767c5e19\",\n \"score\": \"0.5699578\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b283ba1c0546a155efc95a44dd0f9cf\",\n \"score\": \"0.56981397\",\n \"text\": \"public function show(Response $response)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0465b5fe008a3153a8a032fca67abfed\",\n \"score\": \"0.56937706\",\n \"text\": \"public function show() { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5df2376bef8dd69621a6ce7e2afd0bf4\",\n \"score\": \"0.56856436\",\n \"text\": \"abstract public function show($id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5df2376bef8dd69621a6ce7e2afd0bf4\",\n \"score\": \"0.56856436\",\n \"text\": \"abstract public function show($id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb37955e47b2d1c708a039b4bfa190e0\",\n \"score\": \"0.5684962\",\n \"text\": \"public function show($id)\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":738,"cells":{"query_id":{"kind":"string","value":"4d9bbbf3cba6fa1bb4cdc7717913bd37"},"query":{"kind":"string","value":"Determine if the user is authorized to make this request."},"positive_passages":{"kind":"list like","value":[{"docid":"7dc5ba4f66129deb94fcdcf0df35f0c4","score":"0.0","text":"public function authorize()\n {\n return auth()->user()->can('update', $this->route('classroom_discipline_user'));\n }","title":""}],"string":"[\n {\n \"docid\": \"7dc5ba4f66129deb94fcdcf0df35f0c4\",\n \"score\": \"0.0\",\n \"text\": \"public function authorize()\\n {\\n return auth()->user()->can('update', $this->route('classroom_discipline_user'));\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"adc35a96694d73041eb8bde60a1a3a34","score":"0.8355789","text":"public function authorize()\n {\n // Only authenticated user can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }","title":""},{"docid":"61b6850924368e14814b635e85110c7f","score":"0.8344406","text":"public function authorize()\n {\n return $this->user() != null;\n }","title":""},{"docid":"266882932e546005ce5e72a1dfcad4a3","score":"0.8311813","text":"public function authorize()\n {\n // Only authenticated users can make this request\n if (Auth()->check())\n {\n return true;\n }\n return false;\n }","title":""},{"docid":"6376534de447322dc42273a919390fb2","score":"0.8263114","text":"public function authorize()\n {\n if ($this->isUserAdmin()) {\n return true;\n }\n\n return $this->isUserOwner($this->resourcesData);\n }","title":""},{"docid":"a2f400e9b8822b6190b4dfb53c9dfb58","score":"0.8225883","text":"public function authorize()\n {\n return $this->user()->id === $this->user->id;\n }","title":""},{"docid":"c68c0b9aa3d35004ad103595a7134e0d","score":"0.81748027","text":"public function authorize()\n {\n return $this->user() === Auth::user();\n }","title":""},{"docid":"afe5d08385357718fec642473a52aac5","score":"0.8172868","text":"public function authorize() {\n $user = $this->route('user');\n return Auth::id() == $user->id;\n }","title":""},{"docid":"1d9d94d60f24f4ee69318fc43d74c4c6","score":"0.8141564","text":"public function authorize()\n {\n return (bool) $this->user();\n }","title":""},{"docid":"1d9d94d60f24f4ee69318fc43d74c4c6","score":"0.8141564","text":"public function authorize()\n {\n return (bool) $this->user();\n }","title":""},{"docid":"cd17c9e8a5fd125380008a18703accec","score":"0.80771476","text":"public function isAuthorized()\n {\n if ($this->api && method_exists($this->api, 'authorize')) {\n return $this->api->authorize();\n }\n\n return true;\n }","title":""},{"docid":"ee7af7835fdae0f354ca4a681cfddbe7","score":"0.8070438","text":"public function isAuthorized();","title":""},{"docid":"d88bc6352a6cb4cb86862a898807e468","score":"0.80206347","text":"public function authorize()\n {\n if (!empty(auth()->user())) return true;\n else return false;\n }","title":""},{"docid":"07cf3e15d6a143b44b4d698b2d356d9d","score":"0.7993011","text":"public function authorize()\n {\n return request()->user()->id == auth()->user()->id;\n }","title":""},{"docid":"df9c1983d1c3dc60d4f28281676c0a52","score":"0.79590464","text":"public function authorize()\n {\n $user = current_user();\n\n return $user === null || ! $user->isOwner();\n }","title":""},{"docid":"d39cd74dd19725b319038fd93b77c139","score":"0.7939632","text":"public function authorize()\n {\n return !$this->user();\n }","title":""},{"docid":"7f8b051ebd168a6c68f0514f0d8df105","score":"0.79341745","text":"public function isAuthorized() {\n\t\treturn !empty($this->auth_token);\n\t}","title":""},{"docid":"7fa31e51d5d3fad2b2ee2dd759855dcd","score":"0.7881839","text":"public function authorize()\n {\n if(Session::has('is_user') || Session::get('is_user') === true){\n return true;\n }\n return false;\n }","title":""},{"docid":"935a0da134c0bfa79ad09ddb3e7615c5","score":"0.78689","text":"public function authorize()\n {\n return request()->session()->has('api_credential');\n }","title":""},{"docid":"c8aacf9b7e9a68d571413875cf1baf9d","score":"0.78665614","text":"public function authorize()\n {\n return ($this->user() && $this->user()->isAdmin());\n }","title":""},{"docid":"24d55f30f5c79b4402d7c629fe5c3737","score":"0.7856002","text":"public function authorize()\n {\n return Auth::user()->is_admin || $this->user()->id == Auth::user()->id;\n }","title":""},{"docid":"5e6c586881f51e616e13fcb15a106181","score":"0.78541803","text":"public function authorize()\n {\n if (auth()->user()) {\n return true;\n }\n }","title":""},{"docid":"340d335aaf485d507323dbdd50bd4d12","score":"0.78414804","text":"public function authorize()\n {\n return auth()->check() ? true : false;\n }","title":""},{"docid":"77744da8ec1c5d94f9fb4197ac00dd07","score":"0.78403324","text":"public function authorize()\n {\n return auth()->user()->id == $this->request->get('id') && (auth()->user()->hasRole('admin') || auth()->user()->hasRole('employee'));\n }","title":""},{"docid":"738aafc40c5c974391a1185db2419767","score":"0.7837965","text":"public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }","title":""},{"docid":"b46b972356ffaf201da7c88abba560a5","score":"0.78105783","text":"public function authorize()\n {\n return $this->user()->is_admin && $this->user()->isPro();\n }","title":""},{"docid":"fee0af343c9cfbc2d23e99952d86be99","score":"0.7810181","text":"public function isAuthorized() {\n return parent::isAuthorized();\n }","title":""},{"docid":"9f7c39634419f2fce8c1349fddeee2cd","score":"0.7809632","text":"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }","title":""},{"docid":"c35d64e364414093c2211107d6ba2cd7","score":"0.7797828","text":"public function authorize()\n {\n switch($this->method()) {\n case 'GET':\n return false;\n case 'POST':\n $user = User::findOrFail($this->id);\n return $this->user()->can('update', [User::class, $user]);\n case 'PUT':\n case 'PATCH': \n case 'DELETE':\n return false;\n default:\n break;\n }\n }","title":""},{"docid":"0e0f88dd62b79b349871769f0c5ee5c0","score":"0.7775089","text":"function isAuthorized() {\n // Currently we do all meaningful checks in beforeFilter().\n \n return true;\n }","title":""},{"docid":"166e1a3b11b8a0bf836a729ad64c740d","score":"0.7769981","text":"public function authorize()\n {\n $categoryOwner = Operation::find($this->route('id'))\n ->category()\n ->first()\n ->user()\n ->first();\n\n if ($categoryOwner->id === \\Auth::id())\n return true;\n\n return false;\n }","title":""},{"docid":"96de3a0bca7b2354dce8c6c6a9ae7654","score":"0.77589947","text":"public function authorize()\n {\n $user = $this->user();\n return $user || $user->isAdmin();\n }","title":""},{"docid":"f2dd197bc28c2a41168d4d4579952d22","score":"0.77469796","text":"public function authorize()\n {\n $subscriber = Subscriber::find($this->route('id'));\n\n return $subscriber && $subscriber->user_id == Auth::guard('api')->user()->id;\n }","title":""},{"docid":"537138e05319644656ed0ed47b3d1d1a","score":"0.7741953","text":"public function authorize()\n {\n // @todo should anyone really be able to update a check-in?\n $check_in = CheckIn::query()->where('scheduled_checkin_id', '=', $this->route('id'))->first();\n if ($this->user()->isAdmin($check_in->organization_id)) {\n return true;\n }\n\n if ($this->user()->role === 'author' &&\n $this->user()->organization_id === $this->input('organization')) {\n return true;\n }\n return false;\n }","title":""},{"docid":"7b4f0f2f385e53224f8389cbfe400983","score":"0.774003","text":"public function authorize(): bool\n {\n if (! parent::authorize()) {\n return false;\n }\n\n // If there is a subuser present in the URL, validate that it is not the same as the\n // current request user. You're not allowed to modify yourself.\n if ($this->route()->hasParameter('subuser')) {\n if ($this->endpointSubuser()->user_id === $this->user()->id) {\n return false;\n }\n }\n\n // If this is a POST request, validate that the user can even assign the permissions they\n // have selected to assign.\n if ($this->method() === Request::METHOD_POST && $this->has('permissions')) {\n $this->validatePermissionsCanBeAssigned(\n $this->input('permissions') ?? []\n );\n }\n\n return true;\n }","title":""},{"docid":"5b4c01003b40c31053fde7580331e0fc","score":"0.77388614","text":"public function authorize()\n {\n if (Auth::user()) {\n return true;\n } else {\n return false;\n }\n }","title":""},{"docid":"ab2a1df217316960e99099a4734e0bf9","score":"0.77383286","text":"public function authorize()\n {\n if (!Auth::user())\n {\n return false;\n }\n if ($this->id && (Auth::id() !== $this->id) && !Auth::user()->is_admin)\n {\n return false;\n }\n\n return true;\n }","title":""},{"docid":"ca4822d69ec5ae164a06238db46726f9","score":"0.7727606","text":"public function authorize()\n {\n // only allow if the user is logged in\n // return auth()->check();\n\n return true;\n }","title":""},{"docid":"6867e5f786ce616034ffe506750fcb9c","score":"0.7727508","text":"public function authorize()\n {\n $dataSource = DataSource::find($this->route('datasource'));\n $dataSource = $dataSource ? $dataSource->first() : null;\n return $this->user()\n && ($dataSource ? $this->user()->id === $dataSource->owner->id : true);\n }","title":""},{"docid":"f7f59a6d41ea922d7696cf92de80b77e","score":"0.770588","text":"public function authorize(): bool\n {\n return !! $this->user();\n }","title":""},{"docid":"6d721947f3ade89e55924a2597b229ca","score":"0.77030694","text":"public function authorize()\n {\n $user = App::call( [ $this, 'findUser' ] );\n if ( is_null( $user ) )\n {\n return false;\n }\n\n $this -> merge( [ 'user' => $user ] );\n return true;\n }","title":""},{"docid":"7adcf640538c1fd36664f332bcebca74","score":"0.77019715","text":"public function isAuthorized()\n {\n return ($_SESSION['user']['logged'] === true);\n }","title":""},{"docid":"703f36ee75d24db3d967d5886b237643","score":"0.76944697","text":"public function authorize()\n {\n if($this->route('accounts') == auth()->user()->id) {\n return true;\n }\n\n return false;\n \n }","title":""},{"docid":"1c2a0175bb5e73473c311c83d1588f13","score":"0.769402","text":"public function authorize()\n\t{\n if(!$this->has(\"user_id\") || !is_int((integer)$this->get(\"user_id\")) ||\n !$this->has(\"recommendation_id\") || !is_int((integer)$this->get(\"recommendation_id\")))\n {\n return false;\n }\n\t\treturn true;\n\t}","title":""},{"docid":"9f176845cb818d4b52c1e0514e271b22","score":"0.7687097","text":"public function isAuthorized(){\n\t\treturn $this->authorized;\n\t}","title":""},{"docid":"2d7c531ed28d1966e92137472df2320d","score":"0.768582","text":"public function authorize()\n {\n return $this->session()->has('jukebox.user');\n }","title":""},{"docid":"a0ef39a48a6c1c6cd6f90576ccb029ed","score":"0.7682679","text":"public function authorize()\n {\n // If user_id is not empty it means admin views user's tasks\n // and we need to check permissions\n if(!empty($this->get('user_id'))) {\n return $this->user()->hasRole('admin');\n }\n\n return true;\n }","title":""},{"docid":"3c54a64b7e414471108d31b4b58854b5","score":"0.7674501","text":"function is_authorized() {\n return ($this->access_token != NULL);\n }","title":""},{"docid":"c4b2873df4aef92e1d39bd3f24ab9a6f","score":"0.7668482","text":"public function authorize()\n {\n return (auth()->check() && ! auth()->user()->finished_profile && auth()->user()->role != 'admin') ? true : false;\n }","title":""},{"docid":"376844043f0222ed7a2a8aa3623b474f","score":"0.7668466","text":"public function authorize() {\n if ($this->getMethod() === 'PATCH') {\n return $this->user()->can('update', User::class);\n }\n\n return !auth()->check();\n }","title":""},{"docid":"fb8dd0b89ad69c80bd32219b331d467a","score":"0.76649845","text":"function isAuthorized() {\r\n if ($this->isAdminRequest()) {\r\n if ($this->Auth->user('is_admin') != true) {\r\n return false;\r\n }\r\n }\r\r\n if (empty($this->params['prefix'])) {\r\n return true;\r\n }\r\r\n return true;\r\n }","title":""},{"docid":"5f40d948a5e4ffe4776811ba667a52cf","score":"0.7650565","text":"private function isUserAuthorized(Request $request)\n {\n return $request->user->id == $this->auth->id();\n }","title":""},{"docid":"ac3b3a019df28e1b6b5065c0839a12f8","score":"0.7642991","text":"public function authorize()\n {\n if (!$this->isRegister())\n return $this->user()->can('update', $this->route('user'));\n return true;\n }","title":""},{"docid":"893fefcaa8f0bbabe2639b6e2fc59c84","score":"0.76401085","text":"public function authorize()\n {\n if (Auth::check()) {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"d7c5080318027df1643993babed950ea","score":"0.7632217","text":"public function authorize()\n {\n if ($this->user()->hasRole('admin')) {\n return false;\n }\n return true;\n }","title":""},{"docid":"8c554c521daa52ec235580f10b15f4a8","score":"0.76313287","text":"public function authorize()\n {\n return app('Authority')->checkAuthority(134) || app('Authority')->checkAuthority(194);\n }","title":""},{"docid":"1b700c9f91296110fce91a91292b658a","score":"0.76300305","text":"public function isAuthorized(): bool\n {\n return $this->authorized;\n }","title":""},{"docid":"46db0b1864bc02cb5f1e50e7206d17bd","score":"0.76140994","text":"public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"4060b7cebfc007f78995973323198b2c","score":"0.76068926","text":"public function authorize()\n {\n return ((\\Auth::check() && (\\Auth::user()->hasRole(\"admin\"))) || (\\Auth::check() && (\\Auth::user()->hasRole(\"owner\"))));\n }","title":""},{"docid":"91f75f102cf6d36a864c523d88b43a90","score":"0.7603521","text":"function authorised() {\n\n\t\tglobal $api_config;\n\n\t\t$request = OAuthRequest::from_request();\n\n\t\t$api_config->oauth_parameters = $request->get_parameters();\n\n\t\tif (\t!isset($api_config->oauth_parameters['oauth_consumer_key']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_signature']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_timestamp']) ||\n\t\t\t\t!isset($api_config->oauth_parameters['oauth_nonce'])\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$consumer_key = $api_config->oauth_parameters['oauth_consumer_key'];\n\t\t$consumer_secret = lookup_secret($consumer_key);\n\t\t$consumer = new OAuthConsumer($consumer_key, $consumer_secret);\n\n\t\t$signature_method = new OAuthSignatureMethod_HMAC_SHA1;\n\t\t$signature = $api_config->oauth_parameters['oauth_signature'];\n\n\t\t$timestamp = $api_config->oauth_parameters['oauth_timestamp'];\n\t\t$request_expired = (abs(time() - $timestamp) > 300);\n\n\t\treturn !$request_expired && valid_nonce() && $signature_method->check_signature($request, $consumer, null, $signature);\n\t}","title":""},{"docid":"4c54020c6c60ab51e81a9670d68b022b","score":"0.7582351","text":"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser', 'hrassistant'])) {\n return true;\n } else {\n return false;\n }\n }","title":""},{"docid":"ff794c28a968dce69d0449efe84e5bcc","score":"0.7572131","text":"public function authorize()\n {\n /*$robot = Robot::find($this->route('robot'));\n if ($robot) {\n return $this->user()->can('update', $robot);\n } else {\n return true;\n }*/\n return true;\n }","title":""},{"docid":"10df13ce9600b5fb3463bbea159e1143","score":"0.7571812","text":"public function authorize(): bool\n {\n $user = Auth::user();\n return\n $user->can(\"create\", User::class) ||\n $user->can(\"update\", $user);\n }","title":""},{"docid":"9fccab535480cb881f9768d3da7420e9","score":"0.7570924","text":"public function authorize()\n {\n try {\n $this->user = User::findOrFail(session('2fa:user:id'));\n } catch (\\Exception $ex) {\n return false;\n }\n\n return true;\n }","title":""},{"docid":"a0d3d7ca67a2980e7b293d330995059b","score":"0.75684065","text":"public function authorize()\n\t{\n\t\tif ( $this->alert != null ) {\n\t\t\treturn Auth::user()->isMyAlert( $this->alert );\n\t\t}\n\t\treturn true;\n\t}","title":""},{"docid":"1f5d34d0d7fcc23ad0e79bb7bba1d111","score":"0.7567948","text":"public function authorize()\n {\n $user = $this->user();\n $entry = $this->entry;\n if (strtoupper($this->method()) === 'POST') {\n return true;\n } else {\n return $user->can('update', $entry);\n }\n }","title":""},{"docid":"ddf07a2b01ff2619fc5c7deaa69edc81","score":"0.7561511","text":"public function authorize()\n {\n if (Auth::check())\n {\n return true;\n }\n return false;\n }","title":""},{"docid":"353a39cee7ff65acadebf163114c0a91","score":"0.7560446","text":"public function authorize()\n {\n return Task::find($this->route()->parameters['id'])->user_id == Auth::id();\n }","title":""},{"docid":"a12451b6af79fdf13141f94195a42ad0","score":"0.7549059","text":"public function authorize()\n {\n $user = User::where('id', Auth::id());\n\n return $user->exists() &&\n $user->first()->verified;\n }","title":""},{"docid":"8c83d334e99dd9618951155e97f8687f","score":"0.75449353","text":"public function authorize()\n {\n switch ($this->method()){\n case 'POST':\n case 'GET':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n return $this->isAdmin();\n default:\n return false;\n\n }\n\n }","title":""},{"docid":"f08d4c8687c0a867f9a48d889466aa39","score":"0.7542998","text":"public function authorize()\n {\n return $this->user()->is_dispatcher() && $this->user()->ownsOrder($this->id);\n }","title":""},{"docid":"e9765550fc338490263d3391dd22e987","score":"0.7533661","text":"public function authorize()\n {\n if(!$this->route('comment')){\n return true;\n }\n\n $this->comment = Comment::find($this->route('comment'));\n\n if(!$this->comment){\n return false;\n }\n\n return $this->user()->isSuperAdmin() || $this->user()->id === $this->comment->user_id ;\n }","title":""},{"docid":"c20f97fc4daa02e4cab5f9c7fba1fcea","score":"0.75300336","text":"public function authorize()\n {\n return Auth::check() && Auth::user()->user_role == 0;\n }","title":""},{"docid":"ee75d6f38863c6db4488059a2d5f573b","score":"0.75222874","text":"function isAuthorized() {\n return true;\n }","title":""},{"docid":"3064bebbce0683cd6210741cc8a3be57","score":"0.75160164","text":"public function authorize()\n {\n if (env('APP_ENV') == 'testing'):\n return true;\n endif;\n switch ($this->getMethod()):\n case \"POST\":\n case \"PUT\":\n return true;\n break;\n endswitch;\n return false;\n }","title":""},{"docid":"cdc68b6902017dd60a773f887cf373d5","score":"0.7512349","text":"public function authorize()\n {\n $ticket = $this->route('ticket');\n\n return $ticket->property->landlord->id == $this->user()->landlord->id;\n }","title":""},{"docid":"1f3b80daa6a71180d2bf0f924cbc93c4","score":"0.75095665","text":"public function authorize()\n {\n return auth()->user()->id === $this->route('comment')->user_id;\n }","title":""},{"docid":"747a3cadb25faf5ef11b197c54891130","score":"0.75075424","text":"public function authorize()\n {\n if ($this->can('view-building')) {\n return true;\n }\n\n // permit residents to see their building\n $building = Building::where('id', $this->route('id'))->first();\n $resident = $this->user()->resident ?? null;\n\n\n return $resident && $resident->relations()->where('building_id', $building->id)->exists();\n }","title":""},{"docid":"9cf7062eba5e301eed991dbfc61484f2","score":"0.7502618","text":"public function authorize()\n {\n\t\t// only allow updates if the user is logged in\n\t\treturn backpack_auth()->check();\n }","title":""},{"docid":"2aceba7cfd4e8124409fc03af5d896d8","score":"0.75019586","text":"function isAuthorized() {\n //if( isset($this->params['prefix']))\n // return (strcasecmp($this->params['prefix'],$this->Auth->user('role'))===0);\n if (!$this->isLogin()) return false;\n return true;\n \n //shouldn't get here, better be safe than sorry\n //return false;\n }","title":""},{"docid":"b8c138dfbf0a96d5b19051c395e3e939","score":"0.7501601","text":"public function authorize()\n {\n //TODO check if the authenticated user actually has the authority to update a given resource.\n return true;\n }","title":""},{"docid":"61a127d26cc95b5414689c2525a7cf17","score":"0.74994856","text":"public function authorize()\n {\n if (Auth::check() && Auth::user()->level === 'admin') {\n return true;\n }\n return false;\n }","title":""},{"docid":"e60c253b47ba2de673da9b9ed8b83d5b","score":"0.74960023","text":"public function authorize()\n {\n if(Auth::check())\n return true;\n else\n return false;\n }","title":""},{"docid":"f9da0a87a777ed1680f5bdaddb08aaff","score":"0.74959165","text":"public function authorize()\n {\n $advert = $this->route('advert');\n\n return Auth::id() === $advert->user_id || Auth::user()->isAdministrator();\n }","title":""},{"docid":"0cc11ac92ea784b1757a30c9ec928e22","score":"0.74956346","text":"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }","title":""},{"docid":"9320f8ef578ca5b72252eaed0363faab","score":"0.74941915","text":"public function authorize()\n {\n return (auth()->check() && auth()->user()->is_admin);\n }","title":""},{"docid":"4f62804fddb1c64b11f8c844b4d80ca8","score":"0.74888283","text":"public function authorize()\n {\n if (Auth::user()->roles()->first()->role === 'admin' && Auth::check()) return true;\n return false;\n }","title":""},{"docid":"b57952e918adf46f4d6781431945241d","score":"0.74884","text":"public function authorize()\n {\n // in-case csrf has somehow been bypassed, ensure request is from this server\n return ($this->header('referer') == config('app.url'));\n }","title":""},{"docid":"7591eba5812efb48cc00fe833e0023cd","score":"0.7485698","text":"public function authorize()\n {\n return $this->api_token &&\n \\DB::table('user')->where(['api_token' => $this->api_token])->first()==true;\n }","title":""},{"docid":"94f792385fcb99b051b81a861c1dd2df","score":"0.7483596","text":"public function authorize() {\n if (auth()->check() && Gate::allows('access-admin', auth()->user())) {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"94f792385fcb99b051b81a861c1dd2df","score":"0.7483596","text":"public function authorize() {\n if (auth()->check() && Gate::allows('access-admin', auth()->user())) {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"f6a9e336b24566d18d73e703514851ae","score":"0.74829066","text":"public function authorize()\n\t{\n\t\tif ( ! \\Auth::check() )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}","title":""},{"docid":"42853719f6e9216772324775de4e90fb","score":"0.74825495","text":"public function authorize(): bool\n {\n return (bool) Auth::user();\n }","title":""},{"docid":"96c9a6c7ec361f4005653c1f39cdb7d9","score":"0.74794936","text":"public function authorize ()\n {\n return TRUE;\n }","title":""},{"docid":"8760c099bc57f5fa8739c65c1c696ac7","score":"0.7476589","text":"public function authorize()\n {\n // Already authorized by middleware on route.\n // No policy or gate defined for this resource thus returns true.\n return true;\n }","title":""},{"docid":"7c346768ea98baf86426671339aa4d81","score":"0.74726367","text":"public function authorize()\n {\n return $this->user()->isSuperAdmin();\n }","title":""},{"docid":"0f70212b6c7687c65179463bab4debd8","score":"0.74722385","text":"public function authorize()\n {\n //Should add check for user but for now just allow anyone to edit request.\n return true;\n }","title":""},{"docid":"c953f72310cdb772858a87f750d36293","score":"0.7468519","text":"public function authorize()\n {\n $this->customer = (new FetchCustomer)\n ->actingAs($this->user())\n ->run([\n 'encoded_id' => $this->customer_id,\n ]);\n\n return $this->runningAs('object') || $this->user()->can('update', $this->customer);\n }","title":""},{"docid":"a48586bdce6587a1b8d4007145196dac","score":"0.7466968","text":"public function authorize()\n {\n //TODO:: return true if user is admin\n return true;\n }","title":""},{"docid":"8fe3797f9541eefa98c79fb818d6fb8e","score":"0.7464665","text":"public function authorize()\n {\n if ($this->isGet()) {\n return true;\n }\n if ($this->isPost()) {\n return auth()->user()->can('create', OrderItem::class);\n }\n if ($this->isPut()) {\n return auth()->user()->can('update', $this->route('orderItem'));\n }\n if ($this->isDelete()) {\n return auth()->user()->can('delete', $this->route('orderItem'));\n }\n\n return true;\n }","title":""},{"docid":"f12f375cfb24327a150def25274a505e","score":"0.7455374","text":"public function authorize()\n {\n $reply = $this->route('reply');\n return $reply && $this->user()->can('updateOrDelete', $reply);\n }","title":""},{"docid":"998aee2b24522e93c8d64676eed7b6d8","score":"0.7455313","text":"public function authorize() : bool\n {\n return $this->user()->can('viewAny', Contact::class);\n }","title":""}],"string":"[\n {\n \"docid\": \"adc35a96694d73041eb8bde60a1a3a34\",\n \"score\": \"0.8355789\",\n \"text\": \"public function authorize()\\n {\\n // Only authenticated user can make this request\\n if (Auth()->check())\\n {\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61b6850924368e14814b635e85110c7f\",\n \"score\": \"0.8344406\",\n \"text\": \"public function authorize()\\n {\\n return $this->user() != null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"266882932e546005ce5e72a1dfcad4a3\",\n \"score\": \"0.8311813\",\n \"text\": \"public function authorize()\\n {\\n // Only authenticated users can make this request\\n if (Auth()->check())\\n {\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6376534de447322dc42273a919390fb2\",\n \"score\": \"0.8263114\",\n \"text\": \"public function authorize()\\n {\\n if ($this->isUserAdmin()) {\\n return true;\\n }\\n\\n return $this->isUserOwner($this->resourcesData);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2f400e9b8822b6190b4dfb53c9dfb58\",\n \"score\": \"0.8225883\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->id === $this->user->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c68c0b9aa3d35004ad103595a7134e0d\",\n \"score\": \"0.81748027\",\n \"text\": \"public function authorize()\\n {\\n return $this->user() === Auth::user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afe5d08385357718fec642473a52aac5\",\n \"score\": \"0.8172868\",\n \"text\": \"public function authorize() {\\n $user = $this->route('user');\\n return Auth::id() == $user->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d9d94d60f24f4ee69318fc43d74c4c6\",\n \"score\": \"0.8141564\",\n \"text\": \"public function authorize()\\n {\\n return (bool) $this->user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d9d94d60f24f4ee69318fc43d74c4c6\",\n \"score\": \"0.8141564\",\n \"text\": \"public function authorize()\\n {\\n return (bool) $this->user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd17c9e8a5fd125380008a18703accec\",\n \"score\": \"0.80771476\",\n \"text\": \"public function isAuthorized()\\n {\\n if ($this->api && method_exists($this->api, 'authorize')) {\\n return $this->api->authorize();\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee7af7835fdae0f354ca4a681cfddbe7\",\n \"score\": \"0.8070438\",\n \"text\": \"public function isAuthorized();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d88bc6352a6cb4cb86862a898807e468\",\n \"score\": \"0.80206347\",\n \"text\": \"public function authorize()\\n {\\n if (!empty(auth()->user())) return true;\\n else return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07cf3e15d6a143b44b4d698b2d356d9d\",\n \"score\": \"0.7993011\",\n \"text\": \"public function authorize()\\n {\\n return request()->user()->id == auth()->user()->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df9c1983d1c3dc60d4f28281676c0a52\",\n \"score\": \"0.79590464\",\n \"text\": \"public function authorize()\\n {\\n $user = current_user();\\n\\n return $user === null || ! $user->isOwner();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d39cd74dd19725b319038fd93b77c139\",\n \"score\": \"0.7939632\",\n \"text\": \"public function authorize()\\n {\\n return !$this->user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f8b051ebd168a6c68f0514f0d8df105\",\n \"score\": \"0.79341745\",\n \"text\": \"public function isAuthorized() {\\n\\t\\treturn !empty($this->auth_token);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fa31e51d5d3fad2b2ee2dd759855dcd\",\n \"score\": \"0.7881839\",\n \"text\": \"public function authorize()\\n {\\n if(Session::has('is_user') || Session::get('is_user') === true){\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"935a0da134c0bfa79ad09ddb3e7615c5\",\n \"score\": \"0.78689\",\n \"text\": \"public function authorize()\\n {\\n return request()->session()->has('api_credential');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8aacf9b7e9a68d571413875cf1baf9d\",\n \"score\": \"0.78665614\",\n \"text\": \"public function authorize()\\n {\\n return ($this->user() && $this->user()->isAdmin());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24d55f30f5c79b4402d7c629fe5c3737\",\n \"score\": \"0.7856002\",\n \"text\": \"public function authorize()\\n {\\n return Auth::user()->is_admin || $this->user()->id == Auth::user()->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e6c586881f51e616e13fcb15a106181\",\n \"score\": \"0.78541803\",\n \"text\": \"public function authorize()\\n {\\n if (auth()->user()) {\\n return true;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"340d335aaf485d507323dbdd50bd4d12\",\n \"score\": \"0.78414804\",\n \"text\": \"public function authorize()\\n {\\n return auth()->check() ? true : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77744da8ec1c5d94f9fb4197ac00dd07\",\n \"score\": \"0.78403324\",\n \"text\": \"public function authorize()\\n {\\n return auth()->user()->id == $this->request->get('id') && (auth()->user()->hasRole('admin') || auth()->user()->hasRole('employee'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"738aafc40c5c974391a1185db2419767\",\n \"score\": \"0.7837965\",\n \"text\": \"public function authorize()\\n {\\n /**\\n * @var User $user\\n * @var Document $document\\n */\\n $user = Auth::user();\\n $document = $this->route('document');\\n\\n return (int)$user->id === (int)$document->user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b46b972356ffaf201da7c88abba560a5\",\n \"score\": \"0.78105783\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->is_admin && $this->user()->isPro();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fee0af343c9cfbc2d23e99952d86be99\",\n \"score\": \"0.7810181\",\n \"text\": \"public function isAuthorized() {\\n return parent::isAuthorized();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f7c39634419f2fce8c1349fddeee2cd\",\n \"score\": \"0.7809632\",\n \"text\": \"public function authorize()\\n {\\n if($this->user()->isAdmin())\\n return true;\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c35d64e364414093c2211107d6ba2cd7\",\n \"score\": \"0.7797828\",\n \"text\": \"public function authorize()\\n {\\n switch($this->method()) {\\n case 'GET':\\n return false;\\n case 'POST':\\n $user = User::findOrFail($this->id);\\n return $this->user()->can('update', [User::class, $user]);\\n case 'PUT':\\n case 'PATCH': \\n case 'DELETE':\\n return false;\\n default:\\n break;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e0f88dd62b79b349871769f0c5ee5c0\",\n \"score\": \"0.7775089\",\n \"text\": \"function isAuthorized() {\\n // Currently we do all meaningful checks in beforeFilter().\\n \\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"166e1a3b11b8a0bf836a729ad64c740d\",\n \"score\": \"0.7769981\",\n \"text\": \"public function authorize()\\n {\\n $categoryOwner = Operation::find($this->route('id'))\\n ->category()\\n ->first()\\n ->user()\\n ->first();\\n\\n if ($categoryOwner->id === \\\\Auth::id())\\n return true;\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96de3a0bca7b2354dce8c6c6a9ae7654\",\n \"score\": \"0.77589947\",\n \"text\": \"public function authorize()\\n {\\n $user = $this->user();\\n return $user || $user->isAdmin();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2dd197bc28c2a41168d4d4579952d22\",\n \"score\": \"0.77469796\",\n \"text\": \"public function authorize()\\n {\\n $subscriber = Subscriber::find($this->route('id'));\\n\\n return $subscriber && $subscriber->user_id == Auth::guard('api')->user()->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"537138e05319644656ed0ed47b3d1d1a\",\n \"score\": \"0.7741953\",\n \"text\": \"public function authorize()\\n {\\n // @todo should anyone really be able to update a check-in?\\n $check_in = CheckIn::query()->where('scheduled_checkin_id', '=', $this->route('id'))->first();\\n if ($this->user()->isAdmin($check_in->organization_id)) {\\n return true;\\n }\\n\\n if ($this->user()->role === 'author' &&\\n $this->user()->organization_id === $this->input('organization')) {\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b4f0f2f385e53224f8389cbfe400983\",\n \"score\": \"0.774003\",\n \"text\": \"public function authorize(): bool\\n {\\n if (! parent::authorize()) {\\n return false;\\n }\\n\\n // If there is a subuser present in the URL, validate that it is not the same as the\\n // current request user. You're not allowed to modify yourself.\\n if ($this->route()->hasParameter('subuser')) {\\n if ($this->endpointSubuser()->user_id === $this->user()->id) {\\n return false;\\n }\\n }\\n\\n // If this is a POST request, validate that the user can even assign the permissions they\\n // have selected to assign.\\n if ($this->method() === Request::METHOD_POST && $this->has('permissions')) {\\n $this->validatePermissionsCanBeAssigned(\\n $this->input('permissions') ?? []\\n );\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b4c01003b40c31053fde7580331e0fc\",\n \"score\": \"0.77388614\",\n \"text\": \"public function authorize()\\n {\\n if (Auth::user()) {\\n return true;\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab2a1df217316960e99099a4734e0bf9\",\n \"score\": \"0.77383286\",\n \"text\": \"public function authorize()\\n {\\n if (!Auth::user())\\n {\\n return false;\\n }\\n if ($this->id && (Auth::id() !== $this->id) && !Auth::user()->is_admin)\\n {\\n return false;\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca4822d69ec5ae164a06238db46726f9\",\n \"score\": \"0.7727606\",\n \"text\": \"public function authorize()\\n {\\n // only allow if the user is logged in\\n // return auth()->check();\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6867e5f786ce616034ffe506750fcb9c\",\n \"score\": \"0.7727508\",\n \"text\": \"public function authorize()\\n {\\n $dataSource = DataSource::find($this->route('datasource'));\\n $dataSource = $dataSource ? $dataSource->first() : null;\\n return $this->user()\\n && ($dataSource ? $this->user()->id === $dataSource->owner->id : true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7f59a6d41ea922d7696cf92de80b77e\",\n \"score\": \"0.770588\",\n \"text\": \"public function authorize(): bool\\n {\\n return !! $this->user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d721947f3ade89e55924a2597b229ca\",\n \"score\": \"0.77030694\",\n \"text\": \"public function authorize()\\n {\\n $user = App::call( [ $this, 'findUser' ] );\\n if ( is_null( $user ) )\\n {\\n return false;\\n }\\n\\n $this -> merge( [ 'user' => $user ] );\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7adcf640538c1fd36664f332bcebca74\",\n \"score\": \"0.77019715\",\n \"text\": \"public function isAuthorized()\\n {\\n return ($_SESSION['user']['logged'] === true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"703f36ee75d24db3d967d5886b237643\",\n \"score\": \"0.76944697\",\n \"text\": \"public function authorize()\\n {\\n if($this->route('accounts') == auth()->user()->id) {\\n return true;\\n }\\n\\n return false;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c2a0175bb5e73473c311c83d1588f13\",\n \"score\": \"0.769402\",\n \"text\": \"public function authorize()\\n\\t{\\n if(!$this->has(\\\"user_id\\\") || !is_int((integer)$this->get(\\\"user_id\\\")) ||\\n !$this->has(\\\"recommendation_id\\\") || !is_int((integer)$this->get(\\\"recommendation_id\\\")))\\n {\\n return false;\\n }\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f176845cb818d4b52c1e0514e271b22\",\n \"score\": \"0.7687097\",\n \"text\": \"public function isAuthorized(){\\n\\t\\treturn $this->authorized;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d7c531ed28d1966e92137472df2320d\",\n \"score\": \"0.768582\",\n \"text\": \"public function authorize()\\n {\\n return $this->session()->has('jukebox.user');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0ef39a48a6c1c6cd6f90576ccb029ed\",\n \"score\": \"0.7682679\",\n \"text\": \"public function authorize()\\n {\\n // If user_id is not empty it means admin views user's tasks\\n // and we need to check permissions\\n if(!empty($this->get('user_id'))) {\\n return $this->user()->hasRole('admin');\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c54a64b7e414471108d31b4b58854b5\",\n \"score\": \"0.7674501\",\n \"text\": \"function is_authorized() {\\n return ($this->access_token != NULL);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4b2873df4aef92e1d39bd3f24ab9a6f\",\n \"score\": \"0.7668482\",\n \"text\": \"public function authorize()\\n {\\n return (auth()->check() && ! auth()->user()->finished_profile && auth()->user()->role != 'admin') ? true : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"376844043f0222ed7a2a8aa3623b474f\",\n \"score\": \"0.7668466\",\n \"text\": \"public function authorize() {\\n if ($this->getMethod() === 'PATCH') {\\n return $this->user()->can('update', User::class);\\n }\\n\\n return !auth()->check();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb8dd0b89ad69c80bd32219b331d467a\",\n \"score\": \"0.76649845\",\n \"text\": \"function isAuthorized() {\\r\\n if ($this->isAdminRequest()) {\\r\\n if ($this->Auth->user('is_admin') != true) {\\r\\n return false;\\r\\n }\\r\\n }\\r\\r\\n if (empty($this->params['prefix'])) {\\r\\n return true;\\r\\n }\\r\\r\\n return true;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f40d948a5e4ffe4776811ba667a52cf\",\n \"score\": \"0.7650565\",\n \"text\": \"private function isUserAuthorized(Request $request)\\n {\\n return $request->user->id == $this->auth->id();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac3b3a019df28e1b6b5065c0839a12f8\",\n \"score\": \"0.7642991\",\n \"text\": \"public function authorize()\\n {\\n if (!$this->isRegister())\\n return $this->user()->can('update', $this->route('user'));\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"893fefcaa8f0bbabe2639b6e2fc59c84\",\n \"score\": \"0.76401085\",\n \"text\": \"public function authorize()\\n {\\n if (Auth::check()) {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7c5080318027df1643993babed950ea\",\n \"score\": \"0.7632217\",\n \"text\": \"public function authorize()\\n {\\n if ($this->user()->hasRole('admin')) {\\n return false;\\n }\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c554c521daa52ec235580f10b15f4a8\",\n \"score\": \"0.76313287\",\n \"text\": \"public function authorize()\\n {\\n return app('Authority')->checkAuthority(134) || app('Authority')->checkAuthority(194);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b700c9f91296110fce91a91292b658a\",\n \"score\": \"0.76300305\",\n \"text\": \"public function isAuthorized(): bool\\n {\\n return $this->authorized;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46db0b1864bc02cb5f1e50e7206d17bd\",\n \"score\": \"0.76140994\",\n \"text\": \"public function authorize()\\n {\\n if (Auth::check())\\n {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4060b7cebfc007f78995973323198b2c\",\n \"score\": \"0.76068926\",\n \"text\": \"public function authorize()\\n {\\n return ((\\\\Auth::check() && (\\\\Auth::user()->hasRole(\\\"admin\\\"))) || (\\\\Auth::check() && (\\\\Auth::user()->hasRole(\\\"owner\\\"))));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91f75f102cf6d36a864c523d88b43a90\",\n \"score\": \"0.7603521\",\n \"text\": \"function authorised() {\\n\\n\\t\\tglobal $api_config;\\n\\n\\t\\t$request = OAuthRequest::from_request();\\n\\n\\t\\t$api_config->oauth_parameters = $request->get_parameters();\\n\\n\\t\\tif (\\t!isset($api_config->oauth_parameters['oauth_consumer_key']) ||\\n\\t\\t\\t\\t!isset($api_config->oauth_parameters['oauth_signature']) ||\\n\\t\\t\\t\\t!isset($api_config->oauth_parameters['oauth_timestamp']) ||\\n\\t\\t\\t\\t!isset($api_config->oauth_parameters['oauth_nonce'])\\n\\t\\t) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t$consumer_key = $api_config->oauth_parameters['oauth_consumer_key'];\\n\\t\\t$consumer_secret = lookup_secret($consumer_key);\\n\\t\\t$consumer = new OAuthConsumer($consumer_key, $consumer_secret);\\n\\n\\t\\t$signature_method = new OAuthSignatureMethod_HMAC_SHA1;\\n\\t\\t$signature = $api_config->oauth_parameters['oauth_signature'];\\n\\n\\t\\t$timestamp = $api_config->oauth_parameters['oauth_timestamp'];\\n\\t\\t$request_expired = (abs(time() - $timestamp) > 300);\\n\\n\\t\\treturn !$request_expired && valid_nonce() && $signature_method->check_signature($request, $consumer, null, $signature);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c54020c6c60ab51e81a9670d68b022b\",\n \"score\": \"0.7582351\",\n \"text\": \"public function authorize()\\n {\\n //Check if user is authorized to access this page\\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser', 'hrassistant'])) {\\n return true;\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff794c28a968dce69d0449efe84e5bcc\",\n \"score\": \"0.7572131\",\n \"text\": \"public function authorize()\\n {\\n /*$robot = Robot::find($this->route('robot'));\\n if ($robot) {\\n return $this->user()->can('update', $robot);\\n } else {\\n return true;\\n }*/\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10df13ce9600b5fb3463bbea159e1143\",\n \"score\": \"0.7571812\",\n \"text\": \"public function authorize(): bool\\n {\\n $user = Auth::user();\\n return\\n $user->can(\\\"create\\\", User::class) ||\\n $user->can(\\\"update\\\", $user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fccab535480cb881f9768d3da7420e9\",\n \"score\": \"0.7570924\",\n \"text\": \"public function authorize()\\n {\\n try {\\n $this->user = User::findOrFail(session('2fa:user:id'));\\n } catch (\\\\Exception $ex) {\\n return false;\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0d3d7ca67a2980e7b293d330995059b\",\n \"score\": \"0.75684065\",\n \"text\": \"public function authorize()\\n\\t{\\n\\t\\tif ( $this->alert != null ) {\\n\\t\\t\\treturn Auth::user()->isMyAlert( $this->alert );\\n\\t\\t}\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f5d34d0d7fcc23ad0e79bb7bba1d111\",\n \"score\": \"0.7567948\",\n \"text\": \"public function authorize()\\n {\\n $user = $this->user();\\n $entry = $this->entry;\\n if (strtoupper($this->method()) === 'POST') {\\n return true;\\n } else {\\n return $user->can('update', $entry);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddf07a2b01ff2619fc5c7deaa69edc81\",\n \"score\": \"0.7561511\",\n \"text\": \"public function authorize()\\n {\\n if (Auth::check())\\n {\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"353a39cee7ff65acadebf163114c0a91\",\n \"score\": \"0.7560446\",\n \"text\": \"public function authorize()\\n {\\n return Task::find($this->route()->parameters['id'])->user_id == Auth::id();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a12451b6af79fdf13141f94195a42ad0\",\n \"score\": \"0.7549059\",\n \"text\": \"public function authorize()\\n {\\n $user = User::where('id', Auth::id());\\n\\n return $user->exists() &&\\n $user->first()->verified;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c83d334e99dd9618951155e97f8687f\",\n \"score\": \"0.75449353\",\n \"text\": \"public function authorize()\\n {\\n switch ($this->method()){\\n case 'POST':\\n case 'GET':\\n case 'PUT':\\n case 'PATCH':\\n case 'DELETE':\\n return $this->isAdmin();\\n default:\\n return false;\\n\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f08d4c8687c0a867f9a48d889466aa39\",\n \"score\": \"0.7542998\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->is_dispatcher() && $this->user()->ownsOrder($this->id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9765550fc338490263d3391dd22e987\",\n \"score\": \"0.7533661\",\n \"text\": \"public function authorize()\\n {\\n if(!$this->route('comment')){\\n return true;\\n }\\n\\n $this->comment = Comment::find($this->route('comment'));\\n\\n if(!$this->comment){\\n return false;\\n }\\n\\n return $this->user()->isSuperAdmin() || $this->user()->id === $this->comment->user_id ;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c20f97fc4daa02e4cab5f9c7fba1fcea\",\n \"score\": \"0.75300336\",\n \"text\": \"public function authorize()\\n {\\n return Auth::check() && Auth::user()->user_role == 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee75d6f38863c6db4488059a2d5f573b\",\n \"score\": \"0.75222874\",\n \"text\": \"function isAuthorized() {\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3064bebbce0683cd6210741cc8a3be57\",\n \"score\": \"0.75160164\",\n \"text\": \"public function authorize()\\n {\\n if (env('APP_ENV') == 'testing'):\\n return true;\\n endif;\\n switch ($this->getMethod()):\\n case \\\"POST\\\":\\n case \\\"PUT\\\":\\n return true;\\n break;\\n endswitch;\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdc68b6902017dd60a773f887cf373d5\",\n \"score\": \"0.7512349\",\n \"text\": \"public function authorize()\\n {\\n $ticket = $this->route('ticket');\\n\\n return $ticket->property->landlord->id == $this->user()->landlord->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f3b80daa6a71180d2bf0f924cbc93c4\",\n \"score\": \"0.75095665\",\n \"text\": \"public function authorize()\\n {\\n return auth()->user()->id === $this->route('comment')->user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"747a3cadb25faf5ef11b197c54891130\",\n \"score\": \"0.75075424\",\n \"text\": \"public function authorize()\\n {\\n if ($this->can('view-building')) {\\n return true;\\n }\\n\\n // permit residents to see their building\\n $building = Building::where('id', $this->route('id'))->first();\\n $resident = $this->user()->resident ?? null;\\n\\n\\n return $resident && $resident->relations()->where('building_id', $building->id)->exists();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cf7062eba5e301eed991dbfc61484f2\",\n \"score\": \"0.7502618\",\n \"text\": \"public function authorize()\\n {\\n\\t\\t// only allow updates if the user is logged in\\n\\t\\treturn backpack_auth()->check();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2aceba7cfd4e8124409fc03af5d896d8\",\n \"score\": \"0.75019586\",\n \"text\": \"function isAuthorized() {\\n //if( isset($this->params['prefix']))\\n // return (strcasecmp($this->params['prefix'],$this->Auth->user('role'))===0);\\n if (!$this->isLogin()) return false;\\n return true;\\n \\n //shouldn't get here, better be safe than sorry\\n //return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8c138dfbf0a96d5b19051c395e3e939\",\n \"score\": \"0.7501601\",\n \"text\": \"public function authorize()\\n {\\n //TODO check if the authenticated user actually has the authority to update a given resource.\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61a127d26cc95b5414689c2525a7cf17\",\n \"score\": \"0.74994856\",\n \"text\": \"public function authorize()\\n {\\n if (Auth::check() && Auth::user()->level === 'admin') {\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e60c253b47ba2de673da9b9ed8b83d5b\",\n \"score\": \"0.74960023\",\n \"text\": \"public function authorize()\\n {\\n if(Auth::check())\\n return true;\\n else\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9da0a87a777ed1680f5bdaddb08aaff\",\n \"score\": \"0.74959165\",\n \"text\": \"public function authorize()\\n {\\n $advert = $this->route('advert');\\n\\n return Auth::id() === $advert->user_id || Auth::user()->isAdministrator();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cc11ac92ea784b1757a30c9ec928e22\",\n \"score\": \"0.74956346\",\n \"text\": \"public function authorize()\\n {\\n return Auth::check() && Auth::user()->is_contractor;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9320f8ef578ca5b72252eaed0363faab\",\n \"score\": \"0.74941915\",\n \"text\": \"public function authorize()\\n {\\n return (auth()->check() && auth()->user()->is_admin);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f62804fddb1c64b11f8c844b4d80ca8\",\n \"score\": \"0.74888283\",\n \"text\": \"public function authorize()\\n {\\n if (Auth::user()->roles()->first()->role === 'admin' && Auth::check()) return true;\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b57952e918adf46f4d6781431945241d\",\n \"score\": \"0.74884\",\n \"text\": \"public function authorize()\\n {\\n // in-case csrf has somehow been bypassed, ensure request is from this server\\n return ($this->header('referer') == config('app.url'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7591eba5812efb48cc00fe833e0023cd\",\n \"score\": \"0.7485698\",\n \"text\": \"public function authorize()\\n {\\n return $this->api_token &&\\n \\\\DB::table('user')->where(['api_token' => $this->api_token])->first()==true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94f792385fcb99b051b81a861c1dd2df\",\n \"score\": \"0.7483596\",\n \"text\": \"public function authorize() {\\n if (auth()->check() && Gate::allows('access-admin', auth()->user())) {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94f792385fcb99b051b81a861c1dd2df\",\n \"score\": \"0.7483596\",\n \"text\": \"public function authorize() {\\n if (auth()->check() && Gate::allows('access-admin', auth()->user())) {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6a9e336b24566d18d73e703514851ae\",\n \"score\": \"0.74829066\",\n \"text\": \"public function authorize()\\n\\t{\\n\\t\\tif ( ! \\\\Auth::check() )\\n\\t\\t{\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42853719f6e9216772324775de4e90fb\",\n \"score\": \"0.74825495\",\n \"text\": \"public function authorize(): bool\\n {\\n return (bool) Auth::user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96c9a6c7ec361f4005653c1f39cdb7d9\",\n \"score\": \"0.74794936\",\n \"text\": \"public function authorize ()\\n {\\n return TRUE;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8760c099bc57f5fa8739c65c1c696ac7\",\n \"score\": \"0.7476589\",\n \"text\": \"public function authorize()\\n {\\n // Already authorized by middleware on route.\\n // No policy or gate defined for this resource thus returns true.\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c346768ea98baf86426671339aa4d81\",\n \"score\": \"0.74726367\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->isSuperAdmin();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f70212b6c7687c65179463bab4debd8\",\n \"score\": \"0.74722385\",\n \"text\": \"public function authorize()\\n {\\n //Should add check for user but for now just allow anyone to edit request.\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c953f72310cdb772858a87f750d36293\",\n \"score\": \"0.7468519\",\n \"text\": \"public function authorize()\\n {\\n $this->customer = (new FetchCustomer)\\n ->actingAs($this->user())\\n ->run([\\n 'encoded_id' => $this->customer_id,\\n ]);\\n\\n return $this->runningAs('object') || $this->user()->can('update', $this->customer);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a48586bdce6587a1b8d4007145196dac\",\n \"score\": \"0.7466968\",\n \"text\": \"public function authorize()\\n {\\n //TODO:: return true if user is admin\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fe3797f9541eefa98c79fb818d6fb8e\",\n \"score\": \"0.7464665\",\n \"text\": \"public function authorize()\\n {\\n if ($this->isGet()) {\\n return true;\\n }\\n if ($this->isPost()) {\\n return auth()->user()->can('create', OrderItem::class);\\n }\\n if ($this->isPut()) {\\n return auth()->user()->can('update', $this->route('orderItem'));\\n }\\n if ($this->isDelete()) {\\n return auth()->user()->can('delete', $this->route('orderItem'));\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f12f375cfb24327a150def25274a505e\",\n \"score\": \"0.7455374\",\n \"text\": \"public function authorize()\\n {\\n $reply = $this->route('reply');\\n return $reply && $this->user()->can('updateOrDelete', $reply);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"998aee2b24522e93c8d64676eed7b6d8\",\n \"score\": \"0.7455313\",\n \"text\": \"public function authorize() : bool\\n {\\n return $this->user()->can('viewAny', Contact::class);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":739,"cells":{"query_id":{"kind":"string","value":"06b048169d6000dd8f2954c77b1ec598"},"query":{"kind":"string","value":"Show the form for creating a new resource."},"positive_passages":{"kind":"list like","value":[{"docid":"761f978b91b59f9930eb0a8ed10d3b74","score":"0.0","text":"public function create()\n {\n return view('transaksi.create');\n }","title":""}],"string":"[\n {\n \"docid\": \"761f978b91b59f9930eb0a8ed10d3b74\",\n \"score\": \"0.0\",\n \"text\": \"public function create()\\n {\\n return view('transaksi.create');\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"65c7e51c557119c4523c305976c470bc","score":"0.80575514","text":"public function create()\n {\n return view('Admin.acl.resource.form');\n }","title":""},{"docid":"bb87b5e7b03ebf8127b27e4ff14ee77c","score":"0.7914315","text":"public function create()\n {\n return view('Backend/Resources/addResource');\n }","title":""},{"docid":"ffef4ac93b8831ae51d698379f4d9c1b","score":"0.76836234","text":"public function create()\n\t{\n\t\treturn view('resources.create');\n\t}","title":""},{"docid":"2378dd3b14ed3946fdc33fe245647ae5","score":"0.75997573","text":"public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName().'.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return view('vellum::form', $this->data);\n }","title":""},{"docid":"4410c37acc7f709e86ccc730cb542643","score":"0.75863165","text":"public function create()\n {\n return view('admin.resources.create');\n }","title":""},{"docid":"ee18d6d904526a51f41375d0bd093040","score":"0.75147605","text":"public function create()\n {\n $model = $this->resource;\n $resource = new Resource;\n $providers = User::whereType('provider')->orderby('name')->get();\n $categories = Category::where('parent_id', 0)->get();\n\n return view('backend.resources.create', compact('model', 'resource', 'providers', 'categories'));\n }","title":""},{"docid":"c22dae1333d29c28ed855dcb7f069232","score":"0.7491396","text":"public function create()\n {\n return view('resources.create');\n }","title":""},{"docid":"c22dae1333d29c28ed855dcb7f069232","score":"0.7491396","text":"public function create()\n {\n return view('resources.create');\n }","title":""},{"docid":"c22dae1333d29c28ed855dcb7f069232","score":"0.7491396","text":"public function create()\n {\n return view('resources.create');\n }","title":""},{"docid":"14707811f9cdd58dcd07e882041856bc","score":"0.74805194","text":"public function create()\n\t{\n\t\treturn view('module.forms.create');\n\t}","title":""},{"docid":"eefd3a34279d87bd94753b0beae69b0d","score":"0.7391348","text":"public function create()\n {\n return view('humanresources::create');\n }","title":""},{"docid":"ecbbca86f1ca5794847773f086d5685e","score":"0.7357543","text":"public function create()\n {\n return view('backend.client.formcreate');\n }","title":""},{"docid":"e24406181475135438d05ab2d48d4b36","score":"0.73556155","text":"public function create()\n\t{\n\t\treturn view('form');\n\t}","title":""},{"docid":"10d532d72b585493a6ca515a12bc3a2c","score":"0.7321179","text":"protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/IAS/create');\n\n\t}","title":""},{"docid":"517ede7d413126a1373684f8f17be2b9","score":"0.7247568","text":"public function create()\n {\n return view('clothing.form');\n }","title":""},{"docid":"5016b1af29a2cdfd8f026421109d1142","score":"0.7241239","text":"public function action_new()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id !== null)\n\t\t{\n\t\t\t$this->redirect(Route::url('supplier', array('action' => 'edit', 'id' => $id)));\n\t\t} // if\n\n\t\t$model = ORM::factory('Supplier');\n\n\t\t$this->content = View::factory('supplier/form', array(\n\t\t\t'title' => __('Create new supplier'),\n\t\t\t'supplier' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('supplier', array('action' => 'save'))\n\t\t));\n\t}","title":""},{"docid":"d777482ca48a952bda74d0486cdad76a","score":"0.7237927","text":"public function create()\n {\n return \"Here is the creating form page.\";\n }","title":""},{"docid":"1e688bba9a7b271c2e7c26eb773383da","score":"0.72305965","text":"public function create()\n {\n //\n\n return view(\"student.form\");\n }","title":""},{"docid":"1e47d9942ad3c42b28df121849c0197e","score":"0.7225282","text":"public function newAction()\n {\n $this->view->form = new PersonasForm(\n null,\n [\n 'edit' => true,\n ]\n );\n }","title":""},{"docid":"755e91a474eae625dfda22659e4c1f6c","score":"0.72203404","text":"public function create()\n {\n return view('form.create');\n }","title":""},{"docid":"fabe91e71192c05e656f9056b41ad668","score":"0.72117","text":"public function showCreateForm()\n {\n return view('admin.accounts.create');\n }","title":""},{"docid":"e816b62a64c3324cff6ccbc00e52514b","score":"0.7202654","text":"public function frontCreate()\n {\n $resource = new Resource;\n $countries = Countries::all();\n $cities = City::orderby('name')->get();\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\n\n return view('frontend.resources.create', compact(\n 'resource', 'countries', 'cities', 'categories'\n ));\n }","title":""},{"docid":"a0f86f0603cbb921b500dd4fcb6185e6","score":"0.71805054","text":"public function create()\n {\n $data['action'] = 'absensi.store';\n return view('absensi.form', $data);\n }","title":""},{"docid":"942a0a16c384247567b37ebeddf71971","score":"0.7151351","text":"public function create()\n {\n return view('Backend.student.new');\n }","title":""},{"docid":"dc9ff50878e23f55a66dade7c29e9693","score":"0.71423906","text":"public function create()\n {\n return view('admin.trucks.forms.create');\n }","title":""},{"docid":"b7f809ca4143f6da6ac8746ef0099f3a","score":"0.71369606","text":"public function create()\n {\n return view('backend.students.student-form-add');\n }","title":""},{"docid":"0324ad3d56f56ecb8342812c78064a91","score":"0.71342736","text":"public function newAction()\n {\n $this->initializeScaffolding();\n\n $this->beforeNew();\n $this->view->form = $this->scaffolding->getForm();\n $this->afterNew();\n }","title":""},{"docid":"871ecf60820ab50a5032377d975fc622","score":"0.71342325","text":"public function create()\n {\n return view('admin.ProviderCreateForm');\n }","title":""},{"docid":"97209db276d73dfc71ffc10ef4a4037f","score":"0.71315765","text":"public function create()\n {\n return view('book.form');\n }","title":""},{"docid":"1e082bee3084311021ae31460c5c0e39","score":"0.7127698","text":"public function create()\n {\n return view('forms.books.create');\n }","title":""},{"docid":"fa54f02550ef87c9f8f5a27d06c382de","score":"0.71258074","text":"public function create() {\n return view('resources.edit');\n }","title":""},{"docid":"33732dfef72a6d8b9b06cc792789e6df","score":"0.71213603","text":"public function create()\n\t{\n\t\treturn view('admin.product.form');\n\t}","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"d70c1ea684023a020e3557813873c2ca","score":"0.70956016","text":"public function create()\n {\n $sPageTitle = $this->sName;\n \n $aRepositories = Dataflow::getRepositories();\n \n return view($this->sPath.'/form', compact('sPageTitle', 'aRepositories'));\n }","title":""},{"docid":"a5962b732b317d8491e1cd29bddb79a5","score":"0.7095086","text":"public function create()\n {\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resource = $this->resource;\n $resourceFields = json_encode($resource::fields());\n $relationalFields = json_encode(Otter::getRelationalFields($resource));\n\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['create']) ? $resource::validations()['client']['create'] : null;\n $validationFields = json_encode($validationRules);\n\n return view('otter::pages.create', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\n }","title":""},{"docid":"4b38db6737bb3fb8f108037fd62385fc","score":"0.70905846","text":"public function create()\n {\n return view('enterprise.new');\n }","title":""},{"docid":"a3472bb62fbfd95113a02e6ab298fb16","score":"0.705323","text":"public function create()\n {\n return view('admin.new.create');\n }","title":""},{"docid":"0ed27c8268deedd7d778400898a3117f","score":"0.7051436","text":"public function create()\n\t{\n return View::make('clerks.create');\n\t}","title":""},{"docid":"991f766d6ac0e5a6f0b81f6a7483c64a","score":"0.7049206","text":"public function create()\n {\n //\n $page_title = 'Supplier';\n $page_description = 'Supplier Add Form';\n $form_title = 'Supplier - Add';\n $form_description = 'Enter details to add new supplier , field with * are required.';\n $supplier = new Supplier();\n return view('pages.masterfiles.profiles.supplier.add', compact('page_title', 'page_description','form_title', 'form_description', 'supplier'));\n }","title":""},{"docid":"9954664a9c6b9b3ab69721566e0199bc","score":"0.7044138","text":"public function create()\n {\n $source = $this->source();\n $category = $this->category();\n $subcategory = $this->subcategory();\n $subject = $this->subject();\n $record = $this->record();\n $media = $this->media();\n $language = $this->language();\n $location = $this->location();\n return view('website.form', compact('source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\n }","title":""},{"docid":"47df4583b4b1b0f104234ead33b0b361","score":"0.7041365","text":"public function create() {\n return view(\"ir.create\");\n }","title":""},{"docid":"23ef4c6aae4638b7258db6105822d281","score":"0.70397395","text":"public function create()\n {\n $data['action'] = 'jadwalbelajar.store';\n return view ('jadwalbelajar.form', $data);\n }","title":""},{"docid":"7bbb0d78cadef3c44a577d92d50a3e67","score":"0.70380855","text":"public function create()\n {\n $resources = Resource::all();\n return view('product.create', compact('resources'));\n }","title":""},{"docid":"45f9c7429c98bc848636cf3e3af4a0b7","score":"0.70367175","text":"public function create()\n\t{\n\t\treturn view('admin.show.create');\n\t}","title":""},{"docid":"4d21f7c9cf42b4d85338aca053e91032","score":"0.70324284","text":"public function create()\r\n {\r\n $title = trans('book.new');\r\n $this->generateParam();\r\n return view('layouts.create', compact('title'));\r\n }","title":""},{"docid":"3be30800c76364ece9bf10bfffd9d576","score":"0.7022247","text":"public function create()\n {\n return view('penerbit.form');\n }","title":""},{"docid":"5210b9361957c963c05861d35648076b","score":"0.70178825","text":"public function create()\n {\n $formInputs = $this->form();\n $formInputs['method'] = 'create';\n\n\n return view('students.create', compact('formInputs'));\n }","title":""},{"docid":"804a6ca9dad7489200cc1f28102b0473","score":"0.7002272","text":"public function create()\n {\n return view('admin.restaurents.create');\n }","title":""},{"docid":"e3189bc5490f564078b663c86cd3b554","score":"0.69995284","text":"public function create()\n {\n return view('admin.clubes.form')\n ->with(['action' => route('clubes.store')]);\n }","title":""},{"docid":"27a713091aa62f5f81eb6b7a09310814","score":"0.6997733","text":"public function create()\n {\n return view('project.form');\n }","title":""},{"docid":"76ecd9f94330c8bff719dad38ac5e742","score":"0.69919205","text":"public function create()\n {\n return view('forms.newPoetry');\n }","title":""},{"docid":"75773cfa50c8a890d093cd7b4128f44b","score":"0.6984025","text":"public function create()\n {\n // INI REDIRECT KE HALAMAN FORM INPUT\n return view('admin.create');\n }","title":""},{"docid":"c3119b97c0e321666818c6fe3e6116b4","score":"0.697933","text":"public function create()\n {\n return view($this->viewRoute.'.form');\n }","title":""},{"docid":"7a36d29ededb118e48dc1f2b35700e81","score":"0.697282","text":"public function create()\n {\n //\n return view(\"billproducts.createForm\");\n }","title":""},{"docid":"986fd11f3e8bfa985b902a8006b7d306","score":"0.6968721","text":"public function create()\n\t{\n\t\t$forms \t= $this->form_add();\n\t\t$custom_add = $disable_add = $disable_edit = $disable_delete = false;\n\n\t\tif(isset($this->disable_add))\n\t\t\t$disable_add = $this->disable_add;\n\n\t\tif(isset($this->disable_edit))\n\t\t\t$disable_edit = $this->disable_edit;\n\n\t\tif(isset($this->disable_delete))\n\t\t\t$disable_delete = $this->disable_delete;\n\n\t\tif(isset($this->custom_add))\n\t\t\t$custom_add = $this->custom_add;\n\n\t\treturn View::make('crud.create' , \n\t\t\tarray(\t\n\t\t\t\t'forms' \t\t\t=> $forms,\n\t\t\t\t'title'\t\t\t\t=> $this->title,\n\t\t\t\t'slug'\t\t\t\t=> $this->slug,\n\t\t\t\t'form_span'\t\t\t=> $this->form_span,\n\t\t\t\t'controller'\t\t=> $this->controller,\n\t\t\t\t'disable_edit'\t\t=> $disable_edit,\n\t\t\t\t'disable_delete' \t=> $disable_delete,\n\t\t\t\t'disable_add'\t\t=> $disable_add,\n\t\t\t\t'custom_add'\t\t=> $custom_add\n\t\t\t)\n\t\t);\n\t}","title":""},{"docid":"4e37d311d6990013b0ed72549d9fd35f","score":"0.69635546","text":"public function create()\n {\n return view('product.form');\n }","title":""},{"docid":"9cb057d0f77e53e0cce5708d50a6481b","score":"0.6962359","text":"public function create()\n {\n return view('new');\n }","title":""},{"docid":"8ced93e50c35698f25fcb388d463e032","score":"0.6958418","text":"public function create()\n {\n return view(\"pages.daftar.form\");\n }","title":""},{"docid":"6e09ea0495ecf33b6615199f96a87dd9","score":"0.6958075","text":"public function create()\n {\n return view('inventaris.create');\n }","title":""},{"docid":"5225b1fd92184a478b2b9762321d1c23","score":"0.69497955","text":"public function create()\n {\n return view('hiperbolica.create');\n }","title":""},{"docid":"593fbba523a02dd32ffe7ecf4fd50435","score":"0.6946303","text":"public function create()\n {\n return view('admin.site.form');\n }","title":""},{"docid":"5700bb5603b363af554c788e226eff17","score":"0.6945535","text":"public function newAction()\n {\n $entity = new Reconocimiento();\n $form = $this->createForm(new ReconocimientoType(), $entity);\n\n return $this->render('SystemAdministracionBundle:Reconocimiento:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"12fd2eae40d48367c7e6d8331f5ead34","score":"0.69429785","text":"public function create()\n\t{\n\t\t//\n return View::make('objects.addnew');\n\t}","title":""},{"docid":"c7310471f43f53eaf4b8eff6831b36d3","score":"0.6939984","text":"public function create()\n {\n return view('linhas.create');\n }","title":""},{"docid":"ad623548153e56c22245e48fee70a80f","score":"0.69390464","text":"public function create()\n {\n $data['url'] = route($this->route . '.store');\n $data['title'] = __('Add').' '. __($this->label);\n $data['resourcePath'] = $this->view;\n $data['route'] = $this->route;\n\n return view('admin.general.create')->with($data);\n }","title":""},{"docid":"6339cf25fff656067a9eaf3d5b7efb2a","score":"0.6938875","text":"public function create()\n {\n return view('admin.banner.banner-form')->with('title','add');\n }","title":""},{"docid":"517e8eef100389973418652d54a823b1","score":"0.69366604","text":"public function create()\n {\n //no create view as ther create form is on the index page\n }","title":""},{"docid":"9dc7ce932c1b23a833528346de52d671","score":"0.69311243","text":"public function create()\n {\n return view('admin.electrician.add');\n }","title":""},{"docid":"a44e07047efd0e153e9c966db5bdabd0","score":"0.69306445","text":"public function create()\n {\n return view('dashboard.student.studentForm');\n }","title":""},{"docid":"0b0f0931a087bfbc6677280f914ebfda","score":"0.69298023","text":"public function create()\n {\n return view('hocsinh.add');\n }","title":""},{"docid":"8c2948fcee8393ed6a20bf84afb9cc88","score":"0.6928795","text":"public function create()\n {\n return view('manage.add');\n }","title":""},{"docid":"1ba5eb9946214bea84f1480b6feabe1f","score":"0.69276893","text":"public function create()\n {\n return view('bspyl-form');\n }","title":""},{"docid":"07e409b45065624d003704ab3b447aec","score":"0.69273114","text":"public function create()\n {\n return view('admin.product.form');\n }","title":""},{"docid":"5ed8a37a585288e035b28ed478757c41","score":"0.6921601","text":"public function create()\n {\n return view('elonlars.create');\n }","title":""},{"docid":"c4416390a701ec4941a20dc3ab095a2a","score":"0.6919174","text":"public function create()\n\t{\n\t\treturn view('create');\n\t}","title":""},{"docid":"c4416390a701ec4941a20dc3ab095a2a","score":"0.6919174","text":"public function create()\n\t{\n\t\treturn view('create');\n\t}","title":""},{"docid":"9a0129f9c2c01a078afcdd438cc75b1f","score":"0.69172627","text":"public function create()\n {\n return view('vestiti.form');\n }","title":""},{"docid":"92274cb7faf3de5d13f627815b8f4ba2","score":"0.69144803","text":"public function create()\n {\n\n //\n\n return view('addinformation');\n\n }","title":""},{"docid":"8a7c33d5844900cbaaaebde7aa21e4dd","score":"0.6911652","text":"public function formCreateAction() {\n $this->view->form = new PartnersForm();\n }","title":""},{"docid":"b43d8bd2e5fa832f2b86d77c64e5ad10","score":"0.69116175","text":"public function create()\n {\n $supplier = new Supplier;\n return view('supplierForm')->with('supplier',$supplier);\n }","title":""},{"docid":"d6d7c0a46ec7af65d934ca4831a12435","score":"0.6911027","text":"public function create()\n {\n $this->authorize(__FUNCTION__);\n\n $specie = new Specie;\n\n return view('species.form')->with(['specie' => $specie]);\n }","title":""},{"docid":"d0a17dffa7cd331b95da26311bfaf458","score":"0.69106084","text":"public function create()\n {\n return view('backend.actions.create');\n }","title":""},{"docid":"bf90fc181239c9ee309df9b686f918de","score":"0.69096845","text":"public function create()\n {\n return view('kontraktor::create');\n }","title":""},{"docid":"a8868117c6271a1bf9acf9032ad876bd","score":"0.6908564","text":"public function create()\n {\n return view('admin.new');\n }","title":""},{"docid":"2b077d4213a9e74657f7368e00d5d96e","score":"0.69072443","text":"public function create()\n\t{\n\t\t$person = new Person;\n \n return view('admin.people.form', ['person' => $person]); \n\t}","title":""},{"docid":"8cfed7c03b1c2f9d9fc6996ae61ff1e3","score":"0.6906446","text":"public function create()\n {\n return view('admin.users.forms.create');\n }","title":""},{"docid":"12c04608837ced3906ffa6fd0839aefc","score":"0.6904492","text":"public function create()\n {\n // return view('formname.create');\n }","title":""},{"docid":"6fe9753acadb65e60f24f2784b8c57e8","score":"0.6903352","text":"public function create()\n {\n return view('showCreate');\n }","title":""},{"docid":"be0ad6355f1cd2d306c6632b0178efe9","score":"0.69000477","text":"public function create()\n {\n return view('comuni.add');\n }","title":""},{"docid":"1b96ed3b5237de2d9b8b93a0082346de","score":"0.6898089","text":"public function create()\n\t{\n $theme = $this->theme;\n $theme->set('title','New Employee');\n\n return $theme->layout('form')->scope('employees.create')->render();\n\t}","title":""},{"docid":"c05139fcffc8ed34edf664b1dcababe1","score":"0.6897515","text":"public function actionCreate()\n {\n $this->layout = 'principal2';\n $model = new Registros();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }","title":""},{"docid":"8f937ad7c5f9325dd1c12c02346f01a1","score":"0.6897389","text":"public function create()\n {\n return view('Job.form');\n }","title":""},{"docid":"c6e630a8785e77f2934d7509a0426ed1","score":"0.68941396","text":"public function newAction()\n {\n $entity = new Formations();\n $form = $this->createCreateForm($entity);\n\n\n return $this->render('FormBundle:Formations:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"f8dbbd8eb79b47b7dd8cbe07d9f8aa6c","score":"0.68926984","text":"public function create()\n {\n \n return view('falta.create'\n );\n }","title":""},{"docid":"9d3fa77955670de89373a055d00ff3f2","score":"0.68926096","text":"public function create()\n {\n return view('terapis.create');\n }","title":""},{"docid":"3ff70187ad516bfc1251de194f42b7f8","score":"0.6892582","text":"public function create()\n {\n //\n $title = 'Add Partner';\n return view('partnercompany.create_edit')->with(compact('title'));\n }","title":""},{"docid":"ee157e1835fe293cefd0eceeafc16825","score":"0.68916535","text":"public function create()\n {\n return view('question.new');\n }","title":""},{"docid":"eaeda1b26ca65d0dd32dbeb43e442328","score":"0.6891185","text":"public function create()\n\t{\n\t\treturn View::make('Client.newClient')->with(array('title' => 'Add Client'));\n\t}","title":""}],"string":"[\n {\n \"docid\": \"65c7e51c557119c4523c305976c470bc\",\n \"score\": \"0.80575514\",\n \"text\": \"public function create()\\n {\\n return view('Admin.acl.resource.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb87b5e7b03ebf8127b27e4ff14ee77c\",\n \"score\": \"0.7914315\",\n \"text\": \"public function create()\\n {\\n return view('Backend/Resources/addResource');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ffef4ac93b8831ae51d698379f4d9c1b\",\n \"score\": \"0.76836234\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('resources.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2378dd3b14ed3946fdc33fe245647ae5\",\n \"score\": \"0.75997573\",\n \"text\": \"public function create()\\n {\\n $this->authorize('create', $this->resource->getModel());\\n\\n $this->data['data'] = [];\\n $this->data['routeUrl'] = route($this->module->getName().'.store');\\n $this->data['attributes'] = $this->resource->getAttributes();\\n\\n // $this->data['data'] = factory(\\\\Quill\\\\Post\\\\Models\\\\Post::class)->make();\\n // $this->data['data']['id'] = null;\\n // $this->data['data']['published_at'] = \\\\Carbon\\\\Carbon::now()->toDateTimeString();\\n\\n return view('vellum::form', $this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4410c37acc7f709e86ccc730cb542643\",\n \"score\": \"0.75863165\",\n \"text\": \"public function create()\\n {\\n return view('admin.resources.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee18d6d904526a51f41375d0bd093040\",\n \"score\": \"0.75147605\",\n \"text\": \"public function create()\\n {\\n $model = $this->resource;\\n $resource = new Resource;\\n $providers = User::whereType('provider')->orderby('name')->get();\\n $categories = Category::where('parent_id', 0)->get();\\n\\n return view('backend.resources.create', compact('model', 'resource', 'providers', 'categories'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c22dae1333d29c28ed855dcb7f069232\",\n \"score\": \"0.7491396\",\n \"text\": \"public function create()\\n {\\n return view('resources.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c22dae1333d29c28ed855dcb7f069232\",\n \"score\": \"0.7491396\",\n \"text\": \"public function create()\\n {\\n return view('resources.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c22dae1333d29c28ed855dcb7f069232\",\n \"score\": \"0.7491396\",\n \"text\": \"public function create()\\n {\\n return view('resources.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14707811f9cdd58dcd07e882041856bc\",\n \"score\": \"0.74805194\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('module.forms.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eefd3a34279d87bd94753b0beae69b0d\",\n \"score\": \"0.7391348\",\n \"text\": \"public function create()\\n {\\n return view('humanresources::create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ecbbca86f1ca5794847773f086d5685e\",\n \"score\": \"0.7357543\",\n \"text\": \"public function create()\\n {\\n return view('backend.client.formcreate');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e24406181475135438d05ab2d48d4b36\",\n \"score\": \"0.73556155\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('form');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10d532d72b585493a6ca515a12bc3a2c\",\n \"score\": \"0.7321179\",\n \"text\": \"protected function showCreateForm()\\n\\t{\\n\\n\\t\\treturn Response::view('adm/IAS/create');\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"517ede7d413126a1373684f8f17be2b9\",\n \"score\": \"0.7247568\",\n \"text\": \"public function create()\\n {\\n return view('clothing.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5016b1af29a2cdfd8f026421109d1142\",\n \"score\": \"0.7241239\",\n \"text\": \"public function action_new()\\n\\t{\\n\\t\\t$id = $this->request->param('id');\\n\\n\\t\\tif ($id !== null)\\n\\t\\t{\\n\\t\\t\\t$this->redirect(Route::url('supplier', array('action' => 'edit', 'id' => $id)));\\n\\t\\t} // if\\n\\n\\t\\t$model = ORM::factory('Supplier');\\n\\n\\t\\t$this->content = View::factory('supplier/form', array(\\n\\t\\t\\t'title' => __('Create new supplier'),\\n\\t\\t\\t'supplier' => $model,\\n\\t\\t\\t'properties' => $model->get_properties(),\\n\\t\\t\\t'ajax_url' => Route::url('supplier', array('action' => 'save'))\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d777482ca48a952bda74d0486cdad76a\",\n \"score\": \"0.7237927\",\n \"text\": \"public function create()\\n {\\n return \\\"Here is the creating form page.\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e688bba9a7b271c2e7c26eb773383da\",\n \"score\": \"0.72305965\",\n \"text\": \"public function create()\\n {\\n //\\n\\n return view(\\\"student.form\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e47d9942ad3c42b28df121849c0197e\",\n \"score\": \"0.7225282\",\n \"text\": \"public function newAction()\\n {\\n $this->view->form = new PersonasForm(\\n null,\\n [\\n 'edit' => true,\\n ]\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"755e91a474eae625dfda22659e4c1f6c\",\n \"score\": \"0.72203404\",\n \"text\": \"public function create()\\n {\\n return view('form.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fabe91e71192c05e656f9056b41ad668\",\n \"score\": \"0.72117\",\n \"text\": \"public function showCreateForm()\\n {\\n return view('admin.accounts.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e816b62a64c3324cff6ccbc00e52514b\",\n \"score\": \"0.7202654\",\n \"text\": \"public function frontCreate()\\n {\\n $resource = new Resource;\\n $countries = Countries::all();\\n $cities = City::orderby('name')->get();\\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\\n\\n return view('frontend.resources.create', compact(\\n 'resource', 'countries', 'cities', 'categories'\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0f86f0603cbb921b500dd4fcb6185e6\",\n \"score\": \"0.71805054\",\n \"text\": \"public function create()\\n {\\n $data['action'] = 'absensi.store';\\n return view('absensi.form', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"942a0a16c384247567b37ebeddf71971\",\n \"score\": \"0.7151351\",\n \"text\": \"public function create()\\n {\\n return view('Backend.student.new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc9ff50878e23f55a66dade7c29e9693\",\n \"score\": \"0.71423906\",\n \"text\": \"public function create()\\n {\\n return view('admin.trucks.forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7f809ca4143f6da6ac8746ef0099f3a\",\n \"score\": \"0.71369606\",\n \"text\": \"public function create()\\n {\\n return view('backend.students.student-form-add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0324ad3d56f56ecb8342812c78064a91\",\n \"score\": \"0.71342736\",\n \"text\": \"public function newAction()\\n {\\n $this->initializeScaffolding();\\n\\n $this->beforeNew();\\n $this->view->form = $this->scaffolding->getForm();\\n $this->afterNew();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"871ecf60820ab50a5032377d975fc622\",\n \"score\": \"0.71342325\",\n \"text\": \"public function create()\\n {\\n return view('admin.ProviderCreateForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97209db276d73dfc71ffc10ef4a4037f\",\n \"score\": \"0.71315765\",\n \"text\": \"public function create()\\n {\\n return view('book.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e082bee3084311021ae31460c5c0e39\",\n \"score\": \"0.7127698\",\n \"text\": \"public function create()\\n {\\n return view('forms.books.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa54f02550ef87c9f8f5a27d06c382de\",\n \"score\": \"0.71258074\",\n \"text\": \"public function create() {\\n return view('resources.edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33732dfef72a6d8b9b06cc792789e6df\",\n \"score\": \"0.71213603\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('admin.product.form');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d70c1ea684023a020e3557813873c2ca\",\n \"score\": \"0.70956016\",\n \"text\": \"public function create()\\n {\\n $sPageTitle = $this->sName;\\n \\n $aRepositories = Dataflow::getRepositories();\\n \\n return view($this->sPath.'/form', compact('sPageTitle', 'aRepositories'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5962b732b317d8491e1cd29bddb79a5\",\n \"score\": \"0.7095086\",\n \"text\": \"public function create()\\n {\\n //Retrieve all the otter resource names that are available\\n $allResourceNames = $this->allResourceNames;\\n $prettyResourceName = $this->prettyResourceName;\\n $resourceName = $this->resourceName;\\n $resource = $this->resource;\\n $resourceFields = json_encode($resource::fields());\\n $relationalFields = json_encode(Otter::getRelationalFields($resource));\\n\\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['create']) ? $resource::validations()['client']['create'] : null;\\n $validationFields = json_encode($validationRules);\\n\\n return view('otter::pages.create', compact('allResourceNames', 'prettyResourceName', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b38db6737bb3fb8f108037fd62385fc\",\n \"score\": \"0.70905846\",\n \"text\": \"public function create()\\n {\\n return view('enterprise.new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3472bb62fbfd95113a02e6ab298fb16\",\n \"score\": \"0.705323\",\n \"text\": \"public function create()\\n {\\n return view('admin.new.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ed27c8268deedd7d778400898a3117f\",\n \"score\": \"0.7051436\",\n \"text\": \"public function create()\\n\\t{\\n return View::make('clerks.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"991f766d6ac0e5a6f0b81f6a7483c64a\",\n \"score\": \"0.7049206\",\n \"text\": \"public function create()\\n {\\n //\\n $page_title = 'Supplier';\\n $page_description = 'Supplier Add Form';\\n $form_title = 'Supplier - Add';\\n $form_description = 'Enter details to add new supplier , field with * are required.';\\n $supplier = new Supplier();\\n return view('pages.masterfiles.profiles.supplier.add', compact('page_title', 'page_description','form_title', 'form_description', 'supplier'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9954664a9c6b9b3ab69721566e0199bc\",\n \"score\": \"0.7044138\",\n \"text\": \"public function create()\\n {\\n $source = $this->source();\\n $category = $this->category();\\n $subcategory = $this->subcategory();\\n $subject = $this->subject();\\n $record = $this->record();\\n $media = $this->media();\\n $language = $this->language();\\n $location = $this->location();\\n return view('website.form', compact('source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47df4583b4b1b0f104234ead33b0b361\",\n \"score\": \"0.7041365\",\n \"text\": \"public function create() {\\n return view(\\\"ir.create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23ef4c6aae4638b7258db6105822d281\",\n \"score\": \"0.70397395\",\n \"text\": \"public function create()\\n {\\n $data['action'] = 'jadwalbelajar.store';\\n return view ('jadwalbelajar.form', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7bbb0d78cadef3c44a577d92d50a3e67\",\n \"score\": \"0.70380855\",\n \"text\": \"public function create()\\n {\\n $resources = Resource::all();\\n return view('product.create', compact('resources'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45f9c7429c98bc848636cf3e3af4a0b7\",\n \"score\": \"0.70367175\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('admin.show.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d21f7c9cf42b4d85338aca053e91032\",\n \"score\": \"0.70324284\",\n \"text\": \"public function create()\\r\\n {\\r\\n $title = trans('book.new');\\r\\n $this->generateParam();\\r\\n return view('layouts.create', compact('title'));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3be30800c76364ece9bf10bfffd9d576\",\n \"score\": \"0.7022247\",\n \"text\": \"public function create()\\n {\\n return view('penerbit.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5210b9361957c963c05861d35648076b\",\n \"score\": \"0.70178825\",\n \"text\": \"public function create()\\n {\\n $formInputs = $this->form();\\n $formInputs['method'] = 'create';\\n\\n\\n return view('students.create', compact('formInputs'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"804a6ca9dad7489200cc1f28102b0473\",\n \"score\": \"0.7002272\",\n \"text\": \"public function create()\\n {\\n return view('admin.restaurents.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3189bc5490f564078b663c86cd3b554\",\n \"score\": \"0.69995284\",\n \"text\": \"public function create()\\n {\\n return view('admin.clubes.form')\\n ->with(['action' => route('clubes.store')]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27a713091aa62f5f81eb6b7a09310814\",\n \"score\": \"0.6997733\",\n \"text\": \"public function create()\\n {\\n return view('project.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76ecd9f94330c8bff719dad38ac5e742\",\n \"score\": \"0.69919205\",\n \"text\": \"public function create()\\n {\\n return view('forms.newPoetry');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75773cfa50c8a890d093cd7b4128f44b\",\n \"score\": \"0.6984025\",\n \"text\": \"public function create()\\n {\\n // INI REDIRECT KE HALAMAN FORM INPUT\\n return view('admin.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3119b97c0e321666818c6fe3e6116b4\",\n \"score\": \"0.697933\",\n \"text\": \"public function create()\\n {\\n return view($this->viewRoute.'.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a36d29ededb118e48dc1f2b35700e81\",\n \"score\": \"0.697282\",\n \"text\": \"public function create()\\n {\\n //\\n return view(\\\"billproducts.createForm\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"986fd11f3e8bfa985b902a8006b7d306\",\n \"score\": \"0.6968721\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\t$forms \\t= $this->form_add();\\n\\t\\t$custom_add = $disable_add = $disable_edit = $disable_delete = false;\\n\\n\\t\\tif(isset($this->disable_add))\\n\\t\\t\\t$disable_add = $this->disable_add;\\n\\n\\t\\tif(isset($this->disable_edit))\\n\\t\\t\\t$disable_edit = $this->disable_edit;\\n\\n\\t\\tif(isset($this->disable_delete))\\n\\t\\t\\t$disable_delete = $this->disable_delete;\\n\\n\\t\\tif(isset($this->custom_add))\\n\\t\\t\\t$custom_add = $this->custom_add;\\n\\n\\t\\treturn View::make('crud.create' , \\n\\t\\t\\tarray(\\t\\n\\t\\t\\t\\t'forms' \\t\\t\\t=> $forms,\\n\\t\\t\\t\\t'title'\\t\\t\\t\\t=> $this->title,\\n\\t\\t\\t\\t'slug'\\t\\t\\t\\t=> $this->slug,\\n\\t\\t\\t\\t'form_span'\\t\\t\\t=> $this->form_span,\\n\\t\\t\\t\\t'controller'\\t\\t=> $this->controller,\\n\\t\\t\\t\\t'disable_edit'\\t\\t=> $disable_edit,\\n\\t\\t\\t\\t'disable_delete' \\t=> $disable_delete,\\n\\t\\t\\t\\t'disable_add'\\t\\t=> $disable_add,\\n\\t\\t\\t\\t'custom_add'\\t\\t=> $custom_add\\n\\t\\t\\t)\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e37d311d6990013b0ed72549d9fd35f\",\n \"score\": \"0.69635546\",\n \"text\": \"public function create()\\n {\\n return view('product.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cb057d0f77e53e0cce5708d50a6481b\",\n \"score\": \"0.6962359\",\n \"text\": \"public function create()\\n {\\n return view('new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ced93e50c35698f25fcb388d463e032\",\n \"score\": \"0.6958418\",\n \"text\": \"public function create()\\n {\\n return view(\\\"pages.daftar.form\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e09ea0495ecf33b6615199f96a87dd9\",\n \"score\": \"0.6958075\",\n \"text\": \"public function create()\\n {\\n return view('inventaris.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5225b1fd92184a478b2b9762321d1c23\",\n \"score\": \"0.69497955\",\n \"text\": \"public function create()\\n {\\n return view('hiperbolica.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"593fbba523a02dd32ffe7ecf4fd50435\",\n \"score\": \"0.6946303\",\n \"text\": \"public function create()\\n {\\n return view('admin.site.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5700bb5603b363af554c788e226eff17\",\n \"score\": \"0.6945535\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Reconocimiento();\\n $form = $this->createForm(new ReconocimientoType(), $entity);\\n\\n return $this->render('SystemAdministracionBundle:Reconocimiento:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12fd2eae40d48367c7e6d8331f5ead34\",\n \"score\": \"0.69429785\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\t//\\n return View::make('objects.addnew');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7310471f43f53eaf4b8eff6831b36d3\",\n \"score\": \"0.6939984\",\n \"text\": \"public function create()\\n {\\n return view('linhas.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad623548153e56c22245e48fee70a80f\",\n \"score\": \"0.69390464\",\n \"text\": \"public function create()\\n {\\n $data['url'] = route($this->route . '.store');\\n $data['title'] = __('Add').' '. __($this->label);\\n $data['resourcePath'] = $this->view;\\n $data['route'] = $this->route;\\n\\n return view('admin.general.create')->with($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6339cf25fff656067a9eaf3d5b7efb2a\",\n \"score\": \"0.6938875\",\n \"text\": \"public function create()\\n {\\n return view('admin.banner.banner-form')->with('title','add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"517e8eef100389973418652d54a823b1\",\n \"score\": \"0.69366604\",\n \"text\": \"public function create()\\n {\\n //no create view as ther create form is on the index page\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9dc7ce932c1b23a833528346de52d671\",\n \"score\": \"0.69311243\",\n \"text\": \"public function create()\\n {\\n return view('admin.electrician.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a44e07047efd0e153e9c966db5bdabd0\",\n \"score\": \"0.69306445\",\n \"text\": \"public function create()\\n {\\n return view('dashboard.student.studentForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b0f0931a087bfbc6677280f914ebfda\",\n \"score\": \"0.69298023\",\n \"text\": \"public function create()\\n {\\n return view('hocsinh.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c2948fcee8393ed6a20bf84afb9cc88\",\n \"score\": \"0.6928795\",\n \"text\": \"public function create()\\n {\\n return view('manage.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ba5eb9946214bea84f1480b6feabe1f\",\n \"score\": \"0.69276893\",\n \"text\": \"public function create()\\n {\\n return view('bspyl-form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07e409b45065624d003704ab3b447aec\",\n \"score\": \"0.69273114\",\n \"text\": \"public function create()\\n {\\n return view('admin.product.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ed8a37a585288e035b28ed478757c41\",\n \"score\": \"0.6921601\",\n \"text\": \"public function create()\\n {\\n return view('elonlars.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4416390a701ec4941a20dc3ab095a2a\",\n \"score\": \"0.6919174\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4416390a701ec4941a20dc3ab095a2a\",\n \"score\": \"0.6919174\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a0129f9c2c01a078afcdd438cc75b1f\",\n \"score\": \"0.69172627\",\n \"text\": \"public function create()\\n {\\n return view('vestiti.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92274cb7faf3de5d13f627815b8f4ba2\",\n \"score\": \"0.69144803\",\n \"text\": \"public function create()\\n {\\n\\n //\\n\\n return view('addinformation');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a7c33d5844900cbaaaebde7aa21e4dd\",\n \"score\": \"0.6911652\",\n \"text\": \"public function formCreateAction() {\\n $this->view->form = new PartnersForm();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b43d8bd2e5fa832f2b86d77c64e5ad10\",\n \"score\": \"0.69116175\",\n \"text\": \"public function create()\\n {\\n $supplier = new Supplier;\\n return view('supplierForm')->with('supplier',$supplier);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6d7c0a46ec7af65d934ca4831a12435\",\n \"score\": \"0.6911027\",\n \"text\": \"public function create()\\n {\\n $this->authorize(__FUNCTION__);\\n\\n $specie = new Specie;\\n\\n return view('species.form')->with(['specie' => $specie]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0a17dffa7cd331b95da26311bfaf458\",\n \"score\": \"0.69106084\",\n \"text\": \"public function create()\\n {\\n return view('backend.actions.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf90fc181239c9ee309df9b686f918de\",\n \"score\": \"0.69096845\",\n \"text\": \"public function create()\\n {\\n return view('kontraktor::create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a8868117c6271a1bf9acf9032ad876bd\",\n \"score\": \"0.6908564\",\n \"text\": \"public function create()\\n {\\n return view('admin.new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b077d4213a9e74657f7368e00d5d96e\",\n \"score\": \"0.69072443\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\t$person = new Person;\\n \\n return view('admin.people.form', ['person' => $person]); \\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8cfed7c03b1c2f9d9fc6996ae61ff1e3\",\n \"score\": \"0.6906446\",\n \"text\": \"public function create()\\n {\\n return view('admin.users.forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12c04608837ced3906ffa6fd0839aefc\",\n \"score\": \"0.6904492\",\n \"text\": \"public function create()\\n {\\n // return view('formname.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6fe9753acadb65e60f24f2784b8c57e8\",\n \"score\": \"0.6903352\",\n \"text\": \"public function create()\\n {\\n return view('showCreate');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be0ad6355f1cd2d306c6632b0178efe9\",\n \"score\": \"0.69000477\",\n \"text\": \"public function create()\\n {\\n return view('comuni.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b96ed3b5237de2d9b8b93a0082346de\",\n \"score\": \"0.6898089\",\n \"text\": \"public function create()\\n\\t{\\n $theme = $this->theme;\\n $theme->set('title','New Employee');\\n\\n return $theme->layout('form')->scope('employees.create')->render();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c05139fcffc8ed34edf664b1dcababe1\",\n \"score\": \"0.6897515\",\n \"text\": \"public function actionCreate()\\n {\\n $this->layout = 'principal2';\\n $model = new Registros();\\n\\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\\n return $this->redirect(['view', 'id' => $model->id]);\\n } else {\\n return $this->render('create', [\\n 'model' => $model,\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f937ad7c5f9325dd1c12c02346f01a1\",\n \"score\": \"0.6897389\",\n \"text\": \"public function create()\\n {\\n return view('Job.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6e630a8785e77f2934d7509a0426ed1\",\n \"score\": \"0.68941396\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Formations();\\n $form = $this->createCreateForm($entity);\\n\\n\\n return $this->render('FormBundle:Formations:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8dbbd8eb79b47b7dd8cbe07d9f8aa6c\",\n \"score\": \"0.68926984\",\n \"text\": \"public function create()\\n {\\n \\n return view('falta.create'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d3fa77955670de89373a055d00ff3f2\",\n \"score\": \"0.68926096\",\n \"text\": \"public function create()\\n {\\n return view('terapis.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ff70187ad516bfc1251de194f42b7f8\",\n \"score\": \"0.6892582\",\n \"text\": \"public function create()\\n {\\n //\\n $title = 'Add Partner';\\n return view('partnercompany.create_edit')->with(compact('title'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee157e1835fe293cefd0eceeafc16825\",\n \"score\": \"0.68916535\",\n \"text\": \"public function create()\\n {\\n return view('question.new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaeda1b26ca65d0dd32dbeb43e442328\",\n \"score\": \"0.6891185\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('Client.newClient')->with(array('title' => 'Add Client'));\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":740,"cells":{"query_id":{"kind":"string","value":"eb3eb36e1da8034018ebbfcdd576e526"},"query":{"kind":"string","value":"/////////////////////////////////////////////// Tests concerning access to the image upload. ///////////////////////////////////////////////"},"positive_passages":{"kind":"list like","value":[{"docid":"f3d8641ffe33303704a5a19958a5b487","score":"0.0","text":"public function checkAccessForImageUploadThrowsExceptionWithPleaseLoginMessageForAnInvalidUidAndNoUserLoggedIn() {\n\t\t$this->setExpectedException(\n\t\t\t'tx_oelib_Exception_AccessDenied', 'message_please_login'\n\t\t);\n\n\t\t$this->fixture->checkAccess('image_upload', array(\n\t\t\t'showUid' => $this->testingFramework->createRecord(\n\t\t\t\tREALTY_TABLE_OBJECTS, array('deleted' => 1)\n\t\t\t)\n\t\t));\n\t}","title":""}],"string":"[\n {\n \"docid\": \"f3d8641ffe33303704a5a19958a5b487\",\n \"score\": \"0.0\",\n \"text\": \"public function checkAccessForImageUploadThrowsExceptionWithPleaseLoginMessageForAnInvalidUidAndNoUserLoggedIn() {\\n\\t\\t$this->setExpectedException(\\n\\t\\t\\t'tx_oelib_Exception_AccessDenied', 'message_please_login'\\n\\t\\t);\\n\\n\\t\\t$this->fixture->checkAccess('image_upload', array(\\n\\t\\t\\t'showUid' => $this->testingFramework->createRecord(\\n\\t\\t\\t\\tREALTY_TABLE_OBJECTS, array('deleted' => 1)\\n\\t\\t\\t)\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"b107068a5dd680fe755279d81665c1d8","score":"0.8225248","text":"public function testUploadOptionSetImage()\n {\n }","title":""},{"docid":"cc640f407a5424ab2393e457988a5110","score":"0.8173278","text":"public function testUploadImage()\n {\n// Storage::fake('local');\n $user = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->withSession(['banned' => false])\n ->get('/');\n\n $images = Image::factory(Image::class)->create();\n $imagePath = $images->image;\n $this->post('/image', [\n 'image[]' => $images\n ]);\n if (file_exists($imagePath)) {\n $response = 0;\n } else $response = 1;\n // $imageDb= Image::where(config('constants.image.id'), 30)->get()->toArray();\n Storage::assertExists($imagePath);\n\n $response->assertOk();\n\n\n }","title":""},{"docid":"08cfd2a0202857fd355281fdc1abc8ea","score":"0.7680398","text":"public function testSingleImageUpload() {\n\t\t$folder_location \t\t\t\t= isset($this->request->data['folder_location']) ? $this->request->data['folder_location'] : \"\";\n\t\t$attachment \t\t\t\t\t= isset($this->request->data['attachment']) ? $this->request->data['attachment'] : \"\";\n\t\t$image_data = isset($this->request->data['image_data']) ? $this->request->data['image_data'] : '';\n\n\n\t\t$arr = base64_decode($image_data);\n\t\t$fname = \"/var/www/AIMS/shoutoutcity/\".$attachment['name'];\n\t\t$handle = fopen($fname, \"w+\");\n\t\tfwrite($handle, $arr);\n\t\tfclose($handle);\n\t\tif(!file_exists($fname))\n\n\t\t$responce['status'] = 'error';\n\t\t$responce['message'] = 'Error occured while uploading images';\n\t\t$this->set(array(\n 'venues' \t\t=> $responce,\n '_serialize' \t=> array('venues'),\n ));\n unset($venues);\n\t\texit();\n\t}","title":""},{"docid":"8cc05f50bdbf81622ed966dc2b3aab8e","score":"0.7533741","text":"public function test_upload_photo()\n {\n $response = $this->actingAs($this->user)\n ->json('POST', route('image.upload'), [\n 'image' => UploadedFile::fake()->image('avatar.jpg'),\n 'visibility' => 1,\n 'category' => 'Men'\n ]);\n\n $response->assertStatus(200);\n }","title":""},{"docid":"0b5c4436ab0f2be0edbdf7aabcf92bd0","score":"0.74113375","text":"public function testRetrieveImage1()\n {\n }","title":""},{"docid":"858a925d3697906d4432698ad39d51da","score":"0.7382886","text":"public function testFileUpload()\n {\n Storage::fake('TestFile');\n\n $response = $this->json('POST', '/TestFile', [\n 'TestFile' => UploadedFile::fake()->image('TestFile.jpg')\n ]);\n\n // File is saved\n Storage::disk('TestFile')->assertExists('TestFile.jpg');\n\n // File is not saved\n Storage::disk('TestFile')->assertMissing('TestFile.jpg');\n }","title":""},{"docid":"78d318d4381784c811625ab943fa39ac","score":"0.728763","text":"public function testUploading()\n {\n \t$client = static::createClient();\n\n $client->request('GET', '/');\n\n //create dummy file\n $file = tempnam(sys_get_temp_dir(), 'upl'); // create file\n imagepng(imagecreatetruecolor(10, 10), $file);\n\t\t$photo = new UploadedFile(\n $file,\n\t\t 'someFile.jpg',\n\t\t 'image/jpeg',\n\t\t 123\n\t\t);\n\n\t\t$client->request('POST', '/_uploader/gallery/upload', array('file' => $photo), array(), array(\n \t\t'HTTP_X-Requested-With' => 'XMLHttpRequest'\n\t\t));\n\n\t\t$this->assertTrue($client->getResponse()->isSuccessful());\n }","title":""},{"docid":"b54348b93eabecb3332fe3764235303b","score":"0.7099252","text":"public function test_postPrototypeGetImage() {\n\n }","title":""},{"docid":"8a7ce6c9b6679cb0788e9b60fd31bc46","score":"0.70860523","text":"public function testUpload () {\n\t\techo \"test elegant upload\";\n\t\treturn;\n\t}","title":""},{"docid":"bd3330eb59faa24c2f635149f576e023","score":"0.70811886","text":"public function testUploadAnImageForAProduct()\n {\n $this->markTestSkipped();\n\n // TODO: create a mock image file\n\n $prod = $this->generateProducts()->first();\n $filePath = base_path().$product->id.\"-\".$file->getClientOriginalName();\n\n $response = $this->call('PUT', \"/products/{$prod->id}/image\");\n $this->seeInDatabase('products', [\n 'id' => $prod->id,\n 'image' => $filePath,\n ]);\n }","title":""},{"docid":"b293538c0028512e7a06842cf16ef588","score":"0.7074762","text":"public function testOwnerUploadFile()\n {\n Storage::fake('upload');\n $file = UploadedFile::fake()->image('test.jpg');\n $project = Project::first();\n $user = User::first();\n\n $response = $this->actingAs($user)->post('/projects/'.$project->id.'/file', [\n 'attchement' => $file\n ]);\n $response->assertStatus(302);\n $response->assertSessionHas(\"success\",__(\"project.file_success\", ['filename' => $file->name]));\n\n //Storage::disk('upload')->assertExists($file->hashName());\n\n }","title":""},{"docid":"e956c806dfa06274733e6a27bc98132b","score":"0.7025675","text":"public function test_image_can_be_upladed()\n {\n $this->withoutExceptionHandling();\n $this->actingAs($user = factory(User::class)->create(), 'api');\n\n $file = UploadedFile::fake()->image('user-image.png');\n\n $response = $this->post('api/users/' . $user->id . '/images', [\n 'image' => $file,\n 'heigh' => 200,\n 'width' => 300,\n 'location' => 'cover'\n ])->assertStatus(201);\n\n Storage::disk('s3')->assertExists('user-images/' . $file->hashName());\n\n $image = Image::first();\n $this->assertEquals('user-images/' . $file->hashName(), $image->path);\n $this->assertEquals('200', $image->heigh);\n $this->assertEquals('300', $image->width);\n\n $response->assertJson([\n 'data' => [\n 'type' => 'images',\n 'id' => $image->id,\n 'attributes' => [\n 'path' => Config::get('aws.s3_url').$image->path,\n 'width' => $image->width,\n 'heigh' => $image->heigh,\n 'location' => $image->location,\n ],\n 'links' => [\n 'self' => url('api/images/')\n ]\n ]\n ]);\n }","title":""},{"docid":"302cb6b449ba101a65d9bb155b7f5297","score":"0.6983325","text":"public function testStore() {\n Storage::fake('images');\n\n $response = $this->json('POST', 'api/v1/images', [\n 'fileNames' => [UploadedFile::fake()->image('photo1.jpg', 600, 600),\n UploadedFile::fake()->image('photo2.jpg', 1000, 1000)]\n ])->assertStatus(200)->decodeResponseJson();\n\n $imageOriginal1Path = $response['images'][0]['original']['path'];\n $imageOriginal1Thumb100 = $response['images'][0]['thumbs']['100x100']['path'];\n $imageOriginal1Thumb400 = $response['images'][0]['thumbs']['400x400']['path'];\n\n $imageOriginal2Path = $response['images'][1]['original']['path'];\n $imageOriginal2Thumb100 = $response['images'][1]['thumbs']['100x100']['path'];\n $imageOriginal2Thumb400 = $response['images'][1]['thumbs']['400x400']['path'];\ndd($this->get('/images/60647991540d2.jpeg')->assertOk());\n $this->get($imageOriginal1Path)->assertRedirect();\n $this->get($imageOriginal1Thumb100)->assertStatus(200);\n $this->get($imageOriginal1Thumb400)->assertStatus(200);\n\n $this->get($imageOriginal2Path)->assertStatus(200);\n $this->get($imageOriginal2Thumb100)->assertStatus(200);\n $this->get($imageOriginal2Thumb400)->assertStatus(200);\n\n }","title":""},{"docid":"4329e3c6760db3bdc8b54e3a8d199ff0","score":"0.69624776","text":"public function testImagesUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"0b523e14d0d67d1986ad8aefcdff26ba","score":"0.6958292","text":"public function testImagesGet()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"062ab0083e320a2d17ec2175cecc97c3","score":"0.6945325","text":"function Trigger_ImageUpload1(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"logotipo\");\n $uploadObj->setDbFieldName(\"logotipo\");\n $uploadObj->setFolder(\"../../Uploads/fotos/\");\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"0b68a1f75a1868b35bd30053f7824a4e","score":"0.6932921","text":"public function testImagesGetFile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"ee3e588736b32e45e56ff379347e8d04","score":"0.6928883","text":"public function uploadAdPhoto(){\n $this->page()\n ->findAndAssertThat()\n ->existsOnlyOnce()\n ->elementWithCss(self::ELEMENT_IMG_INPUT_UPLOAD_CSS)\n ->sendKeys(self::STRING_IMG_LOCATION);\n }","title":""},{"docid":"da0b77bac0130e17c0e8ac1bc9bfa06a","score":"0.69245344","text":"public function uploadAction()\n {\n if(strtolower($_SERVER['REQUEST_METHOD']) != 'post'){\n exit;\n }\n\n $original = APPLICATION_PATH_TMP . '/'. md5($_SERVER['REMOTE_ADDR'].rand()).'.jpg';\n\n // The JPEG snapshot is sent as raw input:\n $input = file_get_contents('php://input');\n\n if(md5($input) == '7d4df9cc423720b7f1f3d672b89362be'){\n // Blank image. We don't need this one.\n exit;\n }\n\n $result = file_put_contents($original, $input);\n if (!$result) {\n echo '{\n \"error\"\t\t: 1,\n \"message\"\t: \"Failed save the image. Make sure you chmod the uploads folder and its subfolders to 777.\"\n }';\n exit;\n }\n\n $info = getimagesize($original);\n if($info['mime'] != 'image/jpeg'){\n @unlink($original);\n exit;\n }\n\n $storage = Engine_Api::_()->getItemTable('storage_file');\n $file = $storage->createTemporaryFile($original);\n @unlink($original);\n\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $table = Engine_Api::_()->getDbtable('albums', 'album');\n $db = $table->getAdapter();\n $db->beginTransaction();\n\n try\n {\n $type = $this->_getParam('type', 'wall');\n\n if (empty($type)) $type = 'wall';\n\n $album = $table->getSpecialAlbum($viewer, $type);\n\n $photoTable = Engine_Api::_()->getDbtable('photos', 'album');\n $photo = $photoTable->createRow();\n $photo->setFromArray(array(\n 'owner_type' => 'user',\n 'owner_id' => Engine_Api::_()->user()->getViewer()->getIdentity()\n ));\n $photo->save();\n $photo->setPhoto($file);\n\n // delete old file\n $file->delete();\n\n if( $type == 'message' ) {\n $photo->title = Zend_Registry::get('Zend_Translate')->_('Attached Image');\n }\n\n $photo->album_id = $album->album_id;\n $photo->save();\n\n if( !$album->photo_id ) {\n $album->photo_id = $photo->getIdentity();\n $album->save();\n }\n\n if( $type != 'message' ) {\n // Authorizations\n $auth = Engine_Api::_()->authorization()->context;\n $auth->setAllowed($photo, 'everyone', 'view', true);\n $auth->setAllowed($photo, 'everyone', 'comment', true);\n }\n\n $db->commit();\n\n $this->view->status = true;\n $this->view->photo_id = $photo->photo_id;\n $this->view->album_id = $album->album_id;\n $this->view->src = $photo->getPhotoUrl();\n $this->view->message = Zend_Registry::get('Zend_Translate')->_('Photo saved successfully');\n \n }\n\n catch( Exception $e )\n {\n $db->rollBack();\n //throw $e;\n $this->view->status = false;\n }\n\n\n\n\n\n }","title":""},{"docid":"9deb13879eacb6c60cb800097b392254","score":"0.69205457","text":"public function testFileUpload()\n {\n Storage::fake('profiles');\n $file = UploadedFile::fake()->image('profile_pic.jpg');\n\n $response = $this->post('/', [\n 'file' => $file,\n ]);\n\n // Redirect means we passed validation and uploaded file without error.\n $response->assertStatus(302);\n }","title":""},{"docid":"89f51e21ae2adcfa3ba969e11a8ef735","score":"0.691341","text":"function Trigger_ImageUpload1(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"logotipo\");\n $uploadObj->setDbFieldName(\"logotipo\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"82ceb3e1e5748cc6ad4aa47f972d94a4","score":"0.690438","text":"function _uploadImage()\n {\n global $_TABLES, $_DLM_CONF;\n\n $newimage_name = COM_applyFilter($_FILES['imgurl']['name']);\n if (!empty($newimage_name)) {\n $name = $this->_createFilename($newimage_name);\n if (DLM_uploadNewFile($_FILES['imgurl'], $_DLM_CONF['path_snapcat'], $name)) {\n $this->_imgurl = $name;\n }\n } else if ($this->_deleteimg) {\n $this->_imgurl = '';\n }\n }","title":""},{"docid":"2dafbcf01e45f3a2a31c69033244475f","score":"0.68846464","text":"function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"imagem\");\n $uploadObj->setDbFieldName(\"imagem\");\n $uploadObj->setFolder(\"../up/\");\n $uploadObj->setResize(\"true\", 500, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"fc4d65267af026682aa4145c1d6db35d","score":"0.68828654","text":"function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto\");\n $uploadObj->setDbFieldName(\"foto\");\n $uploadObj->setFolder(\"../../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"e45160ed71571753711db38fbc9966c2","score":"0.6871591","text":"function Trigger_ImageUpload(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo1\");\r\r\n $uploadObj->setDbFieldName(\"photo1\");\r\r\n $uploadObj->setFolder(\"assets/images/produits/\");\r\r\n $uploadObj->setResize(\"true\", 400, 400);\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}","title":""},{"docid":"de5a9d03f374db529391f9bb6e0456ce","score":"0.6871384","text":"function img_upload()\n {\n }","title":""},{"docid":"c0bb46224c88fb4c5312672083f7b71c","score":"0.6869994","text":"public function testImagesCreate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"1361da57092eb90c697741fd804ef6b8","score":"0.6869558","text":"function Trigger_ImageUpload1(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto1\");\n $uploadObj->setDbFieldName(\"foto1\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"b68ff889aee1c65787bacfb40e8dcf6e","score":"0.68566394","text":"public function getImageUpload()\n {\n $this->imageFile = UploadedFile::getInstance($this, 'imageFile');\n if($this->imageFile){\n if(!$this->isNewRecord)\n $this->tmp_imageUpdate = $this->gambar;\n $this->gambar = $this->getNewNameFile($this->imageFile);\n }\n }","title":""},{"docid":"9657c9a409b18d98a3e6bfc33ef7cbb3","score":"0.6837782","text":"function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto\");\n $uploadObj->setDbFieldName(\"foto\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 500, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"a0bc0ca533185a324df835c7f8c9490a","score":"0.6812084","text":"function Trigger_ImageUpload1(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo2\");\r\r\n $uploadObj->setDbFieldName(\"photo2\");\r\r\n $uploadObj->setFolder(\"assets/images/produits/\");\r\r\n $uploadObj->setResize(\"true\", 400, 400);\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}","title":""},{"docid":"da9feec384bda5a5e823290180c21559","score":"0.6773777","text":"public function uploadActionImage()\n {\n if ($this->request->hasFiles() == true) {\n $baseLocation = 'files/';\n\n // Print the real file names and sizes\n foreach ($this->request->getUploadedFiles() as $file) {\n $photos = new Photo(); \n $photos->name = $file->getName();\n $photos->size = $file->getSize();\n $photos->save();\n\n //Move the file into the application\n $file->moveTo($baseLocation . $file->getName());\n }\n }\n }","title":""},{"docid":"8394a4838f97bf0bc96ada84cdac82a4","score":"0.6759883","text":"function Trigger_ImageUpload2(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto1\");\n $uploadObj->setDbFieldName(\"foto1\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 200, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"2a1726e76d4e18b721540a36d65433d1","score":"0.6755998","text":"public function test_postPrototypeUpdateImage() {\n\n }","title":""},{"docid":"016d9ac2e5473d50d63943c2a716400b","score":"0.6752567","text":"function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"fotoDestaque\");\n $uploadObj->setDbFieldName(\"fotoDestaque\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 400, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"9bfb3fa54b9db77c20830265b78e898f","score":"0.6724284","text":"function Trigger_ImageUpload2(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"gif_nome\");\n $uploadObj->setDbFieldName(\"gif_nome\");\n $uploadObj->setFolder(\"../../Uploads/fotos/\");\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"15d282dffc0e8e18cf200d368e48387d","score":"0.6724155","text":"function Trigger_ImageUpload2(&$tNG) {\r\r\n $uploadObj = new tNG_ImageUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"photo3\");\r\r\n $uploadObj->setDbFieldName(\"photo3\");\r\r\n $uploadObj->setFolder(\"assets/images/produits/\");\r\r\n $uploadObj->setResize(\"true\", 400, 400);\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}","title":""},{"docid":"eed6bd62780f3e9bbd76e7efd31f8208","score":"0.6711182","text":"public function test_create_image_tag()\n {\n $data = Image::create([\n 'name' => UploadedFile::fake()->image('avatar.jpg'),\n 'path' => UploadedFile::fake()->image('avatar.jpg')->path(),\n 'user_id' => $this->user->id,\n 'visibility' => 1,\n 'category' => 'Men'\n ]);\n\n $response = $this->actingAs($this->user)\n ->json('POST', route('image.tag.add', $data->id), [\n 'coords' => \"10,10,60,105\",\n 'label' => 'Bag',\n 'description' => 'Unisex bags'\n ]);\n\n $response->assertStatus(200);\n }","title":""},{"docid":"615704248e8a1e9cb73d7a2a4d49eb04","score":"0.66982895","text":"function Trigger_ImageUpload4(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto3\");\n $uploadObj->setDbFieldName(\"foto3\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 200, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"42a1a768a0d91ecbc44b463507a8c52a","score":"0.66964376","text":"function Trigger_ImageUpload(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"i_imagem\");\n $uploadObj->setDbFieldName(\"i_imagem\");\n $uploadObj->setFolder(\"../images/instalacoes/\");\n $uploadObj->setResize(\"true\", 200, 140);\n $uploadObj->setMaxSize(5500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"custom\");\n $uploadObj->setRenameRule(\"{i_id}.{KT_ext}\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"d6727d2283bfcd287e80c236c0142912","score":"0.66717464","text":"function Trigger_ImageUpload2(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto2\");\n $uploadObj->setDbFieldName(\"foto2\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"95daf0f30d70228214f11a8041f040ef","score":"0.6656197","text":"public function testImageFail()\n {\n $this->auth(2);\n\n // Unique\n $response = $this->post('/image');\n $response->assertSessionHasErrors(['image', 'category_id']);\n\n // Image\n $response = $this->post('/image', [\n 'image' => 'texte',\n ]);\n $response->assertSessionHasErrors('image');\n\n // Max\n $response = $this->post('/image', [\n 'image' => UploadedFile::fake()->image('paysage.jpg')->size(2001),\n 'description' => str_random(256),\n ]);\n $response->assertSessionHasErrors(['image', 'description']);\n\n // Exists\n $response = $this->post('/image', [\n 'category_id' => 10,\n ]);\n $response->assertSessionHasErrors('category_id');\n }","title":""},{"docid":"18d8df03243415b529f942364b36c836","score":"0.6639438","text":"public function test_postPrototypeCreateImage() {\n\n }","title":""},{"docid":"6038038414e5c51624905f16a85d2b6a","score":"0.66331","text":"function Trigger_ImageUpload4(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto4\");\n $uploadObj->setDbFieldName(\"foto4\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"143e1a6ebb591d7bf9fd6502bb97984b","score":"0.66112643","text":"function Trigger_ImageUpload3(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto2\");\n $uploadObj->setDbFieldName(\"foto2\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 200, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"ab8e02aca7cb241e0d2f17b2c98b925c","score":"0.65715206","text":"public function testGetSetImageFullPath() \n\t{\n\t $this->assertEquals($this->testImage, $this->obj->getImageFullPath());\n\t}","title":""},{"docid":"34684b9770ddf67f1181e890a605d9dd","score":"0.65639955","text":"function uploadImage($folder, $image)\n{\n $image->store('/', $folder);\n return $filename = $image->hashName();\n\n}","title":""},{"docid":"cc3b045f1d0066cad3b0040fe72a5e6c","score":"0.6540243","text":"function Trigger_ImageUpload5(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto4\");\n $uploadObj->setDbFieldName(\"foto4\");\n $uploadObj->setFolder(\"../Uploads/fotos/\");\n $uploadObj->setResize(\"true\", 200, 0);\n $uploadObj->setMaxSize(1500);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"c35cf54d4f113b9165c1b75606205e90","score":"0.6529705","text":"public function uploadImage()\n\t{\n\t\tif (null === $this->getImage()) {\n\t\t\treturn;\n\t\t}\n\n\t\t// use the original file name here but you should\n\t\t// sanitize it at least to avoid any security issues\n\n\t\t// move takes the target directory and then the\n\t\t// target filename to move to\n\t\t//die();\n\t\t$this->getImage()->move(\n\t\t\t$this->getUploadRootDir(),\n\t\t\t$this->getImage()->getClientOriginalName()\n\t\t);\n\n\t\t// set the path property to the filename where you've saved the file\n\t\t$this->image = $this->getImage()->getClientOriginalName();\n\n\n\t\t// clean up the file property as you won't need it anymore\n\t\t//$this->image = null;\n\t}","title":""},{"docid":"010828048b0f4d824c68ea25f5d67300","score":"0.64987665","text":"public function test_profilePrototypeUpdateImage() {\n\n }","title":""},{"docid":"f6b1257b8318de6a588c8fbd78f55e38","score":"0.6484982","text":"function imageUpload() {\n // echo 'test';exit;\n $arg['script_url'] = url('sposts/image/upload');\n $upload_handler = new UploadHandler($arg);\n }","title":""},{"docid":"bfadde2c10cbfa62f0723fb08bc9190f","score":"0.6476355","text":"private function uploadImage(){\n\t\t// of $_FILES.\n\t\tif(!empty($_FILES)){\n\t\t\tif(filesize($_FILES['avatar']['tmp_name']) <= 512000){\n\t\t\t\t$uploaddir = '/images/avatars/';\n\t\t\t\t$uploadfile = $uploaddir.\"avatar_\". basename(substr($this->m_sEmail,0,7)).substr($_FILES['avatar']['name'],strpos($_FILES['avatar']['name'],\".\"));\n\t\t\t\tdefine ('SITE_ROOT', realpath(dirname(substr($this->m_sEmail,0,7))));\n\t\t\t\tif (!move_uploaded_file($_FILES['avatar']['tmp_name'], SITE_ROOT.$uploadfile)) {\n\t\t\t\t\tthrow new Exception(\"Avatar mag niet groter zijn dan 500KB.\");\n\t\t\t\t}else{\n\t\t\t\t\t$this->m_sAvatar = \"avatar_\". basename(substr($this->m_sEmail,0,7)).substr($_FILES['avatar']['name'],strpos($_FILES['avatar']['name'],\".\"));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tthrow new Exception(\"Avatar mag niet groter zijn dan 500KB.\");\n\t\t\t}\n\t}\n}","title":""},{"docid":"858f02f2211d70450f900bf037f58f97","score":"0.6475186","text":"function Trigger_ImageUpload5(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto5\");\n $uploadObj->setDbFieldName(\"foto5\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"26255964514affc3460f9f416436961a","score":"0.64678323","text":"public function testSecurimageAction() {\n // $img->show();\n\n // $this->status->ajaxReturn($result['code'], $result);\n }","title":""},{"docid":"24757e7e3174989665a526e66c4ccd71","score":"0.6457592","text":"function Trigger_ImageUpload3(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto3\");\n $uploadObj->setDbFieldName(\"foto3\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"1c44c119a31f7515f23d741c65e97a01","score":"0.6445629","text":"public function testWidgetUpload() {\n $assert_session = $this->assertSession();\n $page = $this->getSession()->getPage();\n $driver = $this->getSession()->getDriver();\n\n foreach ($this->getTestFiles('image') as $image) {\n $extension = pathinfo($image->filename, PATHINFO_EXTENSION);\n if ($extension === 'png') {\n $png_image = $image;\n }\n elseif ($extension === 'jpg') {\n $jpg_image = $image;\n }\n }\n\n if (!isset($png_image) || !isset($jpg_image)) {\n $this->fail('Expected test files not present.');\n }\n\n // Create a user that can only add media of type four.\n $user = $this->drupalCreateUser([\n 'access administration pages',\n 'access content',\n 'create basic_page content',\n 'create type_one media',\n 'create type_four media',\n 'view media',\n ]);\n $this->drupalLogin($user);\n\n // Visit a node create page and open the media library.\n $this->drupalGet('node/add/basic_page');\n $this->openMediaLibraryForField('field_twin_media');\n\n // Assert the upload form is not visible for default tab type_three without\n // the proper permissions.\n $assert_session->elementNotExists('css', '.js-media-library-add-form');\n\n // Assert the upload form is not visible for the non-file based media type\n // type_one.\n $this->switchToMediaType('One');\n $assert_session->elementNotExists('css', '.js-media-library-add-form');\n\n // Assert the upload form is visible for type_four.\n $this->switchToMediaType('Four');\n $assert_session->fieldExists('Add files');\n $assert_session->pageTextContains('Maximum 2 files.');\n\n // Create a user that can create media for all media types.\n $user = $this->drupalCreateUser([\n 'access administration pages',\n 'access content',\n 'create basic_page content',\n 'create media',\n 'view media',\n ]);\n $this->drupalLogin($user);\n\n // Visit a node create page.\n $this->drupalGet('node/add/basic_page');\n\n $file_storage = $this->container->get('entity_type.manager')->getStorage('file');\n /** @var \\Drupal\\Core\\File\\FileSystemInterface $file_system */\n $file_system = $this->container->get('file_system');\n\n // Add to the twin media field.\n $this->openMediaLibraryForField('field_twin_media');\n\n // Assert the upload form is now visible for default tab type_three.\n $assert_session->elementExists('css', '.js-media-library-add-form');\n $assert_session->fieldExists('Add files');\n\n // Assert we can upload a file to the default tab type_three.\n $assert_session->elementNotExists('css', '.js-media-library-add-form[data-input]');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_image->uri));\n $this->assertMediaAdded();\n $assert_session->elementExists('css', '.js-media-library-add-form[data-input]');\n // We do not have pre-selected items, so the container should not be added\n // to the form.\n $assert_session->pageTextNotContains('Additional selected media');\n // Files are temporary until the form is saved.\n $files = $file_storage->loadMultiple();\n $file = array_pop($files);\n $this->assertSame('public://type-three-dir', $file_system->dirname($file->getFileUri()));\n $this->assertTrue($file->isTemporary());\n // Assert the revision_log_message field is not shown.\n $upload_form = $assert_session->elementExists('css', '.js-media-library-add-form');\n $assert_session->fieldNotExists('Revision log message', $upload_form);\n // Assert the name field contains the filename and the alt text is required.\n $assert_session->fieldValueEquals('Name', $png_image->filename);\n $this->pressSaveButton(TRUE);\n $this->waitForText('Alternative text field is required');\n $page->fillField('Alternative text', $this->randomString());\n $this->pressSaveButton();\n $this->assertJsCondition('jQuery(\"input[name=\\'media_library_select_form[0]\\']\").is(\":focus\")');\n // The file should be permanent now.\n $files = $file_storage->loadMultiple();\n $file = array_pop($files);\n $this->assertFalse($file->isTemporary());\n // Load the created media item.\n $media_items = Media::loadMultiple();\n $added_media = array_pop($media_items);\n // Ensure the media item was saved to the library and automatically\n // selected. The added media items should be in the first position of the\n // add form.\n $assert_session->pageTextContains('Add or select media');\n $assert_session->pageTextContains($png_image->filename);\n $assert_session->fieldValueEquals('media_library_select_form[0]', $added_media->id());\n $assert_session->checkboxChecked('media_library_select_form[0]');\n $assert_session->pageTextContains('1 of 2 items selected');\n $assert_session->hiddenFieldValueEquals('current_selection', $added_media->id());\n // Ensure the created item is added in the widget.\n $this->pressInsertSelected('Added one media item.');\n $this->waitForText($png_image->filename);\n\n // Remove the item.\n $assert_session->elementExists('css', '.field--name-field-twin-media')->pressButton('Remove');\n $this->waitForNoText($png_image->filename);\n\n $this->openMediaLibraryForField('field_twin_media');\n $this->switchToMediaType('Three');\n $png_uri_2 = $file_system->copy($png_image->uri, 'public://');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_2));\n $this->waitForFieldExists('Alternative text')->setValue($this->randomString());\n $this->pressSaveButton();\n $this->pressInsertSelected('Added one media item.');\n $this->waitForText($file_system->basename($png_uri_2));\n\n // Also make sure that we can upload to the unlimited cardinality field.\n $this->openMediaLibraryForField('field_unlimited_media');\n $this->switchToMediaType('Three');\n\n // Select a media item to check if the selection is persisted when adding\n // new items.\n $existing_media_name = $file_system->basename($png_uri_2);\n $checkbox = $page->findField(\"Select $existing_media_name\");\n $selected_item_id = $checkbox->getAttribute('value');\n $checkbox->click();\n $assert_session->pageTextContains('1 item selected');\n $assert_session->hiddenFieldValueEquals('current_selection', $selected_item_id);\n $png_uri_3 = $file_system->copy($png_image->uri, 'public://');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_3));\n $this->waitForText('The media item has been created but has not yet been saved.');\n $page->fillField('Name', 'Unlimited Cardinality Image');\n $page->fillField('Alternative text', $this->randomString());\n $this->pressSaveButton();\n // Load the created media item.\n $media_items = Media::loadMultiple();\n $added_media = array_pop($media_items);\n $added_media_name = $added_media->label();\n // Ensure the media item was saved to the library and automatically\n // selected. The added media items should be in the first position of the\n // add form.\n $assert_session->pageTextContains('Add or select media');\n $assert_session->pageTextContains('Unlimited Cardinality Image');\n $assert_session->fieldValueEquals('media_library_select_form[0]', $added_media->id());\n $assert_session->checkboxChecked('media_library_select_form[0]');\n // Assert the item that was selected before uploading the file is still\n // selected.\n $assert_session->pageTextContains('2 items selected');\n $assert_session->checkboxChecked(\"Select $added_media_name\");\n $assert_session->checkboxChecked(\"Select $existing_media_name\");\n $assert_session->hiddenFieldValueEquals('current_selection', implode(',', [$selected_item_id, $added_media->id()]));\n $selected_checkboxes = [];\n foreach ($this->getCheckboxes() as $checkbox) {\n if ($checkbox->isChecked()) {\n $selected_checkboxes[] = $checkbox->getAttribute('value');\n }\n }\n $this->assertCount(2, $selected_checkboxes);\n // Ensure the created item is added in the widget.\n $this->pressInsertSelected('Added 2 media items.');\n $this->waitForText('Unlimited Cardinality Image');\n\n // Assert we can now only upload one more media item.\n $this->openMediaLibraryForField('field_twin_media');\n $this->switchToMediaType('Four');\n $this->assertFalse($assert_session->fieldExists('Add file')->hasAttribute('multiple'));\n $assert_session->pageTextContains('One file only.');\n\n // Assert media type four should only allow jpg files by trying a png file\n // first.\n $png_uri_4 = $file_system->copy($png_image->uri, 'public://');\n $this->addMediaFileToField('Add file', $file_system->realpath($png_uri_4), FALSE);\n $this->waitForText('Only files with the following extensions are allowed');\n // Assert that jpg files are accepted by type four.\n $jpg_uri_2 = $file_system->copy($jpg_image->uri, 'public://');\n $this->addMediaFileToField('Add file', $file_system->realpath($jpg_uri_2));\n $this->waitForFieldExists('Alternative text')->setValue($this->randomString());\n // The type_four media type has another optional image field.\n $assert_session->pageTextContains('Extra Image');\n $jpg_uri_3 = $file_system->copy($jpg_image->uri, 'public://');\n $this->addMediaFileToField('Extra Image', $this->container->get('file_system')->realpath($jpg_uri_3));\n $this->waitForText($file_system->basename($jpg_uri_3));\n // Ensure that the extra image was uploaded to the correct directory.\n $files = $file_storage->loadMultiple();\n $file = array_pop($files);\n $this->assertSame('public://type-four-extra-dir', $file_system->dirname($file->getFileUri()));\n $this->pressSaveButton();\n // Ensure the media item was saved to the library and automatically\n // selected.\n $this->waitForText('Add or select media');\n $this->waitForText($file_system->basename($jpg_uri_2));\n // Ensure the created item is added in the widget.\n $this->pressInsertSelected('Added one media item.');\n $assert_session->pageTextContains($file_system->basename($jpg_uri_2));\n\n // Assert we can also remove selected items from the selection area in the\n // upload form.\n $this->openMediaLibraryForField('field_unlimited_media');\n $this->switchToMediaType('Three');\n $checkbox = $page->findField(\"Select $existing_media_name\");\n $selected_item_id = $checkbox->getAttribute('value');\n $checkbox->click();\n $assert_session->hiddenFieldValueEquals('current_selection', $selected_item_id);\n $this->assertTrue($assert_session->fieldExists('Add files')->hasAttribute('multiple'));\n $png_uri_5 = $file_system->copy($png_image->uri, 'public://');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_5));\n // assertWaitOnAjaxRequest() required for input \"id\" attributes to\n // consistently match their label's \"for\" attribute.\n $assert_session->assertWaitOnAjaxRequest();\n $page->fillField('Alternative text', $this->randomString());\n $this->pressSaveButton();\n $page->uncheckField('media_library_select_form[2]');\n $this->waitForText('1 item selected');\n $this->waitForText(\"Select $existing_media_name\");\n $media_items = Media::loadMultiple();\n $added_media = array_pop($media_items);\n $added_media_name = $added_media->label();\n $assert_session->pageTextContains('1 item selected');\n $assert_session->checkboxChecked(\"Select $added_media_name\");\n $assert_session->checkboxNotChecked(\"Select $existing_media_name\");\n $assert_session->hiddenFieldValueEquals('current_selection', $added_media->id());\n $this->pressInsertSelected('Added one media item.');\n $this->waitForText($file_system->basename($png_uri_5));\n\n // Assert removing an uploaded media item before save works as expected.\n $this->openMediaLibraryForField('field_unlimited_media');\n $this->switchToMediaType('Three');\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_image->uri));\n // Assert the media item fields are shown and the vertical tabs are no\n // longer shown.\n $this->waitForFieldExists('Alternative text');\n $this->assertMediaAdded();\n // Press the 'Remove button' and assert the user is sent back to the media\n // library.\n $page->pressButton('media-0-remove-button');\n // Assert the remove message is shown.\n $this->waitForText(\"The media item $png_image->filename has been removed.\");\n // Assert the focus is shifted to the first tabbable element of the add\n // form, which should be the source field.\n $this->assertNoMediaAdded();\n $assert_session->elementExists('css', '.ui-dialog-titlebar-close')->click();\n\n // Assert uploading multiple files.\n $this->openMediaLibraryForField('field_unlimited_media');\n $this->switchToMediaType('Three');\n // Assert the existing items are remembered when adding and removing media.\n $checkbox = $page->findField(\"Select $existing_media_name\");\n $checkbox->click();\n // Assert we can add multiple files.\n $this->assertTrue($assert_session->fieldExists('Add files')->hasAttribute('multiple'));\n // Create a list of new files to upload.\n $filenames = [];\n $remote_paths = [];\n foreach (range(1, 4) as $i) {\n $path = $file_system->copy($png_image->uri, 'public://');\n $filenames[] = $file_system->basename($path);\n $remote_paths[] = $driver->uploadFileAndGetRemoteFilePath($file_system->realpath($path));\n }\n $page->findField('Add files')->setValue(implode(\"\\n\", $remote_paths));\n // Assert the media item fields are shown and the vertical tabs are no\n // longer shown.\n $this->assertMediaAdded();\n // Assert all files have been added.\n $assert_session->fieldValueEquals('media[0][fields][name][0][value]', $filenames[0]);\n $assert_session->fieldValueEquals('media[1][fields][name][0][value]', $filenames[1]);\n $assert_session->fieldValueEquals('media[2][fields][name][0][value]', $filenames[2]);\n $assert_session->fieldValueEquals('media[3][fields][name][0][value]', $filenames[3]);\n // Set alt texts for items 1 and 2, leave the alt text empty for items 3\n // and 4 to assert the field validation does not stop users from removing\n // items.\n $page->fillField('media[0][fields][field_media_test_image][0][alt]', $filenames[0]);\n $page->fillField('media[1][fields][field_media_test_image][0][alt]', $filenames[1]);\n // Assert the file is available in the file storage.\n $files = $file_storage->loadByProperties(['filename' => $filenames[1]]);\n $this->assertCount(1, $files);\n $file_1_uri = reset($files)->getFileUri();\n // Remove the second file and assert the focus is shifted to the container\n // of the next media item and field values are still correct.\n $page->pressButton('media-1-remove-button');\n $this->assertTrue($assert_session->waitForText('The media item ' . $filenames[1] . ' has been removed.'));\n $this->assertJsCondition('jQuery(\"[data-media-library-added-delta=2]\").is(\":focus\")');\n // Assert the file was deleted.\n $this->assertEmpty($file_storage->loadByProperties(['filename' => $filenames[1]]));\n $this->assertFileDoesNotExist($file_1_uri);\n\n // When a file is already in usage, it should not be deleted. To test,\n // let's add a usage for $filenames[3] (now in the third position).\n $files = $file_storage->loadByProperties(['filename' => $filenames[3]]);\n $this->assertCount(1, $files);\n $target_file = reset($files);\n Media::create([\n 'bundle' => 'type_three',\n 'name' => 'Disturbing',\n 'field_media_test_image' => [\n ['target_id' => $target_file->id()],\n ],\n ])->save();\n // Remove $filenames[3] (now in the third position) and assert the focus is\n // shifted to the container of the previous media item and field values are\n // still correct.\n $page->pressButton('media-3-remove-button');\n $this->assertTrue($assert_session->waitForText('The media item ' . $filenames[3] . ' has been removed.'));\n // Assert the file was not deleted, due to being in use elsewhere.\n $this->assertNotEmpty($file_storage->loadByProperties(['filename' => $filenames[3]]));\n $this->assertFileExists($target_file->getFileUri());\n\n // The second media item should be removed (this has the delta 1 since we\n // start counting from 0).\n $assert_session->elementNotExists('css', '[data-media-library-added-delta=1]');\n $media_item_one = $assert_session->elementExists('css', '[data-media-library-added-delta=0]');\n $assert_session->fieldValueEquals('Name', $filenames[0], $media_item_one);\n $assert_session->fieldValueEquals('Alternative text', $filenames[0], $media_item_one);\n $media_item_three = $assert_session->elementExists('css', '[data-media-library-added-delta=2]');\n $assert_session->fieldValueEquals('Name', $filenames[2], $media_item_three);\n $assert_session->fieldValueEquals('Alternative text', '', $media_item_three);\n }","title":""},{"docid":"5535d8c37fa12df6a589a5a1ed9f8287","score":"0.64451814","text":"public function testUploadFromFile()\n {\n $config = require 'src/app/config.php';\n\n $storage = new StorageFacade(1, $config['storages']['1']);\n $result = $storage->uploadFromFile($this->files);\n\n $this->assertInstanceOf(Result::class, $result[0], 'Returned object is instance of \\AWS\\Reslut class');\n }","title":""},{"docid":"dbf9403fe7832023ac99baf011336a3a","score":"0.6442402","text":"public function testUploadAll(){\n\t\t// $f = new Filemanager($extra);\n\t\t// $path = '/';\n\t\t// $files = array();\n\t\t// $p = __DIR__ .'/_data/Koala.jpg';\n\t\t// $files[] = new UploadedFile($p,'Koala.jpg','image/jpg',filesize($p));\n\t\t// $files[] = new UploadedFile($p,'Koala.jpg','image/jpg',filesize($p));\n\t\t// $r = $f->uploadAll($files,$path);\n\t\t// var_dump($r);\n\t\t// var_dump($files[0]);\t\t\n\n\t}","title":""},{"docid":"c9a032cbc4de3d002588b7d2fedc9fda","score":"0.6437217","text":"public function uploadImage() {\n if (null === $this->image) {\n return;\n }\n\n if (!$this->id) {\n $this->image->move($this->getTmpUploadRootDir(), $this->image->getClientOriginalName());\n } else {\n $this->image->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n }\n $this->setImage($this->image->getClientOriginalName());\n }","title":""},{"docid":"344ad76e5d5313b312fd48b59f43b297","score":"0.6431518","text":"public function testUpload()\n {\n $user = \\factory(User::class)->create();\n $file = UploadedFile::fake()->create('song.mp3', 7000);\n\n $this->actingAs($user)->post('songs', [\n \"song\" => $file\n ])->assertSeeText('metadata');\n }","title":""},{"docid":"06f6216e1371d16828e8b2f008116594","score":"0.6427026","text":"function upload()\n{\n $uploader = new Uploader(\"image-data\"); // creating new Uploader class' object\n $uploader->saveIn(\"img\"); // setting 'img' as the folder name\n $fileUploaded = $uploader->save(); // attempting to save\n if($fileUploaded)\n {\n $out = \"

    File Uploaded successfully

    \";\n }\n else\n $out = \"

    Something went wrong

    \";\n return $out;\n}","title":""},{"docid":"b994945516ff0a99b2a3a4d17529ea95","score":"0.6418073","text":"private function _handle_image_upload()\n\t{\n\n\t\t// load upload library\n\t\t$config = array('upload_path' => './uploads/item_pics/',\n\t\t\t'allowed_types' => 'gif|jpg|png',\n\t\t\t'max_size' => '100',\n\t\t\t'max_width' => '640',\n\t\t\t'max_height' => '480'\n\t\t);\n\t\t$this->load->library('upload', $config);\n\t\t$this->upload->do_upload('item_image');\n\n\t\treturn strlen($this->upload->display_errors()) == 0 || !strcmp($this->upload->display_errors(), '

    '.$this->lang->line('upload_no_file_selected').'

    ');\n\t}","title":""},{"docid":"9068113d0dd79237f568cbcf71454138","score":"0.640626","text":"function Trigger_ImageUpload6(&$tNG) {\n $uploadObj = new tNG_ImageUpload($tNG);\n $uploadObj->setFormFieldName(\"foto6\");\n $uploadObj->setDbFieldName(\"foto6\");\n $uploadObj->setFolder(\"../../fotos/\");\n $uploadObj->setResize(\"true\", 600, 0);\n $uploadObj->setMaxSize(2000);\n $uploadObj->setAllowedExtensions(\"gif, jpg, jpe, jpeg, png\");\n $uploadObj->setRename(\"auto\");\n return $uploadObj->Execute();\n}","title":""},{"docid":"221abd4b938dbafa1c0eec7e17b39e0d","score":"0.64047205","text":"public function testAdminGalleryAlbumPhotoUpdateTest()\n {\n \t$user = factory(User::class, 'admin')->create();\n \t$gallery = factory(Gallery::class)->create();\n $user->galleries()->save($gallery);\n $album = factory(Album::class)->create();\n $user->albums()->save($album);\n $gallery->albums()->save($album);\n\n $file = $this->prepareFileUpload('public/upload/test.png');\n\n $this->actingAs($user);\n\t $this->call('POST', route('admin.gallery.album.photo.store', ['gallery' => $gallery->id, 'album' => $album->id]), [], [], ['file' => $file], []);\n \t$this->assertResponseOk();\n\n $photo = \\App\\Photo::find(1);\n\n $this->visit(route('admin.gallery.album.photo.edit', ['gallery' => $gallery->id, 'album' => $album->id, 'photo' => $photo->id]))\n ->type('Testing Title', 'title')\n ->type('Testing Description', 'description')\n ->press('Update');\n }","title":""},{"docid":"cf19bf2c19fed3ed1040f71372570772","score":"0.6393064","text":"function image_upload(){\r\n\t\tif ($_FILES['location_image']['size'] > 0 ) {\t\r\n\t\t \tif( !file_exists(ABSPATH.EM_IMAGE_UPLOAD_DIR) ){\r\n\t\t\t\tmkdir(ABSPATH.EM_IMAGE_UPLOAD_DIR, 0777);\r\n\t\t \t}\r\n\t\t\t$this->image_delete(); \r\n\t\t\tlist($width, $height, $type, $attr) = getimagesize($_FILES['location_image']['tmp_name']);\r\n\t\t\t$image_path = ABSPATH.EM_IMAGE_UPLOAD_DIR.\"/location-\".$this->id.\".\".$this->mime_types[$type];\r\n\t\t\tif (!move_uploaded_file($_FILES['location_image']['tmp_name'], $image_path)){\r\n\t\t\t\t$this->errors = __('The image could not be loaded','dbem');\r\n\t\t\t\treturn false;\r\n\t\t\t}else{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}","title":""},{"docid":"cafe51238b84cf99086b95c02732bc5f","score":"0.639273","text":"public function testLoadImageFromUploadedFileObject()\n\t{\n\t\t$file = $this->getFile();\n\t\t\n\t\t$wam_file = $this->wam->load($file);\n\n\t\t$this->assertInstanceOf('Wam\\ImageBundle\\Image\\SourceImage', $wam_file);\n\n\t\t$params = $wam_file->getParams();\n\n\t\t$this->assertEquals('logo.jpg', $params['name']);\n\t\t$this->assertEquals('image/jpeg', $params['mime']);\n\t\t$this->assertEquals(__DIR__ . '/../../tmp/files/logo.jpg', $params['path']);\n\n\t\tcopy($wam_file->getTmpPath(), $wam_file->getRootPath());\n\t\tchmod($wam_file->getRootPath(), 0777);\n\t}","title":""},{"docid":"5d16b86c590e6409d1fd4474e3aa6124","score":"0.63871765","text":"public function uploadMoreAdPhoto(){\n $this->page()\n ->findAndAssertThat()\n ->existsOnlyOnce()\n ->elementWithCss(self::ELEMENT_IMG_INPUT_UPLOAD_CSS)\n ->sendKeys(self::STRING_IMG_2_LOCATION);\n }","title":""},{"docid":"a50d095b5b9c8e0e54dfa46e09bf3755","score":"0.6382805","text":"public static function uploadImageBlob()\n\t{\n\t\treturn self::forwardImageUploadCall(__FUNCTION__, func_get_args());\n\t}","title":""},{"docid":"c0e6e459776e70273fb7072c49dec096","score":"0.63761735","text":"public function testAddNewClientImage2()\n {\n }","title":""},{"docid":"086d3bd77b0d98459b20ab6b3ce2f6e2","score":"0.63760746","text":"public function uploadToTmp($imageUploader);","title":""},{"docid":"d2fd38539aa34a23ff2608d70c9680cb","score":"0.63668495","text":"function Trigger_FileUpload(&$tNG) {\r\r\n $uploadObj = new tNG_FileUpload($tNG);\r\r\n $uploadObj->setFormFieldName(\"prod_imagem\");\r\r\n $uploadObj->setDbFieldName(\"prod_imagem\");\r\r\n $uploadObj->setFolder(\"{prod_id}/\");\r\r\n $uploadObj->setMaxSize(1500);\r\r\n $uploadObj->setAllowedExtensions(\"pdf, txt, png, jpg\");\r\r\n $uploadObj->setRename(\"auto\");\r\r\n return $uploadObj->Execute();\r\r\n}","title":""},{"docid":"83c123f0b36bcb6737910d48d8bb8978","score":"0.6363785","text":"public function testUploadSingleFile()\n {\n // Sube un archivo como fake\n Storage::fake('public');\n $response = $this->json('POST', '/api/uploadfile', [\n 'file' => UploadedFile::fake()->image('avatar.jpg'),\n ]);\n\n $response->assertStatus(200);\n $response->assertJsonStructure(['name', 'mime', 'path', 'url']);\n $json = $response->json();\n\n // Assertion: El archivo fue cargado\n Storage::disk('public')->assertExists($json['path']);\n }","title":""},{"docid":"0d3c1cfa7b52e244118a7ca2b783505f","score":"0.6363597","text":"function checkImage() {\n\t\tif($this->tmp_file[\"tmp_name\"]) {\n\t\t\t$check = getimagesize($this->tmp_file[\"tmp_name\"]);\n\t\t\tif($check !== false) {\n\t\t\t\t$this->uploadOk = 1;\n\t\t\t} else {\n\t\t\t\t$this->errorStatus = \"File is not an image.\";\n\t\t\t\t$this->uploadOk = 0;\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"23e189699ebf07509075e6074523a00c","score":"0.6363246","text":"public function test_profilePrototypeGetImage() {\n\n }","title":""},{"docid":"274c3cc7a3dd4dd6ca681360ce9aa44b","score":"0.6354843","text":"public function testImagesAddPreview()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"add3763ecf7604cabe2116c7840cecb8","score":"0.63478345","text":"function upload_img($file){\n\n }","title":""},{"docid":"7f89f886997853b11966ad0b98d5b260","score":"0.63375115","text":"public function testImagesCopy()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"09a8cc6dd9814beb55c11f9dba78dea9","score":"0.63356274","text":"public function testDeleteClientImage1()\n {\n }","title":""},{"docid":"18b91fd8cffe0cd3e715b5600fdd737f","score":"0.6333932","text":"public function testDeleteOptionSetImage()\n {\n }","title":""},{"docid":"a07786e3a1cba1233c53856d18a9470d","score":"0.633185","text":"public function testFormStore()\n {\n Storage::fake('avatars');\n $file = UploadedFile::fake()->image('avatar.jpg');\n $data = [\n 'title'=>'test',\n 'description'=>'test des',\n 'file'=> $file,\n 'tags'=>[1, 2]\n ];\n $response = $this->post('/forms/create', $data);\n $response->assertRedirect();\n\n }","title":""},{"docid":"3c0574cd149ce8c2ff717e850468810d","score":"0.63315517","text":"public function test_user_can_upload_new_avatar()\n {\n $result = $this->avatarUploader->make();\n $this->assertInstanceOf(Model::class, $this->user);\n $this->assertTrue(is_string($result) && Storage::exists($result));\n $this->seeInDatabase($this->table, ['avatar' => $result]);\n\n $oldAvatar = $this->user->avatar;\n $newAvatar = $this->avatarUploader->make();\n $this->assertTrue(! empty($oldAvatar), 'Old avatar not found in database');\n $this->assertTrue(is_string($newAvatar) && Storage::exists($newAvatar));\n $this->seeInDatabase($this->table, ['id' => $this->user->id, 'avatar' => $newAvatar]);\n $this->assertNotTrue(Storage::exists($oldAvatar));\n }","title":""},{"docid":"bf3c66e11f25bb276fb63fd8dba279be","score":"0.6331071","text":"public function uploadImageAction()\n {\n $this->setJsonResponse();\n if(!isset($_FILES['Upload']) || empty($_FILES['Upload']['tmp_name'])){\n return array('success' => false,\n 'message' => 'Failed to upload image');\n }\n $service = new ImageUploaderService();\n $return = $service->uploadImage();\n if($return===false){\n return array('success' => false,\n 'message' => 'Failed to upload image');\n }\n return array('filename' => $return,\n 'success' => true);\n }","title":""},{"docid":"3fe370f22464dc330b1a1800714e7f27","score":"0.63235337","text":"public function getImageUpload()\n {\n return parent::getImageUpload();\n }","title":""},{"docid":"8275df46d87e516641b42d166de2b1a7","score":"0.63105017","text":"function upload_image($id = null) {\n if (!is_numeric($id) || $id == null) {\n Modules::run('site_security/not_allowed');\n }\n Modules::run('site_security/_is_admin');\n\n $submit = $this->input->post('submit', TRUE);\n\n if ($submit == \"cancel\") {\n redirect('store_items/create/' . $id);\n }\n\n $data['page_headline'] = \"Upload Image\";\n $data['update_id'] = $id;\n $data['view_module'] = 'store_items';\n $data['view_file'] = \"upload_image\";\n\n echo Modules::run('templates/admin', $data);\n }","title":""},{"docid":"88f3bb9fbeddd6053c83842c728c0199","score":"0.63070935","text":"function checkAndPrepareImage($formname, $key = \"we_document\")\n{\n\tif (isset($_FILES[\"we_ui_$formname\"]) && is_array($_FILES[\"we_ui_$formname\"])) {\n\t\t\n\t\t$webuserId = isset($_SESSION[\"webuser\"][\"ID\"]) ? $_SESSION[\"webuser\"][\"ID\"] : 0;\n\t\t\n\t\tinclude_once ($_SERVER[\"DOCUMENT_ROOT\"] . \"/webEdition/we/include/\" . \"we_classes/we_imageDocument.inc.php\");\n\t\tif (isset($_FILES[\"we_ui_$formname\"][\"name\"]) && is_array($_FILES[\"we_ui_$formname\"][\"name\"])) {\n\t\t\tforeach ($_FILES[\"we_ui_$formname\"][\"name\"] as $imgName => $filename) {\n\t\t\t\t\n\t\t\t\t$_imgDataId = isset($_REQUEST['WE_UI_IMG_DATA_ID_' . $imgName]) ? $_REQUEST['WE_UI_IMG_DATA_ID_' . $imgName] : false;\n\t\t\t\t\n\t\t\t\tif ($_imgDataId !== false && isset($_SESSION[$_imgDataId])) {\n\t\t\t\t\t\n\t\t\t\t\t$_SESSION[$_imgDataId]['doDelete'] = false;\n\t\t\t\t\t\n\t\t\t\t\tif (isset($_REQUEST[\"WE_UI_DEL_CHECKBOX_\" . $imgName]) && $_REQUEST[\"WE_UI_DEL_CHECKBOX_\" . $imgName] == 1) {\n\t\t\t\t\t\t$_SESSION[$_imgDataId]['doDelete'] = true;\n\t\t\t\t\t} else \n\t\t\t\t\t\tif ($filename) {\n\t\t\t\t\t\t\t// file is selected, check to see if it is an image\n\t\t\t\t\t\t\t$ct = getContentTypeFromFile($filename);\n\t\t\t\t\t\t\tif ($ct == \"image/*\") {\n\t\t\t\t\t\t\t\t$imgId = abs($GLOBALS[$key][$formname]->getElement($imgName));\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// move document from upload location to tmp dir\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"serverPath\"] = TMP_DIR . \"/\" . md5(\n\t\t\t\t\t\t\t\t\t\tuniqid(rand(), 1));\n\t\t\t\t\t\t\t\tmove_uploaded_file(\n\t\t\t\t\t\t\t\t\t\t$_FILES[\"we_ui_$formname\"][\"tmp_name\"][$imgName], \n\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"serverPath\"]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tinclude_once ($_SERVER[\"DOCUMENT_ROOT\"] . \"/webEdition/we/include/we_classes/base/we_thumbnail.class.php\");\n\t\t\t\t\t\t\t\t$we_size = we_thumbnail::getimagesize($_SESSION[$_imgDataId][\"serverPath\"]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (count($we_size) == 0) {\n\t\t\t\t\t\t\t\t\tunset($_SESSION[$_imgDataId]);\n\t\t\t\t\t\t\t\t\treturn;\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\t$tmp_Filename = $imgName . \"_\" . md5(uniqid(rand(), 1)) . \"_\" . preg_replace(\n\t\t\t\t\t\t\t\t\t\t\"/[^A-Za-z0-9._-]/\", \n\t\t\t\t\t\t\t\t\t\t\"\", \n\t\t\t\t\t\t\t\t\t\t$_FILES[\"we_ui_$formname\"][\"name\"][$imgName]);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif ($imgId) {\n\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"id\"] = $imgId;\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\t$_SESSION[$_imgDataId][\"fileName\"] = eregi_replace(\n\t\t\t\t\t\t\t\t\t\t'^(.+)\\..+$', \n\t\t\t\t\t\t\t\t\t\t\"\\\\1\", \n\t\t\t\t\t\t\t\t\t\t$tmp_Filename);\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"extension\"] = (strpos($tmp_Filename, \".\") > 0) ? eregi_replace(\n\t\t\t\t\t\t\t\t\t\t'^.+(\\..+)$', \n\t\t\t\t\t\t\t\t\t\t\"\\\\1\", \n\t\t\t\t\t\t\t\t\t\t$tmp_Filename) : \"\";\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"text\"] = $_SESSION[$_imgDataId][\"fileName\"] . $_SESSION[$_imgDataId][\"extension\"];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//image needs to be scaled\n\t\t\t\t\t\t\t\tif ((isset(\n\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"width\"]) && $_SESSION[$_imgDataId][\"width\"]) || (isset(\n\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"height\"]) && $_SESSION[$_imgDataId][\"height\"])) {\n\t\t\t\t\t\t\t\t\t$fh = fopen($_SESSION[$_imgDataId][\"serverPath\"], \"rb\");\n\t\t\t\t\t\t\t\t\t$imageData = fread($fh, filesize($_SESSION[$_imgDataId][\"serverPath\"]));\n\t\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t\t\t$thumb = new we_thumbnail();\n\t\t\t\t\t\t\t\t\t$thumb->init(\n\t\t\t\t\t\t\t\t\t\t\t\"dummy\", \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"width\"], \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"height\"], \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"keepratio\"], \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"maximize\"], \n\t\t\t\t\t\t\t\t\t\t\tfalse, \n\t\t\t\t\t\t\t\t\t\t\t'', \n\t\t\t\t\t\t\t\t\t\t\t\"dummy\", \n\t\t\t\t\t\t\t\t\t\t\t0, \n\t\t\t\t\t\t\t\t\t\t\t\"\", \n\t\t\t\t\t\t\t\t\t\t\t\"\", \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"extension\"], \n\t\t\t\t\t\t\t\t\t\t\t$we_size[0], \n\t\t\t\t\t\t\t\t\t\t\t$we_size[1], \n\t\t\t\t\t\t\t\t\t\t\t$imageData, \n\t\t\t\t\t\t\t\t\t\t\t\"\", \n\t\t\t\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"quality\"]);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$imgData = \"\";\n\t\t\t\t\t\t\t\t\t$thumb->getThumb($imgData);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$fh = fopen($_SESSION[$_imgDataId][\"serverPath\"], \"wb\");\n\t\t\t\t\t\t\t\t\tfwrite($fh, $imgData);\n\t\t\t\t\t\t\t\t\tfclose($fh);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$we_size = we_thumbnail::getimagesize($_SESSION[$_imgDataId][\"serverPath\"]);\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\t$_SESSION[$_imgDataId][\"imgwidth\"] = $we_size[0];\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"imgheight\"] = $we_size[1];\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"type\"] = $_FILES[\"we_ui_$formname\"][\"type\"][$imgName];\n\t\t\t\t\t\t\t\t$_SESSION[$_imgDataId][\"size\"] = $_FILES[\"we_ui_$formname\"][\"size\"][$imgName];\n\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}\n\t\t\t\n\t\t\t}\n\t\t}\n\t}\n}","title":""},{"docid":"1096df07216db9789774c8dfb0f56708","score":"0.63034546","text":"public function testUpload() {\n // setup\n $file = tempnam(null, null);\n file_put_contents($file, 'sample text');\n $_FILES['test_file'] = array();\n $_FILES['test_file']['error'] = false;\n $_FILES['test_file']['name'] = \"testfile.txt\";\n $_FILES['test_file']['type'] = \"text/plain\";\n $_FILES['test_file']['tmp_name'] = $file;\n // test upload\n $expected = 'sample text';\n $f = new Representation(null, 'multipart/form-data');\n $f->receive();\n // test name\n $this->assertEquals('testfile.txt', $f->getData()->files->test_file->name);\n $this->assertEquals('text/plain', $f->getData()->files->test_file->type);\n $this->assertEquals('sample text', $f->getData()->files->test_file->contents);\n $this->assertEquals(strlen('sample text'), $f->getData()->files->test_file->size);\n // teardown\n unlink($file);\n }","title":""},{"docid":"0e2580e5c39cf8b65fb95fee618f5305","score":"0.63025755","text":"function handelWithImageFile()\n {\n try {\n\n // Undefined | Multiple Files | $_FILES Corruption Attack\n // If this request falls under any of them, treat it invalid.\n if (\n !isset($_FILES['upfile']['error']) ||\n is_array($_FILES['upfile']['error'])\n ) {\n $this->erorr=true;\n throw new RuntimeException('Invalid Image file parameters.');\n \n }\n\n // Check $_FILES['upfile']['error'] value.\n switch ($_FILES['upfile']['error']) {\n case UPLOAD_ERR_OK:\n break;\n case UPLOAD_ERR_NO_FILE:\n throw new RuntimeException('No file sent.');\n case UPLOAD_ERR_INI_SIZE:\n case UPLOAD_ERR_FORM_SIZE:\n throw new RuntimeException('Exceeded filesize limit.');\n default:\n throw new RuntimeException('Unknown errors.');\n }\n\n // You should also check filesize here. \n if ($_FILES['upfile']['size'] > 1000000) {\n throw new RuntimeException('Exceeded filesize limit of the Image.');\n }\n\n // DO NOT TRUST $_FILES['upfile']['mime'] VALUE !!\n // Check MIME Type by yourself.\n $finfo = new finfo(FILEINFO_MIME_TYPE);\n if (false === $ext = array_search(\n $finfo->file($_FILES['upfile']['tmp_name']),\n array(\n 'jpg' => 'image/jpeg',\n 'png' => 'image/png',\n 'gif' => 'image/gif',\n ),\n true\n )) {\n throw new RuntimeException('Invalid image file format.');\n }\n\n // You should name it uniquely.\n // DO NOT USE $_FILES['upfile']['name'] WITHOUT ANY VALIDATION !!\n // On this example, obtain safe unique name from its binary data.\n if(!$this->error)\n {\n //this is just to check if there is error perviously\n $fileName = sha1_file($_FILES['upfile']['tmp_name']);\n file_put_contents(\"test.txt\", $fileName);\n $fileParts = array($_POST['name'], $_POST['familyName'], $fileName);\n $fileNewName = implode(\"_\", $fileParts);\n $fileNewName = str_replace(\" \", \"_\", $fileNewName);\n if (!move_uploaded_file(\n $_FILES['upfile']['tmp_name'],\n sprintf(\n './uploads/%s.%s',\n $fileNewName,\n $ext\n )\n )) {\n throw new RuntimeException('Failed to move uploaded image file.');\n }\n // $_POST['name'];\n }\n\n } catch (RuntimeException $e) {\n $this->erorr = true;\n $this->errors[\"file\"] = $e->getMessage();\n $this->status = \"error\";\n $this->handelResponse = \"Image could not be uploaded.\";\n $this->message = $e->getMessage();\n }\n }","title":""},{"docid":"f101ac51252ce7bc4fda026e30d382dd","score":"0.6300739","text":"function upload_image(){\n global $wpdb;\n if($_FILES['file'] != null){\n $uploadedfile = $_FILES['file'];\n $upload_overrides = ['test_form' => false ];\n $movefile = wp_handle_upload( $uploadedfile,$upload_overrides );\n if($movefile && ! isset($movefile['error'])){\n return $movefile['url'];\n }else{\n return $movefile['error'];\n }\n }else{\n return \"missing file.\";\n }\n }","title":""},{"docid":"cfbfdf0fc6c1edba624bd023921955a7","score":"0.6290498","text":"function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'withdraw_upload';\n $data['ret_Url'] = 'withdraw_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }","title":""},{"docid":"57e552e0e9599cacfccae25dcde4eb55","score":"0.6287532","text":"public function testGetImageInfo()\n\t{\n\t $info = $this->obj->getImageInfo();\n\t\n\t $this->assertEquals($info['extension'], 'jpg');\n\t $this->assertEquals($info['height'], 406);\n\t $this->assertEquals($info['width'], 960);\n\t $this->assertEquals($info['mime'], 'image/jpeg');\n\t $this->assertEquals($info['channels'], 3);\n\t $this->assertEquals($info['bits'], 8);\n\t $this->assertEquals($info['filename'], 'berserkTest');\n\t $this->assertEquals($info['basename'], 'berserkTest.jpg');\n\t $this->assertEquals($info['dirname'], realpath('./data'));\n\t}","title":""},{"docid":"82b19717f7d766f8eb92680fbbb64df9","score":"0.6284364","text":"public function uploadImage() {\n // get the uploaded file instance. for multiple file uploads\n // the following data will return an array (you may need to use\n // getInstances method)\n $image = UploadedFile::getInstance($this, 'image');\n\n // if no image was uploaded abort the upload\n if (empty($image)) {\n return false;\n }\n\n // store the source file name\n $this->filename = $image->name;\n $ext = end((explode(\".\", $image->name)));\n\n // generate a unique file name\n $this->file = Yii::$app->security->generateRandomString().\".{$ext}\";\n\n // the uploaded image instance\n return $image;\n }","title":""},{"docid":"14ea5d9a7f97081df11fda9ef0c111b2","score":"0.62815636","text":"private function upload_image()\r\n {\r\n // Set upload preferences\r\n $config['upload_path'] = FCPATH . '/uploads/';\r\n $config['max_size'] = 4096; // KB\r\n $config['allowed_types'] = 'gif|jpg|png';\r\n\r\n // Load upload library\r\n $this->load->library('upload', $config);\r\n\r\n // Attempt upload\r\n if($this->upload->do_upload('upload-file') == false)\r\n {\r\n // Something went wrong\r\n $this->data['upload_errors'] = $this->upload->display_errors();\r\n }\r\n else\r\n {\r\n // Upload success\r\n $this->data['upload_errors'] = \"

    SUCCESS

    \";\r\n }\r\n }","title":""},{"docid":"6c2fb977aaf0f8f8c538841fbcf42210","score":"0.6260722","text":"public function upload()\n {\n if (null === $this->getImage()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getImage()->move(\n $this->getUploadRootDir(),\n $this->getImage()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->image = $this->getUploadDir() . '/' . $this->getImage()->getClientOriginalName();\n }","title":""},{"docid":"c0f5fa69ffd4e81ef5d4e8a05b9f3510","score":"0.6257407","text":"public function testFileUpload($data='') {\n if (isset($_POST[\"data\"]) && ($_POST[\"data\"] !=\"\")){\n $data = $_POST[\"data\"];\n $data = base64_decode($data);\n $im = imagecreatefromstring($data);\n }\n //make a file name\n $filename = \"test\";\n\n //save the image to the disk\n if (isset($im) && $im != false) {\n $imgFile = $path = realpath('.').\"/media/csimages/\".$filename.\".jpg\";\n\n //delete the file if it already exists\n if(file_exists($imgFile)){\n unlink($imgFile);\n }\n\n $result = imagepng($im, $imgFile);\n imagedestroy($im);\n return \"/\".$filename.\".jpg\";\n }\n else {\n return 'Error';\n }\n }","title":""},{"docid":"7a3538ae4491db77738e798d78f10ef6","score":"0.6256018","text":"public function test_profilePrototypeCreateImage() {\n\n }","title":""},{"docid":"fb3615f25287c06746baf02257c39485","score":"0.6254192","text":"public function testSignupWithOutAvatarFile() {\n $testfile = \"test.jpg\";\n $path = dirname(__DIR__) . '/storage/test_files/' . $testfile;\n $mime = Storage::disk('public')->mimeType('/test_files/' . $testfile);\n $file = new UploadedFile($path, $testfile, filesize($path), $mime, null, true); \n $data = [\n 'email' => 'sergi.redorta@hotmail.com',\n 'firstName' => 'sergi',\n 'lastName' => 'Redorta',\n 'mobile' => '0623133213',\n 'password'=> 'Secure0', \n ]; \n $response = $this->post('api/auth/signup', $data);\n $user = User::all()->last();\n //dd($user->attachments()->with('thumbs')->get()->toArray());\n //dd(Attachment::find(1)->with('thumbs')->get()->toArray());\n $response->assertStatus(200)->assertJson(['response'=>'success', 'message'=>'auth.signup_success']); \n $this->assertDatabaseHas('users', [\n 'email' => 'sergi.redorta@hotmail.com'\n ]); \n $this->assertDatabaseHas('attachments', [\n 'attachable_id' => 1,\n 'attachable_type' => User::class,\n 'alt_text' => 'avatar'\n ]); \n $this->assertDatabaseMissing('thumbs', [\n 'id' => 1,\n 'attachment_id' => 1,\n 'size' => 'full',\n 'width' => '285'\n ]); \n }","title":""},{"docid":"e7afde1d2cad657fcb335ae7d1060299","score":"0.6252463","text":"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n if ($this->getImage()) {\n $filename = __DIR__ . \"/../../../web{$this->getImage()}\";\n if (file_exists($filename)) {\n unlink($filename);\n }\n }\n\n $uploadDir = UploadImageService::UPLOAD_IMAGE_PATH;\n $nameImage = $uploadDir.md5(uniqid(time(), true)).'.png';\n $this->getFile()->move($uploadDir, $nameImage);\n\n $this->image = $nameImage;\n $this->setFile(null);\n }","title":""},{"docid":"d6de86a9f98844f1612640759df2bb7f","score":"0.62504286","text":"final public function upload($key){\n //Working with Images files\n if( is_array($this->uploadFields[$key]) && array_key_exists('isImage', $this->uploadFields[$key]) && $this->uploadFields[$key]['isImage'] ){\n try {\n //Moving the image files to storage config in the app\n $localStorage = \\Config::get('filesystems');\n $tmpRoute = $localStorage['disks']['local']['root'].'/LaCrud/';\n $tmpFileName = str_random(10).'-'.$this->attributes[$key]->getClientOriginalName();\n $tmpImage = $this->attributes[$key]->move($tmpRoute,$tmpFileName);\n\n //Creating the object image\n $imageManager = new ImageManager(array('driver' => 'imagick'));\n $image = $imageManager->make( $tmpImage );\n\n //Rsolve the permission path on app and sizes\n if( array_key_exists('public',$this->uploadFields[$key]) || array_key_exists('private',$this->uploadFields[$key]) ){\n if( array_key_exists('public',$this->uploadFields[$key]) ){\n $tmpFileName = $this->moveUploadFile($key,'public',$image);\n }\n if( array_key_exists('private',$this->uploadFields[$key]) ){\n $tmpFileName = $this->moveUploadFile($key,'private',$image);\n }\n }\n else{\n \\Storage::disk('local')->delete( 'LaCrud/'.$tmpFileName );\n throw new \\Exception(\"The field's configuration not has a public or private path to move the file\");\n }\n\n } catch (NotReadableException $e) {\n \\Storage::disk('local')->delete( 'LaCrud/'.$tmpFileName );\n throw new NotReadableException($e->getMessage());\n }\n }\n //Working with others files\n else{\n if( is_array($this->uploadFields[$key]) ){\n if( array_key_exists('public',$this->uploadFields[$key]) || array_key_exists('private',$this->uploadFields[$key]) ){\n if( array_key_exists('public',$this->uploadFields[$key]) ){\n $tmpFileName = $this->moveUploadFile($key,'public');\n }\n if( array_key_exists('private',$this->uploadFields[$key]) ){\n $tmpFileName = $this->moveUploadFile($key,'private');\n }\n }\n else{\n throw new \\Exception(\"The field's configuration not has a public or private path to move the file\");\n }\n }\n else{\n $tmpRoute = public_path().'/'.$this->uploadFields[$key];\n $tmpFileName = str_random(10).'-'.$this->attributes[$key]->getClientOriginalName();\n $this->attributes[$key]->move($tmpRoute,$tmpFileName);\n }\n }\n return $tmpFileName;\n }","title":""},{"docid":"f61b4a32593ceccd7d70d22de14e73a6","score":"0.62460035","text":"public function testImagesUpdateFolder()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"a0056ce01961cf16e9a9a8890a35e02c","score":"0.6226753","text":"public function imagesFromUrlTest() {\n\n }","title":""},{"docid":"5df6a299d5b5fdbb80c3d75e2ee7135d","score":"0.6222244","text":"public static function uploadImage() {\n // get the uploaded file instance. for multiple file uploads\n // the following data will return an array (you may need to use\n // getInstances method)\n $image = UploadedFile::getInstance($this, 'gambar');\n\n \n // if no image was uploaded abort the upload\n if (empty($image)) {\n return false;\n }\n \n // store the source file name\n //$this->gru_att_orgfile = $image->name;\n $ext = end((explode(\".\", $image->name)));\n \n // generate a unique file name\n $this->gambar = Yii::$app->security->generateRandomString().\".{$ext}\";\n \n // the uploaded image instance\n return $image;\n }","title":""}],"string":"[\n {\n \"docid\": \"b107068a5dd680fe755279d81665c1d8\",\n \"score\": \"0.8225248\",\n \"text\": \"public function testUploadOptionSetImage()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc640f407a5424ab2393e457988a5110\",\n \"score\": \"0.8173278\",\n \"text\": \"public function testUploadImage()\\n {\\n// Storage::fake('local');\\n $user = User::factory()->create();\\n\\n $response = $this->actingAs($user)\\n ->withSession(['banned' => false])\\n ->get('/');\\n\\n $images = Image::factory(Image::class)->create();\\n $imagePath = $images->image;\\n $this->post('/image', [\\n 'image[]' => $images\\n ]);\\n if (file_exists($imagePath)) {\\n $response = 0;\\n } else $response = 1;\\n // $imageDb= Image::where(config('constants.image.id'), 30)->get()->toArray();\\n Storage::assertExists($imagePath);\\n\\n $response->assertOk();\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08cfd2a0202857fd355281fdc1abc8ea\",\n \"score\": \"0.7680398\",\n \"text\": \"public function testSingleImageUpload() {\\n\\t\\t$folder_location \\t\\t\\t\\t= isset($this->request->data['folder_location']) ? $this->request->data['folder_location'] : \\\"\\\";\\n\\t\\t$attachment \\t\\t\\t\\t\\t= isset($this->request->data['attachment']) ? $this->request->data['attachment'] : \\\"\\\";\\n\\t\\t$image_data = isset($this->request->data['image_data']) ? $this->request->data['image_data'] : '';\\n\\n\\n\\t\\t$arr = base64_decode($image_data);\\n\\t\\t$fname = \\\"/var/www/AIMS/shoutoutcity/\\\".$attachment['name'];\\n\\t\\t$handle = fopen($fname, \\\"w+\\\");\\n\\t\\tfwrite($handle, $arr);\\n\\t\\tfclose($handle);\\n\\t\\tif(!file_exists($fname))\\n\\n\\t\\t$responce['status'] = 'error';\\n\\t\\t$responce['message'] = 'Error occured while uploading images';\\n\\t\\t$this->set(array(\\n 'venues' \\t\\t=> $responce,\\n '_serialize' \\t=> array('venues'),\\n ));\\n unset($venues);\\n\\t\\texit();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8cc05f50bdbf81622ed966dc2b3aab8e\",\n \"score\": \"0.7533741\",\n \"text\": \"public function test_upload_photo()\\n {\\n $response = $this->actingAs($this->user)\\n ->json('POST', route('image.upload'), [\\n 'image' => UploadedFile::fake()->image('avatar.jpg'),\\n 'visibility' => 1,\\n 'category' => 'Men'\\n ]);\\n\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b5c4436ab0f2be0edbdf7aabcf92bd0\",\n \"score\": \"0.74113375\",\n \"text\": \"public function testRetrieveImage1()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"858a925d3697906d4432698ad39d51da\",\n \"score\": \"0.7382886\",\n \"text\": \"public function testFileUpload()\\n {\\n Storage::fake('TestFile');\\n\\n $response = $this->json('POST', '/TestFile', [\\n 'TestFile' => UploadedFile::fake()->image('TestFile.jpg')\\n ]);\\n\\n // File is saved\\n Storage::disk('TestFile')->assertExists('TestFile.jpg');\\n\\n // File is not saved\\n Storage::disk('TestFile')->assertMissing('TestFile.jpg');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78d318d4381784c811625ab943fa39ac\",\n \"score\": \"0.728763\",\n \"text\": \"public function testUploading()\\n {\\n \\t$client = static::createClient();\\n\\n $client->request('GET', '/');\\n\\n //create dummy file\\n $file = tempnam(sys_get_temp_dir(), 'upl'); // create file\\n imagepng(imagecreatetruecolor(10, 10), $file);\\n\\t\\t$photo = new UploadedFile(\\n $file,\\n\\t\\t 'someFile.jpg',\\n\\t\\t 'image/jpeg',\\n\\t\\t 123\\n\\t\\t);\\n\\n\\t\\t$client->request('POST', '/_uploader/gallery/upload', array('file' => $photo), array(), array(\\n \\t\\t'HTTP_X-Requested-With' => 'XMLHttpRequest'\\n\\t\\t));\\n\\n\\t\\t$this->assertTrue($client->getResponse()->isSuccessful());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b54348b93eabecb3332fe3764235303b\",\n \"score\": \"0.7099252\",\n \"text\": \"public function test_postPrototypeGetImage() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a7ce6c9b6679cb0788e9b60fd31bc46\",\n \"score\": \"0.70860523\",\n \"text\": \"public function testUpload () {\\n\\t\\techo \\\"test elegant upload\\\";\\n\\t\\treturn;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd3330eb59faa24c2f635149f576e023\",\n \"score\": \"0.70811886\",\n \"text\": \"public function testUploadAnImageForAProduct()\\n {\\n $this->markTestSkipped();\\n\\n // TODO: create a mock image file\\n\\n $prod = $this->generateProducts()->first();\\n $filePath = base_path().$product->id.\\\"-\\\".$file->getClientOriginalName();\\n\\n $response = $this->call('PUT', \\\"/products/{$prod->id}/image\\\");\\n $this->seeInDatabase('products', [\\n 'id' => $prod->id,\\n 'image' => $filePath,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b293538c0028512e7a06842cf16ef588\",\n \"score\": \"0.7074762\",\n \"text\": \"public function testOwnerUploadFile()\\n {\\n Storage::fake('upload');\\n $file = UploadedFile::fake()->image('test.jpg');\\n $project = Project::first();\\n $user = User::first();\\n\\n $response = $this->actingAs($user)->post('/projects/'.$project->id.'/file', [\\n 'attchement' => $file\\n ]);\\n $response->assertStatus(302);\\n $response->assertSessionHas(\\\"success\\\",__(\\\"project.file_success\\\", ['filename' => $file->name]));\\n\\n //Storage::disk('upload')->assertExists($file->hashName());\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e956c806dfa06274733e6a27bc98132b\",\n \"score\": \"0.7025675\",\n \"text\": \"public function test_image_can_be_upladed()\\n {\\n $this->withoutExceptionHandling();\\n $this->actingAs($user = factory(User::class)->create(), 'api');\\n\\n $file = UploadedFile::fake()->image('user-image.png');\\n\\n $response = $this->post('api/users/' . $user->id . '/images', [\\n 'image' => $file,\\n 'heigh' => 200,\\n 'width' => 300,\\n 'location' => 'cover'\\n ])->assertStatus(201);\\n\\n Storage::disk('s3')->assertExists('user-images/' . $file->hashName());\\n\\n $image = Image::first();\\n $this->assertEquals('user-images/' . $file->hashName(), $image->path);\\n $this->assertEquals('200', $image->heigh);\\n $this->assertEquals('300', $image->width);\\n\\n $response->assertJson([\\n 'data' => [\\n 'type' => 'images',\\n 'id' => $image->id,\\n 'attributes' => [\\n 'path' => Config::get('aws.s3_url').$image->path,\\n 'width' => $image->width,\\n 'heigh' => $image->heigh,\\n 'location' => $image->location,\\n ],\\n 'links' => [\\n 'self' => url('api/images/')\\n ]\\n ]\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"302cb6b449ba101a65d9bb155b7f5297\",\n \"score\": \"0.6983325\",\n \"text\": \"public function testStore() {\\n Storage::fake('images');\\n\\n $response = $this->json('POST', 'api/v1/images', [\\n 'fileNames' => [UploadedFile::fake()->image('photo1.jpg', 600, 600),\\n UploadedFile::fake()->image('photo2.jpg', 1000, 1000)]\\n ])->assertStatus(200)->decodeResponseJson();\\n\\n $imageOriginal1Path = $response['images'][0]['original']['path'];\\n $imageOriginal1Thumb100 = $response['images'][0]['thumbs']['100x100']['path'];\\n $imageOriginal1Thumb400 = $response['images'][0]['thumbs']['400x400']['path'];\\n\\n $imageOriginal2Path = $response['images'][1]['original']['path'];\\n $imageOriginal2Thumb100 = $response['images'][1]['thumbs']['100x100']['path'];\\n $imageOriginal2Thumb400 = $response['images'][1]['thumbs']['400x400']['path'];\\ndd($this->get('/images/60647991540d2.jpeg')->assertOk());\\n $this->get($imageOriginal1Path)->assertRedirect();\\n $this->get($imageOriginal1Thumb100)->assertStatus(200);\\n $this->get($imageOriginal1Thumb400)->assertStatus(200);\\n\\n $this->get($imageOriginal2Path)->assertStatus(200);\\n $this->get($imageOriginal2Thumb100)->assertStatus(200);\\n $this->get($imageOriginal2Thumb400)->assertStatus(200);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4329e3c6760db3bdc8b54e3a8d199ff0\",\n \"score\": \"0.69624776\",\n \"text\": \"public function testImagesUpdate()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b523e14d0d67d1986ad8aefcdff26ba\",\n \"score\": \"0.6958292\",\n \"text\": \"public function testImagesGet()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"062ab0083e320a2d17ec2175cecc97c3\",\n \"score\": \"0.6945325\",\n \"text\": \"function Trigger_ImageUpload1(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"logotipo\\\");\\n $uploadObj->setDbFieldName(\\\"logotipo\\\");\\n $uploadObj->setFolder(\\\"../../Uploads/fotos/\\\");\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b68a1f75a1868b35bd30053f7824a4e\",\n \"score\": \"0.6932921\",\n \"text\": \"public function testImagesGetFile()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee3e588736b32e45e56ff379347e8d04\",\n \"score\": \"0.6928883\",\n \"text\": \"public function uploadAdPhoto(){\\n $this->page()\\n ->findAndAssertThat()\\n ->existsOnlyOnce()\\n ->elementWithCss(self::ELEMENT_IMG_INPUT_UPLOAD_CSS)\\n ->sendKeys(self::STRING_IMG_LOCATION);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da0b77bac0130e17c0e8ac1bc9bfa06a\",\n \"score\": \"0.69245344\",\n \"text\": \"public function uploadAction()\\n {\\n if(strtolower($_SERVER['REQUEST_METHOD']) != 'post'){\\n exit;\\n }\\n\\n $original = APPLICATION_PATH_TMP . '/'. md5($_SERVER['REMOTE_ADDR'].rand()).'.jpg';\\n\\n // The JPEG snapshot is sent as raw input:\\n $input = file_get_contents('php://input');\\n\\n if(md5($input) == '7d4df9cc423720b7f1f3d672b89362be'){\\n // Blank image. We don't need this one.\\n exit;\\n }\\n\\n $result = file_put_contents($original, $input);\\n if (!$result) {\\n echo '{\\n \\\"error\\\"\\t\\t: 1,\\n \\\"message\\\"\\t: \\\"Failed save the image. Make sure you chmod the uploads folder and its subfolders to 777.\\\"\\n }';\\n exit;\\n }\\n\\n $info = getimagesize($original);\\n if($info['mime'] != 'image/jpeg'){\\n @unlink($original);\\n exit;\\n }\\n\\n $storage = Engine_Api::_()->getItemTable('storage_file');\\n $file = $storage->createTemporaryFile($original);\\n @unlink($original);\\n\\n\\n $viewer = Engine_Api::_()->user()->getViewer();\\n $table = Engine_Api::_()->getDbtable('albums', 'album');\\n $db = $table->getAdapter();\\n $db->beginTransaction();\\n\\n try\\n {\\n $type = $this->_getParam('type', 'wall');\\n\\n if (empty($type)) $type = 'wall';\\n\\n $album = $table->getSpecialAlbum($viewer, $type);\\n\\n $photoTable = Engine_Api::_()->getDbtable('photos', 'album');\\n $photo = $photoTable->createRow();\\n $photo->setFromArray(array(\\n 'owner_type' => 'user',\\n 'owner_id' => Engine_Api::_()->user()->getViewer()->getIdentity()\\n ));\\n $photo->save();\\n $photo->setPhoto($file);\\n\\n // delete old file\\n $file->delete();\\n\\n if( $type == 'message' ) {\\n $photo->title = Zend_Registry::get('Zend_Translate')->_('Attached Image');\\n }\\n\\n $photo->album_id = $album->album_id;\\n $photo->save();\\n\\n if( !$album->photo_id ) {\\n $album->photo_id = $photo->getIdentity();\\n $album->save();\\n }\\n\\n if( $type != 'message' ) {\\n // Authorizations\\n $auth = Engine_Api::_()->authorization()->context;\\n $auth->setAllowed($photo, 'everyone', 'view', true);\\n $auth->setAllowed($photo, 'everyone', 'comment', true);\\n }\\n\\n $db->commit();\\n\\n $this->view->status = true;\\n $this->view->photo_id = $photo->photo_id;\\n $this->view->album_id = $album->album_id;\\n $this->view->src = $photo->getPhotoUrl();\\n $this->view->message = Zend_Registry::get('Zend_Translate')->_('Photo saved successfully');\\n \\n }\\n\\n catch( Exception $e )\\n {\\n $db->rollBack();\\n //throw $e;\\n $this->view->status = false;\\n }\\n\\n\\n\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9deb13879eacb6c60cb800097b392254\",\n \"score\": \"0.69205457\",\n \"text\": \"public function testFileUpload()\\n {\\n Storage::fake('profiles');\\n $file = UploadedFile::fake()->image('profile_pic.jpg');\\n\\n $response = $this->post('/', [\\n 'file' => $file,\\n ]);\\n\\n // Redirect means we passed validation and uploaded file without error.\\n $response->assertStatus(302);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89f51e21ae2adcfa3ba969e11a8ef735\",\n \"score\": \"0.691341\",\n \"text\": \"function Trigger_ImageUpload1(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"logotipo\\\");\\n $uploadObj->setDbFieldName(\\\"logotipo\\\");\\n $uploadObj->setFolder(\\\"../Uploads/fotos/\\\");\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82ceb3e1e5748cc6ad4aa47f972d94a4\",\n \"score\": \"0.690438\",\n \"text\": \"function _uploadImage()\\n {\\n global $_TABLES, $_DLM_CONF;\\n\\n $newimage_name = COM_applyFilter($_FILES['imgurl']['name']);\\n if (!empty($newimage_name)) {\\n $name = $this->_createFilename($newimage_name);\\n if (DLM_uploadNewFile($_FILES['imgurl'], $_DLM_CONF['path_snapcat'], $name)) {\\n $this->_imgurl = $name;\\n }\\n } else if ($this->_deleteimg) {\\n $this->_imgurl = '';\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2dafbcf01e45f3a2a31c69033244475f\",\n \"score\": \"0.68846464\",\n \"text\": \"function Trigger_ImageUpload(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"imagem\\\");\\n $uploadObj->setDbFieldName(\\\"imagem\\\");\\n $uploadObj->setFolder(\\\"../up/\\\");\\n $uploadObj->setResize(\\\"true\\\", 500, 0);\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc4d65267af026682aa4145c1d6db35d\",\n \"score\": \"0.68828654\",\n \"text\": \"function Trigger_ImageUpload(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto\\\");\\n $uploadObj->setDbFieldName(\\\"foto\\\");\\n $uploadObj->setFolder(\\\"../../Uploads/fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 600, 0);\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e45160ed71571753711db38fbc9966c2\",\n \"score\": \"0.6871591\",\n \"text\": \"function Trigger_ImageUpload(&$tNG) {\\r\\r\\n $uploadObj = new tNG_ImageUpload($tNG);\\r\\r\\n $uploadObj->setFormFieldName(\\\"photo1\\\");\\r\\r\\n $uploadObj->setDbFieldName(\\\"photo1\\\");\\r\\r\\n $uploadObj->setFolder(\\\"assets/images/produits/\\\");\\r\\r\\n $uploadObj->setResize(\\\"true\\\", 400, 400);\\r\\r\\n $uploadObj->setMaxSize(1500);\\r\\r\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\r\\r\\n $uploadObj->setRename(\\\"auto\\\");\\r\\r\\n return $uploadObj->Execute();\\r\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de5a9d03f374db529391f9bb6e0456ce\",\n \"score\": \"0.6871384\",\n \"text\": \"function img_upload()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0bb46224c88fb4c5312672083f7b71c\",\n \"score\": \"0.6869994\",\n \"text\": \"public function testImagesCreate()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1361da57092eb90c697741fd804ef6b8\",\n \"score\": \"0.6869558\",\n \"text\": \"function Trigger_ImageUpload1(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto1\\\");\\n $uploadObj->setDbFieldName(\\\"foto1\\\");\\n $uploadObj->setFolder(\\\"../../fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 600, 0);\\n $uploadObj->setMaxSize(2000);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b68ff889aee1c65787bacfb40e8dcf6e\",\n \"score\": \"0.68566394\",\n \"text\": \"public function getImageUpload()\\n {\\n $this->imageFile = UploadedFile::getInstance($this, 'imageFile');\\n if($this->imageFile){\\n if(!$this->isNewRecord)\\n $this->tmp_imageUpdate = $this->gambar;\\n $this->gambar = $this->getNewNameFile($this->imageFile);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9657c9a409b18d98a3e6bfc33ef7cbb3\",\n \"score\": \"0.6837782\",\n \"text\": \"function Trigger_ImageUpload(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto\\\");\\n $uploadObj->setDbFieldName(\\\"foto\\\");\\n $uploadObj->setFolder(\\\"../Uploads/fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 500, 0);\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0bc0ca533185a324df835c7f8c9490a\",\n \"score\": \"0.6812084\",\n \"text\": \"function Trigger_ImageUpload1(&$tNG) {\\r\\r\\n $uploadObj = new tNG_ImageUpload($tNG);\\r\\r\\n $uploadObj->setFormFieldName(\\\"photo2\\\");\\r\\r\\n $uploadObj->setDbFieldName(\\\"photo2\\\");\\r\\r\\n $uploadObj->setFolder(\\\"assets/images/produits/\\\");\\r\\r\\n $uploadObj->setResize(\\\"true\\\", 400, 400);\\r\\r\\n $uploadObj->setMaxSize(1500);\\r\\r\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\r\\r\\n $uploadObj->setRename(\\\"auto\\\");\\r\\r\\n return $uploadObj->Execute();\\r\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da9feec384bda5a5e823290180c21559\",\n \"score\": \"0.6773777\",\n \"text\": \"public function uploadActionImage()\\n {\\n if ($this->request->hasFiles() == true) {\\n $baseLocation = 'files/';\\n\\n // Print the real file names and sizes\\n foreach ($this->request->getUploadedFiles() as $file) {\\n $photos = new Photo(); \\n $photos->name = $file->getName();\\n $photos->size = $file->getSize();\\n $photos->save();\\n\\n //Move the file into the application\\n $file->moveTo($baseLocation . $file->getName());\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8394a4838f97bf0bc96ada84cdac82a4\",\n \"score\": \"0.6759883\",\n \"text\": \"function Trigger_ImageUpload2(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto1\\\");\\n $uploadObj->setDbFieldName(\\\"foto1\\\");\\n $uploadObj->setFolder(\\\"../Uploads/fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 200, 0);\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a1726e76d4e18b721540a36d65433d1\",\n \"score\": \"0.6755998\",\n \"text\": \"public function test_postPrototypeUpdateImage() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"016d9ac2e5473d50d63943c2a716400b\",\n \"score\": \"0.6752567\",\n \"text\": \"function Trigger_ImageUpload(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"fotoDestaque\\\");\\n $uploadObj->setDbFieldName(\\\"fotoDestaque\\\");\\n $uploadObj->setFolder(\\\"../../fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 400, 0);\\n $uploadObj->setMaxSize(2000);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9bfb3fa54b9db77c20830265b78e898f\",\n \"score\": \"0.6724284\",\n \"text\": \"function Trigger_ImageUpload2(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"gif_nome\\\");\\n $uploadObj->setDbFieldName(\\\"gif_nome\\\");\\n $uploadObj->setFolder(\\\"../../Uploads/fotos/\\\");\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15d282dffc0e8e18cf200d368e48387d\",\n \"score\": \"0.6724155\",\n \"text\": \"function Trigger_ImageUpload2(&$tNG) {\\r\\r\\n $uploadObj = new tNG_ImageUpload($tNG);\\r\\r\\n $uploadObj->setFormFieldName(\\\"photo3\\\");\\r\\r\\n $uploadObj->setDbFieldName(\\\"photo3\\\");\\r\\r\\n $uploadObj->setFolder(\\\"assets/images/produits/\\\");\\r\\r\\n $uploadObj->setResize(\\\"true\\\", 400, 400);\\r\\r\\n $uploadObj->setMaxSize(1500);\\r\\r\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\r\\r\\n $uploadObj->setRename(\\\"auto\\\");\\r\\r\\n return $uploadObj->Execute();\\r\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eed6bd62780f3e9bbd76e7efd31f8208\",\n \"score\": \"0.6711182\",\n \"text\": \"public function test_create_image_tag()\\n {\\n $data = Image::create([\\n 'name' => UploadedFile::fake()->image('avatar.jpg'),\\n 'path' => UploadedFile::fake()->image('avatar.jpg')->path(),\\n 'user_id' => $this->user->id,\\n 'visibility' => 1,\\n 'category' => 'Men'\\n ]);\\n\\n $response = $this->actingAs($this->user)\\n ->json('POST', route('image.tag.add', $data->id), [\\n 'coords' => \\\"10,10,60,105\\\",\\n 'label' => 'Bag',\\n 'description' => 'Unisex bags'\\n ]);\\n\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"615704248e8a1e9cb73d7a2a4d49eb04\",\n \"score\": \"0.66982895\",\n \"text\": \"function Trigger_ImageUpload4(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto3\\\");\\n $uploadObj->setDbFieldName(\\\"foto3\\\");\\n $uploadObj->setFolder(\\\"../Uploads/fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 200, 0);\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42a1a768a0d91ecbc44b463507a8c52a\",\n \"score\": \"0.66964376\",\n \"text\": \"function Trigger_ImageUpload(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"i_imagem\\\");\\n $uploadObj->setDbFieldName(\\\"i_imagem\\\");\\n $uploadObj->setFolder(\\\"../images/instalacoes/\\\");\\n $uploadObj->setResize(\\\"true\\\", 200, 140);\\n $uploadObj->setMaxSize(5500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"custom\\\");\\n $uploadObj->setRenameRule(\\\"{i_id}.{KT_ext}\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6727d2283bfcd287e80c236c0142912\",\n \"score\": \"0.66717464\",\n \"text\": \"function Trigger_ImageUpload2(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto2\\\");\\n $uploadObj->setDbFieldName(\\\"foto2\\\");\\n $uploadObj->setFolder(\\\"../../fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 600, 0);\\n $uploadObj->setMaxSize(2000);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95daf0f30d70228214f11a8041f040ef\",\n \"score\": \"0.6656197\",\n \"text\": \"public function testImageFail()\\n {\\n $this->auth(2);\\n\\n // Unique\\n $response = $this->post('/image');\\n $response->assertSessionHasErrors(['image', 'category_id']);\\n\\n // Image\\n $response = $this->post('/image', [\\n 'image' => 'texte',\\n ]);\\n $response->assertSessionHasErrors('image');\\n\\n // Max\\n $response = $this->post('/image', [\\n 'image' => UploadedFile::fake()->image('paysage.jpg')->size(2001),\\n 'description' => str_random(256),\\n ]);\\n $response->assertSessionHasErrors(['image', 'description']);\\n\\n // Exists\\n $response = $this->post('/image', [\\n 'category_id' => 10,\\n ]);\\n $response->assertSessionHasErrors('category_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18d8df03243415b529f942364b36c836\",\n \"score\": \"0.6639438\",\n \"text\": \"public function test_postPrototypeCreateImage() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6038038414e5c51624905f16a85d2b6a\",\n \"score\": \"0.66331\",\n \"text\": \"function Trigger_ImageUpload4(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto4\\\");\\n $uploadObj->setDbFieldName(\\\"foto4\\\");\\n $uploadObj->setFolder(\\\"../../fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 600, 0);\\n $uploadObj->setMaxSize(2000);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"143e1a6ebb591d7bf9fd6502bb97984b\",\n \"score\": \"0.66112643\",\n \"text\": \"function Trigger_ImageUpload3(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto2\\\");\\n $uploadObj->setDbFieldName(\\\"foto2\\\");\\n $uploadObj->setFolder(\\\"../Uploads/fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 200, 0);\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab8e02aca7cb241e0d2f17b2c98b925c\",\n \"score\": \"0.65715206\",\n \"text\": \"public function testGetSetImageFullPath() \\n\\t{\\n\\t $this->assertEquals($this->testImage, $this->obj->getImageFullPath());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34684b9770ddf67f1181e890a605d9dd\",\n \"score\": \"0.65639955\",\n \"text\": \"function uploadImage($folder, $image)\\n{\\n $image->store('/', $folder);\\n return $filename = $image->hashName();\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc3b045f1d0066cad3b0040fe72a5e6c\",\n \"score\": \"0.6540243\",\n \"text\": \"function Trigger_ImageUpload5(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto4\\\");\\n $uploadObj->setDbFieldName(\\\"foto4\\\");\\n $uploadObj->setFolder(\\\"../Uploads/fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 200, 0);\\n $uploadObj->setMaxSize(1500);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c35cf54d4f113b9165c1b75606205e90\",\n \"score\": \"0.6529705\",\n \"text\": \"public function uploadImage()\\n\\t{\\n\\t\\tif (null === $this->getImage()) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// use the original file name here but you should\\n\\t\\t// sanitize it at least to avoid any security issues\\n\\n\\t\\t// move takes the target directory and then the\\n\\t\\t// target filename to move to\\n\\t\\t//die();\\n\\t\\t$this->getImage()->move(\\n\\t\\t\\t$this->getUploadRootDir(),\\n\\t\\t\\t$this->getImage()->getClientOriginalName()\\n\\t\\t);\\n\\n\\t\\t// set the path property to the filename where you've saved the file\\n\\t\\t$this->image = $this->getImage()->getClientOriginalName();\\n\\n\\n\\t\\t// clean up the file property as you won't need it anymore\\n\\t\\t//$this->image = null;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"010828048b0f4d824c68ea25f5d67300\",\n \"score\": \"0.64987665\",\n \"text\": \"public function test_profilePrototypeUpdateImage() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6b1257b8318de6a588c8fbd78f55e38\",\n \"score\": \"0.6484982\",\n \"text\": \"function imageUpload() {\\n // echo 'test';exit;\\n $arg['script_url'] = url('sposts/image/upload');\\n $upload_handler = new UploadHandler($arg);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bfadde2c10cbfa62f0723fb08bc9190f\",\n \"score\": \"0.6476355\",\n \"text\": \"private function uploadImage(){\\n\\t\\t// of $_FILES.\\n\\t\\tif(!empty($_FILES)){\\n\\t\\t\\tif(filesize($_FILES['avatar']['tmp_name']) <= 512000){\\n\\t\\t\\t\\t$uploaddir = '/images/avatars/';\\n\\t\\t\\t\\t$uploadfile = $uploaddir.\\\"avatar_\\\". basename(substr($this->m_sEmail,0,7)).substr($_FILES['avatar']['name'],strpos($_FILES['avatar']['name'],\\\".\\\"));\\n\\t\\t\\t\\tdefine ('SITE_ROOT', realpath(dirname(substr($this->m_sEmail,0,7))));\\n\\t\\t\\t\\tif (!move_uploaded_file($_FILES['avatar']['tmp_name'], SITE_ROOT.$uploadfile)) {\\n\\t\\t\\t\\t\\tthrow new Exception(\\\"Avatar mag niet groter zijn dan 500KB.\\\");\\n\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t$this->m_sAvatar = \\\"avatar_\\\". basename(substr($this->m_sEmail,0,7)).substr($_FILES['avatar']['name'],strpos($_FILES['avatar']['name'],\\\".\\\"));\\n\\t\\t\\t\\t}\\n\\t\\t\\t}else{\\n\\t\\t\\t\\tthrow new Exception(\\\"Avatar mag niet groter zijn dan 500KB.\\\");\\n\\t\\t\\t}\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"858f02f2211d70450f900bf037f58f97\",\n \"score\": \"0.6475186\",\n \"text\": \"function Trigger_ImageUpload5(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto5\\\");\\n $uploadObj->setDbFieldName(\\\"foto5\\\");\\n $uploadObj->setFolder(\\\"../../fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 600, 0);\\n $uploadObj->setMaxSize(2000);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26255964514affc3460f9f416436961a\",\n \"score\": \"0.64678323\",\n \"text\": \"public function testSecurimageAction() {\\n // $img->show();\\n\\n // $this->status->ajaxReturn($result['code'], $result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24757e7e3174989665a526e66c4ccd71\",\n \"score\": \"0.6457592\",\n \"text\": \"function Trigger_ImageUpload3(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto3\\\");\\n $uploadObj->setDbFieldName(\\\"foto3\\\");\\n $uploadObj->setFolder(\\\"../../fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 600, 0);\\n $uploadObj->setMaxSize(2000);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c44c119a31f7515f23d741c65e97a01\",\n \"score\": \"0.6445629\",\n \"text\": \"public function testWidgetUpload() {\\n $assert_session = $this->assertSession();\\n $page = $this->getSession()->getPage();\\n $driver = $this->getSession()->getDriver();\\n\\n foreach ($this->getTestFiles('image') as $image) {\\n $extension = pathinfo($image->filename, PATHINFO_EXTENSION);\\n if ($extension === 'png') {\\n $png_image = $image;\\n }\\n elseif ($extension === 'jpg') {\\n $jpg_image = $image;\\n }\\n }\\n\\n if (!isset($png_image) || !isset($jpg_image)) {\\n $this->fail('Expected test files not present.');\\n }\\n\\n // Create a user that can only add media of type four.\\n $user = $this->drupalCreateUser([\\n 'access administration pages',\\n 'access content',\\n 'create basic_page content',\\n 'create type_one media',\\n 'create type_four media',\\n 'view media',\\n ]);\\n $this->drupalLogin($user);\\n\\n // Visit a node create page and open the media library.\\n $this->drupalGet('node/add/basic_page');\\n $this->openMediaLibraryForField('field_twin_media');\\n\\n // Assert the upload form is not visible for default tab type_three without\\n // the proper permissions.\\n $assert_session->elementNotExists('css', '.js-media-library-add-form');\\n\\n // Assert the upload form is not visible for the non-file based media type\\n // type_one.\\n $this->switchToMediaType('One');\\n $assert_session->elementNotExists('css', '.js-media-library-add-form');\\n\\n // Assert the upload form is visible for type_four.\\n $this->switchToMediaType('Four');\\n $assert_session->fieldExists('Add files');\\n $assert_session->pageTextContains('Maximum 2 files.');\\n\\n // Create a user that can create media for all media types.\\n $user = $this->drupalCreateUser([\\n 'access administration pages',\\n 'access content',\\n 'create basic_page content',\\n 'create media',\\n 'view media',\\n ]);\\n $this->drupalLogin($user);\\n\\n // Visit a node create page.\\n $this->drupalGet('node/add/basic_page');\\n\\n $file_storage = $this->container->get('entity_type.manager')->getStorage('file');\\n /** @var \\\\Drupal\\\\Core\\\\File\\\\FileSystemInterface $file_system */\\n $file_system = $this->container->get('file_system');\\n\\n // Add to the twin media field.\\n $this->openMediaLibraryForField('field_twin_media');\\n\\n // Assert the upload form is now visible for default tab type_three.\\n $assert_session->elementExists('css', '.js-media-library-add-form');\\n $assert_session->fieldExists('Add files');\\n\\n // Assert we can upload a file to the default tab type_three.\\n $assert_session->elementNotExists('css', '.js-media-library-add-form[data-input]');\\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_image->uri));\\n $this->assertMediaAdded();\\n $assert_session->elementExists('css', '.js-media-library-add-form[data-input]');\\n // We do not have pre-selected items, so the container should not be added\\n // to the form.\\n $assert_session->pageTextNotContains('Additional selected media');\\n // Files are temporary until the form is saved.\\n $files = $file_storage->loadMultiple();\\n $file = array_pop($files);\\n $this->assertSame('public://type-three-dir', $file_system->dirname($file->getFileUri()));\\n $this->assertTrue($file->isTemporary());\\n // Assert the revision_log_message field is not shown.\\n $upload_form = $assert_session->elementExists('css', '.js-media-library-add-form');\\n $assert_session->fieldNotExists('Revision log message', $upload_form);\\n // Assert the name field contains the filename and the alt text is required.\\n $assert_session->fieldValueEquals('Name', $png_image->filename);\\n $this->pressSaveButton(TRUE);\\n $this->waitForText('Alternative text field is required');\\n $page->fillField('Alternative text', $this->randomString());\\n $this->pressSaveButton();\\n $this->assertJsCondition('jQuery(\\\"input[name=\\\\'media_library_select_form[0]\\\\']\\\").is(\\\":focus\\\")');\\n // The file should be permanent now.\\n $files = $file_storage->loadMultiple();\\n $file = array_pop($files);\\n $this->assertFalse($file->isTemporary());\\n // Load the created media item.\\n $media_items = Media::loadMultiple();\\n $added_media = array_pop($media_items);\\n // Ensure the media item was saved to the library and automatically\\n // selected. The added media items should be in the first position of the\\n // add form.\\n $assert_session->pageTextContains('Add or select media');\\n $assert_session->pageTextContains($png_image->filename);\\n $assert_session->fieldValueEquals('media_library_select_form[0]', $added_media->id());\\n $assert_session->checkboxChecked('media_library_select_form[0]');\\n $assert_session->pageTextContains('1 of 2 items selected');\\n $assert_session->hiddenFieldValueEquals('current_selection', $added_media->id());\\n // Ensure the created item is added in the widget.\\n $this->pressInsertSelected('Added one media item.');\\n $this->waitForText($png_image->filename);\\n\\n // Remove the item.\\n $assert_session->elementExists('css', '.field--name-field-twin-media')->pressButton('Remove');\\n $this->waitForNoText($png_image->filename);\\n\\n $this->openMediaLibraryForField('field_twin_media');\\n $this->switchToMediaType('Three');\\n $png_uri_2 = $file_system->copy($png_image->uri, 'public://');\\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_2));\\n $this->waitForFieldExists('Alternative text')->setValue($this->randomString());\\n $this->pressSaveButton();\\n $this->pressInsertSelected('Added one media item.');\\n $this->waitForText($file_system->basename($png_uri_2));\\n\\n // Also make sure that we can upload to the unlimited cardinality field.\\n $this->openMediaLibraryForField('field_unlimited_media');\\n $this->switchToMediaType('Three');\\n\\n // Select a media item to check if the selection is persisted when adding\\n // new items.\\n $existing_media_name = $file_system->basename($png_uri_2);\\n $checkbox = $page->findField(\\\"Select $existing_media_name\\\");\\n $selected_item_id = $checkbox->getAttribute('value');\\n $checkbox->click();\\n $assert_session->pageTextContains('1 item selected');\\n $assert_session->hiddenFieldValueEquals('current_selection', $selected_item_id);\\n $png_uri_3 = $file_system->copy($png_image->uri, 'public://');\\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_3));\\n $this->waitForText('The media item has been created but has not yet been saved.');\\n $page->fillField('Name', 'Unlimited Cardinality Image');\\n $page->fillField('Alternative text', $this->randomString());\\n $this->pressSaveButton();\\n // Load the created media item.\\n $media_items = Media::loadMultiple();\\n $added_media = array_pop($media_items);\\n $added_media_name = $added_media->label();\\n // Ensure the media item was saved to the library and automatically\\n // selected. The added media items should be in the first position of the\\n // add form.\\n $assert_session->pageTextContains('Add or select media');\\n $assert_session->pageTextContains('Unlimited Cardinality Image');\\n $assert_session->fieldValueEquals('media_library_select_form[0]', $added_media->id());\\n $assert_session->checkboxChecked('media_library_select_form[0]');\\n // Assert the item that was selected before uploading the file is still\\n // selected.\\n $assert_session->pageTextContains('2 items selected');\\n $assert_session->checkboxChecked(\\\"Select $added_media_name\\\");\\n $assert_session->checkboxChecked(\\\"Select $existing_media_name\\\");\\n $assert_session->hiddenFieldValueEquals('current_selection', implode(',', [$selected_item_id, $added_media->id()]));\\n $selected_checkboxes = [];\\n foreach ($this->getCheckboxes() as $checkbox) {\\n if ($checkbox->isChecked()) {\\n $selected_checkboxes[] = $checkbox->getAttribute('value');\\n }\\n }\\n $this->assertCount(2, $selected_checkboxes);\\n // Ensure the created item is added in the widget.\\n $this->pressInsertSelected('Added 2 media items.');\\n $this->waitForText('Unlimited Cardinality Image');\\n\\n // Assert we can now only upload one more media item.\\n $this->openMediaLibraryForField('field_twin_media');\\n $this->switchToMediaType('Four');\\n $this->assertFalse($assert_session->fieldExists('Add file')->hasAttribute('multiple'));\\n $assert_session->pageTextContains('One file only.');\\n\\n // Assert media type four should only allow jpg files by trying a png file\\n // first.\\n $png_uri_4 = $file_system->copy($png_image->uri, 'public://');\\n $this->addMediaFileToField('Add file', $file_system->realpath($png_uri_4), FALSE);\\n $this->waitForText('Only files with the following extensions are allowed');\\n // Assert that jpg files are accepted by type four.\\n $jpg_uri_2 = $file_system->copy($jpg_image->uri, 'public://');\\n $this->addMediaFileToField('Add file', $file_system->realpath($jpg_uri_2));\\n $this->waitForFieldExists('Alternative text')->setValue($this->randomString());\\n // The type_four media type has another optional image field.\\n $assert_session->pageTextContains('Extra Image');\\n $jpg_uri_3 = $file_system->copy($jpg_image->uri, 'public://');\\n $this->addMediaFileToField('Extra Image', $this->container->get('file_system')->realpath($jpg_uri_3));\\n $this->waitForText($file_system->basename($jpg_uri_3));\\n // Ensure that the extra image was uploaded to the correct directory.\\n $files = $file_storage->loadMultiple();\\n $file = array_pop($files);\\n $this->assertSame('public://type-four-extra-dir', $file_system->dirname($file->getFileUri()));\\n $this->pressSaveButton();\\n // Ensure the media item was saved to the library and automatically\\n // selected.\\n $this->waitForText('Add or select media');\\n $this->waitForText($file_system->basename($jpg_uri_2));\\n // Ensure the created item is added in the widget.\\n $this->pressInsertSelected('Added one media item.');\\n $assert_session->pageTextContains($file_system->basename($jpg_uri_2));\\n\\n // Assert we can also remove selected items from the selection area in the\\n // upload form.\\n $this->openMediaLibraryForField('field_unlimited_media');\\n $this->switchToMediaType('Three');\\n $checkbox = $page->findField(\\\"Select $existing_media_name\\\");\\n $selected_item_id = $checkbox->getAttribute('value');\\n $checkbox->click();\\n $assert_session->hiddenFieldValueEquals('current_selection', $selected_item_id);\\n $this->assertTrue($assert_session->fieldExists('Add files')->hasAttribute('multiple'));\\n $png_uri_5 = $file_system->copy($png_image->uri, 'public://');\\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_uri_5));\\n // assertWaitOnAjaxRequest() required for input \\\"id\\\" attributes to\\n // consistently match their label's \\\"for\\\" attribute.\\n $assert_session->assertWaitOnAjaxRequest();\\n $page->fillField('Alternative text', $this->randomString());\\n $this->pressSaveButton();\\n $page->uncheckField('media_library_select_form[2]');\\n $this->waitForText('1 item selected');\\n $this->waitForText(\\\"Select $existing_media_name\\\");\\n $media_items = Media::loadMultiple();\\n $added_media = array_pop($media_items);\\n $added_media_name = $added_media->label();\\n $assert_session->pageTextContains('1 item selected');\\n $assert_session->checkboxChecked(\\\"Select $added_media_name\\\");\\n $assert_session->checkboxNotChecked(\\\"Select $existing_media_name\\\");\\n $assert_session->hiddenFieldValueEquals('current_selection', $added_media->id());\\n $this->pressInsertSelected('Added one media item.');\\n $this->waitForText($file_system->basename($png_uri_5));\\n\\n // Assert removing an uploaded media item before save works as expected.\\n $this->openMediaLibraryForField('field_unlimited_media');\\n $this->switchToMediaType('Three');\\n $this->addMediaFileToField('Add files', $this->container->get('file_system')->realpath($png_image->uri));\\n // Assert the media item fields are shown and the vertical tabs are no\\n // longer shown.\\n $this->waitForFieldExists('Alternative text');\\n $this->assertMediaAdded();\\n // Press the 'Remove button' and assert the user is sent back to the media\\n // library.\\n $page->pressButton('media-0-remove-button');\\n // Assert the remove message is shown.\\n $this->waitForText(\\\"The media item $png_image->filename has been removed.\\\");\\n // Assert the focus is shifted to the first tabbable element of the add\\n // form, which should be the source field.\\n $this->assertNoMediaAdded();\\n $assert_session->elementExists('css', '.ui-dialog-titlebar-close')->click();\\n\\n // Assert uploading multiple files.\\n $this->openMediaLibraryForField('field_unlimited_media');\\n $this->switchToMediaType('Three');\\n // Assert the existing items are remembered when adding and removing media.\\n $checkbox = $page->findField(\\\"Select $existing_media_name\\\");\\n $checkbox->click();\\n // Assert we can add multiple files.\\n $this->assertTrue($assert_session->fieldExists('Add files')->hasAttribute('multiple'));\\n // Create a list of new files to upload.\\n $filenames = [];\\n $remote_paths = [];\\n foreach (range(1, 4) as $i) {\\n $path = $file_system->copy($png_image->uri, 'public://');\\n $filenames[] = $file_system->basename($path);\\n $remote_paths[] = $driver->uploadFileAndGetRemoteFilePath($file_system->realpath($path));\\n }\\n $page->findField('Add files')->setValue(implode(\\\"\\\\n\\\", $remote_paths));\\n // Assert the media item fields are shown and the vertical tabs are no\\n // longer shown.\\n $this->assertMediaAdded();\\n // Assert all files have been added.\\n $assert_session->fieldValueEquals('media[0][fields][name][0][value]', $filenames[0]);\\n $assert_session->fieldValueEquals('media[1][fields][name][0][value]', $filenames[1]);\\n $assert_session->fieldValueEquals('media[2][fields][name][0][value]', $filenames[2]);\\n $assert_session->fieldValueEquals('media[3][fields][name][0][value]', $filenames[3]);\\n // Set alt texts for items 1 and 2, leave the alt text empty for items 3\\n // and 4 to assert the field validation does not stop users from removing\\n // items.\\n $page->fillField('media[0][fields][field_media_test_image][0][alt]', $filenames[0]);\\n $page->fillField('media[1][fields][field_media_test_image][0][alt]', $filenames[1]);\\n // Assert the file is available in the file storage.\\n $files = $file_storage->loadByProperties(['filename' => $filenames[1]]);\\n $this->assertCount(1, $files);\\n $file_1_uri = reset($files)->getFileUri();\\n // Remove the second file and assert the focus is shifted to the container\\n // of the next media item and field values are still correct.\\n $page->pressButton('media-1-remove-button');\\n $this->assertTrue($assert_session->waitForText('The media item ' . $filenames[1] . ' has been removed.'));\\n $this->assertJsCondition('jQuery(\\\"[data-media-library-added-delta=2]\\\").is(\\\":focus\\\")');\\n // Assert the file was deleted.\\n $this->assertEmpty($file_storage->loadByProperties(['filename' => $filenames[1]]));\\n $this->assertFileDoesNotExist($file_1_uri);\\n\\n // When a file is already in usage, it should not be deleted. To test,\\n // let's add a usage for $filenames[3] (now in the third position).\\n $files = $file_storage->loadByProperties(['filename' => $filenames[3]]);\\n $this->assertCount(1, $files);\\n $target_file = reset($files);\\n Media::create([\\n 'bundle' => 'type_three',\\n 'name' => 'Disturbing',\\n 'field_media_test_image' => [\\n ['target_id' => $target_file->id()],\\n ],\\n ])->save();\\n // Remove $filenames[3] (now in the third position) and assert the focus is\\n // shifted to the container of the previous media item and field values are\\n // still correct.\\n $page->pressButton('media-3-remove-button');\\n $this->assertTrue($assert_session->waitForText('The media item ' . $filenames[3] . ' has been removed.'));\\n // Assert the file was not deleted, due to being in use elsewhere.\\n $this->assertNotEmpty($file_storage->loadByProperties(['filename' => $filenames[3]]));\\n $this->assertFileExists($target_file->getFileUri());\\n\\n // The second media item should be removed (this has the delta 1 since we\\n // start counting from 0).\\n $assert_session->elementNotExists('css', '[data-media-library-added-delta=1]');\\n $media_item_one = $assert_session->elementExists('css', '[data-media-library-added-delta=0]');\\n $assert_session->fieldValueEquals('Name', $filenames[0], $media_item_one);\\n $assert_session->fieldValueEquals('Alternative text', $filenames[0], $media_item_one);\\n $media_item_three = $assert_session->elementExists('css', '[data-media-library-added-delta=2]');\\n $assert_session->fieldValueEquals('Name', $filenames[2], $media_item_three);\\n $assert_session->fieldValueEquals('Alternative text', '', $media_item_three);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5535d8c37fa12df6a589a5a1ed9f8287\",\n \"score\": \"0.64451814\",\n \"text\": \"public function testUploadFromFile()\\n {\\n $config = require 'src/app/config.php';\\n\\n $storage = new StorageFacade(1, $config['storages']['1']);\\n $result = $storage->uploadFromFile($this->files);\\n\\n $this->assertInstanceOf(Result::class, $result[0], 'Returned object is instance of \\\\AWS\\\\Reslut class');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbf9403fe7832023ac99baf011336a3a\",\n \"score\": \"0.6442402\",\n \"text\": \"public function testUploadAll(){\\n\\t\\t// $f = new Filemanager($extra);\\n\\t\\t// $path = '/';\\n\\t\\t// $files = array();\\n\\t\\t// $p = __DIR__ .'/_data/Koala.jpg';\\n\\t\\t// $files[] = new UploadedFile($p,'Koala.jpg','image/jpg',filesize($p));\\n\\t\\t// $files[] = new UploadedFile($p,'Koala.jpg','image/jpg',filesize($p));\\n\\t\\t// $r = $f->uploadAll($files,$path);\\n\\t\\t// var_dump($r);\\n\\t\\t// var_dump($files[0]);\\t\\t\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9a032cbc4de3d002588b7d2fedc9fda\",\n \"score\": \"0.6437217\",\n \"text\": \"public function uploadImage() {\\n if (null === $this->image) {\\n return;\\n }\\n\\n if (!$this->id) {\\n $this->image->move($this->getTmpUploadRootDir(), $this->image->getClientOriginalName());\\n } else {\\n $this->image->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\\n }\\n $this->setImage($this->image->getClientOriginalName());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"344ad76e5d5313b312fd48b59f43b297\",\n \"score\": \"0.6431518\",\n \"text\": \"public function testUpload()\\n {\\n $user = \\\\factory(User::class)->create();\\n $file = UploadedFile::fake()->create('song.mp3', 7000);\\n\\n $this->actingAs($user)->post('songs', [\\n \\\"song\\\" => $file\\n ])->assertSeeText('metadata');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06f6216e1371d16828e8b2f008116594\",\n \"score\": \"0.6427026\",\n \"text\": \"function upload()\\n{\\n $uploader = new Uploader(\\\"image-data\\\"); // creating new Uploader class' object\\n $uploader->saveIn(\\\"img\\\"); // setting 'img' as the folder name\\n $fileUploaded = $uploader->save(); // attempting to save\\n if($fileUploaded)\\n {\\n $out = \\\"

    File Uploaded successfully

    \\\";\\n }\\n else\\n $out = \\\"

    Something went wrong

    \\\";\\n return $out;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b994945516ff0a99b2a3a4d17529ea95\",\n \"score\": \"0.6418073\",\n \"text\": \"private function _handle_image_upload()\\n\\t{\\n\\n\\t\\t// load upload library\\n\\t\\t$config = array('upload_path' => './uploads/item_pics/',\\n\\t\\t\\t'allowed_types' => 'gif|jpg|png',\\n\\t\\t\\t'max_size' => '100',\\n\\t\\t\\t'max_width' => '640',\\n\\t\\t\\t'max_height' => '480'\\n\\t\\t);\\n\\t\\t$this->load->library('upload', $config);\\n\\t\\t$this->upload->do_upload('item_image');\\n\\n\\t\\treturn strlen($this->upload->display_errors()) == 0 || !strcmp($this->upload->display_errors(), '

    '.$this->lang->line('upload_no_file_selected').'

    ');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9068113d0dd79237f568cbcf71454138\",\n \"score\": \"0.640626\",\n \"text\": \"function Trigger_ImageUpload6(&$tNG) {\\n $uploadObj = new tNG_ImageUpload($tNG);\\n $uploadObj->setFormFieldName(\\\"foto6\\\");\\n $uploadObj->setDbFieldName(\\\"foto6\\\");\\n $uploadObj->setFolder(\\\"../../fotos/\\\");\\n $uploadObj->setResize(\\\"true\\\", 600, 0);\\n $uploadObj->setMaxSize(2000);\\n $uploadObj->setAllowedExtensions(\\\"gif, jpg, jpe, jpeg, png\\\");\\n $uploadObj->setRename(\\\"auto\\\");\\n return $uploadObj->Execute();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"221abd4b938dbafa1c0eec7e17b39e0d\",\n \"score\": \"0.64047205\",\n \"text\": \"public function testAdminGalleryAlbumPhotoUpdateTest()\\n {\\n \\t$user = factory(User::class, 'admin')->create();\\n \\t$gallery = factory(Gallery::class)->create();\\n $user->galleries()->save($gallery);\\n $album = factory(Album::class)->create();\\n $user->albums()->save($album);\\n $gallery->albums()->save($album);\\n\\n $file = $this->prepareFileUpload('public/upload/test.png');\\n\\n $this->actingAs($user);\\n\\t $this->call('POST', route('admin.gallery.album.photo.store', ['gallery' => $gallery->id, 'album' => $album->id]), [], [], ['file' => $file], []);\\n \\t$this->assertResponseOk();\\n\\n $photo = \\\\App\\\\Photo::find(1);\\n\\n $this->visit(route('admin.gallery.album.photo.edit', ['gallery' => $gallery->id, 'album' => $album->id, 'photo' => $photo->id]))\\n ->type('Testing Title', 'title')\\n ->type('Testing Description', 'description')\\n ->press('Update');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf19bf2c19fed3ed1040f71372570772\",\n \"score\": \"0.6393064\",\n \"text\": \"function image_upload(){\\r\\n\\t\\tif ($_FILES['location_image']['size'] > 0 ) {\\t\\r\\n\\t\\t \\tif( !file_exists(ABSPATH.EM_IMAGE_UPLOAD_DIR) ){\\r\\n\\t\\t\\t\\tmkdir(ABSPATH.EM_IMAGE_UPLOAD_DIR, 0777);\\r\\n\\t\\t \\t}\\r\\n\\t\\t\\t$this->image_delete(); \\r\\n\\t\\t\\tlist($width, $height, $type, $attr) = getimagesize($_FILES['location_image']['tmp_name']);\\r\\n\\t\\t\\t$image_path = ABSPATH.EM_IMAGE_UPLOAD_DIR.\\\"/location-\\\".$this->id.\\\".\\\".$this->mime_types[$type];\\r\\n\\t\\t\\tif (!move_uploaded_file($_FILES['location_image']['tmp_name'], $image_path)){\\r\\n\\t\\t\\t\\t$this->errors = __('The image could not be loaded','dbem');\\r\\n\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t}else{\\r\\n\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn true;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cafe51238b84cf99086b95c02732bc5f\",\n \"score\": \"0.639273\",\n \"text\": \"public function testLoadImageFromUploadedFileObject()\\n\\t{\\n\\t\\t$file = $this->getFile();\\n\\t\\t\\n\\t\\t$wam_file = $this->wam->load($file);\\n\\n\\t\\t$this->assertInstanceOf('Wam\\\\ImageBundle\\\\Image\\\\SourceImage', $wam_file);\\n\\n\\t\\t$params = $wam_file->getParams();\\n\\n\\t\\t$this->assertEquals('logo.jpg', $params['name']);\\n\\t\\t$this->assertEquals('image/jpeg', $params['mime']);\\n\\t\\t$this->assertEquals(__DIR__ . '/../../tmp/files/logo.jpg', $params['path']);\\n\\n\\t\\tcopy($wam_file->getTmpPath(), $wam_file->getRootPath());\\n\\t\\tchmod($wam_file->getRootPath(), 0777);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d16b86c590e6409d1fd4474e3aa6124\",\n \"score\": \"0.63871765\",\n \"text\": \"public function uploadMoreAdPhoto(){\\n $this->page()\\n ->findAndAssertThat()\\n ->existsOnlyOnce()\\n ->elementWithCss(self::ELEMENT_IMG_INPUT_UPLOAD_CSS)\\n ->sendKeys(self::STRING_IMG_2_LOCATION);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a50d095b5b9c8e0e54dfa46e09bf3755\",\n \"score\": \"0.6382805\",\n \"text\": \"public static function uploadImageBlob()\\n\\t{\\n\\t\\treturn self::forwardImageUploadCall(__FUNCTION__, func_get_args());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0e6e459776e70273fb7072c49dec096\",\n \"score\": \"0.63761735\",\n \"text\": \"public function testAddNewClientImage2()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"086d3bd77b0d98459b20ab6b3ce2f6e2\",\n \"score\": \"0.63760746\",\n \"text\": \"public function uploadToTmp($imageUploader);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2fd38539aa34a23ff2608d70c9680cb\",\n \"score\": \"0.63668495\",\n \"text\": \"function Trigger_FileUpload(&$tNG) {\\r\\r\\n $uploadObj = new tNG_FileUpload($tNG);\\r\\r\\n $uploadObj->setFormFieldName(\\\"prod_imagem\\\");\\r\\r\\n $uploadObj->setDbFieldName(\\\"prod_imagem\\\");\\r\\r\\n $uploadObj->setFolder(\\\"{prod_id}/\\\");\\r\\r\\n $uploadObj->setMaxSize(1500);\\r\\r\\n $uploadObj->setAllowedExtensions(\\\"pdf, txt, png, jpg\\\");\\r\\r\\n $uploadObj->setRename(\\\"auto\\\");\\r\\r\\n return $uploadObj->Execute();\\r\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83c123f0b36bcb6737910d48d8bb8978\",\n \"score\": \"0.6363785\",\n \"text\": \"public function testUploadSingleFile()\\n {\\n // Sube un archivo como fake\\n Storage::fake('public');\\n $response = $this->json('POST', '/api/uploadfile', [\\n 'file' => UploadedFile::fake()->image('avatar.jpg'),\\n ]);\\n\\n $response->assertStatus(200);\\n $response->assertJsonStructure(['name', 'mime', 'path', 'url']);\\n $json = $response->json();\\n\\n // Assertion: El archivo fue cargado\\n Storage::disk('public')->assertExists($json['path']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d3c1cfa7b52e244118a7ca2b783505f\",\n \"score\": \"0.6363597\",\n \"text\": \"function checkImage() {\\n\\t\\tif($this->tmp_file[\\\"tmp_name\\\"]) {\\n\\t\\t\\t$check = getimagesize($this->tmp_file[\\\"tmp_name\\\"]);\\n\\t\\t\\tif($check !== false) {\\n\\t\\t\\t\\t$this->uploadOk = 1;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$this->errorStatus = \\\"File is not an image.\\\";\\n\\t\\t\\t\\t$this->uploadOk = 0;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23e189699ebf07509075e6074523a00c\",\n \"score\": \"0.6363246\",\n \"text\": \"public function test_profilePrototypeGetImage() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"274c3cc7a3dd4dd6ca681360ce9aa44b\",\n \"score\": \"0.6354843\",\n \"text\": \"public function testImagesAddPreview()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"add3763ecf7604cabe2116c7840cecb8\",\n \"score\": \"0.63478345\",\n \"text\": \"function upload_img($file){\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f89f886997853b11966ad0b98d5b260\",\n \"score\": \"0.63375115\",\n \"text\": \"public function testImagesCopy()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09a8cc6dd9814beb55c11f9dba78dea9\",\n \"score\": \"0.63356274\",\n \"text\": \"public function testDeleteClientImage1()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18b91fd8cffe0cd3e715b5600fdd737f\",\n \"score\": \"0.6333932\",\n \"text\": \"public function testDeleteOptionSetImage()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a07786e3a1cba1233c53856d18a9470d\",\n \"score\": \"0.633185\",\n \"text\": \"public function testFormStore()\\n {\\n Storage::fake('avatars');\\n $file = UploadedFile::fake()->image('avatar.jpg');\\n $data = [\\n 'title'=>'test',\\n 'description'=>'test des',\\n 'file'=> $file,\\n 'tags'=>[1, 2]\\n ];\\n $response = $this->post('/forms/create', $data);\\n $response->assertRedirect();\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c0574cd149ce8c2ff717e850468810d\",\n \"score\": \"0.63315517\",\n \"text\": \"public function test_user_can_upload_new_avatar()\\n {\\n $result = $this->avatarUploader->make();\\n $this->assertInstanceOf(Model::class, $this->user);\\n $this->assertTrue(is_string($result) && Storage::exists($result));\\n $this->seeInDatabase($this->table, ['avatar' => $result]);\\n\\n $oldAvatar = $this->user->avatar;\\n $newAvatar = $this->avatarUploader->make();\\n $this->assertTrue(! empty($oldAvatar), 'Old avatar not found in database');\\n $this->assertTrue(is_string($newAvatar) && Storage::exists($newAvatar));\\n $this->seeInDatabase($this->table, ['id' => $this->user->id, 'avatar' => $newAvatar]);\\n $this->assertNotTrue(Storage::exists($oldAvatar));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf3c66e11f25bb276fb63fd8dba279be\",\n \"score\": \"0.6331071\",\n \"text\": \"public function uploadImageAction()\\n {\\n $this->setJsonResponse();\\n if(!isset($_FILES['Upload']) || empty($_FILES['Upload']['tmp_name'])){\\n return array('success' => false,\\n 'message' => 'Failed to upload image');\\n }\\n $service = new ImageUploaderService();\\n $return = $service->uploadImage();\\n if($return===false){\\n return array('success' => false,\\n 'message' => 'Failed to upload image');\\n }\\n return array('filename' => $return,\\n 'success' => true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fe370f22464dc330b1a1800714e7f27\",\n \"score\": \"0.63235337\",\n \"text\": \"public function getImageUpload()\\n {\\n return parent::getImageUpload();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8275df46d87e516641b42d166de2b1a7\",\n \"score\": \"0.63105017\",\n \"text\": \"function upload_image($id = null) {\\n if (!is_numeric($id) || $id == null) {\\n Modules::run('site_security/not_allowed');\\n }\\n Modules::run('site_security/_is_admin');\\n\\n $submit = $this->input->post('submit', TRUE);\\n\\n if ($submit == \\\"cancel\\\") {\\n redirect('store_items/create/' . $id);\\n }\\n\\n $data['page_headline'] = \\\"Upload Image\\\";\\n $data['update_id'] = $id;\\n $data['view_module'] = 'store_items';\\n $data['view_file'] = \\\"upload_image\\\";\\n\\n echo Modules::run('templates/admin', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88f3bb9fbeddd6053c83842c728c0199\",\n \"score\": \"0.63070935\",\n \"text\": \"function checkAndPrepareImage($formname, $key = \\\"we_document\\\")\\n{\\n\\tif (isset($_FILES[\\\"we_ui_$formname\\\"]) && is_array($_FILES[\\\"we_ui_$formname\\\"])) {\\n\\t\\t\\n\\t\\t$webuserId = isset($_SESSION[\\\"webuser\\\"][\\\"ID\\\"]) ? $_SESSION[\\\"webuser\\\"][\\\"ID\\\"] : 0;\\n\\t\\t\\n\\t\\tinclude_once ($_SERVER[\\\"DOCUMENT_ROOT\\\"] . \\\"/webEdition/we/include/\\\" . \\\"we_classes/we_imageDocument.inc.php\\\");\\n\\t\\tif (isset($_FILES[\\\"we_ui_$formname\\\"][\\\"name\\\"]) && is_array($_FILES[\\\"we_ui_$formname\\\"][\\\"name\\\"])) {\\n\\t\\t\\tforeach ($_FILES[\\\"we_ui_$formname\\\"][\\\"name\\\"] as $imgName => $filename) {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$_imgDataId = isset($_REQUEST['WE_UI_IMG_DATA_ID_' . $imgName]) ? $_REQUEST['WE_UI_IMG_DATA_ID_' . $imgName] : false;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\tif ($_imgDataId !== false && isset($_SESSION[$_imgDataId])) {\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$_SESSION[$_imgDataId]['doDelete'] = false;\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tif (isset($_REQUEST[\\\"WE_UI_DEL_CHECKBOX_\\\" . $imgName]) && $_REQUEST[\\\"WE_UI_DEL_CHECKBOX_\\\" . $imgName] == 1) {\\n\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId]['doDelete'] = true;\\n\\t\\t\\t\\t\\t} else \\n\\t\\t\\t\\t\\t\\tif ($filename) {\\n\\t\\t\\t\\t\\t\\t\\t// file is selected, check to see if it is an image\\n\\t\\t\\t\\t\\t\\t\\t$ct = getContentTypeFromFile($filename);\\n\\t\\t\\t\\t\\t\\t\\tif ($ct == \\\"image/*\\\") {\\n\\t\\t\\t\\t\\t\\t\\t\\t$imgId = abs($GLOBALS[$key][$formname]->getElement($imgName));\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t// move document from upload location to tmp dir\\n\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"serverPath\\\"] = TMP_DIR . \\\"/\\\" . md5(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tuniqid(rand(), 1));\\n\\t\\t\\t\\t\\t\\t\\t\\tmove_uploaded_file(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_FILES[\\\"we_ui_$formname\\\"][\\\"tmp_name\\\"][$imgName], \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"serverPath\\\"]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\tinclude_once ($_SERVER[\\\"DOCUMENT_ROOT\\\"] . \\\"/webEdition/we/include/we_classes/base/we_thumbnail.class.php\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\t$we_size = we_thumbnail::getimagesize($_SESSION[$_imgDataId][\\\"serverPath\\\"]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\tif (count($we_size) == 0) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tunset($_SESSION[$_imgDataId]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\treturn;\\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\\t$tmp_Filename = $imgName . \\\"_\\\" . md5(uniqid(rand(), 1)) . \\\"_\\\" . preg_replace(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"/[^A-Za-z0-9._-]/\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_FILES[\\\"we_ui_$formname\\\"][\\\"name\\\"][$imgName]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\tif ($imgId) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"id\\\"] = $imgId;\\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\\t$_SESSION[$_imgDataId][\\\"fileName\\\"] = eregi_replace(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'^(.+)\\\\..+$', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\\\\\\\1\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$tmp_Filename);\\n\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"extension\\\"] = (strpos($tmp_Filename, \\\".\\\") > 0) ? eregi_replace(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'^.+(\\\\..+)$', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\\\\\\\1\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$tmp_Filename) : \\\"\\\";\\n\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"text\\\"] = $_SESSION[$_imgDataId][\\\"fileName\\\"] . $_SESSION[$_imgDataId][\\\"extension\\\"];\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t//image needs to be scaled\\n\\t\\t\\t\\t\\t\\t\\t\\tif ((isset(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"width\\\"]) && $_SESSION[$_imgDataId][\\\"width\\\"]) || (isset(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"height\\\"]) && $_SESSION[$_imgDataId][\\\"height\\\"])) {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$fh = fopen($_SESSION[$_imgDataId][\\\"serverPath\\\"], \\\"rb\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$imageData = fread($fh, filesize($_SESSION[$_imgDataId][\\\"serverPath\\\"]));\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tfclose($fh);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$thumb = new we_thumbnail();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$thumb->init(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"dummy\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"width\\\"], \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"height\\\"], \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"keepratio\\\"], \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"maximize\\\"], \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tfalse, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'', \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"dummy\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t0, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"extension\\\"], \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$we_size[0], \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$we_size[1], \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$imageData, \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"\\\", \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"quality\\\"]);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$imgData = \\\"\\\";\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$thumb->getThumb($imgData);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$fh = fopen($_SESSION[$_imgDataId][\\\"serverPath\\\"], \\\"wb\\\");\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tfwrite($fh, $imgData);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tfclose($fh);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$we_size = we_thumbnail::getimagesize($_SESSION[$_imgDataId][\\\"serverPath\\\"]);\\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\\t$_SESSION[$_imgDataId][\\\"imgwidth\\\"] = $we_size[0];\\n\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"imgheight\\\"] = $we_size[1];\\n\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"type\\\"] = $_FILES[\\\"we_ui_$formname\\\"][\\\"type\\\"][$imgName];\\n\\t\\t\\t\\t\\t\\t\\t\\t$_SESSION[$_imgDataId][\\\"size\\\"] = $_FILES[\\\"we_ui_$formname\\\"][\\\"size\\\"][$imgName];\\n\\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}\\n\\t\\t\\t\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1096df07216db9789774c8dfb0f56708\",\n \"score\": \"0.63034546\",\n \"text\": \"public function testUpload() {\\n // setup\\n $file = tempnam(null, null);\\n file_put_contents($file, 'sample text');\\n $_FILES['test_file'] = array();\\n $_FILES['test_file']['error'] = false;\\n $_FILES['test_file']['name'] = \\\"testfile.txt\\\";\\n $_FILES['test_file']['type'] = \\\"text/plain\\\";\\n $_FILES['test_file']['tmp_name'] = $file;\\n // test upload\\n $expected = 'sample text';\\n $f = new Representation(null, 'multipart/form-data');\\n $f->receive();\\n // test name\\n $this->assertEquals('testfile.txt', $f->getData()->files->test_file->name);\\n $this->assertEquals('text/plain', $f->getData()->files->test_file->type);\\n $this->assertEquals('sample text', $f->getData()->files->test_file->contents);\\n $this->assertEquals(strlen('sample text'), $f->getData()->files->test_file->size);\\n // teardown\\n unlink($file);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e2580e5c39cf8b65fb95fee618f5305\",\n \"score\": \"0.63025755\",\n \"text\": \"function handelWithImageFile()\\n {\\n try {\\n\\n // Undefined | Multiple Files | $_FILES Corruption Attack\\n // If this request falls under any of them, treat it invalid.\\n if (\\n !isset($_FILES['upfile']['error']) ||\\n is_array($_FILES['upfile']['error'])\\n ) {\\n $this->erorr=true;\\n throw new RuntimeException('Invalid Image file parameters.');\\n \\n }\\n\\n // Check $_FILES['upfile']['error'] value.\\n switch ($_FILES['upfile']['error']) {\\n case UPLOAD_ERR_OK:\\n break;\\n case UPLOAD_ERR_NO_FILE:\\n throw new RuntimeException('No file sent.');\\n case UPLOAD_ERR_INI_SIZE:\\n case UPLOAD_ERR_FORM_SIZE:\\n throw new RuntimeException('Exceeded filesize limit.');\\n default:\\n throw new RuntimeException('Unknown errors.');\\n }\\n\\n // You should also check filesize here. \\n if ($_FILES['upfile']['size'] > 1000000) {\\n throw new RuntimeException('Exceeded filesize limit of the Image.');\\n }\\n\\n // DO NOT TRUST $_FILES['upfile']['mime'] VALUE !!\\n // Check MIME Type by yourself.\\n $finfo = new finfo(FILEINFO_MIME_TYPE);\\n if (false === $ext = array_search(\\n $finfo->file($_FILES['upfile']['tmp_name']),\\n array(\\n 'jpg' => 'image/jpeg',\\n 'png' => 'image/png',\\n 'gif' => 'image/gif',\\n ),\\n true\\n )) {\\n throw new RuntimeException('Invalid image file format.');\\n }\\n\\n // You should name it uniquely.\\n // DO NOT USE $_FILES['upfile']['name'] WITHOUT ANY VALIDATION !!\\n // On this example, obtain safe unique name from its binary data.\\n if(!$this->error)\\n {\\n //this is just to check if there is error perviously\\n $fileName = sha1_file($_FILES['upfile']['tmp_name']);\\n file_put_contents(\\\"test.txt\\\", $fileName);\\n $fileParts = array($_POST['name'], $_POST['familyName'], $fileName);\\n $fileNewName = implode(\\\"_\\\", $fileParts);\\n $fileNewName = str_replace(\\\" \\\", \\\"_\\\", $fileNewName);\\n if (!move_uploaded_file(\\n $_FILES['upfile']['tmp_name'],\\n sprintf(\\n './uploads/%s.%s',\\n $fileNewName,\\n $ext\\n )\\n )) {\\n throw new RuntimeException('Failed to move uploaded image file.');\\n }\\n // $_POST['name'];\\n }\\n\\n } catch (RuntimeException $e) {\\n $this->erorr = true;\\n $this->errors[\\\"file\\\"] = $e->getMessage();\\n $this->status = \\\"error\\\";\\n $this->handelResponse = \\\"Image could not be uploaded.\\\";\\n $this->message = $e->getMessage();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f101ac51252ce7bc4fda026e30d382dd\",\n \"score\": \"0.6300739\",\n \"text\": \"function upload_image(){\\n global $wpdb;\\n if($_FILES['file'] != null){\\n $uploadedfile = $_FILES['file'];\\n $upload_overrides = ['test_form' => false ];\\n $movefile = wp_handle_upload( $uploadedfile,$upload_overrides );\\n if($movefile && ! isset($movefile['error'])){\\n return $movefile['url'];\\n }else{\\n return $movefile['error'];\\n }\\n }else{\\n return \\\"missing file.\\\";\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cfbfdf0fc6c1edba624bd023921955a7\",\n \"score\": \"0.6290498\",\n \"text\": \"function upload_img()\\n {\\n if ($this->isAdmin() == TRUE) {\\n $this->loadThis();\\n } else {\\n $this->global['pageTitle'] = '上传图片';\\n $this->global['pageName'] = 'withdraw_upload';\\n $data['ret_Url'] = 'withdraw_edit';\\n\\n $this->loadViews(\\\"uploading_img\\\", $this->global, $data, NULL);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57e552e0e9599cacfccae25dcde4eb55\",\n \"score\": \"0.6287532\",\n \"text\": \"public function testGetImageInfo()\\n\\t{\\n\\t $info = $this->obj->getImageInfo();\\n\\t\\n\\t $this->assertEquals($info['extension'], 'jpg');\\n\\t $this->assertEquals($info['height'], 406);\\n\\t $this->assertEquals($info['width'], 960);\\n\\t $this->assertEquals($info['mime'], 'image/jpeg');\\n\\t $this->assertEquals($info['channels'], 3);\\n\\t $this->assertEquals($info['bits'], 8);\\n\\t $this->assertEquals($info['filename'], 'berserkTest');\\n\\t $this->assertEquals($info['basename'], 'berserkTest.jpg');\\n\\t $this->assertEquals($info['dirname'], realpath('./data'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82b19717f7d766f8eb92680fbbb64df9\",\n \"score\": \"0.6284364\",\n \"text\": \"public function uploadImage() {\\n // get the uploaded file instance. for multiple file uploads\\n // the following data will return an array (you may need to use\\n // getInstances method)\\n $image = UploadedFile::getInstance($this, 'image');\\n\\n // if no image was uploaded abort the upload\\n if (empty($image)) {\\n return false;\\n }\\n\\n // store the source file name\\n $this->filename = $image->name;\\n $ext = end((explode(\\\".\\\", $image->name)));\\n\\n // generate a unique file name\\n $this->file = Yii::$app->security->generateRandomString().\\\".{$ext}\\\";\\n\\n // the uploaded image instance\\n return $image;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14ea5d9a7f97081df11fda9ef0c111b2\",\n \"score\": \"0.62815636\",\n \"text\": \"private function upload_image()\\r\\n {\\r\\n // Set upload preferences\\r\\n $config['upload_path'] = FCPATH . '/uploads/';\\r\\n $config['max_size'] = 4096; // KB\\r\\n $config['allowed_types'] = 'gif|jpg|png';\\r\\n\\r\\n // Load upload library\\r\\n $this->load->library('upload', $config);\\r\\n\\r\\n // Attempt upload\\r\\n if($this->upload->do_upload('upload-file') == false)\\r\\n {\\r\\n // Something went wrong\\r\\n $this->data['upload_errors'] = $this->upload->display_errors();\\r\\n }\\r\\n else\\r\\n {\\r\\n // Upload success\\r\\n $this->data['upload_errors'] = \\\"

    SUCCESS

    \\\";\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c2fb977aaf0f8f8c538841fbcf42210\",\n \"score\": \"0.6260722\",\n \"text\": \"public function upload()\\n {\\n if (null === $this->getImage()) {\\n return;\\n }\\n\\n // use the original file name here but you should\\n // sanitize it at least to avoid any security issues\\n\\n // move takes the target directory and then the\\n // target filename to move to\\n $this->getImage()->move(\\n $this->getUploadRootDir(),\\n $this->getImage()->getClientOriginalName()\\n );\\n\\n // set the path property to the filename where you've saved the file\\n $this->image = $this->getUploadDir() . '/' . $this->getImage()->getClientOriginalName();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0f5fa69ffd4e81ef5d4e8a05b9f3510\",\n \"score\": \"0.6257407\",\n \"text\": \"public function testFileUpload($data='') {\\n if (isset($_POST[\\\"data\\\"]) && ($_POST[\\\"data\\\"] !=\\\"\\\")){\\n $data = $_POST[\\\"data\\\"];\\n $data = base64_decode($data);\\n $im = imagecreatefromstring($data);\\n }\\n //make a file name\\n $filename = \\\"test\\\";\\n\\n //save the image to the disk\\n if (isset($im) && $im != false) {\\n $imgFile = $path = realpath('.').\\\"/media/csimages/\\\".$filename.\\\".jpg\\\";\\n\\n //delete the file if it already exists\\n if(file_exists($imgFile)){\\n unlink($imgFile);\\n }\\n\\n $result = imagepng($im, $imgFile);\\n imagedestroy($im);\\n return \\\"/\\\".$filename.\\\".jpg\\\";\\n }\\n else {\\n return 'Error';\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a3538ae4491db77738e798d78f10ef6\",\n \"score\": \"0.6256018\",\n \"text\": \"public function test_profilePrototypeCreateImage() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb3615f25287c06746baf02257c39485\",\n \"score\": \"0.6254192\",\n \"text\": \"public function testSignupWithOutAvatarFile() {\\n $testfile = \\\"test.jpg\\\";\\n $path = dirname(__DIR__) . '/storage/test_files/' . $testfile;\\n $mime = Storage::disk('public')->mimeType('/test_files/' . $testfile);\\n $file = new UploadedFile($path, $testfile, filesize($path), $mime, null, true); \\n $data = [\\n 'email' => 'sergi.redorta@hotmail.com',\\n 'firstName' => 'sergi',\\n 'lastName' => 'Redorta',\\n 'mobile' => '0623133213',\\n 'password'=> 'Secure0', \\n ]; \\n $response = $this->post('api/auth/signup', $data);\\n $user = User::all()->last();\\n //dd($user->attachments()->with('thumbs')->get()->toArray());\\n //dd(Attachment::find(1)->with('thumbs')->get()->toArray());\\n $response->assertStatus(200)->assertJson(['response'=>'success', 'message'=>'auth.signup_success']); \\n $this->assertDatabaseHas('users', [\\n 'email' => 'sergi.redorta@hotmail.com'\\n ]); \\n $this->assertDatabaseHas('attachments', [\\n 'attachable_id' => 1,\\n 'attachable_type' => User::class,\\n 'alt_text' => 'avatar'\\n ]); \\n $this->assertDatabaseMissing('thumbs', [\\n 'id' => 1,\\n 'attachment_id' => 1,\\n 'size' => 'full',\\n 'width' => '285'\\n ]); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7afde1d2cad657fcb335ae7d1060299\",\n \"score\": \"0.6252463\",\n \"text\": \"public function upload()\\n {\\n if (null === $this->getFile()) {\\n return;\\n }\\n\\n if ($this->getImage()) {\\n $filename = __DIR__ . \\\"/../../../web{$this->getImage()}\\\";\\n if (file_exists($filename)) {\\n unlink($filename);\\n }\\n }\\n\\n $uploadDir = UploadImageService::UPLOAD_IMAGE_PATH;\\n $nameImage = $uploadDir.md5(uniqid(time(), true)).'.png';\\n $this->getFile()->move($uploadDir, $nameImage);\\n\\n $this->image = $nameImage;\\n $this->setFile(null);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6de86a9f98844f1612640759df2bb7f\",\n \"score\": \"0.62504286\",\n \"text\": \"final public function upload($key){\\n //Working with Images files\\n if( is_array($this->uploadFields[$key]) && array_key_exists('isImage', $this->uploadFields[$key]) && $this->uploadFields[$key]['isImage'] ){\\n try {\\n //Moving the image files to storage config in the app\\n $localStorage = \\\\Config::get('filesystems');\\n $tmpRoute = $localStorage['disks']['local']['root'].'/LaCrud/';\\n $tmpFileName = str_random(10).'-'.$this->attributes[$key]->getClientOriginalName();\\n $tmpImage = $this->attributes[$key]->move($tmpRoute,$tmpFileName);\\n\\n //Creating the object image\\n $imageManager = new ImageManager(array('driver' => 'imagick'));\\n $image = $imageManager->make( $tmpImage );\\n\\n //Rsolve the permission path on app and sizes\\n if( array_key_exists('public',$this->uploadFields[$key]) || array_key_exists('private',$this->uploadFields[$key]) ){\\n if( array_key_exists('public',$this->uploadFields[$key]) ){\\n $tmpFileName = $this->moveUploadFile($key,'public',$image);\\n }\\n if( array_key_exists('private',$this->uploadFields[$key]) ){\\n $tmpFileName = $this->moveUploadFile($key,'private',$image);\\n }\\n }\\n else{\\n \\\\Storage::disk('local')->delete( 'LaCrud/'.$tmpFileName );\\n throw new \\\\Exception(\\\"The field's configuration not has a public or private path to move the file\\\");\\n }\\n\\n } catch (NotReadableException $e) {\\n \\\\Storage::disk('local')->delete( 'LaCrud/'.$tmpFileName );\\n throw new NotReadableException($e->getMessage());\\n }\\n }\\n //Working with others files\\n else{\\n if( is_array($this->uploadFields[$key]) ){\\n if( array_key_exists('public',$this->uploadFields[$key]) || array_key_exists('private',$this->uploadFields[$key]) ){\\n if( array_key_exists('public',$this->uploadFields[$key]) ){\\n $tmpFileName = $this->moveUploadFile($key,'public');\\n }\\n if( array_key_exists('private',$this->uploadFields[$key]) ){\\n $tmpFileName = $this->moveUploadFile($key,'private');\\n }\\n }\\n else{\\n throw new \\\\Exception(\\\"The field's configuration not has a public or private path to move the file\\\");\\n }\\n }\\n else{\\n $tmpRoute = public_path().'/'.$this->uploadFields[$key];\\n $tmpFileName = str_random(10).'-'.$this->attributes[$key]->getClientOriginalName();\\n $this->attributes[$key]->move($tmpRoute,$tmpFileName);\\n }\\n }\\n return $tmpFileName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f61b4a32593ceccd7d70d22de14e73a6\",\n \"score\": \"0.62460035\",\n \"text\": \"public function testImagesUpdateFolder()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0056ce01961cf16e9a9a8890a35e02c\",\n \"score\": \"0.6226753\",\n \"text\": \"public function imagesFromUrlTest() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5df6a299d5b5fdbb80c3d75e2ee7135d\",\n \"score\": \"0.6222244\",\n \"text\": \"public static function uploadImage() {\\n // get the uploaded file instance. for multiple file uploads\\n // the following data will return an array (you may need to use\\n // getInstances method)\\n $image = UploadedFile::getInstance($this, 'gambar');\\n\\n \\n // if no image was uploaded abort the upload\\n if (empty($image)) {\\n return false;\\n }\\n \\n // store the source file name\\n //$this->gru_att_orgfile = $image->name;\\n $ext = end((explode(\\\".\\\", $image->name)));\\n \\n // generate a unique file name\\n $this->gambar = Yii::$app->security->generateRandomString().\\\".{$ext}\\\";\\n \\n // the uploaded image instance\\n return $image;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":741,"cells":{"query_id":{"kind":"string","value":"fba5cfefabb2b65932d6fdc28af220e4"},"query":{"kind":"string","value":"Remove the specified resource from storage."},"positive_passages":{"kind":"list like","value":[{"docid":"bb28ad264f975b9f924d40421a112a2a","score":"0.0","text":"public function destroy($id)\n {\n Cart::remove($id);\n \n return redirect(route('panier.index'));\n }","title":""}],"string":"[\n {\n \"docid\": \"bb28ad264f975b9f924d40421a112a2a\",\n \"score\": \"0.0\",\n \"text\": \"public function destroy($id)\\n {\\n Cart::remove($id);\\n \\n return redirect(route('panier.index'));\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"37dd170c1eaea50870a9bd20839ad070","score":"0.7137241","text":"public function remove(ResourceInterface $resource): void\n {\n }","title":""},{"docid":"6f5cb91b0423a11c78f100fc165554df","score":"0.6959094","text":"public function delete(ResourceInterface $resource);","title":""},{"docid":"4899cb69f473bc3ba1f4a04f43330487","score":"0.67682105","text":"public function delete($resource, $id);","title":""},{"docid":"55490a425cec5f2c2efea8b737497612","score":"0.6737496","text":"public function deleteGameResource($resource){\n if($this->gameResourceExists($resource)){\n unlink($this->getResourceDataPath() . $resource . \".dat\");\n }\n }","title":""},{"docid":"ef862fedfa2a9a53bdc0c931abd5b9ef","score":"0.6707853","text":"public function destroy()\n {\n $this->resource->delete();\n }","title":""},{"docid":"033a3fd474fdaf2c9dbcf9853f451cd2","score":"0.664397","text":"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\"); \n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\", \n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }","title":""},{"docid":"4f49f964d082c69a3fe92671d08d3bc7","score":"0.66371554","text":"public function delete($cacheResource, $ignoreLifetime = false);","title":""},{"docid":"47236fb1482f779e9251fd6998158877","score":"0.65373594","text":"public function deleteResource(PersistentResource $resource, $unpublishResource = true)\n {\n $this->initialize();\n\n $collectionName = $resource->getCollectionName();\n\n $result = $this->resourceRepository->countBySha1AndCollectionName($resource->getSha1(), $collectionName);\n if ($result > 1) {\n $this->logger->debug(sprintf('Not removing storage data of resource %s (%s) because it is still in use by %s other PersistentResource object(s).', $resource->getFilename(), $resource->getSha1(), $result - 1));\n } else {\n if (!isset($this->collections[$collectionName])) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it refers to the unknown collection \"%s\".', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n $storage = $this->collections[$collectionName]->getStorage();\n if (!$storage instanceof WritableStorageInterface) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it its collection \"%s\" is read-only.', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n try {\n $storage->deleteResource($resource);\n } catch (\\Exception $exception) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s): %s.', $resource->getFilename(), $resource->getSha1(), $exception->getMessage()), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n if ($unpublishResource) {\n /** @var TargetInterface $target */\n $target = $this->collections[$collectionName]->getTarget();\n $target->unpublishResource($resource);\n $this->logger->debug(sprintf('Removed storage data and unpublished resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n } else {\n $this->logger->debug(sprintf('Removed storage data of resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n }\n }\n\n $resource->setDeleted();\n $this->resourceRepository->remove($resource);\n\n return true;\n }","title":""},{"docid":"73af02f86d4e877d5ec7756885285cd4","score":"0.6409313","text":"function delete($resourceName);","title":""},{"docid":"fd5668b2d59626254ea2b308c3b7b195","score":"0.63944584","text":"public function removeResource(Row_AclResource $resource)\r\n\t{\r\n\t\t$row = $this->_getAclRow($resource);\r\n\t\t$row->allow = 0;\r\n\t\t$row->save();\r\n\t}","title":""},{"docid":"66cab78c708362190959631c44dd73a1","score":"0.6300312","text":"public function remove( $resource ) {\n \n $res = $this->get( $resource );\n \n if ($res == false) {\n return $this;\n }\n \n $resourceId = $res->getResourceId();\n \n $resourcesRemoved = array( $resourceId );\n if ( null !== ( $resourceParent = $this->_resources[$resourceId]['parent'] ) ) {\n unset( $this->_resources[$resourceParent->getResourceId()]['children'][$resourceId] );\n }\n foreach ( $this->_resources[$resourceId]['children'] as $childId => $child ) {\n $this->remove( $childId );\n $resourcesRemoved[] = $childId;\n }\n // удаляет и правила для рессурса\n foreach ( $resourcesRemoved as $resourceIdRemoved ) {\n foreach ( $this->_rules['byResourceId'] as $resourceIdCurrent => $rules ) {\n if ( $resourceIdRemoved === $resourceIdCurrent ) {\n unset( $this->_rules['byResourceId'][$resourceIdCurrent] );\n }\n }\n }\n\n unset( $this->_resources[$resourceId] );\n\n\n return $this;\n }","title":""},{"docid":"2a10b35926876411b2e80108cfe22fca","score":"0.6298291","text":"public function remove() {\n // determine the name of the file\n $filename = $this->engine->cache_file_path($this->key(), $this->options);\n @unlink($filename);\n }","title":""},{"docid":"89ce35850dffc0e6605778465129a8fa","score":"0.62484","text":"public function destroy(Resource $resource)\n {\n if (count($resource->photos)) { // delete photos from filesystem and storage.\n foreach ($resource->photos as $key => $photo) {\n $resource->deletePhoto($photo);\n }\n }\n $resource->delete();\n return redirect('/home')->with(['status' => 'Deivce successfully deleted']);\n }","title":""},{"docid":"2367dd4337c36bfe160c73cbfe965a9c","score":"0.6222181","text":"public function testRemoveResource() {\n\n\t\t$file = $this->tempDir . DIRECTORY_SEPARATOR . 'test.txt';\n\t\tfile_put_contents($file, 'test');\n\n\t\t$this->assertTrue(file_exists($file));\n\n\t\t$container = new FilesystemResourceContainer($this->tempDir, FileResource::TYPE);\n\t\t$container->remove('test.txt');\n\n\t\t$this->assertFalse(file_exists($file));\n\t}","title":""},{"docid":"07b2c5af4c184e58bf2887516d95f2ee","score":"0.6152366","text":"public function clearResource(){\n\t\t\tif ($this->resource !== null){\n\t\t\t\timagedestroy($this->resource);\n\t\t\t}\n\t\t}","title":""},{"docid":"7e83a85a6ecaba18a97b363f757bfe88","score":"0.61334383","text":"public function remove() {\n\t\tunlink($this->getSrcImagePath());\n\t}","title":""},{"docid":"0fd71148a5c7f18c479bf79390410ee6","score":"0.6105545","text":"public function delete(): void\n {\n if ($this->has($this->file))\n unlink($this->file);\n }","title":""},{"docid":"eaf52922cf2f9f3851b5dee384bd6ceb","score":"0.60544735","text":"public static function remove($storageId) {\n\t\t$storageCache = new Storage($storageId);\n\t\t$numericId = $storageCache->getNumericId();\n\n\t\tif (strlen($storageId) > 64) {\n\t\t\t$storageId = md5($storageId);\n\t\t}\n\t\t$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($storageId));\n\n\t\t$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($numericId));\n\t}","title":""},{"docid":"5d67ccf5357bc568ae73bc2554b4fcb3","score":"0.60279834","text":"function destroying_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyingResource::class, $resource, $user);\n }","title":""},{"docid":"98d22295493f0020f84c312075af1ad7","score":"0.60123336","text":"function deleting_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletingResource::class, $resource, $user);\n }","title":""},{"docid":"a7e206f667720084df5493157a69cfb1","score":"0.59848213","text":"static private function _delResCache($resource)\n {\n $hash = self::getHashByResource($resource);\n foreach (self::$res as &$items) {\n if (!empty($items[$hash])) {\n unset($items[$hash]);\n }\n } \n }","title":""},{"docid":"896e95e8d1abd4f6c5eecd1940391bef","score":"0.5978198","text":"public function unlinkStorage(): self\n {\n unlink($this->path);\n\n return $this;\n }","title":""},{"docid":"46e2a3c32c6b5a596ae0cf2bf703c970","score":"0.5958219","text":"public function destroy($id)\n {\n $get=Document::where('id',$id)->first();\n if($get->photo!=null&&file_exists(\"/storage/$get->photo\")){\n unlink('storage/'.$get->photo);\n }\n $get->delete();\n return redirect()->route('listDocument');\n }","title":""},{"docid":"3561c0d84ad15925523eb674be4bee6d","score":"0.59337646","text":"public function remove($path);","title":""},{"docid":"970f51bb911499288a1748bfe0157efa","score":"0.5912158","text":"public function delete($id) {\n $this->connectStorage($id);\n $this->storage->delete();\n }","title":""},{"docid":"f1553c7757cc3676299373a5d3a835f9","score":"0.5907517","text":"public function destroy($id)\n {\n $uniforme = Uniforme::find();\n Storage::delete('file.jpg');\n }","title":""},{"docid":"4e9409a2e010e9b11f78c239d4335d8f","score":"0.58951396","text":"public function remove();","title":""},{"docid":"4e9409a2e010e9b11f78c239d4335d8f","score":"0.58951396","text":"public function remove();","title":""},{"docid":"4e9409a2e010e9b11f78c239d4335d8f","score":"0.58951396","text":"public function remove();","title":""},{"docid":"4e9409a2e010e9b11f78c239d4335d8f","score":"0.58951396","text":"public function remove();","title":""},{"docid":"4e9409a2e010e9b11f78c239d4335d8f","score":"0.58951396","text":"public function remove();","title":""},{"docid":"47945b59946db62fc806604498e46323","score":"0.58641815","text":"public function remove(FileInterface $file): FileInterface;","title":""},{"docid":"d3158d405d4b489191764d14126b6336","score":"0.5857253","text":"public function destroy($id)\n {\n $trigger = Resource::where('id', $id)->first();\n $file = $trigger->file;\n if (!empty($file)) {\n $upFile = new UploadFile();\n $upFile->deleteCurrentFile($file, 'resource');\n }\n $trigger->delete();\n return back();\n }","title":""},{"docid":"ce513fb382cd88ef0817a244ce395271","score":"0.5824645","text":"public function destroy($id)\n {\n $image= Image::find($id); \n $name = $image->name;\n $file = '/images/'.$name;\n $thumbnail = '/uploads/thumbnail/'.$name;\n Storage::delete([$file, $thumbnail]); // delete from folder $image->delete(); // delete from table return redirect()->back(); \n }","title":""},{"docid":"b6078f9d34f26c367a9797120d6006ab","score":"0.5818996","text":"public function resourceHasBeenDeleted();","title":""},{"docid":"c8394dead7326b95b49dd4f6c575a34a","score":"0.58155316","text":"public function destroy($resource, $id)\n {\n $model = $this->model->find($id);\n $model->delete();\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource', [\n 'resource' => $this->modelName,\n ]);\n }","title":""},{"docid":"633ae266a2f875f0726e79f6358f15aa","score":"0.58142436","text":"public function remove(string $key) {\n $this->storage->remove($key);\n }","title":""},{"docid":"915ec80e489f9eed2bde0417b2f10a19","score":"0.580295","text":"public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->addResource($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }","title":""},{"docid":"f35aaf17008b130a60b3962b50777f92","score":"0.5800284","text":"public function unlink();","title":""},{"docid":"b4ee6dc4b9942eba341457d6bf4d5638","score":"0.5796796","text":"public function removeFromStore()\n {\n if ($this->getHash() && $this->getType()) {\n $this->getFileStore()->delete($this->getHash(), $this->getType());\n } else {\n throw new SwompException(\"Cannot remove from Store - Hash and Type is required\");\n }\n }","title":""},{"docid":"b48e565472dafa6e553cf8aee6f42a6a","score":"0.578793","text":"public function destroy($id)\n {\n $product = Pruduct::where('id', $id)->first();\n unlink('storage/' . $product->image);\n\n $product->delete();\n Session::flash('messege', 'Data berhasil di hapus.');\n return redirect()->back();\n }","title":""},{"docid":"532f8d58b20e101c1f5035990ba18e7e","score":"0.57871205","text":"public function cleanStorage();","title":""},{"docid":"5760f6df7c6ebd5440da74e84ef8e734","score":"0.57779175","text":"public function remove($identifier);","title":""},{"docid":"5760f6df7c6ebd5440da74e84ef8e734","score":"0.57779175","text":"public function remove($identifier);","title":""},{"docid":"0009889a5268b3415309c6899e972909","score":"0.57663226","text":"public function delete()\r\n {\r\n $path = $this->path;\r\n parent::delete();\r\n\r\n // Delete file if exists\r\n if($this->id && file_exists($path))\r\n {\r\n unlink($path);\r\n }\r\n\r\n }","title":""},{"docid":"62c6b6bfe5aeaa08992c1c1ff2c5e9ec","score":"0.5732295","text":"public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n \n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }","title":""},{"docid":"b6294af388de3ae8b010bbdd0e147a65","score":"0.57102996","text":"function destroyed_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyedResource::class, $resource, $user);\n }","title":""},{"docid":"a1d82443b72d201e5ede999d05bf59f5","score":"0.57096094","text":"public function unsetStorageId()\r\n\t{\r\n\t\tunset($this->_storage_id);\r\n\t}","title":""},{"docid":"9591ec5177ac179477cbd3c3ccaa275a","score":"0.5706215","text":"public function destroy($id)\n {\n $file = FileTask::findOrFail($id);\n Storage::delete($file->path); //delete from disk\n $file->delete(); //delete from db\n flash('File was removed!');\n return back();\n }","title":""},{"docid":"cf195d4a522e74edc7019e572a06923c","score":"0.5694188","text":"public function destroy($id)\n {\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return response()->json(['status' => 'success']);\n }","title":""},{"docid":"bba07c958ce0344975d091ce9890e64a","score":"0.5684331","text":"public function delete($path);","title":""},{"docid":"fe53bca8d325675dd4f80c6d519ce470","score":"0.5679682","text":"public function destroy($id)\n {\n \n $delete = Product::find($id);\n $image_path ='public/image/'. $delete->photo;\n unlink( $image_path);\n $delete->delete();\n return redirect()->back();\n }","title":""},{"docid":"8bbd28cf62ed375a2f7518342e1d75ae","score":"0.56680655","text":"public function removeFile();","title":""},{"docid":"a81365633fd5b106741f1068f03a568a","score":"0.5654999","text":"public function remove(object $entity): void;","title":""},{"docid":"c1ecca5c35e22313e1c38b1ddca48883","score":"0.56521606","text":"public function destroy(FILE $file)\n {\n \n\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n\n $file->delete();\n\n return redirect()->route('admin.files.index')->with('eliminar', 'ok');\n }","title":""},{"docid":"ac44db6cd2e11be0502437646b98bec0","score":"0.56515306","text":"public function untagResource($payload, $headers=[]) {\n $method = 'DELETE';\n $path = sprintf('/%s/tag', $this->apiVersion);\n $headers = $this->buildCommonHeaders($method, $path, $headers);\n $content = json_encode($payload);\n $headers['content-length'] = strlen($content);\n return $this->doRequest($method, $path, $headers, $data = $content);\n }","title":""},{"docid":"3c36d7803d6dcac2a74d7850bf05b529","score":"0.56461364","text":"function deleteResource($model)\n {\n }","title":""},{"docid":"198fe5623de140ddb980a64f1228ee9c","score":"0.5643258","text":"public function shutdownObject()\n {\n /** @var PersistentResource $resource */\n foreach ($this->resourceRepository->getAddedResources() as $resource) {\n if ($this->persistenceManager->isNewObject($resource)) {\n $this->deleteResource($resource, false);\n }\n }\n }","title":""},{"docid":"6a133bf2a539adcebeeef545cb23bdf7","score":"0.56398225","text":"public function removeEntity($entity);","title":""},{"docid":"ddb7a7e1bd529da0193a6825c4588bde","score":"0.5632143","text":"function deleted_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletedResource::class, $resource, $user);\n }","title":""},{"docid":"cfb60ffcc989888bf5132bd8f18d28f3","score":"0.563189","text":"public function destroy(string $storageKey): bool;","title":""},{"docid":"227d7db0fe495cc1b0734cf71cbc6374","score":"0.5627202","text":"public function destroy($id)\n {\n try {\n $resource = Resource::findOrFail($id);\n auth()->user()->resources()->detach($id);\n } catch (\\Throwable $e) {\n throw abort(404);\n }\n\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-saved',\n 'message' => $resource->getMedia()[0]->file_name . ' was unsaved successfully!',\n 'resource_id' => $id\n ]);\n }","title":""},{"docid":"b2deedc135e4e9a6d691a34bc62901e4","score":"0.5602831","text":"public function delete(): void\n {\n if ($this->exists()) {\n File::delete($this->path());\n }\n }","title":""},{"docid":"29d3e4879d0ed5074f12cb963276b7cc","score":"0.56021434","text":"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}","title":""},{"docid":"2551dae05d41b0f050dbd034df4e2093","score":"0.5595374","text":"public function remove()\n {\n $res = unlink($this->_path);\n return $res;\n }","title":""},{"docid":"2dfd4b7a5b42f50b0f3186c2425fc4a3","score":"0.55950236","text":"public abstract function deleteAsset(Asset $asset);","title":""},{"docid":"4a8532446eb5a624448dac28b0ab0abe","score":"0.55868185","text":"public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }","title":""},{"docid":"4a8532446eb5a624448dac28b0ab0abe","score":"0.55868185","text":"public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }","title":""},{"docid":"eb676b82c99dc848aabda71793e9f00a","score":"0.55856013","text":"public function destroy()\n {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }","title":""},{"docid":"0f5a2d5d4ccb6690f2c9b7c1ad81379c","score":"0.55815697","text":"public function delete() {\n\t\treturn unlink($this->path);\n\t}","title":""},{"docid":"abcaf8d103f03089c84f7aa510afb02a","score":"0.5578945","text":"public function delete()\n {\n if (null !== $this->repository) {\n $this->repository->close();\n }\n\n $this->file->delete($this->filePath);\n $this->filePath = '';\n }","title":""},{"docid":"6955ff701e4315c5cfa7e2767eafdbcf","score":"0.55788815","text":"public function clear($in_storage_too = true);","title":""},{"docid":"f576b22c84d78e83b91d5036361a095c","score":"0.55780953","text":"public function delete($filename = null);","title":""},{"docid":"0d6640f36c0ca88fbe56977a74dad5f1","score":"0.55737436","text":"public function remove(MediaInterface $media);","title":""},{"docid":"930240c93dd67bc31042064adb044402","score":"0.55683106","text":"public function destroy($id) {\n $data = Product::findOrFail($id);\n @unlink(storage_path('app/public/product/' . $data->product_image));\n $data->delete();\n return redirect('product')->with('success', 'Product is successfully deleted');\n }","title":""},{"docid":"f7e801c4eebb9a1d03e7feec4ecd5f21","score":"0.5567041","text":"public function destroy($id)\n {\n $realestate = Realestate::findOrfail($id);\n if( count($realestate->files) > 0 )\n {\n if(Storage::disk('public')->exists($realestate->files[0]->path))\n Storage::disk('public')->delete($realestate->files[0]->path);\n\n $realestate->files()->delete();\n }\n\n $realestate->delete();\n\n\n return redirect()->route('realestate_index');\n\n }","title":""},{"docid":"f392b1ed7db16f604f843adb672ef950","score":"0.55653834","text":"public function destroy($id)\n {\n $slide = Slide::find($id);\n if(Storage::delete('public/slides/'.$slide->slides)){\n $slide->delete();\n return redirect('Viewall/All_slide')->with('error','Slide deleted');\n }\n}","title":""},{"docid":"0a10bad03f5df8b55f39176b0c613baa","score":"0.55647546","text":"public function remove(string $path)\n {\n $this->set($path, null);\n }","title":""},{"docid":"adc4e9de22fd8f0d6314e35dcee0b8e0","score":"0.5563022","text":"public function remove(string $object): void;","title":""},{"docid":"37d5927bb51b78bdcea795a632988120","score":"0.55617017","text":"public function removeTransactionResource($hash)\n\t{\n\t\t$path = $this->getTransactionResourcePath($hash);\n\t\treturn $this->deleteTransactionResource($path);\n\t}","title":""},{"docid":"61d679086bf634ff55d0bc8a41a70710","score":"0.5561249","text":"public function destroy($id)\n {\n $user =DB::table('users')->where('id',$id)->first();\n $photo = $user->photo;\n \n unlink($photo);\n DB::table('users')->where('id',$id)->delete();\n \n }","title":""},{"docid":"40424bbe7e79c788acc8e40fa96c2e17","score":"0.5556214","text":"public function destroy($id)\n {\n \n $product = Product::findOrFail($id);\n\n if($product->delete()) {\n\n return new ProductResource($product);\n }\n }","title":""},{"docid":"b877c987e8cb3298dc4c9f11662792f9","score":"0.55559146","text":"public function destroy($id)\n {\n $path = File::findOrFail($id)->path; \n //esto me va a borrar del storage el archivo que le diga. De todas formas el find or fail me tiene que traer la dirreccion\n Storage::delete( $path ); \n\t\tFile::findOrFail($id)->delete(); \n\t\treturn redirect('/home');\n }","title":""},{"docid":"09d16b97894d6829ff484d20cf378f8f","score":"0.555526","text":"public function destroy(Request $request, $id){\n $file = File::whereCodeName($id)->firstOrFail();\n //unlink elimina el archivo de la aplicacion\n unlink(public_path('storage/'. Auth::id() .'/' . $file->code_name));\n\n //eliminar de base de datos\n $file->delete();\n\n //avisar que se ha borrado archivo al usuario\n Alert::info('¡Ateción!', 'Se ha eliminado el archivo');\n return back();\n }","title":""},{"docid":"19530e0d90a5511cefec030646832ac7","score":"0.55509293","text":"function deleteResource($id)\n\t{\n\t if(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n\t\t$this->db_delete($this->_table, array('id'=>$id));\n\t}","title":""},{"docid":"3fa04699fe14eb03c48cfde3470db201","score":"0.55502915","text":"public function destroy($id)\n {\n $file = Upload::findOrFail($id);\n if(File::exists(public_path($file->filename))){\n unlink(public_path($file->filename));\n File::delete(public_path($file->filename));\n }\n $file->delete();\n return redirect()->back()->with('success','Deleted Successfully');\n //\n }","title":""},{"docid":"94b6f2ef01c97218c0ea77ca980a8947","score":"0.55452746","text":"public function wipeStorage(): void\n {\n $this->storageAdapter->wipeStorage();\n }","title":""},{"docid":"eb3e91f69cf026d5ea1aa3cafe0bce8f","score":"0.5540013","text":"public function remove($id);","title":""},{"docid":"eb3e91f69cf026d5ea1aa3cafe0bce8f","score":"0.5540013","text":"public function remove($id);","title":""},{"docid":"eb3e91f69cf026d5ea1aa3cafe0bce8f","score":"0.5540013","text":"public function remove($id);","title":""},{"docid":"51ecf73cbf0ed20291ef32754f32287e","score":"0.55377126","text":"public function destroy($id)\n {\n $site_image = DB::table('site_images')->where('id',$id)->first();\n $image=$site_image->image_name;\n unlink($image);\n DB::table('site_images')->where('id',$id)->delete();\n\n redirect()->back()->with('success', 'site image removed successfully');\n }","title":""},{"docid":"30d0b23b0b35054a9dcfaf9fdc529aa5","score":"0.5532588","text":"public function destroy($id)\n {\n\n $p = Product::where('id' , $id)->first();\n if(File::exists($p->image)){\n File::delete($p->image);\n }\n $p->delete();\n return redirect()->back();\n }","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""},{"docid":"573f58d57c5b1333e4a2ddf6048545ec","score":"0.55271083","text":"public function delete();","title":""}],"string":"[\n {\n \"docid\": \"37dd170c1eaea50870a9bd20839ad070\",\n \"score\": \"0.7137241\",\n \"text\": \"public function remove(ResourceInterface $resource): void\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f5cb91b0423a11c78f100fc165554df\",\n \"score\": \"0.6959094\",\n \"text\": \"public function delete(ResourceInterface $resource);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4899cb69f473bc3ba1f4a04f43330487\",\n \"score\": \"0.67682105\",\n \"text\": \"public function delete($resource, $id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55490a425cec5f2c2efea8b737497612\",\n \"score\": \"0.6737496\",\n \"text\": \"public function deleteGameResource($resource){\\n if($this->gameResourceExists($resource)){\\n unlink($this->getResourceDataPath() . $resource . \\\".dat\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef862fedfa2a9a53bdc0c931abd5b9ef\",\n \"score\": \"0.6707853\",\n \"text\": \"public function destroy()\\n {\\n $this->resource->delete();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"033a3fd474fdaf2c9dbcf9853f451cd2\",\n \"score\": \"0.664397\",\n \"text\": \"public function deleteResource(&$resource) {\\n\\n if ($this->connector != null) {\\n $this->logger->addDebug(\\\"Deleting Resource Node from Neo4J database\\\"); \\n $result = $this->connector->run(\\\"MATCH (a:Resource {id: {id}}) detach delete a;\\\", \\n [\\n 'id' => $resource->getID()\\n ]\\n );\\n $this->logger->addDebug(\\\"Updated neo4j to remove resource\\\");\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f49f964d082c69a3fe92671d08d3bc7\",\n \"score\": \"0.66371554\",\n \"text\": \"public function delete($cacheResource, $ignoreLifetime = false);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47236fb1482f779e9251fd6998158877\",\n \"score\": \"0.65373594\",\n \"text\": \"public function deleteResource(PersistentResource $resource, $unpublishResource = true)\\n {\\n $this->initialize();\\n\\n $collectionName = $resource->getCollectionName();\\n\\n $result = $this->resourceRepository->countBySha1AndCollectionName($resource->getSha1(), $collectionName);\\n if ($result > 1) {\\n $this->logger->debug(sprintf('Not removing storage data of resource %s (%s) because it is still in use by %s other PersistentResource object(s).', $resource->getFilename(), $resource->getSha1(), $result - 1));\\n } else {\\n if (!isset($this->collections[$collectionName])) {\\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it refers to the unknown collection \\\"%s\\\".', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\\n\\n return false;\\n }\\n $storage = $this->collections[$collectionName]->getStorage();\\n if (!$storage instanceof WritableStorageInterface) {\\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it its collection \\\"%s\\\" is read-only.', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\\n\\n return false;\\n }\\n try {\\n $storage->deleteResource($resource);\\n } catch (\\\\Exception $exception) {\\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s): %s.', $resource->getFilename(), $resource->getSha1(), $exception->getMessage()), LogEnvironment::fromMethodName(__METHOD__));\\n\\n return false;\\n }\\n if ($unpublishResource) {\\n /** @var TargetInterface $target */\\n $target = $this->collections[$collectionName]->getTarget();\\n $target->unpublishResource($resource);\\n $this->logger->debug(sprintf('Removed storage data and unpublished resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\\n } else {\\n $this->logger->debug(sprintf('Removed storage data of resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\\n }\\n }\\n\\n $resource->setDeleted();\\n $this->resourceRepository->remove($resource);\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73af02f86d4e877d5ec7756885285cd4\",\n \"score\": \"0.6409313\",\n \"text\": \"function delete($resourceName);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd5668b2d59626254ea2b308c3b7b195\",\n \"score\": \"0.63944584\",\n \"text\": \"public function removeResource(Row_AclResource $resource)\\r\\n\\t{\\r\\n\\t\\t$row = $this->_getAclRow($resource);\\r\\n\\t\\t$row->allow = 0;\\r\\n\\t\\t$row->save();\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66cab78c708362190959631c44dd73a1\",\n \"score\": \"0.6300312\",\n \"text\": \"public function remove( $resource ) {\\n \\n $res = $this->get( $resource );\\n \\n if ($res == false) {\\n return $this;\\n }\\n \\n $resourceId = $res->getResourceId();\\n \\n $resourcesRemoved = array( $resourceId );\\n if ( null !== ( $resourceParent = $this->_resources[$resourceId]['parent'] ) ) {\\n unset( $this->_resources[$resourceParent->getResourceId()]['children'][$resourceId] );\\n }\\n foreach ( $this->_resources[$resourceId]['children'] as $childId => $child ) {\\n $this->remove( $childId );\\n $resourcesRemoved[] = $childId;\\n }\\n // удаляет и правила для рессурса\\n foreach ( $resourcesRemoved as $resourceIdRemoved ) {\\n foreach ( $this->_rules['byResourceId'] as $resourceIdCurrent => $rules ) {\\n if ( $resourceIdRemoved === $resourceIdCurrent ) {\\n unset( $this->_rules['byResourceId'][$resourceIdCurrent] );\\n }\\n }\\n }\\n\\n unset( $this->_resources[$resourceId] );\\n\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a10b35926876411b2e80108cfe22fca\",\n \"score\": \"0.6298291\",\n \"text\": \"public function remove() {\\n // determine the name of the file\\n $filename = $this->engine->cache_file_path($this->key(), $this->options);\\n @unlink($filename);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89ce35850dffc0e6605778465129a8fa\",\n \"score\": \"0.62484\",\n \"text\": \"public function destroy(Resource $resource)\\n {\\n if (count($resource->photos)) { // delete photos from filesystem and storage.\\n foreach ($resource->photos as $key => $photo) {\\n $resource->deletePhoto($photo);\\n }\\n }\\n $resource->delete();\\n return redirect('/home')->with(['status' => 'Deivce successfully deleted']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2367dd4337c36bfe160c73cbfe965a9c\",\n \"score\": \"0.6222181\",\n \"text\": \"public function testRemoveResource() {\\n\\n\\t\\t$file = $this->tempDir . DIRECTORY_SEPARATOR . 'test.txt';\\n\\t\\tfile_put_contents($file, 'test');\\n\\n\\t\\t$this->assertTrue(file_exists($file));\\n\\n\\t\\t$container = new FilesystemResourceContainer($this->tempDir, FileResource::TYPE);\\n\\t\\t$container->remove('test.txt');\\n\\n\\t\\t$this->assertFalse(file_exists($file));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07b2c5af4c184e58bf2887516d95f2ee\",\n \"score\": \"0.6152366\",\n \"text\": \"public function clearResource(){\\n\\t\\t\\tif ($this->resource !== null){\\n\\t\\t\\t\\timagedestroy($this->resource);\\n\\t\\t\\t}\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e83a85a6ecaba18a97b363f757bfe88\",\n \"score\": \"0.61334383\",\n \"text\": \"public function remove() {\\n\\t\\tunlink($this->getSrcImagePath());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fd71148a5c7f18c479bf79390410ee6\",\n \"score\": \"0.6105545\",\n \"text\": \"public function delete(): void\\n {\\n if ($this->has($this->file))\\n unlink($this->file);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaf52922cf2f9f3851b5dee384bd6ceb\",\n \"score\": \"0.60544735\",\n \"text\": \"public static function remove($storageId) {\\n\\t\\t$storageCache = new Storage($storageId);\\n\\t\\t$numericId = $storageCache->getNumericId();\\n\\n\\t\\tif (strlen($storageId) > 64) {\\n\\t\\t\\t$storageId = md5($storageId);\\n\\t\\t}\\n\\t\\t$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';\\n\\t\\t\\\\OC_DB::executeAudited($sql, array($storageId));\\n\\n\\t\\t$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';\\n\\t\\t\\\\OC_DB::executeAudited($sql, array($numericId));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d67ccf5357bc568ae73bc2554b4fcb3\",\n \"score\": \"0.60279834\",\n \"text\": \"function destroying_resource(Model $resource, Authenticatable $user = null)\\n { \\n return crud_event(\\\\Core\\\\Crud\\\\Events\\\\DestroyingResource::class, $resource, $user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98d22295493f0020f84c312075af1ad7\",\n \"score\": \"0.60123336\",\n \"text\": \"function deleting_resource(Model $resource, Authenticatable $user = null)\\n { \\n return crud_event(\\\\Core\\\\Crud\\\\Events\\\\DeletingResource::class, $resource, $user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7e206f667720084df5493157a69cfb1\",\n \"score\": \"0.59848213\",\n \"text\": \"static private function _delResCache($resource)\\n {\\n $hash = self::getHashByResource($resource);\\n foreach (self::$res as &$items) {\\n if (!empty($items[$hash])) {\\n unset($items[$hash]);\\n }\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"896e95e8d1abd4f6c5eecd1940391bef\",\n \"score\": \"0.5978198\",\n \"text\": \"public function unlinkStorage(): self\\n {\\n unlink($this->path);\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46e2a3c32c6b5a596ae0cf2bf703c970\",\n \"score\": \"0.5958219\",\n \"text\": \"public function destroy($id)\\n {\\n $get=Document::where('id',$id)->first();\\n if($get->photo!=null&&file_exists(\\\"/storage/$get->photo\\\")){\\n unlink('storage/'.$get->photo);\\n }\\n $get->delete();\\n return redirect()->route('listDocument');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3561c0d84ad15925523eb674be4bee6d\",\n \"score\": \"0.59337646\",\n \"text\": \"public function remove($path);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"970f51bb911499288a1748bfe0157efa\",\n \"score\": \"0.5912158\",\n \"text\": \"public function delete($id) {\\n $this->connectStorage($id);\\n $this->storage->delete();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1553c7757cc3676299373a5d3a835f9\",\n \"score\": \"0.5907517\",\n \"text\": \"public function destroy($id)\\n {\\n $uniforme = Uniforme::find();\\n Storage::delete('file.jpg');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e9409a2e010e9b11f78c239d4335d8f\",\n \"score\": \"0.58951396\",\n \"text\": \"public function remove();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e9409a2e010e9b11f78c239d4335d8f\",\n \"score\": \"0.58951396\",\n \"text\": \"public function remove();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e9409a2e010e9b11f78c239d4335d8f\",\n \"score\": \"0.58951396\",\n \"text\": \"public function remove();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e9409a2e010e9b11f78c239d4335d8f\",\n \"score\": \"0.58951396\",\n \"text\": \"public function remove();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e9409a2e010e9b11f78c239d4335d8f\",\n \"score\": \"0.58951396\",\n \"text\": \"public function remove();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47945b59946db62fc806604498e46323\",\n \"score\": \"0.58641815\",\n \"text\": \"public function remove(FileInterface $file): FileInterface;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3158d405d4b489191764d14126b6336\",\n \"score\": \"0.5857253\",\n \"text\": \"public function destroy($id)\\n {\\n $trigger = Resource::where('id', $id)->first();\\n $file = $trigger->file;\\n if (!empty($file)) {\\n $upFile = new UploadFile();\\n $upFile->deleteCurrentFile($file, 'resource');\\n }\\n $trigger->delete();\\n return back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce513fb382cd88ef0817a244ce395271\",\n \"score\": \"0.5824645\",\n \"text\": \"public function destroy($id)\\n {\\n $image= Image::find($id); \\n $name = $image->name;\\n $file = '/images/'.$name;\\n $thumbnail = '/uploads/thumbnail/'.$name;\\n Storage::delete([$file, $thumbnail]); // delete from folder $image->delete(); // delete from table return redirect()->back(); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6078f9d34f26c367a9797120d6006ab\",\n \"score\": \"0.5818996\",\n \"text\": \"public function resourceHasBeenDeleted();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8394dead7326b95b49dd4f6c575a34a\",\n \"score\": \"0.58155316\",\n \"text\": \"public function destroy($resource, $id)\\n {\\n $model = $this->model->find($id);\\n $model->delete();\\n Cache::flush();\\n $fields = $this->getModelAttributes();\\n return redirect()->route('admin.resource', [\\n 'resource' => $this->modelName,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"633ae266a2f875f0726e79f6358f15aa\",\n \"score\": \"0.58142436\",\n \"text\": \"public function remove(string $key) {\\n $this->storage->remove($key);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"915ec80e489f9eed2bde0417b2f10a19\",\n \"score\": \"0.580295\",\n \"text\": \"public function testResourceRemoveOne()\\n {\\n $resourceArea = new Zend_Acl_Resource('area');\\n $this->_acl->addResource($resourceArea)\\n ->remove($resourceArea);\\n $this->assertFalse($this->_acl->has($resourceArea));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f35aaf17008b130a60b3962b50777f92\",\n \"score\": \"0.5800284\",\n \"text\": \"public function unlink();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4ee6dc4b9942eba341457d6bf4d5638\",\n \"score\": \"0.5796796\",\n \"text\": \"public function removeFromStore()\\n {\\n if ($this->getHash() && $this->getType()) {\\n $this->getFileStore()->delete($this->getHash(), $this->getType());\\n } else {\\n throw new SwompException(\\\"Cannot remove from Store - Hash and Type is required\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b48e565472dafa6e553cf8aee6f42a6a\",\n \"score\": \"0.578793\",\n \"text\": \"public function destroy($id)\\n {\\n $product = Pruduct::where('id', $id)->first();\\n unlink('storage/' . $product->image);\\n\\n $product->delete();\\n Session::flash('messege', 'Data berhasil di hapus.');\\n return redirect()->back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"532f8d58b20e101c1f5035990ba18e7e\",\n \"score\": \"0.57871205\",\n \"text\": \"public function cleanStorage();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5760f6df7c6ebd5440da74e84ef8e734\",\n \"score\": \"0.57779175\",\n \"text\": \"public function remove($identifier);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5760f6df7c6ebd5440da74e84ef8e734\",\n \"score\": \"0.57779175\",\n \"text\": \"public function remove($identifier);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0009889a5268b3415309c6899e972909\",\n \"score\": \"0.57663226\",\n \"text\": \"public function delete()\\r\\n {\\r\\n $path = $this->path;\\r\\n parent::delete();\\r\\n\\r\\n // Delete file if exists\\r\\n if($this->id && file_exists($path))\\r\\n {\\r\\n unlink($path);\\r\\n }\\r\\n\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62c6b6bfe5aeaa08992c1c1ff2c5e9ec\",\n \"score\": \"0.5732295\",\n \"text\": \"public function destroy($id)\\n {\\n $obj = Obj::where('id',$id)->first();\\n $this->authorize('update', $obj);\\n\\n // remove file\\n if(Storage::disk('public')->exists($obj->image))\\n Storage::disk('public')->delete($obj->image);\\n \\n $obj->delete();\\n\\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\\n return redirect()->route($this->module.'.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6294af388de3ae8b010bbdd0e147a65\",\n \"score\": \"0.57102996\",\n \"text\": \"function destroyed_resource(Model $resource, Authenticatable $user = null)\\n { \\n return crud_event(\\\\Core\\\\Crud\\\\Events\\\\DestroyedResource::class, $resource, $user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1d82443b72d201e5ede999d05bf59f5\",\n \"score\": \"0.57096094\",\n \"text\": \"public function unsetStorageId()\\r\\n\\t{\\r\\n\\t\\tunset($this->_storage_id);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9591ec5177ac179477cbd3c3ccaa275a\",\n \"score\": \"0.5706215\",\n \"text\": \"public function destroy($id)\\n {\\n $file = FileTask::findOrFail($id);\\n Storage::delete($file->path); //delete from disk\\n $file->delete(); //delete from db\\n flash('File was removed!');\\n return back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf195d4a522e74edc7019e572a06923c\",\n \"score\": \"0.5694188\",\n \"text\": \"public function destroy($id)\\n {\\n $storage = Storage::findOrFail($id);\\n $storage->delete();\\n return response()->json(['status' => 'success']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bba07c958ce0344975d091ce9890e64a\",\n \"score\": \"0.5684331\",\n \"text\": \"public function delete($path);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe53bca8d325675dd4f80c6d519ce470\",\n \"score\": \"0.5679682\",\n \"text\": \"public function destroy($id)\\n {\\n \\n $delete = Product::find($id);\\n $image_path ='public/image/'. $delete->photo;\\n unlink( $image_path);\\n $delete->delete();\\n return redirect()->back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8bbd28cf62ed375a2f7518342e1d75ae\",\n \"score\": \"0.56680655\",\n \"text\": \"public function removeFile();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a81365633fd5b106741f1068f03a568a\",\n \"score\": \"0.5654999\",\n \"text\": \"public function remove(object $entity): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1ecca5c35e22313e1c38b1ddca48883\",\n \"score\": \"0.56521606\",\n \"text\": \"public function destroy(FILE $file)\\n {\\n \\n\\n $url = str_replace('storage', 'public', $file->url);\\n Storage::delete($url);\\n\\n\\n $file->delete();\\n\\n return redirect()->route('admin.files.index')->with('eliminar', 'ok');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac44db6cd2e11be0502437646b98bec0\",\n \"score\": \"0.56515306\",\n \"text\": \"public function untagResource($payload, $headers=[]) {\\n $method = 'DELETE';\\n $path = sprintf('/%s/tag', $this->apiVersion);\\n $headers = $this->buildCommonHeaders($method, $path, $headers);\\n $content = json_encode($payload);\\n $headers['content-length'] = strlen($content);\\n return $this->doRequest($method, $path, $headers, $data = $content);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c36d7803d6dcac2a74d7850bf05b529\",\n \"score\": \"0.56461364\",\n \"text\": \"function deleteResource($model)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"198fe5623de140ddb980a64f1228ee9c\",\n \"score\": \"0.5643258\",\n \"text\": \"public function shutdownObject()\\n {\\n /** @var PersistentResource $resource */\\n foreach ($this->resourceRepository->getAddedResources() as $resource) {\\n if ($this->persistenceManager->isNewObject($resource)) {\\n $this->deleteResource($resource, false);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a133bf2a539adcebeeef545cb23bdf7\",\n \"score\": \"0.56398225\",\n \"text\": \"public function removeEntity($entity);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddb7a7e1bd529da0193a6825c4588bde\",\n \"score\": \"0.5632143\",\n \"text\": \"function deleted_resource(Model $resource, Authenticatable $user = null)\\n { \\n return crud_event(\\\\Core\\\\Crud\\\\Events\\\\DeletedResource::class, $resource, $user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cfb60ffcc989888bf5132bd8f18d28f3\",\n \"score\": \"0.563189\",\n \"text\": \"public function destroy(string $storageKey): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"227d7db0fe495cc1b0734cf71cbc6374\",\n \"score\": \"0.5627202\",\n \"text\": \"public function destroy($id)\\n {\\n try {\\n $resource = Resource::findOrFail($id);\\n auth()->user()->resources()->detach($id);\\n } catch (\\\\Throwable $e) {\\n throw abort(404);\\n }\\n\\n return redirect()->back()\\n ->with([\\n 'status' => 'success-destroy-saved',\\n 'message' => $resource->getMedia()[0]->file_name . ' was unsaved successfully!',\\n 'resource_id' => $id\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2deedc135e4e9a6d691a34bc62901e4\",\n \"score\": \"0.5602831\",\n \"text\": \"public function delete(): void\\n {\\n if ($this->exists()) {\\n File::delete($this->path());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29d3e4879d0ed5074f12cb963276b7cc\",\n \"score\": \"0.56021434\",\n \"text\": \"public function removeUpload()\\n{\\n if ($file = $this->getAbsolutePath()) {\\n unlink($file); \\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2551dae05d41b0f050dbd034df4e2093\",\n \"score\": \"0.5595374\",\n \"text\": \"public function remove()\\n {\\n $res = unlink($this->_path);\\n return $res;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2dfd4b7a5b42f50b0f3186c2425fc4a3\",\n \"score\": \"0.55950236\",\n \"text\": \"public abstract function deleteAsset(Asset $asset);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a8532446eb5a624448dac28b0ab0abe\",\n \"score\": \"0.55868185\",\n \"text\": \"public function remove_to_cart($resource_id){\\n\\n $cart = Session::get('cart');\\n\\n $index = array_search($resource_id, $cart);\\n if($index >= 0) {\\n array_splice($cart, $index, 1);\\n\\n }\\n\\n Session::put('cart',$cart);\\n\\n return redirect('/cart');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a8532446eb5a624448dac28b0ab0abe\",\n \"score\": \"0.55868185\",\n \"text\": \"public function remove_to_cart($resource_id){\\n\\n $cart = Session::get('cart');\\n\\n $index = array_search($resource_id, $cart);\\n if($index >= 0) {\\n array_splice($cart, $index, 1);\\n\\n }\\n\\n Session::put('cart',$cart);\\n\\n return redirect('/cart');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb676b82c99dc848aabda71793e9f00a\",\n \"score\": \"0.55856013\",\n \"text\": \"public function destroy()\\n {\\n $filepath = $this->getFilepath();\\n @unlink($filepath);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f5a2d5d4ccb6690f2c9b7c1ad81379c\",\n \"score\": \"0.55815697\",\n \"text\": \"public function delete() {\\n\\t\\treturn unlink($this->path);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"abcaf8d103f03089c84f7aa510afb02a\",\n \"score\": \"0.5578945\",\n \"text\": \"public function delete()\\n {\\n if (null !== $this->repository) {\\n $this->repository->close();\\n }\\n\\n $this->file->delete($this->filePath);\\n $this->filePath = '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6955ff701e4315c5cfa7e2767eafdbcf\",\n \"score\": \"0.55788815\",\n \"text\": \"public function clear($in_storage_too = true);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f576b22c84d78e83b91d5036361a095c\",\n \"score\": \"0.55780953\",\n \"text\": \"public function delete($filename = null);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d6640f36c0ca88fbe56977a74dad5f1\",\n \"score\": \"0.55737436\",\n \"text\": \"public function remove(MediaInterface $media);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"930240c93dd67bc31042064adb044402\",\n \"score\": \"0.55683106\",\n \"text\": \"public function destroy($id) {\\n $data = Product::findOrFail($id);\\n @unlink(storage_path('app/public/product/' . $data->product_image));\\n $data->delete();\\n return redirect('product')->with('success', 'Product is successfully deleted');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7e801c4eebb9a1d03e7feec4ecd5f21\",\n \"score\": \"0.5567041\",\n \"text\": \"public function destroy($id)\\n {\\n $realestate = Realestate::findOrfail($id);\\n if( count($realestate->files) > 0 )\\n {\\n if(Storage::disk('public')->exists($realestate->files[0]->path))\\n Storage::disk('public')->delete($realestate->files[0]->path);\\n\\n $realestate->files()->delete();\\n }\\n\\n $realestate->delete();\\n\\n\\n return redirect()->route('realestate_index');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f392b1ed7db16f604f843adb672ef950\",\n \"score\": \"0.55653834\",\n \"text\": \"public function destroy($id)\\n {\\n $slide = Slide::find($id);\\n if(Storage::delete('public/slides/'.$slide->slides)){\\n $slide->delete();\\n return redirect('Viewall/All_slide')->with('error','Slide deleted');\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a10bad03f5df8b55f39176b0c613baa\",\n \"score\": \"0.55647546\",\n \"text\": \"public function remove(string $path)\\n {\\n $this->set($path, null);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"adc4e9de22fd8f0d6314e35dcee0b8e0\",\n \"score\": \"0.5563022\",\n \"text\": \"public function remove(string $object): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37d5927bb51b78bdcea795a632988120\",\n \"score\": \"0.55617017\",\n \"text\": \"public function removeTransactionResource($hash)\\n\\t{\\n\\t\\t$path = $this->getTransactionResourcePath($hash);\\n\\t\\treturn $this->deleteTransactionResource($path);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61d679086bf634ff55d0bc8a41a70710\",\n \"score\": \"0.5561249\",\n \"text\": \"public function destroy($id)\\n {\\n $user =DB::table('users')->where('id',$id)->first();\\n $photo = $user->photo;\\n \\n unlink($photo);\\n DB::table('users')->where('id',$id)->delete();\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40424bbe7e79c788acc8e40fa96c2e17\",\n \"score\": \"0.5556214\",\n \"text\": \"public function destroy($id)\\n {\\n \\n $product = Product::findOrFail($id);\\n\\n if($product->delete()) {\\n\\n return new ProductResource($product);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b877c987e8cb3298dc4c9f11662792f9\",\n \"score\": \"0.55559146\",\n \"text\": \"public function destroy($id)\\n {\\n $path = File::findOrFail($id)->path; \\n //esto me va a borrar del storage el archivo que le diga. De todas formas el find or fail me tiene que traer la dirreccion\\n Storage::delete( $path ); \\n\\t\\tFile::findOrFail($id)->delete(); \\n\\t\\treturn redirect('/home');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09d16b97894d6829ff484d20cf378f8f\",\n \"score\": \"0.555526\",\n \"text\": \"public function destroy(Request $request, $id){\\n $file = File::whereCodeName($id)->firstOrFail();\\n //unlink elimina el archivo de la aplicacion\\n unlink(public_path('storage/'. Auth::id() .'/' . $file->code_name));\\n\\n //eliminar de base de datos\\n $file->delete();\\n\\n //avisar que se ha borrado archivo al usuario\\n Alert::info('¡Ateción!', 'Se ha eliminado el archivo');\\n return back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19530e0d90a5511cefec030646832ac7\",\n \"score\": \"0.55509293\",\n \"text\": \"function deleteResource($id)\\n\\t{\\n\\t if(empty($id)) \\n throw new App_Db_Exception_Table('Resource ID is not specified');\\n\\t\\t\\n\\t\\t$this->db_delete($this->_table, array('id'=>$id));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fa04699fe14eb03c48cfde3470db201\",\n \"score\": \"0.55502915\",\n \"text\": \"public function destroy($id)\\n {\\n $file = Upload::findOrFail($id);\\n if(File::exists(public_path($file->filename))){\\n unlink(public_path($file->filename));\\n File::delete(public_path($file->filename));\\n }\\n $file->delete();\\n return redirect()->back()->with('success','Deleted Successfully');\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94b6f2ef01c97218c0ea77ca980a8947\",\n \"score\": \"0.55452746\",\n \"text\": \"public function wipeStorage(): void\\n {\\n $this->storageAdapter->wipeStorage();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb3e91f69cf026d5ea1aa3cafe0bce8f\",\n \"score\": \"0.5540013\",\n \"text\": \"public function remove($id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb3e91f69cf026d5ea1aa3cafe0bce8f\",\n \"score\": \"0.5540013\",\n \"text\": \"public function remove($id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb3e91f69cf026d5ea1aa3cafe0bce8f\",\n \"score\": \"0.5540013\",\n \"text\": \"public function remove($id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51ecf73cbf0ed20291ef32754f32287e\",\n \"score\": \"0.55377126\",\n \"text\": \"public function destroy($id)\\n {\\n $site_image = DB::table('site_images')->where('id',$id)->first();\\n $image=$site_image->image_name;\\n unlink($image);\\n DB::table('site_images')->where('id',$id)->delete();\\n\\n redirect()->back()->with('success', 'site image removed successfully');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30d0b23b0b35054a9dcfaf9fdc529aa5\",\n \"score\": \"0.5532588\",\n \"text\": \"public function destroy($id)\\n {\\n\\n $p = Product::where('id' , $id)->first();\\n if(File::exists($p->image)){\\n File::delete($p->image);\\n }\\n $p->delete();\\n return redirect()->back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"573f58d57c5b1333e4a2ddf6048545ec\",\n \"score\": \"0.55271083\",\n \"text\": \"public function delete();\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":742,"cells":{"query_id":{"kind":"string","value":"54b779f0d94d9f1df21173d500f19ffa"},"query":{"kind":"string","value":"Called by owning model."},"positive_passages":{"kind":"list like","value":[{"docid":"7faf7cd112d6d4a3533bb37a82717e66","score":"0.0","text":"function Cleared(){}","title":""}],"string":"[\n {\n \"docid\": \"7faf7cd112d6d4a3533bb37a82717e66\",\n \"score\": \"0.0\",\n \"text\": \"function Cleared(){}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"b6408c717c29f34496afaf584b18b025","score":"0.6198525","text":"protected function _postSaveRelatedRecords(){ }","title":""},{"docid":"e5cf041c46405389186558e0cc86ec2b","score":"0.616115","text":"protected function afterSave(){}","title":""},{"docid":"afb7d04a27c0630b3d877206e9486db8","score":"0.61350775","text":"protected function _preSaveRelatedRecords(){ }","title":""},{"docid":"a5bafe9cb3892a15d4a498c1d648d21e","score":"0.602487","text":"public function approvableParentModel();","title":""},{"docid":"f6c688a265b1401dc17586737b409f4a","score":"0.60072666","text":"protected function beforeSave(){}","title":""},{"docid":"c463d31fb56fc25c32da1651c1fe9136","score":"0.59547704","text":"protected function _postSave(){ }","title":""},{"docid":"c463d31fb56fc25c32da1651c1fe9136","score":"0.59547704","text":"protected function _postSave(){ }","title":""},{"docid":"8e90f3fa43dca4f6bd5ce7d7caa8b797","score":"0.5905165","text":"protected function before_saving() {\n }","title":""},{"docid":"3cbd449ff5e0734fc2fea7cd433f9e07","score":"0.58882695","text":"protected function _preSave(){ }","title":""},{"docid":"3cbd449ff5e0734fc2fea7cd433f9e07","score":"0.58882695","text":"protected function _preSave(){ }","title":""},{"docid":"581b5f090c276b53857fac8374197773","score":"0.58799297","text":"abstract protected function related();","title":""},{"docid":"87e6630c97c96134a9fedd1135ae63ee","score":"0.5874249","text":"protected function afterSave()\n\t{\n\t}","title":""},{"docid":"8042193c40943da0dfd4b5ed517f8153","score":"0.58249485","text":"protected function after_saving() {\n }","title":""},{"docid":"2b40ff84015d8b85638aeb717847a7d6","score":"0.58077294","text":"protected function onBeforeSave()\n {\n //\n }","title":""},{"docid":"d9f1c8fd8c51bb7764abc368ded60e27","score":"0.57853353","text":"protected function beforeSave()\n\t{\n\t}","title":""},{"docid":"1973769cc92ce2350b739057eea3f2cb","score":"0.57791674","text":"protected function afterMergeWith(ActiveRecord $model){}","title":""},{"docid":"9ba17753f72e11275c71039e17a2ac1d","score":"0.57582533","text":"protected function _postSave()\n {\n }","title":""},{"docid":"9ebab246d8377e90b7a5b57a382c0750","score":"0.570413","text":"public function onSaving()\n {\n $entry = $this->getFormEntry();\n $parent = $this->getParent();\n\n if ($parent) {\n $entry->setAttribute('parent_id', $parent->getId());\n }\n }","title":""},{"docid":"ca53282c22f7a041b534aca2d5ec3d6b","score":"0.5693223","text":"public function retrieved($model): void\n {\n//\n }","title":""},{"docid":"9d59a8b4d54c84073d3265458dfffd05","score":"0.56931245","text":"public function ApplyChanges()\n {\n parent::ApplyChanges();\n }","title":""},{"docid":"9d59a8b4d54c84073d3265458dfffd05","score":"0.56931245","text":"public function ApplyChanges()\n {\n parent::ApplyChanges();\n }","title":""},{"docid":"5d520dd420e9bbd551efba693328f628","score":"0.5690559","text":"public function beforeSave()\r\n\t{\r\n\t\t\r\n\t}","title":""},{"docid":"474dd8de71ed6f1fecc08020f1c8a822","score":"0.56715006","text":"public function ApplyChanges() \n\t\t{\n \t\t\t\tparent::ApplyChanges(); \t\t\t\t\n\t\t}","title":""},{"docid":"41135007ee2cb98effc4c14c6e0c42ec","score":"0.5660243","text":"function afterSave()\n {\n $this->refresh();\n }","title":""},{"docid":"7be7e3a4c7a2f9feb920b9a7eb0d6d81","score":"0.563868","text":"abstract public function setModel();","title":""},{"docid":"f79e4d7eeee9504ad65499735ffd77e8","score":"0.56279844","text":"public function afterSave()\n {\n if (!$this->_cycling) {\n $this->_cycling = true;\n foreach (array_keys($this->relatedData) as $name) {\n $relation = $this->getOwnerRelation($name);\n if ($relation->multiple) {\n $this->saveMany($name);\n $this->owner->populateRelation($name, $this->relatedModels[$name]);\n unset($this->relatedData[$name]);\n }\n }\n $this->_cycling = false;\n }\n }","title":""},{"docid":"671e67a74d2f35216c4ed533ccbcaed2","score":"0.56246066","text":"public function onSaving()\n {\n $parent = $this->getParent();\n $entry = $this->getFormEntry();\n\n if (!$entry->group_id && $group = $this->getGroup()) {\n $entry->group_id = $group->getId();\n }\n\n if (!$entry->type && $type = $this->getType()) {\n $entry->type = $type->getNamespace();\n }\n\n if ($parent) {\n $entry->parent_id = $parent->getId();\n }\n }","title":""},{"docid":"73c8abbec9ea6bac01c8a158aba08621","score":"0.5621982","text":"protected function refreshCurrentValue() {\n $model = $this->model->findByPk($this->model->getPrimaryKey());\n if($model) {\n $this->model->{$this->attribute} = $model->{$this->attribute}; \n } else {\n $this->model->{$this->attribute} = '';\n }\n }","title":""},{"docid":"84222ce305189b6a5f17ccdd76c00d73","score":"0.56183076","text":"abstract protected function model();","title":""},{"docid":"5b69870e3715d39e990671c38bae8580","score":"0.56128365","text":"protected function after_save() {\n\n\t}","title":""},{"docid":"24c94d746011ef2b6a97c8cd44c6ba4d","score":"0.5600294","text":"protected function onEdit(){\n\t\tparent::onEdit();\n\t}","title":""},{"docid":"a59620aa06a81e228f4e99ac47db058e","score":"0.55920756","text":"protected function _beforeSave(){\n if ($this->getItem()){\n $this->setItemId($this->getItem()->getId());\n }\n return parent::_beforeSave();\n }","title":""},{"docid":"c35e529771573263032b61e7ef58b28e","score":"0.55860806","text":"function SubscriberModel()\n\t\t{\n\t\t\tparent::Model();\n\t\t}","title":""},{"docid":"e216e822aa9d0a3f27d91b96c4602411","score":"0.55821806","text":"protected function afterEdit()\n {\n }","title":""},{"docid":"07fe3ebf364a25584d44048ab7bec162","score":"0.5548612","text":"protected function _beforeSave()\n {\n // No code please\n }","title":""},{"docid":"239e8897ff4e966406310fc581055e58","score":"0.5546707","text":"public function save()\n\t{\n\t\tparent::save();\n\t}","title":""},{"docid":"a171bf2e62b0ed3f7ebe1806aee548c8","score":"0.5537757","text":"protected function _applyObjectProperty()\r\t{\r\t\tparent::_applyObjectProperty();\r\r\t\t$Comment_Shop_Item = $this->_object->Comment_Shop_Item;\r\r\t\tif (is_null($Comment_Shop_Item->id))\r\t\t{\r\n\t\t\t$Comment_Shop_Item->shop_item_id = intval($this->_object->parent_id\r\n\t\t\t\t? Core_Entity::factory('Comment', $this->_object->parent_id)->Comment_Shop_Item->shop_item_id\r\n\t\t\t\t: Core_Array::getRequest('shop_item_id'));\r\t\t\t$Comment_Shop_Item->save();\r\t\t}\r\n\r\n\t\tCore_Event::notify(get_class($this) . '.onAfterRedeclaredApplyObjectProperty', $this, array($this->_Admin_Form_Controller));\r\t}","title":""},{"docid":"392ebad9c02bc4716e7a25dd7133ef91","score":"0.5537291","text":"protected function _preSave()\n {\n }","title":""},{"docid":"6b60e0ce0f02ac781a8be95c15db9584","score":"0.5535298","text":"protected function beforeUpdate()\n {\n }","title":""},{"docid":"466e275ed19a2a8dbcaadf640ba2b076","score":"0.5534721","text":"public function afterDelete()\n {\n Yii::$app->trigger(BaseActiveRecord::EVENT_AFTER_DELETE, new ModelEvent([\n 'sender' => $this\n ]));\n parent::afterDelete();\n }","title":""},{"docid":"692182a273c216fdd803892dc9d86f83","score":"0.55344456","text":"public function afterSave()\n {\n }","title":""},{"docid":"6c03284fa88bc17f4b38135e7f768c10","score":"0.55341685","text":"public function afterSave()\n {\n\n }","title":""},{"docid":"6c03284fa88bc17f4b38135e7f768c10","score":"0.55341685","text":"public function afterSave()\n {\n\n }","title":""},{"docid":"b39a8d1bf706a6e6c42578e913956d23","score":"0.5510279","text":"protected function preSave() {\n }","title":""},{"docid":"ab6419ad09693deb01a15a7d5ab5edc6","score":"0.5508789","text":"public function afterSave()\r\n\t{\r\n\t\t\r\n\t}","title":""},{"docid":"bdde03750b555920e78d1035899b28b4","score":"0.5505903","text":"public function run() {\n\t\tif ( ! empty( $this->parent_object ) ) {\n\t\t\tparent::run();\n\t\t}\n\t}","title":""},{"docid":"8d1606ab37cb5373d885109be739e167","score":"0.5505052","text":"public function afterSave() {\n }","title":""},{"docid":"edc0688c28aa8b3a81a938d1e14dd615","score":"0.54972345","text":"public function touch()\n {\n $model = $this->getRelated();\n\n // if (! $model::isIgnoringTouch()) {\n $this->rawUpdate([\n $model->getUpdatedAtColumn() => $model->freshTimestampString(),\n ]);\n // }\n }","title":""},{"docid":"8067d3a97ecab58053b6402310d0c928","score":"0.54962724","text":"protected function realSave() {\n return parent::save();\n }","title":""},{"docid":"084728d883ce962c2a6a6f7947593f34","score":"0.54865277","text":"public function save()\n {\n if ($this->isLoaded()) {\n $baseModel = $this->getModel();\n $assocModel = $this->getObject();\n $fkName = $this->getFkName();\n $pkName = $this->getPkName();\n\n // save associated object\n $assocModel->save();\n $baseModel->writeAttribute($fkName, $assocModel->$pkName);\n }\n }","title":""},{"docid":"f3b75316417e64294f5b0b2e568625ac","score":"0.5482263","text":"public function onBeforeWrite()\n {\n if ($group = $this->owner->relatedGroup()) {\n $this->owner->OrganisationID = $group->ID;\n }\n }","title":""},{"docid":"8aabf9d5e21d8509fa9bd421b6b065ce","score":"0.5476181","text":"public function touchOwners()\n {\n foreach ($this->touches as $relation) {\n $this->$relation()->touch();\n\n if ($this->$relation instanceof self) {\n $this->$relation->fireModelEvent('saved', false);\n\n $this->$relation->touchOwners();\n } elseif ($this->$relation instanceof Collection) {\n $this->$relation->each(function (Model $relation) {\n $relation->touchOwners();\n });\n }\n }\n }","title":""},{"docid":"36148eaa86079cc84d507c7ac55ea43f","score":"0.54737985","text":"function Post()\n\t{\n\t\tparent::Model();\n\t}","title":""},{"docid":"197b1bd75f296ea8d3ebf4085e2b182a","score":"0.5471609","text":"protected function before_update() {\n\n\t}","title":""},{"docid":"7c898c4f1fa372ed02a5e88c1388720b","score":"0.54714674","text":"protected function beanModel()\n {\n $this->getFormBean()->beanModel($this->getModel(), $this->getView());\n }","title":""},{"docid":"5cffcabc1d270d6eee4d3f10c82e567e","score":"0.5471118","text":"protected function beforeSave() {\n return parent::beforeSave();\n }","title":""},{"docid":"25465388c6acef142241e3d93e6ca330","score":"0.5470984","text":"protected function onBeforeUpdate()\n {\n //\n }","title":""},{"docid":"74619b6e929fa4a8f3d9703e5ab529df","score":"0.5459011","text":"public function beforeSave()\n {\n }","title":""},{"docid":"ee6accfd15ed3d927bfd1cb19464ba6b","score":"0.545575","text":"protected function _beforeSave()\n {\n // Only populate defaults for new models.\n if (!$this->id) {\n $this->populateDefaults();\n }\n }","title":""},{"docid":"cfa503f62ac22e746aff667439c2c7ab","score":"0.5449882","text":"function __clone()\r\n {\r\n if (isset($this->_data[$this->_model->id_field]))\r\n unset($this->_data[$this->_model->id_field]);\r\n $this->_model[] = $this->_data;\r\n $this->_data['id'] = $this->_model->last_id();\r\n $this->_old_data = $this->_data;\r\n }","title":""},{"docid":"2061e98d6a7d2c9b32202ef6282bb192","score":"0.5441876","text":"public function initialize()\n {\n\n $this->setSource(\"useditem\");\n $this->hasMany('id', 'SurfRider\\Models\\Sessionuseditem', 'useditem_id', ['alias' => 'Sessionuseditem']);\n $this->belongsTo('entity_id', 'SurfRider\\Models\\Entity', 'id', ['alias' => 'Entity']);\n }","title":""},{"docid":"432a75e90f0da59974df503019fb32a0","score":"0.54415613","text":"public function processChanges()\n {\n $needReset = false;\n\n if (count($this->uowAttach)) {\n $keys = array_keys($this->uowAttach);\n $query = new Query(Flame::getAdapter());\n\n $fk = $this->owner->getTable() . '_' . $this->owner->getPk();\n\n $query\n ->update($this->table)\n ->set(array(\n $fk => $this->owner->getPkValue()\n ))\n ->in('id', $keys)\n ->execute();\n echo $fk . '=>' .$this->owner->getPkValue();\n $needReset = true;\n }\n if (count($this->uowDetach)) {\n $keys = array_keys($this->uowDetach);\n $query = new Query(Flame::getAdapter());\n\n $fk = $this->owner->getTable() . '_' . $this->owner->getPk();\n\n $query\n ->update($this->table)\n ->set(array(\n $fk => 0\n ))\n ->in('id', $keys)\n ->execute();\n $needReset = true;\n }\n\n if ($needReset) {\n $this->reset();\n }\n }","title":""},{"docid":"65897e9cfe8d86e67671586c73606c4c","score":"0.54165286","text":"public function beforeUpdate()\n\t{\n\t\tif ($this->updateAttribute !== null) {\n\t\t\t$this->owner->{$this->updateAttribute} = $this->evaluateTimestamp($this->updateAttribute);\n\t\t}\n\t}","title":""},{"docid":"6962b39b8758e6c2e431681c9fb0450d","score":"0.5411362","text":"public function initialize()\n {\n $this->keepSnapshots(true);\n $this->addBehavior(new Blameable());\n $this->useDynamicUpdate(true);\n $this->hasMany('id', 'models\\Contents', 'parent_id', ['alias' => 'Children']);\n $this->belongsTo('parent_id', 'models\\Contents', 'id', ['alias' => 'Parent']);\n $this->belongsTo('page_id', 'models\\Pages', 'id', ['alias' => 'Pages']);\n }","title":""},{"docid":"155aee897de11479ca9330c9b3c82391","score":"0.5407073","text":"abstract protected function initModel();","title":""},{"docid":"a4f1d9a5ed82f0360bf3495ece05ea81","score":"0.5406284","text":"public function post_model_init($from_cache = FALSE)\n\t{\n\t}","title":""},{"docid":"3973d2605fd98d45117bf12bb03ece49","score":"0.5405568","text":"protected function beforeEdit()\n {\n }","title":""},{"docid":"14c51afe0228706afcb0954a17ed5647","score":"0.5394768","text":"protected function afterForeignKeysAdd()\n {\n \n }","title":""},{"docid":"138eec7c0f1365301c4004989e4c47a3","score":"0.5378349","text":"protected function on_change() {}","title":""},{"docid":"5dc1ca6caacaed20049c64dfb535fd55","score":"0.5377176","text":"protected function _prepareUpdate(){ }","title":""},{"docid":"cbc90d341e6e65af055657309894ff64","score":"0.5367905","text":"public function beforeSaveCaller()\n\t{\n\t\t// Handle the autogen timestamps\n\t\tif (property_exists($this, 'createDate') && $this->createDate == null)\n\t\t\t$this->createDate = new \\DateTime();\n\t\tif (property_exists($this, 'modifiedDate'))\n\t\t\t$this->modifiedDate = new \\DateTime();\n\n\t\t$this->beforeSave();\n\t}","title":""},{"docid":"14cf1eff9365983649826fc5918df7a6","score":"0.5367365","text":"public function syncForeignKeyMembers()\n {\n $this->getRelatedEntityGetters()->each([$this, 'syncForeignKeyMember']);\n }","title":""},{"docid":"d4889ddf6906d3768d38627a94ceb10c","score":"0.53650445","text":"protected function before_save() {\n\n\t}","title":""},{"docid":"e5ca35a165c6ea9be572858553cf640a","score":"0.53549224","text":"public function onInstanceSave() {\n if ($this->getConfig()->isManageTableStructure())\n $this->updateFields($this->getConfig()->getColumns());\n }","title":""},{"docid":"886f2a19fae3ac3b6ad37bd66e64ae47","score":"0.5350031","text":"function save()\n {\n parent::save();\n }","title":""},{"docid":"f5a5c86ce689af69913dabd84eb9655c","score":"0.53490716","text":"protected function post_model_init($from_cache = FALSE)\n\t{\n\t}","title":""},{"docid":"edbd60abc382c94948fe4b3c40f81f5d","score":"0.53475","text":"public function initialize() {\r\n $this->belongsTo(\r\n \"product_id\", \r\n \"Products\", \r\n \"product_id\",\r\n array('reusable' => true));\r\n }","title":""},{"docid":"bc34df6e535478c288265f3c4514bbee","score":"0.5347163","text":"public function beforeSave(){\n\t\t\t\n \t//$this->userId = 14;//Yii::app()->user->getId();\n \treturn parent::beforeSave();\n\t}","title":""},{"docid":"5c986b77e6410ebd9a302f8f1bd852f3","score":"0.53248745","text":"public function initialize()\n {\n \t$this->belongsTo('id_verificacion', 'CobVerificacion', 'id_verificacion', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_actafocalizacion', 'CobActafocalizacionDatos', 'id_actafocalizacion', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\n \t\t\t'reusable' => true\n \t));\n \t$this->hasMany('id_actafocalizacion', 'CobActafocalizacionPersona', 'id_actafocalizacion', array(\n \t\t\t'foreignKey' => array(\n \t\t\t\t\t'message' => 'El acta no puede ser eliminada porque existen empleados asociados a ésta'\n \t\t\t)\n \t));\n }","title":""},{"docid":"ba4b704df95ac8a5f454b34575da37d4","score":"0.5323188","text":"function Project_model()\r\n {\r\n parent::Model();\r\n \r\n }","title":""},{"docid":"1c37143e1f25a54e0a3489ca6d22e30a","score":"0.5321167","text":"public function initialize()\n {\n $this->belongsTo('pedido_cd_pedido', 'App\\Models\\Pedido', 'cd_pedido', array('alias' => 'Pedido'));\n $this->belongsTo('cd_usuario', 'App\\Models\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\n $this->belongsTo('pedido_cd_pedido', 'App\\Models\\Pedido', 'cd_pedido', array('foreignKey' => true,'alias' => 'Pedido'));\n $this->belongsTo('cd_usuario', 'App\\Models\\Usuario', 'cd_usuario', array('foreignKey' => true,'alias' => 'Usuario'));\n }","title":""},{"docid":"35597ff9e303fa20fa6f661867985d8e","score":"0.53157264","text":"public function before_save() {\n \n }","title":""},{"docid":"75405507e2e1f6fb420990ec14dc5f42","score":"0.5310005","text":"public function afterFind()\n {\n if ($this->isRelationPopulated('location') && $related = $this->getRelatedRecords()['location']) {\n foreach ($related as $key => $value) {\n if ($this->hasAttribute($key) && !empty($value)) {\n $this->setAttribute($key, $value);\n }\n }\n }\n parent::afterFind();\n }","title":""},{"docid":"a3d11459ace65777261c5e8d74c2c4a3","score":"0.5307606","text":"abstract protected function newRelatedInstanceFor(Model $parent);","title":""},{"docid":"5a2d031b983ad0028aed5b665c059916","score":"0.5307149","text":"public function performDeleteOnModel()\n {\n if (static::isActive()) {\n throw new ReadOnlyException(__FUNCTION__, get_called_class());\n }\n parent::performDeleteOnModel();\n }","title":""},{"docid":"b51f422c4842c95df6f7ae2d0f848795","score":"0.5299663","text":"public function initialize()\n {\n $this->belongsTo('id_events', 'Events', 'id_events', [\n 'alias' => 'Events',\n \"foreignKey\" => array(\n \"action\" => Relation::ACTION_CASCADE,\n )\n ]);\n }","title":""},{"docid":"928405523f2a27190a855100aff291cc","score":"0.52964383","text":"public function initialize()\n {\n $this->belongsTo('id_bonus', 'Bonus', 'id_bonus', array('foreignKey' => true));\n $this->belongsTo('id_event', 'Event', 'id_event', array('foreignKey' => true));\n $this->belongsTo('id_user', 'User', 'id_user', array('foreignKey' => true));\n }","title":""},{"docid":"0effe4297602a1347192c9c40fce10b6","score":"0.5293726","text":"function onBeforeSave() { return; }","title":""},{"docid":"f5b619ff80aafb7a26b0c64f779c49dd","score":"0.5292757","text":"function Departamento_model()\n {\n parent::Model();\n }","title":""},{"docid":"024ce3c47e5d7a58946815a1fe4ae867","score":"0.52869","text":"function SongModel()\r\n {\r\n parent::Model();\r\n\r\n }","title":""},{"docid":"d4cf0083d77a87d67cae93cf2dd8f94b","score":"0.52860373","text":"public function preSave($native)\n {\n // at least for now, only belongs-to needs this\n }","title":""},{"docid":"0b29038b9c34b38dd7d033d6edf2cf91","score":"0.5286014","text":"function post_model_init($from_cache = FALSE)\n {\n }","title":""},{"docid":"27d869f996e82df1613c3f92e3912123","score":"0.5284547","text":"public function afterFind() {\n\t\t// log aside original attributes as they are later to be used to check for dirty-ness of 'this' object\n\t\t$this->originalAttributes = $this->attributes;\n\t\tparent::afterFind();\n\t}","title":""},{"docid":"9e5fa56e215587fc2fb328eb8bb3e389","score":"0.5284534","text":"protected function bofore()\n {\n }","title":""},{"docid":"5db9682c4bf31d052200051b28a042f1","score":"0.5283826","text":"public function handleAfterSave(): void\n {\n // Put the current attributes as the original ones.\n $this->syncOriginal();\n }","title":""},{"docid":"b127ebcfb62466223f87fdd7fc9f2624","score":"0.5276585","text":"function save() {\n $count_cache_affected = $this->isNew() || $this->isModifiedField('state') || $this->isModifiedField('completed_on');\n $search_index_affected = $this->isNew() || $this->isModifiedField('state') || $this->isModifiedField('body');\n\n parent::save();\n\n if($count_cache_affected || $search_index_affected) {\n $parent = $this->getParent();\n\n if($search_index_affected && $parent instanceof ISearchItem) {\n $parent->search()->create();\n } // if\n\n if($count_cache_affected && $parent instanceof ISubtasks) {\n AngieApplication::cache()->removeByObject($this->getParent(), 'subtasks_count');\n } // if\n } // if\n }","title":""},{"docid":"987708c10216f220c92f0bb6369b64c7","score":"0.5270907","text":"public function update()\n {\n $this->apply(function ($config) {\n $foreignKey = Str::snake($this->key($config['foreignKey']));\n\n if ($this->model->getOriginal($foreignKey) && $this->model->{$foreignKey} != $this->model->getOriginal($foreignKey)) {\n $this->updateCacheRecord($config, '-', 1, $this->model->getOriginal($foreignKey));\n $this->updateCacheRecord($config, '+', 1, $this->model->{$foreignKey});\n }\n });\n }","title":""},{"docid":"cfbe4f85c1054cbc6ba97bc2fda1c750","score":"0.5270309","text":"public function model()\n {\n throw new Exception('model method not implemented');\n }","title":""},{"docid":"d0cf71b0b323574f66a7f4db08746ac3","score":"0.525424","text":"protected function beforeForeignKeysAdd()\n {\n \n }","title":""},{"docid":"d444ede5bb7544b480f3e7e8d3c32492","score":"0.5245057","text":"function __setAssociatedData() {\n\t\tforeach(array('belongsTo', 'hasAndBelongsToMany') as $association) {\n\t\t\tforeach ($this->{$this->modelClass}->{$association} as $alias => $values) {\n\t\t\t\t$theList = $this->{$this->modelClass}->{$alias}->find('list');\n\t\t\t\t$this->set($this->_pluralName($alias), $theList);\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"a7879a339a1bcf2f77582dff8ad82405","score":"0.52422297","text":"abstract function _on_update_object();","title":""}],"string":"[\n {\n \"docid\": \"b6408c717c29f34496afaf584b18b025\",\n \"score\": \"0.6198525\",\n \"text\": \"protected function _postSaveRelatedRecords(){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5cf041c46405389186558e0cc86ec2b\",\n \"score\": \"0.616115\",\n \"text\": \"protected function afterSave(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afb7d04a27c0630b3d877206e9486db8\",\n \"score\": \"0.61350775\",\n \"text\": \"protected function _preSaveRelatedRecords(){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5bafe9cb3892a15d4a498c1d648d21e\",\n \"score\": \"0.602487\",\n \"text\": \"public function approvableParentModel();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6c688a265b1401dc17586737b409f4a\",\n \"score\": \"0.60072666\",\n \"text\": \"protected function beforeSave(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c463d31fb56fc25c32da1651c1fe9136\",\n \"score\": \"0.59547704\",\n \"text\": \"protected function _postSave(){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c463d31fb56fc25c32da1651c1fe9136\",\n \"score\": \"0.59547704\",\n \"text\": \"protected function _postSave(){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e90f3fa43dca4f6bd5ce7d7caa8b797\",\n \"score\": \"0.5905165\",\n \"text\": \"protected function before_saving() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3cbd449ff5e0734fc2fea7cd433f9e07\",\n \"score\": \"0.58882695\",\n \"text\": \"protected function _preSave(){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3cbd449ff5e0734fc2fea7cd433f9e07\",\n \"score\": \"0.58882695\",\n \"text\": \"protected function _preSave(){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"581b5f090c276b53857fac8374197773\",\n \"score\": \"0.58799297\",\n \"text\": \"abstract protected function related();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87e6630c97c96134a9fedd1135ae63ee\",\n \"score\": \"0.5874249\",\n \"text\": \"protected function afterSave()\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8042193c40943da0dfd4b5ed517f8153\",\n \"score\": \"0.58249485\",\n \"text\": \"protected function after_saving() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b40ff84015d8b85638aeb717847a7d6\",\n \"score\": \"0.58077294\",\n \"text\": \"protected function onBeforeSave()\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9f1c8fd8c51bb7764abc368ded60e27\",\n \"score\": \"0.57853353\",\n \"text\": \"protected function beforeSave()\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1973769cc92ce2350b739057eea3f2cb\",\n \"score\": \"0.57791674\",\n \"text\": \"protected function afterMergeWith(ActiveRecord $model){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba17753f72e11275c71039e17a2ac1d\",\n \"score\": \"0.57582533\",\n \"text\": \"protected function _postSave()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ebab246d8377e90b7a5b57a382c0750\",\n \"score\": \"0.570413\",\n \"text\": \"public function onSaving()\\n {\\n $entry = $this->getFormEntry();\\n $parent = $this->getParent();\\n\\n if ($parent) {\\n $entry->setAttribute('parent_id', $parent->getId());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca53282c22f7a041b534aca2d5ec3d6b\",\n \"score\": \"0.5693223\",\n \"text\": \"public function retrieved($model): void\\n {\\n//\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d59a8b4d54c84073d3265458dfffd05\",\n \"score\": \"0.56931245\",\n \"text\": \"public function ApplyChanges()\\n {\\n parent::ApplyChanges();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d59a8b4d54c84073d3265458dfffd05\",\n \"score\": \"0.56931245\",\n \"text\": \"public function ApplyChanges()\\n {\\n parent::ApplyChanges();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d520dd420e9bbd551efba693328f628\",\n \"score\": \"0.5690559\",\n \"text\": \"public function beforeSave()\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"474dd8de71ed6f1fecc08020f1c8a822\",\n \"score\": \"0.56715006\",\n \"text\": \"public function ApplyChanges() \\n\\t\\t{\\n \\t\\t\\t\\tparent::ApplyChanges(); \\t\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41135007ee2cb98effc4c14c6e0c42ec\",\n \"score\": \"0.5660243\",\n \"text\": \"function afterSave()\\n {\\n $this->refresh();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7be7e3a4c7a2f9feb920b9a7eb0d6d81\",\n \"score\": \"0.563868\",\n \"text\": \"abstract public function setModel();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f79e4d7eeee9504ad65499735ffd77e8\",\n \"score\": \"0.56279844\",\n \"text\": \"public function afterSave()\\n {\\n if (!$this->_cycling) {\\n $this->_cycling = true;\\n foreach (array_keys($this->relatedData) as $name) {\\n $relation = $this->getOwnerRelation($name);\\n if ($relation->multiple) {\\n $this->saveMany($name);\\n $this->owner->populateRelation($name, $this->relatedModels[$name]);\\n unset($this->relatedData[$name]);\\n }\\n }\\n $this->_cycling = false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"671e67a74d2f35216c4ed533ccbcaed2\",\n \"score\": \"0.56246066\",\n \"text\": \"public function onSaving()\\n {\\n $parent = $this->getParent();\\n $entry = $this->getFormEntry();\\n\\n if (!$entry->group_id && $group = $this->getGroup()) {\\n $entry->group_id = $group->getId();\\n }\\n\\n if (!$entry->type && $type = $this->getType()) {\\n $entry->type = $type->getNamespace();\\n }\\n\\n if ($parent) {\\n $entry->parent_id = $parent->getId();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73c8abbec9ea6bac01c8a158aba08621\",\n \"score\": \"0.5621982\",\n \"text\": \"protected function refreshCurrentValue() {\\n $model = $this->model->findByPk($this->model->getPrimaryKey());\\n if($model) {\\n $this->model->{$this->attribute} = $model->{$this->attribute}; \\n } else {\\n $this->model->{$this->attribute} = '';\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84222ce305189b6a5f17ccdd76c00d73\",\n \"score\": \"0.56183076\",\n \"text\": \"abstract protected function model();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b69870e3715d39e990671c38bae8580\",\n \"score\": \"0.56128365\",\n \"text\": \"protected function after_save() {\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24c94d746011ef2b6a97c8cd44c6ba4d\",\n \"score\": \"0.5600294\",\n \"text\": \"protected function onEdit(){\\n\\t\\tparent::onEdit();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a59620aa06a81e228f4e99ac47db058e\",\n \"score\": \"0.55920756\",\n \"text\": \"protected function _beforeSave(){\\n if ($this->getItem()){\\n $this->setItemId($this->getItem()->getId());\\n }\\n return parent::_beforeSave();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c35e529771573263032b61e7ef58b28e\",\n \"score\": \"0.55860806\",\n \"text\": \"function SubscriberModel()\\n\\t\\t{\\n\\t\\t\\tparent::Model();\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e216e822aa9d0a3f27d91b96c4602411\",\n \"score\": \"0.55821806\",\n \"text\": \"protected function afterEdit()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07fe3ebf364a25584d44048ab7bec162\",\n \"score\": \"0.5548612\",\n \"text\": \"protected function _beforeSave()\\n {\\n // No code please\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"239e8897ff4e966406310fc581055e58\",\n \"score\": \"0.5546707\",\n \"text\": \"public function save()\\n\\t{\\n\\t\\tparent::save();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a171bf2e62b0ed3f7ebe1806aee548c8\",\n \"score\": \"0.5537757\",\n \"text\": \"protected function _applyObjectProperty()\\r\\t{\\r\\t\\tparent::_applyObjectProperty();\\r\\r\\t\\t$Comment_Shop_Item = $this->_object->Comment_Shop_Item;\\r\\r\\t\\tif (is_null($Comment_Shop_Item->id))\\r\\t\\t{\\r\\n\\t\\t\\t$Comment_Shop_Item->shop_item_id = intval($this->_object->parent_id\\r\\n\\t\\t\\t\\t? Core_Entity::factory('Comment', $this->_object->parent_id)->Comment_Shop_Item->shop_item_id\\r\\n\\t\\t\\t\\t: Core_Array::getRequest('shop_item_id'));\\r\\t\\t\\t$Comment_Shop_Item->save();\\r\\t\\t}\\r\\n\\r\\n\\t\\tCore_Event::notify(get_class($this) . '.onAfterRedeclaredApplyObjectProperty', $this, array($this->_Admin_Form_Controller));\\r\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"392ebad9c02bc4716e7a25dd7133ef91\",\n \"score\": \"0.5537291\",\n \"text\": \"protected function _preSave()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6b60e0ce0f02ac781a8be95c15db9584\",\n \"score\": \"0.5535298\",\n \"text\": \"protected function beforeUpdate()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"466e275ed19a2a8dbcaadf640ba2b076\",\n \"score\": \"0.5534721\",\n \"text\": \"public function afterDelete()\\n {\\n Yii::$app->trigger(BaseActiveRecord::EVENT_AFTER_DELETE, new ModelEvent([\\n 'sender' => $this\\n ]));\\n parent::afterDelete();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"692182a273c216fdd803892dc9d86f83\",\n \"score\": \"0.55344456\",\n \"text\": \"public function afterSave()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c03284fa88bc17f4b38135e7f768c10\",\n \"score\": \"0.55341685\",\n \"text\": \"public function afterSave()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c03284fa88bc17f4b38135e7f768c10\",\n \"score\": \"0.55341685\",\n \"text\": \"public function afterSave()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b39a8d1bf706a6e6c42578e913956d23\",\n \"score\": \"0.5510279\",\n \"text\": \"protected function preSave() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab6419ad09693deb01a15a7d5ab5edc6\",\n \"score\": \"0.5508789\",\n \"text\": \"public function afterSave()\\r\\n\\t{\\r\\n\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdde03750b555920e78d1035899b28b4\",\n \"score\": \"0.5505903\",\n \"text\": \"public function run() {\\n\\t\\tif ( ! empty( $this->parent_object ) ) {\\n\\t\\t\\tparent::run();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d1606ab37cb5373d885109be739e167\",\n \"score\": \"0.5505052\",\n \"text\": \"public function afterSave() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edc0688c28aa8b3a81a938d1e14dd615\",\n \"score\": \"0.54972345\",\n \"text\": \"public function touch()\\n {\\n $model = $this->getRelated();\\n\\n // if (! $model::isIgnoringTouch()) {\\n $this->rawUpdate([\\n $model->getUpdatedAtColumn() => $model->freshTimestampString(),\\n ]);\\n // }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8067d3a97ecab58053b6402310d0c928\",\n \"score\": \"0.54962724\",\n \"text\": \"protected function realSave() {\\n return parent::save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"084728d883ce962c2a6a6f7947593f34\",\n \"score\": \"0.54865277\",\n \"text\": \"public function save()\\n {\\n if ($this->isLoaded()) {\\n $baseModel = $this->getModel();\\n $assocModel = $this->getObject();\\n $fkName = $this->getFkName();\\n $pkName = $this->getPkName();\\n\\n // save associated object\\n $assocModel->save();\\n $baseModel->writeAttribute($fkName, $assocModel->$pkName);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3b75316417e64294f5b0b2e568625ac\",\n \"score\": \"0.5482263\",\n \"text\": \"public function onBeforeWrite()\\n {\\n if ($group = $this->owner->relatedGroup()) {\\n $this->owner->OrganisationID = $group->ID;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8aabf9d5e21d8509fa9bd421b6b065ce\",\n \"score\": \"0.5476181\",\n \"text\": \"public function touchOwners()\\n {\\n foreach ($this->touches as $relation) {\\n $this->$relation()->touch();\\n\\n if ($this->$relation instanceof self) {\\n $this->$relation->fireModelEvent('saved', false);\\n\\n $this->$relation->touchOwners();\\n } elseif ($this->$relation instanceof Collection) {\\n $this->$relation->each(function (Model $relation) {\\n $relation->touchOwners();\\n });\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36148eaa86079cc84d507c7ac55ea43f\",\n \"score\": \"0.54737985\",\n \"text\": \"function Post()\\n\\t{\\n\\t\\tparent::Model();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"197b1bd75f296ea8d3ebf4085e2b182a\",\n \"score\": \"0.5471609\",\n \"text\": \"protected function before_update() {\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c898c4f1fa372ed02a5e88c1388720b\",\n \"score\": \"0.54714674\",\n \"text\": \"protected function beanModel()\\n {\\n $this->getFormBean()->beanModel($this->getModel(), $this->getView());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cffcabc1d270d6eee4d3f10c82e567e\",\n \"score\": \"0.5471118\",\n \"text\": \"protected function beforeSave() {\\n return parent::beforeSave();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25465388c6acef142241e3d93e6ca330\",\n \"score\": \"0.5470984\",\n \"text\": \"protected function onBeforeUpdate()\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74619b6e929fa4a8f3d9703e5ab529df\",\n \"score\": \"0.5459011\",\n \"text\": \"public function beforeSave()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee6accfd15ed3d927bfd1cb19464ba6b\",\n \"score\": \"0.545575\",\n \"text\": \"protected function _beforeSave()\\n {\\n // Only populate defaults for new models.\\n if (!$this->id) {\\n $this->populateDefaults();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cfa503f62ac22e746aff667439c2c7ab\",\n \"score\": \"0.5449882\",\n \"text\": \"function __clone()\\r\\n {\\r\\n if (isset($this->_data[$this->_model->id_field]))\\r\\n unset($this->_data[$this->_model->id_field]);\\r\\n $this->_model[] = $this->_data;\\r\\n $this->_data['id'] = $this->_model->last_id();\\r\\n $this->_old_data = $this->_data;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2061e98d6a7d2c9b32202ef6282bb192\",\n \"score\": \"0.5441876\",\n \"text\": \"public function initialize()\\n {\\n\\n $this->setSource(\\\"useditem\\\");\\n $this->hasMany('id', 'SurfRider\\\\Models\\\\Sessionuseditem', 'useditem_id', ['alias' => 'Sessionuseditem']);\\n $this->belongsTo('entity_id', 'SurfRider\\\\Models\\\\Entity', 'id', ['alias' => 'Entity']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"432a75e90f0da59974df503019fb32a0\",\n \"score\": \"0.54415613\",\n \"text\": \"public function processChanges()\\n {\\n $needReset = false;\\n\\n if (count($this->uowAttach)) {\\n $keys = array_keys($this->uowAttach);\\n $query = new Query(Flame::getAdapter());\\n\\n $fk = $this->owner->getTable() . '_' . $this->owner->getPk();\\n\\n $query\\n ->update($this->table)\\n ->set(array(\\n $fk => $this->owner->getPkValue()\\n ))\\n ->in('id', $keys)\\n ->execute();\\n echo $fk . '=>' .$this->owner->getPkValue();\\n $needReset = true;\\n }\\n if (count($this->uowDetach)) {\\n $keys = array_keys($this->uowDetach);\\n $query = new Query(Flame::getAdapter());\\n\\n $fk = $this->owner->getTable() . '_' . $this->owner->getPk();\\n\\n $query\\n ->update($this->table)\\n ->set(array(\\n $fk => 0\\n ))\\n ->in('id', $keys)\\n ->execute();\\n $needReset = true;\\n }\\n\\n if ($needReset) {\\n $this->reset();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65897e9cfe8d86e67671586c73606c4c\",\n \"score\": \"0.54165286\",\n \"text\": \"public function beforeUpdate()\\n\\t{\\n\\t\\tif ($this->updateAttribute !== null) {\\n\\t\\t\\t$this->owner->{$this->updateAttribute} = $this->evaluateTimestamp($this->updateAttribute);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6962b39b8758e6c2e431681c9fb0450d\",\n \"score\": \"0.5411362\",\n \"text\": \"public function initialize()\\n {\\n $this->keepSnapshots(true);\\n $this->addBehavior(new Blameable());\\n $this->useDynamicUpdate(true);\\n $this->hasMany('id', 'models\\\\Contents', 'parent_id', ['alias' => 'Children']);\\n $this->belongsTo('parent_id', 'models\\\\Contents', 'id', ['alias' => 'Parent']);\\n $this->belongsTo('page_id', 'models\\\\Pages', 'id', ['alias' => 'Pages']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"155aee897de11479ca9330c9b3c82391\",\n \"score\": \"0.5407073\",\n \"text\": \"abstract protected function initModel();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4f1d9a5ed82f0360bf3495ece05ea81\",\n \"score\": \"0.5406284\",\n \"text\": \"public function post_model_init($from_cache = FALSE)\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3973d2605fd98d45117bf12bb03ece49\",\n \"score\": \"0.5405568\",\n \"text\": \"protected function beforeEdit()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14c51afe0228706afcb0954a17ed5647\",\n \"score\": \"0.5394768\",\n \"text\": \"protected function afterForeignKeysAdd()\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"138eec7c0f1365301c4004989e4c47a3\",\n \"score\": \"0.5378349\",\n \"text\": \"protected function on_change() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5dc1ca6caacaed20049c64dfb535fd55\",\n \"score\": \"0.5377176\",\n \"text\": \"protected function _prepareUpdate(){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbc90d341e6e65af055657309894ff64\",\n \"score\": \"0.5367905\",\n \"text\": \"public function beforeSaveCaller()\\n\\t{\\n\\t\\t// Handle the autogen timestamps\\n\\t\\tif (property_exists($this, 'createDate') && $this->createDate == null)\\n\\t\\t\\t$this->createDate = new \\\\DateTime();\\n\\t\\tif (property_exists($this, 'modifiedDate'))\\n\\t\\t\\t$this->modifiedDate = new \\\\DateTime();\\n\\n\\t\\t$this->beforeSave();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14cf1eff9365983649826fc5918df7a6\",\n \"score\": \"0.5367365\",\n \"text\": \"public function syncForeignKeyMembers()\\n {\\n $this->getRelatedEntityGetters()->each([$this, 'syncForeignKeyMember']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4889ddf6906d3768d38627a94ceb10c\",\n \"score\": \"0.53650445\",\n \"text\": \"protected function before_save() {\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5ca35a165c6ea9be572858553cf640a\",\n \"score\": \"0.53549224\",\n \"text\": \"public function onInstanceSave() {\\n if ($this->getConfig()->isManageTableStructure())\\n $this->updateFields($this->getConfig()->getColumns());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"886f2a19fae3ac3b6ad37bd66e64ae47\",\n \"score\": \"0.5350031\",\n \"text\": \"function save()\\n {\\n parent::save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5a5c86ce689af69913dabd84eb9655c\",\n \"score\": \"0.53490716\",\n \"text\": \"protected function post_model_init($from_cache = FALSE)\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edbd60abc382c94948fe4b3c40f81f5d\",\n \"score\": \"0.53475\",\n \"text\": \"public function initialize() {\\r\\n $this->belongsTo(\\r\\n \\\"product_id\\\", \\r\\n \\\"Products\\\", \\r\\n \\\"product_id\\\",\\r\\n array('reusable' => true));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc34df6e535478c288265f3c4514bbee\",\n \"score\": \"0.5347163\",\n \"text\": \"public function beforeSave(){\\n\\t\\t\\t\\n \\t//$this->userId = 14;//Yii::app()->user->getId();\\n \\treturn parent::beforeSave();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c986b77e6410ebd9a302f8f1bd852f3\",\n \"score\": \"0.53248745\",\n \"text\": \"public function initialize()\\n {\\n \\t$this->belongsTo('id_verificacion', 'CobVerificacion', 'id_verificacion', array(\\n \\t\\t\\t'reusable' => true\\n \\t));\\n \\t$this->belongsTo('id_actafocalizacion', 'CobActafocalizacionDatos', 'id_actafocalizacion', array(\\n \\t\\t\\t'reusable' => true\\n \\t));\\n \\t$this->belongsTo('id_usuario', 'IbcUsuario', 'id_usuario', array(\\n \\t\\t\\t'reusable' => true\\n \\t));\\n \\t$this->hasMany('id_actafocalizacion', 'CobActafocalizacionPersona', 'id_actafocalizacion', array(\\n \\t\\t\\t'foreignKey' => array(\\n \\t\\t\\t\\t\\t'message' => 'El acta no puede ser eliminada porque existen empleados asociados a ésta'\\n \\t\\t\\t)\\n \\t));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba4b704df95ac8a5f454b34575da37d4\",\n \"score\": \"0.5323188\",\n \"text\": \"function Project_model()\\r\\n {\\r\\n parent::Model();\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c37143e1f25a54e0a3489ca6d22e30a\",\n \"score\": \"0.5321167\",\n \"text\": \"public function initialize()\\n {\\n $this->belongsTo('pedido_cd_pedido', 'App\\\\Models\\\\Pedido', 'cd_pedido', array('alias' => 'Pedido'));\\n $this->belongsTo('cd_usuario', 'App\\\\Models\\\\Usuario', 'cd_usuario', array('alias' => 'Usuario'));\\n $this->belongsTo('pedido_cd_pedido', 'App\\\\Models\\\\Pedido', 'cd_pedido', array('foreignKey' => true,'alias' => 'Pedido'));\\n $this->belongsTo('cd_usuario', 'App\\\\Models\\\\Usuario', 'cd_usuario', array('foreignKey' => true,'alias' => 'Usuario'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35597ff9e303fa20fa6f661867985d8e\",\n \"score\": \"0.53157264\",\n \"text\": \"public function before_save() {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75405507e2e1f6fb420990ec14dc5f42\",\n \"score\": \"0.5310005\",\n \"text\": \"public function afterFind()\\n {\\n if ($this->isRelationPopulated('location') && $related = $this->getRelatedRecords()['location']) {\\n foreach ($related as $key => $value) {\\n if ($this->hasAttribute($key) && !empty($value)) {\\n $this->setAttribute($key, $value);\\n }\\n }\\n }\\n parent::afterFind();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3d11459ace65777261c5e8d74c2c4a3\",\n \"score\": \"0.5307606\",\n \"text\": \"abstract protected function newRelatedInstanceFor(Model $parent);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a2d031b983ad0028aed5b665c059916\",\n \"score\": \"0.5307149\",\n \"text\": \"public function performDeleteOnModel()\\n {\\n if (static::isActive()) {\\n throw new ReadOnlyException(__FUNCTION__, get_called_class());\\n }\\n parent::performDeleteOnModel();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b51f422c4842c95df6f7ae2d0f848795\",\n \"score\": \"0.5299663\",\n \"text\": \"public function initialize()\\n {\\n $this->belongsTo('id_events', 'Events', 'id_events', [\\n 'alias' => 'Events',\\n \\\"foreignKey\\\" => array(\\n \\\"action\\\" => Relation::ACTION_CASCADE,\\n )\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"928405523f2a27190a855100aff291cc\",\n \"score\": \"0.52964383\",\n \"text\": \"public function initialize()\\n {\\n $this->belongsTo('id_bonus', 'Bonus', 'id_bonus', array('foreignKey' => true));\\n $this->belongsTo('id_event', 'Event', 'id_event', array('foreignKey' => true));\\n $this->belongsTo('id_user', 'User', 'id_user', array('foreignKey' => true));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0effe4297602a1347192c9c40fce10b6\",\n \"score\": \"0.5293726\",\n \"text\": \"function onBeforeSave() { return; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5b619ff80aafb7a26b0c64f779c49dd\",\n \"score\": \"0.5292757\",\n \"text\": \"function Departamento_model()\\n {\\n parent::Model();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"024ce3c47e5d7a58946815a1fe4ae867\",\n \"score\": \"0.52869\",\n \"text\": \"function SongModel()\\r\\n {\\r\\n parent::Model();\\r\\n\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4cf0083d77a87d67cae93cf2dd8f94b\",\n \"score\": \"0.52860373\",\n \"text\": \"public function preSave($native)\\n {\\n // at least for now, only belongs-to needs this\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b29038b9c34b38dd7d033d6edf2cf91\",\n \"score\": \"0.5286014\",\n \"text\": \"function post_model_init($from_cache = FALSE)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27d869f996e82df1613c3f92e3912123\",\n \"score\": \"0.5284547\",\n \"text\": \"public function afterFind() {\\n\\t\\t// log aside original attributes as they are later to be used to check for dirty-ness of 'this' object\\n\\t\\t$this->originalAttributes = $this->attributes;\\n\\t\\tparent::afterFind();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e5fa56e215587fc2fb328eb8bb3e389\",\n \"score\": \"0.5284534\",\n \"text\": \"protected function bofore()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5db9682c4bf31d052200051b28a042f1\",\n \"score\": \"0.5283826\",\n \"text\": \"public function handleAfterSave(): void\\n {\\n // Put the current attributes as the original ones.\\n $this->syncOriginal();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b127ebcfb62466223f87fdd7fc9f2624\",\n \"score\": \"0.5276585\",\n \"text\": \"function save() {\\n $count_cache_affected = $this->isNew() || $this->isModifiedField('state') || $this->isModifiedField('completed_on');\\n $search_index_affected = $this->isNew() || $this->isModifiedField('state') || $this->isModifiedField('body');\\n\\n parent::save();\\n\\n if($count_cache_affected || $search_index_affected) {\\n $parent = $this->getParent();\\n\\n if($search_index_affected && $parent instanceof ISearchItem) {\\n $parent->search()->create();\\n } // if\\n\\n if($count_cache_affected && $parent instanceof ISubtasks) {\\n AngieApplication::cache()->removeByObject($this->getParent(), 'subtasks_count');\\n } // if\\n } // if\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"987708c10216f220c92f0bb6369b64c7\",\n \"score\": \"0.5270907\",\n \"text\": \"public function update()\\n {\\n $this->apply(function ($config) {\\n $foreignKey = Str::snake($this->key($config['foreignKey']));\\n\\n if ($this->model->getOriginal($foreignKey) && $this->model->{$foreignKey} != $this->model->getOriginal($foreignKey)) {\\n $this->updateCacheRecord($config, '-', 1, $this->model->getOriginal($foreignKey));\\n $this->updateCacheRecord($config, '+', 1, $this->model->{$foreignKey});\\n }\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cfbe4f85c1054cbc6ba97bc2fda1c750\",\n \"score\": \"0.5270309\",\n \"text\": \"public function model()\\n {\\n throw new Exception('model method not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0cf71b0b323574f66a7f4db08746ac3\",\n \"score\": \"0.525424\",\n \"text\": \"protected function beforeForeignKeysAdd()\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d444ede5bb7544b480f3e7e8d3c32492\",\n \"score\": \"0.5245057\",\n \"text\": \"function __setAssociatedData() {\\n\\t\\tforeach(array('belongsTo', 'hasAndBelongsToMany') as $association) {\\n\\t\\t\\tforeach ($this->{$this->modelClass}->{$association} as $alias => $values) {\\n\\t\\t\\t\\t$theList = $this->{$this->modelClass}->{$alias}->find('list');\\n\\t\\t\\t\\t$this->set($this->_pluralName($alias), $theList);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7879a339a1bcf2f77582dff8ad82405\",\n \"score\": \"0.52422297\",\n \"text\": \"abstract function _on_update_object();\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":743,"cells":{"query_id":{"kind":"string","value":"ae32125935a140c1e805b99ef7ca79e6"},"query":{"kind":"string","value":"end of method register Login User method"},"positive_passages":{"kind":"list like","value":[{"docid":"1549a34187d617edefa08c89e88c0654","score":"0.0","text":"public function login() {\n $data['title'] = 'Sign In';\n \n //setting errors\n $this->form_validation->set_rules('username', 'Username', 'required');\n $this->form_validation->set_rules('password', 'Password', 'required');\n \n if($this->form_validation->run() === FALSE){\n //displaying the register page with errors\n $this->load->view('templates/header');\n $this->load->view('users/login', $data);\n $this->load->view('templates/footer');\n }else{\n \n //Get username\n $username = $this->input->post('username');\n \n //Get and ecrypt the password\n $password = md5($this->input->post('password'));\n \n //Login user\n $user_id = $this->user_model->login($username, $password);\n \n //check for user id\n if($user_id){\n \n //get user data\n $user = $this->user_model->get_users($user_id);\n \n //check if user account is disabled\n $disabled = $user['disabled'];\n \n \n //if disabled redirect to login page and display message\n if($disabled){\n // set message in a session\n $this->session->set_flashdata('user_disabled', 'Your user has been disabled');\n \n //redirect user to home page after registration is successful\n redirect('login');\n }\n \n //check admin rights\n $role = $user['role_id'];\n \n //Saving the data returned from user model to $user_data variable\n $user_data = array(\n 'user_id' => $user_id,\n 'username' => $username,\n 'role' => $role,\n 'logged_in' => TRUE\n );\n \n \n //Set user data into a session\n $this->session->set_userdata($user_data);\n \n // set message in a session\n $this->session->set_flashdata('user_loggedin', 'You are now logged in.');\n \n //redirect user to home page after registration is successful\n redirect('home');\n \n }else {\n //set error message\n $this->session->set_flashdata('login_failed', 'Login is invalid.');\n \n //redirect user to home page after registration is successful\n redirect('users/login');\n }\n }\n }","title":""}],"string":"[\n {\n \"docid\": \"1549a34187d617edefa08c89e88c0654\",\n \"score\": \"0.0\",\n \"text\": \"public function login() {\\n $data['title'] = 'Sign In';\\n \\n //setting errors\\n $this->form_validation->set_rules('username', 'Username', 'required');\\n $this->form_validation->set_rules('password', 'Password', 'required');\\n \\n if($this->form_validation->run() === FALSE){\\n //displaying the register page with errors\\n $this->load->view('templates/header');\\n $this->load->view('users/login', $data);\\n $this->load->view('templates/footer');\\n }else{\\n \\n //Get username\\n $username = $this->input->post('username');\\n \\n //Get and ecrypt the password\\n $password = md5($this->input->post('password'));\\n \\n //Login user\\n $user_id = $this->user_model->login($username, $password);\\n \\n //check for user id\\n if($user_id){\\n \\n //get user data\\n $user = $this->user_model->get_users($user_id);\\n \\n //check if user account is disabled\\n $disabled = $user['disabled'];\\n \\n \\n //if disabled redirect to login page and display message\\n if($disabled){\\n // set message in a session\\n $this->session->set_flashdata('user_disabled', 'Your user has been disabled');\\n \\n //redirect user to home page after registration is successful\\n redirect('login');\\n }\\n \\n //check admin rights\\n $role = $user['role_id'];\\n \\n //Saving the data returned from user model to $user_data variable\\n $user_data = array(\\n 'user_id' => $user_id,\\n 'username' => $username,\\n 'role' => $role,\\n 'logged_in' => TRUE\\n );\\n \\n \\n //Set user data into a session\\n $this->session->set_userdata($user_data);\\n \\n // set message in a session\\n $this->session->set_flashdata('user_loggedin', 'You are now logged in.');\\n \\n //redirect user to home page after registration is successful\\n redirect('home');\\n \\n }else {\\n //set error message\\n $this->session->set_flashdata('login_failed', 'Login is invalid.');\\n \\n //redirect user to home page after registration is successful\\n redirect('users/login');\\n }\\n }\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"ac663c28d060996ad5dffd435b0defa5","score":"0.7721084","text":"public function registerUser();","title":""},{"docid":"1dda688b5a0b4df0b171bffb0d0a8ded","score":"0.71939015","text":"function register()\n\t{\n\t\tif($this->data)\n\t\t{\n\t\t\tif(!$this->isFree($this->data['User']['name'], true))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Username \"' . $this->data['User']['name'] . '\" is already in use.');\n\t\t\t\tunset($this->data['User']['password']);\n\t\t\t\tunset($this->data['User']['password2']);\n\t\t\t\t$this->redirect('/menus');\n\t\t\t}\n\t\t\t\n\t\t\telse if($this->data['User']['password'] == \n\t\t\t\t\t$this->Auth->password($this->data['User']['password2']))\n\t\t\t{\n\t\t\t\tif($this->User->save($this->data))\n\t\t\t\t{\n\t\t\t\t\t$this->Auth->login();\n\t\t\t\t\t$this->redirect('/menus/registration_successful');\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->setFlash('You did not enter the same password twice.');\n\t\t\t\tunset($this->data['User']['password']);\n\t\t\t\tunset($this->data['User']['password2']);\n\t\t\t\t$this->redirect('/menus');\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->redirect('/menus');\n\t\t}\n\t}","title":""},{"docid":"472a13314c1dcffb2596a036a8c13769","score":"0.71858066","text":"public function saveLoginUser(){\n \n return $this->save();\n }","title":""},{"docid":"a601408a7370d1709fe10c557775fac1","score":"0.71441734","text":"function regist_user(){\n\t\n}","title":""},{"docid":"12b92406c78bbe81f9af7870dc9b4c02","score":"0.7116995","text":"public function register()\n\t{\n\t\t$user = new User;\n\n\t\t$user->email = $this->email;\n\t\t$user->username = $this->email;\n\t\t$user->password = hash('sha256', $this->password);\n\t\t$user->type = 'native';\n\t\t$user->last_login_time = date('Y-m-d h:i:s');\n\t\t$user->create_time = date('Y-m-d h:i:s');\n\n\t\t//create initial auth role for new user\n\t\t$auth = Yii::app()->authManager;\n\n\t\tif($user->save() && $auth->assign('Authenticated', $user->id))\n\t\t{\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\n\t}","title":""},{"docid":"10b51d96995e16c8c10fc30d54881ce7","score":"0.70912397","text":"public function register()\n\t{\n\t\tif($this->_identity===null)\n\t\t{\n\t\t\t$this->_identity=new UserIdentity($this->username,$this->password);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\n\t\t{\n\t\t\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\n\t\t\tYii::app()->user->login($this->_identity,$duration);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}","title":""},{"docid":"507abdf34b2cdd94bcff6a9a22668e79","score":"0.7082455","text":"public function registration()\n {\n $user = new User();\n $user->username = $this->username;\n $user->email = $this->email;\n $user->password = md5(trim($this->password));\n\n if ($user->save()) {\n $_identity = new UserIdentity($this->username, $this->password);\n if ($_identity->authenticate()) {\n $duration = 3600*24*30; // 30 days\n Yii::app()->user->login($_identity, $duration);\n return true;\n } else {\n $this->addError('password', 'Неожиданная ошибка связанная с аутентификацией нового пользователя.');\n return false;\n }\n\n } else {\n return false;\n }\n }","title":""},{"docid":"9e6be5917efd35567a20ef1a8a4ef811","score":"0.70700294","text":"public function register()\n {\n $validate = new UserFormValidator();\n if ($this->isLoggedIn()) { \n $this->redirect('');\n }\n\n $user = new User($this->db);\n if ($_SERVER['REQUEST_METHOD'] == 'POST') { \n\n if (!$validate->validate($_POST)) {\n $data = $validate->getErrors();\n return $this->render(\"users/register\", $data);\n } \n\n //bind form data to PDO object\n $userDTO = $this->dataBinder->bind($_POST, UserDTO::class);\n\n if ($user->findByEmail($userDTO->getEmail()) !== null) {\n flash('register_error', 'the user is exist already');\n return $this->render(\"users/register\");\n }\n\n //encrypt Password\n $password = $userDTO->getPassword();\n $passwordHash = password_hash($password, PASSWORD_DEFAULT);\n $userDTO->setPassword($passwordHash);\n $data = $user->create($userDTO);\n flash('register_success', 'You are now registered and can log in'); \n $this->render(\"users/login\", $data);\n\n } else {\n return $this->render(\"users/register\");\n\n }\n }","title":""},{"docid":"73c983777aed0c5cfc4fa1243314b854","score":"0.70482","text":"public function register(){\n\t\tif($_POST == ' ' && $_POST['fullName'] == ' ' && $_POST['userEmail'] == ' ' && $_POST['password'] == ' '){\n\n\t\t\t$this->register();\n\n\t\t}else{\n $name = ucwords(strtolower($_POST['fullName']));\n $email = $_POST['userEmail'];\n $password = $_POST['password'];\n\n $pass = getHashedPassword($password);\n\n $result = $this->umodel->getWhere('users', 'EmailId', $email);\n if($result){\n \t\n echo \"Email Already Exist\";\n\n }else{\n\t \t$data = array(\n\t \t\"FullName\" => $name,\n\t \t\"EmailId\" => $email,\n\t \t\"Password\" => $pass,\n\t \t\"Created_at\" => date(\"Y-m-d\"),\n\t \t\"roleId\" => 4\n\t );\n\n\t $recordId = $this->umodel->registerUser(\"users\",$data);\n\n\t if($recordId > 0){\n\t \techo \"User registration successfull\";\n\t \t\n\t }else{\n\n\t \techo \"Somthing Wrong! Please try again\";\n\t }\n \t}\n\t\t}\n\t}","title":""},{"docid":"6e8e940fbb9582373a2cd41a344f6665","score":"0.70385236","text":"public function register()\n {\n $data = $this->validate($this->request, [\n 'required' => ['username', 'password', 'password_confirmation'],\n 'equals' => [\n ['password', 'password_confirmation']\n ]\n ]);\n\n $query = app('db')->prepare(\"SELECT id FROM users WHERE `username` = ?\");\n $query->execute([\n $data['username'],\n ]);\n\n if ($query->rowCount() > 0) {\n app('session')->getFlashBag()->add('errors', ['username' => ['Username already in use.']]);\n Redirect::back();\n }\n\n $query = app('db')->prepare(\"INSERT INTO users (username, password) VALUES (?, ?)\");\n $query->execute([\n $data['username'],\n password_hash($data['password'], PASSWORD_BCRYPT),\n ]);\n\n $auth = app('auth');\n\n $auth->setUser(app('db')->lastInsertId('id'));\n\n if ($auth->check()) {\n Redirect::to('/');\n }\n\n Redirect::back();\n }","title":""},{"docid":"23a2e090eb8321eb39bf72b4980622ab","score":"0.7035782","text":"public function registerUser() {\n\t\t\n\t\t$configRArray = $this -> CI -> config -> item('registerCheck');\n\t\t\n\t\t$this -> error = FALSE;\n\t\t\n\t\t// Check if somthing empty\n\t\tforeach( $configRArray as $field ) {\n\t\t\t\n\t\t\t$checkEmpty = trim( $this -> userData[$field] );\n\n\t\t\tif( empty( $checkEmpty ) ) {\n\t\t\t\t\n\t\t\t\t$this -> errorData['error_'.$field] = 'U hebt '. $field .' niet ingevuld!
    ';\n\t\t\t\t$this -> error = TRUE;\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// Check the passwords\n\t\tif( $this -> error == FALSE ) {\n\n\t\t\tif( !$this -> checkPassword() ) {\n\t\t\t\t\n\t\t\t\t$this -> error = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check e-mail\n\t\tif( $this -> error == FALSE ) {\n\t\t\t\n\t\t\tif( $this -> error_email_adress ) {\n\t\t\t\t\n\t\t\t\t$this -> error = TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Make the user in the database\n\t\tif( $this -> error == FALSE ) {\n\n\t\t\t$configDbArray = $this -> CI -> config -> item('registerDb');\n\t\t\t\n\t\t\tforeach( $configDbArray as $fieldName => $dbName ) {\n\t\t\t\t\n\t\t\t\t$dbArray[$dbName] = addslashes( $this -> userData[$fieldName] );\n\t\t\t}\n\t\t\t\n\t\t\tif( !$this -> CI -> mbInsert -> user($dbArray) ) {\n\t\t\t\t\n\t\t\t\t$this -> errorData['error_database'] = 'De gebruiker kon niet worden aangemaakt in de database.
    ';\n\t\t\t\t$this -> error = TRUE;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}","title":""},{"docid":"1e3a1ac8887188f14ec79df88471a6b3","score":"0.7007235","text":"public function register() {\n $user_service = new UserService($this->cnx);\n echo $user_service->registerUser([\n \"device_id\" => $_POST[\"device_id\"],\n \"user_type\" => $_POST[\"user_type\"],\n \"first_name\" => $_POST[\"first_name\"],\n \"last_name\" => $_POST[\"last_name\"],\n \"email\" => $_POST[\"email\"],\n \"password\" => $_POST[\"password\"],\n ]);\n }","title":""},{"docid":"54b0a4bef209be24bfaf15b8f2cb6528","score":"0.7003736","text":"public function register()\n {\n $user = $this->Users->newEntity($this->request->data);\n\n if ($this->request->is('post'))\n {\n if ($this->Users->save($user))\n {\n // $firstName = $user->first_name;\n // $lastName = $user->last_name;\n // $fullName = $firstname.\" \".$lastName;\n // $this->set('fullNam1e', $fullName);\n // echo $firstName;\n // echo $lastName;\n\n //$query = \"CREATE TABLE log_\".$firstName.\"_\".$lastName.\"\";\n\n $this->redirect(['action' => 'login']);\n }\n }\n }","title":""},{"docid":"d8a003d09df694229c36fad246647dc2","score":"0.69997025","text":"function register_user(){\n}","title":""},{"docid":"6a8a5b5db71e6a7a82420a8faa11b0d6","score":"0.69893837","text":"public function register()\n {\n if ($this->validate()) {\n if ($this && $this->save(false)) {\n Yii::$app->getResponse()->redirect('login');\n } else {\n // Yii::$app->getResponse()->redirect('login');\n }\n }\n }","title":""},{"docid":"15459baf157f5a3c785874a86606228a","score":"0.69890964","text":"public function registerNewUser() {\n\t\t// check if user name already exists.\n\t\t//checkNewUserName()\n\t}","title":""},{"docid":"7738d43043de665e2c02c8ae49ceec22","score":"0.6948986","text":"public function register()\r\n {\r\n\r\n\r\n $conn = DB::Connection();\r\n $statement = $conn->prepare('INSERT INTO user (email, username, password) values (:email, :username, :password)');\r\n $email = $this->getEmail();\r\n $username = $this->getUsername();\r\n $password = $this->getPassword();\r\n //$confirm_password = $this->getConfirm_password();\r\n\r\n\r\n $statement->bindvalue(\":email\", $email);\r\n $statement->bindvalue(\":username\", $username);\r\n $statement->bindvalue(\":password\", $password);\r\n\r\n $statement->execute();\r\n }","title":""},{"docid":"9ff0eb1fa0ee9e63499e619a1d503dee","score":"0.6936899","text":"public function register() {\n if (empty($_POST)) header('location: ' . URL . 'error?not-post');\n \n $params = $_POST;\n $User = new User();\n \n $insert = $User->insert([\n 'password' => $params['password'],\n 'fullname' => $params['fullname'],\n 'email' => $params['email'],\n 'gender' => $params['gender'],\n 'security_question_id' => $params['question'],\n 'answer' => $params['answer']\n ]);\n \n if ($insert) {\n Auth::setUserId($insert);\n Auth::setAuthenticated(TRUE);\n \n header('location: ' . URL);\n } else {\n header('location: ' . URL . 'error');\n }\n }","title":""},{"docid":"15c13e7eb07caf7adf1fd773ca2d8020","score":"0.6935893","text":"public function register()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n // Curatarea datelor venite prin POST\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n // Init data\n $data = [\n 'username' => trim($_POST['username']),\n 'email' => trim($_POST['email']),\n 'password' => trim($_POST['password']),\n 'confirmPassword' => trim($_POST['confirmPassword']),\n 'usernameError' => '',\n 'emailError' => '',\n 'passwordError' => '',\n 'confirmPasswordError' => ''\n ];\n\n // Validare Email\n if (empty($data['email'])) {\n $data['emailError'] = 'Pleae enter email';\n } else {\n // Check email\n if ($this->userModel->findUserByEmail($data['email'])) {\n $data['emailError'] = 'Email is already taken';\n }\n }\n\n // Validare username\n if (empty($data['username'])) {\n $data['usernameError'] = 'Pleae enter name';\n }\n\n // Validare parola\n if (empty($data['password'])) {\n $data['passwordError'] = 'Please enter password';\n } elseif (strlen($data['password']) < 6) {\n $data['passwordError'] = 'Password must be at least 6 characters';\n }\n\n // Validare confirmare parola\n if (empty($data['confirmPassword'])) {\n $data['confirmPasswordError'] = 'Please confirm password';\n } else {\n if ($data['password'] != $data['confirmPassword']) {\n $data['confirmPasswordError'] = 'Passwords do not match';\n }\n }\n\n // Ne asiguram ca erorile sunt goale\n if (empty($data['emailError']) && empty($data['usernameError']) && empty($data['passwordError']) && empty($data['confirmPasswordError'])) {\n\n // Hash parola\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\n\n // Register utilizator\n if ($this->userModel->register($data)) {\n flash('register_success', 'You are registered and can log in');\n redirect('users/login');\n } else {\n die('Something went wrong');\n }\n\n } else {\n // Incarcare Views cu erori\n $this->view('users/register', $data);\n }\n\n } else {\n // Init data\n $data = [\n 'username' => '',\n 'email' => '',\n 'password' => '',\n 'confirmPassword' => '',\n 'usernameError' => '',\n 'emailError' => '',\n 'passwordError' => '',\n 'confirmPasswordError' => ''\n ];\n\n // Load view\n $this->view('users/register', $data);\n }\n }","title":""},{"docid":"b4155e281962eabceb76392d4bb0b69f","score":"0.69352055","text":"public function registerUser() {\n $username = basename(FILTER::get('REQUEST', 'user'));\n $nickname = basename(FILTER::get('REQUEST', 'nick'));\n if (!$this->checkUserName($username, 'Name')) {\n throw new Exception('Invalid user');\n }\n if (!$this->checkUserName($nickname, 'Nick')) {\n throw new Exception('Invalid nick');\n }\n if (!$this->checkPassword(FILTER::get('REQUEST', 'password'), FILTER::get('REQUEST', 'confirm'))) {\n throw new Exception('Invalid password');\n }\n if (file_exists(USERS.$username)) {\n throw new Exception('User with this username already exists');\n }\n $email = FILTER::get('REQUEST', 'email');\n if (!CMS::call('FILTER')->validEmail($email)) {\n throw new Exception('Invalid email');\n }\n global $LANG;\n $userdata = FILTER::get('REQUEST', 'fields');\n #\n # Also we must set a md5 hash of user's password to userdata\n #\n $user['user'] = $username;\n $user['nick'] = $nickname;\n $user['password'] = md5(FILTER::get('REQUEST', 'password'));\n $user['email'] = $email;\n #\n # Parse some system fields.\n #\n $user['tz'] = $userdata['tz'];\n $user['access'] = 1;\n $user['rights'] = '';\n $user['status'] = '';\n $user['stars'] = 0;\n $user['regdate'] = time();\n $user['visits'] = 1;\n $user['lastvisit'] = $user['regdate'];\n $user['posts'] = 0;\n $user['comments'] = 0;\n $user['topics'] = 0;\n $user['replies'] = 0;\n $user['blocked'] = 0;\n $user['website'] = $userdata['website'];\n $user['country'] = $userdata['country'];\n $user['city'] = $userdata['city'];\n $user['last_prr'] = 0;\n if (self::saveUserData($username, $user)) {\n CMS::call('LOG')->logPut('Note', self::$user['user'], 'Registation');\n #\n # Create user's PM file\n #\n return file_put_contents(PM_DATA.$username, json_encode(['inbox' => [], 'outbox' => []], JSON_UNESCAPED_UNICODE), LOCK_EX);\n }\n CMS::call('LOG')->logError('Cannot save profile '.$username);\n throw new Exception('Cannot save profile');\n }","title":""},{"docid":"1c4c3331e3400b7d8caf7880d3f0778a","score":"0.6929573","text":"public function newUser($firstname, $gender, $lastname, $username, $email, $zip, $birthdate, $pw, $pw2){\n \n $user = new User();\n $ulregister = new Login();\n $m = \"\";\n \n if(isset($firstname) && !empty($firstname) && $firstname!=\"\"){\n \n $user->firstname = $firstname;\n }\n else{\n $m .= \"Fornavn ikke satt
    \";\n }\n \n // Checks for valid input for lastname.\n if(isset($lastname) && !empty($lastname) && $lastname!=\"\"){\n \n $user->lastname = $lastname;\n }\n else{\n $m .= \"Etternavn ikke satt
    \";\n }\n \n if(isset($birthdate) && !empty($birthdate) && $birthdate < date(\"Y\", time())-10 && $birthdate > 1900 ){\n \n $user->yearborn = $birthdate;\n }\n else{\n $m .= \"Født år ikke satt eller du er for ung.
    \"; \n }\n \n if(!$user->usernameExists($username) && $username != \"\"){\n \n $user->username = $username;\n \n }\n else{\n $m .= \"Brukernavn er tomt eller eksisterer fra før
    \";\n }\n \n \n if(!Login::existingEmail($email) && preg_match('/^[a-z0-9&\\'\\.\\-_\\+]+@[a-z0-9\\-]+\\.([a-z0-9\\-]+\\.)*+[a-z]{2}/is', $email)){\n \n $ulregister->email = $email;\n \n }\n else{\n \n $m .= \"Mailadressen er enten registert eller skrevet feil.
    \";\n }\n \n if($gender == 'male' || $gender == 'female'){\n \n $user->sex = $gender;\n }\n else{\n $m .= 'Du må velge kjønn!
    ';\n }\n \n if($zip != \"\" && Location::zipcodeExists($zip)){\n \n $user->zipcode = $zip;\n }\n else{\n $m .= \"Postnummeret eksister ikke
    \";\n }\n \n \n \n \n \n if($pw == $pw2){\n \n if (preg_match(\"#.*^(?=.{6,20})(?=.*[a-å])(?=.*[A-Å])(?=.*[0-9]).*$#\", $pw)){\n\n $ulregister->password = sha1($pw);\n \n\n\n\n }\n else{\n $m .= \"Passordet ditt er for svakt, vennligst bruk minimum 6 tegn, Minimum en stor bokstav og tall
    \";\n }\n \n \n }else{\n $m .= \"Passordene du har skrevet inn stemmer ikke overens.
    \";\n }\n \n if($m ==\"\" && empty($m)){\n \n $activtedstring = $ulregister->createaAString($email, $ulregister->password);\n $ulregister->activatestring = $activtedstring;\n $user->save();\n $userid = $user->id;\n $ulregister->user_id = $userid;\n\n $ulregister->save();\n /*\n $to = $uregisteremail;\n $subject = \"Ny Bruker i Forbrukermakt.com\";\n $message = \"Velkommen som ny bruker hos forbrukermakt.com, for å kunne bruke din konto er du nødt til å aktivere denne, det gjør du \n på følgende side= http://localhost/aktivering.php?activ={$activtedstring}\";\n $from = \"noreply@flowershopfucker.no\";\n $headers = \"From:\" . $from;\n mail($to,$subject,$message,$headers);\n */\n redirect_to(\"/public/activation.php?activ={$activtedstring}\");\n }\n else{\n return $m;\n\n }\n \n }","title":""},{"docid":"5319fb099f171058e203038d313cfcc5","score":"0.69065416","text":"public function addUser($login,$pasword,$email){\n $response = Database::getDB()->prepare('INSERT INTO personne SET login=:login, password=:password, email=:email,role = 1,isActive=1');\n $response->execute([':login' => $login, ':password' => password_hash($pasword, PASSWORD_DEFAULT), ':email' => $email]);\n\n $response->closeCursor(); \n }","title":""},{"docid":"79c3b56a754452570755600843263056","score":"0.6896515","text":"public function loginUser() {\n SessionUtilities::createSession('User', $this->username);\n /* Added userType */\n $this->setUsersTypeInSession();\n }","title":""},{"docid":"30ae2b89dc2d7918d01d90e64f56dcfb","score":"0.68913954","text":"public function register()\n {\n $request = Request::createFromGlobals();\n $email = FormValidator::purify($request->get('email'));\n $username = FormValidator::purify($request->get('username'));\n $password = FormValidator::purify($request->get('password'));\n $passwordConfirm = FormValidator::purify($request->get('password_confirm'));\n\n if (!FormValidator::is_alphanum($username)) {\n $this->session->set('warning', \"Votre pseudo n'est pas valide\");\n $this->registerView();\n\n } elseif (!FormValidator::is_alphanum($password) || !FormValidator::is_alphanum($passwordConfirm)) {\n $this->session->set('warning', \"Votre mot de passe n'est pas valide\");\n $this->registerView();\n\n } elseif (!FormValidator::is_email($email)) {\n $this->session->set('warning', \"Votre email n'est pas valide\");\n $this->registerView();\n\n } else {\n\n if ($this->loginManager->isMemberExists($username, $email)) {\n if ($this->loginManager->checkPassword($password, $passwordConfirm)) {\n\n $this->loginManager->registerUser($username, $password, $email);\n $this->formManager->registerTraitment($email, $username);\n $this->session->set('success', \"Votre inscription a bien été prise en compte\");\n $this->login();\n\n } else {\n $this->session->set('warning', \"Les mots de passe ne sont pas identiques\");\n $this->registerView();\n }\n\n } else {\n $this->session->set('warning', \"Cet utilisateur existe déjà\");\n $this->registerView();\n }\n }\n }","title":""},{"docid":"a7f698eeb0197721cfdff56ab7d06d4d","score":"0.68760043","text":"public function registerUser()\n {\n $user = new User;\n\n if($user->save())\n {\n Auth::loginUsingId($user->id);\n return Redirect::to('account/profile')->with('message','Thanks for register!');\n }\n else\n {\n return Redirect::to('register')->withErrors($user->errors())->withInput();\n }\n }","title":""},{"docid":"e4f4537a7aac6681304ed8441c7bc66c","score":"0.68575156","text":"public function DoRegister() : void {\n\n if (!$this->auth()) {\n if (\n isset ($_POST ['email'])\n && isset ($_POST ['password'])\n && isset ($_POST ['password2'])\n && isset ($_POST ['username'])) {\n try {\n $validate = new Validation ();\n $validate->email($_POST ['email']);\n $validate->userName($_POST ['username']);\n $validate->password($_POST ['password']);\n $validate->comparePasswords($_POST ['password'], $_POST ['password2']);\n\n $h = new Humphree(Picnic::getInstance());\n\n $userID = $h->addUser($_POST ['username'], $_POST ['email'], $_POST ['password']);\n\n if ($userID != 0) {\n unset ($_POST ['email']);\n unset ($_POST ['password']);\n unset ($_POST ['password2']);\n unset ($_POST ['username']);\n\n $this->sendActivationEmail($userID);\n\n header('Location: ' . BASE . '/Account/RegisterSuccess');\n } else {\n $view = new View();\n\n if (isset($_SESSION['error'])) {\n $view->SetData('error', $_SESSION['error']);\n unset($_SESSION['error']);\n }\n\n $view->SetData('navData', new NavData(NavData::Account));\n $view->Render('register');\n }\n } catch (ValidationException $e) {\n $_SESSION['error'] = $e->getError();\n header('Location: ' . BASE . '/Account/Register');\n }\n } else {\n header('Location: ' . BASE . '/Account/Register');\n }\n } else {\n header('Location: ' . BASE . '/Home');\n }\n }","title":""},{"docid":"0a98c77e90a5ba703e81bfe53f057268","score":"0.68276244","text":"public function login()\n {\n $validate = new UserFormValidator();\n if ($this->isLoggedIn()) {\n $this->redirect('');\n }\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') { \n \n $user = new User($this->db);\n if (!$validate->validateLoginForm($_POST)) {\n $data = $validate->getErrors(); \n return $this->render(\"users/login\", $data);\n } \n $userDTO = $user->findByEmail($_POST['email']);\n \n if (null == $userDTO) {\n flash('register_success','Invalid credentials!', 'alert alert-danger' );\n return $this->render(\"users/login\");\n }\n\n $userPasswordHash = $userDTO->getPassword();\n\n if (!password_verify($_POST['password'], $userPasswordHash)) {\n flash('register_success','Invalid password!', 'alert alert-danger' );\n return $this->render(\"users/login\");\n }\n $this->createUserSession($userDTO); \n return $this->redirect(\"\");\n \n } else {\n \n $this->render(\"users/login\");\n } \n }","title":""},{"docid":"c92ec3ea591d0c5f9a8c450e04c6f866","score":"0.6824909","text":"public function login()\r\n\t{\r\n\t}","title":""},{"docid":"b387025e63a4de039552b908ea783b15","score":"0.68238556","text":"private function _register()\n {\n $this->load->model('LoginModel');\n $this->LoginModel->register('admin', 'password', 'John', 'Doe');\n }","title":""},{"docid":"68021881687d1ba035953e1e541aab8b","score":"0.68175715","text":"public function registerAction() {\n if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])) {\n try {\n $currentDate = new \\DateTime('NOW');\n\n $database = new Connection();\n $db = $database->openConnection();\n\n $sql = \"SELECT MAX(id) FROM platform_user\";\n foreach ($db->query($sql) as $row) {}\n\n $stm = $db->prepare(\n \"INSERT INTO platform_user (\n id,\n username,\n email,\n password,\n roles,\n first_name,\n last_name,\n brief_info,\n date_of_creation,\n date_of_change\n ) VALUES (\n :id,\n :username,\n :email,\n :password,\n :roles,\n :first_name,\n :last_name,\n :brief_info,\n :date_of_creation,\n :date_of_change\n )\"\n );\n $stm->execute([\n ':id' => (int) $row['max'] + 1,\n ':username' => $_POST['username'],\n ':email' => $_POST['email'],\n ':password' => password_hash($_POST['password'], PASSWORD_BCRYPT),\n ':roles' => implode(';', ['ROLE_USER']),\n ':first_name' => $_POST['firstName'],\n ':last_name' => $_POST['lastName'],\n ':brief_info' => $_POST['briefInfo'],\n ':date_of_creation' => $currentDate->format('Y-m-d H:i:s'),\n ':date_of_change' => $currentDate->format('Y-m-d H:i:s')]\n );\n\n $this->redirect('/login');\n } catch (PDOException $e) {\n echo \"There is some problem in connection: \" . $e->getMessage();\n }\n }\n\n View::renderTemplate('Registration/register.html.twig');\n }","title":""},{"docid":"fac5abb56018e4ed392e14e97d9a72ac","score":"0.68164265","text":"public function register(){\n\n //title & sidebar\n $categorySidebar = true;\n $title = 'Registreren';\n\n //post komt terug in deze action voor validatie\n if($_SERVER['REQUEST_METHOD'] === 'POST'){\n\n $errors = array();\n $values = array();\n\n $firstName = $lastName = $userName = $password =\n $repeatPassword = $email = $keeploggedin =null;\n\n //nieuwe UserRegistrationViewModel aanmaken en valideren\n if(isset($_POST['firstName'])){\n $firstName = trim($_POST['firstName']);\n }\n if(isset($_POST['lastName'])){\n $lastName = trim($_POST['lastName']);\n }\n if(isset($_POST['userName'])){\n $userName = trim($_POST['userName']);\n }\n if(isset($_POST['password'])){\n $password = trim($_POST['password']);\n }\n if(isset($_POST['repeatPassword'])){\n $repeatPassword = trim($_POST['repeatPassword']);\n }\n if(isset($_POST['email'])){\n $email = trim($_POST['email']);\n }\n if(isset($_POST['keeploggedin'])){\n $keeploggedin = $_POST['keeploggedin'];\n }\n\n\n\n $userRegistrationViewModel = new UserRegistrationViewModel(null, $firstName, $lastName, $userName,\n $password, $email, null, null, false, $repeatPassword);\n $urvmValidator = new UserRegistrationViewModelValidator($userRegistrationViewModel);\n $errors = $urvmValidator->getErrors();\n $values = $urvmValidator->getValues();\n\n if($this->isValidPost($errors)){\n\n //password en userName hash\n $user = $urvmValidator->getUser();\n $user->setUserName(md5($user->getUserName()));\n $user->setPassword(md5($user->getPassword()));\n\n //als user is toegevoegd aan de database: inloggen en eventueel cookie setten\n if($userAdded = UserDb::insertWithoutAddressIds($urvmValidator->getUser())){\n $values=array();\n $this->startSession();\n\n $user = UserDb::getByUsernameAndPassword(md5($userName),md5($password));\n\n $_SESSION['user'] = $user;\n $_SESSION['admin'] = $user->isAdmin();\n\n if($keeploggedin){\n setcookie('keeploggedin',\n \"{$user->getUserName()}:{$user->getPassword()}\",\n time() + 60 *60 *24*7);\n }\n }\n };\n }\n\n $view = ROOT . '/views/User/register.php';\n require_once ROOT . '/views/layout.php';\n }","title":""},{"docid":"aa2d15d6d72f5de62ebb1e7fb1d132a0","score":"0.68139666","text":"public function register()\n {\n if ($this->isAdminAvailable() && $this->isEmailAndPhoneAvailable()) {\n if ($this->accountType === 'Store Owner'){\n // Primary indices: email - 0, phone - 1, password - 2, account type - 9\n $data = array($this->email, $this->phone, $this->password, $this->firstName, $this->lastName, $this->address, $this->city, $this->country, $this->zipcode, $this->accountType, $this->businessName, $this->storeName, $this->storeType);\n\n $registerInfo = implode('|',$data);\n file_put_contents(\"../storeOwners.txt\", $registerInfo.PHP_EOL, FILE_APPEND);\n echo '

    Successfully registered!


    ';\n echo '

    Redirecting to login page in 3 seconds...


    ';\n header(\"refresh:3; url=login.php\");\n die();\n }\n else {\n $data = array($this->email, $this->phone,$this->password, $this->firstName, $this->lastName, $this->address, $this->city, $this->country, $this->zipcode, $this->accountType);\n $registerInfo = implode('|',$data);\n file_put_contents(\"../users.txt\", $registerInfo.PHP_EOL, FILE_APPEND);\n echo '

    Successfully registered!


    ';\n echo '

    Redirecting to login page in 3 seconds...


    ';\n header(\"refresh:3; url=login.php\");\n die();\n }\n }\n else {\n header(\"Location: register.php?alreadyExists=true\");\n die();\n } \n }","title":""},{"docid":"58f04d006015c4934770c031601dd7f7","score":"0.67989737","text":"abstract function login();","title":""},{"docid":"610c829973b2074b43e030a9854b3d60","score":"0.6797758","text":"public static function create_user(){\n if (!hash_equals($_SESSION['key'], $_POST['token'])){\n echo '{\"status\":\"0\",\"message\":\"Invalid token\"}';\n exit;\n }\n\n\n // check if passwords mathces\n if($_POST['txtPassword'] != $_POST['txtConfirmPassword']){\n echo '{\"status\":\"0\",\"message\":\"Passwords don\\'t match\"}';\n exit;\n }\n\n // check length of password\n if(strlen($_POST['txtPassword']) < 8 ){\n echo '{\"status\":\"0\",\"message\":\"Password should be at least 8 characters\"}';\n exit;\n }\n\n // check length of username\n if (strlen($_POST['txtUsername']) < 4 || strlen($_POST['txtUsername']) > 20) {\n echo '{\"status\":\"0\",\"message\":\"Username should be between 6 and 20 character\"}';\n exit;\n }\n //Preventing the user to create admin or moderator \n if($_POST['txtUsername'] === 'admin' || $_POST['txtUsername'] === 'moderator' ){\n echo '{\"status\":\"0\",\"message\":\"Reservated usernames\"}';\n exit;\n }\n if ($_POST['txtUsername'] === 'admin' ||\n $_POST['txtUsername'] === 'moderator' ||\n strpos($_POST['txtUsername'], 'admin') !== false ||\n strpos($_POST['txtUsername'], 'moderator') !== false) {\n echo '{\"status\":\"0\",\"message\":\"Reserved username\"}';\n exit;\n }\n\n // check if it valid email\n if (!filter_var($_POST['txtEmail'], FILTER_VALIDATE_EMAIL)) {\n echo '{\"status\":\"0\",\"message\":\"Enter valid email\"}';\n exit;\n }\n // check if the fields are empty\n if (empty($_POST['txtUsername']) ||\n empty($_POST['txtEmail']) ||\n empty($_POST['txtPassword']) ||\n empty($_POST['txtConfirmPassword'])) {\n echo '{\"status\":\"0\",\"message\":\"Please fill all the fields\"}';\n exit;\n }\n\n // Validate password strength\n $uppercase = preg_match('@[A-Z]@', $_POST['txtPassword']);\n $lowercase = preg_match('@[a-z]@', $_POST['txtPassword']);\n $number = preg_match('@[0-9]@', $_POST['txtPassword']);\n $specialChars = preg_match('@[^\\w]@', $_POST['txtPassword']);\n\n if (!$uppercase || !$lowercase || !$number || !$specialChars || strlen($_POST['txtPassword']) < 8) {\n echo '{\"status\":\"0\",\"message\":\"The password is too weak\"}';\n die();\n }\n\n //hash the password\n $user_password = password_hash($_POST['txtPassword'], PASSWORD_BCRYPT);\n // trim variables\n $username = $_POST['txtUsername'];\n $email = trim($_POST['txtEmail']);\n\n $token = bin2hex(openssl_random_pseudo_bytes(16));\n $user_class = new Users;\n $user_class->sign_up_user($username, $user_password, $email, $token);\n }","title":""},{"docid":"0d3c4277900c0ad5eacb1317af52f222","score":"0.6795673","text":"public function doRegistration()\n {\n //your form name fields must match the ones of the table fields\n $user = new User(Post::getAll());\n $user -> role='passageiro';\n\n if($user->is_valid()){\n $user->save();\n Redirect::toRoute('login/login');\n } else {\n //redirect to form with data and errors\n Redirect::flashToRoute('login/registration', ['user' => $user]);\n }\n }","title":""},{"docid":"ef7386a8d7831322ad1b7fb697b552ce","score":"0.6782666","text":"public function login()\n {\n }","title":""},{"docid":"ef7386a8d7831322ad1b7fb697b552ce","score":"0.6782666","text":"public function login()\n {\n }","title":""},{"docid":"ef7386a8d7831322ad1b7fb697b552ce","score":"0.6782666","text":"public function login()\n {\n }","title":""},{"docid":"ef7386a8d7831322ad1b7fb697b552ce","score":"0.6782666","text":"public function login()\n {\n }","title":""},{"docid":"ef7386a8d7831322ad1b7fb697b552ce","score":"0.6782666","text":"public function login()\n {\n }","title":""},{"docid":"e2d7cd6a5b055b87edab57987b8c24a9","score":"0.6775364","text":"public function login()\n {\n \n }","title":""},{"docid":"2eee9263b6e1490293285a2f32e937fa","score":"0.6769537","text":"public function post_login()\n\t{\n\t\t$email = Input::post('email');\n\t\t$pass = Input::post('password');\n\n\t\t$user = Model_Users::find('all', array('where' => array(array('email', $email),)));\n\n\t\tif(isset($email))\n {\n \tif(isset($pass))\n \t{\n \t\tif (!empty($user))\n\t\t\t\t{\n\t\t\t\t\tforeach ($user as $key => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$id = $user[$key]->id;\n\t\t\t\t\t\t$email = $user[$key]->email;\n\t\t\t\t\t\t$password = $user[$key]->password;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse return $this->notice($code = 'ERROR', $message = 'EMAIL ENTERED WRONG OR NOT REGISTERED.');\n\n\t\t\t\tif ($email == $email and $password == $pass)\n\t\t\t\t{\n\t\t\t\t\t$token = array(\n\t\t\t\t\t\t\"id\" => $id, \n\t\t\t\t\t\t\"email\" => $email, \n\t\t\t\t\t\t\"password\" => $password\n\t\t\t\t\t);\n\n\t\t\t\t\t$jwt = JWT::encode($token, $this->key);\n\n\t\t\t\t\treturn $this->notice($code = 'SUCCESSFUL ACTION', $message = $jwt);\n\t\t\t\t}\n\t\t\t\telse return $this->notice($code = 'ERROR', $message = 'PASSWORD ENTERED WRONG.');\n\t\t\t}\n\t\t\telse return $this->notice($code = 'ERROR', $message = 'REQUIRE PASSWORD.');\n\t\t}\n\t\telse return $this->notice($code = 'ERROR', $message = 'REQUIRE EMAIL.');\n\t}","title":""},{"docid":"ff88570d3534fa20b6c203532910e9c5","score":"0.6766653","text":"public function register()\n {\n $user = new User();\n $user->email = $this->email;\n $user->new_pass = $this->password;\n $user->re_new_pass = $this->password_confirm;\n $user->username = $this->username;\n $user->type = $this->type;\n $user->phone = $this->phone;\n $user->created_at = time();\n $user->status = User::STATUS_DEACTIVE;\n if ($user->save())\n {\n $user->createUserType();\n return true;\n }\n else\n {\n return false;\n }\n }","title":""},{"docid":"3c688270a0d26b3835e327a80005a3de","score":"0.6764738","text":"public function authUser($sloginusername,$sloginpassword){\n $sloginpassword1 = sha1($sloginpassword); // creates a crypted variable for the password\n\n\t$found_user = Login::auth($sloginusername, $sloginpassword1); /// Check database to see if username/password exist.\n\t\n\n if ($found_user) {// if the user exist do make a login object and a user object, and store theese in the database \n \n $uactivedo = new Login();\n $ulogins = Login::find_all();\n \n\n// This FOREACHloop get runs through all the login object until it finds a wich matches the email,then we\n// checks that the activeted variable is set to one. If so you can log inn. If not you get an\n// error message of that you have not activted your account.\n \n\n foreach($ulogins as $uactivedo){\n if ($uactivedo->email == $sloginusername){\n\n $uactiveone = $uactivedo->activated ;\n $auserid= $uactivedo->id;\n\n }\n }\n\n if($uactiveone==1){ // Checks if your account is activeted, if so u get get loggin in by session and redirected to admin area.\n $session = new Session();\n $session->login($found_user);\n\n redirect_to(\"view/admin/index.php\");\n }else{\n return \"bruker ikke aktivert!\";\n }\n } else {\n // username/password combo was not found in the database\n return \"Username/password combination incorrect.\";\n }\n \n }","title":""},{"docid":"a287bc09dcc0f8a36027e2e8bc1a9096","score":"0.675273","text":"public function register() {\n // create/read session, absolutely necessary\n\n if (session_status() == PHP_SESSION_NONE && !headers_sent()) {\n session_start();\n }\n\n // check the possible login actions:\n // if user tried to log out (happen when user clicks logout button)\n if (isset($_GET[\"logout\"])) {\n $this->doLogout();\n } // login via post data (if user just submitted a login form)\n else if (isset($_POST[\"login\"])) {\n $username = isset($_POST['userName']) ? $_POST['userName'] : \"\";\n $password = isset($_POST['userPassword']) ? $_POST['userPassword'] : \"\";\n $this->doLogin($username, $password);\n }\n $this->showError();\n }","title":""},{"docid":"f625f2461570b916e5ce00563c808f30","score":"0.6746764","text":"public function registerUser($user);","title":""},{"docid":"fed0c564c3e7957da30af971ad1f4bc8","score":"0.6745978","text":"public function register()\n {\n $data = Request::all();\n // Si tous les champs ont été remplis\n \tif (!Validator::array_has_empty($data)) {\n \t\t// Si le password et la confirmation sont identiques\n \t\tif ($data['password'] == $data['password2']) {\n\n \t\t\t// Si l'email existe déjà dans la db -> erreur\n \t\t\tif ($this->User->findByMail($data['mail'])) {\n \t\t\t\t$this->setFlash(\"This email is already used\", 'warning');\n \t\t\t\t$this->view->render('users/register');\n \t\t\t}\n \t\t\t// Sinon on crée l'utilisateur et on le redirige vers l'index\n \t\t\telse {\n\n \t\t\t\t$this->User->save($data);\n $_SESSION['user'] = $data;\n $_SESSION['user']['role'] = \"member\";\n unset($_SESSION['user']['password'], $_SESSION['user']['password2']);\n \t\t\t\t$this->setFlash(\"You are successfully registered\", 'success');\n \t\t\t\t//$this->login();\n \t\t\t\t$this->view->redirect_to('user/index');\n \t\t\t}\n\n \t\t} else {\n \t\t\t$this->setFlash(\"Not same passwords\", 'warning');\n \t\t\t$this->view->render('users/register');\n \t\t}\n\n \t} elseif($data && Validator::array_has_empty($data)) {\n $this->setFlash(\"Please fill all the fields\", 'warning');\n $this->view->render('users/register');\n\n } else {\n \t $this->view->render('users/register');\n }\n }","title":""},{"docid":"de6390c90fa513036165647d6e9fa6a4","score":"0.6739674","text":"public function register()\n\t{\n\t\t$username = $this->input->post('userid');\n\t\t$email = $this->input->post('email');\n\t\t$password = $this->input->post('pword');\n\n\t\t$this->auth_model->register_user(array(\n\t\t\t$username,\n\t\t\t$email,\n\t\t\tpassword_hash($password, PASSWORD_DEFAULT)\n\t\t));\n\n\t\tif (password_verify($password, $user->pword)) {\n\t\t\t// if sucessfull redirects to\n\t redirect('members/membership',@$data);\n\t\t}\n\t}","title":""},{"docid":"51fd865e65e1917baff92ffc4eb02765","score":"0.6733936","text":"public function setNewUser(){\n\n if($this->isRegisterFormReady()){\n //Ingresar usuario a la base de datos.\n $sql = \"INSERT INTO Users (userMail, userName, userLastName ,userMonth,\n userDay, userYear, userPassword, userLogMonth, userLogYear) VALUES (:userMail, :userName, :userLastName, :userMonth, :userDay, :userYear, :userPassword, :userLogMonth, :userLogYear)\";\n\n //Preparar el statement\n $stmt = $this->connection->prepare($sql);\n\n //Guardar los parametros en la base de datos\n $stmt->bindParam('userMail', $this->userMail);\n $stmt->bindParam('userName', strtolower($this->userName));\n $stmt->bindParam('userLastName', strtolower($this->userLastName));\n $stmt->bindParam('userMonth', $this->userMonth);\n $stmt->bindParam('userDay', $this->userDay);\n $stmt->bindParam('userYear', $this->userYear);\n //Enviar la constrseña de forma protegida.\n $stmt->bindParam('userPassword', password_hash($this->userPassword, PASSWORD_BCRYPT ));\n $stmt->bindParam('userLogMonth', $this->userLogMonth);\n $stmt->bindParam('userLogYear', $this->userLogYear);\n\n if( $stmt->execute() ){\n header(\"Location: index.php\");\n //$message = \"Cuenta creada satisfactoriamente\";\n }else{\n $this->errorMessage = 'Ocurrio un error al crear tu cuenta intentalo otra vez';\n }\n }\n }","title":""},{"docid":"19122981ad754288dde54ca311c468bc","score":"0.6722038","text":"private function RegisterUser()\n {\n $database = new Database();\n $password = sha1($_POST['pass1']);\n foreach (array(\"name\", \"surname\", \"email\", \"username\") as $campoForm) {\n $$campoForm = mysql_escape_string($_POST[$campoForm]);\n }\n $database->connect();\n $query = $database->Query(\"INSERT INTO utenti (NOME, COGNOME, EMAIL, USERNAME, PASSWORD) \" .\n \"VALUES ('$name','$surname','$email',$username','$password')\");\n $database->disconnect();\n }","title":""},{"docid":"a581b700fa8bad80139585d11fb6c32a","score":"0.6719115","text":"public function registerUser()\n\t{\n\t\t$input = Input::all();\n\t try {\n\t \t$user = Sentry::register(array(\n\t\t 'email' => $input['email'],\n\t\t 'password' => $input['password'],\n\t\t 'first_name' => $input['firstName'],\n\t\t 'last_name' => $input['lastName'],\n\t\t 'activated' => 1\n\t\t ));\n\n\t \treturn 1;\n\t } catch (Exception $e) {\n\t \treturn 0;\n\t }\n\t \n\t}","title":""},{"docid":"7c799542765d5ce3559771e8238519cc","score":"0.67135656","text":"public function LoginUser(){\n \n /** Zozbieranie zadaných údajov a prihlásenie */\n\t\tif(isset($_POST['LoginForm']))\n\t\t{\n\t\t\t$this->login->attributes=$_POST['LoginForm'];\n\t\t\t// Validacia prihlasenia a presmerovanie na pozadovanu stranku po prihlaseni\n\t\t\tif($this->login->validate() && $this->login->login()){\n //Ak prichadza z domovskej stranky tak presmerovanie na Dashboard\n if (Yii::app()->user->returnUrl == Yii::app()->homeUrl && Yii::app()->user->roles != 'admin')\n $this->redirect(Yii::app()->params->homePath.'/'.Yii::app()->language.'/dashboard');\n else //vsetci ostatni sa presmeruju tam kam pozaduju\n $this->redirect(Yii::app()->user->returnUrl);\n }\n \n\t\t\t\t\n\t\t}\n }","title":""},{"docid":"2f7504f0407682ed3c882471970a63f0","score":"0.67069197","text":"public function registration()\n {\n\n\n $loginRepository = new LoginRepository();\n $passwortPattern = \"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%èüÜÈéöÖÉÄÀäà_\\-?!'`^~\\]\\[£{}+*.°ç&()¢=]).{4,40})\";\n $errorMsg = null;\n $email = null;\n $nickname = null;\n $piss = '/Projekt_Bilder-DB/public'; // $GLOBALS['appurl'];\n if(isset($_POST['sendR'])) {\n $nickname = htmlspecialchars($_POST['nickname'], ENT_QUOTES, 'UTF-8');\n $email = htmlspecialchars($_POST['email'], ENT_QUOTES, 'UTF-8');\n $passwort = htmlspecialchars($_POST['passwort'], ENT_QUOTES, 'UTF-8');\n $v_passwort = htmlspecialchars($_POST['v_passwort'], ENT_QUOTES, 'UTF-8');\n if(empty($nickname) || empty($email) || empty($passwort) || empty($v_passwort)) {\n $errorMsg = $this->errMsg(\"empty\");\n }else {\n if(strlen($nickname) < 50 || strlen($nickname) > 3) {\n if(!$loginRepository->checkMail($email) > 0 && filter_var($email, FILTER_VALIDATE_EMAIL)) {\n if(preg_match($passwortPattern, $passwort) === 1){\n if($passwort == $v_passwort) {\n $loginRepository->addUser($nickname,$email,$passwort);\n $_SESSION[\"succMsg\"] = $this->errMsg(\"succ\");\n header(\"Location: \". $GLOBALS['appurl'] .\"/login\");\n }else {\n $errorMsg = $this->errMsg(\"vpasswort\"); // nicht gleiches Passwort\n }\n }else {\n $errorMsg = $this->errMsg(\"bpasswort\"); // schlechtes Passwort mind. 1Kleinbuchstaben, 1Grossbuchstaben, 1Zahl, 1Sonderzeichen und 5lang sein\n }\n\n }else {\n $errorMsg = $this->errMsg(\"mailInvalid\"); // mail gibt es schon oder ist ungültig\n }\n\n }else {\n $errorMsg = $this->errMsg(\"usrname\"); // username ungültig (zu lang oder zu kurz)\n }\n }\n\n\n\n }\n\n\n\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->error = $errorMsg;\n $view->mail = $email;\n $view->usr = $nickname;\n $view->display();\n }","title":""},{"docid":"09f008040aeab30d688c20fd0e830d92","score":"0.6696813","text":"public function register()\n {\n $user = [\n 'name' => request('name'),\n 'email' => request('email'),\n 'password' => Hash::make(request('password')),\n ];\n if(User::create($user)){\n $credentials = request(['email', 'password']);\n if (! $token = auth('api')->attempt($credentials)) {\n return response()->json(['error' => 'Unauthorized'], 401);\n }\n return $this->respondWithToken($token);\n }else{\n return response()->json(['error' => 'error registering'], 401);\n }\n \n }","title":""},{"docid":"52c381b5b5b38e1198467ed0bfb1a896","score":"0.66935325","text":"public function registerUser() {\n $request = new Request();\n $user = new User();\n\n $user->create($request->getData());\n }","title":""},{"docid":"6e321bc6602f9567c54bb5227543639c","score":"0.6692271","text":"public function user_login()\n {\n echo \"This would be called on the user_register signal.\";\n }","title":""},{"docid":"4c22e9b88a7bca21ea2dc40d4302baba","score":"0.6690568","text":"public function register() {\n $config = Config::current();\n if (!$config->can_register)\n error(__(\"Registration Disabled\"), __(\"I'm sorry, but this site is not allowing registration.\"));\n\n if (logged_in())\n error(__(\"Error\"), __(\"You're already logged in.\"));\n\n if (!empty($_POST)) {\n if (empty($_POST['login']))\n Flash::warning(__(\"Please enter a username for your account.\"));\n elseif (count(User::find(array(\"where\" => array(\"login\" => $_POST['login'])))))\n Flash::warning(__(\"That username is already in use.\"));\n\n if (empty($_POST['password1']))\n Flash::warning(__(\"Password cannot be blank.\"));\n elseif ($_POST['password1'] != $_POST['password2'])\n Flash::warning(__(\"Passwords do not match.\"));\n\n if (empty($_POST['email']))\n Flash::warning(__(\"E-mail address cannot be blank.\"));\n elseif (!preg_match(\"/^[_A-z0-9-]+((\\.|\\+)[_A-z0-9-]+)*@[A-z0-9-]+(\\.[A-z0-9-]+)*(\\.[A-z]{2,4})$/\", $_POST['email']))\n Flash::warning(__(\"Invalid e-mail address.\"));\n\n if ($config->enable_recaptcha and !check_captcha())\n Flash::warning(__(\"Incorrect captcha code. Please try again.\"));\n\n if (!Flash::exists(\"warning\")) {\n if ($config->email_activation) {\n $to = $_POST['email'];\n $subject = _f($config->name.\" Registration Pending\");\n $message = _f(\"Hello, \".fix($_POST['login']).\".\\n\\nYou are receiving this message because you recently registered at \".$config->chyrp_url.\"\\nTo complete your registration, go to \".$config->chyrp_url.\"/?action=validate&login=\".fix($_POST['login']).\"&token=\".sha1($_POST['login'].$_POST['email']));\n $headers = \"From:\".$config->email.\"\\r\\n\" .\n \"Reply-To:\".$config->email. \"\\r\\n\" .\n \"X-Mailer: PHP/\".phpversion() ;\n\n $user = User::add($_POST['login'], $_POST['password1'], $_POST['email'], '', '', '', false, 5);\n $sent = email($to, $subject, $message, $headers);\n\n if ($sent)\n Flash::notice(__(\"The email address you provided has been sent details to confirm registration.\"), \"/\");\n else\n Flash::notice(__(\"There was an error emailing the activation link to your email address.\"), \"/\");\n } else {\n $user = User::add($_POST['login'], $_POST['password1'], $_POST['email']);\n\n Trigger::current()->call(\"user_registered\", $user);\n\n $_SESSION['user_id'] = $user->id;\n\n Flash::notice(__(\"Registration successful.\"), \"/\");\n }\n }\n }\n\n $this->display(\"forms/user/register\", array(), __(\"Register\"));\n }","title":""},{"docid":"f6ec9bb2d15e2f465ac4af6ea2f5fcde","score":"0.66820097","text":"public function register()\n \t{\n\t\ttry{\n\t\t\t// Check if exists\n\t\t\t$query=$this->con->prepare(\"SELECT * FROM user WHERE email=:email\");\n\t\t\t$query->bindParam(':email', $this->email);\n\t\t\t$query->execute();\n\t\t\t\n\t\t\t$result = $query -> fetch(PDO::FETCH_ASSOC);\n\n\t\t\t// check for empty result\n\t\t\tif (isset($result) && isset($result['email'])) {\n\t\t\t\t// user found - already registered\n\t\t\t\t$this->error['success'] = 1;\n\t\t\t\t$this->error['message'] = 'Esta email já se encontra registado.';\n\n\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t$this->con->beginTransaction();\n// print '








    email: '.$this->email;\t\t\t\t\n// print '
    name: '.$this->name;\t\t\t\t\n// print '
    uid: '.$this->token;\t\t\t\t\n// print '
    companyid: '.$this->companyid;\t\t\t\t\n// print '
    uadmin: '.$this->uadmin;\t\t\t\t\n// print '
    password: '.SHA1($this->password);\t\t\n\n\t\t\t\t// inserting new user\n\t\t\t\t$query = $this->con->prepare(\"\n INSERT INTO user(email, name, phonenumber, taxnumber, uid, pass, admin, status, deliveryname, deliverystreet, deliveryzipcode, deliverycity, invoicename, invoicestreet, invoicezipcode, invoicecity, creationdate) \n VALUES (:email, :name, :phonenumber, :taxnumber, :uid, :pass, :admin, :status, :deliveryname, :deliverystreet, :deliveryzipcode, :deliverycity, :invoicename, :invoicestreet, :invoicezipcode, :invoicecity, CURRENT_TIMESTAMP)\n \");\n\n\t\t\t\t$result = $query->execute(array(\n\t\t\t\t\t\"email\" \t\t => $this->email,\n\t\t\t\t\t\"name\" \t\t \t => $this->name,\n\t\t\t\t\t\"phonenumber\" \t => $this->phonenumber,\n\t\t\t\t\t\"taxnumber\" \t => $this->taxnumber,\n\t\t\t\t\t\"uid\" \t => $this->token,\n\t\t\t\t\t\"pass\" \t\t => '',\n\t\t\t\t\t\"admin\" \t\t => $this->admin,\n\t\t\t\t\t\"status\" \t\t => $this->status,\n\t\t\t\t\t\"deliveryname\" \t\t => $this->deliveryname,\n\t\t\t\t\t\"deliverystreet\" \t\t=> $this->deliverystreet,\n\t\t\t\t\t\"deliveryzipcode\" \t => $this->deliveryzipcode,\n\t\t\t\t\t\"deliverycity\" \t\t => $this->deliverycity,\n\t\t\t\t\t\"invoicename\" \t\t => $this->invoicename,\n\t\t\t\t\t\"invoicestreet\" \t\t=> $this->invoicestreet,\n\t\t\t\t\t\"invoicezipcode\" \t\t=> $this->invoicezipcode,\n\t\t\t\t\t\"invoicecity\" \t\t => $this->invoicecity\n\t\t\t\t));\n\n\t\t\t\tif (!$result) {\n\t\t\t\t\t$this->error['success'] = 1;\n\t\t\t\t\t$this->error['message'] = 'Ocorreu um erro no registo do utilizador.';\n\t\t\t\t\t$this->con->rollBack();\n\t\t\t\t} else {\n \n //authorization\n $this->client_id \t\t= $this->email;\n $this->client_secret \t= 'thisismysecret';\n $this->redirect_uri\t\t= 'http://127.0.0.1:8080/my-oauth2-walkthrough/error.php';\n $this->grant_types\t\t= 'refresh_token password client_credentials';\n $this->scope\t\t\t= null;\n $this->user_id\t\t= null;\n $ret = $this->registeroauth();\n\n $this->error['success'] = 0;\n $this->error['message'] = 'Criação com sucesso do utilizador';\n\n $this->con->commit();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $ex) {\n\t\t\t$this->error['success'] = 1;\n\t\t\t$this->error['message'] = $ex->getMessage();\n\t\t\t$this->con->rollBack();\n\t\t}\n }","title":""},{"docid":"b36e7fcb89e2526f0546dbfe819ea5f0","score":"0.6675069","text":"public static function login() {\n $user_name = self::get_user_name();\n $user_exist = UserHome::exists($user_name);\n if (!$user_exist) {\n $user = self::get_shibboleth_user();\n UserHome::create($user);\n }\n Login::login_user($user_name);\n }","title":""},{"docid":"4779706d85d2bacf4b027ceb20802878","score":"0.66643214","text":"public function registerUser(){\n if(!($this->slpaCoreApi->isUserRegistered())){\n $this->slpaCoreApi->registerWithCurrentUserId();\n return 1;\n }\n return 0;\n }","title":""},{"docid":"fa8674232e2f129f4ea71524a4f8fd06","score":"0.66561395","text":"public function login();","title":""},{"docid":"92e561ee8888c8de57b75b6eda69bc2f","score":"0.6655204","text":"protected function registerNewUser ($login, $pass42)\n {\n $type = \"student\";\n\n // Liste des élèves 42 avec ce login\n $student = new Entities (\"c_42_logins[login_eleve=\\\"{$login}\\\"]\");\n\n // On génère le mot de passe\n $pass = $this->generatePassPhrase ();\n\n if ($student->current())\n {\n if ($student->current()->type == \"staff\")\n {\n $type = \"staff\";\n }\n }\n else\n {\n $auth = new Auth42();\n $info = $auth->search(\"uid=\".$login, $login, $pass42);\n if ($info and $info['count'] == 1)\n {\n Core::getBdd ()->insert (array(\n \"login_eleve\" => $login,\n \"nom\" => $info[0]['last-name'][0],\n \"prenom\" => $info[0]['first-name'][0]),\n 'c_42_logins');\n }\n }\n // Le hash qui sera dans la bdd\n $shapass = sha1 (trim (strtolower ($pass)));\n $loginsExists = new Entities (\"c_user[login=\\\"{$login}\\\"]\");\n\n if ($loginsExists->current())\n {\n $u = $loginsExists->current();\n $this->createSession($login, $u->pass, $u->id, $u->auths);\n echo \"1\";\n }\n else\n {\n if (Core::getBdd ()->insert(array (\"login\" => $login, \"pass\" => $shapass), 'c_user'))\n {\n $loginsExists = new Entities (\"c_user[login=\\\"{$login}\\\"]\");\n $mail = new MuffinMail($loginsExists->current());\n $mail->sendParralelMuffinPass($pass);\n $u = $loginsExists->current();\n $this->createSession($login, $u->pass, $u->id, $u->auths);\n echo \"1\";\n }\n else\n echo \"-1\";\n }\n }","title":""},{"docid":"fa03a81c58ed53e8f751b756029797a0","score":"0.66531146","text":"function login() {\n $post = $this->input->post();\n if (isset($post['email'])) {\n $user = $this->users_m->get_by(array('email' => $post['email']));\n //means we have it.\n if (!empty($user)) {\n $user = $user[0];\n if (isset($user['status'])\n && $user['status'] == 'validated') {\n $user['password'] = Encrypt::aes256_decode($user['password']);\n if (isset($post['password']) &&\n $post['password'] == $user['password']) {\n $_SESSION['user'] = $user;\n $_SESSION['uid'] = $user['_id'];\n redirect('/');\n } else {\n $this->output->error('login error');\n }\n } else {\n $this->output->error('not validate error');\n }\n } else {\n $this->register();\n }\n }\n }","title":""},{"docid":"c05e427de9f0775fa63346c97c71c7b7","score":"0.6646754","text":"public function loginUser(){\n\t\t$check = $this->validateUser();\n\t\t$validate = array(103,106);\n\t\t\n\t\t$ecode = array();\n\t\t$desc = array();\n\t\tforeach($validate as $vcode){\n\t\t\tif(in_array($vcode, $check)){\n\t\t\t\t$ecode[]= $vcode;\n\t\t\t\t$desc[] = $this->code[$vcode];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*** return if error detected***/\n\t\tif(!empty($ecode)){\n\t\t\t$this->_result['status'] \t\t\t\t\t = 'error';\n\t\t\t$this->_result['error_code'] \t\t\t\t= $ecode;\n\t\t\t$this->_result['data']['error_msg'] = $desc;\n\t\t\treturn $this->_result;\n\t\t}\n\t\t\n\t\t$filter = array(\n\t\t\t\t\t'username' => trim($this->param['username']),\n\t\t\t\t\t'password' => md5($this->param['password'])\n\t\t\t\t );\n\t\t$users = $this->get_data($filter);\n\t\t\n\t\tif($users){\t\t\n\t\t\tif($users[0]['status'] == 2){\n\t\t\t\t$this->_result['status'] = 'error';\n\t\t\t\t$this->_result['error_code'] = array(101);\n\t\t\t\t$this->_result['data']['error_msg'] = array($this->code[101]);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t$this->_result['status'] = 'success';\n\t\t\t\t$this->_result['data'] = $this->generateSession($users[0]['u_id']);\t\n\t\t\t\t// Set user object\n\t\t\t\tforeach($users as $info){\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$this->user->set_memberid($info['u_id']);\n\t\t\t\t\t$this->user->set_memberemail($info['email']);\n\t\t\t\t\t$this->user->set_memberfullname($info['firstname'].\" \".$info['lastname']);\n\t\t\t\t\t$this->user->set_memberusername($info['username']);\n\t\t\t\t\t$this->user->set_memberrole($info['type']);\n\t\t\t\t\tif($info['type'] == 3){\n\t\t\t\t\t\t$prop = $this->residents_model->getByUser($this->user->get_memberid());\n\t\t\t\t\t\t$this->user->set_memberproperty($prop['data']['p_id']);\n\t\t\t\t\t}elseif($info['type'] == 2){\n\t\t\t\t\t\t$prop = $this->propertyAdmin_model->getByUser($this->user->get_memberid());\n\t\t\t\t\t\t$this->user->set_memberproperty($prop['data']['p_id']);\n\t\t\t\t\t}\n\t\t\t\t\t$this->user->set_memberonline(1);\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t\n\t\t\t$this->_result['status'] = 'error';\n\t\t\t$this->_result['error_code'] = array(135);\n\t\t\t$this->_result['data']['error_msg'] = array($this->code[135]);\n\t\t}\n\t\t\n\t\treturn $this->_result;\n\t}","title":""},{"docid":"b9dff4a482c8707149681dfb4246edd5","score":"0.6644579","text":"function register($password, $name, $realname, $language, $email) {\n\t\t// TODO: check not to change user name!!\n\t\tglobal $userdb, $db, $page;\n\t\tif(strlen($name)==0) {\n\t\t\tdebug(\"USERDB\", \"attempt to register with empty userid\");\n\t\t\treturn $page->getlocalized(\"invalid_username\");\n\t\t}\n\t\tdebug(\"USERDB\", \"registering user: \". $name);\n\t\t$name = sotf_Utils::magicQuotes($name);\n\t\t$passwd = sotf_Utils::magicQuotes($password);\n\t\t$query = \"INSERT INTO authenticate (username,passwd,general_id,user_type) VALUES('$name','$password',1,'member')\";\n\t\t$userdb->query($query);\n\t\t$id = $userdb->getOne(\"SELECT auth_id FROM authenticate WHERE username='$name'\");\n\t\t//\t\t$query = \"INSERT INTO user_preferences (RealName,language,last_visit,num_logins) \";\n // RealName taken out \t\t\t\t\t\t. sotf_Utils::magicQuotes($realname) . \"','\" \n\t\t$query = \"INSERT INTO user_preferences (auth_id, language,last_visit,num_logins) \";\n\t\t$query .= \"VALUES('$id','\" . sotf_Utils::magicQuotes($language) \n\t\t\t. \"','\". db_Wrap::getSQLDate() . \"',1)\";\n\t\t$userdb->query($query);\n // TODO: check email??\n $email = sotf_Utils::magicQuotes($email);\n $db->query(\"INSERT INTO sotf_user_prefs (id, username, email) VALUES('$id', '$name', '$email')\");\n\t}","title":""},{"docid":"65be60e99527862142d156ef838b62da","score":"0.66317046","text":"function RegisterUser($email , $password , $name) {\n\tif(!filter_var($email, FILTER_VALIDATE_EMAIL))\n\t{\n\t\treturn SetErrorMessage(\"Invalid email provided for registration \".$email.$name.$password);\n\t}\n\t//check if name provided\n\tif($name == '')\n\t{\n\t\treturn SetErrorMessage(\"Name not provided for registration\");\n\t}\n\t//check if password provided\n\tif($password == '')\n\t{\n\t\treturn SetErrorMessage(\"Password not provided for registration\");\n\t}\n\t\n\t//Password hash\n\t$password_hash = hash('sha1' , $password);\n\t//Access token\n\t$access_token = GenerateAccessToken($password);\n\t//When the user first registers he is inactive\n\t$is_active = False; \n\t\n\tif(GetUserByEmail($email))\n\t{\n\t\treturn(SetErrorMessage(\"User with email id already registered\"));\n\t}\n\t\n\t$result = InsertNewUser($email,$password_hash,$name,$is_active,$access_token);\n\t\n\tif($result == 0 )\n\t{\n\t\treturn(SetErrorMessage(\"User with email id already registered\"));\n\t} else\n\t{\n\t\t//TODO : Send the user's access_token to his email to verify his password\n\t\treturn(GetUserById($result));\n\t}\n\t\n}","title":""},{"docid":"350b6aff71be2af30703103b059cf9de","score":"0.6631536","text":"public function doRegisterCases(){\n\t\n\t\tif($this->rv->getRegister()) {\n\n\t\t\tif(($this->rv->getIsRegisterUsernameEntered()) && ($this->rv->getIsRegisterPasswordEntered())){\n\t\t\t\t$this->rv->setUserAndPassRegisterErrorMsg();\n\t\t\t\t}\n\t\t\telse if(strlen($this->rv->getRegisterUsername()) < 3){\t\n\t\t\t\t$this->rv->setUserRegisterErrorMsg();\n\t\t\t\t}\n\t\t\telse if(strlen($this->rv->getRegisterPassword()) < 6){\t\t\n\t\t\t\t$this->rv->setPassRegisterErrorMsg();\n\t\t\t\t}\n\t\t\telse if($this->rv->getRegisterPassword() !== ($this->rv->getRegisterPasswordRepeat())){\t\n\t\t\t\t$this->rv->setPasswordsNotMatchMsg();\t\n\t\t\t\t}\n\t\t\telse if ($this->rv->getRegisterUsername() !== strip_tags($this->rv->getRegisterUsername())) {\n \t\t\t$this->rv->setInvalidCharsMsg();\n\t\t\t\t}\n\t\t\telse if($this->udal->getUsers()->userExists($this->rv->getRegisterUsername())){\n\t\t\t\t$this->rv->setUserExistsMsg();\n\t\t\t\t}\n\t\telse {\n\t\t\t\t//set Register session\n\t\t\t\t$this->s->setRegistered();\n\t\t\t\t//set User session\n\t\t\t\t$this->s->setUser($this->rv->getRegisterUsername());\n\t\t\t\t//adds user to UserDAL\n\t\t\t\t$this->udal->add(new User($this->rv->getRegisterUsername(), $this->rv->getRegisterPassword()));\n\t\t\t\t$this->nv->backToIndex();\n\t\t\t}\n\t\t}\t\n\n\t}","title":""},{"docid":"82872eb7241f97f5915059276efcc3bc","score":"0.6621656","text":"function user_register($user_username, $user_password)\n {\n $this->user_username = $user_username;\n $this->user_password = $user_password;\n $this->sql = \"INSERT INTO tbl_user (user_username,user_password) VALUES ('$this->user_username','$this->user_password')\";\n }","title":""},{"docid":"4c19518f002fbf131adb41b273e91744","score":"0.6619469","text":"public function register() {\n // we must be logged out to be able to register a new user\n if (!Auth::check()) {\n $validator = $this->getRegisterValidator();\n if ($validator->passes()) {\n try {\n $data = $this->getRegisterData();\n $theUser = new User();\n $theUser->username = $data['username'];\n $theUser->email = $data['email'];\n //the hash includes the salt\n $theUser->password = Hash::make($data['password']);\n $theUser->save();\n $data['success'] = 'New user registered succesfully';\n //finally we send the email\n Mail::send('emails.welcome', array('user' => $theUser), function($message) use ($theUser) {\n $message->to($theUser->email, $theUser->username)->subject('Welcome!');\n });\n } catch (Exception $e) {\n $data['error'] = 'An error occurred while trying to register the user: ' . $e->getMessage();\n }\n } else {\n $data['error'] = $this->addMessages($validator);\n }\n //if validation is not passed or the registration failed, \n //redirect to login form with errors\n return Redirect::route(\"user/login\")->with('data', $data);\n }\n }","title":""},{"docid":"a2767000e23bc54b8b0a973aa80ec2eb","score":"0.6613035","text":"function registerNewUser()\n{\n $firstname = $_POST['firstname'];\n $lastname = $_POST['lastname'];\n $email = $_POST['email'];\n $password = $_POST['password'];\n $password = password_hash($password, PASSWORD_DEFAULT);\n\n //instantiation of user\n $newUser = new User([\n 'firstname' => $firstname,\n 'lastname' => $lastname,\n 'email' => $email,\n 'password' => $password\n ]);\n\n //instantiation of manager\n $db = new PDO('mysql:host=localhost;dbname=freshshop', 'root', '');\n $userManager = new UserManager($db);\n\n //add new user to database\n $userManager->add($newUser);\n\n header('Location: index.php');\n exit;\n}","title":""},{"docid":"e5e7fcc169e991a07e46c649b86448b9","score":"0.6606504","text":"function register_user() \n\t{\n\t\t\n\t\t$uri = 'user/register_user';\n\t\t$details = urldecode ( $this->input->post ( 'details' ) );\n\t\t$params = $details;\n\t\t$registration_details = $this->rest->{$this->method} ( $uri, $params );\n\n\t\t///echo $this->rest->debug();exit;\n\n\t\tif (trim ( $registration_details ['status'] ) == 'failure' && trim ( $registration_details ['error_code'] ) == 100) \n\t\t{\n\t\t\techo json_encode ( array ('faliure' => $registration_details ['responseData'] ) );\n\t\t} \n\t\telseif (trim ( $deal_details ['status'] ) == 'failure' && trim ( $deal_details ['error_code'] ) == 20) \n\t\t{\n\t\t\t$this->get_token ();\n\t\t\t$this->index ();\n\t\t} \n\t\telseif (trim ( $registration_details ['status'] ) != 'success') \n\t\t{\n\t\t\techo json_encode ( array ('faliure' => $registration_details ['responseData'] ) );\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$this->verification_code = $registration_details ['responseData'];\n\t\t\techo json_encode ( array ('success' => 'true' ) );\n\t\t}\n\n\t}","title":""},{"docid":"5eabf4ae4b0d47863e8b39ef072fe7e5","score":"0.6598777","text":"public function register()\n {\n if ($_SERVER['REQUEST_METHOD'] == 'POST')\n {\n // Process form\n // Sanitize POST data\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\n // Init data\n // Trim clears white space\n $data = ['name' => trim($_POST['name']) , 'email' => trim($_POST['email']) , 'password' => trim($_POST['password']) , 'confirm_password' => trim($_POST['confirm_password']) , 'name_err' => '', 'email_err' => '', 'password_err' => '', 'confirm_password_err' => ''];\n\n // Validate Email\n // check email is not empty\n if (empty($data['email']))\n {\n $data['email_err'] = 'Please enter email';\n }\n else\n {\n // check email already exists\n if ($this->userModel->findUserByEmail($data['email']))\n {\n $data['email_err'] = 'Account with this email already exists';\n }\n }\n\n // Validate Name\n // check name is not empty\n if (empty($data['name']))\n {\n $data['name_err'] = 'Please enter name';\n }\n\n // Validate Password\n // check password is not empty and it is longer than 6 characters\n if (empty($data['password']))\n {\n $data['password_err'] = 'Please enter password';\n }\n elseif (strlen($data['password']) < 6)\n {\n $data['password_err'] = 'Password must be at least 6 characters';\n }\n\n // Validate Confirm Password\n // check confirm password is not empty and == password\n if (empty($data['confirm_password']))\n {\n $data['confirm_password_err'] = 'Please confirm password';\n }\n else\n {\n if ($data['password'] != $data['confirm_password'])\n {\n $data['confirm_password_err'] = 'Passwords do not match';\n }\n }\n\n // Make sure errors are empty\n if (empty($data['email_err']) && empty($data['name_err']) && empty($data['password_err']) && empty($data['confirm_password_err']))\n {\n // Validated\n // Hash Password\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\n\n // Register User\n // if for checking it went well\n if ($this->userModel->register($data))\n {\n flash('register_success', 'You are successfully registered, please check your email for a verification link');\n redirect('/users/login');\n \n }\n else\n {\n die('Something went wrong');\n }\n }\n else\n {\n // Load view with errors\n $this->view('users/register', $data);\n }\n }\n else\n {\n // Init data\n $data = ['name' => '', 'email' => '', 'password' => '', 'confirm_password' => '', 'name_err' => '', 'email_err' => '', 'password_err' => '', 'confirm_password_err' => ''];\n\n // Load view\n $this->view('users/register', $data);\n }\n }","title":""},{"docid":"a7a638f779b136e186564fd269e94d8a","score":"0.65987194","text":"private function authenticate_user_login()\n\t{\n\t\tif(is_object($this->password_salt))\n\t\t{\n\t\t\tif(verifyPasswordHash($this->input->post('password'),$this->password_salt->sb_hotel_userpasswd) === TRUE)\n\t\t\t{\n\t\t\t\t$this->logged_in_user_meta \t= $this->User_model->authenticated_hoteleir_records($this->input->post('username'),$this->password_salt->sb_hotel_userpasswd);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->redirectWithErrMsg(ERR_MSG_LEVEL_1);\n\t\t\t}\t\n\t\t}\n\t\t$this->register_user_session();\n\t}","title":""},{"docid":"98e490bfe01f2f12bc22eca442065cd3","score":"0.6596953","text":"public function makeRegister()\n {\n $this->is_admin = User::IS_REGISTER;\n $this->save();\n }","title":""},{"docid":"425c738d81c7c8ea74b03e4a15477e41","score":"0.6594894","text":"function addNewUser($email, $password)\n {\n\n }","title":""},{"docid":"d2022ccaca95ec1ca4df9737b6b1bf2c","score":"0.6592954","text":"public function userLogin(){\n /*\n * login username and password saved in $username , $password\n * if user is loggedin return user info in assosiative array\n * else reutrn false\n */ \n\n }","title":""},{"docid":"4e991554e12ec2a5fca8f45df27a2a59","score":"0.65919733","text":"function register(){\n\tglobal $db, $errors, $username, $email;\n\n\t// receive all input values from the form. Call the e() function\n // to escape form values\n\t$username = escapeString($_POST['user_name']);\n\t$email = escapeString($_POST['user_email']);\n\t$password_1 = escapeString($_POST['user_password']);\n\t$password_2 = escapeString($_POST['user_password_1']);\n\n\t// form validation: ensure that the form is correctly filled\n\tif (empty($username)) { \n\t\tarray_push($errors, \"Username is required\"); \n\t}\n\tif (empty($email)) { \n\t\tarray_push($errors, \"Email is required\");\n\t}\n\tif (empty($password_1)) { \n\t\tarray_push($errors, \"Password is required\"); \n\t}\n\tif ($password_1 !== $password_2) {\n\t\tarray_push($errors, \"Two passwords do not match\");\n\t}\n\n\t// register user if there are no errors in the form\n\tif (count($errors) == 0) {\n\t\t\n\t\t// $password = password_hash($password1, PASSWORD_DEFAULT);\n\t\t$password = md5($password_1);\n\t\t\n\t\t\t$query = \"INSERT INTO users (user_name, user_password, user_email) \n\t\t\t\t\t VALUES('{$username}', '{$password}', '{$email}')\";\n\t\t\tmysqli_query($db, $query);\n\n // get id of the created user\n\t\t\t$logged_in_user_id = mysqli_insert_id($db);\n\n $_SESSION['user_id'] = $logged_in_user_id; // put logged in user in session\n $_SESSION['user_name'] = $username;\n $_SESSION['user_email'] = $email;\n $_SESSION['user_type'] = $user_type;\n\t\t\theader('Location: ../index.php');\t\t\t\t\n\t\t\n\t}\n}","title":""},{"docid":"55c99dd45ddd1476ec5339ce0d94e411","score":"0.65858877","text":"public function register()\n {\n // Validate register form data\n $data = request()->validate([\n 'first_name' => 'required|string|max:255',\n 'email' => 'required|string|max:255|email|unique:users',\n 'password' => 'required|string|min:5',\n 'payment_email' => 'required|string|max:255|email'\n ]);\n\n // set user name cutting email address before @ text\n $username = explode('@',request('email'));\n\n // Set user id for affiliate refer link\n $user_id = count(User::all()) + 1;\n\n // Add user to database\n User::create([\n 'first_name' => request('first_name'),\n 'email' => request('email'),\n 'username' => $username[0],\n 'password' => Hash::make(request('password')),\n 'payment_email' => request('payment_email'),\n 'promote_id' => request('promote'),\n 'affiliate_link' => url(env('APP_URL')).'?ref='.$user_id\n ]);\n\n // Redirect to login page\n return redirect()->route('client.member.login.view')->with('message', 'Successfully Register User...');\n }","title":""},{"docid":"86eb410e79646c128134f20c330595e1","score":"0.6581713","text":"public function loginUser() {\n $username = $this->request->get(\"username\");\n $password = $this->request->get(\"password\");\n $this->userService->loginUser($username, $password);\n }","title":""},{"docid":"6b563fa40a88b74316006effd72a6f9b","score":"0.65787977","text":"public function createUser()\n {\n\n echo \"im in create user function.\".\"
    \";\n }","title":""},{"docid":"2e9c78302132ec43d80d6d2ed8d19524","score":"0.6575012","text":"public function register()\n\t{\n\t\t// Load the user model\n\t\t$this->load->model('user_model','usermodel');\n\t\t\n\t\t// If the expected paramters are found then register the user\n\t\tif (isset($_POST['email']) && isset($_POST['pass'])) {\n\t\t\t$result = $this->usermodel->register($_POST['email'],$_POST['pass'],1);\n\t\t\t// If registrationw as successful\n\t\t\tif ($result) {\n\t\t\t\t$data['status'] = \"true\";\n\t\t\t\t$data['uid'] = $result;\n\t\t\t}\n\t\t} else {\n\t\t\t$data['status'] = \"false\";\n\t\t}\n\t\n\t\t$this->load->view('api/user_view',$data);\n\t}","title":""},{"docid":"a9d57d7c112b2a939a85508a05f4e321","score":"0.6561175","text":"public function login()\n {\n $this->autoRender = false;\n $userTbl = TableRegistry::get('users_old');\n\n if($this->request->is(['post']))\n { \n parent::checkIsset(['email','password','device_id','device_type'], $this->request->data);\n $email = parent::validateParameters(\"Email\", $this->request->data['email'], STRING);\n $password = parent::validateParameters(\"Password\", $this->request->data['password'], STRING);\n $device_id = parent::validateParameters(\"Device Id\", $this->request->data['device_id'], STRING);\n $device_type = parent::validateParameters(\"Device Type\", $this->request->data['device_type'], STRING);\n\n $userData = $userTbl->find('all')->where(['email' => $email])->orWhere([\"phone_number\" => $email])->first();\n if(!empty($userData))\n { \n $hasher = new DefaultPasswordHasher();\n $verify = $hasher->check($password, $userData['password']);\n if($verify)\n { \n if($userData['role_id'] == USER)\n {\n $updateUserData['device_type'] = $device_type; \n $updateUserData['device_id'] = $device_id;\n\n if($userData['status'] == ACTIVE)\n {\n if($userData['verified_status'] == ACTIVE)\n { \n $userPostData = $userTbl->patchEntity($userData, $updateUserData, ['validate'=>false]);\n if($userTbl->save($userPostData)){\n // USERDATA \n $user['user_id'] = $userData->id;\n $user['email'] = $userData->email;\n $user['username'] = $userData->name;\n $user['profile_picture'] = $this->General->checkFileExist('img/users/'.$userData->profile_picture);\n $user['verified_status'] = $userData->verified_status;\n try{\n // TOKEN\n $key = JWT_SECRET_KEY;\n $payload = array(\n \"iss\" => SITE_URL,\n \"aud\" => SITE_URL,\n \"iat\" => time(),\n \"exp\" => time() + (60 * 60), // 1 Hour\n \"user_id\" => $userData->id\n );\n\n $token = JWT::encode($payload, $key);\n parent::sendResponse(200, \"Login successfully.\", $user, [\"token\" => $token]);\n }catch(\\Exception $e){\n parent::throwError(401, $e->getMessage()); \n }\n }else{\n parent::throwError(500,\"Internal server error.\"); \n }\n }else{\n parent::throwError(401,\"Please verify your account first.\"); \n }\n }else{\n parent::throwError(401,\"Your account is deactive by admin. Please email us at \".EMAIL_SENT_FROM);\n }\n }else{\n parent::throwError(401,\"Please login as a user account.\"); \n }\n }else{\n parent::throwError(401,\"Invalid password.\"); \n } \n }else{\n parent::throwError(401,\"Invalid login credential.\"); \n }\n }else{\n parent::throwError(405,\"Something went wrong. Please try again.\"); \n }\n }","title":""},{"docid":"a4f53d540824061cc104c76494a1b119","score":"0.6552587","text":"public function register() {\r\n\t\t$message = null;\r\n\r\n\t\tif (isset($_POST['registerSubmit'])) {\r\n\t\t\t$userModel = $this->getModel('UserModel');\r\n\t\t\t$user = $userModel->register();\r\n\t\t\tif ($user) {\r\n\t\t\t\t$message = ['Nice! You\\'re awesome. Now log in the system.'];\r\n\t\t\t} else {\r\n\t\t\t\t$message = ['Something went wrong. Please, try again.'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->getView('registerView', $message);\r\n\t}","title":""},{"docid":"45f260b0e780f6c3afd1bbe64772448c","score":"0.6551658","text":"public function store()\n {\n $user = new User($this->db);\n if (isset($_POST)) { \n if (!UserFormValidator::validate($_POST)) {\n return $this->render(\"users/register\");\n } \n //bind form data to PDO object\n $userDTO = $this->dataBinder->bind($_POST, UserDTO::class);\n if ($user->findByEmail($userDTO->getEmail()) !== null) {\n flash('register_success', 'the user is exist already');\n return $this->render(\"users/register\");\n }\n //encrypt Password\n $password = $userDTO->getPassword();\n $passwordHash = password_hash($password, PASSWORD_DEFAULT);\n $userDTO->setPassword($passwordHash);\n $data = $user->create($userDTO); \n $this->render(\"home/index\", $data);\n }\n }","title":""},{"docid":"a7036205d89e0ac1df97f48d163a50a9","score":"0.65510356","text":"public function registerpassAction()\n {\n $this->view->step = 1;\n //if is post\n if ($this->_request->isPost()) {\n $newPass = $this->_request->getPost('txtNewPw');\n $confirmPass = $this->_request->getPost('txtConfirmPw');\n $uuid = $this->_request->getPost('uuid');\n\n if (empty($newPass) || empty($confirmPass) || empty($uuid)) {\n $this->view->errmsg = 'パスワードは必要ですまたはキー(uuid)は必要です。';\n }\n else if ($newPass !== $confirmPass) {\n $this->view->errmsg = 'パスワードと異なります。';\n }\n else {\n //registe and set password\n require_once 'Admin/Bll/User.php';\n $bllResetPass = new Admin_Bll_User();\n $result = $bllResetPass->registerPassword($uuid, $newPass);\n if ($result) {\n $this->view->step = 2;\n }\n else {\n $this->_forward('error', 'error', 'admin', array('message' => 'エラーが出ました。登録失敗しました。'));\n return;\n }\n }\n }\n //init page\n else {\n $uuid = $this->_request->getParam('uuid');\n\n //check uuid\n if (empty($uuid)) {\n $this->_forward('noauthority', 'error', 'admin');\n return;\n }\n\n require_once 'Admin/Dal/User.php';\n $register = Admin_Dal_User::getDefaultInstance();\n $info = $register->getUserByUuid($uuid);\n\n //if the $info empty\n if (empty($info)) {\n $this->_forward('noauthority', 'error', 'admin');\n return;\n }\n\n if (1 == $info['status']) {\n $this->_forward('error', 'error', 'admin', array('message' => 'そのユーザーが既に登録しました。'));\n return;\n }\n $this->view->uuid = $uuid;\n }\n\n $this->view->title = '登録を確認|OPENSOCIAL APPS ADMIN|LinNo ( リンノ )';\n $this->render();\n }","title":""},{"docid":"4c7845bf2450dbaa80c65407caf8522b","score":"0.654716","text":"public function signUp(){\r\n\r\n\r\n if( !empty($_POST['username']) && !empty($_POST['password']) && !empty($_POST['passwordTry']) && !empty($_POST['email']) ){\r\n \r\n $usernameEntre = htmlspecialchars($_POST['username']); \r\n $passwordEntre = htmlspecialchars($_POST['password']);\r\n $passwordTryEntre = htmlspecialchars($_POST['passwordTry']);\r\n $emailEntre = htmlspecialchars($_POST['email']);\r\n\r\n if($this->model->findByUsername($usernameEntre)){\r\n die(\"Cet username existe déjà\"); \r\n }\r\n\r\n\r\n if($passwordEntre == $passwordTryEntre) {\r\n $user = new \\Model\\User(); \r\n $user->username = $usernameEntre; \r\n $user->setPassword($passwordEntre); \r\n $user->email = $emailEntre; \r\n\r\n \r\n $this->model->register($user);\r\n \\Http::redirect(\"index.php?controller=gateau&task=index\");\r\n \r\n }\r\n\r\n }else{\r\n $userModel = new \\Model\\User();\r\n $user = $userModel->getUser(); \r\n $titreDeLaPage = \"Inscription\"; \r\n \\Rendering::render(\"users/signup\", compact('titreDeLaPage', 'user'));\r\n \r\n }\r\n\r\n }","title":""},{"docid":"a7eab5343091416f2f883222d84d895b","score":"0.65342426","text":"public function action_register()\n\t{\n\t\t$errors = FALSE;\n\n\t\t// Create an instance of Model_Auth_User\n\t\t$user = Jelly::factory('user');\n $meta = Jelly::factory('meta');\n\n\t\t// Check if the form was submitted\n\t\tif ($_POST)\n\t\t{\n\t\t\t/**\n\t\t\t * Load the $_POST values into our model.\n\t\t\t *\n\t\t\t * We use Arr::extract() and specify the fields to add\n\t\t\t * by hand so that a malicious user can't do (for example)\n\t\t\t * `$_POST['roles'][] = 2;` and make themselves an administrator.\n\t\t\t */\n\t\t\t$user->set(Arr::extract($_POST, array(\n\t\t\t\t'email', 'username', 'password', 'password_confirm'\n\t\t\t)));\n\n\t\t\t// Add the 'login' role to the user model\n\t\t\t$user->add('roles', 1);\n\n $meta->set(Arr::extract($_POST, array(\n 'first_name', 'last_name', 'area', 'phone'\n )));\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Try to save our user model\n\t\t\t\t$user->save();\n $meta->user->user_id = $user->id;\n $meta->save();\n\n\t\t\t\t// Redirect to the index page\n\t\t\t\t$this->request->redirect(Route::get('default')->uri(array('action' => 'index')));\n\t\t\t}\n\t\t\t// There were errors saving our user model\n\t\t\tcatch (Validate_Exception $e)\n\t\t\t{\n\t\t\t\t// Load custom error messages from `messages/forms/user/register.php`\n\t\t\t\t$errors = $e->array->errors('forms/user/register');\n\t\t\t}\n\t\t}\n\n\t\t// Set template title\n\t\t$this->template->title = 'Register';\n\n\t\t// Display the 'register' template\n\t\t$this->template->content = View::factory('user/register')\n\t\t\t->set('user', $user)\n ->set('meta', $meta)\n\t\t\t->set('errors', $errors);\n\t}","title":""},{"docid":"f51174ab152b9cfa1b2763cb46d2fb85","score":"0.65334475","text":"public function setUserRegistration()\n {\n if(!$this->databaseUsersTable) $this->getMessage('Users table in the database is not specified. Please specify it before any other operation using the method setDatabaseUserTable();','','','true');\n $user_name=$this->setEscape($_REQUEST['user_name']);\n $user_pass=$_REQUEST['user_pass'];\n\t$uid=$_REQUEST['uid'];\n\t$mobile=$_REQUEST['mobile'];\n\t$offset=$_REQUEST['offset'];\n\t$alias=$_REQUEST['alias'];\n //$user_confirm_pass=$_POST['user_confirm_pass'];\n $user_mail=$_REQUEST['user_mail'];\n // $user_confirm_mail=$_POST['user_confirm_mail'];\n $user_crypted_pass=$this->setCrypt($user_pass);\n\t\n $query=CLS_MYSQL::Query(\"SELECT a.*,b.* FROM\".\" \".$this->databaseUsersTable.\" AS a LEFT JOIN user_devices AS b on a.user_id=b.user_id WHERE a.user_name='$user_name'\");\n // $result_user_mail=CLS_MYSQL::Query(\"SELECT * FROM\".\" \".$this->databaseUsersTable.\" \".\"WHERE user_mail='$user_mail'\");\n\t $result_user_name=CLS_MYSQL::GetResultValue($query,0,'user_name');\n\t\t//$uid==CLS_MYSQL::GetResultValue($query,0,'uid');\n\t\t//var_dump($uid);\n\tif($uid==CLS_MYSQL::GetResultValue($query,0,'uid')) $this->display('device id already exist');\n elseif((strlen($user_name)<6) or (strlen($user_name)>16)) $this->display('Entered username length must be of 6 to 16 characters');\n //elseif(CLS_MYSQL::GetResultNumber($query)) $this->display('Entered username already exists in the database');\n elseif((strlen($user_pass)<6) or (strlen($user_pass)>16)) $this->display('Entered password length must be of 8 to 16 characters');\n //elseif($user_pass!=$user_confirm_pass) $this->getMessage('Passwords entered do not match.');\n // elseif(CLS_MYSQL::GetResultNumber($result_user_mail)) $this->display('Entered email already exists in the database.');\n // elseif($user_mail!=$user_confirm_mail) $this->getMessage('Email addresses entered do not match.');\n elseif(!preg_match(\"/^([a-zA-Z0-9_\\.\\-])+\\@(([a-zA-Z0-9\\-]{4,})+\\.)+([a-zA-Z0-9]{2,})+$/\", $user_mail)) $this->display('Email address entered is not valid');\n else\n {\n if(CLS_MYSQL::Execute(\"INSERT INTO\".\" \".$this->databaseUsersTable.\" \".\"(user_name, user_pass, user_mail) VALUES ('$user_name', '$user_crypted_pass', '$user_mail')\")) \n$insert_id=mysql_insert_id();\nCLS_MYSQL::Execute(\"INSERT INTO user_devices (user_id, mobile, offset, uid, alias) VALUES ('$insert_id','$mobile','$offset','$uid','$alias')\");\n$Email = New VTSMail();\n$Email-> setName($user_name); //To name\n$Email-> setMail($user_mail); //To e-mail\n$Email-> setSubject(\"Registration\"); //Subject\n$Email-> setMessage(\"VTS Registration Successful \\n username:$user_name \\n password:$user_pass\");\n$Email-> sendMail();\n $this->display('Registration was successful');\n }\n }","title":""},{"docid":"400c794a624b8481ad6e41d5a220e839","score":"0.6531041","text":"public function action_register()\n\t{\n\t\tif ( ! in_array('admin', Session::instance()->get('user_roles')))\n\t\t{\n\t\t\t$this->request->redirect(Route::get('admin')->uri(array('action' => 'notowner')));\n\t\t}\n\n\t\t$this->template->content = View::factory('admin/user/register')\n\t\t\t->bind('post', $post)\n\t\t\t->bind('errors', $errors);\n\t\t$this->template->content->title = 'User management > Register new user';\n\t\t\n\t\t$user = ORM::factory('user');\n\t\tif ( ! empty($_POST))\n\t\t{\n\t\t\t// get post values, load into object and check validation\n\t\t\t$post = $_POST;\n\t\t\t$user->values($post);\n\t\t\tif ($user->check() AND $user->save())\n\t\t\t{\n\t\t\t\t// add the basic login role\n\t\t\t\t$user->add('roles', ORM::factory('role', array('name' => 'login')));\n\n\t\t\t\t$details = $user->details;\n\t\t\t\tarr::unshift($post, 'user_id', $user->id);\n\t\t\t\t$details->values($post);\n\t\t\t\tif ($details->check() AND $details->save())\n\t\t\t\t{\n\t\t\t\t\t//cookie::set('message', 'Updated user '.$user->username);\n\t\t\t\t\t// save and redirect to index\n\t\t\t\t\t$this->request->redirect(Route::get('admin')->uri(array('controller' => 'users')));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$errors = $details->validate()->errors('admin_errors'); \n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// get errors to show in form\n\t\t\t\t$errors = $user->validate()->errors('admin_errors'); \n\t\t\t}\n\t\t}\n\t\t// shuffle up values for form\n\t\t$post = $user->as_array();\n\t\tarr::unshift($post, 'password_confirm', NULL);\n\t\tarr::unshift($post, 'first_name', NULL);\n\t\tarr::unshift($post, 'last_name', NULL);\n\t}","title":""},{"docid":"bb3a6f05dd376dbfbffd101b63c4921e","score":"0.6525235","text":"private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Empty Username\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Empty Password\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Password and password repeat are not the same\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Password has a minimum length of 6 characters\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Username cannot be shorter than 2 or longer than 64 characters\";\n } elseif (!preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])) {\n $this->errors[] = \"Username does not fit the name scheme: only a-Z and numbers are allowed, 2 to 64 characters\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && preg_match('/^[a-z\\d]{2,64}$/i', $_POST['user_name'])\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user already exists\n $sql = \"SELECT * FROM users WHERE user_name = '\" . $user_name . \"';\";\n $query_check_user_name = $this->db_connection->query($sql);\n\n if ($query_check_user_name->num_rows == 1) {\n $this->errors[] = \"Sorry, that username is already taken.\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_password_hash)\n VALUES('\" . $user_name . \"', '\" . $user_password_hash . \"');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"Your account has been created successfully. You can now log in.\";\n } else {\n $this->errors[] = \"Sorry, your registration failed. Please go back and try again.\";\n }\n }\n } else {\n $this->errors[] = \"Sorry, no database connection.\";\n }\n } else {\n $this->errors[] = \"An unknown error occurred.\";\n }\n }","title":""},{"docid":"4a423dd3e590832e7de9ae9c8254090a","score":"0.65178657","text":"function register($login, $pass, $realName)\n{\n\t//generates pseudo random bytes worth 10 characters long\n\t//and sets $strong to true if the salt is strong enough\n\t//the is diferent(ish) for each user. the hash of password along with the salt is stored\n\t//in the roles table. This helps securing the data better.\n\t\t\n// \t$bytes = openssl_random_pseudo_bytes(10, $strong);\n// \t$salt = bin2hex($bytes); // convert to hex\n\n\t//unfortunately openssl is not supported (i have to install it)\n\t//so I will be generating random numbers and converting them to hex\n\t\n\t$r = mt_rand() * mt_rand();//long int\n\t$salt = dechex($r) ; // convert to hex\n\t\n\t$hash = getHash($pass, $salt);//get the hash of password and salt appended\n\t\n\ttry{\n\t\t$login = mysql_real_escape_string($login);\n\t\t\n\t\t$DBH = openConnection();\n\t\t$DBH->beginTransaction();\n\t\n\t\t$query = \"insert into Roles (user_name, client, admin, realName) values (?,?,?,?)\";\n\t\t$stmt = $DBH->prepare($query);\n\t\t$stmt->bindValue(1, $login);\n\t\t$stmt->bindValue(2, true);//client\n\t\t$stmt->bindValue(3, false);\n\t\t$stmt->bindValue(4, mysql_real_escape_string($realName));\n\t\n\t\t$stmt->execute();\n\t\t\n\t\t\n\t\t$query = \"insert into Users (user_name, password, salt) values (?,?,?)\";\n\t\t$stmt = $stmt = $DBH->prepare($query);\n\t\t$stmt->bindValue(1, $login);\n\t\t$stmt->bindValue(2, $hash);\n\t\t$stmt->bindValue(3, $salt);\t\t\n\t\t$stmt->execute();\n\t\t\n\t\t$DBH->commit();\n\t\treturn true;\n\t}\n\t\tcatch (PDOException $e) {\n\t\treturn false;\n\t}\n}","title":""},{"docid":"92ef72cf25b298ec982fb2f308669a0b","score":"0.651625","text":"function newuser_init() {\n\t\t$username = $_POST['userName'];\n\t\t$password = $_POST['passUser'];\n\t\t$email = $_POST['email'];\n\t\t$nombre = $_POST['completeName'];\n\n\t\t$userdata = array(\n\t\t 'user_login' => $username,\n\t\t 'user_pass' => $password,\n\t\t 'user_email' => $email,\n\t\t 'user_nicename' => $nombre\n\t\t);\n\n\t\t// Insertar Usuario en DB\n\t\t$user_id = wp_insert_user( $userdata ) ;\n\n\t\t//On success\n\t\tif ( ! is_wp_error( $user_id ) ) {\n\t\t\techo \"Felicidades ya estas Registrado\";\n\t\t die();\n\t\t} else{\n\t\t echo \"El Usuario Ya Estaba Registrado\";\n\t\t\tdie();\n\t\t}\n\t}","title":""},{"docid":"42dfdbdbd231f72770d2e631c8c76f07","score":"0.6515607","text":"public function registerNewUser() {\n\t\t$this->form_validation->set_rules('first_name','first_name','required');\n\t\tif($this->form_validation->run() == FALSE) {\n\t\t\t$this->index();\n\t\t\treturn;\n\t\t}\n\t\t$registerData\t= $this->frontend->getInput();\n\t\t$insertQuery\t= $this->backend->dbBI->insert_string('md_user',$registerData);\n\t\t$insertQuery\t= str_replace('INSERT INTO','INSERT IGNORE INTO',$insertQuery);\n\t\t$this->backend->dbBI->query($insertQuery);\n\t\tredirect($this->mainURL);\n\t\treturn;\n\t}","title":""},{"docid":"86a9e16b1b483f7a564352ed0521c9cb","score":"0.6511482","text":"public function login() {\n $res = json_decode(\"{}\");\n \n $inputs = $this->validate_login();\n $user = $this->User_model->login($inputs);\n if ($user) { \n if ($user['password'] != md5($inputs['password'])) {\n return_data(false, 'Wrong password',$res);\n }\n if ($user['status'] == 1) {\n return_data(false, 'Your account is disabled', $res);\n } else if ($user['status'] == 2) {\n return_data(false, 'Your account has been deleted.', $res);\n } else {\n $this->User_model->blank_device_token($inputs['device_token']);\n $this->User_model->updt_device_token_type($inputs['email'], $inputs['device_token'], $inputs['device_type']);\n $user = $this->User_model->user_profile($user['id']);\n return_data(true, 'User authentication successful.', $user);\n }\n } else {\n return_data(false, 'User authentication failed.', $res); \n }\n }","title":""},{"docid":"22eb3337a709bc3e01b3a31fadf5aeec","score":"0.65037626","text":"function register()\n{\n\t\tglobal $PSALT;\t\n\n\t\tif($this->Session->check('User'))\n\t\t{\n\t\t\t//we already are logged in, so you can't be here\n\t\t\t$userinfo['User'] = $this->Session->read('User');\n\t\t\t\n\t\t\tif( $userinfo['User']['role'] == \"admin\" )\n\t\t\t{\n\t\t\t\t//$this->Session->write('Admin', $userinfo['User']);\n\t\t\t\t$this->redirect(array('controller' => 'users', 'action' => 'admin_home'));\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse if ($userinfo['User']['role'] == 'teacher' )\n\t\t\t{\n\t\t\t\t//Coder\n\t\t\t\t//$this->Session->write('teacher', $userinfo['User']);\n\t\t\t\t$this->redirect(array('controller' => 'teachers', 'action' => 'contentProfile'));\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//we are a student\n\t\t\t}\n\t\t}\n\n\t\t$this->layout = \"front_default\";\n\t\t\n\t\t$this->set(\"title_for_layout\", 'Teacher registration - LessonShark');\n\t\t \n\t\tApp::import('Model','User');\n\t\t$this->User = & new User();\n\t\t//App::import('Model','Profile');\n\t\t//$this->Profile = & new Profile();\n\t\t\n\t\t//used to start validation rule setup\n\t\t$this->User->set( $this->data['User'] );\n\t\t$this->User->Profile->set( $this->data['Profile'] );\n\t\t\n\t\tif( !empty( $this->data ) ) \n\t\t{\n\n\t\t\t// Transform ZIP\n\t\t\t$profileData = $this->User->Profile->zipToCity($this->data['Profile']['zip']);\n\t\t\tif ($profileData)\n\t\t\t{\n\t\t\t\t$this->data['Profile']['city'] = $profileData['city'];\n\t\t\t\t$this->data['Profile']['state_id'] = $profileData['state_id'];\n\t\t\t}\n\t\t\n\t\t\tif ($this->User->validates(array('fieldList' => array('password','cpassword','firstname','lastname','email'))) && $this->User->Profile->validates(array('fieldList' => array('zip'))) )\n\t\t\t//if($this->User->saveAll($this->data, array(\"validate\" => 'first')))\n\t\t\t{\n\t\t\t\t//updates\n\t\t\t\t$this->data['User']['password'] = md5($this->data['User']['email'].$this->data['User']['password'].$PSALT);\n\t\t\t\t$this->data['User']['cpassword'] = $this->data['User']['password'];\n\t\t\t\t$this->data['User']['role'] = 'teacher';\n\t\t\t\t\n\t\t\t\tif($this->User->saveAll($this->data, array(\"validate\" => false)))\n\t\t\t\t{\n\t\t\t\t\t//need to auto login here and set session\t\t\t\t\t\n\t\t\t\t\t$this->Session->destroy();\n\t\t\t\t\t\n\t\t\t\t\t$userinfo = $this->User->findByEmail($this->data['User']['email']);\n\t\t\t\t\t\n\t\t\t\t\t$this->Session->write('User', $userinfo['User']);\n\t\n\t\t\t\t\t//create a profile for this user\n\t\t\t\t\t#$profiles['Profile']['user_id'] = $userinfo['User']['id'];\n\t\t\t\t\t\n\t\t\t\t\t#if($this->User->Profile->save($profiles,false))\n\t\t\t\t\t#{\t\t\n\t\t\t\t\t#}\n\t\n\t\t\t\t\t$this->redirect(array('controller' => 'teachers', 'action' => 'contentProfile'));\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\t//apparently this code isn't necessary, as validate => 'only' works to handle this\n\t\t\t\t$errors = $this->User->invalidFields(array('fieldList' => array('password','cpassword','firstname','lastname','email')));\n\t\t\t\t$this->User->set('errors',$errors);\n\t\t\t\t\t\t\t\t\n\t\t\t\t$errorsProfile = $this->User->Profile->invalidFields(array('fieldList' => array('zip')));\n\t\t\t\t$this->User->Profile->set('errors',$errors);\n\t\t\t}//END: Else IF\n\n\t\t}//End: DATA check\n\t}","title":""},{"docid":"17fe9d0aa7b49b43e37553d1144c3ee2","score":"0.6496213","text":"function registerUser() {\n global $con, $name, $username, $password, $email, $gender, $phone, $dob, $location, $type, $type_id, $otp, $otp_verified;\n $statement = mysqli_prepare($con, \"INSERT INTO user (name, username, password, email, gender, phone, location, dob, type, type_id, otp, otp_verified) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n mysqli_stmt_bind_param($statement, \"sssssisssisi\", $name, $username, $password, $email, $gender, $phone, $location, $dob, $type, $type_id, $otp, $otp_verified);\n mysqli_stmt_execute($statement);\n mysqli_stmt_close($statement); \n }","title":""},{"docid":"ad6ab82511bf372890cb06626e848b60","score":"0.64959526","text":"function login($oUser) {\n }","title":""},{"docid":"a9787bc375bbb829091c2914460d766f","score":"0.64949864","text":"public function do_add_user(){\n\t\t$arr = array(\n\t\t\t'fullname' => $_POST['fullname'],\n\t\t\t'email' => $_POST['email'],\n\t\t\t'password' => md5($_POST['password']),\n\t\t\t'role' => 2\n\t\t);\n\t\t$res = $this->Management->add_user($arr);\n\t\tif($res == 1){\n\t\t\tredirect('Welcome/users','refresh');\n\t\t}\n\t\telse{\n\t\t\tredirect('Welcome/add_user','refresh');\n\t\t}\n\t}","title":""},{"docid":"ab6ba8f2787076df55d7d875fbd8fe13","score":"0.64816636","text":"public function doRegistr() {\n \t$validator = Validator::make(Input::all(), User::$rules);\n \t\t\n \t\tif ($validator->passes()) {\n \t\t\t$user = new User;\n\n\t\t $user->name = Input::get('name');\n\t\t $user->email = Input::get('email');\n\t\t $user->phone = Input::get('phone');\n\t\t $user->city = Input::get('city');\n\t\t $user->password = Hash::make(Input::get('password'));\n\t\t $user->save();\n \t\t\n \t\t return Redirect::route('login-link')\n \t\t \t->with('message', 'Thanks for registering!');\n \n \t} else {\n \t\treturn Redirect::route('registr')\n \t\t\t->with('message', 'The following errors occurred')\n\t \t\t->withErrors($validator)\n\t \t\t->withInput(); \n \t} \n\t}","title":""},{"docid":"daa6e2193619a63a1650f95eba91b4b7","score":"0.64798045","text":"function register($username, $password, $repassword, $email , $auth = false){\n\t\n}","title":""},{"docid":"9aaad632346fe92dc971e7f1947d4c29","score":"0.6478739","text":"protected function registerUser($data)\n\t {\n //user array\n\t \t $user=array(\n\t \t \t 'username'=>$data[0]['value'],\n\t \t \t 'email'=>$data[1]['value'],\n\t \t \t 'password'=>password_hash($data[2]['value'],PASSWORD_DEFAULT),\n\t \t \t 'token'=>$data[4]['value']\n\t \t );\n \n //messages array\n $message=array();\n\n\t \t //sql query \n\t \t $sql=\"insert into users (username,email,password) values('\".$user['username'].\"','\".$user['email'].\"','\".$user['password'].\"')\";\n\n\t \t //sql to check already registered or not\n\t \t $sql_to_check_alredy_registered_or_not='select email from users where email=\"'.$user['email'].'\"';\n\n\t \t //query the data into the database\n\t \t $conn=$this->getConnection();\n\n\t \t //check the user already existed !\n\n\t \t if($conn->query($sql_to_check_alredy_registered_or_not)->num_rows>0)\n\t \t {\n\t \t \t \n\t\t\t \t \t //push the messages into message array\n\n\t\t\t \t \t array_push($message,array(\n\t\t\t \t \t \t 'message'=>'User already existed !',\n\t\t\t \t \t \t 'redirect'=>false\n\t\t\t \t \t ));\n\t \t }else{\n\t \t \t //if not created users !\n\t \t \t if($conn->query($sql)==TRUE)\n\t\t\t \t {\n\t\t\t \t \t //get the inserted auto user id from the user table\n\t\t\t \t $user_id=mysqli_insert_id($conn);\n\n //set the user name and passwor and token into session\n $_SESSION['username']=$user['username'];\n $_SESSION['user_id']=$user_id;\n\t\t\t \t \t $_SESSION['email']=$user['email'];\n\t\t\t \t \t $_SESSION['password']=$user['password'];\n\t\t\t \t \t $_SESSION['token']=$user['token'];\n\n\t\t\t \t \t //sql the to update the suer\n\t\t\t \t \t $sql_to_update_online=\"update users set online='1' where id='\".$user_id.\"'\";\n\n\t\t\t \t \t $conn->query($sql_to_update_online);\n\n\t\t\t \t \t //push the messages into message array\n\n\t\t\t \t \t array_push($message,array(\n\t\t\t \t \t \t 'message'=>'Successfully registered !',\n\t\t\t \t \t \t 'redirect'=>true,\n\t\t\t \t \t \t 'token'=>$_SESSION['token']\n\t\t\t \t \t ));\n\n\n\t\t\t \t }else{\n\t\t\t \t \t \n\t\t\t \t \t //push the messages into message array\n\n\t\t\t \t \t array_push($message,array(\n\t\t\t \t \t \t 'message'=>'Error Creating !',\n\t\t\t \t \t \t 'redirect'=>false\n\t\t\t \t \t ));\n\t\t\t \t }\n\t \t }\n //return json message\n\t \t echo json_encode($message);\n\n\t \t \n\t }","title":""}],"string":"[\n {\n \"docid\": \"ac663c28d060996ad5dffd435b0defa5\",\n \"score\": \"0.7721084\",\n \"text\": \"public function registerUser();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1dda688b5a0b4df0b171bffb0d0a8ded\",\n \"score\": \"0.71939015\",\n \"text\": \"function register()\\n\\t{\\n\\t\\tif($this->data)\\n\\t\\t{\\n\\t\\t\\tif(!$this->isFree($this->data['User']['name'], true))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->Session->setFlash('Username \\\"' . $this->data['User']['name'] . '\\\" is already in use.');\\n\\t\\t\\t\\tunset($this->data['User']['password']);\\n\\t\\t\\t\\tunset($this->data['User']['password2']);\\n\\t\\t\\t\\t$this->redirect('/menus');\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\telse if($this->data['User']['password'] == \\n\\t\\t\\t\\t\\t$this->Auth->password($this->data['User']['password2']))\\n\\t\\t\\t{\\n\\t\\t\\t\\tif($this->User->save($this->data))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$this->Auth->login();\\n\\t\\t\\t\\t\\t$this->redirect('/menus/registration_successful');\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->setFlash('You did not enter the same password twice.');\\n\\t\\t\\t\\tunset($this->data['User']['password']);\\n\\t\\t\\t\\tunset($this->data['User']['password2']);\\n\\t\\t\\t\\t$this->redirect('/menus');\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t$this->redirect('/menus');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"472a13314c1dcffb2596a036a8c13769\",\n \"score\": \"0.71858066\",\n \"text\": \"public function saveLoginUser(){\\n \\n return $this->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a601408a7370d1709fe10c557775fac1\",\n \"score\": \"0.71441734\",\n \"text\": \"function regist_user(){\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12b92406c78bbe81f9af7870dc9b4c02\",\n \"score\": \"0.7116995\",\n \"text\": \"public function register()\\n\\t{\\n\\t\\t$user = new User;\\n\\n\\t\\t$user->email = $this->email;\\n\\t\\t$user->username = $this->email;\\n\\t\\t$user->password = hash('sha256', $this->password);\\n\\t\\t$user->type = 'native';\\n\\t\\t$user->last_login_time = date('Y-m-d h:i:s');\\n\\t\\t$user->create_time = date('Y-m-d h:i:s');\\n\\n\\t\\t//create initial auth role for new user\\n\\t\\t$auth = Yii::app()->authManager;\\n\\n\\t\\tif($user->save() && $auth->assign('Authenticated', $user->id))\\n\\t\\t{\\n\\t\\t\\treturn true;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10b51d96995e16c8c10fc30d54881ce7\",\n \"score\": \"0.70912397\",\n \"text\": \"public function register()\\n\\t{\\n\\t\\tif($this->_identity===null)\\n\\t\\t{\\n\\t\\t\\t$this->_identity=new UserIdentity($this->username,$this->password);\\n\\t\\t\\t$this->_identity->authenticate();\\n\\t\\t}\\n\\t\\tif($this->_identity->errorCode===UserIdentity::ERROR_NONE)\\n\\t\\t{\\n\\t\\t\\t$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days\\n\\t\\t\\tYii::app()->user->login($this->_identity,$duration);\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\t\\telse\\n\\t\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"507abdf34b2cdd94bcff6a9a22668e79\",\n \"score\": \"0.7082455\",\n \"text\": \"public function registration()\\n {\\n $user = new User();\\n $user->username = $this->username;\\n $user->email = $this->email;\\n $user->password = md5(trim($this->password));\\n\\n if ($user->save()) {\\n $_identity = new UserIdentity($this->username, $this->password);\\n if ($_identity->authenticate()) {\\n $duration = 3600*24*30; // 30 days\\n Yii::app()->user->login($_identity, $duration);\\n return true;\\n } else {\\n $this->addError('password', 'Неожиданная ошибка связанная с аутентификацией нового пользователя.');\\n return false;\\n }\\n\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e6be5917efd35567a20ef1a8a4ef811\",\n \"score\": \"0.70700294\",\n \"text\": \"public function register()\\n {\\n $validate = new UserFormValidator();\\n if ($this->isLoggedIn()) { \\n $this->redirect('');\\n }\\n\\n $user = new User($this->db);\\n if ($_SERVER['REQUEST_METHOD'] == 'POST') { \\n\\n if (!$validate->validate($_POST)) {\\n $data = $validate->getErrors();\\n return $this->render(\\\"users/register\\\", $data);\\n } \\n\\n //bind form data to PDO object\\n $userDTO = $this->dataBinder->bind($_POST, UserDTO::class);\\n\\n if ($user->findByEmail($userDTO->getEmail()) !== null) {\\n flash('register_error', 'the user is exist already');\\n return $this->render(\\\"users/register\\\");\\n }\\n\\n //encrypt Password\\n $password = $userDTO->getPassword();\\n $passwordHash = password_hash($password, PASSWORD_DEFAULT);\\n $userDTO->setPassword($passwordHash);\\n $data = $user->create($userDTO);\\n flash('register_success', 'You are now registered and can log in'); \\n $this->render(\\\"users/login\\\", $data);\\n\\n } else {\\n return $this->render(\\\"users/register\\\");\\n\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73c983777aed0c5cfc4fa1243314b854\",\n \"score\": \"0.70482\",\n \"text\": \"public function register(){\\n\\t\\tif($_POST == ' ' && $_POST['fullName'] == ' ' && $_POST['userEmail'] == ' ' && $_POST['password'] == ' '){\\n\\n\\t\\t\\t$this->register();\\n\\n\\t\\t}else{\\n $name = ucwords(strtolower($_POST['fullName']));\\n $email = $_POST['userEmail'];\\n $password = $_POST['password'];\\n\\n $pass = getHashedPassword($password);\\n\\n $result = $this->umodel->getWhere('users', 'EmailId', $email);\\n if($result){\\n \\t\\n echo \\\"Email Already Exist\\\";\\n\\n }else{\\n\\t \\t$data = array(\\n\\t \\t\\\"FullName\\\" => $name,\\n\\t \\t\\\"EmailId\\\" => $email,\\n\\t \\t\\\"Password\\\" => $pass,\\n\\t \\t\\\"Created_at\\\" => date(\\\"Y-m-d\\\"),\\n\\t \\t\\\"roleId\\\" => 4\\n\\t );\\n\\n\\t $recordId = $this->umodel->registerUser(\\\"users\\\",$data);\\n\\n\\t if($recordId > 0){\\n\\t \\techo \\\"User registration successfull\\\";\\n\\t \\t\\n\\t }else{\\n\\n\\t \\techo \\\"Somthing Wrong! Please try again\\\";\\n\\t }\\n \\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e8e940fbb9582373a2cd41a344f6665\",\n \"score\": \"0.70385236\",\n \"text\": \"public function register()\\n {\\n $data = $this->validate($this->request, [\\n 'required' => ['username', 'password', 'password_confirmation'],\\n 'equals' => [\\n ['password', 'password_confirmation']\\n ]\\n ]);\\n\\n $query = app('db')->prepare(\\\"SELECT id FROM users WHERE `username` = ?\\\");\\n $query->execute([\\n $data['username'],\\n ]);\\n\\n if ($query->rowCount() > 0) {\\n app('session')->getFlashBag()->add('errors', ['username' => ['Username already in use.']]);\\n Redirect::back();\\n }\\n\\n $query = app('db')->prepare(\\\"INSERT INTO users (username, password) VALUES (?, ?)\\\");\\n $query->execute([\\n $data['username'],\\n password_hash($data['password'], PASSWORD_BCRYPT),\\n ]);\\n\\n $auth = app('auth');\\n\\n $auth->setUser(app('db')->lastInsertId('id'));\\n\\n if ($auth->check()) {\\n Redirect::to('/');\\n }\\n\\n Redirect::back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23a2e090eb8321eb39bf72b4980622ab\",\n \"score\": \"0.7035782\",\n \"text\": \"public function registerUser() {\\n\\t\\t\\n\\t\\t$configRArray = $this -> CI -> config -> item('registerCheck');\\n\\t\\t\\n\\t\\t$this -> error = FALSE;\\n\\t\\t\\n\\t\\t// Check if somthing empty\\n\\t\\tforeach( $configRArray as $field ) {\\n\\t\\t\\t\\n\\t\\t\\t$checkEmpty = trim( $this -> userData[$field] );\\n\\n\\t\\t\\tif( empty( $checkEmpty ) ) {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$this -> errorData['error_'.$field] = 'U hebt '. $field .' niet ingevuld!
    ';\\n\\t\\t\\t\\t$this -> error = TRUE;\\n\\t\\t\\t}\\t\\t\\t\\n\\t\\t}\\n\\t\\t\\n\\t\\t// Check the passwords\\n\\t\\tif( $this -> error == FALSE ) {\\n\\n\\t\\t\\tif( !$this -> checkPassword() ) {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$this -> error = TRUE;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\t// Check e-mail\\n\\t\\tif( $this -> error == FALSE ) {\\n\\t\\t\\t\\n\\t\\t\\tif( $this -> error_email_adress ) {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$this -> error = TRUE;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\t// Make the user in the database\\n\\t\\tif( $this -> error == FALSE ) {\\n\\n\\t\\t\\t$configDbArray = $this -> CI -> config -> item('registerDb');\\n\\t\\t\\t\\n\\t\\t\\tforeach( $configDbArray as $fieldName => $dbName ) {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$dbArray[$dbName] = addslashes( $this -> userData[$fieldName] );\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\tif( !$this -> CI -> mbInsert -> user($dbArray) ) {\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$this -> errorData['error_database'] = 'De gebruiker kon niet worden aangemaakt in de database.
    ';\\n\\t\\t\\t\\t$this -> error = TRUE;\\n\\t\\t\\t\\t\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e3a1ac8887188f14ec79df88471a6b3\",\n \"score\": \"0.7007235\",\n \"text\": \"public function register() {\\n $user_service = new UserService($this->cnx);\\n echo $user_service->registerUser([\\n \\\"device_id\\\" => $_POST[\\\"device_id\\\"],\\n \\\"user_type\\\" => $_POST[\\\"user_type\\\"],\\n \\\"first_name\\\" => $_POST[\\\"first_name\\\"],\\n \\\"last_name\\\" => $_POST[\\\"last_name\\\"],\\n \\\"email\\\" => $_POST[\\\"email\\\"],\\n \\\"password\\\" => $_POST[\\\"password\\\"],\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54b0a4bef209be24bfaf15b8f2cb6528\",\n \"score\": \"0.7003736\",\n \"text\": \"public function register()\\n {\\n $user = $this->Users->newEntity($this->request->data);\\n\\n if ($this->request->is('post'))\\n {\\n if ($this->Users->save($user))\\n {\\n // $firstName = $user->first_name;\\n // $lastName = $user->last_name;\\n // $fullName = $firstname.\\\" \\\".$lastName;\\n // $this->set('fullNam1e', $fullName);\\n // echo $firstName;\\n // echo $lastName;\\n\\n //$query = \\\"CREATE TABLE log_\\\".$firstName.\\\"_\\\".$lastName.\\\"\\\";\\n\\n $this->redirect(['action' => 'login']);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d8a003d09df694229c36fad246647dc2\",\n \"score\": \"0.69997025\",\n \"text\": \"function register_user(){\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a8a5b5db71e6a7a82420a8faa11b0d6\",\n \"score\": \"0.69893837\",\n \"text\": \"public function register()\\n {\\n if ($this->validate()) {\\n if ($this && $this->save(false)) {\\n Yii::$app->getResponse()->redirect('login');\\n } else {\\n // Yii::$app->getResponse()->redirect('login');\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15459baf157f5a3c785874a86606228a\",\n \"score\": \"0.69890964\",\n \"text\": \"public function registerNewUser() {\\n\\t\\t// check if user name already exists.\\n\\t\\t//checkNewUserName()\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7738d43043de665e2c02c8ae49ceec22\",\n \"score\": \"0.6948986\",\n \"text\": \"public function register()\\r\\n {\\r\\n\\r\\n\\r\\n $conn = DB::Connection();\\r\\n $statement = $conn->prepare('INSERT INTO user (email, username, password) values (:email, :username, :password)');\\r\\n $email = $this->getEmail();\\r\\n $username = $this->getUsername();\\r\\n $password = $this->getPassword();\\r\\n //$confirm_password = $this->getConfirm_password();\\r\\n\\r\\n\\r\\n $statement->bindvalue(\\\":email\\\", $email);\\r\\n $statement->bindvalue(\\\":username\\\", $username);\\r\\n $statement->bindvalue(\\\":password\\\", $password);\\r\\n\\r\\n $statement->execute();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ff0eb1fa0ee9e63499e619a1d503dee\",\n \"score\": \"0.6936899\",\n \"text\": \"public function register() {\\n if (empty($_POST)) header('location: ' . URL . 'error?not-post');\\n \\n $params = $_POST;\\n $User = new User();\\n \\n $insert = $User->insert([\\n 'password' => $params['password'],\\n 'fullname' => $params['fullname'],\\n 'email' => $params['email'],\\n 'gender' => $params['gender'],\\n 'security_question_id' => $params['question'],\\n 'answer' => $params['answer']\\n ]);\\n \\n if ($insert) {\\n Auth::setUserId($insert);\\n Auth::setAuthenticated(TRUE);\\n \\n header('location: ' . URL);\\n } else {\\n header('location: ' . URL . 'error');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15c13e7eb07caf7adf1fd773ca2d8020\",\n \"score\": \"0.6935893\",\n \"text\": \"public function register()\\n {\\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\\n\\n // Curatarea datelor venite prin POST\\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\\n\\n // Init data\\n $data = [\\n 'username' => trim($_POST['username']),\\n 'email' => trim($_POST['email']),\\n 'password' => trim($_POST['password']),\\n 'confirmPassword' => trim($_POST['confirmPassword']),\\n 'usernameError' => '',\\n 'emailError' => '',\\n 'passwordError' => '',\\n 'confirmPasswordError' => ''\\n ];\\n\\n // Validare Email\\n if (empty($data['email'])) {\\n $data['emailError'] = 'Pleae enter email';\\n } else {\\n // Check email\\n if ($this->userModel->findUserByEmail($data['email'])) {\\n $data['emailError'] = 'Email is already taken';\\n }\\n }\\n\\n // Validare username\\n if (empty($data['username'])) {\\n $data['usernameError'] = 'Pleae enter name';\\n }\\n\\n // Validare parola\\n if (empty($data['password'])) {\\n $data['passwordError'] = 'Please enter password';\\n } elseif (strlen($data['password']) < 6) {\\n $data['passwordError'] = 'Password must be at least 6 characters';\\n }\\n\\n // Validare confirmare parola\\n if (empty($data['confirmPassword'])) {\\n $data['confirmPasswordError'] = 'Please confirm password';\\n } else {\\n if ($data['password'] != $data['confirmPassword']) {\\n $data['confirmPasswordError'] = 'Passwords do not match';\\n }\\n }\\n\\n // Ne asiguram ca erorile sunt goale\\n if (empty($data['emailError']) && empty($data['usernameError']) && empty($data['passwordError']) && empty($data['confirmPasswordError'])) {\\n\\n // Hash parola\\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\\n\\n // Register utilizator\\n if ($this->userModel->register($data)) {\\n flash('register_success', 'You are registered and can log in');\\n redirect('users/login');\\n } else {\\n die('Something went wrong');\\n }\\n\\n } else {\\n // Incarcare Views cu erori\\n $this->view('users/register', $data);\\n }\\n\\n } else {\\n // Init data\\n $data = [\\n 'username' => '',\\n 'email' => '',\\n 'password' => '',\\n 'confirmPassword' => '',\\n 'usernameError' => '',\\n 'emailError' => '',\\n 'passwordError' => '',\\n 'confirmPasswordError' => ''\\n ];\\n\\n // Load view\\n $this->view('users/register', $data);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4155e281962eabceb76392d4bb0b69f\",\n \"score\": \"0.69352055\",\n \"text\": \"public function registerUser() {\\n $username = basename(FILTER::get('REQUEST', 'user'));\\n $nickname = basename(FILTER::get('REQUEST', 'nick'));\\n if (!$this->checkUserName($username, 'Name')) {\\n throw new Exception('Invalid user');\\n }\\n if (!$this->checkUserName($nickname, 'Nick')) {\\n throw new Exception('Invalid nick');\\n }\\n if (!$this->checkPassword(FILTER::get('REQUEST', 'password'), FILTER::get('REQUEST', 'confirm'))) {\\n throw new Exception('Invalid password');\\n }\\n if (file_exists(USERS.$username)) {\\n throw new Exception('User with this username already exists');\\n }\\n $email = FILTER::get('REQUEST', 'email');\\n if (!CMS::call('FILTER')->validEmail($email)) {\\n throw new Exception('Invalid email');\\n }\\n global $LANG;\\n $userdata = FILTER::get('REQUEST', 'fields');\\n #\\n # Also we must set a md5 hash of user's password to userdata\\n #\\n $user['user'] = $username;\\n $user['nick'] = $nickname;\\n $user['password'] = md5(FILTER::get('REQUEST', 'password'));\\n $user['email'] = $email;\\n #\\n # Parse some system fields.\\n #\\n $user['tz'] = $userdata['tz'];\\n $user['access'] = 1;\\n $user['rights'] = '';\\n $user['status'] = '';\\n $user['stars'] = 0;\\n $user['regdate'] = time();\\n $user['visits'] = 1;\\n $user['lastvisit'] = $user['regdate'];\\n $user['posts'] = 0;\\n $user['comments'] = 0;\\n $user['topics'] = 0;\\n $user['replies'] = 0;\\n $user['blocked'] = 0;\\n $user['website'] = $userdata['website'];\\n $user['country'] = $userdata['country'];\\n $user['city'] = $userdata['city'];\\n $user['last_prr'] = 0;\\n if (self::saveUserData($username, $user)) {\\n CMS::call('LOG')->logPut('Note', self::$user['user'], 'Registation');\\n #\\n # Create user's PM file\\n #\\n return file_put_contents(PM_DATA.$username, json_encode(['inbox' => [], 'outbox' => []], JSON_UNESCAPED_UNICODE), LOCK_EX);\\n }\\n CMS::call('LOG')->logError('Cannot save profile '.$username);\\n throw new Exception('Cannot save profile');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c4c3331e3400b7d8caf7880d3f0778a\",\n \"score\": \"0.6929573\",\n \"text\": \"public function newUser($firstname, $gender, $lastname, $username, $email, $zip, $birthdate, $pw, $pw2){\\n \\n $user = new User();\\n $ulregister = new Login();\\n $m = \\\"\\\";\\n \\n if(isset($firstname) && !empty($firstname) && $firstname!=\\\"\\\"){\\n \\n $user->firstname = $firstname;\\n }\\n else{\\n $m .= \\\"Fornavn ikke satt
    \\\";\\n }\\n \\n // Checks for valid input for lastname.\\n if(isset($lastname) && !empty($lastname) && $lastname!=\\\"\\\"){\\n \\n $user->lastname = $lastname;\\n }\\n else{\\n $m .= \\\"Etternavn ikke satt
    \\\";\\n }\\n \\n if(isset($birthdate) && !empty($birthdate) && $birthdate < date(\\\"Y\\\", time())-10 && $birthdate > 1900 ){\\n \\n $user->yearborn = $birthdate;\\n }\\n else{\\n $m .= \\\"Født år ikke satt eller du er for ung.
    \\\"; \\n }\\n \\n if(!$user->usernameExists($username) && $username != \\\"\\\"){\\n \\n $user->username = $username;\\n \\n }\\n else{\\n $m .= \\\"Brukernavn er tomt eller eksisterer fra før
    \\\";\\n }\\n \\n \\n if(!Login::existingEmail($email) && preg_match('/^[a-z0-9&\\\\'\\\\.\\\\-_\\\\+]+@[a-z0-9\\\\-]+\\\\.([a-z0-9\\\\-]+\\\\.)*+[a-z]{2}/is', $email)){\\n \\n $ulregister->email = $email;\\n \\n }\\n else{\\n \\n $m .= \\\"Mailadressen er enten registert eller skrevet feil.
    \\\";\\n }\\n \\n if($gender == 'male' || $gender == 'female'){\\n \\n $user->sex = $gender;\\n }\\n else{\\n $m .= 'Du må velge kjønn!
    ';\\n }\\n \\n if($zip != \\\"\\\" && Location::zipcodeExists($zip)){\\n \\n $user->zipcode = $zip;\\n }\\n else{\\n $m .= \\\"Postnummeret eksister ikke
    \\\";\\n }\\n \\n \\n \\n \\n \\n if($pw == $pw2){\\n \\n if (preg_match(\\\"#.*^(?=.{6,20})(?=.*[a-å])(?=.*[A-Å])(?=.*[0-9]).*$#\\\", $pw)){\\n\\n $ulregister->password = sha1($pw);\\n \\n\\n\\n\\n }\\n else{\\n $m .= \\\"Passordet ditt er for svakt, vennligst bruk minimum 6 tegn, Minimum en stor bokstav og tall
    \\\";\\n }\\n \\n \\n }else{\\n $m .= \\\"Passordene du har skrevet inn stemmer ikke overens.
    \\\";\\n }\\n \\n if($m ==\\\"\\\" && empty($m)){\\n \\n $activtedstring = $ulregister->createaAString($email, $ulregister->password);\\n $ulregister->activatestring = $activtedstring;\\n $user->save();\\n $userid = $user->id;\\n $ulregister->user_id = $userid;\\n\\n $ulregister->save();\\n /*\\n $to = $uregisteremail;\\n $subject = \\\"Ny Bruker i Forbrukermakt.com\\\";\\n $message = \\\"Velkommen som ny bruker hos forbrukermakt.com, for å kunne bruke din konto er du nødt til å aktivere denne, det gjør du \\n på følgende side= http://localhost/aktivering.php?activ={$activtedstring}\\\";\\n $from = \\\"noreply@flowershopfucker.no\\\";\\n $headers = \\\"From:\\\" . $from;\\n mail($to,$subject,$message,$headers);\\n */\\n redirect_to(\\\"/public/activation.php?activ={$activtedstring}\\\");\\n }\\n else{\\n return $m;\\n\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5319fb099f171058e203038d313cfcc5\",\n \"score\": \"0.69065416\",\n \"text\": \"public function addUser($login,$pasword,$email){\\n $response = Database::getDB()->prepare('INSERT INTO personne SET login=:login, password=:password, email=:email,role = 1,isActive=1');\\n $response->execute([':login' => $login, ':password' => password_hash($pasword, PASSWORD_DEFAULT), ':email' => $email]);\\n\\n $response->closeCursor(); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79c3b56a754452570755600843263056\",\n \"score\": \"0.6896515\",\n \"text\": \"public function loginUser() {\\n SessionUtilities::createSession('User', $this->username);\\n /* Added userType */\\n $this->setUsersTypeInSession();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30ae2b89dc2d7918d01d90e64f56dcfb\",\n \"score\": \"0.68913954\",\n \"text\": \"public function register()\\n {\\n $request = Request::createFromGlobals();\\n $email = FormValidator::purify($request->get('email'));\\n $username = FormValidator::purify($request->get('username'));\\n $password = FormValidator::purify($request->get('password'));\\n $passwordConfirm = FormValidator::purify($request->get('password_confirm'));\\n\\n if (!FormValidator::is_alphanum($username)) {\\n $this->session->set('warning', \\\"Votre pseudo n'est pas valide\\\");\\n $this->registerView();\\n\\n } elseif (!FormValidator::is_alphanum($password) || !FormValidator::is_alphanum($passwordConfirm)) {\\n $this->session->set('warning', \\\"Votre mot de passe n'est pas valide\\\");\\n $this->registerView();\\n\\n } elseif (!FormValidator::is_email($email)) {\\n $this->session->set('warning', \\\"Votre email n'est pas valide\\\");\\n $this->registerView();\\n\\n } else {\\n\\n if ($this->loginManager->isMemberExists($username, $email)) {\\n if ($this->loginManager->checkPassword($password, $passwordConfirm)) {\\n\\n $this->loginManager->registerUser($username, $password, $email);\\n $this->formManager->registerTraitment($email, $username);\\n $this->session->set('success', \\\"Votre inscription a bien été prise en compte\\\");\\n $this->login();\\n\\n } else {\\n $this->session->set('warning', \\\"Les mots de passe ne sont pas identiques\\\");\\n $this->registerView();\\n }\\n\\n } else {\\n $this->session->set('warning', \\\"Cet utilisateur existe déjà\\\");\\n $this->registerView();\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7f698eeb0197721cfdff56ab7d06d4d\",\n \"score\": \"0.68760043\",\n \"text\": \"public function registerUser()\\n {\\n $user = new User;\\n\\n if($user->save())\\n {\\n Auth::loginUsingId($user->id);\\n return Redirect::to('account/profile')->with('message','Thanks for register!');\\n }\\n else\\n {\\n return Redirect::to('register')->withErrors($user->errors())->withInput();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4f4537a7aac6681304ed8441c7bc66c\",\n \"score\": \"0.68575156\",\n \"text\": \"public function DoRegister() : void {\\n\\n if (!$this->auth()) {\\n if (\\n isset ($_POST ['email'])\\n && isset ($_POST ['password'])\\n && isset ($_POST ['password2'])\\n && isset ($_POST ['username'])) {\\n try {\\n $validate = new Validation ();\\n $validate->email($_POST ['email']);\\n $validate->userName($_POST ['username']);\\n $validate->password($_POST ['password']);\\n $validate->comparePasswords($_POST ['password'], $_POST ['password2']);\\n\\n $h = new Humphree(Picnic::getInstance());\\n\\n $userID = $h->addUser($_POST ['username'], $_POST ['email'], $_POST ['password']);\\n\\n if ($userID != 0) {\\n unset ($_POST ['email']);\\n unset ($_POST ['password']);\\n unset ($_POST ['password2']);\\n unset ($_POST ['username']);\\n\\n $this->sendActivationEmail($userID);\\n\\n header('Location: ' . BASE . '/Account/RegisterSuccess');\\n } else {\\n $view = new View();\\n\\n if (isset($_SESSION['error'])) {\\n $view->SetData('error', $_SESSION['error']);\\n unset($_SESSION['error']);\\n }\\n\\n $view->SetData('navData', new NavData(NavData::Account));\\n $view->Render('register');\\n }\\n } catch (ValidationException $e) {\\n $_SESSION['error'] = $e->getError();\\n header('Location: ' . BASE . '/Account/Register');\\n }\\n } else {\\n header('Location: ' . BASE . '/Account/Register');\\n }\\n } else {\\n header('Location: ' . BASE . '/Home');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a98c77e90a5ba703e81bfe53f057268\",\n \"score\": \"0.68276244\",\n \"text\": \"public function login()\\n {\\n $validate = new UserFormValidator();\\n if ($this->isLoggedIn()) {\\n $this->redirect('');\\n }\\n\\n if ($_SERVER['REQUEST_METHOD'] == 'POST') { \\n \\n $user = new User($this->db);\\n if (!$validate->validateLoginForm($_POST)) {\\n $data = $validate->getErrors(); \\n return $this->render(\\\"users/login\\\", $data);\\n } \\n $userDTO = $user->findByEmail($_POST['email']);\\n \\n if (null == $userDTO) {\\n flash('register_success','Invalid credentials!', 'alert alert-danger' );\\n return $this->render(\\\"users/login\\\");\\n }\\n\\n $userPasswordHash = $userDTO->getPassword();\\n\\n if (!password_verify($_POST['password'], $userPasswordHash)) {\\n flash('register_success','Invalid password!', 'alert alert-danger' );\\n return $this->render(\\\"users/login\\\");\\n }\\n $this->createUserSession($userDTO); \\n return $this->redirect(\\\"\\\");\\n \\n } else {\\n \\n $this->render(\\\"users/login\\\");\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c92ec3ea591d0c5f9a8c450e04c6f866\",\n \"score\": \"0.6824909\",\n \"text\": \"public function login()\\r\\n\\t{\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b387025e63a4de039552b908ea783b15\",\n \"score\": \"0.68238556\",\n \"text\": \"private function _register()\\n {\\n $this->load->model('LoginModel');\\n $this->LoginModel->register('admin', 'password', 'John', 'Doe');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68021881687d1ba035953e1e541aab8b\",\n \"score\": \"0.68175715\",\n \"text\": \"public function registerAction() {\\n if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])) {\\n try {\\n $currentDate = new \\\\DateTime('NOW');\\n\\n $database = new Connection();\\n $db = $database->openConnection();\\n\\n $sql = \\\"SELECT MAX(id) FROM platform_user\\\";\\n foreach ($db->query($sql) as $row) {}\\n\\n $stm = $db->prepare(\\n \\\"INSERT INTO platform_user (\\n id,\\n username,\\n email,\\n password,\\n roles,\\n first_name,\\n last_name,\\n brief_info,\\n date_of_creation,\\n date_of_change\\n ) VALUES (\\n :id,\\n :username,\\n :email,\\n :password,\\n :roles,\\n :first_name,\\n :last_name,\\n :brief_info,\\n :date_of_creation,\\n :date_of_change\\n )\\\"\\n );\\n $stm->execute([\\n ':id' => (int) $row['max'] + 1,\\n ':username' => $_POST['username'],\\n ':email' => $_POST['email'],\\n ':password' => password_hash($_POST['password'], PASSWORD_BCRYPT),\\n ':roles' => implode(';', ['ROLE_USER']),\\n ':first_name' => $_POST['firstName'],\\n ':last_name' => $_POST['lastName'],\\n ':brief_info' => $_POST['briefInfo'],\\n ':date_of_creation' => $currentDate->format('Y-m-d H:i:s'),\\n ':date_of_change' => $currentDate->format('Y-m-d H:i:s')]\\n );\\n\\n $this->redirect('/login');\\n } catch (PDOException $e) {\\n echo \\\"There is some problem in connection: \\\" . $e->getMessage();\\n }\\n }\\n\\n View::renderTemplate('Registration/register.html.twig');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fac5abb56018e4ed392e14e97d9a72ac\",\n \"score\": \"0.68164265\",\n \"text\": \"public function register(){\\n\\n //title & sidebar\\n $categorySidebar = true;\\n $title = 'Registreren';\\n\\n //post komt terug in deze action voor validatie\\n if($_SERVER['REQUEST_METHOD'] === 'POST'){\\n\\n $errors = array();\\n $values = array();\\n\\n $firstName = $lastName = $userName = $password =\\n $repeatPassword = $email = $keeploggedin =null;\\n\\n //nieuwe UserRegistrationViewModel aanmaken en valideren\\n if(isset($_POST['firstName'])){\\n $firstName = trim($_POST['firstName']);\\n }\\n if(isset($_POST['lastName'])){\\n $lastName = trim($_POST['lastName']);\\n }\\n if(isset($_POST['userName'])){\\n $userName = trim($_POST['userName']);\\n }\\n if(isset($_POST['password'])){\\n $password = trim($_POST['password']);\\n }\\n if(isset($_POST['repeatPassword'])){\\n $repeatPassword = trim($_POST['repeatPassword']);\\n }\\n if(isset($_POST['email'])){\\n $email = trim($_POST['email']);\\n }\\n if(isset($_POST['keeploggedin'])){\\n $keeploggedin = $_POST['keeploggedin'];\\n }\\n\\n\\n\\n $userRegistrationViewModel = new UserRegistrationViewModel(null, $firstName, $lastName, $userName,\\n $password, $email, null, null, false, $repeatPassword);\\n $urvmValidator = new UserRegistrationViewModelValidator($userRegistrationViewModel);\\n $errors = $urvmValidator->getErrors();\\n $values = $urvmValidator->getValues();\\n\\n if($this->isValidPost($errors)){\\n\\n //password en userName hash\\n $user = $urvmValidator->getUser();\\n $user->setUserName(md5($user->getUserName()));\\n $user->setPassword(md5($user->getPassword()));\\n\\n //als user is toegevoegd aan de database: inloggen en eventueel cookie setten\\n if($userAdded = UserDb::insertWithoutAddressIds($urvmValidator->getUser())){\\n $values=array();\\n $this->startSession();\\n\\n $user = UserDb::getByUsernameAndPassword(md5($userName),md5($password));\\n\\n $_SESSION['user'] = $user;\\n $_SESSION['admin'] = $user->isAdmin();\\n\\n if($keeploggedin){\\n setcookie('keeploggedin',\\n \\\"{$user->getUserName()}:{$user->getPassword()}\\\",\\n time() + 60 *60 *24*7);\\n }\\n }\\n };\\n }\\n\\n $view = ROOT . '/views/User/register.php';\\n require_once ROOT . '/views/layout.php';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa2d15d6d72f5de62ebb1e7fb1d132a0\",\n \"score\": \"0.68139666\",\n \"text\": \"public function register()\\n {\\n if ($this->isAdminAvailable() && $this->isEmailAndPhoneAvailable()) {\\n if ($this->accountType === 'Store Owner'){\\n // Primary indices: email - 0, phone - 1, password - 2, account type - 9\\n $data = array($this->email, $this->phone, $this->password, $this->firstName, $this->lastName, $this->address, $this->city, $this->country, $this->zipcode, $this->accountType, $this->businessName, $this->storeName, $this->storeType);\\n\\n $registerInfo = implode('|',$data);\\n file_put_contents(\\\"../storeOwners.txt\\\", $registerInfo.PHP_EOL, FILE_APPEND);\\n echo '

    Successfully registered!


    ';\\n echo '

    Redirecting to login page in 3 seconds...


    ';\\n header(\\\"refresh:3; url=login.php\\\");\\n die();\\n }\\n else {\\n $data = array($this->email, $this->phone,$this->password, $this->firstName, $this->lastName, $this->address, $this->city, $this->country, $this->zipcode, $this->accountType);\\n $registerInfo = implode('|',$data);\\n file_put_contents(\\\"../users.txt\\\", $registerInfo.PHP_EOL, FILE_APPEND);\\n echo '

    Successfully registered!


    ';\\n echo '

    Redirecting to login page in 3 seconds...


    ';\\n header(\\\"refresh:3; url=login.php\\\");\\n die();\\n }\\n }\\n else {\\n header(\\\"Location: register.php?alreadyExists=true\\\");\\n die();\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58f04d006015c4934770c031601dd7f7\",\n \"score\": \"0.67989737\",\n \"text\": \"abstract function login();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"610c829973b2074b43e030a9854b3d60\",\n \"score\": \"0.6797758\",\n \"text\": \"public static function create_user(){\\n if (!hash_equals($_SESSION['key'], $_POST['token'])){\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"Invalid token\\\"}';\\n exit;\\n }\\n\\n\\n // check if passwords mathces\\n if($_POST['txtPassword'] != $_POST['txtConfirmPassword']){\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"Passwords don\\\\'t match\\\"}';\\n exit;\\n }\\n\\n // check length of password\\n if(strlen($_POST['txtPassword']) < 8 ){\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"Password should be at least 8 characters\\\"}';\\n exit;\\n }\\n\\n // check length of username\\n if (strlen($_POST['txtUsername']) < 4 || strlen($_POST['txtUsername']) > 20) {\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"Username should be between 6 and 20 character\\\"}';\\n exit;\\n }\\n //Preventing the user to create admin or moderator \\n if($_POST['txtUsername'] === 'admin' || $_POST['txtUsername'] === 'moderator' ){\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"Reservated usernames\\\"}';\\n exit;\\n }\\n if ($_POST['txtUsername'] === 'admin' ||\\n $_POST['txtUsername'] === 'moderator' ||\\n strpos($_POST['txtUsername'], 'admin') !== false ||\\n strpos($_POST['txtUsername'], 'moderator') !== false) {\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"Reserved username\\\"}';\\n exit;\\n }\\n\\n // check if it valid email\\n if (!filter_var($_POST['txtEmail'], FILTER_VALIDATE_EMAIL)) {\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"Enter valid email\\\"}';\\n exit;\\n }\\n // check if the fields are empty\\n if (empty($_POST['txtUsername']) ||\\n empty($_POST['txtEmail']) ||\\n empty($_POST['txtPassword']) ||\\n empty($_POST['txtConfirmPassword'])) {\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"Please fill all the fields\\\"}';\\n exit;\\n }\\n\\n // Validate password strength\\n $uppercase = preg_match('@[A-Z]@', $_POST['txtPassword']);\\n $lowercase = preg_match('@[a-z]@', $_POST['txtPassword']);\\n $number = preg_match('@[0-9]@', $_POST['txtPassword']);\\n $specialChars = preg_match('@[^\\\\w]@', $_POST['txtPassword']);\\n\\n if (!$uppercase || !$lowercase || !$number || !$specialChars || strlen($_POST['txtPassword']) < 8) {\\n echo '{\\\"status\\\":\\\"0\\\",\\\"message\\\":\\\"The password is too weak\\\"}';\\n die();\\n }\\n\\n //hash the password\\n $user_password = password_hash($_POST['txtPassword'], PASSWORD_BCRYPT);\\n // trim variables\\n $username = $_POST['txtUsername'];\\n $email = trim($_POST['txtEmail']);\\n\\n $token = bin2hex(openssl_random_pseudo_bytes(16));\\n $user_class = new Users;\\n $user_class->sign_up_user($username, $user_password, $email, $token);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d3c4277900c0ad5eacb1317af52f222\",\n \"score\": \"0.6795673\",\n \"text\": \"public function doRegistration()\\n {\\n //your form name fields must match the ones of the table fields\\n $user = new User(Post::getAll());\\n $user -> role='passageiro';\\n\\n if($user->is_valid()){\\n $user->save();\\n Redirect::toRoute('login/login');\\n } else {\\n //redirect to form with data and errors\\n Redirect::flashToRoute('login/registration', ['user' => $user]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef7386a8d7831322ad1b7fb697b552ce\",\n \"score\": \"0.6782666\",\n \"text\": \"public function login()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef7386a8d7831322ad1b7fb697b552ce\",\n \"score\": \"0.6782666\",\n \"text\": \"public function login()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef7386a8d7831322ad1b7fb697b552ce\",\n \"score\": \"0.6782666\",\n \"text\": \"public function login()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef7386a8d7831322ad1b7fb697b552ce\",\n \"score\": \"0.6782666\",\n \"text\": \"public function login()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef7386a8d7831322ad1b7fb697b552ce\",\n \"score\": \"0.6782666\",\n \"text\": \"public function login()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2d7cd6a5b055b87edab57987b8c24a9\",\n \"score\": \"0.6775364\",\n \"text\": \"public function login()\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2eee9263b6e1490293285a2f32e937fa\",\n \"score\": \"0.6769537\",\n \"text\": \"public function post_login()\\n\\t{\\n\\t\\t$email = Input::post('email');\\n\\t\\t$pass = Input::post('password');\\n\\n\\t\\t$user = Model_Users::find('all', array('where' => array(array('email', $email),)));\\n\\n\\t\\tif(isset($email))\\n {\\n \\tif(isset($pass))\\n \\t{\\n \\t\\tif (!empty($user))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tforeach ($user as $key => $value)\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$id = $user[$key]->id;\\n\\t\\t\\t\\t\\t\\t$email = $user[$key]->email;\\n\\t\\t\\t\\t\\t\\t$password = $user[$key]->password;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse return $this->notice($code = 'ERROR', $message = 'EMAIL ENTERED WRONG OR NOT REGISTERED.');\\n\\n\\t\\t\\t\\tif ($email == $email and $password == $pass)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$token = array(\\n\\t\\t\\t\\t\\t\\t\\\"id\\\" => $id, \\n\\t\\t\\t\\t\\t\\t\\\"email\\\" => $email, \\n\\t\\t\\t\\t\\t\\t\\\"password\\\" => $password\\n\\t\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t\\t$jwt = JWT::encode($token, $this->key);\\n\\n\\t\\t\\t\\t\\treturn $this->notice($code = 'SUCCESSFUL ACTION', $message = $jwt);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse return $this->notice($code = 'ERROR', $message = 'PASSWORD ENTERED WRONG.');\\n\\t\\t\\t}\\n\\t\\t\\telse return $this->notice($code = 'ERROR', $message = 'REQUIRE PASSWORD.');\\n\\t\\t}\\n\\t\\telse return $this->notice($code = 'ERROR', $message = 'REQUIRE EMAIL.');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff88570d3534fa20b6c203532910e9c5\",\n \"score\": \"0.6766653\",\n \"text\": \"public function register()\\n {\\n $user = new User();\\n $user->email = $this->email;\\n $user->new_pass = $this->password;\\n $user->re_new_pass = $this->password_confirm;\\n $user->username = $this->username;\\n $user->type = $this->type;\\n $user->phone = $this->phone;\\n $user->created_at = time();\\n $user->status = User::STATUS_DEACTIVE;\\n if ($user->save())\\n {\\n $user->createUserType();\\n return true;\\n }\\n else\\n {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c688270a0d26b3835e327a80005a3de\",\n \"score\": \"0.6764738\",\n \"text\": \"public function authUser($sloginusername,$sloginpassword){\\n $sloginpassword1 = sha1($sloginpassword); // creates a crypted variable for the password\\n\\n\\t$found_user = Login::auth($sloginusername, $sloginpassword1); /// Check database to see if username/password exist.\\n\\t\\n\\n if ($found_user) {// if the user exist do make a login object and a user object, and store theese in the database \\n \\n $uactivedo = new Login();\\n $ulogins = Login::find_all();\\n \\n\\n// This FOREACHloop get runs through all the login object until it finds a wich matches the email,then we\\n// checks that the activeted variable is set to one. If so you can log inn. If not you get an\\n// error message of that you have not activted your account.\\n \\n\\n foreach($ulogins as $uactivedo){\\n if ($uactivedo->email == $sloginusername){\\n\\n $uactiveone = $uactivedo->activated ;\\n $auserid= $uactivedo->id;\\n\\n }\\n }\\n\\n if($uactiveone==1){ // Checks if your account is activeted, if so u get get loggin in by session and redirected to admin area.\\n $session = new Session();\\n $session->login($found_user);\\n\\n redirect_to(\\\"view/admin/index.php\\\");\\n }else{\\n return \\\"bruker ikke aktivert!\\\";\\n }\\n } else {\\n // username/password combo was not found in the database\\n return \\\"Username/password combination incorrect.\\\";\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a287bc09dcc0f8a36027e2e8bc1a9096\",\n \"score\": \"0.675273\",\n \"text\": \"public function register() {\\n // create/read session, absolutely necessary\\n\\n if (session_status() == PHP_SESSION_NONE && !headers_sent()) {\\n session_start();\\n }\\n\\n // check the possible login actions:\\n // if user tried to log out (happen when user clicks logout button)\\n if (isset($_GET[\\\"logout\\\"])) {\\n $this->doLogout();\\n } // login via post data (if user just submitted a login form)\\n else if (isset($_POST[\\\"login\\\"])) {\\n $username = isset($_POST['userName']) ? $_POST['userName'] : \\\"\\\";\\n $password = isset($_POST['userPassword']) ? $_POST['userPassword'] : \\\"\\\";\\n $this->doLogin($username, $password);\\n }\\n $this->showError();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f625f2461570b916e5ce00563c808f30\",\n \"score\": \"0.6746764\",\n \"text\": \"public function registerUser($user);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fed0c564c3e7957da30af971ad1f4bc8\",\n \"score\": \"0.6745978\",\n \"text\": \"public function register()\\n {\\n $data = Request::all();\\n // Si tous les champs ont été remplis\\n \\tif (!Validator::array_has_empty($data)) {\\n \\t\\t// Si le password et la confirmation sont identiques\\n \\t\\tif ($data['password'] == $data['password2']) {\\n\\n \\t\\t\\t// Si l'email existe déjà dans la db -> erreur\\n \\t\\t\\tif ($this->User->findByMail($data['mail'])) {\\n \\t\\t\\t\\t$this->setFlash(\\\"This email is already used\\\", 'warning');\\n \\t\\t\\t\\t$this->view->render('users/register');\\n \\t\\t\\t}\\n \\t\\t\\t// Sinon on crée l'utilisateur et on le redirige vers l'index\\n \\t\\t\\telse {\\n\\n \\t\\t\\t\\t$this->User->save($data);\\n $_SESSION['user'] = $data;\\n $_SESSION['user']['role'] = \\\"member\\\";\\n unset($_SESSION['user']['password'], $_SESSION['user']['password2']);\\n \\t\\t\\t\\t$this->setFlash(\\\"You are successfully registered\\\", 'success');\\n \\t\\t\\t\\t//$this->login();\\n \\t\\t\\t\\t$this->view->redirect_to('user/index');\\n \\t\\t\\t}\\n\\n \\t\\t} else {\\n \\t\\t\\t$this->setFlash(\\\"Not same passwords\\\", 'warning');\\n \\t\\t\\t$this->view->render('users/register');\\n \\t\\t}\\n\\n \\t} elseif($data && Validator::array_has_empty($data)) {\\n $this->setFlash(\\\"Please fill all the fields\\\", 'warning');\\n $this->view->render('users/register');\\n\\n } else {\\n \\t $this->view->render('users/register');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de6390c90fa513036165647d6e9fa6a4\",\n \"score\": \"0.6739674\",\n \"text\": \"public function register()\\n\\t{\\n\\t\\t$username = $this->input->post('userid');\\n\\t\\t$email = $this->input->post('email');\\n\\t\\t$password = $this->input->post('pword');\\n\\n\\t\\t$this->auth_model->register_user(array(\\n\\t\\t\\t$username,\\n\\t\\t\\t$email,\\n\\t\\t\\tpassword_hash($password, PASSWORD_DEFAULT)\\n\\t\\t));\\n\\n\\t\\tif (password_verify($password, $user->pword)) {\\n\\t\\t\\t// if sucessfull redirects to\\n\\t redirect('members/membership',@$data);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51fd865e65e1917baff92ffc4eb02765\",\n \"score\": \"0.6733936\",\n \"text\": \"public function setNewUser(){\\n\\n if($this->isRegisterFormReady()){\\n //Ingresar usuario a la base de datos.\\n $sql = \\\"INSERT INTO Users (userMail, userName, userLastName ,userMonth,\\n userDay, userYear, userPassword, userLogMonth, userLogYear) VALUES (:userMail, :userName, :userLastName, :userMonth, :userDay, :userYear, :userPassword, :userLogMonth, :userLogYear)\\\";\\n\\n //Preparar el statement\\n $stmt = $this->connection->prepare($sql);\\n\\n //Guardar los parametros en la base de datos\\n $stmt->bindParam('userMail', $this->userMail);\\n $stmt->bindParam('userName', strtolower($this->userName));\\n $stmt->bindParam('userLastName', strtolower($this->userLastName));\\n $stmt->bindParam('userMonth', $this->userMonth);\\n $stmt->bindParam('userDay', $this->userDay);\\n $stmt->bindParam('userYear', $this->userYear);\\n //Enviar la constrseña de forma protegida.\\n $stmt->bindParam('userPassword', password_hash($this->userPassword, PASSWORD_BCRYPT ));\\n $stmt->bindParam('userLogMonth', $this->userLogMonth);\\n $stmt->bindParam('userLogYear', $this->userLogYear);\\n\\n if( $stmt->execute() ){\\n header(\\\"Location: index.php\\\");\\n //$message = \\\"Cuenta creada satisfactoriamente\\\";\\n }else{\\n $this->errorMessage = 'Ocurrio un error al crear tu cuenta intentalo otra vez';\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19122981ad754288dde54ca311c468bc\",\n \"score\": \"0.6722038\",\n \"text\": \"private function RegisterUser()\\n {\\n $database = new Database();\\n $password = sha1($_POST['pass1']);\\n foreach (array(\\\"name\\\", \\\"surname\\\", \\\"email\\\", \\\"username\\\") as $campoForm) {\\n $$campoForm = mysql_escape_string($_POST[$campoForm]);\\n }\\n $database->connect();\\n $query = $database->Query(\\\"INSERT INTO utenti (NOME, COGNOME, EMAIL, USERNAME, PASSWORD) \\\" .\\n \\\"VALUES ('$name','$surname','$email',$username','$password')\\\");\\n $database->disconnect();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a581b700fa8bad80139585d11fb6c32a\",\n \"score\": \"0.6719115\",\n \"text\": \"public function registerUser()\\n\\t{\\n\\t\\t$input = Input::all();\\n\\t try {\\n\\t \\t$user = Sentry::register(array(\\n\\t\\t 'email' => $input['email'],\\n\\t\\t 'password' => $input['password'],\\n\\t\\t 'first_name' => $input['firstName'],\\n\\t\\t 'last_name' => $input['lastName'],\\n\\t\\t 'activated' => 1\\n\\t\\t ));\\n\\n\\t \\treturn 1;\\n\\t } catch (Exception $e) {\\n\\t \\treturn 0;\\n\\t }\\n\\t \\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c799542765d5ce3559771e8238519cc\",\n \"score\": \"0.67135656\",\n \"text\": \"public function LoginUser(){\\n \\n /** Zozbieranie zadaných údajov a prihlásenie */\\n\\t\\tif(isset($_POST['LoginForm']))\\n\\t\\t{\\n\\t\\t\\t$this->login->attributes=$_POST['LoginForm'];\\n\\t\\t\\t// Validacia prihlasenia a presmerovanie na pozadovanu stranku po prihlaseni\\n\\t\\t\\tif($this->login->validate() && $this->login->login()){\\n //Ak prichadza z domovskej stranky tak presmerovanie na Dashboard\\n if (Yii::app()->user->returnUrl == Yii::app()->homeUrl && Yii::app()->user->roles != 'admin')\\n $this->redirect(Yii::app()->params->homePath.'/'.Yii::app()->language.'/dashboard');\\n else //vsetci ostatni sa presmeruju tam kam pozaduju\\n $this->redirect(Yii::app()->user->returnUrl);\\n }\\n \\n\\t\\t\\t\\t\\n\\t\\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f7504f0407682ed3c882471970a63f0\",\n \"score\": \"0.67069197\",\n \"text\": \"public function registration()\\n {\\n\\n\\n $loginRepository = new LoginRepository();\\n $passwortPattern = \\\"((?=.*\\\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%èüÜÈéöÖÉÄÀäà_\\\\-?!'`^~\\\\]\\\\[£{}+*.°ç&()¢=]).{4,40})\\\";\\n $errorMsg = null;\\n $email = null;\\n $nickname = null;\\n $piss = '/Projekt_Bilder-DB/public'; // $GLOBALS['appurl'];\\n if(isset($_POST['sendR'])) {\\n $nickname = htmlspecialchars($_POST['nickname'], ENT_QUOTES, 'UTF-8');\\n $email = htmlspecialchars($_POST['email'], ENT_QUOTES, 'UTF-8');\\n $passwort = htmlspecialchars($_POST['passwort'], ENT_QUOTES, 'UTF-8');\\n $v_passwort = htmlspecialchars($_POST['v_passwort'], ENT_QUOTES, 'UTF-8');\\n if(empty($nickname) || empty($email) || empty($passwort) || empty($v_passwort)) {\\n $errorMsg = $this->errMsg(\\\"empty\\\");\\n }else {\\n if(strlen($nickname) < 50 || strlen($nickname) > 3) {\\n if(!$loginRepository->checkMail($email) > 0 && filter_var($email, FILTER_VALIDATE_EMAIL)) {\\n if(preg_match($passwortPattern, $passwort) === 1){\\n if($passwort == $v_passwort) {\\n $loginRepository->addUser($nickname,$email,$passwort);\\n $_SESSION[\\\"succMsg\\\"] = $this->errMsg(\\\"succ\\\");\\n header(\\\"Location: \\\". $GLOBALS['appurl'] .\\\"/login\\\");\\n }else {\\n $errorMsg = $this->errMsg(\\\"vpasswort\\\"); // nicht gleiches Passwort\\n }\\n }else {\\n $errorMsg = $this->errMsg(\\\"bpasswort\\\"); // schlechtes Passwort mind. 1Kleinbuchstaben, 1Grossbuchstaben, 1Zahl, 1Sonderzeichen und 5lang sein\\n }\\n\\n }else {\\n $errorMsg = $this->errMsg(\\\"mailInvalid\\\"); // mail gibt es schon oder ist ungültig\\n }\\n\\n }else {\\n $errorMsg = $this->errMsg(\\\"usrname\\\"); // username ungültig (zu lang oder zu kurz)\\n }\\n }\\n\\n\\n\\n }\\n\\n\\n\\n $view = new View('login_registration');\\n $view->title = 'Bilder-DB';\\n $view->heading = 'Registration';\\n $view->error = $errorMsg;\\n $view->mail = $email;\\n $view->usr = $nickname;\\n $view->display();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09f008040aeab30d688c20fd0e830d92\",\n \"score\": \"0.6696813\",\n \"text\": \"public function register()\\n {\\n $user = [\\n 'name' => request('name'),\\n 'email' => request('email'),\\n 'password' => Hash::make(request('password')),\\n ];\\n if(User::create($user)){\\n $credentials = request(['email', 'password']);\\n if (! $token = auth('api')->attempt($credentials)) {\\n return response()->json(['error' => 'Unauthorized'], 401);\\n }\\n return $this->respondWithToken($token);\\n }else{\\n return response()->json(['error' => 'error registering'], 401);\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52c381b5b5b38e1198467ed0bfb1a896\",\n \"score\": \"0.66935325\",\n \"text\": \"public function registerUser() {\\n $request = new Request();\\n $user = new User();\\n\\n $user->create($request->getData());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e321bc6602f9567c54bb5227543639c\",\n \"score\": \"0.6692271\",\n \"text\": \"public function user_login()\\n {\\n echo \\\"This would be called on the user_register signal.\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c22e9b88a7bca21ea2dc40d4302baba\",\n \"score\": \"0.6690568\",\n \"text\": \"public function register() {\\n $config = Config::current();\\n if (!$config->can_register)\\n error(__(\\\"Registration Disabled\\\"), __(\\\"I'm sorry, but this site is not allowing registration.\\\"));\\n\\n if (logged_in())\\n error(__(\\\"Error\\\"), __(\\\"You're already logged in.\\\"));\\n\\n if (!empty($_POST)) {\\n if (empty($_POST['login']))\\n Flash::warning(__(\\\"Please enter a username for your account.\\\"));\\n elseif (count(User::find(array(\\\"where\\\" => array(\\\"login\\\" => $_POST['login'])))))\\n Flash::warning(__(\\\"That username is already in use.\\\"));\\n\\n if (empty($_POST['password1']))\\n Flash::warning(__(\\\"Password cannot be blank.\\\"));\\n elseif ($_POST['password1'] != $_POST['password2'])\\n Flash::warning(__(\\\"Passwords do not match.\\\"));\\n\\n if (empty($_POST['email']))\\n Flash::warning(__(\\\"E-mail address cannot be blank.\\\"));\\n elseif (!preg_match(\\\"/^[_A-z0-9-]+((\\\\.|\\\\+)[_A-z0-9-]+)*@[A-z0-9-]+(\\\\.[A-z0-9-]+)*(\\\\.[A-z]{2,4})$/\\\", $_POST['email']))\\n Flash::warning(__(\\\"Invalid e-mail address.\\\"));\\n\\n if ($config->enable_recaptcha and !check_captcha())\\n Flash::warning(__(\\\"Incorrect captcha code. Please try again.\\\"));\\n\\n if (!Flash::exists(\\\"warning\\\")) {\\n if ($config->email_activation) {\\n $to = $_POST['email'];\\n $subject = _f($config->name.\\\" Registration Pending\\\");\\n $message = _f(\\\"Hello, \\\".fix($_POST['login']).\\\".\\\\n\\\\nYou are receiving this message because you recently registered at \\\".$config->chyrp_url.\\\"\\\\nTo complete your registration, go to \\\".$config->chyrp_url.\\\"/?action=validate&login=\\\".fix($_POST['login']).\\\"&token=\\\".sha1($_POST['login'].$_POST['email']));\\n $headers = \\\"From:\\\".$config->email.\\\"\\\\r\\\\n\\\" .\\n \\\"Reply-To:\\\".$config->email. \\\"\\\\r\\\\n\\\" .\\n \\\"X-Mailer: PHP/\\\".phpversion() ;\\n\\n $user = User::add($_POST['login'], $_POST['password1'], $_POST['email'], '', '', '', false, 5);\\n $sent = email($to, $subject, $message, $headers);\\n\\n if ($sent)\\n Flash::notice(__(\\\"The email address you provided has been sent details to confirm registration.\\\"), \\\"/\\\");\\n else\\n Flash::notice(__(\\\"There was an error emailing the activation link to your email address.\\\"), \\\"/\\\");\\n } else {\\n $user = User::add($_POST['login'], $_POST['password1'], $_POST['email']);\\n\\n Trigger::current()->call(\\\"user_registered\\\", $user);\\n\\n $_SESSION['user_id'] = $user->id;\\n\\n Flash::notice(__(\\\"Registration successful.\\\"), \\\"/\\\");\\n }\\n }\\n }\\n\\n $this->display(\\\"forms/user/register\\\", array(), __(\\\"Register\\\"));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6ec9bb2d15e2f465ac4af6ea2f5fcde\",\n \"score\": \"0.66820097\",\n \"text\": \"public function register()\\n \\t{\\n\\t\\ttry{\\n\\t\\t\\t// Check if exists\\n\\t\\t\\t$query=$this->con->prepare(\\\"SELECT * FROM user WHERE email=:email\\\");\\n\\t\\t\\t$query->bindParam(':email', $this->email);\\n\\t\\t\\t$query->execute();\\n\\t\\t\\t\\n\\t\\t\\t$result = $query -> fetch(PDO::FETCH_ASSOC);\\n\\n\\t\\t\\t// check for empty result\\n\\t\\t\\tif (isset($result) && isset($result['email'])) {\\n\\t\\t\\t\\t// user found - already registered\\n\\t\\t\\t\\t$this->error['success'] = 1;\\n\\t\\t\\t\\t$this->error['message'] = 'Esta email já se encontra registado.';\\n\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t$this->con->beginTransaction();\\n// print '








    email: '.$this->email;\\t\\t\\t\\t\\n// print '
    name: '.$this->name;\\t\\t\\t\\t\\n// print '
    uid: '.$this->token;\\t\\t\\t\\t\\n// print '
    companyid: '.$this->companyid;\\t\\t\\t\\t\\n// print '
    uadmin: '.$this->uadmin;\\t\\t\\t\\t\\n// print '
    password: '.SHA1($this->password);\\t\\t\\n\\n\\t\\t\\t\\t// inserting new user\\n\\t\\t\\t\\t$query = $this->con->prepare(\\\"\\n INSERT INTO user(email, name, phonenumber, taxnumber, uid, pass, admin, status, deliveryname, deliverystreet, deliveryzipcode, deliverycity, invoicename, invoicestreet, invoicezipcode, invoicecity, creationdate) \\n VALUES (:email, :name, :phonenumber, :taxnumber, :uid, :pass, :admin, :status, :deliveryname, :deliverystreet, :deliveryzipcode, :deliverycity, :invoicename, :invoicestreet, :invoicezipcode, :invoicecity, CURRENT_TIMESTAMP)\\n \\\");\\n\\n\\t\\t\\t\\t$result = $query->execute(array(\\n\\t\\t\\t\\t\\t\\\"email\\\" \\t\\t => $this->email,\\n\\t\\t\\t\\t\\t\\\"name\\\" \\t\\t \\t => $this->name,\\n\\t\\t\\t\\t\\t\\\"phonenumber\\\" \\t => $this->phonenumber,\\n\\t\\t\\t\\t\\t\\\"taxnumber\\\" \\t => $this->taxnumber,\\n\\t\\t\\t\\t\\t\\\"uid\\\" \\t => $this->token,\\n\\t\\t\\t\\t\\t\\\"pass\\\" \\t\\t => '',\\n\\t\\t\\t\\t\\t\\\"admin\\\" \\t\\t => $this->admin,\\n\\t\\t\\t\\t\\t\\\"status\\\" \\t\\t => $this->status,\\n\\t\\t\\t\\t\\t\\\"deliveryname\\\" \\t\\t => $this->deliveryname,\\n\\t\\t\\t\\t\\t\\\"deliverystreet\\\" \\t\\t=> $this->deliverystreet,\\n\\t\\t\\t\\t\\t\\\"deliveryzipcode\\\" \\t => $this->deliveryzipcode,\\n\\t\\t\\t\\t\\t\\\"deliverycity\\\" \\t\\t => $this->deliverycity,\\n\\t\\t\\t\\t\\t\\\"invoicename\\\" \\t\\t => $this->invoicename,\\n\\t\\t\\t\\t\\t\\\"invoicestreet\\\" \\t\\t=> $this->invoicestreet,\\n\\t\\t\\t\\t\\t\\\"invoicezipcode\\\" \\t\\t=> $this->invoicezipcode,\\n\\t\\t\\t\\t\\t\\\"invoicecity\\\" \\t\\t => $this->invoicecity\\n\\t\\t\\t\\t));\\n\\n\\t\\t\\t\\tif (!$result) {\\n\\t\\t\\t\\t\\t$this->error['success'] = 1;\\n\\t\\t\\t\\t\\t$this->error['message'] = 'Ocorreu um erro no registo do utilizador.';\\n\\t\\t\\t\\t\\t$this->con->rollBack();\\n\\t\\t\\t\\t} else {\\n \\n //authorization\\n $this->client_id \\t\\t= $this->email;\\n $this->client_secret \\t= 'thisismysecret';\\n $this->redirect_uri\\t\\t= 'http://127.0.0.1:8080/my-oauth2-walkthrough/error.php';\\n $this->grant_types\\t\\t= 'refresh_token password client_credentials';\\n $this->scope\\t\\t\\t= null;\\n $this->user_id\\t\\t= null;\\n $ret = $this->registeroauth();\\n\\n $this->error['success'] = 0;\\n $this->error['message'] = 'Criação com sucesso do utilizador';\\n\\n $this->con->commit();\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tcatch(PDOException $ex) {\\n\\t\\t\\t$this->error['success'] = 1;\\n\\t\\t\\t$this->error['message'] = $ex->getMessage();\\n\\t\\t\\t$this->con->rollBack();\\n\\t\\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b36e7fcb89e2526f0546dbfe819ea5f0\",\n \"score\": \"0.6675069\",\n \"text\": \"public static function login() {\\n $user_name = self::get_user_name();\\n $user_exist = UserHome::exists($user_name);\\n if (!$user_exist) {\\n $user = self::get_shibboleth_user();\\n UserHome::create($user);\\n }\\n Login::login_user($user_name);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4779706d85d2bacf4b027ceb20802878\",\n \"score\": \"0.66643214\",\n \"text\": \"public function registerUser(){\\n if(!($this->slpaCoreApi->isUserRegistered())){\\n $this->slpaCoreApi->registerWithCurrentUserId();\\n return 1;\\n }\\n return 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa8674232e2f129f4ea71524a4f8fd06\",\n \"score\": \"0.66561395\",\n \"text\": \"public function login();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92e561ee8888c8de57b75b6eda69bc2f\",\n \"score\": \"0.6655204\",\n \"text\": \"protected function registerNewUser ($login, $pass42)\\n {\\n $type = \\\"student\\\";\\n\\n // Liste des élèves 42 avec ce login\\n $student = new Entities (\\\"c_42_logins[login_eleve=\\\\\\\"{$login}\\\\\\\"]\\\");\\n\\n // On génère le mot de passe\\n $pass = $this->generatePassPhrase ();\\n\\n if ($student->current())\\n {\\n if ($student->current()->type == \\\"staff\\\")\\n {\\n $type = \\\"staff\\\";\\n }\\n }\\n else\\n {\\n $auth = new Auth42();\\n $info = $auth->search(\\\"uid=\\\".$login, $login, $pass42);\\n if ($info and $info['count'] == 1)\\n {\\n Core::getBdd ()->insert (array(\\n \\\"login_eleve\\\" => $login,\\n \\\"nom\\\" => $info[0]['last-name'][0],\\n \\\"prenom\\\" => $info[0]['first-name'][0]),\\n 'c_42_logins');\\n }\\n }\\n // Le hash qui sera dans la bdd\\n $shapass = sha1 (trim (strtolower ($pass)));\\n $loginsExists = new Entities (\\\"c_user[login=\\\\\\\"{$login}\\\\\\\"]\\\");\\n\\n if ($loginsExists->current())\\n {\\n $u = $loginsExists->current();\\n $this->createSession($login, $u->pass, $u->id, $u->auths);\\n echo \\\"1\\\";\\n }\\n else\\n {\\n if (Core::getBdd ()->insert(array (\\\"login\\\" => $login, \\\"pass\\\" => $shapass), 'c_user'))\\n {\\n $loginsExists = new Entities (\\\"c_user[login=\\\\\\\"{$login}\\\\\\\"]\\\");\\n $mail = new MuffinMail($loginsExists->current());\\n $mail->sendParralelMuffinPass($pass);\\n $u = $loginsExists->current();\\n $this->createSession($login, $u->pass, $u->id, $u->auths);\\n echo \\\"1\\\";\\n }\\n else\\n echo \\\"-1\\\";\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa03a81c58ed53e8f751b756029797a0\",\n \"score\": \"0.66531146\",\n \"text\": \"function login() {\\n $post = $this->input->post();\\n if (isset($post['email'])) {\\n $user = $this->users_m->get_by(array('email' => $post['email']));\\n //means we have it.\\n if (!empty($user)) {\\n $user = $user[0];\\n if (isset($user['status'])\\n && $user['status'] == 'validated') {\\n $user['password'] = Encrypt::aes256_decode($user['password']);\\n if (isset($post['password']) &&\\n $post['password'] == $user['password']) {\\n $_SESSION['user'] = $user;\\n $_SESSION['uid'] = $user['_id'];\\n redirect('/');\\n } else {\\n $this->output->error('login error');\\n }\\n } else {\\n $this->output->error('not validate error');\\n }\\n } else {\\n $this->register();\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c05e427de9f0775fa63346c97c71c7b7\",\n \"score\": \"0.6646754\",\n \"text\": \"public function loginUser(){\\n\\t\\t$check = $this->validateUser();\\n\\t\\t$validate = array(103,106);\\n\\t\\t\\n\\t\\t$ecode = array();\\n\\t\\t$desc = array();\\n\\t\\tforeach($validate as $vcode){\\n\\t\\t\\tif(in_array($vcode, $check)){\\n\\t\\t\\t\\t$ecode[]= $vcode;\\n\\t\\t\\t\\t$desc[] = $this->code[$vcode];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\t/*** return if error detected***/\\n\\t\\tif(!empty($ecode)){\\n\\t\\t\\t$this->_result['status'] \\t\\t\\t\\t\\t = 'error';\\n\\t\\t\\t$this->_result['error_code'] \\t\\t\\t\\t= $ecode;\\n\\t\\t\\t$this->_result['data']['error_msg'] = $desc;\\n\\t\\t\\treturn $this->_result;\\n\\t\\t}\\n\\t\\t\\n\\t\\t$filter = array(\\n\\t\\t\\t\\t\\t'username' => trim($this->param['username']),\\n\\t\\t\\t\\t\\t'password' => md5($this->param['password'])\\n\\t\\t\\t\\t );\\n\\t\\t$users = $this->get_data($filter);\\n\\t\\t\\n\\t\\tif($users){\\t\\t\\n\\t\\t\\tif($users[0]['status'] == 2){\\n\\t\\t\\t\\t$this->_result['status'] = 'error';\\n\\t\\t\\t\\t$this->_result['error_code'] = array(101);\\n\\t\\t\\t\\t$this->_result['data']['error_msg'] = array($this->code[101]);\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$this->_result['status'] = 'success';\\n\\t\\t\\t\\t$this->_result['data'] = $this->generateSession($users[0]['u_id']);\\t\\n\\t\\t\\t\\t// Set user object\\n\\t\\t\\t\\tforeach($users as $info){\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$this->user->set_memberid($info['u_id']);\\n\\t\\t\\t\\t\\t$this->user->set_memberemail($info['email']);\\n\\t\\t\\t\\t\\t$this->user->set_memberfullname($info['firstname'].\\\" \\\".$info['lastname']);\\n\\t\\t\\t\\t\\t$this->user->set_memberusername($info['username']);\\n\\t\\t\\t\\t\\t$this->user->set_memberrole($info['type']);\\n\\t\\t\\t\\t\\tif($info['type'] == 3){\\n\\t\\t\\t\\t\\t\\t$prop = $this->residents_model->getByUser($this->user->get_memberid());\\n\\t\\t\\t\\t\\t\\t$this->user->set_memberproperty($prop['data']['p_id']);\\n\\t\\t\\t\\t\\t}elseif($info['type'] == 2){\\n\\t\\t\\t\\t\\t\\t$prop = $this->propertyAdmin_model->getByUser($this->user->get_memberid());\\n\\t\\t\\t\\t\\t\\t$this->user->set_memberproperty($prop['data']['p_id']);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$this->user->set_memberonline(1);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}else{\\n\\t\\t\\t\\n\\t\\t\\t$this->_result['status'] = 'error';\\n\\t\\t\\t$this->_result['error_code'] = array(135);\\n\\t\\t\\t$this->_result['data']['error_msg'] = array($this->code[135]);\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn $this->_result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9dff4a482c8707149681dfb4246edd5\",\n \"score\": \"0.6644579\",\n \"text\": \"function register($password, $name, $realname, $language, $email) {\\n\\t\\t// TODO: check not to change user name!!\\n\\t\\tglobal $userdb, $db, $page;\\n\\t\\tif(strlen($name)==0) {\\n\\t\\t\\tdebug(\\\"USERDB\\\", \\\"attempt to register with empty userid\\\");\\n\\t\\t\\treturn $page->getlocalized(\\\"invalid_username\\\");\\n\\t\\t}\\n\\t\\tdebug(\\\"USERDB\\\", \\\"registering user: \\\". $name);\\n\\t\\t$name = sotf_Utils::magicQuotes($name);\\n\\t\\t$passwd = sotf_Utils::magicQuotes($password);\\n\\t\\t$query = \\\"INSERT INTO authenticate (username,passwd,general_id,user_type) VALUES('$name','$password',1,'member')\\\";\\n\\t\\t$userdb->query($query);\\n\\t\\t$id = $userdb->getOne(\\\"SELECT auth_id FROM authenticate WHERE username='$name'\\\");\\n\\t\\t//\\t\\t$query = \\\"INSERT INTO user_preferences (RealName,language,last_visit,num_logins) \\\";\\n // RealName taken out \\t\\t\\t\\t\\t\\t. sotf_Utils::magicQuotes($realname) . \\\"','\\\" \\n\\t\\t$query = \\\"INSERT INTO user_preferences (auth_id, language,last_visit,num_logins) \\\";\\n\\t\\t$query .= \\\"VALUES('$id','\\\" . sotf_Utils::magicQuotes($language) \\n\\t\\t\\t. \\\"','\\\". db_Wrap::getSQLDate() . \\\"',1)\\\";\\n\\t\\t$userdb->query($query);\\n // TODO: check email??\\n $email = sotf_Utils::magicQuotes($email);\\n $db->query(\\\"INSERT INTO sotf_user_prefs (id, username, email) VALUES('$id', '$name', '$email')\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65be60e99527862142d156ef838b62da\",\n \"score\": \"0.66317046\",\n \"text\": \"function RegisterUser($email , $password , $name) {\\n\\tif(!filter_var($email, FILTER_VALIDATE_EMAIL))\\n\\t{\\n\\t\\treturn SetErrorMessage(\\\"Invalid email provided for registration \\\".$email.$name.$password);\\n\\t}\\n\\t//check if name provided\\n\\tif($name == '')\\n\\t{\\n\\t\\treturn SetErrorMessage(\\\"Name not provided for registration\\\");\\n\\t}\\n\\t//check if password provided\\n\\tif($password == '')\\n\\t{\\n\\t\\treturn SetErrorMessage(\\\"Password not provided for registration\\\");\\n\\t}\\n\\t\\n\\t//Password hash\\n\\t$password_hash = hash('sha1' , $password);\\n\\t//Access token\\n\\t$access_token = GenerateAccessToken($password);\\n\\t//When the user first registers he is inactive\\n\\t$is_active = False; \\n\\t\\n\\tif(GetUserByEmail($email))\\n\\t{\\n\\t\\treturn(SetErrorMessage(\\\"User with email id already registered\\\"));\\n\\t}\\n\\t\\n\\t$result = InsertNewUser($email,$password_hash,$name,$is_active,$access_token);\\n\\t\\n\\tif($result == 0 )\\n\\t{\\n\\t\\treturn(SetErrorMessage(\\\"User with email id already registered\\\"));\\n\\t} else\\n\\t{\\n\\t\\t//TODO : Send the user's access_token to his email to verify his password\\n\\t\\treturn(GetUserById($result));\\n\\t}\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"350b6aff71be2af30703103b059cf9de\",\n \"score\": \"0.6631536\",\n \"text\": \"public function doRegisterCases(){\\n\\t\\n\\t\\tif($this->rv->getRegister()) {\\n\\n\\t\\t\\tif(($this->rv->getIsRegisterUsernameEntered()) && ($this->rv->getIsRegisterPasswordEntered())){\\n\\t\\t\\t\\t$this->rv->setUserAndPassRegisterErrorMsg();\\n\\t\\t\\t\\t}\\n\\t\\t\\telse if(strlen($this->rv->getRegisterUsername()) < 3){\\t\\n\\t\\t\\t\\t$this->rv->setUserRegisterErrorMsg();\\n\\t\\t\\t\\t}\\n\\t\\t\\telse if(strlen($this->rv->getRegisterPassword()) < 6){\\t\\t\\n\\t\\t\\t\\t$this->rv->setPassRegisterErrorMsg();\\n\\t\\t\\t\\t}\\n\\t\\t\\telse if($this->rv->getRegisterPassword() !== ($this->rv->getRegisterPasswordRepeat())){\\t\\n\\t\\t\\t\\t$this->rv->setPasswordsNotMatchMsg();\\t\\n\\t\\t\\t\\t}\\n\\t\\t\\telse if ($this->rv->getRegisterUsername() !== strip_tags($this->rv->getRegisterUsername())) {\\n \\t\\t\\t$this->rv->setInvalidCharsMsg();\\n\\t\\t\\t\\t}\\n\\t\\t\\telse if($this->udal->getUsers()->userExists($this->rv->getRegisterUsername())){\\n\\t\\t\\t\\t$this->rv->setUserExistsMsg();\\n\\t\\t\\t\\t}\\n\\t\\telse {\\n\\t\\t\\t\\t//set Register session\\n\\t\\t\\t\\t$this->s->setRegistered();\\n\\t\\t\\t\\t//set User session\\n\\t\\t\\t\\t$this->s->setUser($this->rv->getRegisterUsername());\\n\\t\\t\\t\\t//adds user to UserDAL\\n\\t\\t\\t\\t$this->udal->add(new User($this->rv->getRegisterUsername(), $this->rv->getRegisterPassword()));\\n\\t\\t\\t\\t$this->nv->backToIndex();\\n\\t\\t\\t}\\n\\t\\t}\\t\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82872eb7241f97f5915059276efcc3bc\",\n \"score\": \"0.6621656\",\n \"text\": \"function user_register($user_username, $user_password)\\n {\\n $this->user_username = $user_username;\\n $this->user_password = $user_password;\\n $this->sql = \\\"INSERT INTO tbl_user (user_username,user_password) VALUES ('$this->user_username','$this->user_password')\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c19518f002fbf131adb41b273e91744\",\n \"score\": \"0.6619469\",\n \"text\": \"public function register() {\\n // we must be logged out to be able to register a new user\\n if (!Auth::check()) {\\n $validator = $this->getRegisterValidator();\\n if ($validator->passes()) {\\n try {\\n $data = $this->getRegisterData();\\n $theUser = new User();\\n $theUser->username = $data['username'];\\n $theUser->email = $data['email'];\\n //the hash includes the salt\\n $theUser->password = Hash::make($data['password']);\\n $theUser->save();\\n $data['success'] = 'New user registered succesfully';\\n //finally we send the email\\n Mail::send('emails.welcome', array('user' => $theUser), function($message) use ($theUser) {\\n $message->to($theUser->email, $theUser->username)->subject('Welcome!');\\n });\\n } catch (Exception $e) {\\n $data['error'] = 'An error occurred while trying to register the user: ' . $e->getMessage();\\n }\\n } else {\\n $data['error'] = $this->addMessages($validator);\\n }\\n //if validation is not passed or the registration failed, \\n //redirect to login form with errors\\n return Redirect::route(\\\"user/login\\\")->with('data', $data);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2767000e23bc54b8b0a973aa80ec2eb\",\n \"score\": \"0.6613035\",\n \"text\": \"function registerNewUser()\\n{\\n $firstname = $_POST['firstname'];\\n $lastname = $_POST['lastname'];\\n $email = $_POST['email'];\\n $password = $_POST['password'];\\n $password = password_hash($password, PASSWORD_DEFAULT);\\n\\n //instantiation of user\\n $newUser = new User([\\n 'firstname' => $firstname,\\n 'lastname' => $lastname,\\n 'email' => $email,\\n 'password' => $password\\n ]);\\n\\n //instantiation of manager\\n $db = new PDO('mysql:host=localhost;dbname=freshshop', 'root', '');\\n $userManager = new UserManager($db);\\n\\n //add new user to database\\n $userManager->add($newUser);\\n\\n header('Location: index.php');\\n exit;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5e7fcc169e991a07e46c649b86448b9\",\n \"score\": \"0.6606504\",\n \"text\": \"function register_user() \\n\\t{\\n\\t\\t\\n\\t\\t$uri = 'user/register_user';\\n\\t\\t$details = urldecode ( $this->input->post ( 'details' ) );\\n\\t\\t$params = $details;\\n\\t\\t$registration_details = $this->rest->{$this->method} ( $uri, $params );\\n\\n\\t\\t///echo $this->rest->debug();exit;\\n\\n\\t\\tif (trim ( $registration_details ['status'] ) == 'failure' && trim ( $registration_details ['error_code'] ) == 100) \\n\\t\\t{\\n\\t\\t\\techo json_encode ( array ('faliure' => $registration_details ['responseData'] ) );\\n\\t\\t} \\n\\t\\telseif (trim ( $deal_details ['status'] ) == 'failure' && trim ( $deal_details ['error_code'] ) == 20) \\n\\t\\t{\\n\\t\\t\\t$this->get_token ();\\n\\t\\t\\t$this->index ();\\n\\t\\t} \\n\\t\\telseif (trim ( $registration_details ['status'] ) != 'success') \\n\\t\\t{\\n\\t\\t\\techo json_encode ( array ('faliure' => $registration_details ['responseData'] ) );\\n\\t\\t} \\n\\t\\telse \\n\\t\\t{\\n\\t\\t\\t$this->verification_code = $registration_details ['responseData'];\\n\\t\\t\\techo json_encode ( array ('success' => 'true' ) );\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5eabf4ae4b0d47863e8b39ef072fe7e5\",\n \"score\": \"0.6598777\",\n \"text\": \"public function register()\\n {\\n if ($_SERVER['REQUEST_METHOD'] == 'POST')\\n {\\n // Process form\\n // Sanitize POST data\\n $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\\n\\n // Init data\\n // Trim clears white space\\n $data = ['name' => trim($_POST['name']) , 'email' => trim($_POST['email']) , 'password' => trim($_POST['password']) , 'confirm_password' => trim($_POST['confirm_password']) , 'name_err' => '', 'email_err' => '', 'password_err' => '', 'confirm_password_err' => ''];\\n\\n // Validate Email\\n // check email is not empty\\n if (empty($data['email']))\\n {\\n $data['email_err'] = 'Please enter email';\\n }\\n else\\n {\\n // check email already exists\\n if ($this->userModel->findUserByEmail($data['email']))\\n {\\n $data['email_err'] = 'Account with this email already exists';\\n }\\n }\\n\\n // Validate Name\\n // check name is not empty\\n if (empty($data['name']))\\n {\\n $data['name_err'] = 'Please enter name';\\n }\\n\\n // Validate Password\\n // check password is not empty and it is longer than 6 characters\\n if (empty($data['password']))\\n {\\n $data['password_err'] = 'Please enter password';\\n }\\n elseif (strlen($data['password']) < 6)\\n {\\n $data['password_err'] = 'Password must be at least 6 characters';\\n }\\n\\n // Validate Confirm Password\\n // check confirm password is not empty and == password\\n if (empty($data['confirm_password']))\\n {\\n $data['confirm_password_err'] = 'Please confirm password';\\n }\\n else\\n {\\n if ($data['password'] != $data['confirm_password'])\\n {\\n $data['confirm_password_err'] = 'Passwords do not match';\\n }\\n }\\n\\n // Make sure errors are empty\\n if (empty($data['email_err']) && empty($data['name_err']) && empty($data['password_err']) && empty($data['confirm_password_err']))\\n {\\n // Validated\\n // Hash Password\\n $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT);\\n\\n // Register User\\n // if for checking it went well\\n if ($this->userModel->register($data))\\n {\\n flash('register_success', 'You are successfully registered, please check your email for a verification link');\\n redirect('/users/login');\\n \\n }\\n else\\n {\\n die('Something went wrong');\\n }\\n }\\n else\\n {\\n // Load view with errors\\n $this->view('users/register', $data);\\n }\\n }\\n else\\n {\\n // Init data\\n $data = ['name' => '', 'email' => '', 'password' => '', 'confirm_password' => '', 'name_err' => '', 'email_err' => '', 'password_err' => '', 'confirm_password_err' => ''];\\n\\n // Load view\\n $this->view('users/register', $data);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7a638f779b136e186564fd269e94d8a\",\n \"score\": \"0.65987194\",\n \"text\": \"private function authenticate_user_login()\\n\\t{\\n\\t\\tif(is_object($this->password_salt))\\n\\t\\t{\\n\\t\\t\\tif(verifyPasswordHash($this->input->post('password'),$this->password_salt->sb_hotel_userpasswd) === TRUE)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->logged_in_user_meta \\t= $this->User_model->authenticated_hoteleir_records($this->input->post('username'),$this->password_salt->sb_hotel_userpasswd);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->redirectWithErrMsg(ERR_MSG_LEVEL_1);\\n\\t\\t\\t}\\t\\n\\t\\t}\\n\\t\\t$this->register_user_session();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98e490bfe01f2f12bc22eca442065cd3\",\n \"score\": \"0.6596953\",\n \"text\": \"public function makeRegister()\\n {\\n $this->is_admin = User::IS_REGISTER;\\n $this->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"425c738d81c7c8ea74b03e4a15477e41\",\n \"score\": \"0.6594894\",\n \"text\": \"function addNewUser($email, $password)\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2022ccaca95ec1ca4df9737b6b1bf2c\",\n \"score\": \"0.6592954\",\n \"text\": \"public function userLogin(){\\n /*\\n * login username and password saved in $username , $password\\n * if user is loggedin return user info in assosiative array\\n * else reutrn false\\n */ \\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e991554e12ec2a5fca8f45df27a2a59\",\n \"score\": \"0.65919733\",\n \"text\": \"function register(){\\n\\tglobal $db, $errors, $username, $email;\\n\\n\\t// receive all input values from the form. Call the e() function\\n // to escape form values\\n\\t$username = escapeString($_POST['user_name']);\\n\\t$email = escapeString($_POST['user_email']);\\n\\t$password_1 = escapeString($_POST['user_password']);\\n\\t$password_2 = escapeString($_POST['user_password_1']);\\n\\n\\t// form validation: ensure that the form is correctly filled\\n\\tif (empty($username)) { \\n\\t\\tarray_push($errors, \\\"Username is required\\\"); \\n\\t}\\n\\tif (empty($email)) { \\n\\t\\tarray_push($errors, \\\"Email is required\\\");\\n\\t}\\n\\tif (empty($password_1)) { \\n\\t\\tarray_push($errors, \\\"Password is required\\\"); \\n\\t}\\n\\tif ($password_1 !== $password_2) {\\n\\t\\tarray_push($errors, \\\"Two passwords do not match\\\");\\n\\t}\\n\\n\\t// register user if there are no errors in the form\\n\\tif (count($errors) == 0) {\\n\\t\\t\\n\\t\\t// $password = password_hash($password1, PASSWORD_DEFAULT);\\n\\t\\t$password = md5($password_1);\\n\\t\\t\\n\\t\\t\\t$query = \\\"INSERT INTO users (user_name, user_password, user_email) \\n\\t\\t\\t\\t\\t VALUES('{$username}', '{$password}', '{$email}')\\\";\\n\\t\\t\\tmysqli_query($db, $query);\\n\\n // get id of the created user\\n\\t\\t\\t$logged_in_user_id = mysqli_insert_id($db);\\n\\n $_SESSION['user_id'] = $logged_in_user_id; // put logged in user in session\\n $_SESSION['user_name'] = $username;\\n $_SESSION['user_email'] = $email;\\n $_SESSION['user_type'] = $user_type;\\n\\t\\t\\theader('Location: ../index.php');\\t\\t\\t\\t\\n\\t\\t\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55c99dd45ddd1476ec5339ce0d94e411\",\n \"score\": \"0.65858877\",\n \"text\": \"public function register()\\n {\\n // Validate register form data\\n $data = request()->validate([\\n 'first_name' => 'required|string|max:255',\\n 'email' => 'required|string|max:255|email|unique:users',\\n 'password' => 'required|string|min:5',\\n 'payment_email' => 'required|string|max:255|email'\\n ]);\\n\\n // set user name cutting email address before @ text\\n $username = explode('@',request('email'));\\n\\n // Set user id for affiliate refer link\\n $user_id = count(User::all()) + 1;\\n\\n // Add user to database\\n User::create([\\n 'first_name' => request('first_name'),\\n 'email' => request('email'),\\n 'username' => $username[0],\\n 'password' => Hash::make(request('password')),\\n 'payment_email' => request('payment_email'),\\n 'promote_id' => request('promote'),\\n 'affiliate_link' => url(env('APP_URL')).'?ref='.$user_id\\n ]);\\n\\n // Redirect to login page\\n return redirect()->route('client.member.login.view')->with('message', 'Successfully Register User...');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86eb410e79646c128134f20c330595e1\",\n \"score\": \"0.6581713\",\n \"text\": \"public function loginUser() {\\n $username = $this->request->get(\\\"username\\\");\\n $password = $this->request->get(\\\"password\\\");\\n $this->userService->loginUser($username, $password);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6b563fa40a88b74316006effd72a6f9b\",\n \"score\": \"0.65787977\",\n \"text\": \"public function createUser()\\n {\\n\\n echo \\\"im in create user function.\\\".\\\"
    \\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e9c78302132ec43d80d6d2ed8d19524\",\n \"score\": \"0.6575012\",\n \"text\": \"public function register()\\n\\t{\\n\\t\\t// Load the user model\\n\\t\\t$this->load->model('user_model','usermodel');\\n\\t\\t\\n\\t\\t// If the expected paramters are found then register the user\\n\\t\\tif (isset($_POST['email']) && isset($_POST['pass'])) {\\n\\t\\t\\t$result = $this->usermodel->register($_POST['email'],$_POST['pass'],1);\\n\\t\\t\\t// If registrationw as successful\\n\\t\\t\\tif ($result) {\\n\\t\\t\\t\\t$data['status'] = \\\"true\\\";\\n\\t\\t\\t\\t$data['uid'] = $result;\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\t$data['status'] = \\\"false\\\";\\n\\t\\t}\\n\\t\\n\\t\\t$this->load->view('api/user_view',$data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9d57d7c112b2a939a85508a05f4e321\",\n \"score\": \"0.6561175\",\n \"text\": \"public function login()\\n {\\n $this->autoRender = false;\\n $userTbl = TableRegistry::get('users_old');\\n\\n if($this->request->is(['post']))\\n { \\n parent::checkIsset(['email','password','device_id','device_type'], $this->request->data);\\n $email = parent::validateParameters(\\\"Email\\\", $this->request->data['email'], STRING);\\n $password = parent::validateParameters(\\\"Password\\\", $this->request->data['password'], STRING);\\n $device_id = parent::validateParameters(\\\"Device Id\\\", $this->request->data['device_id'], STRING);\\n $device_type = parent::validateParameters(\\\"Device Type\\\", $this->request->data['device_type'], STRING);\\n\\n $userData = $userTbl->find('all')->where(['email' => $email])->orWhere([\\\"phone_number\\\" => $email])->first();\\n if(!empty($userData))\\n { \\n $hasher = new DefaultPasswordHasher();\\n $verify = $hasher->check($password, $userData['password']);\\n if($verify)\\n { \\n if($userData['role_id'] == USER)\\n {\\n $updateUserData['device_type'] = $device_type; \\n $updateUserData['device_id'] = $device_id;\\n\\n if($userData['status'] == ACTIVE)\\n {\\n if($userData['verified_status'] == ACTIVE)\\n { \\n $userPostData = $userTbl->patchEntity($userData, $updateUserData, ['validate'=>false]);\\n if($userTbl->save($userPostData)){\\n // USERDATA \\n $user['user_id'] = $userData->id;\\n $user['email'] = $userData->email;\\n $user['username'] = $userData->name;\\n $user['profile_picture'] = $this->General->checkFileExist('img/users/'.$userData->profile_picture);\\n $user['verified_status'] = $userData->verified_status;\\n try{\\n // TOKEN\\n $key = JWT_SECRET_KEY;\\n $payload = array(\\n \\\"iss\\\" => SITE_URL,\\n \\\"aud\\\" => SITE_URL,\\n \\\"iat\\\" => time(),\\n \\\"exp\\\" => time() + (60 * 60), // 1 Hour\\n \\\"user_id\\\" => $userData->id\\n );\\n\\n $token = JWT::encode($payload, $key);\\n parent::sendResponse(200, \\\"Login successfully.\\\", $user, [\\\"token\\\" => $token]);\\n }catch(\\\\Exception $e){\\n parent::throwError(401, $e->getMessage()); \\n }\\n }else{\\n parent::throwError(500,\\\"Internal server error.\\\"); \\n }\\n }else{\\n parent::throwError(401,\\\"Please verify your account first.\\\"); \\n }\\n }else{\\n parent::throwError(401,\\\"Your account is deactive by admin. Please email us at \\\".EMAIL_SENT_FROM);\\n }\\n }else{\\n parent::throwError(401,\\\"Please login as a user account.\\\"); \\n }\\n }else{\\n parent::throwError(401,\\\"Invalid password.\\\"); \\n } \\n }else{\\n parent::throwError(401,\\\"Invalid login credential.\\\"); \\n }\\n }else{\\n parent::throwError(405,\\\"Something went wrong. Please try again.\\\"); \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4f53d540824061cc104c76494a1b119\",\n \"score\": \"0.6552587\",\n \"text\": \"public function register() {\\r\\n\\t\\t$message = null;\\r\\n\\r\\n\\t\\tif (isset($_POST['registerSubmit'])) {\\r\\n\\t\\t\\t$userModel = $this->getModel('UserModel');\\r\\n\\t\\t\\t$user = $userModel->register();\\r\\n\\t\\t\\tif ($user) {\\r\\n\\t\\t\\t\\t$message = ['Nice! You\\\\'re awesome. Now log in the system.'];\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t$message = ['Something went wrong. Please, try again.'];\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t$this->getView('registerView', $message);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45f260b0e780f6c3afd1bbe64772448c\",\n \"score\": \"0.6551658\",\n \"text\": \"public function store()\\n {\\n $user = new User($this->db);\\n if (isset($_POST)) { \\n if (!UserFormValidator::validate($_POST)) {\\n return $this->render(\\\"users/register\\\");\\n } \\n //bind form data to PDO object\\n $userDTO = $this->dataBinder->bind($_POST, UserDTO::class);\\n if ($user->findByEmail($userDTO->getEmail()) !== null) {\\n flash('register_success', 'the user is exist already');\\n return $this->render(\\\"users/register\\\");\\n }\\n //encrypt Password\\n $password = $userDTO->getPassword();\\n $passwordHash = password_hash($password, PASSWORD_DEFAULT);\\n $userDTO->setPassword($passwordHash);\\n $data = $user->create($userDTO); \\n $this->render(\\\"home/index\\\", $data);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7036205d89e0ac1df97f48d163a50a9\",\n \"score\": \"0.65510356\",\n \"text\": \"public function registerpassAction()\\n {\\n $this->view->step = 1;\\n //if is post\\n if ($this->_request->isPost()) {\\n $newPass = $this->_request->getPost('txtNewPw');\\n $confirmPass = $this->_request->getPost('txtConfirmPw');\\n $uuid = $this->_request->getPost('uuid');\\n\\n if (empty($newPass) || empty($confirmPass) || empty($uuid)) {\\n $this->view->errmsg = 'パスワードは必要ですまたはキー(uuid)は必要です。';\\n }\\n else if ($newPass !== $confirmPass) {\\n $this->view->errmsg = 'パスワードと異なります。';\\n }\\n else {\\n //registe and set password\\n require_once 'Admin/Bll/User.php';\\n $bllResetPass = new Admin_Bll_User();\\n $result = $bllResetPass->registerPassword($uuid, $newPass);\\n if ($result) {\\n $this->view->step = 2;\\n }\\n else {\\n $this->_forward('error', 'error', 'admin', array('message' => 'エラーが出ました。登録失敗しました。'));\\n return;\\n }\\n }\\n }\\n //init page\\n else {\\n $uuid = $this->_request->getParam('uuid');\\n\\n //check uuid\\n if (empty($uuid)) {\\n $this->_forward('noauthority', 'error', 'admin');\\n return;\\n }\\n\\n require_once 'Admin/Dal/User.php';\\n $register = Admin_Dal_User::getDefaultInstance();\\n $info = $register->getUserByUuid($uuid);\\n\\n //if the $info empty\\n if (empty($info)) {\\n $this->_forward('noauthority', 'error', 'admin');\\n return;\\n }\\n\\n if (1 == $info['status']) {\\n $this->_forward('error', 'error', 'admin', array('message' => 'そのユーザーが既に登録しました。'));\\n return;\\n }\\n $this->view->uuid = $uuid;\\n }\\n\\n $this->view->title = '登録を確認|OPENSOCIAL APPS ADMIN|LinNo ( リンノ )';\\n $this->render();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c7845bf2450dbaa80c65407caf8522b\",\n \"score\": \"0.654716\",\n \"text\": \"public function signUp(){\\r\\n\\r\\n\\r\\n if( !empty($_POST['username']) && !empty($_POST['password']) && !empty($_POST['passwordTry']) && !empty($_POST['email']) ){\\r\\n \\r\\n $usernameEntre = htmlspecialchars($_POST['username']); \\r\\n $passwordEntre = htmlspecialchars($_POST['password']);\\r\\n $passwordTryEntre = htmlspecialchars($_POST['passwordTry']);\\r\\n $emailEntre = htmlspecialchars($_POST['email']);\\r\\n\\r\\n if($this->model->findByUsername($usernameEntre)){\\r\\n die(\\\"Cet username existe déjà\\\"); \\r\\n }\\r\\n\\r\\n\\r\\n if($passwordEntre == $passwordTryEntre) {\\r\\n $user = new \\\\Model\\\\User(); \\r\\n $user->username = $usernameEntre; \\r\\n $user->setPassword($passwordEntre); \\r\\n $user->email = $emailEntre; \\r\\n\\r\\n \\r\\n $this->model->register($user);\\r\\n \\\\Http::redirect(\\\"index.php?controller=gateau&task=index\\\");\\r\\n \\r\\n }\\r\\n\\r\\n }else{\\r\\n $userModel = new \\\\Model\\\\User();\\r\\n $user = $userModel->getUser(); \\r\\n $titreDeLaPage = \\\"Inscription\\\"; \\r\\n \\\\Rendering::render(\\\"users/signup\\\", compact('titreDeLaPage', 'user'));\\r\\n \\r\\n }\\r\\n\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7eab5343091416f2f883222d84d895b\",\n \"score\": \"0.65342426\",\n \"text\": \"public function action_register()\\n\\t{\\n\\t\\t$errors = FALSE;\\n\\n\\t\\t// Create an instance of Model_Auth_User\\n\\t\\t$user = Jelly::factory('user');\\n $meta = Jelly::factory('meta');\\n\\n\\t\\t// Check if the form was submitted\\n\\t\\tif ($_POST)\\n\\t\\t{\\n\\t\\t\\t/**\\n\\t\\t\\t * Load the $_POST values into our model.\\n\\t\\t\\t *\\n\\t\\t\\t * We use Arr::extract() and specify the fields to add\\n\\t\\t\\t * by hand so that a malicious user can't do (for example)\\n\\t\\t\\t * `$_POST['roles'][] = 2;` and make themselves an administrator.\\n\\t\\t\\t */\\n\\t\\t\\t$user->set(Arr::extract($_POST, array(\\n\\t\\t\\t\\t'email', 'username', 'password', 'password_confirm'\\n\\t\\t\\t)));\\n\\n\\t\\t\\t// Add the 'login' role to the user model\\n\\t\\t\\t$user->add('roles', 1);\\n\\n $meta->set(Arr::extract($_POST, array(\\n 'first_name', 'last_name', 'area', 'phone'\\n )));\\n\\n\\t\\t\\ttry\\n\\t\\t\\t{\\n\\t\\t\\t\\t// Try to save our user model\\n\\t\\t\\t\\t$user->save();\\n $meta->user->user_id = $user->id;\\n $meta->save();\\n\\n\\t\\t\\t\\t// Redirect to the index page\\n\\t\\t\\t\\t$this->request->redirect(Route::get('default')->uri(array('action' => 'index')));\\n\\t\\t\\t}\\n\\t\\t\\t// There were errors saving our user model\\n\\t\\t\\tcatch (Validate_Exception $e)\\n\\t\\t\\t{\\n\\t\\t\\t\\t// Load custom error messages from `messages/forms/user/register.php`\\n\\t\\t\\t\\t$errors = $e->array->errors('forms/user/register');\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// Set template title\\n\\t\\t$this->template->title = 'Register';\\n\\n\\t\\t// Display the 'register' template\\n\\t\\t$this->template->content = View::factory('user/register')\\n\\t\\t\\t->set('user', $user)\\n ->set('meta', $meta)\\n\\t\\t\\t->set('errors', $errors);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f51174ab152b9cfa1b2763cb46d2fb85\",\n \"score\": \"0.65334475\",\n \"text\": \"public function setUserRegistration()\\n {\\n if(!$this->databaseUsersTable) $this->getMessage('Users table in the database is not specified. Please specify it before any other operation using the method setDatabaseUserTable();','','','true');\\n $user_name=$this->setEscape($_REQUEST['user_name']);\\n $user_pass=$_REQUEST['user_pass'];\\n\\t$uid=$_REQUEST['uid'];\\n\\t$mobile=$_REQUEST['mobile'];\\n\\t$offset=$_REQUEST['offset'];\\n\\t$alias=$_REQUEST['alias'];\\n //$user_confirm_pass=$_POST['user_confirm_pass'];\\n $user_mail=$_REQUEST['user_mail'];\\n // $user_confirm_mail=$_POST['user_confirm_mail'];\\n $user_crypted_pass=$this->setCrypt($user_pass);\\n\\t\\n $query=CLS_MYSQL::Query(\\\"SELECT a.*,b.* FROM\\\".\\\" \\\".$this->databaseUsersTable.\\\" AS a LEFT JOIN user_devices AS b on a.user_id=b.user_id WHERE a.user_name='$user_name'\\\");\\n // $result_user_mail=CLS_MYSQL::Query(\\\"SELECT * FROM\\\".\\\" \\\".$this->databaseUsersTable.\\\" \\\".\\\"WHERE user_mail='$user_mail'\\\");\\n\\t $result_user_name=CLS_MYSQL::GetResultValue($query,0,'user_name');\\n\\t\\t//$uid==CLS_MYSQL::GetResultValue($query,0,'uid');\\n\\t\\t//var_dump($uid);\\n\\tif($uid==CLS_MYSQL::GetResultValue($query,0,'uid')) $this->display('device id already exist');\\n elseif((strlen($user_name)<6) or (strlen($user_name)>16)) $this->display('Entered username length must be of 6 to 16 characters');\\n //elseif(CLS_MYSQL::GetResultNumber($query)) $this->display('Entered username already exists in the database');\\n elseif((strlen($user_pass)<6) or (strlen($user_pass)>16)) $this->display('Entered password length must be of 8 to 16 characters');\\n //elseif($user_pass!=$user_confirm_pass) $this->getMessage('Passwords entered do not match.');\\n // elseif(CLS_MYSQL::GetResultNumber($result_user_mail)) $this->display('Entered email already exists in the database.');\\n // elseif($user_mail!=$user_confirm_mail) $this->getMessage('Email addresses entered do not match.');\\n elseif(!preg_match(\\\"/^([a-zA-Z0-9_\\\\.\\\\-])+\\\\@(([a-zA-Z0-9\\\\-]{4,})+\\\\.)+([a-zA-Z0-9]{2,})+$/\\\", $user_mail)) $this->display('Email address entered is not valid');\\n else\\n {\\n if(CLS_MYSQL::Execute(\\\"INSERT INTO\\\".\\\" \\\".$this->databaseUsersTable.\\\" \\\".\\\"(user_name, user_pass, user_mail) VALUES ('$user_name', '$user_crypted_pass', '$user_mail')\\\")) \\n$insert_id=mysql_insert_id();\\nCLS_MYSQL::Execute(\\\"INSERT INTO user_devices (user_id, mobile, offset, uid, alias) VALUES ('$insert_id','$mobile','$offset','$uid','$alias')\\\");\\n$Email = New VTSMail();\\n$Email-> setName($user_name); //To name\\n$Email-> setMail($user_mail); //To e-mail\\n$Email-> setSubject(\\\"Registration\\\"); //Subject\\n$Email-> setMessage(\\\"VTS Registration Successful \\\\n username:$user_name \\\\n password:$user_pass\\\");\\n$Email-> sendMail();\\n $this->display('Registration was successful');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"400c794a624b8481ad6e41d5a220e839\",\n \"score\": \"0.6531041\",\n \"text\": \"public function action_register()\\n\\t{\\n\\t\\tif ( ! in_array('admin', Session::instance()->get('user_roles')))\\n\\t\\t{\\n\\t\\t\\t$this->request->redirect(Route::get('admin')->uri(array('action' => 'notowner')));\\n\\t\\t}\\n\\n\\t\\t$this->template->content = View::factory('admin/user/register')\\n\\t\\t\\t->bind('post', $post)\\n\\t\\t\\t->bind('errors', $errors);\\n\\t\\t$this->template->content->title = 'User management > Register new user';\\n\\t\\t\\n\\t\\t$user = ORM::factory('user');\\n\\t\\tif ( ! empty($_POST))\\n\\t\\t{\\n\\t\\t\\t// get post values, load into object and check validation\\n\\t\\t\\t$post = $_POST;\\n\\t\\t\\t$user->values($post);\\n\\t\\t\\tif ($user->check() AND $user->save())\\n\\t\\t\\t{\\n\\t\\t\\t\\t// add the basic login role\\n\\t\\t\\t\\t$user->add('roles', ORM::factory('role', array('name' => 'login')));\\n\\n\\t\\t\\t\\t$details = $user->details;\\n\\t\\t\\t\\tarr::unshift($post, 'user_id', $user->id);\\n\\t\\t\\t\\t$details->values($post);\\n\\t\\t\\t\\tif ($details->check() AND $details->save())\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t//cookie::set('message', 'Updated user '.$user->username);\\n\\t\\t\\t\\t\\t// save and redirect to index\\n\\t\\t\\t\\t\\t$this->request->redirect(Route::get('admin')->uri(array('controller' => 'users')));\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$errors = $details->validate()->errors('admin_errors'); \\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t// get errors to show in form\\n\\t\\t\\t\\t$errors = $user->validate()->errors('admin_errors'); \\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t// shuffle up values for form\\n\\t\\t$post = $user->as_array();\\n\\t\\tarr::unshift($post, 'password_confirm', NULL);\\n\\t\\tarr::unshift($post, 'first_name', NULL);\\n\\t\\tarr::unshift($post, 'last_name', NULL);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb3a6f05dd376dbfbffd101b63c4921e\",\n \"score\": \"0.6525235\",\n \"text\": \"private function registerNewUser()\\n {\\n if (empty($_POST['user_name'])) {\\n $this->errors[] = \\\"Empty Username\\\";\\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\\n $this->errors[] = \\\"Empty Password\\\";\\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\\n $this->errors[] = \\\"Password and password repeat are not the same\\\";\\n } elseif (strlen($_POST['user_password_new']) < 6) {\\n $this->errors[] = \\\"Password has a minimum length of 6 characters\\\";\\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\\n $this->errors[] = \\\"Username cannot be shorter than 2 or longer than 64 characters\\\";\\n } elseif (!preg_match('/^[a-z\\\\d]{2,64}$/i', $_POST['user_name'])) {\\n $this->errors[] = \\\"Username does not fit the name scheme: only a-Z and numbers are allowed, 2 to 64 characters\\\";\\n } elseif (!empty($_POST['user_name'])\\n && strlen($_POST['user_name']) <= 64\\n && strlen($_POST['user_name']) >= 2\\n && preg_match('/^[a-z\\\\d]{2,64}$/i', $_POST['user_name'])\\n && !empty($_POST['user_password_new'])\\n && !empty($_POST['user_password_repeat'])\\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\\n ) {\\n // create a database connection\\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);\\n\\n // change character set to utf8 and check it\\n if (!$this->db_connection->set_charset(\\\"utf8\\\")) {\\n $this->errors[] = $this->db_connection->error;\\n }\\n\\n // if no connection errors (= working database connection)\\n if (!$this->db_connection->connect_errno) {\\n\\n // escaping, additionally removing everything that could be (html/javascript-) code\\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\\n\\n $user_password = $_POST['user_password_new'];\\n\\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\\n // PHP 5.3/5.4, by the password hashing compatibility library\\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\\n\\n // check if user already exists\\n $sql = \\\"SELECT * FROM users WHERE user_name = '\\\" . $user_name . \\\"';\\\";\\n $query_check_user_name = $this->db_connection->query($sql);\\n\\n if ($query_check_user_name->num_rows == 1) {\\n $this->errors[] = \\\"Sorry, that username is already taken.\\\";\\n } else {\\n // write new user's data into database\\n $sql = \\\"INSERT INTO users (user_name, user_password_hash)\\n VALUES('\\\" . $user_name . \\\"', '\\\" . $user_password_hash . \\\"');\\\";\\n $query_new_user_insert = $this->db_connection->query($sql);\\n\\n // if user has been added successfully\\n if ($query_new_user_insert) {\\n $this->messages[] = \\\"Your account has been created successfully. You can now log in.\\\";\\n } else {\\n $this->errors[] = \\\"Sorry, your registration failed. Please go back and try again.\\\";\\n }\\n }\\n } else {\\n $this->errors[] = \\\"Sorry, no database connection.\\\";\\n }\\n } else {\\n $this->errors[] = \\\"An unknown error occurred.\\\";\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a423dd3e590832e7de9ae9c8254090a\",\n \"score\": \"0.65178657\",\n \"text\": \"function register($login, $pass, $realName)\\n{\\n\\t//generates pseudo random bytes worth 10 characters long\\n\\t//and sets $strong to true if the salt is strong enough\\n\\t//the is diferent(ish) for each user. the hash of password along with the salt is stored\\n\\t//in the roles table. This helps securing the data better.\\n\\t\\t\\n// \\t$bytes = openssl_random_pseudo_bytes(10, $strong);\\n// \\t$salt = bin2hex($bytes); // convert to hex\\n\\n\\t//unfortunately openssl is not supported (i have to install it)\\n\\t//so I will be generating random numbers and converting them to hex\\n\\t\\n\\t$r = mt_rand() * mt_rand();//long int\\n\\t$salt = dechex($r) ; // convert to hex\\n\\t\\n\\t$hash = getHash($pass, $salt);//get the hash of password and salt appended\\n\\t\\n\\ttry{\\n\\t\\t$login = mysql_real_escape_string($login);\\n\\t\\t\\n\\t\\t$DBH = openConnection();\\n\\t\\t$DBH->beginTransaction();\\n\\t\\n\\t\\t$query = \\\"insert into Roles (user_name, client, admin, realName) values (?,?,?,?)\\\";\\n\\t\\t$stmt = $DBH->prepare($query);\\n\\t\\t$stmt->bindValue(1, $login);\\n\\t\\t$stmt->bindValue(2, true);//client\\n\\t\\t$stmt->bindValue(3, false);\\n\\t\\t$stmt->bindValue(4, mysql_real_escape_string($realName));\\n\\t\\n\\t\\t$stmt->execute();\\n\\t\\t\\n\\t\\t\\n\\t\\t$query = \\\"insert into Users (user_name, password, salt) values (?,?,?)\\\";\\n\\t\\t$stmt = $stmt = $DBH->prepare($query);\\n\\t\\t$stmt->bindValue(1, $login);\\n\\t\\t$stmt->bindValue(2, $hash);\\n\\t\\t$stmt->bindValue(3, $salt);\\t\\t\\n\\t\\t$stmt->execute();\\n\\t\\t\\n\\t\\t$DBH->commit();\\n\\t\\treturn true;\\n\\t}\\n\\t\\tcatch (PDOException $e) {\\n\\t\\treturn false;\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92ef72cf25b298ec982fb2f308669a0b\",\n \"score\": \"0.651625\",\n \"text\": \"function newuser_init() {\\n\\t\\t$username = $_POST['userName'];\\n\\t\\t$password = $_POST['passUser'];\\n\\t\\t$email = $_POST['email'];\\n\\t\\t$nombre = $_POST['completeName'];\\n\\n\\t\\t$userdata = array(\\n\\t\\t 'user_login' => $username,\\n\\t\\t 'user_pass' => $password,\\n\\t\\t 'user_email' => $email,\\n\\t\\t 'user_nicename' => $nombre\\n\\t\\t);\\n\\n\\t\\t// Insertar Usuario en DB\\n\\t\\t$user_id = wp_insert_user( $userdata ) ;\\n\\n\\t\\t//On success\\n\\t\\tif ( ! is_wp_error( $user_id ) ) {\\n\\t\\t\\techo \\\"Felicidades ya estas Registrado\\\";\\n\\t\\t die();\\n\\t\\t} else{\\n\\t\\t echo \\\"El Usuario Ya Estaba Registrado\\\";\\n\\t\\t\\tdie();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42dfdbdbd231f72770d2e631c8c76f07\",\n \"score\": \"0.6515607\",\n \"text\": \"public function registerNewUser() {\\n\\t\\t$this->form_validation->set_rules('first_name','first_name','required');\\n\\t\\tif($this->form_validation->run() == FALSE) {\\n\\t\\t\\t$this->index();\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t$registerData\\t= $this->frontend->getInput();\\n\\t\\t$insertQuery\\t= $this->backend->dbBI->insert_string('md_user',$registerData);\\n\\t\\t$insertQuery\\t= str_replace('INSERT INTO','INSERT IGNORE INTO',$insertQuery);\\n\\t\\t$this->backend->dbBI->query($insertQuery);\\n\\t\\tredirect($this->mainURL);\\n\\t\\treturn;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86a9e16b1b483f7a564352ed0521c9cb\",\n \"score\": \"0.6511482\",\n \"text\": \"public function login() {\\n $res = json_decode(\\\"{}\\\");\\n \\n $inputs = $this->validate_login();\\n $user = $this->User_model->login($inputs);\\n if ($user) { \\n if ($user['password'] != md5($inputs['password'])) {\\n return_data(false, 'Wrong password',$res);\\n }\\n if ($user['status'] == 1) {\\n return_data(false, 'Your account is disabled', $res);\\n } else if ($user['status'] == 2) {\\n return_data(false, 'Your account has been deleted.', $res);\\n } else {\\n $this->User_model->blank_device_token($inputs['device_token']);\\n $this->User_model->updt_device_token_type($inputs['email'], $inputs['device_token'], $inputs['device_type']);\\n $user = $this->User_model->user_profile($user['id']);\\n return_data(true, 'User authentication successful.', $user);\\n }\\n } else {\\n return_data(false, 'User authentication failed.', $res); \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"22eb3337a709bc3e01b3a31fadf5aeec\",\n \"score\": \"0.65037626\",\n \"text\": \"function register()\\n{\\n\\t\\tglobal $PSALT;\\t\\n\\n\\t\\tif($this->Session->check('User'))\\n\\t\\t{\\n\\t\\t\\t//we already are logged in, so you can't be here\\n\\t\\t\\t$userinfo['User'] = $this->Session->read('User');\\n\\t\\t\\t\\n\\t\\t\\tif( $userinfo['User']['role'] == \\\"admin\\\" )\\n\\t\\t\\t{\\n\\t\\t\\t\\t//$this->Session->write('Admin', $userinfo['User']);\\n\\t\\t\\t\\t$this->redirect(array('controller' => 'users', 'action' => 'admin_home'));\\n\\t\\t\\t\\texit;\\n\\t\\t\\t}\\n\\t\\t\\telse if ($userinfo['User']['role'] == 'teacher' )\\n\\t\\t\\t{\\n\\t\\t\\t\\t//Coder\\n\\t\\t\\t\\t//$this->Session->write('teacher', $userinfo['User']);\\n\\t\\t\\t\\t$this->redirect(array('controller' => 'teachers', 'action' => 'contentProfile'));\\n\\t\\t\\t\\texit;\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t//we are a student\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t$this->layout = \\\"front_default\\\";\\n\\t\\t\\n\\t\\t$this->set(\\\"title_for_layout\\\", 'Teacher registration - LessonShark');\\n\\t\\t \\n\\t\\tApp::import('Model','User');\\n\\t\\t$this->User = & new User();\\n\\t\\t//App::import('Model','Profile');\\n\\t\\t//$this->Profile = & new Profile();\\n\\t\\t\\n\\t\\t//used to start validation rule setup\\n\\t\\t$this->User->set( $this->data['User'] );\\n\\t\\t$this->User->Profile->set( $this->data['Profile'] );\\n\\t\\t\\n\\t\\tif( !empty( $this->data ) ) \\n\\t\\t{\\n\\n\\t\\t\\t// Transform ZIP\\n\\t\\t\\t$profileData = $this->User->Profile->zipToCity($this->data['Profile']['zip']);\\n\\t\\t\\tif ($profileData)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->data['Profile']['city'] = $profileData['city'];\\n\\t\\t\\t\\t$this->data['Profile']['state_id'] = $profileData['state_id'];\\n\\t\\t\\t}\\n\\t\\t\\n\\t\\t\\tif ($this->User->validates(array('fieldList' => array('password','cpassword','firstname','lastname','email'))) && $this->User->Profile->validates(array('fieldList' => array('zip'))) )\\n\\t\\t\\t//if($this->User->saveAll($this->data, array(\\\"validate\\\" => 'first')))\\n\\t\\t\\t{\\n\\t\\t\\t\\t//updates\\n\\t\\t\\t\\t$this->data['User']['password'] = md5($this->data['User']['email'].$this->data['User']['password'].$PSALT);\\n\\t\\t\\t\\t$this->data['User']['cpassword'] = $this->data['User']['password'];\\n\\t\\t\\t\\t$this->data['User']['role'] = 'teacher';\\n\\t\\t\\t\\t\\n\\t\\t\\t\\tif($this->User->saveAll($this->data, array(\\\"validate\\\" => false)))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t//need to auto login here and set session\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$this->Session->destroy();\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$userinfo = $this->User->findByEmail($this->data['User']['email']);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$this->Session->write('User', $userinfo['User']);\\n\\t\\n\\t\\t\\t\\t\\t//create a profile for this user\\n\\t\\t\\t\\t\\t#$profiles['Profile']['user_id'] = $userinfo['User']['id'];\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t#if($this->User->Profile->save($profiles,false))\\n\\t\\t\\t\\t\\t#{\\t\\t\\n\\t\\t\\t\\t\\t#}\\n\\t\\n\\t\\t\\t\\t\\t$this->redirect(array('controller' => 'teachers', 'action' => 'contentProfile'));\\n\\t\\t\\t\\t\\texit;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\t\\n\\t\\t\\t\\t//apparently this code isn't necessary, as validate => 'only' works to handle this\\n\\t\\t\\t\\t$errors = $this->User->invalidFields(array('fieldList' => array('password','cpassword','firstname','lastname','email')));\\n\\t\\t\\t\\t$this->User->set('errors',$errors);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t$errorsProfile = $this->User->Profile->invalidFields(array('fieldList' => array('zip')));\\n\\t\\t\\t\\t$this->User->Profile->set('errors',$errors);\\n\\t\\t\\t}//END: Else IF\\n\\n\\t\\t}//End: DATA check\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"17fe9d0aa7b49b43e37553d1144c3ee2\",\n \"score\": \"0.6496213\",\n \"text\": \"function registerUser() {\\n global $con, $name, $username, $password, $email, $gender, $phone, $dob, $location, $type, $type_id, $otp, $otp_verified;\\n $statement = mysqli_prepare($con, \\\"INSERT INTO user (name, username, password, email, gender, phone, location, dob, type, type_id, otp, otp_verified) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\\\");\\n mysqli_stmt_bind_param($statement, \\\"sssssisssisi\\\", $name, $username, $password, $email, $gender, $phone, $location, $dob, $type, $type_id, $otp, $otp_verified);\\n mysqli_stmt_execute($statement);\\n mysqli_stmt_close($statement); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad6ab82511bf372890cb06626e848b60\",\n \"score\": \"0.64959526\",\n \"text\": \"function login($oUser) {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9787bc375bbb829091c2914460d766f\",\n \"score\": \"0.64949864\",\n \"text\": \"public function do_add_user(){\\n\\t\\t$arr = array(\\n\\t\\t\\t'fullname' => $_POST['fullname'],\\n\\t\\t\\t'email' => $_POST['email'],\\n\\t\\t\\t'password' => md5($_POST['password']),\\n\\t\\t\\t'role' => 2\\n\\t\\t);\\n\\t\\t$res = $this->Management->add_user($arr);\\n\\t\\tif($res == 1){\\n\\t\\t\\tredirect('Welcome/users','refresh');\\n\\t\\t}\\n\\t\\telse{\\n\\t\\t\\tredirect('Welcome/add_user','refresh');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab6ba8f2787076df55d7d875fbd8fe13\",\n \"score\": \"0.64816636\",\n \"text\": \"public function doRegistr() {\\n \\t$validator = Validator::make(Input::all(), User::$rules);\\n \\t\\t\\n \\t\\tif ($validator->passes()) {\\n \\t\\t\\t$user = new User;\\n\\n\\t\\t $user->name = Input::get('name');\\n\\t\\t $user->email = Input::get('email');\\n\\t\\t $user->phone = Input::get('phone');\\n\\t\\t $user->city = Input::get('city');\\n\\t\\t $user->password = Hash::make(Input::get('password'));\\n\\t\\t $user->save();\\n \\t\\t\\n \\t\\t return Redirect::route('login-link')\\n \\t\\t \\t->with('message', 'Thanks for registering!');\\n \\n \\t} else {\\n \\t\\treturn Redirect::route('registr')\\n \\t\\t\\t->with('message', 'The following errors occurred')\\n\\t \\t\\t->withErrors($validator)\\n\\t \\t\\t->withInput(); \\n \\t} \\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"daa6e2193619a63a1650f95eba91b4b7\",\n \"score\": \"0.64798045\",\n \"text\": \"function register($username, $password, $repassword, $email , $auth = false){\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9aaad632346fe92dc971e7f1947d4c29\",\n \"score\": \"0.6478739\",\n \"text\": \"protected function registerUser($data)\\n\\t {\\n //user array\\n\\t \\t $user=array(\\n\\t \\t \\t 'username'=>$data[0]['value'],\\n\\t \\t \\t 'email'=>$data[1]['value'],\\n\\t \\t \\t 'password'=>password_hash($data[2]['value'],PASSWORD_DEFAULT),\\n\\t \\t \\t 'token'=>$data[4]['value']\\n\\t \\t );\\n \\n //messages array\\n $message=array();\\n\\n\\t \\t //sql query \\n\\t \\t $sql=\\\"insert into users (username,email,password) values('\\\".$user['username'].\\\"','\\\".$user['email'].\\\"','\\\".$user['password'].\\\"')\\\";\\n\\n\\t \\t //sql to check already registered or not\\n\\t \\t $sql_to_check_alredy_registered_or_not='select email from users where email=\\\"'.$user['email'].'\\\"';\\n\\n\\t \\t //query the data into the database\\n\\t \\t $conn=$this->getConnection();\\n\\n\\t \\t //check the user already existed !\\n\\n\\t \\t if($conn->query($sql_to_check_alredy_registered_or_not)->num_rows>0)\\n\\t \\t {\\n\\t \\t \\t \\n\\t\\t\\t \\t \\t //push the messages into message array\\n\\n\\t\\t\\t \\t \\t array_push($message,array(\\n\\t\\t\\t \\t \\t \\t 'message'=>'User already existed !',\\n\\t\\t\\t \\t \\t \\t 'redirect'=>false\\n\\t\\t\\t \\t \\t ));\\n\\t \\t }else{\\n\\t \\t \\t //if not created users !\\n\\t \\t \\t if($conn->query($sql)==TRUE)\\n\\t\\t\\t \\t {\\n\\t\\t\\t \\t \\t //get the inserted auto user id from the user table\\n\\t\\t\\t \\t $user_id=mysqli_insert_id($conn);\\n\\n //set the user name and passwor and token into session\\n $_SESSION['username']=$user['username'];\\n $_SESSION['user_id']=$user_id;\\n\\t\\t\\t \\t \\t $_SESSION['email']=$user['email'];\\n\\t\\t\\t \\t \\t $_SESSION['password']=$user['password'];\\n\\t\\t\\t \\t \\t $_SESSION['token']=$user['token'];\\n\\n\\t\\t\\t \\t \\t //sql the to update the suer\\n\\t\\t\\t \\t \\t $sql_to_update_online=\\\"update users set online='1' where id='\\\".$user_id.\\\"'\\\";\\n\\n\\t\\t\\t \\t \\t $conn->query($sql_to_update_online);\\n\\n\\t\\t\\t \\t \\t //push the messages into message array\\n\\n\\t\\t\\t \\t \\t array_push($message,array(\\n\\t\\t\\t \\t \\t \\t 'message'=>'Successfully registered !',\\n\\t\\t\\t \\t \\t \\t 'redirect'=>true,\\n\\t\\t\\t \\t \\t \\t 'token'=>$_SESSION['token']\\n\\t\\t\\t \\t \\t ));\\n\\n\\n\\t\\t\\t \\t }else{\\n\\t\\t\\t \\t \\t \\n\\t\\t\\t \\t \\t //push the messages into message array\\n\\n\\t\\t\\t \\t \\t array_push($message,array(\\n\\t\\t\\t \\t \\t \\t 'message'=>'Error Creating !',\\n\\t\\t\\t \\t \\t \\t 'redirect'=>false\\n\\t\\t\\t \\t \\t ));\\n\\t\\t\\t \\t }\\n\\t \\t }\\n //return json message\\n\\t \\t echo json_encode($message);\\n\\n\\t \\t \\n\\t }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":744,"cells":{"query_id":{"kind":"string","value":"fbd54493c3fe95aeef757c813992ae12"},"query":{"kind":"string","value":"Get the products from the Basket"},"positive_passages":{"kind":"list like","value":[{"docid":"44ba2008210d18a0d66cec21467ffbd9","score":"0.6470745","text":"public function products(): Collection\n {\n return $this->products;\n }","title":""}],"string":"[\n {\n \"docid\": \"44ba2008210d18a0d66cec21467ffbd9\",\n \"score\": \"0.6470745\",\n \"text\": \"public function products(): Collection\\n {\\n return $this->products;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"c20340ae0b2093bfd11c5cd28344e710","score":"0.7853867","text":"public function getProducts();","title":""},{"docid":"c20340ae0b2093bfd11c5cd28344e710","score":"0.7853867","text":"public function getProducts();","title":""},{"docid":"02d6fce4ab517131df0ff855d9779e0b","score":"0.74980664","text":"public function GetProducts()\n\t{\t$this->products = array();\n\t\tif ($this->id)\n\t\t{\t$sql = 'SELECT bundleproducts.* FROM bundleproducts WHERE bid=' . $this->id . ' ORDER BY listorder, bpid';\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t\t{\t$this->products[$row['bpid']] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"2fdd98d0a4afca48de7d1453633ce921","score":"0.74925333","text":"public function getProducts()\n {\n \treturn $this->products;\n }","title":""},{"docid":"111ab3f4ed84c6711fc9af89d0808a0b","score":"0.7473313","text":"private function getProducts()\n {\n $params = [\n \t\t'catalogType' => 'generic'\n ];\n\n $itemList = $this->request->get(config('srs.product_base_url') . 'products/branch/' . $this->branchId, ['query' => $params]);\n\n $this->productList = json_decode($itemList->getBody(), true);\n\n if (ine($this->productList, 'branchItemList')) {\n foreach (array_chunk($this->productList['branchItemList'], 50) as $items) {\n $priceList = $this->getPrice($items);\n $this->saveFinancialProducts($items, $priceList);\n }\n }\n }","title":""},{"docid":"01ea5cf8a69e1aac3cc4a89612406264","score":"0.7458694","text":"private function getProducts()\n {\n $products = [];\n return $products;\n }","title":""},{"docid":"5fbc826e72a2a2816cbce951ad09fc04","score":"0.7338712","text":"public function getProducts()\n {\n return $this->products;\n }","title":""},{"docid":"cee5e67887c4a9b6a8e68ae0d6c0ffb6","score":"0.73139757","text":"public function getProducts()\n {\n return $this->products()->get();\n }","title":""},{"docid":"8752fce0980829eec73b1ac590b1342b","score":"0.73","text":"public function getProducts(): array;","title":""},{"docid":"b530a4cd4c4b120c8e6ad966b03d33b9","score":"0.72998136","text":"public function getProducts()\n\t{\n\t\t$strCall = 'products';\n\t\t\n\t\treturn $this->doApiCall($strCall);\n\t}","title":""},{"docid":"95c87d8d2b859aaac0251acc566b6bd2","score":"0.7299392","text":"public function get_products() {\n return $this->getProducts();\n }","title":""},{"docid":"87b245ee1c38bb1feda54fc133e4f94a","score":"0.7259361","text":"public function products();","title":""},{"docid":"87b245ee1c38bb1feda54fc133e4f94a","score":"0.7259361","text":"public function products();","title":""},{"docid":"86d4600be5dec745d0935da813dbb1d6","score":"0.7221556","text":"public function getProducts() {\n return $this->products;\n }","title":""},{"docid":"12b1166b28c7ca66883ecfe1c0f0e21e","score":"0.72114897","text":"abstract protected function getProductList();","title":""},{"docid":"ced676da7f373b0c1b8f93b80be72ac9","score":"0.72017443","text":"public function getProducts() {\n $sql = \"SELECT DISTINCT p.pid, p.item_name FROM {$this->_table}product p\n INNER JOIN {$this->_table}product_certified c ON(p.pid=c.product_id)\n WHERE p.is_auction='yes' AND is_certified=1 AND c.product_store_id=\".$_SESSION['StoreID'] ;\n $this->_db->execute_query($sql);\n return $this->_db->fetch_records(true);\n }","title":""},{"docid":"9f77eb03687541436ea960d72e44eb2b","score":"0.71769","text":"public function getProducts()\n {\n return $this->items[Entity::TYPE_PRODUCT];\n }","title":""},{"docid":"13a9e303af00f6be002233b5c107c0e1","score":"0.71572244","text":"public function getProducts()\n\t{\n\t\treturn $this->products;\n\t}","title":""},{"docid":"0db6bc8b005a698d4f1a4d8b08e5bb51","score":"0.7133101","text":"public function getShopProducts(){\r\n $this->products = array();\r\n try {\r\n include_once __DIR__.'\\..\\cruds\\productCrud.php';\r\n $productCrud = new ProductCrud($this->crud);\r\n $dbProducts = $productCrud->readAllProducts();\r\n $this->products = $dbProducts;\r\n }\r\n catch (PDOException $e){\r\n $this->exception = DATABASE_ERROR;\r\n $this->debugLog('Getting all the products failed with the following error: '. $e->getMessage());\r\n $this->debugLog = 'Getting all the products failed with the following error: '. $e->getMessage();\r\n }\r\n }","title":""},{"docid":"5586662f3dd17c1d27378a87f10ab22d","score":"0.7128864","text":"public function getProducts(){\n $user = $this->_db->query('SELECT * FROM productos');\n return $user->fetchall();\n }","title":""},{"docid":"c3a29e16a4eb9dd8fe92fe69c18ef8f1","score":"0.71284795","text":"public function getProducts() {\r\n\t\treturn $this->products;\r\n\t}","title":""},{"docid":"e90c917ecaa8e54cea053e95a6967cab","score":"0.7041086","text":"public function getProducts() {\n\t\t$client = $this->createClient();\n\t\t$url = 'https://' . $this->_domain . '/admin/products.json';\n\t\t$response = $client->request($url);\n\t\t$products = json_decode($response['body']);\n\t\treturn $products->products;\n\t}","title":""},{"docid":"e3605b48a0c8cbf709e42a10374edf22","score":"0.70137614","text":"public function getAllProducts(){\n\t\treturn $this->products->latest()->get();\n\t}","title":""},{"docid":"bb297ce3d1545d12aa1542c3177be282","score":"0.6982878","text":"public function getProduct();","title":""},{"docid":"ccc6017da99925a53000d81bc6091ad9","score":"0.69776046","text":"public function get(): array\n {\n return $this->allProducts;\n }","title":""},{"docid":"b0f288db6e35113ad247161d1d114205","score":"0.6968937","text":"public function listProducts()\n {\n return $this->request('GET', '/products');\n }","title":""},{"docid":"c7b14fdae44300c2951a8fd62661d5dc","score":"0.6947384","text":"public function getProducts()\n {\n\n $databaseResults = $this -> databaseInstance -> selectAllProductsReverse(\"products\");\n $resultsDecoded= Utility::jsonEncodeThenDecode($databaseResults);\n\n return $this -> productMapper($resultsDecoded);\n }","title":""},{"docid":"d741c799340393765c6c2e94b9da24ab","score":"0.6947009","text":"public function getAll(){\n return $this->product->all();\n }","title":""},{"docid":"2564c4fb4da187ef80b9e57e46fe9fc8","score":"0.6940918","text":"public function fetchProducts(): array;","title":""},{"docid":"fab2ad9e533e40f63e21e1834708093d","score":"0.6931043","text":"public function get_product_list() {\n ConnectionManager::config('default');\n $conn = ConnectionManager::get('default');\n $product_list = $conn->query(\"SELECT OfferItems.id AS `OfferItems__id`, Products.productName AS `Products__productName`\"\n . \" FROM offer_items OfferItems INNER JOIN order_items OrderItems ON OrderItems.id = (OfferItems.order_items_id)\"\n . \" INNER JOIN products Products ON Products.id = (OrderItems.products_id) LIMIT 20 OFFSET 0\");\n \n $offerItem_product_list = [];\n foreach ($product_list as $prod){\n $offerItem_product_list[$prod['OfferItems__id']] = $prod['Products__productName'];\n }\n return $offerItem_product_list;\n }","title":""},{"docid":"0e345a9bd9904afdee91dd8feddb87df","score":"0.6883061","text":"public function getProducts()\n {\n return [\n [\n 'sku' => 'burger',\n 'name' => 'Burger & fries',\n 'image' => '/img/burger.jpg',\n 'price' => 13.95\n ],\n [\n 'sku' => 'pizza',\n 'name' => 'Pizza funghi',\n 'image' => '/img/pizza.jpg',\n 'price' => 9.95\n ],\n [\n 'sku' => 'burrito',\n 'name' => 'Burrito chicken',\n 'image' => '/img/burrito.jpg',\n 'price' => 9.95\n ],\n [\n 'sku' => 'steak',\n 'name' => 'Steak',\n 'image' => '/img/steak.jpg',\n 'price' => 29.95\n ],\n [\n 'sku' => 'noodles',\n 'name' => 'Noodles',\n 'image' => '/img/noodles.jpg',\n 'price' => 12.95\n ],\n [\n 'sku' => 'sandwich',\n 'name' => 'Sandwich',\n 'image' => '/img/sandwich.jpg',\n 'price' => 4.95\n ]\n ];\n }","title":""},{"docid":"b56b92aaec015e601821851120024a09","score":"0.68804926","text":"public function getCartProducts(){\r\n $this->products = array();\r\n $ids = $this->session->getProductIds();\r\n try {\r\n if (!empty($ids)){\r\n include_once __DIR__.'\\..\\cruds\\productCrud.php';\r\n $productCrud = new ProductCrud($this->crud);\r\n $dbProducts = $productCrud->readProductsByIds($ids);\r\n $this->priceTotal = 0;\r\n foreach($dbProducts as $product){\r\n include_once __DIR__.'\\..\\objects\\productWithExtra.php';\r\n $product = new ProductWithExtra($product);\r\n $amount = $this->session->getProductQuantity($product->product_id);\r\n $product->setAmount($amount);\r\n $product->calculateSubTotal();\r\n $this->products[$product->product_id] = $product;\r\n $this->priceTotal += $product->subTotal;\r\n }\r\n }\r\n }\r\n catch (PDOException $e){\r\n $this->exception = DATABASE_ERROR;\r\n $this->debugLog('Getting all the cart products failed with the following error: '.$e->getMessage());\r\n $this->debugLog = 'Getting all the cart products failed with the following error: '.$e->getMessage();\r\n }\r\n }","title":""},{"docid":"633c1ad40d755789b7ca82c1f771fab8","score":"0.6853182","text":"public function getProducts(){\n\t\t$products = array();\n\t\t$sql = \"SELECT * FROM product WHERE price_sale = 0 OR price_sale = null OR price_sale = '' ORDER BY id_product DESC\";\n\t\t$res = DB::query($sql);\n\t\twhile($row = mysqli_fetch_assoc($res)){\n\t\t\t$products[] = new Product (\n\t\t\t\t$row['id_product'],\n\t\t\t\t$row['id_category'],\n\t\t\t\t$row['name'],\n\t\t\t\t$row['description'],\n\t\t\t\t$row['price'],\n\t\t\t\t$row['price_sale'],\n\t\t\t\t\"\", \"\"/*,\n\t\t\t\t$row['frame_product'],\n\t\t\t\t$row['frame_type']*/\n\t\t\t);\n\t\t}\n\t\tDB::free($res);\n\t\treturn $products;\n\t}","title":""},{"docid":"edac6aacccb370161a42c587e0668015","score":"0.68433166","text":"function ProductList(){\n\n\t\t$products = $this->extend('alterProducts');\n\n\t\tif(count($products)) {\n\t\t\t$products = array_pop($products);\n\t\t}\n\n\t\treturn $products ? $products : Product::get();\n\t}","title":""},{"docid":"04b07a0f85199df8c8e5c63e3b2d3906","score":"0.682912","text":"public function getBasketItems() {\n return $this->itemsInBasket;\n }","title":""},{"docid":"589a7734bc8cf3d5ece0d5e002ce9660","score":"0.67826444","text":"public function getAllProducts()\n {\n $sql = \"SELECT * FROM stock\";\n $query = $this->db->prepare($sql);\n $query->execute();\n\n return $query->fetchAll();\n }","title":""},{"docid":"a0e5dc8d94f557dc9b572664335478de","score":"0.678151","text":"public function getProducts() {\n\t\treturn clone $this->products;\n\t}","title":""},{"docid":"08af2e9e79a866ec7c058a47ebe83131","score":"0.67811185","text":"function getProducts(){\n\t\t$id = $_GET['id'];\n\t\t$ptid = $_GET['elem_id'];\n\t\t\n\t\t$sql = \"SELECT id, name FROM products WHERE visible > 0 AND product_type_id = \".$ptid;\n\t\t$rows = sql_getRows($sql, true);\n\t\treturn $rows;\n\t}","title":""},{"docid":"5888d09c9d5cb7b9ab4fbc103f669156","score":"0.6776694","text":"public function getProducts()\n {\n $products = Product::all();\n return $products->toArray();\n }","title":""},{"docid":"ab22b7fba5507797177d532a9f2421f5","score":"0.6755004","text":"public function getProducts(){\n \n $prod = new ProductDb();\n $products = $prod->getDb();\n \n return $products;\n \n }","title":""},{"docid":"6306fe53ec424d38c6d27555f47aee76","score":"0.6754584","text":"public function getBasket()\n {\n return oxRegistry::getSession()->getBasket();\n }","title":""},{"docid":"03412356d45f5672da4108333b9c3e83","score":"0.6753174","text":"protected function product() {\n\t\tif ($this->method == 'GET') {\n\n\t\t\t$db = new \\PDO(\n\t\t\t\t'mysql:host=mysqldev.jetair.be;port=3306;dbname=*****;charset=UTF8;',\n\t\t\t\t'****',\n\t\t\t\t'****'\n\t\t\t);\n\n\t\t\t$repo = new ProductRepository( $db );\n\n\t\t\t$id = null;\n\t\t\tif( isset( $this->args[0] ) ) {\n\t\t\t\t$id = $this->args[0];\n\t\t\t}\n\n\t\t\t$type = null;\n\t\t\tif( isset( $this->args[1] ) ) {\n\t\t\t\t$type = $this->args[1];\n\t\t\t}\n\n\t\t\t$productList = $repo->find( $id, $type );\n\n\t\t\treturn $productList->toArray();\n\t\t} else {\n\t\t\treturn \"Only accepts GET requests\";\n\t\t}\n\t}","title":""},{"docid":"1eb3242565952c03fa50a3e495878c16","score":"0.67332095","text":"public function getProducts()\n {\n // Connects to db\n $this->db->connect();\n\n // SQL statement\n $sql = \"SELECT * FROM products;\";\n\n // Executes SQL statement and fetches data from db\n $result = $this->db->executeFetchAll($sql);\n\n // Returns result\n return $result;\n }","title":""},{"docid":"f55279ab3b7b26bc80e24678179807b4","score":"0.6732141","text":"public function getProducts(): Products\n {\n return $this->get('products');\n }","title":""},{"docid":"32db104cd7219ce56b7e104af96e4d31","score":"0.67061317","text":"public function products()\n {\n $products = [];\n foreach ($this->orders as $key => $order) {\n // foreach ($order->product as $key => $value) {\n $products[] = $order->product;\n // }\n }\n return collect($products);\n }","title":""},{"docid":"94a60f2820b25e5f14609708201643eb","score":"0.66984123","text":"public function cartProducts()\n {\n $collection = collect(Arr::pluck($this->items, 'product_id'));\n\n return $collection->map(function($product_id, $key){\n return Product::findOrFail($product_id);\n });\n }","title":""},{"docid":"1d4735342ace018b61784038300e4f53","score":"0.6696786","text":"public function getAll()\n {\n $top = DB::findAll($this->table, 'ORDER BY pos DESC');\n\n if($top && count($top) > 0){\n $ids = array_map(function($item){ return $item['product_id']; }, $top);\n return $this->slim->Products->getByIds(array_unique($ids));\n }else{\n return array();\n }\n }","title":""},{"docid":"135f0afbf326806bc4e34652493735cf","score":"0.6686938","text":"public function getBasket(): Basket;","title":""},{"docid":"700a4a7de02ed58ad360917b3884d5a0","score":"0.6686846","text":"public static function getAllProducts() {\n\t\t$db = new Database();\n\t\t$q = \"select * from table(get_products(1,99999))\";\n\t\t$result = $db->fetchAll($q);\n\t\treturn $result;\n }","title":""},{"docid":"1931b8a174938d3236ae17f5d7199261","score":"0.66847587","text":"public function getAllProducts() {\r\n $prod = $this->createQueryBuilder('p');\r\n\r\n return $prod\r\n ->select('p')\r\n ->orderBy('p.id', 'DESC')\r\n ->setMaxResults(25)\r\n ->getQuery()\r\n ->getResult()\r\n ;\r\n }","title":""},{"docid":"bf3aff4f36e6563fc0e1d7c9c7138319","score":"0.66659933","text":"public function getProductList(){\n $products = Bigcommerce::getProducts();\n $product_list = array();\n foreach($products as $product) {\n $product_list[] = array(\n 'id' => $product->id,\n 'name' => $product->name,\n );\n }\n \n return $product_list;\n }","title":""},{"docid":"ea2738a5cca9b314d5acdabd56b222e1","score":"0.66532665","text":"public function displayBasket() {\r\n return $this->items;\r\n }","title":""},{"docid":"548aaf166050b5c22f5b9b6e9b186cd6","score":"0.66476226","text":"public function shopProducts() {\n\t\t\n\t\tif (!$this->_shop_products) {\n\t\t\t$spModel = Base::getModel('Shop_Products');\n\t\t\t$select = $spModel->select()\n\t\t\t ->where('common_user_id = ?', $this->id)\n\t\t\t\t\t ->where('active = ?', 1);\n\t\t\t\t\t\t\n\t\t\t$shop_products = $spModel->fetchAll($select);\n\t\t\t\n\t\t\t$this->_shop_products = $shop_products;\n\t\t}\n\t\t\n\t\treturn $this->_shop_products;\n\t}","title":""},{"docid":"49cb6d32b8b51881381ab1fbcdf5af1d","score":"0.6629912","text":"public function listProducts() : array;","title":""},{"docid":"7242612fc22280e9ac471b9fe1d102c7","score":"0.6629731","text":"public function get_product()\n {\n $ret=$this->latest()->get();\n return $ret;\n }","title":""},{"docid":"46d05599251ce55bc3d1364db5b68809","score":"0.6627053","text":"public function getProductsToBuy()\n {\n $productsToBuy = array();\n $this->authenticate();\n\n $currentWeekSheet = $this->getCurrentWeekSheet();\n if ($currentWeekSheet) {\n $firstColumn = $this->getLetterForColumn(count($this->leftHeaders));\n $lastColumn = $this->getLetterForColumn(\n $currentWeekSheet->getProperties()->getGridProperties()->getColumnCount() - 2\n );\n\n $products = $this->ggService->spreadsheets_values->get(\n $this->spreadsheetId,\n $this->getSheetTitle() . '!' . $firstColumn . '1:' . $lastColumn . '1',\n array('valueRenderOption' => 'FORMULA')\n );\n $quantities = $this->ggService->spreadsheets_values->get(\n $this->spreadsheetId,\n $this->getSheetTitle() . '!' . $firstColumn . '4:' . $lastColumn . '4'\n );\n\n if (!empty($products)) {\n $products = $products->values[0];\n $quantities = $quantities->values[0];\n $length = count($quantities);\n for ($i = 0; $i < $length; $i++) {\n $qty = $quantities[$i];\n if ($qty !== \"\") {\n $product = $products[$i];\n\n $id = -1;\n\n preg_match('/\\/(\\d+)-.*\\.html/', $product, $matches);\n if (!empty($matches)) {\n $id = $matches[1];\n }\n\n $productsToBuy [] = array('id' => $id, 'qty' => $qty);\n }\n }\n }\n }\n\n return $productsToBuy;\n }","title":""},{"docid":"8b62ab628176600f167494b91005a019","score":"0.6626187","text":"function rz_GetBasketItems() {\n\t$arItems = array();\n\n\tif (!CModule::IncludeModule('sale')) return $arItems;\n\n\t$bUseCatalog = CModule::IncludeModule('catalog');\n\n\t\\CSaleBasket::UpdateBasketPrices(\\CSaleBasket::GetBasketUserID(), SITE_ID);\n\t/* Check Values Begin */\n\n\t$arSelFields = array(\"ID\", \"CALLBACK_FUNC\", \"MODULE\", \"PRODUCT_ID\", \"QUANTITY\", \"DELAY\",\n\t\t\"CAN_BUY\", \"PRICE\", \"WEIGHT\", \"NAME\", \"CURRENCY\", \"CATALOG_XML_ID\", \"VAT_RATE\",\n\t\t\"NOTES\", \"DISCOUNT_PRICE\", \"PRODUCT_PROVIDER_CLASS\", \"DIMENSIONS\", \"TYPE\", \"SET_PARENT_ID\", \"DETAIL_PAGE_URL\"\n\t);\n\t$dbBasketItems = \\CSaleBasket::GetList(\n\t\t\tarray(\"ID\" => \"ASC\"),\n\t\t\tarray(\n\t\t\t\t\t\"FUSER_ID\" => \\CSaleBasket::GetBasketUserID(),\n\t\t\t\t\t\"LID\" => SITE_ID,\n\t\t\t\t\t\"ORDER_ID\" => \"NULL\"\n\t\t\t\t),\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\t$arSelFields\n\t\t);\n\twhile ($arItem = $dbBasketItems->GetNext())\n\t{\n\t\tif ($arItem[\"DELAY\"] == \"N\" && $arItem[\"CAN_BUY\"] == \"Y\")\n\t\t{\n\t\t\t$arItem[\"PRICE\"] = roundEx($arItem[\"PRICE\"], SALE_VALUE_PRECISION);\n\t\t\t$arItem[\"QUANTITY\"] = DoubleVal($arItem[\"QUANTITY\"]);\n\n\t\t\t$arItem[\"WEIGHT\"] = DoubleVal($arItem[\"WEIGHT\"]);\n\t\t\t$arItem[\"VAT_RATE\"] = DoubleVal($arItem[\"VAT_RATE\"]);\n\n\t\t\t$arDim = unserialize($arItem[\"~DIMENSIONS\"]);\n\n\t\t\tif(is_array($arDim))\n\t\t\t{\n\t\t\t\t$arItem[\"DIMENSIONS\"] = $arDim;\n\t\t\t\tunset($arItem[\"~DIMENSIONS\"]);\n\t\t\t}\n\n\t\t\tif($arItem[\"VAT_RATE\"] > 0 && !\\CSaleBasketHelper::isSetItem($arItem))\n\t\t\t{\n\t\t\t\t//$arItem[\"VAT_VALUE\"] = roundEx((($arItem[\"PRICE\"] / ($arItem[\"VAT_RATE\"] +1)) * $arItem[\"VAT_RATE\"]), SALE_VALUE_PRECISION);\n\t\t\t\t$arItem[\"VAT_VALUE\"] = roundEx((($arItem[\"PRICE\"] / ($arItem[\"VAT_RATE\"] +1)) * $arItem[\"VAT_RATE\"]), SALE_VALUE_PRECISION);\n\t\t\t}\n\n\t\t\tif($arItem[\"DISCOUNT_PRICE\"] > 0)\n\t\t\t{\n\t\t\t\t$arItem[\"DISCOUNT_PRICE_PERCENT\"] = $arItem[\"DISCOUNT_PRICE\"]*100 / ($arItem[\"DISCOUNT_PRICE\"] + $arItem[\"PRICE\"]);\n\t\t\t\t$arItem[\"DISCOUNT_PRICE_PERCENT_FORMATED\"] = roundEx($arItem[\"DISCOUNT_PRICE_PERCENT\"], 0).\"%\";\n\t\t\t}\n\n\t\t\t$arItem[\"PROPS\"] = array();\n\t\t\t$dbProp = \\CSaleBasket::GetPropsList(array(\"SORT\" => \"ASC\", \"ID\" => \"ASC\"), array(\"BASKET_ID\" => $arItem[\"ID\"], \"!CODE\" => array(\"CATALOG.XML_ID\", \"PRODUCT.XML_ID\")));\n\t\t\twhile($arProp = $dbProp -> GetNext())\n\t\t\t{\n\t\t\t\tif (array_key_exists('BASKET_ID', $arProp))\n\t\t\t\t{\n\t\t\t\t\tunset($arProp['BASKET_ID']);\n\t\t\t\t}\n\t\t\t\tif (array_key_exists('~BASKET_ID', $arProp))\n\t\t\t\t{\n\t\t\t\t\tunset($arProp['~BASKET_ID']);\n\t\t\t\t}\n\n\t\t\t\t$arProp = array_filter($arProp, array(\"CSaleBasketHelper\", \"filterFields\"));\n\n\t\t\t\t$arItem[\"PROPS\"][] = $arProp;\n\t\t\t}\n\n\t\t\tif (!\\CSaleBasketHelper::isSetItem($arItem))\n\t\t\t{\n\t\t\t\t$DISCOUNT_PRICE_ALL += $arItem[\"DISCOUNT_PRICE\"] * $arItem[\"QUANTITY\"];\n\t\t\t\t$arItem[\"DISCOUNT_PRICE\"] = roundEx($arItem[\"DISCOUNT_PRICE\"], SALE_VALUE_PRECISION);\n\t\t\t}\n\n\t\t\tif (\\CSaleBasketHelper::isSetItem($arItem))\n\t\t\t\t$arSetParentWeight[$arItem[\"SET_PARENT_ID\"]] += $arItem[\"WEIGHT\"] * $arItem['QUANTITY'];\n\n\t\t\t$arItems[] = $arItem;\n\t\t}\n\n\t\t// count weight for set parent products\n\t\tforeach ($arItems as &$arItem)\n\t\t{\n\t\t\tif (\\CSaleBasketHelper::isSetParent($arItem))\n\t\t\t{\n\t\t\t\t$arItem[\"WEIGHT\"] = $arSetParentWeight[$arItem[\"ID\"]] / $arItem[\"QUANTITY\"];\n\t\t\t}\n\t\t}\n\n\t\tif ($bUseCatalog)\n\t\t{\n\t\t\t$arParent = \\CCatalogSku::GetProductInfo($arItem[\"PRODUCT_ID\"]);\n\t\t\tif ($arParent)\n\t\t\t{\n\t\t\t\t$arElementId[] = $arParent[\"ID\"];\n\t\t\t\t$arSku2Parent[$arItem[\"PRODUCT_ID\"]] = $arParent[\"ID\"];\n\t\t\t}\n\t\t}\n\t\tunset($arItem);\n\t}\n\n\tif (!empty($arResult[\"BASKET_ITEMS\"]))\n\t{\n\t\tif ($bUseCatalog)\n\t\t\t$arResult[\"BASKET_ITEMS\"] = getMeasures($arResult[\"BASKET_ITEMS\"]); // get measures\n\t}\n\n\t// use later only items not part of the sets\n\tforeach ($arItems as $id => $arItem)\n\t{\n\t\tif (\\CSaleBasketHelper::isSetItem($arItem))\n\t\t\tunset($arItems[$id]);\n\t}\n\n\treturn $arItems;\n}","title":""},{"docid":"b4eb907c90422661bac190db2ee0b845","score":"0.660074","text":"public function getAll(){\n \t$products = Product::all();\n\n \treturn $products;\n }","title":""},{"docid":"20e3bf7682f55ba30960b4788f7068f9","score":"0.659676","text":"public function getOrderProduct() {\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$filter = $jinput->get('filter');\n\t\t$q = \"SELECT DISTINCT order_item_sku AS product_sku, order_item_name AS product_name\n\t\t\t\tFROM #__virtuemart_order_items o\n\t\t\t\tWHERE (order_item_sku LIKE \".$db->Quote('%'.$filter.'%').\"\n\t\t\t\t\tOR order_item_name LIKE \".$db->Quote('%'.$filter.'%').\")\n\t\t\t\tORDER BY order_item_name\n\t\t\t\tLIMIT 10;\";\n\t\t$db->setQuery($q);\n\t\treturn $db->loadObjectList();\n\t}","title":""},{"docid":"9acdf3e7e47452e6d49281c5150ed5e6","score":"0.659441","text":"function getAllProducts()\r\n\t{\r\n\r\n\t\t$sql = \"SELECT `ProductID`,`ProductName`, `ProductDesc`, `UnitsInStock`, `Image`, `UnitPrice` FROM `ply1`.`Products`\";\r\n\t\t$rs = $this->executeQuery($sql, $_SERVER[\"SCRIPT_NAME\"]);\r\n\t\treturn $rs;\r\n\t}","title":""},{"docid":"c595f06c9c586a436e29724dd32a9253","score":"0.6589046","text":"public function getProductos(){\n /* Aca tambien, los corchetes luego de productos estan de mas.\n return $this->productos[];\n * La forma correcta es */\n return $this->productos;\n }","title":""},{"docid":"7fdf7edd226b88c40617183f28cb36af","score":"0.6588649","text":"protected function getAllProducts() {\n $sql = \"SELECT * FROM products\";\n $results = $this->connect()->query($sql);\n $numRows = $results->num_rows;\n\n if ($numRows > 0) {\n while ($row = $results->fetch_assoc()) {\n $data[] = $row;\n }\n return $data;\n }\n\n }","title":""},{"docid":"4f029d4066e4e0386a92e8c38bc5cde9","score":"0.6583599","text":"public function getProducts()\n\t{\n\t\t$fields = array('id_product', 'reference', 'name', 'meta_title', 'meta_description','description', 'description_short', 'link_rewrite');\n\n\t\t$start = true;\n\t\t$page = 0;\n\t\twhile($start)\n\t\t{\n\t\t\t$limit1 = $page * 3;\n\t\t\t$opt = array('resource' => 'products', 'limit' => $limit1.',3');\n\n\t\t\t$xml = $this->prestashop->get($opt);\n\n\t\t $resources = $xml->products->children();\n\n\t\t if($resources)\n\t\t\t foreach ($resources as $resource)\n\t\t\t {\n\t\t\t \t $opt = Array();\n\t\t\t \t $id_product = $resource->attributes();\n\t\t\t \t $opt['resource'] = 'products';\n\t\t\t \t $opt['id'] = $id_product;\n\t\t\t \t $xml = $this->prestashop->get($opt);\n\n\t\t\t \t $o['resource'] = 'images/products';\n\t\t\t \t $o['display'] = 'full';\n\t\t\t \t $o['id'] = $id_product;\n\t\t\t \t $m = $this->prestashop->get($o);\n\n\t\t\t \t var_dump($m);\n\n\t\t\t \t exit;\n\n\t\t\t \t $data = array();\n\n\t\t\t \t $data['id_product'] = $id_product;\n\t\t\t \t $data['reference'] = utf8_decode($xml->product->reference);\n\t\t\t \t $data['name'] = utf8_decode($xml->product->name->language[0]);\n\t\t\t \t $data['meta_title'] = utf8_decode($xml->product->meta_title->language[0]);\n\t\t\t \t $data['meta_description'] = utf8_decode($xml->product->meta_description->language[0]);\n\t\t\t \t $data['description'] = utf8_decode($xml->product->description->language[0]);\n\t\t\t \t $data['description_short'] = utf8_decode($xml->product->description_short->language[0]);\n\t\t\t \t $data['link_rewrite'] = utf8_decode($xml->product->link_rewrite->language[0]);\n\n\t\t\t \t if($this->checkIsset($id_product, 'product', $fields))\n\t\t\t \t \t$this->update($id_product, 'product', $fields, $data);\n\t\t\t \t else\n\t\t\t \t \t$this->add($id_product, 'product', $fields, $data);\n\n\t\t\t }\n\t\t\telse\n\t\t\t{\n\t\t\t\t$start = false;\n\t\t\t}\n\t\t\t$page ++;\n\t\t}\n\t}","title":""},{"docid":"6bf6be9f1b9907faac3d5dfcc2658107","score":"0.65795004","text":"public function getAllProducts(){\n\t\t\n\t\t$sql = 'SELECT * FROM Products';\n\n\treturn $this->getEntityManager()->getConnection()->executeQuery($sql)->fetchAll();\n\t}","title":""},{"docid":"ad99b0a5932d5d00f9de22a257d1ca36","score":"0.6553689","text":"public function getProductsAndProfileByShop()\n {\n $res = array();\n foreach ($this->product_list as $product) {\n if ($product['id_ebay_profile']) {\n $ebay_profile = new EbayProfile((int)$product['id_ebay_profile']);\n } else {\n $sql = 'SELECT epr.`id_ebay_profile`\n\t\t\t\tFROM `'._DB_PREFIX_.'ebay_product` epr\n\t\t\t\tWHERE epr.`id_product` = '.(int)$product['id_product'];\n $id_ebay_profile = (int)Db::getInstance()->getValue($sql);\n if ($id_ebay_profile) {\n $ebay_profile = new EbayProfile($id_ebay_profile);\n } else {\n // case where the row in ebay_product has disappeared like if the product has been removed from eBay before sync\n if (version_compare(_PS_VERSION_, '1.5', '>') && Shop::isFeatureActive()) {\n $sql = 'SELECT `id_ebay_profile`\n\t\t\t\t\t\t\tFROM `'._DB_PREFIX_.'ebay_profile` ep\n\t\t\t\t\t\t\tLEFT JOIN `'._DB_PREFIX_.'product_shop` ps\n\t\t\t\t\t\t\tON ep.`id_shop` = ps.`id_shop`\n\t\t\t\t\t\t\tAND ps.`id_product` = '.(int)$product['id_product'];\n $id_ebay_profile = (int)Db::getInstance()->getValue($sql);\n $ebay_profile = new EbayProfile($id_ebay_profile);\n } else {\n $ebay_profile = EbayProfile::getCurrent();\n }\n }\n }\n\n if (!isset($res[$ebay_profile->id_shop])) {\n $res[$ebay_profile->id_shop] = array(\n 'id_ebay_profiles' => array($ebay_profile->id),\n 'id_products' => array(),\n );\n } elseif (!in_array($ebay_profile->id, $res[$ebay_profile->id_shop]['id_ebay_profiles'])) {\n $res[$ebay_profile->id_shop]['id_ebay_profiles'][] = $ebay_profile->id;\n }\n\n // $res[$ebay_profile->id_shop]['id_products'][] = $product['id_product'];\n $res[$ebay_profile->id_shop]['id_products'][] = array(\n 'id_product' => $product['id_product'],\n 'id_product_attribute' => $product['id_product_attribute'],\n );\n }\n\n return $res;\n }","title":""},{"docid":"a6b210dbb780145803f23e7f3a114180","score":"0.6550909","text":"public function getAllProduct() {\n try {\n $sql = \"SELECT * FROM product ORDER BY id DESC LIMIT ?,?\";\n $stmt = $this->db->prepare($sql);\n $stmt->bindValue(1, ($current_page - 1) * $num_products_on_each_page, PDO::PARAM_INT);\n $stmt->bindValue(2, $num_products_on_each_page, PDO::PARAM_INT);\n $stmt->execute();\n\n $products = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n return $products;\n } catch (Exception $e) {\n die(\"Oh noes! There's an error in the query!\");\n }\n }","title":""},{"docid":"22c6e30ca1b085eff549da773fa9c376","score":"0.65506214","text":"public function getProducts() \n {\n return $this->_fields['Products']['FieldValue'];\n }","title":""},{"docid":"c61a2524f3289cd940a7de3534500fcd","score":"0.6545158","text":"public function getTopSellingProducts()\n {\n $databaseResults = $this -> databaseInstance -> queryTopSellingProducts(\"products\" , \"order\");\n $resultsDecoded= Utility::jsonEncodeThenDecode($databaseResults);\n\n return $this -> productMapper($resultsDecoded);\n }","title":""},{"docid":"ec659651ac0998467947921f6f8b0ded","score":"0.65406996","text":"public function getAllProductsForCache()\n\t{\n\t\t$this->resetLocalCacheData('allProducts');\n\t\t$products = $this->getProducts(array(), array('join' => Brivium_Store_Model_Product::FETCH_FULL));\n\t\treturn $products;\n\t}","title":""},{"docid":"e8bedec53238c1996b20012871cd305f","score":"0.65386724","text":"public function getProductList()\n {\n $products = Product::latest()->paginate(5);\n\n return $products;\n }","title":""},{"docid":"de3f772b38beb7255dca9a4ac1d74ec1","score":"0.65339315","text":"function _affilinet_GetBasketItems(){\n\t$soapLogon = new SoapClient(WSDL_LOGON);\n\t$token = $soapLogon->Logon(array(\n\t 'Username' => USERNAME,\n\t 'Password' => PASSWORD,\n\t 'WebServiceType' => 'Publisher'\n\t));\n\t \n\t// Set parameters\n\t$basketId = ''; // ID of the basket you want to retrieve the items from\n\t \n\t// Send request to Publisher Statistics Service\n\t$soapRequest = new SoapClient(WSDL_PUBSTATS);\n\t$response = $soapRequest->GetBasketItems(array(\n\t 'CredentialToken' => $token,\n\t 'BasketId' => $basketId\n\t));\n\t\n\treturn $response;\n}","title":""},{"docid":"ca88d3bf099496af307cacc6b9613977","score":"0.6533833","text":"public function readAllProducts(){\r\n $sql = 'SELECT * FROM products';\r\n $param = array();\r\n include_once __DIR__.'/../objects/Product.php';\r\n return $this->crud->readMultiRows($sql, $param, 'product_id', 'Product');\r\n }","title":""},{"docid":"db053a8e5db1cb676e47eb328823e719","score":"0.6519234","text":"public function getAllProducts(){\n\t\t$res = $this->con->query(\"SELECT * FROM producto\".$this->order());\n\t\t\n\t\t$resultado = array();\n\t\twhile( $fila = $res->fetch_assoc() ){\n\t\t\t$resultado[] = $fila;\n\t\t}\n\t\treturn $resultado;\n\t\t\n\t}","title":""},{"docid":"8c6cd8e22b052519075642c766ffd567","score":"0.65116173","text":"public function getProduct()\n {\n $query = \"SELECT * FROM produk WHERE stock > 0\";\n\n $this->db->query($query);\n $this->db->execute();\n\n return $this->db->resultSet();\n }","title":""},{"docid":"1f7a3be872da1900ff2e344a17ba83d2","score":"0.65068775","text":"public function index()\n {\n //\n return auth()->user()->products()->get();\n }","title":""},{"docid":"5251c048c0c661a6779db08aa587f1f7","score":"0.6505019","text":"function dcs_dropship_getProducts($pageNumber=1,$category=\"all\",$searchTerms=\"\")\r\n{\r\n\tglobal $dropshipProducts;\r\n\r\n\tif( $dropshopProducts == NULL )\r\n\t{\r\n\t\tdcs_dropship_loadProducts($pageNumber,$category,$searchTerms);\r\n\t}\r\n\r\n\treturn $dropshipProducts;\r\n}","title":""},{"docid":"63c14347e5b5fe5246a1a9d5e87e64f6","score":"0.6500783","text":"private function query_products() {\n $query = \"SELECT Product2.Id, Product2.Name, Product2.ProductCode, Product2.Description, \"\n . \"Product2.isActiveOnlineProduct__c, PricebookEntry.UnitPrice FROM PricebookEntry\";\n\n $url = $this->instance_url . \"/services/data/\" . $this->api_version . \"/query?q=\" . urlencode( $query );\n\n return $this->get_response( $url );\n }","title":""},{"docid":"09b85eeb0aaf5d0c4d996e81fe4e6e9a","score":"0.6499381","text":"public function getAllProduct()\n {\n $currentProductArray = (new ProductsModel())->findAll();\n if ($currentProductArray == []) {\n return $this->respond([\n \"status\" => \"failed\",\n \"message\" => \"Il n'y a aucun produit pour le moment!\"\n ]);\n } else {\n return $this->respond($currentProductArray);\n }\n }","title":""},{"docid":"29a4627eb2d9b3966e4a646038bb0a82","score":"0.64945906","text":"public static function all() { \n return session(\"products\")? session(\"products\") : [];\n }","title":""},{"docid":"6f65ecdb94751c95b3a4c393dc909ba2","score":"0.64943093","text":"public function productsAll()\n {\n $prods = products::all();\n\n return $prods->toJson();\n\n }","title":""},{"docid":"e9dab2d0b79725637ced4fca4819ac3b","score":"0.6493638","text":"public function getAllProducts()\n {\n $product = new QueryBuilder();\n $products = $product->all('product');\n\n return $products;\n }","title":""},{"docid":"a0e4be5fb616cb4d93b6f7a6e0bbfdd5","score":"0.64884895","text":"private function getProducts()\n {\n $query = $this->product->select();\n\n if (isset($this->selectedCategory) && $this->selectedCategory->count()) {\n $query->whereIn('categories_id', $this->productRetrieveConstraintCategories($this->selectedCategory)->pluck('id'));\n }\n\n if (isset($this->selectedBrand) && $this->selectedBrand->count()) {\n $query->whereIn('brands_id', $this->selectedBrand->pluck('id'));\n }\n\n if (isset($this->selectedModel) && $this->selectedModel->count()) {\n $query->whereHas('deviceModel', function ($query) {\n $query->whereIn('id', $this->selectedModel->pluck('id'));\n });\n }\n\n if (isset($this->selectedColor) && $this->selectedColor->count()) {\n $query->where(function ($query) {\n $query->whereIn('colors_id', $this->selectedColor->pluck('id'))\n ->orWhereNull('colors_id');\n });\n }\n\n if (isset($this->selectedQuality) && $this->selectedQuality->count()) {\n $query->whereIn('quality_id', $this->selectedQuality->pluck('id'));\n }\n\n $query->with('primaryImage');\n\n $query->with(['storageProduct' => function ($query) {\n $query->whereRaw('stock_quantity > reserved_quantity');\n }]);\n\n $query->with(['vendorProduct' => function ($query) {\n $query->where('stock_quantity', '>', 0);\n }]);\n\n $query->with('productBadge.badge');\n\n if (auth('web')->check()) {\n $query->with(['favouriteProduct' => function ($query) {\n $query->where('users_id', auth('web')->user()->id);\n }]);\n }\n\n return $this->isPaginable ? $query->paginate(config('shop.products_per_page')) : $query->get();\n }","title":""},{"docid":"d59bbc9d7b3ce0b70d1baf70a9f05a05","score":"0.64816785","text":"public function getProductos() {\n return $this->productos;\n }","title":""},{"docid":"53ab00d95115e327a5c89f8711262e04","score":"0.64806294","text":"public function get_order_product_all(){\n \t\t$this->db->from($this->table17);\n \t\t$this->db->where('id');\n \t\t$query = $this->db->get();\n \t\treturn $query->row();\n \t}","title":""},{"docid":"cde37d2a3d1d852b0322cfe32f5ebf85","score":"0.6470234","text":"public function getBasket(){\n $sql = \"SELECT tb.id_items, sum(tb.amount) as qty,ti.name,ti.price as ttl from tbl_basket as tb inner join tbl_items as ti on tb.id_items = ti.id\nWHERE cookie_user = ? group by tb.id_items, ti.name \";\n try {\n $result = $this->_db->prepare($sql);\n $result->execute(array($_COOKIE['cookie_user']));\n $fetchData = $result->fetchAll();\n return $fetchData;\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n }","title":""},{"docid":"b279b4dc9cc7e27bdd8a2acc85392012","score":"0.6465306","text":"public static function getProducts()\n {\n if (isset($_SESSION['products'])) {\n return $_SESSION['products'];\n }\n return false;\n }","title":""},{"docid":"b279b4dc9cc7e27bdd8a2acc85392012","score":"0.6465306","text":"public static function getProducts()\n {\n if (isset($_SESSION['products'])) {\n return $_SESSION['products'];\n }\n return false;\n }","title":""},{"docid":"b279b4dc9cc7e27bdd8a2acc85392012","score":"0.6465306","text":"public static function getProducts()\n {\n if (isset($_SESSION['products'])) {\n return $_SESSION['products'];\n }\n return false;\n }","title":""},{"docid":"be73489020f3d28f1db17bd1799f601b","score":"0.6462441","text":"public function getProduct()\n\t{\n\t\t$sql=\"select * from products\";\n\t\treturn $this->query($sql);\n\t}","title":""},{"docid":"007f8791a9355600307ae51474aaf249","score":"0.64566356","text":"public function populate($basket);","title":""},{"docid":"19d553b9ed529461b3eca08d5b564bed","score":"0.6444449","text":"public function getAllActiveProducts()\n {\n }","title":""},{"docid":"6980bfb15d05f32562c3359f96bdc1a7","score":"0.6438036","text":"public function get_products() {\n $response = $this->query_products();\n\n $error_response = $this->get_error_status( $response );\n if ( $error_response == \"solved\" ) {\n $response = $this->query_products();\n } else if ( $error_response == \"failed\" ) {\n return null;\n }\n\n try {\n $products = array();\n foreach( $response[\"records\"] as $product ) {\n if ( !$this->is_product_id_in_array( $product[\"Product2\"][\"Id\"], $products ) ) {\n array_push( $products, array(\n \"id\" => trim( $product[\"Product2\"][\"Id\"] ),\n \"name\" => $product[\"Product2\"][\"Name\"],\n \"code\" => $product[\"Product2\"][\"ProductCode\"],\n \"unit_price\" => $product[\"UnitPrice\"],\n \"is_active\" => $product[\"Product2\"][\"isActiveOnlineProduct__c\"],\n \"wand_id\" => $product[\"Product2\"][\"Product_4D_Wand_ID__c\"]\n ) );\n }\n }\n return $products;\n } catch( Exception $e ) {\n return null;\n }\n }","title":""},{"docid":"3d71d37968511c88667d62769626ea82","score":"0.64379996","text":"public function actionGetproducts(){\n $result = [\n 'products' => [],\n 'maxpage' => 0,\n ];\n if(Yii::$app->request->get('category_id')){\n $model_product = new ProductsSearch();\n $model_product->category_id = (int)Yii::$app->request->get('category_id');\n if(Yii::$app->request->get('get_cart')){\n $carts = Yii::$app->session->has(CartEnum::CART_KEY) ? Yii::$app->session->get(CartEnum::CART_KEY) :[] ;\n $products = $model_product->getProductsByCategory($carts);\n }\n else{\n $products = $model_product->getProductsByCategory();\n }\n $result['products'] = isset($products['products']) ? $products['products'] : [];\n $result['maxpage'] = isset($products['maxpage']) ? $products['maxpage'] : [];\n }\n return $result;\n }","title":""},{"docid":"796807859be48becd6fce25c9c343f24","score":"0.6436832","text":"public function productsAction(){\n\t\tif(!$this->getPageNoIsValid('Product')) {\n\t\t\t$this->json = '';\n\t\t} else {\n\t\t\t$this->json = array_merge($this->json,$this->getProducts());\n\t\t}\n\t}","title":""},{"docid":"84f62f27647d9ab4645e3daf0807459a","score":"0.6428402","text":"public function getProductsList() {\n return self::$productsList;\n }","title":""},{"docid":"32c1bfd128bec9c9eb314d0a64ba9f3e","score":"0.642184","text":"public function getProductsFeed()\n {\n $product_id = $this->getRequest()->getQuery('product_id');\n $stores = array();\n $storeCollection = Mage::getModel('core/store')->getCollection();\n\n if (empty($product_id)) {\n\n $offset = $this->getRequest()->getQuery('offset');\n\n if ($offset == null) {\n echo '{\n \"success\": false,\n \"data\": {\n \"error_code\": \"QW-4003\",\n \"error\": \"Offset not set.\"\n }\n }'\n ;\n exit;\n }\n\n $limit = $this->getRequest()->getQuery('limit');\n\n if ($limit == null) {\n echo '{\n \"success\": false,\n \"data\": {\n \"error_code\": \"QW-4004\",\n \"error\": \"Limit not set.\"\n }\n }'\n ;\n exit;\n }\n //Magento uses pages and not offset amount. We calculate the page based on the limit and offset provided\n if ($offset == 0) {\n $page = 1;\n } else {\n $page = ($offset / $limit) + 1;\n }\n\n $store = Mage::app()->getStore();\n $store_id = $store->getId();\n $productslist = Mage::getResourceModel('catalog/product_collection')->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', 4)->setPage($page, $limit)->addStoreFilter($store_id);\n $json = array();\n\n foreach ($productslist as $theproduct) {\n $productId = $theproduct->getId();\n $product = Mage::getModel('catalog/product')->load($productId);\n $maincat = $subcats = '';\n $cats = $product->getCategoryIds();\n $category_ids = array();\n\n foreach ($cats as $category_id) {\n $_cat = Mage::getModel('catalog/category')->load($category_id);\n if ($_cat->getIsActive()) {\n $category_ids[] = $category_id;\n }\n }\n\n $product_data = array();\n $product_data['product_id'] = $productId;\n $parentIds = null;\n if ($product->getTypeId() == \"simple\") {\n $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product->getId()); // check for grouped product\n if (!$parentIds)\n $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId()); //check for config product\n }\n\n /* if (!empty($parentIds)) {\n $product_data['parent_product_id'] = $parentIds[0];\n } else {\n $product_data['parent_product_id'] = null;\n } */\n $product_data['product_name'] = $product->getName();\n $product_data['sku_number'] = $product->getSku();\n $product_data['created'] = date(\"Y-m-d H:i:s\", Mage::getModel(\"core/date\")->timestamp($product->getCreatedAt()));\n $product_data['updated'] = date(\"Y-m-d H:i:s\", Mage::getModel(\"core/date\")->timestamp($product->getUpdatedAt()));\n\n if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL) {\n $product_data['downloadable'] = true;\n } else {\n $product_data['downloadable'] = false;\n }\n\n if ($product->getGtin()) {\n $product_data['gtin'] = $product->getGtin();\n $product_data['unique_identifier'] = true;\n } else {\n $product_data['gtin'] = null;\n $product_data['unique_identifier'] = false;\n }\n\n $product_data['mpn'] = $product->getMpn();\n $product_data['brand'] = $product->getBrand();\n $product_data['weight'] = $product->getWeight();\n $product_data['weight_unit'] = 'kg';\n if ($maincat) {\n $product_data['primary_category'] = $maincat;\n }\n $product_data['category_ids'] = $category_ids;\n $product_data['product_url'] = $product->getProductUrl();\n $product_data['product_image_urls'] = array();\n\n if ($product->getImage()) {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n $mainimage->main = true;\n $product_data['product_image_urls'][] = $mainimage;\n }\n\n foreach ($product->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $product_data['product_image_urls'][] = $subimage;\n }\n\n //$product_data['ProductImageURL'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\n $product_data['short_product_description'][$language] = (substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getShortDescription()), 0)) ? substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getShortDescription()), 0) : \"No short description available\";\n $product_data['long_product_description'][$language] = (substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getDescription()), 0)) ? substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getDescription()), 0) : \"No description available\";\n }\n $product_data['sale_price'] = number_format((float) $product->getFinalPrice(), 2, '.', '');\n $product_data['retail_price'] = number_format((float) $product->getPrice(), 2, '.', '');\n\n if ($product->getMspCashback()) {\n $product_data['cashback'] = $product->getMspCashback();\n }\n //$product_data['UniversalProductCode'] = $product->getData('upc'); //need variable\n /**\n * Get product tax rule\n * */\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($product->getTaxClassId(), $rule_data['product_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n $tax_rule->name = $rule_data['code'];\n }\n }\n }\n };\n\n $tax_rule->id = $product->getTaxClassId();\n $tax_rule->rules = $rules;\n $product_data['tax'] = $tax_rule;\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\n $product_data['stock'] = (INT) $stockItem->getQty();\n\n $meta_data = array();\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n if ($productdata->getMetaTitle() && $productdata->getMetaKeyword() && $productdata->getMetaDescription()) {\n $meta_data['title'][$language] = $productdata->getMetaTitle();\n $meta_data['keyword'][$language] = $productdata->getMetaKeyword();\n $meta_data['description'][$language] = $productdata->getMetaDescription();\n }\n }\n\n if (!empty($meta_data)) {\n $product_data['metadata'] = $meta_data;\n }\n\n $attr = array();\n $attributes = $product->getAttributes();\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_condition = $product->getAttributeText($attribute->getAttributeCode());\n $_coditionDefault = $product->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product);\n $attribute = Mage::getModel('eav/entity_attribute')->load($attribute->getAttributeId());\n $langlabels = $attribute->getStoreLabels();\n\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n\n if (!empty($attr)) {\n $product_data['attributes'] = $attr;\n }\n if ($product->isConfigurable()) {\n $variants = array();\n /*\n * GET product variant (options) and add them as variants\n */\n $collection = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null, $product);\n $childIds = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product->getId());\n if ($collection) {\n $processed = array();\n foreach ($collection as $childproduct) {\n if (!in_array($childproduct->getId(), $processed)) {\n\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\n $variant = new stdclass();\n\n $variant->product_id = $childproduct->getId();\n $processed[] = $childproduct->getId();\n $variant->sku_number = $childproduct->getSku();\n if ($childproduct->getGtin()) {\n $variant->gtin = $childproduct->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $childproduct->getMpn();\n if ($childproduct->getImage()) {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n $childimages = $childproduct->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($childproduct->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $product->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $product->getPrice(), 2, '.', '');\n $variant->weight = $product_child->getWeight();\n $variant->weight_unit = 'kg';\n\n if ($product_child->getMspCashback()) {\n $variant->cashback = $product_child->getMspCashback();\n }\n\n $attrchild = array();\n $attributes = $childproduct->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n } else {\n $processed = array();\n\n foreach ($childIds[0] as $key => $childid) {\n $childproduct = Mage::getModel('catalog/product')->load($childid);\n\n if (!in_array($childproduct->getId(), $processed)) {\n $variant = new stdclass();\n $variant->product_id = $childproduct->getId();\n $processed[] = $childproduct->getId();\n $variant->sku_number = $childproduct->getSku();\n if ($childproduct->getGtin()) {\n $variant->gtin = $childproduct->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $childproduct->getMpn();\n\n if ($childproduct->getImage() && $childproduct->getImage() != 'no_selection') {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n $childimages = $childproduct->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($childproduct->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $product->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $product->getPrice(), 2, '.', '');\n $variant->weight = $childproduct->getWeight();\n $variant->weight_unit = 'kg';\n\n if ($childproduct->getMspCashback()) {\n $variant->cashback = $childproduct->getMspCashback();\n }\n\n $attrchild = array();\n $attributes = $childproduct->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n }\n $product_data['variants'] = $variants;\n } elseif ($product->getTypeId() == \"grouped\") {\n $variants = array();\n /*\n * GET product variant (options) and add them as variants\n */\n\n $collection = Mage::getModel('catalog/product_type_grouped')->getAssociatedProductCollection($product);\n\n $processed = array();\n $prices = array();\n foreach ($collection as $childproduct) {\n\n if (!in_array($childproduct->getId(), $processed)) {\n\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\n\n $variant = new stdclass();\n $variant->product_id = $product_child->getId();\n $processed[] = $product_child->getId();\n $variant->sku_number = $product_child->getSku();\n if ($product_child->getGtin()) {\n $variant->gtin = $product_child->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $product_child->getMpn();\n\n if ($product_child->getImage() && $product_child->getImage() != 'no_selection') {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product_child->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n\n $childimages = $product_child->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($product_child->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_child->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $product_child->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $product_child->getPrice(), 2, '.', '');\n $variant->weight = $product_child->getWeight();\n $variant->weight_unit = 'kg';\n if ($product_child->getMspCashback()) {\n $variant->cashback = $product_child->getMspCashback();\n }\n\n\n\n $prices[] = $variant->sale_price;\n\n $attrchild = array();\n $attributes = $product_child->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $product_child->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product_child);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n\n /**\n * Get child product tax rule. We need to set this as the main product is of type grouped and does not have this value.\n * */\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($product_child->getTaxClassId(), $rule_data['product_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n $tax_rule->name = $rule_data['code'];\n }\n }\n }\n };\n\n $tax_rule->id = $product_child->getTaxClassId();\n $tax_rule->rules = $rules;\n $product_data['tax'] = $tax_rule;\n\n\n $product_data['from_price'] = min($prices);\n $product_data['variants'] = $variants;\n }\n\n $options = $product->getOptions();\n\n if (!empty($options)) {\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\n foreach ($productdata->getOptions() as $value) {\n if (is_object($value)) {\n $optionobjects = $value->getValues();\n $values = array();\n foreach ($optionobjects as $options) {\n $data = $options->getData();\n $optiondata = new stdclass();\n $optiondata->id = $data['option_type_id'];\n $optiondata->label = $data['title'];\n $optiondata->pricing = $data['price'];\n $optiondata->price_type = $data['price_type'];\n $values[] = $optiondata;\n if (!empty($data['option_type_id'])) {\n $product_data['options']['global_options'][$language][$value->getTitle()] = array(\n 'id' => $data['option_id'],\n 'type' => 'custom',\n //'label' => $value->getTitle(),\n 'values' => $values\n );\n }\n }\n }\n }\n }\n }\n if ($product->getName() != null && $product->getTypeId() != \"bundle\" && $product->getTypeId() != \"downloadable\") {\n $json[] = $product_data;\n }\n }\n } elseif (!empty($product_id)) {\n $stores = array();\n $storeCollection = Mage::getModel('core/store')->getCollection();\n\n $json = array();\n $product = Mage::getModel('catalog/product')->load($product_id);\n\n if ($product->getTypeId() == \"bundle\" || $product->getTypeId() == \"downloadable\") {\n echo '{\n \"success\": false,\n \"data\": {\n \"error_code\": \"QW-4005\",\n \"error\": \"Product type not supported.\"\n }\n }'\n ;\n exit;\n }\n\n $maincat = $subcats = '';\n $cats = $product->getCategoryIds();\n $category_ids = array();\n foreach ($cats as $category_id) {\n $_cat = Mage::getModel('catalog/category')->load($category_id);\n if ($_cat->getIsActive()) {\n $category_ids[] = $category_id;\n }\n }\n\n $product_data = array();\n $product_data['product_id'] = $product_id;\n $parentIds = null;\n if ($product->getTypeId() == \"simple\") {\n $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product->getId()); // check for grouped product\n if (!$parentIds)\n $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId()); //check for config product\n }\n\n /* if (!empty($parentIds)) {\n $product_data['parent_product_id'] = $parentIds[0];\n } else {\n $product_data['parent_product_id'] = null;\n } */\n $product_data['product_name'] = $product->getName();\n $product_data['sku_number'] = $product->getSku();\n $product_data['created'] = date(\"Y-m-d H:i:s\", Mage::getModel(\"core/date\")->timestamp($product->getCreatedAt()));\n $product_data['updated'] = date(\"Y-m-d H:i:s\", Mage::getModel(\"core/date\")->timestamp($product->getUpdatedAt()));\n\n if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL) {\n $product_data['downloadable'] = true;\n } else {\n $product_data['downloadable'] = false;\n }\n\n if ($product->getGtin()) {\n $product_data['gtin'] = $product->getGtin();\n $product_data['unique_identifier'] = true;\n } else {\n $product_data['gtin'] = null;\n $product_data['unique_identifier'] = false;\n }\n\n $product_data['mpn'] = $product->getMpn();\n $product_data['brand'] = $product->getBrand();\n $product_data['weight'] = $product->getWeight();\n $product_data['weight_unit'] = 'kg';\n $product_data['category_ids'] = $category_ids;\n $product_data['product_url'] = $product->getProductUrl();\n $product_data['product_image_urls'] = array();\n\n if ($product->getImage()) {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\n $mainimage->main = true;\n $product_data['product_image_urls'][] = $mainimage;\n }\n\n foreach ($product->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $product_data['product_image_urls'][] = $subimage;\n }\n\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\n $product_data['short_product_description'][$language] = (substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getShortDescription()), 0)) ? substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getShortDescription()), 0) : \"No short description available\";\n $product_data['long_product_description'][$language] = (substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getDescription()), 0)) ? substr(iconv(\"UTF-8\", \"UTF-8//IGNORE\", $productdata->getDescription()), 0) : \"No description available\";\n }\n\n $product_data['sale_price'] = number_format((float) $product->getFinalPrice(), 2, '.', '');\n $product_data['retail_price'] = number_format((float) $product->getPrice(), 2, '.', '');\n\n if ($product->getMspCashback()) {\n $product_data['cashback'] = $product->getMspCashback();\n }\n\n\n //$product_data['UniversalProductCode'] = $product->getData('upc'); //need variable\n\n /**\n * Get product tax rule\n * */\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($product->getTaxClassId(), $rule_data['product_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n $tax_rule->name = $rule_data['code'];\n }\n }\n }\n };\n\n $tax_rule->id = $product->getTaxClassId();\n $tax_rule->rules = $rules;\n $product_data['tax'] = $tax_rule;\n\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id);\n $product_data['stock'] = (INT) $stockItem->getQty();\n\n $meta_data = array();\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n if ($productdata->getMetaTitle() && $productdata->getMetaKeyword() && $productdata->getMetaDescription()) {\n $meta_data['title'][$language] = $productdata->getMetaTitle();\n $meta_data['keyword'][$language] = $productdata->getMetaKeyword();\n $meta_data['description'][$language] = $productdata->getMetaDescription();\n }\n }\n\n if (!empty($meta_data)) {\n $product_data['metadata'] = $meta_data;\n }\n $attr = array();\n $attributes = $product->getAttributes();\n\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_condition = $product->getAttributeText($attribute->getAttributeCode());\n $_coditionDefault = $product->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product);\n $attribute = Mage::getModel('eav/entity_attribute')->load($attribute->getAttributeId());\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attr)) {\n $product_data['attributes'] = $attr;\n }\n\n if ($product->isConfigurable()) {\n $variants = array();\n /*\n * GET product variant (options) and add them as variants\n */\n $collection = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null, $product);\n\n $processed = array();\n\n foreach ($collection as $childproduct) {\n\n if (!in_array($childproduct->getId(), $processed)) {\n\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\n\n\n $variant = new stdclass();\n $variant->product_id = $childproduct->getId();\n $processed[] = $childproduct->getId();\n $variant->sku_number = $childproduct->getSku();\n if ($childproduct->getGtin()) {\n $variant->gtin = $childproduct->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $childproduct->getMpn();\n\n if ($childproduct->getImage() && $childproduct->getImage() != 'no_selection') {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n\n $childimages = $childproduct->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($childproduct->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $childproduct->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $childproduct->getPrice(), 2, '.', '');\n $variant->weight = $product_child->getWeight();\n $variant->weight_unit = 'kg';\n\n if ($product_child->getMspCashback()) {\n $variant->cashback = $product_child->getMspCashback();\n }\n\n\n $attrchild = array();\n $attributes = $childproduct->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n $product_data['variants'] = $variants;\n } elseif ($product->getTypeId() == \"grouped\") {\n $variants = array();\n /*\n * GET product variant (options) and add them as variants\n */\n\n $collection = Mage::getModel('catalog/product_type_grouped')->getAssociatedProductCollection($product);\n\n $processed = array();\n $prices = array();\n foreach ($collection as $childproduct) {\n\n if (!in_array($childproduct->getId(), $processed)) {\n\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\n\n $variant = new stdclass();\n $variant->product_id = $product_child->getId();\n $processed[] = $product_child->getId();\n $variant->sku_number = $product_child->getSku();\n if ($product_child->getGtin()) {\n $variant->gtin = $product_child->getGtin();\n $variant->unique_identifier = true;\n } else {\n $variant->gtin = null;\n $variant->unique_identifier = false;\n }\n $product_data['mpn'] = $product_child->getMpn();\n\n if ($product_child->getImage() && $product_child->getImage() != 'no_selection') {\n $mainimage = new stdclass();\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product_child->getImage();\n $mainimage->main = true;\n $variant->product_image_urls = array();\n $variant->product_image_urls[] = $mainimage;\n }\n\n $childimages = $product_child->getMediaGalleryImages();\n if (!empty($childimages)) {\n foreach ($product_child->getMediaGalleryImages() as $image) {\n $subimage = new stdclass();\n $subimage->url = $image->getUrl();\n $subimage->main = false;\n $variant->product_image_urls[] = $subimage;\n }\n }\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_child->getId());\n $variant->stock = (INT) $stockItem->getQty();\n $variant->sale_price = number_format((float) $product_child->getFinalPrice(), 2, '.', '');\n $variant->retail_price = number_format((float) $product_child->getPrice(), 2, '.', '');\n $variant->weight = $product_child->getWeight();\n $variant->weight_unit = 'kg';\n if ($product_child->getMspCashback()) {\n $variant->cashback = $product_child->getMspCashback();\n }\n\n\n\n $prices[] = $variant->sale_price;\n\n $attrchild = array();\n $attributes = $product_child->getAttributes();\n //print_r($attributes);exit;\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n Mage::app()->setCurrentStore($store_id);\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\n foreach ($attributes as $attribute) {\n if ($attribute->getIsVisibleOnFront()) {\n $_coditionDefault = $product_child->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product_child);\n $langlabels = $attribute->getStoreLabels();\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\n } elseif ($_coditionDefault) {\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\n }\n }\n }\n }\n if (!empty($attrchild)) {\n $variant->attributes = $attrchild;\n }\n $variants[] = $variant;\n }\n }\n\n /**\n * Get child product tax rule. We need to set this as the main product is of type grouped and does not have this value.\n * */\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\n $taxCalculation = Mage::getModel('tax/calculation');\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\n $tax_rule = new stdclass();\n $rules = array();\n\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\n if ($collection->getSize()) {\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\n }\n if ($collection->getSize()) {\n foreach ($collection as $rule) {\n $rule_data = $rule->getData();\n if (in_array($product_child->getTaxClassId(), $rule_data['product_tax_classes'])) {\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\n $rate_info = $rate->getData();\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\n $tax_rule->name = $rule_data['code'];\n }\n }\n }\n };\n\n $tax_rule->id = $product_child->getTaxClassId();\n $tax_rule->rules = $rules;\n $product_data['tax'] = $tax_rule;\n\n\n $product_data['from_price'] = min($prices);\n $product_data['variants'] = $variants;\n }\n\n\n $options = $product->getOptions();\n\n if (!empty($options)) {\n foreach ($storeCollection as $store) {\n $store_id = $store->getId();\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\n foreach ($productdata->getOptions() as $value) {\n if (is_object($value)) {\n $optionobjects = $value->getValues();\n $values = array();\n foreach ($optionobjects as $options) {\n $data = $options->getData();\n $optiondata = new stdclass();\n $optiondata->id = $data['option_type_id'];\n $optiondata->label = $data['title'];\n $optiondata->pricing = $data['price'];\n $optiondata->price_type = $data['price_type'];\n $values[] = $optiondata;\n\n if (!empty($data['option_type_id'])) {\n $product_data['options']['global_options'][$language][$value->getTitle()] = array(\n 'id' => $data['option_id'],\n 'type' => 'custom',\n //'label' => $value->getTitle(),\n 'values' => $values\n );\n }\n }\n }\n }\n }\n }\n if ($product->getName() != null) {\n $json[] = $product_data;\n }\n }\n return json_encode($json);\n }","title":""},{"docid":"9713a6a1199d9d50e44e2ec0e979130f","score":"0.6421514","text":"public function list_product()\n\t{\n\t\t$sql = $this->pdo->prepare(\"select * from product_tbl\");\n\t\t$sql->execute();\n\t\t$row = $sql->fetchAll(PDO::FETCH_OBJ);\n\t\treturn $row;\n\t}","title":""},{"docid":"99ac862c64deedeba1fd9c5fa0a4654b","score":"0.64145136","text":"function getProductList() {\n try {\n global $db;\n\n $sql = \"SELECT product_id, product, image \";\n $sql .= \"FROM `products`;\";\n\n $stmt = $db->prepare($sql);\n $stmt->execute();\n\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $results;\n\n } catch (PDOException $e) { die(\"Failed to get product listings\"); };\n }","title":""},{"docid":"31076a3b3bac5c205ef11b510a6f383e","score":"0.64063555","text":"public function getAllProducts() {\n\n // Creates a new array to contain each product\n $products = array();\n\n // The SQL statement to get each product\n $sql = 'SELECT products.idProduct, products.name, products.description, products.price FROM products';\n\n\n // Queries the statement\n $result = $this->con->query($sql);\n\n // Puts each product into the products array\n while($row = $result->fetch_object()) {\n $products[] = new Product($row->idProduct, $row->name, $row->description, $row->price);\n }\n\n // Returns the products\n return $products;\n }","title":""},{"docid":"0f47aae16193a9e00d5a8627d941944a","score":"0.64004266","text":"public function getProductList_bind() {\n\t\t$query = $this->db->select(array('p.product_id', 'pd.name', 'pd.slug', 'p.sku',\n\t\t\t'p.price', 'pd.description', 'p.image'))\n\t\t\t->from('products as p')\n\t\t\t->join('product_desc as pd', 'pd.product_id = p.product_id', 'inner')\n\t\t\t->where('p.status', $this->_status)\n\t\t\t->limit($this->_pageNumber, $this->_offset)\n\t\t\t->get();\n\t\treturn $query->result_array();\n\t}","title":""}],"string":"[\n {\n \"docid\": \"c20340ae0b2093bfd11c5cd28344e710\",\n \"score\": \"0.7853867\",\n \"text\": \"public function getProducts();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c20340ae0b2093bfd11c5cd28344e710\",\n \"score\": \"0.7853867\",\n \"text\": \"public function getProducts();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02d6fce4ab517131df0ff855d9779e0b\",\n \"score\": \"0.74980664\",\n \"text\": \"public function GetProducts()\\n\\t{\\t$this->products = array();\\n\\t\\tif ($this->id)\\n\\t\\t{\\t$sql = 'SELECT bundleproducts.* FROM bundleproducts WHERE bid=' . $this->id . ' ORDER BY listorder, bpid';\\n\\t\\t\\tif ($result = $this->db->Query($sql))\\n\\t\\t\\t{\\twhile ($row = $this->db->FetchArray($result))\\n\\t\\t\\t\\t{\\t$this->products[$row['bpid']] = $row;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fdd98d0a4afca48de7d1453633ce921\",\n \"score\": \"0.74925333\",\n \"text\": \"public function getProducts()\\n {\\n \\treturn $this->products;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"111ab3f4ed84c6711fc9af89d0808a0b\",\n \"score\": \"0.7473313\",\n \"text\": \"private function getProducts()\\n {\\n $params = [\\n \\t\\t'catalogType' => 'generic'\\n ];\\n\\n $itemList = $this->request->get(config('srs.product_base_url') . 'products/branch/' . $this->branchId, ['query' => $params]);\\n\\n $this->productList = json_decode($itemList->getBody(), true);\\n\\n if (ine($this->productList, 'branchItemList')) {\\n foreach (array_chunk($this->productList['branchItemList'], 50) as $items) {\\n $priceList = $this->getPrice($items);\\n $this->saveFinancialProducts($items, $priceList);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01ea5cf8a69e1aac3cc4a89612406264\",\n \"score\": \"0.7458694\",\n \"text\": \"private function getProducts()\\n {\\n $products = [];\\n return $products;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fbc826e72a2a2816cbce951ad09fc04\",\n \"score\": \"0.7338712\",\n \"text\": \"public function getProducts()\\n {\\n return $this->products;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cee5e67887c4a9b6a8e68ae0d6c0ffb6\",\n \"score\": \"0.73139757\",\n \"text\": \"public function getProducts()\\n {\\n return $this->products()->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8752fce0980829eec73b1ac590b1342b\",\n \"score\": \"0.73\",\n \"text\": \"public function getProducts(): array;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b530a4cd4c4b120c8e6ad966b03d33b9\",\n \"score\": \"0.72998136\",\n \"text\": \"public function getProducts()\\n\\t{\\n\\t\\t$strCall = 'products';\\n\\t\\t\\n\\t\\treturn $this->doApiCall($strCall);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95c87d8d2b859aaac0251acc566b6bd2\",\n \"score\": \"0.7299392\",\n \"text\": \"public function get_products() {\\n return $this->getProducts();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87b245ee1c38bb1feda54fc133e4f94a\",\n \"score\": \"0.7259361\",\n \"text\": \"public function products();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87b245ee1c38bb1feda54fc133e4f94a\",\n \"score\": \"0.7259361\",\n \"text\": \"public function products();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86d4600be5dec745d0935da813dbb1d6\",\n \"score\": \"0.7221556\",\n \"text\": \"public function getProducts() {\\n return $this->products;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12b1166b28c7ca66883ecfe1c0f0e21e\",\n \"score\": \"0.72114897\",\n \"text\": \"abstract protected function getProductList();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ced676da7f373b0c1b8f93b80be72ac9\",\n \"score\": \"0.72017443\",\n \"text\": \"public function getProducts() {\\n $sql = \\\"SELECT DISTINCT p.pid, p.item_name FROM {$this->_table}product p\\n INNER JOIN {$this->_table}product_certified c ON(p.pid=c.product_id)\\n WHERE p.is_auction='yes' AND is_certified=1 AND c.product_store_id=\\\".$_SESSION['StoreID'] ;\\n $this->_db->execute_query($sql);\\n return $this->_db->fetch_records(true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f77eb03687541436ea960d72e44eb2b\",\n \"score\": \"0.71769\",\n \"text\": \"public function getProducts()\\n {\\n return $this->items[Entity::TYPE_PRODUCT];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13a9e303af00f6be002233b5c107c0e1\",\n \"score\": \"0.71572244\",\n \"text\": \"public function getProducts()\\n\\t{\\n\\t\\treturn $this->products;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0db6bc8b005a698d4f1a4d8b08e5bb51\",\n \"score\": \"0.7133101\",\n \"text\": \"public function getShopProducts(){\\r\\n $this->products = array();\\r\\n try {\\r\\n include_once __DIR__.'\\\\..\\\\cruds\\\\productCrud.php';\\r\\n $productCrud = new ProductCrud($this->crud);\\r\\n $dbProducts = $productCrud->readAllProducts();\\r\\n $this->products = $dbProducts;\\r\\n }\\r\\n catch (PDOException $e){\\r\\n $this->exception = DATABASE_ERROR;\\r\\n $this->debugLog('Getting all the products failed with the following error: '. $e->getMessage());\\r\\n $this->debugLog = 'Getting all the products failed with the following error: '. $e->getMessage();\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5586662f3dd17c1d27378a87f10ab22d\",\n \"score\": \"0.7128864\",\n \"text\": \"public function getProducts(){\\n $user = $this->_db->query('SELECT * FROM productos');\\n return $user->fetchall();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3a29e16a4eb9dd8fe92fe69c18ef8f1\",\n \"score\": \"0.71284795\",\n \"text\": \"public function getProducts() {\\r\\n\\t\\treturn $this->products;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e90c917ecaa8e54cea053e95a6967cab\",\n \"score\": \"0.7041086\",\n \"text\": \"public function getProducts() {\\n\\t\\t$client = $this->createClient();\\n\\t\\t$url = 'https://' . $this->_domain . '/admin/products.json';\\n\\t\\t$response = $client->request($url);\\n\\t\\t$products = json_decode($response['body']);\\n\\t\\treturn $products->products;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3605b48a0c8cbf709e42a10374edf22\",\n \"score\": \"0.70137614\",\n \"text\": \"public function getAllProducts(){\\n\\t\\treturn $this->products->latest()->get();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb297ce3d1545d12aa1542c3177be282\",\n \"score\": \"0.6982878\",\n \"text\": \"public function getProduct();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccc6017da99925a53000d81bc6091ad9\",\n \"score\": \"0.69776046\",\n \"text\": \"public function get(): array\\n {\\n return $this->allProducts;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b0f288db6e35113ad247161d1d114205\",\n \"score\": \"0.6968937\",\n \"text\": \"public function listProducts()\\n {\\n return $this->request('GET', '/products');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7b14fdae44300c2951a8fd62661d5dc\",\n \"score\": \"0.6947384\",\n \"text\": \"public function getProducts()\\n {\\n\\n $databaseResults = $this -> databaseInstance -> selectAllProductsReverse(\\\"products\\\");\\n $resultsDecoded= Utility::jsonEncodeThenDecode($databaseResults);\\n\\n return $this -> productMapper($resultsDecoded);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d741c799340393765c6c2e94b9da24ab\",\n \"score\": \"0.6947009\",\n \"text\": \"public function getAll(){\\n return $this->product->all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2564c4fb4da187ef80b9e57e46fe9fc8\",\n \"score\": \"0.6940918\",\n \"text\": \"public function fetchProducts(): array;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fab2ad9e533e40f63e21e1834708093d\",\n \"score\": \"0.6931043\",\n \"text\": \"public function get_product_list() {\\n ConnectionManager::config('default');\\n $conn = ConnectionManager::get('default');\\n $product_list = $conn->query(\\\"SELECT OfferItems.id AS `OfferItems__id`, Products.productName AS `Products__productName`\\\"\\n . \\\" FROM offer_items OfferItems INNER JOIN order_items OrderItems ON OrderItems.id = (OfferItems.order_items_id)\\\"\\n . \\\" INNER JOIN products Products ON Products.id = (OrderItems.products_id) LIMIT 20 OFFSET 0\\\");\\n \\n $offerItem_product_list = [];\\n foreach ($product_list as $prod){\\n $offerItem_product_list[$prod['OfferItems__id']] = $prod['Products__productName'];\\n }\\n return $offerItem_product_list;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e345a9bd9904afdee91dd8feddb87df\",\n \"score\": \"0.6883061\",\n \"text\": \"public function getProducts()\\n {\\n return [\\n [\\n 'sku' => 'burger',\\n 'name' => 'Burger & fries',\\n 'image' => '/img/burger.jpg',\\n 'price' => 13.95\\n ],\\n [\\n 'sku' => 'pizza',\\n 'name' => 'Pizza funghi',\\n 'image' => '/img/pizza.jpg',\\n 'price' => 9.95\\n ],\\n [\\n 'sku' => 'burrito',\\n 'name' => 'Burrito chicken',\\n 'image' => '/img/burrito.jpg',\\n 'price' => 9.95\\n ],\\n [\\n 'sku' => 'steak',\\n 'name' => 'Steak',\\n 'image' => '/img/steak.jpg',\\n 'price' => 29.95\\n ],\\n [\\n 'sku' => 'noodles',\\n 'name' => 'Noodles',\\n 'image' => '/img/noodles.jpg',\\n 'price' => 12.95\\n ],\\n [\\n 'sku' => 'sandwich',\\n 'name' => 'Sandwich',\\n 'image' => '/img/sandwich.jpg',\\n 'price' => 4.95\\n ]\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b56b92aaec015e601821851120024a09\",\n \"score\": \"0.68804926\",\n \"text\": \"public function getCartProducts(){\\r\\n $this->products = array();\\r\\n $ids = $this->session->getProductIds();\\r\\n try {\\r\\n if (!empty($ids)){\\r\\n include_once __DIR__.'\\\\..\\\\cruds\\\\productCrud.php';\\r\\n $productCrud = new ProductCrud($this->crud);\\r\\n $dbProducts = $productCrud->readProductsByIds($ids);\\r\\n $this->priceTotal = 0;\\r\\n foreach($dbProducts as $product){\\r\\n include_once __DIR__.'\\\\..\\\\objects\\\\productWithExtra.php';\\r\\n $product = new ProductWithExtra($product);\\r\\n $amount = $this->session->getProductQuantity($product->product_id);\\r\\n $product->setAmount($amount);\\r\\n $product->calculateSubTotal();\\r\\n $this->products[$product->product_id] = $product;\\r\\n $this->priceTotal += $product->subTotal;\\r\\n }\\r\\n }\\r\\n }\\r\\n catch (PDOException $e){\\r\\n $this->exception = DATABASE_ERROR;\\r\\n $this->debugLog('Getting all the cart products failed with the following error: '.$e->getMessage());\\r\\n $this->debugLog = 'Getting all the cart products failed with the following error: '.$e->getMessage();\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"633c1ad40d755789b7ca82c1f771fab8\",\n \"score\": \"0.6853182\",\n \"text\": \"public function getProducts(){\\n\\t\\t$products = array();\\n\\t\\t$sql = \\\"SELECT * FROM product WHERE price_sale = 0 OR price_sale = null OR price_sale = '' ORDER BY id_product DESC\\\";\\n\\t\\t$res = DB::query($sql);\\n\\t\\twhile($row = mysqli_fetch_assoc($res)){\\n\\t\\t\\t$products[] = new Product (\\n\\t\\t\\t\\t$row['id_product'],\\n\\t\\t\\t\\t$row['id_category'],\\n\\t\\t\\t\\t$row['name'],\\n\\t\\t\\t\\t$row['description'],\\n\\t\\t\\t\\t$row['price'],\\n\\t\\t\\t\\t$row['price_sale'],\\n\\t\\t\\t\\t\\\"\\\", \\\"\\\"/*,\\n\\t\\t\\t\\t$row['frame_product'],\\n\\t\\t\\t\\t$row['frame_type']*/\\n\\t\\t\\t);\\n\\t\\t}\\n\\t\\tDB::free($res);\\n\\t\\treturn $products;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edac6aacccb370161a42c587e0668015\",\n \"score\": \"0.68433166\",\n \"text\": \"function ProductList(){\\n\\n\\t\\t$products = $this->extend('alterProducts');\\n\\n\\t\\tif(count($products)) {\\n\\t\\t\\t$products = array_pop($products);\\n\\t\\t}\\n\\n\\t\\treturn $products ? $products : Product::get();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04b07a0f85199df8c8e5c63e3b2d3906\",\n \"score\": \"0.682912\",\n \"text\": \"public function getBasketItems() {\\n return $this->itemsInBasket;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"589a7734bc8cf3d5ece0d5e002ce9660\",\n \"score\": \"0.67826444\",\n \"text\": \"public function getAllProducts()\\n {\\n $sql = \\\"SELECT * FROM stock\\\";\\n $query = $this->db->prepare($sql);\\n $query->execute();\\n\\n return $query->fetchAll();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0e5dc8d94f557dc9b572664335478de\",\n \"score\": \"0.678151\",\n \"text\": \"public function getProducts() {\\n\\t\\treturn clone $this->products;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08af2e9e79a866ec7c058a47ebe83131\",\n \"score\": \"0.67811185\",\n \"text\": \"function getProducts(){\\n\\t\\t$id = $_GET['id'];\\n\\t\\t$ptid = $_GET['elem_id'];\\n\\t\\t\\n\\t\\t$sql = \\\"SELECT id, name FROM products WHERE visible > 0 AND product_type_id = \\\".$ptid;\\n\\t\\t$rows = sql_getRows($sql, true);\\n\\t\\treturn $rows;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5888d09c9d5cb7b9ab4fbc103f669156\",\n \"score\": \"0.6776694\",\n \"text\": \"public function getProducts()\\n {\\n $products = Product::all();\\n return $products->toArray();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab22b7fba5507797177d532a9f2421f5\",\n \"score\": \"0.6755004\",\n \"text\": \"public function getProducts(){\\n \\n $prod = new ProductDb();\\n $products = $prod->getDb();\\n \\n return $products;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6306fe53ec424d38c6d27555f47aee76\",\n \"score\": \"0.6754584\",\n \"text\": \"public function getBasket()\\n {\\n return oxRegistry::getSession()->getBasket();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03412356d45f5672da4108333b9c3e83\",\n \"score\": \"0.6753174\",\n \"text\": \"protected function product() {\\n\\t\\tif ($this->method == 'GET') {\\n\\n\\t\\t\\t$db = new \\\\PDO(\\n\\t\\t\\t\\t'mysql:host=mysqldev.jetair.be;port=3306;dbname=*****;charset=UTF8;',\\n\\t\\t\\t\\t'****',\\n\\t\\t\\t\\t'****'\\n\\t\\t\\t);\\n\\n\\t\\t\\t$repo = new ProductRepository( $db );\\n\\n\\t\\t\\t$id = null;\\n\\t\\t\\tif( isset( $this->args[0] ) ) {\\n\\t\\t\\t\\t$id = $this->args[0];\\n\\t\\t\\t}\\n\\n\\t\\t\\t$type = null;\\n\\t\\t\\tif( isset( $this->args[1] ) ) {\\n\\t\\t\\t\\t$type = $this->args[1];\\n\\t\\t\\t}\\n\\n\\t\\t\\t$productList = $repo->find( $id, $type );\\n\\n\\t\\t\\treturn $productList->toArray();\\n\\t\\t} else {\\n\\t\\t\\treturn \\\"Only accepts GET requests\\\";\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1eb3242565952c03fa50a3e495878c16\",\n \"score\": \"0.67332095\",\n \"text\": \"public function getProducts()\\n {\\n // Connects to db\\n $this->db->connect();\\n\\n // SQL statement\\n $sql = \\\"SELECT * FROM products;\\\";\\n\\n // Executes SQL statement and fetches data from db\\n $result = $this->db->executeFetchAll($sql);\\n\\n // Returns result\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f55279ab3b7b26bc80e24678179807b4\",\n \"score\": \"0.6732141\",\n \"text\": \"public function getProducts(): Products\\n {\\n return $this->get('products');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32db104cd7219ce56b7e104af96e4d31\",\n \"score\": \"0.67061317\",\n \"text\": \"public function products()\\n {\\n $products = [];\\n foreach ($this->orders as $key => $order) {\\n // foreach ($order->product as $key => $value) {\\n $products[] = $order->product;\\n // }\\n }\\n return collect($products);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94a60f2820b25e5f14609708201643eb\",\n \"score\": \"0.66984123\",\n \"text\": \"public function cartProducts()\\n {\\n $collection = collect(Arr::pluck($this->items, 'product_id'));\\n\\n return $collection->map(function($product_id, $key){\\n return Product::findOrFail($product_id);\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d4735342ace018b61784038300e4f53\",\n \"score\": \"0.6696786\",\n \"text\": \"public function getAll()\\n {\\n $top = DB::findAll($this->table, 'ORDER BY pos DESC');\\n\\n if($top && count($top) > 0){\\n $ids = array_map(function($item){ return $item['product_id']; }, $top);\\n return $this->slim->Products->getByIds(array_unique($ids));\\n }else{\\n return array();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"135f0afbf326806bc4e34652493735cf\",\n \"score\": \"0.6686938\",\n \"text\": \"public function getBasket(): Basket;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"700a4a7de02ed58ad360917b3884d5a0\",\n \"score\": \"0.6686846\",\n \"text\": \"public static function getAllProducts() {\\n\\t\\t$db = new Database();\\n\\t\\t$q = \\\"select * from table(get_products(1,99999))\\\";\\n\\t\\t$result = $db->fetchAll($q);\\n\\t\\treturn $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1931b8a174938d3236ae17f5d7199261\",\n \"score\": \"0.66847587\",\n \"text\": \"public function getAllProducts() {\\r\\n $prod = $this->createQueryBuilder('p');\\r\\n\\r\\n return $prod\\r\\n ->select('p')\\r\\n ->orderBy('p.id', 'DESC')\\r\\n ->setMaxResults(25)\\r\\n ->getQuery()\\r\\n ->getResult()\\r\\n ;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf3aff4f36e6563fc0e1d7c9c7138319\",\n \"score\": \"0.66659933\",\n \"text\": \"public function getProductList(){\\n $products = Bigcommerce::getProducts();\\n $product_list = array();\\n foreach($products as $product) {\\n $product_list[] = array(\\n 'id' => $product->id,\\n 'name' => $product->name,\\n );\\n }\\n \\n return $product_list;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea2738a5cca9b314d5acdabd56b222e1\",\n \"score\": \"0.66532665\",\n \"text\": \"public function displayBasket() {\\r\\n return $this->items;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"548aaf166050b5c22f5b9b6e9b186cd6\",\n \"score\": \"0.66476226\",\n \"text\": \"public function shopProducts() {\\n\\t\\t\\n\\t\\tif (!$this->_shop_products) {\\n\\t\\t\\t$spModel = Base::getModel('Shop_Products');\\n\\t\\t\\t$select = $spModel->select()\\n\\t\\t\\t ->where('common_user_id = ?', $this->id)\\n\\t\\t\\t\\t\\t ->where('active = ?', 1);\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t$shop_products = $spModel->fetchAll($select);\\n\\t\\t\\t\\n\\t\\t\\t$this->_shop_products = $shop_products;\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn $this->_shop_products;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49cb6d32b8b51881381ab1fbcdf5af1d\",\n \"score\": \"0.6629912\",\n \"text\": \"public function listProducts() : array;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7242612fc22280e9ac471b9fe1d102c7\",\n \"score\": \"0.6629731\",\n \"text\": \"public function get_product()\\n {\\n $ret=$this->latest()->get();\\n return $ret;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46d05599251ce55bc3d1364db5b68809\",\n \"score\": \"0.6627053\",\n \"text\": \"public function getProductsToBuy()\\n {\\n $productsToBuy = array();\\n $this->authenticate();\\n\\n $currentWeekSheet = $this->getCurrentWeekSheet();\\n if ($currentWeekSheet) {\\n $firstColumn = $this->getLetterForColumn(count($this->leftHeaders));\\n $lastColumn = $this->getLetterForColumn(\\n $currentWeekSheet->getProperties()->getGridProperties()->getColumnCount() - 2\\n );\\n\\n $products = $this->ggService->spreadsheets_values->get(\\n $this->spreadsheetId,\\n $this->getSheetTitle() . '!' . $firstColumn . '1:' . $lastColumn . '1',\\n array('valueRenderOption' => 'FORMULA')\\n );\\n $quantities = $this->ggService->spreadsheets_values->get(\\n $this->spreadsheetId,\\n $this->getSheetTitle() . '!' . $firstColumn . '4:' . $lastColumn . '4'\\n );\\n\\n if (!empty($products)) {\\n $products = $products->values[0];\\n $quantities = $quantities->values[0];\\n $length = count($quantities);\\n for ($i = 0; $i < $length; $i++) {\\n $qty = $quantities[$i];\\n if ($qty !== \\\"\\\") {\\n $product = $products[$i];\\n\\n $id = -1;\\n\\n preg_match('/\\\\/(\\\\d+)-.*\\\\.html/', $product, $matches);\\n if (!empty($matches)) {\\n $id = $matches[1];\\n }\\n\\n $productsToBuy [] = array('id' => $id, 'qty' => $qty);\\n }\\n }\\n }\\n }\\n\\n return $productsToBuy;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b62ab628176600f167494b91005a019\",\n \"score\": \"0.6626187\",\n \"text\": \"function rz_GetBasketItems() {\\n\\t$arItems = array();\\n\\n\\tif (!CModule::IncludeModule('sale')) return $arItems;\\n\\n\\t$bUseCatalog = CModule::IncludeModule('catalog');\\n\\n\\t\\\\CSaleBasket::UpdateBasketPrices(\\\\CSaleBasket::GetBasketUserID(), SITE_ID);\\n\\t/* Check Values Begin */\\n\\n\\t$arSelFields = array(\\\"ID\\\", \\\"CALLBACK_FUNC\\\", \\\"MODULE\\\", \\\"PRODUCT_ID\\\", \\\"QUANTITY\\\", \\\"DELAY\\\",\\n\\t\\t\\\"CAN_BUY\\\", \\\"PRICE\\\", \\\"WEIGHT\\\", \\\"NAME\\\", \\\"CURRENCY\\\", \\\"CATALOG_XML_ID\\\", \\\"VAT_RATE\\\",\\n\\t\\t\\\"NOTES\\\", \\\"DISCOUNT_PRICE\\\", \\\"PRODUCT_PROVIDER_CLASS\\\", \\\"DIMENSIONS\\\", \\\"TYPE\\\", \\\"SET_PARENT_ID\\\", \\\"DETAIL_PAGE_URL\\\"\\n\\t);\\n\\t$dbBasketItems = \\\\CSaleBasket::GetList(\\n\\t\\t\\tarray(\\\"ID\\\" => \\\"ASC\\\"),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t\\t\\\"FUSER_ID\\\" => \\\\CSaleBasket::GetBasketUserID(),\\n\\t\\t\\t\\t\\t\\\"LID\\\" => SITE_ID,\\n\\t\\t\\t\\t\\t\\\"ORDER_ID\\\" => \\\"NULL\\\"\\n\\t\\t\\t\\t),\\n\\t\\t\\tfalse,\\n\\t\\t\\tfalse,\\n\\t\\t\\t$arSelFields\\n\\t\\t);\\n\\twhile ($arItem = $dbBasketItems->GetNext())\\n\\t{\\n\\t\\tif ($arItem[\\\"DELAY\\\"] == \\\"N\\\" && $arItem[\\\"CAN_BUY\\\"] == \\\"Y\\\")\\n\\t\\t{\\n\\t\\t\\t$arItem[\\\"PRICE\\\"] = roundEx($arItem[\\\"PRICE\\\"], SALE_VALUE_PRECISION);\\n\\t\\t\\t$arItem[\\\"QUANTITY\\\"] = DoubleVal($arItem[\\\"QUANTITY\\\"]);\\n\\n\\t\\t\\t$arItem[\\\"WEIGHT\\\"] = DoubleVal($arItem[\\\"WEIGHT\\\"]);\\n\\t\\t\\t$arItem[\\\"VAT_RATE\\\"] = DoubleVal($arItem[\\\"VAT_RATE\\\"]);\\n\\n\\t\\t\\t$arDim = unserialize($arItem[\\\"~DIMENSIONS\\\"]);\\n\\n\\t\\t\\tif(is_array($arDim))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$arItem[\\\"DIMENSIONS\\\"] = $arDim;\\n\\t\\t\\t\\tunset($arItem[\\\"~DIMENSIONS\\\"]);\\n\\t\\t\\t}\\n\\n\\t\\t\\tif($arItem[\\\"VAT_RATE\\\"] > 0 && !\\\\CSaleBasketHelper::isSetItem($arItem))\\n\\t\\t\\t{\\n\\t\\t\\t\\t//$arItem[\\\"VAT_VALUE\\\"] = roundEx((($arItem[\\\"PRICE\\\"] / ($arItem[\\\"VAT_RATE\\\"] +1)) * $arItem[\\\"VAT_RATE\\\"]), SALE_VALUE_PRECISION);\\n\\t\\t\\t\\t$arItem[\\\"VAT_VALUE\\\"] = roundEx((($arItem[\\\"PRICE\\\"] / ($arItem[\\\"VAT_RATE\\\"] +1)) * $arItem[\\\"VAT_RATE\\\"]), SALE_VALUE_PRECISION);\\n\\t\\t\\t}\\n\\n\\t\\t\\tif($arItem[\\\"DISCOUNT_PRICE\\\"] > 0)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$arItem[\\\"DISCOUNT_PRICE_PERCENT\\\"] = $arItem[\\\"DISCOUNT_PRICE\\\"]*100 / ($arItem[\\\"DISCOUNT_PRICE\\\"] + $arItem[\\\"PRICE\\\"]);\\n\\t\\t\\t\\t$arItem[\\\"DISCOUNT_PRICE_PERCENT_FORMATED\\\"] = roundEx($arItem[\\\"DISCOUNT_PRICE_PERCENT\\\"], 0).\\\"%\\\";\\n\\t\\t\\t}\\n\\n\\t\\t\\t$arItem[\\\"PROPS\\\"] = array();\\n\\t\\t\\t$dbProp = \\\\CSaleBasket::GetPropsList(array(\\\"SORT\\\" => \\\"ASC\\\", \\\"ID\\\" => \\\"ASC\\\"), array(\\\"BASKET_ID\\\" => $arItem[\\\"ID\\\"], \\\"!CODE\\\" => array(\\\"CATALOG.XML_ID\\\", \\\"PRODUCT.XML_ID\\\")));\\n\\t\\t\\twhile($arProp = $dbProp -> GetNext())\\n\\t\\t\\t{\\n\\t\\t\\t\\tif (array_key_exists('BASKET_ID', $arProp))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tunset($arProp['BASKET_ID']);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif (array_key_exists('~BASKET_ID', $arProp))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tunset($arProp['~BASKET_ID']);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t$arProp = array_filter($arProp, array(\\\"CSaleBasketHelper\\\", \\\"filterFields\\\"));\\n\\n\\t\\t\\t\\t$arItem[\\\"PROPS\\\"][] = $arProp;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif (!\\\\CSaleBasketHelper::isSetItem($arItem))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$DISCOUNT_PRICE_ALL += $arItem[\\\"DISCOUNT_PRICE\\\"] * $arItem[\\\"QUANTITY\\\"];\\n\\t\\t\\t\\t$arItem[\\\"DISCOUNT_PRICE\\\"] = roundEx($arItem[\\\"DISCOUNT_PRICE\\\"], SALE_VALUE_PRECISION);\\n\\t\\t\\t}\\n\\n\\t\\t\\tif (\\\\CSaleBasketHelper::isSetItem($arItem))\\n\\t\\t\\t\\t$arSetParentWeight[$arItem[\\\"SET_PARENT_ID\\\"]] += $arItem[\\\"WEIGHT\\\"] * $arItem['QUANTITY'];\\n\\n\\t\\t\\t$arItems[] = $arItem;\\n\\t\\t}\\n\\n\\t\\t// count weight for set parent products\\n\\t\\tforeach ($arItems as &$arItem)\\n\\t\\t{\\n\\t\\t\\tif (\\\\CSaleBasketHelper::isSetParent($arItem))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$arItem[\\\"WEIGHT\\\"] = $arSetParentWeight[$arItem[\\\"ID\\\"]] / $arItem[\\\"QUANTITY\\\"];\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif ($bUseCatalog)\\n\\t\\t{\\n\\t\\t\\t$arParent = \\\\CCatalogSku::GetProductInfo($arItem[\\\"PRODUCT_ID\\\"]);\\n\\t\\t\\tif ($arParent)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$arElementId[] = $arParent[\\\"ID\\\"];\\n\\t\\t\\t\\t$arSku2Parent[$arItem[\\\"PRODUCT_ID\\\"]] = $arParent[\\\"ID\\\"];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tunset($arItem);\\n\\t}\\n\\n\\tif (!empty($arResult[\\\"BASKET_ITEMS\\\"]))\\n\\t{\\n\\t\\tif ($bUseCatalog)\\n\\t\\t\\t$arResult[\\\"BASKET_ITEMS\\\"] = getMeasures($arResult[\\\"BASKET_ITEMS\\\"]); // get measures\\n\\t}\\n\\n\\t// use later only items not part of the sets\\n\\tforeach ($arItems as $id => $arItem)\\n\\t{\\n\\t\\tif (\\\\CSaleBasketHelper::isSetItem($arItem))\\n\\t\\t\\tunset($arItems[$id]);\\n\\t}\\n\\n\\treturn $arItems;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4eb907c90422661bac190db2ee0b845\",\n \"score\": \"0.660074\",\n \"text\": \"public function getAll(){\\n \\t$products = Product::all();\\n\\n \\treturn $products;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20e3bf7682f55ba30960b4788f7068f9\",\n \"score\": \"0.659676\",\n \"text\": \"public function getOrderProduct() {\\n\\t\\t$jinput = JFactory::getApplication()->input;\\n\\t\\t$db = JFactory::getDbo();\\n\\t\\t$query = $db->getQuery(true);\\n\\t\\t$filter = $jinput->get('filter');\\n\\t\\t$q = \\\"SELECT DISTINCT order_item_sku AS product_sku, order_item_name AS product_name\\n\\t\\t\\t\\tFROM #__virtuemart_order_items o\\n\\t\\t\\t\\tWHERE (order_item_sku LIKE \\\".$db->Quote('%'.$filter.'%').\\\"\\n\\t\\t\\t\\t\\tOR order_item_name LIKE \\\".$db->Quote('%'.$filter.'%').\\\")\\n\\t\\t\\t\\tORDER BY order_item_name\\n\\t\\t\\t\\tLIMIT 10;\\\";\\n\\t\\t$db->setQuery($q);\\n\\t\\treturn $db->loadObjectList();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9acdf3e7e47452e6d49281c5150ed5e6\",\n \"score\": \"0.659441\",\n \"text\": \"function getAllProducts()\\r\\n\\t{\\r\\n\\r\\n\\t\\t$sql = \\\"SELECT `ProductID`,`ProductName`, `ProductDesc`, `UnitsInStock`, `Image`, `UnitPrice` FROM `ply1`.`Products`\\\";\\r\\n\\t\\t$rs = $this->executeQuery($sql, $_SERVER[\\\"SCRIPT_NAME\\\"]);\\r\\n\\t\\treturn $rs;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c595f06c9c586a436e29724dd32a9253\",\n \"score\": \"0.6589046\",\n \"text\": \"public function getProductos(){\\n /* Aca tambien, los corchetes luego de productos estan de mas.\\n return $this->productos[];\\n * La forma correcta es */\\n return $this->productos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fdf7edd226b88c40617183f28cb36af\",\n \"score\": \"0.6588649\",\n \"text\": \"protected function getAllProducts() {\\n $sql = \\\"SELECT * FROM products\\\";\\n $results = $this->connect()->query($sql);\\n $numRows = $results->num_rows;\\n\\n if ($numRows > 0) {\\n while ($row = $results->fetch_assoc()) {\\n $data[] = $row;\\n }\\n return $data;\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f029d4066e4e0386a92e8c38bc5cde9\",\n \"score\": \"0.6583599\",\n \"text\": \"public function getProducts()\\n\\t{\\n\\t\\t$fields = array('id_product', 'reference', 'name', 'meta_title', 'meta_description','description', 'description_short', 'link_rewrite');\\n\\n\\t\\t$start = true;\\n\\t\\t$page = 0;\\n\\t\\twhile($start)\\n\\t\\t{\\n\\t\\t\\t$limit1 = $page * 3;\\n\\t\\t\\t$opt = array('resource' => 'products', 'limit' => $limit1.',3');\\n\\n\\t\\t\\t$xml = $this->prestashop->get($opt);\\n\\n\\t\\t $resources = $xml->products->children();\\n\\n\\t\\t if($resources)\\n\\t\\t\\t foreach ($resources as $resource)\\n\\t\\t\\t {\\n\\t\\t\\t \\t $opt = Array();\\n\\t\\t\\t \\t $id_product = $resource->attributes();\\n\\t\\t\\t \\t $opt['resource'] = 'products';\\n\\t\\t\\t \\t $opt['id'] = $id_product;\\n\\t\\t\\t \\t $xml = $this->prestashop->get($opt);\\n\\n\\t\\t\\t \\t $o['resource'] = 'images/products';\\n\\t\\t\\t \\t $o['display'] = 'full';\\n\\t\\t\\t \\t $o['id'] = $id_product;\\n\\t\\t\\t \\t $m = $this->prestashop->get($o);\\n\\n\\t\\t\\t \\t var_dump($m);\\n\\n\\t\\t\\t \\t exit;\\n\\n\\t\\t\\t \\t $data = array();\\n\\n\\t\\t\\t \\t $data['id_product'] = $id_product;\\n\\t\\t\\t \\t $data['reference'] = utf8_decode($xml->product->reference);\\n\\t\\t\\t \\t $data['name'] = utf8_decode($xml->product->name->language[0]);\\n\\t\\t\\t \\t $data['meta_title'] = utf8_decode($xml->product->meta_title->language[0]);\\n\\t\\t\\t \\t $data['meta_description'] = utf8_decode($xml->product->meta_description->language[0]);\\n\\t\\t\\t \\t $data['description'] = utf8_decode($xml->product->description->language[0]);\\n\\t\\t\\t \\t $data['description_short'] = utf8_decode($xml->product->description_short->language[0]);\\n\\t\\t\\t \\t $data['link_rewrite'] = utf8_decode($xml->product->link_rewrite->language[0]);\\n\\n\\t\\t\\t \\t if($this->checkIsset($id_product, 'product', $fields))\\n\\t\\t\\t \\t \\t$this->update($id_product, 'product', $fields, $data);\\n\\t\\t\\t \\t else\\n\\t\\t\\t \\t \\t$this->add($id_product, 'product', $fields, $data);\\n\\n\\t\\t\\t }\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t$start = false;\\n\\t\\t\\t}\\n\\t\\t\\t$page ++;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bf6be9f1b9907faac3d5dfcc2658107\",\n \"score\": \"0.65795004\",\n \"text\": \"public function getAllProducts(){\\n\\t\\t\\n\\t\\t$sql = 'SELECT * FROM Products';\\n\\n\\treturn $this->getEntityManager()->getConnection()->executeQuery($sql)->fetchAll();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad99b0a5932d5d00f9de22a257d1ca36\",\n \"score\": \"0.6553689\",\n \"text\": \"public function getProductsAndProfileByShop()\\n {\\n $res = array();\\n foreach ($this->product_list as $product) {\\n if ($product['id_ebay_profile']) {\\n $ebay_profile = new EbayProfile((int)$product['id_ebay_profile']);\\n } else {\\n $sql = 'SELECT epr.`id_ebay_profile`\\n\\t\\t\\t\\tFROM `'._DB_PREFIX_.'ebay_product` epr\\n\\t\\t\\t\\tWHERE epr.`id_product` = '.(int)$product['id_product'];\\n $id_ebay_profile = (int)Db::getInstance()->getValue($sql);\\n if ($id_ebay_profile) {\\n $ebay_profile = new EbayProfile($id_ebay_profile);\\n } else {\\n // case where the row in ebay_product has disappeared like if the product has been removed from eBay before sync\\n if (version_compare(_PS_VERSION_, '1.5', '>') && Shop::isFeatureActive()) {\\n $sql = 'SELECT `id_ebay_profile`\\n\\t\\t\\t\\t\\t\\t\\tFROM `'._DB_PREFIX_.'ebay_profile` ep\\n\\t\\t\\t\\t\\t\\t\\tLEFT JOIN `'._DB_PREFIX_.'product_shop` ps\\n\\t\\t\\t\\t\\t\\t\\tON ep.`id_shop` = ps.`id_shop`\\n\\t\\t\\t\\t\\t\\t\\tAND ps.`id_product` = '.(int)$product['id_product'];\\n $id_ebay_profile = (int)Db::getInstance()->getValue($sql);\\n $ebay_profile = new EbayProfile($id_ebay_profile);\\n } else {\\n $ebay_profile = EbayProfile::getCurrent();\\n }\\n }\\n }\\n\\n if (!isset($res[$ebay_profile->id_shop])) {\\n $res[$ebay_profile->id_shop] = array(\\n 'id_ebay_profiles' => array($ebay_profile->id),\\n 'id_products' => array(),\\n );\\n } elseif (!in_array($ebay_profile->id, $res[$ebay_profile->id_shop]['id_ebay_profiles'])) {\\n $res[$ebay_profile->id_shop]['id_ebay_profiles'][] = $ebay_profile->id;\\n }\\n\\n // $res[$ebay_profile->id_shop]['id_products'][] = $product['id_product'];\\n $res[$ebay_profile->id_shop]['id_products'][] = array(\\n 'id_product' => $product['id_product'],\\n 'id_product_attribute' => $product['id_product_attribute'],\\n );\\n }\\n\\n return $res;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6b210dbb780145803f23e7f3a114180\",\n \"score\": \"0.6550909\",\n \"text\": \"public function getAllProduct() {\\n try {\\n $sql = \\\"SELECT * FROM product ORDER BY id DESC LIMIT ?,?\\\";\\n $stmt = $this->db->prepare($sql);\\n $stmt->bindValue(1, ($current_page - 1) * $num_products_on_each_page, PDO::PARAM_INT);\\n $stmt->bindValue(2, $num_products_on_each_page, PDO::PARAM_INT);\\n $stmt->execute();\\n\\n $products = $stmt->fetchAll(\\\\PDO::FETCH_ASSOC);\\n return $products;\\n } catch (Exception $e) {\\n die(\\\"Oh noes! There's an error in the query!\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"22c6e30ca1b085eff549da773fa9c376\",\n \"score\": \"0.65506214\",\n \"text\": \"public function getProducts() \\n {\\n return $this->_fields['Products']['FieldValue'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c61a2524f3289cd940a7de3534500fcd\",\n \"score\": \"0.6545158\",\n \"text\": \"public function getTopSellingProducts()\\n {\\n $databaseResults = $this -> databaseInstance -> queryTopSellingProducts(\\\"products\\\" , \\\"order\\\");\\n $resultsDecoded= Utility::jsonEncodeThenDecode($databaseResults);\\n\\n return $this -> productMapper($resultsDecoded);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec659651ac0998467947921f6f8b0ded\",\n \"score\": \"0.65406996\",\n \"text\": \"public function getAllProductsForCache()\\n\\t{\\n\\t\\t$this->resetLocalCacheData('allProducts');\\n\\t\\t$products = $this->getProducts(array(), array('join' => Brivium_Store_Model_Product::FETCH_FULL));\\n\\t\\treturn $products;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8bedec53238c1996b20012871cd305f\",\n \"score\": \"0.65386724\",\n \"text\": \"public function getProductList()\\n {\\n $products = Product::latest()->paginate(5);\\n\\n return $products;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de3f772b38beb7255dca9a4ac1d74ec1\",\n \"score\": \"0.65339315\",\n \"text\": \"function _affilinet_GetBasketItems(){\\n\\t$soapLogon = new SoapClient(WSDL_LOGON);\\n\\t$token = $soapLogon->Logon(array(\\n\\t 'Username' => USERNAME,\\n\\t 'Password' => PASSWORD,\\n\\t 'WebServiceType' => 'Publisher'\\n\\t));\\n\\t \\n\\t// Set parameters\\n\\t$basketId = ''; // ID of the basket you want to retrieve the items from\\n\\t \\n\\t// Send request to Publisher Statistics Service\\n\\t$soapRequest = new SoapClient(WSDL_PUBSTATS);\\n\\t$response = $soapRequest->GetBasketItems(array(\\n\\t 'CredentialToken' => $token,\\n\\t 'BasketId' => $basketId\\n\\t));\\n\\t\\n\\treturn $response;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca88d3bf099496af307cacc6b9613977\",\n \"score\": \"0.6533833\",\n \"text\": \"public function readAllProducts(){\\r\\n $sql = 'SELECT * FROM products';\\r\\n $param = array();\\r\\n include_once __DIR__.'/../objects/Product.php';\\r\\n return $this->crud->readMultiRows($sql, $param, 'product_id', 'Product');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db053a8e5db1cb676e47eb328823e719\",\n \"score\": \"0.6519234\",\n \"text\": \"public function getAllProducts(){\\n\\t\\t$res = $this->con->query(\\\"SELECT * FROM producto\\\".$this->order());\\n\\t\\t\\n\\t\\t$resultado = array();\\n\\t\\twhile( $fila = $res->fetch_assoc() ){\\n\\t\\t\\t$resultado[] = $fila;\\n\\t\\t}\\n\\t\\treturn $resultado;\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c6cd8e22b052519075642c766ffd567\",\n \"score\": \"0.65116173\",\n \"text\": \"public function getProduct()\\n {\\n $query = \\\"SELECT * FROM produk WHERE stock > 0\\\";\\n\\n $this->db->query($query);\\n $this->db->execute();\\n\\n return $this->db->resultSet();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f7a3be872da1900ff2e344a17ba83d2\",\n \"score\": \"0.65068775\",\n \"text\": \"public function index()\\n {\\n //\\n return auth()->user()->products()->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5251c048c0c661a6779db08aa587f1f7\",\n \"score\": \"0.6505019\",\n \"text\": \"function dcs_dropship_getProducts($pageNumber=1,$category=\\\"all\\\",$searchTerms=\\\"\\\")\\r\\n{\\r\\n\\tglobal $dropshipProducts;\\r\\n\\r\\n\\tif( $dropshopProducts == NULL )\\r\\n\\t{\\r\\n\\t\\tdcs_dropship_loadProducts($pageNumber,$category,$searchTerms);\\r\\n\\t}\\r\\n\\r\\n\\treturn $dropshipProducts;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63c14347e5b5fe5246a1a9d5e87e64f6\",\n \"score\": \"0.6500783\",\n \"text\": \"private function query_products() {\\n $query = \\\"SELECT Product2.Id, Product2.Name, Product2.ProductCode, Product2.Description, \\\"\\n . \\\"Product2.isActiveOnlineProduct__c, PricebookEntry.UnitPrice FROM PricebookEntry\\\";\\n\\n $url = $this->instance_url . \\\"/services/data/\\\" . $this->api_version . \\\"/query?q=\\\" . urlencode( $query );\\n\\n return $this->get_response( $url );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09b85eeb0aaf5d0c4d996e81fe4e6e9a\",\n \"score\": \"0.6499381\",\n \"text\": \"public function getAllProduct()\\n {\\n $currentProductArray = (new ProductsModel())->findAll();\\n if ($currentProductArray == []) {\\n return $this->respond([\\n \\\"status\\\" => \\\"failed\\\",\\n \\\"message\\\" => \\\"Il n'y a aucun produit pour le moment!\\\"\\n ]);\\n } else {\\n return $this->respond($currentProductArray);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29a4627eb2d9b3966e4a646038bb0a82\",\n \"score\": \"0.64945906\",\n \"text\": \"public static function all() { \\n return session(\\\"products\\\")? session(\\\"products\\\") : [];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f65ecdb94751c95b3a4c393dc909ba2\",\n \"score\": \"0.64943093\",\n \"text\": \"public function productsAll()\\n {\\n $prods = products::all();\\n\\n return $prods->toJson();\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9dab2d0b79725637ced4fca4819ac3b\",\n \"score\": \"0.6493638\",\n \"text\": \"public function getAllProducts()\\n {\\n $product = new QueryBuilder();\\n $products = $product->all('product');\\n\\n return $products;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0e4be5fb616cb4d93b6f7a6e0bbfdd5\",\n \"score\": \"0.64884895\",\n \"text\": \"private function getProducts()\\n {\\n $query = $this->product->select();\\n\\n if (isset($this->selectedCategory) && $this->selectedCategory->count()) {\\n $query->whereIn('categories_id', $this->productRetrieveConstraintCategories($this->selectedCategory)->pluck('id'));\\n }\\n\\n if (isset($this->selectedBrand) && $this->selectedBrand->count()) {\\n $query->whereIn('brands_id', $this->selectedBrand->pluck('id'));\\n }\\n\\n if (isset($this->selectedModel) && $this->selectedModel->count()) {\\n $query->whereHas('deviceModel', function ($query) {\\n $query->whereIn('id', $this->selectedModel->pluck('id'));\\n });\\n }\\n\\n if (isset($this->selectedColor) && $this->selectedColor->count()) {\\n $query->where(function ($query) {\\n $query->whereIn('colors_id', $this->selectedColor->pluck('id'))\\n ->orWhereNull('colors_id');\\n });\\n }\\n\\n if (isset($this->selectedQuality) && $this->selectedQuality->count()) {\\n $query->whereIn('quality_id', $this->selectedQuality->pluck('id'));\\n }\\n\\n $query->with('primaryImage');\\n\\n $query->with(['storageProduct' => function ($query) {\\n $query->whereRaw('stock_quantity > reserved_quantity');\\n }]);\\n\\n $query->with(['vendorProduct' => function ($query) {\\n $query->where('stock_quantity', '>', 0);\\n }]);\\n\\n $query->with('productBadge.badge');\\n\\n if (auth('web')->check()) {\\n $query->with(['favouriteProduct' => function ($query) {\\n $query->where('users_id', auth('web')->user()->id);\\n }]);\\n }\\n\\n return $this->isPaginable ? $query->paginate(config('shop.products_per_page')) : $query->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d59bbc9d7b3ce0b70d1baf70a9f05a05\",\n \"score\": \"0.64816785\",\n \"text\": \"public function getProductos() {\\n return $this->productos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53ab00d95115e327a5c89f8711262e04\",\n \"score\": \"0.64806294\",\n \"text\": \"public function get_order_product_all(){\\n \\t\\t$this->db->from($this->table17);\\n \\t\\t$this->db->where('id');\\n \\t\\t$query = $this->db->get();\\n \\t\\treturn $query->row();\\n \\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cde37d2a3d1d852b0322cfe32f5ebf85\",\n \"score\": \"0.6470234\",\n \"text\": \"public function getBasket(){\\n $sql = \\\"SELECT tb.id_items, sum(tb.amount) as qty,ti.name,ti.price as ttl from tbl_basket as tb inner join tbl_items as ti on tb.id_items = ti.id\\nWHERE cookie_user = ? group by tb.id_items, ti.name \\\";\\n try {\\n $result = $this->_db->prepare($sql);\\n $result->execute(array($_COOKIE['cookie_user']));\\n $fetchData = $result->fetchAll();\\n return $fetchData;\\n }\\n catch(PDOException $e){\\n echo $e->getMessage();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b279b4dc9cc7e27bdd8a2acc85392012\",\n \"score\": \"0.6465306\",\n \"text\": \"public static function getProducts()\\n {\\n if (isset($_SESSION['products'])) {\\n return $_SESSION['products'];\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b279b4dc9cc7e27bdd8a2acc85392012\",\n \"score\": \"0.6465306\",\n \"text\": \"public static function getProducts()\\n {\\n if (isset($_SESSION['products'])) {\\n return $_SESSION['products'];\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b279b4dc9cc7e27bdd8a2acc85392012\",\n \"score\": \"0.6465306\",\n \"text\": \"public static function getProducts()\\n {\\n if (isset($_SESSION['products'])) {\\n return $_SESSION['products'];\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be73489020f3d28f1db17bd1799f601b\",\n \"score\": \"0.6462441\",\n \"text\": \"public function getProduct()\\n\\t{\\n\\t\\t$sql=\\\"select * from products\\\";\\n\\t\\treturn $this->query($sql);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"007f8791a9355600307ae51474aaf249\",\n \"score\": \"0.64566356\",\n \"text\": \"public function populate($basket);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19d553b9ed529461b3eca08d5b564bed\",\n \"score\": \"0.6444449\",\n \"text\": \"public function getAllActiveProducts()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6980bfb15d05f32562c3359f96bdc1a7\",\n \"score\": \"0.6438036\",\n \"text\": \"public function get_products() {\\n $response = $this->query_products();\\n\\n $error_response = $this->get_error_status( $response );\\n if ( $error_response == \\\"solved\\\" ) {\\n $response = $this->query_products();\\n } else if ( $error_response == \\\"failed\\\" ) {\\n return null;\\n }\\n\\n try {\\n $products = array();\\n foreach( $response[\\\"records\\\"] as $product ) {\\n if ( !$this->is_product_id_in_array( $product[\\\"Product2\\\"][\\\"Id\\\"], $products ) ) {\\n array_push( $products, array(\\n \\\"id\\\" => trim( $product[\\\"Product2\\\"][\\\"Id\\\"] ),\\n \\\"name\\\" => $product[\\\"Product2\\\"][\\\"Name\\\"],\\n \\\"code\\\" => $product[\\\"Product2\\\"][\\\"ProductCode\\\"],\\n \\\"unit_price\\\" => $product[\\\"UnitPrice\\\"],\\n \\\"is_active\\\" => $product[\\\"Product2\\\"][\\\"isActiveOnlineProduct__c\\\"],\\n \\\"wand_id\\\" => $product[\\\"Product2\\\"][\\\"Product_4D_Wand_ID__c\\\"]\\n ) );\\n }\\n }\\n return $products;\\n } catch( Exception $e ) {\\n return null;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d71d37968511c88667d62769626ea82\",\n \"score\": \"0.64379996\",\n \"text\": \"public function actionGetproducts(){\\n $result = [\\n 'products' => [],\\n 'maxpage' => 0,\\n ];\\n if(Yii::$app->request->get('category_id')){\\n $model_product = new ProductsSearch();\\n $model_product->category_id = (int)Yii::$app->request->get('category_id');\\n if(Yii::$app->request->get('get_cart')){\\n $carts = Yii::$app->session->has(CartEnum::CART_KEY) ? Yii::$app->session->get(CartEnum::CART_KEY) :[] ;\\n $products = $model_product->getProductsByCategory($carts);\\n }\\n else{\\n $products = $model_product->getProductsByCategory();\\n }\\n $result['products'] = isset($products['products']) ? $products['products'] : [];\\n $result['maxpage'] = isset($products['maxpage']) ? $products['maxpage'] : [];\\n }\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"796807859be48becd6fce25c9c343f24\",\n \"score\": \"0.6436832\",\n \"text\": \"public function productsAction(){\\n\\t\\tif(!$this->getPageNoIsValid('Product')) {\\n\\t\\t\\t$this->json = '';\\n\\t\\t} else {\\n\\t\\t\\t$this->json = array_merge($this->json,$this->getProducts());\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84f62f27647d9ab4645e3daf0807459a\",\n \"score\": \"0.6428402\",\n \"text\": \"public function getProductsList() {\\n return self::$productsList;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32c1bfd128bec9c9eb314d0a64ba9f3e\",\n \"score\": \"0.642184\",\n \"text\": \"public function getProductsFeed()\\n {\\n $product_id = $this->getRequest()->getQuery('product_id');\\n $stores = array();\\n $storeCollection = Mage::getModel('core/store')->getCollection();\\n\\n if (empty($product_id)) {\\n\\n $offset = $this->getRequest()->getQuery('offset');\\n\\n if ($offset == null) {\\n echo '{\\n \\\"success\\\": false,\\n \\\"data\\\": {\\n \\\"error_code\\\": \\\"QW-4003\\\",\\n \\\"error\\\": \\\"Offset not set.\\\"\\n }\\n }'\\n ;\\n exit;\\n }\\n\\n $limit = $this->getRequest()->getQuery('limit');\\n\\n if ($limit == null) {\\n echo '{\\n \\\"success\\\": false,\\n \\\"data\\\": {\\n \\\"error_code\\\": \\\"QW-4004\\\",\\n \\\"error\\\": \\\"Limit not set.\\\"\\n }\\n }'\\n ;\\n exit;\\n }\\n //Magento uses pages and not offset amount. We calculate the page based on the limit and offset provided\\n if ($offset == 0) {\\n $page = 1;\\n } else {\\n $page = ($offset / $limit) + 1;\\n }\\n\\n $store = Mage::app()->getStore();\\n $store_id = $store->getId();\\n $productslist = Mage::getResourceModel('catalog/product_collection')->addAttributeToFilter('status', 1)->addAttributeToFilter('visibility', 4)->setPage($page, $limit)->addStoreFilter($store_id);\\n $json = array();\\n\\n foreach ($productslist as $theproduct) {\\n $productId = $theproduct->getId();\\n $product = Mage::getModel('catalog/product')->load($productId);\\n $maincat = $subcats = '';\\n $cats = $product->getCategoryIds();\\n $category_ids = array();\\n\\n foreach ($cats as $category_id) {\\n $_cat = Mage::getModel('catalog/category')->load($category_id);\\n if ($_cat->getIsActive()) {\\n $category_ids[] = $category_id;\\n }\\n }\\n\\n $product_data = array();\\n $product_data['product_id'] = $productId;\\n $parentIds = null;\\n if ($product->getTypeId() == \\\"simple\\\") {\\n $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product->getId()); // check for grouped product\\n if (!$parentIds)\\n $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId()); //check for config product\\n }\\n\\n /* if (!empty($parentIds)) {\\n $product_data['parent_product_id'] = $parentIds[0];\\n } else {\\n $product_data['parent_product_id'] = null;\\n } */\\n $product_data['product_name'] = $product->getName();\\n $product_data['sku_number'] = $product->getSku();\\n $product_data['created'] = date(\\\"Y-m-d H:i:s\\\", Mage::getModel(\\\"core/date\\\")->timestamp($product->getCreatedAt()));\\n $product_data['updated'] = date(\\\"Y-m-d H:i:s\\\", Mage::getModel(\\\"core/date\\\")->timestamp($product->getUpdatedAt()));\\n\\n if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL) {\\n $product_data['downloadable'] = true;\\n } else {\\n $product_data['downloadable'] = false;\\n }\\n\\n if ($product->getGtin()) {\\n $product_data['gtin'] = $product->getGtin();\\n $product_data['unique_identifier'] = true;\\n } else {\\n $product_data['gtin'] = null;\\n $product_data['unique_identifier'] = false;\\n }\\n\\n $product_data['mpn'] = $product->getMpn();\\n $product_data['brand'] = $product->getBrand();\\n $product_data['weight'] = $product->getWeight();\\n $product_data['weight_unit'] = 'kg';\\n if ($maincat) {\\n $product_data['primary_category'] = $maincat;\\n }\\n $product_data['category_ids'] = $category_ids;\\n $product_data['product_url'] = $product->getProductUrl();\\n $product_data['product_image_urls'] = array();\\n\\n if ($product->getImage()) {\\n $mainimage = new stdclass();\\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\\n $mainimage->main = true;\\n $product_data['product_image_urls'][] = $mainimage;\\n }\\n\\n foreach ($product->getMediaGalleryImages() as $image) {\\n $subimage = new stdclass();\\n $subimage->url = $image->getUrl();\\n $subimage->main = false;\\n $product_data['product_image_urls'][] = $subimage;\\n }\\n\\n //$product_data['ProductImageURL'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\\n\\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\\n $product_data['short_product_description'][$language] = (substr(iconv(\\\"UTF-8\\\", \\\"UTF-8//IGNORE\\\", $productdata->getShortDescription()), 0)) ? substr(iconv(\\\"UTF-8\\\", \\\"UTF-8//IGNORE\\\", $productdata->getShortDescription()), 0) : \\\"No short description available\\\";\\n $product_data['long_product_description'][$language] = (substr(iconv(\\\"UTF-8\\\", \\\"UTF-8//IGNORE\\\", $productdata->getDescription()), 0)) ? substr(iconv(\\\"UTF-8\\\", \\\"UTF-8//IGNORE\\\", $productdata->getDescription()), 0) : \\\"No description available\\\";\\n }\\n $product_data['sale_price'] = number_format((float) $product->getFinalPrice(), 2, '.', '');\\n $product_data['retail_price'] = number_format((float) $product->getPrice(), 2, '.', '');\\n\\n if ($product->getMspCashback()) {\\n $product_data['cashback'] = $product->getMspCashback();\\n }\\n //$product_data['UniversalProductCode'] = $product->getData('upc'); //need variable\\n /**\\n * Get product tax rule\\n * */\\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\\n $taxCalculation = Mage::getModel('tax/calculation');\\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\\n $tax_rule = new stdclass();\\n $rules = array();\\n\\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\\n if ($collection->getSize()) {\\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\\n }\\n if ($collection->getSize()) {\\n foreach ($collection as $rule) {\\n $rule_data = $rule->getData();\\n if (in_array($product->getTaxClassId(), $rule_data['product_tax_classes'])) {\\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\\n $rate_info = $rate->getData();\\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\\n $tax_rule->name = $rule_data['code'];\\n }\\n }\\n }\\n };\\n\\n $tax_rule->id = $product->getTaxClassId();\\n $tax_rule->rules = $rules;\\n $product_data['tax'] = $tax_rule;\\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\\n $product_data['stock'] = (INT) $stockItem->getQty();\\n\\n $meta_data = array();\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\\n if ($productdata->getMetaTitle() && $productdata->getMetaKeyword() && $productdata->getMetaDescription()) {\\n $meta_data['title'][$language] = $productdata->getMetaTitle();\\n $meta_data['keyword'][$language] = $productdata->getMetaKeyword();\\n $meta_data['description'][$language] = $productdata->getMetaDescription();\\n }\\n }\\n\\n if (!empty($meta_data)) {\\n $product_data['metadata'] = $meta_data;\\n }\\n\\n $attr = array();\\n $attributes = $product->getAttributes();\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n Mage::app()->setCurrentStore($store_id);\\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\\n\\n foreach ($attributes as $attribute) {\\n if ($attribute->getIsVisibleOnFront()) {\\n $_condition = $product->getAttributeText($attribute->getAttributeCode());\\n $_coditionDefault = $product->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product);\\n $attribute = Mage::getModel('eav/entity_attribute')->load($attribute->getAttributeId());\\n $langlabels = $attribute->getStoreLabels();\\n\\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\\n } elseif ($_coditionDefault) {\\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\\n }\\n }\\n }\\n }\\n\\n if (!empty($attr)) {\\n $product_data['attributes'] = $attr;\\n }\\n if ($product->isConfigurable()) {\\n $variants = array();\\n /*\\n * GET product variant (options) and add them as variants\\n */\\n $collection = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null, $product);\\n $childIds = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($product->getId());\\n if ($collection) {\\n $processed = array();\\n foreach ($collection as $childproduct) {\\n if (!in_array($childproduct->getId(), $processed)) {\\n\\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\\n $variant = new stdclass();\\n\\n $variant->product_id = $childproduct->getId();\\n $processed[] = $childproduct->getId();\\n $variant->sku_number = $childproduct->getSku();\\n if ($childproduct->getGtin()) {\\n $variant->gtin = $childproduct->getGtin();\\n $variant->unique_identifier = true;\\n } else {\\n $variant->gtin = null;\\n $variant->unique_identifier = false;\\n }\\n $product_data['mpn'] = $childproduct->getMpn();\\n if ($childproduct->getImage()) {\\n $mainimage = new stdclass();\\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\\n $mainimage->main = true;\\n $variant->product_image_urls = array();\\n $variant->product_image_urls[] = $mainimage;\\n }\\n $childimages = $childproduct->getMediaGalleryImages();\\n if (!empty($childimages)) {\\n foreach ($childproduct->getMediaGalleryImages() as $image) {\\n $subimage = new stdclass();\\n $subimage->url = $image->getUrl();\\n $subimage->main = false;\\n $variant->product_image_urls[] = $subimage;\\n }\\n }\\n\\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\\n $variant->stock = (INT) $stockItem->getQty();\\n $variant->sale_price = number_format((float) $product->getFinalPrice(), 2, '.', '');\\n $variant->retail_price = number_format((float) $product->getPrice(), 2, '.', '');\\n $variant->weight = $product_child->getWeight();\\n $variant->weight_unit = 'kg';\\n\\n if ($product_child->getMspCashback()) {\\n $variant->cashback = $product_child->getMspCashback();\\n }\\n\\n $attrchild = array();\\n $attributes = $childproduct->getAttributes();\\n //print_r($attributes);exit;\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n Mage::app()->setCurrentStore($store_id);\\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\\n foreach ($attributes as $attribute) {\\n if ($attribute->getIsVisibleOnFront()) {\\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\\n $langlabels = $attribute->getStoreLabels();\\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\\n } elseif ($_coditionDefault) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\\n }\\n }\\n }\\n }\\n if (!empty($attrchild)) {\\n $variant->attributes = $attrchild;\\n }\\n $variants[] = $variant;\\n }\\n }\\n } else {\\n $processed = array();\\n\\n foreach ($childIds[0] as $key => $childid) {\\n $childproduct = Mage::getModel('catalog/product')->load($childid);\\n\\n if (!in_array($childproduct->getId(), $processed)) {\\n $variant = new stdclass();\\n $variant->product_id = $childproduct->getId();\\n $processed[] = $childproduct->getId();\\n $variant->sku_number = $childproduct->getSku();\\n if ($childproduct->getGtin()) {\\n $variant->gtin = $childproduct->getGtin();\\n $variant->unique_identifier = true;\\n } else {\\n $variant->gtin = null;\\n $variant->unique_identifier = false;\\n }\\n $product_data['mpn'] = $childproduct->getMpn();\\n\\n if ($childproduct->getImage() && $childproduct->getImage() != 'no_selection') {\\n $mainimage = new stdclass();\\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\\n $mainimage->main = true;\\n $variant->product_image_urls = array();\\n $variant->product_image_urls[] = $mainimage;\\n }\\n $childimages = $childproduct->getMediaGalleryImages();\\n if (!empty($childimages)) {\\n foreach ($childproduct->getMediaGalleryImages() as $image) {\\n $subimage = new stdclass();\\n $subimage->url = $image->getUrl();\\n $subimage->main = false;\\n $variant->product_image_urls[] = $subimage;\\n }\\n }\\n\\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\\n $variant->stock = (INT) $stockItem->getQty();\\n $variant->sale_price = number_format((float) $product->getFinalPrice(), 2, '.', '');\\n $variant->retail_price = number_format((float) $product->getPrice(), 2, '.', '');\\n $variant->weight = $childproduct->getWeight();\\n $variant->weight_unit = 'kg';\\n\\n if ($childproduct->getMspCashback()) {\\n $variant->cashback = $childproduct->getMspCashback();\\n }\\n\\n $attrchild = array();\\n $attributes = $childproduct->getAttributes();\\n //print_r($attributes);exit;\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n Mage::app()->setCurrentStore($store_id);\\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\\n foreach ($attributes as $attribute) {\\n if ($attribute->getIsVisibleOnFront()) {\\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\\n $langlabels = $attribute->getStoreLabels();\\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\\n } elseif ($_coditionDefault) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\\n }\\n }\\n }\\n }\\n if (!empty($attrchild)) {\\n $variant->attributes = $attrchild;\\n }\\n $variants[] = $variant;\\n }\\n }\\n }\\n $product_data['variants'] = $variants;\\n } elseif ($product->getTypeId() == \\\"grouped\\\") {\\n $variants = array();\\n /*\\n * GET product variant (options) and add them as variants\\n */\\n\\n $collection = Mage::getModel('catalog/product_type_grouped')->getAssociatedProductCollection($product);\\n\\n $processed = array();\\n $prices = array();\\n foreach ($collection as $childproduct) {\\n\\n if (!in_array($childproduct->getId(), $processed)) {\\n\\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\\n\\n $variant = new stdclass();\\n $variant->product_id = $product_child->getId();\\n $processed[] = $product_child->getId();\\n $variant->sku_number = $product_child->getSku();\\n if ($product_child->getGtin()) {\\n $variant->gtin = $product_child->getGtin();\\n $variant->unique_identifier = true;\\n } else {\\n $variant->gtin = null;\\n $variant->unique_identifier = false;\\n }\\n $product_data['mpn'] = $product_child->getMpn();\\n\\n if ($product_child->getImage() && $product_child->getImage() != 'no_selection') {\\n $mainimage = new stdclass();\\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product_child->getImage();\\n $mainimage->main = true;\\n $variant->product_image_urls = array();\\n $variant->product_image_urls[] = $mainimage;\\n }\\n\\n $childimages = $product_child->getMediaGalleryImages();\\n if (!empty($childimages)) {\\n foreach ($product_child->getMediaGalleryImages() as $image) {\\n $subimage = new stdclass();\\n $subimage->url = $image->getUrl();\\n $subimage->main = false;\\n $variant->product_image_urls[] = $subimage;\\n }\\n }\\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_child->getId());\\n $variant->stock = (INT) $stockItem->getQty();\\n $variant->sale_price = number_format((float) $product_child->getFinalPrice(), 2, '.', '');\\n $variant->retail_price = number_format((float) $product_child->getPrice(), 2, '.', '');\\n $variant->weight = $product_child->getWeight();\\n $variant->weight_unit = 'kg';\\n if ($product_child->getMspCashback()) {\\n $variant->cashback = $product_child->getMspCashback();\\n }\\n\\n\\n\\n $prices[] = $variant->sale_price;\\n\\n $attrchild = array();\\n $attributes = $product_child->getAttributes();\\n //print_r($attributes);exit;\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n Mage::app()->setCurrentStore($store_id);\\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\\n foreach ($attributes as $attribute) {\\n if ($attribute->getIsVisibleOnFront()) {\\n $_coditionDefault = $product_child->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product_child);\\n $langlabels = $attribute->getStoreLabels();\\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\\n } elseif ($_coditionDefault) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\\n }\\n }\\n }\\n }\\n if (!empty($attrchild)) {\\n $variant->attributes = $attrchild;\\n }\\n $variants[] = $variant;\\n }\\n }\\n\\n /**\\n * Get child product tax rule. We need to set this as the main product is of type grouped and does not have this value.\\n * */\\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\\n $taxCalculation = Mage::getModel('tax/calculation');\\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\\n $tax_rule = new stdclass();\\n $rules = array();\\n\\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\\n if ($collection->getSize()) {\\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\\n }\\n if ($collection->getSize()) {\\n foreach ($collection as $rule) {\\n $rule_data = $rule->getData();\\n if (in_array($product_child->getTaxClassId(), $rule_data['product_tax_classes'])) {\\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\\n $rate_info = $rate->getData();\\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\\n $tax_rule->name = $rule_data['code'];\\n }\\n }\\n }\\n };\\n\\n $tax_rule->id = $product_child->getTaxClassId();\\n $tax_rule->rules = $rules;\\n $product_data['tax'] = $tax_rule;\\n\\n\\n $product_data['from_price'] = min($prices);\\n $product_data['variants'] = $variants;\\n }\\n\\n $options = $product->getOptions();\\n\\n if (!empty($options)) {\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($productId);\\n foreach ($productdata->getOptions() as $value) {\\n if (is_object($value)) {\\n $optionobjects = $value->getValues();\\n $values = array();\\n foreach ($optionobjects as $options) {\\n $data = $options->getData();\\n $optiondata = new stdclass();\\n $optiondata->id = $data['option_type_id'];\\n $optiondata->label = $data['title'];\\n $optiondata->pricing = $data['price'];\\n $optiondata->price_type = $data['price_type'];\\n $values[] = $optiondata;\\n if (!empty($data['option_type_id'])) {\\n $product_data['options']['global_options'][$language][$value->getTitle()] = array(\\n 'id' => $data['option_id'],\\n 'type' => 'custom',\\n //'label' => $value->getTitle(),\\n 'values' => $values\\n );\\n }\\n }\\n }\\n }\\n }\\n }\\n if ($product->getName() != null && $product->getTypeId() != \\\"bundle\\\" && $product->getTypeId() != \\\"downloadable\\\") {\\n $json[] = $product_data;\\n }\\n }\\n } elseif (!empty($product_id)) {\\n $stores = array();\\n $storeCollection = Mage::getModel('core/store')->getCollection();\\n\\n $json = array();\\n $product = Mage::getModel('catalog/product')->load($product_id);\\n\\n if ($product->getTypeId() == \\\"bundle\\\" || $product->getTypeId() == \\\"downloadable\\\") {\\n echo '{\\n \\\"success\\\": false,\\n \\\"data\\\": {\\n \\\"error_code\\\": \\\"QW-4005\\\",\\n \\\"error\\\": \\\"Product type not supported.\\\"\\n }\\n }'\\n ;\\n exit;\\n }\\n\\n $maincat = $subcats = '';\\n $cats = $product->getCategoryIds();\\n $category_ids = array();\\n foreach ($cats as $category_id) {\\n $_cat = Mage::getModel('catalog/category')->load($category_id);\\n if ($_cat->getIsActive()) {\\n $category_ids[] = $category_id;\\n }\\n }\\n\\n $product_data = array();\\n $product_data['product_id'] = $product_id;\\n $parentIds = null;\\n if ($product->getTypeId() == \\\"simple\\\") {\\n $parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product->getId()); // check for grouped product\\n if (!$parentIds)\\n $parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId()); //check for config product\\n }\\n\\n /* if (!empty($parentIds)) {\\n $product_data['parent_product_id'] = $parentIds[0];\\n } else {\\n $product_data['parent_product_id'] = null;\\n } */\\n $product_data['product_name'] = $product->getName();\\n $product_data['sku_number'] = $product->getSku();\\n $product_data['created'] = date(\\\"Y-m-d H:i:s\\\", Mage::getModel(\\\"core/date\\\")->timestamp($product->getCreatedAt()));\\n $product_data['updated'] = date(\\\"Y-m-d H:i:s\\\", Mage::getModel(\\\"core/date\\\")->timestamp($product->getUpdatedAt()));\\n\\n if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_VIRTUAL) {\\n $product_data['downloadable'] = true;\\n } else {\\n $product_data['downloadable'] = false;\\n }\\n\\n if ($product->getGtin()) {\\n $product_data['gtin'] = $product->getGtin();\\n $product_data['unique_identifier'] = true;\\n } else {\\n $product_data['gtin'] = null;\\n $product_data['unique_identifier'] = false;\\n }\\n\\n $product_data['mpn'] = $product->getMpn();\\n $product_data['brand'] = $product->getBrand();\\n $product_data['weight'] = $product->getWeight();\\n $product_data['weight_unit'] = 'kg';\\n $product_data['category_ids'] = $category_ids;\\n $product_data['product_url'] = $product->getProductUrl();\\n $product_data['product_image_urls'] = array();\\n\\n if ($product->getImage()) {\\n $mainimage = new stdclass();\\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();\\n $mainimage->main = true;\\n $product_data['product_image_urls'][] = $mainimage;\\n }\\n\\n foreach ($product->getMediaGalleryImages() as $image) {\\n $subimage = new stdclass();\\n $subimage->url = $image->getUrl();\\n $subimage->main = false;\\n $product_data['product_image_urls'][] = $subimage;\\n }\\n\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\\n $product_data['short_product_description'][$language] = (substr(iconv(\\\"UTF-8\\\", \\\"UTF-8//IGNORE\\\", $productdata->getShortDescription()), 0)) ? substr(iconv(\\\"UTF-8\\\", \\\"UTF-8//IGNORE\\\", $productdata->getShortDescription()), 0) : \\\"No short description available\\\";\\n $product_data['long_product_description'][$language] = (substr(iconv(\\\"UTF-8\\\", \\\"UTF-8//IGNORE\\\", $productdata->getDescription()), 0)) ? substr(iconv(\\\"UTF-8\\\", \\\"UTF-8//IGNORE\\\", $productdata->getDescription()), 0) : \\\"No description available\\\";\\n }\\n\\n $product_data['sale_price'] = number_format((float) $product->getFinalPrice(), 2, '.', '');\\n $product_data['retail_price'] = number_format((float) $product->getPrice(), 2, '.', '');\\n\\n if ($product->getMspCashback()) {\\n $product_data['cashback'] = $product->getMspCashback();\\n }\\n\\n\\n //$product_data['UniversalProductCode'] = $product->getData('upc'); //need variable\\n\\n /**\\n * Get product tax rule\\n * */\\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\\n $taxCalculation = Mage::getModel('tax/calculation');\\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\\n $tax_rule = new stdclass();\\n $rules = array();\\n\\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\\n if ($collection->getSize()) {\\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\\n }\\n if ($collection->getSize()) {\\n foreach ($collection as $rule) {\\n $rule_data = $rule->getData();\\n if (in_array($product->getTaxClassId(), $rule_data['product_tax_classes'])) {\\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\\n $rate_info = $rate->getData();\\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\\n $tax_rule->name = $rule_data['code'];\\n }\\n }\\n }\\n };\\n\\n $tax_rule->id = $product->getTaxClassId();\\n $tax_rule->rules = $rules;\\n $product_data['tax'] = $tax_rule;\\n\\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id);\\n $product_data['stock'] = (INT) $stockItem->getQty();\\n\\n $meta_data = array();\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\\n if ($productdata->getMetaTitle() && $productdata->getMetaKeyword() && $productdata->getMetaDescription()) {\\n $meta_data['title'][$language] = $productdata->getMetaTitle();\\n $meta_data['keyword'][$language] = $productdata->getMetaKeyword();\\n $meta_data['description'][$language] = $productdata->getMetaDescription();\\n }\\n }\\n\\n if (!empty($meta_data)) {\\n $product_data['metadata'] = $meta_data;\\n }\\n $attr = array();\\n $attributes = $product->getAttributes();\\n\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n Mage::app()->setCurrentStore($store_id);\\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\\n foreach ($attributes as $attribute) {\\n if ($attribute->getIsVisibleOnFront()) {\\n $_condition = $product->getAttributeText($attribute->getAttributeCode());\\n $_coditionDefault = $product->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product);\\n $attribute = Mage::getModel('eav/entity_attribute')->load($attribute->getAttributeId());\\n $langlabels = $attribute->getStoreLabels();\\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\\n } elseif ($_coditionDefault) {\\n $attr[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\\n }\\n }\\n }\\n }\\n if (!empty($attr)) {\\n $product_data['attributes'] = $attr;\\n }\\n\\n if ($product->isConfigurable()) {\\n $variants = array();\\n /*\\n * GET product variant (options) and add them as variants\\n */\\n $collection = Mage::getModel('catalog/product_type_configurable')->getUsedProducts(null, $product);\\n\\n $processed = array();\\n\\n foreach ($collection as $childproduct) {\\n\\n if (!in_array($childproduct->getId(), $processed)) {\\n\\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\\n\\n\\n $variant = new stdclass();\\n $variant->product_id = $childproduct->getId();\\n $processed[] = $childproduct->getId();\\n $variant->sku_number = $childproduct->getSku();\\n if ($childproduct->getGtin()) {\\n $variant->gtin = $childproduct->getGtin();\\n $variant->unique_identifier = true;\\n } else {\\n $variant->gtin = null;\\n $variant->unique_identifier = false;\\n }\\n $product_data['mpn'] = $childproduct->getMpn();\\n\\n if ($childproduct->getImage() && $childproduct->getImage() != 'no_selection') {\\n $mainimage = new stdclass();\\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $childproduct->getImage();\\n $mainimage->main = true;\\n $variant->product_image_urls = array();\\n $variant->product_image_urls[] = $mainimage;\\n }\\n\\n $childimages = $childproduct->getMediaGalleryImages();\\n if (!empty($childimages)) {\\n foreach ($childproduct->getMediaGalleryImages() as $image) {\\n $subimage = new stdclass();\\n $subimage->url = $image->getUrl();\\n $subimage->main = false;\\n $variant->product_image_urls[] = $subimage;\\n }\\n }\\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($childproduct->getId());\\n $variant->stock = (INT) $stockItem->getQty();\\n $variant->sale_price = number_format((float) $childproduct->getFinalPrice(), 2, '.', '');\\n $variant->retail_price = number_format((float) $childproduct->getPrice(), 2, '.', '');\\n $variant->weight = $product_child->getWeight();\\n $variant->weight_unit = 'kg';\\n\\n if ($product_child->getMspCashback()) {\\n $variant->cashback = $product_child->getMspCashback();\\n }\\n\\n\\n $attrchild = array();\\n $attributes = $childproduct->getAttributes();\\n //print_r($attributes);exit;\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n Mage::app()->setCurrentStore($store_id);\\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\\n foreach ($attributes as $attribute) {\\n if ($attribute->getIsVisibleOnFront()) {\\n $_coditionDefault = $childproduct->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($childproduct);\\n $langlabels = $attribute->getStoreLabels();\\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\\n } elseif ($_coditionDefault) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\\n }\\n }\\n }\\n }\\n if (!empty($attrchild)) {\\n $variant->attributes = $attrchild;\\n }\\n $variants[] = $variant;\\n }\\n }\\n $product_data['variants'] = $variants;\\n } elseif ($product->getTypeId() == \\\"grouped\\\") {\\n $variants = array();\\n /*\\n * GET product variant (options) and add them as variants\\n */\\n\\n $collection = Mage::getModel('catalog/product_type_grouped')->getAssociatedProductCollection($product);\\n\\n $processed = array();\\n $prices = array();\\n foreach ($collection as $childproduct) {\\n\\n if (!in_array($childproduct->getId(), $processed)) {\\n\\n $product_child = Mage::getModel('catalog/product')->load($childproduct->getId());\\n\\n $variant = new stdclass();\\n $variant->product_id = $product_child->getId();\\n $processed[] = $product_child->getId();\\n $variant->sku_number = $product_child->getSku();\\n if ($product_child->getGtin()) {\\n $variant->gtin = $product_child->getGtin();\\n $variant->unique_identifier = true;\\n } else {\\n $variant->gtin = null;\\n $variant->unique_identifier = false;\\n }\\n $product_data['mpn'] = $product_child->getMpn();\\n\\n if ($product_child->getImage() && $product_child->getImage() != 'no_selection') {\\n $mainimage = new stdclass();\\n $mainimage->url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product_child->getImage();\\n $mainimage->main = true;\\n $variant->product_image_urls = array();\\n $variant->product_image_urls[] = $mainimage;\\n }\\n\\n $childimages = $product_child->getMediaGalleryImages();\\n if (!empty($childimages)) {\\n foreach ($product_child->getMediaGalleryImages() as $image) {\\n $subimage = new stdclass();\\n $subimage->url = $image->getUrl();\\n $subimage->main = false;\\n $variant->product_image_urls[] = $subimage;\\n }\\n }\\n $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_child->getId());\\n $variant->stock = (INT) $stockItem->getQty();\\n $variant->sale_price = number_format((float) $product_child->getFinalPrice(), 2, '.', '');\\n $variant->retail_price = number_format((float) $product_child->getPrice(), 2, '.', '');\\n $variant->weight = $product_child->getWeight();\\n $variant->weight_unit = 'kg';\\n if ($product_child->getMspCashback()) {\\n $variant->cashback = $product_child->getMspCashback();\\n }\\n\\n\\n\\n $prices[] = $variant->sale_price;\\n\\n $attrchild = array();\\n $attributes = $product_child->getAttributes();\\n //print_r($attributes);exit;\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n Mage::app()->setCurrentStore($store_id);\\n $language = Mage::getStoreConfig('general/locale/code', $store_id);\\n foreach ($attributes as $attribute) {\\n if ($attribute->getIsVisibleOnFront()) {\\n $_coditionDefault = $product_child->getResource()->getAttribute($attribute->getAttributeCode())->setStoreId($store_id)->getFrontend()->getValue($product_child);\\n $langlabels = $attribute->getStoreLabels();\\n if (isset($langlabels[$store_id]) && $_coditionDefault != NULL) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $langlabels[$store_id], 'value' => $_coditionDefault);\\n } elseif ($_coditionDefault) {\\n $attrchild[$attribute->getAttributeCode()][$language] = array('label' => $attribute->getFrontendLabel(), 'value' => $_coditionDefault);\\n }\\n }\\n }\\n }\\n if (!empty($attrchild)) {\\n $variant->attributes = $attrchild;\\n }\\n $variants[] = $variant;\\n }\\n }\\n\\n /**\\n * Get child product tax rule. We need to set this as the main product is of type grouped and does not have this value.\\n * */\\n $taxRules = Mage::getModel('tax/sales_order_tax')->getCollection();\\n $taxCalculation = Mage::getModel('tax/calculation');\\n $request = $taxCalculation->getRateRequest(null, null, null, $store);\\n $tax_rule = new stdclass();\\n $rules = array();\\n\\n $collection = Mage::getModel('tax/calculation_rule')->getCollection();\\n if ($collection->getSize()) {\\n $collection->addCustomerTaxClassesToResult()->addProductTaxClassesToResult()->addRatesToResult();\\n }\\n if ($collection->getSize()) {\\n foreach ($collection as $rule) {\\n $rule_data = $rule->getData();\\n if (in_array($product_child->getTaxClassId(), $rule_data['product_tax_classes'])) {\\n foreach ($rule_data['tax_rates'] as $key => $rate_id) {\\n $rate = Mage::getSingleton('tax/calculation_rate')->load($rate_id);\\n $rate_info = $rate->getData();\\n $rules[$rate_info['tax_country_id']] = $rate_info['rate'];\\n $tax_rule->name = $rule_data['code'];\\n }\\n }\\n }\\n };\\n\\n $tax_rule->id = $product_child->getTaxClassId();\\n $tax_rule->rules = $rules;\\n $product_data['tax'] = $tax_rule;\\n\\n\\n $product_data['from_price'] = min($prices);\\n $product_data['variants'] = $variants;\\n }\\n\\n\\n $options = $product->getOptions();\\n\\n if (!empty($options)) {\\n foreach ($storeCollection as $store) {\\n $store_id = $store->getId();\\n $language = Mage::getStoreConfig('general/locale/code', $store->getId());\\n $productdata = Mage::getModel('catalog/product')->setStoreId($store_id)->load($product_id);\\n foreach ($productdata->getOptions() as $value) {\\n if (is_object($value)) {\\n $optionobjects = $value->getValues();\\n $values = array();\\n foreach ($optionobjects as $options) {\\n $data = $options->getData();\\n $optiondata = new stdclass();\\n $optiondata->id = $data['option_type_id'];\\n $optiondata->label = $data['title'];\\n $optiondata->pricing = $data['price'];\\n $optiondata->price_type = $data['price_type'];\\n $values[] = $optiondata;\\n\\n if (!empty($data['option_type_id'])) {\\n $product_data['options']['global_options'][$language][$value->getTitle()] = array(\\n 'id' => $data['option_id'],\\n 'type' => 'custom',\\n //'label' => $value->getTitle(),\\n 'values' => $values\\n );\\n }\\n }\\n }\\n }\\n }\\n }\\n if ($product->getName() != null) {\\n $json[] = $product_data;\\n }\\n }\\n return json_encode($json);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9713a6a1199d9d50e44e2ec0e979130f\",\n \"score\": \"0.6421514\",\n \"text\": \"public function list_product()\\n\\t{\\n\\t\\t$sql = $this->pdo->prepare(\\\"select * from product_tbl\\\");\\n\\t\\t$sql->execute();\\n\\t\\t$row = $sql->fetchAll(PDO::FETCH_OBJ);\\n\\t\\treturn $row;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99ac862c64deedeba1fd9c5fa0a4654b\",\n \"score\": \"0.64145136\",\n \"text\": \"function getProductList() {\\n try {\\n global $db;\\n\\n $sql = \\\"SELECT product_id, product, image \\\";\\n $sql .= \\\"FROM `products`;\\\";\\n\\n $stmt = $db->prepare($sql);\\n $stmt->execute();\\n\\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\\n return $results;\\n\\n } catch (PDOException $e) { die(\\\"Failed to get product listings\\\"); };\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31076a3b3bac5c205ef11b510a6f383e\",\n \"score\": \"0.64063555\",\n \"text\": \"public function getAllProducts() {\\n\\n // Creates a new array to contain each product\\n $products = array();\\n\\n // The SQL statement to get each product\\n $sql = 'SELECT products.idProduct, products.name, products.description, products.price FROM products';\\n\\n\\n // Queries the statement\\n $result = $this->con->query($sql);\\n\\n // Puts each product into the products array\\n while($row = $result->fetch_object()) {\\n $products[] = new Product($row->idProduct, $row->name, $row->description, $row->price);\\n }\\n\\n // Returns the products\\n return $products;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f47aae16193a9e00d5a8627d941944a\",\n \"score\": \"0.64004266\",\n \"text\": \"public function getProductList_bind() {\\n\\t\\t$query = $this->db->select(array('p.product_id', 'pd.name', 'pd.slug', 'p.sku',\\n\\t\\t\\t'p.price', 'pd.description', 'p.image'))\\n\\t\\t\\t->from('products as p')\\n\\t\\t\\t->join('product_desc as pd', 'pd.product_id = p.product_id', 'inner')\\n\\t\\t\\t->where('p.status', $this->_status)\\n\\t\\t\\t->limit($this->_pageNumber, $this->_offset)\\n\\t\\t\\t->get();\\n\\t\\treturn $query->result_array();\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":745,"cells":{"query_id":{"kind":"string","value":"74d99e6f9cefa0216e663b78c62fbb04"},"query":{"kind":"string","value":"Get all allowed currencies"},"positive_passages":{"kind":"list like","value":[{"docid":"c1e8f30afd3f66bfeeefc47697957ce9","score":"0.7572188","text":"public function getCurrencies()\n {\n return Mage::getModel('ml_converter/converter')->getAllCurrencies();\n }","title":""}],"string":"[\n {\n \"docid\": \"c1e8f30afd3f66bfeeefc47697957ce9\",\n \"score\": \"0.7572188\",\n \"text\": \"public function getCurrencies()\\n {\\n return Mage::getModel('ml_converter/converter')->getAllCurrencies();\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"7851487edc9f9b500965bee534df3eff","score":"0.8411949","text":"public function getOptionAllCurrencies();","title":""},{"docid":"ffceb262114a6f5be39c99760c392348","score":"0.82192683","text":"public function getAvailableCurrencies()\r\n {\r\n\t/*\r\n\t On liste les locales du répertoire WEB/currencies et vanilla currencies\r\n\t*/\r\n\r\n\t// TODO\r\n }","title":""},{"docid":"c93a52d2bffc392357a497cdb770eb96","score":"0.80391276","text":"public function getAll(): array\n {\n return $this->aSupportedCurrencies;\n }","title":""},{"docid":"627523d0b9b7be8c2f333c1988276dbe","score":"0.7929088","text":"public function getOptionCurrencies();","title":""},{"docid":"aabc2b8bb9ff2f1a55058d4b2f181092","score":"0.7861452","text":"public function getCurrencies() {\r\n return $this->publicRequest('getcurrencies');\r\n }","title":""},{"docid":"9e1cb51e11a35d84d29f5e60ba23490c","score":"0.7775624","text":"public static function getAllowedCurrencies()\n {\n return Common::getArrayKeys(self::$names);\n }","title":""},{"docid":"501b21b2d2605ce1f94b2607a603f42f","score":"0.7564946","text":"public function availableCurrencies()\n {\n return array_merge(array_keys($this->money), array_keys($this->conversions));\n }","title":""},{"docid":"cf5ccc60aec5caa5cba22be2f2133515","score":"0.7479808","text":"public static function getCurrencies() {\n return array(\n 'GBP',\n 'USD'\n );\n }","title":""},{"docid":"47455e4fd442d9d6d8adc17e566f654d","score":"0.74685156","text":"public function getActiveCurrencies() {\n $active_currencies = array();\n $blockonomics_currencies = $this->getSupportedCurrencies();\n foreach ($blockonomics_currencies as $code => $currency) {\n $enabled = get_option('blockonomics_'.$code);\n if($enabled || ($code === 'btc' && $enabled === false )){\n $active_currencies[$code] = $currency;\n }\n }\n return $active_currencies;\n }","title":""},{"docid":"b3a541d8049044c18bb57672eeb85f23","score":"0.7455563","text":"public function currencyList(){\n return $this->currencies;\n }","title":""},{"docid":"09083eb7820dd37409abcdb3cec654de","score":"0.7445249","text":"public function getSupportedCurrencies() {\n return array(\n 'btc' => array(\n 'code' => 'btc',\n 'name' => 'Bitcoin',\n 'uri' => 'bitcoin'\n ),\n 'bch' => array(\n 'code' => 'bch',\n 'name' => 'Bitcoin Cash',\n 'uri' => 'bitcoincash'\n )\n );\n }","title":""},{"docid":"25c584213e590060bb1383c54bfc33eb","score":"0.73739165","text":"public function getCurrencies() {\r\r\n return array(\"AUD\", \"BGN\", \"CAD\", \"CHF\", \"CZK\", \"DKK\", \"EEK\", \"EUR\", \"GBP\", \"HKD\",\r\r\n\t\t\t\"HUF\", \"LTL\", \"MYR\", \"MKD\", \"NOK\", \"NZD\", \"PLN\", \"RON\", \"SEK\", \"SGD\", \"USD\", \"ZAR\"\r\r\n\t\t);\r\r\n }","title":""},{"docid":"adbb72c2e7c87603406369c933936f38","score":"0.7327296","text":"public function getAllCurrency(){\n\n\t\t$allCurrency = \\Models\\Currency::all();\n\n\t\treturn $allCurrency;\n\t}","title":""},{"docid":"6e225ad7b82a5397eac9d436d33e3840","score":"0.73106754","text":"public function getAllCurrencies()\n\t{\n\n\t\tif(file_exists(self::$file_storage_path))\n\t\t{\n\t\t\t$currencies = file_get_contents(self::$file_storage_path);\n\t\t\treturn array_values(json_decode($currencies, true));\n\t\t}\n\n\t\treturn array();\n\t}","title":""},{"docid":"983159a65ae7f3a3b27e330a692bf21d","score":"0.73043096","text":"public function getCurrencies() {\n return $this->currencyRepository->getDataForSelectbox();\n }","title":""},{"docid":"41c381d80a63b43e87774534168508bc","score":"0.7287583","text":"public function getConfigAllowCurrencies()\n {\n $allowedCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_ALLOW);\n $appBaseCurrencyCode = Mage::app()->getBaseCurrencyCode();\n if (!in_array($appBaseCurrencyCode, $allowedCurrencies)) {\n $allowedCurrencies[] = $appBaseCurrencyCode;\n }\n foreach (Mage::app()->getStores() as $store) {\n $code = $store->getBaseCurrencyCode();\n if (!in_array($code, $allowedCurrencies)) {\n $allowedCurrencies[] = $code;\n }\n }\n\n return $allowedCurrencies;\n }","title":""},{"docid":"f5408de507275cc58170d44c4147bea3","score":"0.72822726","text":"public function getCurrencies()\r\n {\r\n return $this->currencyManager->fetchList();\r\n }","title":""},{"docid":"57d4a680e1b4e00c5c9138ee2e595d36","score":"0.724433","text":"public function getCurrencies() {\n\t\treturn array(\n\t\t\t'AUD',\n\t\t\t'BRL',\n\t\t\t'CAD',\n\t\t\t'CZK',\n\t\t\t'DKK',\n\t\t\t'EUR',\n\t\t\t'HKD',\n\t\t\t'HUF',\n\t\t\t'ILS',\n\t\t\t'JPY',\n\t\t\t'MYR',\n\t\t\t'MXN',\n\t\t\t'NOK',\n\t\t\t'NZD',\n\t\t\t'PHP',\n\t\t\t'PLN',\n\t\t\t'GBP',\n\t\t\t'SGD',\n\t\t\t'SEK',\n\t\t\t'CHF',\n\t\t\t'TWD',\n\t\t\t'THB',\n\t\t\t'TRY',\n\t\t\t'USD',\n\t\t);\n\t}","title":""},{"docid":"658d19b14687116d913864195501219d","score":"0.72340655","text":"public function getList()\n {\n $response = $this->call(Request::METHOD_GET, '/api/v1/currencies');\n return $response->getApiData();\n }","title":""},{"docid":"ec7255a5946b1da56149fe1080877976","score":"0.7230057","text":"public function getAcceptedCurrencyCodes()\n {\n return [$this->getConfigData('currency')];\n }","title":""},{"docid":"360545ecf120a7697cca6afb4bb8c4e6","score":"0.721829","text":"private static function fetchCurrencies(): array\n {\n $output = file_get_contents(static::CURRENCY_URL);\n $currencies = json_decode($output);\n $currencies = $currencies->data;\n\n return $currencies;\n }","title":""},{"docid":"0d7277eb68f9d0961c1c60cbbc1a6548","score":"0.720895","text":"public function getAllCurrenciesForCache()\n\t{\n\t\t$this->resetLocalCacheData('allBrcCurrencies');\n\n\t\t$currencies = $this->getAllCurrencies();\n\t\treturn $currencies;\n\t}","title":""},{"docid":"f533002e72ef2f72f53ce6b31f0de38c","score":"0.717648","text":"public function getBaseCurrencies() {\n\n $currencies=ExchangeRate::select('baseCur')->distinct()->get();\n return $currencies;\n }","title":""},{"docid":"ac740fd2906b80aea2448f0b26465ee9","score":"0.7167307","text":"function getSupportedCurrencies()\r\n {\r\n $currencies = array(\r\n array('ARS', 32, 2),\r\n array('AUD', 36, 2),\r\n array('KHR', 116, 0),\r\n array('CAD', 124, 2),\r\n array('CNY', 156, 1),\r\n array('HRK', 191, 2),\r\n array('CZK', 203, 2),\r\n array('DKK', 208, 2),\r\n array('EKK', 233, 2),\r\n array('HKD', 344, 2),\r\n array('HUF', 348, 2),\r\n array('ISK', 352, 0),\r\n array('IDR', 360, 0),\r\n array('JPY', 392, 0),\r\n array('KRW', 410, 0),\r\n array('LVL', 428, 2),\r\n array('LTL', 440, 2),\r\n array('MYR', 458, 2),\r\n array('MXN', 484, 2),\r\n array('NZD', 554, 2),\r\n array('NOK', 578, 2),\r\n array('PHP', 608, 2),\r\n array('RUB', 643, 2),\r\n array('SGD', 702, 2),\r\n array('ZAR', 710, 2),\r\n array('SEK', 752, 2),\r\n array('CHF', 756, 2),\r\n array('THB', 764, 2),\r\n array('GBP', 826, 2),\r\n array('USD', 840, 2),\r\n array('TWD', 901, 1),\r\n array('RON', 946, 2),\r\n array('TRY', 949, 2),\r\n array('XOF', 952, 0),\r\n array('BGN', 975, 2),\r\n array('EUR', 978, 2),\r\n array('PLN', 985, 2),\r\n array('BRL', 986, 2)\r\n );\r\n\r\n $payzenCurrencies = array();\r\n\r\n foreach ($currencies as $currency) {\r\n $payzenCurrencies[] = new PayzenCurrency($currency[0], $currency[1], $currency[2]);\r\n }\r\n\r\n return $payzenCurrencies;\r\n }","title":""},{"docid":"115f23236e3655010aae1d588a8ea4bd","score":"0.7109077","text":"public function getBaseCurrencies()\n {\n if ($this->baseCurrencies) {\n return $this->baseCurrencies;\n }\n\n $baseCurrencies = [];\n foreach ($this->_storeManager->getWebsites() as $w) {\n $bc = $w->getBaseCurrency()->getCode();\n $allowedCurrencies = [];\n $_stores = $w->getStores();\n if (is_array($_stores)) {\n $_allowedCurrencies = [];\n foreach ($_stores as $s) {\n $_allowedCurrencies = $s->getAvailableCurrencyCodes();\n if ($_allowedCurrencies) {\n $allowedCurrencies = array_merge($allowedCurrencies, $_allowedCurrencies);\n }\n }\n }\n\n $baseCurrencies[$bc] = isset($baseCurrencies[$bc]) ?\n array_merge($baseCurrencies[$bc], $allowedCurrencies) :\n $allowedCurrencies;\n $baseCurrencies[$bc] = array_unique($baseCurrencies[$bc]);\n }\n\n $this->baseCurrencies = $baseCurrencies;\n return $this->baseCurrencies;\n }","title":""},{"docid":"bde1c06af1baa4ccb2ee9a6b1678b3d4","score":"0.70994127","text":"public static function currencies()\n\t{\n\t\tstatic::_is_expired();\n\t\treturn static::$_currencies;\n\t}","title":""},{"docid":"c66be3074bfbba8a1dd84748f763ccd2","score":"0.7093258","text":"public function getCurrencies(): array\n {\n return $this->items;\n }","title":""},{"docid":"ca261ccb56e81ca13b7b4a1b1cb494e9","score":"0.7092081","text":"function caAvailableCurrenciesForConversion() {\n\t\trequire_once(__CA_LIB_DIR__.\"/core/Plugins/CurrencyConversion/EuroBank.php\");\n\t\t\n\t\ttry {\n\t\t\t$va_currency_list = WLPlugCurrencyConversionEuroBank::getCurrencyList();\n\t\t\tsort($va_currency_list);\n\t\t\treturn $va_currency_list;\n\t\t} catch (Exception $e) {\n\t\t\treturn null;\n\t\t}\n\t}","title":""},{"docid":"ac96a20a474c617c4a371ad59a7fcbb6","score":"0.70660913","text":"public static function currencies()\n {\n return [\n self::CURRENCY_US_DOLLAR,\n self::CURRENCY_CN_YUAN,\n self::CURRENCY_UAE_DIRHAM,\n self::CURRENCY_UK_POUND,\n self::CURRENCY_EURO\n ];\n }","title":""},{"docid":"4f12d530e367c3e00f1f6f2e14e962a1","score":"0.70244503","text":"public static function getCurrencies() {\n return array_keys(Connect2PayCurrencyHelper::$currencies);\n }","title":""},{"docid":"19d5df7dbf2599223479e7418a5abd31","score":"0.70197344","text":"public function get_accepted_currencies() {\n\t\treturn $this->currencies;\n\t}","title":""},{"docid":"1115de25f191af1dfc115cb7bb7255ab","score":"0.7017534","text":"private function getCurrencyList(): array\n {\n $curr = [];\n foreach (config('money') as $currency => $attrs) {\n $name = $attrs['name'].' ('.$attrs['symbol'].'/'.$currency.')';\n $curr[$currency] = $name;\n }\n\n return $curr;\n }","title":""},{"docid":"c431e094acd2663d93ca07477ac10ffe","score":"0.69313025","text":"public function currencies()\n\t{\n\t $currencies = [\n 'SAR' => 'Saudi Riyal',\n 'USD' => 'US Dollar',\n 'GBP' => 'British Pound',\n 'EUR' => 'Euro',\n 'CHF' => 'Swiss Franc',\n 'CAD' => 'Canadian Dollar',\n 'AUD' => 'Australian Dollar',\n ];\n\n\t return $currencies;\n\t}","title":""},{"docid":"5950ec1fd31cae86264b7999e5cb4c93","score":"0.68730104","text":"public function get_list_currency() {\n\t\t\t$currencies = $this->get_currencies();\n\t\t\t$list_currency = array();\n\t\t\tif ( $currencies ) {\n\n\t\t\t\tforeach ( $currencies as $currency => $data ) {\n\t\t\t\t\t$code = '';\n\t\t\t\t\t$lang = $data['languages'];\n\t\t\t\t\tforeach ( $lang as $key => $value ) {\n\t\t\t\t\t\tif ( $value ) {\n\t\t\t\t\t\t\t$code = $key;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$list_currency[ $code ] = array(\n\t\t\t\t\t\t'currency' => $currency,\n\t\t\t\t\t\t'rate' => $data['rate'],\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $list_currency;\n\t\t}","title":""},{"docid":"48a7f2c306d59f012c037e4d527e4cf3","score":"0.6862626","text":"public function currencies() {\n return array(\n '#type' => 'currency_element',\n );\n }","title":""},{"docid":"6f15e93efc8456afc6cc7aa934f562dc","score":"0.6833175","text":"public function getCurrencies()\n {\n $currencies = $this->getData('currencies');\n if (is_null($currencies)) {\n $currencies = array();\n $codes = Mage::app()->getStore()->getAvailableCurrencyCodes(true);\n if (is_array($codes) && count($codes) > 1) {\n $rates = Mage::getModel('directory/currency')->getCurrencyRates(\n Mage::app()->getStore()->getBaseCurrency(),\n $codes\n );\n\n foreach ($codes as $code) {\n if (isset($rates[$code])) {\n $currencies[$code] = Mage::app()->getLocale()\n ->getTranslation($code, 'nametocurrency');\n }\n }\n }\n\n $this->setData('currencies', $currencies);\n }\n return $currencies;\n }","title":""},{"docid":"de0dcb69da904bdf3553cdd75238f5e9","score":"0.68308306","text":"protected function getCurrencies ()\n {\n $folder = IOHelper::getFolder(CRAFT_PLUGINS_PATH . 'currencyprice/lib/currencies/');\n $currencies = [ ];\n\n if ( $folder ) {\n $files = $folder->getContents($recursive = false, $filter = '.json');\n\n // Loop through and read\n foreach ($files as $file) {\n $content = IOHelper::getFileContents($file);\n $currencies[] = json_decode($content, true);\n }\n }\n\n return $currencies;\n }","title":""},{"docid":"dbbdc4dcfcd3bbd1872abf65767f269c","score":"0.682822","text":"public function getAcceptedCurrencyCodes()\n {\n if (!$this->hasData('_accepted_currency')) {\n try {\n $this->_setApiKey();\n $currencies = Stripe_Account::retrieve()->currencies_supported;\n } catch (Stripe_Error $e) {\n Mage::log(\"Couldn't fetch the supported currencies for your stripe account\");\n $currencies = $this->_acceptedCurrencies;\n }\n $this->setData('_accepted_currency', $currencies);\n }\n return $this->_getData('_accepted_currency');\n }","title":""},{"docid":"cf3c3bb1ba314d8020cb8234d8c4ef95","score":"0.68088454","text":"public static function getCurrencies() {\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $st = $conn->prepare( \"SELECT shortdesc as codevalue, shortdesc FROM crm_lookup where codegroup = 'LG' and codeid = 'Currency' order by sortorder\");\n\t $st->execute();\n\t\n\t$list = array();\n\n while ( $row = $st->fetch() ) {\n $list[] = new crm_dropdown( $row );\n }\n\n $conn = null;\n return $list;\n\t}","title":""},{"docid":"a6eaf1076322674f98a9abec90556ab5","score":"0.68065816","text":"public function getAllEnabled(): array\n {\n if (is_null($this->aEnabledCurrencies)) {\n\n $aEnabled = appSetting(Settings\\General::KEY_ENABLED_CURRENCIES, Constants::MODULE_SLUG, []);\n\n $this->aEnabledCurrencies = [];\n foreach ($aEnabled as $sCode) {\n $this->aEnabledCurrencies[$sCode] = $this->getByIsoCode($sCode);\n }\n }\n\n return $this->aEnabledCurrencies;\n }","title":""},{"docid":"6208ccdaf5029ea54ad90cc976330056","score":"0.6789835","text":"public function getCurrencyCodeAllowableValues()\n {\n return [\n self::CURRENCY_CODE_AED,\n self::CURRENCY_CODE_ARS,\n self::CURRENCY_CODE_AUD,\n self::CURRENCY_CODE_AZN,\n self::CURRENCY_CODE_BGN,\n self::CURRENCY_CODE_BHD,\n self::CURRENCY_CODE_BRL,\n self::CURRENCY_CODE_CAD,\n self::CURRENCY_CODE_CHF,\n self::CURRENCY_CODE_CLP,\n self::CURRENCY_CODE_CNY,\n self::CURRENCY_CODE_COP,\n self::CURRENCY_CODE_CZK,\n self::CURRENCY_CODE_DKK,\n self::CURRENCY_CODE_EGP,\n self::CURRENCY_CODE_EUR,\n self::CURRENCY_CODE_FJD,\n self::CURRENCY_CODE_GBP,\n self::CURRENCY_CODE_GEL,\n self::CURRENCY_CODE_HKD,\n self::CURRENCY_CODE_HUF,\n self::CURRENCY_CODE_IDR,\n self::CURRENCY_CODE_ILS,\n self::CURRENCY_CODE_INR,\n self::CURRENCY_CODE_JOD,\n self::CURRENCY_CODE_JPY,\n self::CURRENCY_CODE_KRW,\n self::CURRENCY_CODE_KWD,\n self::CURRENCY_CODE_KZT,\n self::CURRENCY_CODE_MDL,\n self::CURRENCY_CODE_MXN,\n self::CURRENCY_CODE_MYR,\n self::CURRENCY_CODE_NAD,\n self::CURRENCY_CODE_NOK,\n self::CURRENCY_CODE_NZD,\n self::CURRENCY_CODE_OMR,\n self::CURRENCY_CODE_PLN,\n self::CURRENCY_CODE_QAR,\n self::CURRENCY_CODE_RON,\n self::CURRENCY_CODE_RUB,\n self::CURRENCY_CODE_SAR,\n self::CURRENCY_CODE_SEK,\n self::CURRENCY_CODE_SGD,\n self::CURRENCY_CODE_THB,\n self::CURRENCY_CODE__TRY,\n self::CURRENCY_CODE_TWD,\n self::CURRENCY_CODE_UAH,\n self::CURRENCY_CODE_USD,\n self::CURRENCY_CODE_XOF,\n self::CURRENCY_CODE_ZAR,\n ];\n }","title":""},{"docid":"bafdf8349cc0332a90e8b4fd9fb1d1a4","score":"0.67590326","text":"public function getArrayCurrencies()\n {\n return $this->arrayCurrencies;\n }","title":""},{"docid":"43fb041f2472ff0a53041007e0245c78","score":"0.67089266","text":"public function currency()\r\n\t{\r\n\t\t// set currency config\r\n\t\t$currencies = BLL_Currency::index();\r\n\t\treturn $currencies;\r\n\t}","title":""},{"docid":"2d8b6234bccb5d3440a4b530440f79db","score":"0.66843665","text":"protected function getCurrencyCodeMap() {\n return [];\n }","title":""},{"docid":"f460bd03b955d33d78e1f9c2110135f1","score":"0.66691995","text":"public function currencyCodes(){\n $currencies = collect($this->currencies)->pluck('code');\n return $currencies->toArray();\n }","title":""},{"docid":"a3fcfc8764572ce2e743cb3d9f934d65","score":"0.66668606","text":"public function getSupportedCurrencies()\n\t{\n\t\treturn array(\n\t\t\t'AUD',\n\t\t\t'BRL',\n\t\t\t'CAD',\n\t\t\t'CZK',\n\t\t\t'DKK',\n\t\t\t'EUR',\n\t\t\t'HKD',\n\t\t\t'HUF',\n\t\t\t'ILS',\n\t\t\t'JPY',\n\t\t\t'MYR',\n\t\t\t'MXN',\n\t\t\t'NOK',\n\t\t\t'NZD',\n\t\t\t'PHP',\n\t\t\t'PLN',\n\t\t\t'GBP',\n\t\t\t'RUB',\n\t\t\t'SGD',\n\t\t\t'SEK',\n\t\t\t'CHF',\n\t\t\t'TWD',\n\t\t\t'THB',\n\t\t\t'TRY',\n\t\t\t'USD',\n\t\t);\n\t}","title":""},{"docid":"430239acc06a9b728d9dd8e0c68b7ab6","score":"0.66647667","text":"public function getSupportedCurrencies()\n\t{\n\t\treturn array(\n\t\t\t'AUD',\n\t\t\t'BRL',\n\t\t\t'CAD',\n\t\t\t'CZK',\n\t\t\t'DKK',\n\t\t\t'EUR',\n\t\t\t'HKD',\n\t\t\t'HUF',\n\t\t\t'ILS',\n\t\t\t'JPY',\n\t\t\t'MYR',\n\t\t\t'MXN',\n\t\t\t'NOK',\n\t\t\t'NZD',\n\t\t\t'PHP',\n\t\t\t'PLN',\n\t\t\t'GBP',\n\t\t\t'RUB',\n\t\t\t'SGD',\n\t\t\t'SEK',\n\t\t\t'CHF',\n\t\t\t'TWD',\n\t\t\t'THB',\n\t\t\t'TRY',\n\t\t\t'USD'\n\t\t);\n\t}","title":""},{"docid":"ccf4ce73f49b2ba21b71e69083390ebf","score":"0.66570175","text":"public function getCurrencies($showAll = false)\n {\n // Get a list of currencies that need to be displayed\n // On profile: only ones marked is_displayed\n // In bank: ones marked is_displayed + the ones the user has\n\n $owned = UserCurrency::where('user_id', $this->id)->pluck('quantity', 'currency_id')->toArray();\n\n $currencies = Currency::where('is_user_owned', 1);\n if($showAll) $currencies->where(function($query) use($owned) {\n $query->where('is_displayed', 1)->orWhereIn('id', array_keys($owned));\n });\n else $currencies = $currencies->where('is_displayed', 1);\n\n $currencies = $currencies->orderBy('sort_user', 'DESC')->get();\n\n foreach($currencies as $currency) {\n $currency->quantity = isset($owned[$currency->id]) ? $owned[$currency->id] : 0;\n }\n\n return $currencies;\n }","title":""},{"docid":"6ea8a33120227dbae0e18b1c78fcd237","score":"0.664467","text":"function it_exchange_authorizenet_addon_get_currency_options( $default_currencies ) {\n\t$IT_Exchange_AuthorizeNet_Add_On = new IT_Exchange_AuthorizeNet_Add_On();\n\t$authnet_currencies = $IT_Exchange_AuthorizeNet_Add_On->get_supported_currency_options();\n\treturn array_intersect_key( $default_currencies, $authnet_currencies );\n}","title":""},{"docid":"161882efbc41d641040743c8f88db614","score":"0.6638184","text":"public function getActiveCurrencies()\n {\n return array_filter($this->getCurrencies(), function ($currency) {\n return $currency['active'] == true;\n });\n }","title":""},{"docid":"8eed5bb4977e7f6478ee820796b2e736","score":"0.662987","text":"public function getCurrencies($base = null)\n {\n if ($base === null) {\n return $this->getAllowedCurrencies();\n }\n $baseCurrencies = $this->getBaseCurrencies();\n $currencies = $baseCurrencies[$base];\n $_currencies = array_flip($currencies);\n\n if (isset($_currencies[$base])) {\n $k = $_currencies[$base];\n unset($currencies[$k]);\n array_unshift($currencies, $base);\n }\n\n return $currencies;\n }","title":""},{"docid":"94c40c9ba2b7940273dbb6167018f788","score":"0.6629343","text":"public function getActiveCurrencies()\n {\n return array_filter($this->getCurrencies(), function($currency) {\n return $currency['active'] == true;\n });\n }","title":""},{"docid":"58ae065eb4d172571498500179026919","score":"0.66194975","text":"function getAllCurrencies($available='available') {\n\tglobal $adb, $log;\n\t$log->debug(\"Entering into function getAllCurrencies($available)\");\n\n\t$sql = \"select * from vtiger_currency_info\";\n\tif ($available != 'all') {\n\t\t$sql .= \" where currency_status='Active' and deleted=0\";\n\t}\n\t$res=$adb->pquery($sql, array());\n\t$noofrows = $adb->num_rows($res);\n\n\tfor($i=0;$i<$noofrows;$i++)\n\t{\n\t\t$currency_details[$i]['currencylabel'] = $adb->query_result($res,$i,'currency_name');\n\t\t$currency_details[$i]['currencycode'] = $adb->query_result($res,$i,'currency_code');\n\t\t$currency_details[$i]['currencysymbol'] = $adb->query_result($res,$i,'currency_symbol');\n\t\t$currency_details[$i]['curid'] = $adb->query_result($res,$i,'id');\n\t\t/* alias key added to be consistent with result of InventoryUtils::getInventoryCurrencyInfo */\n\t\t$currency_details[$i]['currency_id'] = $adb->query_result($res,$i,'id');\n\t\t$currency_details[$i]['conversionrate'] = $adb->query_result($res,$i,'conversion_rate');\n\t\t$currency_details[$i]['curname'] = 'curname' . $adb->query_result($res,$i,'id');\n\t}\n\n\t$log->debug(\"Entering into function getAllCurrencies($available)\");\n\treturn $currency_details;\n\n}","title":""},{"docid":"00ebb312e12d2a7c8996c6937a8cfab9","score":"0.6614048","text":"public function getAvailableCurrency()\n {\n return array('AUD' => __('Australian Dollar (AUD)','paychoice'));\n }","title":""},{"docid":"56c1ae8a1ce366deac34530cb1849e13","score":"0.66126484","text":"public static function get_currencies() {\n\t\t$currency_type = isset($_POST['currency_type']) ? $_POST['currency_type'] : NULL;\n\t\tif($currency_type) {\n\t\t\t$client = new Client();\n\t\t\t$crawler = $client->request('GET', 'http://bonbast.com/');\n\n\t\t\t$temp_currencies = [];\n\n\t\t\t$crawler->filter('.table tr > td')->each(function ($node) use (&$temp_currencies) {\n\t\t\t\t$text = $node->text();\n\t\t\t\tif($text != \"Code\" && $text != \"Currency\" && $text != \"Sell\" && $text != \"Buy\") {\n\t\t\t\t\t$temp_currencies[] = $text;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$interval \t= count($temp_currencies) / 4;\n\t\t\t$counter = 0;\n\t\t\t$interval_counter \t= 0;\n\t\t\t$currencies = [];\n\n\t\t\tif(!empty($temp_currencies)) {\n\t\t\t\twhile($interval_counter <= $interval) {\n\t\t\t\t\t$temp_array = array_slice($temp_currencies, $counter, 4);\n\t\t\t\t\t$currencies[$temp_array[0]] = [\"sell\" => $temp_array[2], \"buy\" => $temp_array[3]];\n\t\t\t\t\t$counter += 4;\n\t\t\t\t\t$interval_counter += 1;\n\t\t\t\t}\n\t\t\t\t// Found Currencies\n\t\t\t\twp_send_json_success([\"message\" => $currencies[$currency_type]]);\n\t\t\t} else {\n\t\t\t\t// Couldn't Find Currencies\n\t\t\t\twp_send_json_error([\"message\" => \"Could not find any currency\"]);\n\t\t\t}\n\t\t} else {\n\t\t\twp_send_json_error([\"message\" => \"No type found\"]);\n\t\t}\n\t}","title":""},{"docid":"ac144f6afc8a6d0243b764fb74aa8b1b","score":"0.66113853","text":"public function getList(){\n $sql = \"SELECT * FROM `currency`\";\n return $this->db->query($sql);\n }","title":""},{"docid":"69ed816e02a7efeae5d50485e7899678","score":"0.6585566","text":"public static function all()\n\t{\n\t\tif (static::$_all !== null)\n\t\t\treturn static::$_all;\n\n\t\t// Try to get all from cache\n\t\t$cache = \\Yii::$app->getCache();\n\t\t$all = $cache->get(static::CACHE_KEY);\n\t\tif ($all === false || empty($all))\n\t\t{\n\t\t\t$all = null;\n\t\t\t$combinations = [];\n\t\t\t$currencies = [\n\t\t\t\t'ARS', 'BOB', 'BRL', 'CLP', 'COP', 'CRC', 'GTQ', 'HNL',\n\t\t\t\t'MXN', 'PAB', 'PEN', 'PYG', 'USD', 'UYU'\n\t\t\t];\n\t\t\t$currencies2 = ['USD'];\n\t\t\tforeach ($currencies as $cur)\n\t\t\t{\n\t\t\t\tforeach ($currencies2 as $cur2)\n\t\t\t\t{\n\t\t\t\t\tif ($cur != $cur2)\n\t\t\t\t\t\t$combinations[] = $cur . $cur2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$url = \"https://query.yahooapis.com/v1/public/yql?q=\";\n\t\t\t$query = 'select * from yahoo.finance.xchange where pair in (\"' . implode('\",\"', $combinations) . '\")';\n\t\t\t$url .= urlencode($query);\n\t\t\t$url .= \"&format=json\";\n\t\t\t$url .= \"&env=\" . urlencode(\"store://datatables.org/alltableswithkeys\");\n\n\t\t\t$res = @file_get_contents($url);\n\t\t\tif (!empty($res)) {\n\t\t\t\ttry {\n\t\t\t\t\t$resDecoded = json_decode($res, true);\n\t\t\t\t\tif (isset($resDecoded['query']['results']['rate']))\n\t\t\t\t\t{\n\t\t\t\t\t\tif (is_array($resDecoded['query']['results']['rate']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$all = [];\n\t\t\t\t\t\t\tforeach ($resDecoded['query']['results']['rate'] as $rateInfo)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$all[$rateInfo['id']] = floatval($rateInfo['Rate']);\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}\n\t\t\t\tcatch (\\Exception $ex) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Save to cache if could be obtained\n\t\t\tif (!empty($all))\n\t\t\t{\n\t\t\t\t// Add same to same conversions\n\t\t\t\tforeach ($currencies as $cur)\n\t\t\t\t\t$all[strtoupper($cur) . strtoupper($cur)] = 1;\n\t\t\t\t// Cache\n\t\t\t\t$cache->set(static::CACHE_KEY, $all, 3600 * 2); // Cache for 2 hours\n\t\t\t\tstatic::$_all = $all;\n\t\t\t}\n\t\t}\n\t\treturn $all;\n\t}","title":""},{"docid":"df37b5f159e8bce9d0de25c94ad64bfe","score":"0.6582513","text":"public function provideValidCurrencyCodes()\n {\n return [\n 'French euro' => [\n 'EUR',\n ['fr-FR' => 'euro', 'en-US' => 'euro'],\n ['fr-FR' => '€', 'en-US' => '€'],\n ],\n 'Peace money' => [\n 'PCE',\n ['fr-FR' => 'paix', 'en-US' => 'peace'],\n ['fr-FR' => '☮', 'en-US' => '☮'],\n ],\n ];\n }","title":""},{"docid":"6bd32b5167e6cfccd537289dc1774493","score":"0.65728307","text":"public function getCurrencies(): array\n {\n try {\n $responseJson = $this->_RESTcli->get(\"currencies\", null);\n } catch (BitPayException $e) {\n throw new CurrencyQueryException(\"failed to serialize Currency object : \".$e->getMessage(), null, null, $e->getApiCode());\n } catch (Exception $e) {\n throw new CurrencyQueryException(\"failed to serialize Currency object : \".$e->getMessage());\n }\n\n try {\n $mapper = new JsonMapper();\n $currencies = $mapper->mapArray(\n json_decode($responseJson),\n [],\n 'BitPaySDKLight\\Model\\Currency'\n );\n\n } catch (Exception $e) {\n throw new CurrencyQueryException(\n \"failed to deserialize BitPay server response (Currency) : \".$e->getMessage());\n }\n\n return $currencies;\n }","title":""},{"docid":"22bc55bae72b57ecf223d8a3d9caa7d9","score":"0.65410566","text":"public static function getAllCachedCurrencies()\n {\n if (empty(self::$allCachedCurrencies))\n {\n return null;\n }\n return self::$allCachedCurrencies;\n }","title":""},{"docid":"1d22d14712e7638ea72ba54e75d470d0","score":"0.65362346","text":"public function getAcceptedCurrencyCodes()\n {\n if (!$this->hasData('_accepted_currency')) {\n $acceptedCurrencyCodes = $this->dataHelper->getAllowedCurrencyCodes();\n $acceptedCurrencyCodes[] = $this->getConfigData('currency');\n $this->setData('_accepted_currency', $acceptedCurrencyCodes);\n }\n return $this->_getData('_accepted_currency');\n }","title":""},{"docid":"f0a67a0d6a95ed750dd0888204321f99","score":"0.6506289","text":"public function getSupportedCurrenciesCodes(): array\n {\n $codes = [];\n\n /** @var ExchangeRate $eurExchangeRate */\n foreach ($this->items as $eurExchangeRate) {\n $codes[] = $eurExchangeRate->getToCurrency();\n }\n\n return $codes;\n }","title":""},{"docid":"bdc26b894ef42e5d1111997f6501f62e","score":"0.6499436","text":"public function currencies(): CurrencyCollection\n {\n $currencies = $this->getCurrenciesByDate();\n\n return $currencies->isNotEmpty() ? $currencies : $this->saveAndGetCurrencies();\n }","title":""},{"docid":"ec11494fe7a12d4f1f5660d455069ed4","score":"0.6443551","text":"public function getConfigBaseCurrencies()\n {\n $defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);\n return $defaultCurrencies;\n }","title":""},{"docid":"44f4f618e620908bb94adff96a32d788","score":"0.6427649","text":"protected\n\tfunction getTemplateCurrencies()\n\t{\n\t\t$currencies = array();\n\n\t\tif($this->useCurrency) {\n\t\t\tif(isset($this->arResult['CONVERT_CURRENCY']['CURRENCY_ID'])) {\n\t\t\t\t$currencyFormat = \\CCurrencyLang::GetFormatDescription($this->arResult['CONVERT_CURRENCY']['CURRENCY_ID']);\n\t\t\t\t$currencies = array(\n\t\t\t\t\t array(\n\t\t\t\t\t\t\t'CURRENCY' => $this->arResult['CONVERT_CURRENCY']['CURRENCY_ID'],\n\t\t\t\t\t\t\t'FORMAT' => array(\n\t\t\t\t\t\t\t\t 'FORMAT_STRING' => $currencyFormat['FORMAT_STRING'],\n\t\t\t\t\t\t\t\t 'DEC_POINT' => $currencyFormat['DEC_POINT'],\n\t\t\t\t\t\t\t\t 'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'],\n\t\t\t\t\t\t\t\t 'DECIMALS' => $currencyFormat['DECIMALS'],\n\t\t\t\t\t\t\t\t 'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],\n\t\t\t\t\t\t\t\t 'HIDE_ZERO' => $currencyFormat['HIDE_ZERO'],\n\t\t\t\t\t\t\t),\n\t\t\t\t\t ),\n\t\t\t\t);\n\t\t\t\tunset($currencyFormat);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$currencyIterator = Currency\\CurrencyTable::getList(array(\n\t\t\t\t\t 'select' => array('CURRENCY'),\n\t\t\t\t));\n\t\t\t\twhile($currency = $currencyIterator->fetch()) {\n\t\t\t\t\t$currencyFormat = \\CCurrencyLang::GetFormatDescription($currency['CURRENCY']);\n\t\t\t\t\t$currencies[] = array(\n\t\t\t\t\t\t 'CURRENCY' => $currency['CURRENCY'],\n\t\t\t\t\t\t 'FORMAT' => array(\n\t\t\t\t\t\t\t\t'FORMAT_STRING' => $currencyFormat['FORMAT_STRING'],\n\t\t\t\t\t\t\t\t'DEC_POINT' => $currencyFormat['DEC_POINT'],\n\t\t\t\t\t\t\t\t'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'],\n\t\t\t\t\t\t\t\t'DECIMALS' => $currencyFormat['DECIMALS'],\n\t\t\t\t\t\t\t\t'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],\n\t\t\t\t\t\t\t\t'HIDE_ZERO' => $currencyFormat['HIDE_ZERO'],\n\t\t\t\t\t\t ),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tunset($currencyFormat, $currency, $currencyIterator);\n\t\t\t}\n\t\t}\n\n\t\treturn $currencies;\n\t}","title":""},{"docid":"8118e13f85664112b0b13ebcda245085","score":"0.6370458","text":"public function stockCurrenciesList()\n {\n $url = '/admin/stock_currencies.json';\n\n return new Response\\Response(\n $this->client->get($url),\n sprintf('array<%s>', Model\\StockCurrency::class)\n );\n }","title":""},{"docid":"fe1c0a2aee0a50c5b0c078a993b8c852","score":"0.636961","text":"function get_supported_currency_options() {\n\t\t$options = array(\n\t\t\t'USD' => __( 'United States Dollar' ),\n\t\t\t'CAD' => __( 'Canadian Dollar' ),\n\t\t\t'GBP' => __( 'British Pound' ),\n\t\t\t'EUR' => __( 'European Euro' ),\n\t\t);\n\t\treturn $options;\n\t}","title":""},{"docid":"1f3064bf80173f066ec36864d81639a4","score":"0.63643676","text":"protected function loadCurrencies()\n {\n $currencies = $this->apiCall('WHMCS_Misc', 'get_currencies');\n if (empty($currencies->currencies->currency))\n {\n throw new Exception('No currencies found in WHMCS');\n }\n\n $currenciesWrapper = new $this->config['currencies_class']($currencies->currencies->currency);\n\n // Save currencies array into Redis cache\n $this->redis->set('currencies', serialize($currenciesWrapper));\n // Set currencies expiration based on config value\n $this->redis->expire('currencies', $this->config['currencies_cache_expiration']);\n // Save currencies array in the current connection instance for further usage in current app run\n $this->currencies = $currenciesWrapper;\n\n return $this->currencies;\n }","title":""},{"docid":"fcddbe68d5a909f2870a878771e8f419","score":"0.6348973","text":"public static function get_currency_codes()\n\t{\n\t\treturn internal_getAllCurrencyCodes();\n\t}","title":""},{"docid":"ff407c2127045ab7ce9c2faccd333a52","score":"0.63208085","text":"public function getCurrenciesWithoutDecimal()\n {\n return array('JPY');\n }","title":""},{"docid":"e7784d9f713c050180fd134a95796b6a","score":"0.631086","text":"public function index()\n {\n return response(Currency::all());\n }","title":""},{"docid":"f3088d83cfd61281d2c93cf3c4962103","score":"0.6286329","text":"public static function getPayPalCurrencies() {\n return self::$currencyCodes;\n }","title":""},{"docid":"fcb9f8a5e7b5d56b040d0b3fe75bba0c","score":"0.6278225","text":"public function listCurrencies(Request $request)\n {\n $currencies = $this->currencies;\n if ($request->wantsJson()) {\n return Helper::json($currencies);\n }\n\n $list = \"# Currency code - Currency name\" . PHP_EOL;\n foreach($currencies as $code => $name) {\n $list .= $code . \" - \" . $name . PHP_EOL;\n }\n return Helper::text($list);\n }","title":""},{"docid":"a2da9cdc5bcf2a44639678cad3a50df3","score":"0.6275059","text":"public function getCurrencies($market = '')\n {\n return $this->makeRequest(\"core/3/currencies\", [\n \"market\" => $market\n ]);\n }","title":""},{"docid":"06fc80c86247c696ee2302acf484cd2e","score":"0.62570703","text":"public function index()\n {\n try {\n $currencies = CurrencyResource::collection($this->service()->query()->paginate(20));\n }catch (QueryException $e) {\n return $this->respondInvalidQuery();\n }\n\n return $currencies;\n }","title":""},{"docid":"61c299a73cb943070eba275558dad48c","score":"0.62163955","text":"function rcp_get_currencies() {\n\t$currencies = array(\n\t\t'USD' => __( 'US Dollars (&#36;)', 'rcp' ),\n\t\t'EUR' => __( 'Euros (&euro;)', 'rcp' ),\n\t\t'GBP' => __( 'Pounds Sterling (&pound;)', 'rcp' ),\n\t\t'AUD' => __( 'Australian Dollars (&#36;)', 'rcp' ),\n\t\t'BRL' => __( 'Brazilian Real (&#36;)', 'rcp' ),\n\t\t'CAD' => __( 'Canadian Dollars (&#36;)', 'rcp' ),\n\t\t'CZK' => __( 'Czech Koruna', 'rcp' ),\n\t\t'DKK' => __( 'Danish Krone', 'rcp' ),\n\t\t'HKD' => __( 'Hong Kong Dollar (&#36;)', 'rcp' ),\n\t\t'HUF' => __( 'Hungarian Forint', 'rcp' ),\n\t\t'ILS' => __( 'Israeli Shekel', 'rcp' ),\n\t\t'JPY' => __( 'Japanese Yen (&yen;)', 'rcp' ),\n\t\t'MYR' => __( 'Malaysian Ringgits', 'rcp' ),\n\t\t'MXN' => __( 'Mexican Peso (&#36;)', 'rcp' ),\n\t\t'NZD' => __( 'New Zealand Dollar (&#36;)', 'rcp' ),\n\t\t'NOK' => __( 'Norwegian Krone', 'rcp' ),\n\t\t'PHP' => __( 'Philippine Pesos', 'rcp' ),\n\t\t'PLN' => __( 'Polish Zloty', 'rcp' ),\n\t\t'SGD' => __( 'Singapore Dollar (&#36;)', 'rcp' ),\n\t\t'SEK' => __( 'Swedish Krona', 'rcp' ),\n\t\t'CHF' => __( 'Swiss Franc', 'rcp' ),\n\t\t'TWD' => __( 'Taiwan New Dollars', 'rcp' ),\n\t\t'THB' => __( 'Thai Baht', 'rcp' ),\n\t\t'TRY' => __( 'Turkish Lira', 'rcp' ),\n\t\t'RIAL'=> __( 'Iranian Rial (&#65020;)', 'rcp' ),\n\t\t'RUB' => __( 'Russian Rubles', 'rcp' )\n\t);\n\treturn apply_filters( 'rcp_currencies', $currencies );\n}","title":""},{"docid":"9b31789d894ba19dce964f04732bd06e","score":"0.616579","text":"function getCurrencies ($pIncludeBlank=false) {\n\t\t\n\t\ttry {\n\t\t\t$db = new sentencia();\n\t\t\t\n\t\t\t$qy=\"select * from currencies order by name\";\n\t\t\t$result = $db->Query($qy);\n\t\t\t\n\t\t\t//*********NO ESTA BIEN MODELADO USAR ROWCOUNT*********\n\t\t\t//$rowcount=mysqli_num_rows($resultUsers);\n\t\t\t//return $rowcount;\n\t\t\t\n\t\t\t$list = array();\n\t\t\tif ($pIncludeBlank) $list[''] = '';\n\t\t\tforeach($result as $row){\n\t\t\t\t$list[$row['name']] = $row['id_currency'];\n\t\t\t}\n\t\t\treturn $list;\n\t\n\t\t} catch (Exception $e) {\n\t\t\treturn \"ERROR: \".$e->getMessage();\n\t\t}\n\t\n\t}","title":""},{"docid":"0535896147e7d7bbea0eda3608418e27","score":"0.6153119","text":"public function getAllowedMerchantCountries()\n {\n return ['US', 'CA', 'AU', 'NZ'];\n }","title":""},{"docid":"fa7cb62eeebde0f255df3e8d01312e70","score":"0.6152142","text":"public function index()\n {\n $currencyRepository = new CurrencyRepository();\n\n return new CurrencyCollection($currencyRepository->all(false));\n }","title":""},{"docid":"44dfa4028485d5aab6ebb39f56ea11f7","score":"0.6149409","text":"public function getCurrenciesRatios()\n {\n $currenciesRatios = [];\n $deprecatedDataProviders = [];\n foreach($this->_dataStorages as $priority => $dataStorage){\n if($dataStorage->hasActualRatios()){\n $currenciesRatios = $dataStorage->getRatios();\n } else {\n $deprecatedDataProviders[] = $dataStorage;\n }\n }\n\n if(count($deprecatedDataProviders) > 0 && !empty($currenciesRatios)){\n foreach($this->_dataStorages as $dataStorage){\n $dataStorage->storeRatios($currenciesRatios);\n }\n }\n\n if($currenciesRatios){\n throw new Exception(); // Throws exception, that signalize? that we could not load any currencies data\n }\n\n return $currenciesRatios;\n }","title":""},{"docid":"20fb87e1e0a22ed60a34d48e0d603891","score":"0.6149274","text":"public function getAllFlat(): array\n {\n return $this->aSupportedCurrenciesFlat;\n }","title":""},{"docid":"fcd98d47e40d512ac5e84c7c5e230ca5","score":"0.6133739","text":"public function retrieveCurrencies()\n {\n throw new \\RuntimeException('You must override this method in a converter');\n }","title":""},{"docid":"ebbad146e194a5d49b38edf27f852fc7","score":"0.61281174","text":"public function service_list()\r\n {\r\n $service_list = array(\r\n \"get_currency_list\" => TRUE\r\n );\r\n return $service_list;\r\n }","title":""},{"docid":"ad47f577a159df5fe77649510ba7be53","score":"0.6089195","text":"public static function getPayPalExpressCheckoutCurrencies() {\n\n $currencies = array();\n foreach(self::$ecCurrencies as $code => $currency) {\n $currencies[$code] = $currency;\n }\n return $currencies;\n }","title":""},{"docid":"f7f8d179c00855a8f135beda0d82bd2f","score":"0.60784596","text":"public function getSupported(): array\n {\n return (array) json_decode(\n (string) file_get_contents(NAILS_PATH . 'module-currency/resources/currencies.json')\n );\n }","title":""},{"docid":"0da0501cf8596f74d2f73e884d04045c","score":"0.60561955","text":"public function getAllowedCountries()\n {\n return explode(\",\", Mage::getStoreConfig(\"hermes/general/allowed_countries\"));\n }","title":""},{"docid":"8bb666296658ae096e5c4d11d9b24813","score":"0.6052799","text":"public function get_currency_list()\r\n { \r\n // file dump -- for testing purpose -- Start --\r\n /*\r\n $current = \"\\n------------------------------\\n\";\r\n $current .= \"CB_Property -- upload_listing -- ori input\\n\";\r\n $current .= gettype($input_data);\r\n $current .= \"\\n\";\r\n $current .= json_encode($input_data);\r\n $current .= \"\\n\";\r\n $current .= \"\\nCB_Property -- upload_listing -- after init\\n\";\r\n $current .= json_encode($property_info);\r\n error_log($current, 3, \"D:/webdev/resphere_test_dump.txt\"); \r\n // file dump -- for testing purpose -- End --*/\r\n \r\n if($this->is_error){return 0;}\r\n \r\n // Build model array data\r\n $library_data = array(\r\n 'library' => $this->properties_library_name,\r\n 'function' => \"get_supported_currency\",\r\n 'data' =>''\r\n );\r\n\r\n // Pump in data (contain error check)\r\n $currency_return = $this->invoke_library_function($library_data);\r\n \r\n if($this->is_error){return 0;}\r\n\r\n $status_information = \"Info: Successfully get supported currency\";\r\n $return_data = $currency_return[\"data\"];\r\n $this->set_data($status_information,$return_data);\r\n\r\n }","title":""},{"docid":"6c09753c790c4318bf3aea91d7e955da","score":"0.60243773","text":"public function actionCurrencies() {\n $searchModel = new FpListsSearch();\n $condition = \"in_list_of = 'currencies'\";\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $condition); \n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }","title":""},{"docid":"8a19ebcc84d5367045277ed02400d052","score":"0.6014311","text":"function index() {\n $this->smarty->assign('currencies', Currencies::findAll());\n }","title":""},{"docid":"547a8bc78bcf9c0d4e23c1f455106b0c","score":"0.60140914","text":"public function getUnSupportedCurrencies($bankName = null)\n\t{\n\t\tif (!$bankName) {\n\t\t\t$bankName = 'Settings_CurrencyUpdate_models_' . $this->getActiveBankName() . '_BankModel';\n\t\t}\n\t\t$bank = new $bankName();\n\n\t\t$supported = $bank->getSupportedCurrencies($bankName);\n\t\t$db = PearDatabase::getInstance();\n\n\t\t$query = 'SELECT `currency_name`, `currency_code` FROM vtiger_currency_info WHERE `currency_status` = \"Active\" && `deleted` = 0;';\n\t\t$result = $db->query($query);\n\n\t\t$unsupported = [];\n\t\twhile ($row = $db->fetchByAssoc($result)) {\n\t\t\t$name = $row['currency_name'];\n\t\t\t$code = $row['currency_code'];\n\n\t\t\t$unsupported[$name] = $code;\n\t\t}\n\n\t\treturn array_diff($unsupported, $supported);\n\t}","title":""},{"docid":"2cd6ef0237d1033225421ae8348f572b","score":"0.6004181","text":"function quickpay_currency_codes() {\n static $currencies = array('DKK' => 100, 'USD' => 100, 'EUR' => 100,\n 'GBP' => 100);\n return $currencies;\n}","title":""},{"docid":"4feef08b668f02d8a48f92d2c95ce2f8","score":"0.59614563","text":"public function getCurrencyCollection()\r\n\t\t{\r\n\t\t\treturn $this->getCollectionFor(\"FEParamGetTiposMonedas\");\r\n\t\t}","title":""},{"docid":"dbd41478b104f2a43de080df30c71a56","score":"0.5956906","text":"public function getSupportedCurrencies($bankName = null)\n\t{\n\t\tif (!$bankName) {\n\t\t\t$bankName = 'Settings_CurrencyUpdate_models_' . $this->getActiveBankName() . '_BankModel';\n\t\t}\n\t\t$bank = new $bankName();\n\n\t\treturn $bank->getSupportedCurrencies();\n\t}","title":""},{"docid":"d4f03f842937a6ce81b43ca3838f81ee","score":"0.5951586","text":"public function getCurrency();","title":""},{"docid":"d4f03f842937a6ce81b43ca3838f81ee","score":"0.5951586","text":"public function getCurrency();","title":""},{"docid":"d4f03f842937a6ce81b43ca3838f81ee","score":"0.5951586","text":"public function getCurrency();","title":""},{"docid":"d4f03f842937a6ce81b43ca3838f81ee","score":"0.5951586","text":"public function getCurrency();","title":""},{"docid":"d4f03f842937a6ce81b43ca3838f81ee","score":"0.5951586","text":"public function getCurrency();","title":""},{"docid":"d4f03f842937a6ce81b43ca3838f81ee","score":"0.5951586","text":"public function getCurrency();","title":""},{"docid":"5dc46e254b7551428c7d81ee2d9d2fe6","score":"0.59502494","text":"private function collectData()\n {\n return $this->cache->remember('Moloni_Currencies', function() {\n $availableCurrencies = $this->currenciesApi->getAll();\n\n $currencies = [];\n\n foreach($availableCurrencies as $currency) {\n $currencies[$currency['iso4217']] = $currency['currency_id'];\n }\n\n return $currencies;\n });\n }","title":""}],"string":"[\n {\n \"docid\": \"7851487edc9f9b500965bee534df3eff\",\n \"score\": \"0.8411949\",\n \"text\": \"public function getOptionAllCurrencies();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ffceb262114a6f5be39c99760c392348\",\n \"score\": \"0.82192683\",\n \"text\": \"public function getAvailableCurrencies()\\r\\n {\\r\\n\\t/*\\r\\n\\t On liste les locales du répertoire WEB/currencies et vanilla currencies\\r\\n\\t*/\\r\\n\\r\\n\\t// TODO\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c93a52d2bffc392357a497cdb770eb96\",\n \"score\": \"0.80391276\",\n \"text\": \"public function getAll(): array\\n {\\n return $this->aSupportedCurrencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"627523d0b9b7be8c2f333c1988276dbe\",\n \"score\": \"0.7929088\",\n \"text\": \"public function getOptionCurrencies();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aabc2b8bb9ff2f1a55058d4b2f181092\",\n \"score\": \"0.7861452\",\n \"text\": \"public function getCurrencies() {\\r\\n return $this->publicRequest('getcurrencies');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e1cb51e11a35d84d29f5e60ba23490c\",\n \"score\": \"0.7775624\",\n \"text\": \"public static function getAllowedCurrencies()\\n {\\n return Common::getArrayKeys(self::$names);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"501b21b2d2605ce1f94b2607a603f42f\",\n \"score\": \"0.7564946\",\n \"text\": \"public function availableCurrencies()\\n {\\n return array_merge(array_keys($this->money), array_keys($this->conversions));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf5ccc60aec5caa5cba22be2f2133515\",\n \"score\": \"0.7479808\",\n \"text\": \"public static function getCurrencies() {\\n return array(\\n 'GBP',\\n 'USD'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47455e4fd442d9d6d8adc17e566f654d\",\n \"score\": \"0.74685156\",\n \"text\": \"public function getActiveCurrencies() {\\n $active_currencies = array();\\n $blockonomics_currencies = $this->getSupportedCurrencies();\\n foreach ($blockonomics_currencies as $code => $currency) {\\n $enabled = get_option('blockonomics_'.$code);\\n if($enabled || ($code === 'btc' && $enabled === false )){\\n $active_currencies[$code] = $currency;\\n }\\n }\\n return $active_currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3a541d8049044c18bb57672eeb85f23\",\n \"score\": \"0.7455563\",\n \"text\": \"public function currencyList(){\\n return $this->currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09083eb7820dd37409abcdb3cec654de\",\n \"score\": \"0.7445249\",\n \"text\": \"public function getSupportedCurrencies() {\\n return array(\\n 'btc' => array(\\n 'code' => 'btc',\\n 'name' => 'Bitcoin',\\n 'uri' => 'bitcoin'\\n ),\\n 'bch' => array(\\n 'code' => 'bch',\\n 'name' => 'Bitcoin Cash',\\n 'uri' => 'bitcoincash'\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25c584213e590060bb1383c54bfc33eb\",\n \"score\": \"0.73739165\",\n \"text\": \"public function getCurrencies() {\\r\\r\\n return array(\\\"AUD\\\", \\\"BGN\\\", \\\"CAD\\\", \\\"CHF\\\", \\\"CZK\\\", \\\"DKK\\\", \\\"EEK\\\", \\\"EUR\\\", \\\"GBP\\\", \\\"HKD\\\",\\r\\r\\n\\t\\t\\t\\\"HUF\\\", \\\"LTL\\\", \\\"MYR\\\", \\\"MKD\\\", \\\"NOK\\\", \\\"NZD\\\", \\\"PLN\\\", \\\"RON\\\", \\\"SEK\\\", \\\"SGD\\\", \\\"USD\\\", \\\"ZAR\\\"\\r\\r\\n\\t\\t);\\r\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"adbb72c2e7c87603406369c933936f38\",\n \"score\": \"0.7327296\",\n \"text\": \"public function getAllCurrency(){\\n\\n\\t\\t$allCurrency = \\\\Models\\\\Currency::all();\\n\\n\\t\\treturn $allCurrency;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e225ad7b82a5397eac9d436d33e3840\",\n \"score\": \"0.73106754\",\n \"text\": \"public function getAllCurrencies()\\n\\t{\\n\\n\\t\\tif(file_exists(self::$file_storage_path))\\n\\t\\t{\\n\\t\\t\\t$currencies = file_get_contents(self::$file_storage_path);\\n\\t\\t\\treturn array_values(json_decode($currencies, true));\\n\\t\\t}\\n\\n\\t\\treturn array();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"983159a65ae7f3a3b27e330a692bf21d\",\n \"score\": \"0.73043096\",\n \"text\": \"public function getCurrencies() {\\n return $this->currencyRepository->getDataForSelectbox();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41c381d80a63b43e87774534168508bc\",\n \"score\": \"0.7287583\",\n \"text\": \"public function getConfigAllowCurrencies()\\n {\\n $allowedCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_ALLOW);\\n $appBaseCurrencyCode = Mage::app()->getBaseCurrencyCode();\\n if (!in_array($appBaseCurrencyCode, $allowedCurrencies)) {\\n $allowedCurrencies[] = $appBaseCurrencyCode;\\n }\\n foreach (Mage::app()->getStores() as $store) {\\n $code = $store->getBaseCurrencyCode();\\n if (!in_array($code, $allowedCurrencies)) {\\n $allowedCurrencies[] = $code;\\n }\\n }\\n\\n return $allowedCurrencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5408de507275cc58170d44c4147bea3\",\n \"score\": \"0.72822726\",\n \"text\": \"public function getCurrencies()\\r\\n {\\r\\n return $this->currencyManager->fetchList();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57d4a680e1b4e00c5c9138ee2e595d36\",\n \"score\": \"0.724433\",\n \"text\": \"public function getCurrencies() {\\n\\t\\treturn array(\\n\\t\\t\\t'AUD',\\n\\t\\t\\t'BRL',\\n\\t\\t\\t'CAD',\\n\\t\\t\\t'CZK',\\n\\t\\t\\t'DKK',\\n\\t\\t\\t'EUR',\\n\\t\\t\\t'HKD',\\n\\t\\t\\t'HUF',\\n\\t\\t\\t'ILS',\\n\\t\\t\\t'JPY',\\n\\t\\t\\t'MYR',\\n\\t\\t\\t'MXN',\\n\\t\\t\\t'NOK',\\n\\t\\t\\t'NZD',\\n\\t\\t\\t'PHP',\\n\\t\\t\\t'PLN',\\n\\t\\t\\t'GBP',\\n\\t\\t\\t'SGD',\\n\\t\\t\\t'SEK',\\n\\t\\t\\t'CHF',\\n\\t\\t\\t'TWD',\\n\\t\\t\\t'THB',\\n\\t\\t\\t'TRY',\\n\\t\\t\\t'USD',\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"658d19b14687116d913864195501219d\",\n \"score\": \"0.72340655\",\n \"text\": \"public function getList()\\n {\\n $response = $this->call(Request::METHOD_GET, '/api/v1/currencies');\\n return $response->getApiData();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec7255a5946b1da56149fe1080877976\",\n \"score\": \"0.7230057\",\n \"text\": \"public function getAcceptedCurrencyCodes()\\n {\\n return [$this->getConfigData('currency')];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"360545ecf120a7697cca6afb4bb8c4e6\",\n \"score\": \"0.721829\",\n \"text\": \"private static function fetchCurrencies(): array\\n {\\n $output = file_get_contents(static::CURRENCY_URL);\\n $currencies = json_decode($output);\\n $currencies = $currencies->data;\\n\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d7277eb68f9d0961c1c60cbbc1a6548\",\n \"score\": \"0.720895\",\n \"text\": \"public function getAllCurrenciesForCache()\\n\\t{\\n\\t\\t$this->resetLocalCacheData('allBrcCurrencies');\\n\\n\\t\\t$currencies = $this->getAllCurrencies();\\n\\t\\treturn $currencies;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f533002e72ef2f72f53ce6b31f0de38c\",\n \"score\": \"0.717648\",\n \"text\": \"public function getBaseCurrencies() {\\n\\n $currencies=ExchangeRate::select('baseCur')->distinct()->get();\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac740fd2906b80aea2448f0b26465ee9\",\n \"score\": \"0.7167307\",\n \"text\": \"function getSupportedCurrencies()\\r\\n {\\r\\n $currencies = array(\\r\\n array('ARS', 32, 2),\\r\\n array('AUD', 36, 2),\\r\\n array('KHR', 116, 0),\\r\\n array('CAD', 124, 2),\\r\\n array('CNY', 156, 1),\\r\\n array('HRK', 191, 2),\\r\\n array('CZK', 203, 2),\\r\\n array('DKK', 208, 2),\\r\\n array('EKK', 233, 2),\\r\\n array('HKD', 344, 2),\\r\\n array('HUF', 348, 2),\\r\\n array('ISK', 352, 0),\\r\\n array('IDR', 360, 0),\\r\\n array('JPY', 392, 0),\\r\\n array('KRW', 410, 0),\\r\\n array('LVL', 428, 2),\\r\\n array('LTL', 440, 2),\\r\\n array('MYR', 458, 2),\\r\\n array('MXN', 484, 2),\\r\\n array('NZD', 554, 2),\\r\\n array('NOK', 578, 2),\\r\\n array('PHP', 608, 2),\\r\\n array('RUB', 643, 2),\\r\\n array('SGD', 702, 2),\\r\\n array('ZAR', 710, 2),\\r\\n array('SEK', 752, 2),\\r\\n array('CHF', 756, 2),\\r\\n array('THB', 764, 2),\\r\\n array('GBP', 826, 2),\\r\\n array('USD', 840, 2),\\r\\n array('TWD', 901, 1),\\r\\n array('RON', 946, 2),\\r\\n array('TRY', 949, 2),\\r\\n array('XOF', 952, 0),\\r\\n array('BGN', 975, 2),\\r\\n array('EUR', 978, 2),\\r\\n array('PLN', 985, 2),\\r\\n array('BRL', 986, 2)\\r\\n );\\r\\n\\r\\n $payzenCurrencies = array();\\r\\n\\r\\n foreach ($currencies as $currency) {\\r\\n $payzenCurrencies[] = new PayzenCurrency($currency[0], $currency[1], $currency[2]);\\r\\n }\\r\\n\\r\\n return $payzenCurrencies;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"115f23236e3655010aae1d588a8ea4bd\",\n \"score\": \"0.7109077\",\n \"text\": \"public function getBaseCurrencies()\\n {\\n if ($this->baseCurrencies) {\\n return $this->baseCurrencies;\\n }\\n\\n $baseCurrencies = [];\\n foreach ($this->_storeManager->getWebsites() as $w) {\\n $bc = $w->getBaseCurrency()->getCode();\\n $allowedCurrencies = [];\\n $_stores = $w->getStores();\\n if (is_array($_stores)) {\\n $_allowedCurrencies = [];\\n foreach ($_stores as $s) {\\n $_allowedCurrencies = $s->getAvailableCurrencyCodes();\\n if ($_allowedCurrencies) {\\n $allowedCurrencies = array_merge($allowedCurrencies, $_allowedCurrencies);\\n }\\n }\\n }\\n\\n $baseCurrencies[$bc] = isset($baseCurrencies[$bc]) ?\\n array_merge($baseCurrencies[$bc], $allowedCurrencies) :\\n $allowedCurrencies;\\n $baseCurrencies[$bc] = array_unique($baseCurrencies[$bc]);\\n }\\n\\n $this->baseCurrencies = $baseCurrencies;\\n return $this->baseCurrencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bde1c06af1baa4ccb2ee9a6b1678b3d4\",\n \"score\": \"0.70994127\",\n \"text\": \"public static function currencies()\\n\\t{\\n\\t\\tstatic::_is_expired();\\n\\t\\treturn static::$_currencies;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c66be3074bfbba8a1dd84748f763ccd2\",\n \"score\": \"0.7093258\",\n \"text\": \"public function getCurrencies(): array\\n {\\n return $this->items;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca261ccb56e81ca13b7b4a1b1cb494e9\",\n \"score\": \"0.7092081\",\n \"text\": \"function caAvailableCurrenciesForConversion() {\\n\\t\\trequire_once(__CA_LIB_DIR__.\\\"/core/Plugins/CurrencyConversion/EuroBank.php\\\");\\n\\t\\t\\n\\t\\ttry {\\n\\t\\t\\t$va_currency_list = WLPlugCurrencyConversionEuroBank::getCurrencyList();\\n\\t\\t\\tsort($va_currency_list);\\n\\t\\t\\treturn $va_currency_list;\\n\\t\\t} catch (Exception $e) {\\n\\t\\t\\treturn null;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac96a20a474c617c4a371ad59a7fcbb6\",\n \"score\": \"0.70660913\",\n \"text\": \"public static function currencies()\\n {\\n return [\\n self::CURRENCY_US_DOLLAR,\\n self::CURRENCY_CN_YUAN,\\n self::CURRENCY_UAE_DIRHAM,\\n self::CURRENCY_UK_POUND,\\n self::CURRENCY_EURO\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f12d530e367c3e00f1f6f2e14e962a1\",\n \"score\": \"0.70244503\",\n \"text\": \"public static function getCurrencies() {\\n return array_keys(Connect2PayCurrencyHelper::$currencies);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19d5df7dbf2599223479e7418a5abd31\",\n \"score\": \"0.70197344\",\n \"text\": \"public function get_accepted_currencies() {\\n\\t\\treturn $this->currencies;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1115de25f191af1dfc115cb7bb7255ab\",\n \"score\": \"0.7017534\",\n \"text\": \"private function getCurrencyList(): array\\n {\\n $curr = [];\\n foreach (config('money') as $currency => $attrs) {\\n $name = $attrs['name'].' ('.$attrs['symbol'].'/'.$currency.')';\\n $curr[$currency] = $name;\\n }\\n\\n return $curr;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c431e094acd2663d93ca07477ac10ffe\",\n \"score\": \"0.69313025\",\n \"text\": \"public function currencies()\\n\\t{\\n\\t $currencies = [\\n 'SAR' => 'Saudi Riyal',\\n 'USD' => 'US Dollar',\\n 'GBP' => 'British Pound',\\n 'EUR' => 'Euro',\\n 'CHF' => 'Swiss Franc',\\n 'CAD' => 'Canadian Dollar',\\n 'AUD' => 'Australian Dollar',\\n ];\\n\\n\\t return $currencies;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5950ec1fd31cae86264b7999e5cb4c93\",\n \"score\": \"0.68730104\",\n \"text\": \"public function get_list_currency() {\\n\\t\\t\\t$currencies = $this->get_currencies();\\n\\t\\t\\t$list_currency = array();\\n\\t\\t\\tif ( $currencies ) {\\n\\n\\t\\t\\t\\tforeach ( $currencies as $currency => $data ) {\\n\\t\\t\\t\\t\\t$code = '';\\n\\t\\t\\t\\t\\t$lang = $data['languages'];\\n\\t\\t\\t\\t\\tforeach ( $lang as $key => $value ) {\\n\\t\\t\\t\\t\\t\\tif ( $value ) {\\n\\t\\t\\t\\t\\t\\t\\t$code = $key;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$list_currency[ $code ] = array(\\n\\t\\t\\t\\t\\t\\t'currency' => $currency,\\n\\t\\t\\t\\t\\t\\t'rate' => $data['rate'],\\n\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn $list_currency;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48a7f2c306d59f012c037e4d527e4cf3\",\n \"score\": \"0.6862626\",\n \"text\": \"public function currencies() {\\n return array(\\n '#type' => 'currency_element',\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f15e93efc8456afc6cc7aa934f562dc\",\n \"score\": \"0.6833175\",\n \"text\": \"public function getCurrencies()\\n {\\n $currencies = $this->getData('currencies');\\n if (is_null($currencies)) {\\n $currencies = array();\\n $codes = Mage::app()->getStore()->getAvailableCurrencyCodes(true);\\n if (is_array($codes) && count($codes) > 1) {\\n $rates = Mage::getModel('directory/currency')->getCurrencyRates(\\n Mage::app()->getStore()->getBaseCurrency(),\\n $codes\\n );\\n\\n foreach ($codes as $code) {\\n if (isset($rates[$code])) {\\n $currencies[$code] = Mage::app()->getLocale()\\n ->getTranslation($code, 'nametocurrency');\\n }\\n }\\n }\\n\\n $this->setData('currencies', $currencies);\\n }\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de0dcb69da904bdf3553cdd75238f5e9\",\n \"score\": \"0.68308306\",\n \"text\": \"protected function getCurrencies ()\\n {\\n $folder = IOHelper::getFolder(CRAFT_PLUGINS_PATH . 'currencyprice/lib/currencies/');\\n $currencies = [ ];\\n\\n if ( $folder ) {\\n $files = $folder->getContents($recursive = false, $filter = '.json');\\n\\n // Loop through and read\\n foreach ($files as $file) {\\n $content = IOHelper::getFileContents($file);\\n $currencies[] = json_decode($content, true);\\n }\\n }\\n\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbbdc4dcfcd3bbd1872abf65767f269c\",\n \"score\": \"0.682822\",\n \"text\": \"public function getAcceptedCurrencyCodes()\\n {\\n if (!$this->hasData('_accepted_currency')) {\\n try {\\n $this->_setApiKey();\\n $currencies = Stripe_Account::retrieve()->currencies_supported;\\n } catch (Stripe_Error $e) {\\n Mage::log(\\\"Couldn't fetch the supported currencies for your stripe account\\\");\\n $currencies = $this->_acceptedCurrencies;\\n }\\n $this->setData('_accepted_currency', $currencies);\\n }\\n return $this->_getData('_accepted_currency');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf3c3bb1ba314d8020cb8234d8c4ef95\",\n \"score\": \"0.68088454\",\n \"text\": \"public static function getCurrencies() {\\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\\n $st = $conn->prepare( \\\"SELECT shortdesc as codevalue, shortdesc FROM crm_lookup where codegroup = 'LG' and codeid = 'Currency' order by sortorder\\\");\\n\\t $st->execute();\\n\\t\\n\\t$list = array();\\n\\n while ( $row = $st->fetch() ) {\\n $list[] = new crm_dropdown( $row );\\n }\\n\\n $conn = null;\\n return $list;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6eaf1076322674f98a9abec90556ab5\",\n \"score\": \"0.68065816\",\n \"text\": \"public function getAllEnabled(): array\\n {\\n if (is_null($this->aEnabledCurrencies)) {\\n\\n $aEnabled = appSetting(Settings\\\\General::KEY_ENABLED_CURRENCIES, Constants::MODULE_SLUG, []);\\n\\n $this->aEnabledCurrencies = [];\\n foreach ($aEnabled as $sCode) {\\n $this->aEnabledCurrencies[$sCode] = $this->getByIsoCode($sCode);\\n }\\n }\\n\\n return $this->aEnabledCurrencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6208ccdaf5029ea54ad90cc976330056\",\n \"score\": \"0.6789835\",\n \"text\": \"public function getCurrencyCodeAllowableValues()\\n {\\n return [\\n self::CURRENCY_CODE_AED,\\n self::CURRENCY_CODE_ARS,\\n self::CURRENCY_CODE_AUD,\\n self::CURRENCY_CODE_AZN,\\n self::CURRENCY_CODE_BGN,\\n self::CURRENCY_CODE_BHD,\\n self::CURRENCY_CODE_BRL,\\n self::CURRENCY_CODE_CAD,\\n self::CURRENCY_CODE_CHF,\\n self::CURRENCY_CODE_CLP,\\n self::CURRENCY_CODE_CNY,\\n self::CURRENCY_CODE_COP,\\n self::CURRENCY_CODE_CZK,\\n self::CURRENCY_CODE_DKK,\\n self::CURRENCY_CODE_EGP,\\n self::CURRENCY_CODE_EUR,\\n self::CURRENCY_CODE_FJD,\\n self::CURRENCY_CODE_GBP,\\n self::CURRENCY_CODE_GEL,\\n self::CURRENCY_CODE_HKD,\\n self::CURRENCY_CODE_HUF,\\n self::CURRENCY_CODE_IDR,\\n self::CURRENCY_CODE_ILS,\\n self::CURRENCY_CODE_INR,\\n self::CURRENCY_CODE_JOD,\\n self::CURRENCY_CODE_JPY,\\n self::CURRENCY_CODE_KRW,\\n self::CURRENCY_CODE_KWD,\\n self::CURRENCY_CODE_KZT,\\n self::CURRENCY_CODE_MDL,\\n self::CURRENCY_CODE_MXN,\\n self::CURRENCY_CODE_MYR,\\n self::CURRENCY_CODE_NAD,\\n self::CURRENCY_CODE_NOK,\\n self::CURRENCY_CODE_NZD,\\n self::CURRENCY_CODE_OMR,\\n self::CURRENCY_CODE_PLN,\\n self::CURRENCY_CODE_QAR,\\n self::CURRENCY_CODE_RON,\\n self::CURRENCY_CODE_RUB,\\n self::CURRENCY_CODE_SAR,\\n self::CURRENCY_CODE_SEK,\\n self::CURRENCY_CODE_SGD,\\n self::CURRENCY_CODE_THB,\\n self::CURRENCY_CODE__TRY,\\n self::CURRENCY_CODE_TWD,\\n self::CURRENCY_CODE_UAH,\\n self::CURRENCY_CODE_USD,\\n self::CURRENCY_CODE_XOF,\\n self::CURRENCY_CODE_ZAR,\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bafdf8349cc0332a90e8b4fd9fb1d1a4\",\n \"score\": \"0.67590326\",\n \"text\": \"public function getArrayCurrencies()\\n {\\n return $this->arrayCurrencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43fb041f2472ff0a53041007e0245c78\",\n \"score\": \"0.67089266\",\n \"text\": \"public function currency()\\r\\n\\t{\\r\\n\\t\\t// set currency config\\r\\n\\t\\t$currencies = BLL_Currency::index();\\r\\n\\t\\treturn $currencies;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d8b6234bccb5d3440a4b530440f79db\",\n \"score\": \"0.66843665\",\n \"text\": \"protected function getCurrencyCodeMap() {\\n return [];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f460bd03b955d33d78e1f9c2110135f1\",\n \"score\": \"0.66691995\",\n \"text\": \"public function currencyCodes(){\\n $currencies = collect($this->currencies)->pluck('code');\\n return $currencies->toArray();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3fcfc8764572ce2e743cb3d9f934d65\",\n \"score\": \"0.66668606\",\n \"text\": \"public function getSupportedCurrencies()\\n\\t{\\n\\t\\treturn array(\\n\\t\\t\\t'AUD',\\n\\t\\t\\t'BRL',\\n\\t\\t\\t'CAD',\\n\\t\\t\\t'CZK',\\n\\t\\t\\t'DKK',\\n\\t\\t\\t'EUR',\\n\\t\\t\\t'HKD',\\n\\t\\t\\t'HUF',\\n\\t\\t\\t'ILS',\\n\\t\\t\\t'JPY',\\n\\t\\t\\t'MYR',\\n\\t\\t\\t'MXN',\\n\\t\\t\\t'NOK',\\n\\t\\t\\t'NZD',\\n\\t\\t\\t'PHP',\\n\\t\\t\\t'PLN',\\n\\t\\t\\t'GBP',\\n\\t\\t\\t'RUB',\\n\\t\\t\\t'SGD',\\n\\t\\t\\t'SEK',\\n\\t\\t\\t'CHF',\\n\\t\\t\\t'TWD',\\n\\t\\t\\t'THB',\\n\\t\\t\\t'TRY',\\n\\t\\t\\t'USD',\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"430239acc06a9b728d9dd8e0c68b7ab6\",\n \"score\": \"0.66647667\",\n \"text\": \"public function getSupportedCurrencies()\\n\\t{\\n\\t\\treturn array(\\n\\t\\t\\t'AUD',\\n\\t\\t\\t'BRL',\\n\\t\\t\\t'CAD',\\n\\t\\t\\t'CZK',\\n\\t\\t\\t'DKK',\\n\\t\\t\\t'EUR',\\n\\t\\t\\t'HKD',\\n\\t\\t\\t'HUF',\\n\\t\\t\\t'ILS',\\n\\t\\t\\t'JPY',\\n\\t\\t\\t'MYR',\\n\\t\\t\\t'MXN',\\n\\t\\t\\t'NOK',\\n\\t\\t\\t'NZD',\\n\\t\\t\\t'PHP',\\n\\t\\t\\t'PLN',\\n\\t\\t\\t'GBP',\\n\\t\\t\\t'RUB',\\n\\t\\t\\t'SGD',\\n\\t\\t\\t'SEK',\\n\\t\\t\\t'CHF',\\n\\t\\t\\t'TWD',\\n\\t\\t\\t'THB',\\n\\t\\t\\t'TRY',\\n\\t\\t\\t'USD'\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccf4ce73f49b2ba21b71e69083390ebf\",\n \"score\": \"0.66570175\",\n \"text\": \"public function getCurrencies($showAll = false)\\n {\\n // Get a list of currencies that need to be displayed\\n // On profile: only ones marked is_displayed\\n // In bank: ones marked is_displayed + the ones the user has\\n\\n $owned = UserCurrency::where('user_id', $this->id)->pluck('quantity', 'currency_id')->toArray();\\n\\n $currencies = Currency::where('is_user_owned', 1);\\n if($showAll) $currencies->where(function($query) use($owned) {\\n $query->where('is_displayed', 1)->orWhereIn('id', array_keys($owned));\\n });\\n else $currencies = $currencies->where('is_displayed', 1);\\n\\n $currencies = $currencies->orderBy('sort_user', 'DESC')->get();\\n\\n foreach($currencies as $currency) {\\n $currency->quantity = isset($owned[$currency->id]) ? $owned[$currency->id] : 0;\\n }\\n\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ea8a33120227dbae0e18b1c78fcd237\",\n \"score\": \"0.664467\",\n \"text\": \"function it_exchange_authorizenet_addon_get_currency_options( $default_currencies ) {\\n\\t$IT_Exchange_AuthorizeNet_Add_On = new IT_Exchange_AuthorizeNet_Add_On();\\n\\t$authnet_currencies = $IT_Exchange_AuthorizeNet_Add_On->get_supported_currency_options();\\n\\treturn array_intersect_key( $default_currencies, $authnet_currencies );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"161882efbc41d641040743c8f88db614\",\n \"score\": \"0.6638184\",\n \"text\": \"public function getActiveCurrencies()\\n {\\n return array_filter($this->getCurrencies(), function ($currency) {\\n return $currency['active'] == true;\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8eed5bb4977e7f6478ee820796b2e736\",\n \"score\": \"0.662987\",\n \"text\": \"public function getCurrencies($base = null)\\n {\\n if ($base === null) {\\n return $this->getAllowedCurrencies();\\n }\\n $baseCurrencies = $this->getBaseCurrencies();\\n $currencies = $baseCurrencies[$base];\\n $_currencies = array_flip($currencies);\\n\\n if (isset($_currencies[$base])) {\\n $k = $_currencies[$base];\\n unset($currencies[$k]);\\n array_unshift($currencies, $base);\\n }\\n\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94c40c9ba2b7940273dbb6167018f788\",\n \"score\": \"0.6629343\",\n \"text\": \"public function getActiveCurrencies()\\n {\\n return array_filter($this->getCurrencies(), function($currency) {\\n return $currency['active'] == true;\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58ae065eb4d172571498500179026919\",\n \"score\": \"0.66194975\",\n \"text\": \"function getAllCurrencies($available='available') {\\n\\tglobal $adb, $log;\\n\\t$log->debug(\\\"Entering into function getAllCurrencies($available)\\\");\\n\\n\\t$sql = \\\"select * from vtiger_currency_info\\\";\\n\\tif ($available != 'all') {\\n\\t\\t$sql .= \\\" where currency_status='Active' and deleted=0\\\";\\n\\t}\\n\\t$res=$adb->pquery($sql, array());\\n\\t$noofrows = $adb->num_rows($res);\\n\\n\\tfor($i=0;$i<$noofrows;$i++)\\n\\t{\\n\\t\\t$currency_details[$i]['currencylabel'] = $adb->query_result($res,$i,'currency_name');\\n\\t\\t$currency_details[$i]['currencycode'] = $adb->query_result($res,$i,'currency_code');\\n\\t\\t$currency_details[$i]['currencysymbol'] = $adb->query_result($res,$i,'currency_symbol');\\n\\t\\t$currency_details[$i]['curid'] = $adb->query_result($res,$i,'id');\\n\\t\\t/* alias key added to be consistent with result of InventoryUtils::getInventoryCurrencyInfo */\\n\\t\\t$currency_details[$i]['currency_id'] = $adb->query_result($res,$i,'id');\\n\\t\\t$currency_details[$i]['conversionrate'] = $adb->query_result($res,$i,'conversion_rate');\\n\\t\\t$currency_details[$i]['curname'] = 'curname' . $adb->query_result($res,$i,'id');\\n\\t}\\n\\n\\t$log->debug(\\\"Entering into function getAllCurrencies($available)\\\");\\n\\treturn $currency_details;\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00ebb312e12d2a7c8996c6937a8cfab9\",\n \"score\": \"0.6614048\",\n \"text\": \"public function getAvailableCurrency()\\n {\\n return array('AUD' => __('Australian Dollar (AUD)','paychoice'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56c1ae8a1ce366deac34530cb1849e13\",\n \"score\": \"0.66126484\",\n \"text\": \"public static function get_currencies() {\\n\\t\\t$currency_type = isset($_POST['currency_type']) ? $_POST['currency_type'] : NULL;\\n\\t\\tif($currency_type) {\\n\\t\\t\\t$client = new Client();\\n\\t\\t\\t$crawler = $client->request('GET', 'http://bonbast.com/');\\n\\n\\t\\t\\t$temp_currencies = [];\\n\\n\\t\\t\\t$crawler->filter('.table tr > td')->each(function ($node) use (&$temp_currencies) {\\n\\t\\t\\t\\t$text = $node->text();\\n\\t\\t\\t\\tif($text != \\\"Code\\\" && $text != \\\"Currency\\\" && $text != \\\"Sell\\\" && $text != \\\"Buy\\\") {\\n\\t\\t\\t\\t\\t$temp_currencies[] = $text;\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n\\n\\t\\t\\t$interval \\t= count($temp_currencies) / 4;\\n\\t\\t\\t$counter = 0;\\n\\t\\t\\t$interval_counter \\t= 0;\\n\\t\\t\\t$currencies = [];\\n\\n\\t\\t\\tif(!empty($temp_currencies)) {\\n\\t\\t\\t\\twhile($interval_counter <= $interval) {\\n\\t\\t\\t\\t\\t$temp_array = array_slice($temp_currencies, $counter, 4);\\n\\t\\t\\t\\t\\t$currencies[$temp_array[0]] = [\\\"sell\\\" => $temp_array[2], \\\"buy\\\" => $temp_array[3]];\\n\\t\\t\\t\\t\\t$counter += 4;\\n\\t\\t\\t\\t\\t$interval_counter += 1;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t// Found Currencies\\n\\t\\t\\t\\twp_send_json_success([\\\"message\\\" => $currencies[$currency_type]]);\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t// Couldn't Find Currencies\\n\\t\\t\\t\\twp_send_json_error([\\\"message\\\" => \\\"Could not find any currency\\\"]);\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\twp_send_json_error([\\\"message\\\" => \\\"No type found\\\"]);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac144f6afc8a6d0243b764fb74aa8b1b\",\n \"score\": \"0.66113853\",\n \"text\": \"public function getList(){\\n $sql = \\\"SELECT * FROM `currency`\\\";\\n return $this->db->query($sql);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69ed816e02a7efeae5d50485e7899678\",\n \"score\": \"0.6585566\",\n \"text\": \"public static function all()\\n\\t{\\n\\t\\tif (static::$_all !== null)\\n\\t\\t\\treturn static::$_all;\\n\\n\\t\\t// Try to get all from cache\\n\\t\\t$cache = \\\\Yii::$app->getCache();\\n\\t\\t$all = $cache->get(static::CACHE_KEY);\\n\\t\\tif ($all === false || empty($all))\\n\\t\\t{\\n\\t\\t\\t$all = null;\\n\\t\\t\\t$combinations = [];\\n\\t\\t\\t$currencies = [\\n\\t\\t\\t\\t'ARS', 'BOB', 'BRL', 'CLP', 'COP', 'CRC', 'GTQ', 'HNL',\\n\\t\\t\\t\\t'MXN', 'PAB', 'PEN', 'PYG', 'USD', 'UYU'\\n\\t\\t\\t];\\n\\t\\t\\t$currencies2 = ['USD'];\\n\\t\\t\\tforeach ($currencies as $cur)\\n\\t\\t\\t{\\n\\t\\t\\t\\tforeach ($currencies2 as $cur2)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tif ($cur != $cur2)\\n\\t\\t\\t\\t\\t\\t$combinations[] = $cur . $cur2;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t$url = \\\"https://query.yahooapis.com/v1/public/yql?q=\\\";\\n\\t\\t\\t$query = 'select * from yahoo.finance.xchange where pair in (\\\"' . implode('\\\",\\\"', $combinations) . '\\\")';\\n\\t\\t\\t$url .= urlencode($query);\\n\\t\\t\\t$url .= \\\"&format=json\\\";\\n\\t\\t\\t$url .= \\\"&env=\\\" . urlencode(\\\"store://datatables.org/alltableswithkeys\\\");\\n\\n\\t\\t\\t$res = @file_get_contents($url);\\n\\t\\t\\tif (!empty($res)) {\\n\\t\\t\\t\\ttry {\\n\\t\\t\\t\\t\\t$resDecoded = json_decode($res, true);\\n\\t\\t\\t\\t\\tif (isset($resDecoded['query']['results']['rate']))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tif (is_array($resDecoded['query']['results']['rate']))\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$all = [];\\n\\t\\t\\t\\t\\t\\t\\tforeach ($resDecoded['query']['results']['rate'] as $rateInfo)\\n\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t$all[$rateInfo['id']] = floatval($rateInfo['Rate']);\\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}\\n\\t\\t\\t\\tcatch (\\\\Exception $ex) {\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t// Save to cache if could be obtained\\n\\t\\t\\tif (!empty($all))\\n\\t\\t\\t{\\n\\t\\t\\t\\t// Add same to same conversions\\n\\t\\t\\t\\tforeach ($currencies as $cur)\\n\\t\\t\\t\\t\\t$all[strtoupper($cur) . strtoupper($cur)] = 1;\\n\\t\\t\\t\\t// Cache\\n\\t\\t\\t\\t$cache->set(static::CACHE_KEY, $all, 3600 * 2); // Cache for 2 hours\\n\\t\\t\\t\\tstatic::$_all = $all;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn $all;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df37b5f159e8bce9d0de25c94ad64bfe\",\n \"score\": \"0.6582513\",\n \"text\": \"public function provideValidCurrencyCodes()\\n {\\n return [\\n 'French euro' => [\\n 'EUR',\\n ['fr-FR' => 'euro', 'en-US' => 'euro'],\\n ['fr-FR' => '€', 'en-US' => '€'],\\n ],\\n 'Peace money' => [\\n 'PCE',\\n ['fr-FR' => 'paix', 'en-US' => 'peace'],\\n ['fr-FR' => '☮', 'en-US' => '☮'],\\n ],\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bd32b5167e6cfccd537289dc1774493\",\n \"score\": \"0.65728307\",\n \"text\": \"public function getCurrencies(): array\\n {\\n try {\\n $responseJson = $this->_RESTcli->get(\\\"currencies\\\", null);\\n } catch (BitPayException $e) {\\n throw new CurrencyQueryException(\\\"failed to serialize Currency object : \\\".$e->getMessage(), null, null, $e->getApiCode());\\n } catch (Exception $e) {\\n throw new CurrencyQueryException(\\\"failed to serialize Currency object : \\\".$e->getMessage());\\n }\\n\\n try {\\n $mapper = new JsonMapper();\\n $currencies = $mapper->mapArray(\\n json_decode($responseJson),\\n [],\\n 'BitPaySDKLight\\\\Model\\\\Currency'\\n );\\n\\n } catch (Exception $e) {\\n throw new CurrencyQueryException(\\n \\\"failed to deserialize BitPay server response (Currency) : \\\".$e->getMessage());\\n }\\n\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"22bc55bae72b57ecf223d8a3d9caa7d9\",\n \"score\": \"0.65410566\",\n \"text\": \"public static function getAllCachedCurrencies()\\n {\\n if (empty(self::$allCachedCurrencies))\\n {\\n return null;\\n }\\n return self::$allCachedCurrencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d22d14712e7638ea72ba54e75d470d0\",\n \"score\": \"0.65362346\",\n \"text\": \"public function getAcceptedCurrencyCodes()\\n {\\n if (!$this->hasData('_accepted_currency')) {\\n $acceptedCurrencyCodes = $this->dataHelper->getAllowedCurrencyCodes();\\n $acceptedCurrencyCodes[] = $this->getConfigData('currency');\\n $this->setData('_accepted_currency', $acceptedCurrencyCodes);\\n }\\n return $this->_getData('_accepted_currency');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0a67a0d6a95ed750dd0888204321f99\",\n \"score\": \"0.6506289\",\n \"text\": \"public function getSupportedCurrenciesCodes(): array\\n {\\n $codes = [];\\n\\n /** @var ExchangeRate $eurExchangeRate */\\n foreach ($this->items as $eurExchangeRate) {\\n $codes[] = $eurExchangeRate->getToCurrency();\\n }\\n\\n return $codes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdc26b894ef42e5d1111997f6501f62e\",\n \"score\": \"0.6499436\",\n \"text\": \"public function currencies(): CurrencyCollection\\n {\\n $currencies = $this->getCurrenciesByDate();\\n\\n return $currencies->isNotEmpty() ? $currencies : $this->saveAndGetCurrencies();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec11494fe7a12d4f1f5660d455069ed4\",\n \"score\": \"0.6443551\",\n \"text\": \"public function getConfigBaseCurrencies()\\n {\\n $defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);\\n return $defaultCurrencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44f4f618e620908bb94adff96a32d788\",\n \"score\": \"0.6427649\",\n \"text\": \"protected\\n\\tfunction getTemplateCurrencies()\\n\\t{\\n\\t\\t$currencies = array();\\n\\n\\t\\tif($this->useCurrency) {\\n\\t\\t\\tif(isset($this->arResult['CONVERT_CURRENCY']['CURRENCY_ID'])) {\\n\\t\\t\\t\\t$currencyFormat = \\\\CCurrencyLang::GetFormatDescription($this->arResult['CONVERT_CURRENCY']['CURRENCY_ID']);\\n\\t\\t\\t\\t$currencies = array(\\n\\t\\t\\t\\t\\t array(\\n\\t\\t\\t\\t\\t\\t\\t'CURRENCY' => $this->arResult['CONVERT_CURRENCY']['CURRENCY_ID'],\\n\\t\\t\\t\\t\\t\\t\\t'FORMAT' => array(\\n\\t\\t\\t\\t\\t\\t\\t\\t 'FORMAT_STRING' => $currencyFormat['FORMAT_STRING'],\\n\\t\\t\\t\\t\\t\\t\\t\\t 'DEC_POINT' => $currencyFormat['DEC_POINT'],\\n\\t\\t\\t\\t\\t\\t\\t\\t 'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'],\\n\\t\\t\\t\\t\\t\\t\\t\\t 'DECIMALS' => $currencyFormat['DECIMALS'],\\n\\t\\t\\t\\t\\t\\t\\t\\t 'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],\\n\\t\\t\\t\\t\\t\\t\\t\\t 'HIDE_ZERO' => $currencyFormat['HIDE_ZERO'],\\n\\t\\t\\t\\t\\t\\t\\t),\\n\\t\\t\\t\\t\\t ),\\n\\t\\t\\t\\t);\\n\\t\\t\\t\\tunset($currencyFormat);\\n\\t\\t\\t}\\n\\t\\t\\telse {\\n\\t\\t\\t\\t$currencyIterator = Currency\\\\CurrencyTable::getList(array(\\n\\t\\t\\t\\t\\t 'select' => array('CURRENCY'),\\n\\t\\t\\t\\t));\\n\\t\\t\\t\\twhile($currency = $currencyIterator->fetch()) {\\n\\t\\t\\t\\t\\t$currencyFormat = \\\\CCurrencyLang::GetFormatDescription($currency['CURRENCY']);\\n\\t\\t\\t\\t\\t$currencies[] = array(\\n\\t\\t\\t\\t\\t\\t 'CURRENCY' => $currency['CURRENCY'],\\n\\t\\t\\t\\t\\t\\t 'FORMAT' => array(\\n\\t\\t\\t\\t\\t\\t\\t\\t'FORMAT_STRING' => $currencyFormat['FORMAT_STRING'],\\n\\t\\t\\t\\t\\t\\t\\t\\t'DEC_POINT' => $currencyFormat['DEC_POINT'],\\n\\t\\t\\t\\t\\t\\t\\t\\t'THOUSANDS_SEP' => $currencyFormat['THOUSANDS_SEP'],\\n\\t\\t\\t\\t\\t\\t\\t\\t'DECIMALS' => $currencyFormat['DECIMALS'],\\n\\t\\t\\t\\t\\t\\t\\t\\t'THOUSANDS_VARIANT' => $currencyFormat['THOUSANDS_VARIANT'],\\n\\t\\t\\t\\t\\t\\t\\t\\t'HIDE_ZERO' => $currencyFormat['HIDE_ZERO'],\\n\\t\\t\\t\\t\\t\\t ),\\n\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tunset($currencyFormat, $currency, $currencyIterator);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn $currencies;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8118e13f85664112b0b13ebcda245085\",\n \"score\": \"0.6370458\",\n \"text\": \"public function stockCurrenciesList()\\n {\\n $url = '/admin/stock_currencies.json';\\n\\n return new Response\\\\Response(\\n $this->client->get($url),\\n sprintf('array<%s>', Model\\\\StockCurrency::class)\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe1c0a2aee0a50c5b0c078a993b8c852\",\n \"score\": \"0.636961\",\n \"text\": \"function get_supported_currency_options() {\\n\\t\\t$options = array(\\n\\t\\t\\t'USD' => __( 'United States Dollar' ),\\n\\t\\t\\t'CAD' => __( 'Canadian Dollar' ),\\n\\t\\t\\t'GBP' => __( 'British Pound' ),\\n\\t\\t\\t'EUR' => __( 'European Euro' ),\\n\\t\\t);\\n\\t\\treturn $options;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f3064bf80173f066ec36864d81639a4\",\n \"score\": \"0.63643676\",\n \"text\": \"protected function loadCurrencies()\\n {\\n $currencies = $this->apiCall('WHMCS_Misc', 'get_currencies');\\n if (empty($currencies->currencies->currency))\\n {\\n throw new Exception('No currencies found in WHMCS');\\n }\\n\\n $currenciesWrapper = new $this->config['currencies_class']($currencies->currencies->currency);\\n\\n // Save currencies array into Redis cache\\n $this->redis->set('currencies', serialize($currenciesWrapper));\\n // Set currencies expiration based on config value\\n $this->redis->expire('currencies', $this->config['currencies_cache_expiration']);\\n // Save currencies array in the current connection instance for further usage in current app run\\n $this->currencies = $currenciesWrapper;\\n\\n return $this->currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcddbe68d5a909f2870a878771e8f419\",\n \"score\": \"0.6348973\",\n \"text\": \"public static function get_currency_codes()\\n\\t{\\n\\t\\treturn internal_getAllCurrencyCodes();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff407c2127045ab7ce9c2faccd333a52\",\n \"score\": \"0.63208085\",\n \"text\": \"public function getCurrenciesWithoutDecimal()\\n {\\n return array('JPY');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7784d9f713c050180fd134a95796b6a\",\n \"score\": \"0.631086\",\n \"text\": \"public function index()\\n {\\n return response(Currency::all());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3088d83cfd61281d2c93cf3c4962103\",\n \"score\": \"0.6286329\",\n \"text\": \"public static function getPayPalCurrencies() {\\n return self::$currencyCodes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcb9f8a5e7b5d56b040d0b3fe75bba0c\",\n \"score\": \"0.6278225\",\n \"text\": \"public function listCurrencies(Request $request)\\n {\\n $currencies = $this->currencies;\\n if ($request->wantsJson()) {\\n return Helper::json($currencies);\\n }\\n\\n $list = \\\"# Currency code - Currency name\\\" . PHP_EOL;\\n foreach($currencies as $code => $name) {\\n $list .= $code . \\\" - \\\" . $name . PHP_EOL;\\n }\\n return Helper::text($list);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2da9cdc5bcf2a44639678cad3a50df3\",\n \"score\": \"0.6275059\",\n \"text\": \"public function getCurrencies($market = '')\\n {\\n return $this->makeRequest(\\\"core/3/currencies\\\", [\\n \\\"market\\\" => $market\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06fc80c86247c696ee2302acf484cd2e\",\n \"score\": \"0.62570703\",\n \"text\": \"public function index()\\n {\\n try {\\n $currencies = CurrencyResource::collection($this->service()->query()->paginate(20));\\n }catch (QueryException $e) {\\n return $this->respondInvalidQuery();\\n }\\n\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61c299a73cb943070eba275558dad48c\",\n \"score\": \"0.62163955\",\n \"text\": \"function rcp_get_currencies() {\\n\\t$currencies = array(\\n\\t\\t'USD' => __( 'US Dollars (&#36;)', 'rcp' ),\\n\\t\\t'EUR' => __( 'Euros (&euro;)', 'rcp' ),\\n\\t\\t'GBP' => __( 'Pounds Sterling (&pound;)', 'rcp' ),\\n\\t\\t'AUD' => __( 'Australian Dollars (&#36;)', 'rcp' ),\\n\\t\\t'BRL' => __( 'Brazilian Real (&#36;)', 'rcp' ),\\n\\t\\t'CAD' => __( 'Canadian Dollars (&#36;)', 'rcp' ),\\n\\t\\t'CZK' => __( 'Czech Koruna', 'rcp' ),\\n\\t\\t'DKK' => __( 'Danish Krone', 'rcp' ),\\n\\t\\t'HKD' => __( 'Hong Kong Dollar (&#36;)', 'rcp' ),\\n\\t\\t'HUF' => __( 'Hungarian Forint', 'rcp' ),\\n\\t\\t'ILS' => __( 'Israeli Shekel', 'rcp' ),\\n\\t\\t'JPY' => __( 'Japanese Yen (&yen;)', 'rcp' ),\\n\\t\\t'MYR' => __( 'Malaysian Ringgits', 'rcp' ),\\n\\t\\t'MXN' => __( 'Mexican Peso (&#36;)', 'rcp' ),\\n\\t\\t'NZD' => __( 'New Zealand Dollar (&#36;)', 'rcp' ),\\n\\t\\t'NOK' => __( 'Norwegian Krone', 'rcp' ),\\n\\t\\t'PHP' => __( 'Philippine Pesos', 'rcp' ),\\n\\t\\t'PLN' => __( 'Polish Zloty', 'rcp' ),\\n\\t\\t'SGD' => __( 'Singapore Dollar (&#36;)', 'rcp' ),\\n\\t\\t'SEK' => __( 'Swedish Krona', 'rcp' ),\\n\\t\\t'CHF' => __( 'Swiss Franc', 'rcp' ),\\n\\t\\t'TWD' => __( 'Taiwan New Dollars', 'rcp' ),\\n\\t\\t'THB' => __( 'Thai Baht', 'rcp' ),\\n\\t\\t'TRY' => __( 'Turkish Lira', 'rcp' ),\\n\\t\\t'RIAL'=> __( 'Iranian Rial (&#65020;)', 'rcp' ),\\n\\t\\t'RUB' => __( 'Russian Rubles', 'rcp' )\\n\\t);\\n\\treturn apply_filters( 'rcp_currencies', $currencies );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b31789d894ba19dce964f04732bd06e\",\n \"score\": \"0.616579\",\n \"text\": \"function getCurrencies ($pIncludeBlank=false) {\\n\\t\\t\\n\\t\\ttry {\\n\\t\\t\\t$db = new sentencia();\\n\\t\\t\\t\\n\\t\\t\\t$qy=\\\"select * from currencies order by name\\\";\\n\\t\\t\\t$result = $db->Query($qy);\\n\\t\\t\\t\\n\\t\\t\\t//*********NO ESTA BIEN MODELADO USAR ROWCOUNT*********\\n\\t\\t\\t//$rowcount=mysqli_num_rows($resultUsers);\\n\\t\\t\\t//return $rowcount;\\n\\t\\t\\t\\n\\t\\t\\t$list = array();\\n\\t\\t\\tif ($pIncludeBlank) $list[''] = '';\\n\\t\\t\\tforeach($result as $row){\\n\\t\\t\\t\\t$list[$row['name']] = $row['id_currency'];\\n\\t\\t\\t}\\n\\t\\t\\treturn $list;\\n\\t\\n\\t\\t} catch (Exception $e) {\\n\\t\\t\\treturn \\\"ERROR: \\\".$e->getMessage();\\n\\t\\t}\\n\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0535896147e7d7bbea0eda3608418e27\",\n \"score\": \"0.6153119\",\n \"text\": \"public function getAllowedMerchantCountries()\\n {\\n return ['US', 'CA', 'AU', 'NZ'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa7cb62eeebde0f255df3e8d01312e70\",\n \"score\": \"0.6152142\",\n \"text\": \"public function index()\\n {\\n $currencyRepository = new CurrencyRepository();\\n\\n return new CurrencyCollection($currencyRepository->all(false));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44dfa4028485d5aab6ebb39f56ea11f7\",\n \"score\": \"0.6149409\",\n \"text\": \"public function getCurrenciesRatios()\\n {\\n $currenciesRatios = [];\\n $deprecatedDataProviders = [];\\n foreach($this->_dataStorages as $priority => $dataStorage){\\n if($dataStorage->hasActualRatios()){\\n $currenciesRatios = $dataStorage->getRatios();\\n } else {\\n $deprecatedDataProviders[] = $dataStorage;\\n }\\n }\\n\\n if(count($deprecatedDataProviders) > 0 && !empty($currenciesRatios)){\\n foreach($this->_dataStorages as $dataStorage){\\n $dataStorage->storeRatios($currenciesRatios);\\n }\\n }\\n\\n if($currenciesRatios){\\n throw new Exception(); // Throws exception, that signalize? that we could not load any currencies data\\n }\\n\\n return $currenciesRatios;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20fb87e1e0a22ed60a34d48e0d603891\",\n \"score\": \"0.6149274\",\n \"text\": \"public function getAllFlat(): array\\n {\\n return $this->aSupportedCurrenciesFlat;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcd98d47e40d512ac5e84c7c5e230ca5\",\n \"score\": \"0.6133739\",\n \"text\": \"public function retrieveCurrencies()\\n {\\n throw new \\\\RuntimeException('You must override this method in a converter');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebbad146e194a5d49b38edf27f852fc7\",\n \"score\": \"0.61281174\",\n \"text\": \"public function service_list()\\r\\n {\\r\\n $service_list = array(\\r\\n \\\"get_currency_list\\\" => TRUE\\r\\n );\\r\\n return $service_list;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad47f577a159df5fe77649510ba7be53\",\n \"score\": \"0.6089195\",\n \"text\": \"public static function getPayPalExpressCheckoutCurrencies() {\\n\\n $currencies = array();\\n foreach(self::$ecCurrencies as $code => $currency) {\\n $currencies[$code] = $currency;\\n }\\n return $currencies;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7f8d179c00855a8f135beda0d82bd2f\",\n \"score\": \"0.60784596\",\n \"text\": \"public function getSupported(): array\\n {\\n return (array) json_decode(\\n (string) file_get_contents(NAILS_PATH . 'module-currency/resources/currencies.json')\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0da0501cf8596f74d2f73e884d04045c\",\n \"score\": \"0.60561955\",\n \"text\": \"public function getAllowedCountries()\\n {\\n return explode(\\\",\\\", Mage::getStoreConfig(\\\"hermes/general/allowed_countries\\\"));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8bb666296658ae096e5c4d11d9b24813\",\n \"score\": \"0.6052799\",\n \"text\": \"public function get_currency_list()\\r\\n { \\r\\n // file dump -- for testing purpose -- Start --\\r\\n /*\\r\\n $current = \\\"\\\\n------------------------------\\\\n\\\";\\r\\n $current .= \\\"CB_Property -- upload_listing -- ori input\\\\n\\\";\\r\\n $current .= gettype($input_data);\\r\\n $current .= \\\"\\\\n\\\";\\r\\n $current .= json_encode($input_data);\\r\\n $current .= \\\"\\\\n\\\";\\r\\n $current .= \\\"\\\\nCB_Property -- upload_listing -- after init\\\\n\\\";\\r\\n $current .= json_encode($property_info);\\r\\n error_log($current, 3, \\\"D:/webdev/resphere_test_dump.txt\\\"); \\r\\n // file dump -- for testing purpose -- End --*/\\r\\n \\r\\n if($this->is_error){return 0;}\\r\\n \\r\\n // Build model array data\\r\\n $library_data = array(\\r\\n 'library' => $this->properties_library_name,\\r\\n 'function' => \\\"get_supported_currency\\\",\\r\\n 'data' =>''\\r\\n );\\r\\n\\r\\n // Pump in data (contain error check)\\r\\n $currency_return = $this->invoke_library_function($library_data);\\r\\n \\r\\n if($this->is_error){return 0;}\\r\\n\\r\\n $status_information = \\\"Info: Successfully get supported currency\\\";\\r\\n $return_data = $currency_return[\\\"data\\\"];\\r\\n $this->set_data($status_information,$return_data);\\r\\n\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c09753c790c4318bf3aea91d7e955da\",\n \"score\": \"0.60243773\",\n \"text\": \"public function actionCurrencies() {\\n $searchModel = new FpListsSearch();\\n $condition = \\\"in_list_of = 'currencies'\\\";\\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $condition); \\n return $this->render('index', [\\n 'searchModel' => $searchModel,\\n 'dataProvider' => $dataProvider,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a19ebcc84d5367045277ed02400d052\",\n \"score\": \"0.6014311\",\n \"text\": \"function index() {\\n $this->smarty->assign('currencies', Currencies::findAll());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"547a8bc78bcf9c0d4e23c1f455106b0c\",\n \"score\": \"0.60140914\",\n \"text\": \"public function getUnSupportedCurrencies($bankName = null)\\n\\t{\\n\\t\\tif (!$bankName) {\\n\\t\\t\\t$bankName = 'Settings_CurrencyUpdate_models_' . $this->getActiveBankName() . '_BankModel';\\n\\t\\t}\\n\\t\\t$bank = new $bankName();\\n\\n\\t\\t$supported = $bank->getSupportedCurrencies($bankName);\\n\\t\\t$db = PearDatabase::getInstance();\\n\\n\\t\\t$query = 'SELECT `currency_name`, `currency_code` FROM vtiger_currency_info WHERE `currency_status` = \\\"Active\\\" && `deleted` = 0;';\\n\\t\\t$result = $db->query($query);\\n\\n\\t\\t$unsupported = [];\\n\\t\\twhile ($row = $db->fetchByAssoc($result)) {\\n\\t\\t\\t$name = $row['currency_name'];\\n\\t\\t\\t$code = $row['currency_code'];\\n\\n\\t\\t\\t$unsupported[$name] = $code;\\n\\t\\t}\\n\\n\\t\\treturn array_diff($unsupported, $supported);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2cd6ef0237d1033225421ae8348f572b\",\n \"score\": \"0.6004181\",\n \"text\": \"function quickpay_currency_codes() {\\n static $currencies = array('DKK' => 100, 'USD' => 100, 'EUR' => 100,\\n 'GBP' => 100);\\n return $currencies;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4feef08b668f02d8a48f92d2c95ce2f8\",\n \"score\": \"0.59614563\",\n \"text\": \"public function getCurrencyCollection()\\r\\n\\t\\t{\\r\\n\\t\\t\\treturn $this->getCollectionFor(\\\"FEParamGetTiposMonedas\\\");\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbd41478b104f2a43de080df30c71a56\",\n \"score\": \"0.5956906\",\n \"text\": \"public function getSupportedCurrencies($bankName = null)\\n\\t{\\n\\t\\tif (!$bankName) {\\n\\t\\t\\t$bankName = 'Settings_CurrencyUpdate_models_' . $this->getActiveBankName() . '_BankModel';\\n\\t\\t}\\n\\t\\t$bank = new $bankName();\\n\\n\\t\\treturn $bank->getSupportedCurrencies();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4f03f842937a6ce81b43ca3838f81ee\",\n \"score\": \"0.5951586\",\n \"text\": \"public function getCurrency();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4f03f842937a6ce81b43ca3838f81ee\",\n \"score\": \"0.5951586\",\n \"text\": \"public function getCurrency();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4f03f842937a6ce81b43ca3838f81ee\",\n \"score\": \"0.5951586\",\n \"text\": \"public function getCurrency();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4f03f842937a6ce81b43ca3838f81ee\",\n \"score\": \"0.5951586\",\n \"text\": \"public function getCurrency();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4f03f842937a6ce81b43ca3838f81ee\",\n \"score\": \"0.5951586\",\n \"text\": \"public function getCurrency();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4f03f842937a6ce81b43ca3838f81ee\",\n \"score\": \"0.5951586\",\n \"text\": \"public function getCurrency();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5dc46e254b7551428c7d81ee2d9d2fe6\",\n \"score\": \"0.59502494\",\n \"text\": \"private function collectData()\\n {\\n return $this->cache->remember('Moloni_Currencies', function() {\\n $availableCurrencies = $this->currenciesApi->getAll();\\n\\n $currencies = [];\\n\\n foreach($availableCurrencies as $currency) {\\n $currencies[$currency['iso4217']] = $currency['currency_id'];\\n }\\n\\n return $currencies;\\n });\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":746,"cells":{"query_id":{"kind":"string","value":"f674bcc35f34ad229092e3a814cc226d"},"query":{"kind":"string","value":"Constructs a coupon read service object."},"positive_passages":{"kind":"list like","value":[{"docid":"ca1045de764aa63c97b0bfbacc963543","score":"0.0","text":"public function __construct(\n CartRepositoryInterface $quoteRepository,\n Totals $totals,\n QuoteIdMaskFactory $quoteIdMaskFactory\n ) {\n $this->quoteRepository = $quoteRepository;\n $this->quoteIdMaskFactory = $quoteIdMaskFactory;\n $this->totals = $totals;\n }","title":""}],"string":"[\n {\n \"docid\": \"ca1045de764aa63c97b0bfbacc963543\",\n \"score\": \"0.0\",\n \"text\": \"public function __construct(\\n CartRepositoryInterface $quoteRepository,\\n Totals $totals,\\n QuoteIdMaskFactory $quoteIdMaskFactory\\n ) {\\n $this->quoteRepository = $quoteRepository;\\n $this->quoteIdMaskFactory = $quoteIdMaskFactory;\\n $this->totals = $totals;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"0ef0ee16493bea6f9213648407a82214","score":"0.586491","text":"public function getById($id)\n {\n $coupon = null;\n\n $response = $this->request('coupons/' . $id);\n\n if (is_array($response) && is_array($response['coupon'])) {\n $coupon = new Resource($response['coupon']);\n }\n\n return $coupon;\n }","title":""},{"docid":"976fb016a2e23ae79c03956613dad2a3","score":"0.58585066","text":"public function create($data)\n {\n $coupon = null;\n\n $response = $this->request('coupons', $data, 'POST');\n\n if (is_array($response) && is_array($response['coupon'])) {\n $coupon = new Resource($response['coupon']);\n }\n\n return $coupon;\n }","title":""},{"docid":"59e9181754aeafc74d9a1702defa80c3","score":"0.5513174","text":"public function getByCode($code)\n {\n $coupon = null;\n\n $response = $this->request('coupons/find?code=' . $code);\n\n if (is_array($response) && is_array($response['coupon'])) {\n $coupon = new Resource($response['coupon']);\n }\n\n return $coupon;\n }","title":""},{"docid":"f1bc9312d713c9eac660e3774965b79d","score":"0.54116404","text":"private function get_coupon()\n {\n //\n $this->coupon = null;\n if( isset( $_POST[ 'coupon' ] ) && $_POST[ 'coupon' ] != \"\" )\n {\n // Try to retrieve the coupon.\n //\n $this->coupon = Stripe_Coupon::retrieve( $_POST[ 'coupon' ] );\n $this->response[ 'coupon-id' ] = $this->coupon->id;\n $this->response[ 'coupon-max-redemptions' ] = $this->coupon->max_redemptions;\n $this->response[ 'coupon-times-redeemed' ] = $this->coupon->times_redeemed;\n $this->response[ 'coupon-redeem-by' ] = gmdate( \"M d Y H:i:s\", $this->coupon->redeem_by ) . ' UTC';\n $this->response[ 'coupon-percent' ] = $this->coupon->percent_off;\n\n // Check the validity of the coupon\n //\n if( $this->coupon->times_redeemed >= $this->coupon->max_redemptions )\n {\n $this->response[ 'error' ] = 'Coupon can only be redeemed ' . intval( $this->coupon->max_redemptions ) . ' time(s)';\n echo json_encode( $this->response );\n die();\n }\n $now = gmmktime();\n if( $now > $this->coupon->redeem_by )\n {\n $this->response[ 'error' ] = 'Coupon expired on ' . gmdate( \"M d Y H:i:s\", $this->coupon->redeem_by ) . ' UTC';\n echo json_encode( $this->response );\n die();\n }\n\n // If we made it here, the coupon is valid\n //\n }\n }","title":""},{"docid":"4980aeaf781122d44fa308c2bbaa76a3","score":"0.5239026","text":"public function __construct(){\n\n //instância um cliente do webservice\n $this->dollar = Http::get('https://api.ratesapi.io/api/latest?base=USD&symbols=BRL');\n $this->euro = Http::get('https://api.ratesapi.io/api/latest?base=EUR&symbols=BRL');\n }","title":""},{"docid":"a71c754638327870a1989cb6b4d626b6","score":"0.5211153","text":"public function show(Coupon $coupon)\n {\n return new CouponResource($coupon);\n }","title":""},{"docid":"ea60e5c50d153a6c5b672cdda6d8cfa7","score":"0.5173944","text":"public function __construct(Discount $discount)\n {\n $this->discount = $discount;\n }","title":""},{"docid":"7b6dcef7238c409b808c32cfccd37aaa","score":"0.51374763","text":"public function __construct(RechargeService $rechargeService)\n {\n $this->rechargeService = $rechargeService;\n }","title":""},{"docid":"548d8f0d84e146e0d544f7b5a311cff0","score":"0.5102947","text":"public function __construct()\n {\n parent::__construct();\n\n $this->orderService = new OrderService();\n $this->batchService = new BatchService();\n }","title":""},{"docid":"ff0c064ebfc04eefb77c55fa1544d932","score":"0.5098244","text":"public function __construct()\n {\n $this->opencartService = new OpenCartService();\n parent::__construct();\n }","title":""},{"docid":"73ebb5bbb29fbf727417be2bdf636e77","score":"0.5097641","text":"public function getReadConnectionService();","title":""},{"docid":"db6e35ac309eb750de9a642885ec95d5","score":"0.50887203","text":"public function coupon() {\n return $this->hasOne('App\\Coupon', 'coupon_id', 'coupon_id');\n }","title":""},{"docid":"af4c2a4c4ac11f1fb611d47d30691be9","score":"0.5054945","text":"Public Function __construct() {\n\t\t$this->importSourceReaderService =& t3lib_div::makeInstance(self::CLASS_IMPORTSOURCE_READERSERVICE);\n\t}","title":""},{"docid":"ff4dd38653fcbe0335bf1698a99fa1f8","score":"0.50477874","text":"public function __construct()\r\n {\r\n parent::__construct();\r\n\r\n $this->service = clsProducts::getInstance();\r\n }","title":""},{"docid":"733222163343e9c880fa7d71a9a79cb4","score":"0.5045981","text":"protected function _construct()\n {\n $this->_init(OrderReference::class, OrderReferenceResource::class);\n }","title":""},{"docid":"cc0c1cba9f427b30bc014e53241bfaa8","score":"0.5042396","text":"public function __construct() {\n $this->produto = new Conceito();\n }","title":""},{"docid":"3cab51383a8606af5e7d91644e7344dc","score":"0.50051296","text":"public function __construct()\n {\n $this->_client = Client::create([\n 'consumerKey' => $this->getConfigData('cardinity_key'),\n 'consumerSecret' => $this->getConfigData('cardinity_secret'),\n ]);\n }","title":""},{"docid":"eefdfc376dcf930bef42803f106ba769","score":"0.49847892","text":"public function __construct(ZohoService $warranty)\n { \n $this->warranty = $warranty;\n }","title":""},{"docid":"a96652c2b103a4d36d448e5a7fc3a6c4","score":"0.49697733","text":"public function setCoupon(?string $coupon): self\n {\n $this->coupon = $coupon;\n\n return $this;\n }","title":""},{"docid":"47d7912e464333786816bd723b9b2e39","score":"0.49676326","text":"public function validate($code)\n {\n $coupon = null;\n\n $response = $this->request('coupons/validate?code=' . $code);\n\n if (is_array($response) && is_array($response['coupon'])) {\n $coupon = new Resource($response['coupon']);\n }\n\n return $coupon;\n }","title":""},{"docid":"7dfec1a7606838cc57fcbded6b5bae19","score":"0.49628016","text":"public function __construct()\n {\n $this->currencies = new ISOCurrencies();\n }","title":""},{"docid":"a7125553de1bd818363e499a1f808e38","score":"0.49376395","text":"public function __construct()\n\t{\n\t\t$this->client = $this->getSOLRClient();\n\t}","title":""},{"docid":"43f35e22c417a9bd0b345cecee669c9c","score":"0.49278036","text":"public function __construct() {\n $this->bucket_slug = config('cosmic.slug');\n $this->read_key = config('cosmic.read');\n $this->write_key = config('cosmic.write');\n $this->locations_cosmic = new CosmicJS($this->bucket_slug, 'locations');\n $this->items_cosmic = new CosmicJS($this->bucket_slug, 'items', $this->read_key, $this->write_key);\n }","title":""},{"docid":"686c2d2b40b27289f3d4bb7ec8d3394b","score":"0.4917388","text":"public function __construct()\n {\n $this->cotacao = new Client();\n }","title":""},{"docid":"a53313d6b3a773ce9a72ae59d9e1d71d","score":"0.49056873","text":"public function __construct(ComicService $comicService)\n {\n //$this->middleware('auth');\n if(isset($comicService)){\n $this->comicService = $comicService;\n }\n }","title":""},{"docid":"a63c8424780e880dab703dc46cbe0a03","score":"0.49019986","text":"public function __construct(CorreiosService $correiosService)\n {\n $this->correiosService = $correiosService;\n }","title":""},{"docid":"bfa29e4938672af9d10179dd2468277c","score":"0.489317","text":"protected function _construct()\n {\n $this->_init('Dotpay\\Payment\\Model\\Resource\\CreditCard');\n }","title":""},{"docid":"36d6bb2138eaf05ec2a3323e0b4f1cec","score":"0.48886257","text":"public function __construct(private readonly AdvancedMetadataFactoryInterface $reader)\n {\n }","title":""},{"docid":"b922817e70438402c1f9e4cfccaca11a","score":"0.488386","text":"public function __construct($userId = null, OrderInterface $order, CouponInterface $coupon)\n {\n $this->userId = $userId;\n $this->order = $order;\n $this->coupon = $coupon;\n }","title":""},{"docid":"b2b6fdc01b18bf65ba22879cf91c4675","score":"0.48764122","text":"public function __construct()\n {\n parent::__construct();\n\n $this->client = RdsClient::factory([\n 'version' => 'latest',\n 'region' => 'us-east-1',\n 'credentials' => [\n 'key' => env('AWS_ACCESS_KEY_ID'),\n 'secret' => env('AWS_SECRET_ACCESS_KEY'),\n ]\n ]);\n }","title":""},{"docid":"b34c95401dd057b9bc3e7901bad06cb7","score":"0.4866063","text":"public function list(){\n $retrieved = $this->retrieve(['list_coupon']);\n return $retrieved['coupon'];\n }","title":""},{"docid":"379699f4ffad56d130e1aab09d8e48c8","score":"0.48660627","text":"public function __construct()\n {\n $this->readJsonConversionRates($this->exchangeRatePath);\n }","title":""},{"docid":"f02cf9bbe5fcdeb90200c9fbc553ddea","score":"0.48643902","text":"public function getService() {\n if ($this->_service !== null) {\n return $this->_service;\n }\n\n $restaurantId = (integer) $this->getRestaurantId();\n $service = new Yourdelivery_Model_Servicetype_Restaurant($restaurantId);\n \n if ($service->isCatering()) {\n $service = new Yourdelivery_Model_Servicetype_Cater($restaurantId);\n \n } elseif ($service->isGreat() || $service->isFruit()) {\n $service = new Yourdelivery_Model_Servicetype_Great($restaurantId);\n \n }\n \n return $this->_service = $service;\n }","title":""},{"docid":"32e58173dac3bde4d754542d50b36baa","score":"0.48636386","text":"public function __construct(Reader $reader)\n {\n $this->reader = $reader;\n }","title":""},{"docid":"bad6e884d1152c76563e414c2127b427","score":"0.48359388","text":"public function __construct(SupplierService $service)\n {\n $this->middleware('role:company');\n\n $this->service = $service;\n }","title":""},{"docid":"f84dac99025dfa226008eda77238322d","score":"0.48230574","text":"public function testCreateCoupon()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }","title":""},{"docid":"8addfd4c05ca1a3c124d5a918c4622a1","score":"0.48132032","text":"public function __construct(){\r\n\t\t$this->data\t=\t$this->getFeedData();\r\n\t\t$this->data\t=\t$this->data->customer;\r\n\t}","title":""},{"docid":"3eaa6a857d44e1c17eb6d0a48fd59a3d","score":"0.48008516","text":"public function __construct()\n {\n $this->catalogue = new InMemoryCatalogue();\n $this->basket = new Basket();\n }","title":""},{"docid":"f5edd4c07941f3621d6fbbaa7d325479","score":"0.47987378","text":"protected function _construct()\n {\n $this->_init(\n 'GBPrimePay\\Payments\\Model\\Purchase',\n 'GBPrimePay\\Payments\\Model\\ResourceModel\\Purchase'\n );\n }","title":""},{"docid":"cc7c6a89e0c08e5b362176171ecfce9c","score":"0.47919694","text":"public function __construct()\n {\n $this->setProduitOrCustom('custom');\n }","title":""},{"docid":"5c04c7491a9dd7d84f98766f5ab64903","score":"0.4791794","text":"public function __construct($orderid) {\n\t\tparent::__construct();\n\n\t\t$this->orderid = $orderid;\n\t\t$this->useDropbox = true;\n\t\t$this->GUID = gen_uuid();\n\n\t\t/* NES\n\t\t * Mando HardReset (3er parametro) porque los orderproductid se comportan raro cuando los traemos de cache\n\t\t */\n\t\tif(!$this->order = getOrder($orderid, true, true))\n\t\t{\n\t\t\tlogAddError('No se pudo cargar la orderid \"'.$orderid.'\" para transmitir a IntelisisWebService');\n\t\t\t$this->setError('Ocurrio un error al cargar su pedido en nuestro sistema [1]. Favor de contactar al administrador del sistema con el ID de pedido \"'.$orderid.'\"');\n\t\t\treturn false;\n\t\t}\n\t\t/*\n\t\t * NES: REQ12891 - Obtengo los campos configurables de los productos\n\t\t */\n\t\t$orderFields = GetOrderProductFieldsData($orderid);\n\n\t\tif(($Cliente = $this->getCliente()) == ''){\n\t\t\tlogAddWarning('No se encontro el ID de WebUsuario del customer id \"'.$Cliente.'\"');\n\t\t\t$this->setError('Ocurrio un error al cargar su pedido en nuestro sistema [2]. Favor de contactar al administrador del sistema con el ID de pedido \"'.$orderid.'\"');\n\t\t}\n\t\t//$discount = $this->order['coupon_discount'] >= 0 ? ($this->order['coupon_discount'] / $this->order['subtotal_inc_tax']) * 100 : 0;\n\n\t\t/*\n\t\t NES BUGS 13066, 13102, 13154, 13155, 13148 de cupones\n\t\t Arreglo esto para poner descuentos globales, por producto, o al envío.\n\t\t */\n\t\t$discount_result = $GLOBALS['ISC_CLASS_DB']->Query(\"SELECT * FROM [|PREFIX|]order_coupons WHERE ordcouporderid = '\".$orderid.\"'\");\n\t\t$order_discount = $GLOBALS['ISC_CLASS_DB']->Fetch($discount_result);\n\n\t\t$shippingCost = $_SESSION['QUOTE']->getNonDiscountedShippingCost(true);\n\n\t\t$discount = 0;\n\t\t$discount_product = 0;\n\t\t$discount_product_percent = 0;\n\t\t$discount_shipping = 0;\n\n\t\tswitch($order_discount['ordcoupontype']){\n\t\t\tcase '0':\n\t\t\t\t$discount_product = $order_discount['ordcouponamount'];\n\t\t\t\tbreak;\n\t\t\tcase '1':\n\t\t\t\t$discount_product_percent = $order_discount['ordcouponamount'];\n\t\t\t\tbreak;\n\t\t\tcase '2':\n\t\t\t\t$discount = ($order_discount['ordcouponamount'] * 100) / $this->order['subtotal_inc_tax'];\n\t\t\t\tbreak;\n\t\t\tcase '3':\n\t\t\t\tif($shippingCost == 0) $discount_shipping = 100;\n\t\t\t\t else $discount_shipping = ($order_discount['ordcouponamount'] * 100) / $shippingCost;\n\t\t\t\tbreak;\n\t\t\tcase '4':\n\t\t\t\t $discount_shipping = 100;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$customerData = $this->getCustomer();\n\n\t\t$customFieldsAccount = $GLOBALS['ISC_CLASS_FORM']->getFormFields(FORMFIELDS_FORM_ACCOUNT, false, $customerData['custformsessionid']);\n\n\t\t$RFC = getCustomFieldByLabel($customFieldsAccount, FORMFIELDS_FORM_ACCOUNT, 'RFC');\n\n\t\t$extrafields = '';\n\t\t$invoice = '';\n\t\tfor($i=1;$i<=5;$i++){\n\t\t\tif(GetConfig('CheckoutExtraFieldActive'.$i)) {\n\t\t\t\t//ToDo: Probar bien este parseo para evitar XML mal formados, dependiendo de nombres de campos extras\n\t\t\t\t$fieldName = preg_replace(\"/[^A-Za-z0-9]|[\\s]/\", '', GetConfig('CheckoutExtraFieldName'.$i));\n\t\t\t\t$fieldValue = $this->order['extraField'.$i];\n\n\t\t\t\tif($fieldName == 'RequiereFactura'){\n\t\t\t\t\tif(strtoupper($fieldValue) == 'ON'){\n\t\t\t\t\t\tif(trim($RFC) == '') {\n\t\t\t\t\t\t\tlogAddError('Se intento hacer el orderid \"'.$orderid.'\" que requiere factura pero el RFC esta vacio');\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$invoice = 'SI';\n\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$invoice = 'NO';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$extrafields .= \" \".$fieldName.\"='\".$fieldValue.\"'\";\n\t\t\t}\n\t\t}\n\n\t\t$deliveryDates = array();\n\t\tforeach($this->order['products'] as $product)\n\t\t{\n\t\t\t/*\n\t\t NES BUGS 13066, 13102, 13154, 13155, 13148 de cupones\n\t\t Aumento el descuento en linea. Convierto los descuentos en cantidad a porcentaje.\n\t\t */\n\t\t\t$this_product_discount = 0;\n\n\t\t\tif($discount_product > 0) {\n\t\t\t\t$this_product_discount = ($discount_product * 100) / $product['price_inc_tax'];\n\t\t\t}\n\t\t\telseif($discount_product_percent > 0){\n\t\t\t\t$this_product_discount = $discount_product_percent;\n\t\t\t}\n\n\t\t\t/* \n\t\t\t * NES: REQ12891 - Agrego esto para poner el nombre y valor del campo confiugrable, para luego agregarselo al XML\n\t\t\t * Si el producto no tiene campos confiugrables, el arreglo se deja vacio\n\t\t\t */\n\t\t\t$productFields = array();\n\t\t\tif(isset($orderFields[$product['orderprodid']])){\n\t\t\t\tforeach($orderFields[$product['orderprodid']] as $key => $field){\n\t\t\t\t\tif($field['fieldtype'] == 'checkbox') {\n\t\t\t\t\t\tif(in_array(strtoupper($field['textcontents']), array('ON', 'CHECKED'))) $field['textcontents'] = 'Si';\n\t\t\t\t\t\telse $field['textcontents'] = 'No';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$IDCampo = $this->getIDCampo($field['fieldid']);\n\t\t\t\t\t\n\t\t\t\t\t$productFields[] = array(\n\t\t\t\t\t\t'Nombre' => $field['fieldname'],\n\t\t\t\t\t\t//'Valor' => str_replace(array('\"'), array(\"'\"), $field['textcontents']),\n\t\t\t\t\t\t'Valor' => stripInvalidXml($field['textcontents']),\n\t\t\t\t\t\t'IDCampo' => $IDCampo,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($product['ordprodwrapid'] > 0){\n\t\t\t\t$productFields[] = array(\n\t\t\t\t\t'Nombre' => 'Envoltura Regalo #'.$GLOBALS['ISC_CLASS_DB']->FetchOne('SELECT IDEnvoltura FROM [|PREFIX|]intelisis_gift_wrapping WHERE wrapid = \"'.$product['ordprodwrapid'].'\"', 'IDEnvoltura'),\n\t\t\t\t\t//'Valor' => str_replace(array('\"'), array(\"'\"), $field['textcontents']),\n\t\t\t\t\t'Valor' => stripInvalidXml($product['ordprodwrapname'].' - '.$product['ordprodwrapmessage']),\n\t\t\t\t\t'IDCampo' => '',\n\t\t\t\t);\n\t\t\t}\n\n\n\t\t\t$pedidoD[] = array(\n\t\t\t\t'ID' => $product['orderprodid'],\n\t\t\t\t'Cantidad' => $product['ordprodqty'],\n\t\t\t\t'SKU' => $product['ordprodsku'],\n\t\t\t\t'Precio' => $product['price_inc_tax'],\n\t\t\t\t'DescuentoLinea' => $this_product_discount,\n\t\t\t\t// NES: REQ12891 - Agrego el arreglo de campos configurables\n\t\t\t\t'CamposConfigurables' => $productFields,\n\t\t\t);\n\n\t\t\tif($date = $this->getDeliveryDateFromStatus($product)){\n\t\t\t\t$deliveryDates[] = $date;\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($deliveryDates)){\n\t\t\trsort($deliveryDates);\n\t\t\t$maxdate = date('Y-m-d', $deliveryDates[0]);\n\t\t}\n\t\telse {\n\t\t\t$maxdate = '';\n\t\t}\n\n\t\tif(empty($pedidoD))\n\t\t{\n\t\t\tlogAddWarning('El orderid \"'.$this->orderid.'\" no tiene productos para transmitir a Intelisis');\n\t\t\t$this->setError('Ocurrio un error al procesar el XML de su pedido. Favor de contactar al administrador del sistema con el ID de pedido \"'.$this->orderid.'\" [2]');\n\t\t\treturn false;\n\t\t}\n\n\t\t$xml = \"\";\n\n\t\tforeach($pedidoD as $D) {\n\t\t\t$line = \" $value) {\n\t\t\t\t/* NES: REQ12891 - Agrego validacion de is_array para no meter el arreglo de campos configurables\n\t\t\t\t* asi como cualquier otro arreglo que le podamos agregar al arreglo de productos\n\t\t\t\t* */\n\t\t\t\tif(!is_array($value)) $line .= ' '.$attribute.'=\"'.$value.'\"';\n\t\t\t}\n\t\t\t$line .= \">\";\n\n\t\t\t/*\n\t\t\t * NES: REQ12891 - Ahora si, agrego el XML de los campos configurables si no viene vacio\n\t\t\t */\n\t\t\tif(!empty($D['CamposConfigurables'])){\n\t\t\t\t$line .= '';\n\t\t\t\tforeach($D['CamposConfigurables'] as $key => $field) {\n\t\t\t\t\t$line .= '';\n\t\t\t\t}\n\t\t\t\t$line .= '';\n\t\t\t}\n\n\t\t\t$line .= \"\";\n\t\t\t$xml .= $line;\n\t\t}\n\n\t\t$customFieldsBillingAddress = $GLOBALS['ISC_CLASS_FORM']->getFormFields(FORMFIELDS_FORM_BILLING, false, $this->order['ordformsessionid']);\n\t\tforeach($customFieldsBillingAddress as $fieldid => $field){\n\t\t\tif($field->record['formfieldisimmutable'] > 0)\n\t\t\t\tunset($customFieldsBillingAddress[$fieldid]);\n\t\t}\n\t\t$customFieldsBillingXML = getCustomFieldsAsXMLAttributes($customFieldsBillingAddress);\n\t\t/*\n\t\t$Colonia = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Colonia');\n\t\t$Delegacion = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Delegacion');\n\t\t$NoExt = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Numero Exterior');\n\t\t$Vivienda = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Vivienda');\n\t\t*/\n\n\t\t$billingAddress = 'order['ordbillfirstname'].'\" Apellido=\"'.$this->order['ordbilllastname'].'\" Direccion1=\"'.$this->order['ordbillstreet1'].'\" Direccion2=\"'.$this->order['ordbillstreet2'].'\" Ciudad=\"'.$this->order['ordbillsuburb'].'\" Pais=\"'.$this->order['ordbillcountry'].'\" Estado=\"'.$this->order['ordbillstate'].'\" CP=\"'.$this->order['ordbillzip'].'\" eMail=\"'.$this->order['ordbillemail'].'\" Telefono=\"'.$this->order['ordbillphone'].'\" '.$customFieldsBillingXML.' />';\n\n\t\t$shippingAddress = \"\";\n\t\t$cost = 0;\n\t\t// ToDo: Sacar las addresses de un lugar que no dependa de la variable de sesion\n\t\tforeach($_SESSION['QUOTE']->getAllAddresses() as $address) {\n\t\t\t//logAddNotice('add \"'.$address->getId().'\" g \"'.$address->getGUID().'\" type \"'.$address->getType().'\"');\n\t\t\tif($address->getType() == ISC_QUOTE_ADDRESS::TYPE_SHIPPING) {\n\t\t\t\t$cost += $address->getNonDiscountedBaseShippingCost();\n\t\t\t\t$GUID = $GLOBALS['ISC_CLASS_DB']->FetchOne('SELECT GUID FROM [|PREFIX|]intelisis_shipping_addresses WHERE shipid = \"'.$address->getCustomerAddressId().'\"', 'GUID');\n\t\t\t\tif(!$GUID){\n\t\t\t\t\t$GUID = $address->getGUID();\n\t\t\t\t\t//logAddNotice('No hubo GUID. \"'.$GUID.'\"');\n\t\t\t\t}\n\t\t\t\tif(!$GUID) {\n\t\t\t\t\tlogAddNotice('No hay GUID para la direccion de envío del pedido '.$this->orderid);\n\t\t\t\t}\n\t\t\t\t$customFieldsShippingAddress = $address->getCustomFields();\n\t\t\t\t$customFieldsShippingXML = '';\n\t\t\t\tforeach($customFieldsShippingAddress as $fieldid => $value){\n\t\t\t\t\t$field = getCustomFieldIdById($fieldid);\n\t\t\t\t\t$label = $field['formfieldlabel'];\n\t\t\t\t\t$label = iconv('UTF-8','ASCII//TRANSLIT',$label);\n\t\t\t\t\t$label = preg_replace(\"/[^A-Za-z0-9]|[\\s]/\", '', $label);\n\t\t\t\t\tif(is_array($value)){\n\t\t\t\t\t\t$value = implode(',', $value);\n\t\t\t\t\t}\n\t\t\t\t\t$customFieldsShippingXML .= $label . '=\"'.$value.'\" ';\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t$NoExtEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Numero Exterior'));\n\t\t\t\t$ColoniaEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Colonia'));\n\t\t\t\t$DelegacionEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Delegacion'));\n\t\t\t\t$ViviendaEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Vivienda'));\n\t\t\t\t*/\n\t\t\t\t$shippingAddress .= 'getFirstName().'\" Apellido=\"'.$address->getLastName().'\" Direccion1=\"'.$address->getAddress1().'\" Direccion2=\"'.$address->getAddress2().'\" Ciudad=\"'.$address->getCity().'\" Pais=\"'.$address->getCountryName().'\" Estado=\"'.$address->getStateName().'\" CP=\"'.$address->getZip().'\" eMail=\"'.$address->getEmail().'\" Telefono=\"'.$address->getPhone().'\" '.$customFieldsShippingXML.' />';\n\t\t\t\t//logAddSuccess('sefsefswef.'.$shippingAddress.$IDEnviarA.$address->getCustomerAddressId());\n\t\t\t}\n\t\t}\n\t\t\n\t\tforeach($customFieldsAccount as $fieldid => $field){\n\t\t\tif($field->record['formfieldisimmutable'] > 0)\n\t\t\t\tunset($customFieldsAccount[$fieldid]);\n\t\t}\n\t\t$customFieldsAccountXML = getCustomFieldsAsXMLAttributes($customFieldsAccount);\n\n\t\t$customer = '';\n\n\t\t$xml .= $billingAddress.$shippingAddress.$customer. \"\";\n\n\t\t$this->xml = $xml;\n\t}","title":""},{"docid":"706ed312e06d9a1001137f0999247836","score":"0.47874957","text":"function __construct() {\n $this->conexao = Conexao::getInstance();\n }","title":""},{"docid":"b85707724dd8e19ba849e497d674a64a","score":"0.47805414","text":"public abstract function getService();","title":""},{"docid":"61f3897828aea46aeb48d54a833cd9ba","score":"0.47803566","text":"public function getCouponByCode($code);","title":""},{"docid":"e0bc624d912fa4bf65444bef644b0acd","score":"0.47765297","text":"public function __construct()\n {\n parent::__construct();\n\n $this->clientCategoryService = app()->make(ClientCategoryService::class);\n }","title":""},{"docid":"78de0f5f764ee52008096bd84ba797e1","score":"0.47761735","text":"public function __construct($class_name = '', $service_name = '') {\r\n\t\t$this->class_name = $class_name;\r\n\t\t$this->service_name = $service_name;\r\n\t}","title":""},{"docid":"d3c8b2ef491b80d49583333540f8f8c4","score":"0.4773977","text":"abstract protected function getService();","title":""},{"docid":"8343ce3c68411cb7886856a98d796fe6","score":"0.47618508","text":"public function getCouponForUser()\n {\n Stripe::setApiKey(config('services.stripe.secret'));\n\n if (count(Spark::plans()) === 0) {\n abort(404);\n }\n\n try {\n $customer = StripeCustomer::retrieve(Auth::user()->stripe_id);\n\n if ($customer->discount) {\n return response()->json(\n Coupon::fromStripeCoupon(\n StripeCoupon::retrieve($customer->discount->coupon->id)\n )\n );\n } else {\n abort(404);\n }\n } catch (Exception $e) {\n abort(404);\n }\n }","title":""},{"docid":"37f40d8f9c370e402d10ec09947fc9d1","score":"0.47584057","text":"protected function getService()\n {\n }","title":""},{"docid":"1fa9c7e2c5d596bf0164fd8f1c21522f","score":"0.4752645","text":"function DiscountLoggedInConstruct()\n\t{\tparent::DiscountLoggedInConstruct();\n\t\t$this->discount = new AdminDiscountCode($_GET['id']);\n\t\t\n\t\tswitch ($_GET['action']){\n\t\t\tcase 'list': echo $this->ListOptions($_GET['ptype'], $_GET['prodid'], $_GET['ticketid']);\n\t\t\t\tbreak;\n\t\t\tcase 'select': echo $this->discount->ProductTypeDetails($_GET['ptype'], $_GET['prodid'], true,$_GET['ticketid']);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t}","title":""},{"docid":"2775e1542064fbf89e8def0446a9e4f5","score":"0.4747898","text":"function & getService($className) {\n $className = strtolower($className);\n // require_once(t3lib_extMgm::extPath('bsg_regsteps').\"/services/class.{$className}.php\");\n require_once(dirname( __FILE__ ).\"/services/class.{$className}.php\");\n if(!class_exists($className)) {\n die(\"Error: {$className} doesn't exist\");\n }\n $obj = new $className();\n return $obj;\n }","title":""},{"docid":"32c02fcff520c3518133f4aa0db14cdb","score":"0.47460642","text":"public function __construct() {\n parent::__construct();\n $this->comissaoService = resolve('App\\Modules\\Parla\\Services\\ComissaoService');\n }","title":""},{"docid":"d5709ab76b6228fce75d6cd2ef968a8f","score":"0.47451144","text":"public function __construct(){\n $options = [\n 'soap_version' => SOAP_1_1,\n 'exceptions' => true,\n 'trace' => 1,\n 'cache_wsdl' => WSDL_CACHE_NONE,\n 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,\n 'connection_timeout' => 60,\n 'login' => HTTP_AUTH_1C_USR,\n 'password' => HTTP_AUTH_1C_PWD\n ];\n\n parent::__construct($_ENV['soapClients_oneC_Registartion_wsdl'], $options);\n }","title":""},{"docid":"9c8bcb274b9e4607d4d4b8e38519d5ef","score":"0.4741074","text":"public function __construct(DiscountCalculatorInterface $discountCalculator)\n {\n parent::__construct();\n\n $this->discountCalculator = $discountCalculator;\n }","title":""},{"docid":"817d01282a342c0fb162e5ab86b84146","score":"0.47251222","text":"public function __construct($reader, &$options = array())\n {\n parent::__construct($reader, $options);\n\n $data = $this->_reader->read\n ($this->getOffset() + $this->getSize() -\n $this->_reader->getOffset());\n $dataSize = strlen($data);\n for ($i = 1; $i <= $dataSize; $i++) {\n $this->_sampleDependencyTypeTable[$i] = array\n ('sampleDependsOn' => (($tmp = ord($data[$i - 1])) >> 4) & 0x3,\n 'sampleIsDependedOn' => ($tmp >> 2) & 0x3,\n 'sampleHasRedundancy' => $tmp & 0x3);\n }\n }","title":""},{"docid":"2b28353055a7ec8c9c15e262120b66ad","score":"0.4719737","text":"public function __construct(ReadPlan $rp)\n {\n $this->rp=$rp;\n }","title":""},{"docid":"e4f4122f7ad1e2e4d2c63a8d0629a784","score":"0.47187692","text":"public function __construct()\n {\n parent::__construct();\n\n if (Input::get('action') == 'generateInvoice')\n {\n CrmService::generateInvoice(Input::get('id'), Input::get('type'));\n }\n }","title":""},{"docid":"300e67fa28d1762a93000224ae2ced15","score":"0.4699765","text":"public function withCoupon($coupon)\n {\n $this->coupon = $coupon;\n\n return $this;\n }","title":""},{"docid":"300e67fa28d1762a93000224ae2ced15","score":"0.4699765","text":"public function withCoupon($coupon)\n {\n $this->coupon = $coupon;\n\n return $this;\n }","title":""},{"docid":"65085da665b03973560455ae9f95883e","score":"0.4694258","text":"public function __construct()\n {\n $config = (object) parse_ini_file(BASE_PATH . '/config/config.ini');\n //TODO: config class to populate default values\n if (!isset($config->dbname) || $config->dbname == '') {\n $config->dbname = 'test';\n }\n $this->connection = new PDO(\"sqlite:\" . BASE_PATH . \"/../data/\".$config->dbname.\".sq3\");\n $this->userMapper = new UserMapper($this->connection);\n $serviceFactory = new ServiceFactory($this->connection);\n $this->userService = $serviceFactory->getService(\"User\");\n }","title":""},{"docid":"3b87fcf6becae7d7cc014cb3f906b6cd","score":"0.46905187","text":"public function __construct()\n {\n $this->currency = new Currency(self::CURRENCY);\n $this->cost = new Money(self::AMOUNT, $this->currency);\n $this->userEmail = new EmailAddress(self::USER_EMAIL);\n $this->metaData = [\n 1 => 'abc',\n 'a' => 'xyz',\n ];\n $this->id = new PaymentId(self::ID);\n $this->gatewayId = new StripePaymentId(self::GATEWAY_ID);\n }","title":""},{"docid":"7f320284034765803fe703ace5beef6d","score":"0.46846375","text":"public function read() {\r\n $rs = $this->connection->read(\"name, taxid, address, phone, idcity, city, iduser, `user`, email, contact\", \"vw_sus_customer\", \"idcustomer = \" . $this->observer->idcustomer);\r\n $this->observer->name = $rs->name;\r\n $this->observer->taxid = $rs->taxid;\r\n $this->observer->address = $rs->address;\r\n $this->observer->phone = $rs->phone;\r\n $this->observer->city = new \\sus\\entities\\CityEntity($rs->idcity);\r\n $this->observer->city->name = $rs->city;\r\n $this->observer->user = new \\gen\\entities\\UserEntity($rs->iduser);\r\n $this->observer->user->name = $rs->user;\r\n $this->observer->user->email = $rs->email;\r\n $this->observer->contact = $rs->contact;\r\n }","title":""},{"docid":"5b5a0ce3f93a9966a30c785d6615a50d","score":"0.46808472","text":"private function __construct() {\n\t\t$this->_applicationName = 'Billing';\n\t\t$this->_backend = new Billing_Backend_BankAccountUsage();\n\t\t$this->_modelName = 'Billing_Model_BankAccountUsage';\n\t\t$this->_currentAccount = Tinebase_Core::getUser();\n\t\t$this->_purgeRecords = FALSE;\n\t\t$this->_doContainerACLChecks = FALSE;\n\t\t$this->_config = isset(Tinebase_Core::getConfig()->billing) ? Tinebase_Core::getConfig()->billing : new Zend_Config(array());\n\t}","title":""},{"docid":"6bd7e1c87ccbcfc926a97d837f493508","score":"0.46760207","text":"public function __construct() {\n\t\tDebug::mark(__METHOD__);\n\t\t$argv = func_get_args();\n\n\t\tswitch (func_num_args()) {\n\t\tcase 0:\n\t\t\tthrow new Exception(\"Missing URL.\");\n\n\t\tcase 1:\n\t\t\t\tif (is_array($argv[0])) {\n\t\t\t\t\t\t$this->__serviceURL = $argv[0];\n\t\t\t\t\t\t$this->__serviceType = array('json'); //Default service type.\n\t\t\t\t} else {\n\t\t\t\t\tif (WebTools::isValidUrl($argv[0])) {\n\t\t\t\t\t\t$this->__serviceURL = $argv[0];\n\t\t\t\t\t\t$this->__serviceType = array('json'); //Default service type.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Exception(\"'$argv[0]' is not a valid argument.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\t\tif (WebTools::isValidUrl($argv[0])) {\n\t\t\t\t\t$this->__serviceURL = $argv[0];\n\t\t\t\t\tswitch ($argv[1]) {\n\t\t\t\t\tcase 'json':\n\t\t\t\t\t\t\t$this->__serviceType = array('json');\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'xml':\n\t\t\t\t\t\t\t$this->__serviceType = array('xml');\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault: //default file type\n\t\t\t\t\t\tthrow new Exception(\"'$argv[1]' is not a valid type.\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Exception(\"'$argv[0]' is not a valid URL.\");\n\t\t\t\t}\n\t\t}//end switch\n\n\t\t$this->__serviceData = $this->__getData($this->__serviceURL);\n\t\t$this->__service = $this->__processData($this->__serviceData);\n\t\tDebug::mark(__METHOD__);\n\t}","title":""},{"docid":"d2ba3aea355e3be60776fe41f3f83ae0","score":"0.4673026","text":"public function __construct()\n {\n $this->cnae = new Cnae();\n $this->relacao_cnae_cid = new RelacaoCnaeCid();\n }","title":""},{"docid":"837ca7ef7793d9d3cab41682a733b493","score":"0.46725315","text":"public function __construct()\n {\n $this->vendSrv = new VendService;\n $this->shopifySvc = new ShopifyService;\n }","title":""},{"docid":"be93e10836b69d627faef4fe4c57d2b0","score":"0.46698558","text":"public function __construct()\n {\n $consumerKey = Config::inst()->get('Suilven\\Flickr\\Service\\FlickrService', 'consumer_key');\n $consumerSecret = Config::inst()->get('Suilven\\Flickr\\Service\\FlickrService', 'consumer_secret');\n $token = Config::inst()->get('Suilven\\Flickr\\Service\\FlickrService', 'token');\n $tokenSecret = Config::inst()->get('Suilven\\Flickr\\Service\\FlickrService', 'token_secret');\n\n $metadata = new Metadata($consumerKey, $consumerSecret);\n $metadata->setOauthAccess($token, $tokenSecret);\n\n $this->factory = new ApiFactory($metadata, new GuzzleAdapter());\n\n error_log('CK=' . $consumerKey);\n\n if (!$consumerKey) {\n echo \"In order to import photographs Flickr key, secret and access token must be provided\";\n die;\n }\n }","title":""},{"docid":"658f0f1854fa6c666fc123e438504ab4","score":"0.46675527","text":"public function __construct() {\n\t\t$this->jsonReader = new JsonReader('bookData');\n\t}","title":""},{"docid":"841f6720626e7c58bc9f04440d4817d7","score":"0.46635914","text":"public function __construct()\n {\n // inject our services as class properties\n if ( isset($this->services) && is_array($this->services) ) {\n foreach ($this->services as $property => $class) {\n $this->{$property} = new $class;\n }\n }\n }","title":""},{"docid":"ca533b6dfe7b37305ddc446e48d0d841","score":"0.4643062","text":"public function coupon()\n {\n return $this->belongsTo(Coupon::class);\n }","title":""},{"docid":"852fffa29cb722ec467b5b64023b5746","score":"0.4635599","text":"function __construct() \n {\n parent::__construct();\n \n// $db = new DB($this -> _db);\n// $this -> _pdo = $db -> getConnected();\n \n $this -> _billing = new BillingManager( $this -> _pdo );\n $this -> _license = new LicenseRecord( $this -> _pdo );\n $this -> _usersNotes = new UsersNotes( $this -> _pdo );\n $this -> _gateway = new Gateway();\n \n // detected storeID\n $config = GlobalSettings::getFastSpringConfig();\n $this -> storeId = $config['storeId'];\n }","title":""},{"docid":"f0d9744171d4a54a853177be6607490a","score":"0.46348777","text":"public function __construct($_enhancedCompleteRecoupRequestDetails = NULL)\r\n\t{\r\n\t\tPayPalWsdlClass::__construct(array('EnhancedCompleteRecoupRequestDetails'=>$_enhancedCompleteRecoupRequestDetails));\r\n\t}","title":""},{"docid":"f1ad71ece42a169cf413930256001230","score":"0.46287468","text":"public function __construct( $coupons = null)\n {\n $this\n ->setCoupons($coupons);\n }","title":""},{"docid":"3c72cad15f8dd2f19e40efcbd27b2934","score":"0.46285266","text":"public function __construct()\n\t{\n\t\t\t\n\t\t// step 1 load the base url from config;\n\t\t$this->base_url = self::getBaseUrlFromConfig();\n\t\t// step 2 load the data from aws dynamodb\n\t\t// if the data isn't found in dynamodb throw an exception\n\t\t// if the data is found in the dynamodb assign the variable, and return the object\n\t}","title":""},{"docid":"bb1a48937616bc0a052a77891092d970","score":"0.4623088","text":"public function __construct() {\n\t\t\n $this->Rate = new Rate;\n \n }","title":""},{"docid":"a56b1b7db6080e0aa32556ceba50421d","score":"0.46225908","text":"public function __construct() {\n \n /**\n * Inject the array contained in the configuration file.\n */\n $this->_config = require __DIR__ . '/../config/_config.php';\n \n /**\n * The ORM setup.\n */\n $this->_db();\n \n /**\n * Force the HTTPS protocol.\n */\n $this->_forceHttps();\n \n /**\n * Set the unique order ID or .\n */\n $this->_setSku();\n \n /**\n * Set the action.\n */\n $this->_setAction();\n \n /**\n * If the exists it sets the master object.\n */\n if ($this->_sku) {\n $this->_setMaster($this->_sku);\n }\n \n /**\n * If the master object doesn't exist, it triggers an exception\n * otherwise it sets the registry object.\n */\n if ($this->getMaster() === NULL) {\n $this->_error404();\n } else {\n $this->_setRegistry($this->getMaster()->client__id);\n }\n \n /**\n * If the exists and matches.\n */\n if ($this->_action) {\n if ($this->_action === $this->getConfig('actionsHash')['setItemAsPaid']) {\n $this->_setItemAsPaid();\n } else if ($this->_action === $this->getConfig('actionsHash')['setItemAsDead']) {\n $this->_setItemAsDead();\n } else {\n $this->_error404();\n }\n }\n \n /**\n * Set the locale and the translations.\n */\n $this->_setLocale($this->getRegistry()->locale);\n \n /**\n * Validate and set the paramters needed\n * by the Stripe checkout.\n */\n $this->_setProcessParams();\n \n /**\n * Set the page title.\n */\n $this->_setPageTitle();\n \n /**\n * The order is closed.\n */\n if ($this->getMaster()->status == self::ITEM_STATUS_CLOSED) {\n echo $this->_('orderClosed');\n exit();\n }\n \n /**\n * If the parameters for the Stripe checkout exists\n * it processes the transaction.\n */\n if ($this->getProcessParams()) {\n $this->processCheckout();\n }\n \n }","title":""},{"docid":"7e78b1fec2ff8b0c268f68a47de20565","score":"0.46215734","text":"public function __construct(OrderService $order_service)\n {\n $this->order_service = $order_service;\n }","title":""},{"docid":"0c0a5af7b2b0ebd245955374dc4b4044","score":"0.46202555","text":"public function __construct() {\n\t\tparent::__construct();\n\n\t\t/** setup PayPal api context **/\n\t\t$paypal_conf = \\Config::get('paypal');\n\t\t$this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\n\t\t$this->_api_context->setConfig($paypal_conf['settings']);\n\t\t$this->Currency = 'USD';\n\t}","title":""},{"docid":"54be12a4399018a210a78d628b8ce348","score":"0.4620236","text":"public function __construct()\n {\n // Load the PayPal Checkout API\n Loader::load(dirname(__FILE__) . DS . 'lib' . DS . 'paypal_checkout_api.php');\n\n // Load configuration required by this gateway\n $this->loadConfig(dirname(__FILE__) . DS . 'config.json');\n\n // Load components required by this gateway\n Loader::loadComponents($this, ['Input']);\n\n // Load the language required by this gateway\n Language::loadLang('paypal_checkout', null, dirname(__FILE__) . DS . 'language' . DS);\n }","title":""},{"docid":"7d70f2760b5091d96d46b6c86ff6ab29","score":"0.46188328","text":"function __construct( &$reader )\n\t{\n\t\tparent::__construct( $reader );\n\t}","title":""},{"docid":"589e098df6954fb6495d04321a49c978","score":"0.46161368","text":"public function __construct()\n {\n //Novalnet Basic parameters\n $this->assignUtilities();\n $this->_vendorId = $this->_getConfigData('merchant_id', true);\n $this->_authcode = $this->_getConfigData('auth_code', true);\n $this->_productId = $this->_getConfigData('product_id', true);\n $this->_tariffId = $this->_getConfigData('tariff_id', true);\n $this->_referrerId = $this->_getConfigData('referrer_id', true);\n }","title":""},{"docid":"9427c022fb64043594081822c99ec5cf","score":"0.46160454","text":"public function __construct()\n {\n try {\n // using guzzle\n $this->data->data = new stdClass();\n $this->data->fulfillment = new stdClass();\n\n $this->headers = array(\n 'Content-Type: application/json'\n );\n /*\n\n $this->endpoint = config('woocommerce.store_url');\n $this->headers = [\n 'header_total' => config('woocommerce.header_total') ?? 'X-WP-Total',\n 'header_total_pages' => config('woocommerce.header_total_pages') ?? 'X-WP-TotalPages',\n ];\n\n $this->woocommerce = new Client(\n $this->endpoint,\n config('woocommerce.store_url'),\n config('woocommerce.consumer_key'),\n config('woocommerce.consumer_secret'),\n [\n 'version' => 'wc/'.config('woocommerce.api_version'),\n 'wp_api' => config('woocommerce.wp_api_integration'),\n 'verify_ssl' => config('woocommerce.verify_ssl'),\n 'query_string_auth' => config('woocommerce.query_string_auth'),\n 'timeout' => config('woocommerce.timeout'),\n ]\n );\n */\n } catch (\\Exception $e) {\n throw new \\Exception($e->getMessage(), 1);\n }\n }","title":""},{"docid":"c21c69ee4af4a5890382cc61c7b66163","score":"0.46133235","text":"public function __construct(array $options = []){\n //will figure out how the fuck to add this to the SLIM APP\n $dotenv = new Dotenv(__DIR__.\"/../../\");\n $dotenv->load();\n\n\t\t/*\n * signature for wooclient\n url\n consumer key\n private key\n options - array\n */\n\t\t\n\t\t$this->theClient = new Client(\n\t\tgetenv(\"Site_Url\"),\n\t\tgetenv(\"Consumer_Key\"),\n\t\tgetenv(\"Consumer_Secret\"),\n\t\t$options\n\t\t);\n\t\t\n\t\t\n\t\treturn $this->theClient;\n\t\t\n\t}","title":""},{"docid":"402637be4a04b42eff436f74be72901f","score":"0.46087006","text":"public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->entity = app()->make(Payment::class);\n\n\t\t$this->interval = QuickBooks::getQuickBookSyncChangesInterval();\n\t}","title":""},{"docid":"e98d5c9d2aa71d0920355dc3a32a2d34","score":"0.46065676","text":"public function __construct()\n {\n\n /** PayPal api context **/\n $paypal_conf = \\Config::get('paypal');\n $this->_api_context = new ApiContext(new OAuthTokenCredential(\n $paypal_conf['client_id'],\n $paypal_conf['secret'])\n );\n $this->_api_context->setConfig($paypal_conf['settings']);\n\n }","title":""},{"docid":"5553fc0cea69bbcde918fe23cf7003de","score":"0.46060827","text":"public function __construct(){\n $arquivo = file_get_contents(CLASS_DIR.'MC/Cliente/Storage/clientes.json');\n $arrayClientes = json_decode($arquivo);\n foreach ($arrayClientes->items->item as $cli) {\n\n if (isset($cli->cnpj)){\n $cliente = new PessoaJuridica();\n $cliente->setCnpj($cli->cnpj);\n }else{\n $cliente = new PessoaFisica();\n $cliente->setCpf($cli->cpf);\n }\n\n $cliente->setNome($cli->nome)\n ->setIdade($cli->idade)\n ->setCep($cli->cep)\n ->setEndereco($cli->endereco)\n ->setNumero($cli->numero)\n ->setComplemento($cli->complemento)\n ->setBairro($cli->bairro)\n ->setCidade($cli->cidade)\n ->setEstado($cli->estado)\n ->setImportancia($cli->importancia);\n\n $this->clientes[$cli->nome] = $cliente->getDados();\n }\n\n }","title":""},{"docid":"2c3ed7a998c073b042ea587a081bba2a","score":"0.4602168","text":"public function __construct(CardsService $service)\n {\n parent::__construct();\n\n $this->service = $service;\n }","title":""},{"docid":"e9ec4d75c7580142fb268e313a5a9494","score":"0.46009326","text":"public function __construct()\n {\n $this->middleware('auth', ['only' => [\n 'getCouponForUser',\n ]]);\n }","title":""},{"docid":"e27b00e4327ea3aa07aada15851dea5f","score":"0.45973927","text":"public function index()\n {\n $coupons = Coupon::filter()->paginate();\n\n return CouponResource::collection($coupons);\n }","title":""},{"docid":"e44169f4ff4f5c6022124ccac69d8e2e","score":"0.45907858","text":"public function __construct() {\n\t\t$this->CI = &get_instance();\n\t\t\n\t\t$this->CI->config->load('bitcoin', TRUE);\n\t\t$this->config = $this->CI->config->item('bitcoin');\t\n\n\t\t$this->CI->load->library('jsonrpcclient', $this->config);\n\t\t$this->CI->load->model('bitcoin_model');\n\t}","title":""},{"docid":"9b6ec8cbc3280c5a47302a84ca47ec35","score":"0.4577877","text":"protected function _construct()\n {\n $this->_init(\n Model\\Counter::class,\n Model\\ResourceModel\\Counter::class\n );\n }","title":""},{"docid":"2786b55ca06b63e4a513c85a320f95f6","score":"0.45754242","text":"public function init() {\n $this->_service = new stdClass();\n $this->_service->baseurl = trim(get_config('blocks/intelligent_learning', 'ilpapi_url'));\n $connectionid = trim(get_config('blocks/intelligent_learning', 'ilpapi_connectionid'));\n $connectionpassword = trim(get_config('blocks/intelligent_learning', 'ilpapi_connectionpassword'));\n $this->_service->auth_header = $this->build_service_header($connectionid, $connectionpassword);\n $this->_service->is_ca_authority = trim(get_config('blocks/intelligent_learning', 'ilpapi_issslcaauthority'));\n $this->_service->cert_path = trim(get_config('blocks/intelligent_learning', 'ilpapi_certpath'));\n\n $this->_service->curldefaults = $this->get_curl_defaults();\n }","title":""},{"docid":"e4bfd74f33471568ce8dae7d14e12481","score":"0.4568178","text":"public function __construct() {\n $this->availabilityManager = \\Drupal::service('commerce.availability_manager');\n $this->currentStore = \\Drupal::service('commerce_store.store_context')->getStore();\n $this->stockAvailabilityChecker = \\Drupal::service('commerce_stock.availability_checker');\n $this->stockServiceManager = \\Drupal::service('commerce_stock.service_manager');\n $this->localStockChecker = \\Drupal::service('commerce_stock.local_stock_service')->getStockChecker();\n $this->localStockUpdater = \\Drupal::service('commerce_stock.local_stock_service')->getStockUpdater();\n $this->variationStorage = \\Drupal::service('entity_type.manager')->getStorage('commerce_product_variation');\n }","title":""},{"docid":"076cf50a06939bb681c6dc066b3ba5b2","score":"0.45672846","text":"function __construct($cocktailId) {\n\t $cocktail = $this->getCocktail($cocktailId);\n\n\t // Assign values to object instance\n\n\t $this->name = $cocktail[\"name\"];\n\t $this->instructions = $cocktail[\"instructions\"];\n\t $this->image = $cocktail[\"image\"];\n\n\t // Get cocktail ingredients from database and assign\n\t $this->ingredients = $this->getCocktailIngredients($cocktailId);\n }","title":""},{"docid":"42d0c72e7b12ffb8a71d46049ff60ee2","score":"0.45599455","text":"public function __construct()\n {\n $this->defaultLang = env('SCRAPER_LOCALIZATION', 'en');\n $this->siteCountry = env('SCRAPER_COUNTRY', 'sa'); \n\n $this->sourceUrl = 'https://'.$this->siteCountry.'.pricena.com';\n\n $this->client = new Client();\n }","title":""},{"docid":"f3caf1ba362f42c87ad601982f97f8c9","score":"0.45569065","text":"public function getService();","title":""},{"docid":"f3caf1ba362f42c87ad601982f97f8c9","score":"0.45569065","text":"public function getService();","title":""},{"docid":"f3caf1ba362f42c87ad601982f97f8c9","score":"0.45569065","text":"public function getService();","title":""},{"docid":"cb3eb9d45ce59d6ff76e6f40bf7ed782","score":"0.45536065","text":"public function __construct(Cancellation $cancellation)\n {\n $this->cancellation = $cancellation;\n $this->order = $cancellation->order;\n }","title":""},{"docid":"3a9664d9d2f30b05ee95ac01c49bc787","score":"0.45510906","text":"public function __construct()\n {\n $this->counterparty = new Client(config('bitcorn.cp.api'));\n $this->counterparty->authentication(config('bitcorn.cp.user'), config('bitcorn.cp.password'));\n\n parent::__construct();\n }","title":""},{"docid":"3e34a4a6e58892b2e626a9f662efa7bc","score":"0.45455423","text":"public function __construct()\n {\n $this->client = new Client([\n 'base_uri' => $this->base_uri\n ]);\n }","title":""}],"string":"[\n {\n \"docid\": \"0ef0ee16493bea6f9213648407a82214\",\n \"score\": \"0.586491\",\n \"text\": \"public function getById($id)\\n {\\n $coupon = null;\\n\\n $response = $this->request('coupons/' . $id);\\n\\n if (is_array($response) && is_array($response['coupon'])) {\\n $coupon = new Resource($response['coupon']);\\n }\\n\\n return $coupon;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"976fb016a2e23ae79c03956613dad2a3\",\n \"score\": \"0.58585066\",\n \"text\": \"public function create($data)\\n {\\n $coupon = null;\\n\\n $response = $this->request('coupons', $data, 'POST');\\n\\n if (is_array($response) && is_array($response['coupon'])) {\\n $coupon = new Resource($response['coupon']);\\n }\\n\\n return $coupon;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59e9181754aeafc74d9a1702defa80c3\",\n \"score\": \"0.5513174\",\n \"text\": \"public function getByCode($code)\\n {\\n $coupon = null;\\n\\n $response = $this->request('coupons/find?code=' . $code);\\n\\n if (is_array($response) && is_array($response['coupon'])) {\\n $coupon = new Resource($response['coupon']);\\n }\\n\\n return $coupon;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1bc9312d713c9eac660e3774965b79d\",\n \"score\": \"0.54116404\",\n \"text\": \"private function get_coupon()\\n {\\n //\\n $this->coupon = null;\\n if( isset( $_POST[ 'coupon' ] ) && $_POST[ 'coupon' ] != \\\"\\\" )\\n {\\n // Try to retrieve the coupon.\\n //\\n $this->coupon = Stripe_Coupon::retrieve( $_POST[ 'coupon' ] );\\n $this->response[ 'coupon-id' ] = $this->coupon->id;\\n $this->response[ 'coupon-max-redemptions' ] = $this->coupon->max_redemptions;\\n $this->response[ 'coupon-times-redeemed' ] = $this->coupon->times_redeemed;\\n $this->response[ 'coupon-redeem-by' ] = gmdate( \\\"M d Y H:i:s\\\", $this->coupon->redeem_by ) . ' UTC';\\n $this->response[ 'coupon-percent' ] = $this->coupon->percent_off;\\n\\n // Check the validity of the coupon\\n //\\n if( $this->coupon->times_redeemed >= $this->coupon->max_redemptions )\\n {\\n $this->response[ 'error' ] = 'Coupon can only be redeemed ' . intval( $this->coupon->max_redemptions ) . ' time(s)';\\n echo json_encode( $this->response );\\n die();\\n }\\n $now = gmmktime();\\n if( $now > $this->coupon->redeem_by )\\n {\\n $this->response[ 'error' ] = 'Coupon expired on ' . gmdate( \\\"M d Y H:i:s\\\", $this->coupon->redeem_by ) . ' UTC';\\n echo json_encode( $this->response );\\n die();\\n }\\n\\n // If we made it here, the coupon is valid\\n //\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4980aeaf781122d44fa308c2bbaa76a3\",\n \"score\": \"0.5239026\",\n \"text\": \"public function __construct(){\\n\\n //instância um cliente do webservice\\n $this->dollar = Http::get('https://api.ratesapi.io/api/latest?base=USD&symbols=BRL');\\n $this->euro = Http::get('https://api.ratesapi.io/api/latest?base=EUR&symbols=BRL');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a71c754638327870a1989cb6b4d626b6\",\n \"score\": \"0.5211153\",\n \"text\": \"public function show(Coupon $coupon)\\n {\\n return new CouponResource($coupon);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea60e5c50d153a6c5b672cdda6d8cfa7\",\n \"score\": \"0.5173944\",\n \"text\": \"public function __construct(Discount $discount)\\n {\\n $this->discount = $discount;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b6dcef7238c409b808c32cfccd37aaa\",\n \"score\": \"0.51374763\",\n \"text\": \"public function __construct(RechargeService $rechargeService)\\n {\\n $this->rechargeService = $rechargeService;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"548d8f0d84e146e0d544f7b5a311cff0\",\n \"score\": \"0.5102947\",\n \"text\": \"public function __construct()\\n {\\n parent::__construct();\\n\\n $this->orderService = new OrderService();\\n $this->batchService = new BatchService();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff0c064ebfc04eefb77c55fa1544d932\",\n \"score\": \"0.5098244\",\n \"text\": \"public function __construct()\\n {\\n $this->opencartService = new OpenCartService();\\n parent::__construct();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73ebb5bbb29fbf727417be2bdf636e77\",\n \"score\": \"0.5097641\",\n \"text\": \"public function getReadConnectionService();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db6e35ac309eb750de9a642885ec95d5\",\n \"score\": \"0.50887203\",\n \"text\": \"public function coupon() {\\n return $this->hasOne('App\\\\Coupon', 'coupon_id', 'coupon_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af4c2a4c4ac11f1fb611d47d30691be9\",\n \"score\": \"0.5054945\",\n \"text\": \"Public Function __construct() {\\n\\t\\t$this->importSourceReaderService =& t3lib_div::makeInstance(self::CLASS_IMPORTSOURCE_READERSERVICE);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff4dd38653fcbe0335bf1698a99fa1f8\",\n \"score\": \"0.50477874\",\n \"text\": \"public function __construct()\\r\\n {\\r\\n parent::__construct();\\r\\n\\r\\n $this->service = clsProducts::getInstance();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"733222163343e9c880fa7d71a9a79cb4\",\n \"score\": \"0.5045981\",\n \"text\": \"protected function _construct()\\n {\\n $this->_init(OrderReference::class, OrderReferenceResource::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc0c1cba9f427b30bc014e53241bfaa8\",\n \"score\": \"0.5042396\",\n \"text\": \"public function __construct() {\\n $this->produto = new Conceito();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3cab51383a8606af5e7d91644e7344dc\",\n \"score\": \"0.50051296\",\n \"text\": \"public function __construct()\\n {\\n $this->_client = Client::create([\\n 'consumerKey' => $this->getConfigData('cardinity_key'),\\n 'consumerSecret' => $this->getConfigData('cardinity_secret'),\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eefdfc376dcf930bef42803f106ba769\",\n \"score\": \"0.49847892\",\n \"text\": \"public function __construct(ZohoService $warranty)\\n { \\n $this->warranty = $warranty;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a96652c2b103a4d36d448e5a7fc3a6c4\",\n \"score\": \"0.49697733\",\n \"text\": \"public function setCoupon(?string $coupon): self\\n {\\n $this->coupon = $coupon;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47d7912e464333786816bd723b9b2e39\",\n \"score\": \"0.49676326\",\n \"text\": \"public function validate($code)\\n {\\n $coupon = null;\\n\\n $response = $this->request('coupons/validate?code=' . $code);\\n\\n if (is_array($response) && is_array($response['coupon'])) {\\n $coupon = new Resource($response['coupon']);\\n }\\n\\n return $coupon;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7dfec1a7606838cc57fcbded6b5bae19\",\n \"score\": \"0.49628016\",\n \"text\": \"public function __construct()\\n {\\n $this->currencies = new ISOCurrencies();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7125553de1bd818363e499a1f808e38\",\n \"score\": \"0.49376395\",\n \"text\": \"public function __construct()\\n\\t{\\n\\t\\t$this->client = $this->getSOLRClient();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43f35e22c417a9bd0b345cecee669c9c\",\n \"score\": \"0.49278036\",\n \"text\": \"public function __construct() {\\n $this->bucket_slug = config('cosmic.slug');\\n $this->read_key = config('cosmic.read');\\n $this->write_key = config('cosmic.write');\\n $this->locations_cosmic = new CosmicJS($this->bucket_slug, 'locations');\\n $this->items_cosmic = new CosmicJS($this->bucket_slug, 'items', $this->read_key, $this->write_key);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"686c2d2b40b27289f3d4bb7ec8d3394b\",\n \"score\": \"0.4917388\",\n \"text\": \"public function __construct()\\n {\\n $this->cotacao = new Client();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a53313d6b3a773ce9a72ae59d9e1d71d\",\n \"score\": \"0.49056873\",\n \"text\": \"public function __construct(ComicService $comicService)\\n {\\n //$this->middleware('auth');\\n if(isset($comicService)){\\n $this->comicService = $comicService;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a63c8424780e880dab703dc46cbe0a03\",\n \"score\": \"0.49019986\",\n \"text\": \"public function __construct(CorreiosService $correiosService)\\n {\\n $this->correiosService = $correiosService;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bfa29e4938672af9d10179dd2468277c\",\n \"score\": \"0.489317\",\n \"text\": \"protected function _construct()\\n {\\n $this->_init('Dotpay\\\\Payment\\\\Model\\\\Resource\\\\CreditCard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36d6bb2138eaf05ec2a3323e0b4f1cec\",\n \"score\": \"0.48886257\",\n \"text\": \"public function __construct(private readonly AdvancedMetadataFactoryInterface $reader)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b922817e70438402c1f9e4cfccaca11a\",\n \"score\": \"0.488386\",\n \"text\": \"public function __construct($userId = null, OrderInterface $order, CouponInterface $coupon)\\n {\\n $this->userId = $userId;\\n $this->order = $order;\\n $this->coupon = $coupon;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2b6fdc01b18bf65ba22879cf91c4675\",\n \"score\": \"0.48764122\",\n \"text\": \"public function __construct()\\n {\\n parent::__construct();\\n\\n $this->client = RdsClient::factory([\\n 'version' => 'latest',\\n 'region' => 'us-east-1',\\n 'credentials' => [\\n 'key' => env('AWS_ACCESS_KEY_ID'),\\n 'secret' => env('AWS_SECRET_ACCESS_KEY'),\\n ]\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b34c95401dd057b9bc3e7901bad06cb7\",\n \"score\": \"0.4866063\",\n \"text\": \"public function list(){\\n $retrieved = $this->retrieve(['list_coupon']);\\n return $retrieved['coupon'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"379699f4ffad56d130e1aab09d8e48c8\",\n \"score\": \"0.48660627\",\n \"text\": \"public function __construct()\\n {\\n $this->readJsonConversionRates($this->exchangeRatePath);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f02cf9bbe5fcdeb90200c9fbc553ddea\",\n \"score\": \"0.48643902\",\n \"text\": \"public function getService() {\\n if ($this->_service !== null) {\\n return $this->_service;\\n }\\n\\n $restaurantId = (integer) $this->getRestaurantId();\\n $service = new Yourdelivery_Model_Servicetype_Restaurant($restaurantId);\\n \\n if ($service->isCatering()) {\\n $service = new Yourdelivery_Model_Servicetype_Cater($restaurantId);\\n \\n } elseif ($service->isGreat() || $service->isFruit()) {\\n $service = new Yourdelivery_Model_Servicetype_Great($restaurantId);\\n \\n }\\n \\n return $this->_service = $service;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32e58173dac3bde4d754542d50b36baa\",\n \"score\": \"0.48636386\",\n \"text\": \"public function __construct(Reader $reader)\\n {\\n $this->reader = $reader;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bad6e884d1152c76563e414c2127b427\",\n \"score\": \"0.48359388\",\n \"text\": \"public function __construct(SupplierService $service)\\n {\\n $this->middleware('role:company');\\n\\n $this->service = $service;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f84dac99025dfa226008eda77238322d\",\n \"score\": \"0.48230574\",\n \"text\": \"public function testCreateCoupon()\\n {\\n // TODO: implement\\n $this->markTestIncomplete('Not implemented');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8addfd4c05ca1a3c124d5a918c4622a1\",\n \"score\": \"0.48132032\",\n \"text\": \"public function __construct(){\\r\\n\\t\\t$this->data\\t=\\t$this->getFeedData();\\r\\n\\t\\t$this->data\\t=\\t$this->data->customer;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3eaa6a857d44e1c17eb6d0a48fd59a3d\",\n \"score\": \"0.48008516\",\n \"text\": \"public function __construct()\\n {\\n $this->catalogue = new InMemoryCatalogue();\\n $this->basket = new Basket();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5edd4c07941f3621d6fbbaa7d325479\",\n \"score\": \"0.47987378\",\n \"text\": \"protected function _construct()\\n {\\n $this->_init(\\n 'GBPrimePay\\\\Payments\\\\Model\\\\Purchase',\\n 'GBPrimePay\\\\Payments\\\\Model\\\\ResourceModel\\\\Purchase'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc7c6a89e0c08e5b362176171ecfce9c\",\n \"score\": \"0.47919694\",\n \"text\": \"public function __construct()\\n {\\n $this->setProduitOrCustom('custom');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c04c7491a9dd7d84f98766f5ab64903\",\n \"score\": \"0.4791794\",\n \"text\": \"public function __construct($orderid) {\\n\\t\\tparent::__construct();\\n\\n\\t\\t$this->orderid = $orderid;\\n\\t\\t$this->useDropbox = true;\\n\\t\\t$this->GUID = gen_uuid();\\n\\n\\t\\t/* NES\\n\\t\\t * Mando HardReset (3er parametro) porque los orderproductid se comportan raro cuando los traemos de cache\\n\\t\\t */\\n\\t\\tif(!$this->order = getOrder($orderid, true, true))\\n\\t\\t{\\n\\t\\t\\tlogAddError('No se pudo cargar la orderid \\\"'.$orderid.'\\\" para transmitir a IntelisisWebService');\\n\\t\\t\\t$this->setError('Ocurrio un error al cargar su pedido en nuestro sistema [1]. Favor de contactar al administrador del sistema con el ID de pedido \\\"'.$orderid.'\\\"');\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\t/*\\n\\t\\t * NES: REQ12891 - Obtengo los campos configurables de los productos\\n\\t\\t */\\n\\t\\t$orderFields = GetOrderProductFieldsData($orderid);\\n\\n\\t\\tif(($Cliente = $this->getCliente()) == ''){\\n\\t\\t\\tlogAddWarning('No se encontro el ID de WebUsuario del customer id \\\"'.$Cliente.'\\\"');\\n\\t\\t\\t$this->setError('Ocurrio un error al cargar su pedido en nuestro sistema [2]. Favor de contactar al administrador del sistema con el ID de pedido \\\"'.$orderid.'\\\"');\\n\\t\\t}\\n\\t\\t//$discount = $this->order['coupon_discount'] >= 0 ? ($this->order['coupon_discount'] / $this->order['subtotal_inc_tax']) * 100 : 0;\\n\\n\\t\\t/*\\n\\t\\t NES BUGS 13066, 13102, 13154, 13155, 13148 de cupones\\n\\t\\t Arreglo esto para poner descuentos globales, por producto, o al envío.\\n\\t\\t */\\n\\t\\t$discount_result = $GLOBALS['ISC_CLASS_DB']->Query(\\\"SELECT * FROM [|PREFIX|]order_coupons WHERE ordcouporderid = '\\\".$orderid.\\\"'\\\");\\n\\t\\t$order_discount = $GLOBALS['ISC_CLASS_DB']->Fetch($discount_result);\\n\\n\\t\\t$shippingCost = $_SESSION['QUOTE']->getNonDiscountedShippingCost(true);\\n\\n\\t\\t$discount = 0;\\n\\t\\t$discount_product = 0;\\n\\t\\t$discount_product_percent = 0;\\n\\t\\t$discount_shipping = 0;\\n\\n\\t\\tswitch($order_discount['ordcoupontype']){\\n\\t\\t\\tcase '0':\\n\\t\\t\\t\\t$discount_product = $order_discount['ordcouponamount'];\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase '1':\\n\\t\\t\\t\\t$discount_product_percent = $order_discount['ordcouponamount'];\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase '2':\\n\\t\\t\\t\\t$discount = ($order_discount['ordcouponamount'] * 100) / $this->order['subtotal_inc_tax'];\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase '3':\\n\\t\\t\\t\\tif($shippingCost == 0) $discount_shipping = 100;\\n\\t\\t\\t\\t else $discount_shipping = ($order_discount['ordcouponamount'] * 100) / $shippingCost;\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase '4':\\n\\t\\t\\t\\t $discount_shipping = 100;\\n\\t\\t\\t\\tbreak;\\n\\t\\t}\\n\\n\\t\\t$customerData = $this->getCustomer();\\n\\n\\t\\t$customFieldsAccount = $GLOBALS['ISC_CLASS_FORM']->getFormFields(FORMFIELDS_FORM_ACCOUNT, false, $customerData['custformsessionid']);\\n\\n\\t\\t$RFC = getCustomFieldByLabel($customFieldsAccount, FORMFIELDS_FORM_ACCOUNT, 'RFC');\\n\\n\\t\\t$extrafields = '';\\n\\t\\t$invoice = '';\\n\\t\\tfor($i=1;$i<=5;$i++){\\n\\t\\t\\tif(GetConfig('CheckoutExtraFieldActive'.$i)) {\\n\\t\\t\\t\\t//ToDo: Probar bien este parseo para evitar XML mal formados, dependiendo de nombres de campos extras\\n\\t\\t\\t\\t$fieldName = preg_replace(\\\"/[^A-Za-z0-9]|[\\\\s]/\\\", '', GetConfig('CheckoutExtraFieldName'.$i));\\n\\t\\t\\t\\t$fieldValue = $this->order['extraField'.$i];\\n\\n\\t\\t\\t\\tif($fieldName == 'RequiereFactura'){\\n\\t\\t\\t\\t\\tif(strtoupper($fieldValue) == 'ON'){\\n\\t\\t\\t\\t\\t\\tif(trim($RFC) == '') {\\n\\t\\t\\t\\t\\t\\t\\tlogAddError('Se intento hacer el orderid \\\"'.$orderid.'\\\" que requiere factura pero el RFC esta vacio');\\n\\t\\t\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\telse {\\n\\t\\t\\t\\t\\t\\t\\t$invoice = 'SI';\\n\\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$invoice = 'NO';\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t$extrafields .= \\\" \\\".$fieldName.\\\"='\\\".$fieldValue.\\\"'\\\";\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t$deliveryDates = array();\\n\\t\\tforeach($this->order['products'] as $product)\\n\\t\\t{\\n\\t\\t\\t/*\\n\\t\\t NES BUGS 13066, 13102, 13154, 13155, 13148 de cupones\\n\\t\\t Aumento el descuento en linea. Convierto los descuentos en cantidad a porcentaje.\\n\\t\\t */\\n\\t\\t\\t$this_product_discount = 0;\\n\\n\\t\\t\\tif($discount_product > 0) {\\n\\t\\t\\t\\t$this_product_discount = ($discount_product * 100) / $product['price_inc_tax'];\\n\\t\\t\\t}\\n\\t\\t\\telseif($discount_product_percent > 0){\\n\\t\\t\\t\\t$this_product_discount = $discount_product_percent;\\n\\t\\t\\t}\\n\\n\\t\\t\\t/* \\n\\t\\t\\t * NES: REQ12891 - Agrego esto para poner el nombre y valor del campo confiugrable, para luego agregarselo al XML\\n\\t\\t\\t * Si el producto no tiene campos confiugrables, el arreglo se deja vacio\\n\\t\\t\\t */\\n\\t\\t\\t$productFields = array();\\n\\t\\t\\tif(isset($orderFields[$product['orderprodid']])){\\n\\t\\t\\t\\tforeach($orderFields[$product['orderprodid']] as $key => $field){\\n\\t\\t\\t\\t\\tif($field['fieldtype'] == 'checkbox') {\\n\\t\\t\\t\\t\\t\\tif(in_array(strtoupper($field['textcontents']), array('ON', 'CHECKED'))) $field['textcontents'] = 'Si';\\n\\t\\t\\t\\t\\t\\telse $field['textcontents'] = 'No';\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$IDCampo = $this->getIDCampo($field['fieldid']);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$productFields[] = array(\\n\\t\\t\\t\\t\\t\\t'Nombre' => $field['fieldname'],\\n\\t\\t\\t\\t\\t\\t//'Valor' => str_replace(array('\\\"'), array(\\\"'\\\"), $field['textcontents']),\\n\\t\\t\\t\\t\\t\\t'Valor' => stripInvalidXml($field['textcontents']),\\n\\t\\t\\t\\t\\t\\t'IDCampo' => $IDCampo,\\n\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\tif($product['ordprodwrapid'] > 0){\\n\\t\\t\\t\\t$productFields[] = array(\\n\\t\\t\\t\\t\\t'Nombre' => 'Envoltura Regalo #'.$GLOBALS['ISC_CLASS_DB']->FetchOne('SELECT IDEnvoltura FROM [|PREFIX|]intelisis_gift_wrapping WHERE wrapid = \\\"'.$product['ordprodwrapid'].'\\\"', 'IDEnvoltura'),\\n\\t\\t\\t\\t\\t//'Valor' => str_replace(array('\\\"'), array(\\\"'\\\"), $field['textcontents']),\\n\\t\\t\\t\\t\\t'Valor' => stripInvalidXml($product['ordprodwrapname'].' - '.$product['ordprodwrapmessage']),\\n\\t\\t\\t\\t\\t'IDCampo' => '',\\n\\t\\t\\t\\t);\\n\\t\\t\\t}\\n\\n\\n\\t\\t\\t$pedidoD[] = array(\\n\\t\\t\\t\\t'ID' => $product['orderprodid'],\\n\\t\\t\\t\\t'Cantidad' => $product['ordprodqty'],\\n\\t\\t\\t\\t'SKU' => $product['ordprodsku'],\\n\\t\\t\\t\\t'Precio' => $product['price_inc_tax'],\\n\\t\\t\\t\\t'DescuentoLinea' => $this_product_discount,\\n\\t\\t\\t\\t// NES: REQ12891 - Agrego el arreglo de campos configurables\\n\\t\\t\\t\\t'CamposConfigurables' => $productFields,\\n\\t\\t\\t);\\n\\n\\t\\t\\tif($date = $this->getDeliveryDateFromStatus($product)){\\n\\t\\t\\t\\t$deliveryDates[] = $date;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif(!empty($deliveryDates)){\\n\\t\\t\\trsort($deliveryDates);\\n\\t\\t\\t$maxdate = date('Y-m-d', $deliveryDates[0]);\\n\\t\\t}\\n\\t\\telse {\\n\\t\\t\\t$maxdate = '';\\n\\t\\t}\\n\\n\\t\\tif(empty($pedidoD))\\n\\t\\t{\\n\\t\\t\\tlogAddWarning('El orderid \\\"'.$this->orderid.'\\\" no tiene productos para transmitir a Intelisis');\\n\\t\\t\\t$this->setError('Ocurrio un error al procesar el XML de su pedido. Favor de contactar al administrador del sistema con el ID de pedido \\\"'.$this->orderid.'\\\" [2]');\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t$xml = \\\"\\\";\\n\\n\\t\\tforeach($pedidoD as $D) {\\n\\t\\t\\t$line = \\\" $value) {\\n\\t\\t\\t\\t/* NES: REQ12891 - Agrego validacion de is_array para no meter el arreglo de campos configurables\\n\\t\\t\\t\\t* asi como cualquier otro arreglo que le podamos agregar al arreglo de productos\\n\\t\\t\\t\\t* */\\n\\t\\t\\t\\tif(!is_array($value)) $line .= ' '.$attribute.'=\\\"'.$value.'\\\"';\\n\\t\\t\\t}\\n\\t\\t\\t$line .= \\\">\\\";\\n\\n\\t\\t\\t/*\\n\\t\\t\\t * NES: REQ12891 - Ahora si, agrego el XML de los campos configurables si no viene vacio\\n\\t\\t\\t */\\n\\t\\t\\tif(!empty($D['CamposConfigurables'])){\\n\\t\\t\\t\\t$line .= '';\\n\\t\\t\\t\\tforeach($D['CamposConfigurables'] as $key => $field) {\\n\\t\\t\\t\\t\\t$line .= '';\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$line .= '';\\n\\t\\t\\t}\\n\\n\\t\\t\\t$line .= \\\"\\\";\\n\\t\\t\\t$xml .= $line;\\n\\t\\t}\\n\\n\\t\\t$customFieldsBillingAddress = $GLOBALS['ISC_CLASS_FORM']->getFormFields(FORMFIELDS_FORM_BILLING, false, $this->order['ordformsessionid']);\\n\\t\\tforeach($customFieldsBillingAddress as $fieldid => $field){\\n\\t\\t\\tif($field->record['formfieldisimmutable'] > 0)\\n\\t\\t\\t\\tunset($customFieldsBillingAddress[$fieldid]);\\n\\t\\t}\\n\\t\\t$customFieldsBillingXML = getCustomFieldsAsXMLAttributes($customFieldsBillingAddress);\\n\\t\\t/*\\n\\t\\t$Colonia = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Colonia');\\n\\t\\t$Delegacion = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Delegacion');\\n\\t\\t$NoExt = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Numero Exterior');\\n\\t\\t$Vivienda = getCustomFieldByLabel($customFieldsBillingAddress, FORMFIELDS_FORM_BILLING, 'Vivienda');\\n\\t\\t*/\\n\\n\\t\\t$billingAddress = 'order['ordbillfirstname'].'\\\" Apellido=\\\"'.$this->order['ordbilllastname'].'\\\" Direccion1=\\\"'.$this->order['ordbillstreet1'].'\\\" Direccion2=\\\"'.$this->order['ordbillstreet2'].'\\\" Ciudad=\\\"'.$this->order['ordbillsuburb'].'\\\" Pais=\\\"'.$this->order['ordbillcountry'].'\\\" Estado=\\\"'.$this->order['ordbillstate'].'\\\" CP=\\\"'.$this->order['ordbillzip'].'\\\" eMail=\\\"'.$this->order['ordbillemail'].'\\\" Telefono=\\\"'.$this->order['ordbillphone'].'\\\" '.$customFieldsBillingXML.' />';\\n\\n\\t\\t$shippingAddress = \\\"\\\";\\n\\t\\t$cost = 0;\\n\\t\\t// ToDo: Sacar las addresses de un lugar que no dependa de la variable de sesion\\n\\t\\tforeach($_SESSION['QUOTE']->getAllAddresses() as $address) {\\n\\t\\t\\t//logAddNotice('add \\\"'.$address->getId().'\\\" g \\\"'.$address->getGUID().'\\\" type \\\"'.$address->getType().'\\\"');\\n\\t\\t\\tif($address->getType() == ISC_QUOTE_ADDRESS::TYPE_SHIPPING) {\\n\\t\\t\\t\\t$cost += $address->getNonDiscountedBaseShippingCost();\\n\\t\\t\\t\\t$GUID = $GLOBALS['ISC_CLASS_DB']->FetchOne('SELECT GUID FROM [|PREFIX|]intelisis_shipping_addresses WHERE shipid = \\\"'.$address->getCustomerAddressId().'\\\"', 'GUID');\\n\\t\\t\\t\\tif(!$GUID){\\n\\t\\t\\t\\t\\t$GUID = $address->getGUID();\\n\\t\\t\\t\\t\\t//logAddNotice('No hubo GUID. \\\"'.$GUID.'\\\"');\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif(!$GUID) {\\n\\t\\t\\t\\t\\tlogAddNotice('No hay GUID para la direccion de envío del pedido '.$this->orderid);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$customFieldsShippingAddress = $address->getCustomFields();\\n\\t\\t\\t\\t$customFieldsShippingXML = '';\\n\\t\\t\\t\\tforeach($customFieldsShippingAddress as $fieldid => $value){\\n\\t\\t\\t\\t\\t$field = getCustomFieldIdById($fieldid);\\n\\t\\t\\t\\t\\t$label = $field['formfieldlabel'];\\n\\t\\t\\t\\t\\t$label = iconv('UTF-8','ASCII//TRANSLIT',$label);\\n\\t\\t\\t\\t\\t$label = preg_replace(\\\"/[^A-Za-z0-9]|[\\\\s]/\\\", '', $label);\\n\\t\\t\\t\\t\\tif(is_array($value)){\\n\\t\\t\\t\\t\\t\\t$value = implode(',', $value);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t$customFieldsShippingXML .= $label . '=\\\"'.$value.'\\\" ';\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t/*\\n\\t\\t\\t\\t$NoExtEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Numero Exterior'));\\n\\t\\t\\t\\t$ColoniaEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Colonia'));\\n\\t\\t\\t\\t$DelegacionEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Delegacion'));\\n\\t\\t\\t\\t$ViviendaEnvio = $address->getCustomField(getCustomFieldId(FORMFIELDS_FORM_ADDRESS, 'Vivienda'));\\n\\t\\t\\t\\t*/\\n\\t\\t\\t\\t$shippingAddress .= 'getFirstName().'\\\" Apellido=\\\"'.$address->getLastName().'\\\" Direccion1=\\\"'.$address->getAddress1().'\\\" Direccion2=\\\"'.$address->getAddress2().'\\\" Ciudad=\\\"'.$address->getCity().'\\\" Pais=\\\"'.$address->getCountryName().'\\\" Estado=\\\"'.$address->getStateName().'\\\" CP=\\\"'.$address->getZip().'\\\" eMail=\\\"'.$address->getEmail().'\\\" Telefono=\\\"'.$address->getPhone().'\\\" '.$customFieldsShippingXML.' />';\\n\\t\\t\\t\\t//logAddSuccess('sefsefswef.'.$shippingAddress.$IDEnviarA.$address->getCustomerAddressId());\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\tforeach($customFieldsAccount as $fieldid => $field){\\n\\t\\t\\tif($field->record['formfieldisimmutable'] > 0)\\n\\t\\t\\t\\tunset($customFieldsAccount[$fieldid]);\\n\\t\\t}\\n\\t\\t$customFieldsAccountXML = getCustomFieldsAsXMLAttributes($customFieldsAccount);\\n\\n\\t\\t$customer = '';\\n\\n\\t\\t$xml .= $billingAddress.$shippingAddress.$customer. \\\"\\\";\\n\\n\\t\\t$this->xml = $xml;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"706ed312e06d9a1001137f0999247836\",\n \"score\": \"0.47874957\",\n \"text\": \"function __construct() {\\n $this->conexao = Conexao::getInstance();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b85707724dd8e19ba849e497d674a64a\",\n \"score\": \"0.47805414\",\n \"text\": \"public abstract function getService();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61f3897828aea46aeb48d54a833cd9ba\",\n \"score\": \"0.47803566\",\n \"text\": \"public function getCouponByCode($code);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0bc624d912fa4bf65444bef644b0acd\",\n \"score\": \"0.47765297\",\n \"text\": \"public function __construct()\\n {\\n parent::__construct();\\n\\n $this->clientCategoryService = app()->make(ClientCategoryService::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78de0f5f764ee52008096bd84ba797e1\",\n \"score\": \"0.47761735\",\n \"text\": \"public function __construct($class_name = '', $service_name = '') {\\r\\n\\t\\t$this->class_name = $class_name;\\r\\n\\t\\t$this->service_name = $service_name;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3c8b2ef491b80d49583333540f8f8c4\",\n \"score\": \"0.4773977\",\n \"text\": \"abstract protected function getService();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8343ce3c68411cb7886856a98d796fe6\",\n \"score\": \"0.47618508\",\n \"text\": \"public function getCouponForUser()\\n {\\n Stripe::setApiKey(config('services.stripe.secret'));\\n\\n if (count(Spark::plans()) === 0) {\\n abort(404);\\n }\\n\\n try {\\n $customer = StripeCustomer::retrieve(Auth::user()->stripe_id);\\n\\n if ($customer->discount) {\\n return response()->json(\\n Coupon::fromStripeCoupon(\\n StripeCoupon::retrieve($customer->discount->coupon->id)\\n )\\n );\\n } else {\\n abort(404);\\n }\\n } catch (Exception $e) {\\n abort(404);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37f40d8f9c370e402d10ec09947fc9d1\",\n \"score\": \"0.47584057\",\n \"text\": \"protected function getService()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1fa9c7e2c5d596bf0164fd8f1c21522f\",\n \"score\": \"0.4752645\",\n \"text\": \"function DiscountLoggedInConstruct()\\n\\t{\\tparent::DiscountLoggedInConstruct();\\n\\t\\t$this->discount = new AdminDiscountCode($_GET['id']);\\n\\t\\t\\n\\t\\tswitch ($_GET['action']){\\n\\t\\t\\tcase 'list': echo $this->ListOptions($_GET['ptype'], $_GET['prodid'], $_GET['ticketid']);\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase 'select': echo $this->discount->ProductTypeDetails($_GET['ptype'], $_GET['prodid'], true,$_GET['ticketid']);\\n\\t\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2775e1542064fbf89e8def0446a9e4f5\",\n \"score\": \"0.4747898\",\n \"text\": \"function & getService($className) {\\n $className = strtolower($className);\\n // require_once(t3lib_extMgm::extPath('bsg_regsteps').\\\"/services/class.{$className}.php\\\");\\n require_once(dirname( __FILE__ ).\\\"/services/class.{$className}.php\\\");\\n if(!class_exists($className)) {\\n die(\\\"Error: {$className} doesn't exist\\\");\\n }\\n $obj = new $className();\\n return $obj;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32c02fcff520c3518133f4aa0db14cdb\",\n \"score\": \"0.47460642\",\n \"text\": \"public function __construct() {\\n parent::__construct();\\n $this->comissaoService = resolve('App\\\\Modules\\\\Parla\\\\Services\\\\ComissaoService');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5709ab76b6228fce75d6cd2ef968a8f\",\n \"score\": \"0.47451144\",\n \"text\": \"public function __construct(){\\n $options = [\\n 'soap_version' => SOAP_1_1,\\n 'exceptions' => true,\\n 'trace' => 1,\\n 'cache_wsdl' => WSDL_CACHE_NONE,\\n 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP,\\n 'connection_timeout' => 60,\\n 'login' => HTTP_AUTH_1C_USR,\\n 'password' => HTTP_AUTH_1C_PWD\\n ];\\n\\n parent::__construct($_ENV['soapClients_oneC_Registartion_wsdl'], $options);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c8bcb274b9e4607d4d4b8e38519d5ef\",\n \"score\": \"0.4741074\",\n \"text\": \"public function __construct(DiscountCalculatorInterface $discountCalculator)\\n {\\n parent::__construct();\\n\\n $this->discountCalculator = $discountCalculator;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"817d01282a342c0fb162e5ab86b84146\",\n \"score\": \"0.47251222\",\n \"text\": \"public function __construct($reader, &$options = array())\\n {\\n parent::__construct($reader, $options);\\n\\n $data = $this->_reader->read\\n ($this->getOffset() + $this->getSize() -\\n $this->_reader->getOffset());\\n $dataSize = strlen($data);\\n for ($i = 1; $i <= $dataSize; $i++) {\\n $this->_sampleDependencyTypeTable[$i] = array\\n ('sampleDependsOn' => (($tmp = ord($data[$i - 1])) >> 4) & 0x3,\\n 'sampleIsDependedOn' => ($tmp >> 2) & 0x3,\\n 'sampleHasRedundancy' => $tmp & 0x3);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b28353055a7ec8c9c15e262120b66ad\",\n \"score\": \"0.4719737\",\n \"text\": \"public function __construct(ReadPlan $rp)\\n {\\n $this->rp=$rp;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4f4122f7ad1e2e4d2c63a8d0629a784\",\n \"score\": \"0.47187692\",\n \"text\": \"public function __construct()\\n {\\n parent::__construct();\\n\\n if (Input::get('action') == 'generateInvoice')\\n {\\n CrmService::generateInvoice(Input::get('id'), Input::get('type'));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"300e67fa28d1762a93000224ae2ced15\",\n \"score\": \"0.4699765\",\n \"text\": \"public function withCoupon($coupon)\\n {\\n $this->coupon = $coupon;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"300e67fa28d1762a93000224ae2ced15\",\n \"score\": \"0.4699765\",\n \"text\": \"public function withCoupon($coupon)\\n {\\n $this->coupon = $coupon;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65085da665b03973560455ae9f95883e\",\n \"score\": \"0.4694258\",\n \"text\": \"public function __construct()\\n {\\n $config = (object) parse_ini_file(BASE_PATH . '/config/config.ini');\\n //TODO: config class to populate default values\\n if (!isset($config->dbname) || $config->dbname == '') {\\n $config->dbname = 'test';\\n }\\n $this->connection = new PDO(\\\"sqlite:\\\" . BASE_PATH . \\\"/../data/\\\".$config->dbname.\\\".sq3\\\");\\n $this->userMapper = new UserMapper($this->connection);\\n $serviceFactory = new ServiceFactory($this->connection);\\n $this->userService = $serviceFactory->getService(\\\"User\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b87fcf6becae7d7cc014cb3f906b6cd\",\n \"score\": \"0.46905187\",\n \"text\": \"public function __construct()\\n {\\n $this->currency = new Currency(self::CURRENCY);\\n $this->cost = new Money(self::AMOUNT, $this->currency);\\n $this->userEmail = new EmailAddress(self::USER_EMAIL);\\n $this->metaData = [\\n 1 => 'abc',\\n 'a' => 'xyz',\\n ];\\n $this->id = new PaymentId(self::ID);\\n $this->gatewayId = new StripePaymentId(self::GATEWAY_ID);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f320284034765803fe703ace5beef6d\",\n \"score\": \"0.46846375\",\n \"text\": \"public function read() {\\r\\n $rs = $this->connection->read(\\\"name, taxid, address, phone, idcity, city, iduser, `user`, email, contact\\\", \\\"vw_sus_customer\\\", \\\"idcustomer = \\\" . $this->observer->idcustomer);\\r\\n $this->observer->name = $rs->name;\\r\\n $this->observer->taxid = $rs->taxid;\\r\\n $this->observer->address = $rs->address;\\r\\n $this->observer->phone = $rs->phone;\\r\\n $this->observer->city = new \\\\sus\\\\entities\\\\CityEntity($rs->idcity);\\r\\n $this->observer->city->name = $rs->city;\\r\\n $this->observer->user = new \\\\gen\\\\entities\\\\UserEntity($rs->iduser);\\r\\n $this->observer->user->name = $rs->user;\\r\\n $this->observer->user->email = $rs->email;\\r\\n $this->observer->contact = $rs->contact;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b5a0ce3f93a9966a30c785d6615a50d\",\n \"score\": \"0.46808472\",\n \"text\": \"private function __construct() {\\n\\t\\t$this->_applicationName = 'Billing';\\n\\t\\t$this->_backend = new Billing_Backend_BankAccountUsage();\\n\\t\\t$this->_modelName = 'Billing_Model_BankAccountUsage';\\n\\t\\t$this->_currentAccount = Tinebase_Core::getUser();\\n\\t\\t$this->_purgeRecords = FALSE;\\n\\t\\t$this->_doContainerACLChecks = FALSE;\\n\\t\\t$this->_config = isset(Tinebase_Core::getConfig()->billing) ? Tinebase_Core::getConfig()->billing : new Zend_Config(array());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bd7e1c87ccbcfc926a97d837f493508\",\n \"score\": \"0.46760207\",\n \"text\": \"public function __construct() {\\n\\t\\tDebug::mark(__METHOD__);\\n\\t\\t$argv = func_get_args();\\n\\n\\t\\tswitch (func_num_args()) {\\n\\t\\tcase 0:\\n\\t\\t\\tthrow new Exception(\\\"Missing URL.\\\");\\n\\n\\t\\tcase 1:\\n\\t\\t\\t\\tif (is_array($argv[0])) {\\n\\t\\t\\t\\t\\t\\t$this->__serviceURL = $argv[0];\\n\\t\\t\\t\\t\\t\\t$this->__serviceType = array('json'); //Default service type.\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tif (WebTools::isValidUrl($argv[0])) {\\n\\t\\t\\t\\t\\t\\t$this->__serviceURL = $argv[0];\\n\\t\\t\\t\\t\\t\\t$this->__serviceType = array('json'); //Default service type.\\n\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\tthrow new Exception(\\\"'$argv[0]' is not a valid argument.\\\");\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\n\\t\\tcase 2:\\n\\t\\t\\t\\tif (WebTools::isValidUrl($argv[0])) {\\n\\t\\t\\t\\t\\t$this->__serviceURL = $argv[0];\\n\\t\\t\\t\\t\\tswitch ($argv[1]) {\\n\\t\\t\\t\\t\\tcase 'json':\\n\\t\\t\\t\\t\\t\\t\\t$this->__serviceType = array('json');\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\tcase 'xml':\\n\\t\\t\\t\\t\\t\\t\\t$this->__serviceType = array('xml');\\n\\t\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\tdefault: //default file type\\n\\t\\t\\t\\t\\t\\tthrow new Exception(\\\"'$argv[1]' is not a valid type.\\\");\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\tthrow new Exception(\\\"'$argv[0]' is not a valid URL.\\\");\\n\\t\\t\\t\\t}\\n\\t\\t}//end switch\\n\\n\\t\\t$this->__serviceData = $this->__getData($this->__serviceURL);\\n\\t\\t$this->__service = $this->__processData($this->__serviceData);\\n\\t\\tDebug::mark(__METHOD__);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2ba3aea355e3be60776fe41f3f83ae0\",\n \"score\": \"0.4673026\",\n \"text\": \"public function __construct()\\n {\\n $this->cnae = new Cnae();\\n $this->relacao_cnae_cid = new RelacaoCnaeCid();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"837ca7ef7793d9d3cab41682a733b493\",\n \"score\": \"0.46725315\",\n \"text\": \"public function __construct()\\n {\\n $this->vendSrv = new VendService;\\n $this->shopifySvc = new ShopifyService;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be93e10836b69d627faef4fe4c57d2b0\",\n \"score\": \"0.46698558\",\n \"text\": \"public function __construct()\\n {\\n $consumerKey = Config::inst()->get('Suilven\\\\Flickr\\\\Service\\\\FlickrService', 'consumer_key');\\n $consumerSecret = Config::inst()->get('Suilven\\\\Flickr\\\\Service\\\\FlickrService', 'consumer_secret');\\n $token = Config::inst()->get('Suilven\\\\Flickr\\\\Service\\\\FlickrService', 'token');\\n $tokenSecret = Config::inst()->get('Suilven\\\\Flickr\\\\Service\\\\FlickrService', 'token_secret');\\n\\n $metadata = new Metadata($consumerKey, $consumerSecret);\\n $metadata->setOauthAccess($token, $tokenSecret);\\n\\n $this->factory = new ApiFactory($metadata, new GuzzleAdapter());\\n\\n error_log('CK=' . $consumerKey);\\n\\n if (!$consumerKey) {\\n echo \\\"In order to import photographs Flickr key, secret and access token must be provided\\\";\\n die;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"658f0f1854fa6c666fc123e438504ab4\",\n \"score\": \"0.46675527\",\n \"text\": \"public function __construct() {\\n\\t\\t$this->jsonReader = new JsonReader('bookData');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"841f6720626e7c58bc9f04440d4817d7\",\n \"score\": \"0.46635914\",\n \"text\": \"public function __construct()\\n {\\n // inject our services as class properties\\n if ( isset($this->services) && is_array($this->services) ) {\\n foreach ($this->services as $property => $class) {\\n $this->{$property} = new $class;\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca533b6dfe7b37305ddc446e48d0d841\",\n \"score\": \"0.4643062\",\n \"text\": \"public function coupon()\\n {\\n return $this->belongsTo(Coupon::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"852fffa29cb722ec467b5b64023b5746\",\n \"score\": \"0.4635599\",\n \"text\": \"function __construct() \\n {\\n parent::__construct();\\n \\n// $db = new DB($this -> _db);\\n// $this -> _pdo = $db -> getConnected();\\n \\n $this -> _billing = new BillingManager( $this -> _pdo );\\n $this -> _license = new LicenseRecord( $this -> _pdo );\\n $this -> _usersNotes = new UsersNotes( $this -> _pdo );\\n $this -> _gateway = new Gateway();\\n \\n // detected storeID\\n $config = GlobalSettings::getFastSpringConfig();\\n $this -> storeId = $config['storeId'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0d9744171d4a54a853177be6607490a\",\n \"score\": \"0.46348777\",\n \"text\": \"public function __construct($_enhancedCompleteRecoupRequestDetails = NULL)\\r\\n\\t{\\r\\n\\t\\tPayPalWsdlClass::__construct(array('EnhancedCompleteRecoupRequestDetails'=>$_enhancedCompleteRecoupRequestDetails));\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1ad71ece42a169cf413930256001230\",\n \"score\": \"0.46287468\",\n \"text\": \"public function __construct( $coupons = null)\\n {\\n $this\\n ->setCoupons($coupons);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c72cad15f8dd2f19e40efcbd27b2934\",\n \"score\": \"0.46285266\",\n \"text\": \"public function __construct()\\n\\t{\\n\\t\\t\\t\\n\\t\\t// step 1 load the base url from config;\\n\\t\\t$this->base_url = self::getBaseUrlFromConfig();\\n\\t\\t// step 2 load the data from aws dynamodb\\n\\t\\t// if the data isn't found in dynamodb throw an exception\\n\\t\\t// if the data is found in the dynamodb assign the variable, and return the object\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb1a48937616bc0a052a77891092d970\",\n \"score\": \"0.4623088\",\n \"text\": \"public function __construct() {\\n\\t\\t\\n $this->Rate = new Rate;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a56b1b7db6080e0aa32556ceba50421d\",\n \"score\": \"0.46225908\",\n \"text\": \"public function __construct() {\\n \\n /**\\n * Inject the array contained in the configuration file.\\n */\\n $this->_config = require __DIR__ . '/../config/_config.php';\\n \\n /**\\n * The ORM setup.\\n */\\n $this->_db();\\n \\n /**\\n * Force the HTTPS protocol.\\n */\\n $this->_forceHttps();\\n \\n /**\\n * Set the unique order ID or .\\n */\\n $this->_setSku();\\n \\n /**\\n * Set the action.\\n */\\n $this->_setAction();\\n \\n /**\\n * If the exists it sets the master object.\\n */\\n if ($this->_sku) {\\n $this->_setMaster($this->_sku);\\n }\\n \\n /**\\n * If the master object doesn't exist, it triggers an exception\\n * otherwise it sets the registry object.\\n */\\n if ($this->getMaster() === NULL) {\\n $this->_error404();\\n } else {\\n $this->_setRegistry($this->getMaster()->client__id);\\n }\\n \\n /**\\n * If the exists and matches.\\n */\\n if ($this->_action) {\\n if ($this->_action === $this->getConfig('actionsHash')['setItemAsPaid']) {\\n $this->_setItemAsPaid();\\n } else if ($this->_action === $this->getConfig('actionsHash')['setItemAsDead']) {\\n $this->_setItemAsDead();\\n } else {\\n $this->_error404();\\n }\\n }\\n \\n /**\\n * Set the locale and the translations.\\n */\\n $this->_setLocale($this->getRegistry()->locale);\\n \\n /**\\n * Validate and set the paramters needed\\n * by the Stripe checkout.\\n */\\n $this->_setProcessParams();\\n \\n /**\\n * Set the page title.\\n */\\n $this->_setPageTitle();\\n \\n /**\\n * The order is closed.\\n */\\n if ($this->getMaster()->status == self::ITEM_STATUS_CLOSED) {\\n echo $this->_('orderClosed');\\n exit();\\n }\\n \\n /**\\n * If the parameters for the Stripe checkout exists\\n * it processes the transaction.\\n */\\n if ($this->getProcessParams()) {\\n $this->processCheckout();\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e78b1fec2ff8b0c268f68a47de20565\",\n \"score\": \"0.46215734\",\n \"text\": \"public function __construct(OrderService $order_service)\\n {\\n $this->order_service = $order_service;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c0a5af7b2b0ebd245955374dc4b4044\",\n \"score\": \"0.46202555\",\n \"text\": \"public function __construct() {\\n\\t\\tparent::__construct();\\n\\n\\t\\t/** setup PayPal api context **/\\n\\t\\t$paypal_conf = \\\\Config::get('paypal');\\n\\t\\t$this->_api_context = new ApiContext(new OAuthTokenCredential($paypal_conf['client_id'], $paypal_conf['secret']));\\n\\t\\t$this->_api_context->setConfig($paypal_conf['settings']);\\n\\t\\t$this->Currency = 'USD';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54be12a4399018a210a78d628b8ce348\",\n \"score\": \"0.4620236\",\n \"text\": \"public function __construct()\\n {\\n // Load the PayPal Checkout API\\n Loader::load(dirname(__FILE__) . DS . 'lib' . DS . 'paypal_checkout_api.php');\\n\\n // Load configuration required by this gateway\\n $this->loadConfig(dirname(__FILE__) . DS . 'config.json');\\n\\n // Load components required by this gateway\\n Loader::loadComponents($this, ['Input']);\\n\\n // Load the language required by this gateway\\n Language::loadLang('paypal_checkout', null, dirname(__FILE__) . DS . 'language' . DS);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d70f2760b5091d96d46b6c86ff6ab29\",\n \"score\": \"0.46188328\",\n \"text\": \"function __construct( &$reader )\\n\\t{\\n\\t\\tparent::__construct( $reader );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"589e098df6954fb6495d04321a49c978\",\n \"score\": \"0.46161368\",\n \"text\": \"public function __construct()\\n {\\n //Novalnet Basic parameters\\n $this->assignUtilities();\\n $this->_vendorId = $this->_getConfigData('merchant_id', true);\\n $this->_authcode = $this->_getConfigData('auth_code', true);\\n $this->_productId = $this->_getConfigData('product_id', true);\\n $this->_tariffId = $this->_getConfigData('tariff_id', true);\\n $this->_referrerId = $this->_getConfigData('referrer_id', true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9427c022fb64043594081822c99ec5cf\",\n \"score\": \"0.46160454\",\n \"text\": \"public function __construct()\\n {\\n try {\\n // using guzzle\\n $this->data->data = new stdClass();\\n $this->data->fulfillment = new stdClass();\\n\\n $this->headers = array(\\n 'Content-Type: application/json'\\n );\\n /*\\n\\n $this->endpoint = config('woocommerce.store_url');\\n $this->headers = [\\n 'header_total' => config('woocommerce.header_total') ?? 'X-WP-Total',\\n 'header_total_pages' => config('woocommerce.header_total_pages') ?? 'X-WP-TotalPages',\\n ];\\n\\n $this->woocommerce = new Client(\\n $this->endpoint,\\n config('woocommerce.store_url'),\\n config('woocommerce.consumer_key'),\\n config('woocommerce.consumer_secret'),\\n [\\n 'version' => 'wc/'.config('woocommerce.api_version'),\\n 'wp_api' => config('woocommerce.wp_api_integration'),\\n 'verify_ssl' => config('woocommerce.verify_ssl'),\\n 'query_string_auth' => config('woocommerce.query_string_auth'),\\n 'timeout' => config('woocommerce.timeout'),\\n ]\\n );\\n */\\n } catch (\\\\Exception $e) {\\n throw new \\\\Exception($e->getMessage(), 1);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c21c69ee4af4a5890382cc61c7b66163\",\n \"score\": \"0.46133235\",\n \"text\": \"public function __construct(array $options = []){\\n //will figure out how the fuck to add this to the SLIM APP\\n $dotenv = new Dotenv(__DIR__.\\\"/../../\\\");\\n $dotenv->load();\\n\\n\\t\\t/*\\n * signature for wooclient\\n url\\n consumer key\\n private key\\n options - array\\n */\\n\\t\\t\\n\\t\\t$this->theClient = new Client(\\n\\t\\tgetenv(\\\"Site_Url\\\"),\\n\\t\\tgetenv(\\\"Consumer_Key\\\"),\\n\\t\\tgetenv(\\\"Consumer_Secret\\\"),\\n\\t\\t$options\\n\\t\\t);\\n\\t\\t\\n\\t\\t\\n\\t\\treturn $this->theClient;\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"402637be4a04b42eff436f74be72901f\",\n \"score\": \"0.46087006\",\n \"text\": \"public function __construct()\\n\\t{\\n\\t\\tparent::__construct();\\n\\n\\t\\t$this->entity = app()->make(Payment::class);\\n\\n\\t\\t$this->interval = QuickBooks::getQuickBookSyncChangesInterval();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e98d5c9d2aa71d0920355dc3a32a2d34\",\n \"score\": \"0.46065676\",\n \"text\": \"public function __construct()\\n {\\n\\n /** PayPal api context **/\\n $paypal_conf = \\\\Config::get('paypal');\\n $this->_api_context = new ApiContext(new OAuthTokenCredential(\\n $paypal_conf['client_id'],\\n $paypal_conf['secret'])\\n );\\n $this->_api_context->setConfig($paypal_conf['settings']);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5553fc0cea69bbcde918fe23cf7003de\",\n \"score\": \"0.46060827\",\n \"text\": \"public function __construct(){\\n $arquivo = file_get_contents(CLASS_DIR.'MC/Cliente/Storage/clientes.json');\\n $arrayClientes = json_decode($arquivo);\\n foreach ($arrayClientes->items->item as $cli) {\\n\\n if (isset($cli->cnpj)){\\n $cliente = new PessoaJuridica();\\n $cliente->setCnpj($cli->cnpj);\\n }else{\\n $cliente = new PessoaFisica();\\n $cliente->setCpf($cli->cpf);\\n }\\n\\n $cliente->setNome($cli->nome)\\n ->setIdade($cli->idade)\\n ->setCep($cli->cep)\\n ->setEndereco($cli->endereco)\\n ->setNumero($cli->numero)\\n ->setComplemento($cli->complemento)\\n ->setBairro($cli->bairro)\\n ->setCidade($cli->cidade)\\n ->setEstado($cli->estado)\\n ->setImportancia($cli->importancia);\\n\\n $this->clientes[$cli->nome] = $cliente->getDados();\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c3ed7a998c073b042ea587a081bba2a\",\n \"score\": \"0.4602168\",\n \"text\": \"public function __construct(CardsService $service)\\n {\\n parent::__construct();\\n\\n $this->service = $service;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9ec4d75c7580142fb268e313a5a9494\",\n \"score\": \"0.46009326\",\n \"text\": \"public function __construct()\\n {\\n $this->middleware('auth', ['only' => [\\n 'getCouponForUser',\\n ]]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e27b00e4327ea3aa07aada15851dea5f\",\n \"score\": \"0.45973927\",\n \"text\": \"public function index()\\n {\\n $coupons = Coupon::filter()->paginate();\\n\\n return CouponResource::collection($coupons);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e44169f4ff4f5c6022124ccac69d8e2e\",\n \"score\": \"0.45907858\",\n \"text\": \"public function __construct() {\\n\\t\\t$this->CI = &get_instance();\\n\\t\\t\\n\\t\\t$this->CI->config->load('bitcoin', TRUE);\\n\\t\\t$this->config = $this->CI->config->item('bitcoin');\\t\\n\\n\\t\\t$this->CI->load->library('jsonrpcclient', $this->config);\\n\\t\\t$this->CI->load->model('bitcoin_model');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b6ec8cbc3280c5a47302a84ca47ec35\",\n \"score\": \"0.4577877\",\n \"text\": \"protected function _construct()\\n {\\n $this->_init(\\n Model\\\\Counter::class,\\n Model\\\\ResourceModel\\\\Counter::class\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2786b55ca06b63e4a513c85a320f95f6\",\n \"score\": \"0.45754242\",\n \"text\": \"public function init() {\\n $this->_service = new stdClass();\\n $this->_service->baseurl = trim(get_config('blocks/intelligent_learning', 'ilpapi_url'));\\n $connectionid = trim(get_config('blocks/intelligent_learning', 'ilpapi_connectionid'));\\n $connectionpassword = trim(get_config('blocks/intelligent_learning', 'ilpapi_connectionpassword'));\\n $this->_service->auth_header = $this->build_service_header($connectionid, $connectionpassword);\\n $this->_service->is_ca_authority = trim(get_config('blocks/intelligent_learning', 'ilpapi_issslcaauthority'));\\n $this->_service->cert_path = trim(get_config('blocks/intelligent_learning', 'ilpapi_certpath'));\\n\\n $this->_service->curldefaults = $this->get_curl_defaults();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4bfd74f33471568ce8dae7d14e12481\",\n \"score\": \"0.4568178\",\n \"text\": \"public function __construct() {\\n $this->availabilityManager = \\\\Drupal::service('commerce.availability_manager');\\n $this->currentStore = \\\\Drupal::service('commerce_store.store_context')->getStore();\\n $this->stockAvailabilityChecker = \\\\Drupal::service('commerce_stock.availability_checker');\\n $this->stockServiceManager = \\\\Drupal::service('commerce_stock.service_manager');\\n $this->localStockChecker = \\\\Drupal::service('commerce_stock.local_stock_service')->getStockChecker();\\n $this->localStockUpdater = \\\\Drupal::service('commerce_stock.local_stock_service')->getStockUpdater();\\n $this->variationStorage = \\\\Drupal::service('entity_type.manager')->getStorage('commerce_product_variation');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"076cf50a06939bb681c6dc066b3ba5b2\",\n \"score\": \"0.45672846\",\n \"text\": \"function __construct($cocktailId) {\\n\\t $cocktail = $this->getCocktail($cocktailId);\\n\\n\\t // Assign values to object instance\\n\\n\\t $this->name = $cocktail[\\\"name\\\"];\\n\\t $this->instructions = $cocktail[\\\"instructions\\\"];\\n\\t $this->image = $cocktail[\\\"image\\\"];\\n\\n\\t // Get cocktail ingredients from database and assign\\n\\t $this->ingredients = $this->getCocktailIngredients($cocktailId);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42d0c72e7b12ffb8a71d46049ff60ee2\",\n \"score\": \"0.45599455\",\n \"text\": \"public function __construct()\\n {\\n $this->defaultLang = env('SCRAPER_LOCALIZATION', 'en');\\n $this->siteCountry = env('SCRAPER_COUNTRY', 'sa'); \\n\\n $this->sourceUrl = 'https://'.$this->siteCountry.'.pricena.com';\\n\\n $this->client = new Client();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3caf1ba362f42c87ad601982f97f8c9\",\n \"score\": \"0.45569065\",\n \"text\": \"public function getService();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3caf1ba362f42c87ad601982f97f8c9\",\n \"score\": \"0.45569065\",\n \"text\": \"public function getService();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3caf1ba362f42c87ad601982f97f8c9\",\n \"score\": \"0.45569065\",\n \"text\": \"public function getService();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb3eb9d45ce59d6ff76e6f40bf7ed782\",\n \"score\": \"0.45536065\",\n \"text\": \"public function __construct(Cancellation $cancellation)\\n {\\n $this->cancellation = $cancellation;\\n $this->order = $cancellation->order;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a9664d9d2f30b05ee95ac01c49bc787\",\n \"score\": \"0.45510906\",\n \"text\": \"public function __construct()\\n {\\n $this->counterparty = new Client(config('bitcorn.cp.api'));\\n $this->counterparty->authentication(config('bitcorn.cp.user'), config('bitcorn.cp.password'));\\n\\n parent::__construct();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e34a4a6e58892b2e626a9f662efa7bc\",\n \"score\": \"0.45455423\",\n \"text\": \"public function __construct()\\n {\\n $this->client = new Client([\\n 'base_uri' => $this->base_uri\\n ]);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":747,"cells":{"query_id":{"kind":"string","value":"1d3c3a5ce2d9c4971dd4027cd5c8a9ff"},"query":{"kind":"string","value":"Page Data Rendering event"},"positive_passages":{"kind":"list like","value":[{"docid":"70098260caf46ec2d24e675ca9db27ad","score":"0.0","text":"function Page_DataRendering(&$header) {\n\n\t\t// Example:\n\t\t//$header = \"your header\";\n\n\t}","title":""}],"string":"[\n {\n \"docid\": \"70098260caf46ec2d24e675ca9db27ad\",\n \"score\": \"0.0\",\n \"text\": \"function Page_DataRendering(&$header) {\\n\\n\\t\\t// Example:\\n\\t\\t//$header = \\\"your header\\\";\\n\\n\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"05506e5950f68b2a1e4d6c4e5d49222b","score":"0.7066581","text":"public function renderPage();","title":""},{"docid":"959baae0e4bb1d899a2bc054ba1fa016","score":"0.67980355","text":"protected function initPageRenderer() {}","title":""},{"docid":"959baae0e4bb1d899a2bc054ba1fa016","score":"0.67974484","text":"protected function initPageRenderer() {}","title":""},{"docid":"9295251feffbcaafed807c6edffb1cc5","score":"0.67871046","text":"public function renderData();","title":""},{"docid":"1d78b355affa13c3e25e15462f45a2a9","score":"0.6756407","text":"public function generatePage_postProcessing() {}","title":""},{"docid":"d345cb48d834a4c0d34e55822244687d","score":"0.6742592","text":"public function drawPage()\n\t\t{\n\t\t}","title":""},{"docid":"1fa42c7a86160ab93c4b407c65328322","score":"0.6711823","text":"abstract public function onAfterRender();","title":""},{"docid":"559c44bff75595391c07a176a9c3ebe8","score":"0.6664751","text":"abstract function render_page();","title":""},{"docid":"b322ea6d55d8c13cad4361105310bf14","score":"0.6566766","text":"protected function getPageRenderer() {}","title":""},{"docid":"a4f1838cf2eaf96921e09a7d97639522","score":"0.64949924","text":"abstract protected function render_page_content(): void;","title":""},{"docid":"a98f867c14dd2639ba4b4de03baf42e9","score":"0.6487174","text":"protected function prepareRendering() {}","title":""},{"docid":"9201755c396fd80b4a041efa379b9203","score":"0.64719206","text":"public function generatePage_preProcessing() {}","title":""},{"docid":"111a345c3d4f850431d008b8595d0d36","score":"0.6445193","text":"protected function collectPageData()\n {\n $currentPage = $this->pageManager->getCurrentPage();\n\n if (!is_null($currentPage)) {\n $this->data['currentPage'] = array(\n 'name' => $currentPage->getName(),\n 'type' => $currentPage->getType(),\n );\n $this->data['cache'] = array(\n 'enabled' => $this->cacheEnabled,\n 'private' => $currentPage->getCachePrivate(),\n 'max_age' => $currentPage->getCacheMaxAge(),\n 'shared_max_age' => $currentPage->getCacheSharedMaxAge(),\n 'must_revalidate' => $currentPage->getCacheMustRevalidate(),\n 'last_modified' => $currentPage->getLastCacheModifiedDate()\n );\n }\n }","title":""},{"docid":"a515521046c2dbcb578171a7696cd9ea","score":"0.6391249","text":"public function onPageLoaded($page);","title":""},{"docid":"b30e83554a2bea01573f96d03092d605","score":"0.63276374","text":"public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }","title":""},{"docid":"b30e83554a2bea01573f96d03092d605","score":"0.63276374","text":"public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }","title":""},{"docid":"9a803a71bd296bb1be4dcebb6bdc6d88","score":"0.6323813","text":"protected function callRenderHook() {}","title":""},{"docid":"0e02b8585e97c28bfb7459124a551c27","score":"0.63140345","text":"public function render() {\n\t\t$this->render_page_content();\n\t}","title":""},{"docid":"1f1a9de3c2afa643f251083d856bfd50","score":"0.6298689","text":"public function onPageFormatted($page);","title":""},{"docid":"9385a325eec0cab7d39eb74857255fd5","score":"0.6296541","text":"public function render() {\n \t\tif (isset($_GET['eventId']) )\n\t\t\t$this->allElements[$_GET['eventId']]->callOnClickPreRenderFn();\n\n\t\tparent::render();\n \t\t\n\t\tif (isset($_GET['eventId']) )\n\t\t\t$this->allElements[$_GET['eventId']]->callOnClickPostRenderFn();\n\n\t}","title":""},{"docid":"7de235ecfc7eca5d03e273e0e0020725","score":"0.6262846","text":"function onAfterRender()\n\t{\n\t}","title":""},{"docid":"0a6ae6cc9fcaf41a934ffa6c42bed4e4","score":"0.6224796","text":"public function getPageRenderer() {}","title":""},{"docid":"0a6ae6cc9fcaf41a934ffa6c42bed4e4","score":"0.62230194","text":"public function getPageRenderer() {}","title":""},{"docid":"81e32f1f9aa94033f67e899691f77015","score":"0.62028027","text":"public function onPreRender() {\n\t\t$this->view->register('events', $this->events);\n\t\t$this->view->register('delta', $this->delta);\n\t\t$this->view->register('result', $this->result);\n\t}","title":""},{"docid":"a73f9160357d5cfbeea416542aa2cae0","score":"0.6184399","text":"public function pageChanged($sender,$param)\n {\nPrado::trace('PAGER '.$param->NewPageIndex.' '. get_class($param),'Json');\n // if ($this->Page->IsCallback && !($param instanceof TCallbackEventParameter))\n // {\n // return;\n //}\n\n\n\t\t//$this->populateData($param->NewPageIndex);\n $this->Repeater->DataSource = $this->getProducts(true);\n $this->Repeater->CurrentPageIndex=$param->NewPageIndex;\n \t $this->Repeater->dataBind();\n\n //$this->Pager->render($param->getNewWriter());\n // $this->broadcastEvent('OnOrderChanged', $this, $param);\n\n }","title":""},{"docid":"683729ba620ccfb808b0f281e9cd2992","score":"0.615766","text":"private function render()\r\n {\r\n \r\n }","title":""},{"docid":"1df3de469c1830344aeb0367e4eb6f2e","score":"0.6151105","text":"public function beforerender() {\n parent::beforeRender();\n $this->Meta->data();\n }","title":""},{"docid":"f5de2a31e1c10b1a8a83e850e8574901","score":"0.6134922","text":"protected function executePreRenderHook() {}","title":""},{"docid":"3d806f132ccd1123d8fc76c64242be00","score":"0.6126794","text":"public function prePageContent();","title":""},{"docid":"d656a52f5cf841ec5a75ce95465c8e67","score":"0.61212707","text":"public function render($pdf, $page, $data=null);","title":""},{"docid":"887730797247065c2d05028dc6d809d2","score":"0.6081925","text":"public function pageDataRendering(&$header)\n {\n // Example:\n //$header = \"your header\";\n }","title":""},{"docid":"887730797247065c2d05028dc6d809d2","score":"0.6081925","text":"public function pageDataRendering(&$header)\n {\n // Example:\n //$header = \"your header\";\n }","title":""},{"docid":"35d4d8a45cf1ff8ab8a15329bb47522d","score":"0.6067003","text":"function onRenderWidget();","title":""},{"docid":"3d2d0662379f73703a89e0041e3827ed","score":"0.60550386","text":"function onBeforeRender()\n\t{\n\t}","title":""},{"docid":"2847e684c6d77a596ea4cf9e4ad30b01","score":"0.6049237","text":"abstract public function onBeforeRender($output);","title":""},{"docid":"69312756ca7a56d05547bcba50d16097","score":"0.6025232","text":"public function onPageContentProcessed(Event $event)\n {\n $page = $event['page'];\n $config = $this->mergeConfig($page);\n\n // get current rendered content\n $content = $page->getRawContent();\n // replace marker(s) with Google map object(s)\n $page->setRawContent($this->processMarkdownContent($content, $config));\n\n // set this page's assets that where dynamically generated\n $this->setAssetsFromData();\n }","title":""},{"docid":"2f00bcab39a1f3d2887730bcea5d1248","score":"0.6015301","text":"public function on_before_render()\n {\n $this->addFooterItem('');\n }","title":""},{"docid":"218a23e5a7d5949f49ed46c0ef298e6e","score":"0.6005928","text":"protected function callRenderMethod() {}","title":""},{"docid":"0f70798957e1466122166b9a7001d868","score":"0.59947467","text":"function pagecreate()\r\n {\r\n $output = parent::pagecreate().\"\\n\";\r\n\r\n $output .= $this->_getJavascriptVar() . \" = document.getElementById('\" . $this->getName() . \"').getContext('\" . $this->getContext() . \"');\\n\";\r\n\r\n //Fire the event, if any\r\n if ($this->_jsonpaint != '')\r\n $output .= $this->_jsonpaint . \"(\" . $this->_getJavascriptVar() .\");\\n\";\r\n\r\n // bind standart events\r\n $output .= $this->bindJSEvent('click');\r\n $output .= $this->bindJSEvent('dblclick');\r\n $output .= $this->bindJSEvent('drag');\r\n $output .= $this->bindJSEvent('dragend');\r\n $output .= $this->bindJSEvent('dragenter');\r\n $output .= $this->bindJSEvent('dragleave');\r\n $output .= $this->bindJSEvent('dragover');\r\n $output .= $this->bindJSEvent('dragstart');\r\n $output .= $this->bindJSEvent('drop');\r\n $output .= $this->bindJSEvent('mousedown');\r\n $output .= $this->bindJSEvent('mousemove');\r\n $output .= $this->bindJSEvent('mouseout');\r\n $output .= $this->bindJSEvent('mouseover');\r\n $output .= $this->bindJSEvent('mouseup');\r\n $output .= $this->bindJSEvent('mousewheel');\r\n $output .= $this->bindJSEvent('scroll');\r\n $output .= $this->bindJSEvent('keydown');\r\n $output .= $this->bindJSEvent('keypress');\r\n $output .= $this->bindJSEvent('keyup');\r\n\r\n return $output;\r\n }","title":""},{"docid":"1bbd0957747c342f7d7f1aae280f5394","score":"0.59912163","text":"function render() ;","title":""},{"docid":"0a220ddaf6b5f45b4c109b19f4899bca","score":"0.59862673","text":"public function render() {\n $vars = array('page' => &$this);\n // Page complete.\n $this->env->hook('page_render', $vars);\n return $this->html;\n }","title":""},{"docid":"894a66442d5a74fe98b9125a68cf5354","score":"0.59658414","text":"public function onRun()\n {\n $this->page['tagPage'] = $this->property('tagPage');\n $this->page['tagPageSlug'] = $this->paramName('tagPageSlug');\n $this->page['tagsPage'] = $this->property('tagsPage');\n $this->page['tagsPageSlug'] = $this->paramName('tagsPageSlug');\n }","title":""},{"docid":"5b4be11b3339247b5378942a29f0b348","score":"0.59639335","text":"public function mainPage()\r\n {\r\n // $this->process();(Finished) https://eurodairy.eu/resources/two-webinars-on-the-principles-of-biodiversity/\r\n // $this->getData();\r\n $this->template();\r\n }","title":""},{"docid":"58ea1f8d17b191aac97e36d0745ee19e","score":"0.59612435","text":"function _render_pages($view, $data=null)//I think this makes more sense\n\t{\n\t\t$user=$this->ion_auth->user()->row();\n\t\t$this->viewdata = (empty($data)) ? $this->data: $data;\n\t\t$this->viewdata['user'] = $this->ion_auth->user($this->session->userdata('user_id'))->row();\n\t\t$this->viewdata['application_count']=$this->application_model->myapps_process($this->session->userdata('user_id'));\n\t\t$this->viewdata['recent_messages']=$this->messages_model->get_new_messages('5');\n\t\t$this->viewdata['recent_normal_count']=$this->application_model->recent_count_normal();\n\t\t$this->viewdata['recent_immediate_count']=$this->application_model->recent_count_immediate();\n\t\t$this->viewdata['recent_urgent_count']=$this->application_model->recent_count_urgent();\n\t\t$this->_render_page('templates/header', $this->viewdata);\n\t\t$this->_render_page('templates/header_main', $this->viewdata);\n\t\t$this->_render_page($view, $this->viewdata);\n\t\t$this->_render_page('templates/footer_main', $this->viewdata);\n\t\t$this->_render_page('templates/footer', $this->viewdata);\n\t}","title":""},{"docid":"06f5f6ee7bae4b76c7d87010e656b39a","score":"0.5941234","text":"private function runPage(){\n list($source, $formOptions, $logStatus, $tableData, $recordData, $group, $studentSchools, $tableSource, $studentData) = $this->model->preparePageContent($this->nav);\n print $this->view->pageView($source, $formOptions, $logStatus, $tableData, $this->url, $recordData, $group, $studentSchools, $tableSource, $studentData);\n }","title":""},{"docid":"e218326604fe9d990fa36376a4130f98","score":"0.5937778","text":"protected function render() {}","title":""},{"docid":"e218326604fe9d990fa36376a4130f98","score":"0.5937778","text":"protected function render() {}","title":""},{"docid":"0da85f13b7cd1c7b46864f45092f20ea","score":"0.59375167","text":"public function process()\n\t{\n\t\t$this->_init();\n\t\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\n\n\t\t$this->_handle_forms();\n\t\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\n\n\t\t$this->_pre_render();\n\t\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\n\n\t\t$this->render();\n\t}","title":""},{"docid":"e218326604fe9d990fa36376a4130f98","score":"0.5937463","text":"protected function render() {}","title":""},{"docid":"31be1e5f96145c948d424907e30885ad","score":"0.593607","text":"function _render( $data )\n\t{\n\t\t$params = array(\n\t\t\t\t'data' => $data,\n\t\t\t\t'format' => 'htmlbody',\n\t\t\t);\n\n\t\t#echo '
    ';\n\n\t\t#$before = $params['data'];\n\n\t\t$this->Plugin->RenderItemAsHtml( $params );\n\n\t\t#pre_dump( $before, $params['data'] );\n\n\t\treturn $params['data'];\n\t}","title":""},{"docid":"bd71921536c135a23b8575951fdff1d7","score":"0.5932942","text":"public function render()\n {\n //Attempt to handle any `POST`ed data that may be arriving at the page controller. If _processPostRequest\n //returns true, then simply return because the user will be redirected\n if($_SERVER['REQUEST_METHOD'] === 'POST' && $this->_processPostRequest()) {\n return;\n }\n\n $this->_recordPageView('/app/');\n if (IS_PRODUCTION)\n {\n $this->_renderProduction();\n }\n else if (IS_STAGING)\n {\n $this->_renderStaging();\n }\n else if (IS_DEVELOPMENT || IS_REFERENCE)\n {\n $this->_renderNonProduction();\n }\n else\n {\n throw new \\Exception('Somehow you got into the page controller without setting the appropriate define.');\n }\n }","title":""},{"docid":"b497e7903265920e7274ba3f162609f5","score":"0.59106773","text":"public function render($data);","title":""},{"docid":"2c3ecd703a19a6fbb90eefbce1fbe687","score":"0.5910639","text":"public function onSinglePageLoaded(array &$pageData)\n {\n $this->triggerEvent('get_page_data', array(&$pageData, $pageData['meta']));\n }","title":""},{"docid":"8aca34216e749fb937082071e568d7db","score":"0.5908648","text":"function beforeRender(){\n\t\t$this->recordActivity();\n\t}","title":""},{"docid":"f46bc0dae36fc6c47a1ba85a958b02f2","score":"0.5895403","text":"abstract protected function renderComplete();","title":""},{"docid":"27a7fbbfb667df8500d612a43f3187c2","score":"0.5890063","text":"public function preRender()\n {\n }","title":""},{"docid":"2b53bafabf36b5dccc947043813557b6","score":"0.58825797","text":"abstract protected function RenderContent();","title":""},{"docid":"b435c6100c8803916caae58ba6fd7055","score":"0.5877018","text":"public function before_render() {}","title":""},{"docid":"8c0fecaff1c7dadf848da61c7d56eec6","score":"0.5876451","text":"function render_callback() {\n\t\t$callback = NULL === $this->render_callback\n\t\t\t? array( $this, 'render_page' )\n\t\t\t: $this->render_callback;\n\n\t\tcall_user_func( $callback, $this );\n\t}","title":""},{"docid":"0c4e1edb1f33bf7af9d951e792f59167","score":"0.5841998","text":"protected function afterRender() {\n\t}","title":""},{"docid":"5a0954e43ca772bead0d006e0bc12b09","score":"0.5838147","text":"function redcap_every_page_before_render($project_id=null) {\n global $DDP, $project_id, $realtime_webservice_type;\n try {\n $page = PAGE ?: false;\n switch ($page) {\n case 'DynamicDataPull/fetch.php':\n // check if we are using a FHIR enabled project\n if($realtime_webservice_type != \"FHIR\") throw new \\Exception(\"This service is only available for FHIR endpoints\", 1); // exit if not FHIR\n // use a proxy to intercept the MRN and run custom code. also pass a reference to the module\n $ddp_proxy = new DynamicDataPullProxy($project_id, $realtime_webservice_type, $module=$this);\n $DDP = $ddp_proxy;\n break;\n \n case 'DataMartController:runRevision':\n $params = (object)$_POST;\n $mrn = $params->mrn ?: false;\n if(!$mrn) throw new \\Exception(\"Please provide an MRN to check the MyChart status\", 400);\n $response = $this->fetchMyChartData($mrn);\n $data = json_decode($response); //decode the response\n $record_id = $this->findRecordId($project_id, $mrn);\n if(empty($record_id)) throw new \\Exception(\"Cannot save MyChart status: no record ID found\", 400);\n $this->setMyChartStatus($project_id, $record_id, $data);\n break;\n \n default:\n break;\n }\n } catch (\\Exception $e) {\n $message = $e->getMessage();\n $code = $e->getCode();\n \\Logging::logEvent( \"\", \"mychart_lookup\", \"OTHER\", $display=null, $code, $message );\n }\n }","title":""},{"docid":"8d8e559d083bd87eafeacb6ef4cbb8e8","score":"0.5820585","text":"protected function render() {\n\t\t\n\t}","title":""},{"docid":"572053bf746884eefc32bd7d54f802d7","score":"0.58194965","text":"public function renderPage(): void\n {\n $starttime = microtime(true);\n if (!$this->options->render_body_only) {\n ?>\n options->document_type; ?>>\n options->uses_angular) {\n ?>\n \n \n \n \n renderHead();\n $this->renderBody($starttime);\n ?>\n \n renderHead();\n ?>\n \n renderContent();\n }\n }","title":""},{"docid":"4eee339dc14ba4d5a4bff307c71bab5f","score":"0.5817889","text":"public function postPageGeneration(OutputObjectInterface $page);","title":""},{"docid":"addf81c65fcf27bd1c36377e26933662","score":"0.58098084","text":"public function renderContent() {}","title":""},{"docid":"a3be1518b2ac6a1e6501b66e51e844ca","score":"0.58096135","text":"public function onRun()\n {\n $this->page['categoryPage'] = $this->property('categoryPage');\n $this->page['categoryPageSlug'] = $this->paramName('categoryPageSlug');\n $this->page['categoriesPage'] = $this->property('categoriesPage');\n $this->page['categoriesPageSlug'] = $this->paramName('categoriesPageSlug');\n }","title":""},{"docid":"2ebc0866c4c45a31dbe91f8992aa2a11","score":"0.5786704","text":"private function _page(){\n\t\t$this->data['recent_news'] = $this->article_m->get_recent();\n// \t\tdump(\"Welcome from the Page template\");\n\t}","title":""},{"docid":"6ede7b3a0f1c983cf89fbda91d37fac0","score":"0.57748544","text":"function draw_page(){\n\t\tif ($this->preprocess()){\n\t\t\t\n\t\t\tif ($this->window_dressing)\n\t\t\t\techo $this->get_header();\n\n\t\t\t$fn = $this->content_function;\n\t\t\techo $this->$fn();\n\n\t\t\tif ($this->window_dressing)\n\t\t\t\techo $this->get_footer();\n\n\t\t\tforeach($this->scripts as $s_url => $s_type){\n\t\t\t\tprintf('',\n\t\t\t\t\t$s_type, $s_url);\n\t\t\t\techo \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$js_content = $this->javascript_content();\n\t\t\tif (!empty($js_content) || !empty($this->onload_commands)){\n\t\t\t\techo '';\n\t\t\t}\n\n\t\t\t$page_css = $this->css_content();\n\t\t\tif (!empty($page_css)){\n\t\t\t\techo '';\n\t\t\t}\n\t\t\tforeach($this->css_files as $css_url){\n\t\t\t\tprintf('',\n\t\t\t\t\t$css_url);\n\t\t\t\techo \"\\n\";\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"19df50a2d6590e0bfdc0ea05d6bae34b","score":"0.5764835","text":"protected function render() {\n\n\n\t}","title":""},{"docid":"2f12a2e0de0035b61f8c50b4d321a9f4","score":"0.57633114","text":"protected function setupPage() {}","title":""},{"docid":"1dbe251f7ae25139243c2d0f7fc8a79c","score":"0.5747946","text":"protected function render()\n {\n }","title":""},{"docid":"64ea038eccb555d0d56d2f0d52015a08","score":"0.5747361","text":"function _display($data) {\r\n\t\t// Customize by overriding this function in the child class\r\n\t\t$this->load->view('header', $data);\r\n\t\t$this->load->view('${page.id.toLowerCase()}', $data);\r\n\t\t$this->load->view('footer', $data);\r\n\t}","title":""},{"docid":"1dbe251f7ae25139243c2d0f7fc8a79c","score":"0.5747033","text":"protected function render()\n {\n }","title":""},{"docid":"1dbe251f7ae25139243c2d0f7fc8a79c","score":"0.5747033","text":"protected function render()\n {\n }","title":""},{"docid":"1dbe251f7ae25139243c2d0f7fc8a79c","score":"0.5746868","text":"protected function render()\n {\n }","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"08a9fba77985623ce568b66d844e626f","score":"0.57449245","text":"function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}","title":""},{"docid":"8ee1a60d986761ac9687218c8b52a04d","score":"0.57440424","text":"protected function executeRenderPostTransformHook() {}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""},{"docid":"1a11dcd15c9fde24210111a6346a431b","score":"0.57439303","text":"function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}","title":""}],"string":"[\n {\n \"docid\": \"05506e5950f68b2a1e4d6c4e5d49222b\",\n \"score\": \"0.7066581\",\n \"text\": \"public function renderPage();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"959baae0e4bb1d899a2bc054ba1fa016\",\n \"score\": \"0.67980355\",\n \"text\": \"protected function initPageRenderer() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"959baae0e4bb1d899a2bc054ba1fa016\",\n \"score\": \"0.67974484\",\n \"text\": \"protected function initPageRenderer() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9295251feffbcaafed807c6edffb1cc5\",\n \"score\": \"0.67871046\",\n \"text\": \"public function renderData();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d78b355affa13c3e25e15462f45a2a9\",\n \"score\": \"0.6756407\",\n \"text\": \"public function generatePage_postProcessing() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d345cb48d834a4c0d34e55822244687d\",\n \"score\": \"0.6742592\",\n \"text\": \"public function drawPage()\\n\\t\\t{\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1fa42c7a86160ab93c4b407c65328322\",\n \"score\": \"0.6711823\",\n \"text\": \"abstract public function onAfterRender();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"559c44bff75595391c07a176a9c3ebe8\",\n \"score\": \"0.6664751\",\n \"text\": \"abstract function render_page();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b322ea6d55d8c13cad4361105310bf14\",\n \"score\": \"0.6566766\",\n \"text\": \"protected function getPageRenderer() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4f1838cf2eaf96921e09a7d97639522\",\n \"score\": \"0.64949924\",\n \"text\": \"abstract protected function render_page_content(): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a98f867c14dd2639ba4b4de03baf42e9\",\n \"score\": \"0.6487174\",\n \"text\": \"protected function prepareRendering() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9201755c396fd80b4a041efa379b9203\",\n \"score\": \"0.64719206\",\n \"text\": \"public function generatePage_preProcessing() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"111a345c3d4f850431d008b8595d0d36\",\n \"score\": \"0.6445193\",\n \"text\": \"protected function collectPageData()\\n {\\n $currentPage = $this->pageManager->getCurrentPage();\\n\\n if (!is_null($currentPage)) {\\n $this->data['currentPage'] = array(\\n 'name' => $currentPage->getName(),\\n 'type' => $currentPage->getType(),\\n );\\n $this->data['cache'] = array(\\n 'enabled' => $this->cacheEnabled,\\n 'private' => $currentPage->getCachePrivate(),\\n 'max_age' => $currentPage->getCacheMaxAge(),\\n 'shared_max_age' => $currentPage->getCacheSharedMaxAge(),\\n 'must_revalidate' => $currentPage->getCacheMustRevalidate(),\\n 'last_modified' => $currentPage->getLastCacheModifiedDate()\\n );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a515521046c2dbcb578171a7696cd9ea\",\n \"score\": \"0.6391249\",\n \"text\": \"public function onPageLoaded($page);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b30e83554a2bea01573f96d03092d605\",\n \"score\": \"0.63276374\",\n \"text\": \"public function pageDataRendered(&$footer)\\n {\\n // Example:\\n //$footer = \\\"your footer\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b30e83554a2bea01573f96d03092d605\",\n \"score\": \"0.63276374\",\n \"text\": \"public function pageDataRendered(&$footer)\\n {\\n // Example:\\n //$footer = \\\"your footer\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a803a71bd296bb1be4dcebb6bdc6d88\",\n \"score\": \"0.6323813\",\n \"text\": \"protected function callRenderHook() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e02b8585e97c28bfb7459124a551c27\",\n \"score\": \"0.63140345\",\n \"text\": \"public function render() {\\n\\t\\t$this->render_page_content();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f1a9de3c2afa643f251083d856bfd50\",\n \"score\": \"0.6298689\",\n \"text\": \"public function onPageFormatted($page);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9385a325eec0cab7d39eb74857255fd5\",\n \"score\": \"0.6296541\",\n \"text\": \"public function render() {\\n \\t\\tif (isset($_GET['eventId']) )\\n\\t\\t\\t$this->allElements[$_GET['eventId']]->callOnClickPreRenderFn();\\n\\n\\t\\tparent::render();\\n \\t\\t\\n\\t\\tif (isset($_GET['eventId']) )\\n\\t\\t\\t$this->allElements[$_GET['eventId']]->callOnClickPostRenderFn();\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7de235ecfc7eca5d03e273e0e0020725\",\n \"score\": \"0.6262846\",\n \"text\": \"function onAfterRender()\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a6ae6cc9fcaf41a934ffa6c42bed4e4\",\n \"score\": \"0.6224796\",\n \"text\": \"public function getPageRenderer() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a6ae6cc9fcaf41a934ffa6c42bed4e4\",\n \"score\": \"0.62230194\",\n \"text\": \"public function getPageRenderer() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81e32f1f9aa94033f67e899691f77015\",\n \"score\": \"0.62028027\",\n \"text\": \"public function onPreRender() {\\n\\t\\t$this->view->register('events', $this->events);\\n\\t\\t$this->view->register('delta', $this->delta);\\n\\t\\t$this->view->register('result', $this->result);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a73f9160357d5cfbeea416542aa2cae0\",\n \"score\": \"0.6184399\",\n \"text\": \"public function pageChanged($sender,$param)\\n {\\nPrado::trace('PAGER '.$param->NewPageIndex.' '. get_class($param),'Json');\\n // if ($this->Page->IsCallback && !($param instanceof TCallbackEventParameter))\\n // {\\n // return;\\n //}\\n\\n\\n\\t\\t//$this->populateData($param->NewPageIndex);\\n $this->Repeater->DataSource = $this->getProducts(true);\\n $this->Repeater->CurrentPageIndex=$param->NewPageIndex;\\n \\t $this->Repeater->dataBind();\\n\\n //$this->Pager->render($param->getNewWriter());\\n // $this->broadcastEvent('OnOrderChanged', $this, $param);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"683729ba620ccfb808b0f281e9cd2992\",\n \"score\": \"0.615766\",\n \"text\": \"private function render()\\r\\n {\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1df3de469c1830344aeb0367e4eb6f2e\",\n \"score\": \"0.6151105\",\n \"text\": \"public function beforerender() {\\n parent::beforeRender();\\n $this->Meta->data();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5de2a31e1c10b1a8a83e850e8574901\",\n \"score\": \"0.6134922\",\n \"text\": \"protected function executePreRenderHook() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d806f132ccd1123d8fc76c64242be00\",\n \"score\": \"0.6126794\",\n \"text\": \"public function prePageContent();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d656a52f5cf841ec5a75ce95465c8e67\",\n \"score\": \"0.61212707\",\n \"text\": \"public function render($pdf, $page, $data=null);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"887730797247065c2d05028dc6d809d2\",\n \"score\": \"0.6081925\",\n \"text\": \"public function pageDataRendering(&$header)\\n {\\n // Example:\\n //$header = \\\"your header\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"887730797247065c2d05028dc6d809d2\",\n \"score\": \"0.6081925\",\n \"text\": \"public function pageDataRendering(&$header)\\n {\\n // Example:\\n //$header = \\\"your header\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35d4d8a45cf1ff8ab8a15329bb47522d\",\n \"score\": \"0.6067003\",\n \"text\": \"function onRenderWidget();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d2d0662379f73703a89e0041e3827ed\",\n \"score\": \"0.60550386\",\n \"text\": \"function onBeforeRender()\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2847e684c6d77a596ea4cf9e4ad30b01\",\n \"score\": \"0.6049237\",\n \"text\": \"abstract public function onBeforeRender($output);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69312756ca7a56d05547bcba50d16097\",\n \"score\": \"0.6025232\",\n \"text\": \"public function onPageContentProcessed(Event $event)\\n {\\n $page = $event['page'];\\n $config = $this->mergeConfig($page);\\n\\n // get current rendered content\\n $content = $page->getRawContent();\\n // replace marker(s) with Google map object(s)\\n $page->setRawContent($this->processMarkdownContent($content, $config));\\n\\n // set this page's assets that where dynamically generated\\n $this->setAssetsFromData();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f00bcab39a1f3d2887730bcea5d1248\",\n \"score\": \"0.6015301\",\n \"text\": \"public function on_before_render()\\n {\\n $this->addFooterItem('');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"218a23e5a7d5949f49ed46c0ef298e6e\",\n \"score\": \"0.6005928\",\n \"text\": \"protected function callRenderMethod() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f70798957e1466122166b9a7001d868\",\n \"score\": \"0.59947467\",\n \"text\": \"function pagecreate()\\r\\n {\\r\\n $output = parent::pagecreate().\\\"\\\\n\\\";\\r\\n\\r\\n $output .= $this->_getJavascriptVar() . \\\" = document.getElementById('\\\" . $this->getName() . \\\"').getContext('\\\" . $this->getContext() . \\\"');\\\\n\\\";\\r\\n\\r\\n //Fire the event, if any\\r\\n if ($this->_jsonpaint != '')\\r\\n $output .= $this->_jsonpaint . \\\"(\\\" . $this->_getJavascriptVar() .\\\");\\\\n\\\";\\r\\n\\r\\n // bind standart events\\r\\n $output .= $this->bindJSEvent('click');\\r\\n $output .= $this->bindJSEvent('dblclick');\\r\\n $output .= $this->bindJSEvent('drag');\\r\\n $output .= $this->bindJSEvent('dragend');\\r\\n $output .= $this->bindJSEvent('dragenter');\\r\\n $output .= $this->bindJSEvent('dragleave');\\r\\n $output .= $this->bindJSEvent('dragover');\\r\\n $output .= $this->bindJSEvent('dragstart');\\r\\n $output .= $this->bindJSEvent('drop');\\r\\n $output .= $this->bindJSEvent('mousedown');\\r\\n $output .= $this->bindJSEvent('mousemove');\\r\\n $output .= $this->bindJSEvent('mouseout');\\r\\n $output .= $this->bindJSEvent('mouseover');\\r\\n $output .= $this->bindJSEvent('mouseup');\\r\\n $output .= $this->bindJSEvent('mousewheel');\\r\\n $output .= $this->bindJSEvent('scroll');\\r\\n $output .= $this->bindJSEvent('keydown');\\r\\n $output .= $this->bindJSEvent('keypress');\\r\\n $output .= $this->bindJSEvent('keyup');\\r\\n\\r\\n return $output;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1bbd0957747c342f7d7f1aae280f5394\",\n \"score\": \"0.59912163\",\n \"text\": \"function render() ;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a220ddaf6b5f45b4c109b19f4899bca\",\n \"score\": \"0.59862673\",\n \"text\": \"public function render() {\\n $vars = array('page' => &$this);\\n // Page complete.\\n $this->env->hook('page_render', $vars);\\n return $this->html;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"894a66442d5a74fe98b9125a68cf5354\",\n \"score\": \"0.59658414\",\n \"text\": \"public function onRun()\\n {\\n $this->page['tagPage'] = $this->property('tagPage');\\n $this->page['tagPageSlug'] = $this->paramName('tagPageSlug');\\n $this->page['tagsPage'] = $this->property('tagsPage');\\n $this->page['tagsPageSlug'] = $this->paramName('tagsPageSlug');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b4be11b3339247b5378942a29f0b348\",\n \"score\": \"0.59639335\",\n \"text\": \"public function mainPage()\\r\\n {\\r\\n // $this->process();(Finished) https://eurodairy.eu/resources/two-webinars-on-the-principles-of-biodiversity/\\r\\n // $this->getData();\\r\\n $this->template();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58ea1f8d17b191aac97e36d0745ee19e\",\n \"score\": \"0.59612435\",\n \"text\": \"function _render_pages($view, $data=null)//I think this makes more sense\\n\\t{\\n\\t\\t$user=$this->ion_auth->user()->row();\\n\\t\\t$this->viewdata = (empty($data)) ? $this->data: $data;\\n\\t\\t$this->viewdata['user'] = $this->ion_auth->user($this->session->userdata('user_id'))->row();\\n\\t\\t$this->viewdata['application_count']=$this->application_model->myapps_process($this->session->userdata('user_id'));\\n\\t\\t$this->viewdata['recent_messages']=$this->messages_model->get_new_messages('5');\\n\\t\\t$this->viewdata['recent_normal_count']=$this->application_model->recent_count_normal();\\n\\t\\t$this->viewdata['recent_immediate_count']=$this->application_model->recent_count_immediate();\\n\\t\\t$this->viewdata['recent_urgent_count']=$this->application_model->recent_count_urgent();\\n\\t\\t$this->_render_page('templates/header', $this->viewdata);\\n\\t\\t$this->_render_page('templates/header_main', $this->viewdata);\\n\\t\\t$this->_render_page($view, $this->viewdata);\\n\\t\\t$this->_render_page('templates/footer_main', $this->viewdata);\\n\\t\\t$this->_render_page('templates/footer', $this->viewdata);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06f5f6ee7bae4b76c7d87010e656b39a\",\n \"score\": \"0.5941234\",\n \"text\": \"private function runPage(){\\n list($source, $formOptions, $logStatus, $tableData, $recordData, $group, $studentSchools, $tableSource, $studentData) = $this->model->preparePageContent($this->nav);\\n print $this->view->pageView($source, $formOptions, $logStatus, $tableData, $this->url, $recordData, $group, $studentSchools, $tableSource, $studentData);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e218326604fe9d990fa36376a4130f98\",\n \"score\": \"0.5937778\",\n \"text\": \"protected function render() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e218326604fe9d990fa36376a4130f98\",\n \"score\": \"0.5937778\",\n \"text\": \"protected function render() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0da85f13b7cd1c7b46864f45092f20ea\",\n \"score\": \"0.59375167\",\n \"text\": \"public function process()\\n\\t{\\n\\t\\t$this->_init();\\n\\t\\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\\n\\n\\t\\t$this->_handle_forms();\\n\\t\\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\\n\\n\\t\\t$this->_pre_render();\\n\\t\\tif ($this->_flow != PAGE_FLOW_NORMAL) {$this->process_flow(); return;}\\n\\n\\t\\t$this->render();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e218326604fe9d990fa36376a4130f98\",\n \"score\": \"0.5937463\",\n \"text\": \"protected function render() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31be1e5f96145c948d424907e30885ad\",\n \"score\": \"0.593607\",\n \"text\": \"function _render( $data )\\n\\t{\\n\\t\\t$params = array(\\n\\t\\t\\t\\t'data' => $data,\\n\\t\\t\\t\\t'format' => 'htmlbody',\\n\\t\\t\\t);\\n\\n\\t\\t#echo '
    ';\\n\\n\\t\\t#$before = $params['data'];\\n\\n\\t\\t$this->Plugin->RenderItemAsHtml( $params );\\n\\n\\t\\t#pre_dump( $before, $params['data'] );\\n\\n\\t\\treturn $params['data'];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd71921536c135a23b8575951fdff1d7\",\n \"score\": \"0.5932942\",\n \"text\": \"public function render()\\n {\\n //Attempt to handle any `POST`ed data that may be arriving at the page controller. If _processPostRequest\\n //returns true, then simply return because the user will be redirected\\n if($_SERVER['REQUEST_METHOD'] === 'POST' && $this->_processPostRequest()) {\\n return;\\n }\\n\\n $this->_recordPageView('/app/');\\n if (IS_PRODUCTION)\\n {\\n $this->_renderProduction();\\n }\\n else if (IS_STAGING)\\n {\\n $this->_renderStaging();\\n }\\n else if (IS_DEVELOPMENT || IS_REFERENCE)\\n {\\n $this->_renderNonProduction();\\n }\\n else\\n {\\n throw new \\\\Exception('Somehow you got into the page controller without setting the appropriate define.');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b497e7903265920e7274ba3f162609f5\",\n \"score\": \"0.59106773\",\n \"text\": \"public function render($data);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c3ecd703a19a6fbb90eefbce1fbe687\",\n \"score\": \"0.5910639\",\n \"text\": \"public function onSinglePageLoaded(array &$pageData)\\n {\\n $this->triggerEvent('get_page_data', array(&$pageData, $pageData['meta']));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8aca34216e749fb937082071e568d7db\",\n \"score\": \"0.5908648\",\n \"text\": \"function beforeRender(){\\n\\t\\t$this->recordActivity();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f46bc0dae36fc6c47a1ba85a958b02f2\",\n \"score\": \"0.5895403\",\n \"text\": \"abstract protected function renderComplete();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27a7fbbfb667df8500d612a43f3187c2\",\n \"score\": \"0.5890063\",\n \"text\": \"public function preRender()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b53bafabf36b5dccc947043813557b6\",\n \"score\": \"0.58825797\",\n \"text\": \"abstract protected function RenderContent();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b435c6100c8803916caae58ba6fd7055\",\n \"score\": \"0.5877018\",\n \"text\": \"public function before_render() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c0fecaff1c7dadf848da61c7d56eec6\",\n \"score\": \"0.5876451\",\n \"text\": \"function render_callback() {\\n\\t\\t$callback = NULL === $this->render_callback\\n\\t\\t\\t? array( $this, 'render_page' )\\n\\t\\t\\t: $this->render_callback;\\n\\n\\t\\tcall_user_func( $callback, $this );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c4e1edb1f33bf7af9d951e792f59167\",\n \"score\": \"0.5841998\",\n \"text\": \"protected function afterRender() {\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a0954e43ca772bead0d006e0bc12b09\",\n \"score\": \"0.5838147\",\n \"text\": \"function redcap_every_page_before_render($project_id=null) {\\n global $DDP, $project_id, $realtime_webservice_type;\\n try {\\n $page = PAGE ?: false;\\n switch ($page) {\\n case 'DynamicDataPull/fetch.php':\\n // check if we are using a FHIR enabled project\\n if($realtime_webservice_type != \\\"FHIR\\\") throw new \\\\Exception(\\\"This service is only available for FHIR endpoints\\\", 1); // exit if not FHIR\\n // use a proxy to intercept the MRN and run custom code. also pass a reference to the module\\n $ddp_proxy = new DynamicDataPullProxy($project_id, $realtime_webservice_type, $module=$this);\\n $DDP = $ddp_proxy;\\n break;\\n \\n case 'DataMartController:runRevision':\\n $params = (object)$_POST;\\n $mrn = $params->mrn ?: false;\\n if(!$mrn) throw new \\\\Exception(\\\"Please provide an MRN to check the MyChart status\\\", 400);\\n $response = $this->fetchMyChartData($mrn);\\n $data = json_decode($response); //decode the response\\n $record_id = $this->findRecordId($project_id, $mrn);\\n if(empty($record_id)) throw new \\\\Exception(\\\"Cannot save MyChart status: no record ID found\\\", 400);\\n $this->setMyChartStatus($project_id, $record_id, $data);\\n break;\\n \\n default:\\n break;\\n }\\n } catch (\\\\Exception $e) {\\n $message = $e->getMessage();\\n $code = $e->getCode();\\n \\\\Logging::logEvent( \\\"\\\", \\\"mychart_lookup\\\", \\\"OTHER\\\", $display=null, $code, $message );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d8e559d083bd87eafeacb6ef4cbb8e8\",\n \"score\": \"0.5820585\",\n \"text\": \"protected function render() {\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"572053bf746884eefc32bd7d54f802d7\",\n \"score\": \"0.58194965\",\n \"text\": \"public function renderPage(): void\\n {\\n $starttime = microtime(true);\\n if (!$this->options->render_body_only) {\\n ?>\\n options->document_type; ?>>\\n options->uses_angular) {\\n ?>\\n \\n \\n \\n \\n renderHead();\\n $this->renderBody($starttime);\\n ?>\\n \\n renderHead();\\n ?>\\n \\n renderContent();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4eee339dc14ba4d5a4bff307c71bab5f\",\n \"score\": \"0.5817889\",\n \"text\": \"public function postPageGeneration(OutputObjectInterface $page);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"addf81c65fcf27bd1c36377e26933662\",\n \"score\": \"0.58098084\",\n \"text\": \"public function renderContent() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3be1518b2ac6a1e6501b66e51e844ca\",\n \"score\": \"0.58096135\",\n \"text\": \"public function onRun()\\n {\\n $this->page['categoryPage'] = $this->property('categoryPage');\\n $this->page['categoryPageSlug'] = $this->paramName('categoryPageSlug');\\n $this->page['categoriesPage'] = $this->property('categoriesPage');\\n $this->page['categoriesPageSlug'] = $this->paramName('categoriesPageSlug');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ebc0866c4c45a31dbe91f8992aa2a11\",\n \"score\": \"0.5786704\",\n \"text\": \"private function _page(){\\n\\t\\t$this->data['recent_news'] = $this->article_m->get_recent();\\n// \\t\\tdump(\\\"Welcome from the Page template\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ede7b3a0f1c983cf89fbda91d37fac0\",\n \"score\": \"0.57748544\",\n \"text\": \"function draw_page(){\\n\\t\\tif ($this->preprocess()){\\n\\t\\t\\t\\n\\t\\t\\tif ($this->window_dressing)\\n\\t\\t\\t\\techo $this->get_header();\\n\\n\\t\\t\\t$fn = $this->content_function;\\n\\t\\t\\techo $this->$fn();\\n\\n\\t\\t\\tif ($this->window_dressing)\\n\\t\\t\\t\\techo $this->get_footer();\\n\\n\\t\\t\\tforeach($this->scripts as $s_url => $s_type){\\n\\t\\t\\t\\tprintf('',\\n\\t\\t\\t\\t\\t$s_type, $s_url);\\n\\t\\t\\t\\techo \\\"\\\\n\\\";\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$js_content = $this->javascript_content();\\n\\t\\t\\tif (!empty($js_content) || !empty($this->onload_commands)){\\n\\t\\t\\t\\techo '';\\n\\t\\t\\t}\\n\\n\\t\\t\\t$page_css = $this->css_content();\\n\\t\\t\\tif (!empty($page_css)){\\n\\t\\t\\t\\techo '';\\n\\t\\t\\t}\\n\\t\\t\\tforeach($this->css_files as $css_url){\\n\\t\\t\\t\\tprintf('',\\n\\t\\t\\t\\t\\t$css_url);\\n\\t\\t\\t\\techo \\\"\\\\n\\\";\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19df50a2d6590e0bfdc0ea05d6bae34b\",\n \"score\": \"0.5764835\",\n \"text\": \"protected function render() {\\n\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f12a2e0de0035b61f8c50b4d321a9f4\",\n \"score\": \"0.57633114\",\n \"text\": \"protected function setupPage() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1dbe251f7ae25139243c2d0f7fc8a79c\",\n \"score\": \"0.5747946\",\n \"text\": \"protected function render()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64ea038eccb555d0d56d2f0d52015a08\",\n \"score\": \"0.5747361\",\n \"text\": \"function _display($data) {\\r\\n\\t\\t// Customize by overriding this function in the child class\\r\\n\\t\\t$this->load->view('header', $data);\\r\\n\\t\\t$this->load->view('${page.id.toLowerCase()}', $data);\\r\\n\\t\\t$this->load->view('footer', $data);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1dbe251f7ae25139243c2d0f7fc8a79c\",\n \"score\": \"0.5747033\",\n \"text\": \"protected function render()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1dbe251f7ae25139243c2d0f7fc8a79c\",\n \"score\": \"0.5747033\",\n \"text\": \"protected function render()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1dbe251f7ae25139243c2d0f7fc8a79c\",\n \"score\": \"0.5746868\",\n \"text\": \"protected function render()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08a9fba77985623ce568b66d844e626f\",\n \"score\": \"0.57449245\",\n \"text\": \"function Page_DataRendered(&$footer) {\\r\\n\\r\\n\\t\\t// Example:\\r\\n\\t\\t//$footer = \\\"your footer\\\";\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ee1a60d986761ac9687218c8b52a04d\",\n \"score\": \"0.57440424\",\n \"text\": \"protected function executeRenderPostTransformHook() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a11dcd15c9fde24210111a6346a431b\",\n \"score\": \"0.57439303\",\n \"text\": \"function Page_DataRendered(&$footer) {\\n\\n\\t\\t// Example:\\n\\t\\t//$footer = \\\"your footer\\\";\\n\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":748,"cells":{"query_id":{"kind":"string","value":"6254fd8a69dc52a4c571d175bcae999f"},"query":{"kind":"string","value":"_getFullName method this method will creata a full name to the user."},"positive_passages":{"kind":"list like","value":[{"docid":"a0880d74ae1f666f91a4921eca3c782c","score":"0.7450094","text":"protected function _getFullName()\n {\n return $this->_properties['first_name'] . ' ' . $this->_properties['last_name'];\n }","title":""}],"string":"[\n {\n \"docid\": \"a0880d74ae1f666f91a4921eca3c782c\",\n \"score\": \"0.7450094\",\n \"text\": \"protected function _getFullName()\\n {\\n return $this->_properties['first_name'] . ' ' . $this->_properties['last_name'];\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"108a3ec699b0e7d6e2d1430068eae9b7","score":"0.7973666","text":"public function getFullName(){\n\t\treturn $this->user->getFirstName().' '.$this->user->getLastName();\n\t}","title":""},{"docid":"ca44c2671a189035091bb78e59bc9fce","score":"0.7904046","text":"public function getFullName()\n {\n \tif (!empty($this->firstName) && !empty($this->lastName)){\n\t\t return sprintf(\"%s %s\", ucfirst($this->firstName) , ucfirst($this->lastName));\n\t }\n\t \n\t return (string) $this->username;\n }","title":""},{"docid":"baf2388fa03b13a22f1843311cec731d","score":"0.7848315","text":"public function getFullName(){\r\n $full_name = $this->firstName.' '.$this->lastName;\r\n return trim($full_name) ? trim($full_name) : $this->getUsername();\r\n }","title":""},{"docid":"2a52c76dce0168c8c4efd8c547b0bf5a","score":"0.7712556","text":"public function getFullName( ){\n if ( $this->verbose ) echo __METHOD__ . \"\\n\";\n if ( empty( $this->userData['fName'] ) && empty( $this->userData['mName'] ) && empty( $this->userData['lName'] ) ){ return false; }\n $fullName = $this->userData['fName'] . \" \";\n if ( empty( $this->userData['mName'] )){\n $fullName .= $this->userData['lName'];\n return $fullName;\n }\n $fullName .= $this->userData['mName'] . \" \" . $this->userData['lName'];\n return $fullName;\n }","title":""},{"docid":"64300df9312070dfcb33d9e78664cf3c","score":"0.76136446","text":"public function getFullname()\n {\n \n }","title":""},{"docid":"d3d860615dd90fa63b44a53bc545c6a7","score":"0.7612304","text":"public function userFullname() {\n return $this->fullname();\n }","title":""},{"docid":"fe76d859b16afb2e6b2a85a95bfb5a6b","score":"0.75969744","text":"public function getFullName(){\r\n return \"{$this->firstname} {$this->surname}\";\r\n }","title":""},{"docid":"51eb70ef93c7410012cc970d94fb8898","score":"0.7561074","text":"public function getFullName()\n {\n\n if ($this->firstName == null || $this->lastName == null) {\n return $this->username;\n }\n\n $fullName = $this->firstName . ' ' . $this->lastName;\n\n return $fullName;\n }","title":""},{"docid":"3cb3d7c90c6412be77c1eb24886df0cb","score":"0.74802446","text":"public function full_name(){\n return $this->first_name .\" \". $this->last_name ;\n }","title":""},{"docid":"5328bef963e72bbe9affc892ab83dc03","score":"0.7467484","text":"public function authUserFullName() {\n\t\treturn Auth::user()->firstname . ' ' . Auth::user()->lastname;\n\t}","title":""},{"docid":"560b90e1de191a9b772a06af8cda7858","score":"0.7458912","text":"public function getFormattedFullName()\n\t{\n\t\tif (!empty($this->getFirstName()) && !empty($this->getLastName())){\n\t\t\treturn sprintf(\"%s.%s\", ucfirst($this->getFirstName()) , ucfirst($this->getLastName()[0]));\n\t\t}\n\t\t\n\t\treturn (string) $this->getUsername();\n\t}","title":""},{"docid":"fd9843cd2a1210ce902c335aec83eba9","score":"0.74152666","text":"public abstract function fullName();","title":""},{"docid":"337f7a2eeaa302187e626d563564f264","score":"0.7408665","text":"public function getFullName(){\n return $this->firstname.' '.$this->lastname;\n }","title":""},{"docid":"90331681bd5ac2239f92cc2981e23a5e","score":"0.73789126","text":"public function full_name(){\n\t\tif (isset($this->first_name) && isset($this->last_name)) {\n\t\t\t\treturn $this->first_name.\" \".$this->last_name; \n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}","title":""},{"docid":"a87ad364c79086f59bfb13e6da68ce10","score":"0.7333211","text":"public function getFullName()\r\n {\r\n return $this->getFirstname() . ' ' . $this->getLastname();\r\n }","title":""},{"docid":"761f98dab881892af24191a6accabf69","score":"0.73251534","text":"function _form_usr_fullname($usr_info=null) {\n \n $USR_FULL_NAME = '';\n if( !empty($usr_info) ) {\n \n $USR_FULL_NAME = ucfirst($usr_info['s_fname']);\n $USR_FULL_NAME .= ( !empty($usr_info['s_lname']) )? ' '. ucfirst($usr_info['s_lname']): '';\n }\n \n return $USR_FULL_NAME;\n }","title":""},{"docid":"220e8ce5068ed2425c3b4fcb71769cce","score":"0.73096466","text":"public function getUserFullNameAttribute()\n {\n return $this->attributes['first_name'] . ' ' . $this->attributes['last_name'];\n }","title":""},{"docid":"9ede23dfcf917f8abb2c894d7ebc3bbe","score":"0.7307491","text":"public function getFullName()\n {\n $nickname = $this->getNickname();\n\n return $this->firstname. (!empty($nickname) ? ' \"'.$nickname.'\" ': ' ').$this->lastname;\n }","title":""},{"docid":"eb39bb2e36a096d431613c80cc0d8c22","score":"0.7297678","text":"protected function getFullname(){\n\t\treturn $this->firstname.\" \".$this->lastname.PHP_EOL;\n\t}","title":""},{"docid":"0b41bc0e8279b4c856f6e2b059c7a2ed","score":"0.7289682","text":"public function getFullname()\n {\n return $this->firstname.' '.$this->lastname;\n }","title":""},{"docid":"0b83324a9dbdaf8a2c92bf9eed615c1f","score":"0.7266576","text":"public function getFullName()\n {\n return $this->get('first_name') . ' ' . $this->get('last_name');\n }","title":""},{"docid":"1621062bcbff1a3a3fccd596b01c6dac","score":"0.7223102","text":"public function getFullName()\n {\n return \"{$this->surname} {$this->name} {$this->middle_name}\";\n }","title":""},{"docid":"1dd0ce7c519fa78c39abe917a1a8d3bd","score":"0.72229576","text":"public function full_name() {\r\n\t\tif(isset($this->first_name) && isset($this->last_name)) {\r\n\t\t\treturn $this->first_name . \" \" . $this->last_name;\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}","title":""},{"docid":"40bbfa277468441d28c1f4897e8e272d","score":"0.72178906","text":"public function getFullName()\n {\n return $this->getFirstname() . ' ' . $this->getLastname();\n }","title":""},{"docid":"40bbfa277468441d28c1f4897e8e272d","score":"0.72178906","text":"public function getFullName()\n {\n return $this->getFirstname() . ' ' . $this->getLastname();\n }","title":""},{"docid":"5aea0788776badb40e2bcda7fc0f160c","score":"0.7215795","text":"public function getFullNameAttribute()\n {\n return $this->user->firstname.' '.$this->user->lastname;\n }","title":""},{"docid":"e63b93099fc305237edbe4242702a0d2","score":"0.721498","text":"public static function getUserFullName(){\t\n\t\tif(is_user_logged_in()){\n\t\t\t$current_user = get_currentuserinfo();\n\t\t\t\t$firstname = $current_user->user_firstname;\n\t\t\t\t$lastname = $current_user->user_lastname;\n\t\t\t$display_name = $firstname .' '. $lastname;\n\t\t\treturn $display_name;\n\t\t}\n\t\treturn '';\n\t}","title":""},{"docid":"a7b7d9b0da68b15f8a8f966bc52e8a6f","score":"0.72125274","text":"public function getFullName() : string\n {\n return $this->first_name . ' '\n . ($this->middle_name ? \"$this->middle_name \" : '')\n . $this->last_name;\n }","title":""},{"docid":"7c5ac8ba1b39bb406f60d2d1c7707106","score":"0.7195021","text":"public function getFullName() {\n if($this->name != null || $this->surname!=null) {\n return $this->name . \" \" . $this->surname;\n } else {\n return $this->email;\n }\n }","title":""},{"docid":"6fad09b6f4e1f28b83da2d318cc795e7","score":"0.7183262","text":"public function getFullName(){\n \n $fullName = $this->firstName . ' ' . $this->lastName;\n \n return $fullName;\n }","title":""},{"docid":"0ca23181afbeef1914120c8a542bdb03","score":"0.71825975","text":"public function getFullNameAttribute() {\n\t\treturn ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);\n\t}","title":""},{"docid":"884fb193aee1b5862bdd13ba2c2fa35d","score":"0.71795535","text":"static function getFullname ( $userData )\r\n {\r\n\t\t$fullname = '';\r\n\t\t\r\n\t\tif ( $userData->isLoaded() )\r\n\t\t{\r\n\t\t\t$fullname = !empty($userData->name) ? $userData->name : null;\r\n\t\t\tif ( !empty($userData->name) && !empty($userData->surname) )\r\n\t\t\t{\r\n\t\t\t\t$fullname .= ' ';\r\n\t\t\t}\r\n\t\t\t$fullname .= !empty($userData->surname) ? $userData->surname : null;\r\n\t\t}\r\n\t\t\r\n\t\treturn $fullname;\r\n }","title":""},{"docid":"bb2f3a7dcd74afc078851752b94a4b24","score":"0.7178446","text":"public function getFullNameAttribute()\n {\n return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);\n }","title":""},{"docid":"4b1a977897f6f19609d955ce915c181d","score":"0.71661884","text":"public function getFullName() {\n $firstname = $this->firstname;\n $lastname = $this->lastname;\n return $lastname . ' ' . $firstname;\n }","title":""},{"docid":"80d7a762e26a5a8224c4cbb099e9accf","score":"0.7151312","text":"public function getFullName()\n {\n return \"{$this->name} {$this->lastname} {$this->second_lastname}\";\n }","title":""},{"docid":"772be4aa4785ed4372186a81a081b1a3","score":"0.7144981","text":"public function getFullName() {\n return $this->lastName . ' ' . $this->firstName;\n }","title":""},{"docid":"52c4458bedc57311241e754c76fe60db","score":"0.7130986","text":"public function getFullName()\n {\n return $this->getFirstName() . ' ' . $this->getLastname();\n }","title":""},{"docid":"52c4458bedc57311241e754c76fe60db","score":"0.7130986","text":"public function getFullName()\n {\n return $this->getFirstName() . ' ' . $this->getLastname();\n }","title":""},{"docid":"d5a05f356d4f15b2601800fa230a1095","score":"0.712466","text":"public function getFullName()\n\t {\n logger()->info(__METHOD__);\n if($fullname = $this->first_name . ' ' . $this->last_name){\n throw new Exception();\n }\n\t \treturn $fullname; \n\t // $profile = $this->entity->profile;\n\t // if (! is_null($profile) && ! empty($profile->name)) {\n\t // return $profile->name;\n\t // }\n\t // return $this->entity->username;\n\t }","title":""},{"docid":"3d3c17de461ff52662536e3a55c225fe","score":"0.71246415","text":"public function getFullName()\n {\n return trim(\"$this->first_name $this->surname\");\n }","title":""},{"docid":"15e524e6eb092286a87817f5cc0ee597","score":"0.71112555","text":"protected function updateFullName()\n {\n //====================================================================//\n // Stack Trace\n Splash::log()->trace();\n //====================================================================//\n // Get Current Values if Not Written\n $currentName = $this->decodeFullName($this->object->name);\n if (empty($this->firstName) && !empty($currentName[\"firstname\"])) {\n $this->firstName = $currentName[\"firstname\"];\n }\n if (empty($this->lastName) && !empty($currentName[\"lastname\"])) {\n $this->lastName = $currentName[\"lastname\"];\n }\n if (empty($this->companyName) && !empty($currentName[\"name\"])) {\n $this->companyName = $currentName[\"name\"];\n }\n //====================================================================//\n // No First or Last Name\n if (empty(trim($this->firstName)) && empty(trim($this->lastName))) {\n $this->setSimple(\"name\", $this->companyName);\n\n return;\n }\n //====================================================================//\n // Encode Full Name String\n $encodedFullName = $this->encodeFullName($this->firstName, $this->lastName, $this->companyName);\n $this->setSimple(\"name\", $encodedFullName);\n }","title":""},{"docid":"d7d6fd0dc686817dc4df34b92be024c0","score":"0.7104024","text":"public function getFullname()\n {\n return $this->fullname;\n }","title":""},{"docid":"9086048562bd2bc027a7bb6dd56b5fd5","score":"0.7103031","text":"public static function user_full_name() {\n global $USER;\n $user = $USER;\n $ismasquerading = manager::is_loggedinas();\n\n if ($ismasquerading) {\n $usereal = get_config('local_analytics', 'masquerade_handling');\n if ($usereal) {\n $user = manager::get_realuser();\n }\n }\n\n $realname = fullname($user);\n return $realname;\n }","title":""},{"docid":"b30705943ae6562d1a72a7089e127252","score":"0.70671827","text":"public function setFullName($value){\n if(is_string($value)){\n $this->full_name = $value;\n }\n }","title":""},{"docid":"4fb10a8cf077a847ae667c5e2d2be923","score":"0.70423067","text":"public function getFullNameAttribute()\n {\n return sprintf(\"%s %s\", $this->first_name, $this->last_name);\n }","title":""},{"docid":"74b7495a18816721599003a4c218163d","score":"0.70391136","text":"public function get_fullname()\n {\n return self::fullname($this->get_firstname(), $this->get_lastname());\n }","title":""},{"docid":"2f9193745bafff223654d7d3e7c2d4aa","score":"0.7036912","text":"public function getFullname() {\n return $this->fullname;\n }","title":""},{"docid":"ab8043678668e4265c11458b2e666c68","score":"0.70285845","text":"public function getFullNameAttribute(){\n $full_name = $this->first_name . \" \" . $this->last_name ;\n return $full_name;\n }","title":""},{"docid":"12dcd29e40d22d9d8f39460c9caf7e4b","score":"0.6998786","text":"public function getFullname()\n\t{\n\t\treturn $this->fullname;\n\t}","title":""},{"docid":"5ae3c5fa439d8799951483ed06fd9798","score":"0.6993718","text":"public function Get_Full_Name()\n {\n return $this->First_Name . \" \" . $this->Last_Name;\n }","title":""},{"docid":"d6864a4055fc9e45bd45349e0848202c","score":"0.6993314","text":"public function getFullName()\n\t{\n\t\t$firstName = trim($this->firstName);\n\t\t$lastName = trim($this->lastName);\n\n\t\treturn $firstName.($firstName && $lastName ? ' ' : '').$lastName;\n\t}","title":""},{"docid":"373edc732af4dfd570ebbded30b65533","score":"0.6992719","text":"public function fullname($user){\r\n return $user->first_name.(isset($user->last_name)?\" \".$user->last_name:\"\");\r\n }","title":""},{"docid":"3e69af68a89e054d8d2de76435728fa9","score":"0.69899666","text":"public function getFullNameAttribute()\n {\n return ucwords($this->first_name) .' '. ucwords($this->last_name);\n }","title":""},{"docid":"51b6f707a91dbb3f59fb4f594e658fef","score":"0.6966035","text":"public function getFullNameAttribute()\n {\n return $this->attributes['first_name'] . ' ' . $this->attributes['last_name'];\n }","title":""},{"docid":"0a94052c4d4e12e9b1d1796789a9813e","score":"0.6960084","text":"public function getFullNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }","title":""},{"docid":"0a94052c4d4e12e9b1d1796789a9813e","score":"0.6960084","text":"public function getFullNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }","title":""},{"docid":"0a94052c4d4e12e9b1d1796789a9813e","score":"0.6960084","text":"public function getFullNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }","title":""},{"docid":"0a94052c4d4e12e9b1d1796789a9813e","score":"0.6960084","text":"public function getFullNameAttribute()\n {\n return \"{$this->first_name} {$this->last_name}\";\n }","title":""},{"docid":"f45ee4aa3392cf63d7425fbe474ae656","score":"0.6958541","text":"public function getFullNameAttribute() {\n return $this->first_name . ' ' . $this->last_name;\n }","title":""},{"docid":"9fcd67a3084150a9c5c08f541a4236d4","score":"0.6955413","text":"public function getFullname()\n {\n return $this->name. ' - '. $this->getSpeaker()->getFullname();\n }","title":""},{"docid":"2e0b4a5f8e24bb8032cfe5016ce03afb","score":"0.69524556","text":"public function getFullNameAttribute()\n {\n return $this->first_name . ' ' . $this->last_name;\n }","title":""},{"docid":"2e0b4a5f8e24bb8032cfe5016ce03afb","score":"0.69524556","text":"public function getFullNameAttribute()\n {\n return $this->first_name . ' ' . $this->last_name;\n }","title":""},{"docid":"fd15172e69c72502db86f185ff1a906c","score":"0.6944636","text":"public function getFullNameAttribute()\n {\n return $this->first_name.' '.$this->last_name;\n }","title":""},{"docid":"8f972b3202e795ff721eb6fcf04571a7","score":"0.6940451","text":"public function getFullNameAttribute()\n {\n if(!$this->profile) return null;\n return ($this->profile->first_name) ? $this->profile->first_name . ' ' . $this->profile->last_name : $this->profile->company_name;\n }","title":""},{"docid":"c1b49fa8aeb84ccba83196e55ae11277","score":"0.69343144","text":"public function getFullName()\n {\n return $this->fullName;\n }","title":""},{"docid":"fee30bf2a3b6402eb6a9c0fef9772ce3","score":"0.6933014","text":"public function getFullNameAttribute()\n {\n return \"{$this->name} {$this->last_name}\";\n }","title":""},{"docid":"b68f1f6088cd520cbf40e21b613779a9","score":"0.6927592","text":"public function getFullNameAttribute()\n {\n if ($this->last_name) {\n return \"{$this->first_name} {$this->last_name}\";\n }\n\n return \"{$this->first_name}\";\n }","title":""},{"docid":"460116f31593f76eb442c8ad051f03eb","score":"0.69157666","text":"public function getFullNameAttribute()\n {\n return $this->first_name . ' ' . $this->middle_name . ' ' . $this->last_name;\n }","title":""},{"docid":"e52fd0c6f8b8eb0fa8551ffb18543b13","score":"0.6907516","text":"private function getFullName( array &$attributes ) {\n\t\t$nameKey = array_search($this->model() . '.user_fullname', $attributes);\n\n\t\tif ( $nameKey != false ) {\n\t\t\t$attributes[$nameKey] = DB::raw(\"CONCAT(\" . $this->model() . \".user_firstname, ' ', \" . $this->model() . \".user_lastname) `user_fullname`\");\n\t\t}\n\t}","title":""},{"docid":"8020716accdf4b968fe1c9dd68a9a032","score":"0.69073445","text":"public function fullName()\n {\n return $this->first_name . ' ' . $this->last_name;\n }","title":""},{"docid":"bf4fe0361b8eacf7f5f8d0098f2a0d0e","score":"0.68913805","text":"public function getFullNameAttribute(): string\n {\n return $this->first_name . ' ' . $this->last_name;\n }","title":""},{"docid":"a6cc8d489a02522ab657ca3d614f767a","score":"0.68729573","text":"function complete_name():string{\n return $this->lastname.\" \".$this->firstname ;\n }","title":""},{"docid":"b75b9ff4fd5813907584738f9127e55d","score":"0.68708503","text":"public function getFullNameAttribute()\n {\n $profileData = isset($this->profile) ? $this->profile->data:[];\n if (is_array($profileData)) {\n $first_name = (array_key_exists('first_name',$profileData)) ? $profileData['first_name'] : '';\n $last_name = (array_key_exists('last_name',$profileData)) ? $profileData['last_name'] : '';\n return trim(\"{$first_name} {$last_name}\");\n }\n else {\n return null;\n }\n }","title":""},{"docid":"06ffa697ff9e4793b20c2c30b02cbd29","score":"0.6869545","text":"public function getFullName()\n {\n $space = ' ';\n\n return $this->getFirstname() . $space . $this->getLastname();\n }","title":""},{"docid":"8f8d17c69df79cb6aedfcf81044cbd87","score":"0.68615544","text":"public function getDisplayName() {\n if (empty($this->user['fullname'])) {\n return $this->user['username'];\n\n } else {\n return $this->user['fullname'];\n }\n }","title":""},{"docid":"11d850b88faa85fd867432906beb8dc7","score":"0.685524","text":"public function getFullName()\n {\n $fullName = $this->getFirstName();\n\n if ($this->has('last_name'))\n $fullName .= ' '.$this->getLastName();\n\n return $fullName;\n }","title":""},{"docid":"c022e1f3989bab55acca04e00eca1f0a","score":"0.6853324","text":"public function getFullName() {\n return $this->fullName;\n }","title":""},{"docid":"57c96b1da5e113555f5ed1e0069bcc49","score":"0.67983097","text":"public function getFullNameAttribute()\n {\n $fullName=CustomHelper::getAdminConstants($this->id, 'full_name');\n return ($fullName != \"\") ? $fullName : NULL;\n }","title":""},{"docid":"3495a4f6f2e5bf2a5a3c6250924cf1e0","score":"0.6793594","text":"function get_user_fullname($user_id = \"\")\n{\n $data = get_user_data($user_id);\n\n return $data['first_name'] . \" \" . $data['last_name'];\n}","title":""},{"docid":"a96fdb604e7362fb02b4ff295bb607e5","score":"0.6787529","text":"public function getFullNameWithEmail()\n {\n return $this->firstName . ' ' . $this->lastName . ' (' . $this->email . ')';\n }","title":""},{"docid":"143f313204bd61edd2678a4bd9171b76","score":"0.67873406","text":"public function getFullName()\n {\n return $this->_fullName;\n }","title":""},{"docid":"a38b91693d356dbade8d3214b30024db","score":"0.67858845","text":"public function getFullNameAttribute(): string\n {\n return implode(' ', array_filter([$this->first_name, $this->last_name]));\n }","title":""},{"docid":"e80de8589b573de27d61bea7ccf9649f","score":"0.6779771","text":"public function getFullNameAttribute() {\n\n return $this->name . ' ' . $this->surname;\n }","title":""},{"docid":"a6c9068ebf2e2cce448b017748c85d34","score":"0.67696595","text":"public function getFullName()\n {\n return trim($this->fullName);\n }","title":""},{"docid":"a4df5fd9fdb8485393455ec1bf45f0ba","score":"0.67683786","text":"public function getFullName() {\n\t\treturn $this->fullName;\n\t}","title":""},{"docid":"41097064e94d81262c3bc3784b97031c","score":"0.6760152","text":"public function getFullName()\n {\n return $this->name . ' ' . $this->family;\n }","title":""},{"docid":"e5c20906eb8b5fba833652ba72c8593c","score":"0.67523074","text":"public function getFullNameAttribute()\n\t{\n\t\treturn $this->firstname . ' ' . $this->lastname;\n\t}","title":""},{"docid":"98ace2ae5fc37930bc576f97c0691da1","score":"0.67362165","text":"public static function get_name(){\n $User = User::get_user_info();\n $UserID = $User->UserID;\n $User = User::retrieve_user($UserID);\n return $User[\"First_Name\"] . \" \" . $User[\"Last_Name\"];\n }","title":""},{"docid":"14e2c945db48d75936176963da8f73f4","score":"0.6733791","text":"public function getfullname()\n {\n return $this->fullname;\n }","title":""},{"docid":"72a1ef2f3a295366b76e391029c0b2fe","score":"0.6731241","text":"public function setFullName($fullName)\n {\n $this->fullName = $fullName;\n }","title":""},{"docid":"ccb36676167ae1bb8966316450f842dc","score":"0.67057115","text":"public function getFullNameAttribute()\n {\n $full_name = $this->name.' '.$this->last_name;\n return Str::limit($full_name,25);\n }","title":""},{"docid":"89b2df061f5969e5678e153860cab0f8","score":"0.6688322","text":"public function getFullnameAttribute()\n {\n return trim($this->firstname) . \" \" . trim($this->lastname);\n }","title":""},{"docid":"5c4b5f79ada9e638c2ed78da0dc6f4a1","score":"0.6683156","text":"public function get_full_name()\n\t{\n\t\treturn $this->_path . DS . $this->_name;\n\t}","title":""},{"docid":"c82932c4a32973c5d9c3ccfc52cf7626","score":"0.6665783","text":"public function getFullNameAttribute()\n {\n return $this->given_names . ' ' . $this->surname;\n }","title":""},{"docid":"d7edeafba3dd1b7c3744341368b81d97","score":"0.6613892","text":"public function getFullName()\n\t{\n\t\t$aPartsFullName = array();\n\n\t\t!empty($this->surname) && $aPartsFullName[] = $this->surname;\n\t\t!empty($this->name) && $aPartsFullName[] = $this->name;\n\t\t!empty($this->patronymic) && $aPartsFullName[] = $this->patronymic;\n\n\t\treturn implode(' ', $aPartsFullName);\n\t}","title":""},{"docid":"1c7683f4711304622d542358ed903eed","score":"0.65787905","text":"public function fullName()\n {\n return $this->entity->first_name . ' ' . $this->entity->last_name;\n }","title":""},{"docid":"c908aa2f3e11fe9d57a69ec1c0e3552f","score":"0.6539839","text":"function getNameForUser($user = false) {\n\t\tglobal $hyphaUser;\n\t\tif ($user === false)\n\t\t\t$user = $hyphaUser;\n\t\tif (!$user)\n\t\t\treturn __('anonymous');\n\t\treturn $user->getAttribute('fullname') ?: $user->getAttribute('username') ?: $user->getAttribute('email');\n\t}","title":""},{"docid":"19e88ee5f8351b81611d0a790f46fd2c","score":"0.6534116","text":"public function setUserFullName(){\n \tif ($this->loggedin) {\n \t\tswitch ($this->pageID) {\n\t \t\tcase 'process_login':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'home':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'leaderboard':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'my_account':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'new_game':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tcase 'play':\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t\tdefault:\n\t \t\t\t$this->getUserInfo();\n\t \t\t\tbreak;\n\t \t}\n \t}\n }","title":""},{"docid":"2118a9f38a04748c5fd9024c515f1c3d","score":"0.65179765","text":"public function getFullName()\n {\n return $this->lowerVendor.'/'.$this->lowerName;\n }","title":""},{"docid":"0d268d58af0b4597291ae976de686394","score":"0.6516592","text":"function getUserFullName($user) {\n\t$name = null;\n\t$user = User::getDataArray($user);\n\tif ($user) {\n\t\t$name = '';\n\t\tif (isset($user['name']) && is_scalar($user['name'])) {\n\t\t\t$name = trim($user['name']);\n\t\t}\n\t\tif (isset($user['surname']) && is_scalar($user['surname'])) {\n\t\t\t$name .= ' '.trim($user['surname']);\n\t\t}\n\t\t$name = trim($name);\n\t\tif ($name == '' && isset($user['username']) && is_scalar($user['username'])) {\n\t\t\t$name = trim($user['username']);\n\t\t}\n\t}\n\treturn $name;\n}","title":""}],"string":"[\n {\n \"docid\": \"108a3ec699b0e7d6e2d1430068eae9b7\",\n \"score\": \"0.7973666\",\n \"text\": \"public function getFullName(){\\n\\t\\treturn $this->user->getFirstName().' '.$this->user->getLastName();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca44c2671a189035091bb78e59bc9fce\",\n \"score\": \"0.7904046\",\n \"text\": \"public function getFullName()\\n {\\n \\tif (!empty($this->firstName) && !empty($this->lastName)){\\n\\t\\t return sprintf(\\\"%s %s\\\", ucfirst($this->firstName) , ucfirst($this->lastName));\\n\\t }\\n\\t \\n\\t return (string) $this->username;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"baf2388fa03b13a22f1843311cec731d\",\n \"score\": \"0.7848315\",\n \"text\": \"public function getFullName(){\\r\\n $full_name = $this->firstName.' '.$this->lastName;\\r\\n return trim($full_name) ? trim($full_name) : $this->getUsername();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a52c76dce0168c8c4efd8c547b0bf5a\",\n \"score\": \"0.7712556\",\n \"text\": \"public function getFullName( ){\\n if ( $this->verbose ) echo __METHOD__ . \\\"\\\\n\\\";\\n if ( empty( $this->userData['fName'] ) && empty( $this->userData['mName'] ) && empty( $this->userData['lName'] ) ){ return false; }\\n $fullName = $this->userData['fName'] . \\\" \\\";\\n if ( empty( $this->userData['mName'] )){\\n $fullName .= $this->userData['lName'];\\n return $fullName;\\n }\\n $fullName .= $this->userData['mName'] . \\\" \\\" . $this->userData['lName'];\\n return $fullName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64300df9312070dfcb33d9e78664cf3c\",\n \"score\": \"0.76136446\",\n \"text\": \"public function getFullname()\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3d860615dd90fa63b44a53bc545c6a7\",\n \"score\": \"0.7612304\",\n \"text\": \"public function userFullname() {\\n return $this->fullname();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe76d859b16afb2e6b2a85a95bfb5a6b\",\n \"score\": \"0.75969744\",\n \"text\": \"public function getFullName(){\\r\\n return \\\"{$this->firstname} {$this->surname}\\\";\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51eb70ef93c7410012cc970d94fb8898\",\n \"score\": \"0.7561074\",\n \"text\": \"public function getFullName()\\n {\\n\\n if ($this->firstName == null || $this->lastName == null) {\\n return $this->username;\\n }\\n\\n $fullName = $this->firstName . ' ' . $this->lastName;\\n\\n return $fullName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3cb3d7c90c6412be77c1eb24886df0cb\",\n \"score\": \"0.74802446\",\n \"text\": \"public function full_name(){\\n return $this->first_name .\\\" \\\". $this->last_name ;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5328bef963e72bbe9affc892ab83dc03\",\n \"score\": \"0.7467484\",\n \"text\": \"public function authUserFullName() {\\n\\t\\treturn Auth::user()->firstname . ' ' . Auth::user()->lastname;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"560b90e1de191a9b772a06af8cda7858\",\n \"score\": \"0.7458912\",\n \"text\": \"public function getFormattedFullName()\\n\\t{\\n\\t\\tif (!empty($this->getFirstName()) && !empty($this->getLastName())){\\n\\t\\t\\treturn sprintf(\\\"%s.%s\\\", ucfirst($this->getFirstName()) , ucfirst($this->getLastName()[0]));\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn (string) $this->getUsername();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd9843cd2a1210ce902c335aec83eba9\",\n \"score\": \"0.74152666\",\n \"text\": \"public abstract function fullName();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"337f7a2eeaa302187e626d563564f264\",\n \"score\": \"0.7408665\",\n \"text\": \"public function getFullName(){\\n return $this->firstname.' '.$this->lastname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90331681bd5ac2239f92cc2981e23a5e\",\n \"score\": \"0.73789126\",\n \"text\": \"public function full_name(){\\n\\t\\tif (isset($this->first_name) && isset($this->last_name)) {\\n\\t\\t\\t\\treturn $this->first_name.\\\" \\\".$this->last_name; \\n\\t\\t} else {\\n\\t\\t\\treturn \\\"\\\";\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a87ad364c79086f59bfb13e6da68ce10\",\n \"score\": \"0.7333211\",\n \"text\": \"public function getFullName()\\r\\n {\\r\\n return $this->getFirstname() . ' ' . $this->getLastname();\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"761f98dab881892af24191a6accabf69\",\n \"score\": \"0.73251534\",\n \"text\": \"function _form_usr_fullname($usr_info=null) {\\n \\n $USR_FULL_NAME = '';\\n if( !empty($usr_info) ) {\\n \\n $USR_FULL_NAME = ucfirst($usr_info['s_fname']);\\n $USR_FULL_NAME .= ( !empty($usr_info['s_lname']) )? ' '. ucfirst($usr_info['s_lname']): '';\\n }\\n \\n return $USR_FULL_NAME;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"220e8ce5068ed2425c3b4fcb71769cce\",\n \"score\": \"0.73096466\",\n \"text\": \"public function getUserFullNameAttribute()\\n {\\n return $this->attributes['first_name'] . ' ' . $this->attributes['last_name'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ede23dfcf917f8abb2c894d7ebc3bbe\",\n \"score\": \"0.7307491\",\n \"text\": \"public function getFullName()\\n {\\n $nickname = $this->getNickname();\\n\\n return $this->firstname. (!empty($nickname) ? ' \\\"'.$nickname.'\\\" ': ' ').$this->lastname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb39bb2e36a096d431613c80cc0d8c22\",\n \"score\": \"0.7297678\",\n \"text\": \"protected function getFullname(){\\n\\t\\treturn $this->firstname.\\\" \\\".$this->lastname.PHP_EOL;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b41bc0e8279b4c856f6e2b059c7a2ed\",\n \"score\": \"0.7289682\",\n \"text\": \"public function getFullname()\\n {\\n return $this->firstname.' '.$this->lastname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b83324a9dbdaf8a2c92bf9eed615c1f\",\n \"score\": \"0.7266576\",\n \"text\": \"public function getFullName()\\n {\\n return $this->get('first_name') . ' ' . $this->get('last_name');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1621062bcbff1a3a3fccd596b01c6dac\",\n \"score\": \"0.7223102\",\n \"text\": \"public function getFullName()\\n {\\n return \\\"{$this->surname} {$this->name} {$this->middle_name}\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1dd0ce7c519fa78c39abe917a1a8d3bd\",\n \"score\": \"0.72229576\",\n \"text\": \"public function full_name() {\\r\\n\\t\\tif(isset($this->first_name) && isset($this->last_name)) {\\r\\n\\t\\t\\treturn $this->first_name . \\\" \\\" . $this->last_name;\\r\\n\\t\\t} else {\\r\\n\\t\\t\\treturn \\\"\\\";\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40bbfa277468441d28c1f4897e8e272d\",\n \"score\": \"0.72178906\",\n \"text\": \"public function getFullName()\\n {\\n return $this->getFirstname() . ' ' . $this->getLastname();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40bbfa277468441d28c1f4897e8e272d\",\n \"score\": \"0.72178906\",\n \"text\": \"public function getFullName()\\n {\\n return $this->getFirstname() . ' ' . $this->getLastname();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5aea0788776badb40e2bcda7fc0f160c\",\n \"score\": \"0.7215795\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return $this->user->firstname.' '.$this->user->lastname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e63b93099fc305237edbe4242702a0d2\",\n \"score\": \"0.721498\",\n \"text\": \"public static function getUserFullName(){\\t\\n\\t\\tif(is_user_logged_in()){\\n\\t\\t\\t$current_user = get_currentuserinfo();\\n\\t\\t\\t\\t$firstname = $current_user->user_firstname;\\n\\t\\t\\t\\t$lastname = $current_user->user_lastname;\\n\\t\\t\\t$display_name = $firstname .' '. $lastname;\\n\\t\\t\\treturn $display_name;\\n\\t\\t}\\n\\t\\treturn '';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7b7d9b0da68b15f8a8f966bc52e8a6f\",\n \"score\": \"0.72125274\",\n \"text\": \"public function getFullName() : string\\n {\\n return $this->first_name . ' '\\n . ($this->middle_name ? \\\"$this->middle_name \\\" : '')\\n . $this->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c5ac8ba1b39bb406f60d2d1c7707106\",\n \"score\": \"0.7195021\",\n \"text\": \"public function getFullName() {\\n if($this->name != null || $this->surname!=null) {\\n return $this->name . \\\" \\\" . $this->surname;\\n } else {\\n return $this->email;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6fad09b6f4e1f28b83da2d318cc795e7\",\n \"score\": \"0.7183262\",\n \"text\": \"public function getFullName(){\\n \\n $fullName = $this->firstName . ' ' . $this->lastName;\\n \\n return $fullName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ca23181afbeef1914120c8a542bdb03\",\n \"score\": \"0.71825975\",\n \"text\": \"public function getFullNameAttribute() {\\n\\t\\treturn ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"884fb193aee1b5862bdd13ba2c2fa35d\",\n \"score\": \"0.71795535\",\n \"text\": \"static function getFullname ( $userData )\\r\\n {\\r\\n\\t\\t$fullname = '';\\r\\n\\t\\t\\r\\n\\t\\tif ( $userData->isLoaded() )\\r\\n\\t\\t{\\r\\n\\t\\t\\t$fullname = !empty($userData->name) ? $userData->name : null;\\r\\n\\t\\t\\tif ( !empty($userData->name) && !empty($userData->surname) )\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$fullname .= ' ';\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t$fullname .= !empty($userData->surname) ? $userData->surname : null;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\treturn $fullname;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb2f3a7dcd74afc078851752b94a4b24\",\n \"score\": \"0.7178446\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b1a977897f6f19609d955ce915c181d\",\n \"score\": \"0.71661884\",\n \"text\": \"public function getFullName() {\\n $firstname = $this->firstname;\\n $lastname = $this->lastname;\\n return $lastname . ' ' . $firstname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80d7a762e26a5a8224c4cbb099e9accf\",\n \"score\": \"0.7151312\",\n \"text\": \"public function getFullName()\\n {\\n return \\\"{$this->name} {$this->lastname} {$this->second_lastname}\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"772be4aa4785ed4372186a81a081b1a3\",\n \"score\": \"0.7144981\",\n \"text\": \"public function getFullName() {\\n return $this->lastName . ' ' . $this->firstName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52c4458bedc57311241e754c76fe60db\",\n \"score\": \"0.7130986\",\n \"text\": \"public function getFullName()\\n {\\n return $this->getFirstName() . ' ' . $this->getLastname();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52c4458bedc57311241e754c76fe60db\",\n \"score\": \"0.7130986\",\n \"text\": \"public function getFullName()\\n {\\n return $this->getFirstName() . ' ' . $this->getLastname();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5a05f356d4f15b2601800fa230a1095\",\n \"score\": \"0.712466\",\n \"text\": \"public function getFullName()\\n\\t {\\n logger()->info(__METHOD__);\\n if($fullname = $this->first_name . ' ' . $this->last_name){\\n throw new Exception();\\n }\\n\\t \\treturn $fullname; \\n\\t // $profile = $this->entity->profile;\\n\\t // if (! is_null($profile) && ! empty($profile->name)) {\\n\\t // return $profile->name;\\n\\t // }\\n\\t // return $this->entity->username;\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d3c17de461ff52662536e3a55c225fe\",\n \"score\": \"0.71246415\",\n \"text\": \"public function getFullName()\\n {\\n return trim(\\\"$this->first_name $this->surname\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15e524e6eb092286a87817f5cc0ee597\",\n \"score\": \"0.71112555\",\n \"text\": \"protected function updateFullName()\\n {\\n //====================================================================//\\n // Stack Trace\\n Splash::log()->trace();\\n //====================================================================//\\n // Get Current Values if Not Written\\n $currentName = $this->decodeFullName($this->object->name);\\n if (empty($this->firstName) && !empty($currentName[\\\"firstname\\\"])) {\\n $this->firstName = $currentName[\\\"firstname\\\"];\\n }\\n if (empty($this->lastName) && !empty($currentName[\\\"lastname\\\"])) {\\n $this->lastName = $currentName[\\\"lastname\\\"];\\n }\\n if (empty($this->companyName) && !empty($currentName[\\\"name\\\"])) {\\n $this->companyName = $currentName[\\\"name\\\"];\\n }\\n //====================================================================//\\n // No First or Last Name\\n if (empty(trim($this->firstName)) && empty(trim($this->lastName))) {\\n $this->setSimple(\\\"name\\\", $this->companyName);\\n\\n return;\\n }\\n //====================================================================//\\n // Encode Full Name String\\n $encodedFullName = $this->encodeFullName($this->firstName, $this->lastName, $this->companyName);\\n $this->setSimple(\\\"name\\\", $encodedFullName);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7d6fd0dc686817dc4df34b92be024c0\",\n \"score\": \"0.7104024\",\n \"text\": \"public function getFullname()\\n {\\n return $this->fullname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9086048562bd2bc027a7bb6dd56b5fd5\",\n \"score\": \"0.7103031\",\n \"text\": \"public static function user_full_name() {\\n global $USER;\\n $user = $USER;\\n $ismasquerading = manager::is_loggedinas();\\n\\n if ($ismasquerading) {\\n $usereal = get_config('local_analytics', 'masquerade_handling');\\n if ($usereal) {\\n $user = manager::get_realuser();\\n }\\n }\\n\\n $realname = fullname($user);\\n return $realname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b30705943ae6562d1a72a7089e127252\",\n \"score\": \"0.70671827\",\n \"text\": \"public function setFullName($value){\\n if(is_string($value)){\\n $this->full_name = $value;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fb10a8cf077a847ae667c5e2d2be923\",\n \"score\": \"0.70423067\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return sprintf(\\\"%s %s\\\", $this->first_name, $this->last_name);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74b7495a18816721599003a4c218163d\",\n \"score\": \"0.70391136\",\n \"text\": \"public function get_fullname()\\n {\\n return self::fullname($this->get_firstname(), $this->get_lastname());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f9193745bafff223654d7d3e7c2d4aa\",\n \"score\": \"0.7036912\",\n \"text\": \"public function getFullname() {\\n return $this->fullname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab8043678668e4265c11458b2e666c68\",\n \"score\": \"0.70285845\",\n \"text\": \"public function getFullNameAttribute(){\\n $full_name = $this->first_name . \\\" \\\" . $this->last_name ;\\n return $full_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12dcd29e40d22d9d8f39460c9caf7e4b\",\n \"score\": \"0.6998786\",\n \"text\": \"public function getFullname()\\n\\t{\\n\\t\\treturn $this->fullname;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ae3c5fa439d8799951483ed06fd9798\",\n \"score\": \"0.6993718\",\n \"text\": \"public function Get_Full_Name()\\n {\\n return $this->First_Name . \\\" \\\" . $this->Last_Name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6864a4055fc9e45bd45349e0848202c\",\n \"score\": \"0.6993314\",\n \"text\": \"public function getFullName()\\n\\t{\\n\\t\\t$firstName = trim($this->firstName);\\n\\t\\t$lastName = trim($this->lastName);\\n\\n\\t\\treturn $firstName.($firstName && $lastName ? ' ' : '').$lastName;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"373edc732af4dfd570ebbded30b65533\",\n \"score\": \"0.6992719\",\n \"text\": \"public function fullname($user){\\r\\n return $user->first_name.(isset($user->last_name)?\\\" \\\".$user->last_name:\\\"\\\");\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e69af68a89e054d8d2de76435728fa9\",\n \"score\": \"0.69899666\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return ucwords($this->first_name) .' '. ucwords($this->last_name);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51b6f707a91dbb3f59fb4f594e658fef\",\n \"score\": \"0.6966035\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return $this->attributes['first_name'] . ' ' . $this->attributes['last_name'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a94052c4d4e12e9b1d1796789a9813e\",\n \"score\": \"0.6960084\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return \\\"{$this->first_name} {$this->last_name}\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a94052c4d4e12e9b1d1796789a9813e\",\n \"score\": \"0.6960084\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return \\\"{$this->first_name} {$this->last_name}\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a94052c4d4e12e9b1d1796789a9813e\",\n \"score\": \"0.6960084\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return \\\"{$this->first_name} {$this->last_name}\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a94052c4d4e12e9b1d1796789a9813e\",\n \"score\": \"0.6960084\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return \\\"{$this->first_name} {$this->last_name}\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f45ee4aa3392cf63d7425fbe474ae656\",\n \"score\": \"0.6958541\",\n \"text\": \"public function getFullNameAttribute() {\\n return $this->first_name . ' ' . $this->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fcd67a3084150a9c5c08f541a4236d4\",\n \"score\": \"0.6955413\",\n \"text\": \"public function getFullname()\\n {\\n return $this->name. ' - '. $this->getSpeaker()->getFullname();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e0b4a5f8e24bb8032cfe5016ce03afb\",\n \"score\": \"0.69524556\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return $this->first_name . ' ' . $this->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e0b4a5f8e24bb8032cfe5016ce03afb\",\n \"score\": \"0.69524556\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return $this->first_name . ' ' . $this->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd15172e69c72502db86f185ff1a906c\",\n \"score\": \"0.6944636\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return $this->first_name.' '.$this->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f972b3202e795ff721eb6fcf04571a7\",\n \"score\": \"0.6940451\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n if(!$this->profile) return null;\\n return ($this->profile->first_name) ? $this->profile->first_name . ' ' . $this->profile->last_name : $this->profile->company_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1b49fa8aeb84ccba83196e55ae11277\",\n \"score\": \"0.69343144\",\n \"text\": \"public function getFullName()\\n {\\n return $this->fullName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fee30bf2a3b6402eb6a9c0fef9772ce3\",\n \"score\": \"0.6933014\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return \\\"{$this->name} {$this->last_name}\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b68f1f6088cd520cbf40e21b613779a9\",\n \"score\": \"0.6927592\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n if ($this->last_name) {\\n return \\\"{$this->first_name} {$this->last_name}\\\";\\n }\\n\\n return \\\"{$this->first_name}\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"460116f31593f76eb442c8ad051f03eb\",\n \"score\": \"0.69157666\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return $this->first_name . ' ' . $this->middle_name . ' ' . $this->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e52fd0c6f8b8eb0fa8551ffb18543b13\",\n \"score\": \"0.6907516\",\n \"text\": \"private function getFullName( array &$attributes ) {\\n\\t\\t$nameKey = array_search($this->model() . '.user_fullname', $attributes);\\n\\n\\t\\tif ( $nameKey != false ) {\\n\\t\\t\\t$attributes[$nameKey] = DB::raw(\\\"CONCAT(\\\" . $this->model() . \\\".user_firstname, ' ', \\\" . $this->model() . \\\".user_lastname) `user_fullname`\\\");\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8020716accdf4b968fe1c9dd68a9a032\",\n \"score\": \"0.69073445\",\n \"text\": \"public function fullName()\\n {\\n return $this->first_name . ' ' . $this->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf4fe0361b8eacf7f5f8d0098f2a0d0e\",\n \"score\": \"0.68913805\",\n \"text\": \"public function getFullNameAttribute(): string\\n {\\n return $this->first_name . ' ' . $this->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6cc8d489a02522ab657ca3d614f767a\",\n \"score\": \"0.68729573\",\n \"text\": \"function complete_name():string{\\n return $this->lastname.\\\" \\\".$this->firstname ;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b75b9ff4fd5813907584738f9127e55d\",\n \"score\": \"0.68708503\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n $profileData = isset($this->profile) ? $this->profile->data:[];\\n if (is_array($profileData)) {\\n $first_name = (array_key_exists('first_name',$profileData)) ? $profileData['first_name'] : '';\\n $last_name = (array_key_exists('last_name',$profileData)) ? $profileData['last_name'] : '';\\n return trim(\\\"{$first_name} {$last_name}\\\");\\n }\\n else {\\n return null;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06ffa697ff9e4793b20c2c30b02cbd29\",\n \"score\": \"0.6869545\",\n \"text\": \"public function getFullName()\\n {\\n $space = ' ';\\n\\n return $this->getFirstname() . $space . $this->getLastname();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f8d17c69df79cb6aedfcf81044cbd87\",\n \"score\": \"0.68615544\",\n \"text\": \"public function getDisplayName() {\\n if (empty($this->user['fullname'])) {\\n return $this->user['username'];\\n\\n } else {\\n return $this->user['fullname'];\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"11d850b88faa85fd867432906beb8dc7\",\n \"score\": \"0.685524\",\n \"text\": \"public function getFullName()\\n {\\n $fullName = $this->getFirstName();\\n\\n if ($this->has('last_name'))\\n $fullName .= ' '.$this->getLastName();\\n\\n return $fullName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c022e1f3989bab55acca04e00eca1f0a\",\n \"score\": \"0.6853324\",\n \"text\": \"public function getFullName() {\\n return $this->fullName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57c96b1da5e113555f5ed1e0069bcc49\",\n \"score\": \"0.67983097\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n $fullName=CustomHelper::getAdminConstants($this->id, 'full_name');\\n return ($fullName != \\\"\\\") ? $fullName : NULL;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3495a4f6f2e5bf2a5a3c6250924cf1e0\",\n \"score\": \"0.6793594\",\n \"text\": \"function get_user_fullname($user_id = \\\"\\\")\\n{\\n $data = get_user_data($user_id);\\n\\n return $data['first_name'] . \\\" \\\" . $data['last_name'];\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a96fdb604e7362fb02b4ff295bb607e5\",\n \"score\": \"0.6787529\",\n \"text\": \"public function getFullNameWithEmail()\\n {\\n return $this->firstName . ' ' . $this->lastName . ' (' . $this->email . ')';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"143f313204bd61edd2678a4bd9171b76\",\n \"score\": \"0.67873406\",\n \"text\": \"public function getFullName()\\n {\\n return $this->_fullName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a38b91693d356dbade8d3214b30024db\",\n \"score\": \"0.67858845\",\n \"text\": \"public function getFullNameAttribute(): string\\n {\\n return implode(' ', array_filter([$this->first_name, $this->last_name]));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e80de8589b573de27d61bea7ccf9649f\",\n \"score\": \"0.6779771\",\n \"text\": \"public function getFullNameAttribute() {\\n\\n return $this->name . ' ' . $this->surname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6c9068ebf2e2cce448b017748c85d34\",\n \"score\": \"0.67696595\",\n \"text\": \"public function getFullName()\\n {\\n return trim($this->fullName);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4df5fd9fdb8485393455ec1bf45f0ba\",\n \"score\": \"0.67683786\",\n \"text\": \"public function getFullName() {\\n\\t\\treturn $this->fullName;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41097064e94d81262c3bc3784b97031c\",\n \"score\": \"0.6760152\",\n \"text\": \"public function getFullName()\\n {\\n return $this->name . ' ' . $this->family;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5c20906eb8b5fba833652ba72c8593c\",\n \"score\": \"0.67523074\",\n \"text\": \"public function getFullNameAttribute()\\n\\t{\\n\\t\\treturn $this->firstname . ' ' . $this->lastname;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98ace2ae5fc37930bc576f97c0691da1\",\n \"score\": \"0.67362165\",\n \"text\": \"public static function get_name(){\\n $User = User::get_user_info();\\n $UserID = $User->UserID;\\n $User = User::retrieve_user($UserID);\\n return $User[\\\"First_Name\\\"] . \\\" \\\" . $User[\\\"Last_Name\\\"];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14e2c945db48d75936176963da8f73f4\",\n \"score\": \"0.6733791\",\n \"text\": \"public function getfullname()\\n {\\n return $this->fullname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72a1ef2f3a295366b76e391029c0b2fe\",\n \"score\": \"0.6731241\",\n \"text\": \"public function setFullName($fullName)\\n {\\n $this->fullName = $fullName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccb36676167ae1bb8966316450f842dc\",\n \"score\": \"0.67057115\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n $full_name = $this->name.' '.$this->last_name;\\n return Str::limit($full_name,25);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89b2df061f5969e5678e153860cab0f8\",\n \"score\": \"0.6688322\",\n \"text\": \"public function getFullnameAttribute()\\n {\\n return trim($this->firstname) . \\\" \\\" . trim($this->lastname);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c4b5f79ada9e638c2ed78da0dc6f4a1\",\n \"score\": \"0.6683156\",\n \"text\": \"public function get_full_name()\\n\\t{\\n\\t\\treturn $this->_path . DS . $this->_name;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c82932c4a32973c5d9c3ccfc52cf7626\",\n \"score\": \"0.6665783\",\n \"text\": \"public function getFullNameAttribute()\\n {\\n return $this->given_names . ' ' . $this->surname;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7edeafba3dd1b7c3744341368b81d97\",\n \"score\": \"0.6613892\",\n \"text\": \"public function getFullName()\\n\\t{\\n\\t\\t$aPartsFullName = array();\\n\\n\\t\\t!empty($this->surname) && $aPartsFullName[] = $this->surname;\\n\\t\\t!empty($this->name) && $aPartsFullName[] = $this->name;\\n\\t\\t!empty($this->patronymic) && $aPartsFullName[] = $this->patronymic;\\n\\n\\t\\treturn implode(' ', $aPartsFullName);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c7683f4711304622d542358ed903eed\",\n \"score\": \"0.65787905\",\n \"text\": \"public function fullName()\\n {\\n return $this->entity->first_name . ' ' . $this->entity->last_name;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c908aa2f3e11fe9d57a69ec1c0e3552f\",\n \"score\": \"0.6539839\",\n \"text\": \"function getNameForUser($user = false) {\\n\\t\\tglobal $hyphaUser;\\n\\t\\tif ($user === false)\\n\\t\\t\\t$user = $hyphaUser;\\n\\t\\tif (!$user)\\n\\t\\t\\treturn __('anonymous');\\n\\t\\treturn $user->getAttribute('fullname') ?: $user->getAttribute('username') ?: $user->getAttribute('email');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19e88ee5f8351b81611d0a790f46fd2c\",\n \"score\": \"0.6534116\",\n \"text\": \"public function setUserFullName(){\\n \\tif ($this->loggedin) {\\n \\t\\tswitch ($this->pageID) {\\n\\t \\t\\tcase 'process_login':\\n\\t \\t\\t\\t$this->getUserInfo();\\n\\t \\t\\t\\tbreak;\\n\\t \\t\\tcase 'home':\\n\\t \\t\\t\\t$this->getUserInfo();\\n\\t \\t\\t\\tbreak;\\n\\t \\t\\tcase 'leaderboard':\\n\\t \\t\\t\\t$this->getUserInfo();\\n\\t \\t\\t\\tbreak;\\n\\t \\t\\tcase 'my_account':\\n\\t \\t\\t\\t$this->getUserInfo();\\n\\t \\t\\t\\tbreak;\\n\\t \\t\\tcase 'new_game':\\n\\t \\t\\t\\t$this->getUserInfo();\\n\\t \\t\\t\\tbreak;\\n\\t \\t\\tcase 'play':\\n\\t \\t\\t\\t$this->getUserInfo();\\n\\t \\t\\t\\tbreak;\\n\\t \\t\\tdefault:\\n\\t \\t\\t\\t$this->getUserInfo();\\n\\t \\t\\t\\tbreak;\\n\\t \\t}\\n \\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2118a9f38a04748c5fd9024c515f1c3d\",\n \"score\": \"0.65179765\",\n \"text\": \"public function getFullName()\\n {\\n return $this->lowerVendor.'/'.$this->lowerName;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d268d58af0b4597291ae976de686394\",\n \"score\": \"0.6516592\",\n \"text\": \"function getUserFullName($user) {\\n\\t$name = null;\\n\\t$user = User::getDataArray($user);\\n\\tif ($user) {\\n\\t\\t$name = '';\\n\\t\\tif (isset($user['name']) && is_scalar($user['name'])) {\\n\\t\\t\\t$name = trim($user['name']);\\n\\t\\t}\\n\\t\\tif (isset($user['surname']) && is_scalar($user['surname'])) {\\n\\t\\t\\t$name .= ' '.trim($user['surname']);\\n\\t\\t}\\n\\t\\t$name = trim($name);\\n\\t\\tif ($name == '' && isset($user['username']) && is_scalar($user['username'])) {\\n\\t\\t\\t$name = trim($user['username']);\\n\\t\\t}\\n\\t}\\n\\treturn $name;\\n}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":749,"cells":{"query_id":{"kind":"string","value":"56559872530cc4c0794e7a719683cf0c"},"query":{"kind":"string","value":"USADO PARA STATUS LEITURA EM PAG ANALISE"},"positive_passages":{"kind":"list like","value":[{"docid":"6655986950cf342e91b8f44a2630da58","score":"0.0","text":"public function recuperarFimLeitura($doc_id, $user_id = null)\n\n\t\t{ \t \n\t\t\t$user_id = (is_null($user_id)) ? auth()->id() : $user_id;\t\n\n\t\t\t$Acesso_fimLeitura = $this->where('doc_id', $doc_id)\n\t\t\t->where('tipo_id', 2)\n\t\t\t->where('user_id', $user_id)\n\t\t\t->orderBy('created_at', 'desc')\n\t\t\t->first();\n\n\n\t\t\tif(!is_null($Acesso_fimLeitura)){\n\n\t\t\t\t$horarioFimLeitura = $Acesso_fimLeitura->created_at;\n\t\t\t\treturn $horarioFimLeitura;\n\t\t\t}\n\n\n\t\t\treturn null;\n\n\t\t}","title":""}],"string":"[\n {\n \"docid\": \"6655986950cf342e91b8f44a2630da58\",\n \"score\": \"0.0\",\n \"text\": \"public function recuperarFimLeitura($doc_id, $user_id = null)\\n\\n\\t\\t{ \\t \\n\\t\\t\\t$user_id = (is_null($user_id)) ? auth()->id() : $user_id;\\t\\n\\n\\t\\t\\t$Acesso_fimLeitura = $this->where('doc_id', $doc_id)\\n\\t\\t\\t->where('tipo_id', 2)\\n\\t\\t\\t->where('user_id', $user_id)\\n\\t\\t\\t->orderBy('created_at', 'desc')\\n\\t\\t\\t->first();\\n\\n\\n\\t\\t\\tif(!is_null($Acesso_fimLeitura)){\\n\\n\\t\\t\\t\\t$horarioFimLeitura = $Acesso_fimLeitura->created_at;\\n\\t\\t\\t\\treturn $horarioFimLeitura;\\n\\t\\t\\t}\\n\\n\\n\\t\\t\\treturn null;\\n\\n\\t\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"226030e08b12da7e9b2c12d53af6577f","score":"0.6955129","text":"public function getStatus(){\n \n \t \n \tif(! $this->isVigente())\n \t\treturn $this->statusDescription[Plan::STATUS_CONCLUIDO];\n \t \n \t \n \tif ($this->DOCUMENTO_APROBATORIO === null) return $this->statusDescription[Plan::STATUS_CREADO];\n \telse return $this->statusDescription[Plan::STATUS_VALIDADO];\n \n }","title":""},{"docid":"c46f657f2c072004d02a22c98b027bf6","score":"0.67780817","text":"public function GetStatus()\n\t{\n\t\t// Demnach ist der Status in IPS der einzige der vorliegt.\t\t\n\t}","title":""},{"docid":"6cbe5732d34f5a2b1c7cc18bc9747867","score":"0.6501368","text":"function getStatus() ;","title":""},{"docid":"6cbe5732d34f5a2b1c7cc18bc9747867","score":"0.65011007","text":"function getStatus() ;","title":""},{"docid":"6cbe5732d34f5a2b1c7cc18bc9747867","score":"0.65011007","text":"function getStatus() ;","title":""},{"docid":"839aad5b1b4cbc09575a842ca7bca7d4","score":"0.6494078","text":"public function getCurrentStatus(){\n \n \n \tif(! $this->isVigente())\n \t\treturn Plan::STATUS_CONCLUIDO;\n \n \n \tif ($this->DOCUMENTO_APROBATORIO === null) return Plan::STATUS_CREADO;\n \telse return Plan::STATUS_VALIDADO;\n \n }","title":""},{"docid":"1c0a519009fb56919efcd2f687a0502b","score":"0.6483854","text":"function getStato($row){\n\n\tif($row->imp_made == $row->imp_total){\n\t\treturn BANNER_TERMINATO;\n\t}\n\n\t$iRet = BANNER_NON_PUBBLICATO;\n\n\tif($row->state == '1'){\n\n\t\t$now = mosCurrentDate(\"%Y-%m-%d\");\n\t\t$time = mosCurrentDate(\"%H:%M:%S\");\n\n\t\tif($now < $row->publish_up_date){\n\t\t\t$iRet = BANNER_IN_ATTIVAZIONE;\n\t\t} else\n\t\t\tif($now == $row->publish_up_date && $time < $row->publish_up_time){\n\t\t\t\t$iRet = BANNER_IN_ATTIVAZIONE;\n\t\t\t} else\n\t\t\t\tif($now < $row->publish_down_date || $row->publish_down_date == '0000-00-00'){\n\n\t\t\t\t\t$iRet = BANNER_ATTIV0;\n\t\t\t\t\tif($row->publish_down_time < $time && $row->publish_down_time != '00:00:00'){\n\t\t\t\t\t\t$iRet = BANNER_TERMINATO;\n\t\t\t\t\t}\n\n\t\t\t\t} else\n\t\t\t\t\tif($now == $row->publish_down_date && ($time <= $row->publish_down_time || $row->publish_down_time == '00:00:00')){\n\t\t\t\t\t\t$iRet = BANNER_ATTIV0;\n\t\t\t\t\t} else\n\t\t\t\t\t\tif($now >= $row->publish_down_date){\n\t\t\t\t\t\t\t$iRet = BANNER_TERMINATO;\n\t\t\t\t\t\t}\n\t}\n\treturn $iRet;\n}","title":""},{"docid":"5556b4ec085d8937e3fb7489f27a54cf","score":"0.64268875","text":"public function getStatusPuasa()\n\t{\n\t\t$a=$this->m_puasa->getStatusPuasa();\n\t\t$b = array('statusPuasa' => $a);\n\t\techo json_encode($b);\n\t}","title":""},{"docid":"8008eca20bee944df5bc76b6688d0f29","score":"0.63970375","text":"abstract public function getStatus();","title":""},{"docid":"ab466b84faa9c79c552467f6e2ca6642","score":"0.62922955","text":"public function retornoAtivacao(){\r\n\r\n\t if(isset($_GET['ccid'])){\r\n\t $ccid = $_GET['ccid'];\r\n\t }\r\n\t\tif(isset($_GET['apikey'])){\r\n\t\t\t$api_key = $_GET['apikey'];\r\n\t\t}\r\n\t\tif(isset($_GET['status'])){\r\n\t\t if($_GET['status'] == 'falha'){\r\n\t\t\t $status = 'N'; // não ativado\r\n\t\t\t $motivo = $_GET['motivo'];\r\n\t\t }else{\r\n\t\t $status = 'A'; // ativado\r\n\t\t\t $motivo = null;\r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\t\t$resultado = $this->dao->atualizaStatusAtivacao($ccid,$status,$api_key,$motivo);\r\n\t\t\r\n\t\treturn $resultado;\r\n\t}","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"f601fb4810896ab44bd5777430e8c0d1","score":"0.6257168","text":"public function getStatus();","title":""},{"docid":"7c055427df72d622a1fa08c0ace267bb","score":"0.61871505","text":"function siguienteEstado(){\n $this->procedimiento = 'asis.ft_vacacion_ime';\n $this->transaccion = 'ASIS_SIGAV_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('json_procesos', 'json_procesos', 'text');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"bb28ee3790d97c4d967d96057b828679","score":"0.6186483","text":"public function getStatusAto()\n {\n return $this->status_ato;\n }","title":""},{"docid":"b5c49c115344ecfa489fe0f51b23a524","score":"0.61860895","text":"public function status();","title":""},{"docid":"b5c49c115344ecfa489fe0f51b23a524","score":"0.61860895","text":"public function status();","title":""},{"docid":"b5c49c115344ecfa489fe0f51b23a524","score":"0.61860895","text":"public function status();","title":""},{"docid":"54dc666160b933cab0971cd00529f26d","score":"0.6167752","text":"function anteriorEstado(){\n $this->procedimiento = 'asis.ft_vacacion_ime';\n $this->transaccion = 'ASIS_ANTV_IME';\n $this->tipo_procedimiento = 'IME';\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\n $this->setParametro('obs', 'obs', 'text');\n $this->setParametro('estado_destino', 'estado_destino', 'varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"1869fa791adf7f41954bacee528589b0","score":"0.61546934","text":"public function get_status()\n {\n }","title":""},{"docid":"1869fa791adf7f41954bacee528589b0","score":"0.61546934","text":"public function get_status()\n {\n }","title":""},{"docid":"e7bcd94acd9b9ef2c716b64db3e0bafd","score":"0.61473197","text":"public function status()\n {\n $query = \"\n call sp_campanha_status(\n ? # campanha\n ,@1\n ,@2\n );\";\n $params = array(\n $this->id_campanha\n );\n $retorno = $this->getAdapter()\n ->query($query, $params)\n ->fetch();\n\n return $retorno['status'];\n }","title":""},{"docid":"3460e82175d8d3439f169013f872d511","score":"0.61312246","text":"function getStatus(){\n $this->status = 'Unknown';\n if($this->finAid == 1 && $this->totalOwed != 0){\n if($this->finaidQuestion[1] == ''){\n $this->status = 'Waiting for finaid application';\n return;\n }else{\n $this->status = 'Waiting for finaid decision';\n return;\n }\n }\n if($this->schoolFeeOwed != 0){\n $this->status = 'Waiting for school fee payment';\n return;\n }\n if($this->countryId[1] == 0){\n $this->status = 'Waiting for country preferences';\n return;\n }\n if($this->countryId[1] != 0 && $this->countryConfirm != 1){\n $this->status = 'Waiting for country assignments';\n return;\n }\n if($this->delegateFeeOwed != 0){\n $this->status = 'Waiting for delegate fee payment';\n return;\n }\n if(sizeof($this->attendees) == 0){\n $this->status = 'Waiting for attendee info';\n return;\n }\n if($this->totalOwed < 0){\n $this->status = 'Need Refund';\n return;\n }\n if(sizeof($this->attendees) == $this->totalAttendees && $this->totalOwed == 0){\n $this->status = 'Ready';\n return;\n }\n }","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.61122787","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.6112191","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.6112191","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.6112191","text":"public function getStatus() {}","title":""},{"docid":"79cdc55c5025518a39c3400d64cb9960","score":"0.6112191","text":"public function getStatus() {}","title":""},{"docid":"cc376d61630320dfe53434373fdc57e8","score":"0.61081296","text":"public function statusBulu(){\r\n\t\t\treturn parent::lihatBulu();\r\n\t\t}","title":""},{"docid":"89a6a6cd94e180f02d04fe0b58558c62","score":"0.61038935","text":"function getStatus() {\n \t\n \t$status = array();\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_contacter'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"to_contact\"] = $result['num_contact'];\n\n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'contacte'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"contacted\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_rappeler'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"call_back\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'termine'\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n \n $status[\"deleted\"] = $result['num_contact'];\n \n $sql = \"SELECT COUNT(*) as num_motif FROM mp_activation_motifs\";\n $sel = mysql_query($sql);\n $result = mysql_fetch_array($sel);\n\n $status[\"number_motif\"] = $result['num_motif'];\n \n \n return $status;\n }","title":""},{"docid":"e56bda925b16737fb3943078e22b1f71","score":"0.6100064","text":"function anteriorEstadoPresupuesto(){\n $this->procedimiento='pre.ft_presupuesto_ime';\n $this->transaccion='PR_ANTEPR_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('obs','obs','varchar');\n\t\t$this->setParametro('estado_destino','estado_destino','varchar');\n\t\t\n\t\t\n\t\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"00e7872bd88462f965f2354a2de5c6fc","score":"0.6059581","text":"function get_status_progression( $id_parcours) {\n\n\tglobal $wpdb;\n\n\t$completed = 0;\n\n\t$episodes = get_field('episodes' , $id_parcours);\n\n\t$episodes_number = count($episodes);\n\t// init the array to be returned\n\t$progress_ar = [];\n\n\t$id_user = get_current_user_id();\n\n\t$rowcount = $wpdb->get_var(\"SELECT COUNT(*) FROM tracking WHERE id_user = $id_user AND id_parcours = $id_parcours\");\n\n\t$achieved = $rowcount;\n\t\n\tif($achieved == $episodes_number) {\n\t\t$completed = 1;\n\t}\n\n\n\t$percent = round(($achieved * 100) / $episodes_number);\n\n\t$progress_ar['completed'] = $completed;\n\t$progress_ar['percent'] = $percent;\n\t$progress_ar['achieved'] = $achieved;\n\t$progress_ar['episodes_number'] = $episodes_number;\n\n\treturn $progress_ar;\n}","title":""},{"docid":"c1b862db11f3caac45d822dd39a7b02f","score":"0.60355073","text":"function getDetailedStatus() ;","title":""},{"docid":"e6aab2931db5e5fb4707f029a2359125","score":"0.6022373","text":"function status($etapa,$idm){\n include(\"../../config.php\");\n $sqlh=\"SELECT fecha, estatus, idReg FROM historialchecklist WHERE idMenor = '$idm' AND etapa = '$etapa' \";\n $resultTable = $conexion->query($sqlh);\n if(!empty($resultTable)){\n $res = array();\n while($tupla = mysqli_fetch_array($resultTable, MYSQLI_ASSOC) ){\n $res[] = $tupla;\n }\n foreach ($res as $f){\n if($f['estatus']==0){ ?>\n

    Rechazado: []

    \n \n

    Llenado: []

    \n \n

    Verificado: []

    \n \n v_status;\n\t}","title":""},{"docid":"ff53cae1ab5bd2849fe7427a94156544","score":"0.59674937","text":"function motivoDeAnulacionDev(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNDV' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}","title":""},{"docid":"a490f5dda720cddff79156ed536d237f","score":"0.5951839","text":"public static function getAllStatus(){\n return array( self::ESTADO_PENDIENTE, self::ESTADO_ANEXADO, self::ESTADO_VALIDADO, self::ESTADO_CADUCADO, self::ESTADO_ANULADO );\n }","title":""},{"docid":"455a66c5433d03688125b679e4e2facc","score":"0.5943252","text":"public function updateStatus($id_envio)\r\n {\r\n $sql = 'SELECT `id_envio_order`, `num_albaran`'\r\n . 'FROM `' . _DB_PREFIX_ . 'tipsa_envios`'\r\n . 'WHERE `id_envio` = ' . (int) $id_envio;\r\n $envioObj = Db::getInstance()->getRow($sql);\r\n\r\n $albaran = $envioObj['num_albaran'];\r\n $id_order = $envioObj['id_envio_order'];\r\n\r\n if (Configuration::get('TIPSA_MODE') == 1) {\r\n $tipsaCodigoAgencia = Configuration::get('TIPSA_CODAGE');\r\n } else {\r\n $tipsaCodigoAgencia = Configuration::get('TIPSA_CODAGE_TEST');\r\n }\r\n\r\n $urlws = $this->getUrlConfiguration('WS');\r\n\r\n $note = $this->loginTipsaUser();\r\n\r\n foreach ($note as $value) {\r\n $details = $value->getElementsByTagName(\"strSesion\");\r\n $idsesion = $details->item(0)->nodeValue;\r\n }\r\n\r\n $note = webservicetipsa::wsConsEnvEstado($idsesion, $tipsaCodigoAgencia, $tipsaCodigoAgencia, $albaran, $urlws);\r\n\r\n foreach ($note as $value) {\r\n $estado = $value->getElementsByTagName(\"strEnvEstados\")->item(0)->nodeValue;\r\n $error = (isset($value->getElementsByTagName(\"faultstring\")->item(0)->nodeValue)) ? $value->getElementsByTagName(\"faultstring\")->item(0)->nodeValue : null;\r\n }\r\n\r\n if (isset($error) && $error != null) {\r\n PrestaShopLogger::addLog('ErrorObtainingthestatesfromWebservice : ' . $error);\r\n }\r\n\r\n $estenv = explode('V_COD_TIPO_EST', $estado);\r\n $elements = count($estenv);\r\n $estado = explode('\"', $estenv[$elements - 1]);\r\n $estado = (int) $estado[1];\r\n\r\n //assing for the states in with information of dinapaq\r\n switch ($estado) {\r\n // $estado = 1 --> TRANSITO\r\n case 1:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_TRANSITO'), $id_order);\r\n break;\r\n // $estado = 2 --> REPARTO\r\n case 2:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_TRANSITO'), $id_order);\r\n break;\r\n // $estado = 3 --> ENTREGADO\r\n case 3:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_ENTREGADO'), $id_order);\r\n break;\r\n // $estado = 4 --> INCIDENCIA\r\n case 4:\r\n $this->updateOrderStatus(Configuration::get('TIPSA_INCIDENCIA'), $id_order);\r\n break;\r\n default:\r\n PrestaShopLogger::addLog('Order State not exists in PrestaShop or not found. ID: ' . $estado);\r\n break;\r\n }\r\n }","title":""},{"docid":"27bf1ff7695169eb3a59109bed3527d7","score":"0.5935767","text":"function motivoDeAnulacionAsig(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNAS' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}","title":""},{"docid":"f67249ecaee1aaa21bd30d7973209685","score":"0.5931585","text":"function consultaEstudiantes() {\r\n if(!isset($_REQUEST['codProyecto'])||$_REQUEST['codProyecto']<0)\r\n {\r\n echo \"No se seleccionó Proyecto. Por favor regrese y seleccione una opci&oacute;n\";exit;\r\n }\r\n \r\n $estudiantes=array();\r\n $this->estudiantesExitosos=0;\r\n $codProyecto=$_REQUEST['codProyecto'];\r\n if ($codProyecto>10000)\r\n {\r\n $facultad=$codProyecto-10000;\r\n $proyectos=$this->consultarProyectos($facultad);\r\n foreach ($proyectos as $key => $proyecto) {\r\n $estudiantesProyecto=$this->consultarEstudiantes($proyecto['COD_PROYECTO']);\r\n if(is_array($estudiantesProyecto))\r\n {\r\n $estudiantes=array_merge($estudiantes,$estudiantesProyecto);\r\n }\r\n }\r\n $total=count($estudiantes);\r\n }else\r\n {\r\n $estudiantes=$this->consultarEstudiantes($codProyecto);\r\n $total=count($estudiantes);\r\n }\r\n ?>\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    &nbsp;%
    \r\n
    \r\n
    \r\n \r\n $estudiante) {\r\n $this->estudiante=$estudiante['COD_ESTUDIANTE'];\r\n $this->consultarDatos();\r\n $porcentaje = $a * 100 / $total; //saco mi valor en porcentaje\r\n echo \"\"; //llamo a la función JS(JavaScript) para actualizar el progreso\r\n flush(); //con esta funcion hago que se muestre el resultado de inmediato y no espere a terminar todo el bucle\r\n ob_flush();\r\n $a++;\r\n if(!isset($this->mensaje[$this->datosEstudiante['CODIGO']]))\r\n {\r\n $this->mensaje[$this->datosEstudiante['CODIGO']][]=\"Registro exitoso\";\r\n $this->estudiantesExitosos++;\r\n }\r\n }\r\n }else\r\n {\r\n echo \"\"; //llamo a la función JS(JavaScript) para actualizar el progreso\r\n }\r\n \r\n $this->mostrarReporteResultadoProceso($total);\r\n \r\n }","title":""},{"docid":"1488fe83d070b58b63fd0072d2272c1c","score":"0.5926945","text":"function procesar_vinculo ($datos){\n $hora_inicio=$this->s__aula_disponible['hora_inicio'];\n $hora_inicio_datos=\"{$datos['hora_inicio']}:00\";\n $hora_fin=$this->s__aula_disponible['hora_fin'];\n $hora_fin_datos=\"{$datos['hora_fin']}:00\";\n \n if(($hora_inicio_datos < $hora_fin_datos) && (($hora_inicio_datos >= $hora_inicio) && ($hora_inicio_datos <= $hora_fin)) && ($hora_fin_datos <= $hora_fin)){\n $this->procesar_carga($datos);\n $this->s__accion=\"Nop\";\n }\n else{\n $mensaje=\" El horario especificado no pertenece al rango disponible : $hora_inicio y $hora_fin hs \";\n toba::notificacion()->agregar($mensaje);\n }\n }","title":""},{"docid":"e91e19c87fe1168338644b74639e8e4c","score":"0.5919555","text":"function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }","title":""},{"docid":"b6148921474a0bfb4b069431e89508ee","score":"0.5896434","text":"public function cekStatusTransaksi()\n {\n $order_id = \"order001\";\n return $this->client->prepaid() \n -> checkStatus($order_id);\n }","title":""},{"docid":"12e19d55da39faee7a07610259f7763e","score":"0.58796954","text":"function siguienteEstadoPresupuesto(){\n $this->procedimiento = 'pre.ft_presupuesto_ime';\n $this->transaccion = 'PRE_SIGESTP_IME';\n $this->tipo_procedimiento = 'IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\t\t\n $this->setParametro('obs','obs','text');\n $this->setParametro('json_procesos','json_procesos','text');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"5df190fd7a61e7e6b9d9cef5f555a002","score":"0.5879645","text":"function reportePagoVariable(){\n\t\t$this->procedimiento='oip.ft_archivo_horas_piloto_sel';\n\t\t$this->transaccion='OIP_REPPILO_SEL';\n\t\t$this->tipo_procedimiento='SEL';\t\t\t\t\t\t\n $this->setCount(false);\n\n $this->setParametro('id_archivo_horas_piloto','id_archivo_horas_piloto','integer');\n \n //captura de datos\n $this->captura('nombre', 'varchar');\n $this->captura('gestion', 'int4');\n $this->captura('periodo', 'varchar');\n $this->captura('pago_total', 'numeric');\n $this->captura('nombre_piloto', 'varchar');\n $this->captura('escala_salarial', 'varchar');\n $this->captura('ci', 'varchar');\n $this->captura('pic_sic', 'varchar');\n $this->captura('horas_vuelo','int4');\n $this->captura('horas_simulador_full', 'int4');\n $this->captura('horas_simulador_fix', 'int4');\n $this->captura('horas_simulador_full_efectivas', 'int4');\n $this->captura('horas_simulador_fix_efectivas', 'int4');\n $this->captura('pago_variable', 'numeric');\n $this->captura('factor_esfuerzo', 'numeric');\n $this->captura('monto_horas_vuelo', 'numeric');\n $this->captura('monto_horas_simulador_full', 'numeric');\n $this->captura('monto_horas_simulador_fix', 'numeric');\n $this->captura('tipo_flota', 'varchar');\n $this->captura('pic_sic_servicio', 'varchar');\n\n\t\t//Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit; \n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n return $this->respuesta; \n }","title":""},{"docid":"56fe63deaf4caabc6f47f034435e7773","score":"0.5877223","text":"public function get_status() \n {\n $sess_stat= Session::instance()->get(\"hana_status\", array());\n if(!empty($sess_stat)) $this->status=$sess_stat;\n return $this->status;\n }","title":""},{"docid":"1eb270bac56f17dc451dfdc9e7e789e2","score":"0.5864271","text":"function AsignarVacacion(){\n\t $this->procedimiento='asis.ft_vacacion_sel';\n\t\t$this->transaccion='ASIS_ASIGVAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t$this->setCount(false); \n\t\t\n\t\t$this->tipo_conexion='seguridad';\n\t\t\n\t\t$this->arreglo=array(\"id_usuario\" =>1,\n\t\t\t\t\t\t\t \"tipo\"=>'TODOS'\n\t\t\t\t\t\t\t );\n\t\t\n\t\t$this->setParametro('id_usuario','id_usuario','int4');\t\t\t\t\t\t \n $this->captura('dias_asignados','int4');\n\n\t //Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//echo (\"entro al cron modelo vacacion juan \".$this->consulta.' fin juan');\n\t\t//exit;\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}","title":""},{"docid":"06f6be91af30217f4a00a5953ee3f055","score":"0.5863313","text":"public function getStatusPeriodeAction()\n {\t\t\n $params = $this->_request->getParams();\n\t\t$value = $this->_formula->getStatusPeriode($params);\n\t\tdie(json_encode($value));\n }","title":""},{"docid":"b58ca11ced031fbe6f16769026b8d019","score":"0.58562905","text":"private function mapPagseguroStatus($status) {\n\n if (empty($status)) {\n throw new Exception('PagSeguro not return correct status!');\n }\n $return = '';\n switch ($status) {\n // t('Awaiting payment')\n case '1':\n $return = 'completed';\n break;\n\n // t('Under analysis')\n case '2':\n $return = 'completed';\n break;\n\n // t('Paid')\n case '3':\n $return = 'completed';\n break;\n\n // t('In dispute')\n case '5':\n $return = 'authorization';\n break;\n\n // t('Refunded')\n case '6':\n $return = 'authorization';\n break;\n\n // t('Canceled')\n case '7':\n $return = 'authorization';\n break;\n }\n return $return;\n }","title":""},{"docid":"672f0dea9a5620fed40699b35416dd59","score":"0.5848403","text":"public function getJobStatus()\n {\n }","title":""},{"docid":"0bbb544031c7244d2e8249b01b4840a6","score":"0.58483726","text":"public function status() {\n \n }","title":""},{"docid":"421bd11153cdeec8a1777c2f3b470c1e","score":"0.5830176","text":"function cadNovaVisita() {\n\n $novVis = new ManipulateData();\n\n $hora = date(\"H:i:s\");\n $data = date(\"Y-m-d\");\n $quemVis = $this->quemVis;\n $obs = $this->obs;\n $idPessoa = $this->idPessoa;\n $status = 1;\n $cracha = $this->cracha;\n\n // SETANDO A TABELA A SER FEITA A INSERÇÃO\n $novVis->setTable(\"visita\");\n // SETANDO OS VALORES DO BANCO DE DADOS\n $novVis->setCamposBanco(\"visitante_data, visitante_hora, visitante_quem_vis, visitante_obs, id_pessoa, status, cracha\");\n // SETANDO OS DADOS A SEREM ADICIONADOS AO BANCO DE DADOS\n $novVis->setDados(\"'$data', '$hora', '$quemVis', '$obs', '$idPessoa', '$status', $cracha\");\n // CHAMANDO A FUNCAO DE INSERÇAO NO BANCO DE DADOS\n $novVis->insert();\n\n $sucesso = $novVis->registros_afetados(); // PASSA PARA A VARIAVEL UM BOOLEAN DE REGISTRO AFETADOS\n \n // RETORNA UMA BOOLEAN COM O STATUS DA GRAVAÇÃO\n return $sucesso;\n }","title":""},{"docid":"68589a5841883b932af25478a060c511","score":"0.5819135","text":"private function _generatePagSeguroOrderStatus()\n\t{\n\n\t\t// getting order status id from order_status table\n\t\t$lastOrdersStatusId = tep_db_fetch_array(tep_db_query(\"select max(orders_status_id) as last_status_id from \" . TABLE_ORDERS_STATUS));\n\t\t// creating new order status id\n\t\t$newStatusId = (int) $lastOrdersStatusId['last_status_id'] + 1;\n\t\t// getting languages\n\t\t$languages = tep_get_languages();\n\t\t// performing new PagSeguro orders status insertions\n\t\tforeach (array_keys(PagSeguroTransactionStatus::getStatusList()) as $status) {\n\t\t\tforeach ($languages as $language) {\n\t\t\t\t// check if status is already on database, in affirmative case, will not be installed news PagSeguro orders statuses\n\t\t\t\tif (!$this->_checkIfOrderStatusExists(PagSeguroOrderStatusTranslation::getStatusTranslation($status, strtolower($language['code'])))) {\n\t\t\t\t\ttep_db_query(\"insert into \" . TABLE_ORDERS_STATUS . \" (orders_status_id, language_id, orders_status_name) values ('\" . $newStatusId . \"', '\" . $language['id'] . \"', '\" . PagSeguroOrderStatusTranslation::getStatusTranslation($status, strtolower($language['code'])) . \"')\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t// incrementing status id after insertion of one status in all languages\n\t\t\t++$newStatusId;\n\t\t}\n\t}","title":""},{"docid":"39cd2d80d92050c5f2ac310a57a199af","score":"0.5810686","text":"function status()\n {\n $db = Database::getinstance();\n\n $status = false;\n\n $id = $this->deviceCode;\n $housecode = $this->houseCode;\n\n $db->addBound($id);\n $db->addParam(':aktor_id');\n $db->addBound($housecode);\n $db->addParam(':housecode');\n\n $result = $db->query(\"SELECT `condition` FROM log_actuator WHERE `actuator_id` = (SELECT id FROM actuator WHERE devicecode = :aktor_id AND housecode = :housecode) ORDER BY id desc LIMIT 1 \");\n\n if (isset($result[0]['condition']) AND $result[0]['condition'] == 1) {\n $status = true;\n }\n $this->status = $status;\n }","title":""},{"docid":"5b7a36b1f61165fe038382422d0f40bb","score":"0.5792467","text":"public function getEstadoPagos(){\n $pagos = $this->obtenerPagosElectronicos();\n foreach ($pagos as $pago) {\n if ($pago->estado != PagosElectronicos::PAGADO)\n return PagosElectronicos::PENDIENTE;\n }\n\n return PagosElectronicos::PAGADO;\n }","title":""},{"docid":"a5e4dbd18a88b34164b05eec06922fe8","score":"0.57870716","text":"public function getStatusLabel()\n {\n return \\BFOS\\PagseguroBundle\\Utils\\Pagseguro::$transaction_status[$this->status];\n }","title":""},{"docid":"82624717ad6c833eaf738c6f4cad4444","score":"0.5782337","text":"public function getEstado()\n {\n if (Ventas::find()->where(['copia_id' => $this->id])->exists()) {\n if (Ventas::find()->where(['copia_id' => $this->id])->andWhere(['not', ['finished_at' => null]])->exists()) {\n return 'Bloqueada';\n }\n return 'En venta';\n }\n\n return '';\n }","title":""},{"docid":"b2068f202c4dd14e13828ae065a4077b","score":"0.5780327","text":"public function verificaAppartenenza(){\n \n $sess_user=$this->session->get_userdata('LOGGEDIN');\n $this->utente=$sess_user[\"LOGGEDIN\"][\"userid\"];\n if(isset($sess_user[\"LOGGEDIN\"][\"business\"])){\n \n $this->azienda=$sess_user[\"LOGGEDIN\"][\"business\"];\n \n \n }\n \n \n }","title":""},{"docid":"9a00d64fbb16028c95b62aa38c9a0441","score":"0.57728565","text":"public function getOrdencompraStatus()\n {\n\n return $this->ordencompra_status;\n }","title":""},{"docid":"c87f926037753ddad9b43e7b801ef214","score":"0.5768423","text":"public function statoattivazione(){\n return $this->stato_attivazione;\n }","title":""},{"docid":"997cd5d67b76262207fcb54d6cc116dd","score":"0.5762409","text":"function anteriorEstadoPlanilla(){\n $this->procedimiento='plani.ft_planilla_ime';\n $this->transaccion='PLA_ANTEPLA_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_plan_pago','id_plan_pago','int4');\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('operacion','operacion','varchar');\n \n $this->setParametro('id_funcionario','id_funcionario','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n $this->setParametro('obs','obs','text');\n\t\t\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"484f02b862b3951edb899de702ce56c2","score":"0.5757657","text":"public function getStatusPeriodeAction()\n { \n $params = $this->_request->getParams();\n $value = $this->_formula->getStatusPeriode($params);\n die(json_encode($value));\n }","title":""},{"docid":"81dd6c803dd7e163dc651cdadd464b11","score":"0.57522607","text":"public function getStatus() {\n return $this->root->getAttribute('avancement');\n }","title":""},{"docid":"caa6ce9d287105fb750cf3cccbecb582","score":"0.57499176","text":"public function estatusproyecto($idproyecto){\n $estatus=5;\n \n $em=$this->em;\n \n //busco si hay en proceso\n $dql = \"select x from ProyectoBundle:Tarea x where x.proyecto= :idproyecto\";\n $query = $em->createQuery($dql);\n $query->setParameter('idproyecto',$idproyecto);\n $pro = $query->getResult();\n \n $nuevo=false;$proceso=false;$culminado=false;\n foreach ($pro as $a) {\n if($a->getEstatus()==1)$nuevo=true; \n if($a->getEstatus()==2)$proceso=true;\n if($a->getEstatus()==3)$culminado=true;\n }\n \n //si hay en proceso\n if($proceso==true or $nuevo==true and $culminado==true)$estatus=2;\n //si estan nuevos pero hay cerrados\n else if($nuevo==true and $proceso==false and $culminado==false)$estatus=1;\n //si solo hay cerrados\n else if($culminado==true and $proceso==false and $nuevo==false)$estatus=3;\n\n \n //actualizo campos en ticket\n $query = $em->createQuery('update ProyectoBundle:Proyecto x set x.estatus= :estatus WHERE x.id = :idproyecto');\n $query->setParameter('estatus', $estatus);\n $query->setParameter('idproyecto', $idproyecto);\n $query->execute(); \n \n }","title":""},{"docid":"2eca90dffce1e4b1e4f6dab386d9d1f7","score":"0.57481045","text":"function updateReservationStatus($codigo_reserva) {\r\n\r\n global $connect;\r\n\r\n $sql_update_query = \"UPDATE reserva SET estado=1 WHERE (codigo_reserva = '$codigo_reserva');\";\r\n\r\n // Realizamos la consulta a la tabla \r\n $updated = $connect->executeIDU($sql_update_query);\r\n\r\n if (!$updated) { \r\n echo \"no se pudo acceder a la base\";\r\n return false;\r\n }\r\n\r\n }","title":""},{"docid":"0593442e7d5705956d0e1c8d556c34b9","score":"0.57463396","text":"function reporteOtrosIngresos(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='plani.ft_planilla_sel';// nombre procedimiento almacenado\n $this->transaccion='PLA_RP_OTROS_ING_SEL';//nombre de la transaccion\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n\n //$this->setParametro('fecha_ini','fecha_ini','date');\n //$this->setParametro('fecha_fin','fecha_fin','date');\n $this->setParametro('gestion','gestion','integer');\n $this->setParametro('periodo','periodo','integer');\n //$this->setParametro('tipo','tipo','varchar');\n\n //defino varialbes que se capturan como retorno de la funcion\n\n\n $this->captura('nombre_empleado','text');\n $this->captura('id_funcionario','integer');\n $this->captura('sistema_fuente','varchar');\n $this->captura('monto','numeric');\n $this->captura('ci','varchar');\n $this->captura('cargo','varchar');\n $this->captura('contrato','varchar');\n $this->captura('categoria','varchar');\n $this->captura('area','varchar');\n $this->captura('regional','varchar');\n $this->captura('c31','varchar');\n $this->captura('fecha_pago','date');\n $this->captura('tipo','varchar');\n $this->captura('estado','varchar');\n $this->captura('tasa_nacional','numeric');\n $this->captura('tasa_internacional','numeric');\n $this->captura('importe_retencion','numeric');\n $this->captura('orden','varchar');\n $this->captura('ref_sep','numeric');\n $this->captura('id_fuente','integer');\n //$this->captura('prima','numeric');\n //$this->captura('retro','numeric');\n\n\n //Ejecuta la funcion\n $this->armarConsulta();\n //echo $this->getConsulta(); exit;\n $this->ejecutarConsulta();\n return $this->respuesta;\n }","title":""},{"docid":"2b09151ec3821d51c02b5142a40266e4","score":"0.5743826","text":"function recuperarGanadores(){\n\t\t$votopro = new VotaProfesional();\n\t\t$res = $votopro->recuperarGanadores();\n\t\treturn $res;\n\t}","title":""},{"docid":"4de54408374b73e1ab1aeea4f5a66552","score":"0.57427907","text":"private function retornoTransacao(){\n $this->setTid();\n $this->setDadosPedido();\n $this->setFormaPagamento();\n $this->setStatus();\n $this->setAutenticacao();\n $this->setAutorizacao();\n $this->setToken();\n $this->setCapturada();\n $this->setCancelamento();\n }","title":""},{"docid":"52841f5e4f8672684eb3cefd0023805f","score":"0.5726464","text":"public function get_status(){\n return $this->status;\n }","title":""},{"docid":"434b77b5f4e639feacc23968dd67072f","score":"0.5719836","text":"public function getStatus()\n {\n $asStatus = array();\n $asStatus['pitched']= array('label' => 'Pitched', 'value' => 'pitched', 'probability' => 15, 'shortname' => 'pitched');\n $asStatus['proposal']= array('label' => 'Proposal', 'value' => 'proposal', 'probability' => 30, 'shortname' => 'proposal');\n $asStatus['verbal_agreement']= array('label' => 'Verbal Agreement', 'value' => 'verbal_agreement', 'probability' => 80, 'shortname' => 'agreement');\n $asStatus['signed']= array('label' => 'Signed', 'value' => 'signed', 'probability' => 100, 'shortname' => 'signed');\n $asStatus['stalled']= array('label' => 'Stalled', 'value' => 'stalled', 'probability' => 5, 'shortname' => 'stalled');\n $asStatus['failed']= array('label' => 'Failed', 'value' => 'failed', 'probability' => 0, 'shortname' => 'failed');\n\n return $asStatus;\n }","title":""},{"docid":"2e078da589c797199abfcd86f2fe1e1c","score":"0.57139325","text":"function ocupados($data,$clinica){\n $sql = mysql_query(\"SELECT COUNT(status) as status FROM paciente WHERE status = '1' and clinica = '$clinica' \");\n\t$query = mysql_fetch_assoc($sql);\n\treturn $query['status'];\n }","title":""},{"docid":"a68cb6a33be6be29e191ef32b681af4b","score":"0.57027483","text":"public function getEstadoProd(){\n $consulta = \"SELECT GRAL_PAR_PRO_COD,GRAL_PAR_PRO_DESC \n FROM gral_param_propios \n WHERE GRAL_PAR_PRO_GRP=2200 AND GRAL_PAR_PRO_COD <>0\";\n return $this->mysql->query($consulta);\n }","title":""},{"docid":"2c434b124095b612b88cefe8272dd34c","score":"0.5701447","text":"public function CambiaEstatus()\n {\n \t$consulta = $this->Modelo_direccion->getAllEntradas($this->session->userdata('id_direccion'));\n \t\n \tforeach ($consulta as $key) {\n \t\t$idoficio = $key->id_recepcion;\n\n \t\tif($this->db->query(\"CALL comparar_fechas('\".$idoficio.\"')\"))\n \t\t{\n \t\t\techo 'Ejecutando Cambios';\n \t\t}else{\n \t\t\tshow_error('Error! al ejecutar');\n \t\t}\n \t}\n\n redirect(base_url() . 'Direcciones/Externos/RecepcionDir/');\n }","title":""},{"docid":"db135556bfa510554d80981422391a4d","score":"0.5683316","text":"public function getCurrentStatus() {\n\n date_default_timezone_set(\"Asia/Calcutta\");\n $time = date('H:i:s');\n $today = date('Y-m-d H:i:s');\n $numOfInstallments = DefaultData::getNumOfInstlByPeriodAndType($this->loan_period, $this->installment_type);\n $first_installment_date = '';\n $paid_aditional_interrest = 0;\n $total_paid_installment = 0;\n\n $INSTALLMENT = new Installment(NULL);\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $loan_amount = $numOfInstallments * $this->installment_amount;\n $actual_due = $loan_amount - $total_paid_installment;\n\n //daily installment\n if ($this->installment_type == 30) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+1 day');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d ' . $time);\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n $last_od_amount = 0;\n $od_interest = 0;\n $allod = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FID = new DateTime($date);\n $FID->modify($modify_range);\n $day_remove = '-1 day';\n $FID->modify($day_remove);\n $second_installment_date = $FID->format('Y-m-d ' . $time);\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n // $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\n\n $balance = $paid_all_amount_before_ins_date - $ins_total;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $AllOd = $OD->allOdByLoan();\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n //get daily loan od amount \n if (!$AllOd || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($AllOd) {\n foreach ($AllOd as $key => $allod) {\n if (strtotime($allod['od_date_start']) <= strtotime($date) && strtotime($date) <= strtotime($allod['od_date_end']) && (-1 * ($allod['od_interest_limit'])) > $balance && $allod['od_interest_limit'] < $actual_due) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify(' +23 hours +59 minutes +58 seconds');\n\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n $paid_all_amount_before_ins_date1 = 0;\n $before_payment_amounts1 = $INSTALLMENT->getPaidAmountByBeforeDate($od_date_morning, $this->id);\n\n foreach ($before_payment_amounts1 as $before_payment_amount1) {\n $paid_all_amount_before_ins_date1 += $before_payment_amount1['paid_amount'];\n }\n\n $od_interest = $this->getOdIntereset1(-$ins_total + $paid_all_amount_before_ins_date1, $allod['od_interest_limit']);\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n }\n }\n }\n }\n $total_installment_amount += $installment_amount;\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n\n $start->modify($modify_range);\n $x++;\n\n //end of the installment \n if ($numOfInstallments == $x) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify('+23 hours +59 minutes +58 seconds');\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n //check log ends with od or installment\n $last_od_date = date('D/M/Y', strtotime($od_date_morning));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+1 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n $days_between = floor(abs($end - $start) / 86400) - 1;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n $y = 0;\n\n $od_date_start1 = new DateTime($date);\n $od_date_start1->modify('+47 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n while ($y <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start1->format('Y-m-d H:i:s');\n //getting echo $od_date; before of date from current od date\n $OLDODDATE = new DateTime($od_date);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_total_amount = (float) end($od_total);\n\n $od_date_start1->modify($od_dates);\n $y++;\n }\n }\n }\n }\n //weekly installment\n } else if ($this->installment_type == 4) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+7 day');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n\n $date = $start->format('Y-m-d ' . \" 00:00:01\");\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FIDS = new DateTime($date);\n $FIDS->modify($modify_range);\n $day_remove = '-2 seconds';\n\n $FIDS->modify($day_remove);\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\n\n\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_amount_before_ins_date - $ins_total;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total || $actual_due < $od['od_interest_limit']) {\n \n } else {\n if ($od !== false) {\n\n // Declare and define two dates \n $ins_date1 = strtotime($date);\n $ins_date2 = strtotime($second_installment_date);\n\n // Formulate the Difference between two dates \n $diff = abs($ins_date2 - $ins_date1);\n\n $daysbetween = floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24 -\n (floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24))) * 30 * 60 * 60 * 24) / (60 * 60 * 24));\n\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n $od_date_start = new DateTime($date);\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\n $defult_val = $daysbetween;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysbetween && $od['od_date_start'] <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n //// od dates range\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date)) || strtotime($od['od_date_end'] . $time) <= strtotime($od_date)) {\n break;\n }\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n \n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n if (strtotime(date(\"Y/m/d\")) . \" \" . $time == $date) {\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n } else {\n if (strtotime(date(\"Y/m/d\")) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n }\n\n\n $start->modify($modify_range);\n $x++;\n\n if ($numOfInstallments == $x) {\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+7 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n $defult_val = $days_between;\n\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d H:i:s');\n\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($old_od_date) || strtotime(date(\"Y/m/d\")) <= strtotime($od_date1)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_total_amount = (float) end($od_total);\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n } else if ($this->installment_type == 1) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+1 months');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $no_of_installments = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d H:i:s');\n\n $paid_amount = 0;\n $last_od_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n $amount = $this->installment_amount;\n\n $FIDS = new DateTime($date);\n $FIDS->modify($modify_range);\n $day_remove = '-2 seconds';\n\n $FIDS->modify($day_remove);\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($od !== false) {\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n //get month and year from inst date\n $dateValue = strtotime($date);\n $year = date(\"Y\", $dateValue);\n $month = date(\"m\", $dateValue);\n\n $daysOfMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\n $od_date_start = new DateTime($date);\n\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\n\n $defult_val = $daysOfMonth - 1;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysOfMonth - 1 && $this->od_date <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date))) {\n break;\n }\n\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n array_push($od_total, $od_amount_all);\n array_push($od_amount_all_array, $od_interest);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n\n $start->modify($modify_range);\n $x++;\n\n\n if ($numOfInstallments == $x) {\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+' . $daysOfMonth . ' day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n// $od_amount_all_array_1 = array();\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d');\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date1))) {\n break;\n }\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n }\n\n $INSTALLMENT = new Installment(NULL);\n $total_paid_installment = 0;\n $paid_aditional_interrest = 0;\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $last_od_amount_balance = $od_total_amount - $paid_aditional_interrest;\n\n $all_arress = ($total_paid_installment ) - ($total_installment_amount) - $od_total_amount;\n $system_due = $loan_amount - $total_installment_amount;\n $system_due_num_of_ins = $system_due / $this->installment_amount;\n $actual_due_num_of_ins = $actual_due / $this->installment_amount;\n\n\n\n return [\n 'od_amount' => $od_total_amount,\n 'all_arress' => $all_arress,\n 'all_amount' => $balance,\n 'system-due-num-of-ins' => $system_due_num_of_ins,\n 'system-due' => $system_due,\n 'actual-due-num-of-ins' => $actual_due_num_of_ins,\n 'actual-due' => $actual_due,\n 'receipt-num-of-ins' => $total_paid_installment / $this->installment_amount,\n 'receipt' => $total_paid_installment + $paid_aditional_interrest,\n 'arrears-excess-num-of-ins' => ($total_installment_amount - $total_paid_installment) / $this->installment_amount,\n 'arrears-excess' => ($total_installment_amount) - ($total_paid_installment),\n 'installment_amount' => $amount,\n ];\n }","title":""},{"docid":"4f624a1800835f9c7d5fc9ef1e83dec7","score":"0.5680113","text":"function reportePOA(){\n $this->procedimiento='pre.ft_presupuesto_sel';\n $this->transaccion='PR_REPPOA_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n $this->captura('id_objetivo','int4');\n $this->captura('id_objetivo_fk','int4');\n $this->captura('codigo','varchar');\n $this->captura('nivel_objetivo','int4');\n $this->captura('hijos','int4');\n $this->captura('nietos','int4');\n $this->captura('hermanos','int4');\n $this->captura('sw_transaccional','varchar');\n $this->captura('cantidad_verificacion','numeric');\n $this->captura('unidad_verificacion','varchar');\n $this->captura('ponderacion','numeric');\n $this->captura('fecha_inicio','date');\n $this->captura('tipo_objetivo','varchar');\n $this->captura('descripcion','varchar');\n $this->captura('linea_base','varchar');\n $this->captura('indicador_logro','varchar');\n\n $this->captura('periodo_ejecucion','varchar');\n $this->captura('producto','varchar');\n $this->captura('fecha_fin','date');\n\n $this->captura('gestion','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n //var_dump($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }","title":""},{"docid":"68bc8975472d60c7feeaf9ee0a1b9fe2","score":"0.56798196","text":"function motivoDeAnulacion(){\n\t\t$sql = \"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNRE' and status='1'\";\n\t\treturn $this->ejecuta($sql);\n\t}","title":""},{"docid":"8bf098a72cb6c98fc17753908ad6b9b5","score":"0.56795245","text":"protected function status()\n {\n }","title":""}],"string":"[\n {\n \"docid\": \"226030e08b12da7e9b2c12d53af6577f\",\n \"score\": \"0.6955129\",\n \"text\": \"public function getStatus(){\\n \\n \\t \\n \\tif(! $this->isVigente())\\n \\t\\treturn $this->statusDescription[Plan::STATUS_CONCLUIDO];\\n \\t \\n \\t \\n \\tif ($this->DOCUMENTO_APROBATORIO === null) return $this->statusDescription[Plan::STATUS_CREADO];\\n \\telse return $this->statusDescription[Plan::STATUS_VALIDADO];\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c46f657f2c072004d02a22c98b027bf6\",\n \"score\": \"0.67780817\",\n \"text\": \"public function GetStatus()\\n\\t{\\n\\t\\t// Demnach ist der Status in IPS der einzige der vorliegt.\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6cbe5732d34f5a2b1c7cc18bc9747867\",\n \"score\": \"0.6501368\",\n \"text\": \"function getStatus() ;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6cbe5732d34f5a2b1c7cc18bc9747867\",\n \"score\": \"0.65011007\",\n \"text\": \"function getStatus() ;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6cbe5732d34f5a2b1c7cc18bc9747867\",\n \"score\": \"0.65011007\",\n \"text\": \"function getStatus() ;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"839aad5b1b4cbc09575a842ca7bca7d4\",\n \"score\": \"0.6494078\",\n \"text\": \"public function getCurrentStatus(){\\n \\n \\n \\tif(! $this->isVigente())\\n \\t\\treturn Plan::STATUS_CONCLUIDO;\\n \\n \\n \\tif ($this->DOCUMENTO_APROBATORIO === null) return Plan::STATUS_CREADO;\\n \\telse return Plan::STATUS_VALIDADO;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c0a519009fb56919efcd2f687a0502b\",\n \"score\": \"0.6483854\",\n \"text\": \"function getStato($row){\\n\\n\\tif($row->imp_made == $row->imp_total){\\n\\t\\treturn BANNER_TERMINATO;\\n\\t}\\n\\n\\t$iRet = BANNER_NON_PUBBLICATO;\\n\\n\\tif($row->state == '1'){\\n\\n\\t\\t$now = mosCurrentDate(\\\"%Y-%m-%d\\\");\\n\\t\\t$time = mosCurrentDate(\\\"%H:%M:%S\\\");\\n\\n\\t\\tif($now < $row->publish_up_date){\\n\\t\\t\\t$iRet = BANNER_IN_ATTIVAZIONE;\\n\\t\\t} else\\n\\t\\t\\tif($now == $row->publish_up_date && $time < $row->publish_up_time){\\n\\t\\t\\t\\t$iRet = BANNER_IN_ATTIVAZIONE;\\n\\t\\t\\t} else\\n\\t\\t\\t\\tif($now < $row->publish_down_date || $row->publish_down_date == '0000-00-00'){\\n\\n\\t\\t\\t\\t\\t$iRet = BANNER_ATTIV0;\\n\\t\\t\\t\\t\\tif($row->publish_down_time < $time && $row->publish_down_time != '00:00:00'){\\n\\t\\t\\t\\t\\t\\t$iRet = BANNER_TERMINATO;\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t} else\\n\\t\\t\\t\\t\\tif($now == $row->publish_down_date && ($time <= $row->publish_down_time || $row->publish_down_time == '00:00:00')){\\n\\t\\t\\t\\t\\t\\t$iRet = BANNER_ATTIV0;\\n\\t\\t\\t\\t\\t} else\\n\\t\\t\\t\\t\\t\\tif($now >= $row->publish_down_date){\\n\\t\\t\\t\\t\\t\\t\\t$iRet = BANNER_TERMINATO;\\n\\t\\t\\t\\t\\t\\t}\\n\\t}\\n\\treturn $iRet;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5556b4ec085d8937e3fb7489f27a54cf\",\n \"score\": \"0.64268875\",\n \"text\": \"public function getStatusPuasa()\\n\\t{\\n\\t\\t$a=$this->m_puasa->getStatusPuasa();\\n\\t\\t$b = array('statusPuasa' => $a);\\n\\t\\techo json_encode($b);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8008eca20bee944df5bc76b6688d0f29\",\n \"score\": \"0.63970375\",\n \"text\": \"abstract public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab466b84faa9c79c552467f6e2ca6642\",\n \"score\": \"0.62922955\",\n \"text\": \"public function retornoAtivacao(){\\r\\n\\r\\n\\t if(isset($_GET['ccid'])){\\r\\n\\t $ccid = $_GET['ccid'];\\r\\n\\t }\\r\\n\\t\\tif(isset($_GET['apikey'])){\\r\\n\\t\\t\\t$api_key = $_GET['apikey'];\\r\\n\\t\\t}\\r\\n\\t\\tif(isset($_GET['status'])){\\r\\n\\t\\t if($_GET['status'] == 'falha'){\\r\\n\\t\\t\\t $status = 'N'; // não ativado\\r\\n\\t\\t\\t $motivo = $_GET['motivo'];\\r\\n\\t\\t }else{\\r\\n\\t\\t $status = 'A'; // ativado\\r\\n\\t\\t\\t $motivo = null;\\r\\n\\t\\t }\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t$resultado = $this->dao->atualizaStatusAtivacao($ccid,$status,$api_key,$motivo);\\r\\n\\t\\t\\r\\n\\t\\treturn $resultado;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f601fb4810896ab44bd5777430e8c0d1\",\n \"score\": \"0.6257168\",\n \"text\": \"public function getStatus();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c055427df72d622a1fa08c0ace267bb\",\n \"score\": \"0.61871505\",\n \"text\": \"function siguienteEstado(){\\n $this->procedimiento = 'asis.ft_vacacion_ime';\\n $this->transaccion = 'ASIS_SIGAV_IME';\\n $this->tipo_procedimiento = 'IME';\\n //Define los parametros para la funcion\\n $this->setParametro('id_proceso_wf_act', 'id_proceso_wf_act', 'int4');\\n $this->setParametro('id_estado_wf_act', 'id_estado_wf_act', 'int4');\\n $this->setParametro('id_funcionario_usu', 'id_funcionario_usu', 'int4');\\n $this->setParametro('id_tipo_estado', 'id_tipo_estado', 'int4');\\n $this->setParametro('id_funcionario_wf', 'id_funcionario_wf', 'int4');\\n $this->setParametro('id_depto_wf', 'id_depto_wf', 'int4');\\n $this->setParametro('obs', 'obs', 'text');\\n $this->setParametro('json_procesos', 'json_procesos', 'text');\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb28ee3790d97c4d967d96057b828679\",\n \"score\": \"0.6186483\",\n \"text\": \"public function getStatusAto()\\n {\\n return $this->status_ato;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5c49c115344ecfa489fe0f51b23a524\",\n \"score\": \"0.61860895\",\n \"text\": \"public function status();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5c49c115344ecfa489fe0f51b23a524\",\n \"score\": \"0.61860895\",\n \"text\": \"public function status();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5c49c115344ecfa489fe0f51b23a524\",\n \"score\": \"0.61860895\",\n \"text\": \"public function status();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54dc666160b933cab0971cd00529f26d\",\n \"score\": \"0.6167752\",\n \"text\": \"function anteriorEstado(){\\n $this->procedimiento = 'asis.ft_vacacion_ime';\\n $this->transaccion = 'ASIS_ANTV_IME';\\n $this->tipo_procedimiento = 'IME';\\n //Define los parametros para la funcion\\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\\n $this->setParametro('obs', 'obs', 'text');\\n $this->setParametro('estado_destino', 'estado_destino', 'varchar');\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1869fa791adf7f41954bacee528589b0\",\n \"score\": \"0.61546934\",\n \"text\": \"public function get_status()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1869fa791adf7f41954bacee528589b0\",\n \"score\": \"0.61546934\",\n \"text\": \"public function get_status()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7bcd94acd9b9ef2c716b64db3e0bafd\",\n \"score\": \"0.61473197\",\n \"text\": \"public function status()\\n {\\n $query = \\\"\\n call sp_campanha_status(\\n ? # campanha\\n ,@1\\n ,@2\\n );\\\";\\n $params = array(\\n $this->id_campanha\\n );\\n $retorno = $this->getAdapter()\\n ->query($query, $params)\\n ->fetch();\\n\\n return $retorno['status'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3460e82175d8d3439f169013f872d511\",\n \"score\": \"0.61312246\",\n \"text\": \"function getStatus(){\\n $this->status = 'Unknown';\\n if($this->finAid == 1 && $this->totalOwed != 0){\\n if($this->finaidQuestion[1] == ''){\\n $this->status = 'Waiting for finaid application';\\n return;\\n }else{\\n $this->status = 'Waiting for finaid decision';\\n return;\\n }\\n }\\n if($this->schoolFeeOwed != 0){\\n $this->status = 'Waiting for school fee payment';\\n return;\\n }\\n if($this->countryId[1] == 0){\\n $this->status = 'Waiting for country preferences';\\n return;\\n }\\n if($this->countryId[1] != 0 && $this->countryConfirm != 1){\\n $this->status = 'Waiting for country assignments';\\n return;\\n }\\n if($this->delegateFeeOwed != 0){\\n $this->status = 'Waiting for delegate fee payment';\\n return;\\n }\\n if(sizeof($this->attendees) == 0){\\n $this->status = 'Waiting for attendee info';\\n return;\\n }\\n if($this->totalOwed < 0){\\n $this->status = 'Need Refund';\\n return;\\n }\\n if(sizeof($this->attendees) == $this->totalAttendees && $this->totalOwed == 0){\\n $this->status = 'Ready';\\n return;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.61122787\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.6112191\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.6112191\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.6112191\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79cdc55c5025518a39c3400d64cb9960\",\n \"score\": \"0.6112191\",\n \"text\": \"public function getStatus() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc376d61630320dfe53434373fdc57e8\",\n \"score\": \"0.61081296\",\n \"text\": \"public function statusBulu(){\\r\\n\\t\\t\\treturn parent::lihatBulu();\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89a6a6cd94e180f02d04fe0b58558c62\",\n \"score\": \"0.61038935\",\n \"text\": \"function getStatus() {\\n \\t\\n \\t$status = array();\\n \\n $sql = \\\"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_contacter'\\\";\\n $sel = mysql_query($sql);\\n $result = mysql_fetch_array($sel);\\n \\n $status[\\\"to_contact\\\"] = $result['num_contact'];\\n\\n $sql = \\\"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'contacte'\\\";\\n $sel = mysql_query($sql);\\n $result = mysql_fetch_array($sel);\\n \\n $status[\\\"contacted\\\"] = $result['num_contact'];\\n \\n $sql = \\\"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'a_rappeler'\\\";\\n $sel = mysql_query($sql);\\n $result = mysql_fetch_array($sel);\\n \\n $status[\\\"call_back\\\"] = $result['num_contact'];\\n \\n $sql = \\\"SELECT COUNT(*) as num_contact FROM mp_pile WHERE `statut` = 'termine'\\\";\\n $sel = mysql_query($sql);\\n $result = mysql_fetch_array($sel);\\n \\n $status[\\\"deleted\\\"] = $result['num_contact'];\\n \\n $sql = \\\"SELECT COUNT(*) as num_motif FROM mp_activation_motifs\\\";\\n $sel = mysql_query($sql);\\n $result = mysql_fetch_array($sel);\\n\\n $status[\\\"number_motif\\\"] = $result['num_motif'];\\n \\n \\n return $status;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e56bda925b16737fb3943078e22b1f71\",\n \"score\": \"0.6100064\",\n \"text\": \"function anteriorEstadoPresupuesto(){\\n $this->procedimiento='pre.ft_presupuesto_ime';\\n $this->transaccion='PR_ANTEPR_IME';\\n $this->tipo_procedimiento='IME';\\n \\n //Define los parametros para la funcion\\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\\n\\t\\t$this->setParametro('obs','obs','varchar');\\n\\t\\t$this->setParametro('estado_destino','estado_destino','varchar');\\n\\t\\t\\n\\t\\t\\n\\t\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00e7872bd88462f965f2354a2de5c6fc\",\n \"score\": \"0.6059581\",\n \"text\": \"function get_status_progression( $id_parcours) {\\n\\n\\tglobal $wpdb;\\n\\n\\t$completed = 0;\\n\\n\\t$episodes = get_field('episodes' , $id_parcours);\\n\\n\\t$episodes_number = count($episodes);\\n\\t// init the array to be returned\\n\\t$progress_ar = [];\\n\\n\\t$id_user = get_current_user_id();\\n\\n\\t$rowcount = $wpdb->get_var(\\\"SELECT COUNT(*) FROM tracking WHERE id_user = $id_user AND id_parcours = $id_parcours\\\");\\n\\n\\t$achieved = $rowcount;\\n\\t\\n\\tif($achieved == $episodes_number) {\\n\\t\\t$completed = 1;\\n\\t}\\n\\n\\n\\t$percent = round(($achieved * 100) / $episodes_number);\\n\\n\\t$progress_ar['completed'] = $completed;\\n\\t$progress_ar['percent'] = $percent;\\n\\t$progress_ar['achieved'] = $achieved;\\n\\t$progress_ar['episodes_number'] = $episodes_number;\\n\\n\\treturn $progress_ar;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1b862db11f3caac45d822dd39a7b02f\",\n \"score\": \"0.60355073\",\n \"text\": \"function getDetailedStatus() ;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6aab2931db5e5fb4707f029a2359125\",\n \"score\": \"0.6022373\",\n \"text\": \"function status($etapa,$idm){\\n include(\\\"../../config.php\\\");\\n $sqlh=\\\"SELECT fecha, estatus, idReg FROM historialchecklist WHERE idMenor = '$idm' AND etapa = '$etapa' \\\";\\n $resultTable = $conexion->query($sqlh);\\n if(!empty($resultTable)){\\n $res = array();\\n while($tupla = mysqli_fetch_array($resultTable, MYSQLI_ASSOC) ){\\n $res[] = $tupla;\\n }\\n foreach ($res as $f){\\n if($f['estatus']==0){ ?>\\n

    Rechazado: []

    \\n \\n

    Llenado: []

    \\n \\n

    Verificado: []

    \\n \\n v_status;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff53cae1ab5bd2849fe7427a94156544\",\n \"score\": \"0.59674937\",\n \"text\": \"function motivoDeAnulacionDev(){\\n\\t\\t$sql = \\\"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNDV' and status='1'\\\";\\n\\t\\treturn $this->ejecuta($sql);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a490f5dda720cddff79156ed536d237f\",\n \"score\": \"0.5951839\",\n \"text\": \"public static function getAllStatus(){\\n return array( self::ESTADO_PENDIENTE, self::ESTADO_ANEXADO, self::ESTADO_VALIDADO, self::ESTADO_CADUCADO, self::ESTADO_ANULADO );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"455a66c5433d03688125b679e4e2facc\",\n \"score\": \"0.5943252\",\n \"text\": \"public function updateStatus($id_envio)\\r\\n {\\r\\n $sql = 'SELECT `id_envio_order`, `num_albaran`'\\r\\n . 'FROM `' . _DB_PREFIX_ . 'tipsa_envios`'\\r\\n . 'WHERE `id_envio` = ' . (int) $id_envio;\\r\\n $envioObj = Db::getInstance()->getRow($sql);\\r\\n\\r\\n $albaran = $envioObj['num_albaran'];\\r\\n $id_order = $envioObj['id_envio_order'];\\r\\n\\r\\n if (Configuration::get('TIPSA_MODE') == 1) {\\r\\n $tipsaCodigoAgencia = Configuration::get('TIPSA_CODAGE');\\r\\n } else {\\r\\n $tipsaCodigoAgencia = Configuration::get('TIPSA_CODAGE_TEST');\\r\\n }\\r\\n\\r\\n $urlws = $this->getUrlConfiguration('WS');\\r\\n\\r\\n $note = $this->loginTipsaUser();\\r\\n\\r\\n foreach ($note as $value) {\\r\\n $details = $value->getElementsByTagName(\\\"strSesion\\\");\\r\\n $idsesion = $details->item(0)->nodeValue;\\r\\n }\\r\\n\\r\\n $note = webservicetipsa::wsConsEnvEstado($idsesion, $tipsaCodigoAgencia, $tipsaCodigoAgencia, $albaran, $urlws);\\r\\n\\r\\n foreach ($note as $value) {\\r\\n $estado = $value->getElementsByTagName(\\\"strEnvEstados\\\")->item(0)->nodeValue;\\r\\n $error = (isset($value->getElementsByTagName(\\\"faultstring\\\")->item(0)->nodeValue)) ? $value->getElementsByTagName(\\\"faultstring\\\")->item(0)->nodeValue : null;\\r\\n }\\r\\n\\r\\n if (isset($error) && $error != null) {\\r\\n PrestaShopLogger::addLog('ErrorObtainingthestatesfromWebservice : ' . $error);\\r\\n }\\r\\n\\r\\n $estenv = explode('V_COD_TIPO_EST', $estado);\\r\\n $elements = count($estenv);\\r\\n $estado = explode('\\\"', $estenv[$elements - 1]);\\r\\n $estado = (int) $estado[1];\\r\\n\\r\\n //assing for the states in with information of dinapaq\\r\\n switch ($estado) {\\r\\n // $estado = 1 --> TRANSITO\\r\\n case 1:\\r\\n $this->updateOrderStatus(Configuration::get('TIPSA_TRANSITO'), $id_order);\\r\\n break;\\r\\n // $estado = 2 --> REPARTO\\r\\n case 2:\\r\\n $this->updateOrderStatus(Configuration::get('TIPSA_TRANSITO'), $id_order);\\r\\n break;\\r\\n // $estado = 3 --> ENTREGADO\\r\\n case 3:\\r\\n $this->updateOrderStatus(Configuration::get('TIPSA_ENTREGADO'), $id_order);\\r\\n break;\\r\\n // $estado = 4 --> INCIDENCIA\\r\\n case 4:\\r\\n $this->updateOrderStatus(Configuration::get('TIPSA_INCIDENCIA'), $id_order);\\r\\n break;\\r\\n default:\\r\\n PrestaShopLogger::addLog('Order State not exists in PrestaShop or not found. ID: ' . $estado);\\r\\n break;\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27bf1ff7695169eb3a59109bed3527d7\",\n \"score\": \"0.5935767\",\n \"text\": \"function motivoDeAnulacionAsig(){\\n\\t\\t$sql = \\\"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNAS' and status='1'\\\";\\n\\t\\treturn $this->ejecuta($sql);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f67249ecaee1aaa21bd30d7973209685\",\n \"score\": \"0.5931585\",\n \"text\": \"function consultaEstudiantes() {\\r\\n if(!isset($_REQUEST['codProyecto'])||$_REQUEST['codProyecto']<0)\\r\\n {\\r\\n echo \\\"No se seleccionó Proyecto. Por favor regrese y seleccione una opci&oacute;n\\\";exit;\\r\\n }\\r\\n \\r\\n $estudiantes=array();\\r\\n $this->estudiantesExitosos=0;\\r\\n $codProyecto=$_REQUEST['codProyecto'];\\r\\n if ($codProyecto>10000)\\r\\n {\\r\\n $facultad=$codProyecto-10000;\\r\\n $proyectos=$this->consultarProyectos($facultad);\\r\\n foreach ($proyectos as $key => $proyecto) {\\r\\n $estudiantesProyecto=$this->consultarEstudiantes($proyecto['COD_PROYECTO']);\\r\\n if(is_array($estudiantesProyecto))\\r\\n {\\r\\n $estudiantes=array_merge($estudiantes,$estudiantesProyecto);\\r\\n }\\r\\n }\\r\\n $total=count($estudiantes);\\r\\n }else\\r\\n {\\r\\n $estudiantes=$this->consultarEstudiantes($codProyecto);\\r\\n $total=count($estudiantes);\\r\\n }\\r\\n ?>\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
    \\r\\n
    &nbsp;%
    \\r\\n
    \\r\\n
    \\r\\n \\r\\n $estudiante) {\\r\\n $this->estudiante=$estudiante['COD_ESTUDIANTE'];\\r\\n $this->consultarDatos();\\r\\n $porcentaje = $a * 100 / $total; //saco mi valor en porcentaje\\r\\n echo \\\"\\\"; //llamo a la función JS(JavaScript) para actualizar el progreso\\r\\n flush(); //con esta funcion hago que se muestre el resultado de inmediato y no espere a terminar todo el bucle\\r\\n ob_flush();\\r\\n $a++;\\r\\n if(!isset($this->mensaje[$this->datosEstudiante['CODIGO']]))\\r\\n {\\r\\n $this->mensaje[$this->datosEstudiante['CODIGO']][]=\\\"Registro exitoso\\\";\\r\\n $this->estudiantesExitosos++;\\r\\n }\\r\\n }\\r\\n }else\\r\\n {\\r\\n echo \\\"\\\"; //llamo a la función JS(JavaScript) para actualizar el progreso\\r\\n }\\r\\n \\r\\n $this->mostrarReporteResultadoProceso($total);\\r\\n \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1488fe83d070b58b63fd0072d2272c1c\",\n \"score\": \"0.5926945\",\n \"text\": \"function procesar_vinculo ($datos){\\n $hora_inicio=$this->s__aula_disponible['hora_inicio'];\\n $hora_inicio_datos=\\\"{$datos['hora_inicio']}:00\\\";\\n $hora_fin=$this->s__aula_disponible['hora_fin'];\\n $hora_fin_datos=\\\"{$datos['hora_fin']}:00\\\";\\n \\n if(($hora_inicio_datos < $hora_fin_datos) && (($hora_inicio_datos >= $hora_inicio) && ($hora_inicio_datos <= $hora_fin)) && ($hora_fin_datos <= $hora_fin)){\\n $this->procesar_carga($datos);\\n $this->s__accion=\\\"Nop\\\";\\n }\\n else{\\n $mensaje=\\\" El horario especificado no pertenece al rango disponible : $hora_inicio y $hora_fin hs \\\";\\n toba::notificacion()->agregar($mensaje);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e91e19c87fe1168338644b74639e8e4c\",\n \"score\": \"0.5919555\",\n \"text\": \"function updatestatus() {\\n global $_lib;\\n\\n $dataH = array();\\n $dataH['ID'] = $this->transaction->ID;\\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\\n $dataH['RemittanceStatus'] = 'sent';\\n \\n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\\n\\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6148921474a0bfb4b069431e89508ee\",\n \"score\": \"0.5896434\",\n \"text\": \"public function cekStatusTransaksi()\\n {\\n $order_id = \\\"order001\\\";\\n return $this->client->prepaid() \\n -> checkStatus($order_id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12e19d55da39faee7a07610259f7763e\",\n \"score\": \"0.58796954\",\n \"text\": \"function siguienteEstadoPresupuesto(){\\n $this->procedimiento = 'pre.ft_presupuesto_ime';\\n $this->transaccion = 'PRE_SIGESTP_IME';\\n $this->tipo_procedimiento = 'IME';\\n \\n //Define los parametros para la funcion\\n $this->setParametro('id_presupuesto','id_presupuesto','int4');\\n $this->setParametro('id_proceso_wf_act','id_proceso_wf_act','int4');\\n $this->setParametro('id_estado_wf_act','id_estado_wf_act','int4');\\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\\n $this->setParametro('id_funcionario_wf','id_funcionario_wf','int4');\\n $this->setParametro('id_depto_wf','id_depto_wf','int4');\\t\\t\\n $this->setParametro('obs','obs','text');\\n $this->setParametro('json_procesos','json_procesos','text');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5df190fd7a61e7e6b9d9cef5f555a002\",\n \"score\": \"0.5879645\",\n \"text\": \"function reportePagoVariable(){\\n\\t\\t$this->procedimiento='oip.ft_archivo_horas_piloto_sel';\\n\\t\\t$this->transaccion='OIP_REPPILO_SEL';\\n\\t\\t$this->tipo_procedimiento='SEL';\\t\\t\\t\\t\\t\\t\\n $this->setCount(false);\\n\\n $this->setParametro('id_archivo_horas_piloto','id_archivo_horas_piloto','integer');\\n \\n //captura de datos\\n $this->captura('nombre', 'varchar');\\n $this->captura('gestion', 'int4');\\n $this->captura('periodo', 'varchar');\\n $this->captura('pago_total', 'numeric');\\n $this->captura('nombre_piloto', 'varchar');\\n $this->captura('escala_salarial', 'varchar');\\n $this->captura('ci', 'varchar');\\n $this->captura('pic_sic', 'varchar');\\n $this->captura('horas_vuelo','int4');\\n $this->captura('horas_simulador_full', 'int4');\\n $this->captura('horas_simulador_fix', 'int4');\\n $this->captura('horas_simulador_full_efectivas', 'int4');\\n $this->captura('horas_simulador_fix_efectivas', 'int4');\\n $this->captura('pago_variable', 'numeric');\\n $this->captura('factor_esfuerzo', 'numeric');\\n $this->captura('monto_horas_vuelo', 'numeric');\\n $this->captura('monto_horas_simulador_full', 'numeric');\\n $this->captura('monto_horas_simulador_fix', 'numeric');\\n $this->captura('tipo_flota', 'varchar');\\n $this->captura('pic_sic_servicio', 'varchar');\\n\\n\\t\\t//Ejecuta la instruccion\\n $this->armarConsulta();\\n //echo($this->consulta);exit; \\n\\t\\t$this->ejecutarConsulta();\\n\\n\\t\\t//Devuelve la respuesta\\n return $this->respuesta; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56fe63deaf4caabc6f47f034435e7773\",\n \"score\": \"0.5877223\",\n \"text\": \"public function get_status() \\n {\\n $sess_stat= Session::instance()->get(\\\"hana_status\\\", array());\\n if(!empty($sess_stat)) $this->status=$sess_stat;\\n return $this->status;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1eb270bac56f17dc451dfdc9e7e789e2\",\n \"score\": \"0.5864271\",\n \"text\": \"function AsignarVacacion(){\\n\\t $this->procedimiento='asis.ft_vacacion_sel';\\n\\t\\t$this->transaccion='ASIS_ASIGVAC_SEL';\\n\\t\\t$this->tipo_procedimiento='SEL';//tipo de transaccion\\n\\n\\t\\t$this->setCount(false); \\n\\t\\t\\n\\t\\t$this->tipo_conexion='seguridad';\\n\\t\\t\\n\\t\\t$this->arreglo=array(\\\"id_usuario\\\" =>1,\\n\\t\\t\\t\\t\\t\\t\\t \\\"tipo\\\"=>'TODOS'\\n\\t\\t\\t\\t\\t\\t\\t );\\n\\t\\t\\n\\t\\t$this->setParametro('id_usuario','id_usuario','int4');\\t\\t\\t\\t\\t\\t \\n $this->captura('dias_asignados','int4');\\n\\n\\t //Ejecuta la instruccion\\n\\t\\t$this->armarConsulta();\\n\\t\\t\\n\\t\\t$this->ejecutarConsulta();\\n\\t\\t\\n\\t\\t//echo (\\\"entro al cron modelo vacacion juan \\\".$this->consulta.' fin juan');\\n\\t\\t//exit;\\n\\t\\t\\n\\t\\t//Devuelve la respuesta\\n\\t\\treturn $this->respuesta;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06f6be91af30217f4a00a5953ee3f055\",\n \"score\": \"0.5863313\",\n \"text\": \"public function getStatusPeriodeAction()\\n {\\t\\t\\n $params = $this->_request->getParams();\\n\\t\\t$value = $this->_formula->getStatusPeriode($params);\\n\\t\\tdie(json_encode($value));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b58ca11ced031fbe6f16769026b8d019\",\n \"score\": \"0.58562905\",\n \"text\": \"private function mapPagseguroStatus($status) {\\n\\n if (empty($status)) {\\n throw new Exception('PagSeguro not return correct status!');\\n }\\n $return = '';\\n switch ($status) {\\n // t('Awaiting payment')\\n case '1':\\n $return = 'completed';\\n break;\\n\\n // t('Under analysis')\\n case '2':\\n $return = 'completed';\\n break;\\n\\n // t('Paid')\\n case '3':\\n $return = 'completed';\\n break;\\n\\n // t('In dispute')\\n case '5':\\n $return = 'authorization';\\n break;\\n\\n // t('Refunded')\\n case '6':\\n $return = 'authorization';\\n break;\\n\\n // t('Canceled')\\n case '7':\\n $return = 'authorization';\\n break;\\n }\\n return $return;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"672f0dea9a5620fed40699b35416dd59\",\n \"score\": \"0.5848403\",\n \"text\": \"public function getJobStatus()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0bbb544031c7244d2e8249b01b4840a6\",\n \"score\": \"0.58483726\",\n \"text\": \"public function status() {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"421bd11153cdeec8a1777c2f3b470c1e\",\n \"score\": \"0.5830176\",\n \"text\": \"function cadNovaVisita() {\\n\\n $novVis = new ManipulateData();\\n\\n $hora = date(\\\"H:i:s\\\");\\n $data = date(\\\"Y-m-d\\\");\\n $quemVis = $this->quemVis;\\n $obs = $this->obs;\\n $idPessoa = $this->idPessoa;\\n $status = 1;\\n $cracha = $this->cracha;\\n\\n // SETANDO A TABELA A SER FEITA A INSERÇÃO\\n $novVis->setTable(\\\"visita\\\");\\n // SETANDO OS VALORES DO BANCO DE DADOS\\n $novVis->setCamposBanco(\\\"visitante_data, visitante_hora, visitante_quem_vis, visitante_obs, id_pessoa, status, cracha\\\");\\n // SETANDO OS DADOS A SEREM ADICIONADOS AO BANCO DE DADOS\\n $novVis->setDados(\\\"'$data', '$hora', '$quemVis', '$obs', '$idPessoa', '$status', $cracha\\\");\\n // CHAMANDO A FUNCAO DE INSERÇAO NO BANCO DE DADOS\\n $novVis->insert();\\n\\n $sucesso = $novVis->registros_afetados(); // PASSA PARA A VARIAVEL UM BOOLEAN DE REGISTRO AFETADOS\\n \\n // RETORNA UMA BOOLEAN COM O STATUS DA GRAVAÇÃO\\n return $sucesso;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68589a5841883b932af25478a060c511\",\n \"score\": \"0.5819135\",\n \"text\": \"private function _generatePagSeguroOrderStatus()\\n\\t{\\n\\n\\t\\t// getting order status id from order_status table\\n\\t\\t$lastOrdersStatusId = tep_db_fetch_array(tep_db_query(\\\"select max(orders_status_id) as last_status_id from \\\" . TABLE_ORDERS_STATUS));\\n\\t\\t// creating new order status id\\n\\t\\t$newStatusId = (int) $lastOrdersStatusId['last_status_id'] + 1;\\n\\t\\t// getting languages\\n\\t\\t$languages = tep_get_languages();\\n\\t\\t// performing new PagSeguro orders status insertions\\n\\t\\tforeach (array_keys(PagSeguroTransactionStatus::getStatusList()) as $status) {\\n\\t\\t\\tforeach ($languages as $language) {\\n\\t\\t\\t\\t// check if status is already on database, in affirmative case, will not be installed news PagSeguro orders statuses\\n\\t\\t\\t\\tif (!$this->_checkIfOrderStatusExists(PagSeguroOrderStatusTranslation::getStatusTranslation($status, strtolower($language['code'])))) {\\n\\t\\t\\t\\t\\ttep_db_query(\\\"insert into \\\" . TABLE_ORDERS_STATUS . \\\" (orders_status_id, language_id, orders_status_name) values ('\\\" . $newStatusId . \\\"', '\\\" . $language['id'] . \\\"', '\\\" . PagSeguroOrderStatusTranslation::getStatusTranslation($status, strtolower($language['code'])) . \\\"')\\\");\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t// incrementing status id after insertion of one status in all languages\\n\\t\\t\\t++$newStatusId;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39cd2d80d92050c5f2ac310a57a199af\",\n \"score\": \"0.5810686\",\n \"text\": \"function status()\\n {\\n $db = Database::getinstance();\\n\\n $status = false;\\n\\n $id = $this->deviceCode;\\n $housecode = $this->houseCode;\\n\\n $db->addBound($id);\\n $db->addParam(':aktor_id');\\n $db->addBound($housecode);\\n $db->addParam(':housecode');\\n\\n $result = $db->query(\\\"SELECT `condition` FROM log_actuator WHERE `actuator_id` = (SELECT id FROM actuator WHERE devicecode = :aktor_id AND housecode = :housecode) ORDER BY id desc LIMIT 1 \\\");\\n\\n if (isset($result[0]['condition']) AND $result[0]['condition'] == 1) {\\n $status = true;\\n }\\n $this->status = $status;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b7a36b1f61165fe038382422d0f40bb\",\n \"score\": \"0.5792467\",\n \"text\": \"public function getEstadoPagos(){\\n $pagos = $this->obtenerPagosElectronicos();\\n foreach ($pagos as $pago) {\\n if ($pago->estado != PagosElectronicos::PAGADO)\\n return PagosElectronicos::PENDIENTE;\\n }\\n\\n return PagosElectronicos::PAGADO;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5e4dbd18a88b34164b05eec06922fe8\",\n \"score\": \"0.57870716\",\n \"text\": \"public function getStatusLabel()\\n {\\n return \\\\BFOS\\\\PagseguroBundle\\\\Utils\\\\Pagseguro::$transaction_status[$this->status];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82624717ad6c833eaf738c6f4cad4444\",\n \"score\": \"0.5782337\",\n \"text\": \"public function getEstado()\\n {\\n if (Ventas::find()->where(['copia_id' => $this->id])->exists()) {\\n if (Ventas::find()->where(['copia_id' => $this->id])->andWhere(['not', ['finished_at' => null]])->exists()) {\\n return 'Bloqueada';\\n }\\n return 'En venta';\\n }\\n\\n return '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2068f202c4dd14e13828ae065a4077b\",\n \"score\": \"0.5780327\",\n \"text\": \"public function verificaAppartenenza(){\\n \\n $sess_user=$this->session->get_userdata('LOGGEDIN');\\n $this->utente=$sess_user[\\\"LOGGEDIN\\\"][\\\"userid\\\"];\\n if(isset($sess_user[\\\"LOGGEDIN\\\"][\\\"business\\\"])){\\n \\n $this->azienda=$sess_user[\\\"LOGGEDIN\\\"][\\\"business\\\"];\\n \\n \\n }\\n \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a00d64fbb16028c95b62aa38c9a0441\",\n \"score\": \"0.57728565\",\n \"text\": \"public function getOrdencompraStatus()\\n {\\n\\n return $this->ordencompra_status;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c87f926037753ddad9b43e7b801ef214\",\n \"score\": \"0.5768423\",\n \"text\": \"public function statoattivazione(){\\n return $this->stato_attivazione;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"997cd5d67b76262207fcb54d6cc116dd\",\n \"score\": \"0.5762409\",\n \"text\": \"function anteriorEstadoPlanilla(){\\n $this->procedimiento='plani.ft_planilla_ime';\\n $this->transaccion='PLA_ANTEPLA_IME';\\n $this->tipo_procedimiento='IME';\\n \\n //Define los parametros para la funcion\\n $this->setParametro('id_plan_pago','id_plan_pago','int4');\\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\\n $this->setParametro('operacion','operacion','varchar');\\n \\n $this->setParametro('id_funcionario','id_funcionario','int4');\\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\\n $this->setParametro('obs','obs','text');\\n\\t\\t\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"484f02b862b3951edb899de702ce56c2\",\n \"score\": \"0.5757657\",\n \"text\": \"public function getStatusPeriodeAction()\\n { \\n $params = $this->_request->getParams();\\n $value = $this->_formula->getStatusPeriode($params);\\n die(json_encode($value));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81dd6c803dd7e163dc651cdadd464b11\",\n \"score\": \"0.57522607\",\n \"text\": \"public function getStatus() {\\n return $this->root->getAttribute('avancement');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"caa6ce9d287105fb750cf3cccbecb582\",\n \"score\": \"0.57499176\",\n \"text\": \"public function estatusproyecto($idproyecto){\\n $estatus=5;\\n \\n $em=$this->em;\\n \\n //busco si hay en proceso\\n $dql = \\\"select x from ProyectoBundle:Tarea x where x.proyecto= :idproyecto\\\";\\n $query = $em->createQuery($dql);\\n $query->setParameter('idproyecto',$idproyecto);\\n $pro = $query->getResult();\\n \\n $nuevo=false;$proceso=false;$culminado=false;\\n foreach ($pro as $a) {\\n if($a->getEstatus()==1)$nuevo=true; \\n if($a->getEstatus()==2)$proceso=true;\\n if($a->getEstatus()==3)$culminado=true;\\n }\\n \\n //si hay en proceso\\n if($proceso==true or $nuevo==true and $culminado==true)$estatus=2;\\n //si estan nuevos pero hay cerrados\\n else if($nuevo==true and $proceso==false and $culminado==false)$estatus=1;\\n //si solo hay cerrados\\n else if($culminado==true and $proceso==false and $nuevo==false)$estatus=3;\\n\\n \\n //actualizo campos en ticket\\n $query = $em->createQuery('update ProyectoBundle:Proyecto x set x.estatus= :estatus WHERE x.id = :idproyecto');\\n $query->setParameter('estatus', $estatus);\\n $query->setParameter('idproyecto', $idproyecto);\\n $query->execute(); \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2eca90dffce1e4b1e4f6dab386d9d1f7\",\n \"score\": \"0.57481045\",\n \"text\": \"function updateReservationStatus($codigo_reserva) {\\r\\n\\r\\n global $connect;\\r\\n\\r\\n $sql_update_query = \\\"UPDATE reserva SET estado=1 WHERE (codigo_reserva = '$codigo_reserva');\\\";\\r\\n\\r\\n // Realizamos la consulta a la tabla \\r\\n $updated = $connect->executeIDU($sql_update_query);\\r\\n\\r\\n if (!$updated) { \\r\\n echo \\\"no se pudo acceder a la base\\\";\\r\\n return false;\\r\\n }\\r\\n\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0593442e7d5705956d0e1c8d556c34b9\",\n \"score\": \"0.57463396\",\n \"text\": \"function reporteOtrosIngresos(){\\n //Definicion de variables para ejecucion del procedimiento\\n $this->procedimiento='plani.ft_planilla_sel';// nombre procedimiento almacenado\\n $this->transaccion='PLA_RP_OTROS_ING_SEL';//nombre de la transaccion\\n $this->tipo_procedimiento='SEL';//tipo de transaccion\\n $this->setCount(false);\\n\\n //$this->setParametro('fecha_ini','fecha_ini','date');\\n //$this->setParametro('fecha_fin','fecha_fin','date');\\n $this->setParametro('gestion','gestion','integer');\\n $this->setParametro('periodo','periodo','integer');\\n //$this->setParametro('tipo','tipo','varchar');\\n\\n //defino varialbes que se capturan como retorno de la funcion\\n\\n\\n $this->captura('nombre_empleado','text');\\n $this->captura('id_funcionario','integer');\\n $this->captura('sistema_fuente','varchar');\\n $this->captura('monto','numeric');\\n $this->captura('ci','varchar');\\n $this->captura('cargo','varchar');\\n $this->captura('contrato','varchar');\\n $this->captura('categoria','varchar');\\n $this->captura('area','varchar');\\n $this->captura('regional','varchar');\\n $this->captura('c31','varchar');\\n $this->captura('fecha_pago','date');\\n $this->captura('tipo','varchar');\\n $this->captura('estado','varchar');\\n $this->captura('tasa_nacional','numeric');\\n $this->captura('tasa_internacional','numeric');\\n $this->captura('importe_retencion','numeric');\\n $this->captura('orden','varchar');\\n $this->captura('ref_sep','numeric');\\n $this->captura('id_fuente','integer');\\n //$this->captura('prima','numeric');\\n //$this->captura('retro','numeric');\\n\\n\\n //Ejecuta la funcion\\n $this->armarConsulta();\\n //echo $this->getConsulta(); exit;\\n $this->ejecutarConsulta();\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b09151ec3821d51c02b5142a40266e4\",\n \"score\": \"0.5743826\",\n \"text\": \"function recuperarGanadores(){\\n\\t\\t$votopro = new VotaProfesional();\\n\\t\\t$res = $votopro->recuperarGanadores();\\n\\t\\treturn $res;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4de54408374b73e1ab1aeea4f5a66552\",\n \"score\": \"0.57427907\",\n \"text\": \"private function retornoTransacao(){\\n $this->setTid();\\n $this->setDadosPedido();\\n $this->setFormaPagamento();\\n $this->setStatus();\\n $this->setAutenticacao();\\n $this->setAutorizacao();\\n $this->setToken();\\n $this->setCapturada();\\n $this->setCancelamento();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52841f5e4f8672684eb3cefd0023805f\",\n \"score\": \"0.5726464\",\n \"text\": \"public function get_status(){\\n return $this->status;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"434b77b5f4e639feacc23968dd67072f\",\n \"score\": \"0.5719836\",\n \"text\": \"public function getStatus()\\n {\\n $asStatus = array();\\n $asStatus['pitched']= array('label' => 'Pitched', 'value' => 'pitched', 'probability' => 15, 'shortname' => 'pitched');\\n $asStatus['proposal']= array('label' => 'Proposal', 'value' => 'proposal', 'probability' => 30, 'shortname' => 'proposal');\\n $asStatus['verbal_agreement']= array('label' => 'Verbal Agreement', 'value' => 'verbal_agreement', 'probability' => 80, 'shortname' => 'agreement');\\n $asStatus['signed']= array('label' => 'Signed', 'value' => 'signed', 'probability' => 100, 'shortname' => 'signed');\\n $asStatus['stalled']= array('label' => 'Stalled', 'value' => 'stalled', 'probability' => 5, 'shortname' => 'stalled');\\n $asStatus['failed']= array('label' => 'Failed', 'value' => 'failed', 'probability' => 0, 'shortname' => 'failed');\\n\\n return $asStatus;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e078da589c797199abfcd86f2fe1e1c\",\n \"score\": \"0.57139325\",\n \"text\": \"function ocupados($data,$clinica){\\n $sql = mysql_query(\\\"SELECT COUNT(status) as status FROM paciente WHERE status = '1' and clinica = '$clinica' \\\");\\n\\t$query = mysql_fetch_assoc($sql);\\n\\treturn $query['status'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a68cb6a33be6be29e191ef32b681af4b\",\n \"score\": \"0.57027483\",\n \"text\": \"public function getEstadoProd(){\\n $consulta = \\\"SELECT GRAL_PAR_PRO_COD,GRAL_PAR_PRO_DESC \\n FROM gral_param_propios \\n WHERE GRAL_PAR_PRO_GRP=2200 AND GRAL_PAR_PRO_COD <>0\\\";\\n return $this->mysql->query($consulta);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c434b124095b612b88cefe8272dd34c\",\n \"score\": \"0.5701447\",\n \"text\": \"public function CambiaEstatus()\\n {\\n \\t$consulta = $this->Modelo_direccion->getAllEntradas($this->session->userdata('id_direccion'));\\n \\t\\n \\tforeach ($consulta as $key) {\\n \\t\\t$idoficio = $key->id_recepcion;\\n\\n \\t\\tif($this->db->query(\\\"CALL comparar_fechas('\\\".$idoficio.\\\"')\\\"))\\n \\t\\t{\\n \\t\\t\\techo 'Ejecutando Cambios';\\n \\t\\t}else{\\n \\t\\t\\tshow_error('Error! al ejecutar');\\n \\t\\t}\\n \\t}\\n\\n redirect(base_url() . 'Direcciones/Externos/RecepcionDir/');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db135556bfa510554d80981422391a4d\",\n \"score\": \"0.5683316\",\n \"text\": \"public function getCurrentStatus() {\\n\\n date_default_timezone_set(\\\"Asia/Calcutta\\\");\\n $time = date('H:i:s');\\n $today = date('Y-m-d H:i:s');\\n $numOfInstallments = DefaultData::getNumOfInstlByPeriodAndType($this->loan_period, $this->installment_type);\\n $first_installment_date = '';\\n $paid_aditional_interrest = 0;\\n $total_paid_installment = 0;\\n\\n $INSTALLMENT = new Installment(NULL);\\n\\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\\n $paid_aditional_interrest += $installment[\\\"additional_interest\\\"];\\n $total_paid_installment = $total_paid_installment + $installment[\\\"paid_amount\\\"];\\n }\\n\\n $loan_amount = $numOfInstallments * $this->installment_amount;\\n $actual_due = $loan_amount - $total_paid_installment;\\n\\n //daily installment\\n if ($this->installment_type == 30) {\\n\\n $FID = new DateTime($this->effective_date . \\\" 00:00:01\\\");\\n $FID->modify('+1 day');\\n $first_installment_date = $FID->format('Y-m-d H:i:s');\\n\\n\\n $start = new DateTime($first_installment_date);\\n $first_date = $start->format('Y-m-d ' . $time);\\n\\n $x = 0;\\n $total_installment_amount = 0;\\n $ins_total = 0;\\n $total_paid = 0;\\n $od_amount_all_array = array();\\n $last_od = array();\\n $od_total = array();\\n $last_od_balance = array();\\n $od_balance_amount = array();\\n\\n while ($x < $numOfInstallments) {\\n if ($numOfInstallments == 4) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 30) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 8) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 60) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 2) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 1) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 90) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 12) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 3) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 100) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 13) {\\n $modify_range = '+7 day';\\n }\\n\\n $date = $start->format('Y-m-d ' . $time);\\n\\n $paid_amount = 0;\\n $od_amount = 0;\\n $od_amount_all = 0;\\n $balance = 0;\\n $loan_proccesign_fee_paid = 0;\\n $total_od_paid = 0;\\n $paid_all_amount_before_ins_date = 0;\\n $paid_all_od_before_ins_date = 0;\\n $last_od_amount = 0;\\n $od_interest = 0;\\n $allod = 0;\\n\\n $customer = $this->customer;\\n $CUSTOMER = new Customer($customer);\\n $route = $CUSTOMER->route;\\n $center = $CUSTOMER->center;\\n $installment_amount = $this->installment_amount;\\n\\n $FID = new DateTime($date);\\n $FID->modify($modify_range);\\n $day_remove = '-1 day';\\n $FID->modify($day_remove);\\n $second_installment_date = $FID->format('Y-m-d ' . $time);\\n $amount = $this->installment_amount;\\n $od_night = date(\\\"Y/m/d\\\");\\n\\n\\n $INSTALLMENT = new Installment(NULL);\\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\\n\\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\\n $paid_amount += $paid['paid_amount'];\\n }\\n\\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\\n\\n foreach ($before_payment_amounts as $before_payment_amount) {\\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\\n }\\n\\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\\n $start->modify($modify_range);\\n } else {\\n\\n $last_od_amount = (float) end($od_amount_all_array);\\n $od_total_amount = (float) end($od_total);\\n\\n $ins_total += $amount;\\n $total_paid += $paid_amount;\\n\\n // $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\\n\\n $balance = $paid_all_amount_before_ins_date - $ins_total;\\n\\n $OD = new OD(NULL);\\n $OD->loan = $this->id;\\n $AllOd = $OD->allOdByLoan();\\n $od = $OD->allOdByLoanAndDate($date, $balance);\\n\\n //get daily loan od amount \\n if (!$AllOd || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\\n \\n } else {\\n if ($AllOd) {\\n foreach ($AllOd as $key => $allod) {\\n if (strtotime($allod['od_date_start']) <= strtotime($date) && strtotime($date) <= strtotime($allod['od_date_end']) && (-1 * ($allod['od_interest_limit'])) > $balance && $allod['od_interest_limit'] < $actual_due) {\\n\\n $ODDATES = new DateTime($date);\\n $ODDATES->modify(' +23 hours +59 minutes +58 seconds');\\n\\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\\n\\n $paid_all_amount_before_ins_date1 = 0;\\n $before_payment_amounts1 = $INSTALLMENT->getPaidAmountByBeforeDate($od_date_morning, $this->id);\\n\\n foreach ($before_payment_amounts1 as $before_payment_amount1) {\\n $paid_all_amount_before_ins_date1 += $before_payment_amount1['paid_amount'];\\n }\\n\\n $od_interest = $this->getOdIntereset1(-$ins_total + $paid_all_amount_before_ins_date1, $allod['od_interest_limit']);\\n\\n $od_array[] = $od_interest;\\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) <= strtotime($date)) {\\n break;\\n }\\n array_push($od_amount_all_array, $od_interest);\\n array_push($od_total, $od_amount_all);\\n }\\n }\\n }\\n }\\n $total_installment_amount += $installment_amount;\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) <= strtotime($date)) {\\n break;\\n }\\n\\n $start->modify($modify_range);\\n $x++;\\n\\n //end of the installment \\n if ($numOfInstallments == $x) {\\n\\n $ODDATES = new DateTime($date);\\n $ODDATES->modify('+23 hours +59 minutes +58 seconds');\\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\\n\\n //check log ends with od or installment\\n $last_od_date = date('D/M/Y', strtotime($od_date_morning));\\n $last_installment_date = date('D/M/Y', strtotime($date));\\n\\n if ($last_od_date == $last_installment_date) {\\n $last_loop_od = $od_interest;\\n } else {\\n $last_loop_od = 0;\\n }\\n\\n //get installment end date\\n $INSTALLMENT_END = new DateTime($date);\\n $INSTALLMENT_END->modify('+1 day');\\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\\n\\n //get 5 years ahead date from installment end date\\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\\n\\n $start = strtotime($date);\\n $end = strtotime(date(\\\"Y/m/d\\\"));\\n $days_between = floor(abs($end - $start) / 86400) - 1;\\n $od = $OD->allOdByLoanAndDate($date, $balance);\\n $y = 0;\\n\\n $od_date_start1 = new DateTime($date);\\n $od_date_start1->modify('+47 hours +59 minutes +58 seconds');\\n\\n $defult_val = $days_between;\\n\\n while ($y <= $defult_val) {\\n\\n if ($od['od_date_start'] <= $od_date_start1) {\\n $od_dates = '+1 day';\\n }\\n\\n $od_date = $od_date_start1->format('Y-m-d H:i:s');\\n //getting echo $od_date; before of date from current od date\\n $OLDODDATE = new DateTime($od_date);\\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\\n\\n $OLDODDATE->modify($od_date_remove1);\\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) <= strtotime($date)) {\\n break;\\n }\\n\\n $od_array[] = $od_interest;\\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\\n\\n array_push($od_amount_all_array, $od_interest);\\n array_push($od_total, $od_amount_all);\\n\\n $od_total_amount = (float) end($od_total);\\n\\n $od_date_start1->modify($od_dates);\\n $y++;\\n }\\n }\\n }\\n }\\n //weekly installment\\n } else if ($this->installment_type == 4) {\\n\\n $FID = new DateTime($this->effective_date . \\\" 00:00:01\\\");\\n $FID->modify('+7 day');\\n $first_installment_date = $FID->format('Y-m-d H:i:s');\\n\\n\\n $start = new DateTime($first_installment_date);\\n $first_date = $start->format('Y-m-d ' . $time);\\n\\n $x = 0;\\n $total_installment_amount = 0;\\n $ins_total = 0;\\n $total_paid = 0;\\n $od_amount_all_array = array();\\n $od_array = array();\\n $last_od = array();\\n $od_total = array();\\n $last_od_balance = array();\\n $od_balance_amount = array();\\n\\n while ($x < $numOfInstallments) {\\n if ($numOfInstallments == 4) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 30) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 8) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 60) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 2) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 1) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 90) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 12) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 3) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 100) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 13) {\\n $modify_range = '+7 day';\\n }\\n\\n\\n $date = $start->format('Y-m-d ' . \\\" 00:00:01\\\");\\n\\n $paid_amount = 0;\\n $od_amount = 0;\\n $od_amount_all = 0;\\n $balance = 0;\\n $loan_proccesign_fee_paid = 0;\\n $total_od_paid = 0;\\n $paid_all_amount_before_ins_date = 0;\\n $paid_all_od_before_ins_date = 0;\\n\\n\\n $customer = $this->customer;\\n $CUSTOMER = new Customer($customer);\\n $route = $CUSTOMER->route;\\n $center = $CUSTOMER->center;\\n $installment_amount = $this->installment_amount;\\n\\n $FIDS = new DateTime($date);\\n $FIDS->modify($modify_range);\\n $day_remove = '-2 seconds';\\n\\n $FIDS->modify($day_remove);\\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\\n\\n\\n $amount = $this->installment_amount;\\n $od_night = date(\\\"Y/m/d\\\");\\n\\n $INSTALLMENT = new Installment(NULL);\\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\\n\\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\\n $paid_amount += $paid['paid_amount'];\\n }\\n\\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\\n\\n foreach ($before_payment_amounts as $before_payment_amount) {\\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\\n }\\n\\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\\n $start->modify($modify_range);\\n } else {\\n\\n $last_od_amount = (float) end($od_amount_all_array);\\n $od_total_amount = (float) end($od_total);\\n\\n $ins_total += $amount;\\n $total_paid += $paid_amount;\\n\\n $balance = $paid_all_amount_before_ins_date - $ins_total;\\n\\n $OD = new OD(NULL);\\n $OD->loan = $this->id;\\n $od = $OD->allOdByLoanAndDate($date, $balance);\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total || $actual_due < $od['od_interest_limit']) {\\n \\n } else {\\n if ($od !== false) {\\n\\n // Declare and define two dates \\n $ins_date1 = strtotime($date);\\n $ins_date2 = strtotime($second_installment_date);\\n\\n // Formulate the Difference between two dates \\n $diff = abs($ins_date2 - $ins_date1);\\n\\n $daysbetween = floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24 -\\n (floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24))) * 30 * 60 * 60 * 24) / (60 * 60 * 24));\\n\\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\\n\\n $y = 0;\\n $od_date_start = new DateTime($date);\\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\\n $defult_val = $daysbetween;\\n\\n while ($y <= $defult_val) {\\n\\n if ($defult_val <= $daysbetween && $od['od_date_start'] <= $od_date_start) {\\n $od_dates = '+1 day';\\n }\\n\\n $od_date = $od_date_start->format('Y-m-d H:i:s');\\n\\n //// od dates range\\n $ODDATES = new DateTime($od_date);\\n $ODDATES->modify($od_dates);\\n\\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\\n\\n $ODDATES->modify($od_date_remove);\\n $od_night = $ODDATES->format('Y-m-d H:i:s');\\n\\n\\n if ((strtotime(date(\\\"Y/m/d\\\")) <= strtotime($od_date)) || strtotime($od['od_date_end'] . $time) <= strtotime($od_date)) {\\n break;\\n }\\n $od_array[] = $od_interest;\\n $od_amount_all = json_encode(round(array_sum($od_array)));\\n\\n \\n array_push($od_amount_all_array, $od_interest);\\n array_push($od_total, $od_amount_all);\\n\\n $od_date_start->modify($od_dates);\\n $y++;\\n }\\n }\\n }\\n }\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) . \\\" \\\" . $time == $date) {\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) < strtotime($date)) {\\n break;\\n }\\n $total_installment_amount += $installment_amount;\\n } else {\\n if (strtotime(date(\\\"Y/m/d\\\")) < strtotime($date)) {\\n break;\\n }\\n $total_installment_amount += $installment_amount;\\n }\\n\\n\\n $start->modify($modify_range);\\n $x++;\\n\\n if ($numOfInstallments == $x) {\\n //get installment end date\\n $INSTALLMENT_END = new DateTime($date);\\n $INSTALLMENT_END->modify('+7 day');\\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\\n\\n //get 5 years ahead date from installment end date\\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\\n\\n\\n $start = strtotime($date);\\n $end = strtotime(date(\\\"Y/m/d\\\"));\\n\\n $days_between = floor(abs($end - $start) / 86400) - 1;\\n\\n $z = 0;\\n\\n $od_date_start1 = new DateTime($od_night);\\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\\n $defult_val = $days_between;\\n\\n\\n //if having od after installment end\\n if ($od !== false) {\\n\\n $last_od_date = date('D/M/Y', strtotime($od_night));\\n $last_installment_date = date('D/M/Y', strtotime($date));\\n\\n if ($last_od_date == $last_installment_date) {\\n $last_loop_od = $od_interest;\\n } else {\\n $last_loop_od = 0;\\n }\\n\\n while ($z <= $defult_val) {\\n\\n if ($od['od_date_start'] <= $od_date_start1) {\\n $od_dates = '+1 day';\\n }\\n\\n $od_date1 = $od_date_start1->format('Y-m-d H:i:s');\\n\\n //getting brfore of date from current od date\\n $OLDODDATE = new DateTime($od_date1);\\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\\n\\n $OLDODDATE->modify($od_date_remove1);\\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) <= strtotime($old_od_date) || strtotime(date(\\\"Y/m/d\\\")) <= strtotime($od_date1)) {\\n break;\\n }\\n\\n $od_array[] = $od_interest;\\n $od_amount_all = json_encode(round(array_sum($od_array)));\\n\\n array_push($od_amount_all_array, $od_interest);\\n array_push($od_total, $od_amount_all);\\n\\n $od_total_amount = (float) end($od_total);\\n\\n $od_date_start1->modify($od_dates);\\n $z++;\\n }\\n }\\n }\\n }\\n } else if ($this->installment_type == 1) {\\n\\n $FID = new DateTime($this->effective_date . \\\" 00:00:01\\\");\\n $FID->modify('+1 months');\\n $first_installment_date = $FID->format('Y-m-d H:i:s');\\n\\n\\n $start = new DateTime($first_installment_date);\\n $first_date = $start->format('Y-m-d ' . $time);\\n\\n $x = 0;\\n $no_of_installments = 0;\\n $total_installment_amount = 0;\\n $ins_total = 0;\\n $total_paid = 0;\\n $od_amount_all_array = array();\\n $od_array = array();\\n $last_od = array();\\n $od_total = array();\\n $last_od_balance = array();\\n $od_balance_amount = array();\\n\\n while ($x < $numOfInstallments) {\\n if ($numOfInstallments == 4) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 30) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 8) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 60) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 2) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 1) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 90) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 12) {\\n $modify_range = '+7 day';\\n } elseif ($numOfInstallments == 3) {\\n $modify_range = '+1 months';\\n } elseif ($numOfInstallments == 100) {\\n $modify_range = '+1 day';\\n } elseif ($numOfInstallments == 13) {\\n $modify_range = '+7 day';\\n }\\n\\n $date = $start->format('Y-m-d H:i:s');\\n\\n $paid_amount = 0;\\n $last_od_amount = 0;\\n $od_amount = 0;\\n $od_amount_all = 0;\\n $balance = 0;\\n $loan_proccesign_fee_paid = 0;\\n $total_od_paid = 0;\\n $paid_all_amount_before_ins_date = 0;\\n $paid_all_od_before_ins_date = 0;\\n\\n $customer = $this->customer;\\n $CUSTOMER = new Customer($customer);\\n $route = $CUSTOMER->route;\\n $center = $CUSTOMER->center;\\n $installment_amount = $this->installment_amount;\\n $amount = $this->installment_amount;\\n\\n $FIDS = new DateTime($date);\\n $FIDS->modify($modify_range);\\n $day_remove = '-2 seconds';\\n\\n $FIDS->modify($day_remove);\\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\\n\\n $od_night = date(\\\"Y/m/d\\\");\\n\\n $INSTALLMENT = new Installment(NULL);\\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\\n\\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\\n $paid_amount += $paid['paid_amount'];\\n }\\n\\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\\n\\n foreach ($before_payment_amounts as $before_payment_amount) {\\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\\n }\\n\\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\\n $start->modify($modify_range);\\n } else {\\n\\n $last_od_amount = (float) end($od_amount_all_array);\\n $od_total_amount = (float) end($od_total);\\n\\n $ins_total += $amount;\\n $total_paid += $paid_amount;\\n\\n $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\\n\\n $OD = new OD(NULL);\\n $OD->loan = $this->id;\\n $od = $OD->allOdByLoanAndDate($date, $balance);\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\\n \\n } else {\\n if ($od !== false) {\\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\\n\\n $y = 0;\\n //get month and year from inst date\\n $dateValue = strtotime($date);\\n $year = date(\\\"Y\\\", $dateValue);\\n $month = date(\\\"m\\\", $dateValue);\\n\\n $daysOfMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);\\n\\n $od_date_start = new DateTime($date);\\n\\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\\n\\n $defult_val = $daysOfMonth - 1;\\n\\n while ($y <= $defult_val) {\\n\\n if ($defult_val <= $daysOfMonth - 1 && $this->od_date <= $od_date_start) {\\n $od_dates = '+1 day';\\n }\\n\\n $od_date = $od_date_start->format('Y-m-d H:i:s');\\n\\n if ((strtotime(date(\\\"Y/m/d\\\")) <= strtotime($od_date))) {\\n break;\\n }\\n\\n $ODDATES = new DateTime($od_date);\\n $ODDATES->modify($od_dates);\\n\\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\\n\\n $ODDATES->modify($od_date_remove);\\n\\n $od_night = $ODDATES->format('Y-m-d H:i:s');\\n\\n $od_array[] = $od_interest;\\n $od_amount_all = json_encode(round(array_sum($od_array)));\\n\\n array_push($od_total, $od_amount_all);\\n array_push($od_amount_all_array, $od_interest);\\n\\n $od_date_start->modify($od_dates);\\n $y++;\\n }\\n }\\n }\\n }\\n\\n\\n if (strtotime(date(\\\"Y/m/d\\\")) <= strtotime($date)) {\\n break;\\n }\\n $total_installment_amount += $installment_amount;\\n\\n $start->modify($modify_range);\\n $x++;\\n\\n\\n if ($numOfInstallments == $x) {\\n\\n //get installment end date\\n $INSTALLMENT_END = new DateTime($date);\\n $INSTALLMENT_END->modify('+' . $daysOfMonth . ' day');\\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\\n\\n //get 5 years ahead date from installment end date\\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\\n\\n\\n $start = strtotime($date);\\n $end = strtotime(date(\\\"Y/m/d\\\"));\\n\\n $days_between = floor(abs($end - $start) / 86400) - 1;\\n\\n $z = 0;\\n\\n $od_date_start1 = new DateTime($od_night);\\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\\n\\n $defult_val = $days_between;\\n\\n //if having od after installment end\\n if ($od !== false) {\\n\\n $last_od_date = date('D/M/Y', strtotime($od_night));\\n $last_installment_date = date('D/M/Y', strtotime($date));\\n\\n// $od_amount_all_array_1 = array();\\n while ($z <= $defult_val) {\\n\\n if ($od['od_date_start'] <= $od_date_start1) {\\n $od_dates = '+1 day';\\n }\\n\\n $od_date1 = $od_date_start1->format('Y-m-d');\\n\\n if ((strtotime(date(\\\"Y/m/d\\\")) <= strtotime($od_date1))) {\\n break;\\n }\\n //getting brfore of date from current od date\\n $OLDODDATE = new DateTime($od_date1);\\n\\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\\n\\n $OLDODDATE->modify($od_date_remove1);\\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\\n\\n $od_array[] = $od_interest;\\n\\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\\n\\n\\n array_push($od_amount_all_array, $od_interest);\\n array_push($od_total, $od_amount_all);\\n\\n $od_date_start1->modify($od_dates);\\n $z++;\\n }\\n }\\n }\\n }\\n }\\n\\n $INSTALLMENT = new Installment(NULL);\\n $total_paid_installment = 0;\\n $paid_aditional_interrest = 0;\\n\\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\\n $paid_aditional_interrest += $installment[\\\"additional_interest\\\"];\\n $total_paid_installment = $total_paid_installment + $installment[\\\"paid_amount\\\"];\\n }\\n\\n $last_od_amount_balance = $od_total_amount - $paid_aditional_interrest;\\n\\n $all_arress = ($total_paid_installment ) - ($total_installment_amount) - $od_total_amount;\\n $system_due = $loan_amount - $total_installment_amount;\\n $system_due_num_of_ins = $system_due / $this->installment_amount;\\n $actual_due_num_of_ins = $actual_due / $this->installment_amount;\\n\\n\\n\\n return [\\n 'od_amount' => $od_total_amount,\\n 'all_arress' => $all_arress,\\n 'all_amount' => $balance,\\n 'system-due-num-of-ins' => $system_due_num_of_ins,\\n 'system-due' => $system_due,\\n 'actual-due-num-of-ins' => $actual_due_num_of_ins,\\n 'actual-due' => $actual_due,\\n 'receipt-num-of-ins' => $total_paid_installment / $this->installment_amount,\\n 'receipt' => $total_paid_installment + $paid_aditional_interrest,\\n 'arrears-excess-num-of-ins' => ($total_installment_amount - $total_paid_installment) / $this->installment_amount,\\n 'arrears-excess' => ($total_installment_amount) - ($total_paid_installment),\\n 'installment_amount' => $amount,\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f624a1800835f9c7d5fc9ef1e83dec7\",\n \"score\": \"0.5680113\",\n \"text\": \"function reportePOA(){\\n $this->procedimiento='pre.ft_presupuesto_sel';\\n $this->transaccion='PR_REPPOA_SEL';\\n $this->tipo_procedimiento='SEL';\\n\\n //Define los parametros para la funcion\\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\\n\\n $this->captura('id_objetivo','int4');\\n $this->captura('id_objetivo_fk','int4');\\n $this->captura('codigo','varchar');\\n $this->captura('nivel_objetivo','int4');\\n $this->captura('hijos','int4');\\n $this->captura('nietos','int4');\\n $this->captura('hermanos','int4');\\n $this->captura('sw_transaccional','varchar');\\n $this->captura('cantidad_verificacion','numeric');\\n $this->captura('unidad_verificacion','varchar');\\n $this->captura('ponderacion','numeric');\\n $this->captura('fecha_inicio','date');\\n $this->captura('tipo_objetivo','varchar');\\n $this->captura('descripcion','varchar');\\n $this->captura('linea_base','varchar');\\n $this->captura('indicador_logro','varchar');\\n\\n $this->captura('periodo_ejecucion','varchar');\\n $this->captura('producto','varchar');\\n $this->captura('fecha_fin','date');\\n\\n $this->captura('gestion','varchar');\\n\\n //Ejecuta la instruccion\\n $this->armarConsulta();\\n //var_dump($this->consulta);exit;\\n $this->ejecutarConsulta();\\n\\n //Devuelve la respuesta\\n return $this->respuesta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68bc8975472d60c7feeaf9ee0a1b9fe2\",\n \"score\": \"0.56798196\",\n \"text\": \"function motivoDeAnulacion(){\\n\\t\\t$sql = \\\"SELECT * FROM motivo_movimiento WHERE tipo_motivo='ANULACIÓNRE' and status='1'\\\";\\n\\t\\treturn $this->ejecuta($sql);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8bf098a72cb6c98fc17753908ad6b9b5\",\n \"score\": \"0.56795245\",\n \"text\": \"protected function status()\\n {\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":750,"cells":{"query_id":{"kind":"string","value":"0e71ac8467a2cc53c258fb2a0e14438b"},"query":{"kind":"string","value":"returns list of supported filetypes of this parser"},"positive_passages":{"kind":"list like","value":[{"docid":"0852b04be296a46ff0f25b37b792c57f","score":"0.8152007","text":"public static function getSupportedFiletypes() : array\n {\n return static::$supportedFiletypes;\n }","title":""}],"string":"[\n {\n \"docid\": \"0852b04be296a46ff0f25b37b792c57f\",\n \"score\": \"0.8152007\",\n \"text\": \"public static function getSupportedFiletypes() : array\\n {\\n return static::$supportedFiletypes;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"7991efc46fb6b46813e34663d3e52b98","score":"0.7941198","text":"public function getSupportedFileTypes(): SupportedFileTypes\n\t{\n\t\t// TODO: Implement getSupportedFileTypes() method.\n\t}","title":""},{"docid":"8dd23ca048ce8a6e0b08df1fdcfadb1e","score":"0.77492476","text":"public function getFileTypes()\n {\n return $this->fileTypes;\n }","title":""},{"docid":"c765e9c1063a21d4941e40fc0d7d378d","score":"0.7744338","text":"public function getFileTypes()\n {\n return $this->_fileTypes;\n }","title":""},{"docid":"5d252bee0fa01e34979d6dd29f94572b","score":"0.7743971","text":"function supported_filetypes() {\n return '*';\n }","title":""},{"docid":"109175829014d0e26ebf5d3a703fc78c","score":"0.76487833","text":"function getSupportedFileFormats();","title":""},{"docid":"26ecd478c34c9f8abef55096a5312056","score":"0.76447797","text":"public function getAllowedFileTypes() {\n return $this->__allowedFileTypes;\n }","title":""},{"docid":"95075893d6825b7b9de32f5938348e4a","score":"0.7618363","text":"public function getFileTypes()\n {\n return $this->filetype;\n }","title":""},{"docid":"01df91bf94acaa2cb8494eb855048b79","score":"0.7365744","text":"static function getTypesFile() {\n return array(\"pdf\");\n }","title":""},{"docid":"c62e312c1ce562f194ceefb490b873be","score":"0.7363318","text":"public function getTypes() {\r\n\t\t$ext = $this->getExtension();\r\n\t\treturn ThairaUploadsFilePeer::getTypes($ext);\r\n\t}","title":""},{"docid":"59feadaad995f71e5def661c1973eac7","score":"0.7143862","text":"function getMimeTypes();","title":""},{"docid":"34975741d5ea924a372ee2050b4c71ca","score":"0.71367306","text":"public function getAllowedFilesTypesAsArray()\n {\n $fTypesArr = array();\n\n if(!empty($this->_allowedFileTypes)) {\n $fTypesArr = preg_split('/[,;]/', $this->_allowedFileTypes);\n }\n\n return $fTypesArr;\n }","title":""},{"docid":"2cb581a1204b88fee42478b5fd15fe9f","score":"0.7040511","text":"public function getFilesWithType()\n {\n $files = array();\n $finfo = \\finfo_open(\\FILEINFO_MIME_TYPE);\n foreach ($this->getFiles() as $file) {\n $tmp['file'] = $file;\n $mimeType = \\finfo_file($finfo, $file->getPathname());\n $tmp['is_image'] = \\preg_match('/^image\\//', $mimeType);\n $files[] = $tmp;\n }\n\n return $files;\n }","title":""},{"docid":"2bb34b081d9b6512512219cf51a7c5a6","score":"0.70001","text":"public function getFileExtensions()\n {\n return $this->parserFactory->getFileExtensions();\n }","title":""},{"docid":"d60d7e9793638d9618587d214915790c","score":"0.6908944","text":"public function mimeTypes(): array\n {\n return $this->mimeTypes;\n }","title":""},{"docid":"73fc4611d8bd82cb22e2406aeead703d","score":"0.6903262","text":"public function mimeTypes();","title":""},{"docid":"021eaa774da93c3ded66b73e192ad5ad","score":"0.6884486","text":"public function getFileTypeAllowableValues()\n {\n return [\n self::FILE_TYPE_MP4,\n self::FILE_TYPE_M4_A,\n self::FILE_TYPE_TRANSCRIPT,\n self::FILE_TYPE_CHAT,\n self::FILE_TYPE_CC,\n self::FILE_TYPE_CSV,\n self::FILE_TYPE_CHAT_MESSAGE,\n ];\n }","title":""},{"docid":"e7582015b429ee56bb3e431e9a2663bc","score":"0.6826673","text":"abstract protected function getImportFileTypes(): array;","title":""},{"docid":"244dcde4a02b9b62f0c022d347258837","score":"0.6822569","text":"public function getHandledMimeTypes(): array;","title":""},{"docid":"1e5884e05221eccba0c1d1bf7e08db49","score":"0.6819619","text":"public abstract function getSupportedTypes();","title":""},{"docid":"1b80fab3e690f6701460e53b9826b8c5","score":"0.673387","text":"public function getMimetypes(): array {\n\t\treturn Capabilities::MIMETYPES;\n\t}","title":""},{"docid":"662d69226d526f5487d90f47a8111f20","score":"0.6712976","text":"public function getAllowedFileTypesAsText()\n {\n return (string)$this->_allowedFileTypes;\n }","title":""},{"docid":"9d7531f97e0408764eede666c0afd104","score":"0.6690665","text":"public function getFileTypes($format = 'map')\n\t{\n\t\t$list = $this->getConfig('filetypes','jpg,jpeg,gif,png,JPG,JPEG,GIF,PNG');\n\n\t\t// Remove excluded file types (those that have a - prefix character) from the list\n\t\t$data \t= array();\n\t\t\n\t\tforeach(explode(',', $list) as $group) {\t\n\t\t\tif (substr(trim($group), 0, 1) === '-') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// remove excluded file types (those that have a - prefix character) from the list\n\t\t\t$data[] = preg_replace('#(,)?-([\\w]+)#', '', $group);\n\t\t}\n\t\t\n\t\t$list = implode(',', $data);\n\n\t\tswitch ($format) {\n\t\t\tcase 'list':\n\t\t\t\treturn $this->listFileTypes($list);\n\t\t\t\tbreak;\n\t\t\tcase 'array':\n\t\t\t\treturn explode(',', $this->listFileTypes($list));\n\t\t\t\tbreak;\n\t\t\tcase 'reg':\n\t\t\t\treturn str_replace(',', '|', $list);\n\t\t\t\tbreak; \n\t\t\tdefault:\n\t\t\tcase 'map':\n\t\t\t\treturn $list;\n\t\t\t\tbreak;\n\t\t}\n\t}","title":""},{"docid":"3defe8d19f626801f49b7c295fed536f","score":"0.6672405","text":"public static function getContentType()\n {\n return ['core', 'file'];\n }","title":""},{"docid":"abb03ada3a3cf72e852cef1a87e49102","score":"0.66678345","text":"private function getAllowedMimeTypes() {\n $result = [];\n\n $allowedExtensions = c('Garden.Upload.AllowedFileExtensions', []);\n if (is_array($allowedExtensions)) {\n foreach ($allowedExtensions as $extension) {\n if ($mimeTypes = $this->lookupMime($extension)) {\n $result = array_merge($result, $mimeTypes);\n }\n }\n }\n\n return $result;\n }","title":""},{"docid":"f0b43d160b50527ff78aff99b970d8ea","score":"0.665208","text":"public static function getMimeTypes(): array\n {\n return [\n 'image/jpeg',\n 'image/png',\n 'image/tiff',\n 'text/plain',\n 'image/bmp',\n 'application/pdf',\n ];\n }","title":""},{"docid":"321270fe45d2c3bfbaf2834fa5e384f5","score":"0.66252023","text":"public function get_option_toolset_types() {\n\t\treturn self::get_option( true, self::OPTION_EXTENSION_TYPES, [] );\n\t}","title":""},{"docid":"f98c55c9c1ecf408dd00dd1e17183444","score":"0.65908325","text":"public static function getImageMimetypes()\n {\n return [\n 'image/jpg',\n 'image/jpeg',\n 'image/gif',\n 'image/png',\n ];\n }","title":""},{"docid":"5dcf21aa5d2abebcb4971acfbe99d1ca","score":"0.65899146","text":"public function getSupportedTypes()\n {\n return array(\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-excel.sheet.macroEnabled.12',\n 'application/vnd.ms-excel'\n );\n }","title":""},{"docid":"298142dcd485592f43de538f6ad2809a","score":"0.65791494","text":"function getMimeTypes() {\r\n $out = array();\r\n if (file_exists('/etc/mime.types')) {\r\n $file = fopen('/etc/mime.types', 'r');\r\n while(($line = fgets($file)) !== false) {\r\n $line = trim(preg_replace('/#.*/', '', $line));\r\n if(!$line)\r\n continue;\r\n $parts = preg_split('/\\s+/', $line);\r\n if(count($parts) == 1)\r\n continue;\r\n $type = array_shift($parts);\r\n foreach($parts as $part)\r\n $out[$part] = $type;\r\n }\r\n fclose($file);\r\n } else {\r\n $out['js'] = 'application/javascript';\r\n $out['png'] = 'image/png';\r\n $out['css'] = 'text/css';\r\n $out['txt'] = 'text/plain';\r\n $out['gif'] = 'image/gif';\r\n $out['jpg'] = 'image/jpeg';\r\n $out['svg'] = 'image/svg+xml';\r\n $out['mp4'] = 'video/mp4';\r\n $out['html'] = 'text/html';\r\n $out['ttf'] = 'application/octet-stream';\r\n $out['eot'] = 'application/octet-stream';\r\n $out['woff'] = 'application/octet-stream';\r\n }\r\n return $out;\r\n}","title":""},{"docid":"1aca7c3d68a555139ab798e58cabc81c","score":"0.65462744","text":"function getMimeTypes()\n{\n return array(\n // text\n 'txt' => 'text/plain',\n 'ini' => 'text/plain',\n 'htm' => 'text/html',\n 'html' => 'text/html',\n 'php' => 'text/html',\n 'css' => 'text/css',\n 'js' => 'application/javascript',\n 'json' => 'application/json',\n 'xml' => 'application/xml',\n 'xsl' => 'application/xml',\n 'sql' => 'application/x-sql',\n 'wsdl' => 'text/xml',\n 'csv' => 'text/csv',\n\n // images / fonts\n 'png' => 'image/png',\n 'jpe' => 'image/jpeg',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'gif' => 'image/gif',\n 'bmp' => 'image/bmp',\n 'ico' => 'image/vnd.microsoft.icon',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'svg' => 'image/svg+xml',\n 'svgz' => 'image/svg+xml',\n 'ttf' => 'font/ttf',\n 'eot' => 'application/vnd.ms-fontobject',\n 'woff' => 'application/x-font-woff',\n\n // archives\n 'zip' => 'application/zip',\n 'rar' => 'application/x-rar-compressed',\n 'exe' => 'application/x-msdownload',\n 'msi' => 'application/x-msdownload',\n 'cab' => 'application/vnd.ms-cab-compressed',\n 'class' => 'application/java-vm',\n 'jar' => 'application/java-archive',\n\n // multimedia\n 'mp3' => 'audio/mpeg',\n 'qt' => 'video/quicktime',\n 'mov' => 'video/quicktime',\n 'flv' => 'video/x-flv',\n 'swf' => 'application/x-shockwave-flash',\n\n // adobe\n 'pdf' => 'application/pdf',\n 'psd' => 'image/vnd.adobe.photoshop',\n 'ai' => 'application/postscript',\n 'eps' => 'application/postscript',\n 'ps' => 'application/postscript',\n\n // ms office\n 'doc' => 'application/msword',\n 'rtf' => 'application/rtf',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n\n // open office\n 'odt' => 'application/vnd.oasis.opendocument.text',\n 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\n );\n}","title":""},{"docid":"4910d6ac503afb1b8488255da12c0cc2","score":"0.6543765","text":"public function getAllowedMimeTypes() {\n\t\t$mime_types = explode(',', $this->settings['attachment']['allowedMimeTypes']);\n\t\tif (empty($mime_types)) {\n\t\t\t$res = array('text/plain');\n\t\t} else {\n\t\t\tforeach ($mime_types AS $mime_type) {\n\t\t\t\t$res[] = trim($mime_type);\n\t\t\t}\n\t\t}\n\n\t\treturn $res;\n\t}","title":""},{"docid":"9f8a5d72766e081f7cd130d96897d25b","score":"0.65183127","text":"public function getAllowedMimeTypesAndExtensions() {\n\t\treturn $this->allowedMimeTypesAndExtensions;\n\t}","title":""},{"docid":"6c570b3d6fe3a64de3238e1a14bd6703","score":"0.65169644","text":"public static function GetAllowedMediaTypes()\n {\n return ['gif', 'jpg', 'jpeg', 'jpe', 'png'];\n }","title":""},{"docid":"01bd1a47f68da58b6ed5c6b4302021bf","score":"0.6475976","text":"public function getImageMimeTypes(): array\n {\n return $this->imageMimeTypes;\n }","title":""},{"docid":"31dabccbce80d0d1d102e28dddee9bb6","score":"0.6472951","text":"public function getMimeTypes()\n {\n return $this->getResponse()->getMimeTypes();\n }","title":""},{"docid":"e7abf0173b72b7079727e3fb6688b835","score":"0.64470464","text":"public function provideMimeTypes()\n {\n return array(\n array(ImageStrategy::MEDIA_TYPE , true),\n array(VideoStrategy::MEDIA_TYPE , false),\n array(AudioStrategy::MEDIA_TYPE , false),\n array(PdfStrategy::MEDIA_TYPE , false),\n array(DefaultStrategy::MEDIA_TYPE, false)\n );\n }","title":""},{"docid":"32c2378ee57f0c17afc5c19a66a12a51","score":"0.64294326","text":"protected function _getAllowedExtensions()\n {\n return ['jpg', 'jpeg', 'gif', 'png', 'svg'];\n }","title":""},{"docid":"e627c9d99248d1b06a10aab342247c70","score":"0.6427188","text":"public function getSupportedExtensions()\n {\n return [\n '*'\n ];\n }","title":""},{"docid":"183705129fc65c8cd6987004ca7d82dc","score":"0.6424038","text":"function system_extension_mime_types() {\n $out = array();\n $file = fopen('/etc/mime.types', 'r');\n while (($line = fgets($file)) !== false) {\n $line = trim(preg_replace('/#.*/', '', $line));\n if (!$line)\n continue;\n $parts = preg_split('/\\s+/', $line);\n if (count($parts) == 1)\n continue;\n $type = array_shift($parts);\n foreach ($parts as $part)\n $out[$part] = $type;\n }\n fclose($file);\n return $out;\n}","title":""},{"docid":"e00ce6989cb78add5fb9406317782566","score":"0.6414168","text":"public function getFileTypeRestrictions() {\n\t\treturn array();\n\t}","title":""},{"docid":"7372947e7f32fb735da50ef56a59d88e","score":"0.6399789","text":"public function get_supported_extensions() {\n return $this->ext;\n }","title":""},{"docid":"5477b12c9d0f910c4648e92ab4c7a7c3","score":"0.6352156","text":"public static function get_type_option_names() {\n return array('imageheight', 'maxfiles', 'pluginname');\n }","title":""},{"docid":"e7821389602a45c59e4173ea0ad48c1d","score":"0.6351792","text":"protected function _getAllowedExtensions()\r\n {\r\n return array('ico', 'png', 'gif', 'jpg', 'jpeg', 'apng', 'svg');\r\n }","title":""},{"docid":"9b2cd74e4188e9c462cce6e9c8240a1a","score":"0.6350954","text":"public function getMimetypesOptional(): array {\n\t\treturn Capabilities::MIMETYPES_OPTIONAL;\n\t}","title":""},{"docid":"a77e9be172d1aaebacbc0fcff61e391d","score":"0.63348025","text":"public function getAllowedMimeTypesAsArray() {\n\t\treturn \\array_keys($this->allowedMimeTypesAndExtensions);\n\t}","title":""},{"docid":"da29a170fd2b95727801ea22479e89f4","score":"0.6329699","text":"function google_filetypes() {\n $types = array (\n 'doc' => array(\n 'name' => get_string('google_doc', 'mod_googledocs'),\n 'mimetype' => 'application/vnd.google-apps.document',\n 'icon' => 'docs.svg',\n ),\n 'sheet' => array(\n 'name' => get_string('google_sheet', 'mod_googledocs'),\n 'mimetype' => 'application/vnd.google-apps.spreadsheet',\n 'icon' => 'sheets.svg',\n ),\n 'slides' => array(\n 'name' => get_string('google_slides', 'mod_googledocs'),\n 'mimetype' => 'application/vnd.google-apps.presentation',\n 'icon' => 'slides.svg',\n ),\n );\n\n return $types;\n}","title":""},{"docid":"949b9609563987d5f7fd185ba70146df","score":"0.631274","text":"public function getAllowedMimeTypes()\n {\n return sfConfig::get('app_rt_asset_allowed_mime_types', rtAssetToolkit::getCommonMimeTypes());\n }","title":""},{"docid":"9c3ba2ed292b66bfdb9ea30156ea1175","score":"0.63118184","text":"function system_mime_type_extensions() {\n # extension listed to be canonical).\n $out = array();\n $file = fopen('/etc/mime.types', 'r');\n while (($line = fgets($file)) !== false) {\n $line = trim(preg_replace('/#.*/', '', $line));\n if (!$line) {\n continue;\n }\n $parts = preg_split('/\\s+/', $line);\n if (count($parts) == 1) {\n continue;\n }\n $type = array_shift($parts);\n if (!isset($out[$type])) {\n $out[$type] = array_shift($parts);\n }\n // we only support mp3s for now and lame expects the extentsion to be mp3\n // not mpga which is what is coming from the mimetype file.\n if ($type == 'audio/mpeg') {\n $out[$type] = 'mp3';\n }\n\n }\n fclose($file);\n return $out;\n}","title":""},{"docid":"5d016198de73f486dd0d3431b7a2ba59","score":"0.63104445","text":"protected function _getAllowedExtensions()\n {\n return ['jpg', 'jpeg', 'png'];\n }","title":""},{"docid":"119cdf19a044647e87f474ae8a0b584c","score":"0.6232511","text":"public function getMimeTypes(): ?array\n {\n if ($this->mimeTypes === null) {\n $mimeTypes = $this->wordpress->getAllowedMimeTypes();\n $fullMimeTypes = [];\n\n foreach ($mimeTypes as $extensions => $mineType) {\n $extensions = explode('|', $extensions);\n\n foreach ($extensions as $extension) {\n $fullMimeTypes[$extension] = $mineType;\n }\n }\n\n $this->mimeTypes = $fullMimeTypes;\n }\n\n return $this->mimeTypes;\n }","title":""},{"docid":"3ab00b02d21c4a41dcf9528a6f633eac","score":"0.620741","text":"static function getList()\n\t{\n\t\tself::init();\n\t\t\n\t\tself::$exts = self::getExtensions();\n\t\t\n\t\t$liste = array();\n\t\t\n\t\tif (!empty( self::$exts ))\n\t\t\tforeach( self::$exts as $ext => &$e)\n\t\t\t\tif (!$e['disabled'])\n\t\t\t\t\t$liste[ $ext ] = $e['file'];\n\t\treturn $liste;\n\t}","title":""},{"docid":"fd0dde2b9a91f1892f4ae99d3d6a3e9f","score":"0.62058246","text":"public function getTypes()\n {\n $result = array();\n foreach ($this->mime_types as $key => $val) {\n $result[] = array('name' => $key, 'value' => $val);\n }\n echo json_encode($result);\n }","title":""},{"docid":"a6604c6cb83a2bf23e138affb35d710e","score":"0.6199748","text":"public function getFileType();","title":""},{"docid":"425d6b61c489856356cf763e4ddf0206","score":"0.6199347","text":"function allowed_media_types($isVideo=false){\n\tif(!$isVideo)\n\t\treturn array_merge($GLOBALS['video_extensions'],$GLOBALS['audio_conf']['allowed_formats']);\n\telse\n\t\treturn $GLOBALS['video_extensions'];\n}","title":""},{"docid":"9f96249e43be7d01074ac9cbfa201623","score":"0.61980885","text":"public function getSupportedTagTypes()\n {\n return [\n 'properties' => [],\n 'methods' => [],\n 'mixins' => [],\n 'other' => []\n ];\n }","title":""},{"docid":"8142bf4f6cba19122d27f7b393a1ec53","score":"0.61818004","text":"function get_allowed_image_file_types()\n{\n $supported = str_replace(' ', '', get_option('valid_images'));\n return $supported;\n}","title":""},{"docid":"c8d2e1553c2fe26d01e8cc2926a81a67","score":"0.61596084","text":"function get_allowed_audio_file_types()\n{\n $supported = str_replace(' ', '', get_option('valid_audios'));\n return $supported;\n}","title":""},{"docid":"c3111ce62a9b333027509529d5bcf1a8","score":"0.61575127","text":"function get_allowed_video_file_types()\n{\n $supported = str_replace(' ', '', get_option('valid_videos'));\n if (get_option('allow_audio_videos') == '1') {\n $supported .= ',' . get_allowed_audio_file_types();\n }\n $supported .= ',pdf';\n if (has_privilege(get_member(), 'use_very_dangerous_comcode')) {\n $supported .= ',swf';\n }\n return $supported;\n}","title":""},{"docid":"2cf424d8b49deb9ce8473113691ea91c","score":"0.6125372","text":"public function supported_returntypes() {\n return FILE_INTERNAL;\n }","title":""},{"docid":"c1ef46dd771593d6f075fe0371bfa595","score":"0.6124226","text":"public function supportedTypes(): array\n {\n return array_reduce(\n $this->factories,\n function ($types, FormLayoutFactory $factory) {\n return array_merge($types, $factory->supportedTypes());\n },\n []\n );\n }","title":""},{"docid":"48f83b5ef644a80ac216830d5e04fa0a","score":"0.61239856","text":"public function supported_returntypes() {\n return FILE_INTERNAL | FILE_EXTERNAL; // Does not appear to work if I return just FILE_EXTERNAL.\n // From moodle 2.3, we support file reference.\n // See moodle docs for more information. e.g return FILE_INTERNAL | FILE_EXTERNAL | FILE_REFERENCE;.\n }","title":""},{"docid":"af1fcddf58c8f8d172b4931114ef187a","score":"0.6122013","text":"public function get_files() {\n if ($this->prototypetype != 0) { // Is this a prototype question?\n $files = array(); // Don't load the files twice.\n } else {\n // Load any files from the prototype.\n $this->get_prototype();\n $files = self::get_support_files($this->prototype);\n }\n $files = array_merge($files, self::get_support_files($this)); // Add in files for this question.\n return $files;\n }","title":""},{"docid":"f247761eee27cd7af61c0bf1c1668ea2","score":"0.6121582","text":"public function getWatchedFileTypes()\n {\n $fileTypes = $this->watchedFileTypes;\n\n $this->extend('updateWatchedFileTypes', $fileTypes);\n\n return $fileTypes;\n }","title":""},{"docid":"6f6d27e2a860e36af8d955aa005e1fbc","score":"0.6116254","text":"public function getTypes() {\n $dir = APPLICATION_PATH . \"/modules/managementtype/forms/\";\n if (is_dir($dir)) {\n $i = 1;\n if ($dh = opendir($dir)) {\n while (($file = readdir($dh)) !== false) {\n\n if (($file != \".\") AND ($file != \"..\")) {\n $type = explode(\".php\", $file);\n $managementype[$i] = $type['0'];\n $i++;\n }\n }\n }\n }\n closedir($dh);\n return $managementype;\n }","title":""},{"docid":"c0241e4cf27142b4ff3f4da953839fee","score":"0.6112363","text":"public static function getTypes()\n\t{\n\t\treturn array(\n\t\t\tself::GALLERY\t\t=> 'Портфолио',\n\t\t\tself::DEVELOPMENT\t=> 'Производство',\n\t\t\tself::CAPABILITY\t=> 'Возможности',\n\t\t);\n\t}","title":""},{"docid":"fc7ece2f2f8df48d5cce8e99c20a0023","score":"0.6111798","text":"static function parseableDataMediaTypes()\n\t{\n\t\tstatic $parseable_data_media_types = null;\n\t\t\n\t\tif ( is_null( $parseable_data_media_types ) )\n\t\t{\n\t\t\t$parseable_data_media_types =\n\t\t\t array( 'multipart/related', 'multipart/mixed' );\n\t\t}\n\t\t\n\t\treturn $parseable_data_media_types;\n\t}","title":""},{"docid":"4e8a629f9b3ba3fa8d9f636865ce7b5a","score":"0.6082294","text":"public function listTypes();","title":""},{"docid":"b05b7ecd05c2f1c654697b198346e24c","score":"0.6076845","text":"function get_content_types()\n\t{\n\t\treturn config::get_content_types($this->appname);\n\t}","title":""},{"docid":"e460528c26993b5a63e86d5450ffe125","score":"0.6067291","text":"public function filter_upload_mime_types() {\n\n\t}","title":""},{"docid":"31cb2fbd5de84991a64c8c0cf948eef6","score":"0.60507447","text":"public static function getAllowedExtensions()\n\t{\n\t $extensions = ModUtil::getVar('MUFiles', 'allowedExtensions');\n\t //$extensions = explode(',', $extensions);\n\t return $extensions;\n\t}","title":""},{"docid":"8526283d38b12c5f7c07b67eeaa03351","score":"0.6038998","text":"function getAllowedExtensions()\r\n {\r\n global $config;\r\n $allowed_ext = array();\r\n if (!$this->getCurrentDir() or !$curr_dir_data = $this->getCurrentDirData()) {\r\n return $allowed_ext;\r\n }\r\n\r\n $filetypes = $config->getConfigValue('PG_SPAWFM_FILETYPES');\r\n\r\n if ($curr_type = $this->getCurrentType()) {\r\n $allowed_ext = $filetypes[$curr_type];\r\n } elseif (!empty($curr_dir_data['params']['allowed_filetypes'])) {\r\n if (!is_array($curr_dir_data['params']['allowed_filetypes'])) {\r\n $curr_dir_data['params']['allowed_filetypes'] = array($curr_dir_data['params']['allowed_filetypes']);\r\n }\r\n if (sizeof($curr_dir_data['params']['allowed_filetypes'])) {\r\n foreach ($curr_dir_data['params']['allowed_filetypes'] as $ftype) {\r\n if (strlen($ftype) and $ftype{0} == '.') { // extension specified\r\n $allowed_ext[] = $ftype;\r\n } elseif (isset($filetypes[$ftype])) { // filetype group specified\r\n $allowed_ext = array_merge($allowed_ext, $filetypes[$ftype]);\r\n }\r\n }\r\n }\r\n }\r\n return $allowed_ext;\r\n }","title":""},{"docid":"47eae02497b97e6bb1f751a691bc3796","score":"0.6034457","text":"public static function getSupportedImageTypes ()\n {\n return self::$supportedImageTypes;\n }","title":""},{"docid":"13c4500c71ef4611a1b693823b40f1d0","score":"0.60326976","text":"public function getSupportedExtensions()\n {\n if (array_key_exists(\"supportedExtensions\", $this->_propDict)) {\n return $this->_propDict[\"supportedExtensions\"];\n } else {\n return null;\n }\n }","title":""},{"docid":"1986b211aa7a59788152bc6a309176ad","score":"0.601573","text":"function list_files() {\n return array();\n }","title":""},{"docid":"9d2960a438ff018c5c2863248e84e38a","score":"0.6010392","text":"function bpxcftr_get_allowed_file_extensions( $type ) {\n\n\t$extensions = array(\n\t\t'file' => array(\n\t\t\t'doc',\n\t\t\t'docx',\n\t\t\t'pdf',\n\t\t),\n\t\t'image' => array(\n\t\t\t'jpg',\n\t\t\t'jpeg',\n\t\t\t'gif',\n\t\t\t'png',\n\t\t),\n\t);\n\n\t$extensions = apply_filters( 'bpxcftr_allowed_extensions', $extensions );\n\n\treturn isset( $extensions[ $type ] ) ? $extensions[ $type ] : array();\n}","title":""},{"docid":"68ff84d4908aaae6380d6693c236fa32","score":"0.6010017","text":"public function supported_formats() {\n return array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_RICHHTML);\n }","title":""},{"docid":"4bc42b9b3b18d944a2dab897e49f8d69","score":"0.599479","text":"public function getValidImagesTypes()\n {\n return $this->validImagesTypes;\n }","title":""},{"docid":"a47d338b135727eadf94e23e185f1c3b","score":"0.59750664","text":"public function get_image_exts()\n {\n return $this->_IMAGE_EXTS;\n }","title":""},{"docid":"1074c74d5dfc5079be41d33a4a5a8659","score":"0.5971304","text":"public function getAllowedExtensionsAsArray() {\n\t\treturn \\array_values($this->allowedMimeTypesAndExtensions);\n\t}","title":""},{"docid":"3ab9e1302c1215554de559a5b78b1ec3","score":"0.5966371","text":"public function allowedMimes()\n {\n return ['jpeg', 'png', 'jpg'];\n }","title":""},{"docid":"afe75471aa38b7379be629ed749cc620","score":"0.596345","text":"function supported_returntypes() {\n if ($this->params['returntypes']) {\n return array_sum($this->params['returntypes']);\n }\n return FILE_EXTERNAL | FILE_REFERENCE | FILE_INTERNAL;\n }","title":""},{"docid":"b47a9b2f0f4a74b938117f2035fad2e9","score":"0.591452","text":"public static function getTypes();","title":""},{"docid":"62ca4eb18e5c61e8982efa101aaaeb85","score":"0.5911369","text":"public static function get_registered_document_types()\n {\n $document_types = Variable::get('print_document_types', false);\n if (!is_array($document_types)) {\n $document_types = array();\n }\n return $document_types;\n }","title":""},{"docid":"a411e2cd7971eb910928f16a3c132c1f","score":"0.5910788","text":"public static function extensions($type = null) {\n if(is_null($type)) return array_keys(static::$mimes);\n return isset(static::$types[$type]) ? static::$types[$type] : array();\n }","title":""},{"docid":"50546f2de27b87f7c4ac63d7569ab069","score":"0.5901169","text":"static function availableFormats() {\n return (new ReflectionClass(ThumbnailFormat::class))->getConstants();\n }","title":""},{"docid":"0fd6bdf7190a95fe4c63e3e44830b0ba","score":"0.5898918","text":"public function getMimeList(): array;","title":""},{"docid":"6077707b3b57bddefa17120a403d71bc","score":"0.58985794","text":"function _1p21_dv_allow_file_types($mimes) {\n\t\t$mimes['csv'] = 'text/csv';\n\t\t$mimes['tsv'] = 'text/tsv';\n\t\treturn $mimes;\n\t}","title":""},{"docid":"fc3f5df0cc7ba6bdbcf9792e8be4793b","score":"0.5889538","text":"public static function mimes() {\n return static::$mimes;\n }","title":""},{"docid":"f20793384614cb515b32c4526fa69793","score":"0.5887401","text":"public static function _mime_types($ext = '') {\n $mimes = array(\n 'hqx' => 'application/mac-binhex40',\n 'cpt' => 'application/mac-compactpro',\n 'doc' => 'application/msword',\n 'bin' => 'application/macbinary',\n 'dms' => 'application/octet-stream',\n 'lha' => 'application/octet-stream',\n 'lzh' => 'application/octet-stream',\n 'exe' => 'application/octet-stream',\n 'class' => 'application/octet-stream',\n 'psd' => 'application/octet-stream',\n 'so' => 'application/octet-stream',\n 'sea' => 'application/octet-stream',\n 'dll' => 'application/octet-stream',\n 'oda' => 'application/oda',\n 'pdf' => 'application/pdf',\n 'ai' => 'application/postscript',\n 'eps' => 'application/postscript',\n 'ps' => 'application/postscript',\n 'smi' => 'application/smil',\n 'smil' => 'application/smil',\n 'mif' => 'application/vnd.mif',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n 'wbxml' => 'application/vnd.wap.wbxml',\n 'wmlc' => 'application/vnd.wap.wmlc',\n 'dcr' => 'application/x-director',\n 'dir' => 'application/x-director',\n 'dxr' => 'application/x-director',\n 'dvi' => 'application/x-dvi',\n 'gtar' => 'application/x-gtar',\n 'php' => 'application/x-httpd-php',\n 'php4' => 'application/x-httpd-php',\n 'php3' => 'application/x-httpd-php',\n 'phtml' => 'application/x-httpd-php',\n 'phps' => 'application/x-httpd-php-source',\n 'js' => 'application/x-javascript',\n 'swf' => 'application/x-shockwave-flash',\n 'sit' => 'application/x-stuffit',\n 'tar' => 'application/x-tar',\n 'tgz' => 'application/x-tar',\n 'xhtml' => 'application/xhtml+xml',\n 'xht' => 'application/xhtml+xml',\n 'zip' => 'application/zip',\n 'mid' => 'audio/midi',\n 'midi' => 'audio/midi',\n 'mpga' => 'audio/mpeg',\n 'mp2' => 'audio/mpeg',\n 'mp3' => 'audio/mpeg',\n 'aif' => 'audio/x-aiff',\n 'aiff' => 'audio/x-aiff',\n 'aifc' => 'audio/x-aiff',\n 'ram' => 'audio/x-pn-realaudio',\n 'rm' => 'audio/x-pn-realaudio',\n 'rpm' => 'audio/x-pn-realaudio-plugin',\n 'ra' => 'audio/x-realaudio',\n 'rv' => 'video/vnd.rn-realvideo',\n 'wav' => 'audio/x-wav',\n 'bmp' => 'image/bmp',\n 'gif' => 'image/gif',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'jpe' => 'image/jpeg',\n 'png' => 'image/png',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'css' => 'text/css',\n 'html' => 'text/html',\n 'htm' => 'text/html',\n 'shtml' => 'text/html',\n 'txt' => 'text/plain',\n 'text' => 'text/plain',\n 'log' => 'text/plain',\n 'rtx' => 'text/richtext',\n 'rtf' => 'text/rtf',\n 'xml' => 'text/xml',\n 'xsl' => 'text/xml',\n 'mpeg' => 'video/mpeg',\n 'mpg' => 'video/mpeg',\n 'mpe' => 'video/mpeg',\n 'qt' => 'video/quicktime',\n 'mov' => 'video/quicktime',\n 'avi' => 'video/x-msvideo',\n 'movie' => 'video/x-sgi-movie',\n 'doc' => 'application/msword',\n 'word' => 'application/msword',\n 'xl' => 'application/excel',\n 'eml' => 'message/rfc822'\n );\n return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];\n }","title":""},{"docid":"f20793384614cb515b32c4526fa69793","score":"0.5887401","text":"public static function _mime_types($ext = '') {\n $mimes = array(\n 'hqx' => 'application/mac-binhex40',\n 'cpt' => 'application/mac-compactpro',\n 'doc' => 'application/msword',\n 'bin' => 'application/macbinary',\n 'dms' => 'application/octet-stream',\n 'lha' => 'application/octet-stream',\n 'lzh' => 'application/octet-stream',\n 'exe' => 'application/octet-stream',\n 'class' => 'application/octet-stream',\n 'psd' => 'application/octet-stream',\n 'so' => 'application/octet-stream',\n 'sea' => 'application/octet-stream',\n 'dll' => 'application/octet-stream',\n 'oda' => 'application/oda',\n 'pdf' => 'application/pdf',\n 'ai' => 'application/postscript',\n 'eps' => 'application/postscript',\n 'ps' => 'application/postscript',\n 'smi' => 'application/smil',\n 'smil' => 'application/smil',\n 'mif' => 'application/vnd.mif',\n 'xls' => 'application/vnd.ms-excel',\n 'ppt' => 'application/vnd.ms-powerpoint',\n 'wbxml' => 'application/vnd.wap.wbxml',\n 'wmlc' => 'application/vnd.wap.wmlc',\n 'dcr' => 'application/x-director',\n 'dir' => 'application/x-director',\n 'dxr' => 'application/x-director',\n 'dvi' => 'application/x-dvi',\n 'gtar' => 'application/x-gtar',\n 'php' => 'application/x-httpd-php',\n 'php4' => 'application/x-httpd-php',\n 'php3' => 'application/x-httpd-php',\n 'phtml' => 'application/x-httpd-php',\n 'phps' => 'application/x-httpd-php-source',\n 'js' => 'application/x-javascript',\n 'swf' => 'application/x-shockwave-flash',\n 'sit' => 'application/x-stuffit',\n 'tar' => 'application/x-tar',\n 'tgz' => 'application/x-tar',\n 'xhtml' => 'application/xhtml+xml',\n 'xht' => 'application/xhtml+xml',\n 'zip' => 'application/zip',\n 'mid' => 'audio/midi',\n 'midi' => 'audio/midi',\n 'mpga' => 'audio/mpeg',\n 'mp2' => 'audio/mpeg',\n 'mp3' => 'audio/mpeg',\n 'aif' => 'audio/x-aiff',\n 'aiff' => 'audio/x-aiff',\n 'aifc' => 'audio/x-aiff',\n 'ram' => 'audio/x-pn-realaudio',\n 'rm' => 'audio/x-pn-realaudio',\n 'rpm' => 'audio/x-pn-realaudio-plugin',\n 'ra' => 'audio/x-realaudio',\n 'rv' => 'video/vnd.rn-realvideo',\n 'wav' => 'audio/x-wav',\n 'bmp' => 'image/bmp',\n 'gif' => 'image/gif',\n 'jpeg' => 'image/jpeg',\n 'jpg' => 'image/jpeg',\n 'jpe' => 'image/jpeg',\n 'png' => 'image/png',\n 'tiff' => 'image/tiff',\n 'tif' => 'image/tiff',\n 'css' => 'text/css',\n 'html' => 'text/html',\n 'htm' => 'text/html',\n 'shtml' => 'text/html',\n 'txt' => 'text/plain',\n 'text' => 'text/plain',\n 'log' => 'text/plain',\n 'rtx' => 'text/richtext',\n 'rtf' => 'text/rtf',\n 'xml' => 'text/xml',\n 'xsl' => 'text/xml',\n 'mpeg' => 'video/mpeg',\n 'mpg' => 'video/mpeg',\n 'mpe' => 'video/mpeg',\n 'qt' => 'video/quicktime',\n 'mov' => 'video/quicktime',\n 'avi' => 'video/x-msvideo',\n 'movie' => 'video/x-sgi-movie',\n 'doc' => 'application/msword',\n 'word' => 'application/msword',\n 'xl' => 'application/excel',\n 'eml' => 'message/rfc822'\n );\n return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];\n }","title":""},{"docid":"d510006bf33edb2e0bbac131022cd525","score":"0.58738476","text":"public function getSupported()\n\t{\n\t\treturn $this->_aArchives;\n\t}","title":""},{"docid":"332e8772ce9ed0d485ce3c6ec87a0383","score":"0.5869314","text":"public static function get_accepted_formats();","title":""},{"docid":"0f5df3a0c21914df76863e3efe911760","score":"0.5868263","text":"function mimes_types($mime)\n\t{\n\t\treturn ( !isset(mime::$types[$mime]) ) ? FALSE : mime::$types[$mime];\n\t}","title":""},{"docid":"140c39d04707b9e6ca25e6d1614b3688","score":"0.5866099","text":"private function _get_other_types() {\n\t\t$mime_types = include W3TC_INC_DIR . '/mime/other.php';\n\t\treturn $mime_types;\n\t}","title":""},{"docid":"9610065fe1aeaf1fce9fd5b381191221","score":"0.5861325","text":"public function getFileTypes(): ?array {\n $val = $this->getBackingStore()->get('fileTypes');\n if (is_array($val) || is_null($val)) {\n TypeUtils::validateCollectionValues($val, 'string');\n /** @var array|null $val */\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'fileTypes'\");\n }","title":""},{"docid":"e2d9adc9741384bdd6f636a06639201f","score":"0.58534676","text":"public static function allowed_types()\n {\n return self::$allowed_types;\n }","title":""},{"docid":"7ce03eca29e945cb20208c80f801a4a0","score":"0.5850264","text":"public function getAllowedExtensions()\n {\n return $this->allowedExtensions;\n }","title":""},{"docid":"9fa6be9e32ae2b56d9a6354bd0803e49","score":"0.58478963","text":"public static function types()\n\t{\n\t\treturn self::$_types;\n\t}","title":""},{"docid":"8ff18ade4ab40cae1a355d0fe645ee5a","score":"0.58448166","text":"public function type()\n {\n return (filetype($this->filename));\n }","title":""},{"docid":"ba7e91ee597deecf4970cb1dd2a48328","score":"0.5837215","text":"public static function acceptedMimes()\n {\n $uppish = new UppishController;\n\n return $uppish->getAcceptedMimes();\n }","title":""}],"string":"[\n {\n \"docid\": \"7991efc46fb6b46813e34663d3e52b98\",\n \"score\": \"0.7941198\",\n \"text\": \"public function getSupportedFileTypes(): SupportedFileTypes\\n\\t{\\n\\t\\t// TODO: Implement getSupportedFileTypes() method.\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8dd23ca048ce8a6e0b08df1fdcfadb1e\",\n \"score\": \"0.77492476\",\n \"text\": \"public function getFileTypes()\\n {\\n return $this->fileTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c765e9c1063a21d4941e40fc0d7d378d\",\n \"score\": \"0.7744338\",\n \"text\": \"public function getFileTypes()\\n {\\n return $this->_fileTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d252bee0fa01e34979d6dd29f94572b\",\n \"score\": \"0.7743971\",\n \"text\": \"function supported_filetypes() {\\n return '*';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"109175829014d0e26ebf5d3a703fc78c\",\n \"score\": \"0.76487833\",\n \"text\": \"function getSupportedFileFormats();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26ecd478c34c9f8abef55096a5312056\",\n \"score\": \"0.76447797\",\n \"text\": \"public function getAllowedFileTypes() {\\n return $this->__allowedFileTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95075893d6825b7b9de32f5938348e4a\",\n \"score\": \"0.7618363\",\n \"text\": \"public function getFileTypes()\\n {\\n return $this->filetype;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01df91bf94acaa2cb8494eb855048b79\",\n \"score\": \"0.7365744\",\n \"text\": \"static function getTypesFile() {\\n return array(\\\"pdf\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c62e312c1ce562f194ceefb490b873be\",\n \"score\": \"0.7363318\",\n \"text\": \"public function getTypes() {\\r\\n\\t\\t$ext = $this->getExtension();\\r\\n\\t\\treturn ThairaUploadsFilePeer::getTypes($ext);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59feadaad995f71e5def661c1973eac7\",\n \"score\": \"0.7143862\",\n \"text\": \"function getMimeTypes();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34975741d5ea924a372ee2050b4c71ca\",\n \"score\": \"0.71367306\",\n \"text\": \"public function getAllowedFilesTypesAsArray()\\n {\\n $fTypesArr = array();\\n\\n if(!empty($this->_allowedFileTypes)) {\\n $fTypesArr = preg_split('/[,;]/', $this->_allowedFileTypes);\\n }\\n\\n return $fTypesArr;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2cb581a1204b88fee42478b5fd15fe9f\",\n \"score\": \"0.7040511\",\n \"text\": \"public function getFilesWithType()\\n {\\n $files = array();\\n $finfo = \\\\finfo_open(\\\\FILEINFO_MIME_TYPE);\\n foreach ($this->getFiles() as $file) {\\n $tmp['file'] = $file;\\n $mimeType = \\\\finfo_file($finfo, $file->getPathname());\\n $tmp['is_image'] = \\\\preg_match('/^image\\\\//', $mimeType);\\n $files[] = $tmp;\\n }\\n\\n return $files;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bb34b081d9b6512512219cf51a7c5a6\",\n \"score\": \"0.70001\",\n \"text\": \"public function getFileExtensions()\\n {\\n return $this->parserFactory->getFileExtensions();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d60d7e9793638d9618587d214915790c\",\n \"score\": \"0.6908944\",\n \"text\": \"public function mimeTypes(): array\\n {\\n return $this->mimeTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73fc4611d8bd82cb22e2406aeead703d\",\n \"score\": \"0.6903262\",\n \"text\": \"public function mimeTypes();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"021eaa774da93c3ded66b73e192ad5ad\",\n \"score\": \"0.6884486\",\n \"text\": \"public function getFileTypeAllowableValues()\\n {\\n return [\\n self::FILE_TYPE_MP4,\\n self::FILE_TYPE_M4_A,\\n self::FILE_TYPE_TRANSCRIPT,\\n self::FILE_TYPE_CHAT,\\n self::FILE_TYPE_CC,\\n self::FILE_TYPE_CSV,\\n self::FILE_TYPE_CHAT_MESSAGE,\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7582015b429ee56bb3e431e9a2663bc\",\n \"score\": \"0.6826673\",\n \"text\": \"abstract protected function getImportFileTypes(): array;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"244dcde4a02b9b62f0c022d347258837\",\n \"score\": \"0.6822569\",\n \"text\": \"public function getHandledMimeTypes(): array;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e5884e05221eccba0c1d1bf7e08db49\",\n \"score\": \"0.6819619\",\n \"text\": \"public abstract function getSupportedTypes();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b80fab3e690f6701460e53b9826b8c5\",\n \"score\": \"0.673387\",\n \"text\": \"public function getMimetypes(): array {\\n\\t\\treturn Capabilities::MIMETYPES;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"662d69226d526f5487d90f47a8111f20\",\n \"score\": \"0.6712976\",\n \"text\": \"public function getAllowedFileTypesAsText()\\n {\\n return (string)$this->_allowedFileTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d7531f97e0408764eede666c0afd104\",\n \"score\": \"0.6690665\",\n \"text\": \"public function getFileTypes($format = 'map')\\n\\t{\\n\\t\\t$list = $this->getConfig('filetypes','jpg,jpeg,gif,png,JPG,JPEG,GIF,PNG');\\n\\n\\t\\t// Remove excluded file types (those that have a - prefix character) from the list\\n\\t\\t$data \\t= array();\\n\\t\\t\\n\\t\\tforeach(explode(',', $list) as $group) {\\t\\n\\t\\t\\tif (substr(trim($group), 0, 1) === '-') {\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\t\\t\\t// remove excluded file types (those that have a - prefix character) from the list\\n\\t\\t\\t$data[] = preg_replace('#(,)?-([\\\\w]+)#', '', $group);\\n\\t\\t}\\n\\t\\t\\n\\t\\t$list = implode(',', $data);\\n\\n\\t\\tswitch ($format) {\\n\\t\\t\\tcase 'list':\\n\\t\\t\\t\\treturn $this->listFileTypes($list);\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase 'array':\\n\\t\\t\\t\\treturn explode(',', $this->listFileTypes($list));\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase 'reg':\\n\\t\\t\\t\\treturn str_replace(',', '|', $list);\\n\\t\\t\\t\\tbreak; \\n\\t\\t\\tdefault:\\n\\t\\t\\tcase 'map':\\n\\t\\t\\t\\treturn $list;\\n\\t\\t\\t\\tbreak;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3defe8d19f626801f49b7c295fed536f\",\n \"score\": \"0.6672405\",\n \"text\": \"public static function getContentType()\\n {\\n return ['core', 'file'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"abb03ada3a3cf72e852cef1a87e49102\",\n \"score\": \"0.66678345\",\n \"text\": \"private function getAllowedMimeTypes() {\\n $result = [];\\n\\n $allowedExtensions = c('Garden.Upload.AllowedFileExtensions', []);\\n if (is_array($allowedExtensions)) {\\n foreach ($allowedExtensions as $extension) {\\n if ($mimeTypes = $this->lookupMime($extension)) {\\n $result = array_merge($result, $mimeTypes);\\n }\\n }\\n }\\n\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0b43d160b50527ff78aff99b970d8ea\",\n \"score\": \"0.665208\",\n \"text\": \"public static function getMimeTypes(): array\\n {\\n return [\\n 'image/jpeg',\\n 'image/png',\\n 'image/tiff',\\n 'text/plain',\\n 'image/bmp',\\n 'application/pdf',\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"321270fe45d2c3bfbaf2834fa5e384f5\",\n \"score\": \"0.66252023\",\n \"text\": \"public function get_option_toolset_types() {\\n\\t\\treturn self::get_option( true, self::OPTION_EXTENSION_TYPES, [] );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f98c55c9c1ecf408dd00dd1e17183444\",\n \"score\": \"0.65908325\",\n \"text\": \"public static function getImageMimetypes()\\n {\\n return [\\n 'image/jpg',\\n 'image/jpeg',\\n 'image/gif',\\n 'image/png',\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5dcf21aa5d2abebcb4971acfbe99d1ca\",\n \"score\": \"0.65899146\",\n \"text\": \"public function getSupportedTypes()\\n {\\n return array(\\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\\n 'application/vnd.ms-excel.sheet.macroEnabled.12',\\n 'application/vnd.ms-excel'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"298142dcd485592f43de538f6ad2809a\",\n \"score\": \"0.65791494\",\n \"text\": \"function getMimeTypes() {\\r\\n $out = array();\\r\\n if (file_exists('/etc/mime.types')) {\\r\\n $file = fopen('/etc/mime.types', 'r');\\r\\n while(($line = fgets($file)) !== false) {\\r\\n $line = trim(preg_replace('/#.*/', '', $line));\\r\\n if(!$line)\\r\\n continue;\\r\\n $parts = preg_split('/\\\\s+/', $line);\\r\\n if(count($parts) == 1)\\r\\n continue;\\r\\n $type = array_shift($parts);\\r\\n foreach($parts as $part)\\r\\n $out[$part] = $type;\\r\\n }\\r\\n fclose($file);\\r\\n } else {\\r\\n $out['js'] = 'application/javascript';\\r\\n $out['png'] = 'image/png';\\r\\n $out['css'] = 'text/css';\\r\\n $out['txt'] = 'text/plain';\\r\\n $out['gif'] = 'image/gif';\\r\\n $out['jpg'] = 'image/jpeg';\\r\\n $out['svg'] = 'image/svg+xml';\\r\\n $out['mp4'] = 'video/mp4';\\r\\n $out['html'] = 'text/html';\\r\\n $out['ttf'] = 'application/octet-stream';\\r\\n $out['eot'] = 'application/octet-stream';\\r\\n $out['woff'] = 'application/octet-stream';\\r\\n }\\r\\n return $out;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1aca7c3d68a555139ab798e58cabc81c\",\n \"score\": \"0.65462744\",\n \"text\": \"function getMimeTypes()\\n{\\n return array(\\n // text\\n 'txt' => 'text/plain',\\n 'ini' => 'text/plain',\\n 'htm' => 'text/html',\\n 'html' => 'text/html',\\n 'php' => 'text/html',\\n 'css' => 'text/css',\\n 'js' => 'application/javascript',\\n 'json' => 'application/json',\\n 'xml' => 'application/xml',\\n 'xsl' => 'application/xml',\\n 'sql' => 'application/x-sql',\\n 'wsdl' => 'text/xml',\\n 'csv' => 'text/csv',\\n\\n // images / fonts\\n 'png' => 'image/png',\\n 'jpe' => 'image/jpeg',\\n 'jpeg' => 'image/jpeg',\\n 'jpg' => 'image/jpeg',\\n 'gif' => 'image/gif',\\n 'bmp' => 'image/bmp',\\n 'ico' => 'image/vnd.microsoft.icon',\\n 'tiff' => 'image/tiff',\\n 'tif' => 'image/tiff',\\n 'svg' => 'image/svg+xml',\\n 'svgz' => 'image/svg+xml',\\n 'ttf' => 'font/ttf',\\n 'eot' => 'application/vnd.ms-fontobject',\\n 'woff' => 'application/x-font-woff',\\n\\n // archives\\n 'zip' => 'application/zip',\\n 'rar' => 'application/x-rar-compressed',\\n 'exe' => 'application/x-msdownload',\\n 'msi' => 'application/x-msdownload',\\n 'cab' => 'application/vnd.ms-cab-compressed',\\n 'class' => 'application/java-vm',\\n 'jar' => 'application/java-archive',\\n\\n // multimedia\\n 'mp3' => 'audio/mpeg',\\n 'qt' => 'video/quicktime',\\n 'mov' => 'video/quicktime',\\n 'flv' => 'video/x-flv',\\n 'swf' => 'application/x-shockwave-flash',\\n\\n // adobe\\n 'pdf' => 'application/pdf',\\n 'psd' => 'image/vnd.adobe.photoshop',\\n 'ai' => 'application/postscript',\\n 'eps' => 'application/postscript',\\n 'ps' => 'application/postscript',\\n\\n // ms office\\n 'doc' => 'application/msword',\\n 'rtf' => 'application/rtf',\\n 'xls' => 'application/vnd.ms-excel',\\n 'ppt' => 'application/vnd.ms-powerpoint',\\n\\n // open office\\n 'odt' => 'application/vnd.oasis.opendocument.text',\\n 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\\n );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4910d6ac503afb1b8488255da12c0cc2\",\n \"score\": \"0.6543765\",\n \"text\": \"public function getAllowedMimeTypes() {\\n\\t\\t$mime_types = explode(',', $this->settings['attachment']['allowedMimeTypes']);\\n\\t\\tif (empty($mime_types)) {\\n\\t\\t\\t$res = array('text/plain');\\n\\t\\t} else {\\n\\t\\t\\tforeach ($mime_types AS $mime_type) {\\n\\t\\t\\t\\t$res[] = trim($mime_type);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn $res;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f8a5d72766e081f7cd130d96897d25b\",\n \"score\": \"0.65183127\",\n \"text\": \"public function getAllowedMimeTypesAndExtensions() {\\n\\t\\treturn $this->allowedMimeTypesAndExtensions;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c570b3d6fe3a64de3238e1a14bd6703\",\n \"score\": \"0.65169644\",\n \"text\": \"public static function GetAllowedMediaTypes()\\n {\\n return ['gif', 'jpg', 'jpeg', 'jpe', 'png'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01bd1a47f68da58b6ed5c6b4302021bf\",\n \"score\": \"0.6475976\",\n \"text\": \"public function getImageMimeTypes(): array\\n {\\n return $this->imageMimeTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31dabccbce80d0d1d102e28dddee9bb6\",\n \"score\": \"0.6472951\",\n \"text\": \"public function getMimeTypes()\\n {\\n return $this->getResponse()->getMimeTypes();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7abf0173b72b7079727e3fb6688b835\",\n \"score\": \"0.64470464\",\n \"text\": \"public function provideMimeTypes()\\n {\\n return array(\\n array(ImageStrategy::MEDIA_TYPE , true),\\n array(VideoStrategy::MEDIA_TYPE , false),\\n array(AudioStrategy::MEDIA_TYPE , false),\\n array(PdfStrategy::MEDIA_TYPE , false),\\n array(DefaultStrategy::MEDIA_TYPE, false)\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32c2378ee57f0c17afc5c19a66a12a51\",\n \"score\": \"0.64294326\",\n \"text\": \"protected function _getAllowedExtensions()\\n {\\n return ['jpg', 'jpeg', 'gif', 'png', 'svg'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e627c9d99248d1b06a10aab342247c70\",\n \"score\": \"0.6427188\",\n \"text\": \"public function getSupportedExtensions()\\n {\\n return [\\n '*'\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"183705129fc65c8cd6987004ca7d82dc\",\n \"score\": \"0.6424038\",\n \"text\": \"function system_extension_mime_types() {\\n $out = array();\\n $file = fopen('/etc/mime.types', 'r');\\n while (($line = fgets($file)) !== false) {\\n $line = trim(preg_replace('/#.*/', '', $line));\\n if (!$line)\\n continue;\\n $parts = preg_split('/\\\\s+/', $line);\\n if (count($parts) == 1)\\n continue;\\n $type = array_shift($parts);\\n foreach ($parts as $part)\\n $out[$part] = $type;\\n }\\n fclose($file);\\n return $out;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e00ce6989cb78add5fb9406317782566\",\n \"score\": \"0.6414168\",\n \"text\": \"public function getFileTypeRestrictions() {\\n\\t\\treturn array();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7372947e7f32fb735da50ef56a59d88e\",\n \"score\": \"0.6399789\",\n \"text\": \"public function get_supported_extensions() {\\n return $this->ext;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5477b12c9d0f910c4648e92ab4c7a7c3\",\n \"score\": \"0.6352156\",\n \"text\": \"public static function get_type_option_names() {\\n return array('imageheight', 'maxfiles', 'pluginname');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7821389602a45c59e4173ea0ad48c1d\",\n \"score\": \"0.6351792\",\n \"text\": \"protected function _getAllowedExtensions()\\r\\n {\\r\\n return array('ico', 'png', 'gif', 'jpg', 'jpeg', 'apng', 'svg');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b2cd74e4188e9c462cce6e9c8240a1a\",\n \"score\": \"0.6350954\",\n \"text\": \"public function getMimetypesOptional(): array {\\n\\t\\treturn Capabilities::MIMETYPES_OPTIONAL;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a77e9be172d1aaebacbc0fcff61e391d\",\n \"score\": \"0.63348025\",\n \"text\": \"public function getAllowedMimeTypesAsArray() {\\n\\t\\treturn \\\\array_keys($this->allowedMimeTypesAndExtensions);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da29a170fd2b95727801ea22479e89f4\",\n \"score\": \"0.6329699\",\n \"text\": \"function google_filetypes() {\\n $types = array (\\n 'doc' => array(\\n 'name' => get_string('google_doc', 'mod_googledocs'),\\n 'mimetype' => 'application/vnd.google-apps.document',\\n 'icon' => 'docs.svg',\\n ),\\n 'sheet' => array(\\n 'name' => get_string('google_sheet', 'mod_googledocs'),\\n 'mimetype' => 'application/vnd.google-apps.spreadsheet',\\n 'icon' => 'sheets.svg',\\n ),\\n 'slides' => array(\\n 'name' => get_string('google_slides', 'mod_googledocs'),\\n 'mimetype' => 'application/vnd.google-apps.presentation',\\n 'icon' => 'slides.svg',\\n ),\\n );\\n\\n return $types;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"949b9609563987d5f7fd185ba70146df\",\n \"score\": \"0.631274\",\n \"text\": \"public function getAllowedMimeTypes()\\n {\\n return sfConfig::get('app_rt_asset_allowed_mime_types', rtAssetToolkit::getCommonMimeTypes());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c3ba2ed292b66bfdb9ea30156ea1175\",\n \"score\": \"0.63118184\",\n \"text\": \"function system_mime_type_extensions() {\\n # extension listed to be canonical).\\n $out = array();\\n $file = fopen('/etc/mime.types', 'r');\\n while (($line = fgets($file)) !== false) {\\n $line = trim(preg_replace('/#.*/', '', $line));\\n if (!$line) {\\n continue;\\n }\\n $parts = preg_split('/\\\\s+/', $line);\\n if (count($parts) == 1) {\\n continue;\\n }\\n $type = array_shift($parts);\\n if (!isset($out[$type])) {\\n $out[$type] = array_shift($parts);\\n }\\n // we only support mp3s for now and lame expects the extentsion to be mp3\\n // not mpga which is what is coming from the mimetype file.\\n if ($type == 'audio/mpeg') {\\n $out[$type] = 'mp3';\\n }\\n\\n }\\n fclose($file);\\n return $out;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d016198de73f486dd0d3431b7a2ba59\",\n \"score\": \"0.63104445\",\n \"text\": \"protected function _getAllowedExtensions()\\n {\\n return ['jpg', 'jpeg', 'png'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"119cdf19a044647e87f474ae8a0b584c\",\n \"score\": \"0.6232511\",\n \"text\": \"public function getMimeTypes(): ?array\\n {\\n if ($this->mimeTypes === null) {\\n $mimeTypes = $this->wordpress->getAllowedMimeTypes();\\n $fullMimeTypes = [];\\n\\n foreach ($mimeTypes as $extensions => $mineType) {\\n $extensions = explode('|', $extensions);\\n\\n foreach ($extensions as $extension) {\\n $fullMimeTypes[$extension] = $mineType;\\n }\\n }\\n\\n $this->mimeTypes = $fullMimeTypes;\\n }\\n\\n return $this->mimeTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ab00b02d21c4a41dcf9528a6f633eac\",\n \"score\": \"0.620741\",\n \"text\": \"static function getList()\\n\\t{\\n\\t\\tself::init();\\n\\t\\t\\n\\t\\tself::$exts = self::getExtensions();\\n\\t\\t\\n\\t\\t$liste = array();\\n\\t\\t\\n\\t\\tif (!empty( self::$exts ))\\n\\t\\t\\tforeach( self::$exts as $ext => &$e)\\n\\t\\t\\t\\tif (!$e['disabled'])\\n\\t\\t\\t\\t\\t$liste[ $ext ] = $e['file'];\\n\\t\\treturn $liste;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd0dde2b9a91f1892f4ae99d3d6a3e9f\",\n \"score\": \"0.62058246\",\n \"text\": \"public function getTypes()\\n {\\n $result = array();\\n foreach ($this->mime_types as $key => $val) {\\n $result[] = array('name' => $key, 'value' => $val);\\n }\\n echo json_encode($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6604c6cb83a2bf23e138affb35d710e\",\n \"score\": \"0.6199748\",\n \"text\": \"public function getFileType();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"425d6b61c489856356cf763e4ddf0206\",\n \"score\": \"0.6199347\",\n \"text\": \"function allowed_media_types($isVideo=false){\\n\\tif(!$isVideo)\\n\\t\\treturn array_merge($GLOBALS['video_extensions'],$GLOBALS['audio_conf']['allowed_formats']);\\n\\telse\\n\\t\\treturn $GLOBALS['video_extensions'];\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f96249e43be7d01074ac9cbfa201623\",\n \"score\": \"0.61980885\",\n \"text\": \"public function getSupportedTagTypes()\\n {\\n return [\\n 'properties' => [],\\n 'methods' => [],\\n 'mixins' => [],\\n 'other' => []\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8142bf4f6cba19122d27f7b393a1ec53\",\n \"score\": \"0.61818004\",\n \"text\": \"function get_allowed_image_file_types()\\n{\\n $supported = str_replace(' ', '', get_option('valid_images'));\\n return $supported;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8d2e1553c2fe26d01e8cc2926a81a67\",\n \"score\": \"0.61596084\",\n \"text\": \"function get_allowed_audio_file_types()\\n{\\n $supported = str_replace(' ', '', get_option('valid_audios'));\\n return $supported;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3111ce62a9b333027509529d5bcf1a8\",\n \"score\": \"0.61575127\",\n \"text\": \"function get_allowed_video_file_types()\\n{\\n $supported = str_replace(' ', '', get_option('valid_videos'));\\n if (get_option('allow_audio_videos') == '1') {\\n $supported .= ',' . get_allowed_audio_file_types();\\n }\\n $supported .= ',pdf';\\n if (has_privilege(get_member(), 'use_very_dangerous_comcode')) {\\n $supported .= ',swf';\\n }\\n return $supported;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2cf424d8b49deb9ce8473113691ea91c\",\n \"score\": \"0.6125372\",\n \"text\": \"public function supported_returntypes() {\\n return FILE_INTERNAL;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1ef46dd771593d6f075fe0371bfa595\",\n \"score\": \"0.6124226\",\n \"text\": \"public function supportedTypes(): array\\n {\\n return array_reduce(\\n $this->factories,\\n function ($types, FormLayoutFactory $factory) {\\n return array_merge($types, $factory->supportedTypes());\\n },\\n []\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48f83b5ef644a80ac216830d5e04fa0a\",\n \"score\": \"0.61239856\",\n \"text\": \"public function supported_returntypes() {\\n return FILE_INTERNAL | FILE_EXTERNAL; // Does not appear to work if I return just FILE_EXTERNAL.\\n // From moodle 2.3, we support file reference.\\n // See moodle docs for more information. e.g return FILE_INTERNAL | FILE_EXTERNAL | FILE_REFERENCE;.\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af1fcddf58c8f8d172b4931114ef187a\",\n \"score\": \"0.6122013\",\n \"text\": \"public function get_files() {\\n if ($this->prototypetype != 0) { // Is this a prototype question?\\n $files = array(); // Don't load the files twice.\\n } else {\\n // Load any files from the prototype.\\n $this->get_prototype();\\n $files = self::get_support_files($this->prototype);\\n }\\n $files = array_merge($files, self::get_support_files($this)); // Add in files for this question.\\n return $files;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f247761eee27cd7af61c0bf1c1668ea2\",\n \"score\": \"0.6121582\",\n \"text\": \"public function getWatchedFileTypes()\\n {\\n $fileTypes = $this->watchedFileTypes;\\n\\n $this->extend('updateWatchedFileTypes', $fileTypes);\\n\\n return $fileTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f6d27e2a860e36af8d955aa005e1fbc\",\n \"score\": \"0.6116254\",\n \"text\": \"public function getTypes() {\\n $dir = APPLICATION_PATH . \\\"/modules/managementtype/forms/\\\";\\n if (is_dir($dir)) {\\n $i = 1;\\n if ($dh = opendir($dir)) {\\n while (($file = readdir($dh)) !== false) {\\n\\n if (($file != \\\".\\\") AND ($file != \\\"..\\\")) {\\n $type = explode(\\\".php\\\", $file);\\n $managementype[$i] = $type['0'];\\n $i++;\\n }\\n }\\n }\\n }\\n closedir($dh);\\n return $managementype;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0241e4cf27142b4ff3f4da953839fee\",\n \"score\": \"0.6112363\",\n \"text\": \"public static function getTypes()\\n\\t{\\n\\t\\treturn array(\\n\\t\\t\\tself::GALLERY\\t\\t=> 'Портфолио',\\n\\t\\t\\tself::DEVELOPMENT\\t=> 'Производство',\\n\\t\\t\\tself::CAPABILITY\\t=> 'Возможности',\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc7ece2f2f8df48d5cce8e99c20a0023\",\n \"score\": \"0.6111798\",\n \"text\": \"static function parseableDataMediaTypes()\\n\\t{\\n\\t\\tstatic $parseable_data_media_types = null;\\n\\t\\t\\n\\t\\tif ( is_null( $parseable_data_media_types ) )\\n\\t\\t{\\n\\t\\t\\t$parseable_data_media_types =\\n\\t\\t\\t array( 'multipart/related', 'multipart/mixed' );\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn $parseable_data_media_types;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e8a629f9b3ba3fa8d9f636865ce7b5a\",\n \"score\": \"0.6082294\",\n \"text\": \"public function listTypes();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b05b7ecd05c2f1c654697b198346e24c\",\n \"score\": \"0.6076845\",\n \"text\": \"function get_content_types()\\n\\t{\\n\\t\\treturn config::get_content_types($this->appname);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e460528c26993b5a63e86d5450ffe125\",\n \"score\": \"0.6067291\",\n \"text\": \"public function filter_upload_mime_types() {\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31cb2fbd5de84991a64c8c0cf948eef6\",\n \"score\": \"0.60507447\",\n \"text\": \"public static function getAllowedExtensions()\\n\\t{\\n\\t $extensions = ModUtil::getVar('MUFiles', 'allowedExtensions');\\n\\t //$extensions = explode(',', $extensions);\\n\\t return $extensions;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8526283d38b12c5f7c07b67eeaa03351\",\n \"score\": \"0.6038998\",\n \"text\": \"function getAllowedExtensions()\\r\\n {\\r\\n global $config;\\r\\n $allowed_ext = array();\\r\\n if (!$this->getCurrentDir() or !$curr_dir_data = $this->getCurrentDirData()) {\\r\\n return $allowed_ext;\\r\\n }\\r\\n\\r\\n $filetypes = $config->getConfigValue('PG_SPAWFM_FILETYPES');\\r\\n\\r\\n if ($curr_type = $this->getCurrentType()) {\\r\\n $allowed_ext = $filetypes[$curr_type];\\r\\n } elseif (!empty($curr_dir_data['params']['allowed_filetypes'])) {\\r\\n if (!is_array($curr_dir_data['params']['allowed_filetypes'])) {\\r\\n $curr_dir_data['params']['allowed_filetypes'] = array($curr_dir_data['params']['allowed_filetypes']);\\r\\n }\\r\\n if (sizeof($curr_dir_data['params']['allowed_filetypes'])) {\\r\\n foreach ($curr_dir_data['params']['allowed_filetypes'] as $ftype) {\\r\\n if (strlen($ftype) and $ftype{0} == '.') { // extension specified\\r\\n $allowed_ext[] = $ftype;\\r\\n } elseif (isset($filetypes[$ftype])) { // filetype group specified\\r\\n $allowed_ext = array_merge($allowed_ext, $filetypes[$ftype]);\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n return $allowed_ext;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47eae02497b97e6bb1f751a691bc3796\",\n \"score\": \"0.6034457\",\n \"text\": \"public static function getSupportedImageTypes ()\\n {\\n return self::$supportedImageTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13c4500c71ef4611a1b693823b40f1d0\",\n \"score\": \"0.60326976\",\n \"text\": \"public function getSupportedExtensions()\\n {\\n if (array_key_exists(\\\"supportedExtensions\\\", $this->_propDict)) {\\n return $this->_propDict[\\\"supportedExtensions\\\"];\\n } else {\\n return null;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1986b211aa7a59788152bc6a309176ad\",\n \"score\": \"0.601573\",\n \"text\": \"function list_files() {\\n return array();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d2960a438ff018c5c2863248e84e38a\",\n \"score\": \"0.6010392\",\n \"text\": \"function bpxcftr_get_allowed_file_extensions( $type ) {\\n\\n\\t$extensions = array(\\n\\t\\t'file' => array(\\n\\t\\t\\t'doc',\\n\\t\\t\\t'docx',\\n\\t\\t\\t'pdf',\\n\\t\\t),\\n\\t\\t'image' => array(\\n\\t\\t\\t'jpg',\\n\\t\\t\\t'jpeg',\\n\\t\\t\\t'gif',\\n\\t\\t\\t'png',\\n\\t\\t),\\n\\t);\\n\\n\\t$extensions = apply_filters( 'bpxcftr_allowed_extensions', $extensions );\\n\\n\\treturn isset( $extensions[ $type ] ) ? $extensions[ $type ] : array();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68ff84d4908aaae6380d6693c236fa32\",\n \"score\": \"0.6010017\",\n \"text\": \"public function supported_formats() {\\n return array(PORTFOLIO_FORMAT_FILE, PORTFOLIO_FORMAT_RICHHTML);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4bc42b9b3b18d944a2dab897e49f8d69\",\n \"score\": \"0.599479\",\n \"text\": \"public function getValidImagesTypes()\\n {\\n return $this->validImagesTypes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a47d338b135727eadf94e23e185f1c3b\",\n \"score\": \"0.59750664\",\n \"text\": \"public function get_image_exts()\\n {\\n return $this->_IMAGE_EXTS;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1074c74d5dfc5079be41d33a4a5a8659\",\n \"score\": \"0.5971304\",\n \"text\": \"public function getAllowedExtensionsAsArray() {\\n\\t\\treturn \\\\array_values($this->allowedMimeTypesAndExtensions);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ab9e1302c1215554de559a5b78b1ec3\",\n \"score\": \"0.5966371\",\n \"text\": \"public function allowedMimes()\\n {\\n return ['jpeg', 'png', 'jpg'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afe75471aa38b7379be629ed749cc620\",\n \"score\": \"0.596345\",\n \"text\": \"function supported_returntypes() {\\n if ($this->params['returntypes']) {\\n return array_sum($this->params['returntypes']);\\n }\\n return FILE_EXTERNAL | FILE_REFERENCE | FILE_INTERNAL;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b47a9b2f0f4a74b938117f2035fad2e9\",\n \"score\": \"0.591452\",\n \"text\": \"public static function getTypes();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62ca4eb18e5c61e8982efa101aaaeb85\",\n \"score\": \"0.5911369\",\n \"text\": \"public static function get_registered_document_types()\\n {\\n $document_types = Variable::get('print_document_types', false);\\n if (!is_array($document_types)) {\\n $document_types = array();\\n }\\n return $document_types;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a411e2cd7971eb910928f16a3c132c1f\",\n \"score\": \"0.5910788\",\n \"text\": \"public static function extensions($type = null) {\\n if(is_null($type)) return array_keys(static::$mimes);\\n return isset(static::$types[$type]) ? static::$types[$type] : array();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50546f2de27b87f7c4ac63d7569ab069\",\n \"score\": \"0.5901169\",\n \"text\": \"static function availableFormats() {\\n return (new ReflectionClass(ThumbnailFormat::class))->getConstants();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fd6bdf7190a95fe4c63e3e44830b0ba\",\n \"score\": \"0.5898918\",\n \"text\": \"public function getMimeList(): array;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6077707b3b57bddefa17120a403d71bc\",\n \"score\": \"0.58985794\",\n \"text\": \"function _1p21_dv_allow_file_types($mimes) {\\n\\t\\t$mimes['csv'] = 'text/csv';\\n\\t\\t$mimes['tsv'] = 'text/tsv';\\n\\t\\treturn $mimes;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc3f5df0cc7ba6bdbcf9792e8be4793b\",\n \"score\": \"0.5889538\",\n \"text\": \"public static function mimes() {\\n return static::$mimes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f20793384614cb515b32c4526fa69793\",\n \"score\": \"0.5887401\",\n \"text\": \"public static function _mime_types($ext = '') {\\n $mimes = array(\\n 'hqx' => 'application/mac-binhex40',\\n 'cpt' => 'application/mac-compactpro',\\n 'doc' => 'application/msword',\\n 'bin' => 'application/macbinary',\\n 'dms' => 'application/octet-stream',\\n 'lha' => 'application/octet-stream',\\n 'lzh' => 'application/octet-stream',\\n 'exe' => 'application/octet-stream',\\n 'class' => 'application/octet-stream',\\n 'psd' => 'application/octet-stream',\\n 'so' => 'application/octet-stream',\\n 'sea' => 'application/octet-stream',\\n 'dll' => 'application/octet-stream',\\n 'oda' => 'application/oda',\\n 'pdf' => 'application/pdf',\\n 'ai' => 'application/postscript',\\n 'eps' => 'application/postscript',\\n 'ps' => 'application/postscript',\\n 'smi' => 'application/smil',\\n 'smil' => 'application/smil',\\n 'mif' => 'application/vnd.mif',\\n 'xls' => 'application/vnd.ms-excel',\\n 'ppt' => 'application/vnd.ms-powerpoint',\\n 'wbxml' => 'application/vnd.wap.wbxml',\\n 'wmlc' => 'application/vnd.wap.wmlc',\\n 'dcr' => 'application/x-director',\\n 'dir' => 'application/x-director',\\n 'dxr' => 'application/x-director',\\n 'dvi' => 'application/x-dvi',\\n 'gtar' => 'application/x-gtar',\\n 'php' => 'application/x-httpd-php',\\n 'php4' => 'application/x-httpd-php',\\n 'php3' => 'application/x-httpd-php',\\n 'phtml' => 'application/x-httpd-php',\\n 'phps' => 'application/x-httpd-php-source',\\n 'js' => 'application/x-javascript',\\n 'swf' => 'application/x-shockwave-flash',\\n 'sit' => 'application/x-stuffit',\\n 'tar' => 'application/x-tar',\\n 'tgz' => 'application/x-tar',\\n 'xhtml' => 'application/xhtml+xml',\\n 'xht' => 'application/xhtml+xml',\\n 'zip' => 'application/zip',\\n 'mid' => 'audio/midi',\\n 'midi' => 'audio/midi',\\n 'mpga' => 'audio/mpeg',\\n 'mp2' => 'audio/mpeg',\\n 'mp3' => 'audio/mpeg',\\n 'aif' => 'audio/x-aiff',\\n 'aiff' => 'audio/x-aiff',\\n 'aifc' => 'audio/x-aiff',\\n 'ram' => 'audio/x-pn-realaudio',\\n 'rm' => 'audio/x-pn-realaudio',\\n 'rpm' => 'audio/x-pn-realaudio-plugin',\\n 'ra' => 'audio/x-realaudio',\\n 'rv' => 'video/vnd.rn-realvideo',\\n 'wav' => 'audio/x-wav',\\n 'bmp' => 'image/bmp',\\n 'gif' => 'image/gif',\\n 'jpeg' => 'image/jpeg',\\n 'jpg' => 'image/jpeg',\\n 'jpe' => 'image/jpeg',\\n 'png' => 'image/png',\\n 'tiff' => 'image/tiff',\\n 'tif' => 'image/tiff',\\n 'css' => 'text/css',\\n 'html' => 'text/html',\\n 'htm' => 'text/html',\\n 'shtml' => 'text/html',\\n 'txt' => 'text/plain',\\n 'text' => 'text/plain',\\n 'log' => 'text/plain',\\n 'rtx' => 'text/richtext',\\n 'rtf' => 'text/rtf',\\n 'xml' => 'text/xml',\\n 'xsl' => 'text/xml',\\n 'mpeg' => 'video/mpeg',\\n 'mpg' => 'video/mpeg',\\n 'mpe' => 'video/mpeg',\\n 'qt' => 'video/quicktime',\\n 'mov' => 'video/quicktime',\\n 'avi' => 'video/x-msvideo',\\n 'movie' => 'video/x-sgi-movie',\\n 'doc' => 'application/msword',\\n 'word' => 'application/msword',\\n 'xl' => 'application/excel',\\n 'eml' => 'message/rfc822'\\n );\\n return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f20793384614cb515b32c4526fa69793\",\n \"score\": \"0.5887401\",\n \"text\": \"public static function _mime_types($ext = '') {\\n $mimes = array(\\n 'hqx' => 'application/mac-binhex40',\\n 'cpt' => 'application/mac-compactpro',\\n 'doc' => 'application/msword',\\n 'bin' => 'application/macbinary',\\n 'dms' => 'application/octet-stream',\\n 'lha' => 'application/octet-stream',\\n 'lzh' => 'application/octet-stream',\\n 'exe' => 'application/octet-stream',\\n 'class' => 'application/octet-stream',\\n 'psd' => 'application/octet-stream',\\n 'so' => 'application/octet-stream',\\n 'sea' => 'application/octet-stream',\\n 'dll' => 'application/octet-stream',\\n 'oda' => 'application/oda',\\n 'pdf' => 'application/pdf',\\n 'ai' => 'application/postscript',\\n 'eps' => 'application/postscript',\\n 'ps' => 'application/postscript',\\n 'smi' => 'application/smil',\\n 'smil' => 'application/smil',\\n 'mif' => 'application/vnd.mif',\\n 'xls' => 'application/vnd.ms-excel',\\n 'ppt' => 'application/vnd.ms-powerpoint',\\n 'wbxml' => 'application/vnd.wap.wbxml',\\n 'wmlc' => 'application/vnd.wap.wmlc',\\n 'dcr' => 'application/x-director',\\n 'dir' => 'application/x-director',\\n 'dxr' => 'application/x-director',\\n 'dvi' => 'application/x-dvi',\\n 'gtar' => 'application/x-gtar',\\n 'php' => 'application/x-httpd-php',\\n 'php4' => 'application/x-httpd-php',\\n 'php3' => 'application/x-httpd-php',\\n 'phtml' => 'application/x-httpd-php',\\n 'phps' => 'application/x-httpd-php-source',\\n 'js' => 'application/x-javascript',\\n 'swf' => 'application/x-shockwave-flash',\\n 'sit' => 'application/x-stuffit',\\n 'tar' => 'application/x-tar',\\n 'tgz' => 'application/x-tar',\\n 'xhtml' => 'application/xhtml+xml',\\n 'xht' => 'application/xhtml+xml',\\n 'zip' => 'application/zip',\\n 'mid' => 'audio/midi',\\n 'midi' => 'audio/midi',\\n 'mpga' => 'audio/mpeg',\\n 'mp2' => 'audio/mpeg',\\n 'mp3' => 'audio/mpeg',\\n 'aif' => 'audio/x-aiff',\\n 'aiff' => 'audio/x-aiff',\\n 'aifc' => 'audio/x-aiff',\\n 'ram' => 'audio/x-pn-realaudio',\\n 'rm' => 'audio/x-pn-realaudio',\\n 'rpm' => 'audio/x-pn-realaudio-plugin',\\n 'ra' => 'audio/x-realaudio',\\n 'rv' => 'video/vnd.rn-realvideo',\\n 'wav' => 'audio/x-wav',\\n 'bmp' => 'image/bmp',\\n 'gif' => 'image/gif',\\n 'jpeg' => 'image/jpeg',\\n 'jpg' => 'image/jpeg',\\n 'jpe' => 'image/jpeg',\\n 'png' => 'image/png',\\n 'tiff' => 'image/tiff',\\n 'tif' => 'image/tiff',\\n 'css' => 'text/css',\\n 'html' => 'text/html',\\n 'htm' => 'text/html',\\n 'shtml' => 'text/html',\\n 'txt' => 'text/plain',\\n 'text' => 'text/plain',\\n 'log' => 'text/plain',\\n 'rtx' => 'text/richtext',\\n 'rtf' => 'text/rtf',\\n 'xml' => 'text/xml',\\n 'xsl' => 'text/xml',\\n 'mpeg' => 'video/mpeg',\\n 'mpg' => 'video/mpeg',\\n 'mpe' => 'video/mpeg',\\n 'qt' => 'video/quicktime',\\n 'mov' => 'video/quicktime',\\n 'avi' => 'video/x-msvideo',\\n 'movie' => 'video/x-sgi-movie',\\n 'doc' => 'application/msword',\\n 'word' => 'application/msword',\\n 'xl' => 'application/excel',\\n 'eml' => 'message/rfc822'\\n );\\n return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d510006bf33edb2e0bbac131022cd525\",\n \"score\": \"0.58738476\",\n \"text\": \"public function getSupported()\\n\\t{\\n\\t\\treturn $this->_aArchives;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"332e8772ce9ed0d485ce3c6ec87a0383\",\n \"score\": \"0.5869314\",\n \"text\": \"public static function get_accepted_formats();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f5df3a0c21914df76863e3efe911760\",\n \"score\": \"0.5868263\",\n \"text\": \"function mimes_types($mime)\\n\\t{\\n\\t\\treturn ( !isset(mime::$types[$mime]) ) ? FALSE : mime::$types[$mime];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"140c39d04707b9e6ca25e6d1614b3688\",\n \"score\": \"0.5866099\",\n \"text\": \"private function _get_other_types() {\\n\\t\\t$mime_types = include W3TC_INC_DIR . '/mime/other.php';\\n\\t\\treturn $mime_types;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9610065fe1aeaf1fce9fd5b381191221\",\n \"score\": \"0.5861325\",\n \"text\": \"public function getFileTypes(): ?array {\\n $val = $this->getBackingStore()->get('fileTypes');\\n if (is_array($val) || is_null($val)) {\\n TypeUtils::validateCollectionValues($val, 'string');\\n /** @var array|null $val */\\n return $val;\\n }\\n throw new \\\\UnexpectedValueException(\\\"Invalid type found in backing store for 'fileTypes'\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2d9adc9741384bdd6f636a06639201f\",\n \"score\": \"0.58534676\",\n \"text\": \"public static function allowed_types()\\n {\\n return self::$allowed_types;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ce03eca29e945cb20208c80f801a4a0\",\n \"score\": \"0.5850264\",\n \"text\": \"public function getAllowedExtensions()\\n {\\n return $this->allowedExtensions;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fa6be9e32ae2b56d9a6354bd0803e49\",\n \"score\": \"0.58478963\",\n \"text\": \"public static function types()\\n\\t{\\n\\t\\treturn self::$_types;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ff18ade4ab40cae1a355d0fe645ee5a\",\n \"score\": \"0.58448166\",\n \"text\": \"public function type()\\n {\\n return (filetype($this->filename));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba7e91ee597deecf4970cb1dd2a48328\",\n \"score\": \"0.5837215\",\n \"text\": \"public static function acceptedMimes()\\n {\\n $uppish = new UppishController;\\n\\n return $uppish->getAcceptedMimes();\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":751,"cells":{"query_id":{"kind":"string","value":"a6d28bcfc1f5f0e5997ec3c010217bbe"},"query":{"kind":"string","value":"Update the specified resource in storage."},"positive_passages":{"kind":"list like","value":[{"docid":"0dea886f93ebb55e9ba981cd5e7b23bc","score":"0.0","text":"public function update($id) {\n //\n }","title":""}],"string":"[\n {\n \"docid\": \"0dea886f93ebb55e9ba981cd5e7b23bc\",\n \"score\": \"0.0\",\n \"text\": \"public function update($id) {\\n //\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"b4e3ef83b1a29ff10f6ec4e5a5ce3acd","score":"0.65113205","text":"public function update(Resource $resource, ResourceRequest $request)\n {\n $resource->update($request->only('name'));\n\n return redirect()->route('admin.resources.index');\n }","title":""},{"docid":"4e0f4f227895ae1ef285ecc22e5eb729","score":"0.64805984","text":"public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n $input = $request->all();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource->update($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource \"'.$resource->name.'\" was updated');\n\n return ($backUrl = session()->get('index-referer-url'))\n ? redirect()->to($backUrl)\n : redirect('/resources');\n }","title":""},{"docid":"1d58cc0ac499a6369b9847fb37dc69a6","score":"0.64793074","text":"public function updateResource($resource, $id, array $data = []) {\n $result = $this->put($resource . '/' . $id, $data);\n return reset($result);\n }","title":""},{"docid":"dc93534b04eb8b81463653bc1fe9b4b9","score":"0.62045246","text":"public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n $resource->update($request->all());\n $resource->groups()->sync($request->get('groups'));\n\n flash('Resource was updated');\n\n return redirect('/resources');\n }","title":""},{"docid":"47e4c5326e79281be1ce31ec068dab77","score":"0.61861783","text":"public static function updateResource($path, $object)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n\n return self::connection()->put(self::$api_path . $path, $object);\n }","title":""},{"docid":"85d21a332b71fa821f58587ae26611d6","score":"0.60594326","text":"public function update(Request $request)\n {\n $validatedData = $request->validate([\n 'resource_name' => 'required',\n 'hourly_rate' => 'required|numeric',\n ]);\n\n $resource = Resource::find($request->id);\n\n $resource->resource_name = $request->resource_name;\n $resource->hourly_rate = $request->hourly_rate;\n \n if ($resource->save()) {\n $request->Session()->flash('alert-success', 'resources details updated was successful!');\n return redirect('admin/index-resource');\n } else {\n $request->Session()->flash('alert-error', 'resources details updated was failed!');\n }\n }","title":""},{"docid":"a44cde5599b432199ba53bd6e695fbcc","score":"0.60480636","text":"public function update(Request $request, $resource)\n { \n $this->form()->setModel($resource)->save(function() {});\n \n return $this->redirect($request, $resource); \n }","title":""},{"docid":"f73d66d218eef0be3b8199b19c37b26f","score":"0.60452485","text":"public function updateStream($path, $resource, Config $config)\n {\n $options = $config->get('options',[]);\n return $this->client->putObjectFromString($this->bucket,$path,$resource,$options);\n }","title":""},{"docid":"a6e3d6ef1ecb867e394cc699e1165c81","score":"0.6025207","text":"public function update(SeriesRequest $request, Series $series)\n {\n //\n $this->authorize('author',$series);\n\n $series->update($request->all());\n\n if ($request->file('file')) {\n\n # code...\n $url = Storage::put('series',$request->file('file'));\n \n\n if ($series->image) {\n # code...\n Storage::delete($series->image->url);\n\n $series->image->update([\n\n 'url' => $url\n ]);\n } else{\n $series->image()->create([\n\n 'url' => $url\n ]);\n \n \n\n }\n\n}\n\nreturn redirect()->route('admin.series.edit', $series)->with('info','La serie se actualizo con éxito');\n}","title":""},{"docid":"e0919a7b4ca0ee93949e8600cb6418f4","score":"0.60211957","text":"public function resourceUpdate($new = TRUE, $resource = NULL) {\n if (!$resource) {\n $resource = $this->resource;\n }\n\n $path = FALSE;\n $file = '';\n\n if (isset($resource['public_id'])) {\n $file = $resource['public_id'];\n $path = dirname($file);\n\n // Append file format into filename.\n if (!empty($resource['format'])) {\n $file .= '.' . $resource['format'];\n }\n\n $file = pathinfo($file, PATHINFO_BASENAME);\n\n if ($new) {\n $this->save($resource);\n }\n else {\n if ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FOLDER) {\n $this->deleteFolder($resource['public_id']);\n }\n elseif ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FILE) {\n $this->delete($resource['public_id']);\n }\n }\n }\n\n return array($path, $file);\n }","title":""},{"docid":"ff76cc80d913540a356897bd9e7edf87","score":"0.5980603","text":"public function update(User $userAuthenticated, User $userResource)\n {\n //\n }","title":""},{"docid":"748b4a954d0155bebbd137382c5201a0","score":"0.59615195","text":"public function update($id, CreateResourceRequest $request, Guard $auth)\n\t{ \n\t\t$resource = Resource::findOrFail($id);\n\t\t$user = $auth->user();\n\n\t\t$resource->name \t\t= $request->input('name');\n\t\t$resource->description \t= $request->input('description');\n\t\t$resource->type \t\t= $request->input('type');\n\t\t$resource->user_id \t\t= $user->id;\n\t\t$resource->signature_id = $request->input('signature');\n\t\t$resource->teacher_id \t= $request->input('teacher');\n\n\t\t$resource->save();\n\n\t\tif ( $request->hasFile('file') && $request->file('file')->isValid() ){\n\t\t\t$file = $request->file('file');\n\t\t\t$file_name = $resource->id . '_' . $user->id . '.' . $file->getClientOriginalExtension();\n\t\t\t\n\t\t\t$file->move($this->DESTINATION_PATH, $file_name);\n\n\t\t\t$resource->path = $file_name;\n\n\t\t\t$resource->save();\n\t\t}\n\n\t\t$this->log($resource, $auth->user(), 'update');\n\n\t\treturn redirect()->back();\n\t}","title":""},{"docid":"98fadc36fd3a4194a25023de21dae9ff","score":"0.59242314","text":"public function save($resource);","title":""},{"docid":"7003560e3a9d31cfca396c50aa6ff75e","score":"0.5859935","text":"public function update(Request $request, $id)\n {\n //\n $resource = Resource::find($id);\n\n $resource->name = $request->resource_name;\n $resource->link = $request->resource_link;\n\n $resource->save();\n\n return [\"message\"=>\"Data updated\",\"status\"=>true];\n }","title":""},{"docid":"ee8cdd9d7a907937ce79086e18097a3b","score":"0.58592844","text":"public function update(CompanyStorageRequest $request, $id)\n {\n return $this->save($request,$id); \n }","title":""},{"docid":"bd52066336af51a1e0e57bbecc86f7ec","score":"0.5848347","text":"public function update(RequeteStoreRequest $request, $id)\n {\n$Requete=Requete::get()->where('id',$id)->first();\n if($Requete->update($request->toArray())) {\n return new RequeteResource($Requete);\n }\n }","title":""},{"docid":"28c24d6c09bf3e40d09f31610f428cd7","score":"0.5828425","text":"public function update(Request $request, $id)\n {\n $request->validate([\n 'ir_name' => 'required',\n 'ir_resource_type' => 'required',\n 'ir_subject' => 'required',\n 'ir_file' => ''\n ]);\n\n $refInstructional = InstructionalResource::find($id)->src_path;\n\n if (isset($request->ir_file)) {\n $newFileName = time() . '-' . str_replace(' ', '-', $request->ir_name) . '.' . $request->ir_file->extension();\n\n //store new file\n $request->file('ir_file')->storeAs('public', $newFileName);\n //delete old file\n if (Storage::disk('public')->exists($refInstructional)) {\n Storage::delete('public/' . $refInstructional);\n }\n } else {\n $newFileName = $refInstructional;\n }\n\n if (InstructionalResource::where('id', $id)\n ->update([\n 'name' => $request->ir_name,\n 'src_path' => $newFileName,\n 'user_id' => auth()->user()->id,\n 'resource_type_id' => $request->ir_resource_type,\n 'subject_id' => $request->ir_subject\n ])\n ) {\n $request->session()->flash('status', 'Task was successful!');\n }\n\n return back();\n }","title":""},{"docid":"e67250003befec77cf9e6350d869f4c6","score":"0.5821081","text":"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required|max:100',\n 'desc' => 'required',\n 'link' => 'required',\n 'cat' => 'required',\n 'image' => 'image',\n ]);\n $update = Product::findOrFail($id);\n $update->title = $request->title;\n $update->description = $request->desc; \n $update->link = $request->link; \n $update->category_id = $request->cat; \n if($request->hasFile('image')){\n Storage::delete('products/'.$request->oldimage); \n $file = $request->image->store('products/');\n $update->image = $request->image->hashName(); \n // echo $request->oldimage; \n } \n $update->save(); \n return redirect()->route('product.index')->with('success','product updated');\n }","title":""},{"docid":"ebf6708cd5a6c4cd7cc8acdfd9f26c08","score":"0.5804868","text":"public function update(Request $request, Product $product)\n {\n \\Storage::delete($product->image);\n $path=$request->file('image')->store('product');\n $params=$request->all();\n $params['image']=$path;\n $product->update($params);;\n return redirect()->route('products.index');\n }","title":""},{"docid":"3e27d59acc6129f2d7e02abe1e9bdeb3","score":"0.5781152","text":"public function updateNote(NoteRequest $request, $resource)\n {\n $request->save($resource);\n }","title":""},{"docid":"d29fc82b57f01c3fbe6bb99a3be246e9","score":"0.5768848","text":"public function putAction()\n\t{\n\t\t// get account\r\n\t\t$account = $this->getActiveAccount();\n\t\t\t\n\t\t$this->view->id = $id;\n\t\t$this->view->params = $this->_request->getParams();\n\t\t$this->view->message = sprintf('Resource #%s Updated', $id);\n\t\t$this->_response->ok();\n\n\t}","title":""},{"docid":"b7efc8833e2707d2c41ccbb075ab62b4","score":"0.5752699","text":"public function updateExisting();","title":""},{"docid":"3b6c3aaa23b4fb918ebc093545c13dc6","score":"0.57525045","text":"public function update($entity);","title":""},{"docid":"eaf18f66946228a152f8b83c6b49e31e","score":"0.5747208","text":"public function update($id, $data) {}","title":""},{"docid":"eaf18f66946228a152f8b83c6b49e31e","score":"0.5747208","text":"public function update($id, $data) {}","title":""},{"docid":"794e05bd3692d966cd063aa2041fc336","score":"0.5736985","text":"public function updateStream($path, $resource, $config = null)\n {\n return $this->writeStream($path, $resource, $config);\n }","title":""},{"docid":"7fa7323735ca22c15cfa4866e023dcb7","score":"0.57337505","text":"public function setResource($resource);","title":""},{"docid":"b743d37c52d097cc14915bd0a16b770e","score":"0.5726298","text":"public function update_put() {\n\n }","title":""},{"docid":"8ca0679ea794f66a39eaf0ff1d531d9c","score":"0.5721835","text":"public function update(ResourceUpdateRequest $request, Resource $resource)\n {\n ResourceResource::withoutWrapping();\n\n $input = $request->all();\n\n $resource->update($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n return (new ResourceResource($resource))\n ->response()\n ->setStatusCode(202);\n }","title":""},{"docid":"424bc30e7bfe2058299766d4dae981b9","score":"0.57125896","text":"public function setResource(Resource $resource)\n {\n $this->resource = $resource;\n $this->isResourceModified = true;\n $this->stopPropagation();\n }","title":""},{"docid":"148c03384f2be8de6650d8fb7868c9e0","score":"0.5700769","text":"public function update(Request $request, $id)\n {\n \n $this->validate($request, [\n 'title' => 'required|max:100',\n 'desc' => 'required',\n 'link' => 'required',\n 'image' => 'image|dimensions:min_width=800,max_width=1920',\n ]);\n $update = Slide::findOrFail($id);\n $update->title = $request->title;\n $update->description = $request->desc; \n if($request->hasFile('image')){\n Storage::delete('slides/'.$request->oldimage); \n $file = $request->image->store('slides/');\n $update->image = $request->image->hashName(); \n // echo $request->oldimage; \n } \n $update->save(); \n return redirect()->route('slide.index')->with('success','slide updated');\n }","title":""},{"docid":"f3207026fe10a78c71deeca618c87d18","score":"0.5699133","text":"public function update(Request $request, $id) : StudentResource\n {\n $student = Student::find($id);\n $student->first_name = $request->first_name;\n $student->last_name = $request->last_name;\n $student->gender = $request->gender;\n $student->phone = $request->phone;\n $student->class = $request->class;\n $student->country = $request->country;\n\n\n if ($request->image) {\n \n if (empty($student->image)) {\n $image_path = public_path(). '/images/students/' .$student->image;\n unlink($image_path);\n\n // here we check if the studet image is not null unlick the image \n // from the folder else skip and update new image\n }\n }\n // here is the image part okay\n\n if ($request->hasFile('image')) {\n \n $file = $request->file('image');\n $file->move(public_path(). '/images/students', $file->getClientOriginalName());\n\n $student->image = $file->getClientOriginalName();\n }\n\n $student->save();\n return new StudentResource($student);\n }","title":""},{"docid":"9e5c6816a1cdb070e1c6800898771f34","score":"0.5692049","text":"public function updateStream($path, $resource, array $config = [])\n {\n list($prefix, $path) = $this->getPrefixAndPath($path);\n\n return $this->getFilesystem($prefix)->updateStream($path, $resource, $config);\n }","title":""},{"docid":"e298ed6e92031fa9134c5a6ed2507d24","score":"0.5691853","text":"public function update($object);","title":""},{"docid":"df12e12fb31bd67805101fd587a91508","score":"0.568933","text":"public function update(Request $request, $id)\n {\n $validate = $request->validate([\n 'prev_image' => 'required|string',\n ]);\n // dd($request->all());\n\n if ($request->hasfile('image')) {\n $i = Storage::disk('public')->put('sliders', $request->image[0]);\n Storage::delete('/public/' . $request->prev_image);\n } else {\n $i = $request->prev_image;\n }\n $store = Slider::find($id);\n $store->title = $request->title;\n $store->link = $request->link;\n $store->link_name = $request->link_name;\n $store->description = $request->description;\n $store->image = $i;\n $store->update();\n if ($store) {\n return redirect()->back()->with('success', 'Slider Updated Successfully !!');\n } else {\n return redirect()->back()->with('error', 'Failed to Update !!');\n }\n\n }","title":""},{"docid":"6429c73de2ef2191c3d2be22fbf0f39c","score":"0.5675671","text":"public function update($data);","title":""},{"docid":"6429c73de2ef2191c3d2be22fbf0f39c","score":"0.5675671","text":"public function update($data);","title":""},{"docid":"fcdf6c196ac99617a3c5a5718a18f7e9","score":"0.5661846","text":"public function update(Request $request, $id)\n {\n $rules = [\n 'name' => 'required|max:100',\n 'price' => 'required|numeric',\n 'photo_url' => 'image'\n ];\n\n $request->validate($rules);\n\n // $product = \\App\\Product::find($id);\n\n // if ($request->hasFile('photo_url')){\n // $newPath = $request->file('photo_url')->store('public/products');\n\n // Storage::delete($product->photo_url);\n\n // $product->photo_url = $newPath;\n // }\n//\n // if ($request->input('delete_photo') == true){\n // Storage::delete($product->photo_url);\n\n // $product->photo_url = null;\n // }\n\n // $product->name = $request->input('name');\n // $product->price = $request->input('price');\n // $product->save();\n\n $product = \\App\\Product::find($id);\n\n if ($request->hasFile('photo_url')){\n $newPath = $request->file('photo_url')->store('public/products');\n\n Storage::delete($product->photo_url);\n\n $product->photo_url = $newPath;\n }\n\n if ($request->input('delete_photo') == true){\n Storage::delete($product->photo_url);\n\n $product->photo_url = null;\n }\n\n $product->fill($request->all());\n\n $product->save();\n\n return redirect('products');\n }","title":""},{"docid":"689842d3aad9dcb88b75b155c54181eb","score":"0.56460696","text":"public function updateStream($path, $resource, Config $config)\n {\n if ( ! $this->has($path)){\n return false;\n } else {\n return $this->write($path, $resource, $config);\n } \n }","title":""},{"docid":"fbd22036cd27458692009f909599ca04","score":"0.5634174","text":"public function update(Request $request, $id)\n {\n //dd($request);\n $product = new Product();\n $product_updated = $product->validateRequest($request)->store($id);\n\n if ($product_updated) {\n if ($request->has('blocks')) {\n ProductBlock::store($request, $product_updated['id']);\n }\n\n $product_updated->storeImages($request);\n\n if ($request->hasFile('file')) {\n $filepath = Photo::imageUpload($request->file('file'), $product_updated, 'pdf', 'pdf');\n\n Product::updateFilePath($product_updated, $filepath);\n }\n\n return redirect()->back()->with(['success' => 'Proizvod je uspješno snimljen.!']);\n }\n\n return redirect()->back()->with(['error' => 'Whoops..! Došlo je do greške sa snimanjem proizvoda.']);\n }","title":""},{"docid":"00b2a6a53c34699e9c9f5020017ef232","score":"0.56193584","text":"public function update(Request $request, $id)\n {\n $resource = Resource::findorfail($id);\n\n $resource->name = $request->name;\n $resource->description = $request->description;\n\n $resource->save();\n\n return redirect()->route('resources.show', [$resource->id]);\n }","title":""},{"docid":"c6c472e9a208986431a784c1ec5cc1f6","score":"0.56107134","text":"public function update(){}","title":""},{"docid":"c6c472e9a208986431a784c1ec5cc1f6","score":"0.56101215","text":"public function update(){}","title":""},{"docid":"8ceb4c9e42d44542ef7be0dc09286ad0","score":"0.5605276","text":"public function update(Request $request, $id){\n if($request->session()->exists('resources')) {\n $resources = $request->session()->get('resources');//meto los datos que hay en el array de recursos\n if(isset($resources[$id])) {//si existe ese id en el array de recursos\n $resource = $resources[$id];//cojo el id que esta en el array de recursos\n $idInput = $id;//en la variable idInput mete el id que hay(el que ponemos nosotros por defecto)\n $nameInput = $request->input('name');//en la variable nameInput meto el valor que estoy escribiendo en el input del name\n $prieceInput = $request->input('priece');//en la variable prieceInput meto el valor que estoy escribiendo en el input del price\n $resource['id'] = $idInput;//meto en el recurso del id el valor del idInput\n $resource['name'] = $nameInput;//meto en el recurso del name el valor del nameInput\n $resource['priece'] = $prieceInput;//meto en el recurso del precio el valor del prieceInput\n $resources[$idInput] = $resource;//mete el nuevo id en el array de recurso\n $request->session()->put('resources', $resources);\n return redirect('resource')->with('message', 'Se ha editado el elemento correctamente');\n }\n }\n return back()->withInput();//te lleva a la pantalla del index\n }","title":""},{"docid":"fc59c0e54a38762a43464491404f10d3","score":"0.5597341","text":"function startPut($resource, $id, array $data);","title":""},{"docid":"c0db760cd21841392ea5c5ef4b2148cc","score":"0.559549","text":"public function update(Request $request, $id)\n {\n $datos=request()->except('_token','_method');\n\n if($request->hasFile('imagen')){\n $dato=productos::findOrFail($id);\n Storage::delete('public/'.$dato->imagen);\n $datos['imagen']=$request->file('imagen')->store('uploads','public');\n }\n\n\n\n productos::where('id','=',$id)->update($datos);\n return redirect('productos');\n }","title":""},{"docid":"4016847dea9b55e59a4acd18600a30f5","score":"0.55813426","text":"public function update($request, $id);","title":""},{"docid":"4016847dea9b55e59a4acd18600a30f5","score":"0.55813426","text":"public function update($request, $id);","title":""},{"docid":"dffb1371124c6ce8693c2368a83f9606","score":"0.55781215","text":"public function update($param = array()) {\n $tail = '/' . $this->getUrlTail() . '/' . $this->getId();\n\n $url = $this->getService()->getUrl($tail);\n return $this->getClient()->put($url, $param);\n }","title":""},{"docid":"8a53b6bc58310fb381219eebcf9b209d","score":"0.55695176","text":"public function update(Request $request, $id)\n {\n $product = new Product;\n\n $productData['name'] = $request->name;\n $productData['slug'] = str_slug($request->name);\n $productData['cpu'] = $request->cpu;\n $productData['ram'] = $request->ram;\n $productData['storage'] = $request->storage;\n $productData['display'] = $request->display;\n $productData['vga'] = $request->vga;\n $productData['battery'] = $request->battery;\n $productData['weight'] = $request->weight;\n $productData['material'] = $request->material;\n $productData['kind'] = $request->kind;\n $productData['condition'] = $request->condition;\n $productData['price'] = $request->price;\n $productData['promotion'] = $request->promotion;\n $productData['status'] = $request->status;\n $productData['featured'] = $request->featured;\n $productData['warranty'] = $request->warranty;\n $productData['description'] = $request->description;\n $productData['category'] = $request->category;\n if ($request->hasFile('img')) {\n $img = $request->img->getClientOriginalName();\n $productData['img'] = $img;\n $request->img->storeAs('./public/img', $img);\n }\n\n $product::where('product_id', $id)->update($productData);\n\n return redirect('admin/product');\n }","title":""},{"docid":"a86060f0afd44ec384ed886d347caa73","score":"0.55676407","text":"abstract protected function save($resource);","title":""},{"docid":"f77c93b62808595a63d9f6f31b1f80e0","score":"0.55661047","text":"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }","title":""},{"docid":"6696001dcc15e351e03c08acc8b2bcd9","score":"0.5565939","text":"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->has('file')) {\n $this->removeImage(FileConstant::PRODUCTS_IMAGES, $product->image_id);\n $image = GenericController::saveImage($request, 'file', FileConstant::PRODUCTS_IMAGES);\n $product->image_id = $image->id ?? null;\n }\n $product->title = $request->title;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->ingredient = $request->ingredient;\n $product->product_code = $request->product_code;\n $product->save();\n $product->tags()->detach();\n $product->tags()->attach($request->tags);\n return redirect()->route('manage_store')->with('success_message', 'Product successfully update.');\n }","title":""},{"docid":"0af57b3d439623d9ddfbbd2c23e24b1f","score":"0.55599797","text":"public function update($id, $data);","title":""},{"docid":"0af57b3d439623d9ddfbbd2c23e24b1f","score":"0.55599797","text":"public function update($id, $data);","title":""},{"docid":"0af57b3d439623d9ddfbbd2c23e24b1f","score":"0.55599797","text":"public function update($id, $data);","title":""},{"docid":"3e1652dc1efabe740a60dc879dc15b5a","score":"0.5555882","text":"public function update($id)\n\t{\n\t\t$this->resource->avatar = strlen(Input::get('_delete')) ? : STAPLER_NULL ; \n\t\tif ($this->resource->store(Input::all())) {\n\t return $this->respondTo(\n\t \tarray(\n\t \t\t'html' => function()\n\t \t\t\t\t {\n\t \t\t\t\t \treturn Redirect::route('admin.profiles.show', ['users' => $this->resource->id])\n\t \t\t\t\t->with('notice', 'Profile updated');\n\t \t\t\t\t }, \n\t \t\t'js' => function()\n\t \t\t\t\t{\n\t \t\t\t\t\treturn $this->resource;\n\t \t\t\t\t}\n\t \t\t)\n\t \t);\n\t }\n\t else {\n\t \treturn $this->respondTo(\n\t \t\tarray(\n\t \t\t\t'html' => function()\n\t \t\t\t\t\t {\n\t \t\t\t\t\t \treturn Redirect::action('admin\\Profiles@edit', ['user' => $this->resource])\n\t\t\t\t ->withInput(Input::all())\n\t\t\t\t ->withErrors($this->resource->errors());\n\t \t\t\t\t\t },\n\t \t\t\t'js' => function()\n\t \t\t\t{\n\t \t\t\t\treturn $this->resource->errors();\t\n\t \t\t\t},\n\t \t'status' => 422\n\t \t\t\t)\n\t \t\t);\n\t } \n\t}","title":""},{"docid":"012d802cdd39ad4f48a5d0ab5db49368","score":"0.55530256","text":"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }","title":""},{"docid":"6fd81565fe0197d15ae9c289b0ce5a96","score":"0.5542752","text":"public function updateResourceDimensions();","title":""},{"docid":"b518a7b9f54c3cdcab6b1c0bdd364908","score":"0.55392486","text":"public function update(Request $request, $id)\n {\n $data=$this->validate($request,[\n 'icon'=>'required',\n 'main_title'=>'required',\n 'title'=>'required',\n 'description'=>'required',\n ]);\n $path=$request->old_image;\n if($request->hasFile('thumbnail')){\n unlink(\"/storage/$path\");\n $path=$request->file('thumbnail')->store('Thumbnail');\n $data['thumbnail']=$path;\n }\n \n ChooseUs::where('id',$id)->update($data);\n return redirect()->route('listChooseUs');\n\n }","title":""},{"docid":"f876ddfae189152894b680ec80767669","score":"0.553887","text":"public function update(Request $request)\n {\n //\n //dd($request->all());\n\n $id = $request->input('eid');\n $name = $request->input('ename');\n $quantity = $request->input('equantity');\n $price = $request->input('eprice');\n $date = date(\"Y-m-d H:i:s\");\n\n //reading all products from file\n $products = Storage::disk('local')->get('public/products.json');\n $products = json_decode($products, true);\n\n //$id = count($products) + 1;\n //saving new producto in memory\n for ($i=0; $i < count($products); $i++) { \n if($products[$i]['id'] == $id){\n $products[$i] = [\n 'id' => $id\n ,'name' => $name\n , 'quantity' => $quantity\n , 'price' => $price\n , 'date' => $date\n ];\n }\n }\n \n\n Storage::put('public/products.json', json_encode($products));\n // dd($products);\n return redirect('/');\n }","title":""},{"docid":"8c1b71d7fe33d5951e76205cc098ab6f","score":"0.5534759","text":"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeObject($path, $resource, $config);\n }","title":""},{"docid":"fd7ccf27b5b1585736a504a174476b51","score":"0.55280495","text":"public abstract function update($entity);","title":""},{"docid":"2ed29b085a06b0ff193e001c8b6edc77","score":"0.55265594","text":"public function update(Request $request)\n {\n\n\n\n $product = Product::Find($request->pid);\n\n $product->product_name = $request->productName;\n $product->cantidad = $request->cantidad;\n $product->pCompra = $request->pCompra;\n $product->pBase = $request->pBase;\n $product->isr = $request->isr;\n $product->iva = $request->iva;\n $product->pVenta = $request->pVenta;\n $product->utilidad = $request->utilidad;\n\n if( $request->imagenProducto ){\n\n $file = $request->file('imagenProducto');\n $nombre = $file->getClientOriginalName();\n\n Storage::disk('productos')->put( $nombre , File::get($file));\n\n $product->imagen = $file->getClientOriginalName();\n\n $product->save();\n\n return true;\n\n }else{\n\n $product->save();\n\n return true;\n\n }\n\n\n\n }","title":""},{"docid":"030a7c4a93d5d783d93752dbd039d0a4","score":"0.5526432","text":"public function update(UpdateProductRequest $request, Product $product)\n {\n $product->fill($request->except('image'));\n\n if($request->offered == 'on'){\n $product->offered = true;\n }\n else{\n $product->offered = false;\n }\n\n if($request->hasFile('image'))\n {\n $image = $product->images->where('position', 1)->first();\n Storage::delete($image->url);\n $product->images()->detach($image);\n $image->delete();\n\n $imageProduct = $this->storeImage($request->file('image'), 1);\n $product->images()->attach($imageProduct);\n }\n\n $product->save();\n\n return redirect()->route('products.updated', $product->store);\n }","title":""},{"docid":"57943537b2639b438b8481f3c079a88f","score":"0.5518334","text":"public function update(string $resourceId, array $params)\n {\n\n\n $isDefaultFile = $this->isDefaultFile($resourceId);\n $srcPath = $params['src_path'];\n $fileWasProvided = (null !== $srcPath);\n $content = $this->getCommitListContent();\n $userRelPath = $params['user_rel_path'];\n $files = $params['files'];\n\n if (true === $isDefaultFile) {\n $section = \"to_update\";\n } else {\n $section = \"to_add\";\n }\n\n\n $resources = $content[$section];\n if (array_key_exists($resourceId, $resources)) {\n\n /**\n * If the user doesn't provide a file, but the entry exists in the to_update section, this means\n * that the user already used the gui to upload a file previously, and so the entry (in to_update) has been created and files\n * exist already on the vfs, and now the user updates the file again, but this time just the meta-data (i.e. not the file).\n * In that case, we move the old files to the new location (if the name has changed).\n *\n */\n $resource = $resources[$resourceId];\n $this->updateResourceFilePaths($resource, $files, $userRelPath);\n }\n\n\n $this->storeEntry($params, [\n \"resourceId\" => $resourceId,\n \"dry\" => !$fileWasProvided,\n \"section\" => $section,\n ]);\n\n }","title":""},{"docid":"4238630fe835e2630790aa3af70cdd6d","score":"0.5511568","text":"public function update($segement);","title":""},{"docid":"6151cf096d056f5c54e0c8112d1f45b1","score":"0.5504522","text":"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->fill($request->except('image', 'product_categories'));\n $product->is_visible = $request->has('is_visible');\n $product->is_alcoholic = $request->has('is_alcoholic');\n $product->is_visible_when_no_stock = $request->has('is_visible_when_no_stock');\n $product->price = str_replace(',', '.', $request->price);\n\n if ($request->file('image')) {\n $file = new StorageEntry();\n $file->createFromFile($request->file('image'));\n\n $product->image()->associate($file);\n }\n\n $product->account()->associate(Account::findOrFail($request->input('account_id')));\n\n $categories = [];\n if ($request->has('product_categories') && count($request->input('product_categories')) > 0) {\n foreach ($request->input('product_categories') as $category) {\n $category = ProductCategory::find($category);\n if ($category != null) {\n $categories[] = $category->id;\n }\n }\n }\n $product->categories()->sync($categories);\n\n $this->setRanks();\n\n $product->save();\n\n $request->session()->flash('flash_message', 'The product has been updated.');\n\n return Redirect::route('omnomcom::products::edit', ['id' => $product->id]);\n\n }","title":""},{"docid":"d5316b557cb97c988d4dd7ad08ef95bf","score":"0.55043715","text":"public function update(Request $request, $id)\n {\n $validatedData = $request->validate([\n 'name'=> 'required',\n 'email'=> 'required',\n 'phone'=> 'required',\n 'address'=> 'required',\n 'type'=> 'required',\n 'photo'=> 'nullable',\n 'shop'=> 'required',\n 'account_number'=> 'nullable',\n 'bank_name'=> 'nullable',\n ]);\n\n $supplier = Supplier::find($id);\n $supplier->name = $request->name;\n $supplier->email = $request->email;\n $supplier->phone = $request->phone;\n $supplier->address = $request->address;\n $supplier->type = $request->type;\n $supplier->shop = $request->shop;\n $supplier->account_number = $request->account_number;\n $supplier->bank_name = $request->bank_name;\n\n if($request->hasFile('photo') ){\n //delete old image first\n if(File::exists('images/supplier/'.$supplier->photo))\n {\n File::delete('images/supplier/'.$supplier->photo);\n }\n $image = $request->file('photo');\n $img = time().'.'. $image->getClientOriginalExtension();\n $location = public_path('images/supplier/'.$img);\n Image::make($image)->save($location);\n $supplier->photo = $img;\n }\n\n $supplier->save();\n\n $notification = array(\n 'message' => 'Successfully Supplier Updated!',\n 'alert-type' => 'success'\n );\n\n return Redirect()->route('supplier.index')->with($notification);\n }","title":""},{"docid":"a58e121b784e418e2b8e2b169e227565","score":"0.5503471","text":"public function update(Request $request, $id)\n {\n $update = product::where('id', $id)->first();\n $update->name = $request['name'];\n $update->price = $request['price'];\n $update->stock = $request['stock'];\n $update->size = $request['size'];\n $update->category = $request['category'];\n $update->description = $request['description'];\n\n if($request->file('picture') == \"\")\n {\n $update->picture = $update->picture;\n } \n else\n {\n $file = $request->file('picture');\n $fileName = $file->getClientOriginalName();\n $request->file('picture')->move(\"image/\", $fileName);\n $update->picture = $fileName;\n }\n\n $update->update();\n\n Toast()->success('Edit Success');\n return redirect()->to('/product');\n }","title":""},{"docid":"713a0d373529950deb3cb81f9c35f528","score":"0.5502456","text":"public function update(Request $request, $id)\n {\n // On check si la requête valide le schéma de données\n $this->validate($request, [\n 'name' => 'required|string|min:5|max:100',\n 'description' => 'required|string',\n 'price' => 'required|string|min:0|not_in:0',\n 'reference' => 'required|string',\n 'category_id' => 'required|integer',\n 'state' => 'required|in:standard,solde',\n 'sizes' => 'required|array',\n 'sizes.*' => 'integer', // pour vérifier un tableau d'entiers il faut mettre sizes.*\n 'status' => 'required|in:published,unpublished',\n 'title_image' => 'string|nullable', // pour le titre de l'image si il existe\n 'picture' => 'image|max:3000',\n ]);\n\n // On récupère le produit à modifier\n $product = Product::find($id);\n\n $product->update($request->all()); // associé les fillables\n \n // on utilisera la méthode sync pour mettre à jour les tailles dans la table de liaison\n $product->sizes()->sync($request->sizes);\n\n // on check si l'utilisateur entre un nom d'image et on utiliser la méthode update pour mettre à jour le titre de l'image dans la table de liaison\n if (isset($request->name_image)) {\n $product->picture()->update([\n 'title' => $request->name_image,\n ]);\n }\n \n // On récupère l'image de la requête\n $im = $request->file('picture');\n \n // On vérifie si l'image existe\n if (!empty($im)) {\n\n // On récupère le lien de l'image\n $link = $request->file('picture')->store('images');\n // On retire Homme ou Femme du lien\n $newLink = str_replace(['Homme', 'Femme'], '', $link);\n // suppression de l'image si elle existe \n if(!empty($product->picture)){\n $product->picture()->delete(); // supprimer l'information en base de données\n }\n\n // mettre à jour la table picture pour le lien vers l'image dans la base de données\n $product->picture()->create([\n 'link' => $newLink,\n 'title' => $request->new_name_image?? $request->new_name_image\n ]);\n \n }\n\n //On retourne l'utilisateur vers la vue products index\n return redirect()->route('products.index')->with('message', 'success');\n }","title":""},{"docid":"cab0a1cd64b69a7208a1539e0b20d010","score":"0.54981893","text":"public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $update_data = $request->all();\n if ($request->hasFile('image')) {\n $extension = $request->file('image')->getClientOriginalExtension();\n $name = 'product_' . Str::random(5) . '.' . $extension;\n $path = \"assets/images/product/\";\n $request->file('image')->move($path, $name);\n $update_data['image'] = $path . $name;\n }\n if ($request->commission_percent) {\n $update_data['reseller_commission'] = $request->sell_price * ($request->commission_percent / 100);\n }\n $product->fill($update_data)->save();\n Toastr::success('Product Updated Successfully', 'Done', [\"positionClass\" => \"toast-top-right\"]);\n return redirect()->to('/admin/product');\n }","title":""},{"docid":"42a9d3235a287a318bd9326858f1dd4f","score":"0.5497566","text":"public function update(Request $request, $id)\n {\n $data = $request->except(['_token']); \n \n if ($request->hasFile('photo')) { \n $file = $request->file('photo');\n $filename = $file->getClientOriginalName();\n \n $destinationPath = base_path() . '/public/uploads/product';\n $file->move($destinationPath, $filename);\n \n $data['photo'] = $filename; \n }\n \n $update = \\DB::table('products')->where('id',$id)->update($data);\n \n if($update){\n \n return back()->with('success', 'Product has been updated.');\n }\n \n return back()->withInput();\n }","title":""},{"docid":"c7993a3cf0cd18ff840d680b772b6dfe","score":"0.5492069","text":"public function update($id)\n\t{\n $model = $this->model;\n $resource = $model::find($id);\n\n if (!$resource) {\n return Response::apiNotFound();\n }\n\n $input = Input::all();\n\n try {\n $this->validator->validate($input);\n $resource->update($input);\n return Response::api(['resource' => $resource]);\n } catch (InputValidationException $e) {\n return Response::apiValidationErrors($e->getValidationErrors(), $e->getMessage());\n }\n\t}","title":""},{"docid":"2cdc5be0acb052f86187218c7c65a79e","score":"0.54920435","text":"public function update_resources()\n\t{\n\t\tglobal $Mysql;\n\t\t\n\t\t// TODO: Make a way for newly-completed building upgrades to change this calculation.\n\t\t$seconds_passed = time() - $this->last_resource_update;\n\t\t$hours_passed = $seconds_passed / 3600;\n\t\t$this->resources->update($hours_passed);\n\t\t$this->last_resource_update = time();\n\t}","title":""},{"docid":"8ad8f4cfd5795198c9d578ad85ec6def","score":"0.54816514","text":"public function update(ProductRequest $request, $id)\n {\n $product = Product::findOrFail($id);\n if($request->hasFile('cover'))\n\t\t{\n Storage::disk('gcs')->delete($product->cover);\n $product->cover = Storage::disk('gcs')->put('products', $request->file('cover'));\n }\n $product->name = $request->name;\n $product->stock = $request->stock;\n\t\t$product->description = $request->description;\n\t\t$product->short_description =$request->short_description;\n\t\t$product->price =$request->price;\n $product->url = substr(str_slug($request->name),0,191);\n $product->category_id =$request->category_id;\n $product->save();\n return response()->json($product);\n }","title":""},{"docid":"50ed1ecdb9317f01c85501581feccf07","score":"0.54803365","text":"public function update(Request $request, $id)\n { \n \n /* $file = $request->file('image');\n \n $name = $request->file('image')->getClientOriginalName(); //obtener nombre de archivo\n $file->move('storage', $name); //mover archivo a la carpeta store */\n \n $Service = Service::find($id);\n\n /* $Service->descripcion = $request->descripcion;\n $Service->host = $request->host;\n $Service->ip = $request->ip;\n $Service->image = $name; */\n \n $Service->update($request->all());\n \n return response()->json($Service, 200);\n }","title":""},{"docid":"9597f2dbc4718b9f333e4446e6945f31","score":"0.5478411","text":"public function update($data) {\n }","title":""},{"docid":"a4f2a1763433a848120dc2bf3227c04e","score":"0.5473484","text":"public function update(Request $request, $id)\n {\n $market = Market::find($id);\n if(isset($request->path)){\n $path = $request->file('path')->store('uploads', 'public');\n } else {\n $path = $market->path;\n }\n\n $market->update([\n 'servicename' => $request->servicename,\n 'price' => intval($request->price),\n 'description' => $request->content,\n 'path' => $path\n ]);\n session()->flash('success', 'Продукт успешно обновлен');\n return redirect()->route('market.index');\n }","title":""},{"docid":"cd38b27f190e5c07f073bbe2dbf11656","score":"0.54676557","text":"public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n DB::beginTransaction();\n\n try {\n\n $filename = $product->image;\n\n if($request->hasFile('image')){\n\n $filename = $this->file_manager->manageFile($request->file('image'), 'images/products');\n }\n\n $product->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'image' => $filename,\n ]);\n \n } catch (Exception $e) {\n \n DB::rollBack();\n\n return back();\n }\n\n DB::commit();\n\n return redirect()->route('products.index')->with('success', 'Product successfully updated');\n }","title":""},{"docid":"13060cd318eed312852c00ed17885787","score":"0.5460793","text":"public function update($object)\n {\n }","title":""},{"docid":"d5e71c0d1e98d1666d257e78c12ddd49","score":"0.54569525","text":"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if ($request->hasFile('image')) {\n $file = $request->file('image');\n $extension = $file->getClientOriginalExtension();\n $filename = 'images/products/' . time() . '.' . $extension;\n $file->move('public/images/products', $filename);\n $product->image = $filename;\n $update_product = array(\n 'image' => $product->image,\n 'status' => $request->status\n\n );\n } else {\n $update_product = array(\n 'status' => $request->status\n );\n }\n $product->update($update_product);\n return redirect('admin/products');\n }","title":""},{"docid":"b4084f98de3322212bce3e8332459ba2","score":"0.5453466","text":"public function update(ArticleStoreRequest $request, Article $article): ArticleResource\n {\n $article->update($request->validated());\n\n $updated_article = $this->attachOrDetachTagsOfArticle(\n $article,\n $request->tags\n );\n\n $updated_article->save();\n\n return new ArticleResource(\n $updated_article\n );\n }","title":""},{"docid":"6bbe8dedc2a827e34e1daaab8e4e817f","score":"0.5453419","text":"public function update(Request $request, $id)\n {\n $asset = Asset::find($id);\n $asset->name = $request->name;\n $asset->quantity = $request->quantity;\n $asset->price = $request->price;\n $asset->save();\n\n $status = [\n 'status' => 'info',\n 'msg' => 'Data berhasil di update'\n ];\n\n return redirect()->route('asset.index')->with( $status );\n }","title":""},{"docid":"5909b7d875e8ebaed077d9aaa3103ffe","score":"0.54499286","text":"public function update(Request $request, $id)\n {\n $resident = Resident::findOrFail($id);\n $resident->update($request->except('photo_path'));\n if ($request->hasFile('photo_path')) {\n if ($resident->photo_path != '') Storage::disk('public')->delete($resident->photo_path);\n $path = $request->file('photo_path')->store('residents', 'public');\n $resident->update(['photo_path'=>$path]);\n }\n return redirect()->route('resident.index')->with('updated', 'Morador atualizado com sucesso!');\n }","title":""},{"docid":"2917b6683ccb6c65cb2fb9e85bb625aa","score":"0.5445316","text":"public function update(Request $request, $id)\n {\n //获取要编辑的信息\n $Resources = $request->only(['name','type','size','file','status']);\n DB::table(\"Resources\")->where(\"id\",$id)->update($Resources);\n //返回试图\n return redirect('admin/shangchuan');\n }","title":""},{"docid":"0e009016b15cbda45fcf52d873daf0b4","score":"0.5444949","text":"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'short_description' => 'required',\n 'price' => 'required',\n ]);\n // File Upload\n if ($request->hasFile('image')){\n // Get Filename with extension\n $filenameWithExt = $request->file('image')->getClientOriginalName();\n // Get just Filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n // Get just Ext\n $extension = $request->file('image')->getClientOriginalExtension();\n // Store Filename | Not overwrite image with same name\n $filenameStore = $filename.'_'.time().'.'.$extension;\n // Upload Image\n $path = $request->file('image')->storeAs('public/images/resto-product', $filenameStore);\n }\n // Create\n\n $resto_product = RestoProduct::find($id);\n $resto_product->title = $request->input('title');\n $resto_product->short_description = $request->input('short_description');\n $resto_product->price = $request->input('price');\n $resto_product->user_id = auth()->user()->id;\n if ($request->hasFile('image')){\n Storage::delete('public/images/resto-product'.$resto_product->image);\n $resto_product->image = $filenameStore;\n }\n $resto_product->save();\n\n return redirect('/menu-resto/resto-product')->with('success', 'Product Updated Successfully');\n }","title":""},{"docid":"1d5c7db46310d9215057b0295ae4acf6","score":"0.54426396","text":"public function update($record, $request);","title":""},{"docid":"8382479b28e811b0d9d1127b0c9f7585","score":"0.54411286","text":"public function update(Request $request, $id)\n {\n $scaleWeightItem = ScaleWeightItem::findOrFail($id);\n\n $scaleWeightItem->license_number = $request->get('license_number');\n $scaleWeightItem->driver = $request->get('driver');\n $scaleWeightItem->machine_code = $request->get('machine_code');\n $scaleWeightItem->user = $request->get('user');\n $scaleWeightItem->vendor = $request->get('vendor');\n $scaleWeightItem->item = $request->get('item');\n $scaleWeightItem->time = $request->get('time');\n $scaleWeightItem->gross_weight = $request->get('gross_weight');\n $scaleWeightItem->tare_weight = $request->get('tare_weight');\n $scaleWeightItem->net_weight = $request->get('net_weight');\n $scaleWeightItem->save();\n\n return new ApiResource($scaleWeightItem);\n }","title":""},{"docid":"52cbf49d1c53df8eac032ede3b214556","score":"0.5440425","text":"public function update(Request $request, $id)\n {\n $this->authChecker();\n $item = $this->provider::findOrFail($id);\n $item->name = $request->name;\n $item->restoarea_id = $request->restoarea_id;\n $item->size = $request->size;\n $item->update();\n\n return redirect()->route($this->webroute_path.'index')->withStatus(__('crud.item_has_been_updated', ['item'=>__($this->title)]));\n }","title":""},{"docid":"dfdcc32a6088cd7fa1a756fcbe3758df","score":"0.5439689","text":"public function update(UpdateResourceRequest $request, $id)\n {\n $user = $request->user();\n $resource = Resource::find($id);\n if ($request->has('resource_name')) {\n $resource->resource_name = $request->get('resource_name');\n }\n if (!$resource->save()) {\n throw ValidationException::withMessages([\n \"resource\" => [\"500001\"],\n ])->status(500);\n }\n\n return new ResourceResource($resource);\n }","title":""},{"docid":"fcbb8aa272243ff1148fb420a9930d94","score":"0.5439582","text":"public function update()\n {\n $this->validate(request(), [\n 'title' => 'required|max:255',\n 'pages' => 'integer',\n 'year' => 'integer',\n 'isbn' => 'required',\n ]);\n\n $book = Book::findOrFail(request('id'));\n $raw = request(['title', 'isbn', 'price', 'description', 'format', 'year', 'pages', 'source', 'publisher', 'series', 'availability', 'bookbinding']);\n $raw['image'] = $book->image;\n $book->prepare($raw)->update();\n\n $book->attach(request(['author', 'category', 'publisher']));\n\n if (is_array(request('price'))) {\n $book->updatePrices(request('price'));\n }\n\n session()->flash('success_message', 'Книга обновлена');\n return redirect()->route('book.list');\n }","title":""},{"docid":"85cc828ef538f860045b5d8fccb280b0","score":"0.5435616","text":"public function update($input, $id)\n {\n if (request()->hasFile('image')) {\n $destinationPath = 'storage/Stores/images';\n $file_info = getimagesize(request()->file('image'));\n if (empty($file_info)) { // No Image?\n Flash::error(trans('common.messages.valid_image'));\n return false;\n }\n $file = request()->file('image');\n $attach = $destinationPath . '/' . rand() . '-stores-' . date(\"d-m-y-H-M\") . '-' . $file->getClientOriginalName();\n $file->move($destinationPath, ($attach));\n $input['image'] = trim($attach);\n }\n\n $store = Store::findOrFail($id);\n $store->fill($input)->save();\n\n return $store;\n }","title":""},{"docid":"5ad7cc720b3fecdc71fb75066e6e7715","score":"0.5435329","text":"public function update($id, Request $request)\n {\n $product = Product::find($id);\n $product->image_id = $request->image_id;\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n $product->sale_price = $request->sale_price ?? $request->price;\n\n $product->save();\n\n return redirect(route('product.edit', $id));\n }","title":""},{"docid":"b8c2f01239a4821e25335f10d24bed76","score":"0.5433148","text":"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if (!$product) return redirect(route('products.index'));\n\n $this->validate($request,[\n 'name' => 'required',\n 'sell_price' => 'required|numeric',\n 'origin_price' => 'required|numeric',\n 'provider_id' => 'required|exists:providers,id',\n ]);\n Product::where('id',$id)\n ->update([\n 'name' => $request->name,\n 'sell_price' => $request->sell_price,\n 'origin_price' => $request->origin_price,\n 'provider_id' => $request->provider_id,\n ]);\n\n if ($request->hasFile('image')) {\n $file = $request->file('image'); \n $filename = time() . time() * 360 . time() * 1024 . \".\" . $file->extension();\n \n $oldImage = $product->image->filename;\n\n Photo::where('id',$product->image->id)\n ->update([\n 'filename' => $filename,\n 'filesize' => $file->getClientSize(),\n 'extension' => $file->extension(),\n 'product_id' => $product->id,\n ]);\n $path = $file->move($this->path,$filename);\n File::delete($this->path . '/' . $oldImage);\n \n }\n session()->flash('message', 'تمت عملية التعديل بنجاح');\n session()->flash('status', 'success');\n return redirect(route('products.index'));\n }","title":""},{"docid":"d9dfa985a23d52a88c5d6e0bc4baac1d","score":"0.5432292","text":"public function updateAction()\n {\n if ($this->request->hasArgument('uUID')) {\n $uuid = $this->request->getArgument('uUID');\n }\n if (empty($uuid)) {\n $this->throwStatus(400, 'Required uUID not provided', null);\n }\n $ordenstypObj = $this->ordenstypRepository->findByIdentifier($uuid);\n if (is_object($ordenstypObj)) {\n $ordenstypObj->setOrdenstyp($this->request->getArgument('ordenstyp'));\n $this->ordenstypRepository->update($ordenstypObj);\n $this->persistenceManager->persistAll();\n $this->throwStatus(200, null, null);\n } else {\n $this->throwStatus(400, 'Entity Ordenstyp not available', null);\n }\n }","title":""},{"docid":"82dea4a48b80657331cbfd5c532ed380","score":"0.54306734","text":"public function _put() {\n\t\tif (!empty($this->id)) {\n\t\t\t$row = $this->getDb()[$this->id];\n\t\t\tif ($row) {\n\t\t\t\t$this->result = $row->update($this->data);\n\t\t\t}\n\t\t}\n\t\t$this->result;\n\t}","title":""},{"docid":"d0cf26e6c4b3f625b549a6d0140e162d","score":"0.54216164","text":"public function update(Request $request, $id)\n {\n\n $image = Image::find($id);\n\n if ($request->hasFile('image')) {\n $imageName = $request->image;\n $imageName_new_name = time().$imageName->getClientOriginalName();\n $imageName->move('storage/',$imageName_new_name);\n $imageName = '/storage/'.$imageName_new_name;\n\n $image->path = $imageName;\n }\n\n $image->name = $request->name;\n $image->product_id = $request->product_id;\n $image->save();\n Session::flash('success','cập nhật thành công thành công!');\n\n return redirect()->route('admin.image.index');\n }","title":""},{"docid":"0159915c79f2e062ee97c0758cf5fc6d","score":"0.54203194","text":"public function update(string $data);","title":""},{"docid":"50927265cd4834e00622acc58400363a","score":"0.54201615","text":"public function update(Request $request, $id)\n {\n $product = Product::Find($id);\n\n if($product === NULL)\n return view('errors.404');\n\n if(Gate::denies('update-product' , $product))\n return view('errors.refused');\n\n\n $request->validate([\n 'name' => ['required', 'string' , 'max:255'],\n 'description' => ['required' , 'string' , 'min:5' , 'max:500'],\n 'price' => ['required' , 'numeric'],\n 'quantity' => ['required' , 'numeric']\n ]);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->price = $request->input('price');\n $product->quantity = $request->input('quantity');\n $product->id_user = Auth::user()->id;\n $product->visible = 1;\n\n\n if($request->hasFile('image')){\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n Storage::disk('public')->put($filename, File::get($image));\n $product->image = $filename;\n };\n\n $product->save();\n\n return redirect('/products');\n\n }","title":""},{"docid":"a9bd5cde4f91473c17011fa280d1ed6e","score":"0.5419226","text":"public function update(StoreEditBiographie $request, $id)\n {\n $biographie = Biographie::find($id);\n\n $biographie->titre = $request->titre;\n $biographie->contenu = $request->contenu;\n if ($request->image != null)\n {\n Storage::disk('imgBiographie')->delete($biographie->image);\n \n \n $image = [\n \"name\" => $request->image,\n \"disk\" => \"imgBiographie\",\n \"w\" => 1000,\n \"h\" => 1000\n ];\n $biographie->image = $this->imageResize->imageStore($image);\n }\n\n $biographie->save();\n return redirect()->route('biographies.index',['biographie'=> $biographie->id]);\n }","title":""}],"string":"[\n {\n \"docid\": \"b4e3ef83b1a29ff10f6ec4e5a5ce3acd\",\n \"score\": \"0.65113205\",\n \"text\": \"public function update(Resource $resource, ResourceRequest $request)\\n {\\n $resource->update($request->only('name'));\\n\\n return redirect()->route('admin.resources.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e0f4f227895ae1ef285ecc22e5eb729\",\n \"score\": \"0.64805984\",\n \"text\": \"public function update(ResourceUpdateRequest $request, Resource $resource)\\n {\\n $input = $request->all();\\n $input['is_facility'] = $request->has('is_facility');\\n\\n $resource->update($input);\\n $resource->categories()->sync($request->get('categories'));\\n $resource->groups()->sync($request->get('groups'));\\n\\n flash('Resource \\\"'.$resource->name.'\\\" was updated');\\n\\n return ($backUrl = session()->get('index-referer-url'))\\n ? redirect()->to($backUrl)\\n : redirect('/resources');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d58cc0ac499a6369b9847fb37dc69a6\",\n \"score\": \"0.64793074\",\n \"text\": \"public function updateResource($resource, $id, array $data = []) {\\n $result = $this->put($resource . '/' . $id, $data);\\n return reset($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc93534b04eb8b81463653bc1fe9b4b9\",\n \"score\": \"0.62045246\",\n \"text\": \"public function update(ResourceUpdateRequest $request, Resource $resource)\\n {\\n $resource->update($request->all());\\n $resource->groups()->sync($request->get('groups'));\\n\\n flash('Resource was updated');\\n\\n return redirect('/resources');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47e4c5326e79281be1ce31ec068dab77\",\n \"score\": \"0.61861783\",\n \"text\": \"public static function updateResource($path, $object)\\n {\\n if (is_array($object)) {\\n $object = (object)$object;\\n }\\n\\n return self::connection()->put(self::$api_path . $path, $object);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85d21a332b71fa821f58587ae26611d6\",\n \"score\": \"0.60594326\",\n \"text\": \"public function update(Request $request)\\n {\\n $validatedData = $request->validate([\\n 'resource_name' => 'required',\\n 'hourly_rate' => 'required|numeric',\\n ]);\\n\\n $resource = Resource::find($request->id);\\n\\n $resource->resource_name = $request->resource_name;\\n $resource->hourly_rate = $request->hourly_rate;\\n \\n if ($resource->save()) {\\n $request->Session()->flash('alert-success', 'resources details updated was successful!');\\n return redirect('admin/index-resource');\\n } else {\\n $request->Session()->flash('alert-error', 'resources details updated was failed!');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a44cde5599b432199ba53bd6e695fbcc\",\n \"score\": \"0.60480636\",\n \"text\": \"public function update(Request $request, $resource)\\n { \\n $this->form()->setModel($resource)->save(function() {});\\n \\n return $this->redirect($request, $resource); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f73d66d218eef0be3b8199b19c37b26f\",\n \"score\": \"0.60452485\",\n \"text\": \"public function updateStream($path, $resource, Config $config)\\n {\\n $options = $config->get('options',[]);\\n return $this->client->putObjectFromString($this->bucket,$path,$resource,$options);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6e3d6ef1ecb867e394cc699e1165c81\",\n \"score\": \"0.6025207\",\n \"text\": \"public function update(SeriesRequest $request, Series $series)\\n {\\n //\\n $this->authorize('author',$series);\\n\\n $series->update($request->all());\\n\\n if ($request->file('file')) {\\n\\n # code...\\n $url = Storage::put('series',$request->file('file'));\\n \\n\\n if ($series->image) {\\n # code...\\n Storage::delete($series->image->url);\\n\\n $series->image->update([\\n\\n 'url' => $url\\n ]);\\n } else{\\n $series->image()->create([\\n\\n 'url' => $url\\n ]);\\n \\n \\n\\n }\\n\\n}\\n\\nreturn redirect()->route('admin.series.edit', $series)->with('info','La serie se actualizo con éxito');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0919a7b4ca0ee93949e8600cb6418f4\",\n \"score\": \"0.60211957\",\n \"text\": \"public function resourceUpdate($new = TRUE, $resource = NULL) {\\n if (!$resource) {\\n $resource = $this->resource;\\n }\\n\\n $path = FALSE;\\n $file = '';\\n\\n if (isset($resource['public_id'])) {\\n $file = $resource['public_id'];\\n $path = dirname($file);\\n\\n // Append file format into filename.\\n if (!empty($resource['format'])) {\\n $file .= '.' . $resource['format'];\\n }\\n\\n $file = pathinfo($file, PATHINFO_BASENAME);\\n\\n if ($new) {\\n $this->save($resource);\\n }\\n else {\\n if ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FOLDER) {\\n $this->deleteFolder($resource['public_id']);\\n }\\n elseif ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FILE) {\\n $this->delete($resource['public_id']);\\n }\\n }\\n }\\n\\n return array($path, $file);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff76cc80d913540a356897bd9e7edf87\",\n \"score\": \"0.5980603\",\n \"text\": \"public function update(User $userAuthenticated, User $userResource)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"748b4a954d0155bebbd137382c5201a0\",\n \"score\": \"0.59615195\",\n \"text\": \"public function update($id, CreateResourceRequest $request, Guard $auth)\\n\\t{ \\n\\t\\t$resource = Resource::findOrFail($id);\\n\\t\\t$user = $auth->user();\\n\\n\\t\\t$resource->name \\t\\t= $request->input('name');\\n\\t\\t$resource->description \\t= $request->input('description');\\n\\t\\t$resource->type \\t\\t= $request->input('type');\\n\\t\\t$resource->user_id \\t\\t= $user->id;\\n\\t\\t$resource->signature_id = $request->input('signature');\\n\\t\\t$resource->teacher_id \\t= $request->input('teacher');\\n\\n\\t\\t$resource->save();\\n\\n\\t\\tif ( $request->hasFile('file') && $request->file('file')->isValid() ){\\n\\t\\t\\t$file = $request->file('file');\\n\\t\\t\\t$file_name = $resource->id . '_' . $user->id . '.' . $file->getClientOriginalExtension();\\n\\t\\t\\t\\n\\t\\t\\t$file->move($this->DESTINATION_PATH, $file_name);\\n\\n\\t\\t\\t$resource->path = $file_name;\\n\\n\\t\\t\\t$resource->save();\\n\\t\\t}\\n\\n\\t\\t$this->log($resource, $auth->user(), 'update');\\n\\n\\t\\treturn redirect()->back();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98fadc36fd3a4194a25023de21dae9ff\",\n \"score\": \"0.59242314\",\n \"text\": \"public function save($resource);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7003560e3a9d31cfca396c50aa6ff75e\",\n \"score\": \"0.5859935\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n //\\n $resource = Resource::find($id);\\n\\n $resource->name = $request->resource_name;\\n $resource->link = $request->resource_link;\\n\\n $resource->save();\\n\\n return [\\\"message\\\"=>\\\"Data updated\\\",\\\"status\\\"=>true];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee8cdd9d7a907937ce79086e18097a3b\",\n \"score\": \"0.58592844\",\n \"text\": \"public function update(CompanyStorageRequest $request, $id)\\n {\\n return $this->save($request,$id); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd52066336af51a1e0e57bbecc86f7ec\",\n \"score\": \"0.5848347\",\n \"text\": \"public function update(RequeteStoreRequest $request, $id)\\n {\\n$Requete=Requete::get()->where('id',$id)->first();\\n if($Requete->update($request->toArray())) {\\n return new RequeteResource($Requete);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"28c24d6c09bf3e40d09f31610f428cd7\",\n \"score\": \"0.5828425\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $request->validate([\\n 'ir_name' => 'required',\\n 'ir_resource_type' => 'required',\\n 'ir_subject' => 'required',\\n 'ir_file' => ''\\n ]);\\n\\n $refInstructional = InstructionalResource::find($id)->src_path;\\n\\n if (isset($request->ir_file)) {\\n $newFileName = time() . '-' . str_replace(' ', '-', $request->ir_name) . '.' . $request->ir_file->extension();\\n\\n //store new file\\n $request->file('ir_file')->storeAs('public', $newFileName);\\n //delete old file\\n if (Storage::disk('public')->exists($refInstructional)) {\\n Storage::delete('public/' . $refInstructional);\\n }\\n } else {\\n $newFileName = $refInstructional;\\n }\\n\\n if (InstructionalResource::where('id', $id)\\n ->update([\\n 'name' => $request->ir_name,\\n 'src_path' => $newFileName,\\n 'user_id' => auth()->user()->id,\\n 'resource_type_id' => $request->ir_resource_type,\\n 'subject_id' => $request->ir_subject\\n ])\\n ) {\\n $request->session()->flash('status', 'Task was successful!');\\n }\\n\\n return back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e67250003befec77cf9e6350d869f4c6\",\n \"score\": \"0.5821081\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $this->validate($request, [\\n 'title' => 'required|max:100',\\n 'desc' => 'required',\\n 'link' => 'required',\\n 'cat' => 'required',\\n 'image' => 'image',\\n ]);\\n $update = Product::findOrFail($id);\\n $update->title = $request->title;\\n $update->description = $request->desc; \\n $update->link = $request->link; \\n $update->category_id = $request->cat; \\n if($request->hasFile('image')){\\n Storage::delete('products/'.$request->oldimage); \\n $file = $request->image->store('products/');\\n $update->image = $request->image->hashName(); \\n // echo $request->oldimage; \\n } \\n $update->save(); \\n return redirect()->route('product.index')->with('success','product updated');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebf6708cd5a6c4cd7cc8acdfd9f26c08\",\n \"score\": \"0.5804868\",\n \"text\": \"public function update(Request $request, Product $product)\\n {\\n \\\\Storage::delete($product->image);\\n $path=$request->file('image')->store('product');\\n $params=$request->all();\\n $params['image']=$path;\\n $product->update($params);;\\n return redirect()->route('products.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e27d59acc6129f2d7e02abe1e9bdeb3\",\n \"score\": \"0.5781152\",\n \"text\": \"public function updateNote(NoteRequest $request, $resource)\\n {\\n $request->save($resource);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d29fc82b57f01c3fbe6bb99a3be246e9\",\n \"score\": \"0.5768848\",\n \"text\": \"public function putAction()\\n\\t{\\n\\t\\t// get account\\r\\n\\t\\t$account = $this->getActiveAccount();\\n\\t\\t\\t\\n\\t\\t$this->view->id = $id;\\n\\t\\t$this->view->params = $this->_request->getParams();\\n\\t\\t$this->view->message = sprintf('Resource #%s Updated', $id);\\n\\t\\t$this->_response->ok();\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7efc8833e2707d2c41ccbb075ab62b4\",\n \"score\": \"0.5752699\",\n \"text\": \"public function updateExisting();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b6c3aaa23b4fb918ebc093545c13dc6\",\n \"score\": \"0.57525045\",\n \"text\": \"public function update($entity);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaf18f66946228a152f8b83c6b49e31e\",\n \"score\": \"0.5747208\",\n \"text\": \"public function update($id, $data) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaf18f66946228a152f8b83c6b49e31e\",\n \"score\": \"0.5747208\",\n \"text\": \"public function update($id, $data) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"794e05bd3692d966cd063aa2041fc336\",\n \"score\": \"0.5736985\",\n \"text\": \"public function updateStream($path, $resource, $config = null)\\n {\\n return $this->writeStream($path, $resource, $config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fa7323735ca22c15cfa4866e023dcb7\",\n \"score\": \"0.57337505\",\n \"text\": \"public function setResource($resource);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b743d37c52d097cc14915bd0a16b770e\",\n \"score\": \"0.5726298\",\n \"text\": \"public function update_put() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ca0679ea794f66a39eaf0ff1d531d9c\",\n \"score\": \"0.5721835\",\n \"text\": \"public function update(ResourceUpdateRequest $request, Resource $resource)\\n {\\n ResourceResource::withoutWrapping();\\n\\n $input = $request->all();\\n\\n $resource->update($input);\\n $resource->categories()->sync($request->get('categories'));\\n $resource->groups()->sync($request->get('groups'));\\n\\n return (new ResourceResource($resource))\\n ->response()\\n ->setStatusCode(202);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"424bc30e7bfe2058299766d4dae981b9\",\n \"score\": \"0.57125896\",\n \"text\": \"public function setResource(Resource $resource)\\n {\\n $this->resource = $resource;\\n $this->isResourceModified = true;\\n $this->stopPropagation();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"148c03384f2be8de6650d8fb7868c9e0\",\n \"score\": \"0.5700769\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n \\n $this->validate($request, [\\n 'title' => 'required|max:100',\\n 'desc' => 'required',\\n 'link' => 'required',\\n 'image' => 'image|dimensions:min_width=800,max_width=1920',\\n ]);\\n $update = Slide::findOrFail($id);\\n $update->title = $request->title;\\n $update->description = $request->desc; \\n if($request->hasFile('image')){\\n Storage::delete('slides/'.$request->oldimage); \\n $file = $request->image->store('slides/');\\n $update->image = $request->image->hashName(); \\n // echo $request->oldimage; \\n } \\n $update->save(); \\n return redirect()->route('slide.index')->with('success','slide updated');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3207026fe10a78c71deeca618c87d18\",\n \"score\": \"0.5699133\",\n \"text\": \"public function update(Request $request, $id) : StudentResource\\n {\\n $student = Student::find($id);\\n $student->first_name = $request->first_name;\\n $student->last_name = $request->last_name;\\n $student->gender = $request->gender;\\n $student->phone = $request->phone;\\n $student->class = $request->class;\\n $student->country = $request->country;\\n\\n\\n if ($request->image) {\\n \\n if (empty($student->image)) {\\n $image_path = public_path(). '/images/students/' .$student->image;\\n unlink($image_path);\\n\\n // here we check if the studet image is not null unlick the image \\n // from the folder else skip and update new image\\n }\\n }\\n // here is the image part okay\\n\\n if ($request->hasFile('image')) {\\n \\n $file = $request->file('image');\\n $file->move(public_path(). '/images/students', $file->getClientOriginalName());\\n\\n $student->image = $file->getClientOriginalName();\\n }\\n\\n $student->save();\\n return new StudentResource($student);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e5c6816a1cdb070e1c6800898771f34\",\n \"score\": \"0.5692049\",\n \"text\": \"public function updateStream($path, $resource, array $config = [])\\n {\\n list($prefix, $path) = $this->getPrefixAndPath($path);\\n\\n return $this->getFilesystem($prefix)->updateStream($path, $resource, $config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e298ed6e92031fa9134c5a6ed2507d24\",\n \"score\": \"0.5691853\",\n \"text\": \"public function update($object);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df12e12fb31bd67805101fd587a91508\",\n \"score\": \"0.568933\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $validate = $request->validate([\\n 'prev_image' => 'required|string',\\n ]);\\n // dd($request->all());\\n\\n if ($request->hasfile('image')) {\\n $i = Storage::disk('public')->put('sliders', $request->image[0]);\\n Storage::delete('/public/' . $request->prev_image);\\n } else {\\n $i = $request->prev_image;\\n }\\n $store = Slider::find($id);\\n $store->title = $request->title;\\n $store->link = $request->link;\\n $store->link_name = $request->link_name;\\n $store->description = $request->description;\\n $store->image = $i;\\n $store->update();\\n if ($store) {\\n return redirect()->back()->with('success', 'Slider Updated Successfully !!');\\n } else {\\n return redirect()->back()->with('error', 'Failed to Update !!');\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6429c73de2ef2191c3d2be22fbf0f39c\",\n \"score\": \"0.5675671\",\n \"text\": \"public function update($data);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6429c73de2ef2191c3d2be22fbf0f39c\",\n \"score\": \"0.5675671\",\n \"text\": \"public function update($data);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcdf6c196ac99617a3c5a5718a18f7e9\",\n \"score\": \"0.5661846\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $rules = [\\n 'name' => 'required|max:100',\\n 'price' => 'required|numeric',\\n 'photo_url' => 'image'\\n ];\\n\\n $request->validate($rules);\\n\\n // $product = \\\\App\\\\Product::find($id);\\n\\n // if ($request->hasFile('photo_url')){\\n // $newPath = $request->file('photo_url')->store('public/products');\\n\\n // Storage::delete($product->photo_url);\\n\\n // $product->photo_url = $newPath;\\n // }\\n//\\n // if ($request->input('delete_photo') == true){\\n // Storage::delete($product->photo_url);\\n\\n // $product->photo_url = null;\\n // }\\n\\n // $product->name = $request->input('name');\\n // $product->price = $request->input('price');\\n // $product->save();\\n\\n $product = \\\\App\\\\Product::find($id);\\n\\n if ($request->hasFile('photo_url')){\\n $newPath = $request->file('photo_url')->store('public/products');\\n\\n Storage::delete($product->photo_url);\\n\\n $product->photo_url = $newPath;\\n }\\n\\n if ($request->input('delete_photo') == true){\\n Storage::delete($product->photo_url);\\n\\n $product->photo_url = null;\\n }\\n\\n $product->fill($request->all());\\n\\n $product->save();\\n\\n return redirect('products');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"689842d3aad9dcb88b75b155c54181eb\",\n \"score\": \"0.56460696\",\n \"text\": \"public function updateStream($path, $resource, Config $config)\\n {\\n if ( ! $this->has($path)){\\n return false;\\n } else {\\n return $this->write($path, $resource, $config);\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbd22036cd27458692009f909599ca04\",\n \"score\": \"0.5634174\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n //dd($request);\\n $product = new Product();\\n $product_updated = $product->validateRequest($request)->store($id);\\n\\n if ($product_updated) {\\n if ($request->has('blocks')) {\\n ProductBlock::store($request, $product_updated['id']);\\n }\\n\\n $product_updated->storeImages($request);\\n\\n if ($request->hasFile('file')) {\\n $filepath = Photo::imageUpload($request->file('file'), $product_updated, 'pdf', 'pdf');\\n\\n Product::updateFilePath($product_updated, $filepath);\\n }\\n\\n return redirect()->back()->with(['success' => 'Proizvod je uspješno snimljen.!']);\\n }\\n\\n return redirect()->back()->with(['error' => 'Whoops..! Došlo je do greške sa snimanjem proizvoda.']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00b2a6a53c34699e9c9f5020017ef232\",\n \"score\": \"0.56193584\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $resource = Resource::findorfail($id);\\n\\n $resource->name = $request->name;\\n $resource->description = $request->description;\\n\\n $resource->save();\\n\\n return redirect()->route('resources.show', [$resource->id]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6c472e9a208986431a784c1ec5cc1f6\",\n \"score\": \"0.56107134\",\n \"text\": \"public function update(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6c472e9a208986431a784c1ec5cc1f6\",\n \"score\": \"0.56101215\",\n \"text\": \"public function update(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ceb4c9e42d44542ef7be0dc09286ad0\",\n \"score\": \"0.5605276\",\n \"text\": \"public function update(Request $request, $id){\\n if($request->session()->exists('resources')) {\\n $resources = $request->session()->get('resources');//meto los datos que hay en el array de recursos\\n if(isset($resources[$id])) {//si existe ese id en el array de recursos\\n $resource = $resources[$id];//cojo el id que esta en el array de recursos\\n $idInput = $id;//en la variable idInput mete el id que hay(el que ponemos nosotros por defecto)\\n $nameInput = $request->input('name');//en la variable nameInput meto el valor que estoy escribiendo en el input del name\\n $prieceInput = $request->input('priece');//en la variable prieceInput meto el valor que estoy escribiendo en el input del price\\n $resource['id'] = $idInput;//meto en el recurso del id el valor del idInput\\n $resource['name'] = $nameInput;//meto en el recurso del name el valor del nameInput\\n $resource['priece'] = $prieceInput;//meto en el recurso del precio el valor del prieceInput\\n $resources[$idInput] = $resource;//mete el nuevo id en el array de recurso\\n $request->session()->put('resources', $resources);\\n return redirect('resource')->with('message', 'Se ha editado el elemento correctamente');\\n }\\n }\\n return back()->withInput();//te lleva a la pantalla del index\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc59c0e54a38762a43464491404f10d3\",\n \"score\": \"0.5597341\",\n \"text\": \"function startPut($resource, $id, array $data);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0db760cd21841392ea5c5ef4b2148cc\",\n \"score\": \"0.559549\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $datos=request()->except('_token','_method');\\n\\n if($request->hasFile('imagen')){\\n $dato=productos::findOrFail($id);\\n Storage::delete('public/'.$dato->imagen);\\n $datos['imagen']=$request->file('imagen')->store('uploads','public');\\n }\\n\\n\\n\\n productos::where('id','=',$id)->update($datos);\\n return redirect('productos');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4016847dea9b55e59a4acd18600a30f5\",\n \"score\": \"0.55813426\",\n \"text\": \"public function update($request, $id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4016847dea9b55e59a4acd18600a30f5\",\n \"score\": \"0.55813426\",\n \"text\": \"public function update($request, $id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dffb1371124c6ce8693c2368a83f9606\",\n \"score\": \"0.55781215\",\n \"text\": \"public function update($param = array()) {\\n $tail = '/' . $this->getUrlTail() . '/' . $this->getId();\\n\\n $url = $this->getService()->getUrl($tail);\\n return $this->getClient()->put($url, $param);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a53b6bc58310fb381219eebcf9b209d\",\n \"score\": \"0.55695176\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $product = new Product;\\n\\n $productData['name'] = $request->name;\\n $productData['slug'] = str_slug($request->name);\\n $productData['cpu'] = $request->cpu;\\n $productData['ram'] = $request->ram;\\n $productData['storage'] = $request->storage;\\n $productData['display'] = $request->display;\\n $productData['vga'] = $request->vga;\\n $productData['battery'] = $request->battery;\\n $productData['weight'] = $request->weight;\\n $productData['material'] = $request->material;\\n $productData['kind'] = $request->kind;\\n $productData['condition'] = $request->condition;\\n $productData['price'] = $request->price;\\n $productData['promotion'] = $request->promotion;\\n $productData['status'] = $request->status;\\n $productData['featured'] = $request->featured;\\n $productData['warranty'] = $request->warranty;\\n $productData['description'] = $request->description;\\n $productData['category'] = $request->category;\\n if ($request->hasFile('img')) {\\n $img = $request->img->getClientOriginalName();\\n $productData['img'] = $img;\\n $request->img->storeAs('./public/img', $img);\\n }\\n\\n $product::where('product_id', $id)->update($productData);\\n\\n return redirect('admin/product');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a86060f0afd44ec384ed886d347caa73\",\n \"score\": \"0.55676407\",\n \"text\": \"abstract protected function save($resource);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f77c93b62808595a63d9f6f31b1f80e0\",\n \"score\": \"0.55661047\",\n \"text\": \"public function updateStream($path, $resource, Config $config)\\n {\\n return $this->writeStream($path, $resource, $config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6696001dcc15e351e03c08acc8b2bcd9\",\n \"score\": \"0.5565939\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $product = Product::find($id);\\n if ($request->has('file')) {\\n $this->removeImage(FileConstant::PRODUCTS_IMAGES, $product->image_id);\\n $image = GenericController::saveImage($request, 'file', FileConstant::PRODUCTS_IMAGES);\\n $product->image_id = $image->id ?? null;\\n }\\n $product->title = $request->title;\\n $product->description = $request->description;\\n $product->price = $request->price;\\n $product->ingredient = $request->ingredient;\\n $product->product_code = $request->product_code;\\n $product->save();\\n $product->tags()->detach();\\n $product->tags()->attach($request->tags);\\n return redirect()->route('manage_store')->with('success_message', 'Product successfully update.');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0af57b3d439623d9ddfbbd2c23e24b1f\",\n \"score\": \"0.55599797\",\n \"text\": \"public function update($id, $data);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0af57b3d439623d9ddfbbd2c23e24b1f\",\n \"score\": \"0.55599797\",\n \"text\": \"public function update($id, $data);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0af57b3d439623d9ddfbbd2c23e24b1f\",\n \"score\": \"0.55599797\",\n \"text\": \"public function update($id, $data);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e1652dc1efabe740a60dc879dc15b5a\",\n \"score\": \"0.5555882\",\n \"text\": \"public function update($id)\\n\\t{\\n\\t\\t$this->resource->avatar = strlen(Input::get('_delete')) ? : STAPLER_NULL ; \\n\\t\\tif ($this->resource->store(Input::all())) {\\n\\t return $this->respondTo(\\n\\t \\tarray(\\n\\t \\t\\t'html' => function()\\n\\t \\t\\t\\t\\t {\\n\\t \\t\\t\\t\\t \\treturn Redirect::route('admin.profiles.show', ['users' => $this->resource->id])\\n\\t \\t\\t\\t\\t->with('notice', 'Profile updated');\\n\\t \\t\\t\\t\\t }, \\n\\t \\t\\t'js' => function()\\n\\t \\t\\t\\t\\t{\\n\\t \\t\\t\\t\\t\\treturn $this->resource;\\n\\t \\t\\t\\t\\t}\\n\\t \\t\\t)\\n\\t \\t);\\n\\t }\\n\\t else {\\n\\t \\treturn $this->respondTo(\\n\\t \\t\\tarray(\\n\\t \\t\\t\\t'html' => function()\\n\\t \\t\\t\\t\\t\\t {\\n\\t \\t\\t\\t\\t\\t \\treturn Redirect::action('admin\\\\Profiles@edit', ['user' => $this->resource])\\n\\t\\t\\t\\t ->withInput(Input::all())\\n\\t\\t\\t\\t ->withErrors($this->resource->errors());\\n\\t \\t\\t\\t\\t\\t },\\n\\t \\t\\t\\t'js' => function()\\n\\t \\t\\t\\t{\\n\\t \\t\\t\\t\\treturn $this->resource->errors();\\t\\n\\t \\t\\t\\t},\\n\\t \\t'status' => 422\\n\\t \\t\\t\\t)\\n\\t \\t\\t);\\n\\t } \\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"012d802cdd39ad4f48a5d0ab5db49368\",\n \"score\": \"0.55530256\",\n \"text\": \"public function updateStream($path, $resource, Config $config = null)\\n {\\n $contents = stream_get_contents($resource);\\n\\n return $this->write($path, $contents, $config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6fd81565fe0197d15ae9c289b0ce5a96\",\n \"score\": \"0.5542752\",\n \"text\": \"public function updateResourceDimensions();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b518a7b9f54c3cdcab6b1c0bdd364908\",\n \"score\": \"0.55392486\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $data=$this->validate($request,[\\n 'icon'=>'required',\\n 'main_title'=>'required',\\n 'title'=>'required',\\n 'description'=>'required',\\n ]);\\n $path=$request->old_image;\\n if($request->hasFile('thumbnail')){\\n unlink(\\\"/storage/$path\\\");\\n $path=$request->file('thumbnail')->store('Thumbnail');\\n $data['thumbnail']=$path;\\n }\\n \\n ChooseUs::where('id',$id)->update($data);\\n return redirect()->route('listChooseUs');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f876ddfae189152894b680ec80767669\",\n \"score\": \"0.553887\",\n \"text\": \"public function update(Request $request)\\n {\\n //\\n //dd($request->all());\\n\\n $id = $request->input('eid');\\n $name = $request->input('ename');\\n $quantity = $request->input('equantity');\\n $price = $request->input('eprice');\\n $date = date(\\\"Y-m-d H:i:s\\\");\\n\\n //reading all products from file\\n $products = Storage::disk('local')->get('public/products.json');\\n $products = json_decode($products, true);\\n\\n //$id = count($products) + 1;\\n //saving new producto in memory\\n for ($i=0; $i < count($products); $i++) { \\n if($products[$i]['id'] == $id){\\n $products[$i] = [\\n 'id' => $id\\n ,'name' => $name\\n , 'quantity' => $quantity\\n , 'price' => $price\\n , 'date' => $date\\n ];\\n }\\n }\\n \\n\\n Storage::put('public/products.json', json_encode($products));\\n // dd($products);\\n return redirect('/');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c1b71d7fe33d5951e76205cc098ab6f\",\n \"score\": \"0.5534759\",\n \"text\": \"public function updateStream($path, $resource, Config $config)\\n {\\n return $this->writeObject($path, $resource, $config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd7ccf27b5b1585736a504a174476b51\",\n \"score\": \"0.55280495\",\n \"text\": \"public abstract function update($entity);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ed29b085a06b0ff193e001c8b6edc77\",\n \"score\": \"0.55265594\",\n \"text\": \"public function update(Request $request)\\n {\\n\\n\\n\\n $product = Product::Find($request->pid);\\n\\n $product->product_name = $request->productName;\\n $product->cantidad = $request->cantidad;\\n $product->pCompra = $request->pCompra;\\n $product->pBase = $request->pBase;\\n $product->isr = $request->isr;\\n $product->iva = $request->iva;\\n $product->pVenta = $request->pVenta;\\n $product->utilidad = $request->utilidad;\\n\\n if( $request->imagenProducto ){\\n\\n $file = $request->file('imagenProducto');\\n $nombre = $file->getClientOriginalName();\\n\\n Storage::disk('productos')->put( $nombre , File::get($file));\\n\\n $product->imagen = $file->getClientOriginalName();\\n\\n $product->save();\\n\\n return true;\\n\\n }else{\\n\\n $product->save();\\n\\n return true;\\n\\n }\\n\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"030a7c4a93d5d783d93752dbd039d0a4\",\n \"score\": \"0.5526432\",\n \"text\": \"public function update(UpdateProductRequest $request, Product $product)\\n {\\n $product->fill($request->except('image'));\\n\\n if($request->offered == 'on'){\\n $product->offered = true;\\n }\\n else{\\n $product->offered = false;\\n }\\n\\n if($request->hasFile('image'))\\n {\\n $image = $product->images->where('position', 1)->first();\\n Storage::delete($image->url);\\n $product->images()->detach($image);\\n $image->delete();\\n\\n $imageProduct = $this->storeImage($request->file('image'), 1);\\n $product->images()->attach($imageProduct);\\n }\\n\\n $product->save();\\n\\n return redirect()->route('products.updated', $product->store);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57943537b2639b438b8481f3c079a88f\",\n \"score\": \"0.5518334\",\n \"text\": \"public function update(string $resourceId, array $params)\\n {\\n\\n\\n $isDefaultFile = $this->isDefaultFile($resourceId);\\n $srcPath = $params['src_path'];\\n $fileWasProvided = (null !== $srcPath);\\n $content = $this->getCommitListContent();\\n $userRelPath = $params['user_rel_path'];\\n $files = $params['files'];\\n\\n if (true === $isDefaultFile) {\\n $section = \\\"to_update\\\";\\n } else {\\n $section = \\\"to_add\\\";\\n }\\n\\n\\n $resources = $content[$section];\\n if (array_key_exists($resourceId, $resources)) {\\n\\n /**\\n * If the user doesn't provide a file, but the entry exists in the to_update section, this means\\n * that the user already used the gui to upload a file previously, and so the entry (in to_update) has been created and files\\n * exist already on the vfs, and now the user updates the file again, but this time just the meta-data (i.e. not the file).\\n * In that case, we move the old files to the new location (if the name has changed).\\n *\\n */\\n $resource = $resources[$resourceId];\\n $this->updateResourceFilePaths($resource, $files, $userRelPath);\\n }\\n\\n\\n $this->storeEntry($params, [\\n \\\"resourceId\\\" => $resourceId,\\n \\\"dry\\\" => !$fileWasProvided,\\n \\\"section\\\" => $section,\\n ]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4238630fe835e2630790aa3af70cdd6d\",\n \"score\": \"0.5511568\",\n \"text\": \"public function update($segement);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6151cf096d056f5c54e0c8112d1f45b1\",\n \"score\": \"0.5504522\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n\\n $product = Product::findOrFail($id);\\n $product->fill($request->except('image', 'product_categories'));\\n $product->is_visible = $request->has('is_visible');\\n $product->is_alcoholic = $request->has('is_alcoholic');\\n $product->is_visible_when_no_stock = $request->has('is_visible_when_no_stock');\\n $product->price = str_replace(',', '.', $request->price);\\n\\n if ($request->file('image')) {\\n $file = new StorageEntry();\\n $file->createFromFile($request->file('image'));\\n\\n $product->image()->associate($file);\\n }\\n\\n $product->account()->associate(Account::findOrFail($request->input('account_id')));\\n\\n $categories = [];\\n if ($request->has('product_categories') && count($request->input('product_categories')) > 0) {\\n foreach ($request->input('product_categories') as $category) {\\n $category = ProductCategory::find($category);\\n if ($category != null) {\\n $categories[] = $category->id;\\n }\\n }\\n }\\n $product->categories()->sync($categories);\\n\\n $this->setRanks();\\n\\n $product->save();\\n\\n $request->session()->flash('flash_message', 'The product has been updated.');\\n\\n return Redirect::route('omnomcom::products::edit', ['id' => $product->id]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5316b557cb97c988d4dd7ad08ef95bf\",\n \"score\": \"0.55043715\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $validatedData = $request->validate([\\n 'name'=> 'required',\\n 'email'=> 'required',\\n 'phone'=> 'required',\\n 'address'=> 'required',\\n 'type'=> 'required',\\n 'photo'=> 'nullable',\\n 'shop'=> 'required',\\n 'account_number'=> 'nullable',\\n 'bank_name'=> 'nullable',\\n ]);\\n\\n $supplier = Supplier::find($id);\\n $supplier->name = $request->name;\\n $supplier->email = $request->email;\\n $supplier->phone = $request->phone;\\n $supplier->address = $request->address;\\n $supplier->type = $request->type;\\n $supplier->shop = $request->shop;\\n $supplier->account_number = $request->account_number;\\n $supplier->bank_name = $request->bank_name;\\n\\n if($request->hasFile('photo') ){\\n //delete old image first\\n if(File::exists('images/supplier/'.$supplier->photo))\\n {\\n File::delete('images/supplier/'.$supplier->photo);\\n }\\n $image = $request->file('photo');\\n $img = time().'.'. $image->getClientOriginalExtension();\\n $location = public_path('images/supplier/'.$img);\\n Image::make($image)->save($location);\\n $supplier->photo = $img;\\n }\\n\\n $supplier->save();\\n\\n $notification = array(\\n 'message' => 'Successfully Supplier Updated!',\\n 'alert-type' => 'success'\\n );\\n\\n return Redirect()->route('supplier.index')->with($notification);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a58e121b784e418e2b8e2b169e227565\",\n \"score\": \"0.5503471\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $update = product::where('id', $id)->first();\\n $update->name = $request['name'];\\n $update->price = $request['price'];\\n $update->stock = $request['stock'];\\n $update->size = $request['size'];\\n $update->category = $request['category'];\\n $update->description = $request['description'];\\n\\n if($request->file('picture') == \\\"\\\")\\n {\\n $update->picture = $update->picture;\\n } \\n else\\n {\\n $file = $request->file('picture');\\n $fileName = $file->getClientOriginalName();\\n $request->file('picture')->move(\\\"image/\\\", $fileName);\\n $update->picture = $fileName;\\n }\\n\\n $update->update();\\n\\n Toast()->success('Edit Success');\\n return redirect()->to('/product');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"713a0d373529950deb3cb81f9c35f528\",\n \"score\": \"0.5502456\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n // On check si la requête valide le schéma de données\\n $this->validate($request, [\\n 'name' => 'required|string|min:5|max:100',\\n 'description' => 'required|string',\\n 'price' => 'required|string|min:0|not_in:0',\\n 'reference' => 'required|string',\\n 'category_id' => 'required|integer',\\n 'state' => 'required|in:standard,solde',\\n 'sizes' => 'required|array',\\n 'sizes.*' => 'integer', // pour vérifier un tableau d'entiers il faut mettre sizes.*\\n 'status' => 'required|in:published,unpublished',\\n 'title_image' => 'string|nullable', // pour le titre de l'image si il existe\\n 'picture' => 'image|max:3000',\\n ]);\\n\\n // On récupère le produit à modifier\\n $product = Product::find($id);\\n\\n $product->update($request->all()); // associé les fillables\\n \\n // on utilisera la méthode sync pour mettre à jour les tailles dans la table de liaison\\n $product->sizes()->sync($request->sizes);\\n\\n // on check si l'utilisateur entre un nom d'image et on utiliser la méthode update pour mettre à jour le titre de l'image dans la table de liaison\\n if (isset($request->name_image)) {\\n $product->picture()->update([\\n 'title' => $request->name_image,\\n ]);\\n }\\n \\n // On récupère l'image de la requête\\n $im = $request->file('picture');\\n \\n // On vérifie si l'image existe\\n if (!empty($im)) {\\n\\n // On récupère le lien de l'image\\n $link = $request->file('picture')->store('images');\\n // On retire Homme ou Femme du lien\\n $newLink = str_replace(['Homme', 'Femme'], '', $link);\\n // suppression de l'image si elle existe \\n if(!empty($product->picture)){\\n $product->picture()->delete(); // supprimer l'information en base de données\\n }\\n\\n // mettre à jour la table picture pour le lien vers l'image dans la base de données\\n $product->picture()->create([\\n 'link' => $newLink,\\n 'title' => $request->new_name_image?? $request->new_name_image\\n ]);\\n \\n }\\n\\n //On retourne l'utilisateur vers la vue products index\\n return redirect()->route('products.index')->with('message', 'success');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cab0a1cd64b69a7208a1539e0b20d010\",\n \"score\": \"0.54981893\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $product = Product::findOrFail($id);\\n $update_data = $request->all();\\n if ($request->hasFile('image')) {\\n $extension = $request->file('image')->getClientOriginalExtension();\\n $name = 'product_' . Str::random(5) . '.' . $extension;\\n $path = \\\"assets/images/product/\\\";\\n $request->file('image')->move($path, $name);\\n $update_data['image'] = $path . $name;\\n }\\n if ($request->commission_percent) {\\n $update_data['reseller_commission'] = $request->sell_price * ($request->commission_percent / 100);\\n }\\n $product->fill($update_data)->save();\\n Toastr::success('Product Updated Successfully', 'Done', [\\\"positionClass\\\" => \\\"toast-top-right\\\"]);\\n return redirect()->to('/admin/product');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42a9d3235a287a318bd9326858f1dd4f\",\n \"score\": \"0.5497566\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $data = $request->except(['_token']); \\n \\n if ($request->hasFile('photo')) { \\n $file = $request->file('photo');\\n $filename = $file->getClientOriginalName();\\n \\n $destinationPath = base_path() . '/public/uploads/product';\\n $file->move($destinationPath, $filename);\\n \\n $data['photo'] = $filename; \\n }\\n \\n $update = \\\\DB::table('products')->where('id',$id)->update($data);\\n \\n if($update){\\n \\n return back()->with('success', 'Product has been updated.');\\n }\\n \\n return back()->withInput();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7993a3cf0cd18ff840d680b772b6dfe\",\n \"score\": \"0.5492069\",\n \"text\": \"public function update($id)\\n\\t{\\n $model = $this->model;\\n $resource = $model::find($id);\\n\\n if (!$resource) {\\n return Response::apiNotFound();\\n }\\n\\n $input = Input::all();\\n\\n try {\\n $this->validator->validate($input);\\n $resource->update($input);\\n return Response::api(['resource' => $resource]);\\n } catch (InputValidationException $e) {\\n return Response::apiValidationErrors($e->getValidationErrors(), $e->getMessage());\\n }\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2cdc5be0acb052f86187218c7c65a79e\",\n \"score\": \"0.54920435\",\n \"text\": \"public function update_resources()\\n\\t{\\n\\t\\tglobal $Mysql;\\n\\t\\t\\n\\t\\t// TODO: Make a way for newly-completed building upgrades to change this calculation.\\n\\t\\t$seconds_passed = time() - $this->last_resource_update;\\n\\t\\t$hours_passed = $seconds_passed / 3600;\\n\\t\\t$this->resources->update($hours_passed);\\n\\t\\t$this->last_resource_update = time();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ad8f4cfd5795198c9d578ad85ec6def\",\n \"score\": \"0.54816514\",\n \"text\": \"public function update(ProductRequest $request, $id)\\n {\\n $product = Product::findOrFail($id);\\n if($request->hasFile('cover'))\\n\\t\\t{\\n Storage::disk('gcs')->delete($product->cover);\\n $product->cover = Storage::disk('gcs')->put('products', $request->file('cover'));\\n }\\n $product->name = $request->name;\\n $product->stock = $request->stock;\\n\\t\\t$product->description = $request->description;\\n\\t\\t$product->short_description =$request->short_description;\\n\\t\\t$product->price =$request->price;\\n $product->url = substr(str_slug($request->name),0,191);\\n $product->category_id =$request->category_id;\\n $product->save();\\n return response()->json($product);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50ed1ecdb9317f01c85501581feccf07\",\n \"score\": \"0.54803365\",\n \"text\": \"public function update(Request $request, $id)\\n { \\n \\n /* $file = $request->file('image');\\n \\n $name = $request->file('image')->getClientOriginalName(); //obtener nombre de archivo\\n $file->move('storage', $name); //mover archivo a la carpeta store */\\n \\n $Service = Service::find($id);\\n\\n /* $Service->descripcion = $request->descripcion;\\n $Service->host = $request->host;\\n $Service->ip = $request->ip;\\n $Service->image = $name; */\\n \\n $Service->update($request->all());\\n \\n return response()->json($Service, 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9597f2dbc4718b9f333e4446e6945f31\",\n \"score\": \"0.5478411\",\n \"text\": \"public function update($data) {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4f2a1763433a848120dc2bf3227c04e\",\n \"score\": \"0.5473484\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $market = Market::find($id);\\n if(isset($request->path)){\\n $path = $request->file('path')->store('uploads', 'public');\\n } else {\\n $path = $market->path;\\n }\\n\\n $market->update([\\n 'servicename' => $request->servicename,\\n 'price' => intval($request->price),\\n 'description' => $request->content,\\n 'path' => $path\\n ]);\\n session()->flash('success', 'Продукт успешно обновлен');\\n return redirect()->route('market.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd38b27f190e5c07f073bbe2dbf11656\",\n \"score\": \"0.54676557\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $product = Product::findOrFail($id);\\n\\n DB::beginTransaction();\\n\\n try {\\n\\n $filename = $product->image;\\n\\n if($request->hasFile('image')){\\n\\n $filename = $this->file_manager->manageFile($request->file('image'), 'images/products');\\n }\\n\\n $product->update([\\n 'name' => $request->input('name'),\\n 'description' => $request->input('description'),\\n 'image' => $filename,\\n ]);\\n \\n } catch (Exception $e) {\\n \\n DB::rollBack();\\n\\n return back();\\n }\\n\\n DB::commit();\\n\\n return redirect()->route('products.index')->with('success', 'Product successfully updated');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13060cd318eed312852c00ed17885787\",\n \"score\": \"0.5460793\",\n \"text\": \"public function update($object)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5e71c0d1e98d1666d257e78c12ddd49\",\n \"score\": \"0.54569525\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $product = Product::find($id);\\n if ($request->hasFile('image')) {\\n $file = $request->file('image');\\n $extension = $file->getClientOriginalExtension();\\n $filename = 'images/products/' . time() . '.' . $extension;\\n $file->move('public/images/products', $filename);\\n $product->image = $filename;\\n $update_product = array(\\n 'image' => $product->image,\\n 'status' => $request->status\\n\\n );\\n } else {\\n $update_product = array(\\n 'status' => $request->status\\n );\\n }\\n $product->update($update_product);\\n return redirect('admin/products');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4084f98de3322212bce3e8332459ba2\",\n \"score\": \"0.5453466\",\n \"text\": \"public function update(ArticleStoreRequest $request, Article $article): ArticleResource\\n {\\n $article->update($request->validated());\\n\\n $updated_article = $this->attachOrDetachTagsOfArticle(\\n $article,\\n $request->tags\\n );\\n\\n $updated_article->save();\\n\\n return new ArticleResource(\\n $updated_article\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bbe8dedc2a827e34e1daaab8e4e817f\",\n \"score\": \"0.5453419\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $asset = Asset::find($id);\\n $asset->name = $request->name;\\n $asset->quantity = $request->quantity;\\n $asset->price = $request->price;\\n $asset->save();\\n\\n $status = [\\n 'status' => 'info',\\n 'msg' => 'Data berhasil di update'\\n ];\\n\\n return redirect()->route('asset.index')->with( $status );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5909b7d875e8ebaed077d9aaa3103ffe\",\n \"score\": \"0.54499286\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $resident = Resident::findOrFail($id);\\n $resident->update($request->except('photo_path'));\\n if ($request->hasFile('photo_path')) {\\n if ($resident->photo_path != '') Storage::disk('public')->delete($resident->photo_path);\\n $path = $request->file('photo_path')->store('residents', 'public');\\n $resident->update(['photo_path'=>$path]);\\n }\\n return redirect()->route('resident.index')->with('updated', 'Morador atualizado com sucesso!');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2917b6683ccb6c65cb2fb9e85bb625aa\",\n \"score\": \"0.5445316\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n //获取要编辑的信息\\n $Resources = $request->only(['name','type','size','file','status']);\\n DB::table(\\\"Resources\\\")->where(\\\"id\\\",$id)->update($Resources);\\n //返回试图\\n return redirect('admin/shangchuan');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e009016b15cbda45fcf52d873daf0b4\",\n \"score\": \"0.5444949\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $this->validate($request, [\\n 'title' => 'required',\\n 'short_description' => 'required',\\n 'price' => 'required',\\n ]);\\n // File Upload\\n if ($request->hasFile('image')){\\n // Get Filename with extension\\n $filenameWithExt = $request->file('image')->getClientOriginalName();\\n // Get just Filename\\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\\n // Get just Ext\\n $extension = $request->file('image')->getClientOriginalExtension();\\n // Store Filename | Not overwrite image with same name\\n $filenameStore = $filename.'_'.time().'.'.$extension;\\n // Upload Image\\n $path = $request->file('image')->storeAs('public/images/resto-product', $filenameStore);\\n }\\n // Create\\n\\n $resto_product = RestoProduct::find($id);\\n $resto_product->title = $request->input('title');\\n $resto_product->short_description = $request->input('short_description');\\n $resto_product->price = $request->input('price');\\n $resto_product->user_id = auth()->user()->id;\\n if ($request->hasFile('image')){\\n Storage::delete('public/images/resto-product'.$resto_product->image);\\n $resto_product->image = $filenameStore;\\n }\\n $resto_product->save();\\n\\n return redirect('/menu-resto/resto-product')->with('success', 'Product Updated Successfully');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d5c7db46310d9215057b0295ae4acf6\",\n \"score\": \"0.54426396\",\n \"text\": \"public function update($record, $request);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8382479b28e811b0d9d1127b0c9f7585\",\n \"score\": \"0.54411286\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $scaleWeightItem = ScaleWeightItem::findOrFail($id);\\n\\n $scaleWeightItem->license_number = $request->get('license_number');\\n $scaleWeightItem->driver = $request->get('driver');\\n $scaleWeightItem->machine_code = $request->get('machine_code');\\n $scaleWeightItem->user = $request->get('user');\\n $scaleWeightItem->vendor = $request->get('vendor');\\n $scaleWeightItem->item = $request->get('item');\\n $scaleWeightItem->time = $request->get('time');\\n $scaleWeightItem->gross_weight = $request->get('gross_weight');\\n $scaleWeightItem->tare_weight = $request->get('tare_weight');\\n $scaleWeightItem->net_weight = $request->get('net_weight');\\n $scaleWeightItem->save();\\n\\n return new ApiResource($scaleWeightItem);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52cbf49d1c53df8eac032ede3b214556\",\n \"score\": \"0.5440425\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $this->authChecker();\\n $item = $this->provider::findOrFail($id);\\n $item->name = $request->name;\\n $item->restoarea_id = $request->restoarea_id;\\n $item->size = $request->size;\\n $item->update();\\n\\n return redirect()->route($this->webroute_path.'index')->withStatus(__('crud.item_has_been_updated', ['item'=>__($this->title)]));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dfdcc32a6088cd7fa1a756fcbe3758df\",\n \"score\": \"0.5439689\",\n \"text\": \"public function update(UpdateResourceRequest $request, $id)\\n {\\n $user = $request->user();\\n $resource = Resource::find($id);\\n if ($request->has('resource_name')) {\\n $resource->resource_name = $request->get('resource_name');\\n }\\n if (!$resource->save()) {\\n throw ValidationException::withMessages([\\n \\\"resource\\\" => [\\\"500001\\\"],\\n ])->status(500);\\n }\\n\\n return new ResourceResource($resource);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcbb8aa272243ff1148fb420a9930d94\",\n \"score\": \"0.5439582\",\n \"text\": \"public function update()\\n {\\n $this->validate(request(), [\\n 'title' => 'required|max:255',\\n 'pages' => 'integer',\\n 'year' => 'integer',\\n 'isbn' => 'required',\\n ]);\\n\\n $book = Book::findOrFail(request('id'));\\n $raw = request(['title', 'isbn', 'price', 'description', 'format', 'year', 'pages', 'source', 'publisher', 'series', 'availability', 'bookbinding']);\\n $raw['image'] = $book->image;\\n $book->prepare($raw)->update();\\n\\n $book->attach(request(['author', 'category', 'publisher']));\\n\\n if (is_array(request('price'))) {\\n $book->updatePrices(request('price'));\\n }\\n\\n session()->flash('success_message', 'Книга обновлена');\\n return redirect()->route('book.list');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85cc828ef538f860045b5d8fccb280b0\",\n \"score\": \"0.5435616\",\n \"text\": \"public function update($input, $id)\\n {\\n if (request()->hasFile('image')) {\\n $destinationPath = 'storage/Stores/images';\\n $file_info = getimagesize(request()->file('image'));\\n if (empty($file_info)) { // No Image?\\n Flash::error(trans('common.messages.valid_image'));\\n return false;\\n }\\n $file = request()->file('image');\\n $attach = $destinationPath . '/' . rand() . '-stores-' . date(\\\"d-m-y-H-M\\\") . '-' . $file->getClientOriginalName();\\n $file->move($destinationPath, ($attach));\\n $input['image'] = trim($attach);\\n }\\n\\n $store = Store::findOrFail($id);\\n $store->fill($input)->save();\\n\\n return $store;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ad7cc720b3fecdc71fb75066e6e7715\",\n \"score\": \"0.5435329\",\n \"text\": \"public function update($id, Request $request)\\n {\\n $product = Product::find($id);\\n $product->image_id = $request->image_id;\\n $product->name = $request->name;\\n $product->description = $request->description;\\n $product->price = $request->price;\\n $product->stock = $request->stock;\\n $product->sale_price = $request->sale_price ?? $request->price;\\n\\n $product->save();\\n\\n return redirect(route('product.edit', $id));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8c2f01239a4821e25335f10d24bed76\",\n \"score\": \"0.5433148\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $product = Product::find($id);\\n if (!$product) return redirect(route('products.index'));\\n\\n $this->validate($request,[\\n 'name' => 'required',\\n 'sell_price' => 'required|numeric',\\n 'origin_price' => 'required|numeric',\\n 'provider_id' => 'required|exists:providers,id',\\n ]);\\n Product::where('id',$id)\\n ->update([\\n 'name' => $request->name,\\n 'sell_price' => $request->sell_price,\\n 'origin_price' => $request->origin_price,\\n 'provider_id' => $request->provider_id,\\n ]);\\n\\n if ($request->hasFile('image')) {\\n $file = $request->file('image'); \\n $filename = time() . time() * 360 . time() * 1024 . \\\".\\\" . $file->extension();\\n \\n $oldImage = $product->image->filename;\\n\\n Photo::where('id',$product->image->id)\\n ->update([\\n 'filename' => $filename,\\n 'filesize' => $file->getClientSize(),\\n 'extension' => $file->extension(),\\n 'product_id' => $product->id,\\n ]);\\n $path = $file->move($this->path,$filename);\\n File::delete($this->path . '/' . $oldImage);\\n \\n }\\n session()->flash('message', 'تمت عملية التعديل بنجاح');\\n session()->flash('status', 'success');\\n return redirect(route('products.index'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9dfa985a23d52a88c5d6e0bc4baac1d\",\n \"score\": \"0.5432292\",\n \"text\": \"public function updateAction()\\n {\\n if ($this->request->hasArgument('uUID')) {\\n $uuid = $this->request->getArgument('uUID');\\n }\\n if (empty($uuid)) {\\n $this->throwStatus(400, 'Required uUID not provided', null);\\n }\\n $ordenstypObj = $this->ordenstypRepository->findByIdentifier($uuid);\\n if (is_object($ordenstypObj)) {\\n $ordenstypObj->setOrdenstyp($this->request->getArgument('ordenstyp'));\\n $this->ordenstypRepository->update($ordenstypObj);\\n $this->persistenceManager->persistAll();\\n $this->throwStatus(200, null, null);\\n } else {\\n $this->throwStatus(400, 'Entity Ordenstyp not available', null);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82dea4a48b80657331cbfd5c532ed380\",\n \"score\": \"0.54306734\",\n \"text\": \"public function _put() {\\n\\t\\tif (!empty($this->id)) {\\n\\t\\t\\t$row = $this->getDb()[$this->id];\\n\\t\\t\\tif ($row) {\\n\\t\\t\\t\\t$this->result = $row->update($this->data);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t$this->result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0cf26e6c4b3f625b549a6d0140e162d\",\n \"score\": \"0.54216164\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n\\n $image = Image::find($id);\\n\\n if ($request->hasFile('image')) {\\n $imageName = $request->image;\\n $imageName_new_name = time().$imageName->getClientOriginalName();\\n $imageName->move('storage/',$imageName_new_name);\\n $imageName = '/storage/'.$imageName_new_name;\\n\\n $image->path = $imageName;\\n }\\n\\n $image->name = $request->name;\\n $image->product_id = $request->product_id;\\n $image->save();\\n Session::flash('success','cập nhật thành công thành công!');\\n\\n return redirect()->route('admin.image.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0159915c79f2e062ee97c0758cf5fc6d\",\n \"score\": \"0.54203194\",\n \"text\": \"public function update(string $data);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50927265cd4834e00622acc58400363a\",\n \"score\": \"0.54201615\",\n \"text\": \"public function update(Request $request, $id)\\n {\\n $product = Product::Find($id);\\n\\n if($product === NULL)\\n return view('errors.404');\\n\\n if(Gate::denies('update-product' , $product))\\n return view('errors.refused');\\n\\n\\n $request->validate([\\n 'name' => ['required', 'string' , 'max:255'],\\n 'description' => ['required' , 'string' , 'min:5' , 'max:500'],\\n 'price' => ['required' , 'numeric'],\\n 'quantity' => ['required' , 'numeric']\\n ]);\\n\\n $product->name = $request->input('name');\\n $product->description = $request->input('description');\\n $product->price = $request->input('price');\\n $product->quantity = $request->input('quantity');\\n $product->id_user = Auth::user()->id;\\n $product->visible = 1;\\n\\n\\n if($request->hasFile('image')){\\n $image = $request->file('image');\\n $filename = time() . '.' . $image->getClientOriginalExtension();\\n Storage::disk('public')->put($filename, File::get($image));\\n $product->image = $filename;\\n };\\n\\n $product->save();\\n\\n return redirect('/products');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9bd5cde4f91473c17011fa280d1ed6e\",\n \"score\": \"0.5419226\",\n \"text\": \"public function update(StoreEditBiographie $request, $id)\\n {\\n $biographie = Biographie::find($id);\\n\\n $biographie->titre = $request->titre;\\n $biographie->contenu = $request->contenu;\\n if ($request->image != null)\\n {\\n Storage::disk('imgBiographie')->delete($biographie->image);\\n \\n \\n $image = [\\n \\\"name\\\" => $request->image,\\n \\\"disk\\\" => \\\"imgBiographie\\\",\\n \\\"w\\\" => 1000,\\n \\\"h\\\" => 1000\\n ];\\n $biographie->image = $this->imageResize->imageStore($image);\\n }\\n\\n $biographie->save();\\n return redirect()->route('biographies.index',['biographie'=> $biographie->id]);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":752,"cells":{"query_id":{"kind":"string","value":"334afee0fe3b6e82f2cee9ac994d75e5"},"query":{"kind":"string","value":"Sets the 'scope' member. Defines the navigation scope of this web application's application context. This basically restricts what web pages can be viewed while the manifest is applied. If the user navigates the application outside the scope, it returns to being a normal web page. If the scope is a relative URL, the base URL will be the URL of the manifest."},"positive_passages":{"kind":"list like","value":[{"docid":"ae7e02d8fb82ccefa7b51905cc3d543b","score":"0.6396727","text":"public function setScope(string $value):void\n {\n $this->webManifest['scope'] = $value;\n }","title":""}],"string":"[\n {\n \"docid\": \"ae7e02d8fb82ccefa7b51905cc3d543b\",\n \"score\": \"0.6396727\",\n \"text\": \"public function setScope(string $value):void\\n {\\n $this->webManifest['scope'] = $value;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"74a459b59e402ce6d9dd03c7a2dcab9b","score":"0.62918836","text":"public function setScope($scope = null);","title":""},{"docid":"3135448ad133e1c944282d582fc72465","score":"0.62148005","text":"function setScope()\n {\n global $imSettings;\n $scope = $imSettings['search']['general']['defaultScope'];\n\n // Logged users can search in their private pages\n $pa = new imPrivateArea();\n if ($user = $pa->who_is_logged()) {\n foreach ($imSettings['search']['general']['extendedScope'] as $key => $value) {\n if (in_array($user['uid'], $imSettings['access']['pages'][$key]))\n $scope[] = $value;\n }\n }\n\n $this->scope = $scope;\n }","title":""},{"docid":"c13e0bb3602c075e7d2212d393b11a7e","score":"0.58678615","text":"public function setScope($value)\n {\n $this->setProperty(\"Scope\", $value, true);\n }","title":""},{"docid":"478fd95eb34f520ed9ccd604cad1d486","score":"0.5721581","text":"public function setScope(?string $scope): void\n {\n $this->scope = $scope;\n }","title":""},{"docid":"478fd95eb34f520ed9ccd604cad1d486","score":"0.5721581","text":"public function setScope(?string $scope): void\n {\n $this->scope = $scope;\n }","title":""},{"docid":"8e94861ddbb61bfda8d59d6354ef4837","score":"0.5595052","text":"public function setScope($scope)\n {\n $this->_scope = $scope;\n }","title":""},{"docid":"ef9c5508b5ae0c4f2c33f81b1d49a883","score":"0.54742515","text":"public function setScope($scope) {\n return $this->setAttr('scope', $scope);\n }","title":""},{"docid":"9a296cadc6828cbb940472c549fc29fb","score":"0.5452044","text":"public function setSignInScope(?UserSignInRecommendationScope $value): void {\n $this->getBackingStore()->set('signInScope', $value);\n }","title":""},{"docid":"5d04d30a02c3b5ea914464224c3d9d48","score":"0.5402268","text":"function set_scope($value)\r\n\t{\r\n\t\t$this->_scope=$value;\r\n\t\treturn $this;\r\n\t}","title":""},{"docid":"e02b2975f05260a5d3281b972011ea30","score":"0.53519255","text":"public function setScope($var)\n {\n GPBUtil::checkString($var, True);\n $this->scope = $var;\n\n return $this;\n }","title":""},{"docid":"17cdd98159d0c05fd2a967b6698887d8","score":"0.53226805","text":"public function setScopeAccess($scopeAccess);","title":""},{"docid":"6d99289af0ec37455310c3b40bb39a9c","score":"0.52851844","text":"public function setScope($value)\n {\n return $this->set(self::SCOPE, $value);\n }","title":""},{"docid":"d32ef8b3835f0fc6cb54a9b87cc63dcc","score":"0.5253874","text":"public function setScope($var)\n {\n $arr = GPBUtil::checkMapField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->scope = $arr;\n\n return $this;\n }","title":""},{"docid":"571b71bd5fdfa0dcd1c4dbae790fa1e8","score":"0.5242017","text":"function setScope($scope) {\n $this->scope = $scope;\n }","title":""},{"docid":"c8438df6820c8cf6c9de4e41bedf8634","score":"0.512309","text":"public function setScope(?string $scope): self\n {\n $this->scope = $scope;\n\n return $this;\n }","title":""},{"docid":"dd55ed6080a33ce589f5e023ca8eb761","score":"0.50261444","text":"private function defineScopes() {\r\n define('APPLICATION_NAME', $this->appName);\r\n define('CREDENTIALS_PATH', $this->credentials);\r\n define('CLIENT_SECRET_PATH', $this->secret);\r\n define('SCOPES', implode(' ', array(\r\n Google_Service_Drive::DRIVE\r\n )\r\n ));\r\n }","title":""},{"docid":"922a52b9355f3b19be09ab24d55dfc92","score":"0.49579072","text":"public function makeScopedUrl($scope = null)\n {\n return \\admin\\helpers\\qsRoute(null, [\n 'scoped_to' => $scope,\n ]);\n }","title":""},{"docid":"1e00671981330958885dcb671109f220","score":"0.49204138","text":"public function setScope($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->scope = $arr;\n\n return $this;\n }","title":""},{"docid":"c8d69848d3b173de3cab0c369d4ffd04","score":"0.49060518","text":"protected function setScope($scope)\n {\n $this->scope = is_string($scope) ? explode(',', $scope) : $scope;\n return is_array($scope) ? join(',', $scope) : $scope;\n }","title":""},{"docid":"77d8e78b67e9a16a3ccfdfd33b088320","score":"0.48814327","text":"public function getScope()\n {\n if ($this->_request->getParam('store') !== null && strlen($this->_request->getParam('store'))) {\n return StoreScopeInterface::SCOPE_STORES;\n }\n // user is on the admin website level\n if ($this->_request->getParam('website') !== null && strlen($this->_request->getParam('website'))) {\n return StoreScopeInterface::SCOPE_WEBSITES;\n }\n // is user is on admin page, try to automatically detect his website scope\n if ($this->isAdminPage() && $this->_storeManager->getStore()->getWebsiteId()) {\n return StoreScopeInterface::SCOPE_WEBSITES;\n }\n // user is on the storefront\n if ($this->_storeManager->getStore()->getStoreId()) {\n return StoreScopeInterface::SCOPE_STORES;\n }\n // user at admin default level\n return 'default';\n }","title":""},{"docid":"3efe465dcd2412dd8a8f8155242b4f5b","score":"0.48495638","text":"public function getScope()\n {\n return $this->config['scope'];\n }","title":""},{"docid":"f49d696e8cba8353ce568f464cbccb01","score":"0.48333156","text":"public function setDefaultScope($defaultScope)\n {\n $this->defaultScope = $defaultScope;\n }","title":""},{"docid":"c63d43bea4c3bad4c46121931ed71b83","score":"0.48241627","text":"public function setAccessTokenScope(?array $accessTokenScope): self;","title":""},{"docid":"302244516d08c99bf0a5818686c5c5ea","score":"0.48005572","text":"public function setScopeType($val)\n {\n $this->_propDict[\"scopeType\"] = $val;\n return $this;\n }","title":""},{"docid":"fe99af943c58be2fe73e074fe9eb42c2","score":"0.47983035","text":"public function setScopeType(?string $value): void {\n $this->getBackingStore()->set('scopeType', $value);\n }","title":""},{"docid":"700ff693fba6b156ff0bb4e1fe622a76","score":"0.46606684","text":"protected function scope()\n {\n $scope = array_merge(\n (array) $this->rook->getScope(),\n (array) $this->bishop->getScope()\n );\n\n foreach($scope as $key => $val) {\n $scope[$key] = !empty($val[0]) ? $val[0] : null;\n }\n\n $this->scope = (object) array_filter(array_unique($scope));\n }","title":""},{"docid":"c98f0f717f6733d09c236fefe5e661c1","score":"0.4643585","text":"public function setSkipAuthorizationIfScopeIsAllowed($skipAuthIfScopeIsAllowed);","title":""},{"docid":"0e7c49677f6a505f8c9bb1f720486a4e","score":"0.46215734","text":"protected function setRequestedScopes()\n\t{\n\t\tif ( ! $this->request)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$scopes = array_filter(explode($this->embedsSeparator, $this->request->get($this->embedsKey)));\n\n\t\t$this->fractal->setRequestedScopes($scopes);\n\t}","title":""},{"docid":"6285586f23c18d029df7fc4369554637","score":"0.46084115","text":"public function setScope($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Analytics\\Admin\\V1alpha\\AudienceFilterScope::class);\n $this->scope = $var;\n\n return $this;\n }","title":""},{"docid":"6285586f23c18d029df7fc4369554637","score":"0.46084115","text":"public function setScope($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Analytics\\Admin\\V1alpha\\AudienceFilterScope::class);\n $this->scope = $var;\n\n return $this;\n }","title":""},{"docid":"0d005190a69894e171ef4a1f07690ab8","score":"0.4586714","text":"public function scopes();","title":""},{"docid":"615c2e1ed09353bed7a950730a1e4934","score":"0.4582367","text":"public function setUserExperienceAnalyticsDeviceScope($val)\n {\n $this->_propDict[\"userExperienceAnalyticsDeviceScope\"] = $val;\n return $this;\n }","title":""},{"docid":"c963b32f0376a7afc60bbc82ab899038","score":"0.45468655","text":"protected function getDefaultScopes() {\n\n\t}","title":""},{"docid":"6c487fd342564fef9ec57c53ec8f5d6a","score":"0.45465842","text":"public function setScopes(array $scopes)\n {\n foreach ($scopes as $scope) {\n $this->addScope($scope);\n }\n }","title":""},{"docid":"30f4603f06f812e408438faa13551c5a","score":"0.45419273","text":"public function getScope() {\n return $this->getAttr('scope');\n }","title":""},{"docid":"253b670d616ce701470584ce53a991fd","score":"0.45389038","text":"public function addScope(string $scope, array $parameters = []): void;","title":""},{"docid":"a991c9616cdeb5d7c7059e1fac80f583","score":"0.45291466","text":"public function setScopes(array $scopes): void\n {\n $this->scopes = $scopes;\n }","title":""},{"docid":"10a70deea22b470de52c4f8706564ce8","score":"0.4494993","text":"public function automaticScope($data)\n\t{\n\t\tif (!isset($data['scope']) || !$data['scope'])\n\t\t{\n\t\t\t$data['scope'] = 'site';\n\t\t}\n\t\treturn preg_replace(\"/[^a-zA-Z0-9]/\", '', strtolower($data['scope']));\n\t}","title":""},{"docid":"da777634bf11babc35397e3bd70a9445","score":"0.4486915","text":"private function defaultScope() {\n\t $configService = \\Factory::getConfigService();\n\t\t$scopes = $configService->getDefaultScopeName();\n\n\t\tif($scopes==null || trim($scopes) ==\"\"){\n\t\t return null;\n\t\t}else{\n\t\t return $scopes; \n\t\t}\n\t\t\n\t}","title":""},{"docid":"e58acc8658e1ac04e0ee08dddf208d2c","score":"0.44758543","text":"public function setScopes(?array $scopes): void\n {\n $this->scopes = $scopes;\n }","title":""},{"docid":"a7d33f3a009e3b7933208f8fe0dec082","score":"0.44694343","text":"public function setScope(array $permissions)\n {\n $this->scope = $permissions;\n return $this;\n }","title":""},{"docid":"7b3e0709a90f3c87a197b512263b513c","score":"0.4458297","text":"public function setScope($scope)\n {\n $this->scope = $scope;\n\n return $this;\n }","title":""},{"docid":"371c319a9c92c83aa23cfc7ae6155581","score":"0.44561633","text":"public function get_scope() {\n return $this->scope;\n }","title":""},{"docid":"9c73f0cdae0080fba7124ea5a304ca3f","score":"0.44509995","text":"protected function setPageHistory() {\n $s = new Zend_Session_Namespace('ultima_pagina');\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n $s->uri = (count($s->uri)) ? $s->uri : array();\n if (!preg_match(\"/^.*\\.(php|js|ico|gif|jpeg|jpg|JPG|png|css|html)$/i\", $url)) {\n $s->uri[3] = $s->uri[2];\n $s->uri[2] = $s->uri[1];\n $s->uri[1] = $s->uri[0];\n $s->uri[0] = $url;\n }\n }","title":""},{"docid":"52a71987d439b6d465fd88c7cd36a5af","score":"0.4446406","text":"public function getScope() {\r\n\t\treturn $this->scope;\r\n\t}","title":""},{"docid":"d764d0777408563d8be90198b41d6161","score":"0.44062075","text":"function get_scope()\r\n\t{ \r\n\t\treturn $this->_scope;\r\n\t}","title":""},{"docid":"3ab3faca589426b53e234896b7ace08f","score":"0.43830332","text":"protected function getDefaultScopes()\n {\n if (in_array(\"openid\", explode(\" \", $this->scope))) {\n return $this->scope;\n } else {\n $scopes = explode(\" \", $this->scope);\n array_push($scopes, \"openid\");\n return join(\" \", $scopes);\n }\n }","title":""},{"docid":"854f7d8f58aef5d5124bb996c71821b8","score":"0.43607992","text":"function getScope() {\n return $this->scope; \n }","title":""},{"docid":"453c1ecf105608e590afaf1c3ca63530","score":"0.4354866","text":"public function getScope()\n {\n return $this->scope;\n }","title":""},{"docid":"453c1ecf105608e590afaf1c3ca63530","score":"0.4354866","text":"public function getScope()\n {\n return $this->scope;\n }","title":""},{"docid":"453c1ecf105608e590afaf1c3ca63530","score":"0.4354866","text":"public function getScope()\n {\n return $this->scope;\n }","title":""},{"docid":"453c1ecf105608e590afaf1c3ca63530","score":"0.4354866","text":"public function getScope()\n {\n return $this->scope;\n }","title":""},{"docid":"453c1ecf105608e590afaf1c3ca63530","score":"0.4354866","text":"public function getScope()\n {\n return $this->scope;\n }","title":""},{"docid":"453c1ecf105608e590afaf1c3ca63530","score":"0.4354866","text":"public function getScope()\n {\n return $this->scope;\n }","title":""},{"docid":"f1055e5e9de6cde56d19c1dc9be694cd","score":"0.43434137","text":"protected function getOauthUrl($_scope = '') {\n return 'https://oauth.yandex.ru/authorize'\n\t\t\t. '?client_id=' . urlencode($this->provider['clientId'])\n . '&response_type=code&display=popup';\n\t}","title":""},{"docid":"57919500f6529aab489712993ad3a4b8","score":"0.43290117","text":"protected function getDefaultScopes()\n {\n return isset($this->scope) ? $this->scope : ['scope' => 'read'];\n }","title":""},{"docid":"f88ed4d3b8f4a66f9f8a0c79500461e7","score":"0.43212676","text":"public function addScope($scope) {\n array_push($this->scopes, $scope);\n return $this;\n }","title":""},{"docid":"f6654722a63fee8d503ae9cfd8d72be6","score":"0.43018967","text":"protected function get_supported_scopes() {\n // Example:\n // return array(\"my-friends\", \"photos\", \"whatever-else\");\n return array();\n }","title":""},{"docid":"e774ab76adfdc9a4cae192a99b8551cc","score":"0.42900878","text":"public function scope(): ?string\n {\n return $this->getConfig('scope');\n }","title":""},{"docid":"476e47f0ee74e4d6df28ce355c33761a","score":"0.42896417","text":"public function setMinScope($minScope)\n {\n // If we did not get an allowed value we will throw an exception\n $tmp = array_flip(array(\"structure\", \"function\", \"body\"));\n if (!isset($tmp[$minScope])) {\n\n throw new \\InvalidArgumentException(\n 'The minimal scope ' . $minScope . ' is not allowed. It may only be \"structure\", \"function\" or \"body\"'\n );\n }\n\n // Set the new minimal scope\n $this->minScope = $minScope;\n }","title":""},{"docid":"8e3c0babc9acffed0a5043c956896ff9","score":"0.4287025","text":"public function isScope()\n {\n if ($this->role == \"nore\" || $this->role == \"lore\" ||\n $this->role == \"lore_assist\") {\n return false;\n }\n\n return true;\n }","title":""},{"docid":"0e00443edf89bd880da9597f2d5bf613","score":"0.42833677","text":"public function setNavigateTo(string $values)\n\t{\n\t\t$this->policies[] = 'navigate-to ' . $values;\n\n\t\treturn $this;\n\t}","title":""},{"docid":"55aab778cec0639e842b6e86a49b6855","score":"0.4272866","text":"protected function getDefaultScopes()\n {\n return ['basic'];\n }","title":""},{"docid":"c93691706b046ec81c63ec090874fa1b","score":"0.4272251","text":"public function setScopes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->scopes = $arr;\n\n return $this;\n }","title":""},{"docid":"d6ce1cb1d811d7bbe8196a02bff6e845","score":"0.4272161","text":"public function skipAuthorizationIfScopeIsAllowed();","title":""},{"docid":"b98bdbf4ff926269cf4604528dd09b2c","score":"0.4253475","text":"protected function getDefaultScopes()\n {\n return ['sports_tracking_data:write email contacts sports_tracking_data profile'];\n }","title":""},{"docid":"a9d1abf9bb365527056dda1b7f7eb843","score":"0.42415643","text":"public function setUserExperienceAnalyticsDeviceScopes($val)\n {\n $this->_propDict[\"userExperienceAnalyticsDeviceScopes\"] = $val;\n return $this;\n }","title":""},{"docid":"d3aafd67b814f214cc86fda30d24a63c","score":"0.42202553","text":"protected function _getScope()\n {\n if (!$this->_scope) {\n $this->_scope = $this->_storeFactory->create(\n [\n 'url' => $this,\n 'data' => ['code' => 'admin', 'force_disable_rewrites' => false, 'disable_store_in_url' => true],\n ]\n );\n }\n return $this->_scope;\n }","title":""},{"docid":"31f54df8a8c109ff2dccd19726832cad","score":"0.42166835","text":"public function getScopeConfig(){\n return $this->scopeConfig;\n }","title":""},{"docid":"720214ec23397fbef522107cca17e899","score":"0.4214254","text":"protected function _getScope()\n {\n if (!$this->_scope) {\n $this->_scope = $this->_storeFactory->create(\n [\n 'url' => $this,\n 'data' => ['force_disable_rewrites' => false, 'disable_store_in_url' => true],\n ]\n );\n }\n return $this->_scope;\n }","title":""},{"docid":"dc9257ba64e7c7e5eebebc4821c2df26","score":"0.42100427","text":"public function setScopeType($scopeType)\n {\n $this->scopeType = $scopeType;\n return $this;\n }","title":""},{"docid":"3465f1111215acc27ebb5a49d619fac8","score":"0.4210017","text":"public function authorize($scope = 'openid email');","title":""},{"docid":"96aa8964459a64e4c557a3e62cb4dfec","score":"0.42004004","text":"public function getScope()\n {\n return $this->_scope;\n }","title":""},{"docid":"96aa8964459a64e4c557a3e62cb4dfec","score":"0.42004004","text":"public function getScope()\n {\n return $this->_scope;\n }","title":""},{"docid":"f51df1d21b690b0b12dd3174a93e6171","score":"0.41968825","text":"public function setScope(array $scopesList)\n {\n $this->_scope = $scopesList;\n return $this;\n }","title":""},{"docid":"7c00a5c86fed01d26ba5a8ae474caff3","score":"0.4190621","text":"protected function getDefaultScopes()\n {\n return ['all'];\n }","title":""},{"docid":"777ccab91996d7f6d2f8703a711b441b","score":"0.41833156","text":"private function pushScope($scope) {\n $this->scopeStack[] = $scope;\n $len = count($this->scopeStack);\n $this->currentScope = &$this->scopeStack[$len - 1];\n }","title":""},{"docid":"2f07034d9cbebed7956fb4b74e7f1e6f","score":"0.41800812","text":"public function setFrameAncestors(string $values)\n\t{\n\t\t$this->policies[] = 'frame-ancestors ' . $values;\n\n\t\treturn $this;\n\t}","title":""},{"docid":"645150b386981265991e2698d181a55e","score":"0.41416776","text":"public function initScope($data)\n {\n $this->scopeConfig->initScope($data);\n }","title":""},{"docid":"f05c24154c5b39f80dcbd098a184c8da","score":"0.41396546","text":"public function setRoleScopeTags($val)\n {\n $this->_propDict[\"roleScopeTags\"] = $val;\n return $this;\n }","title":""},{"docid":"67a4f2f64a98fb58b618849ad5ed2e7a","score":"0.41321012","text":"public function listAllowedScopes()\n\t{\n\t\treturn [\n\t\t\tController::SCOPE_AJAX,\n\t\t];\n\t}","title":""},{"docid":"b2e9a0e9bebdbde0a4885f7ee672a6ce","score":"0.4130556","text":"public function setScopes($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::ENUM, \\Clarifai\\Auth\\Scope\\S::class);\n $this->scopes = $arr;\n\n return $this;\n }","title":""},{"docid":"a71e64f6089dccab38e83544ec3180e4","score":"0.41263175","text":"public function putScopeValue($scope, $value)\n {\n if (is_string($scope)) {\n $scope = $this->getScope($scope);\n }\n\n // Set in session\n $cacheKey = 'scope-'.$scope->scopeName;\n $this->putSession($cacheKey, $value);\n\n // Set in memory\n $scope->setScopeValue($value);\n\n // Set in widget memory\n if ($scope->type === 'widget' && ($widget = $this->makeFilterScopeWidget($scope))) {\n $widget->getFilterScope()->setScopeValue($value);\n }\n }","title":""},{"docid":"18c23cfd706da3e88275695509b31d02","score":"0.41261828","text":"public function getScope(): ?string\n {\n return $this->scope;\n }","title":""},{"docid":"18c23cfd706da3e88275695509b31d02","score":"0.41261828","text":"public function getScope(): ?string\n {\n return $this->scope;\n }","title":""},{"docid":"18c23cfd706da3e88275695509b31d02","score":"0.41261828","text":"public function getScope(): ?string\n {\n return $this->scope;\n }","title":""},{"docid":"b74ea1b121a1c9e204acb13c13d26928","score":"0.41244614","text":"public static function setUri()\n\t{\n\t\t\n\t\tself::$requestUri = ($qsa = strpos($_SERVER['REQUEST_URI'],'?')) ? substr($_SERVER['REQUEST_URI'],0,$qsa) : $_SERVER['REQUEST_URI'];\n\t\tself::$requestA = array_slice(explode('/',self::$requestUri),1);\n\t\t\n\t\t\n\t\t//setConfig(\"CMS_ROOT\",substr($_SERVER['PHP_SELF'],0,-strlen('index.php')));\n\t\t\n\t\t//script name = last item in array\n\t\t$a = explode(\"/\",$_SERVER['PHP_SELF']);\n\t\t$t = $a[count($a)-1];\n\t\t\n\t\t/*\n\t\tif(isset($_SERVER[\"HTTP_REFERER\"])){\n\t\t\t$this->refA = explode(\"/\",$_SERVER[\"HTTP_REFERER\"]);\n\t\t\t$t = array_search($_SERVER['SERVER_NAME'],$this->refA);\n\t\t\t$this->refA = array_slice($this->refA, ($t+1));\n\t\t}\n\t\t*/\n\t\t\n\t\t$tA = explode(\"/\",substr($_SERVER['PHP_SELF'],1,-(strlen($t) + 1)));\n\t\tdefine('BASE',substr($_SERVER['PHP_SELF'],0,-strlen($t)));\n\t\tif($tA[0] != ''){\n\t\t\tarray_splice(self::$requestA,0,count($tA));\n\t\t\t/*\n\t\t\tif(isset($this->refA)){\n\t\t\t\t$this->refA = array_slice($this->refA,count($tA)); \n\t\t\t}\n\t\t\t*/\n\t\t}\n\t\t\n\t\tself::$requestUri = '/' . join('/',self::$requestA);\n\t}","title":""},{"docid":"bf843d41542d87469abd7973b64e1c31","score":"0.41239193","text":"public function getScope();","title":""},{"docid":"bf843d41542d87469abd7973b64e1c31","score":"0.41239193","text":"public function getScope();","title":""},{"docid":"bf843d41542d87469abd7973b64e1c31","score":"0.41239193","text":"public function getScope();","title":""},{"docid":"9c47dea7127cc91c5e3bb53d8bb45d49","score":"0.40986562","text":"public function getClientScopes();","title":""},{"docid":"18be776ed146331f2f003f2a9f899441","score":"0.40955785","text":"public function __construct(\\Magento\\Framework\\App\\Config\\ScopeConfigInterface $scopeConfig) {\n $this->scopeConfig = $scopeConfig;\n }","title":""},{"docid":"90e76a87d6fadf720bbbb7de1dcc4cf8","score":"0.40909588","text":"private function resolveScope()\n {\n $scopes = ['store', 'website'];\n $params = $this->request->getParams();\n\n $scope = array_filter($params, function ($key) use ($scopes) {\n return in_array($key, $scopes);\n }, ARRAY_FILTER_USE_KEY);\n\n if (empty($scope)) {\n return ScopeInterface::SCOPE_DEFAULT;\n }\n\n $scope = key($scope) . 's'; // Make string plural.\n\n return $scope;\n }","title":""},{"docid":"a0bb1a0bd768e72c7910009afa2cedcb","score":"0.40840843","text":"public function before(BeforeScenarioScope $scope)\r\n {\r\n if (!$scope->getFeature()->hasTags())\r\n return;\r\n\r\n $tags = $scope->getFeature()->getTags();\r\n foreach ($tags as $tag) {\r\n $this->setMinkParameter(\"base_url\", $this->config[$tag]);\r\n }\r\n\r\n return $this;\r\n }","title":""},{"docid":"72f52aff14b8474727b68bf5a6fdb920","score":"0.40840766","text":"public function addScope($hash = \"\", $scope = \"\") {\n\t\tif(empty($hash) || strlen($hash) < 1) {\n\t\t\tthrow new Exception(\"Store hash cannot be empty\");\n\t\t}\n\t\tif(empty($scope) || !is_array($scope) || count($scope) < 1) {\n\t\t\tthrow new Exception(\"Scope cannot be empty\");\n\t\t}\n\n\t\t$hash = $this->_db->EscapeQueryStmt($hash);\n\n\t\tforeach($scope as $i => $s) {\n\t\t\t$s = $this->_db->EscapeQueryStmt($s);\n\n\t\t\t$sql = \"INSERT INTO BigCommerceAccountAppScope (Id, BigCommerceAccountId, Scope, Active) VALUES (NULL, (SELECT Id FROM BigCommerceAccount WHERE StoreHash = '{$hash}'), '{$s}', 1)\";\n\t\t\tif(!$this->_db->Query($sql)) {\n\t\t\t\t//TODO HANDLE\n\t\t\t}\n\t\t\tif($this->_db->GetLastInsertedId() < 1) {\n\t\t\t\t// TODO HANDLE\n\t\t\t}\n\t\t}\n\n\t}","title":""},{"docid":"a3de54fb485958675365e78704c1762f","score":"0.40829816","text":"public function fetchAccessTokenScope();","title":""},{"docid":"071da1421fb983b18427ba3fff38bb4f","score":"0.4081861","text":"protected function getDefaultScopes() {\n\t\treturn null;\n\t}","title":""},{"docid":"3a4d9d554e50510e1ea452f5d3a228e4","score":"0.4075565","text":"protected function getDefaultScopes()\n {\n return ['core:*:*'];\n }","title":""},{"docid":"9d44c8d44fd07726d3cb2d355a6838b2","score":"0.40687177","text":"public function test__HasScope() {\n\t\t// Set initial state\n\t\t$result = $this->_behavior->setScope( \"foo\" );\n\n\t\t// Verify method return value\n\t\tverify( $result )->equals( $this->_mockRestfulRecord );\n\t\tverify( $this->_behavior->hasScope( \"foo\" ) )->true();\n\t\tverify( $this->_behavior->hasScope( \"bar\" ) )->false();\n\t}","title":""},{"docid":"31364286c7b540873695de0da2fc7daa","score":"0.40668988","text":"public function setRequestedScopes(array $scopes)\n {\n $this->fractal->setRequestedScopes($scopes);\n\n return $this;\n }","title":""}],"string":"[\n {\n \"docid\": \"74a459b59e402ce6d9dd03c7a2dcab9b\",\n \"score\": \"0.62918836\",\n \"text\": \"public function setScope($scope = null);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3135448ad133e1c944282d582fc72465\",\n \"score\": \"0.62148005\",\n \"text\": \"function setScope()\\n {\\n global $imSettings;\\n $scope = $imSettings['search']['general']['defaultScope'];\\n\\n // Logged users can search in their private pages\\n $pa = new imPrivateArea();\\n if ($user = $pa->who_is_logged()) {\\n foreach ($imSettings['search']['general']['extendedScope'] as $key => $value) {\\n if (in_array($user['uid'], $imSettings['access']['pages'][$key]))\\n $scope[] = $value;\\n }\\n }\\n\\n $this->scope = $scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c13e0bb3602c075e7d2212d393b11a7e\",\n \"score\": \"0.58678615\",\n \"text\": \"public function setScope($value)\\n {\\n $this->setProperty(\\\"Scope\\\", $value, true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"478fd95eb34f520ed9ccd604cad1d486\",\n \"score\": \"0.5721581\",\n \"text\": \"public function setScope(?string $scope): void\\n {\\n $this->scope = $scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"478fd95eb34f520ed9ccd604cad1d486\",\n \"score\": \"0.5721581\",\n \"text\": \"public function setScope(?string $scope): void\\n {\\n $this->scope = $scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e94861ddbb61bfda8d59d6354ef4837\",\n \"score\": \"0.5595052\",\n \"text\": \"public function setScope($scope)\\n {\\n $this->_scope = $scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef9c5508b5ae0c4f2c33f81b1d49a883\",\n \"score\": \"0.54742515\",\n \"text\": \"public function setScope($scope) {\\n return $this->setAttr('scope', $scope);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a296cadc6828cbb940472c549fc29fb\",\n \"score\": \"0.5452044\",\n \"text\": \"public function setSignInScope(?UserSignInRecommendationScope $value): void {\\n $this->getBackingStore()->set('signInScope', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d04d30a02c3b5ea914464224c3d9d48\",\n \"score\": \"0.5402268\",\n \"text\": \"function set_scope($value)\\r\\n\\t{\\r\\n\\t\\t$this->_scope=$value;\\r\\n\\t\\treturn $this;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e02b2975f05260a5d3281b972011ea30\",\n \"score\": \"0.53519255\",\n \"text\": \"public function setScope($var)\\n {\\n GPBUtil::checkString($var, True);\\n $this->scope = $var;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"17cdd98159d0c05fd2a967b6698887d8\",\n \"score\": \"0.53226805\",\n \"text\": \"public function setScopeAccess($scopeAccess);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d99289af0ec37455310c3b40bb39a9c\",\n \"score\": \"0.52851844\",\n \"text\": \"public function setScope($value)\\n {\\n return $this->set(self::SCOPE, $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d32ef8b3835f0fc6cb54a9b87cc63dcc\",\n \"score\": \"0.5253874\",\n \"text\": \"public function setScope($var)\\n {\\n $arr = GPBUtil::checkMapField($var, \\\\Google\\\\Protobuf\\\\Internal\\\\GPBType::STRING, \\\\Google\\\\Protobuf\\\\Internal\\\\GPBType::STRING);\\n $this->scope = $arr;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"571b71bd5fdfa0dcd1c4dbae790fa1e8\",\n \"score\": \"0.5242017\",\n \"text\": \"function setScope($scope) {\\n $this->scope = $scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8438df6820c8cf6c9de4e41bedf8634\",\n \"score\": \"0.512309\",\n \"text\": \"public function setScope(?string $scope): self\\n {\\n $this->scope = $scope;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd55ed6080a33ce589f5e023ca8eb761\",\n \"score\": \"0.50261444\",\n \"text\": \"private function defineScopes() {\\r\\n define('APPLICATION_NAME', $this->appName);\\r\\n define('CREDENTIALS_PATH', $this->credentials);\\r\\n define('CLIENT_SECRET_PATH', $this->secret);\\r\\n define('SCOPES', implode(' ', array(\\r\\n Google_Service_Drive::DRIVE\\r\\n )\\r\\n ));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"922a52b9355f3b19be09ab24d55dfc92\",\n \"score\": \"0.49579072\",\n \"text\": \"public function makeScopedUrl($scope = null)\\n {\\n return \\\\admin\\\\helpers\\\\qsRoute(null, [\\n 'scoped_to' => $scope,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e00671981330958885dcb671109f220\",\n \"score\": \"0.49204138\",\n \"text\": \"public function setScope($var)\\n {\\n $arr = GPBUtil::checkRepeatedField($var, \\\\Google\\\\Protobuf\\\\Internal\\\\GPBType::STRING);\\n $this->scope = $arr;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8d69848d3b173de3cab0c369d4ffd04\",\n \"score\": \"0.49060518\",\n \"text\": \"protected function setScope($scope)\\n {\\n $this->scope = is_string($scope) ? explode(',', $scope) : $scope;\\n return is_array($scope) ? join(',', $scope) : $scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77d8e78b67e9a16a3ccfdfd33b088320\",\n \"score\": \"0.48814327\",\n \"text\": \"public function getScope()\\n {\\n if ($this->_request->getParam('store') !== null && strlen($this->_request->getParam('store'))) {\\n return StoreScopeInterface::SCOPE_STORES;\\n }\\n // user is on the admin website level\\n if ($this->_request->getParam('website') !== null && strlen($this->_request->getParam('website'))) {\\n return StoreScopeInterface::SCOPE_WEBSITES;\\n }\\n // is user is on admin page, try to automatically detect his website scope\\n if ($this->isAdminPage() && $this->_storeManager->getStore()->getWebsiteId()) {\\n return StoreScopeInterface::SCOPE_WEBSITES;\\n }\\n // user is on the storefront\\n if ($this->_storeManager->getStore()->getStoreId()) {\\n return StoreScopeInterface::SCOPE_STORES;\\n }\\n // user at admin default level\\n return 'default';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3efe465dcd2412dd8a8f8155242b4f5b\",\n \"score\": \"0.48495638\",\n \"text\": \"public function getScope()\\n {\\n return $this->config['scope'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f49d696e8cba8353ce568f464cbccb01\",\n \"score\": \"0.48333156\",\n \"text\": \"public function setDefaultScope($defaultScope)\\n {\\n $this->defaultScope = $defaultScope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c63d43bea4c3bad4c46121931ed71b83\",\n \"score\": \"0.48241627\",\n \"text\": \"public function setAccessTokenScope(?array $accessTokenScope): self;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"302244516d08c99bf0a5818686c5c5ea\",\n \"score\": \"0.48005572\",\n \"text\": \"public function setScopeType($val)\\n {\\n $this->_propDict[\\\"scopeType\\\"] = $val;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe99af943c58be2fe73e074fe9eb42c2\",\n \"score\": \"0.47983035\",\n \"text\": \"public function setScopeType(?string $value): void {\\n $this->getBackingStore()->set('scopeType', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"700ff693fba6b156ff0bb4e1fe622a76\",\n \"score\": \"0.46606684\",\n \"text\": \"protected function scope()\\n {\\n $scope = array_merge(\\n (array) $this->rook->getScope(),\\n (array) $this->bishop->getScope()\\n );\\n\\n foreach($scope as $key => $val) {\\n $scope[$key] = !empty($val[0]) ? $val[0] : null;\\n }\\n\\n $this->scope = (object) array_filter(array_unique($scope));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c98f0f717f6733d09c236fefe5e661c1\",\n \"score\": \"0.4643585\",\n \"text\": \"public function setSkipAuthorizationIfScopeIsAllowed($skipAuthIfScopeIsAllowed);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e7c49677f6a505f8c9bb1f720486a4e\",\n \"score\": \"0.46215734\",\n \"text\": \"protected function setRequestedScopes()\\n\\t{\\n\\t\\tif ( ! $this->request)\\n\\t\\t{\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t$scopes = array_filter(explode($this->embedsSeparator, $this->request->get($this->embedsKey)));\\n\\n\\t\\t$this->fractal->setRequestedScopes($scopes);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6285586f23c18d029df7fc4369554637\",\n \"score\": \"0.46084115\",\n \"text\": \"public function setScope($var)\\n {\\n GPBUtil::checkEnum($var, \\\\Google\\\\Analytics\\\\Admin\\\\V1alpha\\\\AudienceFilterScope::class);\\n $this->scope = $var;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6285586f23c18d029df7fc4369554637\",\n \"score\": \"0.46084115\",\n \"text\": \"public function setScope($var)\\n {\\n GPBUtil::checkEnum($var, \\\\Google\\\\Analytics\\\\Admin\\\\V1alpha\\\\AudienceFilterScope::class);\\n $this->scope = $var;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d005190a69894e171ef4a1f07690ab8\",\n \"score\": \"0.4586714\",\n \"text\": \"public function scopes();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"615c2e1ed09353bed7a950730a1e4934\",\n \"score\": \"0.4582367\",\n \"text\": \"public function setUserExperienceAnalyticsDeviceScope($val)\\n {\\n $this->_propDict[\\\"userExperienceAnalyticsDeviceScope\\\"] = $val;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c963b32f0376a7afc60bbc82ab899038\",\n \"score\": \"0.45468655\",\n \"text\": \"protected function getDefaultScopes() {\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c487fd342564fef9ec57c53ec8f5d6a\",\n \"score\": \"0.45465842\",\n \"text\": \"public function setScopes(array $scopes)\\n {\\n foreach ($scopes as $scope) {\\n $this->addScope($scope);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30f4603f06f812e408438faa13551c5a\",\n \"score\": \"0.45419273\",\n \"text\": \"public function getScope() {\\n return $this->getAttr('scope');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"253b670d616ce701470584ce53a991fd\",\n \"score\": \"0.45389038\",\n \"text\": \"public function addScope(string $scope, array $parameters = []): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a991c9616cdeb5d7c7059e1fac80f583\",\n \"score\": \"0.45291466\",\n \"text\": \"public function setScopes(array $scopes): void\\n {\\n $this->scopes = $scopes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10a70deea22b470de52c4f8706564ce8\",\n \"score\": \"0.4494993\",\n \"text\": \"public function automaticScope($data)\\n\\t{\\n\\t\\tif (!isset($data['scope']) || !$data['scope'])\\n\\t\\t{\\n\\t\\t\\t$data['scope'] = 'site';\\n\\t\\t}\\n\\t\\treturn preg_replace(\\\"/[^a-zA-Z0-9]/\\\", '', strtolower($data['scope']));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da777634bf11babc35397e3bd70a9445\",\n \"score\": \"0.4486915\",\n \"text\": \"private function defaultScope() {\\n\\t $configService = \\\\Factory::getConfigService();\\n\\t\\t$scopes = $configService->getDefaultScopeName();\\n\\n\\t\\tif($scopes==null || trim($scopes) ==\\\"\\\"){\\n\\t\\t return null;\\n\\t\\t}else{\\n\\t\\t return $scopes; \\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e58acc8658e1ac04e0ee08dddf208d2c\",\n \"score\": \"0.44758543\",\n \"text\": \"public function setScopes(?array $scopes): void\\n {\\n $this->scopes = $scopes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7d33f3a009e3b7933208f8fe0dec082\",\n \"score\": \"0.44694343\",\n \"text\": \"public function setScope(array $permissions)\\n {\\n $this->scope = $permissions;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b3e0709a90f3c87a197b512263b513c\",\n \"score\": \"0.4458297\",\n \"text\": \"public function setScope($scope)\\n {\\n $this->scope = $scope;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"371c319a9c92c83aa23cfc7ae6155581\",\n \"score\": \"0.44561633\",\n \"text\": \"public function get_scope() {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c73f0cdae0080fba7124ea5a304ca3f\",\n \"score\": \"0.44509995\",\n \"text\": \"protected function setPageHistory() {\\n $s = new Zend_Session_Namespace('ultima_pagina');\\n $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\\n $s->uri = (count($s->uri)) ? $s->uri : array();\\n if (!preg_match(\\\"/^.*\\\\.(php|js|ico|gif|jpeg|jpg|JPG|png|css|html)$/i\\\", $url)) {\\n $s->uri[3] = $s->uri[2];\\n $s->uri[2] = $s->uri[1];\\n $s->uri[1] = $s->uri[0];\\n $s->uri[0] = $url;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52a71987d439b6d465fd88c7cd36a5af\",\n \"score\": \"0.4446406\",\n \"text\": \"public function getScope() {\\r\\n\\t\\treturn $this->scope;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d764d0777408563d8be90198b41d6161\",\n \"score\": \"0.44062075\",\n \"text\": \"function get_scope()\\r\\n\\t{ \\r\\n\\t\\treturn $this->_scope;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ab3faca589426b53e234896b7ace08f\",\n \"score\": \"0.43830332\",\n \"text\": \"protected function getDefaultScopes()\\n {\\n if (in_array(\\\"openid\\\", explode(\\\" \\\", $this->scope))) {\\n return $this->scope;\\n } else {\\n $scopes = explode(\\\" \\\", $this->scope);\\n array_push($scopes, \\\"openid\\\");\\n return join(\\\" \\\", $scopes);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"854f7d8f58aef5d5124bb996c71821b8\",\n \"score\": \"0.43607992\",\n \"text\": \"function getScope() {\\n return $this->scope; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"453c1ecf105608e590afaf1c3ca63530\",\n \"score\": \"0.4354866\",\n \"text\": \"public function getScope()\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"453c1ecf105608e590afaf1c3ca63530\",\n \"score\": \"0.4354866\",\n \"text\": \"public function getScope()\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"453c1ecf105608e590afaf1c3ca63530\",\n \"score\": \"0.4354866\",\n \"text\": \"public function getScope()\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"453c1ecf105608e590afaf1c3ca63530\",\n \"score\": \"0.4354866\",\n \"text\": \"public function getScope()\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"453c1ecf105608e590afaf1c3ca63530\",\n \"score\": \"0.4354866\",\n \"text\": \"public function getScope()\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"453c1ecf105608e590afaf1c3ca63530\",\n \"score\": \"0.4354866\",\n \"text\": \"public function getScope()\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1055e5e9de6cde56d19c1dc9be694cd\",\n \"score\": \"0.43434137\",\n \"text\": \"protected function getOauthUrl($_scope = '') {\\n return 'https://oauth.yandex.ru/authorize'\\n\\t\\t\\t. '?client_id=' . urlencode($this->provider['clientId'])\\n . '&response_type=code&display=popup';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57919500f6529aab489712993ad3a4b8\",\n \"score\": \"0.43290117\",\n \"text\": \"protected function getDefaultScopes()\\n {\\n return isset($this->scope) ? $this->scope : ['scope' => 'read'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f88ed4d3b8f4a66f9f8a0c79500461e7\",\n \"score\": \"0.43212676\",\n \"text\": \"public function addScope($scope) {\\n array_push($this->scopes, $scope);\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6654722a63fee8d503ae9cfd8d72be6\",\n \"score\": \"0.43018967\",\n \"text\": \"protected function get_supported_scopes() {\\n // Example:\\n // return array(\\\"my-friends\\\", \\\"photos\\\", \\\"whatever-else\\\");\\n return array();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e774ab76adfdc9a4cae192a99b8551cc\",\n \"score\": \"0.42900878\",\n \"text\": \"public function scope(): ?string\\n {\\n return $this->getConfig('scope');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"476e47f0ee74e4d6df28ce355c33761a\",\n \"score\": \"0.42896417\",\n \"text\": \"public function setMinScope($minScope)\\n {\\n // If we did not get an allowed value we will throw an exception\\n $tmp = array_flip(array(\\\"structure\\\", \\\"function\\\", \\\"body\\\"));\\n if (!isset($tmp[$minScope])) {\\n\\n throw new \\\\InvalidArgumentException(\\n 'The minimal scope ' . $minScope . ' is not allowed. It may only be \\\"structure\\\", \\\"function\\\" or \\\"body\\\"'\\n );\\n }\\n\\n // Set the new minimal scope\\n $this->minScope = $minScope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e3c0babc9acffed0a5043c956896ff9\",\n \"score\": \"0.4287025\",\n \"text\": \"public function isScope()\\n {\\n if ($this->role == \\\"nore\\\" || $this->role == \\\"lore\\\" ||\\n $this->role == \\\"lore_assist\\\") {\\n return false;\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e00443edf89bd880da9597f2d5bf613\",\n \"score\": \"0.42833677\",\n \"text\": \"public function setNavigateTo(string $values)\\n\\t{\\n\\t\\t$this->policies[] = 'navigate-to ' . $values;\\n\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55aab778cec0639e842b6e86a49b6855\",\n \"score\": \"0.4272866\",\n \"text\": \"protected function getDefaultScopes()\\n {\\n return ['basic'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c93691706b046ec81c63ec090874fa1b\",\n \"score\": \"0.4272251\",\n \"text\": \"public function setScopes($var)\\n {\\n $arr = GPBUtil::checkRepeatedField($var, \\\\Google\\\\Protobuf\\\\Internal\\\\GPBType::STRING);\\n $this->scopes = $arr;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6ce1cb1d811d7bbe8196a02bff6e845\",\n \"score\": \"0.4272161\",\n \"text\": \"public function skipAuthorizationIfScopeIsAllowed();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b98bdbf4ff926269cf4604528dd09b2c\",\n \"score\": \"0.4253475\",\n \"text\": \"protected function getDefaultScopes()\\n {\\n return ['sports_tracking_data:write email contacts sports_tracking_data profile'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9d1abf9bb365527056dda1b7f7eb843\",\n \"score\": \"0.42415643\",\n \"text\": \"public function setUserExperienceAnalyticsDeviceScopes($val)\\n {\\n $this->_propDict[\\\"userExperienceAnalyticsDeviceScopes\\\"] = $val;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3aafd67b814f214cc86fda30d24a63c\",\n \"score\": \"0.42202553\",\n \"text\": \"protected function _getScope()\\n {\\n if (!$this->_scope) {\\n $this->_scope = $this->_storeFactory->create(\\n [\\n 'url' => $this,\\n 'data' => ['code' => 'admin', 'force_disable_rewrites' => false, 'disable_store_in_url' => true],\\n ]\\n );\\n }\\n return $this->_scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31f54df8a8c109ff2dccd19726832cad\",\n \"score\": \"0.42166835\",\n \"text\": \"public function getScopeConfig(){\\n return $this->scopeConfig;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"720214ec23397fbef522107cca17e899\",\n \"score\": \"0.4214254\",\n \"text\": \"protected function _getScope()\\n {\\n if (!$this->_scope) {\\n $this->_scope = $this->_storeFactory->create(\\n [\\n 'url' => $this,\\n 'data' => ['force_disable_rewrites' => false, 'disable_store_in_url' => true],\\n ]\\n );\\n }\\n return $this->_scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc9257ba64e7c7e5eebebc4821c2df26\",\n \"score\": \"0.42100427\",\n \"text\": \"public function setScopeType($scopeType)\\n {\\n $this->scopeType = $scopeType;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3465f1111215acc27ebb5a49d619fac8\",\n \"score\": \"0.4210017\",\n \"text\": \"public function authorize($scope = 'openid email');\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96aa8964459a64e4c557a3e62cb4dfec\",\n \"score\": \"0.42004004\",\n \"text\": \"public function getScope()\\n {\\n return $this->_scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96aa8964459a64e4c557a3e62cb4dfec\",\n \"score\": \"0.42004004\",\n \"text\": \"public function getScope()\\n {\\n return $this->_scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f51df1d21b690b0b12dd3174a93e6171\",\n \"score\": \"0.41968825\",\n \"text\": \"public function setScope(array $scopesList)\\n {\\n $this->_scope = $scopesList;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c00a5c86fed01d26ba5a8ae474caff3\",\n \"score\": \"0.4190621\",\n \"text\": \"protected function getDefaultScopes()\\n {\\n return ['all'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"777ccab91996d7f6d2f8703a711b441b\",\n \"score\": \"0.41833156\",\n \"text\": \"private function pushScope($scope) {\\n $this->scopeStack[] = $scope;\\n $len = count($this->scopeStack);\\n $this->currentScope = &$this->scopeStack[$len - 1];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f07034d9cbebed7956fb4b74e7f1e6f\",\n \"score\": \"0.41800812\",\n \"text\": \"public function setFrameAncestors(string $values)\\n\\t{\\n\\t\\t$this->policies[] = 'frame-ancestors ' . $values;\\n\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"645150b386981265991e2698d181a55e\",\n \"score\": \"0.41416776\",\n \"text\": \"public function initScope($data)\\n {\\n $this->scopeConfig->initScope($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f05c24154c5b39f80dcbd098a184c8da\",\n \"score\": \"0.41396546\",\n \"text\": \"public function setRoleScopeTags($val)\\n {\\n $this->_propDict[\\\"roleScopeTags\\\"] = $val;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67a4f2f64a98fb58b618849ad5ed2e7a\",\n \"score\": \"0.41321012\",\n \"text\": \"public function listAllowedScopes()\\n\\t{\\n\\t\\treturn [\\n\\t\\t\\tController::SCOPE_AJAX,\\n\\t\\t];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2e9a0e9bebdbde0a4885f7ee672a6ce\",\n \"score\": \"0.4130556\",\n \"text\": \"public function setScopes($var)\\n {\\n $arr = GPBUtil::checkRepeatedField($var, \\\\Google\\\\Protobuf\\\\Internal\\\\GPBType::ENUM, \\\\Clarifai\\\\Auth\\\\Scope\\\\S::class);\\n $this->scopes = $arr;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a71e64f6089dccab38e83544ec3180e4\",\n \"score\": \"0.41263175\",\n \"text\": \"public function putScopeValue($scope, $value)\\n {\\n if (is_string($scope)) {\\n $scope = $this->getScope($scope);\\n }\\n\\n // Set in session\\n $cacheKey = 'scope-'.$scope->scopeName;\\n $this->putSession($cacheKey, $value);\\n\\n // Set in memory\\n $scope->setScopeValue($value);\\n\\n // Set in widget memory\\n if ($scope->type === 'widget' && ($widget = $this->makeFilterScopeWidget($scope))) {\\n $widget->getFilterScope()->setScopeValue($value);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18c23cfd706da3e88275695509b31d02\",\n \"score\": \"0.41261828\",\n \"text\": \"public function getScope(): ?string\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18c23cfd706da3e88275695509b31d02\",\n \"score\": \"0.41261828\",\n \"text\": \"public function getScope(): ?string\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18c23cfd706da3e88275695509b31d02\",\n \"score\": \"0.41261828\",\n \"text\": \"public function getScope(): ?string\\n {\\n return $this->scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b74ea1b121a1c9e204acb13c13d26928\",\n \"score\": \"0.41244614\",\n \"text\": \"public static function setUri()\\n\\t{\\n\\t\\t\\n\\t\\tself::$requestUri = ($qsa = strpos($_SERVER['REQUEST_URI'],'?')) ? substr($_SERVER['REQUEST_URI'],0,$qsa) : $_SERVER['REQUEST_URI'];\\n\\t\\tself::$requestA = array_slice(explode('/',self::$requestUri),1);\\n\\t\\t\\n\\t\\t\\n\\t\\t//setConfig(\\\"CMS_ROOT\\\",substr($_SERVER['PHP_SELF'],0,-strlen('index.php')));\\n\\t\\t\\n\\t\\t//script name = last item in array\\n\\t\\t$a = explode(\\\"/\\\",$_SERVER['PHP_SELF']);\\n\\t\\t$t = $a[count($a)-1];\\n\\t\\t\\n\\t\\t/*\\n\\t\\tif(isset($_SERVER[\\\"HTTP_REFERER\\\"])){\\n\\t\\t\\t$this->refA = explode(\\\"/\\\",$_SERVER[\\\"HTTP_REFERER\\\"]);\\n\\t\\t\\t$t = array_search($_SERVER['SERVER_NAME'],$this->refA);\\n\\t\\t\\t$this->refA = array_slice($this->refA, ($t+1));\\n\\t\\t}\\n\\t\\t*/\\n\\t\\t\\n\\t\\t$tA = explode(\\\"/\\\",substr($_SERVER['PHP_SELF'],1,-(strlen($t) + 1)));\\n\\t\\tdefine('BASE',substr($_SERVER['PHP_SELF'],0,-strlen($t)));\\n\\t\\tif($tA[0] != ''){\\n\\t\\t\\tarray_splice(self::$requestA,0,count($tA));\\n\\t\\t\\t/*\\n\\t\\t\\tif(isset($this->refA)){\\n\\t\\t\\t\\t$this->refA = array_slice($this->refA,count($tA)); \\n\\t\\t\\t}\\n\\t\\t\\t*/\\n\\t\\t}\\n\\t\\t\\n\\t\\tself::$requestUri = '/' . join('/',self::$requestA);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf843d41542d87469abd7973b64e1c31\",\n \"score\": \"0.41239193\",\n \"text\": \"public function getScope();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf843d41542d87469abd7973b64e1c31\",\n \"score\": \"0.41239193\",\n \"text\": \"public function getScope();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf843d41542d87469abd7973b64e1c31\",\n \"score\": \"0.41239193\",\n \"text\": \"public function getScope();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c47dea7127cc91c5e3bb53d8bb45d49\",\n \"score\": \"0.40986562\",\n \"text\": \"public function getClientScopes();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18be776ed146331f2f003f2a9f899441\",\n \"score\": \"0.40955785\",\n \"text\": \"public function __construct(\\\\Magento\\\\Framework\\\\App\\\\Config\\\\ScopeConfigInterface $scopeConfig) {\\n $this->scopeConfig = $scopeConfig;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90e76a87d6fadf720bbbb7de1dcc4cf8\",\n \"score\": \"0.40909588\",\n \"text\": \"private function resolveScope()\\n {\\n $scopes = ['store', 'website'];\\n $params = $this->request->getParams();\\n\\n $scope = array_filter($params, function ($key) use ($scopes) {\\n return in_array($key, $scopes);\\n }, ARRAY_FILTER_USE_KEY);\\n\\n if (empty($scope)) {\\n return ScopeInterface::SCOPE_DEFAULT;\\n }\\n\\n $scope = key($scope) . 's'; // Make string plural.\\n\\n return $scope;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0bb1a0bd768e72c7910009afa2cedcb\",\n \"score\": \"0.40840843\",\n \"text\": \"public function before(BeforeScenarioScope $scope)\\r\\n {\\r\\n if (!$scope->getFeature()->hasTags())\\r\\n return;\\r\\n\\r\\n $tags = $scope->getFeature()->getTags();\\r\\n foreach ($tags as $tag) {\\r\\n $this->setMinkParameter(\\\"base_url\\\", $this->config[$tag]);\\r\\n }\\r\\n\\r\\n return $this;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72f52aff14b8474727b68bf5a6fdb920\",\n \"score\": \"0.40840766\",\n \"text\": \"public function addScope($hash = \\\"\\\", $scope = \\\"\\\") {\\n\\t\\tif(empty($hash) || strlen($hash) < 1) {\\n\\t\\t\\tthrow new Exception(\\\"Store hash cannot be empty\\\");\\n\\t\\t}\\n\\t\\tif(empty($scope) || !is_array($scope) || count($scope) < 1) {\\n\\t\\t\\tthrow new Exception(\\\"Scope cannot be empty\\\");\\n\\t\\t}\\n\\n\\t\\t$hash = $this->_db->EscapeQueryStmt($hash);\\n\\n\\t\\tforeach($scope as $i => $s) {\\n\\t\\t\\t$s = $this->_db->EscapeQueryStmt($s);\\n\\n\\t\\t\\t$sql = \\\"INSERT INTO BigCommerceAccountAppScope (Id, BigCommerceAccountId, Scope, Active) VALUES (NULL, (SELECT Id FROM BigCommerceAccount WHERE StoreHash = '{$hash}'), '{$s}', 1)\\\";\\n\\t\\t\\tif(!$this->_db->Query($sql)) {\\n\\t\\t\\t\\t//TODO HANDLE\\n\\t\\t\\t}\\n\\t\\t\\tif($this->_db->GetLastInsertedId() < 1) {\\n\\t\\t\\t\\t// TODO HANDLE\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3de54fb485958675365e78704c1762f\",\n \"score\": \"0.40829816\",\n \"text\": \"public function fetchAccessTokenScope();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"071da1421fb983b18427ba3fff38bb4f\",\n \"score\": \"0.4081861\",\n \"text\": \"protected function getDefaultScopes() {\\n\\t\\treturn null;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a4d9d554e50510e1ea452f5d3a228e4\",\n \"score\": \"0.4075565\",\n \"text\": \"protected function getDefaultScopes()\\n {\\n return ['core:*:*'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d44c8d44fd07726d3cb2d355a6838b2\",\n \"score\": \"0.40687177\",\n \"text\": \"public function test__HasScope() {\\n\\t\\t// Set initial state\\n\\t\\t$result = $this->_behavior->setScope( \\\"foo\\\" );\\n\\n\\t\\t// Verify method return value\\n\\t\\tverify( $result )->equals( $this->_mockRestfulRecord );\\n\\t\\tverify( $this->_behavior->hasScope( \\\"foo\\\" ) )->true();\\n\\t\\tverify( $this->_behavior->hasScope( \\\"bar\\\" ) )->false();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31364286c7b540873695de0da2fc7daa\",\n \"score\": \"0.40668988\",\n \"text\": \"public function setRequestedScopes(array $scopes)\\n {\\n $this->fractal->setRequestedScopes($scopes);\\n\\n return $this;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":753,"cells":{"query_id":{"kind":"string","value":"7565834f7989387a62cc3e6bf546ffe5"},"query":{"kind":"string","value":"test login with valid parameters and expect a 201"},"positive_passages":{"kind":"list like","value":[{"docid":"11dcc5b93f27c61ca4299af0f0ad4fd3","score":"0.0","text":"public function testLoginSuccessAndGetOrdersOfService() {\n $request = $this->getRequest();\n $request->setMethod('POST');\n\n $service = $this->getRandomService();\n $service->setPassword(md5('testen'));\n $service->save();\n\n $countOrders = $service->getOrders()->count();\n\n $order = new Yourdelivery_Model_Order($this->placeOrder(array('service' => $service)));\n $order->setStatus(Yourdelivery_Model_Order::AFFIRMED, new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::COMMENT, 'testcase API Partner testLoginSuccessAndGetOrdersOfService'));\n // should be affirmed and ready for picking by driver\n\n $serviceNew = new Yourdelivery_Model_Servicetype_Restaurant($service->getId());\n $countOrdersNew = $serviceNew->getOrders()->count();\n\n $this->assertEquals($countOrders + 1, $countOrdersNew);\n\n\n //clear password if available\n if ($service->getPartnerData() !== null) {\n $service->getPartnerData()->setTemporaryPassword('');\n $service->getPartnerData()->save();\n }\n\n $request->setPost(array(\n 'nr' => $service->getCustomerNr(),\n 'pass' => 'testen'\n ));\n\n $this->dispatch('/get_partner_customer');\n $this->assertResponseCode(201);\n\n $data = $this->getResponse()->getBody();\n\n $doc = new DOMDocument();\n $doc->loadXML($data);\n\n $success = $doc->getElementsByTagName(\"success\");\n $this->assertEquals('true', $success->item(0)->nodeValue);\n\n $access = $doc->getElementsByTagName(\"access\")->item(0)->nodeValue;\n $this->assertEquals($service->getSalt(), $access);\n\n // now try to get orders from this service by using this access\n $this->resetRequest();\n $this->resetResponse();\n\n $this->dispatch('/get_partner_order?access=' . $access);\n $this->assertAction('index');\n $this->assertResponseCode(200);\n\n $data = $this->getResponse()->getBody();\n\n $doc = new DOMDocument();\n $doc->loadXML($data);\n $this->assertGreaterThanOrEqual(1, $doc->getElementsByTagName(\"order\")->length);\n\n // place another order and check count again\n $order2 = new Yourdelivery_Model_Order($this->placeOrder(array('service' => $service)));\n $order2->setStatus(Yourdelivery_Model_Order::AFFIRMED, new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::COMMENT, 'testcase API Partner testLoginSuccessAndGetOrdersOfService'));\n // should be affirmed and ready for picking by driver\n // now try to get orders from this service by using this access\n $this->resetRequest();\n $this->resetResponse();\n\n $this->dispatch('/get_partner_order?access=' . $access);\n $this->assertAction('index');\n $this->assertResponseCode(200);\n\n $data = $this->getResponse()->getBody();\n\n $doc = new DOMDocument();\n $doc->loadXML($data);\n $this->assertGreaterThanOrEqual(2, $doc->getElementsByTagName(\"order\")->length);\n }","title":""}],"string":"[\n {\n \"docid\": \"11dcc5b93f27c61ca4299af0f0ad4fd3\",\n \"score\": \"0.0\",\n \"text\": \"public function testLoginSuccessAndGetOrdersOfService() {\\n $request = $this->getRequest();\\n $request->setMethod('POST');\\n\\n $service = $this->getRandomService();\\n $service->setPassword(md5('testen'));\\n $service->save();\\n\\n $countOrders = $service->getOrders()->count();\\n\\n $order = new Yourdelivery_Model_Order($this->placeOrder(array('service' => $service)));\\n $order->setStatus(Yourdelivery_Model_Order::AFFIRMED, new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::COMMENT, 'testcase API Partner testLoginSuccessAndGetOrdersOfService'));\\n // should be affirmed and ready for picking by driver\\n\\n $serviceNew = new Yourdelivery_Model_Servicetype_Restaurant($service->getId());\\n $countOrdersNew = $serviceNew->getOrders()->count();\\n\\n $this->assertEquals($countOrders + 1, $countOrdersNew);\\n\\n\\n //clear password if available\\n if ($service->getPartnerData() !== null) {\\n $service->getPartnerData()->setTemporaryPassword('');\\n $service->getPartnerData()->save();\\n }\\n\\n $request->setPost(array(\\n 'nr' => $service->getCustomerNr(),\\n 'pass' => 'testen'\\n ));\\n\\n $this->dispatch('/get_partner_customer');\\n $this->assertResponseCode(201);\\n\\n $data = $this->getResponse()->getBody();\\n\\n $doc = new DOMDocument();\\n $doc->loadXML($data);\\n\\n $success = $doc->getElementsByTagName(\\\"success\\\");\\n $this->assertEquals('true', $success->item(0)->nodeValue);\\n\\n $access = $doc->getElementsByTagName(\\\"access\\\")->item(0)->nodeValue;\\n $this->assertEquals($service->getSalt(), $access);\\n\\n // now try to get orders from this service by using this access\\n $this->resetRequest();\\n $this->resetResponse();\\n\\n $this->dispatch('/get_partner_order?access=' . $access);\\n $this->assertAction('index');\\n $this->assertResponseCode(200);\\n\\n $data = $this->getResponse()->getBody();\\n\\n $doc = new DOMDocument();\\n $doc->loadXML($data);\\n $this->assertGreaterThanOrEqual(1, $doc->getElementsByTagName(\\\"order\\\")->length);\\n\\n // place another order and check count again\\n $order2 = new Yourdelivery_Model_Order($this->placeOrder(array('service' => $service)));\\n $order2->setStatus(Yourdelivery_Model_Order::AFFIRMED, new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::COMMENT, 'testcase API Partner testLoginSuccessAndGetOrdersOfService'));\\n // should be affirmed and ready for picking by driver\\n // now try to get orders from this service by using this access\\n $this->resetRequest();\\n $this->resetResponse();\\n\\n $this->dispatch('/get_partner_order?access=' . $access);\\n $this->assertAction('index');\\n $this->assertResponseCode(200);\\n\\n $data = $this->getResponse()->getBody();\\n\\n $doc = new DOMDocument();\\n $doc->loadXML($data);\\n $this->assertGreaterThanOrEqual(2, $doc->getElementsByTagName(\\\"order\\\")->length);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"68463a19eb2f1aec0bdaf6efcfcdb1b3","score":"0.8026949","text":"protected function login() {\n list($r, $s) = self::jsonRequest('POST', '/api/login',\n array(\n 'username' => $this::USER_EMAIL,\n 'password' => $this::USER_PASSWORD\n )\n );\n $this->assertEquals(201, $s);\n }","title":""},{"docid":"12e5a4ecff411f99d32fb2d2992d0c8d","score":"0.7994173","text":"public function test_user_can_login_with_valid_data()\n {\n $response = $this->post(\n 'api/login',\n [\n 'email' => 'super_admin@gmail.com',\n 'password' => 'superadmin'\n ]\n );\n $response->assertOk();\n }","title":""},{"docid":"a43769eb74a503acd1d12e2f5c1d34fb","score":"0.7871274","text":"public function testLoginValidData()\n {\n $response = $this->post('http://127.0.0.1:8000/api/login', ['email' => 'ebasem653@gmail.com', 'password' => '123456']);\n $this->assertEquals(200, $response->status());\n }","title":""},{"docid":"9c5a30cca1d69e5b3ee545afd6a00cab","score":"0.78033483","text":"public function testUserLoginPostUri()\n {\n \t$response = $this->call('POST', '/user/login', ['email' => 'test@gmail.com', 'password'=> bcrypt('password')]);\n \t$this->assertEquals(302, $response->status());\n }","title":""},{"docid":"91f27bd6c66d72501d0102119500ce6f","score":"0.7792334","text":"public function test_successful_login()\n {\n $response = $this->postJson('/api/login', [\n 'email' => Config::get('api.apiEmail'),\n 'password' => Config::get('api.apiPassword')\n ]);\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n \"expires_in\",\n \"access_token\",\n \"token_type\"\n ]);\n }","title":""},{"docid":"b3a66472fa6ab7e78d0f940aa3ec9499","score":"0.7746466","text":"public function testLoginApiUserSemCredenciais()\n {\n $credentials = [\n 'email' => '',\n 'password' => 123456\n ];\n\n $response = $this->post('/api/login', $credentials);\n $response->assertStatus(401);\n }","title":""},{"docid":"57bdbae5f425ef7c83466dec61cfa287","score":"0.77419245","text":"public function testLogin()\n {\n $response = $this->action('POST', 'V1\\UserController@postLogin');\n $this->assertTrue($this->client->getResponse()->isOk());\n }","title":""},{"docid":"d4ac7b6dad272b1b108f1324ddbd94b1","score":"0.771954","text":"public function testUserLoginSuccessfully()\n {\n\n $response = $this->post('/login', [\n 'email' => 'admin@gmail.com',\n 'password' => 'adminadmin',\n ]);\n $response->assertRedirect('/home');\n }","title":""},{"docid":"a5b7738fa997c5a875f3699d8df79395","score":"0.7715106","text":"public function testLogin()\n {\n $data = [\n 'username' => 'superadmin',\n 'password' => 'secret'\n ];\n\n $response = $this->post(url('api/login'), $data)\n ->assertStatus(200);\n }","title":""},{"docid":"0cd80432f611b75bf2791990275e2892","score":"0.7689319","text":"public function testLogin()\n {\n $email = $this->email;\n $password = $this->password;\n\n $response = $this->json('POST', '/api/login', [\n 'email' => $email,\n 'password' => $password\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'access_token', 'token_type', 'expires_in'\n ]);\n }","title":""},{"docid":"c66d1fad240902a574f1067b3b937094","score":"0.7678931","text":"public function testSuccessfullLogin()\n {\n $response = $this->json('POST', '/login', [\n 'email' => $this->users['exists']['email'],\n 'password' => $this->users['exists']['password'],\n ], [\n 'apikey' => $this->apiAuth['uuid'],\n ]);\n\n $response->assertResponseOK();\n $response->seeJsonStructure([\n 'data' => [\n 'token',\n ],\n ]);\n }","title":""},{"docid":"00af2e232fa27f0d79bd3e773691c12e","score":"0.76739156","text":"public function testLoginApiUser()\n {\n $credentials = [\n 'email' => 'teste@gmail.com',\n 'password' => 123456\n ];\n\n $response = $this->post('api/login', $credentials);\n $response->assertStatus(200);\n }","title":""},{"docid":"db74c51643740096e6137edf4a47b650","score":"0.7672186","text":"public function testSuccess()\n {\n\n $response = $this->post('/login', [\n 'email' => 'name@studentmail.ul.ie',\n 'password' => 'pass'\n ]);\n\n $response->assertStatus(302);\n }","title":""},{"docid":"4ed7f2be434bde1b6cc4465b2b56f65e","score":"0.7588173","text":"public function testLogin()\n {\n $apiHandler = $this->application->getKernel()->getContainer()->get('vtally.api_handler');\n \n //Case where login successfully for 1st verifier\n $inputData = array('action' => 600, 'username' => 'verifier1', 'password' => 'test');\n $outPut = $apiHandler->login($inputData);\n $this->assertEquals($outPut->getData(), array('first_name' => 'VERIFIER 1', 'pol_id' => 'Pol. Station 1', 'verifier_token' => 'ABCD1'));\n \n //Case where login successfully for 2nd verifier\n $inputData = array('action' => 600, 'username' => 'verifier2', 'password' => 'test');\n $outPut = $apiHandler->login($inputData);\n $this->assertEquals($outPut->getData(), array('first_name' => 'VERIFIER 2', 'pol_id' => 'Pol. Station 1', 'verifier_token' => 'ABCD2'));\n \n //Case login faild: wrong username\n $inputData = array('username' => 'verifier11', 'password' => 'test');\n $outPut = $apiHandler->login($inputData);\n $this->assertEquals($outPut->getData(), array('Bad credentials.'));\n \n //Case login faild: wrong password\n $inputData = array('username' => 'verifier1', 'password' => 'testt');\n $outPut = $apiHandler->login($inputData);\n $this->assertEquals($outPut->getData(), array('Bad credentials.'));\n }","title":""},{"docid":"e2f7d13d5ce4f27f39f07d3e116cbd50","score":"0.75876343","text":"public function test_login_user()\n {\n\n \n $this->actingAs($this->defaultUser());\n\n $response = $this->json('POST', '/api/v1/auth/login', ['email' => 'demo@demo.com', 'password' => bcrypt('demo')]);\n\n $response->assertStatus(200);\n\n }","title":""},{"docid":"9130b9b83005072b651efa0a137187bf","score":"0.7543246","text":"public function testLogin()\n {\n $clientData = new ClientData();\n $request = $clientData->getData();\n\n $response = $this->post('/oauth/token', $request);\n $response->assertStatus(200);\n }","title":""},{"docid":"8fcb7336262c6aa86be4f63189263e13","score":"0.75410086","text":"public function testLogin()\n {\n // Disable brute-force attack protection\n $this->withoutThrottleMiddleware();\n $route = route('api.login');\n\n // Test incomplete credentials\n $response = $this->post($route);\n $response->assertStatus(422);\n $response->assertJsonValidationErrors(['email', 'password']);\n\n // Test invalid credentials\n $response = $this->post($route, [\n 'email' => 'test@example.com',\n 'password' => 'random',\n ]);\n $response->assertStatus(401);\n $response->assertJsonStructure(['error']);\n\n // Test valid credentials\n $response = $this->post($route, [\n 'email' => $this->user->getEmail(),\n 'password' => 'verysecret',\n ]);\n $response->assertOk();\n $response->assertJsonStructure(static::TOKEN_STRUCTURE);\n }","title":""},{"docid":"fd50c44be4606628db70e598e3711ee9","score":"0.75396454","text":"public function testSuccessLogin()\n {\n \n $user = factory('App\\User')->create();\n\n $response = $this->call('POST', '/v1/auth/login', \n [\n 'email' => $user->email,\n 'password' => env('TEMP_PASSWORD'),\n ]\n );\n\n $this->assertEquals(200, $response->status());\n\n }","title":""},{"docid":"34e4962f4c4e236a6df1cd1c1e158af2","score":"0.7520641","text":"public function testLogin()\n {\n $password = $this->faker->word;\n $user = factory(User::class)->create([\n 'password' => bcrypt($password)\n ]);\n\n $response = $this->json('post', '/api/v1/login', [\n 'email' => $user->email,\n 'password' => $password\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'data' => [\n 'id' => true,\n 'name' => true,\n 'email' => true\n ],\n 'meta' => [\n 'headers' => [],\n 'original' => [\n 'access_token' => true,\n 'token_type' => 'bearer',\n 'expires_in' => 0\n ],\n 'exception' => null\n ]\n ]);\n }","title":""},{"docid":"2b63ed312021caaad3da40e614a4872c","score":"0.7519838","text":"public function test_login_form()\n {\n $response = $this->get('/login');\n\n $response->assertStatus(200);\n }","title":""},{"docid":"eb37a8ea0689a7894e9b371bc39f9fe3","score":"0.751692","text":"public function testLogin()\n {\n $params = [\n 'username' => 'admin@success-ss.com.vn',\n 'password' => '123456'\n ];\n\n $response = $this->json('POST', env('APP_URL') . '/login', $params);\n\n $user = Auth::user();\n\n $this->assertEquals($params['username'], $user->username);\n\n $response->assertRedirect('admin/dashboard');\n }","title":""},{"docid":"f83fa5363800d6741c40173f0b9356a6","score":"0.75088567","text":"public function LoginSuccesfull()\n {\n // as a user, I wrongly type my email and password\n $data = ['email' => 'admin@app.com', 'password' => 'secret'];\n // and I submit it to the login api\n $response = $this->call('POST', 'login', $data);\n // I should be able to login\n $this->assertEquals(HttpResponse::HTTP_ACCEPTED, $response->status());\n // assert there is a TOKEN on the response\n $content = json_decode($response->getContent());\n $this->assertObjectHasAttribute('token', $content);\n $this->assertNotEmpty($content->token);\n }","title":""},{"docid":"5eff4136f3ac51720a13b3935066c76b","score":"0.74966544","text":"public function testUserLogin()\n {\n \n // Test request to login\n $response = $this->call('POST', '/api/v1/api-login',array(\"email\"=>\"admin@admin.com\" , \"password\"=>\"123\"));\n // Test request is not authorized\n $this->assertTrue(strpos($response->getContent(),\"You has been logged in Successfully!\")!==false);\n }","title":""},{"docid":"ed92d37413cefd9d80b533c0deacb127","score":"0.7495021","text":"public function testLoginActionCorrectLogin()\n {\n $postData = array(\n 'email' => $this->testUserEmail,\n 'password' => $this->testUserPassword,\n );\n $this->dispatch('/user/login', 'POST', $postData);\n $this->assertResponseStatusCode(302);\n }","title":""},{"docid":"b897708e760e36219afd33221f02b29b","score":"0.74917686","text":"public function firstLoginTest()\n {\n $response = $this->postJson('/api/organization/login', ['email' => 'test333@test.test', 'password' => '88888888']);\n $response->assertStatus(200)->assertJson(['token' => true]);\n }","title":""},{"docid":"f261f796a6a99d2f105dc611087df4fc","score":"0.74759024","text":"public function testTelaLoginUser()\n {\n $response = $this->get('/login');\n $response->assertStatus(200);\n }","title":""},{"docid":"b0dac3d5b598bd59571ca1a7e3abb9f3","score":"0.7440982","text":"public function testLoginSuccess()\n {\n factory(\\App\\Models\\User::class)->create();\n\n $response = $this->call('post', 'api/v1/user/', $this->_userLoginDetails);\n $this->assertEquals(200, $response->status());\n }","title":""},{"docid":"e5e0d212586e2c41be6b12941d59c825","score":"0.74346155","text":"public function testLogin()\n {\n $user = factory(User::class)->create();\n\n $this->postJson('api/auth/login', ['email' => $user->email, 'password' => 'password'])\n ->assertStatus(200)\n ->assertJson(['status' => 'success']);\n }","title":""},{"docid":"0f86c57cdb2bc51c22ce6b8afc7ac8e7","score":"0.74063957","text":"public function testExample()\n {\n $loginData = ['account_number' => 123456, 'password' => 'sample123'];\n\n $this->json('POST', 'api/account/login', $loginData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n 'success',\n 'message',\n 'data' => [\n 'token'\n ]\n ]);\n\n $this->assertAuthenticated();\n }","title":""},{"docid":"24a7a2229aeecb685d5fec637e61eab4","score":"0.7400255","text":"public function testLogin()\n {\n $data = [\n 'email' => 'michel.bolzon123@gmail.com',\n 'password' => '1525605'\n ];\n $response = $this->post('login', $data);\n\n $subDomain = Tenant::first()->sub_domain;\n\n $response\n ->assertStatus(302)\n ->assertRedirect(\"$subDomain/home\");\n }","title":""},{"docid":"52b0cfa5922edbe733eea4726439594e","score":"0.7379737","text":"public function testLoginSuccess()\n {\n\n $this->visit('/auth/login')\n ->type('julien@meetserious.com', 'email')\n ->type('123456', 'password')\n ->press('Connexion')\n ->followRedirects()\n ->seePageIs('/admin');\n }","title":""},{"docid":"452636ae84d50fd0487c19356e425582","score":"0.7354774","text":"public function testSuccessfulUserLogin()\n {\n $userData = [\n \"email\" => \"user1@test.com\",\n \"password\" => \"test123\",\n \"device_name\" => \"testing\"\n ];\n\n $this->json('POST', 'api/v1/login', $userData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n \"data\" => [\n \"token\",\n \"user\" => [\n \"id\",\n \"name\",\n \"email\"\n ]\n ],\n \"code\",\n \"message\"\n ]);\n }","title":""},{"docid":"62c225dccff35eb0795ad6e98b38fa02","score":"0.73436904","text":"public function test_login_user()\n {\n //Create user\n //attempt login\n $response = $this->json('POST', route('api.v1.login'), [\n 'email' => 'superadmin@demo.dev',\n 'password' => '123456',\n ]);\n //Assert it was successful and a token was received\n $response->assertStatus(200);\n $result = $response->json();\n $this->assertArrayHasKey('token', ['token' => $result['data']['access_token']]);\n }","title":""},{"docid":"cbb0d0e594eb60ac0c6c0c63b112eaba","score":"0.73236734","text":"public function testLoginURL()\n {\n $response = $this->call('GET', '/login');\n\n $this->assertEquals(200,$response->status());\n }","title":""},{"docid":"21e33b391b68f83a1de4e65eec4fc6ce","score":"0.7308743","text":"public function testLoginSuccess() {\n $request = $this->getRequest();\n $request->setMethod('POST');\n\n $service = $this->getRandomService();\n $service->setPassword(md5('testen'));\n $service->save();\n\n //clear password if available\n if ($service->getPartnerData() !== null) {\n $service->getPartnerData()->setTemporaryPassword('');\n $service->getPartnerData()->save();\n }\n\n $request->setPost(array(\n 'nr' => $service->getCustomerNr(),\n 'pass' => 'testen'\n ));\n\n $this->dispatch('/get_partner_customer');\n $this->assertResponseCode(201);\n }","title":""},{"docid":"71811cd98aef2c8456bd1c749d293ef9","score":"0.7291715","text":"public function secondLoginTest()\n {\n $response = $this->postJson('/api/organization/login', ['email' => 'test333@test.test', 'password' => '88888888']);\n $response->assertStatus(403);\n }","title":""},{"docid":"1ac715160cf64d88bd142f8509c8d78e","score":"0.7273247","text":"public function testLoginWithoutErrors()\n {\n $this->withoutExceptionHandling();\n User::factory()->create([\n \"email\" => \"business@example.com\",\n \"password\" => \"password\",\n ]);\n $data = [\n 'email' => 'business@example.com',\n 'password' => 'password',\n ];\n //Send post request\n $response = $this->json('POST','api/login',$data);\n //Assert it was successful\n $response->assertStatus(200)\n ->assertJsonStructure([\n 'success',\n 'data' => [\n 'name',\n 'token'\n ],\n 'message',\n ]);\n }","title":""},{"docid":"f80ca77be3988cf00dfda5e96b445353","score":"0.72316176","text":"public function testLoginPage()\n {\n $response = $this->get('/login');\n\n $response->assertStatus(200);\n }","title":""},{"docid":"32b483430bcc2e2cbe9ec8ba2f84b4e1","score":"0.72260463","text":"public function testLoginActionInvalidLogin()\n {\n $postData = array(\n 'email' => 'foo@example.com',\n 'password' => 'password',\n );\n $this->dispatch('/user/login', 'POST', $postData);\n $this->assertResponseStatusCode(200);\n }","title":""},{"docid":"f5b048101a81f1dc94230a80b60924f0","score":"0.7210539","text":"public function test_login_user()\n {\n //Given is user\n $this->json('POST', '/login', [\n 'password' => '12345',\n 'email' => 'hahn.kellie@aufderhar.biz'\n ]);\n //When they hit the endpoint /register create a new user, while passing necessary data \n $content = json_decode($this->response->getContent());\n \n //Then there should be a new record \n $this->assertObjectHasAttribute('token', $content, 'Token does not exists');\n\n \n }","title":""},{"docid":"6a9ca5e322c34b9e947e5663d116053d","score":"0.72086847","text":"public function testCanLogin()\n {\n $user = User::first();\n $response = $this->withHeaders([\n 'Accept' => 'application/json'\n ])->json('POST', '/api/auth/login', ['email' => $user->email, 'password' => 'secret']);\n $response->assertStatus(200)->assertJson(['token_type' => 'bearer']);\n }","title":""},{"docid":"9b6587944f93cf6e9312122e5e707fb5","score":"0.7203524","text":"public function testValidationForLogin()\n {\n $this->json('POST', 'api/v1/login', ['Accept' => 'application/json'])\n ->assertStatus(422)\n ->assertJson([\n \"message\" => \"Validation failed.\",\n \"data\" => [\n \"email\" => [\"The email field is required.\"],\n \"password\" => [\"The password field is required.\"],\n \"device_name\" => [\"The device name field is required.\"],\n ]\n ]);\n }","title":""},{"docid":"2e20699d33b8f4ac8ac57ffb42d76e8f","score":"0.7195855","text":"function testWithLogin() {\n $this->_login_user = $this->_users_for_registration['super'];\n $this->setLoginCookie();\n $response = helper::jsonDecode($this->_rest->post($this->_uri . Reports::NOT_GLUTEN_FREE));\n //helper::p($response);\n $this->assertEquals(ApiHelper::MESSAGE_200, $response['status']);\n }","title":""},{"docid":"26405edac33ca3afe1b0980a95a3a14c","score":"0.7188455","text":"public function testLoginFails()\n {\n $response = $this->json('POST', '/api/login', [\n 'email' => 'joe@blogs.com',\n 'password' => '123445',\n ]);\n\n $response\n ->assertStatus(401)\n ->assertExactJson([\n 'error' => 'Unauthorized'\n ]);\n }","title":""},{"docid":"69d6fa56e16e9b3afb98806695fcea7c","score":"0.7170278","text":"public function testLoginAValidUser()\n {\n $user = User::find(1);\n\n $response = $this->post('/login', [\n 'email' => $user->email,\n 'password' => $user->password,\n ]);\n\n $response->assertStatus(302);\n\n $response = $this->actingAs($user, 'web');\n }","title":""},{"docid":"8b2969620996aa75be121d76fd430185","score":"0.71438617","text":"public function test_login()\n\t{\n\t\t$this->assertFalse($this->auth->login('dave@davewidmer.net','wrongpassword'));\n\t\t$this->assertTrue($this->login());\n\t\t$this->assertTrue($this->auth->logged_in());\n\t}","title":""},{"docid":"ceb07667970f10f7b23a4966f8c3f4a3","score":"0.7131785","text":"public function test_login_response_api_token()\n {\n $user = factory(User::class)->create();\n \n $this->assertDatabaseHas('users', $user->toArray());\n \n $user->password = 'secret';\n \n //Submit post request to create an user endpoint\n $response = $this->post('api/login', $user->toArray());\n \n //Verify in the database\n \n $this->assertNotEmpty(json_decode($response->content(),true)['result']['api_token']);\n \n }","title":""},{"docid":"58529ec78981e064e4a3236a9bb15cec","score":"0.7110819","text":"public function testLogin()\n {\n $response = $this->call('GET', '/auth/login');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $response = $this->call('POST', '/auth/login', [\n 'email' => $this->email,\n 'password' => $this->password,\n '_token' => csrf_token(),\n ]);\n $this->assertRedirectedTo('/');\n $this->assertTrue(Auth::check());\n }","title":""},{"docid":"6a20d45bb7d06ad558d72e2aee1b0d7a","score":"0.7069841","text":"public function testSuccessfulAuthTestCase()\n\t{\n\t\t$this->open('site/login');\n\t\t$this->assertTextPresent('Login');\n\t\t$this->type('name=LoginForm[username]', 'demo');\n\t\t$this->type('name=LoginForm[password]', 'demo');\n\t\t$this->clickAndWait(\"//button[.='Login']\");\n\t\t$this->assertTextNotPresent('Incorrect username or password');\n\t}","title":""},{"docid":"f83f20b1f1a7f4b22e0ad69e06c9f1e7","score":"0.70455855","text":"public function testLogin() \n {\n $result = $this->_model->authenticate($this->_email, $this->_password);\n \n $noError = $result['error'] === false;\n \n $this->assertTrue($noError);\n \n $this->assertEquals($this->_email, $result['data']['email']);\n }","title":""},{"docid":"00b86636db39886272f312cf7ef4531c","score":"0.7045538","text":"public function testBasicTest()\n {\n $response = $this->json('POST', 'auth/login', \n [\n 'email' => 'dana54@example.org', \n 'password' => 'secret'\n ]);\n \n dd($response->headers);\n $response\n ->assertStatus(200)\n ->assertJson([\n 'created' => true,\n ]);\n }","title":""},{"docid":"750bf0c0f0387b925abcd1c6ea176453","score":"0.704362","text":"public function testCanLogin()\n {\n $user = factory(User::class)->create([\n 'remember_token' => ''\n ])->makeVisible(['remember_token','password'])->toArray();\n\n $this->json('POST', '/api/user/login', [\n 'email' => $user['email'],\n 'password' => 'secret',\n ])->assertJson([\n 'error' => false\n ])->assertStatus(Response::HTTP_OK);\n }","title":""},{"docid":"c7835e4d1fa81e09d35edc09c7f129c7","score":"0.70311785","text":"public function testLoginSuccess()\n {\n\n // Create a user, set username.\n $user = $this->__user($username = 'david', $password = 'poesypure');\n\n // Prepare the request.\n $this->request->setMethod('POST')\n ->setPost(array(\n 'username' => 'david',\n 'password' => 'poesypure'\n )\n );\n\n // Hit the route and check for redirect.\n $this->dispatch(NLWS_SLUG . 'nl-admin/login');\n $this->assertRedirectTo(nlws_url('exhibits'));\n\n // Login.\n $this->assertTrue(Zend_Auth::getInstance()->hasIdentity());\n\n }","title":""},{"docid":"aaad9c118f8bc6de6381548f403e401f","score":"0.7025381","text":"public function test_user_can_login()\n {\n $user = $this->user();\n\n $response = $this->post('api/login', [\n 'email' => $user->email,\n 'password' => 'password'\n ]);\n\n $response->assertOk();\n }","title":""},{"docid":"28dbebb9492d825288fd7bd35e7c4513","score":"0.7009943","text":"public function testLoginMissingParameter()\n {\n // Do request\n $this->_request('POST', '/api/1.5.0/login', ['phone' => '1234'])\n ->_result(['error' => 'login-error']);\n }","title":""},{"docid":"1c46efee7b4caa2eca822b3dd330bfa1","score":"0.70053476","text":"public function LoginWithWrongData()\n {\n // as a user, I wrongly type my email and password\n $data = ['email' => 'email', 'password' => 'password'];\n // and I submit it to the login api\n $response = $this->call('POST', 'login', $data);\n // I shouldnt be able to login with wrong data\n $this->assertEquals(HttpResponse::HTTP_UNAUTHORIZED, $response->status());\n }","title":""},{"docid":"64c86878113805375e5dffbd54fe1612","score":"0.7001869","text":"public function testSignedUpUserCanPostValidLogin(): void\n {\n \\Artisan::call('passport:install');\n\n $user = factory(User::class)->create();\n\n $request = [\n 'email' => $user['email'],\n 'password' => 'Password123!', // default factory password\n ];\n\n $this->post('/api/v1/auth/login', $request, self::HEADER)\n ->assertStatus(200)\n ->assertJsonStructure([\n 'access_token',\n 'token_type',\n 'expires_at',\n ]);\n }","title":""},{"docid":"4cf53e478bd881ca99047ac3289479b8","score":"0.70006233","text":"public function test_login_user_correctly()\n {\n $user = factory(User::class)->create();\n \n $this->assertDatabaseHas('users', $user->toArray());\n \n $user->password = 'secret';\n \n //Submit post request to create an user endpoint\n $response = $this->post('api/login', $user->toArray());\n \n //Verify in the database\n \n // Verify status 200\n $response->assertStatus(200);\n \n // Verify values in response\n $response->assertJson(['success' => true]);\n $response->assertJson(['message' => 'User logged successfully.']);\n \n }","title":""},{"docid":"22375656e14840752a62828607093f7f","score":"0.6991598","text":"public function testAuthenticationSuccess()\n {\n $this->visit('/')\n ->click('Login')\n ->seePageIs('/login')\n ->type('test+normal@example.ex', '#email')\n ->type('password123', '#password')\n ->click('#login-button')\n ->see('User: Normal User');\n }","title":""},{"docid":"d2a99c07b8c4fb8576945bba727851cc","score":"0.69909835","text":"public function testLogin()\n {\n\n $user = factory(SmartBots\\User::class)->make()->save();\n\n $this->visit('/account/login')\n ->see('Login')\n ->type('demodemo','username')\n ->type('demodemo','password')\n ->check('remember')\n ->press('Login')\n ->seeJson([\n 'success' => true,\n ]);\n }","title":""},{"docid":"334f9c4d984a6cf4a8cd58bfb69f7928","score":"0.69724786","text":"public function testLoginFail()\n {\n $data = factory(User::class)->create();\n\n $response = $this->postJson('/api/login', [\n 'email' => $data->email,\n 'password' => 'wrongpassword',\n ]);\n\n $response->assertStatus(401);\n }","title":""},{"docid":"0aa441baf35ee2827cfbc5fa675c6964","score":"0.6968539","text":"public function testLoginSuccessful() {\n\n $username = 'test';\n $password = 'test';\n\n $this->url(\"/login.php\");\n $usernameInput = $this->byName(\"login\");\n $usernameInput->clear();\n $this->keys($username);\n\n $usernameInput = $this->byName(\"password\");\n $usernameInput->clear();\n $this->keys($password);\n\n $form = current($this->elements($this->using('css selector')->value('form.login')));\n $form->submit();\n\n /* Check for text on index page */\n $h1 = current($this->elements($this->using('css selector')->value('h1')));\n $this->assertEquals('Welcome to protected area!', $h1->text());\n\n /* Check that cookie user has been set */\n $authCookie = $this->cookie()->get('user');\n $this->assertEquals('loggedin', $authCookie);\n\n }","title":""},{"docid":"f57cf22fb30380d070e6c2ea3d9acc75","score":"0.6957994","text":"public function testFailedLogin()\n {\n $response = $this->withHeaders([\n 'Content-Type' => 'application/json',\n ])->json('POST', '/api-login', ['email' => 'admin@movies.dev']);\n\n $response->assertStatus(400);\n }","title":""},{"docid":"2bd078d3d5045a5843dc44bf61d283dc","score":"0.6952731","text":"public function test_for_user_can_logged_in()\n {\n $email = 'test@email.com';\n $password = 'secret';\n User::factory()->create(\n [\n 'email' => $email,\n 'password' => $password\n ]\n );\n\n $response = $this->post('/api/login', [\n 'email' => $email,\n 'password' => $password\n ]);\n $response->assertStatus(200);\n }","title":""},{"docid":"e68f8ef0b6c3c6ca6b59e31d9a41d461","score":"0.6951488","text":"public function testBasicTest()\n {\n\n $response = $this->json('POST', '/api/login', [\n 'email' => 'demo@demo.com',\n 'password' => 'secret'\n ]);\n\n $response->assertStatus(200)->assertJsonStructure([\n 'success' => ['token']\n ]);\n }","title":""},{"docid":"9930db11682b526bb32681f9a316893f","score":"0.69208235","text":"public function testSignInAsUserWithValidCredentials()\n {\n $crawler = $this->client->request('GET', '/login');\n\n $form = $crawler->selectButton('submit')->form();\n $form->setValues(\n [\n '_username' => 'username',\n '_password' => '12345'\n ]\n );\n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n // TODO assert testing\n $this->assertNull(null);\n }","title":""},{"docid":"b795b0297d22fed13722404f2a8aac14","score":"0.6920733","text":"public function testLoginFalse()\n {\n $response = $this->post('/login', [\n 'email' => 'user@ad.com',\n 'password' => 'incorrectpass',\n ]);\n\n $response->assertSessionHasErrors();\n }","title":""},{"docid":"1b8813daf0d39c6ebd9e956ab645e8f9","score":"0.6920275","text":"public function test_a_user_can_login_on_the_website()\n {\n factory(\\App\\User::class)->create([\n 'email' => 'mark@timbol.com',\n 'password' => 'marktimbol'\n ]);\n\n \t$response = $this->json('POST', '/login', [\n \t\t'email' => 'mark@timbol.com',\n \t\t'password' => 'marktimbol',\n \t]);\n\n \t$this->isAuthenticated();\n }","title":""},{"docid":"f6e73be5e931e8b41e8a1ef815dd7023","score":"0.691059","text":"public function testLoginPostTest()\n {\n $user = $this->_getAdminUser();\n $response = $this->post(route('admin.login.post'), ['email' => 'admin@admin.com', 'password' => 'admin123']);\n\n $response->assertRedirect(route('admin.dashboard'));\n }","title":""},{"docid":"cd0b3e2feb8afb696500da3d902c6ff0","score":"0.690393","text":"public function testLogin() {\n \n $client = static::createClient(\n array(), array(\n 'HTTP_HOST' => static::$kernel->getContainer()->getParameter('test_http_host')\n ));\n \n $username = static::$kernel->getContainer()->getParameter('test_admin_username');\n $password = static::$kernel->getContainer()->getParameter('test_admin_password');\n \n $crawler = $client->request('GET', '/admin/login');\n\n $form = $crawler->selectButton('Sign In')->form(array(\n '_username' => $username,\n '_password' => $password,\n ));\n\n $client->submit($form);\n\n $this->assertTrue($client->getResponse()->isRedirect('/admin/dashboard')); // check if redirecting properly\n\n $client->followRedirect();\n }","title":""},{"docid":"86a26366cb3e641feba4dd4e36b00895","score":"0.6860138","text":"public function testInvalidCredentialsForLogin()\n {\n $userData = [\n \"email\" => \"user1@test.com\",\n \"password\" => \"wrongpassword\",\n \"device_name\" => \"testing\"\n ];\n\n $this->json('POST', 'api/v1/login', $userData, ['Accept' => 'application/json'])\n ->assertStatus(422)\n ->assertJson([\n \"message\" => \"Invalid Credentials\",\n \"code\" => 422\n ]);\n }","title":""},{"docid":"3f6773367628fce223bd26054c371fc1","score":"0.68544894","text":"public function test_login_goodLogin_returnsOkAndFlashAndUser() {\n\t\t$this->loginService->shouldReceive('login')->once()->andReturn(true);\n\t\t\n\t\t//setup a mock user to be returned from Auth should be returned\n\t\t//$this->user->id = 2;\n\t\t$this->mockedRepository->shouldReceive('toArray')->once()->andReturn(array('id'=>2));\n\t\tAuth::shouldReceive('user')->once()->andReturn($this->mockedRepository);\n\t\t\n\n\t\t$expectedResponse = $this->buildResponseArray($status=200,$hasFlash=true,$hasUser=true,2);\n\t\t\n\t\t$actualResponse = $this->buildActualResponseArray($this->apiCall('POST','/login', false),true);\n\t\t\n\t\t$this->assertEquals($expectedResponse,$actualResponse);\n\t}","title":""},{"docid":"1db47b03db5181ef370030e9232fadff","score":"0.6854297","text":"public function testLoginSuccess()\n {\n $user = factory(App\\User::class)->create(['password' => bcrypt('senha1')]);\n\n $this->visit('/')->see('Product management')\n ->click('Login')\n ->type($user->email, 'email')\n ->type('senha1', 'password')\n ->press('Login')\n ->see('Dashboard')\n ->see('You are logged in!');\n }","title":""},{"docid":"11e5d864f7c90eb9875a2ada4961283e","score":"0.6840835","text":"public function testLoginGetTest()\n {\n $response = $this->get(route('admin.login'));\n $response->assertStatus(200);\n $response->assertSee('AvoRed Admin Login');\n }","title":""},{"docid":"a2984f4f34ba176ced762eee96caa051","score":"0.6835911","text":"public function testCustomerCanLogin()\n {\n $client = static::createClient();\n $client->request(\n 'POST',\n '/customersapi/login_check',\n array(),\n array(),\n array('CONTENT_TYPE' => 'application/json'),\n json_encode(array(\n 'username' => 'customer0@lolamarket.com',\n 'password' => 'lolamarket',\n ))\n );\n\n $response = $client->getResponse();\n $data = json_decode($response->getContent(), true);\n $this->assertTrue($response->headers->contains('Content-Type', 'application/json'));\n $this->assertJson($response->getContent());\n $this->assertArrayHasKey(\"token\",$data);\n }","title":""},{"docid":"4bc1369eb39f5622e3c3d953be1c37b8","score":"0.68353546","text":"public function testApiAuthenticationOkWithCorrectCredentials()\n {\n $response = $this->post('/api/oauth/token', [\n 'grant_type' => 'password',\n 'client_id' => $this->token->id,\n 'client_secret' => $this->token->secret,\n 'username' => $this->randomEmail,\n 'password' => $this->password,\n 'scope' => '',\n ]);\n $response->assertStatus(200)\n ->assertJsonStructure([\n 'expires_in',\n 'access_token',\n 'refresh_token'\n ]);\n }","title":""},{"docid":"1d7e739afb6c28baa2d0d01fa8da9199","score":"0.6827868","text":"public function testLoginPageWithFalsePassword()\n {\n $client = $this->createClient();\n $client->request('POST', '/login', array(), array(), array(),\n '{\"username\":\"admin\",\"password\":\"toto\"}');\n\n $this->assertEquals(400, $client->getResponse()->getStatusCode());\n $this->assertEquals('Password false', $client->getResponse()->getContent());\n }","title":""},{"docid":"f5a2ae8a35836bbd1c30ab4615ad0ab2","score":"0.68253833","text":"public function test_login_is_successful()\n {\n $this->visit(route('login'))\n ->type($this->test_user_email, 'email')\n ->type($this->test_user_password, 'password')\n ->press('Login')\n ->seePageIs(route('showCreateOrganiser', ['first_run' => '1']));\n }","title":""},{"docid":"13f0251f44be9683e1b9a38bda71f78f","score":"0.6825347","text":"public function login(){\n\t\ttry{\n \t$this->service->login(Input::all());\n \treturn $this->api->respondSuccessWithDetails(\n\t \t'Successfully logged in.', $this->transformer->transform($this->service->getUserDetails())\n\t );\n }catch(ValidationException $e){\n \treturn $this->api->respondInvalidParameters($e->getMessage());\n }\n\t}","title":""},{"docid":"ef588cae4f2d82c9603980c46770f1b4","score":"0.6818076","text":"public function login()\n {\n// $mocObj = \\Codeception\\Util\\Stub::make(UserRepository::className(),[\n// 'findOne'=>new UserRepository\n// ]);\n//\n// $user->setRepository($mocObj);\n// $token = $user->login(\"username\",\"password\");\n// verify($token)->notNull();\n// return $token;\n }","title":""},{"docid":"82f347c0d98fac0b7e24ab1f30c91100","score":"0.6809552","text":"public function testViewLoginPage()\n {\n $response = $this->get(route('user_login'));\n\n $response->assertStatus(200);\n }","title":""},{"docid":"a28be8eb854e0fdd1bc07c81e0dee9a6","score":"0.6787016","text":"public function testUserSigninSuccess()\n {\n $response = $this->post('/api/v1/auth/signin', $this->staticUserDetails);\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment([\n 'message' => 'Login successful'\n ]);\n }","title":""},{"docid":"73aeb06f550eca74c136b6587f426477","score":"0.6786416","text":"public function testLoginInvalidParameters() {\n $request = $this->getRequest();\n $request->setMethod('POST');\n $this->dispatch('/get_partner_customer');\n $this->assertResponseCode(406);\n }","title":""},{"docid":"5266675391b88c06ac1c7b637f1c0fb1","score":"0.67832047","text":"public function testLoginFormWorksCorrectly()\n {\n //create a user\n $this->createUser();\n $this->visit('/login')\n ->type('john@doe.com','email')\n ->type('password', 'password')\n ->press('action')\n ->seePageIs('/');\n }","title":""},{"docid":"6194a23364a0daf7667ffec508b46801","score":"0.67818004","text":"public function testApiLoginWithNewPassword()\n {\n $client = $this->makeClient();\n $response = $this->makeJsonRequest(\n $client,\n Request::METHOD_POST,\n '/api/login_check',\n ['email' => self::TEST_EMAIL, 'password' => 'moomoo']\n );\n\n $this->assertCredentialsResponse($response, $client, self::TEST_EMAIL);\n }","title":""},{"docid":"b8d520234fd63fd6f06db80be2571309","score":"0.6778104","text":"public function testUserCanLoginWithCorrectCredentials() {\n $user = factory(User::class)->create([\n 'password' => bcrypt($password = 'i-love-laravel'),\n ]);\n\n $response = $this->post('/login', [\n 'email' => $user->email,\n 'password' => $password,\n ]);\n\n $response->assertRedirect('/games');\n $this->assertAuthenticatedAs($user);\n }","title":""},{"docid":"1515592fb10e69335068447f2d31c3c9","score":"0.6776384","text":"function test_login() {\n $user = new PHPFrame_User();\n $user->set('id', 0);\n $user->set('groupid', 0);\n $session = PHPFrame::Session();\n $session->setUser($user);\n \n // Fake posted form data\n PHPFrame::Request()->setAction('login');\n PHPFrame::Request()->set('username', 'admin');\n PHPFrame::Request()->set('password', 'Passw0rd');\n PHPFrame::Request()->set(PHPFrame_Utils_Crypt::getToken(), '1');\n \n $frontcontroller = PHPFrame::getFrontController();\n $frontcontroller->run();\n \n $controller = PHPFrame_MVC_ActionController::getInstance('com_login');\n $this->assertTrue($controller->getSuccess());\n }","title":""},{"docid":"8a6ea11fb7baa4ce94d9f7a02fa0aef9","score":"0.67599285","text":"public function testSignupValid()\n {\n $this->request\n ->setMethod('POST')\n ->setPost(\n array(\n 'username' => 'NEWUSERPERSON',\n 'password' => 'admin',\n 'passwordConf' => 'admin',\n 'firstName' => 'John',\n 'lastName' => 'Smith',\n 'emailAddress' => 'srgraham@ncsu.edu',\n 'timezone' => 'America/New_York',\n 'realm' => 'local',\n )\n );\n $this->dispatch('/ot/login/signup/realm/local');\n $this->assertRedirectTo('/login/index/realm/local');\n }","title":""},{"docid":"dad9da66af5e0676cbf5be7ca3613202","score":"0.6757598","text":"public function test_01_login_called_returnCorrectLoginInfo()\r\n\t{\r\n\t\t$expected = \"LIB META AVAIL SRCH\";\r\n\t\t$result = $this->service->login(self::clientKey, self::clientSecret);\r\n\t\t$this->assertEquals(\"stdClass\", get_class($result));\r\n\t\t$this->assertEquals($expected, $result->scope);\r\n\t\tself::$accessToken = $result->access_token;\r\n\t}","title":""},{"docid":"85d2e30d129c8cc2b693cd59ee687620","score":"0.67495406","text":"public function testLoggedinRequest() {\n $user = factory(User::class)->create();\n $response = $this->actingAs($user)->get('/');\n\n $response->assertSuccessful();\n $response->assertViewIs('home');\n }","title":""},{"docid":"12f42ce916e12aad471653db51c2b599","score":"0.67479026","text":"public function testLoginFailed()\n {\n $faker = Factory::create();\n\n $data = [\n 'username' => $faker->text(8),\n 'password' => $faker->text(8)\n ];\n\n $response = $this->post(url('api/login'), $data);\n $res_object = json_decode($response->content());\n\n $this->assertObjectHasAttribute('errorType',$res_object, \"errorType: false\");\n $this->assertEquals('INCORRECT_DATA_ERROR',$res_object->errorType,'errorType = LOGIN_ERROR: false');\n\n $this->assertObjectHasAttribute('errors',$res_object, \"errors: false\");\n\n $response->assertStatus(401);\n\n }","title":""},{"docid":"cf19d810f528c24f056508396e5d0cd6","score":"0.67453146","text":"public function testApiAuthenticationFailsWithInCorrectCredentials()\n {\n $response = $this->post('/api/oauth/token', [\n 'grant_type' => 'password',\n 'client_id' => 2,\n 'client_secret' => $this->token->secret,\n 'username' => $this->randomEmail,\n 'password' => 'Invalid password',\n 'scope' => '',\n ]);\n $response->assertStatus(401);\n }","title":""},{"docid":"db569378f94e0aa9ffc16cd912e487c3","score":"0.67355186","text":"public function testCreateLoginRequired()\n {\n\n $this->visit('/stores/create')\n ->seePageIs('/login');\n\n $this->visit('/products/create')\n ->seePageIs('/login');\n\n $this->visit('/reviews/create')\n ->seePageIs('/login');\n }","title":""},{"docid":"8194c2ab026f04c68ec390c126cd228d","score":"0.6733755","text":"public function testSubmitCorrectAuthentication()\n\t{\n\t\t$crawler = $this->client->request('GET', '/login');\n\t\t$loginForm = $crawler->selectButton(\"Se connecter\")->form();\n\n\t\t$this->assertNotEquals(null, $loginForm);\n\n\t\t$loginForm['_username'] = 'admin';\n\t\t$loginForm['_password'] = 'admin';\n\n\t\t$crawler = $this->client->submit($loginForm);\n\t\t$crawler = $this->client->followRedirect();\n\n\t\t$this->assertStringContainsString('Créer une nouvelle tâche', $crawler->text());\n\t}","title":""},{"docid":"eba6194036e4983bebdc88c5f3729927","score":"0.672992","text":"public function test_User_can_login()\n {\n $this->enableCsrfToken();\n $this->enableRetainFlashMessages();\n\n // Envío datos de un cliente que existe en el fixture 'UsersFixture'\n $loggingUser['email'] = 'user2@gmail.com';\n $loggingUser['password'] = 'pass';\n\n $this->post(['controller' => 'Users', 'action' => 'login'], $loggingUser);\n\n $this->assertFlashElement('Flash/success');\n }","title":""},{"docid":"52bad86c9e7f1955b7798606e1a8b185","score":"0.67241776","text":"public function testLoginPageWithCorrectPassword()\n {\n $client = $this->createClient();\n $client->request('POST', '/login', array(), array(), array(),\n '{\"username\":\"admin\",\"password\":\"admin\"}');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $encoder = new PasswordEncoder();\n $this->assertEquals($encoder->encodePassword('Admin connected'), $client->getResponse()->getContent());\n }","title":""},{"docid":"5ce8fc8682761770296b71c4b4062e92","score":"0.67200273","text":"public function test_validations_auth()\n {\n $response = $this->postJson('/auth', []);\n\n $response->assertStatus(422);\n }","title":""},{"docid":"5246294569344f20d565ec24cbaca5dd","score":"0.6702028","text":"public function test_login_page(){ \n $this->visit('login')\n ->type('phi2902@yahoo.com', 'email')\n ->type('123456', 'password')\n ->press('Login')\n ->seePageIs('/');\n }","title":""},{"docid":"be1092339a4d87bf9c6c3347eb57f41b","score":"0.66911083","text":"public function testLoginsGetUnauthorized(): void { }","title":""},{"docid":"ee3fee0baeea3c6e716e73a21e331d94","score":"0.66911036","text":"public static function testSignIn() {\n $value = array(\"status\" => 404, \"title\" => 1);\n if ((empty($_REQUEST['userId'])) || (empty($_REQUEST['password']))) {\n // One of the fields is empty\n } else {\n $result = User::getUser($_REQUEST['userId']);\n // check if user was found in database\n if ($result) {\n $hash = $result[0]['password'];\n $password = $_REQUEST['password'];\n //check if password match\n if (!password_verify($password, $hash)) {\n // Wrong password\n } else {\n $value = array(\"status\" => 200, \"title\" => $result[0]['title']);\n }\n } else {\n //\"User was not found\";\n }\n }\n return $value;\n }","title":""},{"docid":"aecc2ace22bbe49d5da82bd160b2f064","score":"0.66822773","text":"public function testLoginDataIsInvalid(){\n $data = [\n 'username' => '',\n 'password' => ''\n ];\n\n $response = $this->post(url('api/login'), $data);\n\n $res_object = json_decode($response->content());\n\n $this->assertObjectHasAttribute('errorType',$res_object, \"errorType: false\");\n $this->assertEquals('VALIDATION_ERROR',$res_object->errorType,'errorType = VALIDATION_ERROR: false');\n $this->assertObjectHasAttribute('errors',$res_object,\"errors: false\");\n $this->assertObjectHasAttribute('username',$res_object->errors,\"errors[username]: false\");\n $this->assertObjectHasAttribute('password',$res_object->errors,\"errors[password]: false\");\n\n $response->assertStatus(422);\n }","title":""}],"string":"[\n {\n \"docid\": \"68463a19eb2f1aec0bdaf6efcfcdb1b3\",\n \"score\": \"0.8026949\",\n \"text\": \"protected function login() {\\n list($r, $s) = self::jsonRequest('POST', '/api/login',\\n array(\\n 'username' => $this::USER_EMAIL,\\n 'password' => $this::USER_PASSWORD\\n )\\n );\\n $this->assertEquals(201, $s);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12e5a4ecff411f99d32fb2d2992d0c8d\",\n \"score\": \"0.7994173\",\n \"text\": \"public function test_user_can_login_with_valid_data()\\n {\\n $response = $this->post(\\n 'api/login',\\n [\\n 'email' => 'super_admin@gmail.com',\\n 'password' => 'superadmin'\\n ]\\n );\\n $response->assertOk();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a43769eb74a503acd1d12e2f5c1d34fb\",\n \"score\": \"0.7871274\",\n \"text\": \"public function testLoginValidData()\\n {\\n $response = $this->post('http://127.0.0.1:8000/api/login', ['email' => 'ebasem653@gmail.com', 'password' => '123456']);\\n $this->assertEquals(200, $response->status());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c5a30cca1d69e5b3ee545afd6a00cab\",\n \"score\": \"0.78033483\",\n \"text\": \"public function testUserLoginPostUri()\\n {\\n \\t$response = $this->call('POST', '/user/login', ['email' => 'test@gmail.com', 'password'=> bcrypt('password')]);\\n \\t$this->assertEquals(302, $response->status());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91f27bd6c66d72501d0102119500ce6f\",\n \"score\": \"0.7792334\",\n \"text\": \"public function test_successful_login()\\n {\\n $response = $this->postJson('/api/login', [\\n 'email' => Config::get('api.apiEmail'),\\n 'password' => Config::get('api.apiPassword')\\n ]);\\n $response\\n ->assertStatus(200)\\n ->assertJsonStructure([\\n \\\"expires_in\\\",\\n \\\"access_token\\\",\\n \\\"token_type\\\"\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3a66472fa6ab7e78d0f940aa3ec9499\",\n \"score\": \"0.7746466\",\n \"text\": \"public function testLoginApiUserSemCredenciais()\\n {\\n $credentials = [\\n 'email' => '',\\n 'password' => 123456\\n ];\\n\\n $response = $this->post('/api/login', $credentials);\\n $response->assertStatus(401);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57bdbae5f425ef7c83466dec61cfa287\",\n \"score\": \"0.77419245\",\n \"text\": \"public function testLogin()\\n {\\n $response = $this->action('POST', 'V1\\\\UserController@postLogin');\\n $this->assertTrue($this->client->getResponse()->isOk());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4ac7b6dad272b1b108f1324ddbd94b1\",\n \"score\": \"0.771954\",\n \"text\": \"public function testUserLoginSuccessfully()\\n {\\n\\n $response = $this->post('/login', [\\n 'email' => 'admin@gmail.com',\\n 'password' => 'adminadmin',\\n ]);\\n $response->assertRedirect('/home');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5b7738fa997c5a875f3699d8df79395\",\n \"score\": \"0.7715106\",\n \"text\": \"public function testLogin()\\n {\\n $data = [\\n 'username' => 'superadmin',\\n 'password' => 'secret'\\n ];\\n\\n $response = $this->post(url('api/login'), $data)\\n ->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cd80432f611b75bf2791990275e2892\",\n \"score\": \"0.7689319\",\n \"text\": \"public function testLogin()\\n {\\n $email = $this->email;\\n $password = $this->password;\\n\\n $response = $this->json('POST', '/api/login', [\\n 'email' => $email,\\n 'password' => $password\\n ]);\\n\\n $response\\n ->assertStatus(200)\\n ->assertJsonStructure([\\n 'access_token', 'token_type', 'expires_in'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c66d1fad240902a574f1067b3b937094\",\n \"score\": \"0.7678931\",\n \"text\": \"public function testSuccessfullLogin()\\n {\\n $response = $this->json('POST', '/login', [\\n 'email' => $this->users['exists']['email'],\\n 'password' => $this->users['exists']['password'],\\n ], [\\n 'apikey' => $this->apiAuth['uuid'],\\n ]);\\n\\n $response->assertResponseOK();\\n $response->seeJsonStructure([\\n 'data' => [\\n 'token',\\n ],\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00af2e232fa27f0d79bd3e773691c12e\",\n \"score\": \"0.76739156\",\n \"text\": \"public function testLoginApiUser()\\n {\\n $credentials = [\\n 'email' => 'teste@gmail.com',\\n 'password' => 123456\\n ];\\n\\n $response = $this->post('api/login', $credentials);\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db74c51643740096e6137edf4a47b650\",\n \"score\": \"0.7672186\",\n \"text\": \"public function testSuccess()\\n {\\n\\n $response = $this->post('/login', [\\n 'email' => 'name@studentmail.ul.ie',\\n 'password' => 'pass'\\n ]);\\n\\n $response->assertStatus(302);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ed7f2be434bde1b6cc4465b2b56f65e\",\n \"score\": \"0.7588173\",\n \"text\": \"public function testLogin()\\n {\\n $apiHandler = $this->application->getKernel()->getContainer()->get('vtally.api_handler');\\n \\n //Case where login successfully for 1st verifier\\n $inputData = array('action' => 600, 'username' => 'verifier1', 'password' => 'test');\\n $outPut = $apiHandler->login($inputData);\\n $this->assertEquals($outPut->getData(), array('first_name' => 'VERIFIER 1', 'pol_id' => 'Pol. Station 1', 'verifier_token' => 'ABCD1'));\\n \\n //Case where login successfully for 2nd verifier\\n $inputData = array('action' => 600, 'username' => 'verifier2', 'password' => 'test');\\n $outPut = $apiHandler->login($inputData);\\n $this->assertEquals($outPut->getData(), array('first_name' => 'VERIFIER 2', 'pol_id' => 'Pol. Station 1', 'verifier_token' => 'ABCD2'));\\n \\n //Case login faild: wrong username\\n $inputData = array('username' => 'verifier11', 'password' => 'test');\\n $outPut = $apiHandler->login($inputData);\\n $this->assertEquals($outPut->getData(), array('Bad credentials.'));\\n \\n //Case login faild: wrong password\\n $inputData = array('username' => 'verifier1', 'password' => 'testt');\\n $outPut = $apiHandler->login($inputData);\\n $this->assertEquals($outPut->getData(), array('Bad credentials.'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2f7d13d5ce4f27f39f07d3e116cbd50\",\n \"score\": \"0.75876343\",\n \"text\": \"public function test_login_user()\\n {\\n\\n \\n $this->actingAs($this->defaultUser());\\n\\n $response = $this->json('POST', '/api/v1/auth/login', ['email' => 'demo@demo.com', 'password' => bcrypt('demo')]);\\n\\n $response->assertStatus(200);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9130b9b83005072b651efa0a137187bf\",\n \"score\": \"0.7543246\",\n \"text\": \"public function testLogin()\\n {\\n $clientData = new ClientData();\\n $request = $clientData->getData();\\n\\n $response = $this->post('/oauth/token', $request);\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fcb7336262c6aa86be4f63189263e13\",\n \"score\": \"0.75410086\",\n \"text\": \"public function testLogin()\\n {\\n // Disable brute-force attack protection\\n $this->withoutThrottleMiddleware();\\n $route = route('api.login');\\n\\n // Test incomplete credentials\\n $response = $this->post($route);\\n $response->assertStatus(422);\\n $response->assertJsonValidationErrors(['email', 'password']);\\n\\n // Test invalid credentials\\n $response = $this->post($route, [\\n 'email' => 'test@example.com',\\n 'password' => 'random',\\n ]);\\n $response->assertStatus(401);\\n $response->assertJsonStructure(['error']);\\n\\n // Test valid credentials\\n $response = $this->post($route, [\\n 'email' => $this->user->getEmail(),\\n 'password' => 'verysecret',\\n ]);\\n $response->assertOk();\\n $response->assertJsonStructure(static::TOKEN_STRUCTURE);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd50c44be4606628db70e598e3711ee9\",\n \"score\": \"0.75396454\",\n \"text\": \"public function testSuccessLogin()\\n {\\n \\n $user = factory('App\\\\User')->create();\\n\\n $response = $this->call('POST', '/v1/auth/login', \\n [\\n 'email' => $user->email,\\n 'password' => env('TEMP_PASSWORD'),\\n ]\\n );\\n\\n $this->assertEquals(200, $response->status());\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34e4962f4c4e236a6df1cd1c1e158af2\",\n \"score\": \"0.7520641\",\n \"text\": \"public function testLogin()\\n {\\n $password = $this->faker->word;\\n $user = factory(User::class)->create([\\n 'password' => bcrypt($password)\\n ]);\\n\\n $response = $this->json('post', '/api/v1/login', [\\n 'email' => $user->email,\\n 'password' => $password\\n ]);\\n\\n $response\\n ->assertStatus(200)\\n ->assertJson([\\n 'data' => [\\n 'id' => true,\\n 'name' => true,\\n 'email' => true\\n ],\\n 'meta' => [\\n 'headers' => [],\\n 'original' => [\\n 'access_token' => true,\\n 'token_type' => 'bearer',\\n 'expires_in' => 0\\n ],\\n 'exception' => null\\n ]\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b63ed312021caaad3da40e614a4872c\",\n \"score\": \"0.7519838\",\n \"text\": \"public function test_login_form()\\n {\\n $response = $this->get('/login');\\n\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb37a8ea0689a7894e9b371bc39f9fe3\",\n \"score\": \"0.751692\",\n \"text\": \"public function testLogin()\\n {\\n $params = [\\n 'username' => 'admin@success-ss.com.vn',\\n 'password' => '123456'\\n ];\\n\\n $response = $this->json('POST', env('APP_URL') . '/login', $params);\\n\\n $user = Auth::user();\\n\\n $this->assertEquals($params['username'], $user->username);\\n\\n $response->assertRedirect('admin/dashboard');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f83fa5363800d6741c40173f0b9356a6\",\n \"score\": \"0.75088567\",\n \"text\": \"public function LoginSuccesfull()\\n {\\n // as a user, I wrongly type my email and password\\n $data = ['email' => 'admin@app.com', 'password' => 'secret'];\\n // and I submit it to the login api\\n $response = $this->call('POST', 'login', $data);\\n // I should be able to login\\n $this->assertEquals(HttpResponse::HTTP_ACCEPTED, $response->status());\\n // assert there is a TOKEN on the response\\n $content = json_decode($response->getContent());\\n $this->assertObjectHasAttribute('token', $content);\\n $this->assertNotEmpty($content->token);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5eff4136f3ac51720a13b3935066c76b\",\n \"score\": \"0.74966544\",\n \"text\": \"public function testUserLogin()\\n {\\n \\n // Test request to login\\n $response = $this->call('POST', '/api/v1/api-login',array(\\\"email\\\"=>\\\"admin@admin.com\\\" , \\\"password\\\"=>\\\"123\\\"));\\n // Test request is not authorized\\n $this->assertTrue(strpos($response->getContent(),\\\"You has been logged in Successfully!\\\")!==false);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed92d37413cefd9d80b533c0deacb127\",\n \"score\": \"0.7495021\",\n \"text\": \"public function testLoginActionCorrectLogin()\\n {\\n $postData = array(\\n 'email' => $this->testUserEmail,\\n 'password' => $this->testUserPassword,\\n );\\n $this->dispatch('/user/login', 'POST', $postData);\\n $this->assertResponseStatusCode(302);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b897708e760e36219afd33221f02b29b\",\n \"score\": \"0.74917686\",\n \"text\": \"public function firstLoginTest()\\n {\\n $response = $this->postJson('/api/organization/login', ['email' => 'test333@test.test', 'password' => '88888888']);\\n $response->assertStatus(200)->assertJson(['token' => true]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f261f796a6a99d2f105dc611087df4fc\",\n \"score\": \"0.74759024\",\n \"text\": \"public function testTelaLoginUser()\\n {\\n $response = $this->get('/login');\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b0dac3d5b598bd59571ca1a7e3abb9f3\",\n \"score\": \"0.7440982\",\n \"text\": \"public function testLoginSuccess()\\n {\\n factory(\\\\App\\\\Models\\\\User::class)->create();\\n\\n $response = $this->call('post', 'api/v1/user/', $this->_userLoginDetails);\\n $this->assertEquals(200, $response->status());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5e0d212586e2c41be6b12941d59c825\",\n \"score\": \"0.74346155\",\n \"text\": \"public function testLogin()\\n {\\n $user = factory(User::class)->create();\\n\\n $this->postJson('api/auth/login', ['email' => $user->email, 'password' => 'password'])\\n ->assertStatus(200)\\n ->assertJson(['status' => 'success']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f86c57cdb2bc51c22ce6b8afc7ac8e7\",\n \"score\": \"0.74063957\",\n \"text\": \"public function testExample()\\n {\\n $loginData = ['account_number' => 123456, 'password' => 'sample123'];\\n\\n $this->json('POST', 'api/account/login', $loginData, ['Accept' => 'application/json'])\\n ->assertStatus(200)\\n ->assertJsonStructure([\\n 'success',\\n 'message',\\n 'data' => [\\n 'token'\\n ]\\n ]);\\n\\n $this->assertAuthenticated();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24a7a2229aeecb685d5fec637e61eab4\",\n \"score\": \"0.7400255\",\n \"text\": \"public function testLogin()\\n {\\n $data = [\\n 'email' => 'michel.bolzon123@gmail.com',\\n 'password' => '1525605'\\n ];\\n $response = $this->post('login', $data);\\n\\n $subDomain = Tenant::first()->sub_domain;\\n\\n $response\\n ->assertStatus(302)\\n ->assertRedirect(\\\"$subDomain/home\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52b0cfa5922edbe733eea4726439594e\",\n \"score\": \"0.7379737\",\n \"text\": \"public function testLoginSuccess()\\n {\\n\\n $this->visit('/auth/login')\\n ->type('julien@meetserious.com', 'email')\\n ->type('123456', 'password')\\n ->press('Connexion')\\n ->followRedirects()\\n ->seePageIs('/admin');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"452636ae84d50fd0487c19356e425582\",\n \"score\": \"0.7354774\",\n \"text\": \"public function testSuccessfulUserLogin()\\n {\\n $userData = [\\n \\\"email\\\" => \\\"user1@test.com\\\",\\n \\\"password\\\" => \\\"test123\\\",\\n \\\"device_name\\\" => \\\"testing\\\"\\n ];\\n\\n $this->json('POST', 'api/v1/login', $userData, ['Accept' => 'application/json'])\\n ->assertStatus(200)\\n ->assertJsonStructure([\\n \\\"data\\\" => [\\n \\\"token\\\",\\n \\\"user\\\" => [\\n \\\"id\\\",\\n \\\"name\\\",\\n \\\"email\\\"\\n ]\\n ],\\n \\\"code\\\",\\n \\\"message\\\"\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62c225dccff35eb0795ad6e98b38fa02\",\n \"score\": \"0.73436904\",\n \"text\": \"public function test_login_user()\\n {\\n //Create user\\n //attempt login\\n $response = $this->json('POST', route('api.v1.login'), [\\n 'email' => 'superadmin@demo.dev',\\n 'password' => '123456',\\n ]);\\n //Assert it was successful and a token was received\\n $response->assertStatus(200);\\n $result = $response->json();\\n $this->assertArrayHasKey('token', ['token' => $result['data']['access_token']]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbb0d0e594eb60ac0c6c0c63b112eaba\",\n \"score\": \"0.73236734\",\n \"text\": \"public function testLoginURL()\\n {\\n $response = $this->call('GET', '/login');\\n\\n $this->assertEquals(200,$response->status());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21e33b391b68f83a1de4e65eec4fc6ce\",\n \"score\": \"0.7308743\",\n \"text\": \"public function testLoginSuccess() {\\n $request = $this->getRequest();\\n $request->setMethod('POST');\\n\\n $service = $this->getRandomService();\\n $service->setPassword(md5('testen'));\\n $service->save();\\n\\n //clear password if available\\n if ($service->getPartnerData() !== null) {\\n $service->getPartnerData()->setTemporaryPassword('');\\n $service->getPartnerData()->save();\\n }\\n\\n $request->setPost(array(\\n 'nr' => $service->getCustomerNr(),\\n 'pass' => 'testen'\\n ));\\n\\n $this->dispatch('/get_partner_customer');\\n $this->assertResponseCode(201);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71811cd98aef2c8456bd1c749d293ef9\",\n \"score\": \"0.7291715\",\n \"text\": \"public function secondLoginTest()\\n {\\n $response = $this->postJson('/api/organization/login', ['email' => 'test333@test.test', 'password' => '88888888']);\\n $response->assertStatus(403);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ac715160cf64d88bd142f8509c8d78e\",\n \"score\": \"0.7273247\",\n \"text\": \"public function testLoginWithoutErrors()\\n {\\n $this->withoutExceptionHandling();\\n User::factory()->create([\\n \\\"email\\\" => \\\"business@example.com\\\",\\n \\\"password\\\" => \\\"password\\\",\\n ]);\\n $data = [\\n 'email' => 'business@example.com',\\n 'password' => 'password',\\n ];\\n //Send post request\\n $response = $this->json('POST','api/login',$data);\\n //Assert it was successful\\n $response->assertStatus(200)\\n ->assertJsonStructure([\\n 'success',\\n 'data' => [\\n 'name',\\n 'token'\\n ],\\n 'message',\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f80ca77be3988cf00dfda5e96b445353\",\n \"score\": \"0.72316176\",\n \"text\": \"public function testLoginPage()\\n {\\n $response = $this->get('/login');\\n\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32b483430bcc2e2cbe9ec8ba2f84b4e1\",\n \"score\": \"0.72260463\",\n \"text\": \"public function testLoginActionInvalidLogin()\\n {\\n $postData = array(\\n 'email' => 'foo@example.com',\\n 'password' => 'password',\\n );\\n $this->dispatch('/user/login', 'POST', $postData);\\n $this->assertResponseStatusCode(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5b048101a81f1dc94230a80b60924f0\",\n \"score\": \"0.7210539\",\n \"text\": \"public function test_login_user()\\n {\\n //Given is user\\n $this->json('POST', '/login', [\\n 'password' => '12345',\\n 'email' => 'hahn.kellie@aufderhar.biz'\\n ]);\\n //When they hit the endpoint /register create a new user, while passing necessary data \\n $content = json_decode($this->response->getContent());\\n \\n //Then there should be a new record \\n $this->assertObjectHasAttribute('token', $content, 'Token does not exists');\\n\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a9ca5e322c34b9e947e5663d116053d\",\n \"score\": \"0.72086847\",\n \"text\": \"public function testCanLogin()\\n {\\n $user = User::first();\\n $response = $this->withHeaders([\\n 'Accept' => 'application/json'\\n ])->json('POST', '/api/auth/login', ['email' => $user->email, 'password' => 'secret']);\\n $response->assertStatus(200)->assertJson(['token_type' => 'bearer']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b6587944f93cf6e9312122e5e707fb5\",\n \"score\": \"0.7203524\",\n \"text\": \"public function testValidationForLogin()\\n {\\n $this->json('POST', 'api/v1/login', ['Accept' => 'application/json'])\\n ->assertStatus(422)\\n ->assertJson([\\n \\\"message\\\" => \\\"Validation failed.\\\",\\n \\\"data\\\" => [\\n \\\"email\\\" => [\\\"The email field is required.\\\"],\\n \\\"password\\\" => [\\\"The password field is required.\\\"],\\n \\\"device_name\\\" => [\\\"The device name field is required.\\\"],\\n ]\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e20699d33b8f4ac8ac57ffb42d76e8f\",\n \"score\": \"0.7195855\",\n \"text\": \"function testWithLogin() {\\n $this->_login_user = $this->_users_for_registration['super'];\\n $this->setLoginCookie();\\n $response = helper::jsonDecode($this->_rest->post($this->_uri . Reports::NOT_GLUTEN_FREE));\\n //helper::p($response);\\n $this->assertEquals(ApiHelper::MESSAGE_200, $response['status']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26405edac33ca3afe1b0980a95a3a14c\",\n \"score\": \"0.7188455\",\n \"text\": \"public function testLoginFails()\\n {\\n $response = $this->json('POST', '/api/login', [\\n 'email' => 'joe@blogs.com',\\n 'password' => '123445',\\n ]);\\n\\n $response\\n ->assertStatus(401)\\n ->assertExactJson([\\n 'error' => 'Unauthorized'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69d6fa56e16e9b3afb98806695fcea7c\",\n \"score\": \"0.7170278\",\n \"text\": \"public function testLoginAValidUser()\\n {\\n $user = User::find(1);\\n\\n $response = $this->post('/login', [\\n 'email' => $user->email,\\n 'password' => $user->password,\\n ]);\\n\\n $response->assertStatus(302);\\n\\n $response = $this->actingAs($user, 'web');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b2969620996aa75be121d76fd430185\",\n \"score\": \"0.71438617\",\n \"text\": \"public function test_login()\\n\\t{\\n\\t\\t$this->assertFalse($this->auth->login('dave@davewidmer.net','wrongpassword'));\\n\\t\\t$this->assertTrue($this->login());\\n\\t\\t$this->assertTrue($this->auth->logged_in());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ceb07667970f10f7b23a4966f8c3f4a3\",\n \"score\": \"0.7131785\",\n \"text\": \"public function test_login_response_api_token()\\n {\\n $user = factory(User::class)->create();\\n \\n $this->assertDatabaseHas('users', $user->toArray());\\n \\n $user->password = 'secret';\\n \\n //Submit post request to create an user endpoint\\n $response = $this->post('api/login', $user->toArray());\\n \\n //Verify in the database\\n \\n $this->assertNotEmpty(json_decode($response->content(),true)['result']['api_token']);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58529ec78981e064e4a3236a9bb15cec\",\n \"score\": \"0.7110819\",\n \"text\": \"public function testLogin()\\n {\\n $response = $this->call('GET', '/auth/login');\\n\\n $this->assertEquals(200, $response->getStatusCode());\\n\\n $response = $this->call('POST', '/auth/login', [\\n 'email' => $this->email,\\n 'password' => $this->password,\\n '_token' => csrf_token(),\\n ]);\\n $this->assertRedirectedTo('/');\\n $this->assertTrue(Auth::check());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a20d45bb7d06ad558d72e2aee1b0d7a\",\n \"score\": \"0.7069841\",\n \"text\": \"public function testSuccessfulAuthTestCase()\\n\\t{\\n\\t\\t$this->open('site/login');\\n\\t\\t$this->assertTextPresent('Login');\\n\\t\\t$this->type('name=LoginForm[username]', 'demo');\\n\\t\\t$this->type('name=LoginForm[password]', 'demo');\\n\\t\\t$this->clickAndWait(\\\"//button[.='Login']\\\");\\n\\t\\t$this->assertTextNotPresent('Incorrect username or password');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f83f20b1f1a7f4b22e0ad69e06c9f1e7\",\n \"score\": \"0.70455855\",\n \"text\": \"public function testLogin() \\n {\\n $result = $this->_model->authenticate($this->_email, $this->_password);\\n \\n $noError = $result['error'] === false;\\n \\n $this->assertTrue($noError);\\n \\n $this->assertEquals($this->_email, $result['data']['email']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00b86636db39886272f312cf7ef4531c\",\n \"score\": \"0.7045538\",\n \"text\": \"public function testBasicTest()\\n {\\n $response = $this->json('POST', 'auth/login', \\n [\\n 'email' => 'dana54@example.org', \\n 'password' => 'secret'\\n ]);\\n \\n dd($response->headers);\\n $response\\n ->assertStatus(200)\\n ->assertJson([\\n 'created' => true,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"750bf0c0f0387b925abcd1c6ea176453\",\n \"score\": \"0.704362\",\n \"text\": \"public function testCanLogin()\\n {\\n $user = factory(User::class)->create([\\n 'remember_token' => ''\\n ])->makeVisible(['remember_token','password'])->toArray();\\n\\n $this->json('POST', '/api/user/login', [\\n 'email' => $user['email'],\\n 'password' => 'secret',\\n ])->assertJson([\\n 'error' => false\\n ])->assertStatus(Response::HTTP_OK);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7835e4d1fa81e09d35edc09c7f129c7\",\n \"score\": \"0.70311785\",\n \"text\": \"public function testLoginSuccess()\\n {\\n\\n // Create a user, set username.\\n $user = $this->__user($username = 'david', $password = 'poesypure');\\n\\n // Prepare the request.\\n $this->request->setMethod('POST')\\n ->setPost(array(\\n 'username' => 'david',\\n 'password' => 'poesypure'\\n )\\n );\\n\\n // Hit the route and check for redirect.\\n $this->dispatch(NLWS_SLUG . 'nl-admin/login');\\n $this->assertRedirectTo(nlws_url('exhibits'));\\n\\n // Login.\\n $this->assertTrue(Zend_Auth::getInstance()->hasIdentity());\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aaad9c118f8bc6de6381548f403e401f\",\n \"score\": \"0.7025381\",\n \"text\": \"public function test_user_can_login()\\n {\\n $user = $this->user();\\n\\n $response = $this->post('api/login', [\\n 'email' => $user->email,\\n 'password' => 'password'\\n ]);\\n\\n $response->assertOk();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"28dbebb9492d825288fd7bd35e7c4513\",\n \"score\": \"0.7009943\",\n \"text\": \"public function testLoginMissingParameter()\\n {\\n // Do request\\n $this->_request('POST', '/api/1.5.0/login', ['phone' => '1234'])\\n ->_result(['error' => 'login-error']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c46efee7b4caa2eca822b3dd330bfa1\",\n \"score\": \"0.70053476\",\n \"text\": \"public function LoginWithWrongData()\\n {\\n // as a user, I wrongly type my email and password\\n $data = ['email' => 'email', 'password' => 'password'];\\n // and I submit it to the login api\\n $response = $this->call('POST', 'login', $data);\\n // I shouldnt be able to login with wrong data\\n $this->assertEquals(HttpResponse::HTTP_UNAUTHORIZED, $response->status());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64c86878113805375e5dffbd54fe1612\",\n \"score\": \"0.7001869\",\n \"text\": \"public function testSignedUpUserCanPostValidLogin(): void\\n {\\n \\\\Artisan::call('passport:install');\\n\\n $user = factory(User::class)->create();\\n\\n $request = [\\n 'email' => $user['email'],\\n 'password' => 'Password123!', // default factory password\\n ];\\n\\n $this->post('/api/v1/auth/login', $request, self::HEADER)\\n ->assertStatus(200)\\n ->assertJsonStructure([\\n 'access_token',\\n 'token_type',\\n 'expires_at',\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4cf53e478bd881ca99047ac3289479b8\",\n \"score\": \"0.70006233\",\n \"text\": \"public function test_login_user_correctly()\\n {\\n $user = factory(User::class)->create();\\n \\n $this->assertDatabaseHas('users', $user->toArray());\\n \\n $user->password = 'secret';\\n \\n //Submit post request to create an user endpoint\\n $response = $this->post('api/login', $user->toArray());\\n \\n //Verify in the database\\n \\n // Verify status 200\\n $response->assertStatus(200);\\n \\n // Verify values in response\\n $response->assertJson(['success' => true]);\\n $response->assertJson(['message' => 'User logged successfully.']);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"22375656e14840752a62828607093f7f\",\n \"score\": \"0.6991598\",\n \"text\": \"public function testAuthenticationSuccess()\\n {\\n $this->visit('/')\\n ->click('Login')\\n ->seePageIs('/login')\\n ->type('test+normal@example.ex', '#email')\\n ->type('password123', '#password')\\n ->click('#login-button')\\n ->see('User: Normal User');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2a99c07b8c4fb8576945bba727851cc\",\n \"score\": \"0.69909835\",\n \"text\": \"public function testLogin()\\n {\\n\\n $user = factory(SmartBots\\\\User::class)->make()->save();\\n\\n $this->visit('/account/login')\\n ->see('Login')\\n ->type('demodemo','username')\\n ->type('demodemo','password')\\n ->check('remember')\\n ->press('Login')\\n ->seeJson([\\n 'success' => true,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"334f9c4d984a6cf4a8cd58bfb69f7928\",\n \"score\": \"0.69724786\",\n \"text\": \"public function testLoginFail()\\n {\\n $data = factory(User::class)->create();\\n\\n $response = $this->postJson('/api/login', [\\n 'email' => $data->email,\\n 'password' => 'wrongpassword',\\n ]);\\n\\n $response->assertStatus(401);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0aa441baf35ee2827cfbc5fa675c6964\",\n \"score\": \"0.6968539\",\n \"text\": \"public function testLoginSuccessful() {\\n\\n $username = 'test';\\n $password = 'test';\\n\\n $this->url(\\\"/login.php\\\");\\n $usernameInput = $this->byName(\\\"login\\\");\\n $usernameInput->clear();\\n $this->keys($username);\\n\\n $usernameInput = $this->byName(\\\"password\\\");\\n $usernameInput->clear();\\n $this->keys($password);\\n\\n $form = current($this->elements($this->using('css selector')->value('form.login')));\\n $form->submit();\\n\\n /* Check for text on index page */\\n $h1 = current($this->elements($this->using('css selector')->value('h1')));\\n $this->assertEquals('Welcome to protected area!', $h1->text());\\n\\n /* Check that cookie user has been set */\\n $authCookie = $this->cookie()->get('user');\\n $this->assertEquals('loggedin', $authCookie);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f57cf22fb30380d070e6c2ea3d9acc75\",\n \"score\": \"0.6957994\",\n \"text\": \"public function testFailedLogin()\\n {\\n $response = $this->withHeaders([\\n 'Content-Type' => 'application/json',\\n ])->json('POST', '/api-login', ['email' => 'admin@movies.dev']);\\n\\n $response->assertStatus(400);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bd078d3d5045a5843dc44bf61d283dc\",\n \"score\": \"0.6952731\",\n \"text\": \"public function test_for_user_can_logged_in()\\n {\\n $email = 'test@email.com';\\n $password = 'secret';\\n User::factory()->create(\\n [\\n 'email' => $email,\\n 'password' => $password\\n ]\\n );\\n\\n $response = $this->post('/api/login', [\\n 'email' => $email,\\n 'password' => $password\\n ]);\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e68f8ef0b6c3c6ca6b59e31d9a41d461\",\n \"score\": \"0.6951488\",\n \"text\": \"public function testBasicTest()\\n {\\n\\n $response = $this->json('POST', '/api/login', [\\n 'email' => 'demo@demo.com',\\n 'password' => 'secret'\\n ]);\\n\\n $response->assertStatus(200)->assertJsonStructure([\\n 'success' => ['token']\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9930db11682b526bb32681f9a316893f\",\n \"score\": \"0.69208235\",\n \"text\": \"public function testSignInAsUserWithValidCredentials()\\n {\\n $crawler = $this->client->request('GET', '/login');\\n\\n $form = $crawler->selectButton('submit')->form();\\n $form->setValues(\\n [\\n '_username' => 'username',\\n '_password' => '12345'\\n ]\\n );\\n $this->client->submit($form);\\n $crawler = $this->client->followRedirect();\\n\\n // TODO assert testing\\n $this->assertNull(null);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b795b0297d22fed13722404f2a8aac14\",\n \"score\": \"0.6920733\",\n \"text\": \"public function testLoginFalse()\\n {\\n $response = $this->post('/login', [\\n 'email' => 'user@ad.com',\\n 'password' => 'incorrectpass',\\n ]);\\n\\n $response->assertSessionHasErrors();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b8813daf0d39c6ebd9e956ab645e8f9\",\n \"score\": \"0.6920275\",\n \"text\": \"public function test_a_user_can_login_on_the_website()\\n {\\n factory(\\\\App\\\\User::class)->create([\\n 'email' => 'mark@timbol.com',\\n 'password' => 'marktimbol'\\n ]);\\n\\n \\t$response = $this->json('POST', '/login', [\\n \\t\\t'email' => 'mark@timbol.com',\\n \\t\\t'password' => 'marktimbol',\\n \\t]);\\n\\n \\t$this->isAuthenticated();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6e73be5e931e8b41e8a1ef815dd7023\",\n \"score\": \"0.691059\",\n \"text\": \"public function testLoginPostTest()\\n {\\n $user = $this->_getAdminUser();\\n $response = $this->post(route('admin.login.post'), ['email' => 'admin@admin.com', 'password' => 'admin123']);\\n\\n $response->assertRedirect(route('admin.dashboard'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd0b3e2feb8afb696500da3d902c6ff0\",\n \"score\": \"0.690393\",\n \"text\": \"public function testLogin() {\\n \\n $client = static::createClient(\\n array(), array(\\n 'HTTP_HOST' => static::$kernel->getContainer()->getParameter('test_http_host')\\n ));\\n \\n $username = static::$kernel->getContainer()->getParameter('test_admin_username');\\n $password = static::$kernel->getContainer()->getParameter('test_admin_password');\\n \\n $crawler = $client->request('GET', '/admin/login');\\n\\n $form = $crawler->selectButton('Sign In')->form(array(\\n '_username' => $username,\\n '_password' => $password,\\n ));\\n\\n $client->submit($form);\\n\\n $this->assertTrue($client->getResponse()->isRedirect('/admin/dashboard')); // check if redirecting properly\\n\\n $client->followRedirect();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86a26366cb3e641feba4dd4e36b00895\",\n \"score\": \"0.6860138\",\n \"text\": \"public function testInvalidCredentialsForLogin()\\n {\\n $userData = [\\n \\\"email\\\" => \\\"user1@test.com\\\",\\n \\\"password\\\" => \\\"wrongpassword\\\",\\n \\\"device_name\\\" => \\\"testing\\\"\\n ];\\n\\n $this->json('POST', 'api/v1/login', $userData, ['Accept' => 'application/json'])\\n ->assertStatus(422)\\n ->assertJson([\\n \\\"message\\\" => \\\"Invalid Credentials\\\",\\n \\\"code\\\" => 422\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f6773367628fce223bd26054c371fc1\",\n \"score\": \"0.68544894\",\n \"text\": \"public function test_login_goodLogin_returnsOkAndFlashAndUser() {\\n\\t\\t$this->loginService->shouldReceive('login')->once()->andReturn(true);\\n\\t\\t\\n\\t\\t//setup a mock user to be returned from Auth should be returned\\n\\t\\t//$this->user->id = 2;\\n\\t\\t$this->mockedRepository->shouldReceive('toArray')->once()->andReturn(array('id'=>2));\\n\\t\\tAuth::shouldReceive('user')->once()->andReturn($this->mockedRepository);\\n\\t\\t\\n\\n\\t\\t$expectedResponse = $this->buildResponseArray($status=200,$hasFlash=true,$hasUser=true,2);\\n\\t\\t\\n\\t\\t$actualResponse = $this->buildActualResponseArray($this->apiCall('POST','/login', false),true);\\n\\t\\t\\n\\t\\t$this->assertEquals($expectedResponse,$actualResponse);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1db47b03db5181ef370030e9232fadff\",\n \"score\": \"0.6854297\",\n \"text\": \"public function testLoginSuccess()\\n {\\n $user = factory(App\\\\User::class)->create(['password' => bcrypt('senha1')]);\\n\\n $this->visit('/')->see('Product management')\\n ->click('Login')\\n ->type($user->email, 'email')\\n ->type('senha1', 'password')\\n ->press('Login')\\n ->see('Dashboard')\\n ->see('You are logged in!');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"11e5d864f7c90eb9875a2ada4961283e\",\n \"score\": \"0.6840835\",\n \"text\": \"public function testLoginGetTest()\\n {\\n $response = $this->get(route('admin.login'));\\n $response->assertStatus(200);\\n $response->assertSee('AvoRed Admin Login');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2984f4f34ba176ced762eee96caa051\",\n \"score\": \"0.6835911\",\n \"text\": \"public function testCustomerCanLogin()\\n {\\n $client = static::createClient();\\n $client->request(\\n 'POST',\\n '/customersapi/login_check',\\n array(),\\n array(),\\n array('CONTENT_TYPE' => 'application/json'),\\n json_encode(array(\\n 'username' => 'customer0@lolamarket.com',\\n 'password' => 'lolamarket',\\n ))\\n );\\n\\n $response = $client->getResponse();\\n $data = json_decode($response->getContent(), true);\\n $this->assertTrue($response->headers->contains('Content-Type', 'application/json'));\\n $this->assertJson($response->getContent());\\n $this->assertArrayHasKey(\\\"token\\\",$data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4bc1369eb39f5622e3c3d953be1c37b8\",\n \"score\": \"0.68353546\",\n \"text\": \"public function testApiAuthenticationOkWithCorrectCredentials()\\n {\\n $response = $this->post('/api/oauth/token', [\\n 'grant_type' => 'password',\\n 'client_id' => $this->token->id,\\n 'client_secret' => $this->token->secret,\\n 'username' => $this->randomEmail,\\n 'password' => $this->password,\\n 'scope' => '',\\n ]);\\n $response->assertStatus(200)\\n ->assertJsonStructure([\\n 'expires_in',\\n 'access_token',\\n 'refresh_token'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d7e739afb6c28baa2d0d01fa8da9199\",\n \"score\": \"0.6827868\",\n \"text\": \"public function testLoginPageWithFalsePassword()\\n {\\n $client = $this->createClient();\\n $client->request('POST', '/login', array(), array(), array(),\\n '{\\\"username\\\":\\\"admin\\\",\\\"password\\\":\\\"toto\\\"}');\\n\\n $this->assertEquals(400, $client->getResponse()->getStatusCode());\\n $this->assertEquals('Password false', $client->getResponse()->getContent());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5a2ae8a35836bbd1c30ab4615ad0ab2\",\n \"score\": \"0.68253833\",\n \"text\": \"public function test_login_is_successful()\\n {\\n $this->visit(route('login'))\\n ->type($this->test_user_email, 'email')\\n ->type($this->test_user_password, 'password')\\n ->press('Login')\\n ->seePageIs(route('showCreateOrganiser', ['first_run' => '1']));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13f0251f44be9683e1b9a38bda71f78f\",\n \"score\": \"0.6825347\",\n \"text\": \"public function login(){\\n\\t\\ttry{\\n \\t$this->service->login(Input::all());\\n \\treturn $this->api->respondSuccessWithDetails(\\n\\t \\t'Successfully logged in.', $this->transformer->transform($this->service->getUserDetails())\\n\\t );\\n }catch(ValidationException $e){\\n \\treturn $this->api->respondInvalidParameters($e->getMessage());\\n }\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef588cae4f2d82c9603980c46770f1b4\",\n \"score\": \"0.6818076\",\n \"text\": \"public function login()\\n {\\n// $mocObj = \\\\Codeception\\\\Util\\\\Stub::make(UserRepository::className(),[\\n// 'findOne'=>new UserRepository\\n// ]);\\n//\\n// $user->setRepository($mocObj);\\n// $token = $user->login(\\\"username\\\",\\\"password\\\");\\n// verify($token)->notNull();\\n// return $token;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82f347c0d98fac0b7e24ab1f30c91100\",\n \"score\": \"0.6809552\",\n \"text\": \"public function testViewLoginPage()\\n {\\n $response = $this->get(route('user_login'));\\n\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a28be8eb854e0fdd1bc07c81e0dee9a6\",\n \"score\": \"0.6787016\",\n \"text\": \"public function testUserSigninSuccess()\\n {\\n $response = $this->post('/api/v1/auth/signin', $this->staticUserDetails);\\n\\n $response->assertStatus(200);\\n\\n $response->assertJsonFragment([\\n 'message' => 'Login successful'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73aeb06f550eca74c136b6587f426477\",\n \"score\": \"0.6786416\",\n \"text\": \"public function testLoginInvalidParameters() {\\n $request = $this->getRequest();\\n $request->setMethod('POST');\\n $this->dispatch('/get_partner_customer');\\n $this->assertResponseCode(406);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5266675391b88c06ac1c7b637f1c0fb1\",\n \"score\": \"0.67832047\",\n \"text\": \"public function testLoginFormWorksCorrectly()\\n {\\n //create a user\\n $this->createUser();\\n $this->visit('/login')\\n ->type('john@doe.com','email')\\n ->type('password', 'password')\\n ->press('action')\\n ->seePageIs('/');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6194a23364a0daf7667ffec508b46801\",\n \"score\": \"0.67818004\",\n \"text\": \"public function testApiLoginWithNewPassword()\\n {\\n $client = $this->makeClient();\\n $response = $this->makeJsonRequest(\\n $client,\\n Request::METHOD_POST,\\n '/api/login_check',\\n ['email' => self::TEST_EMAIL, 'password' => 'moomoo']\\n );\\n\\n $this->assertCredentialsResponse($response, $client, self::TEST_EMAIL);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8d520234fd63fd6f06db80be2571309\",\n \"score\": \"0.6778104\",\n \"text\": \"public function testUserCanLoginWithCorrectCredentials() {\\n $user = factory(User::class)->create([\\n 'password' => bcrypt($password = 'i-love-laravel'),\\n ]);\\n\\n $response = $this->post('/login', [\\n 'email' => $user->email,\\n 'password' => $password,\\n ]);\\n\\n $response->assertRedirect('/games');\\n $this->assertAuthenticatedAs($user);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1515592fb10e69335068447f2d31c3c9\",\n \"score\": \"0.6776384\",\n \"text\": \"function test_login() {\\n $user = new PHPFrame_User();\\n $user->set('id', 0);\\n $user->set('groupid', 0);\\n $session = PHPFrame::Session();\\n $session->setUser($user);\\n \\n // Fake posted form data\\n PHPFrame::Request()->setAction('login');\\n PHPFrame::Request()->set('username', 'admin');\\n PHPFrame::Request()->set('password', 'Passw0rd');\\n PHPFrame::Request()->set(PHPFrame_Utils_Crypt::getToken(), '1');\\n \\n $frontcontroller = PHPFrame::getFrontController();\\n $frontcontroller->run();\\n \\n $controller = PHPFrame_MVC_ActionController::getInstance('com_login');\\n $this->assertTrue($controller->getSuccess());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a6ea11fb7baa4ce94d9f7a02fa0aef9\",\n \"score\": \"0.67599285\",\n \"text\": \"public function testSignupValid()\\n {\\n $this->request\\n ->setMethod('POST')\\n ->setPost(\\n array(\\n 'username' => 'NEWUSERPERSON',\\n 'password' => 'admin',\\n 'passwordConf' => 'admin',\\n 'firstName' => 'John',\\n 'lastName' => 'Smith',\\n 'emailAddress' => 'srgraham@ncsu.edu',\\n 'timezone' => 'America/New_York',\\n 'realm' => 'local',\\n )\\n );\\n $this->dispatch('/ot/login/signup/realm/local');\\n $this->assertRedirectTo('/login/index/realm/local');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dad9da66af5e0676cbf5be7ca3613202\",\n \"score\": \"0.6757598\",\n \"text\": \"public function test_01_login_called_returnCorrectLoginInfo()\\r\\n\\t{\\r\\n\\t\\t$expected = \\\"LIB META AVAIL SRCH\\\";\\r\\n\\t\\t$result = $this->service->login(self::clientKey, self::clientSecret);\\r\\n\\t\\t$this->assertEquals(\\\"stdClass\\\", get_class($result));\\r\\n\\t\\t$this->assertEquals($expected, $result->scope);\\r\\n\\t\\tself::$accessToken = $result->access_token;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85d2e30d129c8cc2b693cd59ee687620\",\n \"score\": \"0.67495406\",\n \"text\": \"public function testLoggedinRequest() {\\n $user = factory(User::class)->create();\\n $response = $this->actingAs($user)->get('/');\\n\\n $response->assertSuccessful();\\n $response->assertViewIs('home');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12f42ce916e12aad471653db51c2b599\",\n \"score\": \"0.67479026\",\n \"text\": \"public function testLoginFailed()\\n {\\n $faker = Factory::create();\\n\\n $data = [\\n 'username' => $faker->text(8),\\n 'password' => $faker->text(8)\\n ];\\n\\n $response = $this->post(url('api/login'), $data);\\n $res_object = json_decode($response->content());\\n\\n $this->assertObjectHasAttribute('errorType',$res_object, \\\"errorType: false\\\");\\n $this->assertEquals('INCORRECT_DATA_ERROR',$res_object->errorType,'errorType = LOGIN_ERROR: false');\\n\\n $this->assertObjectHasAttribute('errors',$res_object, \\\"errors: false\\\");\\n\\n $response->assertStatus(401);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf19d810f528c24f056508396e5d0cd6\",\n \"score\": \"0.67453146\",\n \"text\": \"public function testApiAuthenticationFailsWithInCorrectCredentials()\\n {\\n $response = $this->post('/api/oauth/token', [\\n 'grant_type' => 'password',\\n 'client_id' => 2,\\n 'client_secret' => $this->token->secret,\\n 'username' => $this->randomEmail,\\n 'password' => 'Invalid password',\\n 'scope' => '',\\n ]);\\n $response->assertStatus(401);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db569378f94e0aa9ffc16cd912e487c3\",\n \"score\": \"0.67355186\",\n \"text\": \"public function testCreateLoginRequired()\\n {\\n\\n $this->visit('/stores/create')\\n ->seePageIs('/login');\\n\\n $this->visit('/products/create')\\n ->seePageIs('/login');\\n\\n $this->visit('/reviews/create')\\n ->seePageIs('/login');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8194c2ab026f04c68ec390c126cd228d\",\n \"score\": \"0.6733755\",\n \"text\": \"public function testSubmitCorrectAuthentication()\\n\\t{\\n\\t\\t$crawler = $this->client->request('GET', '/login');\\n\\t\\t$loginForm = $crawler->selectButton(\\\"Se connecter\\\")->form();\\n\\n\\t\\t$this->assertNotEquals(null, $loginForm);\\n\\n\\t\\t$loginForm['_username'] = 'admin';\\n\\t\\t$loginForm['_password'] = 'admin';\\n\\n\\t\\t$crawler = $this->client->submit($loginForm);\\n\\t\\t$crawler = $this->client->followRedirect();\\n\\n\\t\\t$this->assertStringContainsString('Créer une nouvelle tâche', $crawler->text());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eba6194036e4983bebdc88c5f3729927\",\n \"score\": \"0.672992\",\n \"text\": \"public function test_User_can_login()\\n {\\n $this->enableCsrfToken();\\n $this->enableRetainFlashMessages();\\n\\n // Envío datos de un cliente que existe en el fixture 'UsersFixture'\\n $loggingUser['email'] = 'user2@gmail.com';\\n $loggingUser['password'] = 'pass';\\n\\n $this->post(['controller' => 'Users', 'action' => 'login'], $loggingUser);\\n\\n $this->assertFlashElement('Flash/success');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52bad86c9e7f1955b7798606e1a8b185\",\n \"score\": \"0.67241776\",\n \"text\": \"public function testLoginPageWithCorrectPassword()\\n {\\n $client = $this->createClient();\\n $client->request('POST', '/login', array(), array(), array(),\\n '{\\\"username\\\":\\\"admin\\\",\\\"password\\\":\\\"admin\\\"}');\\n\\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\\n $encoder = new PasswordEncoder();\\n $this->assertEquals($encoder->encodePassword('Admin connected'), $client->getResponse()->getContent());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ce8fc8682761770296b71c4b4062e92\",\n \"score\": \"0.67200273\",\n \"text\": \"public function test_validations_auth()\\n {\\n $response = $this->postJson('/auth', []);\\n\\n $response->assertStatus(422);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5246294569344f20d565ec24cbaca5dd\",\n \"score\": \"0.6702028\",\n \"text\": \"public function test_login_page(){ \\n $this->visit('login')\\n ->type('phi2902@yahoo.com', 'email')\\n ->type('123456', 'password')\\n ->press('Login')\\n ->seePageIs('/');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be1092339a4d87bf9c6c3347eb57f41b\",\n \"score\": \"0.66911083\",\n \"text\": \"public function testLoginsGetUnauthorized(): void { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee3fee0baeea3c6e716e73a21e331d94\",\n \"score\": \"0.66911036\",\n \"text\": \"public static function testSignIn() {\\n $value = array(\\\"status\\\" => 404, \\\"title\\\" => 1);\\n if ((empty($_REQUEST['userId'])) || (empty($_REQUEST['password']))) {\\n // One of the fields is empty\\n } else {\\n $result = User::getUser($_REQUEST['userId']);\\n // check if user was found in database\\n if ($result) {\\n $hash = $result[0]['password'];\\n $password = $_REQUEST['password'];\\n //check if password match\\n if (!password_verify($password, $hash)) {\\n // Wrong password\\n } else {\\n $value = array(\\\"status\\\" => 200, \\\"title\\\" => $result[0]['title']);\\n }\\n } else {\\n //\\\"User was not found\\\";\\n }\\n }\\n return $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aecc2ace22bbe49d5da82bd160b2f064\",\n \"score\": \"0.66822773\",\n \"text\": \"public function testLoginDataIsInvalid(){\\n $data = [\\n 'username' => '',\\n 'password' => ''\\n ];\\n\\n $response = $this->post(url('api/login'), $data);\\n\\n $res_object = json_decode($response->content());\\n\\n $this->assertObjectHasAttribute('errorType',$res_object, \\\"errorType: false\\\");\\n $this->assertEquals('VALIDATION_ERROR',$res_object->errorType,'errorType = VALIDATION_ERROR: false');\\n $this->assertObjectHasAttribute('errors',$res_object,\\\"errors: false\\\");\\n $this->assertObjectHasAttribute('username',$res_object->errors,\\\"errors[username]: false\\\");\\n $this->assertObjectHasAttribute('password',$res_object->errors,\\\"errors[password]: false\\\");\\n\\n $response->assertStatus(422);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":754,"cells":{"query_id":{"kind":"string","value":"058c181b0c0991a48f2c3788098a7030"},"query":{"kind":"string","value":"Sets the starting center point of the map."},"positive_passages":{"kind":"list like","value":[{"docid":"01bac4598010dd80cc5ac89828e4b46b","score":"0.44127145","text":"public function defaultCenter($lat, $lng, $zoom = 10)\n {\n return $this->config([\n 'defaultCenter' => [\n 'lat' => $lat,\n 'lng' => $lng,\n ],\n 'defaultZoom' => $zoom,\n ]);\n }","title":""}],"string":"[\n {\n \"docid\": \"01bac4598010dd80cc5ac89828e4b46b\",\n \"score\": \"0.44127145\",\n \"text\": \"public function defaultCenter($lat, $lng, $zoom = 10)\\n {\\n return $this->config([\\n 'defaultCenter' => [\\n 'lat' => $lat,\\n 'lng' => $lng,\\n ],\\n 'defaultZoom' => $zoom,\\n ]);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"6a9053a24fd5498964cafec7d9b13447","score":"0.6044059","text":"public function autoCenter()\n {\n $center = $this->bounds->getCenter();\n\n if($center->getLat() && $center->getLng()) {\n $this->setCenter($center->getLat(), $center->getLng());\n }\n\n return $this;\n }","title":""},{"docid":"5ecf259fdfcd5e701aba88471b4eea28","score":"0.5999467","text":"public function setCenterCoords($centerCoords)\n {\n $this->center_coords = $centerCoords;\n }","title":""},{"docid":"315bb2d1fc3633f398b8bdaf35cdbe1b","score":"0.59718275","text":"public function setStart(float $lat, float $lon)\n\t{\n\t\t$this->start = ['lat' => $lat, 'lon' => $lon];\n\t}","title":""},{"docid":"6768a62fedbf9f5e9e2c8e3a283add5b","score":"0.574154","text":"public function setCenter($lat = NULL, $lng = NULL)\n {\n if ($lat == null && $lng == null)\n {\n $this->autoCenter();\n }\n else\n {\n if ($lat != NULL)\n {\n $this->lat = Tx_Listfeusers_Gmap::validate_latitude($lat);\n }\n if ($lng != NULL)\n {\n $this->lng = Tx_Listfeusers_Gmap::validate_longitude($lng);\n }\n }\n return $this;\n }","title":""},{"docid":"c0a0dc5fd4d92994252aadde435d89a2","score":"0.5533244","text":"public function setLatitudeSetsLatitude() {\n\t\t$this->subject->setlatitude(12.345678);\n\t\t$this->assertSame(12.345678, $this->subject->getlatitude());\n\t}","title":""},{"docid":"ecf603c829bd9d728ddf95db3465b828","score":"0.5509961","text":"function centerHorizontally($center = 1) {\r\n $this->_hcenter = $center;\r\n }","title":""},{"docid":"4fd4b63f3b71ca60e13daa0af4f6491a","score":"0.549084","text":"public function set_center($latitude, $longitude, $zoom = 4, $map_type = null)\n {\n return 'this.GMap.setCenter(' . $this->glatlng($latitude, $longitude) . ', ' . (int) $zoom . ( $map_type ? ', ' . $map_type : '' ) . \");\\n\";\n }","title":""},{"docid":"93b7992c35ae8565c55c87ef729008dc","score":"0.53637624","text":"public function setStartPoint($start);","title":""},{"docid":"d56e602e244262b48c05973306dbf211","score":"0.53453296","text":"public function setStart($val)\n {\n $this->start = $val;\n }","title":""},{"docid":"5bbfe4e759f21acf99195d46e07239e6","score":"0.5270356","text":"public function getCentre()\n {\n $shapeParams = $this->getData();\n if ($this->getType() == \"circle\") {\n $this->setLatCenter($shapeParams[\"center\"][0]);\n $this->setLonCenter($shapeParams[\"center\"][1]);\n } else if ($this->getType() == \"rectangle\") {\n $swlat = $this->getSwLatitude();\n $swLon = $this->getSwLongitude();\n $neLat = $this->getNeLatitude();\n $neLon = $this->getNeLongitude();\n $this->setLatCenter($neLat + ($swlat - $neLat) / 2);\n $this->setLonCenter($neLon + ($swLon - $neLon) / 2);\n } else if ($this->getType() == \"polygon\" || $this->getType() == \"polyline\") {\n $PI = 22 / 7;\n $X = 0;\n $Y = 0;\n $Z = 0;\n foreach ($shapeParams[\"paths\"] as $point) {\n $lat1 = $point[0];\n $lon1 = $point[1];\n $lat1 = $lat1 * $PI / 180;\n $lon1 = $lon1 * $PI / 180;\n $X += cos($lat1) * cos($lon1);\n $Y += cos($lat1) * sin($lon1);\n $Z += sin($lat1);\n }\n $Lon = atan2($Y, $X);\n $Hyp = sqrt($X * $X + $Y * $Y);\n $Lat = atan2($Z, $Hyp);\n $Lat = $Lat * 180 / $PI;\n $Lon = $Lon * 180 / $PI;\n $this->setLatCenter($Lat);\n $this->setLonCenter($Lon);\n }\n }","title":""},{"docid":"c4621c7b3fa4ab17d4b5ec8cd074a06f","score":"0.52547723","text":"public function setFirstPos(): void\n {\n if ($this->pvpAreaInfo === null) {\n $this->pvpAreaInfo = new stdClass();\n }\n\n $this->pvpAreaInfo->firstPos = $this->asVector3();\n\n $this->sendMessage(Utils::getPrefix() . TextFormat::GREEN . \" Successfully set the first position of the PvPArea.\");\n }","title":""},{"docid":"7c39df8d736afc777d2511595b695429","score":"0.5251983","text":"public function setLat($lat) {\n $this->lat = $lat;\n }","title":""},{"docid":"28140358df7ba59d01a8622b49b71a45","score":"0.5249489","text":"public function setStart($start) {\n\t\t$this->start = $start;\n\t}","title":""},{"docid":"b004cc97092a3849f0a0f8fbfa0ee925","score":"0.52478874","text":"function setStart( $value )\n {\n if( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Start = $value;\n }","title":""},{"docid":"0c37ebb91c12651612eb4037264c8a2d","score":"0.52406216","text":"public function setCentered($value)\r\n {\r\n $this->centered = $this->setBooleanProperty($this->centered, $value);\r\n }","title":""},{"docid":"6240d054cd650a6ad387812a092716f2","score":"0.51997125","text":"public function setLat($lat)\n {\n $this->lat = $lat;\n\n }","title":""},{"docid":"aa5c79367d90887ca7188bcd5286f8bd","score":"0.51847386","text":"abstract public function setStart($start);","title":""},{"docid":"db383e4ef0937ff78bfe7eb85f1084eb","score":"0.5184463","text":"public function setStart($start)\n {\n $this->start = $start;\n }","title":""},{"docid":"3ceec5f8af1c4cc7aef5ff0603284428","score":"0.51594424","text":"public function setLatitude($lat)\n {\n $this->campos['lat'] = $lat;\n return $this;\n }","title":""},{"docid":"d67c54b93527f5c7af005408b2c63b00","score":"0.5149759","text":"public function getCenter()\n {\n return $this->center;\n }","title":""},{"docid":"7a5eeb1942f866baa1698b8bea657f68","score":"0.51357126","text":"public function getCenter() {\n return $this->center;\n }","title":""},{"docid":"2d36820673a3565e03e0fb5befc41616","score":"0.5063625","text":"public function setLatitude($value)\n {\n return $this->set('Latitude', $value);\n }","title":""},{"docid":"2d36820673a3565e03e0fb5befc41616","score":"0.5063625","text":"public function setLatitude($value)\n {\n return $this->set('Latitude', $value);\n }","title":""},{"docid":"da9fccd27df4aad4781a497d1f3bf588","score":"0.50571316","text":"function reCenter($x, $y) {}","title":""},{"docid":"a093e3a575e8b6f84fdecb4fd9ab2080","score":"0.5024473","text":"public function setStart(?DateTimeTimeZone $value): void {\n $this->getBackingStore()->set('start', $value);\n }","title":""},{"docid":"1f9849133d9899b71a6f1482f2055220","score":"0.50210226","text":"public function setOffset($start_offset) {\n $this->request->setOffset($start_offset);\n }","title":""},{"docid":"b3e9e06f846a42408f9995619ad1a283","score":"0.49848324","text":"public function setStartBeginning($startbeginning)\n {\n $this->setData('start_beginning', $startbeginning);\n }","title":""},{"docid":"f2682fedc6c5d1a4b6febcfbe2c69be5","score":"0.49815136","text":"public function setLat($value)\n {\n return $this->set(self::lat, $value);\n }","title":""},{"docid":"b163e7ceb2fb26b7a23ee58771b49fcb","score":"0.49801898","text":"public function initializeAction()\r\n {\r\n $this->center = array(\r\n 'latitude' => $this->extConf->getDefaultLatitude(),\r\n 'longitude' => $this->extConf->getDefaultLongitude()\r\n );\r\n ArrayUtility::mergeRecursiveWithOverrule($this->center, $this->widgetConfiguration['center'], true);\r\n ArrayUtility::mergeRecursiveWithOverrule($this->mapOptions, $this->getMapOptions(), true);\r\n $this->width = $this->widgetConfiguration['width'];\r\n $this->height = $this->widgetConfiguration['height'];\r\n }","title":""},{"docid":"c80b4617998950a3d31c64946460a9b1","score":"0.49774024","text":"public function center() {\n\t\t$this->set_setting( 'layout', 'centered' );\n\t\treturn $this;\n\t}","title":""},{"docid":"ce5d421f7ec2a48c300e36fbadbcb401","score":"0.4922508","text":"public function setLatitude(float $latitude) {\n\t\t$this->latitude = $latitude;\n\t}","title":""},{"docid":"46a1153f9b1ecdcf8c2d5b5ba55c8900","score":"0.4899449","text":"function getCenter() {}","title":""},{"docid":"71e65638a15d75d99905939e3220ff1c","score":"0.48753217","text":"public function setLockScreenBlockControlCenter(?bool $value): void {\n $this->getBackingStore()->set('lockScreenBlockControlCenter', $value);\n }","title":""},{"docid":"dafc605044104a805a00a32b9e82ef1b","score":"0.48729238","text":"private function assign_start_of_axis() {\r\n\t\t$this -> start_axis = array('USD' => 1, 'EUR' => 1, 'CNY' => 6);\r\n\t\treturn;\r\n\t}","title":""},{"docid":"121134a1b53f2e9b886f548ef4761121","score":"0.48604578","text":"public function setStartPage($start_page)\n {\n $this->json()->start_page = $start_page;\n }","title":""},{"docid":"5d105f92367ee443c5ea4d49f7a2faed","score":"0.485321","text":"public function setSourceLat($sourceLat) {\n $this->sourceLat = $sourceLat;\n }","title":""},{"docid":"b19669b3fb71d961ff0e3c25f5e48c64","score":"0.48490983","text":"public function setCenter($center)\n {\n if (!$this->person) {\n return;\n }\n\n $person = $this->person;\n $person->centerId = $center->id;\n $person->save();\n }","title":""},{"docid":"8fff32b8d6981dfe7f897da3880a4532","score":"0.48349935","text":"public function setLat($lat)\n {\n $this->lat = $lat;\n return $this;\n }","title":""},{"docid":"dd88835ecfad9fedf4f4a925d29abebf","score":"0.48305115","text":"public function setLatitude($latitude);","title":""},{"docid":"dd88835ecfad9fedf4f4a925d29abebf","score":"0.48305115","text":"public function setLatitude($latitude);","title":""},{"docid":"bd0e1224f5a0d5166fcc7503f15dd56b","score":"0.47920635","text":"public function setStartPage($page)\n {\n $this->setData('start_page', $page);\n }","title":""},{"docid":"36b2d96086e9e86306cc473a90cb7f31","score":"0.47865036","text":"function InitialLat($North, $n0, $afo, $PHI0, $n, $bfo) {\n #Input: - _\n #northing of point (North) and northing of false origin (n0) in meters; _\n #semi major axis multiplied by central meridian scale factor (af0) in meters; _\n #latitude of false origin (PHI0) IN RADIANS; _\n #n (computed from a, b and f0) and _\n #ellipsoid semi major axis multiplied by central meridian scale factor (bf0) in meters.\n\n #REQUIRES THE \"Marc\" FUNCTION\n #THIS FUNCTION IS CALLED BY THE \"E_N_to_Lat\", \"E_N_to_Long\" and \"E_N_to_C\" FUNCTIONS\n #THIS FUNCTION IS ALSO USED ON IT'S OWN IN THE \"Projection and Transformation Calculations.xls\" SPREADSHEET\n\n #First PHI value (PHI1)\n $PHI1 = (($North - $n0) / $afo) + $PHI0;\n\n #Calculate M\n $M = $this->Marc($bfo, $n, $PHI0, $PHI1);\n\n #Calculate new PHI value (PHI2)\n $PHI2 = (($North - $n0 - $M) / $afo) + $PHI1;\n\n #Iterate to get final value for InitialLat\n While (abs($North - $n0 - $M) > 0.00001) {\n $PHI2 = (($North - $n0 - $M) / $afo) + $PHI1;\n $M = $this->Marc($bfo, $n, $PHI0, $PHI2);\n $PHI1 = $PHI2;\n }\n return $PHI2;\n }","title":""},{"docid":"b9761a100f694e54492f9cf2ec36b34e","score":"0.4780378","text":"public function setLat(string $sLat): self\n {\n $this->sLat = $sLat;\n return $this;\n }","title":""},{"docid":"61a5ffab9a131ba28c22691564239d5c","score":"0.4779424","text":"public function setLat($lat)\n {\n $this->lat = $lat;\n\n return $this;\n }","title":""},{"docid":"b89c828daa4964ac4a5fcab813389f03","score":"0.4768903","text":"public function set_start_points($start_points) {\n $this->start_points = $start_points;\n }","title":""},{"docid":"9a562a872d630b3d31cd0b43ccf62d92","score":"0.4739748","text":"public function setStartingNumber($startingNumber)\n {\n $this->startingNumber = $startingNumber;\n }","title":""},{"docid":"9b3feb9bdba584cc4b5800a0a0915933","score":"0.4734723","text":"public function setStart($value)\n {\n return $this->set(self::START, $value);\n }","title":""},{"docid":"afb023b1f46cf2c184e8ebc41048e0c7","score":"0.4731699","text":"public function testLatitudeFirstSet($value, array $expected)\n {\n Configuration::setOrder(Configuration::ORDER_LAT_FIRST);\n\n $point = new Point();\n\n $point->setLongitude($value)\n ->setLatitude($value);\n\n $this->assertEquals($expected, $point->toArray());\n $this->assertEquals($expected[0], $point->getX());\n $this->assertEquals($expected[1], $point->getLongitude());\n $this->assertEquals($expected[1], $point->getY());\n $this->assertEquals($expected[0], $point->getLatitude());\n }","title":""},{"docid":"6a3f3a70e42688c4058a91b24901d317","score":"0.4718747","text":"public function recenter($coords)\n { $x=0;\n $y=0;\n $z=0;\n foreach ($coords as $k)\n {\n $x = $x + $k[0];\n $y = $y + $k[1];\n $z = $z + $k[2];\n }\n $center[0] = round($x / count($coords),8);\n $center[1] = round($y / count($coords),8);\n $center[2] = round($z / count($coords),8);\n return $center;\n }","title":""},{"docid":"eb371452ef24f37de3634b280bde6764","score":"0.4697521","text":"public function setStartingId($id) {\n $this->startingId = $id;\n }","title":""},{"docid":"fd48878df70bf8e545232f66c97edf94","score":"0.46890584","text":"public function setOriginalStart(?DateTime $value): void {\n $this->getBackingStore()->set('originalStart', $value);\n }","title":""},{"docid":"839b7904e30c6626a50ae57bdd205e5d","score":"0.4685115","text":"function __construct() {\n\t\t$this->seat_map = array();\n\t\t$this->center = '';\n\t}","title":""},{"docid":"02ad42b2e1d99c3bc0594337bd1227d6","score":"0.46693614","text":"function SetStartPath($StartPath)\n\t\t{\n\t\t\t$this->__startPath = $StartPath;\n\t\t}","title":""},{"docid":"5b0570a91ba04bb0f5f198c3857972ca","score":"0.4667684","text":"public function setStartOffset($var)\n {\n GPBUtil::checkInt64($var);\n $this->start_offset = $var;\n\n return $this;\n }","title":""},{"docid":"ddafbfb54f5ab372ac2ae3adb2eb47ae","score":"0.4627626","text":"public function setStartingTimestamp($timestamp) {\n $this->startingTimestamp = $timestamp;\n }","title":""},{"docid":"44b144b61c97e92cda0fe4dbc2c0f8b7","score":"0.46198806","text":"public function center(bool $center = true)\n {\n $this->setAttribute('text_center', $center);\n\n if ($center) {\n $this->right(false);\n }\n\n return $this;\n }","title":""},{"docid":"1f438ea4c9276b7d903a1b4ace10e27e","score":"0.46084642","text":"private function set_coordinates() {\n\n $coords = $this->get_coordinates();\n\n $this->base_query['lat'] = $coords->location->lat;\n $this->base_query['lon'] = $coords->location->lon;\n\n print_r($this->base_query);\n\n }","title":""},{"docid":"f9d1c3b2826d983d0e9c0fd2d6086231","score":"0.46072212","text":"public function setRoot()\n\t{\n\t\t\n\t\t$this->root_path = STARTING_FOLDER;\n\t\t// get root path information\n\t\t\n\t\t$this->root_path = $this->DB->protectString($this->root_path);\n\t\t$this->DB->query(\"SELECT * FROM directory WHERE parent = '\".$this->root_path.\"'\",\"setRoot\");\n\t\t$root_info = $this->DB->fetchrow();\n\t\tif ($root_info==false)\n\t\t{\n\t\t\tif (!is_dir($this->root_path))\n\t\t\t{\n\t\t\t\techo 'error with root path';\n\t\t\t\texit();\n\t\t\t}\n\t\t\t// need to index root path...\n\t\t\t$this->root_id = $this->insertDirectory($this->root_path, '');\n\t\t\t// assign to administrator...\n\t\t\t$this->DB->query(\"INSERT into group_accesspath (group_id, directory_id) VALUES('1','\".$this->root_id.\"');\",\"setRoot\");\n\t\t\n\t\t}else{\n\t\t\t$this->root_id = $root_info['id']; \n\t\t}\n\t\t\n\t}","title":""},{"docid":"7ed3de86277a712b1790020fdb148884","score":"0.46011183","text":"public function setSelectionStart( $selectionStart )\n\t{\n\t\t$this->setAttribute( \"selectionstart\", $selectionStart );\n\t}","title":""},{"docid":"abd8d2e08f4484c95664b6b21e32cc42","score":"0.45970675","text":"public function rewind() {\n \n $this->currentLat = $this->minLat;\n $this->currentLong = $this->minLong;\n \n $this->valid = true;\n \n $this->flipped = false;\n \n \n }","title":""},{"docid":"8288cb4963648bfaf4a06b9f309b21cc","score":"0.4592267","text":"public function adjustCenterCoords($lon, $lat)\n {\n if (strlen((string) $lon) == 0 || strlen((string) $lat) == 0) {\n return false;\n }\n\n $this->_max_lon = (float) max($lon, $this->_max_lon);\n $this->_min_lon = (float) min($lon, $this->_min_lon);\n $this->_max_lat = (float) max($lat, $this->_max_lat);\n $this->_min_lat = (float) min($lat, $this->_min_lat);\n\n $this->center_lon = (float) ($this->_min_lon + $this->_max_lon) / 2;\n $this->center_lat = (float) ($this->_min_lat + $this->_max_lat) / 2;\n\n return true;\n }","title":""},{"docid":"99261910faab07cf250e03f0026548c8","score":"0.45840612","text":"public function setStartCell(string $startCell):self\n {\n $this->startCell = $startCell;\n \n return $this;\n }","title":""},{"docid":"14149431c7d8b969652bd798ed1fac71","score":"0.45840245","text":"public function setStart($var)\n {\n GPBUtil::checkInt64($var);\n $this->start = $var;\n\n return $this;\n }","title":""},{"docid":"7219ed0d1810668595735a50d5b21dcf","score":"0.45685032","text":"function centerVertically($center = 1) {\r\n $this->_vcenter = $center;\r\n }","title":""},{"docid":"176b7ee14462258f15eff515c8199ce5","score":"0.4568189","text":"public function setNorth($north);","title":""},{"docid":"3060e5bbf0747e8ddbaa299fa8cb29f8","score":"0.4546857","text":"public function setActiveCenter(Request $request)\n {\n if (!$request->has('id') || !is_numeric($request->get('id'))) {\n abort(400);\n }\n\n $center = Center::findOrFail($request->get('id'));\n\n $this->context->setCenter($center);\n\n Session::set('reportRedirect', 'center');\n\n return ['success' => true];\n }","title":""},{"docid":"f6ded4373b6e1b701088c06bcf18ba03","score":"0.4525008","text":"public function setLatitude(float $value): Search\n {\n $this->latitude = $value;\n return $this;\n }","title":""},{"docid":"3b6c71fd5ab89e2f142af4a24610eba9","score":"0.44857547","text":"public function setNortheastLatitude($value)\n {\n return $this->set('NortheastLatitude', $value);\n }","title":""},{"docid":"09f2526f98490ab79606228f481ea35f","score":"0.4457103","text":"public function setStart(\\DateTime $value)\n {\n $this->start = $value->format(\\DateTime::ISO8601);\n }","title":""},{"docid":"f9f9e224787b08297ede565d4889d758","score":"0.444316","text":"public function setMiddleinitial($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->middleinitial !== $v) {\n $this->middleinitial = $v;\n $this->modifiedColumns[EmployeeTableMap::COL_MIDDLEINITIAL] = true;\n }\n\n return $this;\n }","title":""},{"docid":"e2a1422bb369e79f3484c859270fe303","score":"0.44192332","text":"public function setRootProjectionNode(RootProjectionNode &$rootProjectionNode)\n {\n $this->_rootProjectionNode = $rootProjectionNode;\n }","title":""},{"docid":"aaba015949e39b65f1ffa7e97cb54e6a","score":"0.441792","text":"public function setStart($var)\n {\n GPBUtil::checkUint32($var);\n $this->start = $var;\n\n return $this;\n }","title":""},{"docid":"ca71932e31de1f30edff31d99ea631ca","score":"0.4415008","text":"public static function setDateDefaultLatitude($floLatitude = 0.0000, $strOperation = null)\n {\n return self::iniSet('date.default_latitude', $floLatitude, $strOperation);\n }","title":""},{"docid":"42a81c3354aa077793c54ec5eff3d2c2","score":"0.44106832","text":"public function setSouthwestLatitude($value)\n {\n return $this->set('SouthwestLatitude', $value);\n }","title":""},{"docid":"6235fbe09204e28e6ebb1cd368a48a5d","score":"0.44020778","text":"public function set_min ($min) {\n $this->min = $min;\n }","title":""},{"docid":"32f32cf0889a8a42249d51dbe98d9d47","score":"0.43849802","text":"public function setMin($min)\n {\n $this->_min = $min;\n }","title":""},{"docid":"f8c7a5687a1ebfb430664a96e5684fca","score":"0.43837643","text":"public function setControllerMap(ControllerMap $controller_map )\r\n\t{\r\n\t\t$this->controller_map = $controller_map;\r\n\t}","title":""},{"docid":"17a496622ea8422480b4ab31e72dc7ab","score":"0.43837512","text":"function SetStartURL($StartURL)\n\t\t{\n\t\t\t$this->__startURL = $StartURL;\n\t\t}","title":""},{"docid":"ff32bfd036d035368ac8046f73b8c9b0","score":"0.43823105","text":"public function set_season_start_date( $value ) {\n\t\t$this -> start_date = $value;\n\t}","title":""},{"docid":"d97b57355e27f9235efa6e46b203c022","score":"0.43789932","text":"private function calcCenter(): int {\n $score = $this->score * 2;\n $rebounds = $this->rebounds * 1;\n $assist = $this->assist * 3;\n\n $this->pointsRating = $score + $rebounds + $assist;\n\n return $this->pointsRating;\n }","title":""},{"docid":"18a02860cdaec7d436e209b59817a290","score":"0.43780056","text":"public function latitude($value)\n {\n $this->latitude = $value;\n\n return $this;\n }","title":""},{"docid":"e107c5e23428883734cf532b44a7bbeb","score":"0.436942","text":"private function setLocation(Point $p)\n {\n $x = $p->x;\n $y = $p->y;\n }","title":""},{"docid":"f25647583eaa39bda5b9cf63c791164c","score":"0.43663147","text":"public function setNorthWest( Coordinate $coordinates )\n {\n $this->north = $coordinates->getLatitude( );\n $this->west = $coordinates->getLongitude( );\n return $this;\n }","title":""},{"docid":"f89d29e7a35d947cefbfb8057854c99c","score":"0.43630093","text":"public function setInitialValue(mixed $initialValue): void\n {\n $this->initialValue = $initialValue;\n }","title":""},{"docid":"3548d17d542d1961d05470487572f271","score":"0.4362685","text":"public function setStart($start = null)\n {\n $this->start = $start;\n\n return $this;\n }","title":""},{"docid":"2db1a7108b3634233b038ac168877d61","score":"0.43615833","text":"public function setBeginAttribute($value){\n $this->attributes['begin'] = convertDateToAnotherTimeZone($value,'UTC')\n ->format('Y-m-d H:i:s');\n }","title":""},{"docid":"322c2f87b8d7abc643af18e53e513a21","score":"0.43552417","text":"public function getCenter () {\n // returns center point. since center is an object we can call point methods on this variable.\n $x = $this->center->getXCoord();\n $y = $this->center->getYCoord();\n $coords = \"[$x, $y]\";\n return $coords;\n }","title":""},{"docid":"0ebbb539d82cac9c867d7010c7d8ea9b","score":"0.43543258","text":"public function setOffset() {\n $this->offset = filter_input(INPUT_GET, \"offset\", FILTER_SANITIZE_STRING);\n if ($this->offset === NULL) {\n $this->offset = 1;\n } else {\n $this->offset = intval($this->offset);\n }\n }","title":""},{"docid":"181f14af91d726b3d8cb74cb1b4ec90e","score":"0.43499032","text":"public function SetCoordination($x,$y){\n $this->coordination[0] = $x;\n $this->coordination[1] = $y;\n }","title":""},{"docid":"9108a70f38f8783cad3505111c1d7a6f","score":"0.4344472","text":"private function center($barrio_id){\n \n $datos = $this->extentsimple($barrio_id);\n\n $xmin = $datos[\"xmin\"];\n $ymin = $datos[\"ymin\"];\n $xmax = $datos[\"xmax\"];\n $ymax = $datos[\"ymax\"];\n $xcent = ($xmax + $xmin)/2;\n $ycent = ($ymax + $ymin)/2;\n \n\n $respuesta = ParcelaPos::select(DB::raw(\"ST_AsText(ST_Transform(ST_GeomFromText('POINT($xcent $ycent)',22182),4326)) as centro\"))->first();\n \n $centro = str_replace(\"POINT(\",\"\",$respuesta->centro);\n $centro = str_replace(\")\",\"\",$centro);\n $centro = explode(\" \",$centro);\n\n $result = array(\"xcent\"=>floatval($centro[0]),\"ycent\"=>floatval($centro[1]));\n\n return $result; \n \n }","title":""},{"docid":"a5c31d49554e636f8f86e32777e71892","score":"0.43412697","text":"private function setStartUt(){\n\n\t\t// repopulate the form with criteria user selected\n\t\t$this->startMonth=$this->data['start']['month'];\n\t\t$this->startDay=$this->data['start']['day'];\n\t\t$this->startYear=$this->data['start']['year'];\n\t\t$this->start_ut=mktime(0,0,0,$this->startMonth,$this->startDay,$this->startYear);\n\n\t}","title":""},{"docid":"ada0cd6fd017c052ac0a5b57cb1418c1","score":"0.43362108","text":"public function setStartsAt($starts_at)\n {\n $this->starts_at = $starts_at;\n }","title":""},{"docid":"47c8bc4b727b7efb7ad44ba998e446b4","score":"0.43261674","text":"public function set_maps();","title":""},{"docid":"44a9d68b68da63a99db4854b6a58365d","score":"0.43222493","text":"public function setUp()\n {\n // first location\n $this->latitude1 = '50.8538510000';\n $this->longitude1 = '3.3550450000';\n // second location\n $this->latitude2 = '50.8325600000';\n $this->longitude2 = '3.4787650000';\n\n }","title":""},{"docid":"3f39a40dd65ab39980bad31da15e1b36","score":"0.43220755","text":"function setFirstSheet() {\r\n $this->firstsheet = $this->index;\r\n }","title":""},{"docid":"a095b97850c8a018697f5dd46db90f92","score":"0.43183166","text":"public function setOffsetX(int $offset) : self {\n $this -> offsetX = $offset;\n return $this;\n }","title":""},{"docid":"795a6b3645dcbbe2386e8c67eb1382f8","score":"0.43024406","text":"public function setMarker($marker) {\n $this->marker = $marker;\n }","title":""},{"docid":"c6fa5a7d9ccd36c5f68e83900e765f54","score":"0.42984173","text":"public function set_start_date($start_date)\n {\n $this->set_default_property(self::PROPERTY_START_DATE, $start_date);\n }","title":""},{"docid":"c0723af28cedbaf8d0c66fd01e17f1eb","score":"0.42977983","text":"function sunCenter($t) {\n $m = geoMeanAnomalySun($t);\n\n $m = deg2rad($m);\n $sinm = sin($m);\n $sin2m = sin(2*$m);\n $sin3m = sin(3*$m);\n\n $C = $sinm * (1.914602 - $t * (0.004817 + 0.000014 * $t)) + $sin2m * (0.019993 - 0.000101 * $t) + $sin3m * 0.000289;\n \n return $C;\t\t// in degrees\n}","title":""},{"docid":"3491e565f2acc7f791534472ecf47ed9","score":"0.42887214","text":"public function getLatitudeReturnsInitialValueForFloat() {\n\t\t$this->assertSame(0.0, $this->subject->getlatitude());\n\t}","title":""}],"string":"[\n {\n \"docid\": \"6a9053a24fd5498964cafec7d9b13447\",\n \"score\": \"0.6044059\",\n \"text\": \"public function autoCenter()\\n {\\n $center = $this->bounds->getCenter();\\n\\n if($center->getLat() && $center->getLng()) {\\n $this->setCenter($center->getLat(), $center->getLng());\\n }\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ecf259fdfcd5e701aba88471b4eea28\",\n \"score\": \"0.5999467\",\n \"text\": \"public function setCenterCoords($centerCoords)\\n {\\n $this->center_coords = $centerCoords;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"315bb2d1fc3633f398b8bdaf35cdbe1b\",\n \"score\": \"0.59718275\",\n \"text\": \"public function setStart(float $lat, float $lon)\\n\\t{\\n\\t\\t$this->start = ['lat' => $lat, 'lon' => $lon];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6768a62fedbf9f5e9e2c8e3a283add5b\",\n \"score\": \"0.574154\",\n \"text\": \"public function setCenter($lat = NULL, $lng = NULL)\\n {\\n if ($lat == null && $lng == null)\\n {\\n $this->autoCenter();\\n }\\n else\\n {\\n if ($lat != NULL)\\n {\\n $this->lat = Tx_Listfeusers_Gmap::validate_latitude($lat);\\n }\\n if ($lng != NULL)\\n {\\n $this->lng = Tx_Listfeusers_Gmap::validate_longitude($lng);\\n }\\n }\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0a0dc5fd4d92994252aadde435d89a2\",\n \"score\": \"0.5533244\",\n \"text\": \"public function setLatitudeSetsLatitude() {\\n\\t\\t$this->subject->setlatitude(12.345678);\\n\\t\\t$this->assertSame(12.345678, $this->subject->getlatitude());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ecf603c829bd9d728ddf95db3465b828\",\n \"score\": \"0.5509961\",\n \"text\": \"function centerHorizontally($center = 1) {\\r\\n $this->_hcenter = $center;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fd4b63f3b71ca60e13daa0af4f6491a\",\n \"score\": \"0.549084\",\n \"text\": \"public function set_center($latitude, $longitude, $zoom = 4, $map_type = null)\\n {\\n return 'this.GMap.setCenter(' . $this->glatlng($latitude, $longitude) . ', ' . (int) $zoom . ( $map_type ? ', ' . $map_type : '' ) . \\\");\\\\n\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93b7992c35ae8565c55c87ef729008dc\",\n \"score\": \"0.53637624\",\n \"text\": \"public function setStartPoint($start);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d56e602e244262b48c05973306dbf211\",\n \"score\": \"0.53453296\",\n \"text\": \"public function setStart($val)\\n {\\n $this->start = $val;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5bbfe4e759f21acf99195d46e07239e6\",\n \"score\": \"0.5270356\",\n \"text\": \"public function getCentre()\\n {\\n $shapeParams = $this->getData();\\n if ($this->getType() == \\\"circle\\\") {\\n $this->setLatCenter($shapeParams[\\\"center\\\"][0]);\\n $this->setLonCenter($shapeParams[\\\"center\\\"][1]);\\n } else if ($this->getType() == \\\"rectangle\\\") {\\n $swlat = $this->getSwLatitude();\\n $swLon = $this->getSwLongitude();\\n $neLat = $this->getNeLatitude();\\n $neLon = $this->getNeLongitude();\\n $this->setLatCenter($neLat + ($swlat - $neLat) / 2);\\n $this->setLonCenter($neLon + ($swLon - $neLon) / 2);\\n } else if ($this->getType() == \\\"polygon\\\" || $this->getType() == \\\"polyline\\\") {\\n $PI = 22 / 7;\\n $X = 0;\\n $Y = 0;\\n $Z = 0;\\n foreach ($shapeParams[\\\"paths\\\"] as $point) {\\n $lat1 = $point[0];\\n $lon1 = $point[1];\\n $lat1 = $lat1 * $PI / 180;\\n $lon1 = $lon1 * $PI / 180;\\n $X += cos($lat1) * cos($lon1);\\n $Y += cos($lat1) * sin($lon1);\\n $Z += sin($lat1);\\n }\\n $Lon = atan2($Y, $X);\\n $Hyp = sqrt($X * $X + $Y * $Y);\\n $Lat = atan2($Z, $Hyp);\\n $Lat = $Lat * 180 / $PI;\\n $Lon = $Lon * 180 / $PI;\\n $this->setLatCenter($Lat);\\n $this->setLonCenter($Lon);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4621c7b3fa4ab17d4b5ec8cd074a06f\",\n \"score\": \"0.52547723\",\n \"text\": \"public function setFirstPos(): void\\n {\\n if ($this->pvpAreaInfo === null) {\\n $this->pvpAreaInfo = new stdClass();\\n }\\n\\n $this->pvpAreaInfo->firstPos = $this->asVector3();\\n\\n $this->sendMessage(Utils::getPrefix() . TextFormat::GREEN . \\\" Successfully set the first position of the PvPArea.\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c39df8d736afc777d2511595b695429\",\n \"score\": \"0.5251983\",\n \"text\": \"public function setLat($lat) {\\n $this->lat = $lat;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"28140358df7ba59d01a8622b49b71a45\",\n \"score\": \"0.5249489\",\n \"text\": \"public function setStart($start) {\\n\\t\\t$this->start = $start;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b004cc97092a3849f0a0f8fbfa0ee925\",\n \"score\": \"0.52478874\",\n \"text\": \"function setStart( $value )\\n {\\n if( $this->State_ == \\\"Dirty\\\" )\\n $this->get( $this->ID );\\n\\n $this->Start = $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c37ebb91c12651612eb4037264c8a2d\",\n \"score\": \"0.52406216\",\n \"text\": \"public function setCentered($value)\\r\\n {\\r\\n $this->centered = $this->setBooleanProperty($this->centered, $value);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6240d054cd650a6ad387812a092716f2\",\n \"score\": \"0.51997125\",\n \"text\": \"public function setLat($lat)\\n {\\n $this->lat = $lat;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa5c79367d90887ca7188bcd5286f8bd\",\n \"score\": \"0.51847386\",\n \"text\": \"abstract public function setStart($start);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db383e4ef0937ff78bfe7eb85f1084eb\",\n \"score\": \"0.5184463\",\n \"text\": \"public function setStart($start)\\n {\\n $this->start = $start;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ceec5f8af1c4cc7aef5ff0603284428\",\n \"score\": \"0.51594424\",\n \"text\": \"public function setLatitude($lat)\\n {\\n $this->campos['lat'] = $lat;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d67c54b93527f5c7af005408b2c63b00\",\n \"score\": \"0.5149759\",\n \"text\": \"public function getCenter()\\n {\\n return $this->center;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a5eeb1942f866baa1698b8bea657f68\",\n \"score\": \"0.51357126\",\n \"text\": \"public function getCenter() {\\n return $this->center;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d36820673a3565e03e0fb5befc41616\",\n \"score\": \"0.5063625\",\n \"text\": \"public function setLatitude($value)\\n {\\n return $this->set('Latitude', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d36820673a3565e03e0fb5befc41616\",\n \"score\": \"0.5063625\",\n \"text\": \"public function setLatitude($value)\\n {\\n return $this->set('Latitude', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da9fccd27df4aad4781a497d1f3bf588\",\n \"score\": \"0.50571316\",\n \"text\": \"function reCenter($x, $y) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a093e3a575e8b6f84fdecb4fd9ab2080\",\n \"score\": \"0.5024473\",\n \"text\": \"public function setStart(?DateTimeTimeZone $value): void {\\n $this->getBackingStore()->set('start', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f9849133d9899b71a6f1482f2055220\",\n \"score\": \"0.50210226\",\n \"text\": \"public function setOffset($start_offset) {\\n $this->request->setOffset($start_offset);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3e9e06f846a42408f9995619ad1a283\",\n \"score\": \"0.49848324\",\n \"text\": \"public function setStartBeginning($startbeginning)\\n {\\n $this->setData('start_beginning', $startbeginning);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2682fedc6c5d1a4b6febcfbe2c69be5\",\n \"score\": \"0.49815136\",\n \"text\": \"public function setLat($value)\\n {\\n return $this->set(self::lat, $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b163e7ceb2fb26b7a23ee58771b49fcb\",\n \"score\": \"0.49801898\",\n \"text\": \"public function initializeAction()\\r\\n {\\r\\n $this->center = array(\\r\\n 'latitude' => $this->extConf->getDefaultLatitude(),\\r\\n 'longitude' => $this->extConf->getDefaultLongitude()\\r\\n );\\r\\n ArrayUtility::mergeRecursiveWithOverrule($this->center, $this->widgetConfiguration['center'], true);\\r\\n ArrayUtility::mergeRecursiveWithOverrule($this->mapOptions, $this->getMapOptions(), true);\\r\\n $this->width = $this->widgetConfiguration['width'];\\r\\n $this->height = $this->widgetConfiguration['height'];\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c80b4617998950a3d31c64946460a9b1\",\n \"score\": \"0.49774024\",\n \"text\": \"public function center() {\\n\\t\\t$this->set_setting( 'layout', 'centered' );\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce5d421f7ec2a48c300e36fbadbcb401\",\n \"score\": \"0.4922508\",\n \"text\": \"public function setLatitude(float $latitude) {\\n\\t\\t$this->latitude = $latitude;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46a1153f9b1ecdcf8c2d5b5ba55c8900\",\n \"score\": \"0.4899449\",\n \"text\": \"function getCenter() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71e65638a15d75d99905939e3220ff1c\",\n \"score\": \"0.48753217\",\n \"text\": \"public function setLockScreenBlockControlCenter(?bool $value): void {\\n $this->getBackingStore()->set('lockScreenBlockControlCenter', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dafc605044104a805a00a32b9e82ef1b\",\n \"score\": \"0.48729238\",\n \"text\": \"private function assign_start_of_axis() {\\r\\n\\t\\t$this -> start_axis = array('USD' => 1, 'EUR' => 1, 'CNY' => 6);\\r\\n\\t\\treturn;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"121134a1b53f2e9b886f548ef4761121\",\n \"score\": \"0.48604578\",\n \"text\": \"public function setStartPage($start_page)\\n {\\n $this->json()->start_page = $start_page;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d105f92367ee443c5ea4d49f7a2faed\",\n \"score\": \"0.485321\",\n \"text\": \"public function setSourceLat($sourceLat) {\\n $this->sourceLat = $sourceLat;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b19669b3fb71d961ff0e3c25f5e48c64\",\n \"score\": \"0.48490983\",\n \"text\": \"public function setCenter($center)\\n {\\n if (!$this->person) {\\n return;\\n }\\n\\n $person = $this->person;\\n $person->centerId = $center->id;\\n $person->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fff32b8d6981dfe7f897da3880a4532\",\n \"score\": \"0.48349935\",\n \"text\": \"public function setLat($lat)\\n {\\n $this->lat = $lat;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd88835ecfad9fedf4f4a925d29abebf\",\n \"score\": \"0.48305115\",\n \"text\": \"public function setLatitude($latitude);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd88835ecfad9fedf4f4a925d29abebf\",\n \"score\": \"0.48305115\",\n \"text\": \"public function setLatitude($latitude);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd0e1224f5a0d5166fcc7503f15dd56b\",\n \"score\": \"0.47920635\",\n \"text\": \"public function setStartPage($page)\\n {\\n $this->setData('start_page', $page);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36b2d96086e9e86306cc473a90cb7f31\",\n \"score\": \"0.47865036\",\n \"text\": \"function InitialLat($North, $n0, $afo, $PHI0, $n, $bfo) {\\n #Input: - _\\n #northing of point (North) and northing of false origin (n0) in meters; _\\n #semi major axis multiplied by central meridian scale factor (af0) in meters; _\\n #latitude of false origin (PHI0) IN RADIANS; _\\n #n (computed from a, b and f0) and _\\n #ellipsoid semi major axis multiplied by central meridian scale factor (bf0) in meters.\\n\\n #REQUIRES THE \\\"Marc\\\" FUNCTION\\n #THIS FUNCTION IS CALLED BY THE \\\"E_N_to_Lat\\\", \\\"E_N_to_Long\\\" and \\\"E_N_to_C\\\" FUNCTIONS\\n #THIS FUNCTION IS ALSO USED ON IT'S OWN IN THE \\\"Projection and Transformation Calculations.xls\\\" SPREADSHEET\\n\\n #First PHI value (PHI1)\\n $PHI1 = (($North - $n0) / $afo) + $PHI0;\\n\\n #Calculate M\\n $M = $this->Marc($bfo, $n, $PHI0, $PHI1);\\n\\n #Calculate new PHI value (PHI2)\\n $PHI2 = (($North - $n0 - $M) / $afo) + $PHI1;\\n\\n #Iterate to get final value for InitialLat\\n While (abs($North - $n0 - $M) > 0.00001) {\\n $PHI2 = (($North - $n0 - $M) / $afo) + $PHI1;\\n $M = $this->Marc($bfo, $n, $PHI0, $PHI2);\\n $PHI1 = $PHI2;\\n }\\n return $PHI2;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9761a100f694e54492f9cf2ec36b34e\",\n \"score\": \"0.4780378\",\n \"text\": \"public function setLat(string $sLat): self\\n {\\n $this->sLat = $sLat;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61a5ffab9a131ba28c22691564239d5c\",\n \"score\": \"0.4779424\",\n \"text\": \"public function setLat($lat)\\n {\\n $this->lat = $lat;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b89c828daa4964ac4a5fcab813389f03\",\n \"score\": \"0.4768903\",\n \"text\": \"public function set_start_points($start_points) {\\n $this->start_points = $start_points;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a562a872d630b3d31cd0b43ccf62d92\",\n \"score\": \"0.4739748\",\n \"text\": \"public function setStartingNumber($startingNumber)\\n {\\n $this->startingNumber = $startingNumber;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b3feb9bdba584cc4b5800a0a0915933\",\n \"score\": \"0.4734723\",\n \"text\": \"public function setStart($value)\\n {\\n return $this->set(self::START, $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afb023b1f46cf2c184e8ebc41048e0c7\",\n \"score\": \"0.4731699\",\n \"text\": \"public function testLatitudeFirstSet($value, array $expected)\\n {\\n Configuration::setOrder(Configuration::ORDER_LAT_FIRST);\\n\\n $point = new Point();\\n\\n $point->setLongitude($value)\\n ->setLatitude($value);\\n\\n $this->assertEquals($expected, $point->toArray());\\n $this->assertEquals($expected[0], $point->getX());\\n $this->assertEquals($expected[1], $point->getLongitude());\\n $this->assertEquals($expected[1], $point->getY());\\n $this->assertEquals($expected[0], $point->getLatitude());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a3f3a70e42688c4058a91b24901d317\",\n \"score\": \"0.4718747\",\n \"text\": \"public function recenter($coords)\\n { $x=0;\\n $y=0;\\n $z=0;\\n foreach ($coords as $k)\\n {\\n $x = $x + $k[0];\\n $y = $y + $k[1];\\n $z = $z + $k[2];\\n }\\n $center[0] = round($x / count($coords),8);\\n $center[1] = round($y / count($coords),8);\\n $center[2] = round($z / count($coords),8);\\n return $center;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb371452ef24f37de3634b280bde6764\",\n \"score\": \"0.4697521\",\n \"text\": \"public function setStartingId($id) {\\n $this->startingId = $id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd48878df70bf8e545232f66c97edf94\",\n \"score\": \"0.46890584\",\n \"text\": \"public function setOriginalStart(?DateTime $value): void {\\n $this->getBackingStore()->set('originalStart', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"839b7904e30c6626a50ae57bdd205e5d\",\n \"score\": \"0.4685115\",\n \"text\": \"function __construct() {\\n\\t\\t$this->seat_map = array();\\n\\t\\t$this->center = '';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02ad42b2e1d99c3bc0594337bd1227d6\",\n \"score\": \"0.46693614\",\n \"text\": \"function SetStartPath($StartPath)\\n\\t\\t{\\n\\t\\t\\t$this->__startPath = $StartPath;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b0570a91ba04bb0f5f198c3857972ca\",\n \"score\": \"0.4667684\",\n \"text\": \"public function setStartOffset($var)\\n {\\n GPBUtil::checkInt64($var);\\n $this->start_offset = $var;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddafbfb54f5ab372ac2ae3adb2eb47ae\",\n \"score\": \"0.4627626\",\n \"text\": \"public function setStartingTimestamp($timestamp) {\\n $this->startingTimestamp = $timestamp;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44b144b61c97e92cda0fe4dbc2c0f8b7\",\n \"score\": \"0.46198806\",\n \"text\": \"public function center(bool $center = true)\\n {\\n $this->setAttribute('text_center', $center);\\n\\n if ($center) {\\n $this->right(false);\\n }\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f438ea4c9276b7d903a1b4ace10e27e\",\n \"score\": \"0.46084642\",\n \"text\": \"private function set_coordinates() {\\n\\n $coords = $this->get_coordinates();\\n\\n $this->base_query['lat'] = $coords->location->lat;\\n $this->base_query['lon'] = $coords->location->lon;\\n\\n print_r($this->base_query);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9d1c3b2826d983d0e9c0fd2d6086231\",\n \"score\": \"0.46072212\",\n \"text\": \"public function setRoot()\\n\\t{\\n\\t\\t\\n\\t\\t$this->root_path = STARTING_FOLDER;\\n\\t\\t// get root path information\\n\\t\\t\\n\\t\\t$this->root_path = $this->DB->protectString($this->root_path);\\n\\t\\t$this->DB->query(\\\"SELECT * FROM directory WHERE parent = '\\\".$this->root_path.\\\"'\\\",\\\"setRoot\\\");\\n\\t\\t$root_info = $this->DB->fetchrow();\\n\\t\\tif ($root_info==false)\\n\\t\\t{\\n\\t\\t\\tif (!is_dir($this->root_path))\\n\\t\\t\\t{\\n\\t\\t\\t\\techo 'error with root path';\\n\\t\\t\\t\\texit();\\n\\t\\t\\t}\\n\\t\\t\\t// need to index root path...\\n\\t\\t\\t$this->root_id = $this->insertDirectory($this->root_path, '');\\n\\t\\t\\t// assign to administrator...\\n\\t\\t\\t$this->DB->query(\\\"INSERT into group_accesspath (group_id, directory_id) VALUES('1','\\\".$this->root_id.\\\"');\\\",\\\"setRoot\\\");\\n\\t\\t\\n\\t\\t}else{\\n\\t\\t\\t$this->root_id = $root_info['id']; \\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ed3de86277a712b1790020fdb148884\",\n \"score\": \"0.46011183\",\n \"text\": \"public function setSelectionStart( $selectionStart )\\n\\t{\\n\\t\\t$this->setAttribute( \\\"selectionstart\\\", $selectionStart );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"abd8d2e08f4484c95664b6b21e32cc42\",\n \"score\": \"0.45970675\",\n \"text\": \"public function rewind() {\\n \\n $this->currentLat = $this->minLat;\\n $this->currentLong = $this->minLong;\\n \\n $this->valid = true;\\n \\n $this->flipped = false;\\n \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8288cb4963648bfaf4a06b9f309b21cc\",\n \"score\": \"0.4592267\",\n \"text\": \"public function adjustCenterCoords($lon, $lat)\\n {\\n if (strlen((string) $lon) == 0 || strlen((string) $lat) == 0) {\\n return false;\\n }\\n\\n $this->_max_lon = (float) max($lon, $this->_max_lon);\\n $this->_min_lon = (float) min($lon, $this->_min_lon);\\n $this->_max_lat = (float) max($lat, $this->_max_lat);\\n $this->_min_lat = (float) min($lat, $this->_min_lat);\\n\\n $this->center_lon = (float) ($this->_min_lon + $this->_max_lon) / 2;\\n $this->center_lat = (float) ($this->_min_lat + $this->_max_lat) / 2;\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99261910faab07cf250e03f0026548c8\",\n \"score\": \"0.45840612\",\n \"text\": \"public function setStartCell(string $startCell):self\\n {\\n $this->startCell = $startCell;\\n \\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14149431c7d8b969652bd798ed1fac71\",\n \"score\": \"0.45840245\",\n \"text\": \"public function setStart($var)\\n {\\n GPBUtil::checkInt64($var);\\n $this->start = $var;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7219ed0d1810668595735a50d5b21dcf\",\n \"score\": \"0.45685032\",\n \"text\": \"function centerVertically($center = 1) {\\r\\n $this->_vcenter = $center;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"176b7ee14462258f15eff515c8199ce5\",\n \"score\": \"0.4568189\",\n \"text\": \"public function setNorth($north);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3060e5bbf0747e8ddbaa299fa8cb29f8\",\n \"score\": \"0.4546857\",\n \"text\": \"public function setActiveCenter(Request $request)\\n {\\n if (!$request->has('id') || !is_numeric($request->get('id'))) {\\n abort(400);\\n }\\n\\n $center = Center::findOrFail($request->get('id'));\\n\\n $this->context->setCenter($center);\\n\\n Session::set('reportRedirect', 'center');\\n\\n return ['success' => true];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6ded4373b6e1b701088c06bcf18ba03\",\n \"score\": \"0.4525008\",\n \"text\": \"public function setLatitude(float $value): Search\\n {\\n $this->latitude = $value;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b6c71fd5ab89e2f142af4a24610eba9\",\n \"score\": \"0.44857547\",\n \"text\": \"public function setNortheastLatitude($value)\\n {\\n return $this->set('NortheastLatitude', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09f2526f98490ab79606228f481ea35f\",\n \"score\": \"0.4457103\",\n \"text\": \"public function setStart(\\\\DateTime $value)\\n {\\n $this->start = $value->format(\\\\DateTime::ISO8601);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9f9e224787b08297ede565d4889d758\",\n \"score\": \"0.444316\",\n \"text\": \"public function setMiddleinitial($v)\\n {\\n if ($v !== null) {\\n $v = (string) $v;\\n }\\n\\n if ($this->middleinitial !== $v) {\\n $this->middleinitial = $v;\\n $this->modifiedColumns[EmployeeTableMap::COL_MIDDLEINITIAL] = true;\\n }\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2a1422bb369e79f3484c859270fe303\",\n \"score\": \"0.44192332\",\n \"text\": \"public function setRootProjectionNode(RootProjectionNode &$rootProjectionNode)\\n {\\n $this->_rootProjectionNode = $rootProjectionNode;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aaba015949e39b65f1ffa7e97cb54e6a\",\n \"score\": \"0.441792\",\n \"text\": \"public function setStart($var)\\n {\\n GPBUtil::checkUint32($var);\\n $this->start = $var;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca71932e31de1f30edff31d99ea631ca\",\n \"score\": \"0.4415008\",\n \"text\": \"public static function setDateDefaultLatitude($floLatitude = 0.0000, $strOperation = null)\\n {\\n return self::iniSet('date.default_latitude', $floLatitude, $strOperation);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42a81c3354aa077793c54ec5eff3d2c2\",\n \"score\": \"0.44106832\",\n \"text\": \"public function setSouthwestLatitude($value)\\n {\\n return $this->set('SouthwestLatitude', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6235fbe09204e28e6ebb1cd368a48a5d\",\n \"score\": \"0.44020778\",\n \"text\": \"public function set_min ($min) {\\n $this->min = $min;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32f32cf0889a8a42249d51dbe98d9d47\",\n \"score\": \"0.43849802\",\n \"text\": \"public function setMin($min)\\n {\\n $this->_min = $min;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8c7a5687a1ebfb430664a96e5684fca\",\n \"score\": \"0.43837643\",\n \"text\": \"public function setControllerMap(ControllerMap $controller_map )\\r\\n\\t{\\r\\n\\t\\t$this->controller_map = $controller_map;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"17a496622ea8422480b4ab31e72dc7ab\",\n \"score\": \"0.43837512\",\n \"text\": \"function SetStartURL($StartURL)\\n\\t\\t{\\n\\t\\t\\t$this->__startURL = $StartURL;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff32bfd036d035368ac8046f73b8c9b0\",\n \"score\": \"0.43823105\",\n \"text\": \"public function set_season_start_date( $value ) {\\n\\t\\t$this -> start_date = $value;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d97b57355e27f9235efa6e46b203c022\",\n \"score\": \"0.43789932\",\n \"text\": \"private function calcCenter(): int {\\n $score = $this->score * 2;\\n $rebounds = $this->rebounds * 1;\\n $assist = $this->assist * 3;\\n\\n $this->pointsRating = $score + $rebounds + $assist;\\n\\n return $this->pointsRating;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18a02860cdaec7d436e209b59817a290\",\n \"score\": \"0.43780056\",\n \"text\": \"public function latitude($value)\\n {\\n $this->latitude = $value;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e107c5e23428883734cf532b44a7bbeb\",\n \"score\": \"0.436942\",\n \"text\": \"private function setLocation(Point $p)\\n {\\n $x = $p->x;\\n $y = $p->y;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f25647583eaa39bda5b9cf63c791164c\",\n \"score\": \"0.43663147\",\n \"text\": \"public function setNorthWest( Coordinate $coordinates )\\n {\\n $this->north = $coordinates->getLatitude( );\\n $this->west = $coordinates->getLongitude( );\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f89d29e7a35d947cefbfb8057854c99c\",\n \"score\": \"0.43630093\",\n \"text\": \"public function setInitialValue(mixed $initialValue): void\\n {\\n $this->initialValue = $initialValue;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3548d17d542d1961d05470487572f271\",\n \"score\": \"0.4362685\",\n \"text\": \"public function setStart($start = null)\\n {\\n $this->start = $start;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2db1a7108b3634233b038ac168877d61\",\n \"score\": \"0.43615833\",\n \"text\": \"public function setBeginAttribute($value){\\n $this->attributes['begin'] = convertDateToAnotherTimeZone($value,'UTC')\\n ->format('Y-m-d H:i:s');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"322c2f87b8d7abc643af18e53e513a21\",\n \"score\": \"0.43552417\",\n \"text\": \"public function getCenter () {\\n // returns center point. since center is an object we can call point methods on this variable.\\n $x = $this->center->getXCoord();\\n $y = $this->center->getYCoord();\\n $coords = \\\"[$x, $y]\\\";\\n return $coords;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ebbb539d82cac9c867d7010c7d8ea9b\",\n \"score\": \"0.43543258\",\n \"text\": \"public function setOffset() {\\n $this->offset = filter_input(INPUT_GET, \\\"offset\\\", FILTER_SANITIZE_STRING);\\n if ($this->offset === NULL) {\\n $this->offset = 1;\\n } else {\\n $this->offset = intval($this->offset);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"181f14af91d726b3d8cb74cb1b4ec90e\",\n \"score\": \"0.43499032\",\n \"text\": \"public function SetCoordination($x,$y){\\n $this->coordination[0] = $x;\\n $this->coordination[1] = $y;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9108a70f38f8783cad3505111c1d7a6f\",\n \"score\": \"0.4344472\",\n \"text\": \"private function center($barrio_id){\\n \\n $datos = $this->extentsimple($barrio_id);\\n\\n $xmin = $datos[\\\"xmin\\\"];\\n $ymin = $datos[\\\"ymin\\\"];\\n $xmax = $datos[\\\"xmax\\\"];\\n $ymax = $datos[\\\"ymax\\\"];\\n $xcent = ($xmax + $xmin)/2;\\n $ycent = ($ymax + $ymin)/2;\\n \\n\\n $respuesta = ParcelaPos::select(DB::raw(\\\"ST_AsText(ST_Transform(ST_GeomFromText('POINT($xcent $ycent)',22182),4326)) as centro\\\"))->first();\\n \\n $centro = str_replace(\\\"POINT(\\\",\\\"\\\",$respuesta->centro);\\n $centro = str_replace(\\\")\\\",\\\"\\\",$centro);\\n $centro = explode(\\\" \\\",$centro);\\n\\n $result = array(\\\"xcent\\\"=>floatval($centro[0]),\\\"ycent\\\"=>floatval($centro[1]));\\n\\n return $result; \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5c31d49554e636f8f86e32777e71892\",\n \"score\": \"0.43412697\",\n \"text\": \"private function setStartUt(){\\n\\n\\t\\t// repopulate the form with criteria user selected\\n\\t\\t$this->startMonth=$this->data['start']['month'];\\n\\t\\t$this->startDay=$this->data['start']['day'];\\n\\t\\t$this->startYear=$this->data['start']['year'];\\n\\t\\t$this->start_ut=mktime(0,0,0,$this->startMonth,$this->startDay,$this->startYear);\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ada0cd6fd017c052ac0a5b57cb1418c1\",\n \"score\": \"0.43362108\",\n \"text\": \"public function setStartsAt($starts_at)\\n {\\n $this->starts_at = $starts_at;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47c8bc4b727b7efb7ad44ba998e446b4\",\n \"score\": \"0.43261674\",\n \"text\": \"public function set_maps();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44a9d68b68da63a99db4854b6a58365d\",\n \"score\": \"0.43222493\",\n \"text\": \"public function setUp()\\n {\\n // first location\\n $this->latitude1 = '50.8538510000';\\n $this->longitude1 = '3.3550450000';\\n // second location\\n $this->latitude2 = '50.8325600000';\\n $this->longitude2 = '3.4787650000';\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f39a40dd65ab39980bad31da15e1b36\",\n \"score\": \"0.43220755\",\n \"text\": \"function setFirstSheet() {\\r\\n $this->firstsheet = $this->index;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a095b97850c8a018697f5dd46db90f92\",\n \"score\": \"0.43183166\",\n \"text\": \"public function setOffsetX(int $offset) : self {\\n $this -> offsetX = $offset;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"795a6b3645dcbbe2386e8c67eb1382f8\",\n \"score\": \"0.43024406\",\n \"text\": \"public function setMarker($marker) {\\n $this->marker = $marker;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6fa5a7d9ccd36c5f68e83900e765f54\",\n \"score\": \"0.42984173\",\n \"text\": \"public function set_start_date($start_date)\\n {\\n $this->set_default_property(self::PROPERTY_START_DATE, $start_date);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0723af28cedbaf8d0c66fd01e17f1eb\",\n \"score\": \"0.42977983\",\n \"text\": \"function sunCenter($t) {\\n $m = geoMeanAnomalySun($t);\\n\\n $m = deg2rad($m);\\n $sinm = sin($m);\\n $sin2m = sin(2*$m);\\n $sin3m = sin(3*$m);\\n\\n $C = $sinm * (1.914602 - $t * (0.004817 + 0.000014 * $t)) + $sin2m * (0.019993 - 0.000101 * $t) + $sin3m * 0.000289;\\n \\n return $C;\\t\\t// in degrees\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3491e565f2acc7f791534472ecf47ed9\",\n \"score\": \"0.42887214\",\n \"text\": \"public function getLatitudeReturnsInitialValueForFloat() {\\n\\t\\t$this->assertSame(0.0, $this->subject->getlatitude());\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":755,"cells":{"query_id":{"kind":"string","value":"1e7f38bdd092db0d2ed3d8869d55988a"},"query":{"kind":"string","value":"Get the details of this booking"},"positive_passages":{"kind":"list like","value":[{"docid":"c9edf5e980e057c440c3a4ec63677cd6","score":"0.0","text":"function dspDayBooking($id)\n{\n\t$query = \"SELECT m.first_name, m.last_name, b.booking_id, b.status, b.booking_date,\n DATE_ADD(b.booking_date, INTERVAL 14 DAY) AS deposit_due\n\tFROM edelweiss_days AS d, edelweiss_booking AS b, edelweiss_members AS m\n\tWHERE b.booking_id = $id\n\tAND d.booking_id = b.booking_id\n\tAND b.member_id = m.member_id\n\tLIMIT 20\";\n\t$result = mysqli_query($conn, $query);\n\tif (! $result ) die (\"
    Database Error:
    \". mysqli_error() .\"

    \");\n\t$query_data = mysqli_fetch_array($result);\n\t$name = $query_data[\"first_name\"].\" \".$query_data[\"last_name\"];\n\t$booking_date = $query_data[\"booking_date\"];\n\t$status = $query_data['status'];\n\t$colour = getStatusColour($status);\n $deposit_due = $query_data['deposit_due'];\n\n\t\n\techo \"

    \".$name.\"

    \";\n\techo \"Booking Number: \".$id.\"

    \";\n\techo \"Booking was made on \".$booking_date.\"

    \";\n\techo \"Current Status: $status

    \";\n\t\n\t// New Query to get each day of this booking\n\t$query = \"SELECT date, members, juniors, adult_guests, child_guests,\n\tmembers + juniors + adult_guests + child_guests AS total\n\tFROM edelweiss_days AS d, edelweiss_booking AS b\n\tWHERE b.booking_id = $id\n\tAND d.booking_id = b.booking_id\n\tORDER BY date\n\tLIMIT 20\";\n\t$result = mysqli_query($conn, $query);\n\tif (! $result ) die (\"


    Database Error:
    \". mysqli_error() .\"

    \");\n\t$total_cost = 0;\n\t\n\techo \"\";\n\techo \"\".\n\t\t\"\";\n\twhile ($query_data = mysqli_fetch_array($result))\n\t{\n\t\t$date = $query_data[\"date\"];\n\t\t$members = $query_data[\"members\"];\n\t\t$juniors = $query_data[\"juniors\"];\n\t\t$adult_guests = $query_data[\"adult_guests\"];\n\t\t$child_guests = $query_data[\"child_guests\"];\n\t\t\n//\t\t$total_cost = $total_cost + $members * 16.50 + $juniors * 8.0 + $adult_guests * 40.0 + $child_guests * 16.50;\n\t\t$cost = getCost($date, $members, $juniors, $adult_guests, $child_guests);\n\t\t$total_cost = $total_cost + $cost;\n\t\t\n\t\tif ($members == 0) $members = \"-\";\n\t\tif ($juniors == 0) $juniors = \"-\";\n\t\tif ($adult_guests == 0) $adult_guests = \"-\";\n\t\tif ($child_guests == 0) $child_guests = \"-\";\n\t\t\n\t\techo \"\";\n\t\techo \"\";\n\t\techo \"\";\n\t\techo \"\";\n\t\techo \"\";\n\t\techo \"\";\n\t\techo \"\";\n\t}\n\tprintf( \"\", $total_cost);\n\techo \"
    DateMembersJuniorsAdult GuestsChild GuestsTotal BedsCost
    \" . $date .\"\" . $members .\"\" . $juniors .\"\" . $adult_guests .\"\" . $child_guests .\"\" . $query_data[\"total\"] .\"\" . sprintf(\"$%01.2f\", $cost) .\"
    Total Cost$%01.2f

    \";\n printf( \"

    A deposit of $%01.2f is due by %s
    \\n\", $total_cost * 0.30, $deposit_due);\n\t\n\techo \"

    Payments

    \";\n\t$query = \"SELECT date, amount, type, details \n\tFROM edelweiss_payments AS p\n\tWHERE p.booking_id = $id\n\tLIMIT 20\";\n\t$result = mysqli_query($conn, $query);\n\tif (! $result ) die (\"
    Database Error:
    \". mysqli_error() .\"

    \");\n\t$paid = 0;\n\t\n\techo \"\";\n\techo \"\".\n\t\t\"\";\n\twhile ($query_data = mysqli_fetch_array($result))\n\t{\n\t\t$date = $query_data[\"date\"];\n\t\t$amount = $query_data[\"amount\"];\n\t\t$type = $query_data[\"type\"];\n\t\t$details = $query_data[\"details\"];\n\t\t\n\t\t$paid = $paid + $amount;\n\t\techo \"\";\n\t\techo \"\";\n\t\techo \"\";\n\t\tprintf( \"\", $amount);\n\t}\t\n\tprintf( \"\", $paid);\n\techo \"
    DateTypeDetialsAmount
    \" . $date .\"\" . $type .\"\" . $details .\"$%01.2f
    Total Amount Paid$%01.2f

    \";\n}","title":""}],"string":"[\n {\n \"docid\": \"c9edf5e980e057c440c3a4ec63677cd6\",\n \"score\": \"0.0\",\n \"text\": \"function dspDayBooking($id)\\n{\\n\\t$query = \\\"SELECT m.first_name, m.last_name, b.booking_id, b.status, b.booking_date,\\n DATE_ADD(b.booking_date, INTERVAL 14 DAY) AS deposit_due\\n\\tFROM edelweiss_days AS d, edelweiss_booking AS b, edelweiss_members AS m\\n\\tWHERE b.booking_id = $id\\n\\tAND d.booking_id = b.booking_id\\n\\tAND b.member_id = m.member_id\\n\\tLIMIT 20\\\";\\n\\t$result = mysqli_query($conn, $query);\\n\\tif (! $result ) die (\\\"


    Database Error:
    \\\". mysqli_error() .\\\"

    \\\");\\n\\t$query_data = mysqli_fetch_array($result);\\n\\t$name = $query_data[\\\"first_name\\\"].\\\" \\\".$query_data[\\\"last_name\\\"];\\n\\t$booking_date = $query_data[\\\"booking_date\\\"];\\n\\t$status = $query_data['status'];\\n\\t$colour = getStatusColour($status);\\n $deposit_due = $query_data['deposit_due'];\\n\\n\\t\\n\\techo \\\"

    \\\".$name.\\\"

    \\\";\\n\\techo \\\"Booking Number: \\\".$id.\\\"

    \\\";\\n\\techo \\\"Booking was made on \\\".$booking_date.\\\"

    \\\";\\n\\techo \\\"Current Status: $status

    \\\";\\n\\t\\n\\t// New Query to get each day of this booking\\n\\t$query = \\\"SELECT date, members, juniors, adult_guests, child_guests,\\n\\tmembers + juniors + adult_guests + child_guests AS total\\n\\tFROM edelweiss_days AS d, edelweiss_booking AS b\\n\\tWHERE b.booking_id = $id\\n\\tAND d.booking_id = b.booking_id\\n\\tORDER BY date\\n\\tLIMIT 20\\\";\\n\\t$result = mysqli_query($conn, $query);\\n\\tif (! $result ) die (\\\"


    Database Error:
    \\\". mysqli_error() .\\\"

    \\\");\\n\\t$total_cost = 0;\\n\\t\\n\\techo \\\"\\\";\\n\\techo \\\"\\\".\\n\\t\\t\\\"\\\";\\n\\twhile ($query_data = mysqli_fetch_array($result))\\n\\t{\\n\\t\\t$date = $query_data[\\\"date\\\"];\\n\\t\\t$members = $query_data[\\\"members\\\"];\\n\\t\\t$juniors = $query_data[\\\"juniors\\\"];\\n\\t\\t$adult_guests = $query_data[\\\"adult_guests\\\"];\\n\\t\\t$child_guests = $query_data[\\\"child_guests\\\"];\\n\\t\\t\\n//\\t\\t$total_cost = $total_cost + $members * 16.50 + $juniors * 8.0 + $adult_guests * 40.0 + $child_guests * 16.50;\\n\\t\\t$cost = getCost($date, $members, $juniors, $adult_guests, $child_guests);\\n\\t\\t$total_cost = $total_cost + $cost;\\n\\t\\t\\n\\t\\tif ($members == 0) $members = \\\"-\\\";\\n\\t\\tif ($juniors == 0) $juniors = \\\"-\\\";\\n\\t\\tif ($adult_guests == 0) $adult_guests = \\\"-\\\";\\n\\t\\tif ($child_guests == 0) $child_guests = \\\"-\\\";\\n\\t\\t\\n\\t\\techo \\\"\\\";\\n\\t\\techo \\\"\\\";\\n\\t\\techo \\\"\\\";\\n\\t\\techo \\\"\\\";\\n\\t\\techo \\\"\\\";\\n\\t\\techo \\\"\\\";\\n\\t\\techo \\\"\\\";\\n\\t}\\n\\tprintf( \\\"\\\", $total_cost);\\n\\techo \\\"
    DateMembersJuniorsAdult GuestsChild GuestsTotal BedsCost
    \\\" . $date .\\\"\\\" . $members .\\\"\\\" . $juniors .\\\"\\\" . $adult_guests .\\\"\\\" . $child_guests .\\\"\\\" . $query_data[\\\"total\\\"] .\\\"\\\" . sprintf(\\\"$%01.2f\\\", $cost) .\\\"
    Total Cost$%01.2f

    \\\";\\n printf( \\\"

    A deposit of $%01.2f is due by %s
    \\\\n\\\", $total_cost * 0.30, $deposit_due);\\n\\t\\n\\techo \\\"

    Payments

    \\\";\\n\\t$query = \\\"SELECT date, amount, type, details \\n\\tFROM edelweiss_payments AS p\\n\\tWHERE p.booking_id = $id\\n\\tLIMIT 20\\\";\\n\\t$result = mysqli_query($conn, $query);\\n\\tif (! $result ) die (\\\"
    Database Error:
    \\\". mysqli_error() .\\\"

    \\\");\\n\\t$paid = 0;\\n\\t\\n\\techo \\\"\\\";\\n\\techo \\\"\\\".\\n\\t\\t\\\"\\\";\\n\\twhile ($query_data = mysqli_fetch_array($result))\\n\\t{\\n\\t\\t$date = $query_data[\\\"date\\\"];\\n\\t\\t$amount = $query_data[\\\"amount\\\"];\\n\\t\\t$type = $query_data[\\\"type\\\"];\\n\\t\\t$details = $query_data[\\\"details\\\"];\\n\\t\\t\\n\\t\\t$paid = $paid + $amount;\\n\\t\\techo \\\"\\\";\\n\\t\\techo \\\"\\\";\\n\\t\\techo \\\"\\\";\\n\\t\\tprintf( \\\"\\\", $amount);\\n\\t}\\t\\n\\tprintf( \\\"\\\", $paid);\\n\\techo \\\"
    DateTypeDetialsAmount
    \\\" . $date .\\\"\\\" . $type .\\\"\\\" . $details .\\\"$%01.2f
    Total Amount Paid$%01.2f

    \\\";\\n}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"d5f494e83169eef2f81dba20d6b9d534","score":"0.77704346","text":"public function getBooking()\n {\n return $this->booking;\n }","title":""},{"docid":"322ac690c81e6c20221706ff788467e0","score":"0.7753924","text":"public function getBooking() {\n return $this->booking;\n }","title":""},{"docid":"2762e8c0b590a16f7049059c39680064","score":"0.7576667","text":"public function getBooking()\n {\n return isset($this->Booking) ? $this->Booking : null;\n }","title":""},{"docid":"4e07aa9117806b50924bdc114c8948a5","score":"0.7100773","text":"public function show(Booking $booking)\n {\n //\n }","title":""},{"docid":"4e07aa9117806b50924bdc114c8948a5","score":"0.7100773","text":"public function show(Booking $booking)\n {\n //\n }","title":""},{"docid":"4e07aa9117806b50924bdc114c8948a5","score":"0.7100773","text":"public function show(Booking $booking)\n {\n //\n }","title":""},{"docid":"4e07aa9117806b50924bdc114c8948a5","score":"0.7100773","text":"public function show(Booking $booking)\n {\n //\n }","title":""},{"docid":"4e07aa9117806b50924bdc114c8948a5","score":"0.7100773","text":"public function show(Booking $booking)\n {\n //\n }","title":""},{"docid":"4e07aa9117806b50924bdc114c8948a5","score":"0.7100773","text":"public function show(Booking $booking)\n {\n //\n }","title":""},{"docid":"4e07aa9117806b50924bdc114c8948a5","score":"0.7100773","text":"public function show(Booking $booking)\n {\n //\n }","title":""},{"docid":"0b9e09ed75838a0a1ac3919b84a9cac8","score":"0.70689607","text":"public function getInfoForBooking($booking_id) {\r\n\t\treturn $this->ilRoomSharingDatabaseBooking->getInfoForBooking($booking_id);\r\n\t}","title":""},{"docid":"33502404a410143e3bea832c4a8517cd","score":"0.7067205","text":"public function show(booking $booking)\n {\n //\n }","title":""},{"docid":"33502404a410143e3bea832c4a8517cd","score":"0.7067205","text":"public function show(booking $booking)\n {\n //\n }","title":""},{"docid":"b16ee4ec029923e165cffc6aa980799e","score":"0.7001648","text":"public function getInfoForBooking($booking_id) {\r\n\t\t$set = $this->ilDB->query('SELECT * FROM ' . dbc::BOOKINGS_TABLE . ' b LEFT JOIN ' . dbc::ROOMS_TABLE\r\n\t\t\t. ' r ON r.id = b.room_id LEFT JOIN usr_data u ON u.usr_id = b.user_id WHERE b.id = ' . $this->ilDB->quote($booking_id, 'integer'));\r\n\t\t$info = array();\r\n\t\twhile ($row = $this->ilDB->fetchAssoc($set)) {\r\n\t\t\t$info['title'] = $row['subject'];\r\n\t\t\t$info['user'] = $row['public_booking'] == 1 ? 'Gebucht von ' . $row['firstname'] . ' ' . $row['lastname'] . '
    ' : '';\r\n\t\t\t$info['description'] = $row['bookingcomment'];\r\n\t\t\t$info['room'] = $row['name'];\r\n\t\t\t$info['start'] = new ilDateTime($row['date_from'], IL_CAL_DATETIME);\r\n\t\t\t$info['end'] = new ilDateTime($row['date_to'], IL_CAL_DATETIME);\r\n\t\t}\r\n\r\n\t\treturn $info;\r\n\t}","title":""},{"docid":"b3a8a76926d6dd6e22228c46bccda859","score":"0.69776","text":"public function getBooking($booking){\n $this->connect();\n $sql = \"SELECT `booking_id`, `booking_guest_name`, `booking_guest_surname`, booking_guests_number , `guest_tel_number`, \";\n $sql .= \" `booking_check_in`, `booking_check_out`, `booking_cost`, `booking_deposit`, `booking_commission`,\";\n $sql .= \" `booking_source`, `booking_asset_id`, `guest_email` , booking_notes FROM `booking_details` WHERE `booking_id` = ?\";\n $res = $this->execute($sql , [$booking->booking_id]);\n $row = $res->fetch();\n $booking->booking_id = $row['booking_id'];\n $booking->booking_guest_name = $row['booking_guest_name'];\n $booking->booking_guest_surname = $row['booking_guest_surname'];\n $booking->booking_guests_number = $row['booking_guests_number'];\n $booking->guest_tel_number = $row['guest_tel_number'];\n $booking->booking_check_in = $row['booking_check_in'];\n $booking->booking_check_out = $row['booking_check_out'];\n $booking->booking_cost = $row['booking_cost'];\n $booking->booking_deposit = $row['booking_deposit'];\n $booking->booking_commission = $row['booking_commission'];\n $booking->booking_source = $row['booking_source'];\n $booking->booking_asset_id = $row['booking_asset_id'];\n $booking->guest_email = $row['guest_email'];\n $booking->booking_notes = $row['booking_notes'];\n }","title":""},{"docid":"01e1019f7a63c7aef8774609fb7fbf07","score":"0.6938612","text":"public function get()\n {\n $service_availability = $this->compareServiceAndResources();\n $booking_obj = new Booking();\n $bookings = $booking_obj->parseBookingsDates($this->service_bookings);\n return $this->compareServiceAvailabilityAndBookings($service_availability, $bookings);\n }","title":""},{"docid":"2e7e2b6d8adeb52db1a061e0b5704fc9","score":"0.68750626","text":"public function getAllBooking(){\n return $this->bookingRequest->getAllBooking();\n }","title":""},{"docid":"a60cf227a1ea30b37e92fb28685749d6","score":"0.6805333","text":"public function getBooking($id);","title":""},{"docid":"028d8b8510effc243b326f2371438fad","score":"0.67660123","text":"public function bookingList()\n {\n \t$userId = $this->userId;\n \tif ( $userId ) {\n \t\t$data = [];\n\t \t$booking = $this->model->getAllBookings($userId);\n\t \tif( $booking ){\n $i = 0;\n\t \t\twhile( $row = $booking->fetch_assoc() ){\n $data[$i]['id'] = $row['bookId'];\n $data[$i]['name'] = $row['name'];\n $data[$i]['email'] = $row['email'];\n $data[$i]['cars'] = $row['carName'];\n $data[$i]['destination'] = $row['destiName'];\n $data[$i]['pickup'] = $row['pickName'];\n $data[$i]['booked'] = date('Y-m-d H:i',strtotime($row['booking_time']));\n $data[$i]['returned'] = date('Y-m-d H:i',strtotime($row['return_time']));\n $data[$i]['bookedAt'] = $row['booked_at'];\n $i++;\n }\n\t \t} \n \t\tinclude '../views/booking-list.php';\n\t \texit();\n \t}\n }","title":""},{"docid":"21fd72d7f900b21cb5f65eb4c357f2ab","score":"0.6742847","text":"public function getBookingDetails($bookingId){\n $result = $data = $this->ThriftyClass->getBookingDetails($bookingId); \n return Response::json($result);\n }","title":""},{"docid":"0a34d49b47bc2277154058cf5dbf6c3a","score":"0.6741038","text":"public function reservationDetailsAction()\r\n {\r\n $id = $this->params()->fromQuery('id');\r\n $dbAdapter = $this->getServiceLocator()->get(\"Adapter\");\r\n $model = new ReservationModel($dbAdapter);\r\n $model->setId($id);\r\n \r\n $out = [\r\n 'Reservation Id' => $id,\r\n 'Reserved By' => $model->clientName,\r\n 'Created At' => $model->created_at,\r\n 'Status' => $model->status,\r\n ];\r\n \r\n return $this->viewModel->setVariable('response', json_encode($out));\r\n }","title":""},{"docid":"36c1c6d7915589624a07a3e512b76f0c","score":"0.6697599","text":"public function show($id)\n\t{\n $booking = Booking::find($id);\n return $booking;\n\t}","title":""},{"docid":"fba7526c949078428b9709437fc271b1","score":"0.6694696","text":"public function getDetails($paramIncludeUnclassified = FALSE)\r\n {\r\n $ret = $this->getDataFromDatabaseById($this->bookingId);\r\n\t\t\r\n if(!is_null($ret))\r\n {\r\n // Make raw\r\n $ret['booking_code'] = stripslashes($ret['booking_code']);\r\n $ret['coupon_code'] = stripslashes($ret['coupon_code']);\r\n $ret['pickup_location_code'] = stripslashes($ret['pickup_location_code']);\r\n $ret['return_location_code'] = stripslashes($ret['return_location_code']);\r\n $ret['payment_method_code'] = stripslashes($ret['payment_method_code']);\r\n\r\n if($ret['booking_timestamp'] > 0)\r\n {\r\n $ret['booking_date'] = date_i18n($this->shortDateFormat, $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $ret['booking_time'] = date_i18n('H:i', $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printBookingDate = date_i18n(get_option('date_format'), $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printBookingTime = date_i18n(get_option('time_format'), $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n } else\r\n {\r\n $ret['booking_date'] = '';\r\n $ret['booking_time'] = '';\r\n $printBookingDate = '';\r\n $printBookingTime = '';\r\n }\r\n\r\n if($ret['pickup_timestamp'] > 0)\r\n {\r\n $ret['pickup_date'] = date_i18n($this->shortDateFormat, $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $ret['pickup_time'] = date_i18n('H:i', $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printPickupDate = date_i18n(get_option('date_format'), $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printPickupTime = date_i18n(get_option('time_format'), $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n } else\r\n {\r\n $ret['pickup_date'] = '';\r\n $ret['pickup_time'] = '';\r\n $printPickupDate = '';\r\n $printPickupTime = '';\r\n }\r\n\r\n if($ret['return_timestamp'] > 0)\r\n {\r\n $ret['return_date'] = date_i18n($this->shortDateFormat, $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $ret['return_time'] = date_i18n('H:i', $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printReturnDate = date_i18n(get_option('date_format'), $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n $printReturnTime = date_i18n(get_option('time_format'), $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\r\n } else\r\n {\r\n $ret['return_date'] = '';\r\n $ret['return_time'] = '';\r\n $printReturnDate = '';\r\n $printReturnTime = '';\r\n }\r\n\r\n $validBookingId = intval($ret['booking_id']);\r\n $bookedItemsSQL = \"\r\n SELECT bo.option_id, bo.units_booked,\r\n it.item_id, it.manufacturer_id, it.body_type_id, it.transmission_type_id, it.fuel_type_id\r\n FROM {$this->conf->getPrefix()}booking_options bo\r\n JOIN {$this->conf->getPrefix()}items it ON it.item_sku=bo.item_sku AND it.blog_id='{$ret['blog_id']}'\r\n WHERE booking_id='{$validBookingId}'\r\n \";\r\n $bookedExtrasSQL = \"\r\n SELECT ex.extra_id, bo.option_id, bo.units_booked\r\n FROM {$this->conf->getPrefix()}booking_options bo\r\n JOIN {$this->conf->getPrefix()}extras ex ON ex.extra_sku=bo.extra_sku AND ex.blog_id='{$ret['blog_id']}'\r\n WHERE booking_id='{$validBookingId}'\r\n \";\r\n $bookedItems = $this->conf->getInternalWPDB()->get_results($bookedItemsSQL, ARRAY_A);\r\n $bookedExtras = $this->conf->getInternalWPDB()->get_results($bookedExtrasSQL, ARRAY_A);\r\n\r\n // DEBUG\r\n // echo \"
    BOOKING: \".$validBookingId.\", ITEMS: \".nl2br(print_r($bookedItems, TRUE));\r\n\r\n // Cars and Car Units\r\n $ret['item_ids'] = array();\r\n $ret['item_units'] = array();\r\n $ret['item_options'] = array();\r\n $ret['items'] = array();\r\n foreach($bookedItems AS $reservedItem)\r\n {\r\n $ret['item_ids'][] = $reservedItem['item_id'];\r\n $ret['item_units'][$reservedItem['item_id']] = $reservedItem['units_booked'];\r\n $ret['item_options'][$reservedItem['item_id']] = $reservedItem['option_id'];\r\n $ret['items'][] = array(\r\n \"item_id\" => $reservedItem['item_id'],\r\n \"manufacturer_id\" => $reservedItem['manufacturer_id'],\r\n \"body_type_id\" => $reservedItem['body_type_id'],\r\n \"transmission_type_id\" => $reservedItem['transmission_type_id'],\r\n \"fuel_type_id\" => $reservedItem['fuel_type_id'],\r\n \"option_id\" => $reservedItem['option_id'],\r\n \"units_booked\" => $reservedItem['units_booked'],\r\n );\r\n }\r\n\r\n // Extras and Extra Units\r\n $ret['extra_ids'] = array();\r\n $ret['extra_options'] = array();\r\n $ret['extra_units'] = array();\r\n $ret['extras'] = array();\r\n foreach($bookedExtras AS $reservedExtra)\r\n {\r\n $ret['extra_ids'][] = $reservedExtra['extra_id'];\r\n $ret['extra_options'][$reservedExtra['extra_id']] = $reservedExtra['option_id'];\r\n $ret['extra_units'][$reservedExtra['extra_id']] = $reservedExtra['units_booked'];\r\n $ret['extras'][] = array(\r\n \"extra_id\" => $reservedExtra['extra_id'],\r\n \"option_id\" => $reservedExtra['option_id'],\r\n \"units_booked\" => $reservedExtra['units_booked'],\r\n );\r\n }\r\n\r\n // Get payment status text and color\r\n $ret['print_payment_status'] = \"\";\r\n $ret['payment_status_color'] = \"#FF0000\";\r\n if($ret['payment_successful'] == 0)\r\n {\r\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_UNPAID_TEXT');\r\n $ret['payment_status_color'] = \"#FF0000\";\r\n } else if($ret['payment_successful'] == 1)\r\n {\r\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_PAID_TEXT');\r\n $ret['payment_status_color'] = \"black\";\r\n } else if($ret['payment_successful'] == 2)\r\n {\r\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_REFUNDED_TEXT');\r\n $ret['payment_status_color'] = \"navy\";\r\n }\r\n\r\n // Get booking status text and color\r\n $ret['print_booking_status'] = \"\";\r\n $ret['booking_status_color'] = \"black\";\r\n if($ret['is_cancelled'] == 0 && $ret['return_timestamp'] >= time())\r\n {\r\n if($ret['pickup_timestamp'] <= time())\r\n {\r\n // Departed\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_DEPARTED_TEXT');\r\n $ret['booking_status_color'] = \"blue\";\r\n } else\r\n {\r\n // Upcoming\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_UPCOMING_TEXT');\r\n $ret['booking_status_color'] = \"green\";\r\n }\r\n } else if($ret['is_cancelled'] == 0 && $ret['return_timestamp'] < time())\r\n {\r\n if($ret['is_completed_early'] == 1)\r\n {\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_COMPLETED_EARLY_TEXT');\r\n $ret['booking_status_color'] = \"black\";\r\n } else\r\n {\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_COMPLETED_TEXT');\r\n $ret['booking_status_color'] = \"black\";\r\n }\r\n } else if($ret['is_cancelled'] == 1)\r\n {\r\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_CANCELLED_TEXT');\r\n $ret['booking_status_color'] = \"red\";\r\n }\r\n\r\n\r\n // Prepare output for print\r\n $ret['print_booking_date'] = $printBookingDate;\r\n $ret['print_booking_time'] = $printBookingTime;\r\n $ret['print_pickup_date'] = $printPickupDate;\r\n $ret['print_pickup_time'] = $printPickupTime;\r\n $ret['print_return_date'] = $printReturnDate;\r\n $ret['print_return_time'] = $printReturnTime;\r\n $ret['print_booking_code'] = esc_html($ret['booking_code']);\r\n $ret['print_coupon_code'] = esc_html($ret['coupon_code']);\r\n $ret['print_pickup_location_code'] = esc_html($ret['pickup_location_code']);\r\n $ret['print_return_location_code'] = esc_html($ret['return_location_code']);\r\n $ret['print_payment_method_code'] = esc_html($ret['payment_method_code']);\r\n $ret['print_block_name'] = esc_html($ret['block_name']);\r\n\r\n // Prepare output for edit\r\n $ret['edit_booking_code'] = esc_attr($ret['booking_code']); // for input field\r\n $ret['edit_coupon_code'] = esc_attr($ret['coupon_code']); // for input field\r\n $ret['edit_pickup_location_code'] = esc_attr($ret['pickup_location_code']); // for input field\r\n $ret['edit_return_location_code'] = esc_attr($ret['return_location_code']); // for input field\r\n $ret['edit_payment_method_code'] = esc_attr($ret['payment_method_code']); // for input field\r\n\t\t\t\r\n\t\t\t\r\n }\r\n\r\n return $ret;\r\n }","title":""},{"docid":"0408c0b383e13fc9fea11449e1d21186","score":"0.6646103","text":"public function getBookingDetails($bookingId, $bookingHash){\n\t\t//For this function signature is required. (md5($bookingId . $bookingHash . $secretKey))\n\t\t$sign = md5($bookingId . $bookingHash. $this->_secretKey);\n\t\treturn $this->api()->execute(\"getBookingDetails\", array($bookingId, $sign), array(), null, $this->getHeaderParams());\n\t}","title":""},{"docid":"be42e9cded8992e6006c23be67033659","score":"0.66242254","text":"public function customerOwnBookingDetails($id){\n $booking = Booking::where('user_id',$id)->get();\n return $booking;\n }","title":""},{"docid":"08cb111f865fc97423a424676eec0f93","score":"0.65902334","text":"public function booking()\n {\n return $this->hasOne('App\\Booking');\n }","title":""},{"docid":"b87d2a6daa031df55f3c5c9905a2dcd7","score":"0.65802604","text":"public function booking()\n {\n return $this->hasMany(Booking::class);\n }","title":""},{"docid":"7d63b1f3734bb15ff3ec11d386fa4db3","score":"0.6543312","text":"public function show(BookingRoom $bookingRoom)\n {\n //\n }","title":""},{"docid":"6bb251aab9eea5d141f9c7d456010cbf","score":"0.65304047","text":"public function getDetails();","title":""},{"docid":"dee22053026546970a79fc1b4fd0dc05","score":"0.65064144","text":"public function get_transaction_details($booking_id) {\n $this->db->select('transaction_details.*');\n $this->db->from('transaction_details');\n $this->db->where('transaction_details.booking_id', $booking_id);\n $query = $this->db->get();\n $query_result = $query->result();\n if (count($query_result) == 0) {\n $transaction_details = $query_result;\n } else {\n $transaction_details = $query_result[0];\n }\n return $transaction_details;\n }","title":""},{"docid":"fc182c740be519e9dbc7f18cd6524cb3","score":"0.6498562","text":"public function getId() {\n return $this->bookingId;\n }","title":""},{"docid":"61eb2252ad53c3993ea899d0e426b46d","score":"0.64578277","text":"public function getBookingById($bookingId){\n return $this->bookingRequest->getBookingById($bookingId);\n }","title":""},{"docid":"85fa6e801c63a3b33104d3b3e671e02a","score":"0.64231545","text":"public function getTempBookingDetails()\n {\n try\n {\n //set default booking id\n $booking_id = null;\n\n //set default start date\n $start_date = null;\n\n //set default end date\n $end_date = null;\n\n //set default adults, children and infants\n $adults = 0;\n $children = 0;\n $infants = 0;\n\n //set default customer data\n $full_name = null;\n $country = null;\n $phone = null;\n $email = null;\n\n //set default downpayment and remaining payment\n $downpayment = 0;\n $formatted_downpayment = 0;\n $remaining_payment = 0;\n $formatted_remaining_payment = 0;\n\n //set default due date\n $due_date = null;\n\n //if search dates session exists format start date and end date\n if (Session::has('search_dates'))\n {\n $search_dates = Session::get('search_dates');\n\n $start_date = date('d.m.Y.', strtotime(substr($search_dates, 0, 11)));\n $end_date = date('d.m.Y.', strtotime(substr($search_dates, 14, 25)));\n }\n\n //if temp booking session exists get temp booking data\n if (Session::has('booking'))\n {\n $booking = TempBooking::where('booking_token', '=', Session::get('booking'))->first();\n\n //if temp booking doesn't exist return error status\n if (!$booking)\n {\n return ['status' => 0];\n }\n\n //set booking id\n $booking_id = $booking->id;\n\n $villa = Villa::where('id', '=', $booking->villa_id)->first();\n\n //set start date and end date\n $start_date = date('d.m.Y.', strtotime($booking->start_date));\n $end_date = date('d.m.Y.', strtotime($booking->end_date));\n\n //set adults, children and infants\n $adults = $booking->adults;\n $children = $booking->children;\n $infants = $booking->infants;\n\n //if temp booking customer exists set customer data\n if ($booking->customer_id)\n {\n $customer = Customer::find($booking->customer_id);\n\n $full_name = $customer->full_name;\n $country = $customer->country;\n $phone = $customer->phone;\n $email = $customer->email;\n }\n\n //call calculateBookingPayment method to calculate booking downpayment and remaining payment\n $booking_payment = $this->calculateBookingPayment($villa->id, $start_date, $end_date);\n\n //set downpayment and remaining payment\n $downpayment = $booking_payment['downpayment'];\n $formatted_downpayment = $booking_payment['formatted_downpayment'];\n $remaining_payment = $booking_payment['remaining_payment'];\n $formatted_remaining_payment = $booking_payment['formatted_remaining_payment'];\n\n //call calculateDueDate method to calculate due date\n $due_date = $this->calculateDueDate($start_date);\n }\n\n return ['status' => 1, 'id' => $booking_id, 'start_date' => $start_date, 'end_date' => $end_date, 'adults' => $adults,\n 'children' => $children, 'infants' => $infants, 'full_name' => $full_name, 'country' => $country, 'phone' => $phone,\n 'email' => $email, 'downpayment' => $downpayment, 'formatted_downpayment' => $formatted_downpayment,\n 'remaining_payment' => $remaining_payment, 'formatted_remaining_payment' => $formatted_remaining_payment,\n 'due_date' => $due_date];\n }\n catch (Exception $e)\n {\n return ['status' => 0, 'error' => trans('errors.error')];\n }\n }","title":""},{"docid":"6a010e0b1bc96a05a3dcc636a124a0be","score":"0.6410199","text":"public function getBookingId() {\n return $this->bookingId;\n }","title":""},{"docid":"f9cc4c28e5587debb9995873c5308b6e","score":"0.63809425","text":"public function show(Booking $booking)\n { \n // $messages = collect();\n // $first_message = $booking->message;\n // if( $first_message != \"Sin message.\"){\n // $messages->push( $first_message);\n // }\n // $messages = $messages->toBase()->merge($booking->messages()->orderBy('created_at','ASC')->get());\n $firstMessage = new Message;\n $firstMessage->message = $booking->message;\n $firstMessage->status = 1;\n $firstMessage->destination = 0;\n $firstMessage->read = 2;\n $firstMessage->created_at = now(); \n $firstMessage->updated_at = now();\n $firstMessage->bookings_id = $booking->id;\n $messages = array();\n array_push($messages, $firstMessage);\n foreach ($booking->messages->sortBy('created_at') as $message) {\n array_push($messages, $message);\n }\n return response()->json($messages, 200);\n }","title":""},{"docid":"0be0eafc876aa5f0ee9b216296699f3f","score":"0.6364013","text":"function getDetails() { return $this->details; }","title":""},{"docid":"03caffe0277f52515df320aad93febd5","score":"0.6344791","text":"function get_booking_details($app_reference, $booking_source, $booking_status='')\r\n {\r\n $response['status'] = FAILURE_STATUS;\r\n $response['data'] = array();\r\n $bd_query = 'select * from sightseeing_booking_details AS BD WHERE BD.app_reference like '.$this->db->escape($app_reference);\r\n if (empty($booking_source) == false) {\r\n $bd_query .= ' AND BD.booking_source = '.$this->db->escape($booking_source);\r\n }\r\n if (empty($booking_status) == false) {\r\n $bd_query .= ' AND BD.status = '.$this->db->escape($booking_status);\r\n }\r\n $id_query = 'select * from sightseeing_booking_itinerary_details AS ID WHERE ID.app_reference='.$this->db->escape($app_reference);\r\n $cd_query = 'select * from sightseeing_booking_pax_details AS CD WHERE CD.app_reference='.$this->db->escape($app_reference);\r\n $cancellation_details_query = 'select HCD.* from sightseeing_cancellation_details AS HCD WHERE HCD.app_reference='.$this->db->escape($app_reference);\r\n $response['data']['booking_details'] = $this->db->query($bd_query)->result_array();\r\n $response['data']['booking_itinerary_details'] = $this->db->query($id_query)->result_array();\r\n $response['data']['booking_customer_details'] = $this->db->query($cd_query)->result_array();\r\n $response['data']['cancellation_details'] = $this->db->query($cancellation_details_query)->result_array();\r\n if (valid_array($response['data']['booking_details']) == true and valid_array($response['data']['booking_itinerary_details']) == true and valid_array($response['data']['booking_customer_details']) == true) {\r\n $response['status'] = SUCCESS_STATUS;\r\n }\r\n\r\n $response['data']['booking_details'][0]['attributes']= unserialized_data($response['data']['booking_details'][0]['attributes']);\r\n //debug($response);die('88');\r\n return $response;\r\n }","title":""},{"docid":"05ecbb830ec58fd272db53ddd4229a13","score":"0.6335857","text":"function view_detail_bk($bk_id) {\n\t $pass_id = $this->getCurrentPassengerId();\n\t $bkInfo = $this->mod_fecustomize->bookingInfoByPassengerIDAndBookingID($bk_id, $pass_id);\n\t\n\t return $bkInfo;\n\t }","title":""},{"docid":"9b2c634659a79b526c322147ce3c435e","score":"0.63273805","text":"function get_booking_details($app_reference, $booking_source, $booking_status = '') {\r\n\t\t$response ['status'] = FAILURE_STATUS;\r\n\t\t$response ['data'] = array ();\r\n\t\t$bd_query = 'select BD.* , ud.logo as user_image from hotel_booking_details AS BD INNER JOIN b2b_user_details as ud on BD.created_by_id=ud.user_oid WHERE BD.app_reference like ' . $this->db->escape ( $app_reference );\r\n\t\tif (empty ( $booking_source ) == false) {\r\n\t\t\t$bd_query .= '\tAND BD.booking_source = ' . $this->db->escape ( $booking_source );\r\n\t\t}\r\n\t\tif (empty ( $booking_status ) == false) {\r\n\t\t\t$bd_query .= ' AND BD.status = ' . $this->db->escape ( $booking_status );\r\n\t\t}\r\n\t\t$id_query = 'select * from hotel_booking_itinerary_details AS ID WHERE ID.app_reference=' . $this->db->escape ( $app_reference );\r\n\t\t$cd_query = 'select * from hotel_booking_pax_details AS CD WHERE CD.app_reference=' . $this->db->escape ( $app_reference );\r\n\t\t$cancellation_details_query = 'select HCD.* from hotel_cancellation_details AS HCD WHERE HCD.app_reference=' . $this->db->escape ( $app_reference );\r\n\t\t$response ['data'] ['booking_details'] = $this->db->query ( $bd_query )->result_array ();\r\n\t\t$response ['data'] ['booking_itinerary_details'] = $this->db->query ( $id_query )->result_array ();\r\n\t\t$response ['data'] ['booking_customer_details'] = $this->db->query ( $cd_query )->result_array ();\r\n\t\t$response ['data'] ['cancellation_details'] = $this->db->query ( $cancellation_details_query )->result_array ();\r\n\t\tif (valid_array ( $response ['data'] ['booking_details'] ) == true and valid_array ( $response ['data'] ['booking_itinerary_details'] ) == true and valid_array ( $response ['data'] ['booking_customer_details'] ) == true) {\r\n\t\t\t$response ['status'] = SUCCESS_STATUS;\r\n\t\t}\r\n\t\treturn $response;\r\n\t}","title":""},{"docid":"4c1321bb616a434c2c8d27c2695e64be","score":"0.6326076","text":"public function showBooking(Request $request, $booking_id) {\n\n //$booking = Booking::with('payments')->find($booking_id)->get();\n\n $booking = Booking::with('payments')->where(['id' => $booking_id])->get();\n\n\n return $this->prepareResult(true, $booking, [],\"All results fetched\");\n\n\n }","title":""},{"docid":"931a2bec590ed48fc38ff1a6fdcb95a6","score":"0.6321631","text":"public function getBillingDetails();","title":""},{"docid":"c3c3c5bc675d9ad87c97f8d20982ac6f","score":"0.63180083","text":"public function getDataBookingDetails(Request $request)\n {\n $id_booking = $request->get('id');\n $bookingDetail = Archive::GetDataBookingDetails($id_booking);\n $booking = Archive::GetBookingById($id_booking);\n return json_encode(['bookingDetail' => $bookingDetail, 'booking' => $booking]);\n\n return json_encode($data);\n }","title":""},{"docid":"aa185a747d19cf8f0e6cfbf602941382","score":"0.63115513","text":"function showBookingDetail($bookingId)\n {\n $data['bookingDetail'] = $this->roombooking_model->getBookingDetailById($bookingId);\n $this->global['rooms'] = $this->room_model->getRoomsByBossId();\n $this->global['pageTitle'] = '活动详情';\n $this->loadViews(\"roombookingdetail\", $this->global, $data, NULL);\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"c3ce3c98bbcb5204e0789022ef10c92c","score":"0.6292069","text":"public function getDetails()\n {\n return $this->details;\n }","title":""},{"docid":"df408d2feaa96540cf93d955d3915e08","score":"0.6290209","text":"public function show(SpaBooking $spaBooking)\n {\n return $spaBooking;\n }","title":""},{"docid":"f93d3cbeb4eb960e723141fe37538b2e","score":"0.6242207","text":"public function getDetails()\n {\n return $this->_details;\n }","title":""},{"docid":"03e476423763b5e0c18cfc3d0b4c4c80","score":"0.6224165","text":"public function show($id)\n {\n $bus_schedule_bookings = Bus_schedule_booking::find($id);\n if($bus_schedule_bookings)\n {\n return response()->json(['buses' => $bus_schedule_bookings], 200);\n }\n //if the id not found\n else\n {\n return response()->json(['message'=>'No Bus Booking Found'],404);\n }\n }","title":""},{"docid":"2e93428909d990d5a267702cb5ba71e3","score":"0.6186565","text":"public function getBookingId(){\n return $this->bookingId;\n}","title":""},{"docid":"e3bf8db4f118124a80138e2ba27cb17a","score":"0.61703455","text":"public function getDetail()\n {\n // populate fields\n $query = array(self::TRANSACTION_ID => $this->transactionId);\n // call request method\n $response = $this->request(self::GET_DETAIL, $query);\n\n return $response;\n }","title":""},{"docid":"4b1f4de71d38e1cb778d61df1f2e8f71","score":"0.6165811","text":"public function customer(){\n return $this->hasOne('App\\Customer');\n //this customer belongs to this booking. access to any data of this customer\n }","title":""},{"docid":"feacdb3bd641385b03d02802e9d0bee9","score":"0.61597687","text":"public function booking() {\n return $this->belongsTo('App\\Booking');\n }","title":""},{"docid":"262e9854698e20ef91d17bfdbe7ecd8d","score":"0.6129942","text":"public function getDetails() {\n\t\treturn $this->details;\n\t}","title":""},{"docid":"eba06708b5788c9705425292c88cb108","score":"0.61190265","text":"public function getReservation() {\n return $this->ReservationDao->getReservation();\n }","title":""},{"docid":"75afdcacc2edc88168ddb4e56817f5ec","score":"0.6107137","text":"public function show($id){\n $booking=Booking::find($id);\n if(!$booking){\n return response()->json([\n 'error'=>404,\n 'message'=>'Not found',\n ],404);\n }\n return $booking;\n }","title":""},{"docid":"4b888c40e18d08cc7fd4dd14ae35af3a","score":"0.61058414","text":"public function bookingList()\n {\n $booking_lists = BookingSlot::with('user')->where('student_id', '!=' , 0)->where('slote_date', date('Y-m-d'))->get();\n\n\n }","title":""},{"docid":"11bd8cabf873598524479e53cb98ae5b","score":"0.61036086","text":"abstract public function getDetails();","title":""},{"docid":"cd9a965d730192dc2541783e345700c9","score":"0.6090413","text":"public function show($id)\n {\n $booking = Booking::find($id);\n\n if(!$booking){\n return response()->json(['message' => 'This booking does not exist','success'=> 0 , 'code' => 404], 404);\n }\n\n return $booking;\n }","title":""},{"docid":"87bedc0c7c72283f1893857567b06358","score":"0.6087479","text":"public function getBooking()\n {\n return $this->hasOne(Jobs::className(), ['booking_id' => 'booking_id']);\n }","title":""},{"docid":"0eb3625ea8a6086d94d112b5e24ce457","score":"0.6084558","text":"public function getBook()\n {\n return $this->book;\n }","title":""},{"docid":"cacd3b94dae178e47e06c22245116282","score":"0.6076667","text":"public function getBillDetails()\n {\n $bill = new BillModel('http://safe-plains-5453.herokuapp.com/bill.json');\n print $this->returnJson($bill->getBill('bill.json'));\n }","title":""},{"docid":"ff5ff8fbbafe768853decdc0a7d56474","score":"0.6067298","text":"public function TripDetails() {\n /**\n * Get the Customer Detils\n */\n $customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n /**\n * Get the Customer ID\n */\n $customerId = $customer->getId ();\n $todayData = Mage::getModel ( 'core/date' )->timestamp ( time () );\n $todayDate = date ( 'Y-m-d', $todayData );\n /**\n * Get Colletion for the 'airhotels/airhotels/airhotels' with some filter\n * 'order_status'\n * 'fromDate'\n * 'Todate'\n * CustomerID\n */ \n return Mage::getModel ( 'airhotels/airhotels' )->getCollection ()->addFieldToFilter ( 'order_status', 1 )->addFieldToFilter ( 'todate', array (\n 'lteq' => $todayDate \n ) )->addFieldToFilter ( 'customer_id', $customerId )->setOrder ( 'id', 'DESC' );\n }","title":""},{"docid":"e157b036dbacef71d4de58f1c41fa6c8","score":"0.6057528","text":"public function getBook()\n {\n return $this->book;\n }","title":""},{"docid":"669deb11f94cf05762bcb17926e28570","score":"0.60473156","text":"public function show($id){\n $bookings = Booking::join('customers','bookings.customer_id','=','customers.customer_id')\n ->findOrFail($id);\n\n $paymentMethods = PaymentMethod::get();\n\n $customers = Customer::get();\n\n $guests = Guest::get();\n\n $rooms = Room::\n join('room_types','rooms.room_type_id','=','room_types.room_type_id')\n ->join('room_prices','rooms.room_price_id','=','room_prices.room_price_id')\n ->join('room_bands','rooms.room_band_id','=','room_bands.room_band_id')\n ->select('rooms.room_id','room_types.room_type','room_prices.room_price','room_bands.room_description')\n ->get();\n\n return view('bookings.show',[\n 'bookings' => $bookings,\n 'customers' => $customers,\n 'guests' => $guests,\n 'rooms' => $rooms,\n 'paymentMethods' => $paymentMethods\n ]);\n }","title":""},{"docid":"e4aaab52f152b6667606f9bd1d89c4ac","score":"0.60451174","text":"public function show(Booking $booking) {\n\t\t$client = Client::all();\n\t\t$payment = Payment::all();\n\t\t$service = Service::all();\n\t\t$setting = Setting::first();\n\t\t$user = User::all();\n\n\t\treturn view('bookings.show', compact('booking', 'client', 'payment', 'service', 'setting', 'user'));\n\t}","title":""},{"docid":"2007eb65f37f2626131f9fd81344ddb8","score":"0.6043769","text":"public function agentBookings()\n\t{\n\t\t$flightBooking = DB::select(\n 'SELECT * From flights \n WHERE booked_by = ? \n ORDER BY id DESC', ['agent']\n );\n\n \treturn response()->json([\n \t\t'flightBooking'=>$flightBooking, \n \t\t'message'=>'Flight Bookings for agent fetched Successfully'\n \t], 200);\n\t}","title":""},{"docid":"c851523e929db9778f0b2b5f96f04662","score":"0.60380363","text":"private function get_details()\n {\n }","title":""},{"docid":"107aacad2d94b054c036848737b11ee3","score":"0.60310125","text":"public function index()\n {\n //get data from database\n $Booking= BusScheduleBooking::all();\n\n //view data\n return new ScheduleResource($Booking);\n }","title":""},{"docid":"7f7361b577b072acbe895399447d53fd","score":"0.60013855","text":"public function show(Booking $booking)\n {\n return responder()->success(['booking' => $booking]);\n }","title":""},{"docid":"1317854ef9c6fada1d3bd1a05524076f","score":"0.59978926","text":"public function getBuyingDetails() {\n return $this->getParameter('buying_details');\n }","title":""},{"docid":"8b77f133b229a8274c8cd127adfb0041","score":"0.59977746","text":"public function showBookings()\n {\n $bookings = Booking::where(['user_id' => auth()->user()->id])->with('event')->get();\n return view('my_bookings', compact('bookings'));\n }","title":""},{"docid":"e0fa0576c4b1237fd5627a029838cef8","score":"0.5991396","text":"public function show(Reservation $reservation)\n {\n //\n }","title":""},{"docid":"bd887c7d2f2ba38ef256cbcfd7c32ff5","score":"0.59913266","text":"public function getBookings(){\n return $this->hasMany(Booking::className(), ['event_id' => 'id']);\n }","title":""},{"docid":"f0d2b3b716c8cb8fffb3f809d6cbeea5","score":"0.59824353","text":"public function booking(): BelongsTo\n {\n return $this->belongsTo(Booking::class);\n }","title":""},{"docid":"e4dbbbe89c900064177e2b4320610d39","score":"0.59808606","text":"public function show(BilletReservation $billetReservation)\n {\n //\n }","title":""},{"docid":"34b26129958f9e04878e1032bf17e498","score":"0.59418666","text":"public function budgetDetails()\n {\n return $this->activityService->getBudgetDetails();\n }","title":""},{"docid":"f2341b1b189b0a3ac2e6c54983f57ca1","score":"0.59338415","text":"public function getBookingUrl(){\n return 'http://booking.brusselstangofestival.com/frontend/web/booking/create?event_uuid='.$this->uuid;\n }","title":""},{"docid":"0063ff267681f7c590b4207543d13e3d","score":"0.59333694","text":"public function booking()\n {\n return view('templates.them6.booking');\n }","title":""},{"docid":"499496274201732ee78473ff08dd66bc","score":"0.5928207","text":"public static function getBookingSummary($bookingDetails){\r\n\t\t$result = \"\";\r\n\t\t\r\n\t\t$result.=\"

    \";\r\n\t\t$result.=\"
    \";\r\n\t\tif(isset($bookingDetails->event->pictures)){\r\n\t\t\t$result.=\"
    \";\r\n\t\t\t$result.= \"event->pictures[0]->picture_path.\"\\\" title=\\\"\".$bookingDetails->event->name.\"\\\" />\";\r\n\t\t\t$result.=\"
    \";\r\n\t\t}\r\n\t\t\r\n\t\t$result.=\"

    \".$bookingDetails->event->name.\"

    \";\r\n\t\t$result.=\"
    \";\r\n\t\t$result.= JBusinessUtil::getAddressText($bookingDetails->event);\r\n\t\t$result.=\"
    \";\r\n\t\t$result.=\"
    \";\r\n\t\t\r\n\t\tif(!empty($bookingDetails->event->contact_phone)){\r\n\t\t\t$result.=\"\".JText::_(\"LNG_PHONE\").\": \".$bookingDetails->event->contact_phone.\"&nbsp;&nbsp;&nbsp;&nbsp;\";\r\n\t\t}\r\n\t\t\r\n\t\tif(!empty($bookingDetails->event->contact_email)){\r\n\t\t\t$result.=\"\".JText::_(\"LNG_EMAIL\").\": \".$bookingDetails->event->contact_email.\"\";\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t$result.=\"
    \";\r\n\t\t$result.=\"
    \";\r\n\t\t$result.=\"
    \";\r\n\t\r\n\t\t$result.=self::getTicketsSummary($bookingDetails);\r\n\t\t\r\n\t\t$result.=\"
    \";\t\t\r\n\t\t\r\n\t\treturn $result;\r\n\t}","title":""},{"docid":"1d3ba0d564a442aac2f0bc9ec2dac5e9","score":"0.5925387","text":"public function book($p) {\n $p = $this->populateUserId($p);\n return $this->c['booking-service']->requestBooking($p)->attributes();\n }","title":""},{"docid":"112ef6346b28d58b998aba8524b4a78d","score":"0.592476","text":"public function bookingHistory(){\n $bookingHistory = Booking::with('bookingCar')->where('user_id',auth()->user()->id)->orderBy('id','desc')->get();\n toastr()->success('Check Your Booking Info.');\n return view('frontend.pages.profile.bookingHistory',\\compact('bookingHistory'));\n }","title":""},{"docid":"7405d783121a5845ee1f905701c64011","score":"0.5924454","text":"public function show($id)\n {\n //$bookinginfo = BookingInfo::findOrFail($id); //BookingInBookingInfo::findOrFail($id);\n $bookinginfo = DB::table('BookingInfo')->where('orderId', $id)->get()[0];\n //$bookinginfo = DB::table('BookingInfo')->get();\n return view('bookinginfos.show', compact('bookinginfo'));\n }","title":""},{"docid":"df3bdb2f44170bff662a77c459158e44","score":"0.59215194","text":"public function getBooking( $booking_order_id, Request $request)\n {\n try {\n \n $booking = \\App\\Bookings::with(['participant', 'supportWorker','serviceProvider', 'registration_group'])\n ->userBookings()\n ->where( 'booking_orders.id', $booking_order_id )\n ->first();\n // dd($booking->toArray() );\n if(!$booking)\n return response()->json(['status'=>false,'message'=>\"booking not found!\"], 404);\n\n\n return response()->json(['status'=>true,'bookings'=>$booking->toArray()], 200);\n\n }\n catch(Exception $exception) {\n return reportAndRespond($exception, 400);\n }\n }","title":""},{"docid":"1f19787a2a9a05960867859a00cf2505","score":"0.59140575","text":"function getBookingDetails ($db, $dep, $dest) {\n $query = '\n SELECT seats, email\n FROM users\n WHERE departure <= \"' . $dep . '\" AND destination >= \"' . $dest . '\"\n ORDER BY email;\n ';\n\n $details = '';\n $res = $db->query($query);\n\n if ($res) {\n $i = $res->num_rows;\n if ($i != 0)\n $details = ' -'; // just to format output\n\n while ($i--) {\n $line = $res->fetch_array(MYSQLI_NUM);\n $details = $details . \" \" . $line[1] . \" (\" . $line[0] . \")\";\n }\n\n $res->free();\n }\n\n return $details;\n }","title":""},{"docid":"65e53374a9560a059b34846e7d2644a3","score":"0.59103656","text":"public function show($r_id)\n {\n // Method ini berfungsi bukan untuk mencari booking berdasarkan ID Tetapi \n // berdasarkan ID Ruangan yang diklik oleh user\n\n $booking_u_id = DB::table('bookings')->select('u_id')->where('bookings.r_id', '=', $r_id)->first();\n $user_nip_nama = $user_department = DB::table('users')->select('nip', 'nama')->where('users.id', '=', $booking_u_id->u_id)->first();\n $booking = DB::table('bookings')->select('tanggal_selesai', 'tanggal_mulai', 'keperluan')->where('bookings.r_id', '=', $r_id)->first();;\n $booking->nip = $user_nip_nama->nip;\n $booking->nama = $user_nip_nama->nama;\n\n if (is_null($booking)) {\n // return response\n $response = [\n 'error' => true,\n 'message' => 'Booking not found.',\n ];\n return response()->json($response, 404);\n }\n \n // return response\n $response = [\n 'error' => false,\n 'msg' => 'Booking retrieved successfully.',\n 'booking_room' => $booking \n ];\n return response()->json($response, 200);\n }","title":""},{"docid":"b1c0fc09fc99df17660a0e62951c4aa3","score":"0.5910247","text":"function getBook()\n {\n $query = $GLOBALS['DB']->query(\"SELECT * FROM books_t WHERE id = {$this->getBookId()};\");\n $returned_book = $query->fetchAll(PDO::FETCH_ASSOC);\n\n $title = $returned_book[0]['title'];\n $id = $returned_book[0]['id'];\n $new_book = new Book($title, $id);\n return $new_book;\n }","title":""},{"docid":"4db467559384590b8ad788531b44aaa1","score":"0.5899562","text":"public function getDetailsBooks() {\n try {\n $books = DB::table('books')\n ->select('title', 'total_pages', 'created_date', 'img_url', 'content')\n ->get();\n return $this->respondSuccess('Get details of the books succeed!', $books);\n } catch (Exception $e) {\n return $this->respondError($e);\n }\n }","title":""},{"docid":"a8fe8a674c4212479991a581c39b195a","score":"0.58945155","text":"public function getAllBookingAttributes() {\r\n\t\treturn $this->ilRoomSharingDatabaseBookingAttribute->getAllBookingAttributes();\r\n\t}","title":""},{"docid":"73ab1dc134cf52c643f653090aaaa822","score":"0.589112","text":"public function getDetails()\n {\n return $this->name . ' : ' . $this->location;\n }","title":""},{"docid":"73ab1dc134cf52c643f653090aaaa822","score":"0.589112","text":"public function getDetails()\n {\n return $this->name . ' : ' . $this->location;\n }","title":""},{"docid":"3e78bf0e761d22235a4636d5e8bd7a8d","score":"0.58894825","text":"function getBillingDetails()\n {\n $data = $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/billing\");\n return $data;\n }","title":""},{"docid":"4e521fb364c59f56de495b03bba1cf90","score":"0.5883522","text":"public function reservation_detail(){\n return $this->hasOne('App\\Model\\ReservationDetail', 'cust_id', 'cust_id');\n }","title":""},{"docid":"4a0bce668e88d1c132af0511fd7e02f1","score":"0.5881713","text":"public function show(Borrowing $borrowing)\n {\n //\n }","title":""},{"docid":"9d3855e50c6163159d0d46d0f68e288a","score":"0.5881545","text":"public function find()\n {\n return $this->db->get( 'ref_obmp_booking' )->result() ;\n }","title":""}],"string":"[\n {\n \"docid\": \"d5f494e83169eef2f81dba20d6b9d534\",\n \"score\": \"0.77704346\",\n \"text\": \"public function getBooking()\\n {\\n return $this->booking;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"322ac690c81e6c20221706ff788467e0\",\n \"score\": \"0.7753924\",\n \"text\": \"public function getBooking() {\\n return $this->booking;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2762e8c0b590a16f7049059c39680064\",\n \"score\": \"0.7576667\",\n \"text\": \"public function getBooking()\\n {\\n return isset($this->Booking) ? $this->Booking : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e07aa9117806b50924bdc114c8948a5\",\n \"score\": \"0.7100773\",\n \"text\": \"public function show(Booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e07aa9117806b50924bdc114c8948a5\",\n \"score\": \"0.7100773\",\n \"text\": \"public function show(Booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e07aa9117806b50924bdc114c8948a5\",\n \"score\": \"0.7100773\",\n \"text\": \"public function show(Booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e07aa9117806b50924bdc114c8948a5\",\n \"score\": \"0.7100773\",\n \"text\": \"public function show(Booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e07aa9117806b50924bdc114c8948a5\",\n \"score\": \"0.7100773\",\n \"text\": \"public function show(Booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e07aa9117806b50924bdc114c8948a5\",\n \"score\": \"0.7100773\",\n \"text\": \"public function show(Booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e07aa9117806b50924bdc114c8948a5\",\n \"score\": \"0.7100773\",\n \"text\": \"public function show(Booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b9e09ed75838a0a1ac3919b84a9cac8\",\n \"score\": \"0.70689607\",\n \"text\": \"public function getInfoForBooking($booking_id) {\\r\\n\\t\\treturn $this->ilRoomSharingDatabaseBooking->getInfoForBooking($booking_id);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33502404a410143e3bea832c4a8517cd\",\n \"score\": \"0.7067205\",\n \"text\": \"public function show(booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33502404a410143e3bea832c4a8517cd\",\n \"score\": \"0.7067205\",\n \"text\": \"public function show(booking $booking)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b16ee4ec029923e165cffc6aa980799e\",\n \"score\": \"0.7001648\",\n \"text\": \"public function getInfoForBooking($booking_id) {\\r\\n\\t\\t$set = $this->ilDB->query('SELECT * FROM ' . dbc::BOOKINGS_TABLE . ' b LEFT JOIN ' . dbc::ROOMS_TABLE\\r\\n\\t\\t\\t. ' r ON r.id = b.room_id LEFT JOIN usr_data u ON u.usr_id = b.user_id WHERE b.id = ' . $this->ilDB->quote($booking_id, 'integer'));\\r\\n\\t\\t$info = array();\\r\\n\\t\\twhile ($row = $this->ilDB->fetchAssoc($set)) {\\r\\n\\t\\t\\t$info['title'] = $row['subject'];\\r\\n\\t\\t\\t$info['user'] = $row['public_booking'] == 1 ? 'Gebucht von ' . $row['firstname'] . ' ' . $row['lastname'] . '
    ' : '';\\r\\n\\t\\t\\t$info['description'] = $row['bookingcomment'];\\r\\n\\t\\t\\t$info['room'] = $row['name'];\\r\\n\\t\\t\\t$info['start'] = new ilDateTime($row['date_from'], IL_CAL_DATETIME);\\r\\n\\t\\t\\t$info['end'] = new ilDateTime($row['date_to'], IL_CAL_DATETIME);\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\treturn $info;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3a8a76926d6dd6e22228c46bccda859\",\n \"score\": \"0.69776\",\n \"text\": \"public function getBooking($booking){\\n $this->connect();\\n $sql = \\\"SELECT `booking_id`, `booking_guest_name`, `booking_guest_surname`, booking_guests_number , `guest_tel_number`, \\\";\\n $sql .= \\\" `booking_check_in`, `booking_check_out`, `booking_cost`, `booking_deposit`, `booking_commission`,\\\";\\n $sql .= \\\" `booking_source`, `booking_asset_id`, `guest_email` , booking_notes FROM `booking_details` WHERE `booking_id` = ?\\\";\\n $res = $this->execute($sql , [$booking->booking_id]);\\n $row = $res->fetch();\\n $booking->booking_id = $row['booking_id'];\\n $booking->booking_guest_name = $row['booking_guest_name'];\\n $booking->booking_guest_surname = $row['booking_guest_surname'];\\n $booking->booking_guests_number = $row['booking_guests_number'];\\n $booking->guest_tel_number = $row['guest_tel_number'];\\n $booking->booking_check_in = $row['booking_check_in'];\\n $booking->booking_check_out = $row['booking_check_out'];\\n $booking->booking_cost = $row['booking_cost'];\\n $booking->booking_deposit = $row['booking_deposit'];\\n $booking->booking_commission = $row['booking_commission'];\\n $booking->booking_source = $row['booking_source'];\\n $booking->booking_asset_id = $row['booking_asset_id'];\\n $booking->guest_email = $row['guest_email'];\\n $booking->booking_notes = $row['booking_notes'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01e1019f7a63c7aef8774609fb7fbf07\",\n \"score\": \"0.6938612\",\n \"text\": \"public function get()\\n {\\n $service_availability = $this->compareServiceAndResources();\\n $booking_obj = new Booking();\\n $bookings = $booking_obj->parseBookingsDates($this->service_bookings);\\n return $this->compareServiceAvailabilityAndBookings($service_availability, $bookings);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e7e2b6d8adeb52db1a061e0b5704fc9\",\n \"score\": \"0.68750626\",\n \"text\": \"public function getAllBooking(){\\n return $this->bookingRequest->getAllBooking();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a60cf227a1ea30b37e92fb28685749d6\",\n \"score\": \"0.6805333\",\n \"text\": \"public function getBooking($id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"028d8b8510effc243b326f2371438fad\",\n \"score\": \"0.67660123\",\n \"text\": \"public function bookingList()\\n {\\n \\t$userId = $this->userId;\\n \\tif ( $userId ) {\\n \\t\\t$data = [];\\n\\t \\t$booking = $this->model->getAllBookings($userId);\\n\\t \\tif( $booking ){\\n $i = 0;\\n\\t \\t\\twhile( $row = $booking->fetch_assoc() ){\\n $data[$i]['id'] = $row['bookId'];\\n $data[$i]['name'] = $row['name'];\\n $data[$i]['email'] = $row['email'];\\n $data[$i]['cars'] = $row['carName'];\\n $data[$i]['destination'] = $row['destiName'];\\n $data[$i]['pickup'] = $row['pickName'];\\n $data[$i]['booked'] = date('Y-m-d H:i',strtotime($row['booking_time']));\\n $data[$i]['returned'] = date('Y-m-d H:i',strtotime($row['return_time']));\\n $data[$i]['bookedAt'] = $row['booked_at'];\\n $i++;\\n }\\n\\t \\t} \\n \\t\\tinclude '../views/booking-list.php';\\n\\t \\texit();\\n \\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21fd72d7f900b21cb5f65eb4c357f2ab\",\n \"score\": \"0.6742847\",\n \"text\": \"public function getBookingDetails($bookingId){\\n $result = $data = $this->ThriftyClass->getBookingDetails($bookingId); \\n return Response::json($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a34d49b47bc2277154058cf5dbf6c3a\",\n \"score\": \"0.6741038\",\n \"text\": \"public function reservationDetailsAction()\\r\\n {\\r\\n $id = $this->params()->fromQuery('id');\\r\\n $dbAdapter = $this->getServiceLocator()->get(\\\"Adapter\\\");\\r\\n $model = new ReservationModel($dbAdapter);\\r\\n $model->setId($id);\\r\\n \\r\\n $out = [\\r\\n 'Reservation Id' => $id,\\r\\n 'Reserved By' => $model->clientName,\\r\\n 'Created At' => $model->created_at,\\r\\n 'Status' => $model->status,\\r\\n ];\\r\\n \\r\\n return $this->viewModel->setVariable('response', json_encode($out));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36c1c6d7915589624a07a3e512b76f0c\",\n \"score\": \"0.6697599\",\n \"text\": \"public function show($id)\\n\\t{\\n $booking = Booking::find($id);\\n return $booking;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fba7526c949078428b9709437fc271b1\",\n \"score\": \"0.6694696\",\n \"text\": \"public function getDetails($paramIncludeUnclassified = FALSE)\\r\\n {\\r\\n $ret = $this->getDataFromDatabaseById($this->bookingId);\\r\\n\\t\\t\\r\\n if(!is_null($ret))\\r\\n {\\r\\n // Make raw\\r\\n $ret['booking_code'] = stripslashes($ret['booking_code']);\\r\\n $ret['coupon_code'] = stripslashes($ret['coupon_code']);\\r\\n $ret['pickup_location_code'] = stripslashes($ret['pickup_location_code']);\\r\\n $ret['return_location_code'] = stripslashes($ret['return_location_code']);\\r\\n $ret['payment_method_code'] = stripslashes($ret['payment_method_code']);\\r\\n\\r\\n if($ret['booking_timestamp'] > 0)\\r\\n {\\r\\n $ret['booking_date'] = date_i18n($this->shortDateFormat, $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $ret['booking_time'] = date_i18n('H:i', $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $printBookingDate = date_i18n(get_option('date_format'), $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $printBookingTime = date_i18n(get_option('time_format'), $ret['booking_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n } else\\r\\n {\\r\\n $ret['booking_date'] = '';\\r\\n $ret['booking_time'] = '';\\r\\n $printBookingDate = '';\\r\\n $printBookingTime = '';\\r\\n }\\r\\n\\r\\n if($ret['pickup_timestamp'] > 0)\\r\\n {\\r\\n $ret['pickup_date'] = date_i18n($this->shortDateFormat, $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $ret['pickup_time'] = date_i18n('H:i', $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $printPickupDate = date_i18n(get_option('date_format'), $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $printPickupTime = date_i18n(get_option('time_format'), $ret['pickup_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n } else\\r\\n {\\r\\n $ret['pickup_date'] = '';\\r\\n $ret['pickup_time'] = '';\\r\\n $printPickupDate = '';\\r\\n $printPickupTime = '';\\r\\n }\\r\\n\\r\\n if($ret['return_timestamp'] > 0)\\r\\n {\\r\\n $ret['return_date'] = date_i18n($this->shortDateFormat, $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $ret['return_time'] = date_i18n('H:i', $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $printReturnDate = date_i18n(get_option('date_format'), $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n $printReturnTime = date_i18n(get_option('time_format'), $ret['return_timestamp'] + get_option('gmt_offset') * 3600, TRUE);\\r\\n } else\\r\\n {\\r\\n $ret['return_date'] = '';\\r\\n $ret['return_time'] = '';\\r\\n $printReturnDate = '';\\r\\n $printReturnTime = '';\\r\\n }\\r\\n\\r\\n $validBookingId = intval($ret['booking_id']);\\r\\n $bookedItemsSQL = \\\"\\r\\n SELECT bo.option_id, bo.units_booked,\\r\\n it.item_id, it.manufacturer_id, it.body_type_id, it.transmission_type_id, it.fuel_type_id\\r\\n FROM {$this->conf->getPrefix()}booking_options bo\\r\\n JOIN {$this->conf->getPrefix()}items it ON it.item_sku=bo.item_sku AND it.blog_id='{$ret['blog_id']}'\\r\\n WHERE booking_id='{$validBookingId}'\\r\\n \\\";\\r\\n $bookedExtrasSQL = \\\"\\r\\n SELECT ex.extra_id, bo.option_id, bo.units_booked\\r\\n FROM {$this->conf->getPrefix()}booking_options bo\\r\\n JOIN {$this->conf->getPrefix()}extras ex ON ex.extra_sku=bo.extra_sku AND ex.blog_id='{$ret['blog_id']}'\\r\\n WHERE booking_id='{$validBookingId}'\\r\\n \\\";\\r\\n $bookedItems = $this->conf->getInternalWPDB()->get_results($bookedItemsSQL, ARRAY_A);\\r\\n $bookedExtras = $this->conf->getInternalWPDB()->get_results($bookedExtrasSQL, ARRAY_A);\\r\\n\\r\\n // DEBUG\\r\\n // echo \\\"
    BOOKING: \\\".$validBookingId.\\\", ITEMS: \\\".nl2br(print_r($bookedItems, TRUE));\\r\\n\\r\\n // Cars and Car Units\\r\\n $ret['item_ids'] = array();\\r\\n $ret['item_units'] = array();\\r\\n $ret['item_options'] = array();\\r\\n $ret['items'] = array();\\r\\n foreach($bookedItems AS $reservedItem)\\r\\n {\\r\\n $ret['item_ids'][] = $reservedItem['item_id'];\\r\\n $ret['item_units'][$reservedItem['item_id']] = $reservedItem['units_booked'];\\r\\n $ret['item_options'][$reservedItem['item_id']] = $reservedItem['option_id'];\\r\\n $ret['items'][] = array(\\r\\n \\\"item_id\\\" => $reservedItem['item_id'],\\r\\n \\\"manufacturer_id\\\" => $reservedItem['manufacturer_id'],\\r\\n \\\"body_type_id\\\" => $reservedItem['body_type_id'],\\r\\n \\\"transmission_type_id\\\" => $reservedItem['transmission_type_id'],\\r\\n \\\"fuel_type_id\\\" => $reservedItem['fuel_type_id'],\\r\\n \\\"option_id\\\" => $reservedItem['option_id'],\\r\\n \\\"units_booked\\\" => $reservedItem['units_booked'],\\r\\n );\\r\\n }\\r\\n\\r\\n // Extras and Extra Units\\r\\n $ret['extra_ids'] = array();\\r\\n $ret['extra_options'] = array();\\r\\n $ret['extra_units'] = array();\\r\\n $ret['extras'] = array();\\r\\n foreach($bookedExtras AS $reservedExtra)\\r\\n {\\r\\n $ret['extra_ids'][] = $reservedExtra['extra_id'];\\r\\n $ret['extra_options'][$reservedExtra['extra_id']] = $reservedExtra['option_id'];\\r\\n $ret['extra_units'][$reservedExtra['extra_id']] = $reservedExtra['units_booked'];\\r\\n $ret['extras'][] = array(\\r\\n \\\"extra_id\\\" => $reservedExtra['extra_id'],\\r\\n \\\"option_id\\\" => $reservedExtra['option_id'],\\r\\n \\\"units_booked\\\" => $reservedExtra['units_booked'],\\r\\n );\\r\\n }\\r\\n\\r\\n // Get payment status text and color\\r\\n $ret['print_payment_status'] = \\\"\\\";\\r\\n $ret['payment_status_color'] = \\\"#FF0000\\\";\\r\\n if($ret['payment_successful'] == 0)\\r\\n {\\r\\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_UNPAID_TEXT');\\r\\n $ret['payment_status_color'] = \\\"#FF0000\\\";\\r\\n } else if($ret['payment_successful'] == 1)\\r\\n {\\r\\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_PAID_TEXT');\\r\\n $ret['payment_status_color'] = \\\"black\\\";\\r\\n } else if($ret['payment_successful'] == 2)\\r\\n {\\r\\n $ret['print_payment_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_REFUNDED_TEXT');\\r\\n $ret['payment_status_color'] = \\\"navy\\\";\\r\\n }\\r\\n\\r\\n // Get booking status text and color\\r\\n $ret['print_booking_status'] = \\\"\\\";\\r\\n $ret['booking_status_color'] = \\\"black\\\";\\r\\n if($ret['is_cancelled'] == 0 && $ret['return_timestamp'] >= time())\\r\\n {\\r\\n if($ret['pickup_timestamp'] <= time())\\r\\n {\\r\\n // Departed\\r\\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_DEPARTED_TEXT');\\r\\n $ret['booking_status_color'] = \\\"blue\\\";\\r\\n } else\\r\\n {\\r\\n // Upcoming\\r\\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_UPCOMING_TEXT');\\r\\n $ret['booking_status_color'] = \\\"green\\\";\\r\\n }\\r\\n } else if($ret['is_cancelled'] == 0 && $ret['return_timestamp'] < time())\\r\\n {\\r\\n if($ret['is_completed_early'] == 1)\\r\\n {\\r\\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_COMPLETED_EARLY_TEXT');\\r\\n $ret['booking_status_color'] = \\\"black\\\";\\r\\n } else\\r\\n {\\r\\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_COMPLETED_TEXT');\\r\\n $ret['booking_status_color'] = \\\"black\\\";\\r\\n }\\r\\n } else if($ret['is_cancelled'] == 1)\\r\\n {\\r\\n $ret['print_booking_status'] = $this->lang->getText('NRS_ADMIN_BOOKING_STATUS_CANCELLED_TEXT');\\r\\n $ret['booking_status_color'] = \\\"red\\\";\\r\\n }\\r\\n\\r\\n\\r\\n // Prepare output for print\\r\\n $ret['print_booking_date'] = $printBookingDate;\\r\\n $ret['print_booking_time'] = $printBookingTime;\\r\\n $ret['print_pickup_date'] = $printPickupDate;\\r\\n $ret['print_pickup_time'] = $printPickupTime;\\r\\n $ret['print_return_date'] = $printReturnDate;\\r\\n $ret['print_return_time'] = $printReturnTime;\\r\\n $ret['print_booking_code'] = esc_html($ret['booking_code']);\\r\\n $ret['print_coupon_code'] = esc_html($ret['coupon_code']);\\r\\n $ret['print_pickup_location_code'] = esc_html($ret['pickup_location_code']);\\r\\n $ret['print_return_location_code'] = esc_html($ret['return_location_code']);\\r\\n $ret['print_payment_method_code'] = esc_html($ret['payment_method_code']);\\r\\n $ret['print_block_name'] = esc_html($ret['block_name']);\\r\\n\\r\\n // Prepare output for edit\\r\\n $ret['edit_booking_code'] = esc_attr($ret['booking_code']); // for input field\\r\\n $ret['edit_coupon_code'] = esc_attr($ret['coupon_code']); // for input field\\r\\n $ret['edit_pickup_location_code'] = esc_attr($ret['pickup_location_code']); // for input field\\r\\n $ret['edit_return_location_code'] = esc_attr($ret['return_location_code']); // for input field\\r\\n $ret['edit_payment_method_code'] = esc_attr($ret['payment_method_code']); // for input field\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n }\\r\\n\\r\\n return $ret;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0408c0b383e13fc9fea11449e1d21186\",\n \"score\": \"0.6646103\",\n \"text\": \"public function getBookingDetails($bookingId, $bookingHash){\\n\\t\\t//For this function signature is required. (md5($bookingId . $bookingHash . $secretKey))\\n\\t\\t$sign = md5($bookingId . $bookingHash. $this->_secretKey);\\n\\t\\treturn $this->api()->execute(\\\"getBookingDetails\\\", array($bookingId, $sign), array(), null, $this->getHeaderParams());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be42e9cded8992e6006c23be67033659\",\n \"score\": \"0.66242254\",\n \"text\": \"public function customerOwnBookingDetails($id){\\n $booking = Booking::where('user_id',$id)->get();\\n return $booking;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08cb111f865fc97423a424676eec0f93\",\n \"score\": \"0.65902334\",\n \"text\": \"public function booking()\\n {\\n return $this->hasOne('App\\\\Booking');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b87d2a6daa031df55f3c5c9905a2dcd7\",\n \"score\": \"0.65802604\",\n \"text\": \"public function booking()\\n {\\n return $this->hasMany(Booking::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d63b1f3734bb15ff3ec11d386fa4db3\",\n \"score\": \"0.6543312\",\n \"text\": \"public function show(BookingRoom $bookingRoom)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bb251aab9eea5d141f9c7d456010cbf\",\n \"score\": \"0.65304047\",\n \"text\": \"public function getDetails();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dee22053026546970a79fc1b4fd0dc05\",\n \"score\": \"0.65064144\",\n \"text\": \"public function get_transaction_details($booking_id) {\\n $this->db->select('transaction_details.*');\\n $this->db->from('transaction_details');\\n $this->db->where('transaction_details.booking_id', $booking_id);\\n $query = $this->db->get();\\n $query_result = $query->result();\\n if (count($query_result) == 0) {\\n $transaction_details = $query_result;\\n } else {\\n $transaction_details = $query_result[0];\\n }\\n return $transaction_details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc182c740be519e9dbc7f18cd6524cb3\",\n \"score\": \"0.6498562\",\n \"text\": \"public function getId() {\\n return $this->bookingId;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61eb2252ad53c3993ea899d0e426b46d\",\n \"score\": \"0.64578277\",\n \"text\": \"public function getBookingById($bookingId){\\n return $this->bookingRequest->getBookingById($bookingId);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85fa6e801c63a3b33104d3b3e671e02a\",\n \"score\": \"0.64231545\",\n \"text\": \"public function getTempBookingDetails()\\n {\\n try\\n {\\n //set default booking id\\n $booking_id = null;\\n\\n //set default start date\\n $start_date = null;\\n\\n //set default end date\\n $end_date = null;\\n\\n //set default adults, children and infants\\n $adults = 0;\\n $children = 0;\\n $infants = 0;\\n\\n //set default customer data\\n $full_name = null;\\n $country = null;\\n $phone = null;\\n $email = null;\\n\\n //set default downpayment and remaining payment\\n $downpayment = 0;\\n $formatted_downpayment = 0;\\n $remaining_payment = 0;\\n $formatted_remaining_payment = 0;\\n\\n //set default due date\\n $due_date = null;\\n\\n //if search dates session exists format start date and end date\\n if (Session::has('search_dates'))\\n {\\n $search_dates = Session::get('search_dates');\\n\\n $start_date = date('d.m.Y.', strtotime(substr($search_dates, 0, 11)));\\n $end_date = date('d.m.Y.', strtotime(substr($search_dates, 14, 25)));\\n }\\n\\n //if temp booking session exists get temp booking data\\n if (Session::has('booking'))\\n {\\n $booking = TempBooking::where('booking_token', '=', Session::get('booking'))->first();\\n\\n //if temp booking doesn't exist return error status\\n if (!$booking)\\n {\\n return ['status' => 0];\\n }\\n\\n //set booking id\\n $booking_id = $booking->id;\\n\\n $villa = Villa::where('id', '=', $booking->villa_id)->first();\\n\\n //set start date and end date\\n $start_date = date('d.m.Y.', strtotime($booking->start_date));\\n $end_date = date('d.m.Y.', strtotime($booking->end_date));\\n\\n //set adults, children and infants\\n $adults = $booking->adults;\\n $children = $booking->children;\\n $infants = $booking->infants;\\n\\n //if temp booking customer exists set customer data\\n if ($booking->customer_id)\\n {\\n $customer = Customer::find($booking->customer_id);\\n\\n $full_name = $customer->full_name;\\n $country = $customer->country;\\n $phone = $customer->phone;\\n $email = $customer->email;\\n }\\n\\n //call calculateBookingPayment method to calculate booking downpayment and remaining payment\\n $booking_payment = $this->calculateBookingPayment($villa->id, $start_date, $end_date);\\n\\n //set downpayment and remaining payment\\n $downpayment = $booking_payment['downpayment'];\\n $formatted_downpayment = $booking_payment['formatted_downpayment'];\\n $remaining_payment = $booking_payment['remaining_payment'];\\n $formatted_remaining_payment = $booking_payment['formatted_remaining_payment'];\\n\\n //call calculateDueDate method to calculate due date\\n $due_date = $this->calculateDueDate($start_date);\\n }\\n\\n return ['status' => 1, 'id' => $booking_id, 'start_date' => $start_date, 'end_date' => $end_date, 'adults' => $adults,\\n 'children' => $children, 'infants' => $infants, 'full_name' => $full_name, 'country' => $country, 'phone' => $phone,\\n 'email' => $email, 'downpayment' => $downpayment, 'formatted_downpayment' => $formatted_downpayment,\\n 'remaining_payment' => $remaining_payment, 'formatted_remaining_payment' => $formatted_remaining_payment,\\n 'due_date' => $due_date];\\n }\\n catch (Exception $e)\\n {\\n return ['status' => 0, 'error' => trans('errors.error')];\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a010e0b1bc96a05a3dcc636a124a0be\",\n \"score\": \"0.6410199\",\n \"text\": \"public function getBookingId() {\\n return $this->bookingId;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9cc4c28e5587debb9995873c5308b6e\",\n \"score\": \"0.63809425\",\n \"text\": \"public function show(Booking $booking)\\n { \\n // $messages = collect();\\n // $first_message = $booking->message;\\n // if( $first_message != \\\"Sin message.\\\"){\\n // $messages->push( $first_message);\\n // }\\n // $messages = $messages->toBase()->merge($booking->messages()->orderBy('created_at','ASC')->get());\\n $firstMessage = new Message;\\n $firstMessage->message = $booking->message;\\n $firstMessage->status = 1;\\n $firstMessage->destination = 0;\\n $firstMessage->read = 2;\\n $firstMessage->created_at = now(); \\n $firstMessage->updated_at = now();\\n $firstMessage->bookings_id = $booking->id;\\n $messages = array();\\n array_push($messages, $firstMessage);\\n foreach ($booking->messages->sortBy('created_at') as $message) {\\n array_push($messages, $message);\\n }\\n return response()->json($messages, 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0be0eafc876aa5f0ee9b216296699f3f\",\n \"score\": \"0.6364013\",\n \"text\": \"function getDetails() { return $this->details; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03caffe0277f52515df320aad93febd5\",\n \"score\": \"0.6344791\",\n \"text\": \"function get_booking_details($app_reference, $booking_source, $booking_status='')\\r\\n {\\r\\n $response['status'] = FAILURE_STATUS;\\r\\n $response['data'] = array();\\r\\n $bd_query = 'select * from sightseeing_booking_details AS BD WHERE BD.app_reference like '.$this->db->escape($app_reference);\\r\\n if (empty($booking_source) == false) {\\r\\n $bd_query .= ' AND BD.booking_source = '.$this->db->escape($booking_source);\\r\\n }\\r\\n if (empty($booking_status) == false) {\\r\\n $bd_query .= ' AND BD.status = '.$this->db->escape($booking_status);\\r\\n }\\r\\n $id_query = 'select * from sightseeing_booking_itinerary_details AS ID WHERE ID.app_reference='.$this->db->escape($app_reference);\\r\\n $cd_query = 'select * from sightseeing_booking_pax_details AS CD WHERE CD.app_reference='.$this->db->escape($app_reference);\\r\\n $cancellation_details_query = 'select HCD.* from sightseeing_cancellation_details AS HCD WHERE HCD.app_reference='.$this->db->escape($app_reference);\\r\\n $response['data']['booking_details'] = $this->db->query($bd_query)->result_array();\\r\\n $response['data']['booking_itinerary_details'] = $this->db->query($id_query)->result_array();\\r\\n $response['data']['booking_customer_details'] = $this->db->query($cd_query)->result_array();\\r\\n $response['data']['cancellation_details'] = $this->db->query($cancellation_details_query)->result_array();\\r\\n if (valid_array($response['data']['booking_details']) == true and valid_array($response['data']['booking_itinerary_details']) == true and valid_array($response['data']['booking_customer_details']) == true) {\\r\\n $response['status'] = SUCCESS_STATUS;\\r\\n }\\r\\n\\r\\n $response['data']['booking_details'][0]['attributes']= unserialized_data($response['data']['booking_details'][0]['attributes']);\\r\\n //debug($response);die('88');\\r\\n return $response;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05ecbb830ec58fd272db53ddd4229a13\",\n \"score\": \"0.6335857\",\n \"text\": \"function view_detail_bk($bk_id) {\\n\\t $pass_id = $this->getCurrentPassengerId();\\n\\t $bkInfo = $this->mod_fecustomize->bookingInfoByPassengerIDAndBookingID($bk_id, $pass_id);\\n\\t\\n\\t return $bkInfo;\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b2c634659a79b526c322147ce3c435e\",\n \"score\": \"0.63273805\",\n \"text\": \"function get_booking_details($app_reference, $booking_source, $booking_status = '') {\\r\\n\\t\\t$response ['status'] = FAILURE_STATUS;\\r\\n\\t\\t$response ['data'] = array ();\\r\\n\\t\\t$bd_query = 'select BD.* , ud.logo as user_image from hotel_booking_details AS BD INNER JOIN b2b_user_details as ud on BD.created_by_id=ud.user_oid WHERE BD.app_reference like ' . $this->db->escape ( $app_reference );\\r\\n\\t\\tif (empty ( $booking_source ) == false) {\\r\\n\\t\\t\\t$bd_query .= '\\tAND BD.booking_source = ' . $this->db->escape ( $booking_source );\\r\\n\\t\\t}\\r\\n\\t\\tif (empty ( $booking_status ) == false) {\\r\\n\\t\\t\\t$bd_query .= ' AND BD.status = ' . $this->db->escape ( $booking_status );\\r\\n\\t\\t}\\r\\n\\t\\t$id_query = 'select * from hotel_booking_itinerary_details AS ID WHERE ID.app_reference=' . $this->db->escape ( $app_reference );\\r\\n\\t\\t$cd_query = 'select * from hotel_booking_pax_details AS CD WHERE CD.app_reference=' . $this->db->escape ( $app_reference );\\r\\n\\t\\t$cancellation_details_query = 'select HCD.* from hotel_cancellation_details AS HCD WHERE HCD.app_reference=' . $this->db->escape ( $app_reference );\\r\\n\\t\\t$response ['data'] ['booking_details'] = $this->db->query ( $bd_query )->result_array ();\\r\\n\\t\\t$response ['data'] ['booking_itinerary_details'] = $this->db->query ( $id_query )->result_array ();\\r\\n\\t\\t$response ['data'] ['booking_customer_details'] = $this->db->query ( $cd_query )->result_array ();\\r\\n\\t\\t$response ['data'] ['cancellation_details'] = $this->db->query ( $cancellation_details_query )->result_array ();\\r\\n\\t\\tif (valid_array ( $response ['data'] ['booking_details'] ) == true and valid_array ( $response ['data'] ['booking_itinerary_details'] ) == true and valid_array ( $response ['data'] ['booking_customer_details'] ) == true) {\\r\\n\\t\\t\\t$response ['status'] = SUCCESS_STATUS;\\r\\n\\t\\t}\\r\\n\\t\\treturn $response;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c1321bb616a434c2c8d27c2695e64be\",\n \"score\": \"0.6326076\",\n \"text\": \"public function showBooking(Request $request, $booking_id) {\\n\\n //$booking = Booking::with('payments')->find($booking_id)->get();\\n\\n $booking = Booking::with('payments')->where(['id' => $booking_id])->get();\\n\\n\\n return $this->prepareResult(true, $booking, [],\\\"All results fetched\\\");\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"931a2bec590ed48fc38ff1a6fdcb95a6\",\n \"score\": \"0.6321631\",\n \"text\": \"public function getBillingDetails();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3c3c5bc675d9ad87c97f8d20982ac6f\",\n \"score\": \"0.63180083\",\n \"text\": \"public function getDataBookingDetails(Request $request)\\n {\\n $id_booking = $request->get('id');\\n $bookingDetail = Archive::GetDataBookingDetails($id_booking);\\n $booking = Archive::GetBookingById($id_booking);\\n return json_encode(['bookingDetail' => $bookingDetail, 'booking' => $booking]);\\n\\n return json_encode($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa185a747d19cf8f0e6cfbf602941382\",\n \"score\": \"0.63115513\",\n \"text\": \"function showBookingDetail($bookingId)\\n {\\n $data['bookingDetail'] = $this->roombooking_model->getBookingDetailById($bookingId);\\n $this->global['rooms'] = $this->room_model->getRoomsByBossId();\\n $this->global['pageTitle'] = '活动详情';\\n $this->loadViews(\\\"roombookingdetail\\\", $this->global, $data, NULL);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3ce3c98bbcb5204e0789022ef10c92c\",\n \"score\": \"0.6292069\",\n \"text\": \"public function getDetails()\\n {\\n return $this->details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df408d2feaa96540cf93d955d3915e08\",\n \"score\": \"0.6290209\",\n \"text\": \"public function show(SpaBooking $spaBooking)\\n {\\n return $spaBooking;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f93d3cbeb4eb960e723141fe37538b2e\",\n \"score\": \"0.6242207\",\n \"text\": \"public function getDetails()\\n {\\n return $this->_details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03e476423763b5e0c18cfc3d0b4c4c80\",\n \"score\": \"0.6224165\",\n \"text\": \"public function show($id)\\n {\\n $bus_schedule_bookings = Bus_schedule_booking::find($id);\\n if($bus_schedule_bookings)\\n {\\n return response()->json(['buses' => $bus_schedule_bookings], 200);\\n }\\n //if the id not found\\n else\\n {\\n return response()->json(['message'=>'No Bus Booking Found'],404);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e93428909d990d5a267702cb5ba71e3\",\n \"score\": \"0.6186565\",\n \"text\": \"public function getBookingId(){\\n return $this->bookingId;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3bf8db4f118124a80138e2ba27cb17a\",\n \"score\": \"0.61703455\",\n \"text\": \"public function getDetail()\\n {\\n // populate fields\\n $query = array(self::TRANSACTION_ID => $this->transactionId);\\n // call request method\\n $response = $this->request(self::GET_DETAIL, $query);\\n\\n return $response;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b1f4de71d38e1cb778d61df1f2e8f71\",\n \"score\": \"0.6165811\",\n \"text\": \"public function customer(){\\n return $this->hasOne('App\\\\Customer');\\n //this customer belongs to this booking. access to any data of this customer\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"feacdb3bd641385b03d02802e9d0bee9\",\n \"score\": \"0.61597687\",\n \"text\": \"public function booking() {\\n return $this->belongsTo('App\\\\Booking');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"262e9854698e20ef91d17bfdbe7ecd8d\",\n \"score\": \"0.6129942\",\n \"text\": \"public function getDetails() {\\n\\t\\treturn $this->details;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eba06708b5788c9705425292c88cb108\",\n \"score\": \"0.61190265\",\n \"text\": \"public function getReservation() {\\n return $this->ReservationDao->getReservation();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75afdcacc2edc88168ddb4e56817f5ec\",\n \"score\": \"0.6107137\",\n \"text\": \"public function show($id){\\n $booking=Booking::find($id);\\n if(!$booking){\\n return response()->json([\\n 'error'=>404,\\n 'message'=>'Not found',\\n ],404);\\n }\\n return $booking;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b888c40e18d08cc7fd4dd14ae35af3a\",\n \"score\": \"0.61058414\",\n \"text\": \"public function bookingList()\\n {\\n $booking_lists = BookingSlot::with('user')->where('student_id', '!=' , 0)->where('slote_date', date('Y-m-d'))->get();\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"11bd8cabf873598524479e53cb98ae5b\",\n \"score\": \"0.61036086\",\n \"text\": \"abstract public function getDetails();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd9a965d730192dc2541783e345700c9\",\n \"score\": \"0.6090413\",\n \"text\": \"public function show($id)\\n {\\n $booking = Booking::find($id);\\n\\n if(!$booking){\\n return response()->json(['message' => 'This booking does not exist','success'=> 0 , 'code' => 404], 404);\\n }\\n\\n return $booking;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87bedc0c7c72283f1893857567b06358\",\n \"score\": \"0.6087479\",\n \"text\": \"public function getBooking()\\n {\\n return $this->hasOne(Jobs::className(), ['booking_id' => 'booking_id']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0eb3625ea8a6086d94d112b5e24ce457\",\n \"score\": \"0.6084558\",\n \"text\": \"public function getBook()\\n {\\n return $this->book;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cacd3b94dae178e47e06c22245116282\",\n \"score\": \"0.6076667\",\n \"text\": \"public function getBillDetails()\\n {\\n $bill = new BillModel('http://safe-plains-5453.herokuapp.com/bill.json');\\n print $this->returnJson($bill->getBill('bill.json'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff5ff8fbbafe768853decdc0a7d56474\",\n \"score\": \"0.6067298\",\n \"text\": \"public function TripDetails() {\\n /**\\n * Get the Customer Detils\\n */\\n $customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\\n /**\\n * Get the Customer ID\\n */\\n $customerId = $customer->getId ();\\n $todayData = Mage::getModel ( 'core/date' )->timestamp ( time () );\\n $todayDate = date ( 'Y-m-d', $todayData );\\n /**\\n * Get Colletion for the 'airhotels/airhotels/airhotels' with some filter\\n * 'order_status'\\n * 'fromDate'\\n * 'Todate'\\n * CustomerID\\n */ \\n return Mage::getModel ( 'airhotels/airhotels' )->getCollection ()->addFieldToFilter ( 'order_status', 1 )->addFieldToFilter ( 'todate', array (\\n 'lteq' => $todayDate \\n ) )->addFieldToFilter ( 'customer_id', $customerId )->setOrder ( 'id', 'DESC' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e157b036dbacef71d4de58f1c41fa6c8\",\n \"score\": \"0.6057528\",\n \"text\": \"public function getBook()\\n {\\n return $this->book;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"669deb11f94cf05762bcb17926e28570\",\n \"score\": \"0.60473156\",\n \"text\": \"public function show($id){\\n $bookings = Booking::join('customers','bookings.customer_id','=','customers.customer_id')\\n ->findOrFail($id);\\n\\n $paymentMethods = PaymentMethod::get();\\n\\n $customers = Customer::get();\\n\\n $guests = Guest::get();\\n\\n $rooms = Room::\\n join('room_types','rooms.room_type_id','=','room_types.room_type_id')\\n ->join('room_prices','rooms.room_price_id','=','room_prices.room_price_id')\\n ->join('room_bands','rooms.room_band_id','=','room_bands.room_band_id')\\n ->select('rooms.room_id','room_types.room_type','room_prices.room_price','room_bands.room_description')\\n ->get();\\n\\n return view('bookings.show',[\\n 'bookings' => $bookings,\\n 'customers' => $customers,\\n 'guests' => $guests,\\n 'rooms' => $rooms,\\n 'paymentMethods' => $paymentMethods\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4aaab52f152b6667606f9bd1d89c4ac\",\n \"score\": \"0.60451174\",\n \"text\": \"public function show(Booking $booking) {\\n\\t\\t$client = Client::all();\\n\\t\\t$payment = Payment::all();\\n\\t\\t$service = Service::all();\\n\\t\\t$setting = Setting::first();\\n\\t\\t$user = User::all();\\n\\n\\t\\treturn view('bookings.show', compact('booking', 'client', 'payment', 'service', 'setting', 'user'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2007eb65f37f2626131f9fd81344ddb8\",\n \"score\": \"0.6043769\",\n \"text\": \"public function agentBookings()\\n\\t{\\n\\t\\t$flightBooking = DB::select(\\n 'SELECT * From flights \\n WHERE booked_by = ? \\n ORDER BY id DESC', ['agent']\\n );\\n\\n \\treturn response()->json([\\n \\t\\t'flightBooking'=>$flightBooking, \\n \\t\\t'message'=>'Flight Bookings for agent fetched Successfully'\\n \\t], 200);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c851523e929db9778f0b2b5f96f04662\",\n \"score\": \"0.60380363\",\n \"text\": \"private function get_details()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"107aacad2d94b054c036848737b11ee3\",\n \"score\": \"0.60310125\",\n \"text\": \"public function index()\\n {\\n //get data from database\\n $Booking= BusScheduleBooking::all();\\n\\n //view data\\n return new ScheduleResource($Booking);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f7361b577b072acbe895399447d53fd\",\n \"score\": \"0.60013855\",\n \"text\": \"public function show(Booking $booking)\\n {\\n return responder()->success(['booking' => $booking]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1317854ef9c6fada1d3bd1a05524076f\",\n \"score\": \"0.59978926\",\n \"text\": \"public function getBuyingDetails() {\\n return $this->getParameter('buying_details');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b77f133b229a8274c8cd127adfb0041\",\n \"score\": \"0.59977746\",\n \"text\": \"public function showBookings()\\n {\\n $bookings = Booking::where(['user_id' => auth()->user()->id])->with('event')->get();\\n return view('my_bookings', compact('bookings'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0fa0576c4b1237fd5627a029838cef8\",\n \"score\": \"0.5991396\",\n \"text\": \"public function show(Reservation $reservation)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd887c7d2f2ba38ef256cbcfd7c32ff5\",\n \"score\": \"0.59913266\",\n \"text\": \"public function getBookings(){\\n return $this->hasMany(Booking::className(), ['event_id' => 'id']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0d2b3b716c8cb8fffb3f809d6cbeea5\",\n \"score\": \"0.59824353\",\n \"text\": \"public function booking(): BelongsTo\\n {\\n return $this->belongsTo(Booking::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4dbbbe89c900064177e2b4320610d39\",\n \"score\": \"0.59808606\",\n \"text\": \"public function show(BilletReservation $billetReservation)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34b26129958f9e04878e1032bf17e498\",\n \"score\": \"0.59418666\",\n \"text\": \"public function budgetDetails()\\n {\\n return $this->activityService->getBudgetDetails();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2341b1b189b0a3ac2e6c54983f57ca1\",\n \"score\": \"0.59338415\",\n \"text\": \"public function getBookingUrl(){\\n return 'http://booking.brusselstangofestival.com/frontend/web/booking/create?event_uuid='.$this->uuid;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0063ff267681f7c590b4207543d13e3d\",\n \"score\": \"0.59333694\",\n \"text\": \"public function booking()\\n {\\n return view('templates.them6.booking');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"499496274201732ee78473ff08dd66bc\",\n \"score\": \"0.5928207\",\n \"text\": \"public static function getBookingSummary($bookingDetails){\\r\\n\\t\\t$result = \\\"\\\";\\r\\n\\t\\t\\r\\n\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\tif(isset($bookingDetails->event->pictures)){\\r\\n\\t\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\t\\t$result.= \\\"event->pictures[0]->picture_path.\\\"\\\\\\\" title=\\\\\\\"\\\".$bookingDetails->event->name.\\\"\\\\\\\" />\\\";\\r\\n\\t\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t$result.=\\\"

    \\\".$bookingDetails->event->name.\\\"

    \\\";\\r\\n\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\t$result.= JBusinessUtil::getAddressText($bookingDetails->event);\\r\\n\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\t\\r\\n\\t\\tif(!empty($bookingDetails->event->contact_phone)){\\r\\n\\t\\t\\t$result.=\\\"\\\".JText::_(\\\"LNG_PHONE\\\").\\\": \\\".$bookingDetails->event->contact_phone.\\\"&nbsp;&nbsp;&nbsp;&nbsp;\\\";\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tif(!empty($bookingDetails->event->contact_email)){\\r\\n\\t\\t\\t$result.=\\\"\\\".JText::_(\\\"LNG_EMAIL\\\").\\\": \\\".$bookingDetails->event->contact_email.\\\"\\\";\\r\\n\\t\\t}\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\t$result.=\\\"
    \\\";\\r\\n\\t\\r\\n\\t\\t$result.=self::getTicketsSummary($bookingDetails);\\r\\n\\t\\t\\r\\n\\t\\t$result.=\\\"
    \\\";\\t\\t\\r\\n\\t\\t\\r\\n\\t\\treturn $result;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d3ba0d564a442aac2f0bc9ec2dac5e9\",\n \"score\": \"0.5925387\",\n \"text\": \"public function book($p) {\\n $p = $this->populateUserId($p);\\n return $this->c['booking-service']->requestBooking($p)->attributes();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"112ef6346b28d58b998aba8524b4a78d\",\n \"score\": \"0.592476\",\n \"text\": \"public function bookingHistory(){\\n $bookingHistory = Booking::with('bookingCar')->where('user_id',auth()->user()->id)->orderBy('id','desc')->get();\\n toastr()->success('Check Your Booking Info.');\\n return view('frontend.pages.profile.bookingHistory',\\\\compact('bookingHistory'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7405d783121a5845ee1f905701c64011\",\n \"score\": \"0.5924454\",\n \"text\": \"public function show($id)\\n {\\n //$bookinginfo = BookingInfo::findOrFail($id); //BookingInBookingInfo::findOrFail($id);\\n $bookinginfo = DB::table('BookingInfo')->where('orderId', $id)->get()[0];\\n //$bookinginfo = DB::table('BookingInfo')->get();\\n return view('bookinginfos.show', compact('bookinginfo'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df3bdb2f44170bff662a77c459158e44\",\n \"score\": \"0.59215194\",\n \"text\": \"public function getBooking( $booking_order_id, Request $request)\\n {\\n try {\\n \\n $booking = \\\\App\\\\Bookings::with(['participant', 'supportWorker','serviceProvider', 'registration_group'])\\n ->userBookings()\\n ->where( 'booking_orders.id', $booking_order_id )\\n ->first();\\n // dd($booking->toArray() );\\n if(!$booking)\\n return response()->json(['status'=>false,'message'=>\\\"booking not found!\\\"], 404);\\n\\n\\n return response()->json(['status'=>true,'bookings'=>$booking->toArray()], 200);\\n\\n }\\n catch(Exception $exception) {\\n return reportAndRespond($exception, 400);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f19787a2a9a05960867859a00cf2505\",\n \"score\": \"0.59140575\",\n \"text\": \"function getBookingDetails ($db, $dep, $dest) {\\n $query = '\\n SELECT seats, email\\n FROM users\\n WHERE departure <= \\\"' . $dep . '\\\" AND destination >= \\\"' . $dest . '\\\"\\n ORDER BY email;\\n ';\\n\\n $details = '';\\n $res = $db->query($query);\\n\\n if ($res) {\\n $i = $res->num_rows;\\n if ($i != 0)\\n $details = ' -'; // just to format output\\n\\n while ($i--) {\\n $line = $res->fetch_array(MYSQLI_NUM);\\n $details = $details . \\\" \\\" . $line[1] . \\\" (\\\" . $line[0] . \\\")\\\";\\n }\\n\\n $res->free();\\n }\\n\\n return $details;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65e53374a9560a059b34846e7d2644a3\",\n \"score\": \"0.59103656\",\n \"text\": \"public function show($r_id)\\n {\\n // Method ini berfungsi bukan untuk mencari booking berdasarkan ID Tetapi \\n // berdasarkan ID Ruangan yang diklik oleh user\\n\\n $booking_u_id = DB::table('bookings')->select('u_id')->where('bookings.r_id', '=', $r_id)->first();\\n $user_nip_nama = $user_department = DB::table('users')->select('nip', 'nama')->where('users.id', '=', $booking_u_id->u_id)->first();\\n $booking = DB::table('bookings')->select('tanggal_selesai', 'tanggal_mulai', 'keperluan')->where('bookings.r_id', '=', $r_id)->first();;\\n $booking->nip = $user_nip_nama->nip;\\n $booking->nama = $user_nip_nama->nama;\\n\\n if (is_null($booking)) {\\n // return response\\n $response = [\\n 'error' => true,\\n 'message' => 'Booking not found.',\\n ];\\n return response()->json($response, 404);\\n }\\n \\n // return response\\n $response = [\\n 'error' => false,\\n 'msg' => 'Booking retrieved successfully.',\\n 'booking_room' => $booking \\n ];\\n return response()->json($response, 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1c0fc09fc99df17660a0e62951c4aa3\",\n \"score\": \"0.5910247\",\n \"text\": \"function getBook()\\n {\\n $query = $GLOBALS['DB']->query(\\\"SELECT * FROM books_t WHERE id = {$this->getBookId()};\\\");\\n $returned_book = $query->fetchAll(PDO::FETCH_ASSOC);\\n\\n $title = $returned_book[0]['title'];\\n $id = $returned_book[0]['id'];\\n $new_book = new Book($title, $id);\\n return $new_book;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4db467559384590b8ad788531b44aaa1\",\n \"score\": \"0.5899562\",\n \"text\": \"public function getDetailsBooks() {\\n try {\\n $books = DB::table('books')\\n ->select('title', 'total_pages', 'created_date', 'img_url', 'content')\\n ->get();\\n return $this->respondSuccess('Get details of the books succeed!', $books);\\n } catch (Exception $e) {\\n return $this->respondError($e);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a8fe8a674c4212479991a581c39b195a\",\n \"score\": \"0.58945155\",\n \"text\": \"public function getAllBookingAttributes() {\\r\\n\\t\\treturn $this->ilRoomSharingDatabaseBookingAttribute->getAllBookingAttributes();\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73ab1dc134cf52c643f653090aaaa822\",\n \"score\": \"0.589112\",\n \"text\": \"public function getDetails()\\n {\\n return $this->name . ' : ' . $this->location;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73ab1dc134cf52c643f653090aaaa822\",\n \"score\": \"0.589112\",\n \"text\": \"public function getDetails()\\n {\\n return $this->name . ' : ' . $this->location;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e78bf0e761d22235a4636d5e8bd7a8d\",\n \"score\": \"0.58894825\",\n \"text\": \"function getBillingDetails()\\n {\\n $data = $this->_api->doRequest(\\\"GET\\\", \\\"{$this->getBaseApiPath()}/billing\\\");\\n return $data;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e521fb364c59f56de495b03bba1cf90\",\n \"score\": \"0.5883522\",\n \"text\": \"public function reservation_detail(){\\n return $this->hasOne('App\\\\Model\\\\ReservationDetail', 'cust_id', 'cust_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a0bce668e88d1c132af0511fd7e02f1\",\n \"score\": \"0.5881713\",\n \"text\": \"public function show(Borrowing $borrowing)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d3855e50c6163159d0d46d0f68e288a\",\n \"score\": \"0.5881545\",\n \"text\": \"public function find()\\n {\\n return $this->db->get( 'ref_obmp_booking' )->result() ;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":756,"cells":{"query_id":{"kind":"string","value":"06b048169d6000dd8f2954c77b1ec598"},"query":{"kind":"string","value":"Show the form for creating a new resource."},"positive_passages":{"kind":"list like","value":[{"docid":"1c2f1908928bd932b2e366897ef33ea7","score":"0.0","text":"public function create() {\n\t\t$title = 'COREVAT';\n\t\t$title_section = 'Catálogo de Empresas';\n\t\t$titleGrid = 'Catálogo de Empresas';\n\t\t$row = $this->table;\n\t\t$rows = Empresas::orderBy('rs', 'asc')->get();\n\t\treturn View::make('CorevatCatalogos.Empresas.create', compact('title', 'title_section', 'row', 'rows', 'titleGrid'));\n\t}","title":""}],"string":"[\n {\n \"docid\": \"1c2f1908928bd932b2e366897ef33ea7\",\n \"score\": \"0.0\",\n \"text\": \"public function create() {\\n\\t\\t$title = 'COREVAT';\\n\\t\\t$title_section = 'Catálogo de Empresas';\\n\\t\\t$titleGrid = 'Catálogo de Empresas';\\n\\t\\t$row = $this->table;\\n\\t\\t$rows = Empresas::orderBy('rs', 'asc')->get();\\n\\t\\treturn View::make('CorevatCatalogos.Empresas.create', compact('title', 'title_section', 'row', 'rows', 'titleGrid'));\\n\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"847f003a4addf6820c7b7d4e542cfa95","score":"0.7909494","text":"public function create()\n {\n $resource = $this->prepResource('create');\n $this->showBreadcrumb($resource, [null => 'Create New']);\n\n return $this->view(compact('resource'));\n }","title":""},{"docid":"03bfd9797acc7936efbf149267039e5d","score":"0.77260846","text":"public function create()\n {\n return view('resource.create');\n }","title":""},{"docid":"452dfa44b6fc27ed6e2aa675caef8e17","score":"0.7706946","text":"public function create() {\n return view('acl::resource.create');\n }","title":""},{"docid":"c1a53014b3e8009982c57be36ab41329","score":"0.75948673","text":"public function create()\n {\n return $this->showForm('create');\n }","title":""},{"docid":"c1a53014b3e8009982c57be36ab41329","score":"0.75948673","text":"public function create()\n {\n return $this->showForm('create');\n }","title":""},{"docid":"2bc399e3e37eaad09b15e38f2a68e11a","score":"0.75727344","text":"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}","title":""},{"docid":"303de6e59e0dfcaa3323bed304cea7e1","score":"0.7500156","text":"public function create()\n {\n if(Gate::denies($this->resource.'-create'))\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\n\n $label = $this->label;\n $title = $this->title;\n $icon = $this->icon;\n \n $this->addToView($this->options());\n\n return request()->wantsJson() \n ? null\n : view('admin.'.$this->resource.'.form', array_merge($this->variablesToView, compact('label', 'title', 'icon')));\n }","title":""},{"docid":"bb55b8b1372a305242b37dbd1e241a37","score":"0.7487926","text":"public function create() {\n return view('members.resources.createResource');\n }","title":""},{"docid":"290e9e5c1e1c6771e2a48a7c39b658ae","score":"0.73964167","text":"public function create()\n\t{\n\t\treturn View::make('resourcetypes.create');\n\t}","title":""},{"docid":"eefd3a34279d87bd94753b0beae69b0d","score":"0.7391348","text":"public function create()\n {\n return view('humanresources::create');\n }","title":""},{"docid":"7c2dc6aee3a7b173b42ae8f6ff0e9ac2","score":"0.73191345","text":"public function create() //represents forms user fills out.\n {\n return view('create');\n }","title":""},{"docid":"755e91a474eae625dfda22659e4c1f6c","score":"0.72203404","text":"public function create()\n {\n return view('form.create');\n }","title":""},{"docid":"755e91a474eae625dfda22659e4c1f6c","score":"0.72203404","text":"public function create()\n {\n return view('form.create');\n }","title":""},{"docid":"a079c2ff615466a913385f0f3bbf4c9d","score":"0.7209733","text":"public function create()\n {\n return view('project_resources/create');\n }","title":""},{"docid":"56a59cf2c86c7085f5fdde712ee5ea06","score":"0.7203657","text":"public function create()\n {\n return view('sick.form', ['action' => 'create']);\n }","title":""},{"docid":"d52a8d55018a5452356ebfeb392dad33","score":"0.7202316","text":"public function newAction()\n {\n $entity = new \\Cumts\\MainBundle\\Entity\\Show();\n $form = $this->createForm(new ShowType(), $entity);\n\n return $this->render('CumtsAdminBundle:Show:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"50c363b98b85b902c0b33495df17fc28","score":"0.71889836","text":"public function create()\n {\n return view('Admin.Forms.create');\n }","title":""},{"docid":"99c209c7d567bb6a386886e720582d3f","score":"0.71736616","text":"public function newAction()\n {\n $entity = $this->getNewEntity();\n $alias = $this->getAlias();\n $fields = $this->getFields('new');\n\n $form = $this->createCreateForm($entity, $alias, $fields);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView()\n )\n );\n }","title":""},{"docid":"d7792233bdf3a051b8ecc8a3bf85491e","score":"0.717068","text":"public function create()\n {\n return view('admin.form.create');\n }","title":""},{"docid":"182ce5c02e801fee3966edc96be1055e","score":"0.7139064","text":"public function create()\n {\n return view('form-create');\n }","title":""},{"docid":"e1317794bf2d1789fb3df24f34664b93","score":"0.7128814","text":"public function create()\n {\n return view('admin.' . $this->obj_name . '.form');\n }","title":""},{"docid":"9a87c89323c16332dd5980c005f9fd73","score":"0.71161574","text":"public function create()\n {\n return view('admin.retiros.partials.createForm');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"fa84f7150b87a66588bfc89685d8fe4c","score":"0.71158516","text":"public function create()\n {\n return view('form');\n }","title":""},{"docid":"4618d70cb6b1be4af26372f030bb7274","score":"0.710939","text":"public function create()\n {\n return view('livro.form');\n }","title":""},{"docid":"21b741286121defb618cafb010ad9311","score":"0.7101174","text":"public function create()\n {\n return view('admin.crud.edit-new');\n }","title":""},{"docid":"d42793f140a997f3a5618ebf3a790d1b","score":"0.7097341","text":"public function create()\n {\n return view('Admin.generals.form');\n }","title":""},{"docid":"e1be67b632033f807b2cefd97a7e5682","score":"0.7095487","text":"public function create()\n {\n $meta = \"Create\";\n return view('driver.form', compact('meta'));\n }","title":""},{"docid":"e6d14f751da329891ae59d3d0614b844","score":"0.7088803","text":"public function create()\n {\n return view('backend::module.form');\n }","title":""},{"docid":"ba36d03e3181e8d29ef780e9f1b47d8e","score":"0.70807815","text":"public function create()\n {\n return view('applicationforms.create');\n }","title":""},{"docid":"c27004d00e3f9afb85f74623ec456ca9","score":"0.708025","text":"public function create()\n {\n //\n return view('form');\n }","title":""},{"docid":"d91864a90a03af3679687f163da22716","score":"0.7078707","text":"public function create()\n {\n return view(\"pages-ui::backend.form\", [\n \"extends\" => config(\"pages-ui.backend.template_to_extend\", \"layouts.app\"),\n \"edit\" => false,\n ]);\n }","title":""},{"docid":"19a8b4682806788e584645f302bff901","score":"0.7070855","text":"public function newAction()\n {\n $manager = $this->container->get('zimzim_construction_site_actionitemmanager');\n $entity = $manager->createEntity();\n $form = $this->createCreateForm($entity, $manager);\n\n return $this->render(\n self::DIR.':new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }","title":""},{"docid":"868d619f6ddd72d0196bd0112e6d14a0","score":"0.7068269","text":"public function create()\n {\n $items = $this->model->get();\n return view('admin.' . str_plural($this->essence) . '.form', [\n 'essence' => $this->essence,\n 'items' => $items,\n ]);\n }","title":""},{"docid":"a717d49d12459178d0ea648de34b92f3","score":"0.7053267","text":"public function create()\n {\n return view('submit_forms.create');\n }","title":""},{"docid":"88bddae014db0489caa5efa7d888b963","score":"0.70453197","text":"public function newAction()\n {\n $entity = new Cliente();\n $form = $this->createForm(new ClienteType(), $entity);\n\n return $this->render('ContadoresBundle:Cliente:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'cliente_new'\n ));\n }","title":""},{"docid":"2885b0aa30fbd2b9a13afbabd00ca579","score":"0.70360965","text":"public function create()\n {\n return view('AdminPanel.Supplier.form');\n }","title":""},{"docid":"0c1144eddfb806ac17f30214bdfede15","score":"0.70316905","text":"public function create()\n {\n return view('cat.form_create');\n }","title":""},{"docid":"e1571e560aab196c00674cc03cd106df","score":"0.7028034","text":"public function newAction()\n {\n $entity = new Formation();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FormationAdminBundle:Formation:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"d12ec07b606c2d87e70c0e3602b230c7","score":"0.7027543","text":"public function create()\n {\n return view('admin.resources.person.create');\n }","title":""},{"docid":"e2a9ae8284cc267325c107ada7cdb536","score":"0.70238173","text":"public function create()\n {\n return View::make('form.add');\n }","title":""},{"docid":"40b5fe05bbe7fe1fc32074241497237e","score":"0.70228195","text":"public function create()\n {\n \treturn view ('backend.professor.create');\n }","title":""},{"docid":"f8ec369da210a363de27940e92b3f84d","score":"0.70125043","text":"public function create()\n {\n return view('libro.formlibro');\n }","title":""},{"docid":"df9822b231f9e125e4b3aa9bc0b50b54","score":"0.7000799","text":"public function newAction()\n {\n return $this->renderCreationForm(new User(), new UserType(), 'User', 'FsbMediaFilesIndexBundle');\n }","title":""},{"docid":"d3818ee7b8a6f5feddcf93f25df0fe6b","score":"0.6986593","text":"public function create()\n {\n return view('students._form');\n }","title":""},{"docid":"bad09d21897077a09fc9ba04b37aa535","score":"0.69801325","text":"public function create()\n\t{\n\t\treturn view('dienthoai.create');\n\t}","title":""},{"docid":"bfc2f651a3ad53ba32a1f0624b2baf70","score":"0.6976104","text":"public function create()\n {\n return view('fabricante.form');\n }","title":""},{"docid":"38d1a27327ac4a367aba240dedebaa0e","score":"0.69747853","text":"public function showCreateNewClientForm()\n {\n return view('admin.createNewClientForm');\n }","title":""},{"docid":"65c79b36d9444a6beccf14aac7b2b045","score":"0.6973617","text":"public function create()\n {\n return view('product.form', \n [\n 'product' => new Product\n ]);\n }","title":""},{"docid":"daf28f960dad10d136b88bf0cb698afe","score":"0.69729453","text":"public function create()\n\t{\n\t\treturn view('siswa.add');\n\t}","title":""},{"docid":"77b32a1a2812f894a1084db4a0c3b2d8","score":"0.6965231","text":"public function create()\n {\n $title = trans('option.new');\n\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }","title":""},{"docid":"4e37d311d6990013b0ed72549d9fd35f","score":"0.69635546","text":"public function create()\n {\n return view('product.form');\n }","title":""},{"docid":"9cb057d0f77e53e0cce5708d50a6481b","score":"0.6962359","text":"public function create()\n {\n return view('new');\n }","title":""},{"docid":"9cb057d0f77e53e0cce5708d50a6481b","score":"0.6962359","text":"public function create()\n {\n return view('new');\n }","title":""},{"docid":"9cb057d0f77e53e0cce5708d50a6481b","score":"0.6962359","text":"public function create()\n {\n return view('new');\n }","title":""},{"docid":"80055340b1924d51914b16fcf2fee697","score":"0.6960298","text":"public function newAction()\n {\n $entity = new Client();\n $form = $this->createCreateForm($entity);\n return $this->render('ProjectFilmsBundle:Default:singup.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n}","title":""},{"docid":"d607449c2320c1a6b73af5c48d80dea8","score":"0.695971","text":"public function create()\n {\n\t\treturn view('Master.SMD.product_form');\n }","title":""},{"docid":"41eb11154e57dff75498fcf25564c134","score":"0.6952435","text":"public function create()\n {\n return view('admin.book.add');\n }","title":""},{"docid":"c99a469be2dc77ac788affd5c609736e","score":"0.69498503","text":"public function create()\n\t{\n\t\treturn view('tanah.create');\n\t}","title":""},{"docid":"9c1725367be54b1702af65b52b997aa8","score":"0.69449973","text":"public function create()\n {\n //\n return view('village.form');\n }","title":""},{"docid":"72f0db297092df3a05f0662bbcf847e2","score":"0.6942181","text":"public function create()\n {\n return \"Provide a form for creating a new bookmark\";\n }","title":""},{"docid":"fd3e19a66d87f8e5b9e62eeab1859fd6","score":"0.694158","text":"public function create()\n {\n return view ('admin.choice.create');\n }","title":""},{"docid":"5a43ba5452e70f5a9984d0dd656c9e9d","score":"0.6939963","text":"public function create()\n {\n return view('admin.student.add');\n }","title":""},{"docid":"d2dfb39011e7751d334f3b102132bcc0","score":"0.6937871","text":"public function create()\n {\n return view('libro.create');\n }","title":""},{"docid":"8f8abe7734d2df10a7d0bf9300d89ffd","score":"0.6936004","text":"public function create()\n\t{\n\t\tif ( ! \\Util::getAccess('Objetos', 'Insert')) return $this->accessFail();\n\t\t\n\t\t$objeto = new Objeto;\n\t\t$title = $this->title;\t\t\n $form_data = array('route' => 'objetos.store', 'method' => 'POST');\n $action = 'Ingresar'; \n\t\t$action_label = \\Lang::get('utils.Ingresar');\n\n return View::make('objetos/form', compact('objeto', 'title', 'form_data', 'action', 'action_label'));\n\t}","title":""},{"docid":"8adebbe6d78e1269103db957362b2b48","score":"0.6934276","text":"public function create()\n {\n return view('admin.concepto.create');\n }","title":""},{"docid":"cefebec03f775a193c7c4e8a62aa577f","score":"0.6933069","text":"public function create()\n {\n $this->data('model', new Question);\n\n $this->data('page_title', trans('labels.question_create'));\n\n $this->breadcrumbs(trans('labels.question_create'));\n\n return $this->render('views.question.create');\n }","title":""},{"docid":"a0cec03d417a249e7b508d296e8928e7","score":"0.6927707","text":"public function new()\n {\n return view('backend.create');\n }","title":""},{"docid":"b39914295738987f9eaa881efd81b08a","score":"0.6924082","text":"public function create()\n\t{\n\t\treturn view('hijos.create');\n\t}","title":""},{"docid":"1b6fea0f3d627491bca24cc0ec1943b3","score":"0.6922099","text":"public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n $data['vendors'] = User::where([['status',1],['role',1]])->get();\n $data['brands'] = Brand::where('status',1)->get();\n\n return view('admin.general.add_form')->with($data);\n }","title":""},{"docid":"0db3c2ce6e391f38a76280c98d234b3e","score":"0.6913334","text":"public function create()\n {\n return view(\"admin.main.general.create\");\n }","title":""},{"docid":"d88972ac1a628783a7fbb403d9a8dcfc","score":"0.6907519","text":"public function create()\n {\n return view ('darbuotojai.create');\n }","title":""},{"docid":"72d216b75443b4090ac0a1387c18009c","score":"0.6906656","text":"public function create()\n {\n //\n return view('crud.add');\n }","title":""},{"docid":"675ca45cdb19e54120f6c28ad08c6960","score":"0.69062245","text":"public function createAction(): object\n {\n $this->checkIfLoggedIn();\n\n $page = $this->di->get(\"page\");\n $form = new CreateQuestion($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ny fråga\",\n ]);\n }","title":""},{"docid":"8a2147b2e963c3ef756e24bfe402ca2e","score":"0.69051594","text":"public function create()\n {\n return view(\"admin.driver.form\");\n }","title":""},{"docid":"a30ccd806cf5bb09abba11f75d4178c0","score":"0.69034714","text":"public function newAction()\n {\n $form = $this->createForm(new RegistrationType(), new Registration());\n\n return $this->render('McmsEmployeeBundle:Admin:new.html.twig',array(\n 'form' => $form->createView()\n ));\n }","title":""},{"docid":"170085833f62c2562297ca840c892ec8","score":"0.68962324","text":"public function newAction()\n {\n $entity = new Carroceria();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ColombiaAutosadministradorBundle:Carroceria:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }","title":""},{"docid":"a43ba09f835dbd27d4a3433e6207db17","score":"0.6891616","text":"public function create()\n {\n return view('admin.car.create');\n }","title":""},{"docid":"52b58d6fc4a50661368b682a572eca31","score":"0.6890648","text":"public function create()\n {\n return view('main.create');\n }","title":""},{"docid":"6769fe63e35d4f98abe507728065b246","score":"0.6890337","text":"public function create()\r\n {\r\n return view('superadmin::create');\r\n }","title":""},{"docid":"f06c8b94a60d9059ad36c228a0917999","score":"0.68900883","text":"public function create()\n {\n //\n\n\n //default active sidebar\n $this->setActiveParent();\n\n //[] = current query object\n //null = current request\n $form_fields = DynamicForm::form_fields('create', [], null, Person::form_fields() );\n\n return view('persons.create', compact('form_fields'));\n\n\n }","title":""},{"docid":"78ad8491acd5385f24f5ae5f822678c9","score":"0.6889061","text":"public function create()\n\t{\n\t\treturn view('maquinas.create');\n\t}","title":""},{"docid":"bdb0161d2f2f44cdaea93bf890a4c02e","score":"0.68880934","text":"public function create()\n {\n return view(\"create\");\n }","title":""},{"docid":"bdb0161d2f2f44cdaea93bf890a4c02e","score":"0.68880934","text":"public function create()\n {\n return view(\"create\");\n }","title":""},{"docid":"82fa764bee41d4c3cd502aeb977ac7aa","score":"0.6887289","text":"public function create()\r\n {\r\n //\r\n $title = ['title' => 'New Customer'];\r\n return view('forms.customer', $title);\r\n }","title":""},{"docid":"cad48560e9ff66dc125cc429d28e9bff","score":"0.6885613","text":"public function create()\n\t{\n\t\treturn view('admin.add');\n\t}","title":""},{"docid":"be02b3d6619c1ed55fce9db593195fb0","score":"0.6883378","text":"public function create()\n {\n return view ('rubro.create');\n }","title":""},{"docid":"61f6eddf2e8e1651e313b0358ddb9d29","score":"0.6880583","text":"public function create()\n {\n $title = trans('religion.new');\n return view('layouts.create', compact('title'));\n }","title":""},{"docid":"ba7e10af83b6a9def1f1ab3ca7b230a1","score":"0.6880075","text":"public function create()\n {\n //\n return view('fasilitass.create');\n }","title":""},{"docid":"bb899035deb9e2ae019bb95d733db21b","score":"0.6877273","text":"public function create()\n {\n $model = new SupplierModel();\n return view('dashboard.form', compact('model'));\n }","title":""},{"docid":"e9fdb84b89fc16f5dc603f982295014a","score":"0.6874308","text":"public function create()\n\t{\n\t\treturn view('drama.create');\n\t}","title":""},{"docid":"0cf738a5e59aa5d58e20e3538192db7d","score":"0.6874174","text":"public function create()\n {\n return view('port.main.create');\n }","title":""},{"docid":"a052e9655360674093e5af6adf7d43e9","score":"0.68733674","text":"public function create()\n {\n $catalogs = CatalogServices::getAllCatalog();\n return view('components.products.add-form', compact('catalogs'));\n }","title":""},{"docid":"021e8263ec26fa7e27d11fcfdc84da77","score":"0.6870801","text":"public function create()\n {\n return view('back.actions.create');\n }","title":""},{"docid":"c503b35740e1792c403a88d8c50d856f","score":"0.6869266","text":"public function create()\n {\n return view(\"almacen.carrito.create\"); \n }","title":""},{"docid":"5259e968b5dbb1b3e52be75d40a02866","score":"0.68644255","text":"public function create() {\n\n\t\treturn view('add');\n\t}","title":""},{"docid":"8d3c38482140a40f4dbe44678bb1d515","score":"0.6863528","text":"public function create()\n {\n return view('master.form.sellout-form');\n }","title":""},{"docid":"586b3f9f7932936d0639c9d4960679b7","score":"0.68621755","text":"public function create()\n\t{\n\t\treturn View::make('quantridanhmuchoithi.create');\n\t}","title":""},{"docid":"7b28f26445b6881c693a90b24ca99ad8","score":"0.6859603","text":"public function create()\n {\n return view('manage.create');\n }","title":""}],"string":"[\n {\n \"docid\": \"847f003a4addf6820c7b7d4e542cfa95\",\n \"score\": \"0.7909494\",\n \"text\": \"public function create()\\n {\\n $resource = $this->prepResource('create');\\n $this->showBreadcrumb($resource, [null => 'Create New']);\\n\\n return $this->view(compact('resource'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03bfd9797acc7936efbf149267039e5d\",\n \"score\": \"0.77260846\",\n \"text\": \"public function create()\\n {\\n return view('resource.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"452dfa44b6fc27ed6e2aa675caef8e17\",\n \"score\": \"0.7706946\",\n \"text\": \"public function create() {\\n return view('acl::resource.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1a53014b3e8009982c57be36ab41329\",\n \"score\": \"0.75948673\",\n \"text\": \"public function create()\\n {\\n return $this->showForm('create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1a53014b3e8009982c57be36ab41329\",\n \"score\": \"0.75948673\",\n \"text\": \"public function create()\\n {\\n return $this->showForm('create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bc399e3e37eaad09b15e38f2a68e11a\",\n \"score\": \"0.75727344\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn $this->showForm('create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"303de6e59e0dfcaa3323bed304cea7e1\",\n \"score\": \"0.7500156\",\n \"text\": \"public function create()\\n {\\n if(Gate::denies($this->resource.'-create'))\\n return $this->backOrJson(request(), 'not_authorized', 'crud.not-authorized');\\n\\n $label = $this->label;\\n $title = $this->title;\\n $icon = $this->icon;\\n \\n $this->addToView($this->options());\\n\\n return request()->wantsJson() \\n ? null\\n : view('admin.'.$this->resource.'.form', array_merge($this->variablesToView, compact('label', 'title', 'icon')));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb55b8b1372a305242b37dbd1e241a37\",\n \"score\": \"0.7487926\",\n \"text\": \"public function create() {\\n return view('members.resources.createResource');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"290e9e5c1e1c6771e2a48a7c39b658ae\",\n \"score\": \"0.73964167\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('resourcetypes.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eefd3a34279d87bd94753b0beae69b0d\",\n \"score\": \"0.7391348\",\n \"text\": \"public function create()\\n {\\n return view('humanresources::create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c2dc6aee3a7b173b42ae8f6ff0e9ac2\",\n \"score\": \"0.73191345\",\n \"text\": \"public function create() //represents forms user fills out.\\n {\\n return view('create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"755e91a474eae625dfda22659e4c1f6c\",\n \"score\": \"0.72203404\",\n \"text\": \"public function create()\\n {\\n return view('form.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"755e91a474eae625dfda22659e4c1f6c\",\n \"score\": \"0.72203404\",\n \"text\": \"public function create()\\n {\\n return view('form.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a079c2ff615466a913385f0f3bbf4c9d\",\n \"score\": \"0.7209733\",\n \"text\": \"public function create()\\n {\\n return view('project_resources/create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56a59cf2c86c7085f5fdde712ee5ea06\",\n \"score\": \"0.7203657\",\n \"text\": \"public function create()\\n {\\n return view('sick.form', ['action' => 'create']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d52a8d55018a5452356ebfeb392dad33\",\n \"score\": \"0.7202316\",\n \"text\": \"public function newAction()\\n {\\n $entity = new \\\\Cumts\\\\MainBundle\\\\Entity\\\\Show();\\n $form = $this->createForm(new ShowType(), $entity);\\n\\n return $this->render('CumtsAdminBundle:Show:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50c363b98b85b902c0b33495df17fc28\",\n \"score\": \"0.71889836\",\n \"text\": \"public function create()\\n {\\n return view('Admin.Forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99c209c7d567bb6a386886e720582d3f\",\n \"score\": \"0.71736616\",\n \"text\": \"public function newAction()\\n {\\n $entity = $this->getNewEntity();\\n $alias = $this->getAlias();\\n $fields = $this->getFields('new');\\n\\n $form = $this->createCreateForm($entity, $alias, $fields);\\n\\n return $this->render(\\n 'SgDatatablesBundle:Crud:new.html.twig',\\n array(\\n 'entity' => $entity,\\n 'form' => $form->createView()\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7792233bdf3a051b8ecc8a3bf85491e\",\n \"score\": \"0.717068\",\n \"text\": \"public function create()\\n {\\n return view('admin.form.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"182ce5c02e801fee3966edc96be1055e\",\n \"score\": \"0.7139064\",\n \"text\": \"public function create()\\n {\\n return view('form-create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1317794bf2d1789fb3df24f34664b93\",\n \"score\": \"0.7128814\",\n \"text\": \"public function create()\\n {\\n return view('admin.' . $this->obj_name . '.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a87c89323c16332dd5980c005f9fd73\",\n \"score\": \"0.71161574\",\n \"text\": \"public function create()\\n {\\n return view('admin.retiros.partials.createForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa84f7150b87a66588bfc89685d8fe4c\",\n \"score\": \"0.71158516\",\n \"text\": \"public function create()\\n {\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4618d70cb6b1be4af26372f030bb7274\",\n \"score\": \"0.710939\",\n \"text\": \"public function create()\\n {\\n return view('livro.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21b741286121defb618cafb010ad9311\",\n \"score\": \"0.7101174\",\n \"text\": \"public function create()\\n {\\n return view('admin.crud.edit-new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d42793f140a997f3a5618ebf3a790d1b\",\n \"score\": \"0.7097341\",\n \"text\": \"public function create()\\n {\\n return view('Admin.generals.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1be67b632033f807b2cefd97a7e5682\",\n \"score\": \"0.7095487\",\n \"text\": \"public function create()\\n {\\n $meta = \\\"Create\\\";\\n return view('driver.form', compact('meta'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6d14f751da329891ae59d3d0614b844\",\n \"score\": \"0.7088803\",\n \"text\": \"public function create()\\n {\\n return view('backend::module.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba36d03e3181e8d29ef780e9f1b47d8e\",\n \"score\": \"0.70807815\",\n \"text\": \"public function create()\\n {\\n return view('applicationforms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c27004d00e3f9afb85f74623ec456ca9\",\n \"score\": \"0.708025\",\n \"text\": \"public function create()\\n {\\n //\\n return view('form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d91864a90a03af3679687f163da22716\",\n \"score\": \"0.7078707\",\n \"text\": \"public function create()\\n {\\n return view(\\\"pages-ui::backend.form\\\", [\\n \\\"extends\\\" => config(\\\"pages-ui.backend.template_to_extend\\\", \\\"layouts.app\\\"),\\n \\\"edit\\\" => false,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19a8b4682806788e584645f302bff901\",\n \"score\": \"0.7070855\",\n \"text\": \"public function newAction()\\n {\\n $manager = $this->container->get('zimzim_construction_site_actionitemmanager');\\n $entity = $manager->createEntity();\\n $form = $this->createCreateForm($entity, $manager);\\n\\n return $this->render(\\n self::DIR.':new.html.twig',\\n array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"868d619f6ddd72d0196bd0112e6d14a0\",\n \"score\": \"0.7068269\",\n \"text\": \"public function create()\\n {\\n $items = $this->model->get();\\n return view('admin.' . str_plural($this->essence) . '.form', [\\n 'essence' => $this->essence,\\n 'items' => $items,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a717d49d12459178d0ea648de34b92f3\",\n \"score\": \"0.7053267\",\n \"text\": \"public function create()\\n {\\n return view('submit_forms.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88bddae014db0489caa5efa7d888b963\",\n \"score\": \"0.70453197\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Cliente();\\n $form = $this->createForm(new ClienteType(), $entity);\\n\\n return $this->render('ContadoresBundle:Cliente:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n 'css_active' => 'cliente_new'\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2885b0aa30fbd2b9a13afbabd00ca579\",\n \"score\": \"0.70360965\",\n \"text\": \"public function create()\\n {\\n return view('AdminPanel.Supplier.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c1144eddfb806ac17f30214bdfede15\",\n \"score\": \"0.70316905\",\n \"text\": \"public function create()\\n {\\n return view('cat.form_create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1571e560aab196c00674cc03cd106df\",\n \"score\": \"0.7028034\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Formation();\\n $form = $this->createCreateForm($entity);\\n\\n return $this->render('FormationAdminBundle:Formation:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d12ec07b606c2d87e70c0e3602b230c7\",\n \"score\": \"0.7027543\",\n \"text\": \"public function create()\\n {\\n return view('admin.resources.person.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2a9ae8284cc267325c107ada7cdb536\",\n \"score\": \"0.70238173\",\n \"text\": \"public function create()\\n {\\n return View::make('form.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40b5fe05bbe7fe1fc32074241497237e\",\n \"score\": \"0.70228195\",\n \"text\": \"public function create()\\n {\\n \\treturn view ('backend.professor.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8ec369da210a363de27940e92b3f84d\",\n \"score\": \"0.70125043\",\n \"text\": \"public function create()\\n {\\n return view('libro.formlibro');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df9822b231f9e125e4b3aa9bc0b50b54\",\n \"score\": \"0.7000799\",\n \"text\": \"public function newAction()\\n {\\n return $this->renderCreationForm(new User(), new UserType(), 'User', 'FsbMediaFilesIndexBundle');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3818ee7b8a6f5feddcf93f25df0fe6b\",\n \"score\": \"0.6986593\",\n \"text\": \"public function create()\\n {\\n return view('students._form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bad09d21897077a09fc9ba04b37aa535\",\n \"score\": \"0.69801325\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('dienthoai.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bfc2f651a3ad53ba32a1f0624b2baf70\",\n \"score\": \"0.6976104\",\n \"text\": \"public function create()\\n {\\n return view('fabricante.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38d1a27327ac4a367aba240dedebaa0e\",\n \"score\": \"0.69747853\",\n \"text\": \"public function showCreateNewClientForm()\\n {\\n return view('admin.createNewClientForm');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65c79b36d9444a6beccf14aac7b2b045\",\n \"score\": \"0.6973617\",\n \"text\": \"public function create()\\n {\\n return view('product.form', \\n [\\n 'product' => new Product\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"daf28f960dad10d136b88bf0cb698afe\",\n \"score\": \"0.69729453\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('siswa.add');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77b32a1a2812f894a1084db4a0c3b2d8\",\n \"score\": \"0.6965231\",\n \"text\": \"public function create()\\n {\\n $title = trans('option.new');\\n\\n $this->generateParams();\\n\\n return view('layouts.create', compact('title'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e37d311d6990013b0ed72549d9fd35f\",\n \"score\": \"0.69635546\",\n \"text\": \"public function create()\\n {\\n return view('product.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cb057d0f77e53e0cce5708d50a6481b\",\n \"score\": \"0.6962359\",\n \"text\": \"public function create()\\n {\\n return view('new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cb057d0f77e53e0cce5708d50a6481b\",\n \"score\": \"0.6962359\",\n \"text\": \"public function create()\\n {\\n return view('new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cb057d0f77e53e0cce5708d50a6481b\",\n \"score\": \"0.6962359\",\n \"text\": \"public function create()\\n {\\n return view('new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80055340b1924d51914b16fcf2fee697\",\n \"score\": \"0.6960298\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Client();\\n $form = $this->createCreateForm($entity);\\n return $this->render('ProjectFilmsBundle:Default:singup.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d607449c2320c1a6b73af5c48d80dea8\",\n \"score\": \"0.695971\",\n \"text\": \"public function create()\\n {\\n\\t\\treturn view('Master.SMD.product_form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41eb11154e57dff75498fcf25564c134\",\n \"score\": \"0.6952435\",\n \"text\": \"public function create()\\n {\\n return view('admin.book.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c99a469be2dc77ac788affd5c609736e\",\n \"score\": \"0.69498503\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('tanah.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c1725367be54b1702af65b52b997aa8\",\n \"score\": \"0.69449973\",\n \"text\": \"public function create()\\n {\\n //\\n return view('village.form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72f0db297092df3a05f0662bbcf847e2\",\n \"score\": \"0.6942181\",\n \"text\": \"public function create()\\n {\\n return \\\"Provide a form for creating a new bookmark\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd3e19a66d87f8e5b9e62eeab1859fd6\",\n \"score\": \"0.694158\",\n \"text\": \"public function create()\\n {\\n return view ('admin.choice.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a43ba5452e70f5a9984d0dd656c9e9d\",\n \"score\": \"0.6939963\",\n \"text\": \"public function create()\\n {\\n return view('admin.student.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2dfb39011e7751d334f3b102132bcc0\",\n \"score\": \"0.6937871\",\n \"text\": \"public function create()\\n {\\n return view('libro.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f8abe7734d2df10a7d0bf9300d89ffd\",\n \"score\": \"0.6936004\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\tif ( ! \\\\Util::getAccess('Objetos', 'Insert')) return $this->accessFail();\\n\\t\\t\\n\\t\\t$objeto = new Objeto;\\n\\t\\t$title = $this->title;\\t\\t\\n $form_data = array('route' => 'objetos.store', 'method' => 'POST');\\n $action = 'Ingresar'; \\n\\t\\t$action_label = \\\\Lang::get('utils.Ingresar');\\n\\n return View::make('objetos/form', compact('objeto', 'title', 'form_data', 'action', 'action_label'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8adebbe6d78e1269103db957362b2b48\",\n \"score\": \"0.6934276\",\n \"text\": \"public function create()\\n {\\n return view('admin.concepto.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cefebec03f775a193c7c4e8a62aa577f\",\n \"score\": \"0.6933069\",\n \"text\": \"public function create()\\n {\\n $this->data('model', new Question);\\n\\n $this->data('page_title', trans('labels.question_create'));\\n\\n $this->breadcrumbs(trans('labels.question_create'));\\n\\n return $this->render('views.question.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0cec03d417a249e7b508d296e8928e7\",\n \"score\": \"0.6927707\",\n \"text\": \"public function new()\\n {\\n return view('backend.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b39914295738987f9eaa881efd81b08a\",\n \"score\": \"0.6924082\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('hijos.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b6fea0f3d627491bca24cc0ec1943b3\",\n \"score\": \"0.6922099\",\n \"text\": \"public function create()\\n {\\n $data['url'] = route('admin.'.$this->route . '.store');\\n $data['title'] = 'Add ' . $this->viewName;\\n $data['module'] = $this->viewName;\\n $data['resourcePath'] = $this->view;\\n $data['vendors'] = User::where([['status',1],['role',1]])->get();\\n $data['brands'] = Brand::where('status',1)->get();\\n\\n return view('admin.general.add_form')->with($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0db3c2ce6e391f38a76280c98d234b3e\",\n \"score\": \"0.6913334\",\n \"text\": \"public function create()\\n {\\n return view(\\\"admin.main.general.create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d88972ac1a628783a7fbb403d9a8dcfc\",\n \"score\": \"0.6907519\",\n \"text\": \"public function create()\\n {\\n return view ('darbuotojai.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72d216b75443b4090ac0a1387c18009c\",\n \"score\": \"0.6906656\",\n \"text\": \"public function create()\\n {\\n //\\n return view('crud.add');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"675ca45cdb19e54120f6c28ad08c6960\",\n \"score\": \"0.69062245\",\n \"text\": \"public function createAction(): object\\n {\\n $this->checkIfLoggedIn();\\n\\n $page = $this->di->get(\\\"page\\\");\\n $form = new CreateQuestion($this->di);\\n $form->check();\\n\\n $page->add(\\\"question/crud/create\\\", [\\n \\\"form\\\" => $form->getHTML(),\\n ]);\\n\\n return $page->render([\\n \\\"title\\\" => \\\"Ny fråga\\\",\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a2147b2e963c3ef756e24bfe402ca2e\",\n \"score\": \"0.69051594\",\n \"text\": \"public function create()\\n {\\n return view(\\\"admin.driver.form\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a30ccd806cf5bb09abba11f75d4178c0\",\n \"score\": \"0.69034714\",\n \"text\": \"public function newAction()\\n {\\n $form = $this->createForm(new RegistrationType(), new Registration());\\n\\n return $this->render('McmsEmployeeBundle:Admin:new.html.twig',array(\\n 'form' => $form->createView()\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"170085833f62c2562297ca840c892ec8\",\n \"score\": \"0.68962324\",\n \"text\": \"public function newAction()\\n {\\n $entity = new Carroceria();\\n $form = $this->createCreateForm($entity);\\n\\n return $this->render('ColombiaAutosadministradorBundle:Carroceria:new.html.twig', array(\\n 'entity' => $entity,\\n 'form' => $form->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a43ba09f835dbd27d4a3433e6207db17\",\n \"score\": \"0.6891616\",\n \"text\": \"public function create()\\n {\\n return view('admin.car.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52b58d6fc4a50661368b682a572eca31\",\n \"score\": \"0.6890648\",\n \"text\": \"public function create()\\n {\\n return view('main.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6769fe63e35d4f98abe507728065b246\",\n \"score\": \"0.6890337\",\n \"text\": \"public function create()\\r\\n {\\r\\n return view('superadmin::create');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f06c8b94a60d9059ad36c228a0917999\",\n \"score\": \"0.68900883\",\n \"text\": \"public function create()\\n {\\n //\\n\\n\\n //default active sidebar\\n $this->setActiveParent();\\n\\n //[] = current query object\\n //null = current request\\n $form_fields = DynamicForm::form_fields('create', [], null, Person::form_fields() );\\n\\n return view('persons.create', compact('form_fields'));\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78ad8491acd5385f24f5ae5f822678c9\",\n \"score\": \"0.6889061\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('maquinas.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdb0161d2f2f44cdaea93bf890a4c02e\",\n \"score\": \"0.68880934\",\n \"text\": \"public function create()\\n {\\n return view(\\\"create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bdb0161d2f2f44cdaea93bf890a4c02e\",\n \"score\": \"0.68880934\",\n \"text\": \"public function create()\\n {\\n return view(\\\"create\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82fa764bee41d4c3cd502aeb977ac7aa\",\n \"score\": \"0.6887289\",\n \"text\": \"public function create()\\r\\n {\\r\\n //\\r\\n $title = ['title' => 'New Customer'];\\r\\n return view('forms.customer', $title);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cad48560e9ff66dc125cc429d28e9bff\",\n \"score\": \"0.6885613\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('admin.add');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be02b3d6619c1ed55fce9db593195fb0\",\n \"score\": \"0.6883378\",\n \"text\": \"public function create()\\n {\\n return view ('rubro.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61f6eddf2e8e1651e313b0358ddb9d29\",\n \"score\": \"0.6880583\",\n \"text\": \"public function create()\\n {\\n $title = trans('religion.new');\\n return view('layouts.create', compact('title'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba7e10af83b6a9def1f1ab3ca7b230a1\",\n \"score\": \"0.6880075\",\n \"text\": \"public function create()\\n {\\n //\\n return view('fasilitass.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb899035deb9e2ae019bb95d733db21b\",\n \"score\": \"0.6877273\",\n \"text\": \"public function create()\\n {\\n $model = new SupplierModel();\\n return view('dashboard.form', compact('model'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9fdb84b89fc16f5dc603f982295014a\",\n \"score\": \"0.6874308\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn view('drama.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cf738a5e59aa5d58e20e3538192db7d\",\n \"score\": \"0.6874174\",\n \"text\": \"public function create()\\n {\\n return view('port.main.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a052e9655360674093e5af6adf7d43e9\",\n \"score\": \"0.68733674\",\n \"text\": \"public function create()\\n {\\n $catalogs = CatalogServices::getAllCatalog();\\n return view('components.products.add-form', compact('catalogs'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"021e8263ec26fa7e27d11fcfdc84da77\",\n \"score\": \"0.6870801\",\n \"text\": \"public function create()\\n {\\n return view('back.actions.create');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c503b35740e1792c403a88d8c50d856f\",\n \"score\": \"0.6869266\",\n \"text\": \"public function create()\\n {\\n return view(\\\"almacen.carrito.create\\\"); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5259e968b5dbb1b3e52be75d40a02866\",\n \"score\": \"0.68644255\",\n \"text\": \"public function create() {\\n\\n\\t\\treturn view('add');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d3c38482140a40f4dbe44678bb1d515\",\n \"score\": \"0.6863528\",\n \"text\": \"public function create()\\n {\\n return view('master.form.sellout-form');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"586b3f9f7932936d0639c9d4960679b7\",\n \"score\": \"0.68621755\",\n \"text\": \"public function create()\\n\\t{\\n\\t\\treturn View::make('quantridanhmuchoithi.create');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b28f26445b6881c693a90b24ca99ad8\",\n \"score\": \"0.6859603\",\n \"text\": \"public function create()\\n {\\n return view('manage.create');\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":757,"cells":{"query_id":{"kind":"string","value":"ba9b6a8fe9c4f557838de18a0bf7f9b6"},"query":{"kind":"string","value":"Enqueue scripts and styles."},"positive_passages":{"kind":"list like","value":[{"docid":"bd68afae8332072c2c58b93b3b3be826","score":"0.0","text":"function grabjet_scripts() {\n\t\n\twp_enqueue_style('google-Roboto-font', '//fonts.googleapis.com/css?family=Roboto:300,400,500,700', array(), null );\n\twp_enqueue_style('google-Material-font', '//fonts.googleapis.com/icon?family=Material+Icons', array(), null );\n\t\n\t\n\twp_enqueue_style('font-awesome-min-css', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), null ); \n wp_enqueue_style('bootstrap-multiselect-css', get_theme_file_uri( '/css/bootstrap-multiselect.css' ), array(), null );\n wp_enqueue_style('bootstrap-datetimepicker-min-css', get_theme_file_uri( '/css/bootstrap-datetimepicker.min.css' ), array(), null ); \n wp_enqueue_style('bootstrap-min-css', get_theme_file_uri( '/css/bootstrap.min.css' ), array(), null );\n\t\n\twp_enqueue_style( 'html5shiv-min-js', '//oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js', array(), '3.7.3' );\n\twp_style_add_data( 'html5shiv-min-js', 'conditional', 'lt IE 9' );\n\n\twp_enqueue_style( 'respond-min-js', '//oss.maxcdn.com/respond/1.4.2/respond.min.js', array(), '1.4.2' );\n\twp_style_add_data( 'respond-min-js', 'conditional', 'lt IE 9' );\t\n \n\twp_enqueue_style( 'grabjet-style', get_stylesheet_uri() );\n\n\twp_deregister_script('jquery');\n\t\n wp_enqueue_script('jquery-min-js', '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', array(), '1.12.4', true );\n\twp_enqueue_script('moment-with-locales-js', get_theme_file_uri( '/js/moment-with-locales.min.js' ), array(), '2.18.1', true );\n\twp_enqueue_script('bootstrap-min-js', get_theme_file_uri( '/js/bootstrap.min.js' ), array(), '3.3.7', true );\n\twp_enqueue_script('bootstrap-datetimepicker-min-js', get_theme_file_uri( '/js/bootstrap.datetimepicker.min.js' ), array(), '4.17.47', true );\n\twp_enqueue_script('bootstrap-multiselect-js', get_theme_file_uri( '/js/bootstrap.multiselect.js' ), array(), '2.0', true );\n\twp_enqueue_script('grab-main-js', get_theme_file_uri( '/js/main.js' ), array(), '1.0', true );\n\t\n}","title":""}],"string":"[\n {\n \"docid\": \"bd68afae8332072c2c58b93b3b3be826\",\n \"score\": \"0.0\",\n \"text\": \"function grabjet_scripts() {\\n\\t\\n\\twp_enqueue_style('google-Roboto-font', '//fonts.googleapis.com/css?family=Roboto:300,400,500,700', array(), null );\\n\\twp_enqueue_style('google-Material-font', '//fonts.googleapis.com/icon?family=Material+Icons', array(), null );\\n\\t\\n\\t\\n\\twp_enqueue_style('font-awesome-min-css', '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', array(), null ); \\n wp_enqueue_style('bootstrap-multiselect-css', get_theme_file_uri( '/css/bootstrap-multiselect.css' ), array(), null );\\n wp_enqueue_style('bootstrap-datetimepicker-min-css', get_theme_file_uri( '/css/bootstrap-datetimepicker.min.css' ), array(), null ); \\n wp_enqueue_style('bootstrap-min-css', get_theme_file_uri( '/css/bootstrap.min.css' ), array(), null );\\n\\t\\n\\twp_enqueue_style( 'html5shiv-min-js', '//oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js', array(), '3.7.3' );\\n\\twp_style_add_data( 'html5shiv-min-js', 'conditional', 'lt IE 9' );\\n\\n\\twp_enqueue_style( 'respond-min-js', '//oss.maxcdn.com/respond/1.4.2/respond.min.js', array(), '1.4.2' );\\n\\twp_style_add_data( 'respond-min-js', 'conditional', 'lt IE 9' );\\t\\n \\n\\twp_enqueue_style( 'grabjet-style', get_stylesheet_uri() );\\n\\n\\twp_deregister_script('jquery');\\n\\t\\n wp_enqueue_script('jquery-min-js', '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', array(), '1.12.4', true );\\n\\twp_enqueue_script('moment-with-locales-js', get_theme_file_uri( '/js/moment-with-locales.min.js' ), array(), '2.18.1', true );\\n\\twp_enqueue_script('bootstrap-min-js', get_theme_file_uri( '/js/bootstrap.min.js' ), array(), '3.3.7', true );\\n\\twp_enqueue_script('bootstrap-datetimepicker-min-js', get_theme_file_uri( '/js/bootstrap.datetimepicker.min.js' ), array(), '4.17.47', true );\\n\\twp_enqueue_script('bootstrap-multiselect-js', get_theme_file_uri( '/js/bootstrap.multiselect.js' ), array(), '2.0', true );\\n\\twp_enqueue_script('grab-main-js', get_theme_file_uri( '/js/main.js' ), array(), '1.0', true );\\n\\t\\n}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"a5c67a74a8f6965c6affe9c64b24ab95","score":"0.8440598","text":"public function enqueueScripts() {}","title":""},{"docid":"bd846b0b7767ea7f97bafacf9f4933f7","score":"0.82236314","text":"public function enqueueAssets ()\n\t\t{\t\n\t\t\tadd_action('wp_enqueue_scripts', array(&$this, 'registerScript'));\n\t\t}","title":""},{"docid":"94f3c12f3a507ea40c237df4439053be","score":"0.8191773","text":"public function scripts() {\n\n\t\twp_enqueue_style( 'learnmultisitelander-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );\n\t\twp_enqueue_script( 'learnmultisite-mainjs', get_theme_file_uri( '/assets/js/main.js' ), array(), wp_get_theme()->get( 'Version' ), true );\n\n\t}","title":""},{"docid":"5e944cd91d51b6f02a6b6ecba4d4aa93","score":"0.81909984","text":"public function enqueueScripts()\n {\n wp_enqueue_style( 'cpt-' . $this->getName() . '-styles', $this->getStylesheetUrl() );\n wp_enqueue_script( 'cpt-' . $this->getName() . '-scripts', $this->getScriptsUrl() );\n }","title":""},{"docid":"8c63822bf54b218a0eff9012000d6832","score":"0.81890285","text":"public function enqueueScripts()\n {\n $stylesheet = plugins_url('public/css/fvch-styles.css', dirname(__FILE__));\n if (file_exists( get_stylesheet_directory() . '/fvch-styles.css' )) {\n $stylesheet = get_stylesheet_directory_uri() . '/fvch-styles.css';\n }\n\n wp_register_style('fvch-styles', $stylesheet, false, '1.1');\n wp_enqueue_style('fvch-styles' );\n\n if ($this->_options->getOption('fvch-toolbox')) {\n wp_enqueue_script('fvch-toolbox', plugins_url('public/js/toolbox.js', dirname(__FILE__)), array('jquery'), '1.0', true);\n }\n }","title":""},{"docid":"46052b227d8e465541ce47ddc86a0d6b","score":"0.8131048","text":"protected function enqueue_scripts() {\n\t\t//\n\t}","title":""},{"docid":"699b96ffaf153b4b7773566b49a136ea","score":"0.8126013","text":"private function enqueue_scripts() {\n\t\twp_register_script( 'suggestions', plugins_url( 'js/jquery.suggestions.js', $this->baseDir ) );\n\t\twp_register_script( 'search', plugins_url( 'js/search.js', $this->baseDir ) );\n\t\twp_register_script( 'photocommons-admin', plugins_url( 'js/admin.js', $this->baseDir ) );\n\n\t\twp_localize_script(\n\t\t\t'photocommons-admin',\n\t\t\t'WP_PHOTOCOMMONS',\n\t\t\t[\n\t\t\t\t'imgButtonUrl' => plugins_url('img/button.png', $this->baseDir),\n\t\t\t\t'imgLoaderUrl' => plugins_url('img/loading.gif', $this->baseDir),\n\t\t\t\t'translations' => [\n\t\t\t\t\t'Insert images from Wikimedia Commons' => 'Insert images from Wikimedia Commons',\n\t\t\t\t\t'PhotoCommons' => 'PhotoCommons',\n\t\t\t\t\t'Search' => 'Search',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\t// Enqueue external libraries\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\twp_enqueue_script( 'jquery-ui-dialog' );\n\n\t\t// Enqueue our own scripts\n\t\twp_enqueue_script( 'suggestions' );\n\t\twp_enqueue_script( 'search' );\n\t\twp_enqueue_script( 'photocommons-admin' );\n\t}","title":""},{"docid":"abbdf34d8fa3d2b63f8f278622c05109","score":"0.8120988","text":"public function enqueue_scripts() {\n wp_register_script($this->_token . '-plugins',\n esc_url($this->assets_url) . 'js/plugins' . $this->script_suffix . '.js', array('jquery'),\n $this->_version, true);\n wp_enqueue_script($this->_token . '-plugins');\n\n wp_register_script($this->_token . '-frontend',\n esc_url($this->assets_url) . 'js/frontend' . $this->script_suffix . '.js', array('jquery'),\n $this->_version, true);\n wp_enqueue_script($this->_token . '-frontend');\n\n }","title":""},{"docid":"f9e1acead89a8b627af4110cc7e651d6","score":"0.8084531","text":"public function enqueueThemeScripts()\n {\n $js_uri = get_theme_file_uri( '/assets/dist/scripts/' );\n $js_dir = get_theme_file_path( '/assets/dist/scripts/' );\n\n $js_files = $this->getJsFiles();\n foreach ( $js_files as $handle => $data ) {\n $src = $js_uri . $data['file'];\n $version = logger()->getAssetVersion( $js_dir . $data['file'] );\n $deps = $data['deps'];\n $in_foot = $data['in_foot'];\n\n wp_enqueue_script( $handle, $src, $deps, $version, $in_foot );\n }\n\n if ( ! is_admin() ) {\n wp_dequeue_style( 'wp-block-library' );\n }\n }","title":""},{"docid":"1992332625ffa3a24f28cba9dd2c58d7","score":"0.8069915","text":"public function enqueue_scripts() {\n\t\tif ( $this->scripts_enqueued ) {\n\t\t\treturn;\n\t\t}\n\t\t// Ensure scripts are registered\n\t\t$this->register_scripts();\n\n\t\t/* SCRIPTS */\n\t\twp_enqueue_script( 'blockrain-init' );\n\n\t\t/* STYLES */\n\t\twp_enqueue_style( 'blockrain' );\n\n\t\t// Prevent redundant calls\n\t\t$this->scripts_enqueued = true;\n\t}","title":""},{"docid":"24138ea8bfc6d00502d68af6ac929e0f","score":"0.80347174","text":"public function scripts_and_styles() {\n\n\t\t\t// Stylesheets\n\t\t\twp_enqueue_style( 'asc-admin', ASCRIPTA_ENGINE_CSS_URL . 'admin/asc-admin.min.css', array(), ASCRIPTA_ENGINE_VERSION, 'all' );\n\n\t\t}","title":""},{"docid":"532ec2167efde1f9f61a923c86db6efd","score":"0.8027588","text":"public function enqueue_styles_and_scripts_fronend() {\r\n\r\n\t\twp_enqueue_script( 'jquery-ui-core' );\r\n\t\twp_enqueue_script( 'jquery-ui-widget' );\r\n\t\twp_enqueue_script( 'jquery-ui-draggable' );\r\n\t\twp_enqueue_script( 'jquery-ui-mouse' );\r\n\t\twp_enqueue_script( 'jquery-ui-sortable' );\r\n\t\twp_enqueue_script( 'jquery-touch-punch' );\r\n\t\twp_enqueue_script( 'jquery-ui-datepicker' );\r\n\t\twp_enqueue_style( 'jquery-custom-scroll-bar' );\r\n\r\n\t\twp_enqueue_style( 'lscf-bootstrap' );\r\n\t\twp_enqueue_style( 'px_base' );\r\n\t\twp_enqueue_script( 'px_vendor' );\r\n\t\twp_enqueue_script( 'angular' );\r\n\t\twp_enqueue_script( 'angular-ngAnimate' );\r\n\t\twp_enqueue_script( 'jquery-ui' );\r\n\t\twp_enqueue_style( 'jquery-ui-style' );\r\n\t\twp_enqueue_style( 'jquery-custom-scroll-bar' );\r\n\t\twp_enqueue_script( 'angular_sanitize' );\r\n\t\twp_enqueue_script( 'px_capf' );\r\n\t\twp_enqueue_script( 'px_main' );\r\n\r\n\t}","title":""},{"docid":"97eea7acc014ad96b3996d5545b27cab","score":"0.8027461","text":"public function enqueue_scripts() {\n\t\t}","title":""},{"docid":"34814737f785942ba0c3e0b61e1a0a96","score":"0.79764956","text":"public function enqueue() {\n\t\t// Remove default Gutenberg CSS.\n\t\twp_deregister_style( 'wp-block-library' );\n\n\t\twp_enqueue_script( 'vendor', SKELA_THEME_URL . '/dist/vendor.js', array(), SKELA_THEME_VERSION, true );\n\n\t\t// Enqueue custom js file, with cache busting.\n\t\twp_enqueue_script( 'script.js', SKELA_THEME_URL . '/dist/app.js', array(), SKELA_THEME_VERSION, true );\n\t}","title":""},{"docid":"d243b820e78888ca601f68b2855f2f68","score":"0.7928549","text":"public function enqueue_scripts()\n\t{\n\t\twp_enqueue_style(\n\t\t\t'bf-krumo',\n\t\t\t$this->plugin_url . '/bf-krumo.css',\n\t\t\tarray(),\n\t\t\t'1.1',\n\t\t\t'all'\n\t\t);\n\t}","title":""},{"docid":"0e1606b61d2193f6ce89238746285d3f","score":"0.79184645","text":"public function enqueue()\n {\n $scripts = $this->scripts();\n\n foreach ($scripts as $script) {\n [\n 'handle' => $handle,\n 'src' => $src,\n 'dependencies' => $dependencies,\n 'version' => $version\n ] = $script;\n\n wp_register_script(\n $handle,\n $src,\n $dependencies,\n $version,\n $this->in_footer\n );\n\n if (isset($script['inline'])) {\n $inline = $script['inline'];\n\n [\n 'js_key' => $js_key,\n 'data' => $data,\n 'position' => $position\n ] = $inline;\n\n $json_data = json_encode($data);\n\n wp_add_inline_script(\n $handle,\n \"window.__{$js_key}__ = $json_data\",\n $position\n );\n }\n\n wp_enqueue_script($handle);\n }\n }","title":""},{"docid":"75f688ea1d3423aa12facebc29564d3e","score":"0.791233","text":"private function enqueue_scripts()\n\t{\n\t\twp_enqueue_script('oometaboxdemo');\n\t\twp_enqueue_style('thickbox');\n\t}","title":""},{"docid":"6e130d742b1cea54ff3fce889b2bac4b","score":"0.79078156","text":"public function enqueue_scripts() {\n\t}","title":""},{"docid":"bd587159a3a84918aeea09074b6d7956","score":"0.79021466","text":"public function enqueue_scripts() {\n\t\twp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/frontend' . $this->script_suffix . '.js', array( 'jquery' ), $this->_version, true );\n\t\twp_enqueue_script( $this->_token . '-frontend' );\n\t}","title":""},{"docid":"98e2e921dac334e88b3432b7bb249e6e","score":"0.788805","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Ap_Ss_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Ap_Ss_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\t// wp_enqueue_script( $this->ap_ss, plugin_dir_url( __FILE__ ) . 'js/ap-ss-public.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"c8da6a740f346d9c61eabe0183f94144","score":"0.78803426","text":"public function enqueue_scripts() {\n\n if ( ! current_user_can( 'administrator' ) && ! current_user_can( 'bbp_moderator' ) ) {\n return;\n }\n\n /**\n * All styles goes here\n */\n wp_enqueue_style( 'bbpab-styles', plugins_url( 'assets/css/style.css', __FILE__ ), false, date( 'Ymd' ) );\n\n /**\n * All scripts goes here\n */\n wp_enqueue_script( 'heartbeat' );\n wp_enqueue_script( 'tinygrowl', plugins_url( 'assets/js/tinygrowl.min.js', __FILE__ ), array( 'jquery' ), false, true );\n wp_enqueue_script( 'bbpab-scripts', plugins_url( 'assets/js/script.js', __FILE__ ), array( 'jquery' ), false, true );\n }","title":""},{"docid":"74f44b0c118deba7063266c9a8560ab9","score":"0.78757846","text":"public function enqueue_styles_scripts() {\t\n\t\twp_enqueue_style( AIOVG_PLUGIN_SLUG . '-public' );\n\t}","title":""},{"docid":"5e4000ed3dcd2623d72a98384035102f","score":"0.785924","text":"public function enqueue_scripts() {\n\n $main_script = '/skin/public/scripts/applicationAdmin.js';\n wp_register_script( $this->theme_name . '-scripts', get_template_directory_uri() . $main_script, array(), $this->general_helper->get_assets_version( $main_script ) );\n wp_enqueue_script( $this->theme_name . '-scripts' );\n\n }","title":""},{"docid":"5e4000ed3dcd2623d72a98384035102f","score":"0.785924","text":"public function enqueue_scripts() {\n\n $main_script = '/skin/public/scripts/applicationAdmin.js';\n wp_register_script( $this->theme_name . '-scripts', get_template_directory_uri() . $main_script, array(), $this->general_helper->get_assets_version( $main_script ) );\n wp_enqueue_script( $this->theme_name . '-scripts' );\n\n }","title":""},{"docid":"8da02442fef3704ab1a46169f4f2cf8d","score":"0.7840732","text":"protected function enqueue_scripts()\n {\n Control::enqueue_scripts('switch');\n wp_enqueue_style('tify_control-admin_panel');\n wp_enqueue_script('tify_control-admin_panel');\n }","title":""},{"docid":"1f52ccff3cf236279df2e841be37a719","score":"0.78395295","text":"private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t \t\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\n\n\t\t\t\t}\n\n\t\t\t}","title":""},{"docid":"e98877ceca380ba2664aab05885502e0","score":"0.7832718","text":"public function enqueue_scripts() {\n\t\t// wp_enqueue_style( 'simple-shots', plugins_url( 'assets/css/simple-shots.css', __FILE__ ) );\n\t}","title":""},{"docid":"8783ba0ec4c38f2ce0e39289f402da23","score":"0.78209096","text":"public static function register_styles_and_scripts() {\n add_action( 'wp_enqueue_scripts', function() {\n // Remove jQuery dependency if unnecessary\n wp_register_script( 'ammonite-remove-local-pickup-for-subscriptions-script', plugins_url('assets/js/ammonite-remove-local-pickup-for-subscriptions.js', __FILE__ ), array('jquery'), '1.0.0', true );\n } );\n }","title":""},{"docid":"8ae48830673c89fd33c0469e40f73e5d","score":"0.7812586","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Innovia_vcextend_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Innovia_vcextend_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/innovia_vcextend-public.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"fbc0f1af57cc4950645f144c2e6a83b2","score":"0.78103936","text":"public function callback_enqueue_scripts() {\n\t\t\twp_enqueue_script( 'eoajax', WPEO_TASKMANAGER_ASSET_URL . '/js/eoajax.js', array( \"jquery\" ), WPEO_TASKMANAGER_VERSION );\n\t\t\twp_enqueue_script( 'wpeo-task-frontend-js', WPEO_TASKMANAGER_ASSET_URL . '/js/frontend.js', array( \"jquery\", \"jquery-form\", \"jquery-ui-datepicker\" ), WPEO_TASKMANAGER_VERSION );\n\n\t\t\twp_register_style( 'wpeo-task-frontend-css', WPEO_TASKMANAGER_ASSET_URL . '/css/frontend.css', '', WPEO_TASKMANAGER_VERSION );\n\t\t\twp_enqueue_style( 'wpeo-task-frontend-css' );\n\t\t}","title":""},{"docid":"dd59af73dcc19e3f9e8e0914e52d222d","score":"0.7801995","text":"public function load_scripts_styles()\n\t{\n\t\twp_enqueue_style('csads-public-style', plugins_url('/assets/css/csads-public.css', plugin_dir_path(__FILE__)));\n\t}","title":""},{"docid":"0ea827434527bf4326448f7ac15a83f0","score":"0.780079","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/hector_align-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"ca52ae3c5dff189c747444645df67e3a","score":"0.78002346","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Plugin_Name_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Plugin_Name_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/vamwp-public.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"a48296e45018375cf3384301d8af1d25","score":"0.77998465","text":"public function enqueueScripts()\n\t{\n\t\t//wp_enqueue_script( $this->name, plugin_dir_url( __FILE__ ) . 'js/vrbm-admin.js', array( 'jquery' ), $this->version, TRUE );\n\t}","title":""},{"docid":"1d889fcc8daba58ba151250185d42fdc","score":"0.7796314","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Hz_Api_Feed_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Hz_Api_Feed_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script( $this->plugin_name.'-angular', plugin_dir_url( __FILE__ ) . 'js/angular.min.js', array( ), $this->version, false );\n\t\t\n\t\t\n\t\t//wp_enqueue_script( 'hz-ajax-script' );\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/app.js', array( 'jquery' ), $this->version, false );\n\t\twp_localize_script( $this->plugin_name, 'hz_feed', array( 'ajax_url' => get_site_url(null, 'wp-json/hz-feed/v1/') ) );\n\n\t}","title":""},{"docid":"8434c8eddd0d5ddd015631219c659f27","score":"0.779228","text":"public function enqueue_scripts()\n\t{\n\t\twp_enqueue_style( 'dashicons' );\n\t\twp_register_style('jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css');\n \t\twp_enqueue_style( 'jquery-ui' ); \n\t\twp_enqueue_style( 'bs-main', BS_ASSETS_URL.'css/main.css', array(), '1.0' );\n\t \n\t \n\t\twp_enqueue_script( 'jquery-ui-slider', array( 'jquery' ) );\n\t\twp_enqueue_script( 'bs-main', BS_ASSETS_URL.'js/main.js', array( 'jquery', 'jquery-ui-slider' ), '1.0', true );\n\t}","title":""},{"docid":"9b1538f8a46ded5e263247438a5c0fda","score":"0.7790718","text":"public function enqueueScripts(){\n wp_enqueue_script( 'jquery' );\n \twp_enqueue_style(\n 'obay-sidebar-menu',\n plugin_dir_url( __FILE__ ) . 'css/style.css',\n array(),\n '',\n FALSE\n );\n }","title":""},{"docid":"751df488cc301b8f60b90309975c1acb","score":"0.7790293","text":"public function scripts()\n\t{\n\t\twp_enqueue_script('msc-widget-script', $this->getScriptUrl(), ['jquery'], '', true);\n\t}","title":""},{"docid":"159cc3ffd8213a83f685a1f584cfbc25","score":"0.77883315","text":"static public function enqueue_scripts()\n {\n wp_enqueue_style( 'fl-child-theme', FL_CHILD_THEME_URL . '/style.css' );\n wp_enqueue_style( 'bb-child-theme-dexlue-styles', FL_CHILD_THEME_URL . '/scss/dist/deluxe-styles.css', array(), time() );\n\n wp_enqueue_script( 'bb-child-theme-dexlue-scripts', FL_CHILD_THEME_URL . '/js/scripts.js', array(), time() );\n }","title":""},{"docid":"ca83ff6840362aceadd4a0429f8a997f","score":"0.77878636","text":"function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n wp_enqueue_style( 'screen' );\n\t}","title":""},{"docid":"885b26ed72396989f66a931156e9ecb5","score":"0.77774084","text":"public function assets()\n {\n $url = File::getResourceUri();\n wp_enqueue_script('lbwp-flyout-js', $url . '/js/components/lbwp-flyout.js', array('jquery'), LbwpCore::REVISION, true);\n wp_enqueue_script('jquery-cookie');\n }","title":""},{"docid":"39758519da9751d3cdc42bb521a1a0d4","score":"0.77756125","text":"public function register_assets() {\n\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n\n $this->execute_style();\n \n\n wp_localize_script( 'sl-script', 'sl', [\n 'ajax_url' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Error: Something went wrong', 'shibbir-listing' ),\n 'homepage' => home_url( '/' ),\n ] );\n\n // wp_localize_script( 'academy-admin-script', 'weDevsAcademy', [\n // 'nonce' => wp_create_nonce( 'wd-ac-admin-nonce' ),\n // 'confirm' => __( 'Are you sure?', 'wedevs-academy' ),\n // 'error' => __( 'Something went wrong', 'wedevs-academy' ),\n // ] );\n }","title":""},{"docid":"071187adf3459fb57b2a167e011e6cb2","score":"0.7765642","text":"function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n\t\twp_enqueue_style( 'screen' );\n\t}","title":""},{"docid":"f9ad093e406bd739facf17b0694f89ac","score":"0.77644336","text":"public function enqueue_scripts() {\n\n wp_register_script( 'panzi-jquery-cookies', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/jquery.cookies.js', array('jquery'), $this->version, true );\n wp_register_script( 'wp-cupcake-bridge-social-share-privacy', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/socialshareprivacy.js', array('jquery', 'panzi-jquery-cookies'), $this->version, true );\n wp_register_script( 'wp-cupcake-bridge-service', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/modules/cupcakebridge.js', array('jquery', 'panzi-jquery-cookies'), $this->version, true );\n wp_register_script( 'wp-cupcake-bridge', plugin_dir_url( __FILE__ ) .'/js/wp-cupcake-bridge-public.js' , array('jquery'), $this->version, true );\n\n }","title":""},{"docid":"e0df84edbe0ca6ce39b48a2267e76c98","score":"0.7754466","text":"function marchos_scripts_enqueue () {\n wp_enqueue_style('bootstrap', get_template_directory_uri() . './css/bootstrap.min.css', array(), '5.0.2', 'all');\n wp_enqueue_style('my-custom', get_template_directory_uri() . './css/my-custom-style.css', array(), '1.0.0', 'all');\n // ==== add jquery in footer\n wp_dequeue_script('jquery');\n wp_dequeue_script('jquery-core');\n wp_dequeue_script('jquery-migrate');\n wp_enqueue_script('jquery', false, array(), false, true);\n wp_enqueue_script('jquery-core', false, array(), false, true);\n wp_enqueue_script('jquery-migrate', false, array(), false, true);\n // ==== add custom-js\n wp_enqueue_script('boostrapjs', get_template_directory_uri() . './js/bootstrap.min.js', array(), '1.0.0', true);\n wp_enqueue_script('customjs', get_template_directory_uri() . './js/my-scripts.js', array(), '1.0.0', true);\n \n }","title":""},{"docid":"2081e27a5b45521bce6b773b4a6d4da2","score":"0.7752172","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Urich_Tourbook_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Urich_Tourbook_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/urich-tourbook-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"da9cf9fc3d6c1f37d945fcf5a3deb19d","score":"0.77432144","text":"public static function scripts(){\n\t\tCaldera_Forms_Render_Assets::register();\n\t\tCaldera_Forms_Render_Assets::enqueue_script( 'handlebars' );\n\t\tCaldera_Forms_Admin_Assets::enqueue_style( 'admin' );\n\t}","title":""},{"docid":"0b10e005976cc8b26e639ebd52515b19","score":"0.7742502","text":"public function enqueue_scripts()\n {\n\n /**\n * This function is provided for demonstration purposes only.\n *\n * An instance of this class should be passed to the run() function\n * defined in TS_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The TS_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/ts-public.js', array(\n 'jquery'\n ) , $this->version, false);\n \n\t\t \n\t\twp_enqueue_script($this->plugin_name .'customer-dataTables',PRD_PLUGIN_URL_ADMIN .\"assets/js/jquery.dataTables.min.js\", array( 'jquery' ) , $this->version, true);\n\t\t \n\t \n wp_enqueue_script($this->plugin_name .'customer-footer', plugin_dir_url(__FILE__) . 'js/customer-frontend.js', array(\n 'jquery'\n ) , $this->version, true);\n\n }","title":""},{"docid":"b6dedf716014f53b701b53285c1e9361","score":"0.77385944","text":"public function enqueue_scripts() {\n\n\t\twp_register_script(\n\t\t\t'vide',\n\t\t\tplugins_url('bower_components/vide/dist/jquery.vide.min.js', __FILE__),\n\t\t\tarray('jquery'),\n\t\t\t'0.5.1',\n\t\t\ttrue\n\t\t);\n\n\t\tif ( $this->is_theme_supported() && is_front_page() ) {\n\n\t\t\twp_enqueue_script( 'vide' );\n\n\t\t}\n\n\t}","title":""},{"docid":"93c4977ae904df5065964f4aff66e4e3","score":"0.77380687","text":"public function admin_enqueue_scripts() {\n\t\t\n\t\tglobal $current_screen;\n\n\t\tif ( $current_screen->base == 'settings_page_toggl-alert' ) {\n\n\t\t\twp_enqueue_style( 'wp-color-picker' );\n\t\t\twp_enqueue_style( 'toggl-alert-admin' );\n\t\t\t\n\t\t\t// Dependencies\n\t\t\twp_enqueue_script( 'jquery-effects-core' );\n\t\t\twp_enqueue_script( 'jquery-effects-highlight' );\n\t\t\twp_enqueue_script( 'jquery-ui-sortable' );\n\t\t\t\n\t\t\twp_enqueue_script( 'toggl-alert-admin' );\n\t\t\t\n\t\t}\n\t\t\n\t}","title":""},{"docid":"691098936f8baaaea42d805a262da6d3","score":"0.7734865","text":"public function scripts()\n {\n wp_enqueue_script('alpinejs', 'https://unpkg.com/alpinejs@3.5.0/dist/cdn.min.js', [], '', true);\n\n wp_register_script('td-main', get_stylesheet_directory_uri() . td_asset_path('js/main.js'), ['jquery', 'alpinejs'], '', true);\n if (is_single() && comments_open() && get_option('thread_comments')) {\n wp_enqueue_script('comment-reply');\n }\n\n wp_enqueue_script('td-main');\n }","title":""},{"docid":"42f091cddb7fc6f0735f27ac3ad61d71","score":"0.7723938","text":"public static function scripts()\n {\n add_thickbox();\n wp_enqueue_script('aat-admin-js', AAT_PLUGIN_URI . 'assets/admin.js', ['jquery'], '0.0.1', true);\n wp_enqueue_style('aat-admin-styles', AAT_PLUGIN_URI . 'assets/admin.css', [], '0.0.1' );\n }","title":""},{"docid":"b02a6901efd9e8a59b9932ddf5bce581","score":"0.77176344","text":"function enqueue_scripts() {\r\n\t\twp_enqueue_script('ttools-loader');\r\n\t\twp_enqueue_style('jquery-select2');\r\n\t\twp_enqueue_style('ttools');\r\n\t}","title":""},{"docid":"94aa70fc499660168ef4d3e5625bf514","score":"0.77091","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Cr_Featured_Images_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Cr_Featured_Images_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cr-featured-images-admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-slider' ), $this->version, false );\n\t\t//wp_enqueue_script( 'watermark-admin-script', plugins_url( 'js/admin-settings.js', __FILE__ ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-slider' ), $this->defaults['version'] );\n\n\t}","title":""},{"docid":"e3fb9fb4a8d32a882edb247cc71801cc","score":"0.770645","text":"public function enqueue_scripts()\n {\n // Font awesome (icons)\n wp_register_style('woochimp-font-awesome', WOOCHIMP_PLUGIN_URL . '/assets/css/font-awesome/css/font-awesome.min.css', array(), '4.5.0');\n\n // Our own scripts and styles\n wp_register_script('woochimp', WOOCHIMP_PLUGIN_URL . '/assets/js/woochimp-admin.js', array('jquery'), WOOCHIMP_VERSION);\n wp_register_style('woochimp', WOOCHIMP_PLUGIN_URL . '/assets/css/style.css', array(), WOOCHIMP_VERSION);\n\n // Scripts\n wp_enqueue_script('media-upload');\n wp_enqueue_script('thickbox');\n wp_enqueue_script('jquery');\n wp_enqueue_script('jquery-ui');\n wp_enqueue_script('jquery-ui-accordion');\n wp_enqueue_script('jquery-ui-tooltip');\n wp_enqueue_script('woochimp');\n\n // Styles\n wp_enqueue_style('thickbox');\n wp_register_style('jquery-ui', WOOCHIMP_PLUGIN_URL . '/assets/jquery-ui/jquery-ui.min.css', array(), WOOCHIMP_VERSION);\n wp_enqueue_style('jquery-ui');\n wp_enqueue_style('woochimp-font-awesome');\n wp_enqueue_style('woochimp');\n }","title":""},{"docid":"78da1e0096e70e1348b3e20f84190440","score":"0.7702916","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Blogmail_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Blogmail_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->blogmail, plugin_dir_url( __FILE__ ) . 'js/blogmail-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"1b517ca5de43ba08d42b7956164374c1","score":"0.77006507","text":"public function enqueue_scripts() {\n\t\twp_register_script( 'jrg-primary-category-admin-script', $this->config['base_url'] . '/assets/jrg-primary-category.js', 'JQuery', $this->config['version'], true );\n\n\t\twp_localize_script( 'jrg-primary-category-admin-script', 'primary_category_data', array(\n\t\t\t'nonce' => wp_create_nonce( 'save-jrg-primary-category-field' ),\n\t\t\t'primary_category' => $this->get_current_post_primary_category(),\n\t\t\t'strings' => $this->get_js_localized_strings(),\n\t\t) );\n\n\t\twp_enqueue_script( 'jrg-primary-category-admin-script' );\n\n\t\twp_register_style( 'jrg-primary-category-admin-style', $this->config['base_url'] . '/assets/jrg-primary-category.css', array(), $this->config['version'] );\n\t\twp_enqueue_style( 'jrg-primary-category-admin-style' );\n\t}","title":""},{"docid":"8b87f182d45fa67b20f77039c5a90163","score":"0.7699448","text":"protected function enqueue_scripts()\n {\n @ wp_enqueue_media();\n \\wp_enqueue_style('tify_control-media_image');\n \\wp_enqueue_script('tify_control-media_image');\n }","title":""},{"docid":"b71ca6d7b637616e57c0cbcb4925b987","score":"0.76979876","text":"public function enqueue_scripts() {\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cncf-mu-public.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"b2aaf045a6e02379d3b9f0446af74084","score":"0.76951987","text":"public function enqueue() {\n\n\t\twp_register_script( 'themeisle-site-lib', Themeisle_Onboarding::get_dir() . '/assets/js/bundle.js', array(), Themeisle_Onboarding::VERSION, true );\n\n\t\twp_localize_script( 'themeisle-site-lib', 'themeisleSitesLibApi', $this->localize_sites_library() );\n\n\t\twp_enqueue_script( 'themeisle-site-lib' );\n\t}","title":""},{"docid":"0d48b62f6b628becebf8ee392c40c342","score":"0.7690472","text":"function theme_scripts() {\n\n\t// Load our main stylesheet.\n\twp_enqueue_style( 'Composer-style', get_stylesheet_uri() );\n\n\t// Load theme js\n\twp_enqueue_script( 'Composer-script', get_template_directory_uri() . '/js/composer.js', array( 'jquery' ), false, true );\n}","title":""},{"docid":"ccf6b816674d939cf02b70b0f8fe91a6","score":"0.7684717","text":"final public static function enqueue_scripts()\n {\n \\wp_enqueue_style('tiFySet_CookieLaw');\n Control::enqueue_scripts('cookie_notice');\n }","title":""},{"docid":"a00c67429bcc551053ad08dff6138946","score":"0.76845634","text":"public function enqueue_scripts()\n {\n wp_enqueue_style( 'rf-admin', RFFramework()->url() . '/assets/css/admin.css' );\n }","title":""},{"docid":"fa0cf7460d1f683a0aa406f0c4b7f484","score":"0.76811177","text":"public function add_scripts() {\r\n \r\n wp_register_style( 'zip-folder-default', plugins_url( '/css/default.css', __FILE__ ) );\r\n\t wp_enqueue_style( 'zip-folder-default' );\r\n wp_register_style( 'zip-folder-css', plugins_url( '/css/zip-folder.css', __FILE__ ) );\r\n\t wp_enqueue_style( 'zip-folder-css' );\r\n\r\n wp_register_script( 'php_file_tree_jquery', plugins_url( '/js/php_file_tree_jquery.js', __FILE__ ), true );\r\n wp_enqueue_script( 'php_file_tree_jquery' );\r\n wp_localize_script('php_file_tree_jquery', 'Ajax', array(\r\n\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\r\n\t));\r\n }","title":""},{"docid":"1812541193dc42e114f4f4ce3a3bde97","score":"0.76707155","text":"public function adminEnqueueScripts()\n {\n wp_register_script('wp-color-picker-settings', plugins_url('assets/js/wp-color-picker.js', plugin_basename($this->pluginFile)));\n wp_register_script('wp-media-settings', plugins_url('assets/js/wp-media.js', plugin_basename($this->pluginFile)));\n }","title":""},{"docid":"291edef720c395b51dc6a8dc9b0fe40d","score":"0.7665317","text":"public function enqueue_admin_scripts() {\n\n\t\t$screen = get_current_screen();\n\n\t\t// Only load js for our example page\n\t\tif ( $screen->id != $this->hook )\n\t\t\treturn;\n\n\t\t// Load our custom postlistr-app.js and require backbone\n\t\twp_enqueue_script( $this->hook . '-app-script', plugins_url( 'js/postlistr-app.js', __FILE__ ), array( 'wp-backbone' ), $this->version, true );\n\n\t}","title":""},{"docid":"892a2d66baa2c8d4439be9e03004d26c","score":"0.76630956","text":"public static function enqueue() {\n\t\t$template_mode = WPRM_Settings::get( 'recipe_template_mode' );\n\n\t\twp_register_style( 'wprm-public', WPRM_URL . 'dist/public-' . $template_mode . '.css', array(), WPRM_VERSION, 'all' );\n\n\t\t// Only include scripts when not AMP page.\n\t\tif ( ! function_exists( 'is_amp_endpoint' ) || ! is_amp_endpoint() ) {\n\t\t\twp_register_script( 'wprm-public', WPRM_URL . 'dist/public-' . $template_mode . '.js', array( 'jquery' ), WPRM_VERSION, true );\n\t\t\twp_localize_script( 'wprm-public', 'wprm_public', self::localize_public() );\n\t\t}\n\t\t\n\t\tif ( false === WPRM_Settings::get( 'only_load_assets_when_needed' ) ) {\n\t\t\tself::load();\n\t\t}\n\t}","title":""},{"docid":"3fab53598ab1137ffc2c757479c29488","score":"0.7661002","text":"function theme_scripts() {\n\t// Theme stylesheet.\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\n\t// Add main stylesheet\n\twp_enqueue_style( 'main.min', get_template_directory_uri() . '/dist/css/main.min.css', array(), '0.1.0' );\n\n\twp_enqueue_script( 'vendors.min', get_template_directory_uri() . '/dist/js/vendors.min.js', array(), '20170816', true );\n\twp_enqueue_script( 'main.min', get_template_directory_uri() . '/dist/js/main.min.js', array('jquery'), '20170816', true );\n}","title":""},{"docid":"6c09b3f2097edb743bb0f4676c6cccc0","score":"0.76607937","text":"function nr_load_scripts() {\n\n wp_dequeue_style('wp-block-library');\n wp_dequeue_style('wp-block-library-theme');\n\n\twp_enqueue_style('main', NR_THEME_URL.'/app.css', false, NR_VERSION);\n\twp_enqueue_style('fonts', 'https://fast.fonts.net/t/1.css?apiType=css&projectid=e0897766-a751-4fd7-89ea-7081fe24868a', false,null);\n\n\twp_deregister_script('jquery');\n\twp_deregister_script('wp-embed');\n\n\twp_register_script('jquery', NR_THEME_URL.'/js/jquery-3.3.1.min.js',null,null,true); \n\twp_enqueue_script('jquery');\n\t\t\t\t\t\t\t\t\t\n\twp_register_script('plugins', NR_THEME_URL.'/js/plugins.js','jquery',NR_VERSION,true); \n\twp_enqueue_script('plugins');\t\n\t\n\twp_register_script('site', NR_THEME_URL.'/js/site.js',array('jquery','plugins'),NR_VERSION,true); \n\twp_enqueue_script('site');\n\t\t\t\n}","title":""},{"docid":"4c5bf92b58c402faac58f5243fb6e875","score":"0.7660158","text":"public function scripts() {\n\t\t\tif (!$this->run()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// wp_enqueue_script\n\t\t\t$handle \t= 'acf-bs4-page-builder';\n\t\t\t$src \t= plugin_dir_url(__FILE__).'js/admin.js';\n\t\t\t$deps \t= array('acf-input');\n\t\t\t$ver \t= $this->version;\n\t\t\t$in_footer \t= false;\n\t\t\twp_register_script($handle, $src, $deps, $ver, $in_footer);\n\t\t\t$object = 'acf_page_builder_vars';\n\t\t\t$data = array();\n\t\t\twp_localize_script($handle, $object, $data);\n\t\t\twp_enqueue_script($handle);\n\t\t\t\n\t\t\t$handle = 'acf-bs4-page-builder';\n\t\t\t$src \t= plugin_dir_url(__FILE__).'css/admin.css';\n\t\t\t$deps \t= array('acf-input');\n\t\t\t$ver \t= $this->version;\n\t\t\twp_enqueue_style($handle, $src, $deps, $ver);\n\t\t\t\n\t\t\twp_enqueue_script('jquery-ui-tooltip');\n\t\t\t\n\t\t}","title":""},{"docid":"309493192c137a4466cda5fac548b800","score":"0.7656778","text":"function _add_scripts() {\n\t\t\tif (is_admin()) return;\n\t\t\twp_enqueue_script('modernizr', get_stylesheet_directory_uri() .'/bower_components/modernizer/modernizr.js', array(), '2.8.2');\n\t\t\twp_enqueue_script('theme.app', get_stylesheet_directory_uri() .'/js/min/app.min.js', array('jquery','modernizr'), '0.1.0', true);\n\t\t\twp_localize_script('theme.app', 'theme', $this->_add_js_vars()); // Call _add_js_vars() to add PHP variables to frontend\n\t\t}","title":""},{"docid":"4fcd662166b2cee451102d3e7c2a11e7","score":"0.7654341","text":"public function enqueue_scripts()\n\t\t{\n\t\t\tif (!is_admin()) return;\n\t\t\t\n\t\t\twp_enqueue_editor(array( 'type' => 'text/html' ));\n\t\t\twp_enqueue_style( 'repeatable-fields-css', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/css/repeatable-fields.css', array(), microtime() );\n\t\t\t\n\t\t\t// tinymce\n\t\t\twp_enqueue_style( 'editor-css', includes_url('css/') . 'editor.css', array(), microtime() );\n\t\t\t// init repeatable fields js\n\t\t\twp_enqueue_script( 'repeatable-fields-js', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/js/repeatable-fields.js' , array('jquery'), microtime(), true );\n\t\t\twp_enqueue_script( 'init-js', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/js/init.js' , array('jquery'), microtime(), true );\n\t\t}","title":""},{"docid":"daae675f0351d6c76359d6d8d6b2a977","score":"0.76509994","text":"function pb_scripts(){\n $version = '0.0.0';\n wp_enqueue_style('pb-estilo', get_stylesheet_directory_uri() . '/css/estilo.css', array(), $version );\n wp_enqueue_script('pb-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'), $version );\n wp_enqueue_script('jquery');\n}","title":""},{"docid":"d814d15647a92604b32b4954b16cd195","score":"0.7641438","text":"public function enqueue_scripts()\n {\n /*\n * This function is provided for demonstration purposes only.\n *\n * An instance of this class should be passed to the run() function\n * defined in Mtii_Utilities_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The Mtii_Utilities_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n wp_enqueue_script(\n $this->_plugin_name.'-admin-main-script',\n plugin_dir_url(__FILE__) . 'js/mtii-utilities-admin-script.js',\n array('jquery'),\n 2900, false\n );\n }","title":""},{"docid":"5e7402e29f09b927cfbe03a1887df931","score":"0.7628326","text":"public function enqueue_scripts()\n\t{\n\t\twp_enqueue_style('my-script', plugins_url('/css/admin.css', __FILE__));\n\t\twp_enqueue_script('my-script', plugins_url('/js/kayako.js', __FILE__), array('jquery'));\n\t\twp_localize_script('my-script', 'myAjax', array('ajaxurl' => admin_url('admin-ajax.php')));\n\t}","title":""},{"docid":"9c50c6e3c0efa03b48c6039ba51de2eb","score":"0.7624521","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Altlab_Postgrid_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Altlab_Postgrid_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/altlab-postgrid-public.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"fded8725cd78c2b79a2cc1d5cf9a28a8","score":"0.7618597","text":"public function wp_enqueue_scripts() {\n wp_enqueue_style( 'manhphucpro-main', $this->child_base_url . '/assets/dist/css/main.css', [], $this->version, 'all' );\n\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'manhphucpro-main', $this->child_base_url . '/assets/dist/js/main.js', [ 'jquery' ], $this->version, true );\n\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n wp_enqueue_script( 'comment-reply' );\n }\n }","title":""},{"docid":"562b885e10332c9968f69645ac6bc677","score":"0.7614298","text":"public function enqueue_scripts()\n {\n }","title":""},{"docid":"fbd35993feb8acfcacc4933618d35957","score":"0.76086724","text":"public function wp_enqueue_scripts()\n {\n if(self::tFyAppConfig('enqueue_scripts', true)) :\n self::enqueue_scripts();\n endif;\n }","title":""},{"docid":"29460a705ee4d2d597b734c8c98ef8db","score":"0.76075226","text":"function load_scripts() { \n\t\t\t\twp_enqueue_style(\"font-awesome\", \"//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css\");\n\t\t\t\twp_enqueue_style(\"nabla-widget-styles\", NABLA_WIDGETS_CSS_URL.\"nabla-styles.css\");\n\t\t\t}","title":""},{"docid":"0ded4504fa99064d255878834b049aa1","score":"0.76050353","text":"function berry_scripts() {\n wp_dequeue_style( 'seed-style');\n wp_enqueue_style('b-style', get_stylesheet_uri());\n\n if($GLOBALS['s_jquery'] == 'enable') {\n $need_jquery = true;\n } else {\n $need_jquery = false;\n }\n\twp_enqueue_script( 'berry-js', get_stylesheet_directory_uri() . '/js/main.js', array(), filemtime( get_stylesheet_directory() . '/js/main.js' ), $need_jquery );\n}","title":""},{"docid":"123c97b0d511eed87f1f48dbb3e4a0f1","score":"0.7604805","text":"public function enqueue() {\n\t\t$token = $this->token;\n\t\t$url = $this->url;\n\n\t\twp_enqueue_style( $token . '-css', $url . '/assets/front-end.css' );\n\t\twp_enqueue_style( $token . '-animate', $url . '/assets/animate.css' );\n\t\twp_enqueue_script( $token . '-js', $url . '/assets/front-end.js', array( 'jquery' ) );\n\t}","title":""},{"docid":"311d487d60904478cd65f66cea6a1410","score":"0.7601658","text":"function initialize_enqueue_scripts() {\n\t\t$dependencies = array_merge(array('jquery'), $this->theme_opt['js_deps']);\n\t\twp_enqueue_style($this->theme_opt['theme_name_lc'], get_template_directory_uri().'/style.css');\n\t\twp_enqueue_script($this->theme_opt['theme_name_lc'], get_template_directory_uri() .'/js/'.$this->theme_opt['theme_name_lc'].'.js', $dependencies);\n\t\tif(!!$this->theme_opt['override_stylesheet']) {\n\t\t\twp_add_inline_style($this->theme_opt['theme_name_lc'], $this->theme_opt['override_stylesheet']);\n\t\t}\n\t}","title":""},{"docid":"f1f8faed20980ef6e824f7c7c21992b9","score":"0.7600171","text":"public function enqueue_frontend_scripts() {\n wp_enqueue_script( \"{$this->plugin_name}-script\" );\n wp_enqueue_style( \"{$this->plugin_name}-style\" );\n }","title":""},{"docid":"2f15c08032a5519802b63768ed5d2d37","score":"0.76000535","text":"function hwdsb_tv_enqueue_scripts() {\n\t// Enqueue parent style.\n\twp_enqueue_style( 'gazette-parent-style', get_template_directory_uri() . '/style.css' );\n\n\t// Enqueue our stylesheet so we can bust CSS cache.\n\twp_enqueue_style( 'tvhwdsb', get_stylesheet_uri(), array(), '20180227' );\n}","title":""},{"docid":"8b106ff6a198551bc274c5652ad68f4e","score":"0.75908315","text":"public function enqueue_scripts() {\n\n\t\t\twp_register_script( 'timepicker-scripts', plugin_dir_url( __FILE__ ) . 'assets/js/jquery-ui-timepicker-addon.min.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-ui-datepicker' ) );\n\n \t\t wp_register_script( 'scheduler-scripts', plugin_dir_url( __FILE__ ) . 'assets/js/scheduler.js', array( 'timepicker-scripts' ) );\n \t\twp_enqueue_script( 'scheduler-scripts' );\n\t\t}","title":""},{"docid":"90e9acc5218efa4d526bfafa6f13ff4f","score":"0.7588261","text":"public function theme_scripts() {\n\t\t/* wp_enqueue_script(\n\t\t\t'flexdatalist',\n\t\t\t'https://cdnjs.cloudflare.com/ajax/libs/jquery-flexdatalist/2.2.4/jquery.flexdatalist.min.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t); */\n\t\twp_enqueue_script(\n\t\t\t'owl-carousel',\n\t\t\tTHEME_URL . '/assets/owl-carousel/owl.carousel.min.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'handlebars',\n\t\t\tTHEME_URL . '/assets/js/handlebars.js',\n\t\t\t[],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'jquery-ui',\n\t\t\tTHEME_URL . '/assets/js/jquery-ui.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n 'simplebar',\n 'https://cdn.jsdelivr.net/npm/simplebar@4.1.0/dist/simplebar.min.js',\n [],\n 'auto',\n true\n );\n\t\twp_enqueue_script(\n\t\t\t'mcustomscrollbar',\n\t\t\tTHEME_URL . '/assets/js/jquery.mCustomScrollbar.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'navigo',\n\t\t\tTHEME_URL . '/assets/js/navigo.min.js',\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'submit-feedback',\n\t\t\tTHEME_URL . '/assets/js/submit-feedback.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'submit-contact',\n\t\t\tTHEME_URL . '/assets/js/submit-contact.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\t// phpcs:ignore -- load in header, after jQuery.\n\t\twp_enqueue_script(\n\t\t\t'tracking',\n\t\t\tTHEME_URL . '/assets/js/tracking.js',\n\t\t\t[ 'jquery' ],\n\t\t\t'auto'\n\t\t);\n\t\twp_enqueue_script(\n\t\t\t'theme',\n\t\t\tTHEME_URL . '/assets/js/theme.js',\n\t\t\t[ 'jquery', 'mediaelement', 'submit-feedback' ],\n\t\t\t'auto',\n\t\t\ttrue\n\t\t);\n\t\t/* wp_enqueue_script(\n\t\t\t'search',\n\t\t\tTHEME_URL . '/assets/js/search.js',\n\t\t\t[ 'flexdatalist' ],\n\t\t\t'1.0.0',\n\t\t\ttrue\n\t\t); */\n\t\t$error_messages = [\n\t\t\t'required' => __( 'This field is required. Please be sure to check.', 'asvz' ),\n\t\t\t'email' => __( 'Your E-mail address appears to be invalid. Please be sure to check.', 'asvz' ),\n\t\t\t'number' => __( 'You can enter only numbers in this field.', 'asvz' ),\n\t\t\t'maxLength' => __( 'Maximum {count} characters allowed!', 'asvz' ),\n\t\t\t'minLength' => __( 'Minimum {count} characters allowed!', 'asvz' ),\n\t\t\t'maxChecked' => __( 'Maximum {count} options allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'minChecked' => __( 'Please select minimum {count} options.', 'asvz' ),\n\t\t\t'maxSelected' => __( 'Maximum {count} selection allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'minSelected' => __( 'Minimum {count} selection allowed. Please be sure to check.', 'asvz' ),\n\t\t\t'notEqual' => __( 'Fields do not match. Please be sure to check.', 'asvz' ),\n\t\t\t'different' => __( 'Fields cannot be the same as each other', 'asvz' ),\n\t\t\t'creditCard' => __( 'Invalid credit card number. Please be sure to check.', 'asvz' ),\n\t\t];\n\n\t\t/* $menu_items = [\n\t\t\t'categories' => [\n\t\t\t\t'text' => get_field( 'menu__categories__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__categories__icon', 'option' ),\n\t\t\t],\n\t\t\t'materials' => [\n\t\t\t\t'text' => get_field( 'menu__materials__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__materials__icon', 'option' ),\n\t\t\t],\n\t\t\t'tips' => [\n\t\t\t\t'text' => get_field( 'menu__tips__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__tips__icon', 'option' ),\n\t\t\t],\n\t\t\t'faq' => [\n\t\t\t\t'text' => get_field( 'menu__faq__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__faq__icon', 'option' ),\n\t\t\t],\n\t\t\t'contact' => [\n\t\t\t\t'text' => get_field( 'menu__contact__text', 'option' ),\n\t\t\t\t'icon' => get_field( 'menu__contact__icon', 'option' ),\n\t\t\t],\n\t\t]; */\n\n\t\t/* $type_icons = [\n\t\t\t'category' => get_field( 'type_icon__category', 'option' ),\n\t\t\t'task' => get_field( 'type_icon__task', 'option' ),\n\t\t\t'step' => get_field( 'type_icon__step', 'option' ),\n\t\t\t'material' => get_field( 'type_icon__material', 'option' ),\n\t\t\t'faq' => get_field( 'type_icon__faq', 'option' ),\n\t\t]; */\n\n\t\t/* foreach ( $type_icons as $key => $value ) {\n\t\t\tif ( $type_icons[ $key ] ) {\n\t\t\t\t$type_icons[ $key ] = $type_icons[ $key ]['sizes']['thumbnail'];\n\t\t\t}\n\t\t} */\n\n\t\t$asvz_objects = [\n\t\t\t'themeUrl' => THEME_URL,\n\t\t\t/*'ajaxUrl' => admin_url( 'admin-ajax.php' ),\n\t\t\t'nonces' => [\n\t\t\t\t'submit_feedback' => wp_create_nonce( 'ASVZ_Submit_Feedback' ),\n\t\t\t\t'submit_contact' => wp_create_nonce( 'ASVZ_Submit_Contact' ),\n\t\t\t],\n\t\t\t'categories' => Category::all(),\n\t\t\t'materials' => Material::all(),\n\t\t\t'tasks' => Task::all(),\n\t\t\t'steps' => Step::all(),\n\t\t\t'faqs' => Faq::all(),\n\t\t\t'pages' => [\n\t\t\t\t'welcome' => [\n\t\t\t\t\t'title' => get_field( 'welcome_page__title', 'option' ),\n\t\t\t\t\t'subtitle' => get_field( 'welcome_page__subtitle', 'option' ),\n\t\t\t\t\t'thumbnail' => get_field( 'welcome_page__thumbnail', 'option' ),\n\t\t\t\t\t'description' => get_field( 'welcome_page__description', 'option' ),\n\t\t\t\t\t'cta_button' => [\n\t\t\t\t\t\t'text' => get_field( 'welcome_page__cta_button__text', 'option' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'feedback_form' => [\n\t\t\t\t'intro' => get_field( 'cleaning_feedback__intro', 'option' ),\n\t\t\t\t'title' => get_field( 'cleaning_feedback__title', 'option' ),\n\t\t\t\t'subtitle' => get_field( 'cleaning_feedback__subtitle', 'option' ),\n\t\t\t\t'placeholder' => get_field( 'cleaning_feedback__placeholder', 'option' ),\n\t\t\t\t'messages' => [\n\t\t\t\t\t'success' => get_field( 'cleaning_feedback__success_message', 'option' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'contact_form' => [\n\t\t\t\t'labels' => [\n\t\t\t\t\t'name' => get_field( 'cleaning_contact__label__name', 'option' ),\n\t\t\t\t\t'email' => get_field( 'cleaning_contact__label__email', 'option' ),\n\t\t\t\t\t'subject' => get_field( 'cleaning_contact__label__subject', 'option' ),\n\t\t\t\t\t'body' => get_field( 'cleaning_contact__label__body', 'option' ),\n\t\t\t\t\t'button' => get_field( 'cleaning_contact__label__button', 'option' ),\n\t\t\t\t],\n\t\t\t\t'placeholders' => [\n\t\t\t\t\t'name' => get_field( 'cleaning_contact__placeholder__name', 'option' ),\n\t\t\t\t\t'email' => get_field( 'cleaning_contact__placeholder__email', 'option' ),\n\t\t\t\t\t'subject' => get_field( 'cleaning_contact__placeholder__subject', 'option' ),\n\t\t\t\t\t'body' => get_field( 'cleaning_contact__placeholder__body', 'option' ),\n\t\t\t\t],\n\t\t\t\t'messages' => [\n\t\t\t\t\t'success' => [\n\t\t\t\t\t\t'title' => get_field( 'cleaning_contact__success_message__title', 'option' ),\n\t\t\t\t\t\t'description' => get_field( 'cleaning_contact__success_message__description', 'option' ),\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'menu_items' => $menu_items,\n\t\t\t'page_titles' => [\n\t\t\t\t'categories' => __( 'Categorieën', 'asvz' ),\n\t\t\t\t'products' => __( 'Producten', 'asvz' ),\n\t\t\t\t'tasks' => __( 'Takenlijst', 'asvz' ),\n\t\t\t\t'tips' => __( 'Tips', 'asvz' ),\n\t\t\t\t'contact' => __( 'Contact', 'asvz' ),\n\t\t\t\t'faq' => __( 'Veelgestelde vragen', 'asvz' ),\n\t\t\t],\n\t\t\t'general_labels' => [\n\t\t\t\t'menu_header' => __( 'Poets!', 'asvz' ),\n\t\t\t\t'powered_by' => __( 'Powered By ASVZ', 'asvz' ),\n\t\t\t\t'search_placeholder' => __( 'Search keyword...', 'asvz' ),\n\t\t\t\t'tips_title' => __( 'Poets tips', 'asvz' ),\n\t\t\t\t'material_needed' => __( 'Bekijk hier wat je allemaal nodig hebt', 'asvz' ),\n\t\t\t\t'menu_header' => __( '', 'asvz' ),\n\t\t\t\t'completed_material' => __( 'Your material is complete!', 'asvz' ),\n\t\t\t],\n\t\t\t'popup' => [\n\t\t\t\t'trigger' => [\n\t\t\t\t\t'tips_icon' => get_field( 'tips_popup__trigger_icon', 'option' ),\n\t\t\t\t\t'wizard_icon' => get_field( 'wizard_popup__trigger_icon', 'option' ),\n\t\t\t\t],\n\t\t\t],\n\t\t\t'type_icons' => $type_icons,*/\n\t\t];\n\n\t\twp_localize_script(\n\t\t\t'theme',\n\t\t\t'asvzObj',\n\t\t\t$asvz_objects\n\t\t);\n\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}","title":""},{"docid":"f2d0c0034df17124bcd911d7d6799664","score":"0.758781","text":"public function enqueue_scripts () {\r\n\t\tif( ! is_admin() && is_singular( 'lookbook') ){\r\n\t\t\twp_enqueue_style( 'wc-lookbook-frontend', WC_LOOKBOOK_URL . 'css/wc-lookbook-frontend.css', array(), false, 'all' );\r\n\t\t}\r\n\t}","title":""},{"docid":"8b48b746708c0131a9c8e2e7cd7231a2","score":"0.75817454","text":"public function enqueue()\n {\n // Remove wordpress oembed\n wp_deregister_script('wp-embed');\n\n // Don't use WordPress jquery on public pages.\n // Remove block library from public pages.\n if (!is_admin()) {\n wp_deregister_script('jquery');\n wp_dequeue_style('wp-block-library');\n }\n\n // Enqueue jQuery file.\n if (!is_admin()) {\n wp_enqueue_script(\n 'jquery',\n Utilities::staticUrl('/dist/js/jquery.min.js'),\n [],\n null\n );\n }\n\n // Enqueue Laravel Mix files.\n $this->enqueueMixFiles();\n\n // Enqueue main app.js file.\n wp_enqueue_script(\n 'app',\n Utilities::staticUrl('/dist/js/app.js'),\n [],\n null,\n true\n );\n\n // Ajax support\n wp_localize_script(\n 'app',\n 'scriptvars',\n [\n 'ajax_url' => home_url('ajax'),\n 'base_path' => parse_url(trailingslashit(home_url()), PHP_URL_PATH)\n ]\n );\n }","title":""},{"docid":"3105000c0c19704175e27e6ac9496039","score":"0.7574431","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Customorder_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Customorder_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/customorder-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}","title":""},{"docid":"1f280794af55a3cd227fe26300db2019","score":"0.7570887","text":"public function enqueue_scripts() {\n\n\t\twp_enqueue_script( 'wp-util' );\n\t}","title":""},{"docid":"0f6707dc3c79746af9c4d7d940738d95","score":"0.7566194","text":"function load_styles_and_scripts() {\n wp_enqueue_style('bootstrap-styles', get_template_directory_uri() . '/css/bootstrap.css');\n wp_enqueue_style('main-styles', get_stylesheet_uri());\n\n wp_enqueue_script('jQuery', 'https://code.jquery.com/jquery.min.js');\n wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.js');\n wp_enqueue_script('iconDock', get_template_directory_uri() . '/js/jqueryjqDoc.min.js');\n}","title":""},{"docid":"5c717f2ab27c4f8228971a6e60a129f4","score":"0.75625914","text":"public function enqueue() {\n wp_enqueue_script( 'jquery-ui-core' );\n wp_enqueue_script( 'jquery-ui-sortable' );\n }","title":""},{"docid":"ad01a5ba8520f91b026aa8a7bb8f92cc","score":"0.75600785","text":"function aihr_scripts() {\n\n\t$theme = wp_get_theme();\n\t$theme_version = $theme['Version'];\n\t \n\t\n\twp_enqueue_style('aihr-style',get_stylesheet_directory_uri() . '/assets/css/custom.css',$theme_version,true);\n\n\twp_enqueue_script('aihr-js-custom',get_stylesheet_directory_uri() . '/assets/js/custom.js',array('jquery'),$theme_version,true );\n\n\n}","title":""},{"docid":"ec6802d7b4ac1e3fcfe0bd49735d3e93","score":"0.75598204","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Wpmbt_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Wpmbt_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script(Wpmbt_Admin::$plugin_name, plugin_dir_url(__FILE__) . 'js/wpmbt-admin.js', array('jquery'), Wpmbt_Admin::$version, false);\n\n\t}","title":""},{"docid":"401af9446563b5ccc465af361c79af6c","score":"0.75539416","text":"public function enqueue_scripts() {\n\n wp_enqueue_style('bloomberg-shortcode', BLOOMBERG_PLUGIN_URL .'css/shortcode.min.css');\n\n wp_register_script('bloomberg-shortcode', BLOOMBERG_PLUGIN_URL .'js/shortcode.min.js', 'jquery', '1.0', true);\n }","title":""},{"docid":"095a1c38f1f3f2478530b9dd95d39560","score":"0.75525063","text":"public function enqueueMixFiles()\n {\n // Enqueue manifest.js file.\n wp_enqueue_script(\n 'manifest',\n Utilities::staticUrl('/dist/js/manifest.js'),\n [],\n null,\n true\n );\n\n // Enqueue vendor.js file if we have one.\n if (file_exists(trailingslashit(ASSETS_DIR) . 'dist/js/vendor.js')) {\n wp_enqueue_script(\n 'vendor',\n Utilities::staticUrl('/dist/js/vendor.js'),\n [],\n null,\n true\n );\n }\n }","title":""},{"docid":"b0eba5f0a6c2df88bdab8914c9ab3265","score":"0.7551191","text":"public function _enqueue_scripts() {\r\n //style and widgetne\r\n wp_enqueue_style('hw-stats-mechanic-style', HW_COUNTER_PLUGIN_URL. '/assets/styles/css/default.css');\r\n }","title":""},{"docid":"cbb264f57153990fa48bb2116d5f6bb9","score":"0.75497574","text":"public function admin_register_scripts_styles() {\n wp_register_script(\n 'sizzle',\n plugins_url( '/js/lib/sizzle.js', CM_COMPANY_FOOTER ),\n null,\n '1.9.4-pre',\n true\n );\n wp_register_script(\n 'cm-company-email-admin',\n plugins_url( '/js/cm-company-email-admin.js', CM_COMPANY_FOOTER ),\n array( 'sizzle' ),\n false,\n true\n );\n }","title":""},{"docid":"129619abf24e4d285167519890f86189","score":"0.753804","text":"public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Css_Stats_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Css_Stats_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\t\twp_enqueue_script( $this->plugin_name . '-common', CSS_STATS_PLUGIN_DIR . 'client/dist/commons.js', array(), $this->version, true );\n\t\twp_enqueue_script( $this->plugin_name, CSS_STATS_PLUGIN_DIR . 'client/dist/admin.bundle.js', array(), $this->version, true );\n\n\t\twp_localize_script( $this->plugin_name, 'css_stats', $this->get_vars());\n\t\t\t\t\n\t}","title":""},{"docid":"873c04fa2e318758b9edf608dcf3d350","score":"0.7536294","text":"private function register_scripts_and_styles() {\n if (is_admin()) {\n $this->load_file(self::slug . '-admin-style', '/css/admin.css');\n $this->load_file( self::slug . '-moment-js', '/js/moment-with-locales.min.js',true );\n \n \n } //is_admin()\n else {\n } // end if/else\n }","title":""}],"string":"[\n {\n \"docid\": \"a5c67a74a8f6965c6affe9c64b24ab95\",\n \"score\": \"0.8440598\",\n \"text\": \"public function enqueueScripts() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd846b0b7767ea7f97bafacf9f4933f7\",\n \"score\": \"0.82236314\",\n \"text\": \"public function enqueueAssets ()\\n\\t\\t{\\t\\n\\t\\t\\tadd_action('wp_enqueue_scripts', array(&$this, 'registerScript'));\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94f3c12f3a507ea40c237df4439053be\",\n \"score\": \"0.8191773\",\n \"text\": \"public function scripts() {\\n\\n\\t\\twp_enqueue_style( 'learnmultisitelander-style', get_stylesheet_uri(), array(), wp_get_theme()->get( 'Version' ) );\\n\\t\\twp_enqueue_script( 'learnmultisite-mainjs', get_theme_file_uri( '/assets/js/main.js' ), array(), wp_get_theme()->get( 'Version' ), true );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e944cd91d51b6f02a6b6ecba4d4aa93\",\n \"score\": \"0.81909984\",\n \"text\": \"public function enqueueScripts()\\n {\\n wp_enqueue_style( 'cpt-' . $this->getName() . '-styles', $this->getStylesheetUrl() );\\n wp_enqueue_script( 'cpt-' . $this->getName() . '-scripts', $this->getScriptsUrl() );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c63822bf54b218a0eff9012000d6832\",\n \"score\": \"0.81890285\",\n \"text\": \"public function enqueueScripts()\\n {\\n $stylesheet = plugins_url('public/css/fvch-styles.css', dirname(__FILE__));\\n if (file_exists( get_stylesheet_directory() . '/fvch-styles.css' )) {\\n $stylesheet = get_stylesheet_directory_uri() . '/fvch-styles.css';\\n }\\n\\n wp_register_style('fvch-styles', $stylesheet, false, '1.1');\\n wp_enqueue_style('fvch-styles' );\\n\\n if ($this->_options->getOption('fvch-toolbox')) {\\n wp_enqueue_script('fvch-toolbox', plugins_url('public/js/toolbox.js', dirname(__FILE__)), array('jquery'), '1.0', true);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46052b227d8e465541ce47ddc86a0d6b\",\n \"score\": \"0.8131048\",\n \"text\": \"protected function enqueue_scripts() {\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"699b96ffaf153b4b7773566b49a136ea\",\n \"score\": \"0.8126013\",\n \"text\": \"private function enqueue_scripts() {\\n\\t\\twp_register_script( 'suggestions', plugins_url( 'js/jquery.suggestions.js', $this->baseDir ) );\\n\\t\\twp_register_script( 'search', plugins_url( 'js/search.js', $this->baseDir ) );\\n\\t\\twp_register_script( 'photocommons-admin', plugins_url( 'js/admin.js', $this->baseDir ) );\\n\\n\\t\\twp_localize_script(\\n\\t\\t\\t'photocommons-admin',\\n\\t\\t\\t'WP_PHOTOCOMMONS',\\n\\t\\t\\t[\\n\\t\\t\\t\\t'imgButtonUrl' => plugins_url('img/button.png', $this->baseDir),\\n\\t\\t\\t\\t'imgLoaderUrl' => plugins_url('img/loading.gif', $this->baseDir),\\n\\t\\t\\t\\t'translations' => [\\n\\t\\t\\t\\t\\t'Insert images from Wikimedia Commons' => 'Insert images from Wikimedia Commons',\\n\\t\\t\\t\\t\\t'PhotoCommons' => 'PhotoCommons',\\n\\t\\t\\t\\t\\t'Search' => 'Search',\\n\\t\\t\\t\\t],\\n\\t\\t\\t]\\n\\t\\t);\\n\\n\\t\\t// Enqueue external libraries\\n\\t\\twp_enqueue_script( 'jquery' );\\n\\t\\twp_enqueue_script( 'jquery-ui-core' );\\n\\t\\twp_enqueue_script( 'jquery-ui-dialog' );\\n\\n\\t\\t// Enqueue our own scripts\\n\\t\\twp_enqueue_script( 'suggestions' );\\n\\t\\twp_enqueue_script( 'search' );\\n\\t\\twp_enqueue_script( 'photocommons-admin' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"abbdf34d8fa3d2b63f8f278622c05109\",\n \"score\": \"0.8120988\",\n \"text\": \"public function enqueue_scripts() {\\n wp_register_script($this->_token . '-plugins',\\n esc_url($this->assets_url) . 'js/plugins' . $this->script_suffix . '.js', array('jquery'),\\n $this->_version, true);\\n wp_enqueue_script($this->_token . '-plugins');\\n\\n wp_register_script($this->_token . '-frontend',\\n esc_url($this->assets_url) . 'js/frontend' . $this->script_suffix . '.js', array('jquery'),\\n $this->_version, true);\\n wp_enqueue_script($this->_token . '-frontend');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9e1acead89a8b627af4110cc7e651d6\",\n \"score\": \"0.8084531\",\n \"text\": \"public function enqueueThemeScripts()\\n {\\n $js_uri = get_theme_file_uri( '/assets/dist/scripts/' );\\n $js_dir = get_theme_file_path( '/assets/dist/scripts/' );\\n\\n $js_files = $this->getJsFiles();\\n foreach ( $js_files as $handle => $data ) {\\n $src = $js_uri . $data['file'];\\n $version = logger()->getAssetVersion( $js_dir . $data['file'] );\\n $deps = $data['deps'];\\n $in_foot = $data['in_foot'];\\n\\n wp_enqueue_script( $handle, $src, $deps, $version, $in_foot );\\n }\\n\\n if ( ! is_admin() ) {\\n wp_dequeue_style( 'wp-block-library' );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1992332625ffa3a24f28cba9dd2c58d7\",\n \"score\": \"0.8069915\",\n \"text\": \"public function enqueue_scripts() {\\n\\t\\tif ( $this->scripts_enqueued ) {\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t// Ensure scripts are registered\\n\\t\\t$this->register_scripts();\\n\\n\\t\\t/* SCRIPTS */\\n\\t\\twp_enqueue_script( 'blockrain-init' );\\n\\n\\t\\t/* STYLES */\\n\\t\\twp_enqueue_style( 'blockrain' );\\n\\n\\t\\t// Prevent redundant calls\\n\\t\\t$this->scripts_enqueued = true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24138ea8bfc6d00502d68af6ac929e0f\",\n \"score\": \"0.80347174\",\n \"text\": \"public function scripts_and_styles() {\\n\\n\\t\\t\\t// Stylesheets\\n\\t\\t\\twp_enqueue_style( 'asc-admin', ASCRIPTA_ENGINE_CSS_URL . 'admin/asc-admin.min.css', array(), ASCRIPTA_ENGINE_VERSION, 'all' );\\n\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"532ec2167efde1f9f61a923c86db6efd\",\n \"score\": \"0.8027588\",\n \"text\": \"public function enqueue_styles_and_scripts_fronend() {\\r\\n\\r\\n\\t\\twp_enqueue_script( 'jquery-ui-core' );\\r\\n\\t\\twp_enqueue_script( 'jquery-ui-widget' );\\r\\n\\t\\twp_enqueue_script( 'jquery-ui-draggable' );\\r\\n\\t\\twp_enqueue_script( 'jquery-ui-mouse' );\\r\\n\\t\\twp_enqueue_script( 'jquery-ui-sortable' );\\r\\n\\t\\twp_enqueue_script( 'jquery-touch-punch' );\\r\\n\\t\\twp_enqueue_script( 'jquery-ui-datepicker' );\\r\\n\\t\\twp_enqueue_style( 'jquery-custom-scroll-bar' );\\r\\n\\r\\n\\t\\twp_enqueue_style( 'lscf-bootstrap' );\\r\\n\\t\\twp_enqueue_style( 'px_base' );\\r\\n\\t\\twp_enqueue_script( 'px_vendor' );\\r\\n\\t\\twp_enqueue_script( 'angular' );\\r\\n\\t\\twp_enqueue_script( 'angular-ngAnimate' );\\r\\n\\t\\twp_enqueue_script( 'jquery-ui' );\\r\\n\\t\\twp_enqueue_style( 'jquery-ui-style' );\\r\\n\\t\\twp_enqueue_style( 'jquery-custom-scroll-bar' );\\r\\n\\t\\twp_enqueue_script( 'angular_sanitize' );\\r\\n\\t\\twp_enqueue_script( 'px_capf' );\\r\\n\\t\\twp_enqueue_script( 'px_main' );\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97eea7acc014ad96b3996d5545b27cab\",\n \"score\": \"0.8027461\",\n \"text\": \"public function enqueue_scripts() {\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34814737f785942ba0c3e0b61e1a0a96\",\n \"score\": \"0.79764956\",\n \"text\": \"public function enqueue() {\\n\\t\\t// Remove default Gutenberg CSS.\\n\\t\\twp_deregister_style( 'wp-block-library' );\\n\\n\\t\\twp_enqueue_script( 'vendor', SKELA_THEME_URL . '/dist/vendor.js', array(), SKELA_THEME_VERSION, true );\\n\\n\\t\\t// Enqueue custom js file, with cache busting.\\n\\t\\twp_enqueue_script( 'script.js', SKELA_THEME_URL . '/dist/app.js', array(), SKELA_THEME_VERSION, true );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d243b820e78888ca601f68b2855f2f68\",\n \"score\": \"0.7928549\",\n \"text\": \"public function enqueue_scripts()\\n\\t{\\n\\t\\twp_enqueue_style(\\n\\t\\t\\t'bf-krumo',\\n\\t\\t\\t$this->plugin_url . '/bf-krumo.css',\\n\\t\\t\\tarray(),\\n\\t\\t\\t'1.1',\\n\\t\\t\\t'all'\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e1606b61d2193f6ce89238746285d3f\",\n \"score\": \"0.79184645\",\n \"text\": \"public function enqueue()\\n {\\n $scripts = $this->scripts();\\n\\n foreach ($scripts as $script) {\\n [\\n 'handle' => $handle,\\n 'src' => $src,\\n 'dependencies' => $dependencies,\\n 'version' => $version\\n ] = $script;\\n\\n wp_register_script(\\n $handle,\\n $src,\\n $dependencies,\\n $version,\\n $this->in_footer\\n );\\n\\n if (isset($script['inline'])) {\\n $inline = $script['inline'];\\n\\n [\\n 'js_key' => $js_key,\\n 'data' => $data,\\n 'position' => $position\\n ] = $inline;\\n\\n $json_data = json_encode($data);\\n\\n wp_add_inline_script(\\n $handle,\\n \\\"window.__{$js_key}__ = $json_data\\\",\\n $position\\n );\\n }\\n\\n wp_enqueue_script($handle);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75f688ea1d3423aa12facebc29564d3e\",\n \"score\": \"0.791233\",\n \"text\": \"private function enqueue_scripts()\\n\\t{\\n\\t\\twp_enqueue_script('oometaboxdemo');\\n\\t\\twp_enqueue_style('thickbox');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e130d742b1cea54ff3fce889b2bac4b\",\n \"score\": \"0.79078156\",\n \"text\": \"public function enqueue_scripts() {\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd587159a3a84918aeea09074b6d7956\",\n \"score\": \"0.79021466\",\n \"text\": \"public function enqueue_scripts() {\\n\\t\\twp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/frontend' . $this->script_suffix . '.js', array( 'jquery' ), $this->_version, true );\\n\\t\\twp_enqueue_script( $this->_token . '-frontend' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98e2e921dac334e88b3432b7bb249e6e\",\n \"score\": \"0.788805\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Ap_Ss_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Ap_Ss_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\t// wp_enqueue_script( $this->ap_ss, plugin_dir_url( __FILE__ ) . 'js/ap-ss-public.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8da6a740f346d9c61eabe0183f94144\",\n \"score\": \"0.78803426\",\n \"text\": \"public function enqueue_scripts() {\\n\\n if ( ! current_user_can( 'administrator' ) && ! current_user_can( 'bbp_moderator' ) ) {\\n return;\\n }\\n\\n /**\\n * All styles goes here\\n */\\n wp_enqueue_style( 'bbpab-styles', plugins_url( 'assets/css/style.css', __FILE__ ), false, date( 'Ymd' ) );\\n\\n /**\\n * All scripts goes here\\n */\\n wp_enqueue_script( 'heartbeat' );\\n wp_enqueue_script( 'tinygrowl', plugins_url( 'assets/js/tinygrowl.min.js', __FILE__ ), array( 'jquery' ), false, true );\\n wp_enqueue_script( 'bbpab-scripts', plugins_url( 'assets/js/script.js', __FILE__ ), array( 'jquery' ), false, true );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74f44b0c118deba7063266c9a8560ab9\",\n \"score\": \"0.78757846\",\n \"text\": \"public function enqueue_styles_scripts() {\\t\\n\\t\\twp_enqueue_style( AIOVG_PLUGIN_SLUG . '-public' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e4000ed3dcd2623d72a98384035102f\",\n \"score\": \"0.785924\",\n \"text\": \"public function enqueue_scripts() {\\n\\n $main_script = '/skin/public/scripts/applicationAdmin.js';\\n wp_register_script( $this->theme_name . '-scripts', get_template_directory_uri() . $main_script, array(), $this->general_helper->get_assets_version( $main_script ) );\\n wp_enqueue_script( $this->theme_name . '-scripts' );\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e4000ed3dcd2623d72a98384035102f\",\n \"score\": \"0.785924\",\n \"text\": \"public function enqueue_scripts() {\\n\\n $main_script = '/skin/public/scripts/applicationAdmin.js';\\n wp_register_script( $this->theme_name . '-scripts', get_template_directory_uri() . $main_script, array(), $this->general_helper->get_assets_version( $main_script ) );\\n wp_enqueue_script( $this->theme_name . '-scripts' );\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8da02442fef3704ab1a46169f4f2cf8d\",\n \"score\": \"0.7840732\",\n \"text\": \"protected function enqueue_scripts()\\n {\\n Control::enqueue_scripts('switch');\\n wp_enqueue_style('tify_control-admin_panel');\\n wp_enqueue_script('tify_control-admin_panel');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f52ccff3cf236279df2e841be37a719\",\n \"score\": \"0.78395295\",\n \"text\": \"private function register_scripts_and_styles()\\n\\t\\t\\t{\\n\\n\\t\\t\\t\\tif( is_admin() )\\n\\t\\t\\t\\t{\\n\\n\\t\\t \\t\\t//$this->load_file('friendly_widgets_admin_js', '/themes/'.THEMENAME.'/admin/js/widgets.js', true);\\n\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{ \\n\\n\\t\\t \\t\\t//$this->load_file('friendly_widgets', '/themes/'.THEMENAME.'/theme_assets/js/widgets.js', true);\\n\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e98877ceca380ba2664aab05885502e0\",\n \"score\": \"0.7832718\",\n \"text\": \"public function enqueue_scripts() {\\n\\t\\t// wp_enqueue_style( 'simple-shots', plugins_url( 'assets/css/simple-shots.css', __FILE__ ) );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8783ba0ec4c38f2ce0e39289f402da23\",\n \"score\": \"0.78209096\",\n \"text\": \"public static function register_styles_and_scripts() {\\n add_action( 'wp_enqueue_scripts', function() {\\n // Remove jQuery dependency if unnecessary\\n wp_register_script( 'ammonite-remove-local-pickup-for-subscriptions-script', plugins_url('assets/js/ammonite-remove-local-pickup-for-subscriptions.js', __FILE__ ), array('jquery'), '1.0.0', true );\\n } );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ae48830673c89fd33c0469e40f73e5d\",\n \"score\": \"0.7812586\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Innovia_vcextend_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Innovia_vcextend_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/innovia_vcextend-public.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbc0f1af57cc4950645f144c2e6a83b2\",\n \"score\": \"0.78103936\",\n \"text\": \"public function callback_enqueue_scripts() {\\n\\t\\t\\twp_enqueue_script( 'eoajax', WPEO_TASKMANAGER_ASSET_URL . '/js/eoajax.js', array( \\\"jquery\\\" ), WPEO_TASKMANAGER_VERSION );\\n\\t\\t\\twp_enqueue_script( 'wpeo-task-frontend-js', WPEO_TASKMANAGER_ASSET_URL . '/js/frontend.js', array( \\\"jquery\\\", \\\"jquery-form\\\", \\\"jquery-ui-datepicker\\\" ), WPEO_TASKMANAGER_VERSION );\\n\\n\\t\\t\\twp_register_style( 'wpeo-task-frontend-css', WPEO_TASKMANAGER_ASSET_URL . '/css/frontend.css', '', WPEO_TASKMANAGER_VERSION );\\n\\t\\t\\twp_enqueue_style( 'wpeo-task-frontend-css' );\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd59af73dcc19e3f9e8e0914e52d222d\",\n \"score\": \"0.7801995\",\n \"text\": \"public function load_scripts_styles()\\n\\t{\\n\\t\\twp_enqueue_style('csads-public-style', plugins_url('/assets/css/csads-public.css', plugin_dir_path(__FILE__)));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ea827434527bf4326448f7ac15a83f0\",\n \"score\": \"0.780079\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Plugin_Name_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Plugin_Name_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/hector_align-admin.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca52ae3c5dff189c747444645df67e3a\",\n \"score\": \"0.78002346\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Plugin_Name_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Plugin_Name_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/vamwp-public.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a48296e45018375cf3384301d8af1d25\",\n \"score\": \"0.77998465\",\n \"text\": \"public function enqueueScripts()\\n\\t{\\n\\t\\t//wp_enqueue_script( $this->name, plugin_dir_url( __FILE__ ) . 'js/vrbm-admin.js', array( 'jquery' ), $this->version, TRUE );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d889fcc8daba58ba151250185d42fdc\",\n \"score\": \"0.7796314\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Hz_Api_Feed_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Hz_Api_Feed_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\t\\twp_enqueue_script( $this->plugin_name.'-angular', plugin_dir_url( __FILE__ ) . 'js/angular.min.js', array( ), $this->version, false );\\n\\t\\t\\n\\t\\t\\n\\t\\t//wp_enqueue_script( 'hz-ajax-script' );\\n\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/app.js', array( 'jquery' ), $this->version, false );\\n\\t\\twp_localize_script( $this->plugin_name, 'hz_feed', array( 'ajax_url' => get_site_url(null, 'wp-json/hz-feed/v1/') ) );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8434c8eddd0d5ddd015631219c659f27\",\n \"score\": \"0.779228\",\n \"text\": \"public function enqueue_scripts()\\n\\t{\\n\\t\\twp_enqueue_style( 'dashicons' );\\n\\t\\twp_register_style('jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css');\\n \\t\\twp_enqueue_style( 'jquery-ui' ); \\n\\t\\twp_enqueue_style( 'bs-main', BS_ASSETS_URL.'css/main.css', array(), '1.0' );\\n\\t \\n\\t \\n\\t\\twp_enqueue_script( 'jquery-ui-slider', array( 'jquery' ) );\\n\\t\\twp_enqueue_script( 'bs-main', BS_ASSETS_URL.'js/main.js', array( 'jquery', 'jquery-ui-slider' ), '1.0', true );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b1538f8a46ded5e263247438a5c0fda\",\n \"score\": \"0.7790718\",\n \"text\": \"public function enqueueScripts(){\\n wp_enqueue_script( 'jquery' );\\n \\twp_enqueue_style(\\n 'obay-sidebar-menu',\\n plugin_dir_url( __FILE__ ) . 'css/style.css',\\n array(),\\n '',\\n FALSE\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"751df488cc301b8f60b90309975c1acb\",\n \"score\": \"0.7790293\",\n \"text\": \"public function scripts()\\n\\t{\\n\\t\\twp_enqueue_script('msc-widget-script', $this->getScriptUrl(), ['jquery'], '', true);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"159cc3ffd8213a83f685a1f584cfbc25\",\n \"score\": \"0.77883315\",\n \"text\": \"static public function enqueue_scripts()\\n {\\n wp_enqueue_style( 'fl-child-theme', FL_CHILD_THEME_URL . '/style.css' );\\n wp_enqueue_style( 'bb-child-theme-dexlue-styles', FL_CHILD_THEME_URL . '/scss/dist/deluxe-styles.css', array(), time() );\\n\\n wp_enqueue_script( 'bb-child-theme-dexlue-scripts', FL_CHILD_THEME_URL . '/js/scripts.js', array(), time() );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca83ff6840362aceadd4a0429f8a997f\",\n \"score\": \"0.77878636\",\n \"text\": \"function starkers_script_enqueuer() {\\n\\t\\twp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );\\n\\t\\twp_enqueue_script( 'site' );\\n\\n\\t\\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\\n wp_enqueue_style( 'screen' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"885b26ed72396989f66a931156e9ecb5\",\n \"score\": \"0.77774084\",\n \"text\": \"public function assets()\\n {\\n $url = File::getResourceUri();\\n wp_enqueue_script('lbwp-flyout-js', $url . '/js/components/lbwp-flyout.js', array('jquery'), LbwpCore::REVISION, true);\\n wp_enqueue_script('jquery-cookie');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39758519da9751d3cdc42bb521a1a0d4\",\n \"score\": \"0.77756125\",\n \"text\": \"public function register_assets() {\\n\\n $scripts = $this->get_scripts();\\n $styles = $this->get_styles();\\n\\n foreach ( $scripts as $handle => $script ) {\\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\\n\\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\\n }\\n\\n foreach ( $styles as $handle => $style ) {\\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\\n\\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\\n }\\n\\n $this->execute_style();\\n \\n\\n wp_localize_script( 'sl-script', 'sl', [\\n 'ajax_url' => admin_url( 'admin-ajax.php' ),\\n 'error' => __( 'Error: Something went wrong', 'shibbir-listing' ),\\n 'homepage' => home_url( '/' ),\\n ] );\\n\\n // wp_localize_script( 'academy-admin-script', 'weDevsAcademy', [\\n // 'nonce' => wp_create_nonce( 'wd-ac-admin-nonce' ),\\n // 'confirm' => __( 'Are you sure?', 'wedevs-academy' ),\\n // 'error' => __( 'Something went wrong', 'wedevs-academy' ),\\n // ] );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"071187adf3459fb57b2a167e011e6cb2\",\n \"score\": \"0.7765642\",\n \"text\": \"function starkers_script_enqueuer() {\\n\\t\\twp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );\\n\\t\\twp_enqueue_script( 'site' );\\n\\n\\t\\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\\n\\t\\twp_enqueue_style( 'screen' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9ad093e406bd739facf17b0694f89ac\",\n \"score\": \"0.77644336\",\n \"text\": \"public function enqueue_scripts() {\\n\\n wp_register_script( 'panzi-jquery-cookies', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/jquery.cookies.js', array('jquery'), $this->version, true );\\n wp_register_script( 'wp-cupcake-bridge-social-share-privacy', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/socialshareprivacy.js', array('jquery', 'panzi-jquery-cookies'), $this->version, true );\\n wp_register_script( 'wp-cupcake-bridge-service', plugin_dir_url( __FILE__ ) . '/js/socialshareprivacy.cupcakebridge/javascripts/modules/cupcakebridge.js', array('jquery', 'panzi-jquery-cookies'), $this->version, true );\\n wp_register_script( 'wp-cupcake-bridge', plugin_dir_url( __FILE__ ) .'/js/wp-cupcake-bridge-public.js' , array('jquery'), $this->version, true );\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0df84edbe0ca6ce39b48a2267e76c98\",\n \"score\": \"0.7754466\",\n \"text\": \"function marchos_scripts_enqueue () {\\n wp_enqueue_style('bootstrap', get_template_directory_uri() . './css/bootstrap.min.css', array(), '5.0.2', 'all');\\n wp_enqueue_style('my-custom', get_template_directory_uri() . './css/my-custom-style.css', array(), '1.0.0', 'all');\\n // ==== add jquery in footer\\n wp_dequeue_script('jquery');\\n wp_dequeue_script('jquery-core');\\n wp_dequeue_script('jquery-migrate');\\n wp_enqueue_script('jquery', false, array(), false, true);\\n wp_enqueue_script('jquery-core', false, array(), false, true);\\n wp_enqueue_script('jquery-migrate', false, array(), false, true);\\n // ==== add custom-js\\n wp_enqueue_script('boostrapjs', get_template_directory_uri() . './js/bootstrap.min.js', array(), '1.0.0', true);\\n wp_enqueue_script('customjs', get_template_directory_uri() . './js/my-scripts.js', array(), '1.0.0', true);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2081e27a5b45521bce6b773b4a6d4da2\",\n \"score\": \"0.7752172\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Urich_Tourbook_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Urich_Tourbook_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/urich-tourbook-admin.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"da9cf9fc3d6c1f37d945fcf5a3deb19d\",\n \"score\": \"0.77432144\",\n \"text\": \"public static function scripts(){\\n\\t\\tCaldera_Forms_Render_Assets::register();\\n\\t\\tCaldera_Forms_Render_Assets::enqueue_script( 'handlebars' );\\n\\t\\tCaldera_Forms_Admin_Assets::enqueue_style( 'admin' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b10e005976cc8b26e639ebd52515b19\",\n \"score\": \"0.7742502\",\n \"text\": \"public function enqueue_scripts()\\n {\\n\\n /**\\n * This function is provided for demonstration purposes only.\\n *\\n * An instance of this class should be passed to the run() function\\n * defined in TS_Loader as all of the hooks are defined\\n * in that particular class.\\n *\\n * The TS_Loader will then create the relationship\\n * between the defined hooks and the functions defined in this\\n * class.\\n */\\n wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__) . 'js/ts-public.js', array(\\n 'jquery'\\n ) , $this->version, false);\\n \\n\\t\\t \\n\\t\\twp_enqueue_script($this->plugin_name .'customer-dataTables',PRD_PLUGIN_URL_ADMIN .\\\"assets/js/jquery.dataTables.min.js\\\", array( 'jquery' ) , $this->version, true);\\n\\t\\t \\n\\t \\n wp_enqueue_script($this->plugin_name .'customer-footer', plugin_dir_url(__FILE__) . 'js/customer-frontend.js', array(\\n 'jquery'\\n ) , $this->version, true);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6dedf716014f53b701b53285c1e9361\",\n \"score\": \"0.77385944\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\twp_register_script(\\n\\t\\t\\t'vide',\\n\\t\\t\\tplugins_url('bower_components/vide/dist/jquery.vide.min.js', __FILE__),\\n\\t\\t\\tarray('jquery'),\\n\\t\\t\\t'0.5.1',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\n\\t\\tif ( $this->is_theme_supported() && is_front_page() ) {\\n\\n\\t\\t\\twp_enqueue_script( 'vide' );\\n\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93c4977ae904df5065964f4aff66e4e3\",\n \"score\": \"0.77380687\",\n \"text\": \"public function admin_enqueue_scripts() {\\n\\t\\t\\n\\t\\tglobal $current_screen;\\n\\n\\t\\tif ( $current_screen->base == 'settings_page_toggl-alert' ) {\\n\\n\\t\\t\\twp_enqueue_style( 'wp-color-picker' );\\n\\t\\t\\twp_enqueue_style( 'toggl-alert-admin' );\\n\\t\\t\\t\\n\\t\\t\\t// Dependencies\\n\\t\\t\\twp_enqueue_script( 'jquery-effects-core' );\\n\\t\\t\\twp_enqueue_script( 'jquery-effects-highlight' );\\n\\t\\t\\twp_enqueue_script( 'jquery-ui-sortable' );\\n\\t\\t\\t\\n\\t\\t\\twp_enqueue_script( 'toggl-alert-admin' );\\n\\t\\t\\t\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"691098936f8baaaea42d805a262da6d3\",\n \"score\": \"0.7734865\",\n \"text\": \"public function scripts()\\n {\\n wp_enqueue_script('alpinejs', 'https://unpkg.com/alpinejs@3.5.0/dist/cdn.min.js', [], '', true);\\n\\n wp_register_script('td-main', get_stylesheet_directory_uri() . td_asset_path('js/main.js'), ['jquery', 'alpinejs'], '', true);\\n if (is_single() && comments_open() && get_option('thread_comments')) {\\n wp_enqueue_script('comment-reply');\\n }\\n\\n wp_enqueue_script('td-main');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42f091cddb7fc6f0735f27ac3ad61d71\",\n \"score\": \"0.7723938\",\n \"text\": \"public static function scripts()\\n {\\n add_thickbox();\\n wp_enqueue_script('aat-admin-js', AAT_PLUGIN_URI . 'assets/admin.js', ['jquery'], '0.0.1', true);\\n wp_enqueue_style('aat-admin-styles', AAT_PLUGIN_URI . 'assets/admin.css', [], '0.0.1' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b02a6901efd9e8a59b9932ddf5bce581\",\n \"score\": \"0.77176344\",\n \"text\": \"function enqueue_scripts() {\\r\\n\\t\\twp_enqueue_script('ttools-loader');\\r\\n\\t\\twp_enqueue_style('jquery-select2');\\r\\n\\t\\twp_enqueue_style('ttools');\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94aa70fc499660168ef4d3e5625bf514\",\n \"score\": \"0.77091\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Cr_Featured_Images_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Cr_Featured_Images_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cr-featured-images-admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-slider' ), $this->version, false );\\n\\t\\t//wp_enqueue_script( 'watermark-admin-script', plugins_url( 'js/admin-settings.js', __FILE__ ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-button', 'jquery-ui-slider' ), $this->defaults['version'] );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3fb9fb4a8d32a882edb247cc71801cc\",\n \"score\": \"0.770645\",\n \"text\": \"public function enqueue_scripts()\\n {\\n // Font awesome (icons)\\n wp_register_style('woochimp-font-awesome', WOOCHIMP_PLUGIN_URL . '/assets/css/font-awesome/css/font-awesome.min.css', array(), '4.5.0');\\n\\n // Our own scripts and styles\\n wp_register_script('woochimp', WOOCHIMP_PLUGIN_URL . '/assets/js/woochimp-admin.js', array('jquery'), WOOCHIMP_VERSION);\\n wp_register_style('woochimp', WOOCHIMP_PLUGIN_URL . '/assets/css/style.css', array(), WOOCHIMP_VERSION);\\n\\n // Scripts\\n wp_enqueue_script('media-upload');\\n wp_enqueue_script('thickbox');\\n wp_enqueue_script('jquery');\\n wp_enqueue_script('jquery-ui');\\n wp_enqueue_script('jquery-ui-accordion');\\n wp_enqueue_script('jquery-ui-tooltip');\\n wp_enqueue_script('woochimp');\\n\\n // Styles\\n wp_enqueue_style('thickbox');\\n wp_register_style('jquery-ui', WOOCHIMP_PLUGIN_URL . '/assets/jquery-ui/jquery-ui.min.css', array(), WOOCHIMP_VERSION);\\n wp_enqueue_style('jquery-ui');\\n wp_enqueue_style('woochimp-font-awesome');\\n wp_enqueue_style('woochimp');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78da1e0096e70e1348b3e20f84190440\",\n \"score\": \"0.7702916\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Blogmail_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Blogmail_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script( $this->blogmail, plugin_dir_url( __FILE__ ) . 'js/blogmail-admin.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b517ca5de43ba08d42b7956164374c1\",\n \"score\": \"0.77006507\",\n \"text\": \"public function enqueue_scripts() {\\n\\t\\twp_register_script( 'jrg-primary-category-admin-script', $this->config['base_url'] . '/assets/jrg-primary-category.js', 'JQuery', $this->config['version'], true );\\n\\n\\t\\twp_localize_script( 'jrg-primary-category-admin-script', 'primary_category_data', array(\\n\\t\\t\\t'nonce' => wp_create_nonce( 'save-jrg-primary-category-field' ),\\n\\t\\t\\t'primary_category' => $this->get_current_post_primary_category(),\\n\\t\\t\\t'strings' => $this->get_js_localized_strings(),\\n\\t\\t) );\\n\\n\\t\\twp_enqueue_script( 'jrg-primary-category-admin-script' );\\n\\n\\t\\twp_register_style( 'jrg-primary-category-admin-style', $this->config['base_url'] . '/assets/jrg-primary-category.css', array(), $this->config['version'] );\\n\\t\\twp_enqueue_style( 'jrg-primary-category-admin-style' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b87f182d45fa67b20f77039c5a90163\",\n \"score\": \"0.7699448\",\n \"text\": \"protected function enqueue_scripts()\\n {\\n @ wp_enqueue_media();\\n \\\\wp_enqueue_style('tify_control-media_image');\\n \\\\wp_enqueue_script('tify_control-media_image');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b71ca6d7b637616e57c0cbcb4925b987\",\n \"score\": \"0.76979876\",\n \"text\": \"public function enqueue_scripts() {\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/cncf-mu-public.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2aaf045a6e02379d3b9f0446af74084\",\n \"score\": \"0.76951987\",\n \"text\": \"public function enqueue() {\\n\\n\\t\\twp_register_script( 'themeisle-site-lib', Themeisle_Onboarding::get_dir() . '/assets/js/bundle.js', array(), Themeisle_Onboarding::VERSION, true );\\n\\n\\t\\twp_localize_script( 'themeisle-site-lib', 'themeisleSitesLibApi', $this->localize_sites_library() );\\n\\n\\t\\twp_enqueue_script( 'themeisle-site-lib' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d48b62f6b628becebf8ee392c40c342\",\n \"score\": \"0.7690472\",\n \"text\": \"function theme_scripts() {\\n\\n\\t// Load our main stylesheet.\\n\\twp_enqueue_style( 'Composer-style', get_stylesheet_uri() );\\n\\n\\t// Load theme js\\n\\twp_enqueue_script( 'Composer-script', get_template_directory_uri() . '/js/composer.js', array( 'jquery' ), false, true );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccf6b816674d939cf02b70b0f8fe91a6\",\n \"score\": \"0.7684717\",\n \"text\": \"final public static function enqueue_scripts()\\n {\\n \\\\wp_enqueue_style('tiFySet_CookieLaw');\\n Control::enqueue_scripts('cookie_notice');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a00c67429bcc551053ad08dff6138946\",\n \"score\": \"0.76845634\",\n \"text\": \"public function enqueue_scripts()\\n {\\n wp_enqueue_style( 'rf-admin', RFFramework()->url() . '/assets/css/admin.css' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa0cf7460d1f683a0aa406f0c4b7f484\",\n \"score\": \"0.76811177\",\n \"text\": \"public function add_scripts() {\\r\\n \\r\\n wp_register_style( 'zip-folder-default', plugins_url( '/css/default.css', __FILE__ ) );\\r\\n\\t wp_enqueue_style( 'zip-folder-default' );\\r\\n wp_register_style( 'zip-folder-css', plugins_url( '/css/zip-folder.css', __FILE__ ) );\\r\\n\\t wp_enqueue_style( 'zip-folder-css' );\\r\\n\\r\\n wp_register_script( 'php_file_tree_jquery', plugins_url( '/js/php_file_tree_jquery.js', __FILE__ ), true );\\r\\n wp_enqueue_script( 'php_file_tree_jquery' );\\r\\n wp_localize_script('php_file_tree_jquery', 'Ajax', array(\\r\\n\\t\\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\\r\\n\\t));\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1812541193dc42e114f4f4ce3a3bde97\",\n \"score\": \"0.76707155\",\n \"text\": \"public function adminEnqueueScripts()\\n {\\n wp_register_script('wp-color-picker-settings', plugins_url('assets/js/wp-color-picker.js', plugin_basename($this->pluginFile)));\\n wp_register_script('wp-media-settings', plugins_url('assets/js/wp-media.js', plugin_basename($this->pluginFile)));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"291edef720c395b51dc6a8dc9b0fe40d\",\n \"score\": \"0.7665317\",\n \"text\": \"public function enqueue_admin_scripts() {\\n\\n\\t\\t$screen = get_current_screen();\\n\\n\\t\\t// Only load js for our example page\\n\\t\\tif ( $screen->id != $this->hook )\\n\\t\\t\\treturn;\\n\\n\\t\\t// Load our custom postlistr-app.js and require backbone\\n\\t\\twp_enqueue_script( $this->hook . '-app-script', plugins_url( 'js/postlistr-app.js', __FILE__ ), array( 'wp-backbone' ), $this->version, true );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"892a2d66baa2c8d4439be9e03004d26c\",\n \"score\": \"0.76630956\",\n \"text\": \"public static function enqueue() {\\n\\t\\t$template_mode = WPRM_Settings::get( 'recipe_template_mode' );\\n\\n\\t\\twp_register_style( 'wprm-public', WPRM_URL . 'dist/public-' . $template_mode . '.css', array(), WPRM_VERSION, 'all' );\\n\\n\\t\\t// Only include scripts when not AMP page.\\n\\t\\tif ( ! function_exists( 'is_amp_endpoint' ) || ! is_amp_endpoint() ) {\\n\\t\\t\\twp_register_script( 'wprm-public', WPRM_URL . 'dist/public-' . $template_mode . '.js', array( 'jquery' ), WPRM_VERSION, true );\\n\\t\\t\\twp_localize_script( 'wprm-public', 'wprm_public', self::localize_public() );\\n\\t\\t}\\n\\t\\t\\n\\t\\tif ( false === WPRM_Settings::get( 'only_load_assets_when_needed' ) ) {\\n\\t\\t\\tself::load();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fab53598ab1137ffc2c757479c29488\",\n \"score\": \"0.7661002\",\n \"text\": \"function theme_scripts() {\\n\\t// Theme stylesheet.\\n\\twp_enqueue_style( 'style', get_stylesheet_uri() );\\n\\n\\t// Add main stylesheet\\n\\twp_enqueue_style( 'main.min', get_template_directory_uri() . '/dist/css/main.min.css', array(), '0.1.0' );\\n\\n\\twp_enqueue_script( 'vendors.min', get_template_directory_uri() . '/dist/js/vendors.min.js', array(), '20170816', true );\\n\\twp_enqueue_script( 'main.min', get_template_directory_uri() . '/dist/js/main.min.js', array('jquery'), '20170816', true );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c09b3f2097edb743bb0f4676c6cccc0\",\n \"score\": \"0.76607937\",\n \"text\": \"function nr_load_scripts() {\\n\\n wp_dequeue_style('wp-block-library');\\n wp_dequeue_style('wp-block-library-theme');\\n\\n\\twp_enqueue_style('main', NR_THEME_URL.'/app.css', false, NR_VERSION);\\n\\twp_enqueue_style('fonts', 'https://fast.fonts.net/t/1.css?apiType=css&projectid=e0897766-a751-4fd7-89ea-7081fe24868a', false,null);\\n\\n\\twp_deregister_script('jquery');\\n\\twp_deregister_script('wp-embed');\\n\\n\\twp_register_script('jquery', NR_THEME_URL.'/js/jquery-3.3.1.min.js',null,null,true); \\n\\twp_enqueue_script('jquery');\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\twp_register_script('plugins', NR_THEME_URL.'/js/plugins.js','jquery',NR_VERSION,true); \\n\\twp_enqueue_script('plugins');\\t\\n\\t\\n\\twp_register_script('site', NR_THEME_URL.'/js/site.js',array('jquery','plugins'),NR_VERSION,true); \\n\\twp_enqueue_script('site');\\n\\t\\t\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c5bf92b58c402faac58f5243fb6e875\",\n \"score\": \"0.7660158\",\n \"text\": \"public function scripts() {\\n\\t\\t\\tif (!$this->run()) {\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t\\t// wp_enqueue_script\\n\\t\\t\\t$handle \\t= 'acf-bs4-page-builder';\\n\\t\\t\\t$src \\t= plugin_dir_url(__FILE__).'js/admin.js';\\n\\t\\t\\t$deps \\t= array('acf-input');\\n\\t\\t\\t$ver \\t= $this->version;\\n\\t\\t\\t$in_footer \\t= false;\\n\\t\\t\\twp_register_script($handle, $src, $deps, $ver, $in_footer);\\n\\t\\t\\t$object = 'acf_page_builder_vars';\\n\\t\\t\\t$data = array();\\n\\t\\t\\twp_localize_script($handle, $object, $data);\\n\\t\\t\\twp_enqueue_script($handle);\\n\\t\\t\\t\\n\\t\\t\\t$handle = 'acf-bs4-page-builder';\\n\\t\\t\\t$src \\t= plugin_dir_url(__FILE__).'css/admin.css';\\n\\t\\t\\t$deps \\t= array('acf-input');\\n\\t\\t\\t$ver \\t= $this->version;\\n\\t\\t\\twp_enqueue_style($handle, $src, $deps, $ver);\\n\\t\\t\\t\\n\\t\\t\\twp_enqueue_script('jquery-ui-tooltip');\\n\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"309493192c137a4466cda5fac548b800\",\n \"score\": \"0.7656778\",\n \"text\": \"function _add_scripts() {\\n\\t\\t\\tif (is_admin()) return;\\n\\t\\t\\twp_enqueue_script('modernizr', get_stylesheet_directory_uri() .'/bower_components/modernizer/modernizr.js', array(), '2.8.2');\\n\\t\\t\\twp_enqueue_script('theme.app', get_stylesheet_directory_uri() .'/js/min/app.min.js', array('jquery','modernizr'), '0.1.0', true);\\n\\t\\t\\twp_localize_script('theme.app', 'theme', $this->_add_js_vars()); // Call _add_js_vars() to add PHP variables to frontend\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fcd662166b2cee451102d3e7c2a11e7\",\n \"score\": \"0.7654341\",\n \"text\": \"public function enqueue_scripts()\\n\\t\\t{\\n\\t\\t\\tif (!is_admin()) return;\\n\\t\\t\\t\\n\\t\\t\\twp_enqueue_editor(array( 'type' => 'text/html' ));\\n\\t\\t\\twp_enqueue_style( 'repeatable-fields-css', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/css/repeatable-fields.css', array(), microtime() );\\n\\t\\t\\t\\n\\t\\t\\t// tinymce\\n\\t\\t\\twp_enqueue_style( 'editor-css', includes_url('css/') . 'editor.css', array(), microtime() );\\n\\t\\t\\t// init repeatable fields js\\n\\t\\t\\twp_enqueue_script( 'repeatable-fields-js', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/js/repeatable-fields.js' , array('jquery'), microtime(), true );\\n\\t\\t\\twp_enqueue_script( 'init-js', Config::core_dir_uri() . 'libraries/CMB2-repeatable-fields/js/init.js' , array('jquery'), microtime(), true );\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"daae675f0351d6c76359d6d8d6b2a977\",\n \"score\": \"0.76509994\",\n \"text\": \"function pb_scripts(){\\n $version = '0.0.0';\\n wp_enqueue_style('pb-estilo', get_stylesheet_directory_uri() . '/css/estilo.css', array(), $version );\\n wp_enqueue_script('pb-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'), $version );\\n wp_enqueue_script('jquery');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d814d15647a92604b32b4954b16cd195\",\n \"score\": \"0.7641438\",\n \"text\": \"public function enqueue_scripts()\\n {\\n /*\\n * This function is provided for demonstration purposes only.\\n *\\n * An instance of this class should be passed to the run() function\\n * defined in Mtii_Utilities_Loader as all of the hooks are defined\\n * in that particular class.\\n *\\n * The Mtii_Utilities_Loader will then create the relationship\\n * between the defined hooks and the functions defined in this\\n * class.\\n */\\n wp_enqueue_script(\\n $this->_plugin_name.'-admin-main-script',\\n plugin_dir_url(__FILE__) . 'js/mtii-utilities-admin-script.js',\\n array('jquery'),\\n 2900, false\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e7402e29f09b927cfbe03a1887df931\",\n \"score\": \"0.7628326\",\n \"text\": \"public function enqueue_scripts()\\n\\t{\\n\\t\\twp_enqueue_style('my-script', plugins_url('/css/admin.css', __FILE__));\\n\\t\\twp_enqueue_script('my-script', plugins_url('/js/kayako.js', __FILE__), array('jquery'));\\n\\t\\twp_localize_script('my-script', 'myAjax', array('ajaxurl' => admin_url('admin-ajax.php')));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c50c6e3c0efa03b48c6039ba51de2eb\",\n \"score\": \"0.7624521\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Altlab_Postgrid_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Altlab_Postgrid_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/altlab-postgrid-public.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fded8725cd78c2b79a2cc1d5cf9a28a8\",\n \"score\": \"0.7618597\",\n \"text\": \"public function wp_enqueue_scripts() {\\n wp_enqueue_style( 'manhphucpro-main', $this->child_base_url . '/assets/dist/css/main.css', [], $this->version, 'all' );\\n\\n wp_enqueue_script( 'jquery' );\\n wp_enqueue_script( 'manhphucpro-main', $this->child_base_url . '/assets/dist/js/main.js', [ 'jquery' ], $this->version, true );\\n\\n if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\\n wp_enqueue_script( 'comment-reply' );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"562b885e10332c9968f69645ac6bc677\",\n \"score\": \"0.7614298\",\n \"text\": \"public function enqueue_scripts()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbd35993feb8acfcacc4933618d35957\",\n \"score\": \"0.76086724\",\n \"text\": \"public function wp_enqueue_scripts()\\n {\\n if(self::tFyAppConfig('enqueue_scripts', true)) :\\n self::enqueue_scripts();\\n endif;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29460a705ee4d2d597b734c8c98ef8db\",\n \"score\": \"0.76075226\",\n \"text\": \"function load_scripts() { \\n\\t\\t\\t\\twp_enqueue_style(\\\"font-awesome\\\", \\\"//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css\\\");\\n\\t\\t\\t\\twp_enqueue_style(\\\"nabla-widget-styles\\\", NABLA_WIDGETS_CSS_URL.\\\"nabla-styles.css\\\");\\n\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ded4504fa99064d255878834b049aa1\",\n \"score\": \"0.76050353\",\n \"text\": \"function berry_scripts() {\\n wp_dequeue_style( 'seed-style');\\n wp_enqueue_style('b-style', get_stylesheet_uri());\\n\\n if($GLOBALS['s_jquery'] == 'enable') {\\n $need_jquery = true;\\n } else {\\n $need_jquery = false;\\n }\\n\\twp_enqueue_script( 'berry-js', get_stylesheet_directory_uri() . '/js/main.js', array(), filemtime( get_stylesheet_directory() . '/js/main.js' ), $need_jquery );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"123c97b0d511eed87f1f48dbb3e4a0f1\",\n \"score\": \"0.7604805\",\n \"text\": \"public function enqueue() {\\n\\t\\t$token = $this->token;\\n\\t\\t$url = $this->url;\\n\\n\\t\\twp_enqueue_style( $token . '-css', $url . '/assets/front-end.css' );\\n\\t\\twp_enqueue_style( $token . '-animate', $url . '/assets/animate.css' );\\n\\t\\twp_enqueue_script( $token . '-js', $url . '/assets/front-end.js', array( 'jquery' ) );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"311d487d60904478cd65f66cea6a1410\",\n \"score\": \"0.7601658\",\n \"text\": \"function initialize_enqueue_scripts() {\\n\\t\\t$dependencies = array_merge(array('jquery'), $this->theme_opt['js_deps']);\\n\\t\\twp_enqueue_style($this->theme_opt['theme_name_lc'], get_template_directory_uri().'/style.css');\\n\\t\\twp_enqueue_script($this->theme_opt['theme_name_lc'], get_template_directory_uri() .'/js/'.$this->theme_opt['theme_name_lc'].'.js', $dependencies);\\n\\t\\tif(!!$this->theme_opt['override_stylesheet']) {\\n\\t\\t\\twp_add_inline_style($this->theme_opt['theme_name_lc'], $this->theme_opt['override_stylesheet']);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1f8faed20980ef6e824f7c7c21992b9\",\n \"score\": \"0.7600171\",\n \"text\": \"public function enqueue_frontend_scripts() {\\n wp_enqueue_script( \\\"{$this->plugin_name}-script\\\" );\\n wp_enqueue_style( \\\"{$this->plugin_name}-style\\\" );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f15c08032a5519802b63768ed5d2d37\",\n \"score\": \"0.76000535\",\n \"text\": \"function hwdsb_tv_enqueue_scripts() {\\n\\t// Enqueue parent style.\\n\\twp_enqueue_style( 'gazette-parent-style', get_template_directory_uri() . '/style.css' );\\n\\n\\t// Enqueue our stylesheet so we can bust CSS cache.\\n\\twp_enqueue_style( 'tvhwdsb', get_stylesheet_uri(), array(), '20180227' );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b106ff6a198551bc274c5652ad68f4e\",\n \"score\": \"0.75908315\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t\\twp_register_script( 'timepicker-scripts', plugin_dir_url( __FILE__ ) . 'assets/js/jquery-ui-timepicker-addon.min.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-slider', 'jquery-ui-datepicker' ) );\\n\\n \\t\\t wp_register_script( 'scheduler-scripts', plugin_dir_url( __FILE__ ) . 'assets/js/scheduler.js', array( 'timepicker-scripts' ) );\\n \\t\\twp_enqueue_script( 'scheduler-scripts' );\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90e9acc5218efa4d526bfafa6f13ff4f\",\n \"score\": \"0.7588261\",\n \"text\": \"public function theme_scripts() {\\n\\t\\t/* wp_enqueue_script(\\n\\t\\t\\t'flexdatalist',\\n\\t\\t\\t'https://cdnjs.cloudflare.com/ajax/libs/jquery-flexdatalist/2.2.4/jquery.flexdatalist.min.js',\\n\\t\\t\\t[ 'jquery' ],\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t); */\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'owl-carousel',\\n\\t\\t\\tTHEME_URL . '/assets/owl-carousel/owl.carousel.min.js',\\n\\t\\t\\t[ 'jquery' ],\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'handlebars',\\n\\t\\t\\tTHEME_URL . '/assets/js/handlebars.js',\\n\\t\\t\\t[],\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'jquery-ui',\\n\\t\\t\\tTHEME_URL . '/assets/js/jquery-ui.js',\\n\\t\\t\\t[ 'jquery' ],\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\t\\twp_enqueue_script(\\n 'simplebar',\\n 'https://cdn.jsdelivr.net/npm/simplebar@4.1.0/dist/simplebar.min.js',\\n [],\\n 'auto',\\n true\\n );\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'mcustomscrollbar',\\n\\t\\t\\tTHEME_URL . '/assets/js/jquery.mCustomScrollbar.js',\\n\\t\\t\\t[ 'jquery' ],\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'navigo',\\n\\t\\t\\tTHEME_URL . '/assets/js/navigo.min.js',\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'submit-feedback',\\n\\t\\t\\tTHEME_URL . '/assets/js/submit-feedback.js',\\n\\t\\t\\t[ 'jquery' ],\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'submit-contact',\\n\\t\\t\\tTHEME_URL . '/assets/js/submit-contact.js',\\n\\t\\t\\t[ 'jquery' ],\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\t\\t// phpcs:ignore -- load in header, after jQuery.\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'tracking',\\n\\t\\t\\tTHEME_URL . '/assets/js/tracking.js',\\n\\t\\t\\t[ 'jquery' ],\\n\\t\\t\\t'auto'\\n\\t\\t);\\n\\t\\twp_enqueue_script(\\n\\t\\t\\t'theme',\\n\\t\\t\\tTHEME_URL . '/assets/js/theme.js',\\n\\t\\t\\t[ 'jquery', 'mediaelement', 'submit-feedback' ],\\n\\t\\t\\t'auto',\\n\\t\\t\\ttrue\\n\\t\\t);\\n\\t\\t/* wp_enqueue_script(\\n\\t\\t\\t'search',\\n\\t\\t\\tTHEME_URL . '/assets/js/search.js',\\n\\t\\t\\t[ 'flexdatalist' ],\\n\\t\\t\\t'1.0.0',\\n\\t\\t\\ttrue\\n\\t\\t); */\\n\\t\\t$error_messages = [\\n\\t\\t\\t'required' => __( 'This field is required. Please be sure to check.', 'asvz' ),\\n\\t\\t\\t'email' => __( 'Your E-mail address appears to be invalid. Please be sure to check.', 'asvz' ),\\n\\t\\t\\t'number' => __( 'You can enter only numbers in this field.', 'asvz' ),\\n\\t\\t\\t'maxLength' => __( 'Maximum {count} characters allowed!', 'asvz' ),\\n\\t\\t\\t'minLength' => __( 'Minimum {count} characters allowed!', 'asvz' ),\\n\\t\\t\\t'maxChecked' => __( 'Maximum {count} options allowed. Please be sure to check.', 'asvz' ),\\n\\t\\t\\t'minChecked' => __( 'Please select minimum {count} options.', 'asvz' ),\\n\\t\\t\\t'maxSelected' => __( 'Maximum {count} selection allowed. Please be sure to check.', 'asvz' ),\\n\\t\\t\\t'minSelected' => __( 'Minimum {count} selection allowed. Please be sure to check.', 'asvz' ),\\n\\t\\t\\t'notEqual' => __( 'Fields do not match. Please be sure to check.', 'asvz' ),\\n\\t\\t\\t'different' => __( 'Fields cannot be the same as each other', 'asvz' ),\\n\\t\\t\\t'creditCard' => __( 'Invalid credit card number. Please be sure to check.', 'asvz' ),\\n\\t\\t];\\n\\n\\t\\t/* $menu_items = [\\n\\t\\t\\t'categories' => [\\n\\t\\t\\t\\t'text' => get_field( 'menu__categories__text', 'option' ),\\n\\t\\t\\t\\t'icon' => get_field( 'menu__categories__icon', 'option' ),\\n\\t\\t\\t],\\n\\t\\t\\t'materials' => [\\n\\t\\t\\t\\t'text' => get_field( 'menu__materials__text', 'option' ),\\n\\t\\t\\t\\t'icon' => get_field( 'menu__materials__icon', 'option' ),\\n\\t\\t\\t],\\n\\t\\t\\t'tips' => [\\n\\t\\t\\t\\t'text' => get_field( 'menu__tips__text', 'option' ),\\n\\t\\t\\t\\t'icon' => get_field( 'menu__tips__icon', 'option' ),\\n\\t\\t\\t],\\n\\t\\t\\t'faq' => [\\n\\t\\t\\t\\t'text' => get_field( 'menu__faq__text', 'option' ),\\n\\t\\t\\t\\t'icon' => get_field( 'menu__faq__icon', 'option' ),\\n\\t\\t\\t],\\n\\t\\t\\t'contact' => [\\n\\t\\t\\t\\t'text' => get_field( 'menu__contact__text', 'option' ),\\n\\t\\t\\t\\t'icon' => get_field( 'menu__contact__icon', 'option' ),\\n\\t\\t\\t],\\n\\t\\t]; */\\n\\n\\t\\t/* $type_icons = [\\n\\t\\t\\t'category' => get_field( 'type_icon__category', 'option' ),\\n\\t\\t\\t'task' => get_field( 'type_icon__task', 'option' ),\\n\\t\\t\\t'step' => get_field( 'type_icon__step', 'option' ),\\n\\t\\t\\t'material' => get_field( 'type_icon__material', 'option' ),\\n\\t\\t\\t'faq' => get_field( 'type_icon__faq', 'option' ),\\n\\t\\t]; */\\n\\n\\t\\t/* foreach ( $type_icons as $key => $value ) {\\n\\t\\t\\tif ( $type_icons[ $key ] ) {\\n\\t\\t\\t\\t$type_icons[ $key ] = $type_icons[ $key ]['sizes']['thumbnail'];\\n\\t\\t\\t}\\n\\t\\t} */\\n\\n\\t\\t$asvz_objects = [\\n\\t\\t\\t'themeUrl' => THEME_URL,\\n\\t\\t\\t/*'ajaxUrl' => admin_url( 'admin-ajax.php' ),\\n\\t\\t\\t'nonces' => [\\n\\t\\t\\t\\t'submit_feedback' => wp_create_nonce( 'ASVZ_Submit_Feedback' ),\\n\\t\\t\\t\\t'submit_contact' => wp_create_nonce( 'ASVZ_Submit_Contact' ),\\n\\t\\t\\t],\\n\\t\\t\\t'categories' => Category::all(),\\n\\t\\t\\t'materials' => Material::all(),\\n\\t\\t\\t'tasks' => Task::all(),\\n\\t\\t\\t'steps' => Step::all(),\\n\\t\\t\\t'faqs' => Faq::all(),\\n\\t\\t\\t'pages' => [\\n\\t\\t\\t\\t'welcome' => [\\n\\t\\t\\t\\t\\t'title' => get_field( 'welcome_page__title', 'option' ),\\n\\t\\t\\t\\t\\t'subtitle' => get_field( 'welcome_page__subtitle', 'option' ),\\n\\t\\t\\t\\t\\t'thumbnail' => get_field( 'welcome_page__thumbnail', 'option' ),\\n\\t\\t\\t\\t\\t'description' => get_field( 'welcome_page__description', 'option' ),\\n\\t\\t\\t\\t\\t'cta_button' => [\\n\\t\\t\\t\\t\\t\\t'text' => get_field( 'welcome_page__cta_button__text', 'option' ),\\n\\t\\t\\t\\t\\t],\\n\\t\\t\\t\\t],\\n\\t\\t\\t],\\n\\t\\t\\t'feedback_form' => [\\n\\t\\t\\t\\t'intro' => get_field( 'cleaning_feedback__intro', 'option' ),\\n\\t\\t\\t\\t'title' => get_field( 'cleaning_feedback__title', 'option' ),\\n\\t\\t\\t\\t'subtitle' => get_field( 'cleaning_feedback__subtitle', 'option' ),\\n\\t\\t\\t\\t'placeholder' => get_field( 'cleaning_feedback__placeholder', 'option' ),\\n\\t\\t\\t\\t'messages' => [\\n\\t\\t\\t\\t\\t'success' => get_field( 'cleaning_feedback__success_message', 'option' ),\\n\\t\\t\\t\\t],\\n\\t\\t\\t],\\n\\t\\t\\t'contact_form' => [\\n\\t\\t\\t\\t'labels' => [\\n\\t\\t\\t\\t\\t'name' => get_field( 'cleaning_contact__label__name', 'option' ),\\n\\t\\t\\t\\t\\t'email' => get_field( 'cleaning_contact__label__email', 'option' ),\\n\\t\\t\\t\\t\\t'subject' => get_field( 'cleaning_contact__label__subject', 'option' ),\\n\\t\\t\\t\\t\\t'body' => get_field( 'cleaning_contact__label__body', 'option' ),\\n\\t\\t\\t\\t\\t'button' => get_field( 'cleaning_contact__label__button', 'option' ),\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t'placeholders' => [\\n\\t\\t\\t\\t\\t'name' => get_field( 'cleaning_contact__placeholder__name', 'option' ),\\n\\t\\t\\t\\t\\t'email' => get_field( 'cleaning_contact__placeholder__email', 'option' ),\\n\\t\\t\\t\\t\\t'subject' => get_field( 'cleaning_contact__placeholder__subject', 'option' ),\\n\\t\\t\\t\\t\\t'body' => get_field( 'cleaning_contact__placeholder__body', 'option' ),\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t'messages' => [\\n\\t\\t\\t\\t\\t'success' => [\\n\\t\\t\\t\\t\\t\\t'title' => get_field( 'cleaning_contact__success_message__title', 'option' ),\\n\\t\\t\\t\\t\\t\\t'description' => get_field( 'cleaning_contact__success_message__description', 'option' ),\\n\\t\\t\\t\\t\\t],\\n\\t\\t\\t\\t],\\n\\t\\t\\t],\\n\\t\\t\\t'menu_items' => $menu_items,\\n\\t\\t\\t'page_titles' => [\\n\\t\\t\\t\\t'categories' => __( 'Categorieën', 'asvz' ),\\n\\t\\t\\t\\t'products' => __( 'Producten', 'asvz' ),\\n\\t\\t\\t\\t'tasks' => __( 'Takenlijst', 'asvz' ),\\n\\t\\t\\t\\t'tips' => __( 'Tips', 'asvz' ),\\n\\t\\t\\t\\t'contact' => __( 'Contact', 'asvz' ),\\n\\t\\t\\t\\t'faq' => __( 'Veelgestelde vragen', 'asvz' ),\\n\\t\\t\\t],\\n\\t\\t\\t'general_labels' => [\\n\\t\\t\\t\\t'menu_header' => __( 'Poets!', 'asvz' ),\\n\\t\\t\\t\\t'powered_by' => __( 'Powered By ASVZ', 'asvz' ),\\n\\t\\t\\t\\t'search_placeholder' => __( 'Search keyword...', 'asvz' ),\\n\\t\\t\\t\\t'tips_title' => __( 'Poets tips', 'asvz' ),\\n\\t\\t\\t\\t'material_needed' => __( 'Bekijk hier wat je allemaal nodig hebt', 'asvz' ),\\n\\t\\t\\t\\t'menu_header' => __( '', 'asvz' ),\\n\\t\\t\\t\\t'completed_material' => __( 'Your material is complete!', 'asvz' ),\\n\\t\\t\\t],\\n\\t\\t\\t'popup' => [\\n\\t\\t\\t\\t'trigger' => [\\n\\t\\t\\t\\t\\t'tips_icon' => get_field( 'tips_popup__trigger_icon', 'option' ),\\n\\t\\t\\t\\t\\t'wizard_icon' => get_field( 'wizard_popup__trigger_icon', 'option' ),\\n\\t\\t\\t\\t],\\n\\t\\t\\t],\\n\\t\\t\\t'type_icons' => $type_icons,*/\\n\\t\\t];\\n\\n\\t\\twp_localize_script(\\n\\t\\t\\t'theme',\\n\\t\\t\\t'asvzObj',\\n\\t\\t\\t$asvz_objects\\n\\t\\t);\\n\\n\\t\\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\\n\\t\\t\\twp_enqueue_script( 'comment-reply' );\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2d0c0034df17124bcd911d7d6799664\",\n \"score\": \"0.758781\",\n \"text\": \"public function enqueue_scripts () {\\r\\n\\t\\tif( ! is_admin() && is_singular( 'lookbook') ){\\r\\n\\t\\t\\twp_enqueue_style( 'wc-lookbook-frontend', WC_LOOKBOOK_URL . 'css/wc-lookbook-frontend.css', array(), false, 'all' );\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b48b746708c0131a9c8e2e7cd7231a2\",\n \"score\": \"0.75817454\",\n \"text\": \"public function enqueue()\\n {\\n // Remove wordpress oembed\\n wp_deregister_script('wp-embed');\\n\\n // Don't use WordPress jquery on public pages.\\n // Remove block library from public pages.\\n if (!is_admin()) {\\n wp_deregister_script('jquery');\\n wp_dequeue_style('wp-block-library');\\n }\\n\\n // Enqueue jQuery file.\\n if (!is_admin()) {\\n wp_enqueue_script(\\n 'jquery',\\n Utilities::staticUrl('/dist/js/jquery.min.js'),\\n [],\\n null\\n );\\n }\\n\\n // Enqueue Laravel Mix files.\\n $this->enqueueMixFiles();\\n\\n // Enqueue main app.js file.\\n wp_enqueue_script(\\n 'app',\\n Utilities::staticUrl('/dist/js/app.js'),\\n [],\\n null,\\n true\\n );\\n\\n // Ajax support\\n wp_localize_script(\\n 'app',\\n 'scriptvars',\\n [\\n 'ajax_url' => home_url('ajax'),\\n 'base_path' => parse_url(trailingslashit(home_url()), PHP_URL_PATH)\\n ]\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3105000c0c19704175e27e6ac9496039\",\n \"score\": \"0.7574431\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Customorder_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Customorder_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/customorder-admin.js', array( 'jquery' ), $this->version, false );\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f280794af55a3cd227fe26300db2019\",\n \"score\": \"0.7570887\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\twp_enqueue_script( 'wp-util' );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f6707dc3c79746af9c4d7d940738d95\",\n \"score\": \"0.7566194\",\n \"text\": \"function load_styles_and_scripts() {\\n wp_enqueue_style('bootstrap-styles', get_template_directory_uri() . '/css/bootstrap.css');\\n wp_enqueue_style('main-styles', get_stylesheet_uri());\\n\\n wp_enqueue_script('jQuery', 'https://code.jquery.com/jquery.min.js');\\n wp_enqueue_script('bootstrap', get_template_directory_uri() . '/js/bootstrap.js');\\n wp_enqueue_script('iconDock', get_template_directory_uri() . '/js/jqueryjqDoc.min.js');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c717f2ab27c4f8228971a6e60a129f4\",\n \"score\": \"0.75625914\",\n \"text\": \"public function enqueue() {\\n wp_enqueue_script( 'jquery-ui-core' );\\n wp_enqueue_script( 'jquery-ui-sortable' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad01a5ba8520f91b026aa8a7bb8f92cc\",\n \"score\": \"0.75600785\",\n \"text\": \"function aihr_scripts() {\\n\\n\\t$theme = wp_get_theme();\\n\\t$theme_version = $theme['Version'];\\n\\t \\n\\t\\n\\twp_enqueue_style('aihr-style',get_stylesheet_directory_uri() . '/assets/css/custom.css',$theme_version,true);\\n\\n\\twp_enqueue_script('aihr-js-custom',get_stylesheet_directory_uri() . '/assets/js/custom.js',array('jquery'),$theme_version,true );\\n\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec6802d7b4ac1e3fcfe0bd49735d3e93\",\n \"score\": \"0.75598204\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Wpmbt_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Wpmbt_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\n\\t\\twp_enqueue_script(Wpmbt_Admin::$plugin_name, plugin_dir_url(__FILE__) . 'js/wpmbt-admin.js', array('jquery'), Wpmbt_Admin::$version, false);\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"401af9446563b5ccc465af361c79af6c\",\n \"score\": \"0.75539416\",\n \"text\": \"public function enqueue_scripts() {\\n\\n wp_enqueue_style('bloomberg-shortcode', BLOOMBERG_PLUGIN_URL .'css/shortcode.min.css');\\n\\n wp_register_script('bloomberg-shortcode', BLOOMBERG_PLUGIN_URL .'js/shortcode.min.js', 'jquery', '1.0', true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"095a1c38f1f3f2478530b9dd95d39560\",\n \"score\": \"0.75525063\",\n \"text\": \"public function enqueueMixFiles()\\n {\\n // Enqueue manifest.js file.\\n wp_enqueue_script(\\n 'manifest',\\n Utilities::staticUrl('/dist/js/manifest.js'),\\n [],\\n null,\\n true\\n );\\n\\n // Enqueue vendor.js file if we have one.\\n if (file_exists(trailingslashit(ASSETS_DIR) . 'dist/js/vendor.js')) {\\n wp_enqueue_script(\\n 'vendor',\\n Utilities::staticUrl('/dist/js/vendor.js'),\\n [],\\n null,\\n true\\n );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b0eba5f0a6c2df88bdab8914c9ab3265\",\n \"score\": \"0.7551191\",\n \"text\": \"public function _enqueue_scripts() {\\r\\n //style and widgetne\\r\\n wp_enqueue_style('hw-stats-mechanic-style', HW_COUNTER_PLUGIN_URL. '/assets/styles/css/default.css');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbb264f57153990fa48bb2116d5f6bb9\",\n \"score\": \"0.75497574\",\n \"text\": \"public function admin_register_scripts_styles() {\\n wp_register_script(\\n 'sizzle',\\n plugins_url( '/js/lib/sizzle.js', CM_COMPANY_FOOTER ),\\n null,\\n '1.9.4-pre',\\n true\\n );\\n wp_register_script(\\n 'cm-company-email-admin',\\n plugins_url( '/js/cm-company-email-admin.js', CM_COMPANY_FOOTER ),\\n array( 'sizzle' ),\\n false,\\n true\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"129619abf24e4d285167519890f86189\",\n \"score\": \"0.753804\",\n \"text\": \"public function enqueue_scripts() {\\n\\n\\t\\t/**\\n\\t\\t * This function is provided for demonstration purposes only.\\n\\t\\t *\\n\\t\\t * An instance of this class should be passed to the run() function\\n\\t\\t * defined in Css_Stats_Loader as all of the hooks are defined\\n\\t\\t * in that particular class.\\n\\t\\t *\\n\\t\\t * The Css_Stats_Loader will then create the relationship\\n\\t\\t * between the defined hooks and the functions defined in this\\n\\t\\t * class.\\n\\t\\t */\\n\\t\\twp_enqueue_script( $this->plugin_name . '-common', CSS_STATS_PLUGIN_DIR . 'client/dist/commons.js', array(), $this->version, true );\\n\\t\\twp_enqueue_script( $this->plugin_name, CSS_STATS_PLUGIN_DIR . 'client/dist/admin.bundle.js', array(), $this->version, true );\\n\\n\\t\\twp_localize_script( $this->plugin_name, 'css_stats', $this->get_vars());\\n\\t\\t\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"873c04fa2e318758b9edf608dcf3d350\",\n \"score\": \"0.7536294\",\n \"text\": \"private function register_scripts_and_styles() {\\n if (is_admin()) {\\n $this->load_file(self::slug . '-admin-style', '/css/admin.css');\\n $this->load_file( self::slug . '-moment-js', '/js/moment-with-locales.min.js',true );\\n \\n \\n } //is_admin()\\n else {\\n } // end if/else\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":758,"cells":{"query_id":{"kind":"string","value":"4e452bbece585a6e400f0834721a716b"},"query":{"kind":"string","value":"Fetch a result row as an object"},"positive_passages":{"kind":"list like","value":[{"docid":"9a144055ca1d6b4baad6163da0f7a2ac","score":"0.0","text":"public function fetchArray($result)\n {\n return mysql_fetch_assoc($result);\n }","title":""}],"string":"[\n {\n \"docid\": \"9a144055ca1d6b4baad6163da0f7a2ac\",\n \"score\": \"0.0\",\n \"text\": \"public function fetchArray($result)\\n {\\n return mysql_fetch_assoc($result);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"ee4ffa4cb28945dc120d0a5b4fc6e9dd","score":"0.78233874","text":"function fetchObject() {\n \treturn mysql_fetch_object($this->res);\n }","title":""},{"docid":"4fd6c6a2509f603d27dd21669d33c3dd","score":"0.7732603","text":"public static function fetchObject( )\n\t{\n\t return mysqli_fetch_object( self::$result );\n\t}","title":""},{"docid":"25b6333bb058879fc6426f5f4d15cdcf","score":"0.7688383","text":"public function fetchObject($result)\n {\n return mysql_fetch_object($result);\n }","title":""},{"docid":"65098cf663868e83bbbea7ca5b1a2e90","score":"0.75255245","text":"public function fetch_object($result)\n\t{\n\t\treturn $result->fetch_object();\n\t}","title":""},{"docid":"09295fa9683526c8c76b459d4280e80c","score":"0.7474643","text":"public function fetchObject($result)\n {\n return oci_fetch_object($result);\n }","title":""},{"docid":"f9978e19ecf0a5b90bf52505de10e7f6","score":"0.7467874","text":"abstract public function fetchRow();","title":""},{"docid":"49a545a3e9fc43d3823d362795910bdb","score":"0.7426466","text":"function fetch_object($result)\n {\n\t\treturn mysql_fetch_object($result);\n }","title":""},{"docid":"f914e525a895c4d6b30998499a131462","score":"0.738671","text":"public function fetch($type = 'object'){\n\n switch ($type) {\n case 'array':\n $row = $this->result->fetch_array();\n break;\n case 'object':\n $row = $this->result->fetch_object();\n break;\n default:\n $row = $this->result->fetch_object();\n break;\n }\n\n return $row;\n \n }","title":""},{"docid":"0f1f376e4e056a35c61d7b876fa15c84","score":"0.7360969","text":"function FetchAs($result){\n\t\t\tif(!is_resource($result)) return false;\n\t\t\t\treturn ibase_fetch_object($result); //cambio de fetch_assoc por fetch_row\n\t\t}","title":""},{"docid":"969ba02575c789a0a87cd832546f6e19","score":"0.7332755","text":"public function fetchSingleRow() {\n }","title":""},{"docid":"4c35e25238b371fd9306109351a42fdd","score":"0.7294846","text":"abstract function getObject(array $row);","title":""},{"docid":"e6e80f48f13aeb463b2e4d0562020914","score":"0.7264935","text":"public function row(){\n if(empty($this->result)){\n $this->get();\n }\n $result = $this->result->fetch(PDO::FETCH_ASSOC);\n $this->clear_data();\n return $result;\n }","title":""},{"docid":"ecb1612f65896c71bb48f2416eb3912e","score":"0.7256413","text":"public function fetch(array $row);","title":""},{"docid":"648b07c25f167e2bb1631c3d6eb2b28e","score":"0.71400124","text":"protected function fetch_row()\n\t{\n\t\treturn @oci_fetch_row($this->resResult);\n\t}","title":""},{"docid":"e5c0d045e3c1bacddc33342945682fef","score":"0.7110911","text":"public function fetch_row($result)\n {\n }","title":""},{"docid":"61f8ddd94a6978cb4e89326e3965c3f6","score":"0.71069753","text":"function\tfetch_object( $result_type = patDBC_TYPEBOTH )\n\t{\n\t\tif ( $result_type == patDBC_TYPEASSOC ) { $result_type = MYSQL_ASSOC; }\n\t\telse if ( $result_type == patDBC_TYPENUM ) { $result_type = MYSQL_NUM; }\n\t\telse { $result_type = MYSQL_BOTH; }\n\n\t\treturn\tpg_fetch_object( $this->id, $result_type );\n\t\t/* return\tmysql_fetch_object( $this->id, $result_type ); */\n\t}","title":""},{"docid":"6fea843c5f3f79c0ed44cac5054a4ae0","score":"0.70744866","text":"public function fetchObject($result)\n\t{\n\t\treturn ($row = self::$CURRENT_DB->fetchAssoc($result)) ? $this->createObject($row) : false;\n\t}","title":""},{"docid":"fd07b10635c5dea876f8ad7216334b62","score":"0.70525783","text":"function cas_db_fetch_row($res_ins) {\n return $res_ins['result']->fetchRow();\n }","title":""},{"docid":"80ef73e92b5ba8c3941e264ea03e8de8","score":"0.7049218","text":"public function fetchRow($result)\n {\n $data = $this->fetchAny($result);\n\n return $data;\n }","title":""},{"docid":"91216903328f17dd18f0ee678953e6b7","score":"0.70444846","text":"public function fetchAssocRow()\n{\n\t$this->res->fetch_assoc();\n}","title":""},{"docid":"d62dadae4f616db4aeb175a9c50e85e0","score":"0.70337707","text":"protected function db_fetch_row($result)\n {\n return $result->fetch_row();\n }","title":""},{"docid":"89bdd5d58d7b8369a23a3db14fec3583","score":"0.70160985","text":"function fetch_obj($query_results){\n\t$result_line=mysql_fetch_object($query_results) or die(mysql_error());\n\treturn $result_line;\n}","title":""},{"docid":"75cb7f09bd602ba212b27b981dd17892","score":"0.70084536","text":"public function obj_fetch_object()\n {\n $result = sqlsrv_fetch_object( $this->obj_result );\n\n return ( is_object( $result ) ) ? $this->obj_record = $result : null;\n }","title":""},{"docid":"12eb820250f004ee6bfabc34ac275b0c","score":"0.69910395","text":"function FetchRow($result) {\n\t\t\t\t\n\t\tglobal $gError;\n\t\t\n\t\tswitch($this->db_type) {\n\t\t\tcase DB_MYSQL:\n\t\t\t\treturn @mysql_fetch_row($result);\n\t\t\tcase DB_PGSQL:\n\t\t\t\treturn @pg_fetch_row($result);\n\t\t\tcase DB_SQLITE:\n\t\t\t\treturn @sqlite_fetch_single($result);\n\t\t\tdefault:\n\t\t\t\t$gError->_error(\"Db::FetchRow(): Unknown database type id = \" . $this->db_type);\n\t\t\t\treturn NULL;\n\t\t}\n\t\n\t\treturn NULL;\n\t}","title":""},{"docid":"df2f28332eb5e924a5761ce27bae2b04","score":"0.6937456","text":"function fetch_object($result = false){\n\t\tif($result === false){\n\t\t\tif(!$obj = mysql_fetch_object($this->result))\n\t\t\t\t$this->result = false;\n\t\t}\n\t\telse{\n\t\t\t$obj = mysql_fetch_object($result);\n\t\t}\n\t\treturn $obj;\n\t}","title":""},{"docid":"8f6d43df337853e00d93d352d0706bbd","score":"0.6925979","text":"function loadObject() {\n\t\tif (!($query = $this->query())) {\n\t\t\treturn null;\n\t\t}\n\t\t$response = null;\n\t\tif ($object = mysqli_fetch_object( $query )) {\n\t\t\t$response = $object;\n\t\t}\n\t\tmysqli_free_result( $query );\n\t\treturn $response;\n\t}","title":""},{"docid":"856762f1236ff9b09b4343efcfeeee5c","score":"0.6921352","text":"public function fetch_row()\n {\n return pg_fetch_assoc($this->resource);\n }","title":""},{"docid":"43860f5d1a85e5c3cd403d858bc4f2ab","score":"0.69188213","text":"public static function fetch_object(Statement $result)\n {\n return $result->fetch(PDO::FETCH_OBJ);\n }","title":""},{"docid":"f1eac4b1ebdbd8b34b0f61bfb4229b5e","score":"0.69167656","text":"public function fetchRow()\n\t{\n\t\treturn $this->fetchAll(true);\n\t}","title":""},{"docid":"197dc3a56867d849355f798be85cfa39","score":"0.6907177","text":"public function fetch_row($result)\n {\n return oci_fetch_row($result);\n }","title":""},{"docid":"902df0b56296c0859d8a99d015f56525","score":"0.6906709","text":"public function fetch_object()\n\t{\n\t\n\t\tif($_ENV['databasetype'] == \"MYSQL\")\n\t\t{\n \t\treturn @mysqli_fetch_object($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"SQLSERVER\")\n\t\t{\n\t\t\treturn @mssql_fetch_object($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"POSTGRESQL\")\n\t\t{\n\t\t\treturn @pg_fetch_object($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"ORACLE\")\n\t\t{\n\t\t\t$myObject = @oci_fetch_object($this->statement);\n\t\t\tif(isset($myObject) && !empty($myObject))\n\t\t\t{\n\t\t\t\tforeach($myObject as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$key2 = strtolower($key);\n\t\t\t\t\t$myLowerObject->$key2 = $myObject->$key;\n\t\t\t\t}\n\t\t\t\treturn $myLowerObject;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t}\n\t }","title":""},{"docid":"99c2cc598e87765a8bad30d0bea77020","score":"0.6905871","text":"public function getrow() {\n\t\treturn ($this->res ? array_shift($this->res) : $this->sth->fetch(PDO::FETCH_ASSOC));\n\t}","title":""},{"docid":"d37475273fc5383103b5f522f0ccd83d","score":"0.69032526","text":"public function fetchRow($result)\n {\n \treturn mysqli_fetch_row($result);\n }","title":""},{"docid":"8435922e6a784b0442462a59ac9540dc","score":"0.6900635","text":"public function fetchResult() {\n\t\tif (count($this->rows)) {\n\t\t\t$row = array_shift($this->rows);\n\t\t\t$resultRow = array();\n\t\t\t$i = 0;\n\n\t\t\tforeach ($row as $index => $field) {\n\t\t\t\tif (isset($this->map[$index]) && $this->map[$index] !== '') {\n\t\t\t\t\tlist($table, $column) = $this->map[$index];\n\t\t\t\t\t$resultRow[$table][$column] = $row[$index];\n\t\t\t\t} else {\n\t\t\t\t\t$resultRow[0][str_replace('\"', '', $index)] = $row[$index];\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t}\n\t\treturn false;\n\t}","title":""},{"docid":"d88e27078d2fa5deb8621683a3223788","score":"0.68840265","text":"public function fetch_object($class_name = 'stdClass', $params = array(), $result, $class_name = 'stdClass', $params = array())\n {\n }","title":""},{"docid":"25cd2ae903afc2da3c6523601f7ae977","score":"0.68328553","text":"public function fetchRow() {\r\n\t\tif (! $this->result) {\r\n\t\t\t$this->lf->logMessage(\"mysqlClass:fetchRow(): nothing to fetch.\\n\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t$row = mysql_fetch_row($this->result);\r\n\t\t//echo \"fetch_row: $row->rowID
    \";\r\n\t\treturn $row;\r\n\t}","title":""},{"docid":"ea7109e71fef67ca65175c0fb48b675a","score":"0.68301165","text":"public function hydrate($row)\n {\n }","title":""},{"docid":"9d33dac4b2078382e9aad3b28e93fcaf","score":"0.68262357","text":"public static function fetchRow()\n {\n $ret = self::$queryResult->FetchRow();\n if ($ret === false) {\n return null;\n }\n return $ret;\n }","title":""},{"docid":"297a6b36beb85e1958120d72a55607c0","score":"0.67999214","text":"public function fetchRow($result)\n {\n return mysqli_fetch_row($result);\n }","title":""},{"docid":"a8030c0f870b7c1385a64cffd98226ee","score":"0.6799487","text":"public function fetchRow($result)\n {\n return $this->_extension->fetchRow($result);\n }","title":""},{"docid":"41a351de37cba2e9f6746cfe4c5db21e","score":"0.67839164","text":"function db_fetch_object($result) {\n if ($result) {\n return mysqli_fetch_object($result);\n }\n}","title":""},{"docid":"8288d2e96bd0f98660a935f6534de78c","score":"0.67767644","text":"public function fetch_row()\n\t{\n\n\t\tif($_ENV['databasetype'] == \"MYSQL\")\n\t\t{\n return @mysqli_fetch_row($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"SQLSERVER\")\n\t\t{\n\t\t\treturn @mssql_fetch_row($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"POSTGRESQL\")\n\t\t{\n\t\t\treturn @pg_fetch_row($this->query);\n\t\t}\n\t\telseif($_ENV['databasetype'] == \"ORACLE\")\n\t\t{\n\t\t\treturn @oci_fetch_row($this->statement);\n\t\t}\n\t\telse\n\t\t{\n\t\t\n\t\t}\n\t}","title":""},{"docid":"cd805f14852cdc467d164a73f6bd5987","score":"0.6764713","text":"function db_fetch_obj( $rResource )\n{\n return mysql_fetch_row( $rResource );\n}","title":""},{"docid":"31dcc050ce0553d9177f217df5599253","score":"0.67488194","text":"public function fetch_object($sql)\n {\n return (object)$this->fetch_array($sql);\n }","title":""},{"docid":"d93752e6d02b25efb75d0e15ccebd5e8","score":"0.67475647","text":"public function fetch_row($result)\n\t{\n\t\t$this->result = $result->fetch_row();\n\t\treturn $this->result;\n\t}","title":""},{"docid":"fe48962ae801a27e6411af4697939349","score":"0.6747325","text":"public function result(){\n $this->execute();\n return $this->stmt->fetch(PDO::FETCH_OBJ);\n }","title":""},{"docid":"f87b429480ec02f1dad8125f93aeeacd","score":"0.6743845","text":"public function result()\n { \n if ($result = parent::query($this->query)) {\n /* Fetch object */\n while ($row = $result->fetch_object())\n {\n $this->result_object[] = $row;\n }\n return $this->result_object;\n }\n }","title":""},{"docid":"65dea3b84aa4629f4c8fdc760bd72b59","score":"0.67044026","text":"function query_result_rowdata(&$result, $row = 0)\n\t{\n\t\tif (!is_object($result))\n\t\t\tthrow new Exception(\"result is not an object\");\n\t\t\t\n\t\t$result->Move($row);\n\t\t$rowdata = $this->change_key_case($result->FetchRow());\n\t\t\n\t\tforeach($rowdata as $col => $coldata) \n\t\t{\n\t\t\tif($col != 'fieldlabel')\n\t\t\t\t$rowdata[$col] = to_html($coldata);\n\t\t}\n\t\t\n\t\treturn $rowdata;\n\t}","title":""},{"docid":"baf870ef79ac339925b7b5b03f736c2f","score":"0.6700423","text":"public function fetch() {\n return $this->result->fetch_assoc();\n }","title":""},{"docid":"42061e03ac802a8a9f7e26730dd748ae","score":"0.6686745","text":"public function loadRow()\n\t{\n\t\t// Initialise variables\n\t\t$return = null;\n\n\t\t// Execute the query\n\t\tif (!$this->execute())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get the first row from the result set as an array\n\t\tif ($row = $this->fetchArray())\n\t\t{\n\t\t\t$return = $row;\n\t\t}\n\n\t\t// Free up system resources and return\n\t\t$this->freeResult();\n\n\t\treturn $return;\n\t}","title":""},{"docid":"b9bc86686806825e595e01f8c5fca107","score":"0.66863036","text":"function row($resource)\n {\n return $resource->fetch_assoc();\n }","title":""},{"docid":"84e4e0cd11952647c58d3553a348bfa5","score":"0.6676773","text":"protected function _fetchRow($result)\n\t{\n\t\treturn mysql_fetch_row($result);\n\t}","title":""},{"docid":"523bb25e7982c9268210d475ffbdc6fc","score":"0.66731685","text":"function\tfetch_row()\n\t{\n/*\t\treturn\tmysql_fetch_row( $this->id ); */\n\t\treturn\tpg_fetch_row( $this->id );\n\t}","title":""},{"docid":"3ae1ca0cffdd686acfafa25937e88b31","score":"0.6669976","text":"public function fetch($result)\n\t{\n\t\treturn $result->fetch_assoc();\n\t}","title":""},{"docid":"a0e943bf2dedec74643594fd057c3a5f","score":"0.6664953","text":"public function fetch()\n {\n return $this->_db->fetch($this->_table, $this->_fields, $this->_params, $this->_joins);\n }","title":""},{"docid":"cb3d74e2a6c0d6f51071739754f0a3e9","score":"0.6649716","text":"public function result(){\n if(empty($this->result)){\n $this->get();\n }\n $result = $this->result->fetch(PDO::FETCH_OBJ);\n $this->clear_data();\n return $result;\n }","title":""},{"docid":"381d3dd052402bde254c3111cabb4e5a","score":"0.6645101","text":"public static function to_object( $row ) {\n\t\t$object = new static();\n\t\t$object->fill( $row );\n\t\treturn $object;\n\t}","title":""},{"docid":"cadd795b181d49773ffb01e5b594a446","score":"0.66310364","text":"function MySqlFetchRow($result, $type = 'assoc') {\n\n\t\t$row = false;\n\t\tif ($result != false) {\n\n\t\t\tswitch ($type) {\n\t\t\tcase 'array':\n\t\t\t\t$row = @$result->result_array();\n\t\t\t\tbreak;\n\t\t\tcase 'object':\n\t\t\t\t$row = @$result->result();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\tcase 'assoc':\n\t\t\t\t$row = @$result->row_array();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $row;\n\t}","title":""},{"docid":"4679d7f7fb8cc7fd1ff19e3b87d15110","score":"0.66264635","text":"public static function loadResult() {\n \n $row = mysqli_fetch_row(self::$result);\n\t\treturn $row[0]; \n }","title":""},{"docid":"34af126678824b55e5c88c4b82ae002b","score":"0.6624412","text":"public function result()\n {\n $this->execute();\n return $this->statement->fetch(PDO::FETCH_OBJ);\n }","title":""},{"docid":"dba26098147b42c7f04225eec9b6f77c","score":"0.6623738","text":"function fetch_object($query) {\n if ($query instanceof mysqli_result) {\n return $query->fetch_object();\n }\n return FALSE;\n }","title":""},{"docid":"adf325386c8bf8a03197e835bc836775","score":"0.66157824","text":"public function fetchObject($queryresult, $class = \"\")\n\t{\n\t\tif (empty($class))\n\t\t{\n\t\t\treturn @mysqli_fetch_object($queryresult);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn @mysqli_fetch_object($queryresult, $class);\n\t\t}\n\t}","title":""},{"docid":"df5f3837f3062c58015a2fa0c4dca838","score":"0.6599381","text":"function query_row($query, $type = 'assoc')\n {\n $res = $this->query($query);\n if ($type == 'assoc')\n return $res->fetch(PDO::FETCH_ASSOC);\n elseif ($type == 'array')\n return $res->fetch(PDO::FETCH_NUM);\n elseif ($type == 'object')\n return $res->fetch(PDO::FETCH_OBJ);\n }","title":""},{"docid":"1cf82f83b96609f201a47d17cecba4d6","score":"0.65979654","text":"public function loadObject()\n {\n $result = $this->query();\n if ($result && is_object($result)) {\n $obj = $result->fetch_object();\n } else {\n pre($result, 'loadObject()->result');\n }\n if ($obj) {\n return $obj;\n }\n return null;\n }","title":""},{"docid":"2240a68a649b8702c85e9f8db692d630","score":"0.659584","text":"function fetchRow($fetchType = DBW_FETCH_ASSOC)\n {\n $fetchedRow = array();\n if ($fetchType == DBW_FETCH_ASSOC) {\n $fetchedRow = @mysql_fetch_assoc($this->_queryResult);\n } elseif ($fetchType == DBW_FETCH_ORDERED) {\n $fetchedRow = @mysql_fetch_row($this->_queryResult);\n } else {\n $fetchedRow = @mysql_fetch_object($this->_queryResult);\n }\n return $fetchedRow;\n }","title":""},{"docid":"165360199d7a183db150be7e817faec4","score":"0.6578255","text":"public function fetch() {\n\t\t$result = mysqli_fetch_assoc ( $this->_result );\n\t\t$this->freeResult ();\n\t\treturn $result;\n\t}","title":""},{"docid":"598f9aa2fdbe9029862f7c6372983602","score":"0.6575028","text":"function\tfetch_row()\n\t{\n\t\treturn\tarray();\n\t}","title":""},{"docid":"b6fd8d8a8f8d0139376a437add3810e7","score":"0.65542966","text":"public function fetch_row(){\n\t\t\n\t\techo \"fetch_row function from DB\";\n\t}","title":""},{"docid":"90291fce6366e2941f81f08f3d70520e","score":"0.6552887","text":"function fetchRow()\n {\n return sqlite_fetch_array($this->_result);\n }","title":""},{"docid":"25beb76180ed92f1e84f0e660faea45a","score":"0.65407544","text":"function execute_get_row($sql=\"\"){\n\t\t$result_row = null;\n\t\t$result = $this->conn->query($sql);\n\t\tif ( $result === FALSE) {\n\t\t\t$this->db_error($sql);\n\t\t}else{\n\t\t\t$result_row = $result->fetch_object();\n\t\t}\n\t\treturn $result_row;\t\t\n\t}","title":""},{"docid":"faaf43d73f3e3611b81c844c7fa0f471","score":"0.6522276","text":"public function row($query, $params = null, $fetchmode = PDO::FETCH_ASSOC) {\n $this->Init($query, $params);\n $result = $this->sQuery->fetch($fetchmode);\n $this->sQuery->closeCursor(); // Frees up the connection to the server so that other SQL statements may be issued,\n return $result;\n }","title":""},{"docid":"83817abb4ba8c21b4ecfadb1c3ebaf73","score":"0.65194124","text":"public function fetch_row($result) {\n\t\t\treturn mysqli_fetch_row($result);\n\t\t}","title":""},{"docid":"7d6e13cea74ebb5f14ff243fb6ac34e9","score":"0.6519034","text":"function fetch(){\n return mysqli_fetch_assoc($this->result);\n }","title":""},{"docid":"3b85fddcdf6a91f7599ffac933dfe10c","score":"0.65186757","text":"function fetch(){\n $row = false;\n if( $this->result !== false && $this->result != null)\n $row = mysql_fetch_assoc( $this->result );\n \n if( $row === false ) return false;\n\n foreach($row as $var => $value){\n if( property_exists($this, $var) ){\n $this->$var = $row[$var];\n }\n }\n return true;\n }","title":""},{"docid":"adf2e0f1228d4330d53b7af322349ab8","score":"0.65090656","text":"function FetchObject($Query)\n {\n\t\t$this->mySqlResult = mysqli_query($this->conn , $Query);\n return (@mysqli_fetch_object($this->mySqlResult ));\n }","title":""},{"docid":"add1eb954c2dc10f85c8d5ddf8511be8","score":"0.65068585","text":"public function fetch(){\n\t\t\t$data = $this->_adapter->fetchRow( $this->_selector );\n\t\t\t$this->_initSelector();\n\t\t\treturn $data;\n\t\t}","title":""},{"docid":"2743cdd2e31aad7db05753621bf4acb4","score":"0.6492311","text":"function fetch()\r\n\t{\r\n\t\tif($this->result)\r\n\t\t\treturn mysql_fetch_object($this->result);\r\n\t\treturn 0;\r\n\t}","title":""},{"docid":"7813f12fcce95195be3c0b39028f9ecd","score":"0.64875615","text":"public function fetch($record);","title":""},{"docid":"f63bbd1d4cc1b66bba35c8f5d01fdddd","score":"0.6470256","text":"function fetch(){\n\n if(isset($this->result)){\n return $this->result->fetch_assoc();\n }\n\n return false;\n }","title":""},{"docid":"29f7f010104accd41a8435ba296c20c2","score":"0.64622617","text":"public function fetchResult() {\n\t\tif ($row = $this->_result->fetch(PDO::FETCH_NUM)) {\n\t\t\t$resultRow = array();\n\t\t\tforeach ($this->map as $col => $meta) {\n\t\t\t\tlist($table, $column, $type) = $meta;\n\t\t\t\t$resultRow[$table][$column] = $row[$col];\n\t\t\t\tif ($type === 'boolean' && $row[$col] !== null) {\n\t\t\t\t\t$resultRow[$table][$column] = $this->boolean($resultRow[$table][$column]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t}\n\t\t$this->_result->closeCursor();\n\t\treturn false;\n\t}","title":""},{"docid":"b73db83c3d338cc5e4a32498e3491bfa","score":"0.64576864","text":"public function fetch($result, $r_type=self::ARRAY_A)\n\t{\n\t\t$db = self::$CURRENT_DB;\n\t\tswitch($r_type)\n\t\t{\n\t\t\tcase self::ARRAY_A: return $db->fetchAssoc($result);\n\t\t\tcase self::ARRAY_N: return $db->fetchRow($result);\n\t\t\tcase self::ARRAY_O: return $this->fetchObject($result);\n\t\t\tdefault: return (false === ($row = $db->fetchAssoc($result))) ? false : $this->createObject($row, $r_type);\n\t\t}\n\t}","title":""},{"docid":"3d79bea502b32adbc28d42123ef5c815","score":"0.6454141","text":"private static function fromResultSet($res) {\r\n //We get all the values form the query\r\n $nickname = $res[UserADO::$colNameNickname];\r\n $userscore = $res[UserADO::$colNameUserscore];\r\n $firstname = $res[UserADO::$colNameFirstname];\r\n $lastname = $res[UserADO::$colNameLastname];\r\n $email = $res[UserADO::$colNameEmail];\r\n $password = $res[UserADO::$colNamePassword];\r\n $postalcode = $res[UserADO::$colNamePostalcode];\r\n\r\n //Object construction\r\n $entity = new User();\r\n $entity->setNickname($nickname);\r\n $entity->setUserscore($userscore);\r\n $entity->setFirstname($firstname);\r\n $entity->setLastname($lastname);\r\n $entity->setEmail($email);\r\n $entity->setPassword($password);\r\n $entity->setPostalcode($postalcode);\r\n return $entity;\r\n }","title":""},{"docid":"223fa12160c7344a0fe6f313e38bd1ef","score":"0.64511794","text":"public function loadObject($class = 'stdClass')\n\t{\n\t\t// Initialise variables\n\t\t$return = null;\n\n\t\t// Execute the query\n\t\tif (!$this->execute())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t// Get the first row from the result set as an object of type $class\n\t\tif ($row = $this->fetchObject($class))\n\t\t{\n\t\t\t$return = $row;\n\t\t}\n\n\t\t// Free up system resources and return\n\t\t$this->freeResult();\n\n\t\treturn $return;\n\t}","title":""},{"docid":"3d3d04ea4fed6eeb3c7125a19427c13a","score":"0.64437896","text":"private static function fromResultSet( $res ) {\n //recuperar valors dels camps\n $idRepository = $res[ repositoriesClass::$colId];\n $repositoryName = $res[ repositoriesClass::$colName];\n $idUser = $res[ repositoriesClass::$colUser];\n $idProject = $res[ repositoriesClass::$colProject];\n\n //construeix l'objecte\n $entitat = new repositoriesClass();\n $entitat->setIdRepository($idRepository);\n $entitat->setRepositoryName($repositoryName); \n $entitat->setIdUser($idUser);\n $entitat->setIdProject($idProject);\n //retornar objecte\n return $entitat;\n }","title":""},{"docid":"47b565e252e45547abf8c93d5f0f2b2b","score":"0.64420706","text":"protected function fetchRow($fetch_style = null, $fetch_argument = null, array $ctor_args = array())\n {\n if ($fetch_style === null) {\n if (($fetch_style = $this->defaultFetchMode) !== null) {\n $fetch_argument = $fetch_argument !== null ? $fetch_argument : $this->defaultFetchArgument;\n $ctor_args = !empty($ctor_args) ? $ctor_args : $this->defaultFetchConstructorParams;\n } else {\n $fetch_style = \\PDO::FETCH_BOTH;\n }\n }\n\n if ($fetch_style == \\PDO::FETCH_COLUMN) {\n $result = $this->result->fetch_array(MYSQLI_NUM);\n\n if (!$result) {\n return $result;\n }\n\n $column = intval($fetch_argument !== null ? $fetch_argument : $this->defaultFetchArgument);\n\n return isset($result[$column]) ? $result[$column] : null;\n } elseif ($fetch_style == \\PDO::FETCH_FUNC) {\n $result = $this->result->fetch_array(\\PDO::FETCH_BOTH);\n\n if (!$result) {\n return $result;\n }\n\n return call_user_func($fetch_argument, $result);\n } elseif (in_array($fetch_style, array(\\PDO::FETCH_CLASS, \\PDO::FETCH_OBJ))) {\n $fetch_argument = $fetch_argument && $fetch_style == \\PDO::FETCH_CLASS ? $fetch_argument : 'stdClass';\n\n return $ctor_args && $fetch_style == \\PDO::FETCH_CLASS\n ? $this->result->fetch_object($fetch_argument, $ctor_args)\n : $this->result->fetch_object($fetch_argument);\n } elseif ($fetch_style == \\PDO::FETCH_INTO) {\n $result = $this->result->fetch_array(MYSQLI_ASSOC);\n\n if (!$result) {\n return $result;\n }\n\n $this->hydrateObject(\n $fetch_argument,\n $result\n );\n\n return true;\n } elseif ($fetch_style == \\PDO::FETCH_BOUND) {\n $result = $this->result->fetch_array(MYSQLI_BOTH);\n\n if (!$result) {\n return $result;\n }\n\n foreach ($this->resultBindings as $binding => $params) {\n $value = isset($result[$binding - 1]) ? $result[$binding - 1] : null;\n if ($params[2]) {\n $value = mb_substr($value, 0, $params[2]);\n }\n if ($params[1]) {\n $value = $this->castPDOToPHPType($value, $params[1]);\n }\n $params[0] = $value;\n }\n\n return true;\n }\n\n $styles = array(\\PDO::FETCH_BOTH, \\PDO::FETCH_ASSOC, \\PDO::FETCH_NUM);\n $fetch_style = in_array($fetch_style, $styles) ? $fetch_style : reset($styles);\n\n return $this->result->fetch_array($this->mapFetchStyle($fetch_style));\n }","title":""},{"docid":"5ef0c5f402052568c895c1a28e2efa55","score":"0.6431425","text":"protected function fetchData() {\n\t\t$dbm = DatabaseManager::open('__mfx');\n\t\t$row = $dbm->getRow($this->getFetchDataQuery(), \\PDO::FETCH_ASSOC, $this->_key);\n\t\t$dbm = NULL;\n\t\treturn $row;\n\t}","title":""},{"docid":"836d931f48657760f0340d89c748ab53","score":"0.6402869","text":"public function fetch(): ResultInterface\n {\n if (!($this->stmnt instanceof PDOStatement)\n || is_array(($result = $this->stmnt->fetchAll(PDO::FETCH_OBJ))) === false) {\n return new Result([]);\n }\n\n return new Result($result);\n }","title":""},{"docid":"d74449328f25ea8a16173b2302d2ad5b","score":"0.63741195","text":"function fetchrow($res, $result_type = \"BOTH\")\n {\n if (!$res) {\n return false;\n }\n switch ($result_type) {\n case \"ASSOC\" :\n $result_type = MSSQL_ASSOC;\n break;\n case \"NUM\" :\n $result_type = MSSQL_NUM;\n break;\n default :\n $result_type = MSSQL_BOTH;\n }\n $resFetch = @mssql_fetch_array($res, $result_type);\n if (!$resFetch) {\n $this->setErrorMessage();\n echo $this->dbError;\n return false;\n } else {\n return $resFetch;\n }\n }","title":""},{"docid":"d3fff8de33fabad34c6d462447645ce8","score":"0.63698447","text":"public function fetch()\n {\n $serviceId = $this->_productId;\n $table = $this->getTable();\n $select = $table->select();\n $select->where('product_id = ?', $serviceId);\n $result = $table->fetchRow($select);\n return $result;\n }","title":""},{"docid":"4af35b9bd0cf3baaf5229692d186005a","score":"0.6366414","text":"public function itemToObject($row){\n $hotelInfoObject = new HotelInfo($row['HotelId'], $row['Name'], $row['TelNr'], $row['Url'], $row['Preis'], $row['Stichwort'], $row['AnzZimmer']); \n // var_dump($hotelInfoObject); \n return $hotelInfoObject; \n \n }","title":""},{"docid":"0439100781901f2ff376d99335d805b1","score":"0.63559157","text":"public function fetch()\n\t{\n\t\treturn $this->data = $this->ds->fetchAll();\n\t}","title":""},{"docid":"e87cd0fa3b43c5b14f77e29761fa5c30","score":"0.63498294","text":"function fetchRow() \n { \n return mysql_fetch_array($this->lastResult); \n }","title":""},{"docid":"ce1f5a9a09c7bca102592364c3ffad70","score":"0.63434696","text":"public function getRow($resultmode=PDO::FETCH_ASSOC) \r\n { \r\n if (!$this->statement)\r\n $this->statement = $this->prepare(); \r\n $this->statement->execute();\r\n $row = array();\r\n $row = $this->statement->fetch($resultmode);\r\n // Ef_Log::log ($row,'row');\r\n return $row;\r\n }","title":""},{"docid":"e3ce0c9b0a06f583664b5ec494bec1c8","score":"0.63414466","text":"public function fetchObject() {\n return $this->cursor->getNext();\n }","title":""},{"docid":"eb0c3f3fcfddb9ba062f44b3fd2381dd","score":"0.6337306","text":"function rs_fetch_record(&$rs) {\n global $CFG;\n\n if (!$rs) {\n debugging('Incorrect $rs used!', DEBUG_DEVELOPER);\n return false;\n }\n\n $rec = $rs->FetchObj(); //Retrieve record as object without advance the pointer\n\n if ($rs->EOF) { //FetchObj requires manual checking of EOF to detect if it's the last record\n $rec = false;\n } else {\n /// DIRTY HACK to retrieve all the ' ' (1 space) fields converted back\n /// to '' (empty string) for Oracle. It's the only way to work with\n /// all those NOT NULL DEFAULT '' fields until we definetively delete them\n if ($CFG->dbfamily == 'oracle') {\n $recarr = (array)$rec; /// Cast to array\n array_walk($recarr, 'onespace2empty');\n $rec = (object)$recarr;/// Cast back to object\n }\n /// End DIRTY HACK\n }\n\n return $rec;\n}","title":""},{"docid":"793731cd92fc605dc60469c73a2551ed","score":"0.6335422","text":"public function fetchObject (string $sql, $params=[]) {\r\n $stmt = $this->prepareStatement($sql, $params);\r\n $rows = array();\r\n if ($stmt) {\r\n $stmt->execute();\r\n $result = $stmt->get_result();\r\n if ($result) {\r\n while ($row = $result->fetch_object()) {\r\n $rows[] = $row;\r\n }\r\n $result->free();\r\n }\r\n }\r\n return $rows;\r\n }","title":""},{"docid":"9fd7ab974e4722c77be15654ca2880f1","score":"0.63340557","text":"protected function _fetch()\n {\n // store the current query resource \n $oldId = $this->getDb()->getQueryId();\n \n // set our own query resource in the database driver so we can use\n // the atkDb::next_record() method and retrieve the new record\n $this->getDb()->setQueryId($this->m_resource);\n $this->getDb()->next_record();\n $row = $this->getDb()->m_record;\n \n // restore the old query resource\n $this->getDb()->setQueryId($oldId);\n \n return $row;\n }","title":""},{"docid":"13be5f02cef23bae6055ef13d1503666","score":"0.6328615","text":"public function row( $query, $params = null, $fetchmode = PDO::FETCH_ASSOC )\n {\n $this->Init( $query, $params );\n return $this->sqlQuery->fetch( $fetchmode );\n }","title":""},{"docid":"f194c22bcd45944d17cb29a89ed00ab6","score":"0.63267565","text":"private function getObjByResult($result){ \n //verifica tamanho do array\n if(count($result)>1){ \n $objects=array(); \n foreach ($result as $k => $v){ \n $objects[$k]=$this->getObjByRow($result[$k]);\n }\n return $objects;\n }\n else{ \n return array($this->getObjByRow($result[0]));\n }\n }","title":""},{"docid":"f194c22bcd45944d17cb29a89ed00ab6","score":"0.63267565","text":"private function getObjByResult($result){ \n //verifica tamanho do array\n if(count($result)>1){ \n $objects=array(); \n foreach ($result as $k => $v){ \n $objects[$k]=$this->getObjByRow($result[$k]);\n }\n return $objects;\n }\n else{ \n return array($this->getObjByRow($result[0]));\n }\n }","title":""},{"docid":"f194c22bcd45944d17cb29a89ed00ab6","score":"0.63267565","text":"private function getObjByResult($result){ \n //verifica tamanho do array\n if(count($result)>1){ \n $objects=array(); \n foreach ($result as $k => $v){ \n $objects[$k]=$this->getObjByRow($result[$k]);\n }\n return $objects;\n }\n else{ \n return array($this->getObjByRow($result[0]));\n }\n }","title":""}],"string":"[\n {\n \"docid\": \"ee4ffa4cb28945dc120d0a5b4fc6e9dd\",\n \"score\": \"0.78233874\",\n \"text\": \"function fetchObject() {\\n \\treturn mysql_fetch_object($this->res);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fd6c6a2509f603d27dd21669d33c3dd\",\n \"score\": \"0.7732603\",\n \"text\": \"public static function fetchObject( )\\n\\t{\\n\\t return mysqli_fetch_object( self::$result );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25b6333bb058879fc6426f5f4d15cdcf\",\n \"score\": \"0.7688383\",\n \"text\": \"public function fetchObject($result)\\n {\\n return mysql_fetch_object($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65098cf663868e83bbbea7ca5b1a2e90\",\n \"score\": \"0.75255245\",\n \"text\": \"public function fetch_object($result)\\n\\t{\\n\\t\\treturn $result->fetch_object();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09295fa9683526c8c76b459d4280e80c\",\n \"score\": \"0.7474643\",\n \"text\": \"public function fetchObject($result)\\n {\\n return oci_fetch_object($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9978e19ecf0a5b90bf52505de10e7f6\",\n \"score\": \"0.7467874\",\n \"text\": \"abstract public function fetchRow();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49a545a3e9fc43d3823d362795910bdb\",\n \"score\": \"0.7426466\",\n \"text\": \"function fetch_object($result)\\n {\\n\\t\\treturn mysql_fetch_object($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f914e525a895c4d6b30998499a131462\",\n \"score\": \"0.738671\",\n \"text\": \"public function fetch($type = 'object'){\\n\\n switch ($type) {\\n case 'array':\\n $row = $this->result->fetch_array();\\n break;\\n case 'object':\\n $row = $this->result->fetch_object();\\n break;\\n default:\\n $row = $this->result->fetch_object();\\n break;\\n }\\n\\n return $row;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f1f376e4e056a35c61d7b876fa15c84\",\n \"score\": \"0.7360969\",\n \"text\": \"function FetchAs($result){\\n\\t\\t\\tif(!is_resource($result)) return false;\\n\\t\\t\\t\\treturn ibase_fetch_object($result); //cambio de fetch_assoc por fetch_row\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"969ba02575c789a0a87cd832546f6e19\",\n \"score\": \"0.7332755\",\n \"text\": \"public function fetchSingleRow() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c35e25238b371fd9306109351a42fdd\",\n \"score\": \"0.7294846\",\n \"text\": \"abstract function getObject(array $row);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6e80f48f13aeb463b2e4d0562020914\",\n \"score\": \"0.7264935\",\n \"text\": \"public function row(){\\n if(empty($this->result)){\\n $this->get();\\n }\\n $result = $this->result->fetch(PDO::FETCH_ASSOC);\\n $this->clear_data();\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ecb1612f65896c71bb48f2416eb3912e\",\n \"score\": \"0.7256413\",\n \"text\": \"public function fetch(array $row);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"648b07c25f167e2bb1631c3d6eb2b28e\",\n \"score\": \"0.71400124\",\n \"text\": \"protected function fetch_row()\\n\\t{\\n\\t\\treturn @oci_fetch_row($this->resResult);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5c0d045e3c1bacddc33342945682fef\",\n \"score\": \"0.7110911\",\n \"text\": \"public function fetch_row($result)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61f8ddd94a6978cb4e89326e3965c3f6\",\n \"score\": \"0.71069753\",\n \"text\": \"function\\tfetch_object( $result_type = patDBC_TYPEBOTH )\\n\\t{\\n\\t\\tif ( $result_type == patDBC_TYPEASSOC ) { $result_type = MYSQL_ASSOC; }\\n\\t\\telse if ( $result_type == patDBC_TYPENUM ) { $result_type = MYSQL_NUM; }\\n\\t\\telse { $result_type = MYSQL_BOTH; }\\n\\n\\t\\treturn\\tpg_fetch_object( $this->id, $result_type );\\n\\t\\t/* return\\tmysql_fetch_object( $this->id, $result_type ); */\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6fea843c5f3f79c0ed44cac5054a4ae0\",\n \"score\": \"0.70744866\",\n \"text\": \"public function fetchObject($result)\\n\\t{\\n\\t\\treturn ($row = self::$CURRENT_DB->fetchAssoc($result)) ? $this->createObject($row) : false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd07b10635c5dea876f8ad7216334b62\",\n \"score\": \"0.70525783\",\n \"text\": \"function cas_db_fetch_row($res_ins) {\\n return $res_ins['result']->fetchRow();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80ef73e92b5ba8c3941e264ea03e8de8\",\n \"score\": \"0.7049218\",\n \"text\": \"public function fetchRow($result)\\n {\\n $data = $this->fetchAny($result);\\n\\n return $data;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91216903328f17dd18f0ee678953e6b7\",\n \"score\": \"0.70444846\",\n \"text\": \"public function fetchAssocRow()\\n{\\n\\t$this->res->fetch_assoc();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d62dadae4f616db4aeb175a9c50e85e0\",\n \"score\": \"0.70337707\",\n \"text\": \"protected function db_fetch_row($result)\\n {\\n return $result->fetch_row();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89bdd5d58d7b8369a23a3db14fec3583\",\n \"score\": \"0.70160985\",\n \"text\": \"function fetch_obj($query_results){\\n\\t$result_line=mysql_fetch_object($query_results) or die(mysql_error());\\n\\treturn $result_line;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75cb7f09bd602ba212b27b981dd17892\",\n \"score\": \"0.70084536\",\n \"text\": \"public function obj_fetch_object()\\n {\\n $result = sqlsrv_fetch_object( $this->obj_result );\\n\\n return ( is_object( $result ) ) ? $this->obj_record = $result : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12eb820250f004ee6bfabc34ac275b0c\",\n \"score\": \"0.69910395\",\n \"text\": \"function FetchRow($result) {\\n\\t\\t\\t\\t\\n\\t\\tglobal $gError;\\n\\t\\t\\n\\t\\tswitch($this->db_type) {\\n\\t\\t\\tcase DB_MYSQL:\\n\\t\\t\\t\\treturn @mysql_fetch_row($result);\\n\\t\\t\\tcase DB_PGSQL:\\n\\t\\t\\t\\treturn @pg_fetch_row($result);\\n\\t\\t\\tcase DB_SQLITE:\\n\\t\\t\\t\\treturn @sqlite_fetch_single($result);\\n\\t\\t\\tdefault:\\n\\t\\t\\t\\t$gError->_error(\\\"Db::FetchRow(): Unknown database type id = \\\" . $this->db_type);\\n\\t\\t\\t\\treturn NULL;\\n\\t\\t}\\n\\t\\n\\t\\treturn NULL;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df2f28332eb5e924a5761ce27bae2b04\",\n \"score\": \"0.6937456\",\n \"text\": \"function fetch_object($result = false){\\n\\t\\tif($result === false){\\n\\t\\t\\tif(!$obj = mysql_fetch_object($this->result))\\n\\t\\t\\t\\t$this->result = false;\\n\\t\\t}\\n\\t\\telse{\\n\\t\\t\\t$obj = mysql_fetch_object($result);\\n\\t\\t}\\n\\t\\treturn $obj;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f6d43df337853e00d93d352d0706bbd\",\n \"score\": \"0.6925979\",\n \"text\": \"function loadObject() {\\n\\t\\tif (!($query = $this->query())) {\\n\\t\\t\\treturn null;\\n\\t\\t}\\n\\t\\t$response = null;\\n\\t\\tif ($object = mysqli_fetch_object( $query )) {\\n\\t\\t\\t$response = $object;\\n\\t\\t}\\n\\t\\tmysqli_free_result( $query );\\n\\t\\treturn $response;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"856762f1236ff9b09b4343efcfeeee5c\",\n \"score\": \"0.6921352\",\n \"text\": \"public function fetch_row()\\n {\\n return pg_fetch_assoc($this->resource);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43860f5d1a85e5c3cd403d858bc4f2ab\",\n \"score\": \"0.69188213\",\n \"text\": \"public static function fetch_object(Statement $result)\\n {\\n return $result->fetch(PDO::FETCH_OBJ);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1eac4b1ebdbd8b34b0f61bfb4229b5e\",\n \"score\": \"0.69167656\",\n \"text\": \"public function fetchRow()\\n\\t{\\n\\t\\treturn $this->fetchAll(true);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"197dc3a56867d849355f798be85cfa39\",\n \"score\": \"0.6907177\",\n \"text\": \"public function fetch_row($result)\\n {\\n return oci_fetch_row($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"902df0b56296c0859d8a99d015f56525\",\n \"score\": \"0.6906709\",\n \"text\": \"public function fetch_object()\\n\\t{\\n\\t\\n\\t\\tif($_ENV['databasetype'] == \\\"MYSQL\\\")\\n\\t\\t{\\n \\t\\treturn @mysqli_fetch_object($this->query);\\n\\t\\t}\\n\\t\\telseif($_ENV['databasetype'] == \\\"SQLSERVER\\\")\\n\\t\\t{\\n\\t\\t\\treturn @mssql_fetch_object($this->query);\\n\\t\\t}\\n\\t\\telseif($_ENV['databasetype'] == \\\"POSTGRESQL\\\")\\n\\t\\t{\\n\\t\\t\\treturn @pg_fetch_object($this->query);\\n\\t\\t}\\n\\t\\telseif($_ENV['databasetype'] == \\\"ORACLE\\\")\\n\\t\\t{\\n\\t\\t\\t$myObject = @oci_fetch_object($this->statement);\\n\\t\\t\\tif(isset($myObject) && !empty($myObject))\\n\\t\\t\\t{\\n\\t\\t\\t\\tforeach($myObject as $key => $value)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$key2 = strtolower($key);\\n\\t\\t\\t\\t\\t$myLowerObject->$key2 = $myObject->$key;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn $myLowerObject;\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\n\\t\\t}\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99c2cc598e87765a8bad30d0bea77020\",\n \"score\": \"0.6905871\",\n \"text\": \"public function getrow() {\\n\\t\\treturn ($this->res ? array_shift($this->res) : $this->sth->fetch(PDO::FETCH_ASSOC));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d37475273fc5383103b5f522f0ccd83d\",\n \"score\": \"0.69032526\",\n \"text\": \"public function fetchRow($result)\\n {\\n \\treturn mysqli_fetch_row($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8435922e6a784b0442462a59ac9540dc\",\n \"score\": \"0.6900635\",\n \"text\": \"public function fetchResult() {\\n\\t\\tif (count($this->rows)) {\\n\\t\\t\\t$row = array_shift($this->rows);\\n\\t\\t\\t$resultRow = array();\\n\\t\\t\\t$i = 0;\\n\\n\\t\\t\\tforeach ($row as $index => $field) {\\n\\t\\t\\t\\tif (isset($this->map[$index]) && $this->map[$index] !== '') {\\n\\t\\t\\t\\t\\tlist($table, $column) = $this->map[$index];\\n\\t\\t\\t\\t\\t$resultRow[$table][$column] = $row[$index];\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$resultRow[0][str_replace('\\\"', '', $index)] = $row[$index];\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$i++;\\n\\t\\t\\t}\\n\\t\\t\\treturn $resultRow;\\n\\t\\t}\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d88e27078d2fa5deb8621683a3223788\",\n \"score\": \"0.68840265\",\n \"text\": \"public function fetch_object($class_name = 'stdClass', $params = array(), $result, $class_name = 'stdClass', $params = array())\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25cd2ae903afc2da3c6523601f7ae977\",\n \"score\": \"0.68328553\",\n \"text\": \"public function fetchRow() {\\r\\n\\t\\tif (! $this->result) {\\r\\n\\t\\t\\t$this->lf->logMessage(\\\"mysqlClass:fetchRow(): nothing to fetch.\\\\n\\\");\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}\\r\\n\\t\\t$row = mysql_fetch_row($this->result);\\r\\n\\t\\t//echo \\\"fetch_row: $row->rowID
    \\\";\\r\\n\\t\\treturn $row;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea7109e71fef67ca65175c0fb48b675a\",\n \"score\": \"0.68301165\",\n \"text\": \"public function hydrate($row)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d33dac4b2078382e9aad3b28e93fcaf\",\n \"score\": \"0.68262357\",\n \"text\": \"public static function fetchRow()\\n {\\n $ret = self::$queryResult->FetchRow();\\n if ($ret === false) {\\n return null;\\n }\\n return $ret;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"297a6b36beb85e1958120d72a55607c0\",\n \"score\": \"0.67999214\",\n \"text\": \"public function fetchRow($result)\\n {\\n return mysqli_fetch_row($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a8030c0f870b7c1385a64cffd98226ee\",\n \"score\": \"0.6799487\",\n \"text\": \"public function fetchRow($result)\\n {\\n return $this->_extension->fetchRow($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41a351de37cba2e9f6746cfe4c5db21e\",\n \"score\": \"0.67839164\",\n \"text\": \"function db_fetch_object($result) {\\n if ($result) {\\n return mysqli_fetch_object($result);\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8288d2e96bd0f98660a935f6534de78c\",\n \"score\": \"0.67767644\",\n \"text\": \"public function fetch_row()\\n\\t{\\n\\n\\t\\tif($_ENV['databasetype'] == \\\"MYSQL\\\")\\n\\t\\t{\\n return @mysqli_fetch_row($this->query);\\n\\t\\t}\\n\\t\\telseif($_ENV['databasetype'] == \\\"SQLSERVER\\\")\\n\\t\\t{\\n\\t\\t\\treturn @mssql_fetch_row($this->query);\\n\\t\\t}\\n\\t\\telseif($_ENV['databasetype'] == \\\"POSTGRESQL\\\")\\n\\t\\t{\\n\\t\\t\\treturn @pg_fetch_row($this->query);\\n\\t\\t}\\n\\t\\telseif($_ENV['databasetype'] == \\\"ORACLE\\\")\\n\\t\\t{\\n\\t\\t\\treturn @oci_fetch_row($this->statement);\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd805f14852cdc467d164a73f6bd5987\",\n \"score\": \"0.6764713\",\n \"text\": \"function db_fetch_obj( $rResource )\\n{\\n return mysql_fetch_row( $rResource );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31dcc050ce0553d9177f217df5599253\",\n \"score\": \"0.67488194\",\n \"text\": \"public function fetch_object($sql)\\n {\\n return (object)$this->fetch_array($sql);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d93752e6d02b25efb75d0e15ccebd5e8\",\n \"score\": \"0.67475647\",\n \"text\": \"public function fetch_row($result)\\n\\t{\\n\\t\\t$this->result = $result->fetch_row();\\n\\t\\treturn $this->result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe48962ae801a27e6411af4697939349\",\n \"score\": \"0.6747325\",\n \"text\": \"public function result(){\\n $this->execute();\\n return $this->stmt->fetch(PDO::FETCH_OBJ);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f87b429480ec02f1dad8125f93aeeacd\",\n \"score\": \"0.6743845\",\n \"text\": \"public function result()\\n { \\n if ($result = parent::query($this->query)) {\\n /* Fetch object */\\n while ($row = $result->fetch_object())\\n {\\n $this->result_object[] = $row;\\n }\\n return $this->result_object;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65dea3b84aa4629f4c8fdc760bd72b59\",\n \"score\": \"0.67044026\",\n \"text\": \"function query_result_rowdata(&$result, $row = 0)\\n\\t{\\n\\t\\tif (!is_object($result))\\n\\t\\t\\tthrow new Exception(\\\"result is not an object\\\");\\n\\t\\t\\t\\n\\t\\t$result->Move($row);\\n\\t\\t$rowdata = $this->change_key_case($result->FetchRow());\\n\\t\\t\\n\\t\\tforeach($rowdata as $col => $coldata) \\n\\t\\t{\\n\\t\\t\\tif($col != 'fieldlabel')\\n\\t\\t\\t\\t$rowdata[$col] = to_html($coldata);\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn $rowdata;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"baf870ef79ac339925b7b5b03f736c2f\",\n \"score\": \"0.6700423\",\n \"text\": \"public function fetch() {\\n return $this->result->fetch_assoc();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42061e03ac802a8a9f7e26730dd748ae\",\n \"score\": \"0.6686745\",\n \"text\": \"public function loadRow()\\n\\t{\\n\\t\\t// Initialise variables\\n\\t\\t$return = null;\\n\\n\\t\\t// Execute the query\\n\\t\\tif (!$this->execute())\\n\\t\\t{\\n\\t\\t\\treturn null;\\n\\t\\t}\\n\\n\\t\\t// Get the first row from the result set as an array\\n\\t\\tif ($row = $this->fetchArray())\\n\\t\\t{\\n\\t\\t\\t$return = $row;\\n\\t\\t}\\n\\n\\t\\t// Free up system resources and return\\n\\t\\t$this->freeResult();\\n\\n\\t\\treturn $return;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9bc86686806825e595e01f8c5fca107\",\n \"score\": \"0.66863036\",\n \"text\": \"function row($resource)\\n {\\n return $resource->fetch_assoc();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84e4e0cd11952647c58d3553a348bfa5\",\n \"score\": \"0.6676773\",\n \"text\": \"protected function _fetchRow($result)\\n\\t{\\n\\t\\treturn mysql_fetch_row($result);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"523bb25e7982c9268210d475ffbdc6fc\",\n \"score\": \"0.66731685\",\n \"text\": \"function\\tfetch_row()\\n\\t{\\n/*\\t\\treturn\\tmysql_fetch_row( $this->id ); */\\n\\t\\treturn\\tpg_fetch_row( $this->id );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ae1ca0cffdd686acfafa25937e88b31\",\n \"score\": \"0.6669976\",\n \"text\": \"public function fetch($result)\\n\\t{\\n\\t\\treturn $result->fetch_assoc();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0e943bf2dedec74643594fd057c3a5f\",\n \"score\": \"0.6664953\",\n \"text\": \"public function fetch()\\n {\\n return $this->_db->fetch($this->_table, $this->_fields, $this->_params, $this->_joins);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb3d74e2a6c0d6f51071739754f0a3e9\",\n \"score\": \"0.6649716\",\n \"text\": \"public function result(){\\n if(empty($this->result)){\\n $this->get();\\n }\\n $result = $this->result->fetch(PDO::FETCH_OBJ);\\n $this->clear_data();\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"381d3dd052402bde254c3111cabb4e5a\",\n \"score\": \"0.6645101\",\n \"text\": \"public static function to_object( $row ) {\\n\\t\\t$object = new static();\\n\\t\\t$object->fill( $row );\\n\\t\\treturn $object;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cadd795b181d49773ffb01e5b594a446\",\n \"score\": \"0.66310364\",\n \"text\": \"function MySqlFetchRow($result, $type = 'assoc') {\\n\\n\\t\\t$row = false;\\n\\t\\tif ($result != false) {\\n\\n\\t\\t\\tswitch ($type) {\\n\\t\\t\\tcase 'array':\\n\\t\\t\\t\\t$row = @$result->result_array();\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tcase 'object':\\n\\t\\t\\t\\t$row = @$result->result();\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\tdefault:\\n\\t\\t\\tcase 'assoc':\\n\\t\\t\\t\\t$row = @$result->row_array();\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn $row;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4679d7f7fb8cc7fd1ff19e3b87d15110\",\n \"score\": \"0.66264635\",\n \"text\": \"public static function loadResult() {\\n \\n $row = mysqli_fetch_row(self::$result);\\n\\t\\treturn $row[0]; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34af126678824b55e5c88c4b82ae002b\",\n \"score\": \"0.6624412\",\n \"text\": \"public function result()\\n {\\n $this->execute();\\n return $this->statement->fetch(PDO::FETCH_OBJ);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dba26098147b42c7f04225eec9b6f77c\",\n \"score\": \"0.6623738\",\n \"text\": \"function fetch_object($query) {\\n if ($query instanceof mysqli_result) {\\n return $query->fetch_object();\\n }\\n return FALSE;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"adf325386c8bf8a03197e835bc836775\",\n \"score\": \"0.66157824\",\n \"text\": \"public function fetchObject($queryresult, $class = \\\"\\\")\\n\\t{\\n\\t\\tif (empty($class))\\n\\t\\t{\\n\\t\\t\\treturn @mysqli_fetch_object($queryresult);\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\treturn @mysqli_fetch_object($queryresult, $class);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df5f3837f3062c58015a2fa0c4dca838\",\n \"score\": \"0.6599381\",\n \"text\": \"function query_row($query, $type = 'assoc')\\n {\\n $res = $this->query($query);\\n if ($type == 'assoc')\\n return $res->fetch(PDO::FETCH_ASSOC);\\n elseif ($type == 'array')\\n return $res->fetch(PDO::FETCH_NUM);\\n elseif ($type == 'object')\\n return $res->fetch(PDO::FETCH_OBJ);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1cf82f83b96609f201a47d17cecba4d6\",\n \"score\": \"0.65979654\",\n \"text\": \"public function loadObject()\\n {\\n $result = $this->query();\\n if ($result && is_object($result)) {\\n $obj = $result->fetch_object();\\n } else {\\n pre($result, 'loadObject()->result');\\n }\\n if ($obj) {\\n return $obj;\\n }\\n return null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2240a68a649b8702c85e9f8db692d630\",\n \"score\": \"0.659584\",\n \"text\": \"function fetchRow($fetchType = DBW_FETCH_ASSOC)\\n {\\n $fetchedRow = array();\\n if ($fetchType == DBW_FETCH_ASSOC) {\\n $fetchedRow = @mysql_fetch_assoc($this->_queryResult);\\n } elseif ($fetchType == DBW_FETCH_ORDERED) {\\n $fetchedRow = @mysql_fetch_row($this->_queryResult);\\n } else {\\n $fetchedRow = @mysql_fetch_object($this->_queryResult);\\n }\\n return $fetchedRow;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"165360199d7a183db150be7e817faec4\",\n \"score\": \"0.6578255\",\n \"text\": \"public function fetch() {\\n\\t\\t$result = mysqli_fetch_assoc ( $this->_result );\\n\\t\\t$this->freeResult ();\\n\\t\\treturn $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"598f9aa2fdbe9029862f7c6372983602\",\n \"score\": \"0.6575028\",\n \"text\": \"function\\tfetch_row()\\n\\t{\\n\\t\\treturn\\tarray();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6fd8d8a8f8d0139376a437add3810e7\",\n \"score\": \"0.65542966\",\n \"text\": \"public function fetch_row(){\\n\\t\\t\\n\\t\\techo \\\"fetch_row function from DB\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90291fce6366e2941f81f08f3d70520e\",\n \"score\": \"0.6552887\",\n \"text\": \"function fetchRow()\\n {\\n return sqlite_fetch_array($this->_result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25beb76180ed92f1e84f0e660faea45a\",\n \"score\": \"0.65407544\",\n \"text\": \"function execute_get_row($sql=\\\"\\\"){\\n\\t\\t$result_row = null;\\n\\t\\t$result = $this->conn->query($sql);\\n\\t\\tif ( $result === FALSE) {\\n\\t\\t\\t$this->db_error($sql);\\n\\t\\t}else{\\n\\t\\t\\t$result_row = $result->fetch_object();\\n\\t\\t}\\n\\t\\treturn $result_row;\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"faaf43d73f3e3611b81c844c7fa0f471\",\n \"score\": \"0.6522276\",\n \"text\": \"public function row($query, $params = null, $fetchmode = PDO::FETCH_ASSOC) {\\n $this->Init($query, $params);\\n $result = $this->sQuery->fetch($fetchmode);\\n $this->sQuery->closeCursor(); // Frees up the connection to the server so that other SQL statements may be issued,\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83817abb4ba8c21b4ecfadb1c3ebaf73\",\n \"score\": \"0.65194124\",\n \"text\": \"public function fetch_row($result) {\\n\\t\\t\\treturn mysqli_fetch_row($result);\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d6e13cea74ebb5f14ff243fb6ac34e9\",\n \"score\": \"0.6519034\",\n \"text\": \"function fetch(){\\n return mysqli_fetch_assoc($this->result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b85fddcdf6a91f7599ffac933dfe10c\",\n \"score\": \"0.65186757\",\n \"text\": \"function fetch(){\\n $row = false;\\n if( $this->result !== false && $this->result != null)\\n $row = mysql_fetch_assoc( $this->result );\\n \\n if( $row === false ) return false;\\n\\n foreach($row as $var => $value){\\n if( property_exists($this, $var) ){\\n $this->$var = $row[$var];\\n }\\n }\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"adf2e0f1228d4330d53b7af322349ab8\",\n \"score\": \"0.65090656\",\n \"text\": \"function FetchObject($Query)\\n {\\n\\t\\t$this->mySqlResult = mysqli_query($this->conn , $Query);\\n return (@mysqli_fetch_object($this->mySqlResult ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"add1eb954c2dc10f85c8d5ddf8511be8\",\n \"score\": \"0.65068585\",\n \"text\": \"public function fetch(){\\n\\t\\t\\t$data = $this->_adapter->fetchRow( $this->_selector );\\n\\t\\t\\t$this->_initSelector();\\n\\t\\t\\treturn $data;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2743cdd2e31aad7db05753621bf4acb4\",\n \"score\": \"0.6492311\",\n \"text\": \"function fetch()\\r\\n\\t{\\r\\n\\t\\tif($this->result)\\r\\n\\t\\t\\treturn mysql_fetch_object($this->result);\\r\\n\\t\\treturn 0;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7813f12fcce95195be3c0b39028f9ecd\",\n \"score\": \"0.64875615\",\n \"text\": \"public function fetch($record);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f63bbd1d4cc1b66bba35c8f5d01fdddd\",\n \"score\": \"0.6470256\",\n \"text\": \"function fetch(){\\n\\n if(isset($this->result)){\\n return $this->result->fetch_assoc();\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29f7f010104accd41a8435ba296c20c2\",\n \"score\": \"0.64622617\",\n \"text\": \"public function fetchResult() {\\n\\t\\tif ($row = $this->_result->fetch(PDO::FETCH_NUM)) {\\n\\t\\t\\t$resultRow = array();\\n\\t\\t\\tforeach ($this->map as $col => $meta) {\\n\\t\\t\\t\\tlist($table, $column, $type) = $meta;\\n\\t\\t\\t\\t$resultRow[$table][$column] = $row[$col];\\n\\t\\t\\t\\tif ($type === 'boolean' && $row[$col] !== null) {\\n\\t\\t\\t\\t\\t$resultRow[$table][$column] = $this->boolean($resultRow[$table][$column]);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\treturn $resultRow;\\n\\t\\t}\\n\\t\\t$this->_result->closeCursor();\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b73db83c3d338cc5e4a32498e3491bfa\",\n \"score\": \"0.64576864\",\n \"text\": \"public function fetch($result, $r_type=self::ARRAY_A)\\n\\t{\\n\\t\\t$db = self::$CURRENT_DB;\\n\\t\\tswitch($r_type)\\n\\t\\t{\\n\\t\\t\\tcase self::ARRAY_A: return $db->fetchAssoc($result);\\n\\t\\t\\tcase self::ARRAY_N: return $db->fetchRow($result);\\n\\t\\t\\tcase self::ARRAY_O: return $this->fetchObject($result);\\n\\t\\t\\tdefault: return (false === ($row = $db->fetchAssoc($result))) ? false : $this->createObject($row, $r_type);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d79bea502b32adbc28d42123ef5c815\",\n \"score\": \"0.6454141\",\n \"text\": \"private static function fromResultSet($res) {\\r\\n //We get all the values form the query\\r\\n $nickname = $res[UserADO::$colNameNickname];\\r\\n $userscore = $res[UserADO::$colNameUserscore];\\r\\n $firstname = $res[UserADO::$colNameFirstname];\\r\\n $lastname = $res[UserADO::$colNameLastname];\\r\\n $email = $res[UserADO::$colNameEmail];\\r\\n $password = $res[UserADO::$colNamePassword];\\r\\n $postalcode = $res[UserADO::$colNamePostalcode];\\r\\n\\r\\n //Object construction\\r\\n $entity = new User();\\r\\n $entity->setNickname($nickname);\\r\\n $entity->setUserscore($userscore);\\r\\n $entity->setFirstname($firstname);\\r\\n $entity->setLastname($lastname);\\r\\n $entity->setEmail($email);\\r\\n $entity->setPassword($password);\\r\\n $entity->setPostalcode($postalcode);\\r\\n return $entity;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"223fa12160c7344a0fe6f313e38bd1ef\",\n \"score\": \"0.64511794\",\n \"text\": \"public function loadObject($class = 'stdClass')\\n\\t{\\n\\t\\t// Initialise variables\\n\\t\\t$return = null;\\n\\n\\t\\t// Execute the query\\n\\t\\tif (!$this->execute())\\n\\t\\t{\\n\\t\\t\\treturn null;\\n\\t\\t}\\n\\n\\t\\t// Get the first row from the result set as an object of type $class\\n\\t\\tif ($row = $this->fetchObject($class))\\n\\t\\t{\\n\\t\\t\\t$return = $row;\\n\\t\\t}\\n\\n\\t\\t// Free up system resources and return\\n\\t\\t$this->freeResult();\\n\\n\\t\\treturn $return;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d3d04ea4fed6eeb3c7125a19427c13a\",\n \"score\": \"0.64437896\",\n \"text\": \"private static function fromResultSet( $res ) {\\n //recuperar valors dels camps\\n $idRepository = $res[ repositoriesClass::$colId];\\n $repositoryName = $res[ repositoriesClass::$colName];\\n $idUser = $res[ repositoriesClass::$colUser];\\n $idProject = $res[ repositoriesClass::$colProject];\\n\\n //construeix l'objecte\\n $entitat = new repositoriesClass();\\n $entitat->setIdRepository($idRepository);\\n $entitat->setRepositoryName($repositoryName); \\n $entitat->setIdUser($idUser);\\n $entitat->setIdProject($idProject);\\n //retornar objecte\\n return $entitat;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47b565e252e45547abf8c93d5f0f2b2b\",\n \"score\": \"0.64420706\",\n \"text\": \"protected function fetchRow($fetch_style = null, $fetch_argument = null, array $ctor_args = array())\\n {\\n if ($fetch_style === null) {\\n if (($fetch_style = $this->defaultFetchMode) !== null) {\\n $fetch_argument = $fetch_argument !== null ? $fetch_argument : $this->defaultFetchArgument;\\n $ctor_args = !empty($ctor_args) ? $ctor_args : $this->defaultFetchConstructorParams;\\n } else {\\n $fetch_style = \\\\PDO::FETCH_BOTH;\\n }\\n }\\n\\n if ($fetch_style == \\\\PDO::FETCH_COLUMN) {\\n $result = $this->result->fetch_array(MYSQLI_NUM);\\n\\n if (!$result) {\\n return $result;\\n }\\n\\n $column = intval($fetch_argument !== null ? $fetch_argument : $this->defaultFetchArgument);\\n\\n return isset($result[$column]) ? $result[$column] : null;\\n } elseif ($fetch_style == \\\\PDO::FETCH_FUNC) {\\n $result = $this->result->fetch_array(\\\\PDO::FETCH_BOTH);\\n\\n if (!$result) {\\n return $result;\\n }\\n\\n return call_user_func($fetch_argument, $result);\\n } elseif (in_array($fetch_style, array(\\\\PDO::FETCH_CLASS, \\\\PDO::FETCH_OBJ))) {\\n $fetch_argument = $fetch_argument && $fetch_style == \\\\PDO::FETCH_CLASS ? $fetch_argument : 'stdClass';\\n\\n return $ctor_args && $fetch_style == \\\\PDO::FETCH_CLASS\\n ? $this->result->fetch_object($fetch_argument, $ctor_args)\\n : $this->result->fetch_object($fetch_argument);\\n } elseif ($fetch_style == \\\\PDO::FETCH_INTO) {\\n $result = $this->result->fetch_array(MYSQLI_ASSOC);\\n\\n if (!$result) {\\n return $result;\\n }\\n\\n $this->hydrateObject(\\n $fetch_argument,\\n $result\\n );\\n\\n return true;\\n } elseif ($fetch_style == \\\\PDO::FETCH_BOUND) {\\n $result = $this->result->fetch_array(MYSQLI_BOTH);\\n\\n if (!$result) {\\n return $result;\\n }\\n\\n foreach ($this->resultBindings as $binding => $params) {\\n $value = isset($result[$binding - 1]) ? $result[$binding - 1] : null;\\n if ($params[2]) {\\n $value = mb_substr($value, 0, $params[2]);\\n }\\n if ($params[1]) {\\n $value = $this->castPDOToPHPType($value, $params[1]);\\n }\\n $params[0] = $value;\\n }\\n\\n return true;\\n }\\n\\n $styles = array(\\\\PDO::FETCH_BOTH, \\\\PDO::FETCH_ASSOC, \\\\PDO::FETCH_NUM);\\n $fetch_style = in_array($fetch_style, $styles) ? $fetch_style : reset($styles);\\n\\n return $this->result->fetch_array($this->mapFetchStyle($fetch_style));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ef0c5f402052568c895c1a28e2efa55\",\n \"score\": \"0.6431425\",\n \"text\": \"protected function fetchData() {\\n\\t\\t$dbm = DatabaseManager::open('__mfx');\\n\\t\\t$row = $dbm->getRow($this->getFetchDataQuery(), \\\\PDO::FETCH_ASSOC, $this->_key);\\n\\t\\t$dbm = NULL;\\n\\t\\treturn $row;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"836d931f48657760f0340d89c748ab53\",\n \"score\": \"0.6402869\",\n \"text\": \"public function fetch(): ResultInterface\\n {\\n if (!($this->stmnt instanceof PDOStatement)\\n || is_array(($result = $this->stmnt->fetchAll(PDO::FETCH_OBJ))) === false) {\\n return new Result([]);\\n }\\n\\n return new Result($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d74449328f25ea8a16173b2302d2ad5b\",\n \"score\": \"0.63741195\",\n \"text\": \"function fetchrow($res, $result_type = \\\"BOTH\\\")\\n {\\n if (!$res) {\\n return false;\\n }\\n switch ($result_type) {\\n case \\\"ASSOC\\\" :\\n $result_type = MSSQL_ASSOC;\\n break;\\n case \\\"NUM\\\" :\\n $result_type = MSSQL_NUM;\\n break;\\n default :\\n $result_type = MSSQL_BOTH;\\n }\\n $resFetch = @mssql_fetch_array($res, $result_type);\\n if (!$resFetch) {\\n $this->setErrorMessage();\\n echo $this->dbError;\\n return false;\\n } else {\\n return $resFetch;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3fff8de33fabad34c6d462447645ce8\",\n \"score\": \"0.63698447\",\n \"text\": \"public function fetch()\\n {\\n $serviceId = $this->_productId;\\n $table = $this->getTable();\\n $select = $table->select();\\n $select->where('product_id = ?', $serviceId);\\n $result = $table->fetchRow($select);\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4af35b9bd0cf3baaf5229692d186005a\",\n \"score\": \"0.6366414\",\n \"text\": \"public function itemToObject($row){\\n $hotelInfoObject = new HotelInfo($row['HotelId'], $row['Name'], $row['TelNr'], $row['Url'], $row['Preis'], $row['Stichwort'], $row['AnzZimmer']); \\n // var_dump($hotelInfoObject); \\n return $hotelInfoObject; \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0439100781901f2ff376d99335d805b1\",\n \"score\": \"0.63559157\",\n \"text\": \"public function fetch()\\n\\t{\\n\\t\\treturn $this->data = $this->ds->fetchAll();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87cd0fa3b43c5b14f77e29761fa5c30\",\n \"score\": \"0.63498294\",\n \"text\": \"function fetchRow() \\n { \\n return mysql_fetch_array($this->lastResult); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce1f5a9a09c7bca102592364c3ffad70\",\n \"score\": \"0.63434696\",\n \"text\": \"public function getRow($resultmode=PDO::FETCH_ASSOC) \\r\\n { \\r\\n if (!$this->statement)\\r\\n $this->statement = $this->prepare(); \\r\\n $this->statement->execute();\\r\\n $row = array();\\r\\n $row = $this->statement->fetch($resultmode);\\r\\n // Ef_Log::log ($row,'row');\\r\\n return $row;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3ce0c9b0a06f583664b5ec494bec1c8\",\n \"score\": \"0.63414466\",\n \"text\": \"public function fetchObject() {\\n return $this->cursor->getNext();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb0c3f3fcfddb9ba062f44b3fd2381dd\",\n \"score\": \"0.6337306\",\n \"text\": \"function rs_fetch_record(&$rs) {\\n global $CFG;\\n\\n if (!$rs) {\\n debugging('Incorrect $rs used!', DEBUG_DEVELOPER);\\n return false;\\n }\\n\\n $rec = $rs->FetchObj(); //Retrieve record as object without advance the pointer\\n\\n if ($rs->EOF) { //FetchObj requires manual checking of EOF to detect if it's the last record\\n $rec = false;\\n } else {\\n /// DIRTY HACK to retrieve all the ' ' (1 space) fields converted back\\n /// to '' (empty string) for Oracle. It's the only way to work with\\n /// all those NOT NULL DEFAULT '' fields until we definetively delete them\\n if ($CFG->dbfamily == 'oracle') {\\n $recarr = (array)$rec; /// Cast to array\\n array_walk($recarr, 'onespace2empty');\\n $rec = (object)$recarr;/// Cast back to object\\n }\\n /// End DIRTY HACK\\n }\\n\\n return $rec;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"793731cd92fc605dc60469c73a2551ed\",\n \"score\": \"0.6335422\",\n \"text\": \"public function fetchObject (string $sql, $params=[]) {\\r\\n $stmt = $this->prepareStatement($sql, $params);\\r\\n $rows = array();\\r\\n if ($stmt) {\\r\\n $stmt->execute();\\r\\n $result = $stmt->get_result();\\r\\n if ($result) {\\r\\n while ($row = $result->fetch_object()) {\\r\\n $rows[] = $row;\\r\\n }\\r\\n $result->free();\\r\\n }\\r\\n }\\r\\n return $rows;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fd7ab974e4722c77be15654ca2880f1\",\n \"score\": \"0.63340557\",\n \"text\": \"protected function _fetch()\\n {\\n // store the current query resource \\n $oldId = $this->getDb()->getQueryId();\\n \\n // set our own query resource in the database driver so we can use\\n // the atkDb::next_record() method and retrieve the new record\\n $this->getDb()->setQueryId($this->m_resource);\\n $this->getDb()->next_record();\\n $row = $this->getDb()->m_record;\\n \\n // restore the old query resource\\n $this->getDb()->setQueryId($oldId);\\n \\n return $row;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13be5f02cef23bae6055ef13d1503666\",\n \"score\": \"0.6328615\",\n \"text\": \"public function row( $query, $params = null, $fetchmode = PDO::FETCH_ASSOC )\\n {\\n $this->Init( $query, $params );\\n return $this->sqlQuery->fetch( $fetchmode );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f194c22bcd45944d17cb29a89ed00ab6\",\n \"score\": \"0.63267565\",\n \"text\": \"private function getObjByResult($result){ \\n //verifica tamanho do array\\n if(count($result)>1){ \\n $objects=array(); \\n foreach ($result as $k => $v){ \\n $objects[$k]=$this->getObjByRow($result[$k]);\\n }\\n return $objects;\\n }\\n else{ \\n return array($this->getObjByRow($result[0]));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f194c22bcd45944d17cb29a89ed00ab6\",\n \"score\": \"0.63267565\",\n \"text\": \"private function getObjByResult($result){ \\n //verifica tamanho do array\\n if(count($result)>1){ \\n $objects=array(); \\n foreach ($result as $k => $v){ \\n $objects[$k]=$this->getObjByRow($result[$k]);\\n }\\n return $objects;\\n }\\n else{ \\n return array($this->getObjByRow($result[0]));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f194c22bcd45944d17cb29a89ed00ab6\",\n \"score\": \"0.63267565\",\n \"text\": \"private function getObjByResult($result){ \\n //verifica tamanho do array\\n if(count($result)>1){ \\n $objects=array(); \\n foreach ($result as $k => $v){ \\n $objects[$k]=$this->getObjByRow($result[$k]);\\n }\\n return $objects;\\n }\\n else{ \\n return array($this->getObjByRow($result[0]));\\n }\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":759,"cells":{"query_id":{"kind":"string","value":"bf9f5fc07602775d17723a3ce77467e9"},"query":{"kind":"string","value":"calculate the days of current week"},"positive_passages":{"kind":"list like","value":[{"docid":"2f2e9133cc355b40b1c90d011d169ebd","score":"0.68500435","text":"public static function get_week_days() {\n $result = [];\n $day_of_week = date('N');\n $now = time();\n $day_of_week = $now - (static::OneDay * $day_of_week);\n\n for ($i=0 ; $i<7 ; $i++) {\n $day_of_week += static::OneDay;\n $result[] = [\"day_of_week\" => date(\"l\", $day_of_week),\"day\" => date('d', $day_of_week), \"month\" => date('F', $day_of_week), \"date\" => date(\"Y-m-d\", $day_of_week)];\n }\n return $result;\n }","title":""}],"string":"[\n {\n \"docid\": \"2f2e9133cc355b40b1c90d011d169ebd\",\n \"score\": \"0.68500435\",\n \"text\": \"public static function get_week_days() {\\n $result = [];\\n $day_of_week = date('N');\\n $now = time();\\n $day_of_week = $now - (static::OneDay * $day_of_week);\\n\\n for ($i=0 ; $i<7 ; $i++) {\\n $day_of_week += static::OneDay;\\n $result[] = [\\\"day_of_week\\\" => date(\\\"l\\\", $day_of_week),\\\"day\\\" => date('d', $day_of_week), \\\"month\\\" => date('F', $day_of_week), \\\"date\\\" => date(\\\"Y-m-d\\\", $day_of_week)];\\n }\\n return $result;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"a9e625e6660dcdb9fc9a28a9e9ba75e9","score":"0.761117","text":"public function getSumOfWeekDays()\n { \n $weekDays = 0;\n foreach($this->days as $day){\n $day = strtolower($day);\n if ($day != \"sat\" || $day != \"sun\"){\n $weekDays++;\n } \n }\n return $weekDays;\n }","title":""},{"docid":"aa7e8d4a5c01651ad6b11db0fe5d837d","score":"0.7576239","text":"protected function getWeekDays()\r\n\t{\r\n\t\treturn AdFox::getConstants('DAY_', static::class);\r\n\t}","title":""},{"docid":"38a6be2747835ae22ce839e89a14234f","score":"0.72816193","text":"public function getSumOfWeekendDays()\n { \n $weekendDays = 0;\n foreach($this->days as $day){\n $day = strtolower($day);\n if ($day == \"sat\" || $day == \"sun\"){\n $weekendDays++;\n } \n }\n return $weekendDays;\n }","title":""},{"docid":"d1ab11acd5fde6b96027d0bb429ec2b1","score":"0.71576136","text":"public function getWeekDay() {\n\t\n\t\treturn $this->dateArray[\"wday\"];\n\t\n\t}","title":""},{"docid":"96fb95a9d3df01e4d59c6c56109ad286","score":"0.709597","text":"function getWeekday() {\n return array_var($this->date_data, 'wday');\n }","title":""},{"docid":"d2f5ac4cd54bce8cbfc1135b5e5298e9","score":"0.7094398","text":"public function weekDays()\n {\n $day = 60*60*24;\n $weekDays = \"[\";\n for ($i=0;$i<7;$i++){\n $dayTime = time()-($day*$i);\n $weekDays .= '\"'.date('l', $dayTime).'\",'; \n }\n $weekDays = rtrim($weekDays, \",\").\"]\";\n return $weekDays;\n }","title":""},{"docid":"547cf53611db0e8d5b31d44224926da8","score":"0.7059245","text":"public function getWeekDays()\n {\n return $this->weekDays;\n }","title":""},{"docid":"547cf53611db0e8d5b31d44224926da8","score":"0.7059245","text":"public function getWeekDays()\n {\n return $this->weekDays;\n }","title":""},{"docid":"547cf53611db0e8d5b31d44224926da8","score":"0.7059245","text":"public function getWeekDays()\n {\n return $this->weekDays;\n }","title":""},{"docid":"97f915dd7587b83961114c80a466a267","score":"0.70183325","text":"public function wednesdays()\n {\n return $this->days(3);\n }","title":""},{"docid":"4820bde14026e2f59b14ac97b03846e2","score":"0.70159024","text":"public function getWeekDay()\n {\n return (int)$this->date->format('N');\n }","title":""},{"docid":"3582b18d03b68fc2a73a07ac7c5300b5","score":"0.69914687","text":"public static function getDayWeek()\n {\n return self::$dayOfWeek;\n }","title":""},{"docid":"3d5db4bcd387b70810ff9fe0045dacc5","score":"0.69036996","text":"private function calc_day()\n\t{\n\t\t\t\tif((($this->cal_week_add + 2) - $this->cal_first) > 0)\n\t\t\t\t\treturn ((($this->cal_week_add + 1) - $this->cal_first) % $this->cal_cur_month) + 1;\n\t\t\t\telse\n\t\t\t\t\treturn $this->cal_pre_month + (($this->cal_week_add + 2) - $this->cal_first);\n\t}","title":""},{"docid":"81a441ba89859d711085be349d137e85","score":"0.6894379","text":"public function addWeekday();","title":""},{"docid":"68b02fe7e9e91b1b14b3a1fcf78f046f","score":"0.68899524","text":"public function wednesdays()\n {\n return $this->days(Schedule::WEDNESDAY);\n }","title":""},{"docid":"78bedf537763af6491ec676b80c988ba","score":"0.6772702","text":"public function getWeekDay()\n {\n return (int)(clone $this->dateTime)->format('N');\n }","title":""},{"docid":"4b1462f6779babd359002149ba8d5125","score":"0.6766819","text":"public function getDaysOfWeek()\n {\n return $this->daysOfWeek;\n }","title":""},{"docid":"f1e31961bcbf4aa55492d182ec20233f","score":"0.676648","text":"public function weekCalculator($calf_id)\n {\n $today_date=date(\"m/d/Y\");\n $calf=$this->calfRecord($calf_id)[3];\n $calf_dob=date(\"m/d/Y\",strtotime($calf));\n\n\n $today_date = (string)$today_date;\n\n $today_f=DateTime::createFromFormat('m/d/Y',$today_date);\n $dob_f=DateTime::createFromFormat('m/d/Y',$calf_dob);\n\n return floor($today_f->diff($dob_f)->days/7);\n\n\n }","title":""},{"docid":"2b2238c8fb2682ba3d787ae7a29ed5bd","score":"0.67534876","text":"function getCurrentWeek()\n {\n $value_format = \"Y-m-d\";\n $start = date(\"U\") - (self::DAY * (date(\"w\") - 1));\n return date($value_format, $start) . \"_\" . date($value_format, ($start + (Date_Helper::DAY * 6)));\n }","title":""},{"docid":"f2de66ad82bb971a2c4c3209e9136d5c","score":"0.6732203","text":"function sumWeekCount($today) {\n\t\t$i = 0;\n\t\t$sum = 0;\n\t\t$_today = explode(\"/\", $today);\n\t\t$day = $_today[1];\n\t\t$month = $_today[0];\n\t\t$year = $_today[2];\n\t\t$todayjd = cal_to_jd(CAL_GREGORIAN, $month, $day, $year);\n\t\t\n\t\twhile (true) {\n\t\t\t$i++;\n\t\t\t$before = cal_from_jd($todayjd, CAL_GREGORIAN);\n\t\t\t$query = \"SELECT * FROM autotwitt WHERE day = '\".$before['date'].\"'\";\n\t\t\t$db = Mage::getSingleton('core/resource')->getConnection('core_read');\n\t\t\t$rs = $db->fetchAll($query);\n\t\t\tif ($rs == null || $i == 7) {\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t$dayCount = $rs[0]['count'];\n\t\t\t\t$sum += $dayCount;\n\t\t\t\t$todayjd--;\n\t\t\t}\n\t\t}\n\t\treturn $sum;\n\t}","title":""},{"docid":"39c12ec9860a98ab9eff61ca2bc86665","score":"0.66816914","text":"function getDaysOfWeek()\n {\n return $this->daysOfWeek;\n }","title":""},{"docid":"ce0bc0d9ba1f125b819aab83f2c8d17f","score":"0.6679157","text":"public function getWeekDay()\n {\n $engWeekDay = $this->dateTime->format('l');\n\n return $this->weekDays[$engWeekDay];\n }","title":""},{"docid":"59111bacd907fb9edf8566d2cf2643ca","score":"0.6674324","text":"public function saturdays()\n {\n return $this->days(6);\n }","title":""},{"docid":"b4c71ffe4ebbc15e2a2d0e29ff219524","score":"0.6619119","text":"public function subWeekday();","title":""},{"docid":"97aa7c25924cad3675fc8a68cf226316","score":"0.6581607","text":"public function weekdays()\n {\n return $this->days(Schedule::MONDAY.'-'.Schedule::FRIDAY);\n }","title":""},{"docid":"79dd21df8452e20e2370e2c9bb7d6e0b","score":"0.65512884","text":"function dayofweek($selecteddate)//accept date in YYYY-MM-DD format\r\n\t\r\n\t{\r\n\t\r\n\t\t$dayofweek = array('mdays','mday','wday');\r\n\t\r\n\t\tlist($y,$m,$d) = explode(\"-\",$selecteddate);\r\n\t\r\n\t\t$dayofweek[mdays] = $mdays=date(\"t\",mktime(0,0,0,$m,1,$y)); //days in the current month\r\n\t\r\n\t\t$dayofweek[mday] = date('w',mktime(0,0,0,$m,1,$y)); // day of the week the month started with\r\n\t\r\n\t\t$dayofweek[wday] = ($d+$first_day-1)%7;\r\n\t\r\n\t\treturn $dayofweek;\r\n\t\r\n\t}","title":""},{"docid":"68c8f3c255a7743010b4f4ead79dd5f9","score":"0.65269715","text":"#[Pure] public function getDaysWeek(): array\n {\n return $this->week->getDays()->all();\n }","title":""},{"docid":"7fb02ca68e655995133c64082971f9aa","score":"0.652394","text":"function getWorkedDays(){\n $day_number = date(\"d\");\n //echo date('Y-m-d H:i:s') ;\n //echo date('d-m-Y');\n $arWasHolidays = array();\n //узнаем как много праздников и выходных уже прошло на текущий день\n foreach ($this->arHolidays as $holiday) {\n if ($holiday <= $day_number) $arWasHolidays[] = $holiday;\n }\n return ($day_number - count($arWasHolidays));\n }","title":""},{"docid":"d075ab745f9e0eb198a5e0415da56963","score":"0.65028024","text":"public function getWeeks(){\n $start = $this->getStartingDay();\n $end = clone $start;\n $end->modify('+1 month -1day');\n $startWeek=intval($start->format('W'));\n $endWeek= intval($end->format('W'));\n if($endWeek===1){\n $endWeek = clone $end;\n $endWeek = intval($endWeek->modify('- 7 days')->format('W')) + 1;\n }\n $weeks = $endWeek - $startWeek + 1;\n if($weeks < 0){\n $weeks = intval($end->format('W'));\n }\n return $weeks;\n }","title":""},{"docid":"bf4416fcc23cce98d4858740ba7fce8d","score":"0.6459201","text":"public function daysOfWeek()\n {\n $days = explode(',', $this->daysOfWeek);\n if ($days[0] === '*') {\n return $this->returnFrame('day of the week');\n }\n if ($this->isRecurring($days[0])) {\n return [];\n }\n if ($this->isRange($days[0])) {\n return $this->returnFrame('days of the week', $days[0]);\n }\n return array_map(function ($day) {\n return $this->dayMapping[$day];\n }, $days);\n }","title":""},{"docid":"f2f3e406721325c7835e63f04ee83cad","score":"0.6454439","text":"public function isWeekday();","title":""},{"docid":"dc4823f5b6c5e8dfcd82e2974f51600e","score":"0.64422923","text":"public function sundays()\n {\n return $this->days(0);\n }","title":""},{"docid":"b611f0cb9637504eab70330a10c73008","score":"0.64374477","text":"public function getWeeks(): int {\n\n$start=$this->getStartingDay(); /*format date début du mois*/\n$end= (clone $start)->modify('+1 month -1 day');/*date de fin du mois-> modification de la copie de $start */\nif($this->month==12){ /*tjr 31 jours en decembre*/\n$weeks= 6;/* 4 weeks and 2 days*/\n}else{\n$weeks= intval($end->format('W'))- intval($start->format('W'))+1;/*nbr de semaine ds ce mois*/\n}\n/* format('W'): Numéro de semaine dans l'année Exemple : 42 (la 42ème semaine de l'année)*/\n\n\nif($weeks<0){/*dans le cas de janvier (1er mois de l'annee)*/\n $weeks=intval($end->format('W'));// exemple ($end= la 5ème semaine de l'année et du mois de janvier)\n }\n\n\nreturn $weeks;\n}","title":""},{"docid":"76cae861b1bf2117de45d61a6efbe8ae","score":"0.642669","text":"public function mondays()\n {\n return $this->days(1);\n }","title":""},{"docid":"03612a6307bf7df5b2cd1cc0bf7604dc","score":"0.6418784","text":"public function getDayOfTheWeek() : DayOfWeek\n {\n return new DayOfWeek((int)$this->dateTime->format('N'));\n }","title":""},{"docid":"6702d3e5d7d6aefad5a98abd4c61d5de","score":"0.64037085","text":"function getDefaultWeekday()\n {\n return APP_DEFAULT_WEEKDAY;\n }","title":""},{"docid":"1ee34e06630e1d06c53603c85ff22f11","score":"0.6401438","text":"public function addWeekdays($value);","title":""},{"docid":"4069c0056d8a861477d5e1edfbada61c","score":"0.6383774","text":"function week_day($dif) {\n $jd = cal_to_jd(CAL_GREGORIAN, date(\"m\"), date(\"d\", strtotime($dif)), date(\"Y\"));\n $day = jddayofweek($jd, 1);\n return $day;\n}","title":""},{"docid":"c7ef58a0d02c8150c3215dc344b22006","score":"0.63776153","text":"public function WeekDay($fecha){ \t\n\t$fecha=str_replace(\"/\",\"-\",$fecha);\n\tlist($dia,$mes,$anio)=explode(\"-\",$fecha);\n\treturn (((mktime ( 0, 0, 0, $mes, $dia, $anio) - mktime ( 0, 0, 0, 7, 17, 2006))/(60*60*24))+700000) % 7;\n}","title":""},{"docid":"b9a19fe1b4698bb6d47cf8e3f4f6075a","score":"0.63658124","text":"function getDayOfWeek()\n {\n return $this->_dayNameToDayNum( strftime( '%a' , $this->timeStamp) );\n }","title":""},{"docid":"72a82abf1fbf49cf39ab3801b02bad89","score":"0.63610774","text":"public function subWeekdays($value);","title":""},{"docid":"ecf1ebab8e19c7a395a3b16a331b6c5a","score":"0.635277","text":"public function getServiceDayOfWeek()\n {\n //for use in converting to days of week\n $day = date('l',\n mktime($this->_serviceDate['hour'],\n $this->_serviceDate['minute'],\n $this->_serviceDate['second'],\n $this->_serviceDate['month'],\n $this->_serviceDate['day'],\n $this->_serviceDate['year']));\n return $day;\n }","title":""},{"docid":"8cfeacbbacc820d5f38c55c66f12981d","score":"0.63117033","text":"function api_get_week_days_short($language = null) {\n $days = &_api_get_day_month_names($language);\n return $days['days_short'];\n}","title":""},{"docid":"14623ea3a70f0b4d698059ba59cd739f","score":"0.6306058","text":"public function getWeekDays() {\n $day_array = [];\n\n array_push($day_array, $this->getWeekStartDate());\n array_push($day_array, date('Y-m-d', strtotime('next tuesday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next wednesday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next thursday', strtotime($this->getWeekStartDate()))));\n array_push($day_array, date('Y-m-d', strtotime('next friday', strtotime($this->getWeekStartDate()))));\n\n return $day_array;\n }","title":""},{"docid":"092c2c6da27476558e1763c14efb3461","score":"0.63043976","text":"public function getShortWeekDays()\n {\n return $this->shortWeekDays;\n }","title":""},{"docid":"053aa1297abc3e1f211a8b1aab91998f","score":"0.62934226","text":"function firstDayOfWeek()\n {\n $currentWeek = new DateTime();\n $curDate = date_format($currentWeek, \"Y-m-d\");\n $time = new DateTime($curDate);\n //echo $time->format(\"Y-m-d\") . \"\\n\";\n // number of day\n $day = date('w');\n $time->sub(new DateInterval('P' . $day . 'D'));\n return $time->format(\"Y-m-d\");\n }","title":""},{"docid":"f2a7a0c95801bb147b8b462f4c45a2fd","score":"0.62911147","text":"public function weekends()\n {\n return $this->days(Schedule::SATURDAY.','.Schedule::SUNDAY);\n }","title":""},{"docid":"a282749b306ebb59e44e80e054439fa3","score":"0.6252139","text":"function getWeek() {\n return (integer) date('W', $this->getTimestamp());\n }","title":""},{"docid":"57c233256816ec7a7814bd30c97db6d0","score":"0.6235814","text":"public function fridays()\n {\n return $this->days(Schedule::FRIDAY);\n }","title":""},{"docid":"de9d05232ef1701b6c665e8394f6d225","score":"0.6221336","text":"public function offsetToMonday($date);","title":""},{"docid":"c12dfab3da61c6e752609f057dec7f2d","score":"0.6219177","text":"function dateOfWeek($Ymd, $day) {\n\tglobal $week_start_day;\n\t//global $phpiCal_config;\n\t//config\n\n\t//fin config\n\n\t//if (isset($phpical_config->week_start_day)) $week_start_day = $phpiCal_config->week_start_day;\n\n\t$timestamp = strtotime($Ymd);\n\t$num = date('w', strtotime($week_start_day));\n\t$start_day_time = strtotime((date('w',$timestamp)==$num ? \"$week_start_day\" : \"last $week_start_day\"), $timestamp);\n\t$ret_unixtime = strtotime($day,$start_day_time);\n\t// Fix for 992744\n\t// $ret_unixtime = strtotime('+12 hours', $ret_unixtime);\n\t$ret_unixtime += (12 * 60 * 60);\n\t$ret = date('Y-m-d',$ret_unixtime);\n\treturn $ret;\n}","title":""},{"docid":"63eba3690c13bfc6eec80c66b91ff05a","score":"0.62177026","text":"public function getDayOfWeek() {\n return $this->wday;\n }","title":""},{"docid":"11c42c591bb5d21a64b1895a57a1ba3d","score":"0.62173855","text":"public function list_days_of_the_week($respect_start_of_week = true) {\n\t\tglobal $wp_locale;\n\t\t$days_of_the_week = array();\n\t\t$i = $j = $respect_start_of_week ? get_option('start_of_week', 1) : 1;\n\t\twhile ($i < $j+7) { // 7 days\n\t\t\t$days_of_the_week[] = array(\n\t\t\t\t'index' => $i % 7,\n\t\t\t\t'value' => $wp_locale->get_weekday($i % 7),\n\t\t\t);\n\t\t\t$i++;\n\t\t}\n\t\treturn $days_of_the_week;\n\t}","title":""},{"docid":"fa0b4ff211fc037f74b4783773cc6edf","score":"0.62117934","text":"static function date_diff_weekdays($from, $to) {\n if ($from === null || $to === null)\n return null;\n $date_from = new \\DateTime($from);\n $date_to = new \\DateTime($to);\n // calculate number of weekdays from start of week - start date\n $from_day = intval($date_from->format('w')); // 0 (for Sunday) through 6 (for Saturday)\n if ($from_day == 0)\n $from_day = 7;\n $from_wdays = $from_day > 5 ? 5 : $from_day;\n // calculate number of weekdays from start of week - end date\n $to_day = intval($date_to->format('w'));\n if ($to_day == 0)\n $to_day = 7;\n $to_wdays = $to_day > 5 ? 5 : $to_day;\n // calculate number of days between the two dates\n $interval = $date_from->diff($date_to);\n $days = intval($interval->format('%R%a')); // shows negative values too\n // calculate number of full weeks between the two dates\n $weeks_between = floor($days / 7);\n if ($to_day >= $from_day)\n $weeks_between -= 1;\n // complete calculation of number of working days between\n $diff_wd = 5 * ($weeks_between) + (5 - $from_wdays) + $to_wdays;\n return $diff_wd;\n }","title":""},{"docid":"a9e00589f133b84e2133734249ab2880","score":"0.6210752","text":"public function getAllThisWeek();","title":""},{"docid":"039fa41fa80a1a23e178b0a7d1ff6763","score":"0.62085694","text":"public function getDayOfWeekIndex()\r\n\t{\r\n\t\t$dayOfWeek = strtolower(date(\"D\"));\r\n\t\t$offset = self::$days[$dayOfWeek];\r\n\t\treturn $offset;\r\n\t}","title":""},{"docid":"4e080b6b74655513e1fbd2a465975dc7","score":"0.62023205","text":"public function getFirstWeekDay()\n {\n return (int)(new DateTime($this->date->format('Y-m-01')))->format('N');\n }","title":""},{"docid":"21a287c2822fad8cfa1d6b74adf1c9ba","score":"0.6173416","text":"public static function dayWeeks($date){\r\n\t\t$date = self::convert($date, 'eua');\r\n\t\t\r\n\t\t$year = substr($date, 0, 4);\r\n\t\t$month = substr($date, 5, -3);\r\n\t\t$day = substr($date, 8, 9);\r\n\t\t$dayWeeks = date('w', mktime(0, 0, 0,$month, $day, $year));\r\n\t\treturn $dayWeeks + 1;\r\n\t}","title":""},{"docid":"0be7f4706e82f8819335118614a9f127","score":"0.61727613","text":"function getDaysOffered() {\n global $connection;\n $query = \"SELECT * FROM DaysOfWeek ORDER BY sort\";\n\n $days = $connection->query($query);\n return $days;\n }","title":""},{"docid":"fbbf3b8debdc46f05e84142c36e3acad","score":"0.6172187","text":"public function fridays()\n {\n return $this->days(5);\n }","title":""},{"docid":"144b24bd4ee2ece7df8a4ba72ab5605d","score":"0.61500466","text":"public function addWeek();","title":""},{"docid":"e2c7ae0b5ae242654e99b59c02416027","score":"0.61492944","text":"public function Weekday ( $iso = true )\n // zwischen 0 (f&uuml;r Sonntag) und 6 (f&uuml;r Samstag)\n {\n\n\t// static $ary_iso_weekday = array( 7, 1, 2, 3, 4, 5, 6 );\n\n\tif ( $iso ) {\n\n\t if ( $this->m_dow == self::DOW_SUNDAY ) return self::ISO_SUNDAY;\n\n\t}\n\n\n return $this->m_dow;\n\n }","title":""},{"docid":"5654f9c90cc6e8a70e8fd988f53ef6be","score":"0.61433715","text":"public function weekDates()\n {\n $day = 60*60*24;\n $weekDates = array();\n for ($i=0;$i<7;$i++){\n $dayTime = time()-($day*$i);\n array_push($weekDates,date('Y-m-d',$dayTime));\n }\n return $weekDates;\n }","title":""},{"docid":"3caeff2c3885335f3f2f5efd560ee901","score":"0.61311173","text":"function day_of_the_week( $old_date ){\n\t\t$new_date = $old_date . ', ' . date( 'l' );\n\t\treturn $new_date;\t\n\t}","title":""},{"docid":"7f9b413e8eafc39eb9fee4c8044ff755","score":"0.61144805","text":"public function sundays()\n {\n return $this->days(Schedule::SUNDAY);\n }","title":""},{"docid":"3d9a1f60cff64faa2a2cf99e36ea57d3","score":"0.61101574","text":"private function dayOfWeek()\n {\n return (new Hexpress())\n ->find(function ($hex) {\n $hex->either([\n $this->FWS(),\n (new Hexpress())->maybe($this->FWS())->has($this->dayName()),\n $this->obsDayOfWeek(),\n ]);\n }, 'dayOfWeek');\n }","title":""},{"docid":"04167270ddef5e9a5d30b1754a87ea07","score":"0.61006516","text":"public function dayOfWeek($until = 'now'): string;","title":""},{"docid":"4e5d5abf000f2abf23bafb0b6650c40c","score":"0.6091511","text":"public function getWeeks(): int{\n /* Explication de la logique :\n 1. A partir de la date du premier jour du mois,\n 2. on détermine le dernier jour du mois\n 3. le numéro de semaine de l'année du dernier jour du mois - le numéro de semaine de l'année du premier jour du mois = le nombre de semaines dans le mois\n */\n // 1. $start sera le jour 1 du mois et année passé en paramètre de la construct de l'objet\n $start = new \\DateTime(\"{$this->year}-{$this->month}-01\"); // \n // 2. $end sera le dernier jour du mois passé en param à la construct de l'objet (clone) permet de ne pas modifier le contenu de $start (seulement le cloner ponctuellement)\n $end = (clone $start)->modify('+1 month -1 day'); // méthode modify() (de DateTime) qui ajoute un mois - 1 jours à la date de départ\n \n //dump((clone $start)->modify('+1 month -1 day'));\n //dump($end->format('W'));\n \n\n $numberEnd = $end->format('W');\n\n // Condition pour les années à 52 semaines\n if($numberEnd == \"01\"){\n $end->modify('+360 day');\n }\n //dump(\"Start vaut : \" . $start->format('W'));\n //dump(\"numberEnd vaut : \" . $numberEnd . \" et end vaut cette fois : \" . $end->format('W'));\n \n // 3. $week sera le nb de semaine du mois (numéro de semaine de dernier jour - numéro de semaine du premier jour)\n $weeks = intval($end->format('W')) - intval($start->format('W')) + 1; // méthode format() va formater notre date en numéro de semaine ('W')\n\n //dump(intval($end->format('W')), intval($start->format('W'))); //Affiche le numéro de semaine de la date de fin du mois et le numéro de semaine de la date de début \n\n // Condition pour éviter les erreurs avec les jours du mois de janvier qui sont dans entre 2 numéro de semaine (fin d'année = s52 ou s53 début = s1)\n // $week retournera alors un nombre négatif, dans ce cas\n if($weeks < 0){\n // Alors le numéro de semaine sera égal au numéro de semaine du dernier jour du mois (simplement)\n $weeks = intval($end->format('W'));\n }\n return $weeks;\n }","title":""},{"docid":"66b29f2dfb595f16091e2bb023cd0607","score":"0.6083109","text":"public function mapDayWeek($date)\n {\n\n return ($date)==6?1:$date+2;\n }","title":""},{"docid":"d625135d9f3e484e29dbd941efa695e4","score":"0.60801166","text":"public function isWeekday()\n {\n return ($this->numeric(\"N\") <= Days::FRIDAY);\n }","title":""},{"docid":"50a6e382a7e98f3811b1c361a4adc072","score":"0.60778743","text":"private function getDays()\n {\n $first_day_of_week = date('w', mktime(0, 0, 0, $this->month, 1, $this->year));\n $days_count = date('d', mktime(0, 0, 0, $this->month + 1, 0, $this->year));\n\n $days_of_week = $this->days_of_week;\n // Sunday can be set as either 0 or 7 in cron. For our purposes 0 is probably better\n if (isset($days_of_week[7])) {\n unset($days_of_week[7]);\n $days_of_week[0] = true;\n }\n\n $days_of_week_skipped = false;\n if (array_keys($days_of_week) === range(0, 6)) {\n $days_of_week = array();\n $days_of_week_skipped = true;\n }\n\n $days_of_month = $this->days_of_month;\n foreach ($days_of_month as $day => $_) {\n if ($day > $days_count || $day < 1) {\n unset($days_of_month[$day]);\n }\n }\n\n $days_of_month_skipped = false;\n if (array_keys($days_of_month) === range(1, $days_count)) {\n $days_of_month = array();\n $days_of_month_skipped = true;\n }\n\n if ($days_of_month_skipped && $days_of_week_skipped) {\n $result = array();\n for ($i = 1; $i <= $days_count; $i++) $result[$i] = true;\n return $result;\n }\n\n $result = $days_of_month;\n for ($i = 1; $i <= $days_count; $i++) {\n if (isset($days_of_week[($first_day_of_week + $i - 1) % 7])) {\n $result[$i] = true;\n }\n }\n\n ksort($result, SORT_NUMERIC);\n return $result;\n }","title":""},{"docid":"07f7ebe976b5e47d4497c040828c8a7b","score":"0.6069283","text":"public static function DayOfWeeks($m,$d,$y)\n {\n $yo=$y-(14-$m)/12;\n\t echo($yo);\n\t\n\t$x=$yo+$yo/4-$yo/100+$yo/400;\n\techo($x);\n\t\n\t $mo= $m+12*((14-$m)/12)-2;\n\t echo($mo);\n\t\n\t$do1=(($d+$x+31*$mo)/12)% 7;\n\t echo($do1);\n }","title":""},{"docid":"a24b09a37f8f741dc4d1f86e24ff5d9d","score":"0.60682654","text":"function weekStart($date) {\n\t\treturn \"(DATE_TRUNC('week', $date::DATE) - '1 days'::INTERVAL)::DATE\";\n\t}","title":""},{"docid":"40d6ac109835404ed69b55ef1d14a7d8","score":"0.60623515","text":"private function weekDays()\n {\n $html = \"\";\n foreach ($this->weekDays as $day) {\n $html .= \"\" . $day . \"\";\n }\n return $html;\n }","title":""},{"docid":"7bfa19d228b819429dd47b58f1f891b5","score":"0.6061454","text":"public function getWorkingDays($startDate,$endDate){\n\t //We add one to inlude both dates in the interval.\n\t $days = (strtotime($endDate) - strtotime($startDate)) / 86400 + 1;\n\n\t $no_full_weeks = floor($days / 7);\n\n\t $no_remaining_days = fmod($days, 7);\n\n\t //It will return 1 if it's Monday,.. ,7 for Sunday\n\t $the_first_day_of_week = date(\"N\",strtotime($startDate));\n\n\t $the_last_day_of_week = date(\"N\",strtotime($endDate));\n\t // echo $the_last_day_of_week;\n\t //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\n\t //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\n\t if ($the_first_day_of_week <= $the_last_day_of_week){\n\t if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\n\t if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\n\t }\n\n\t else{\n\t if ($the_first_day_of_week <= 6) {\n\t //In the case when the interval falls in two weeks, there will be a Sunday for sure\n\t $no_remaining_days--;\n\t }\n\t }\n\n\t //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n\t\t//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n\t $workingDays = $no_full_weeks * 5;\n\t if ($no_remaining_days > 0 )\n\t {\n\t $workingDays += $no_remaining_days;\n\t }\n\n\t //We subtract the holidays\n\t\t/* foreach($holidays as $holiday){\n\t $time_stamp=strtotime($holiday);\n\t //If the holiday doesn't fall in weekend\n\t if (strtotime($startDate) <= $time_stamp && $time_stamp <= strtotime($endDate) && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\n\t $workingDays--;\n\t }*/\n\n\t return $workingDays;\n\t}","title":""},{"docid":"b40750486de14a751327eb832e4b5ad9","score":"0.6057812","text":"public function triggeringDays()\n {\n $days = '';\n if (\n $this->is_triggered_on_monday &&\n $this->is_triggered_on_tuesday &&\n $this->is_triggered_on_wednesday &&\n $this->is_triggered_on_thursday &&\n $this->is_triggered_on_friday &&\n $this->is_triggered_on_saturday &&\n $this->is_triggered_on_sunday\n ) {\n $days = 'all days';\n } else if (\n $this->is_triggered_on_monday &&\n $this->is_triggered_on_tuesday &&\n $this->is_triggered_on_wednesday &&\n $this->is_triggered_on_thursday &&\n $this->is_triggered_on_friday\n ) {\n $days = 'week days';\n } else if (\n $this->is_triggered_on_saturday &&\n $this->is_triggered_on_sunday\n ) {\n $days = 'weekend';\n } else {\n if ($this->is_triggered_on_monday) {\n $days.= 'Monday';\n }\n if ($this->is_triggered_on_tuesday) {\n $days.= ($days === '' ? '' : ', ') . 'Tuesday';\n }\n if ($this->is_triggered_on_wednesday) {\n $days.= ($days === '' ? '' : ', ') . 'Wednesday';\n }\n if ($this->is_triggered_on_thursday) {\n $days.= ($days === '' ? '' : ', ') . 'Thursday';\n }\n if ($this->is_triggered_on_friday) {\n $days.= ($days === '' ? '' : ', ') . 'Friday';\n }\n if ($this->is_triggered_on_saturday) {\n $days.= ($days === '' ? '' : ', ') . 'Saturday';\n }\n if ($this->is_triggered_on_sunday) {\n $days.= ($days === '' ? '' : ', ') . 'Sunday';\n }\n $search = ',';\n $replace = ' and';\n $days = strrev(implode(strrev($replace), explode(strrev($search), strrev($days), 2)));\n }\n return $days;\n }","title":""},{"docid":"af812505707b21d4ce11bcd5cb6bb651","score":"0.6050267","text":"public function subWeek();","title":""},{"docid":"0a1fd71091209ef3bcc8c81de17185bf","score":"0.602822","text":"function getWorkingDays($startDate, $endDate, $lamakerja){\n\t\t $begin=strtotime($startDate);\n\t\t $end=strtotime($endDate);\n\t\t if($begin>$end){\n\t\t echo \"Tanggal start harus lebih kecil dari tanggal akhir!\";\n\t\t return '';\n\t\t }else{\n\t\t $no_days=0;\n\t\t $weekends=0;\n\t\t while($begin<=$end){\n\t\t $no_days++; // no of days in the given interval\n\t\t $what_day=date(\"N\",$begin);\n\t\t if($what_day>$lamakerja) { // 6 and 7 are weekend days\n\t\t $weekends++;\n\t\t };\n\t\t $begin+=86400; // +1 day\n\t\t };\n\t\t $working_days=$no_days-$weekends;\n\t\t return $working_days;\n\t\t }\n\t\t}","title":""},{"docid":"e6af67f9b34c20597d0c309e843e320a","score":"0.60219663","text":"public function saturdays()\n {\n return $this->days(Schedule::SATURDAY);\n }","title":""},{"docid":"cdd3d6acc594ae5d5e95accf032c92d8","score":"0.60212904","text":"public function mondays()\n {\n return $this->days(Schedule::MONDAY);\n }","title":""},{"docid":"f9288bd65ab21ad54e43c0c6f54b0b59","score":"0.6009974","text":"function jddayofweek ($julianday, $mode = null) {}","title":""},{"docid":"1d8921a7fe15bc00a952babcb1ab99a0","score":"0.6004401","text":"function get_start_day_of_week(){\n\t\treturn $this->start_day_of_week;\n\t}","title":""},{"docid":"02ec1759a3385af88b4d977a4852cf85","score":"0.5996656","text":"static public function Weekday($w, $short = false) {\r\n\t\tswitch ($w%7) {\r\n\t\t\tcase 0: return $short ? __('Sun') : __('Sunday');\r\n\t\t\tcase 1: return $short ? __('Mon') : __('Monday');\r\n\t\t\tcase 2: return $short ? __('Tue') : __('Tuesday');\r\n\t\t\tcase 3: return $short ? __('Wed') : __('Wednesday');\r\n\t\t\tcase 4: return $short ? __('Thu') : __('Thursday');\r\n\t\t\tcase 5: return $short ? __('Fri') : __('Friday');\r\n\t\t\tcase 6:\r\n\t\t\tdefault: return $short ? __('Sat') : __('Saturday');\r\n\t\t}\r\n\t}","title":""},{"docid":"cc5f9a6fe52e63cdc2121fc991a64680","score":"0.5996038","text":"public function all_day() : int\n\t{\n\t\treturn $this->_day_all;\n\t}","title":""},{"docid":"df0095b4f487e9f3d2f29640daf17135","score":"0.59850574","text":"function getSchoolDays($start_date_token, $today_token){\n $count_days = 1;\n $new_num_days = 0;\n $last_day = $start_date_token;\n \n //Get Num Days\n $num_days = dateDifference($start_date_token, $today_token, '%a');\n \n //echo \"NUM DAYS $num_days\";\n \n //echo \"
    START DAY $last_day\";\n //Weekends\n $weekends = array (\"Sat\", \"Sun\");\n \n while ($count_days <= $num_days){\n $next_day = add_date($last_day,1,0,0);\n $next_day_tokens = explode(\" \", $next_day);\n \n //echo \"
    NEXT DAY $next_day\";\n \n $year = $next_day_tokens[2];\n $month_items = explode(\":\", $next_day_tokens[1]);\n $day_items = explode(\":\", $next_day_tokens[0]);\n $clock_items = explode(\":\", $next_day_tokens[3]);\n \n //Check Weekends\n if (in_array($day_items[0], $weekends)){\n //Do Nothing\n } elseif (isHoliday($next_day)) {//Check Holidays\n //Do Nothing\n } else {\n $new_num_days++;\n }\n\n $next_day = \"$year-$month_items[1]-$day_items[1]\";\n $last_day = $next_day;\n $count_days++;\n }\n \n //echo \"
    NUM SCHOOL DAYS $new_num_days\";\n \n return $new_num_days;\n \n \n}","title":""},{"docid":"936e27f125042d786dddb087049379d2","score":"0.59795785","text":"function getWorkingDays($startDate,$endDate,$holidays){\n\t $endDate = strtotime($endDate);\n\t $startDate = strtotime($startDate);\n\t\n\t\n\t //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\n\t //We add one to inlude both dates in the interval.\n\t $days = ($endDate - $startDate) / 86400 + 1;\n\t\n\t $no_full_weeks = floor($days / 7);\n\t $no_remaining_days = fmod($days, 7);\n\t\n\t //It will return 1 if it's Monday,.. ,7 for Sunday\n\t $the_first_day_of_week = date(\"N\", $startDate);\n\t $the_last_day_of_week = date(\"N\", $endDate);\n\t\n\t //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\n\t //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\n\t if ($the_first_day_of_week <= $the_last_day_of_week) {\n\t if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\n\t if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\n\t }\n\t else {\n\t // (edit by Tokes to fix an edge case where the start day was a Sunday\n\t // and the end day was NOT a Saturday)\n\t\n\t // the day of the week for start is later than the day of the week for end\n\t if ($the_first_day_of_week == 7) {\n\t // if the start date is a Sunday, then we definitely subtract 1 day\n\t $no_remaining_days--;\n\t\n\t if ($the_last_day_of_week == 6) {\n\t // if the end date is a Saturday, then we subtract another day\n\t $no_remaining_days--;\n\t }\n\t }\n\t else {\n\t // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\n\t // so we skip an entire weekend and subtract 2 days\n\t $no_remaining_days -= 2;\n\t }\n\t }\n\t\n\t //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\n\t//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\n\t $workingDays = $no_full_weeks * 5;\n\t if ($no_remaining_days > 0 )\n\t {\n\t $workingDays += $no_remaining_days;\n\t }\n\t\n\t //We subtract the holidays\n\t foreach($holidays as $holiday){\n\t $time_stamp=strtotime($holiday);\n\t //If the holiday doesn't fall in weekend\n\t if ($startDate <= $time_stamp && $time_stamp <= $endDate && date(\"N\",$time_stamp) != 6 && date(\"N\",$time_stamp) != 7)\n\t $workingDays--;\n\t }\n\t\n\t return $workingDays;\n\t}","title":""},{"docid":"0f61cae11d274cef88f151e62e0afef3","score":"0.59783185","text":"function weekday($fyear, $fmonth, $fday){\n\t return (((mktime ( 0, 0, 0, $fmonth, $fday, $fyear) - mktime ( 0, 0, 0, 7, 17, 2006))/(60*60*24))+700000) % 7;\n\t}","title":""},{"docid":"310bac1cb41af5b55cc1b29c205f1185","score":"0.59746337","text":"public function getAllThisWeek()\n {\n $now = Carbon::today();\n $today = $now->toDateString();\n $last_sun = new Carbon('last sunday');\n $last_sunday = $last_sun->toDateString();\n\n return $this->admin->whereBetween('date_created', array($last_sunday, $today))->count();\n }","title":""},{"docid":"a341aa8768273c47e8b72481a69a42a3","score":"0.5972178","text":"public function weekdays()\n {\n return $this->spliceIntoPosition(5, '1-5');\n }","title":""},{"docid":"6848ad40b849d36f5aef34773b051bac","score":"0.59563684","text":"public static function getDayOfWeek($wdt) {\n\t\treturn floor($wdt/86400)%7;\n\t}","title":""},{"docid":"9f030f2586f6c93e7cabe14cdd06def8","score":"0.594983","text":"public function startOfWeek();","title":""},{"docid":"10406dab7d4d4e7ca1fc1b0a5ff3e562","score":"0.59454536","text":"public function getDayIndex ()\n\t{\n\t\treturn date(\"w\", $this->stamp);\n\t}","title":""},{"docid":"9401c6c20574576ecd1c181d5f3f37f0","score":"0.5934502","text":"public function run()\n {\n $startDate = new Carbon();\n $startDate->setDate(1901, 1, 1);\n $endDate = new Carbon();\n $endDate->setDate(2000, 12, 31);\n $sundays = 0;\n while ($startDate->lt($endDate)) {\n if ($startDate->dayName === 'Sunday') {\n $sundays++;\n }\n $startDate->addMonthNoOverflow();\n }\n return $sundays;\n }","title":""},{"docid":"182426db09665eb9373260e4130b15c0","score":"0.59289515","text":"public function getWeeks(): int\n {\n $start = $this->getFirstDay();\n $end = (clone $start)->modify('+1 month -1 day');\n $weeks = intval($end->format('W')) - intval($start->format('W')) + 1;\n if ($weeks < 0) {\n $weeks = intval($end->format('W'));\n }\n return $weeks;\n }","title":""},{"docid":"b62cd8c3348e869117396648701601a8","score":"0.5919392","text":"public function convert_to_days(){\r\n\t\t// \t\t March 3, 2012 would extract 31+28+3 days...\r\n\r\n\t\t$days = 0;\r\n\t\tfor ($i=1; $i<$this->get_month(); $i++){\r\n\t\t\t$days += $this->check_how_many_days($i);\r\n\t\t} $days += $this->get_day();\r\n\r\n\t\treturn $days;\r\n\t}","title":""},{"docid":"1e9efa926a414877efbe79e1840ed616","score":"0.5913604","text":"public function getWeekDay($index)\n {\n return $this->weekDays[$index];\n }","title":""},{"docid":"46129cf419ddfcafc93fcbb7150d0e37","score":"0.5895338","text":"public function check_curent_week($given_date = null){\n\t\tdefine('LIMIT',8);\n\t\t$current_moday = date_create($given_date);\n\t\t$current_freeday = date_create($given_date);\n\n\t\t$current_day = date_format($current_moday, 'N');\n\n\t\tif($current_day < LIMIT){\n\n\t\t\tdate_sub($current_moday,date_interval_create_from_date_string(($current_day -1).\" days\"));\n\n\t\t\t date_add($current_freeday,date_interval_create_from_date_string((7- $current_day).\" days\"));\n\n\t\t\treturn [\n\t\t\t\t'monday' =>date_format($current_moday,'Y-m-d'), \n\t\t\t\t'sunday' => date_format($current_freeday,'Y-m-d') \n\t\t\t];\n\t\t}\n\n\t\t\n\n\t}","title":""},{"docid":"1f97932e3870009b2b0be8d867b9e929","score":"0.588033","text":"public function testWeekDay()\n {\n $this->assertEquals(\n 7,\n $this->rules->weekDay()\n );\n }","title":""},{"docid":"925d7437ef023159b0a2b915128cbd3e","score":"0.5876152","text":"function get_post_week($timestamp) {\n\t$current_semester = current_semester_load();\n\t$day_diff = day_diff($current_semester['Semester_Start_Date'],$timestamp);\n\treturn number_format(ceil($day_diff/7),0);\n}","title":""},{"docid":"6d3c2a76f424e3035f6ceceae21cc2a1","score":"0.58683795","text":"function mkWeekDays()\r\n {\r\n $out = '';\r\n if ($this->startOnSun) {\r\n if ($this->mostrar_semanas) {\r\n\r\n $out .=\"cssWeekDay.\"\\\">\".\"Sem\".\"\";\r\n }\r\n $out.=''.$this->getDayName(0).'';\r\n $out.=''.$this->getDayName(1).'';\r\n $out.=''.$this->getDayName(2).'';\r\n $out.=''.$this->getDayName(3).'';\r\n $out.=''.$this->getDayName(4).'';\r\n $out.=''.$this->getDayName(5).'';\r\n $out.=''.$this->getDayName(6).\"\\n\";\r\n } else {\r\n if ($this->mostrar_semanas) {\r\n $out .=\"cssWeekDay.\"\\\">\".'Sem'.'';\r\n //$out .=\"\".'Sem'.'';\r\n }\r\n $out.=''.$this->getDayName(1).'';\r\n $out.=''.$this->getDayName(2).'';\r\n $out.=''.$this->getDayName(3).'';\r\n $out.=''.$this->getDayName(4).'';\r\n $out.=''.$this->getDayName(5).'';\r\n $out.=''.$this->getDayName(6).'';\r\n $out.=''.$this->getDayName(0).\"\\n\";\r\n $this->firstday=$this->firstday-1;\r\n if ($this->firstday<0) {\r\n $this->firstday=6;\r\n }\r\n }\r\n return $out;\r\n }","title":""}],"string":"[\n {\n \"docid\": \"a9e625e6660dcdb9fc9a28a9e9ba75e9\",\n \"score\": \"0.761117\",\n \"text\": \"public function getSumOfWeekDays()\\n { \\n $weekDays = 0;\\n foreach($this->days as $day){\\n $day = strtolower($day);\\n if ($day != \\\"sat\\\" || $day != \\\"sun\\\"){\\n $weekDays++;\\n } \\n }\\n return $weekDays;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa7e8d4a5c01651ad6b11db0fe5d837d\",\n \"score\": \"0.7576239\",\n \"text\": \"protected function getWeekDays()\\r\\n\\t{\\r\\n\\t\\treturn AdFox::getConstants('DAY_', static::class);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38a6be2747835ae22ce839e89a14234f\",\n \"score\": \"0.72816193\",\n \"text\": \"public function getSumOfWeekendDays()\\n { \\n $weekendDays = 0;\\n foreach($this->days as $day){\\n $day = strtolower($day);\\n if ($day == \\\"sat\\\" || $day == \\\"sun\\\"){\\n $weekendDays++;\\n } \\n }\\n return $weekendDays;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1ab11acd5fde6b96027d0bb429ec2b1\",\n \"score\": \"0.71576136\",\n \"text\": \"public function getWeekDay() {\\n\\t\\n\\t\\treturn $this->dateArray[\\\"wday\\\"];\\n\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96fb95a9d3df01e4d59c6c56109ad286\",\n \"score\": \"0.709597\",\n \"text\": \"function getWeekday() {\\n return array_var($this->date_data, 'wday');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2f5ac4cd54bce8cbfc1135b5e5298e9\",\n \"score\": \"0.7094398\",\n \"text\": \"public function weekDays()\\n {\\n $day = 60*60*24;\\n $weekDays = \\\"[\\\";\\n for ($i=0;$i<7;$i++){\\n $dayTime = time()-($day*$i);\\n $weekDays .= '\\\"'.date('l', $dayTime).'\\\",'; \\n }\\n $weekDays = rtrim($weekDays, \\\",\\\").\\\"]\\\";\\n return $weekDays;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"547cf53611db0e8d5b31d44224926da8\",\n \"score\": \"0.7059245\",\n \"text\": \"public function getWeekDays()\\n {\\n return $this->weekDays;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"547cf53611db0e8d5b31d44224926da8\",\n \"score\": \"0.7059245\",\n \"text\": \"public function getWeekDays()\\n {\\n return $this->weekDays;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"547cf53611db0e8d5b31d44224926da8\",\n \"score\": \"0.7059245\",\n \"text\": \"public function getWeekDays()\\n {\\n return $this->weekDays;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97f915dd7587b83961114c80a466a267\",\n \"score\": \"0.70183325\",\n \"text\": \"public function wednesdays()\\n {\\n return $this->days(3);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4820bde14026e2f59b14ac97b03846e2\",\n \"score\": \"0.70159024\",\n \"text\": \"public function getWeekDay()\\n {\\n return (int)$this->date->format('N');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3582b18d03b68fc2a73a07ac7c5300b5\",\n \"score\": \"0.69914687\",\n \"text\": \"public static function getDayWeek()\\n {\\n return self::$dayOfWeek;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d5db4bcd387b70810ff9fe0045dacc5\",\n \"score\": \"0.69036996\",\n \"text\": \"private function calc_day()\\n\\t{\\n\\t\\t\\t\\tif((($this->cal_week_add + 2) - $this->cal_first) > 0)\\n\\t\\t\\t\\t\\treturn ((($this->cal_week_add + 1) - $this->cal_first) % $this->cal_cur_month) + 1;\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\treturn $this->cal_pre_month + (($this->cal_week_add + 2) - $this->cal_first);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81a441ba89859d711085be349d137e85\",\n \"score\": \"0.6894379\",\n \"text\": \"public function addWeekday();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68b02fe7e9e91b1b14b3a1fcf78f046f\",\n \"score\": \"0.68899524\",\n \"text\": \"public function wednesdays()\\n {\\n return $this->days(Schedule::WEDNESDAY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78bedf537763af6491ec676b80c988ba\",\n \"score\": \"0.6772702\",\n \"text\": \"public function getWeekDay()\\n {\\n return (int)(clone $this->dateTime)->format('N');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b1462f6779babd359002149ba8d5125\",\n \"score\": \"0.6766819\",\n \"text\": \"public function getDaysOfWeek()\\n {\\n return $this->daysOfWeek;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1e31961bcbf4aa55492d182ec20233f\",\n \"score\": \"0.676648\",\n \"text\": \"public function weekCalculator($calf_id)\\n {\\n $today_date=date(\\\"m/d/Y\\\");\\n $calf=$this->calfRecord($calf_id)[3];\\n $calf_dob=date(\\\"m/d/Y\\\",strtotime($calf));\\n\\n\\n $today_date = (string)$today_date;\\n\\n $today_f=DateTime::createFromFormat('m/d/Y',$today_date);\\n $dob_f=DateTime::createFromFormat('m/d/Y',$calf_dob);\\n\\n return floor($today_f->diff($dob_f)->days/7);\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b2238c8fb2682ba3d787ae7a29ed5bd\",\n \"score\": \"0.67534876\",\n \"text\": \"function getCurrentWeek()\\n {\\n $value_format = \\\"Y-m-d\\\";\\n $start = date(\\\"U\\\") - (self::DAY * (date(\\\"w\\\") - 1));\\n return date($value_format, $start) . \\\"_\\\" . date($value_format, ($start + (Date_Helper::DAY * 6)));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2de66ad82bb971a2c4c3209e9136d5c\",\n \"score\": \"0.6732203\",\n \"text\": \"function sumWeekCount($today) {\\n\\t\\t$i = 0;\\n\\t\\t$sum = 0;\\n\\t\\t$_today = explode(\\\"/\\\", $today);\\n\\t\\t$day = $_today[1];\\n\\t\\t$month = $_today[0];\\n\\t\\t$year = $_today[2];\\n\\t\\t$todayjd = cal_to_jd(CAL_GREGORIAN, $month, $day, $year);\\n\\t\\t\\n\\t\\twhile (true) {\\n\\t\\t\\t$i++;\\n\\t\\t\\t$before = cal_from_jd($todayjd, CAL_GREGORIAN);\\n\\t\\t\\t$query = \\\"SELECT * FROM autotwitt WHERE day = '\\\".$before['date'].\\\"'\\\";\\n\\t\\t\\t$db = Mage::getSingleton('core/resource')->getConnection('core_read');\\n\\t\\t\\t$rs = $db->fetchAll($query);\\n\\t\\t\\tif ($rs == null || $i == 7) {\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$dayCount = $rs[0]['count'];\\n\\t\\t\\t\\t$sum += $dayCount;\\n\\t\\t\\t\\t$todayjd--;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn $sum;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39c12ec9860a98ab9eff61ca2bc86665\",\n \"score\": \"0.66816914\",\n \"text\": \"function getDaysOfWeek()\\n {\\n return $this->daysOfWeek;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce0bc0d9ba1f125b819aab83f2c8d17f\",\n \"score\": \"0.6679157\",\n \"text\": \"public function getWeekDay()\\n {\\n $engWeekDay = $this->dateTime->format('l');\\n\\n return $this->weekDays[$engWeekDay];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59111bacd907fb9edf8566d2cf2643ca\",\n \"score\": \"0.6674324\",\n \"text\": \"public function saturdays()\\n {\\n return $this->days(6);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4c71ffe4ebbc15e2a2d0e29ff219524\",\n \"score\": \"0.6619119\",\n \"text\": \"public function subWeekday();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97aa7c25924cad3675fc8a68cf226316\",\n \"score\": \"0.6581607\",\n \"text\": \"public function weekdays()\\n {\\n return $this->days(Schedule::MONDAY.'-'.Schedule::FRIDAY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79dd21df8452e20e2370e2c9bb7d6e0b\",\n \"score\": \"0.65512884\",\n \"text\": \"function dayofweek($selecteddate)//accept date in YYYY-MM-DD format\\r\\n\\t\\r\\n\\t{\\r\\n\\t\\r\\n\\t\\t$dayofweek = array('mdays','mday','wday');\\r\\n\\t\\r\\n\\t\\tlist($y,$m,$d) = explode(\\\"-\\\",$selecteddate);\\r\\n\\t\\r\\n\\t\\t$dayofweek[mdays] = $mdays=date(\\\"t\\\",mktime(0,0,0,$m,1,$y)); //days in the current month\\r\\n\\t\\r\\n\\t\\t$dayofweek[mday] = date('w',mktime(0,0,0,$m,1,$y)); // day of the week the month started with\\r\\n\\t\\r\\n\\t\\t$dayofweek[wday] = ($d+$first_day-1)%7;\\r\\n\\t\\r\\n\\t\\treturn $dayofweek;\\r\\n\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68c8f3c255a7743010b4f4ead79dd5f9\",\n \"score\": \"0.65269715\",\n \"text\": \"#[Pure] public function getDaysWeek(): array\\n {\\n return $this->week->getDays()->all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fb02ca68e655995133c64082971f9aa\",\n \"score\": \"0.652394\",\n \"text\": \"function getWorkedDays(){\\n $day_number = date(\\\"d\\\");\\n //echo date('Y-m-d H:i:s') ;\\n //echo date('d-m-Y');\\n $arWasHolidays = array();\\n //узнаем как много праздников и выходных уже прошло на текущий день\\n foreach ($this->arHolidays as $holiday) {\\n if ($holiday <= $day_number) $arWasHolidays[] = $holiday;\\n }\\n return ($day_number - count($arWasHolidays));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d075ab745f9e0eb198a5e0415da56963\",\n \"score\": \"0.65028024\",\n \"text\": \"public function getWeeks(){\\n $start = $this->getStartingDay();\\n $end = clone $start;\\n $end->modify('+1 month -1day');\\n $startWeek=intval($start->format('W'));\\n $endWeek= intval($end->format('W'));\\n if($endWeek===1){\\n $endWeek = clone $end;\\n $endWeek = intval($endWeek->modify('- 7 days')->format('W')) + 1;\\n }\\n $weeks = $endWeek - $startWeek + 1;\\n if($weeks < 0){\\n $weeks = intval($end->format('W'));\\n }\\n return $weeks;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf4416fcc23cce98d4858740ba7fce8d\",\n \"score\": \"0.6459201\",\n \"text\": \"public function daysOfWeek()\\n {\\n $days = explode(',', $this->daysOfWeek);\\n if ($days[0] === '*') {\\n return $this->returnFrame('day of the week');\\n }\\n if ($this->isRecurring($days[0])) {\\n return [];\\n }\\n if ($this->isRange($days[0])) {\\n return $this->returnFrame('days of the week', $days[0]);\\n }\\n return array_map(function ($day) {\\n return $this->dayMapping[$day];\\n }, $days);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2f3e406721325c7835e63f04ee83cad\",\n \"score\": \"0.6454439\",\n \"text\": \"public function isWeekday();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc4823f5b6c5e8dfcd82e2974f51600e\",\n \"score\": \"0.64422923\",\n \"text\": \"public function sundays()\\n {\\n return $this->days(0);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b611f0cb9637504eab70330a10c73008\",\n \"score\": \"0.64374477\",\n \"text\": \"public function getWeeks(): int {\\n\\n$start=$this->getStartingDay(); /*format date début du mois*/\\n$end= (clone $start)->modify('+1 month -1 day');/*date de fin du mois-> modification de la copie de $start */\\nif($this->month==12){ /*tjr 31 jours en decembre*/\\n$weeks= 6;/* 4 weeks and 2 days*/\\n}else{\\n$weeks= intval($end->format('W'))- intval($start->format('W'))+1;/*nbr de semaine ds ce mois*/\\n}\\n/* format('W'): Numéro de semaine dans l'année Exemple : 42 (la 42ème semaine de l'année)*/\\n\\n\\nif($weeks<0){/*dans le cas de janvier (1er mois de l'annee)*/\\n $weeks=intval($end->format('W'));// exemple ($end= la 5ème semaine de l'année et du mois de janvier)\\n }\\n\\n\\nreturn $weeks;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76cae861b1bf2117de45d61a6efbe8ae\",\n \"score\": \"0.642669\",\n \"text\": \"public function mondays()\\n {\\n return $this->days(1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03612a6307bf7df5b2cd1cc0bf7604dc\",\n \"score\": \"0.6418784\",\n \"text\": \"public function getDayOfTheWeek() : DayOfWeek\\n {\\n return new DayOfWeek((int)$this->dateTime->format('N'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6702d3e5d7d6aefad5a98abd4c61d5de\",\n \"score\": \"0.64037085\",\n \"text\": \"function getDefaultWeekday()\\n {\\n return APP_DEFAULT_WEEKDAY;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ee34e06630e1d06c53603c85ff22f11\",\n \"score\": \"0.6401438\",\n \"text\": \"public function addWeekdays($value);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4069c0056d8a861477d5e1edfbada61c\",\n \"score\": \"0.6383774\",\n \"text\": \"function week_day($dif) {\\n $jd = cal_to_jd(CAL_GREGORIAN, date(\\\"m\\\"), date(\\\"d\\\", strtotime($dif)), date(\\\"Y\\\"));\\n $day = jddayofweek($jd, 1);\\n return $day;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7ef58a0d02c8150c3215dc344b22006\",\n \"score\": \"0.63776153\",\n \"text\": \"public function WeekDay($fecha){ \\t\\n\\t$fecha=str_replace(\\\"/\\\",\\\"-\\\",$fecha);\\n\\tlist($dia,$mes,$anio)=explode(\\\"-\\\",$fecha);\\n\\treturn (((mktime ( 0, 0, 0, $mes, $dia, $anio) - mktime ( 0, 0, 0, 7, 17, 2006))/(60*60*24))+700000) % 7;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9a19fe1b4698bb6d47cf8e3f4f6075a\",\n \"score\": \"0.63658124\",\n \"text\": \"function getDayOfWeek()\\n {\\n return $this->_dayNameToDayNum( strftime( '%a' , $this->timeStamp) );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"72a82abf1fbf49cf39ab3801b02bad89\",\n \"score\": \"0.63610774\",\n \"text\": \"public function subWeekdays($value);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ecf1ebab8e19c7a395a3b16a331b6c5a\",\n \"score\": \"0.635277\",\n \"text\": \"public function getServiceDayOfWeek()\\n {\\n //for use in converting to days of week\\n $day = date('l',\\n mktime($this->_serviceDate['hour'],\\n $this->_serviceDate['minute'],\\n $this->_serviceDate['second'],\\n $this->_serviceDate['month'],\\n $this->_serviceDate['day'],\\n $this->_serviceDate['year']));\\n return $day;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8cfeacbbacc820d5f38c55c66f12981d\",\n \"score\": \"0.63117033\",\n \"text\": \"function api_get_week_days_short($language = null) {\\n $days = &_api_get_day_month_names($language);\\n return $days['days_short'];\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14623ea3a70f0b4d698059ba59cd739f\",\n \"score\": \"0.6306058\",\n \"text\": \"public function getWeekDays() {\\n $day_array = [];\\n\\n array_push($day_array, $this->getWeekStartDate());\\n array_push($day_array, date('Y-m-d', strtotime('next tuesday', strtotime($this->getWeekStartDate()))));\\n array_push($day_array, date('Y-m-d', strtotime('next wednesday', strtotime($this->getWeekStartDate()))));\\n array_push($day_array, date('Y-m-d', strtotime('next thursday', strtotime($this->getWeekStartDate()))));\\n array_push($day_array, date('Y-m-d', strtotime('next friday', strtotime($this->getWeekStartDate()))));\\n\\n return $day_array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"092c2c6da27476558e1763c14efb3461\",\n \"score\": \"0.63043976\",\n \"text\": \"public function getShortWeekDays()\\n {\\n return $this->shortWeekDays;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"053aa1297abc3e1f211a8b1aab91998f\",\n \"score\": \"0.62934226\",\n \"text\": \"function firstDayOfWeek()\\n {\\n $currentWeek = new DateTime();\\n $curDate = date_format($currentWeek, \\\"Y-m-d\\\");\\n $time = new DateTime($curDate);\\n //echo $time->format(\\\"Y-m-d\\\") . \\\"\\\\n\\\";\\n // number of day\\n $day = date('w');\\n $time->sub(new DateInterval('P' . $day . 'D'));\\n return $time->format(\\\"Y-m-d\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2a7a0c95801bb147b8b462f4c45a2fd\",\n \"score\": \"0.62911147\",\n \"text\": \"public function weekends()\\n {\\n return $this->days(Schedule::SATURDAY.','.Schedule::SUNDAY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a282749b306ebb59e44e80e054439fa3\",\n \"score\": \"0.6252139\",\n \"text\": \"function getWeek() {\\n return (integer) date('W', $this->getTimestamp());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57c233256816ec7a7814bd30c97db6d0\",\n \"score\": \"0.6235814\",\n \"text\": \"public function fridays()\\n {\\n return $this->days(Schedule::FRIDAY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de9d05232ef1701b6c665e8394f6d225\",\n \"score\": \"0.6221336\",\n \"text\": \"public function offsetToMonday($date);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c12dfab3da61c6e752609f057dec7f2d\",\n \"score\": \"0.6219177\",\n \"text\": \"function dateOfWeek($Ymd, $day) {\\n\\tglobal $week_start_day;\\n\\t//global $phpiCal_config;\\n\\t//config\\n\\n\\t//fin config\\n\\n\\t//if (isset($phpical_config->week_start_day)) $week_start_day = $phpiCal_config->week_start_day;\\n\\n\\t$timestamp = strtotime($Ymd);\\n\\t$num = date('w', strtotime($week_start_day));\\n\\t$start_day_time = strtotime((date('w',$timestamp)==$num ? \\\"$week_start_day\\\" : \\\"last $week_start_day\\\"), $timestamp);\\n\\t$ret_unixtime = strtotime($day,$start_day_time);\\n\\t// Fix for 992744\\n\\t// $ret_unixtime = strtotime('+12 hours', $ret_unixtime);\\n\\t$ret_unixtime += (12 * 60 * 60);\\n\\t$ret = date('Y-m-d',$ret_unixtime);\\n\\treturn $ret;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63eba3690c13bfc6eec80c66b91ff05a\",\n \"score\": \"0.62177026\",\n \"text\": \"public function getDayOfWeek() {\\n return $this->wday;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"11c42c591bb5d21a64b1895a57a1ba3d\",\n \"score\": \"0.62173855\",\n \"text\": \"public function list_days_of_the_week($respect_start_of_week = true) {\\n\\t\\tglobal $wp_locale;\\n\\t\\t$days_of_the_week = array();\\n\\t\\t$i = $j = $respect_start_of_week ? get_option('start_of_week', 1) : 1;\\n\\t\\twhile ($i < $j+7) { // 7 days\\n\\t\\t\\t$days_of_the_week[] = array(\\n\\t\\t\\t\\t'index' => $i % 7,\\n\\t\\t\\t\\t'value' => $wp_locale->get_weekday($i % 7),\\n\\t\\t\\t);\\n\\t\\t\\t$i++;\\n\\t\\t}\\n\\t\\treturn $days_of_the_week;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa0b4ff211fc037f74b4783773cc6edf\",\n \"score\": \"0.62117934\",\n \"text\": \"static function date_diff_weekdays($from, $to) {\\n if ($from === null || $to === null)\\n return null;\\n $date_from = new \\\\DateTime($from);\\n $date_to = new \\\\DateTime($to);\\n // calculate number of weekdays from start of week - start date\\n $from_day = intval($date_from->format('w')); // 0 (for Sunday) through 6 (for Saturday)\\n if ($from_day == 0)\\n $from_day = 7;\\n $from_wdays = $from_day > 5 ? 5 : $from_day;\\n // calculate number of weekdays from start of week - end date\\n $to_day = intval($date_to->format('w'));\\n if ($to_day == 0)\\n $to_day = 7;\\n $to_wdays = $to_day > 5 ? 5 : $to_day;\\n // calculate number of days between the two dates\\n $interval = $date_from->diff($date_to);\\n $days = intval($interval->format('%R%a')); // shows negative values too\\n // calculate number of full weeks between the two dates\\n $weeks_between = floor($days / 7);\\n if ($to_day >= $from_day)\\n $weeks_between -= 1;\\n // complete calculation of number of working days between\\n $diff_wd = 5 * ($weeks_between) + (5 - $from_wdays) + $to_wdays;\\n return $diff_wd;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9e00589f133b84e2133734249ab2880\",\n \"score\": \"0.6210752\",\n \"text\": \"public function getAllThisWeek();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"039fa41fa80a1a23e178b0a7d1ff6763\",\n \"score\": \"0.62085694\",\n \"text\": \"public function getDayOfWeekIndex()\\r\\n\\t{\\r\\n\\t\\t$dayOfWeek = strtolower(date(\\\"D\\\"));\\r\\n\\t\\t$offset = self::$days[$dayOfWeek];\\r\\n\\t\\treturn $offset;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e080b6b74655513e1fbd2a465975dc7\",\n \"score\": \"0.62023205\",\n \"text\": \"public function getFirstWeekDay()\\n {\\n return (int)(new DateTime($this->date->format('Y-m-01')))->format('N');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21a287c2822fad8cfa1d6b74adf1c9ba\",\n \"score\": \"0.6173416\",\n \"text\": \"public static function dayWeeks($date){\\r\\n\\t\\t$date = self::convert($date, 'eua');\\r\\n\\t\\t\\r\\n\\t\\t$year = substr($date, 0, 4);\\r\\n\\t\\t$month = substr($date, 5, -3);\\r\\n\\t\\t$day = substr($date, 8, 9);\\r\\n\\t\\t$dayWeeks = date('w', mktime(0, 0, 0,$month, $day, $year));\\r\\n\\t\\treturn $dayWeeks + 1;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0be7f4706e82f8819335118614a9f127\",\n \"score\": \"0.61727613\",\n \"text\": \"function getDaysOffered() {\\n global $connection;\\n $query = \\\"SELECT * FROM DaysOfWeek ORDER BY sort\\\";\\n\\n $days = $connection->query($query);\\n return $days;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbbf3b8debdc46f05e84142c36e3acad\",\n \"score\": \"0.6172187\",\n \"text\": \"public function fridays()\\n {\\n return $this->days(5);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"144b24bd4ee2ece7df8a4ba72ab5605d\",\n \"score\": \"0.61500466\",\n \"text\": \"public function addWeek();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2c7ae0b5ae242654e99b59c02416027\",\n \"score\": \"0.61492944\",\n \"text\": \"public function Weekday ( $iso = true )\\n // zwischen 0 (f&uuml;r Sonntag) und 6 (f&uuml;r Samstag)\\n {\\n\\n\\t// static $ary_iso_weekday = array( 7, 1, 2, 3, 4, 5, 6 );\\n\\n\\tif ( $iso ) {\\n\\n\\t if ( $this->m_dow == self::DOW_SUNDAY ) return self::ISO_SUNDAY;\\n\\n\\t}\\n\\n\\n return $this->m_dow;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5654f9c90cc6e8a70e8fd988f53ef6be\",\n \"score\": \"0.61433715\",\n \"text\": \"public function weekDates()\\n {\\n $day = 60*60*24;\\n $weekDates = array();\\n for ($i=0;$i<7;$i++){\\n $dayTime = time()-($day*$i);\\n array_push($weekDates,date('Y-m-d',$dayTime));\\n }\\n return $weekDates;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3caeff2c3885335f3f2f5efd560ee901\",\n \"score\": \"0.61311173\",\n \"text\": \"function day_of_the_week( $old_date ){\\n\\t\\t$new_date = $old_date . ', ' . date( 'l' );\\n\\t\\treturn $new_date;\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f9b413e8eafc39eb9fee4c8044ff755\",\n \"score\": \"0.61144805\",\n \"text\": \"public function sundays()\\n {\\n return $this->days(Schedule::SUNDAY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d9a1f60cff64faa2a2cf99e36ea57d3\",\n \"score\": \"0.61101574\",\n \"text\": \"private function dayOfWeek()\\n {\\n return (new Hexpress())\\n ->find(function ($hex) {\\n $hex->either([\\n $this->FWS(),\\n (new Hexpress())->maybe($this->FWS())->has($this->dayName()),\\n $this->obsDayOfWeek(),\\n ]);\\n }, 'dayOfWeek');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04167270ddef5e9a5d30b1754a87ea07\",\n \"score\": \"0.61006516\",\n \"text\": \"public function dayOfWeek($until = 'now'): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e5d5abf000f2abf23bafb0b6650c40c\",\n \"score\": \"0.6091511\",\n \"text\": \"public function getWeeks(): int{\\n /* Explication de la logique :\\n 1. A partir de la date du premier jour du mois,\\n 2. on détermine le dernier jour du mois\\n 3. le numéro de semaine de l'année du dernier jour du mois - le numéro de semaine de l'année du premier jour du mois = le nombre de semaines dans le mois\\n */\\n // 1. $start sera le jour 1 du mois et année passé en paramètre de la construct de l'objet\\n $start = new \\\\DateTime(\\\"{$this->year}-{$this->month}-01\\\"); // \\n // 2. $end sera le dernier jour du mois passé en param à la construct de l'objet (clone) permet de ne pas modifier le contenu de $start (seulement le cloner ponctuellement)\\n $end = (clone $start)->modify('+1 month -1 day'); // méthode modify() (de DateTime) qui ajoute un mois - 1 jours à la date de départ\\n \\n //dump((clone $start)->modify('+1 month -1 day'));\\n //dump($end->format('W'));\\n \\n\\n $numberEnd = $end->format('W');\\n\\n // Condition pour les années à 52 semaines\\n if($numberEnd == \\\"01\\\"){\\n $end->modify('+360 day');\\n }\\n //dump(\\\"Start vaut : \\\" . $start->format('W'));\\n //dump(\\\"numberEnd vaut : \\\" . $numberEnd . \\\" et end vaut cette fois : \\\" . $end->format('W'));\\n \\n // 3. $week sera le nb de semaine du mois (numéro de semaine de dernier jour - numéro de semaine du premier jour)\\n $weeks = intval($end->format('W')) - intval($start->format('W')) + 1; // méthode format() va formater notre date en numéro de semaine ('W')\\n\\n //dump(intval($end->format('W')), intval($start->format('W'))); //Affiche le numéro de semaine de la date de fin du mois et le numéro de semaine de la date de début \\n\\n // Condition pour éviter les erreurs avec les jours du mois de janvier qui sont dans entre 2 numéro de semaine (fin d'année = s52 ou s53 début = s1)\\n // $week retournera alors un nombre négatif, dans ce cas\\n if($weeks < 0){\\n // Alors le numéro de semaine sera égal au numéro de semaine du dernier jour du mois (simplement)\\n $weeks = intval($end->format('W'));\\n }\\n return $weeks;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66b29f2dfb595f16091e2bb023cd0607\",\n \"score\": \"0.6083109\",\n \"text\": \"public function mapDayWeek($date)\\n {\\n\\n return ($date)==6?1:$date+2;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d625135d9f3e484e29dbd941efa695e4\",\n \"score\": \"0.60801166\",\n \"text\": \"public function isWeekday()\\n {\\n return ($this->numeric(\\\"N\\\") <= Days::FRIDAY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50a6e382a7e98f3811b1c361a4adc072\",\n \"score\": \"0.60778743\",\n \"text\": \"private function getDays()\\n {\\n $first_day_of_week = date('w', mktime(0, 0, 0, $this->month, 1, $this->year));\\n $days_count = date('d', mktime(0, 0, 0, $this->month + 1, 0, $this->year));\\n\\n $days_of_week = $this->days_of_week;\\n // Sunday can be set as either 0 or 7 in cron. For our purposes 0 is probably better\\n if (isset($days_of_week[7])) {\\n unset($days_of_week[7]);\\n $days_of_week[0] = true;\\n }\\n\\n $days_of_week_skipped = false;\\n if (array_keys($days_of_week) === range(0, 6)) {\\n $days_of_week = array();\\n $days_of_week_skipped = true;\\n }\\n\\n $days_of_month = $this->days_of_month;\\n foreach ($days_of_month as $day => $_) {\\n if ($day > $days_count || $day < 1) {\\n unset($days_of_month[$day]);\\n }\\n }\\n\\n $days_of_month_skipped = false;\\n if (array_keys($days_of_month) === range(1, $days_count)) {\\n $days_of_month = array();\\n $days_of_month_skipped = true;\\n }\\n\\n if ($days_of_month_skipped && $days_of_week_skipped) {\\n $result = array();\\n for ($i = 1; $i <= $days_count; $i++) $result[$i] = true;\\n return $result;\\n }\\n\\n $result = $days_of_month;\\n for ($i = 1; $i <= $days_count; $i++) {\\n if (isset($days_of_week[($first_day_of_week + $i - 1) % 7])) {\\n $result[$i] = true;\\n }\\n }\\n\\n ksort($result, SORT_NUMERIC);\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07f7ebe976b5e47d4497c040828c8a7b\",\n \"score\": \"0.6069283\",\n \"text\": \"public static function DayOfWeeks($m,$d,$y)\\n {\\n $yo=$y-(14-$m)/12;\\n\\t echo($yo);\\n\\t\\n\\t$x=$yo+$yo/4-$yo/100+$yo/400;\\n\\techo($x);\\n\\t\\n\\t $mo= $m+12*((14-$m)/12)-2;\\n\\t echo($mo);\\n\\t\\n\\t$do1=(($d+$x+31*$mo)/12)% 7;\\n\\t echo($do1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a24b09a37f8f741dc4d1f86e24ff5d9d\",\n \"score\": \"0.60682654\",\n \"text\": \"function weekStart($date) {\\n\\t\\treturn \\\"(DATE_TRUNC('week', $date::DATE) - '1 days'::INTERVAL)::DATE\\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40d6ac109835404ed69b55ef1d14a7d8\",\n \"score\": \"0.60623515\",\n \"text\": \"private function weekDays()\\n {\\n $html = \\\"\\\";\\n foreach ($this->weekDays as $day) {\\n $html .= \\\"\\\" . $day . \\\"\\\";\\n }\\n return $html;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7bfa19d228b819429dd47b58f1f891b5\",\n \"score\": \"0.6061454\",\n \"text\": \"public function getWorkingDays($startDate,$endDate){\\n\\t //We add one to inlude both dates in the interval.\\n\\t $days = (strtotime($endDate) - strtotime($startDate)) / 86400 + 1;\\n\\n\\t $no_full_weeks = floor($days / 7);\\n\\n\\t $no_remaining_days = fmod($days, 7);\\n\\n\\t //It will return 1 if it's Monday,.. ,7 for Sunday\\n\\t $the_first_day_of_week = date(\\\"N\\\",strtotime($startDate));\\n\\n\\t $the_last_day_of_week = date(\\\"N\\\",strtotime($endDate));\\n\\t // echo $the_last_day_of_week;\\n\\t //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\\n\\t //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\\n\\t if ($the_first_day_of_week <= $the_last_day_of_week){\\n\\t if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\\n\\t if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\\n\\t }\\n\\n\\t else{\\n\\t if ($the_first_day_of_week <= 6) {\\n\\t //In the case when the interval falls in two weeks, there will be a Sunday for sure\\n\\t $no_remaining_days--;\\n\\t }\\n\\t }\\n\\n\\t //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\\n\\t\\t//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\\n\\t $workingDays = $no_full_weeks * 5;\\n\\t if ($no_remaining_days > 0 )\\n\\t {\\n\\t $workingDays += $no_remaining_days;\\n\\t }\\n\\n\\t //We subtract the holidays\\n\\t\\t/* foreach($holidays as $holiday){\\n\\t $time_stamp=strtotime($holiday);\\n\\t //If the holiday doesn't fall in weekend\\n\\t if (strtotime($startDate) <= $time_stamp && $time_stamp <= strtotime($endDate) && date(\\\"N\\\",$time_stamp) != 6 && date(\\\"N\\\",$time_stamp) != 7)\\n\\t $workingDays--;\\n\\t }*/\\n\\n\\t return $workingDays;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b40750486de14a751327eb832e4b5ad9\",\n \"score\": \"0.6057812\",\n \"text\": \"public function triggeringDays()\\n {\\n $days = '';\\n if (\\n $this->is_triggered_on_monday &&\\n $this->is_triggered_on_tuesday &&\\n $this->is_triggered_on_wednesday &&\\n $this->is_triggered_on_thursday &&\\n $this->is_triggered_on_friday &&\\n $this->is_triggered_on_saturday &&\\n $this->is_triggered_on_sunday\\n ) {\\n $days = 'all days';\\n } else if (\\n $this->is_triggered_on_monday &&\\n $this->is_triggered_on_tuesday &&\\n $this->is_triggered_on_wednesday &&\\n $this->is_triggered_on_thursday &&\\n $this->is_triggered_on_friday\\n ) {\\n $days = 'week days';\\n } else if (\\n $this->is_triggered_on_saturday &&\\n $this->is_triggered_on_sunday\\n ) {\\n $days = 'weekend';\\n } else {\\n if ($this->is_triggered_on_monday) {\\n $days.= 'Monday';\\n }\\n if ($this->is_triggered_on_tuesday) {\\n $days.= ($days === '' ? '' : ', ') . 'Tuesday';\\n }\\n if ($this->is_triggered_on_wednesday) {\\n $days.= ($days === '' ? '' : ', ') . 'Wednesday';\\n }\\n if ($this->is_triggered_on_thursday) {\\n $days.= ($days === '' ? '' : ', ') . 'Thursday';\\n }\\n if ($this->is_triggered_on_friday) {\\n $days.= ($days === '' ? '' : ', ') . 'Friday';\\n }\\n if ($this->is_triggered_on_saturday) {\\n $days.= ($days === '' ? '' : ', ') . 'Saturday';\\n }\\n if ($this->is_triggered_on_sunday) {\\n $days.= ($days === '' ? '' : ', ') . 'Sunday';\\n }\\n $search = ',';\\n $replace = ' and';\\n $days = strrev(implode(strrev($replace), explode(strrev($search), strrev($days), 2)));\\n }\\n return $days;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af812505707b21d4ce11bcd5cb6bb651\",\n \"score\": \"0.6050267\",\n \"text\": \"public function subWeek();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a1fd71091209ef3bcc8c81de17185bf\",\n \"score\": \"0.602822\",\n \"text\": \"function getWorkingDays($startDate, $endDate, $lamakerja){\\n\\t\\t $begin=strtotime($startDate);\\n\\t\\t $end=strtotime($endDate);\\n\\t\\t if($begin>$end){\\n\\t\\t echo \\\"Tanggal start harus lebih kecil dari tanggal akhir!\\\";\\n\\t\\t return '';\\n\\t\\t }else{\\n\\t\\t $no_days=0;\\n\\t\\t $weekends=0;\\n\\t\\t while($begin<=$end){\\n\\t\\t $no_days++; // no of days in the given interval\\n\\t\\t $what_day=date(\\\"N\\\",$begin);\\n\\t\\t if($what_day>$lamakerja) { // 6 and 7 are weekend days\\n\\t\\t $weekends++;\\n\\t\\t };\\n\\t\\t $begin+=86400; // +1 day\\n\\t\\t };\\n\\t\\t $working_days=$no_days-$weekends;\\n\\t\\t return $working_days;\\n\\t\\t }\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6af67f9b34c20597d0c309e843e320a\",\n \"score\": \"0.60219663\",\n \"text\": \"public function saturdays()\\n {\\n return $this->days(Schedule::SATURDAY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdd3d6acc594ae5d5e95accf032c92d8\",\n \"score\": \"0.60212904\",\n \"text\": \"public function mondays()\\n {\\n return $this->days(Schedule::MONDAY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9288bd65ab21ad54e43c0c6f54b0b59\",\n \"score\": \"0.6009974\",\n \"text\": \"function jddayofweek ($julianday, $mode = null) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d8921a7fe15bc00a952babcb1ab99a0\",\n \"score\": \"0.6004401\",\n \"text\": \"function get_start_day_of_week(){\\n\\t\\treturn $this->start_day_of_week;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02ec1759a3385af88b4d977a4852cf85\",\n \"score\": \"0.5996656\",\n \"text\": \"static public function Weekday($w, $short = false) {\\r\\n\\t\\tswitch ($w%7) {\\r\\n\\t\\t\\tcase 0: return $short ? __('Sun') : __('Sunday');\\r\\n\\t\\t\\tcase 1: return $short ? __('Mon') : __('Monday');\\r\\n\\t\\t\\tcase 2: return $short ? __('Tue') : __('Tuesday');\\r\\n\\t\\t\\tcase 3: return $short ? __('Wed') : __('Wednesday');\\r\\n\\t\\t\\tcase 4: return $short ? __('Thu') : __('Thursday');\\r\\n\\t\\t\\tcase 5: return $short ? __('Fri') : __('Friday');\\r\\n\\t\\t\\tcase 6:\\r\\n\\t\\t\\tdefault: return $short ? __('Sat') : __('Saturday');\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc5f9a6fe52e63cdc2121fc991a64680\",\n \"score\": \"0.5996038\",\n \"text\": \"public function all_day() : int\\n\\t{\\n\\t\\treturn $this->_day_all;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df0095b4f487e9f3d2f29640daf17135\",\n \"score\": \"0.59850574\",\n \"text\": \"function getSchoolDays($start_date_token, $today_token){\\n $count_days = 1;\\n $new_num_days = 0;\\n $last_day = $start_date_token;\\n \\n //Get Num Days\\n $num_days = dateDifference($start_date_token, $today_token, '%a');\\n \\n //echo \\\"NUM DAYS $num_days\\\";\\n \\n //echo \\\"
    START DAY $last_day\\\";\\n //Weekends\\n $weekends = array (\\\"Sat\\\", \\\"Sun\\\");\\n \\n while ($count_days <= $num_days){\\n $next_day = add_date($last_day,1,0,0);\\n $next_day_tokens = explode(\\\" \\\", $next_day);\\n \\n //echo \\\"
    NEXT DAY $next_day\\\";\\n \\n $year = $next_day_tokens[2];\\n $month_items = explode(\\\":\\\", $next_day_tokens[1]);\\n $day_items = explode(\\\":\\\", $next_day_tokens[0]);\\n $clock_items = explode(\\\":\\\", $next_day_tokens[3]);\\n \\n //Check Weekends\\n if (in_array($day_items[0], $weekends)){\\n //Do Nothing\\n } elseif (isHoliday($next_day)) {//Check Holidays\\n //Do Nothing\\n } else {\\n $new_num_days++;\\n }\\n\\n $next_day = \\\"$year-$month_items[1]-$day_items[1]\\\";\\n $last_day = $next_day;\\n $count_days++;\\n }\\n \\n //echo \\\"
    NUM SCHOOL DAYS $new_num_days\\\";\\n \\n return $new_num_days;\\n \\n \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"936e27f125042d786dddb087049379d2\",\n \"score\": \"0.59795785\",\n \"text\": \"function getWorkingDays($startDate,$endDate,$holidays){\\n\\t $endDate = strtotime($endDate);\\n\\t $startDate = strtotime($startDate);\\n\\t\\n\\t\\n\\t //The total number of days between the two dates. We compute the no. of seconds and divide it to 60*60*24\\n\\t //We add one to inlude both dates in the interval.\\n\\t $days = ($endDate - $startDate) / 86400 + 1;\\n\\t\\n\\t $no_full_weeks = floor($days / 7);\\n\\t $no_remaining_days = fmod($days, 7);\\n\\t\\n\\t //It will return 1 if it's Monday,.. ,7 for Sunday\\n\\t $the_first_day_of_week = date(\\\"N\\\", $startDate);\\n\\t $the_last_day_of_week = date(\\\"N\\\", $endDate);\\n\\t\\n\\t //---->The two can be equal in leap years when february has 29 days, the equal sign is added here\\n\\t //In the first case the whole interval is within a week, in the second case the interval falls in two weeks.\\n\\t if ($the_first_day_of_week <= $the_last_day_of_week) {\\n\\t if ($the_first_day_of_week <= 6 && 6 <= $the_last_day_of_week) $no_remaining_days--;\\n\\t if ($the_first_day_of_week <= 7 && 7 <= $the_last_day_of_week) $no_remaining_days--;\\n\\t }\\n\\t else {\\n\\t // (edit by Tokes to fix an edge case where the start day was a Sunday\\n\\t // and the end day was NOT a Saturday)\\n\\t\\n\\t // the day of the week for start is later than the day of the week for end\\n\\t if ($the_first_day_of_week == 7) {\\n\\t // if the start date is a Sunday, then we definitely subtract 1 day\\n\\t $no_remaining_days--;\\n\\t\\n\\t if ($the_last_day_of_week == 6) {\\n\\t // if the end date is a Saturday, then we subtract another day\\n\\t $no_remaining_days--;\\n\\t }\\n\\t }\\n\\t else {\\n\\t // the start date was a Saturday (or earlier), and the end date was (Mon..Fri)\\n\\t // so we skip an entire weekend and subtract 2 days\\n\\t $no_remaining_days -= 2;\\n\\t }\\n\\t }\\n\\t\\n\\t //The no. of business days is: (number of weeks between the two dates) * (5 working days) + the remainder\\n\\t//---->february in none leap years gave a remainder of 0 but still calculated weekends between first and last day, this is one way to fix it\\n\\t $workingDays = $no_full_weeks * 5;\\n\\t if ($no_remaining_days > 0 )\\n\\t {\\n\\t $workingDays += $no_remaining_days;\\n\\t }\\n\\t\\n\\t //We subtract the holidays\\n\\t foreach($holidays as $holiday){\\n\\t $time_stamp=strtotime($holiday);\\n\\t //If the holiday doesn't fall in weekend\\n\\t if ($startDate <= $time_stamp && $time_stamp <= $endDate && date(\\\"N\\\",$time_stamp) != 6 && date(\\\"N\\\",$time_stamp) != 7)\\n\\t $workingDays--;\\n\\t }\\n\\t\\n\\t return $workingDays;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f61cae11d274cef88f151e62e0afef3\",\n \"score\": \"0.59783185\",\n \"text\": \"function weekday($fyear, $fmonth, $fday){\\n\\t return (((mktime ( 0, 0, 0, $fmonth, $fday, $fyear) - mktime ( 0, 0, 0, 7, 17, 2006))/(60*60*24))+700000) % 7;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"310bac1cb41af5b55cc1b29c205f1185\",\n \"score\": \"0.59746337\",\n \"text\": \"public function getAllThisWeek()\\n {\\n $now = Carbon::today();\\n $today = $now->toDateString();\\n $last_sun = new Carbon('last sunday');\\n $last_sunday = $last_sun->toDateString();\\n\\n return $this->admin->whereBetween('date_created', array($last_sunday, $today))->count();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a341aa8768273c47e8b72481a69a42a3\",\n \"score\": \"0.5972178\",\n \"text\": \"public function weekdays()\\n {\\n return $this->spliceIntoPosition(5, '1-5');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6848ad40b849d36f5aef34773b051bac\",\n \"score\": \"0.59563684\",\n \"text\": \"public static function getDayOfWeek($wdt) {\\n\\t\\treturn floor($wdt/86400)%7;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f030f2586f6c93e7cabe14cdd06def8\",\n \"score\": \"0.594983\",\n \"text\": \"public function startOfWeek();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10406dab7d4d4e7ca1fc1b0a5ff3e562\",\n \"score\": \"0.59454536\",\n \"text\": \"public function getDayIndex ()\\n\\t{\\n\\t\\treturn date(\\\"w\\\", $this->stamp);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9401c6c20574576ecd1c181d5f3f37f0\",\n \"score\": \"0.5934502\",\n \"text\": \"public function run()\\n {\\n $startDate = new Carbon();\\n $startDate->setDate(1901, 1, 1);\\n $endDate = new Carbon();\\n $endDate->setDate(2000, 12, 31);\\n $sundays = 0;\\n while ($startDate->lt($endDate)) {\\n if ($startDate->dayName === 'Sunday') {\\n $sundays++;\\n }\\n $startDate->addMonthNoOverflow();\\n }\\n return $sundays;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"182426db09665eb9373260e4130b15c0\",\n \"score\": \"0.59289515\",\n \"text\": \"public function getWeeks(): int\\n {\\n $start = $this->getFirstDay();\\n $end = (clone $start)->modify('+1 month -1 day');\\n $weeks = intval($end->format('W')) - intval($start->format('W')) + 1;\\n if ($weeks < 0) {\\n $weeks = intval($end->format('W'));\\n }\\n return $weeks;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b62cd8c3348e869117396648701601a8\",\n \"score\": \"0.5919392\",\n \"text\": \"public function convert_to_days(){\\r\\n\\t\\t// \\t\\t March 3, 2012 would extract 31+28+3 days...\\r\\n\\r\\n\\t\\t$days = 0;\\r\\n\\t\\tfor ($i=1; $i<$this->get_month(); $i++){\\r\\n\\t\\t\\t$days += $this->check_how_many_days($i);\\r\\n\\t\\t} $days += $this->get_day();\\r\\n\\r\\n\\t\\treturn $days;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e9efa926a414877efbe79e1840ed616\",\n \"score\": \"0.5913604\",\n \"text\": \"public function getWeekDay($index)\\n {\\n return $this->weekDays[$index];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46129cf419ddfcafc93fcbb7150d0e37\",\n \"score\": \"0.5895338\",\n \"text\": \"public function check_curent_week($given_date = null){\\n\\t\\tdefine('LIMIT',8);\\n\\t\\t$current_moday = date_create($given_date);\\n\\t\\t$current_freeday = date_create($given_date);\\n\\n\\t\\t$current_day = date_format($current_moday, 'N');\\n\\n\\t\\tif($current_day < LIMIT){\\n\\n\\t\\t\\tdate_sub($current_moday,date_interval_create_from_date_string(($current_day -1).\\\" days\\\"));\\n\\n\\t\\t\\t date_add($current_freeday,date_interval_create_from_date_string((7- $current_day).\\\" days\\\"));\\n\\n\\t\\t\\treturn [\\n\\t\\t\\t\\t'monday' =>date_format($current_moday,'Y-m-d'), \\n\\t\\t\\t\\t'sunday' => date_format($current_freeday,'Y-m-d') \\n\\t\\t\\t];\\n\\t\\t}\\n\\n\\t\\t\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f97932e3870009b2b0be8d867b9e929\",\n \"score\": \"0.588033\",\n \"text\": \"public function testWeekDay()\\n {\\n $this->assertEquals(\\n 7,\\n $this->rules->weekDay()\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"925d7437ef023159b0a2b915128cbd3e\",\n \"score\": \"0.5876152\",\n \"text\": \"function get_post_week($timestamp) {\\n\\t$current_semester = current_semester_load();\\n\\t$day_diff = day_diff($current_semester['Semester_Start_Date'],$timestamp);\\n\\treturn number_format(ceil($day_diff/7),0);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d3c2a76f424e3035f6ceceae21cc2a1\",\n \"score\": \"0.58683795\",\n \"text\": \"function mkWeekDays()\\r\\n {\\r\\n $out = '';\\r\\n if ($this->startOnSun) {\\r\\n if ($this->mostrar_semanas) {\\r\\n\\r\\n $out .=\\\"cssWeekDay.\\\"\\\\\\\">\\\".\\\"Sem\\\".\\\"\\\";\\r\\n }\\r\\n $out.=''.$this->getDayName(0).'';\\r\\n $out.=''.$this->getDayName(1).'';\\r\\n $out.=''.$this->getDayName(2).'';\\r\\n $out.=''.$this->getDayName(3).'';\\r\\n $out.=''.$this->getDayName(4).'';\\r\\n $out.=''.$this->getDayName(5).'';\\r\\n $out.=''.$this->getDayName(6).\\\"\\\\n\\\";\\r\\n } else {\\r\\n if ($this->mostrar_semanas) {\\r\\n $out .=\\\"cssWeekDay.\\\"\\\\\\\">\\\".'Sem'.'';\\r\\n //$out .=\\\"\\\".'Sem'.'';\\r\\n }\\r\\n $out.=''.$this->getDayName(1).'';\\r\\n $out.=''.$this->getDayName(2).'';\\r\\n $out.=''.$this->getDayName(3).'';\\r\\n $out.=''.$this->getDayName(4).'';\\r\\n $out.=''.$this->getDayName(5).'';\\r\\n $out.=''.$this->getDayName(6).'';\\r\\n $out.=''.$this->getDayName(0).\\\"\\\\n\\\";\\r\\n $this->firstday=$this->firstday-1;\\r\\n if ($this->firstday<0) {\\r\\n $this->firstday=6;\\r\\n }\\r\\n }\\r\\n return $out;\\r\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":760,"cells":{"query_id":{"kind":"string","value":"a847b677426f9c472d3c122042eb15b3"},"query":{"kind":"string","value":"Returns the entity initialiser."},"positive_passages":{"kind":"list like","value":[{"docid":"7d6f00d8778c9adb58219bec182f0f31","score":"0.8886914","text":"public function getEntityInitialiser()\n {\n return $this->entityInitialiser;\n }","title":""}],"string":"[\n {\n \"docid\": \"7d6f00d8778c9adb58219bec182f0f31\",\n \"score\": \"0.8886914\",\n \"text\": \"public function getEntityInitialiser()\\n {\\n return $this->entityInitialiser;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"4faee4b920040a24f82841f014ab4059","score":"0.6247925","text":"public function setEntityInitialiser($entityInitialiser)\n {\n if ($this->entityInitialiser != $entityInitialiser) {\n $this->entityInitialiser = $entityInitialiser;\n }\n }","title":""},{"docid":"f44a3b806f94ae7dace6c6bed4c768f5","score":"0.59009886","text":"private function _entity()\n {\n return new Entity();\n }","title":""},{"docid":"1be2a99c6f5a27042e5a6e25af11bcba","score":"0.5762415","text":"public function init()\n {\n $registry = Zend_Registry::getInstance();\n $this->_em = $registry->entitymanager;\n }","title":""},{"docid":"95bcba338b409fbed9a5ed62b60ef150","score":"0.5755717","text":"public function setDefaultEntity() {\n /** @var Ultimate_ModuleCreator_Model_Entity $entity */\n $entity = Mage::getModel('modulecreator/entity');\n $settings = Mage::getStoreConfig(Ultimate_ModuleCreator_Helper_Data::XML_ENTITY_CONFIG_PATH);\n $entity->addData($settings);\n $this->setEntity($entity);\n return $this;\n }","title":""},{"docid":"503f1529069c0bc4421bbd92aea7b652","score":"0.56984323","text":"public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this\n\t\t\t->setEntityMapping( 'id', 'bksch_id' )\n\t\t\t->setEntityMapping( 'title', 'name' )\n\t\t\t->setEntityMapping( 'slug', 'slug' )\n\t\t\t->setEntityMapping( 'content', 'description' )\n\t\t;\n\t\t\n\t\treturn $this;\n\t}","title":""},{"docid":"fdc292c2ae26bc5ade457463fe20ee2a","score":"0.56298363","text":"public static function __init() {\r\n\t\t\r\n\t\tif(!isset(static::$states[get_called_class()])) static::$states[get_called_class()] = new \\StdClass;\r\n\t\telse return;\r\n\t\t\r\n\t\t// Model should never be initialized.\r\n\t\tif(get_called_class() === __CLASS__) return;\r\n\t\t\r\n\t\t// Store the model name (sans namespace) in the metadata.\r\n\t\tstatic::p()->name = @end(explode('\\\\', static::getName()));\r\n\t\tstatic::p()->tableName = static::$tableName ?: Inflector::tableize(static::p()->name);\r\n\t\tstatic::p()->table = Table::instance(static::p()->tableName, static::getName());\r\n\t\tstatic::p()->validate = static::$validate ?: array();\r\n\t\t\r\n\t\tstatic::normalizeRelations();\r\n\t\t\r\n\t}","title":""},{"docid":"d13c1a866395e060fbe4120bbcf22365","score":"0.5620942","text":"public function createEntity()\n {\n return new $this->class;\n }","title":""},{"docid":"3caa2563faeb1bcfff1b28cbc61a5670","score":"0.55829537","text":"public function init()\n {\n return $this;\n }","title":""},{"docid":"25ba173449d4fab5d233ab6664d25239","score":"0.552567","text":"public function init() {\r\n return $this;\r\n }","title":""},{"docid":"a52209c70a756f670b97409a86eb836e","score":"0.54897344","text":"private function createInitializer()\n {\n $initializer = new Initializer();\n\n $initializer->addTemplate('common', new CommonTemplate());\n $initializer->addTemplate('composer', new ComposerTemplate());\n\n return $initializer;\n }","title":""},{"docid":"80d288fb7d300ad63da6c91acb7a554e","score":"0.5473833","text":"public function init() {\n\t\treturn $this;\n\t}","title":""},{"docid":"068f2fa06407c06c14f1fd7cc8833302","score":"0.54643154","text":"public function __construct() {\n $this->entityToArrayConverter = new EntityToArrayConverter();\n }","title":""},{"docid":"59236cda1f888f9725d059cce9e3b636","score":"0.54582876","text":"public function init() {\n\t\treturn parent::init();\n\t}","title":""},{"docid":"a21c51e4302fbc30d71c732d459fae8a","score":"0.54452586","text":"public function __construct() {\n $config = [\n 'name' => 'entityByPath',\n 'type' => new EntityInterfaceType(),\n 'args' => [\n 'path' => new NonNullType(new StringType()),\n ],\n ];\n\n parent::__construct($config);\n }","title":""},{"docid":"70a2e8e643c79dc99f34fd65d8503fe7","score":"0.54356295","text":"public function getEntity()\n {\n $class = $this->entityName;\n return new $class();\n }","title":""},{"docid":"333ba991e84bf5195bf4ae58df459fc5","score":"0.5412148","text":"public function testGetEntityCreatedBeforeInitialised()\n {\n $entityType = '\\AppserverIo\\Concurrency\\ExecutorService\\Entities\\Storage';\n ExS\\Core::init();\n ExS\\Core::newFromEntity($entityType, 'storage');\n $exSentity = ExS\\Core::getEntity('storage');\n $this->assertInstanceOf('\\AppserverIo\\Concurrency\\ExecutorService', $exSentity);\n }","title":""},{"docid":"d54259d7189f6696bb16d8288ad31791","score":"0.54053664","text":"abstract protected function getInitializerInstance(Container $container);","title":""},{"docid":"245539e3e8f32350eb801eaa607a9ea9","score":"0.53866696","text":"protected function _getEntityAdapter()\n {\n if (!$this->_entityAdapter) {\n if ($this->getEntity() === InriverImportHelper::INRIVER_ENTITY) {\n $entities = $this->_importConfig->getEntities();\n\n if (isset($entities[$this->getEntity()])) {\n try {\n $this->_entityAdapter = $this->_entityFactory->create($entities[$this->getEntity()]['model']);\n } catch (Throwable $e) {\n $this->_logger->critical($e);\n\n throw new LocalizedException(\n __('Please enter a correct entity model.')\n );\n }\n\n if (\n !$this->_entityAdapter instanceof AbstractEntity &&\n !$this->_entityAdapter instanceof ImportAbstractEntity\n ) {\n throw new LocalizedException(\n __(\n 'The entity adapter object must be an instance of %1 or %2.',\n AbstractEntity::class,\n ImportAbstractEntity::class\n )\n );\n }\n\n // Restore original import entity and mark import as an Inriver Import\n $this->setEntity(Product::ENTITY);\n $this->setData(InriverImportHelper::IS_INRIVER_IMPORT, true);\n\n // check for entity codes integrity\n if ($this->getEntity() !== $this->_entityAdapter->getEntityTypeCode()) {\n throw new LocalizedException(\n __('The input entity code is not equal to entity adapter code.')\n );\n }\n } else {\n throw new LocalizedException(__('Please enter a correct entity.'));\n }\n $this->_entityAdapter->setParameters($this->getData());\n } else {\n return parent::_getEntityAdapter();\n }\n }\n\n return $this->_entityAdapter;\n }","title":""},{"docid":"3380b447bc64018a6d6c6b2ab170dae5","score":"0.5352838","text":"public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this\n\t\t\t->setEntityMapping( 'id', 'point_id' )\n\t\t\t->setEntityMapping( 'title', 'point_id' )\n\t\t\t->setEntityMapping( 'point_event_id', 'pntevt_id' )\n\t\t;\n\t\t\n\t\treturn $this;\n\t}","title":""},{"docid":"92fd2ceae8bf4f79504495bd9496037d","score":"0.53274363","text":"public static function init()\n {\n return parent::init(__CLASS__);\n }","title":""},{"docid":"43d9d0ac790ec61005ce9f6156c259b6","score":"0.5321826","text":"public function __construct() \n {\n $df = new DoctrineFactory();\n $this->em = $df->getEntityManager();\n $this->init();\n }","title":""},{"docid":"06ea4949f78264bdc11ea59ede49bc69","score":"0.53181714","text":"protected function _construct()\n {\n $this->_init('catalog_product_entity', 'entity_id');\n }","title":""},{"docid":"e5e6130a889e5fd3f1179dc0c0a1e53f","score":"0.52998036","text":"public static function init()\n\t{\n\t\treturn parent::init(__CLASS__);\n\t}","title":""},{"docid":"ba10cbe58c66e6845b3f402472cb481f","score":"0.5295063","text":"public function testGetEntityNotCreatedBeforeInitialised()\n {\n ExS\\Core::init();\n $entity = ExS\\Core::getEntity('storage');\n }","title":""},{"docid":"b3951f3b7cb530521d8f3b7776b3a1fa","score":"0.5279046","text":"function __construct() {\n $bootstrap = new Bootstrap();\n \n $this->entityManager = $bootstrap->getEntityManager();\n }","title":""},{"docid":"dc961c237d4cfc243b5b1bbe17bf61e1","score":"0.5249374","text":"static public function factory() {\n return new ContentFields_entity();\n }","title":""},{"docid":"25a5159e735025b72f2a9ba2facee6f6","score":"0.5233252","text":"protected function setUpStorage() {\n $storage = $this->prophesize(EntityStorageInterface::class);\n\n $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);\n $entity_type_manager->getDefinition($this->entityType->id())->willReturn($this->entityType);\n $entity_type_manager->getStorage($this->entityType->id())->willReturn($storage->reveal());\n\n $this->entityForm->setEntityTypeManager($entity_type_manager->reveal());\n\n return $storage;\n }","title":""},{"docid":"e72b87f0fe5acbcaea0101efd079a51b","score":"0.5232298","text":"function init() {/*{{{*/\n\t\treturn $this;\n\t}","title":""},{"docid":"637bcf5a0c11aeb66aad7e947dc6e317","score":"0.52318406","text":"public function makeInstanceOfEntity()\n {\n /** @var string|mixed|null $type **/\n $type = $this->getEntityType();\n\n return $this->makeInstanceByEntityType($type);\n }","title":""},{"docid":"953a44c80475cc26a6c16152ee15442a","score":"0.5229097","text":"protected function getLexikFormFilter_Type_FilterEntityService()\n {\n return $this->services['lexik_form_filter.type.filter_entity'] = new \\Lexik\\Bundle\\FormFilterBundle\\Filter\\Form\\Type\\EntityFilterType(${($_ = isset($this->services['doctrine']) ? $this->services['doctrine'] : $this->get('doctrine')) && false ?: '_'});\n }","title":""},{"docid":"65af87564ab3ff25f84443755bd16731","score":"0.5225737","text":"protected function getInitObj()\n {\n $c = static::getModel();\n //if run page root direct\n if(!class_exists($c))\n {\n return null;\n }\n $obj = $c::getInitObj();\n //set pre filter\n $arr = static::getPageView();\n foreach($arr as $field=>$value)\n {\n $obj->{$field} = $value;\n }\n return $obj;\n }","title":""},{"docid":"f44487b1b6e9f566e52f2c11cb85361c","score":"0.5218947","text":"public function initialize()\n {\n $schema = new Infra();\n $this->setSchema($schema->getSchemaBanco());\n $this->setSource(\"cliente_unidade\");\n $this->hasMany('id', 'Circuitos\\Models\\Circuitos', 'id_cliente_unidade', ['alias' => 'Circuitos']);\n $this->belongsTo('id_cliente', 'Circuitos\\Models\\Cliente', 'id', ['alias' => 'Cliente']);\n $this->hasOne('id_pessoa', 'Circuitos\\Models\\Pessoa', 'id', ['alias' => 'Pessoa']);\n }","title":""},{"docid":"81535c647c8513eb1cf4137fe45a99de","score":"0.5199346","text":"public function __construct() {\n $entity_type_manager = \\Drupal::entityTypeManager();\n $this->storeStorage = $entity_type_manager->getStorage('commerce_store');\n }","title":""},{"docid":"45a3f1ac8b3f2f49d118a144aaf1bdb3","score":"0.5195393","text":"public static function init(): self\n {\n return new self(new BulkRetrieveVendorsRequest());\n }","title":""},{"docid":"56bede7abb6b60fccde8107647f9a027","score":"0.51939857","text":"public function getEntity()\n {\n if (!is_object($this->configuration['entity'])) {\n $entity = $this->configuration['entity'];\n $this->configuration['entity'] = new $entity;\n }\n return $this->configuration['entity'];\n }","title":""},{"docid":"0dd05cf6974282f49bacc5a567bb0bd7","score":"0.5174165","text":"protected function _initialize()\n {\n $this->_object_name = strtolower(substr(get_class($this), 6));\n\n // Check if this model has already been initialized\n if ( ! $init = Arr::get(ORM::$_init_cache, $this->_object_name, FALSE))\n {\n $init = array(\n '_belongs_to' => array(),\n '_has_one' => array(),\n '_has_many' => array(),\n '_files' => array(),\n );\n\n // Set the object plural name if none predefined\n if ( ! isset($this->_object_plural))\n {\n $init['_object_plural'] = Inflector::plural($this->_object_name);\n }\n\n if ( ! $this->_errors_filename)\n {\n $init['_errors_filename'] = $this->_object_name;\n }\n\n if ( ! is_object($this->_db))\n {\n // Get database instance\n $init['_db'] = Database::instance($this->_db_group);\n }\n\n if (empty($this->_table_name))\n {\n // Table name is the same as the object name\n $init['_table_name'] = $this->_object_name;\n\n if ($this->_table_names_plural === TRUE)\n {\n // Make the table name plural\n $init['_table_name'] = Arr::get($init, '_object_plural', $this->_object_plural);\n }\n }\n\n $defaults = array();\n\n foreach ($this->_belongs_to as $alias => $details)\n {\n if ( ! isset($details['model']))\n {\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', $alias)));\n }\n\n $defaults['foreign_key'] = $alias.$this->_foreign_key_suffix;\n\n $init['_belongs_to'][$alias] = array_merge($defaults, $details);\n }\n\n foreach ($this->_files as $alias)\n {\n $defaults['model'] = 'File';\n $defaults['foreign_key'] = 'file'.$this->_foreign_key_suffix;\n\n $init['_files'][$alias] = $defaults;\n }\n\n foreach ($this->_has_one as $alias => $details)\n {\n if ( ! isset($details['model']))\n {\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', $alias)));\n }\n\n $defaults['foreign_key'] = $this->_object_name.$this->_foreign_key_suffix;\n\n $init['_has_one'][$alias] = array_merge($defaults, $details);\n }\n\n foreach ($this->_has_many as $alias => $details)\n {\n if ( ! isset($details['model']))\n {\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', Inflector::singular($alias))));\n }\n\n $defaults['foreign_key'] = $this->_object_name.$this->_foreign_key_suffix;\n $defaults['through'] = NULL;\n\n if ( ! isset($details['far_key']))\n {\n $defaults['far_key'] = Inflector::singular($alias).$this->_foreign_key_suffix;\n }\n\n $init['_has_many'][$alias] = array_merge($defaults, $details);\n }\n\n ORM::$_init_cache[$this->_object_name] = $init;\n }\n\n // Assign initialized properties to the current object\n foreach ($init as $property => $value)\n {\n $this->{$property} = $value;\n }\n\n // Load column information\n $this->reload_columns();\n\n // Clear initial model state\n $this->clear();\n }","title":""},{"docid":"6b8df15de88b7f6243b4ca7ac89592cf","score":"0.5172956","text":"public function initialise()\n {\n\n }","title":""},{"docid":"4f7d86ee01a21bdd7d18b865d07bd0de","score":"0.51706976","text":"public function __construct()\n\t{\n\t\t$this->entity = new Entity(array(\n\t\t\t'name' => 'constituency',\n\t\t\t'columns' => array('id', 'name', 'short_name', 'description', 'parliament_code', 'since', 'until'),\n\t\t\t'pkey_columns' => array('id'),\n\t\t\t'readonly_columns' => array('id')\n\t\t));\n\t}","title":""},{"docid":"2a4d2310d89ed07872451bdce1d94dc1","score":"0.51697457","text":"public function init_model(){\n return new EditEntityPageModel($this);\n }","title":""},{"docid":"a3a7a54649964a0731fbe30f6177918e","score":"0.5157939","text":"protected function _construct()\n {\n $this->_init('datta_storelocator/store', 'entity_id');\n }","title":""},{"docid":"3a05f962a5e283b1c295dd0d7fbe23d3","score":"0.5150345","text":"public function __getInitializer(): void\n {\n }","title":""},{"docid":"be1a3b419dad620f3ee3ec1c0d96d4f8","score":"0.51468563","text":"public function init()\n {\n\t\t$config = new Configuration();\n\t\t$config->setProxyDir(__DIR__ . '/Cache');\n\t\t$config->setProxyNamespace('Proxies');\n\t\t\n\t\t$config->setHydratorDir(__DIR__ . '/Cache');\n\t\t$config->setHydratorNamespace('Hydrators');\n\t\t\n\t\t$reader = new AnnotationReader();\n\t\t$reader->setDefaultAnnotationNamespace('Doctrine\\ODM\\MongoDB\\Mapping\\\\');\n\t\t$config->setMetadataDriverImpl(new AnnotationDriver($reader, __DIR__ . '/Documents'));\n\t\t\n\t\t$dm = DocumentManager::create(new Connection(), $config);\n\t\t\\Zend_Registry::set('dm', $dm);\n\t\treturn $dm;\n }","title":""},{"docid":"27c288ea5fcd2a0e841cbfcd3e77466b","score":"0.5141643","text":"protected function init()\n {\n $this->checkDatabaseFile();\n\n $this->reader = new Reader(\n $this->getDatabasePath(),\n $this->getLocales()\n );\n }","title":""},{"docid":"fdd43cbc1a8adf9b8531d98add493077","score":"0.5135257","text":"protected function init()\n {\n $this->evm = new EventManager();\n $config = new Configuration();\n\n // timestampable\n if (!empty($this->options['timestampable'])) {\n $this->addTimestampable();\n }\n // sluggable\n if (!empty($this->options['sluggable'])) {\n $this->addSluggable();\n }\n // tree\n if (!empty($this->options['tree'])) {\n $this->addTree();\n }\n // profile logger\n if (!empty($this->options['profile'])) {\n $config->setSQLLogger(new EchoSQLLogger());\n }\n\n $cache = new $this->config->cacheImplementation();\n $entityFolders = $this->getEntityFolders();\n $proxyFolder = $this->getProxyFolder();\n $driverImpl = $config->newDefaultAnnotationDriver($entityFolders);\n\n AnnotationReader::addGlobalIgnoredName('package_version');\n $annotationReader = new AnnotationReader;\n $cachedAnnotationReader = new \\Doctrine\\Common\\Annotations\\CachedReader(\n $annotationReader, // use reader\n $cache // and a cache driver\n );\n\n $annotationDriver = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver(\n $cachedAnnotationReader, // our cached annotation reader\n $entityFolders // paths to look in\n );\n\n $this->registerAutoloadNamespaces();\n\n $config->setMetadataDriverImpl($annotationDriver);\n $config->setMetadataCacheImpl($cache);\n $config->setQueryCacheImpl($cache);\n $config->setProxyDir($proxyFolder);\n $config->setProxyNamespace($this->config->proxy->namespace);\n $config->setAutoGenerateProxyClasses($this->config->autoGenerateProxyClasses);\n\n if ($this->config instanceof \\Zend_Config) {\n $connectionConfig = $this->config->connection->toArray();\n } else {\n $connectionConfig = (array) $this->config->connection;\n }\n\n if (true === $this->options['bibplatform']) {\n $connectionConfig['platform'] = new MysqlBibPlatform();\n }\n\n $this->em = EntityManager::create(\n $connectionConfig,\n $config,\n $this->evm\n );\n\n PersistentObject::setObjectManager($this->em);\n return;\n }","title":""},{"docid":"a1386361a67df18f5793f5a7188c9c7a","score":"0.5125127","text":"public function createOffer()\n {\n $entityClass = 'MU\\\\YourCityModule\\\\Entity\\\\OfferEntity';\n\n $entity = new $entityClass();\n\n $this->entityInitialiser->initOffer($entity);\n\n return $entity;\n }","title":""},{"docid":"bf3b2394289026f499a143aa7f094d9e","score":"0.510911","text":"public function initialize()\n {\n $schema = new Infra();\n $this->setSchema($schema->getSchemaBanco());\n $this->setSource(\"parametros\");\n $this->belongsTo('id_empresa', 'Circuitos\\Models\\Empresa', 'id', ['alias' => 'Empresa']);\n }","title":""},{"docid":"9010a455c17612499e4ce888f45c0e37","score":"0.5108983","text":"protected function init()\n {\n /** @var EntityManager $em */\n $this->em = $this->getContainer()->get('doctrine.orm.default_entity_manager');\n $this->srcDir = realpath($this->getApplication()->getKernel()->getRootDir() . '/../src/') . '/';\n $this->translationRepository = $this->em->getRepository('TranslationsApiBundle:Translation');\n }","title":""},{"docid":"df0ad7a2514cbb8a653aebac248080da","score":"0.5093931","text":"public function Flow_Persistence_LazyLoadingObject_initialize();","title":""},{"docid":"a593bbf7928af5e0ed15dde7411dfdbc","score":"0.5084243","text":"protected function _initialize()\n {\n $this->metadata()->setTablename('faixa_salarial');\n $this->metadata()->setPackage('Model');\n \n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\n \n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true));\n $this->metadata()->addField('des', 'des', 'varchar', 45, array('notnull' => true));\n $this->metadata()->addField('minima', 'minima', 'int', 11, array('notnull' => true));\n $this->metadata()->addField('maxima', 'maxima', 'int', 11, array('notnull' => true));\n\n \n $this->metadata()->addRelation('empregos', Lumine_Metadata::ONE_TO_MANY, 'Emprego', 'faixaSalarialId', null, null, null);\n }","title":""},{"docid":"ae8deb18f588e99c36c660be29009498","score":"0.5079303","text":"public static function init() {\n $class = get_called_class(); // late-static-bound class name\n if(!isset(self::$instance[$class])):\n self::$instance[$class] = new static;\n endif;\n return self::$instance[$class];\n }","title":""},{"docid":"789bbd5b801a6c4bd971d92d8af64e3e","score":"0.50696903","text":"protected function _initInvitation()\n {\n $invitation = $this->_invitationFactory->create()->load($this->getRequest()->getParam('id'));\n if (!$invitation->getId()) {\n throw new \\Magento\\Framework\\Exception\\LocalizedException(__('We can\\'t find this invitation.'));\n }\n $this->_coreRegistry->register('current_invitation', $invitation);\n\n return $invitation;\n }","title":""},{"docid":"0cf5b9790fd6e20b94a817fb219e1ebb","score":"0.5063087","text":"protected function getDoctrine_Orm_ValidatorInitializerService()\n {\n return $this->services['doctrine.orm.validator_initializer'] = new \\Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer(${($_ = isset($this->services['doctrine']) ? $this->services['doctrine'] : $this->get('doctrine')) && false ?: '_'});\n }","title":""},{"docid":"6c6f98ea68902ffedda9b4592f540a49","score":"0.5061051","text":"public function init() {\n\t\t$class = __CLASS__;\n\t\tnew $class;\n\t}","title":""},{"docid":"deb2858a0de43c5224459dde7e6024f4","score":"0.50530446","text":"public function getInstance()\n {\n if (! isset($this->instanceOfEntity)) {\n $this->instanceOfEntity = $this->makeInstanceOfEntity();\n }\n\n return $this->instanceOfEntity;\n }","title":""},{"docid":"bbf937553905a4752ea1a89aee04f7c5","score":"0.50526804","text":"public function init()\n {\n $this->diseaseModel = new Application_Model_Disease();\n }","title":""},{"docid":"3b779f615921715ac69a2de0deb2cc16","score":"0.5045555","text":"public function entity();","title":""},{"docid":"220507f1b1a63a5f51ff3aab35024395","score":"0.5033828","text":"public function init()\n {\n return new Customer();\n }","title":""},{"docid":"142276eb8cf0767eacff42aef85d7658","score":"0.50301015","text":"public function __construct()\n\t{\n\t $this->entity = new ConceptosViaje;\n\t}","title":""},{"docid":"66d2238499e15d4e7fa4d3f0cf6e4bc1","score":"0.50274193","text":"public static function init()\n {\n return new self;\n }","title":""},{"docid":"b08419bae3ca6dbcccc03cfa7099b5d1","score":"0.5002865","text":"abstract protected function __init(): object;","title":""},{"docid":"ad172ff974799d017c433a4a1943b554","score":"0.49913138","text":"public function __construct()\n {\n parent::__construct(self::TABLESCHEMA, self::TABLESCHEMAID, SettingEntity::class);\n }","title":""},{"docid":"d507bbf004e9d369cc81a6e631efec45","score":"0.49890852","text":"public function __construct()\n {\n $this->addFieldGetter(new FieldGetter());\n }","title":""},{"docid":"d84667646031e3427cbf747f22239442","score":"0.49874806","text":"public function _construct()\n {\n $this->_init(ResourceModel::class);\n }","title":""},{"docid":"6e6ed7fa0e4702f7976792bf26310d9a","score":"0.49868178","text":"public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this\n\t\t\t->setEntityMapping( 'id', 'group_id' )\n\t\t\t->setEntityMapping( 'content', 'description' )\n\t\t;\n\t\t\n\t\treturn $this;\n\t}","title":""},{"docid":"4fcdce8f60dba3e03d48582cf1f85ed0","score":"0.4986","text":"public function testNewFromEntityFunctionNotInitialised()\n {\n ExS\\Core::newFromEntity('\\stdClass');\n }","title":""},{"docid":"8d4857dd3d2c9e00f6a92e2328a064ee","score":"0.49814633","text":"protected function createEntity() {\n // Check our definition allows creation.\n $definition = $this->getPluginDefinition();\n if (!$definition['_allow_create']) {\n return FALSE;\n }\n\n // Check our config allows creation.\n $config = $this->getConfiguration();\n if (!$config['create']) {\n return FALSE;\n }\n\n // Build our values.\n $values = [];\n\n // If this entity type has bundles, set the appropriate key.\n if ($definition['_bundle_key']) {\n $values[$definition['_bundle_key']] = $config['create'];\n }\n\n // Create the entity.\n $entity = $this->entityTypeManager->getStorage($definition['_entity_type_id'])->create($values);\n\n // If this has an owner, set it.\n if ($entity instanceof EntityOwnerInterface) {\n $entity->setOwner($this->getContextValue('user'));\n }\n\n return $entity;\n }","title":""},{"docid":"25363992eca2d5df0ffc274f86bd5690","score":"0.49793258","text":"public function init() {\n\t\t\n\t\tparent::init();\n\t\t\n\t\t$this->setEntityMapping( 'id', 'address_id' );\n\t\t\n\t\treturn $this;\n\t}","title":""},{"docid":"c37349ba255e42ffa23ce46bc0d7d718","score":"0.49785435","text":"public function initialize(): Operation\n {\n return new $this->model([\n 'detail' => ''\n ]);\n }","title":""},{"docid":"9188198659a8283ad09dc2df335034fe","score":"0.49710032","text":"public function getInitiatedBy(): ?Initiator {\n $val = $this->getBackingStore()->get('initiatedBy');\n if (is_null($val) || $val instanceof Initiator) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'initiatedBy'\");\n }","title":""},{"docid":"9e8b121db9950aaf6bb5986e63bc2db5","score":"0.49691898","text":"public function initialize()\n {\n $this->hasOne('id', '\\Application\\Backend\\Entity\\CompanyRevenue', 'company_id', array(\n 'alias' => 'revenue',\n 'foreignKey' => true\n ));\n\n $this->addBehavior(new Sluggable());\n $this->addBehavior(new Timestampable());\n }","title":""},{"docid":"52a1ce64927524d506c5cef408cb7864","score":"0.4967504","text":"protected function _construct()\r\n {\r\n $this->_init('Inchoo\\Recipe\\Model\\Post', 'Inchoo\\Recipe\\Model\\ResourceModel\\Post');\r\n }","title":""},{"docid":"de06885377167c625a82c7fae514d33a","score":"0.49671125","text":"public function initialize()\n {\n $schema = new Infra();\n $this->setSchema($schema->getSchemaBanco());\n $this->setSource(\"usuario\");\n $this->hasMany('id', 'Circuitos\\Models\\Circuitos', 'id_usuario_criacao', ['alias' => 'Circuitos1']);\n $this->hasMany('id', 'Circuitos\\Models\\Circuitos', 'id_usuario_atualizacao', ['alias' => 'Circuitos2']);\n $this->hasMany('id', 'Circuitos\\Models\\Movimentos', 'id_usuario', ['alias' => 'Movimentos']);\n $this->hasOne('id_pessoa', 'Circuitos\\Models\\Pessoa', 'id', ['alias' => 'Pessoa']);\n $this->belongsTo('roles_name', 'Circuitos\\Models\\PhalconRoles', 'name', ['alias' => 'PhalconRoles']);\n }","title":""},{"docid":"d62fd048e86b2cc6b1fee93d9dfa2a48","score":"0.49548084","text":"public function initialize()\n {\n // Return instance\n return $this;\n }","title":""},{"docid":"83c7526cd90c54fa68e5aa59c09b792d","score":"0.49541992","text":"protected function getDoctrine_Orm_ValidatorInitializerService()\n {\n return $this->services['doctrine.orm.validator_initializer'] = new \\Symfony\\Bridge\\Doctrine\\Validator\\DoctrineInitializer($this->get('doctrine'));\n }","title":""},{"docid":"d630ed2ac18f2e9daba3e050cec846e1","score":"0.49531916","text":"public function __construct($entityManager)\n {\n }","title":""},{"docid":"d0689928a63c0aa8e563c339c6ce8716","score":"0.49487272","text":"public function init()\n {\n $this->dbRole = new Admin_Model_DbTable_Acl_Role();\n $this->dbRoleMember = new Admin_Model_DbTable_Acl_RoleMember();\n $this->dbRoleInherit = new Admin_Model_DbTable_Acl_RoleInherit();\n $this->dbUser = new Admin_Model_DbTable_Users();\n $this->dbGroup = new Admin_Model_DbTable_Groups();\n }","title":""},{"docid":"18fcc1c546eccbcb551af3e42e3f860b","score":"0.49481788","text":"public static function getInstallable()\n {\n return Factory::getInstallable();\n }","title":""},{"docid":"c7b19c9490923870e6f6edcb53de8265","score":"0.49440867","text":"public function init()\n {\n\n // initialize the prepared statements\n $this->eavEntityTypeStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ENTITY_TYPES));\n $this->eavEntityTypeByEntityTypeACodeStmt =\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ENTITY_TYPE_BY_ENTITY_TYPE_CODE));\n }","title":""},{"docid":"c0174e3108e0f4e20f11489b19f047a8","score":"0.49386045","text":"protected function initialise()\n { }","title":""},{"docid":"6b2f2b75b948c0e64b37e60864e86c91","score":"0.4938542","text":"public function __construct()\n {\n $this->contact_list_entity = new ContactListEntity();\n }","title":""},{"docid":"1ea1413f0ee8e865576e6d4846805e00","score":"0.49321622","text":"public function test_get_entity_factory() {\n $this->assertInstanceOf(\\mod_forum\\local\\factories\\entity::class, \\mod_forum\\local\\container::get_entity_factory());\n }","title":""},{"docid":"f69eb0a65b6a728e712d960bb5187f80","score":"0.4926309","text":"public function __construct(){\r\n\t\t\r\n\t\t$datastore = config::get($this, 'datastore');\r\n\t\t\r\n\t\tif($datastore != ''){\r\n\t\t\t$this->datastore = $datastore;\r\n\t\t}\r\n\t\t\r\n\t\t$map = config::get($this, 'mapDbToObject');\r\n\t\tif(is_array($map)){\r\n\t\t\t$this->mapDbToObject = $map;\r\n\t\t}\r\n\t\t\r\n\t\tif($this->table == ''){\r\n\t\t\t$this->table = inflector::getSpecificfromcontext($this);\r\n\t\t}\r\n\t}","title":""},{"docid":"eaad5f4356455ea85bf5cacb54036466","score":"0.4924476","text":"public static function init(): self\n {\n return new self(new InvoiceCustomField());\n }","title":""},{"docid":"ef4c718f159dae03ea6f1f8bcc97e15a","score":"0.49244297","text":"function initialize2() {\n\t\t$entitydata = Vtiger_Functions::getEntityModuleInfo($this->name);\n\t\tif ($entitydata) {\n\t\t\t$this->basetable = $entitydata['tablename'];\n\t\t\t$this->basetableid=$entitydata['entityidfield'];\n\t\t}\n\t}","title":""},{"docid":"b8c9ce69276c845881220ae685e4c08b","score":"0.49158475","text":"public function __construct()\n {\n $this->_factory = FactoryModel::getInstance();\n }","title":""},{"docid":"301b396f2e10e9368a994b407609017e","score":"0.4914822","text":"public function init() {}","title":""},{"docid":"301b396f2e10e9368a994b407609017e","score":"0.4914822","text":"public function init() {}","title":""},{"docid":"301b396f2e10e9368a994b407609017e","score":"0.4914822","text":"public function init() {}","title":""},{"docid":"301b396f2e10e9368a994b407609017e","score":"0.4914822","text":"public function init() {}","title":""},{"docid":"301b396f2e10e9368a994b407609017e","score":"0.4914822","text":"public function init() {}","title":""},{"docid":"cbdbe53344b0020abde01018bf788775","score":"0.49147215","text":"public function __construct(public Entity $entity)\n {\n }","title":""},{"docid":"85a3c2d88d273395f2e623dd458d01eb","score":"0.49127203","text":"public function __construct($entityTypeManager) {\n $this->entityTypeManager = $entityTypeManager;\n }","title":""},{"docid":"ad089ba45a4eaed38bf8133bb35e2df5","score":"0.49094406","text":"public function _init(){}","title":""},{"docid":"73b31739f6a250632821f8026130d86a","score":"0.49068326","text":"public function __construct()\n {\n parent::__construct(self::table, self::columns, self::entity_class_name);\n }","title":""},{"docid":"683bb0f36ff26bc1bcef21bdec2ec1ff","score":"0.49007004","text":"public function initAsSpecimen()\n\t{\n\t\t$this->id = 0;\n\t\t\n\t\t$this->fk_operator = '';\n\t\t$this->fk_product = '';\n\t\t$this->type = '';\n\t\t$this->status = '';\n\t\t$this->comment = '';\n\n\t\t\n\t}","title":""},{"docid":"339324d35c27767d8ca13b20bfbc1543","score":"0.4898736","text":"public function getCreator();","title":""},{"docid":"339324d35c27767d8ca13b20bfbc1543","score":"0.4898736","text":"public function getCreator();","title":""},{"docid":"bcd9327a50a77e1967b2c3ba48a7a7a8","score":"0.48906136","text":"public function __construct() {\r\n $this->setEntity('mst_questionnaire_review');\r\n }","title":""},{"docid":"52dea5c5813d31ffc3a7fcc7bc508544","score":"0.48902225","text":"protected function _initForm()\n {\n $formId = $this->resolveFormId();\n $form = $this->_objectManager->create(\\BlueFormBuilder\\Core\\Model\\Form::class);\n\n if ($formId) {\n $form->load($formId);\n }\n\n $this->_objectManager->get(\\Magento\\Framework\\Registry::class)->register('form', $form);\n $this->_objectManager->get(\\Magento\\Framework\\Registry::class)->register('current_form', $form);\n return $form;\n }","title":""},{"docid":"bf14095236a1885b30a3e95e0632dde9","score":"0.4887439","text":"protected function _init() {}","title":""}],"string":"[\n {\n \"docid\": \"4faee4b920040a24f82841f014ab4059\",\n \"score\": \"0.6247925\",\n \"text\": \"public function setEntityInitialiser($entityInitialiser)\\n {\\n if ($this->entityInitialiser != $entityInitialiser) {\\n $this->entityInitialiser = $entityInitialiser;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f44a3b806f94ae7dace6c6bed4c768f5\",\n \"score\": \"0.59009886\",\n \"text\": \"private function _entity()\\n {\\n return new Entity();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1be2a99c6f5a27042e5a6e25af11bcba\",\n \"score\": \"0.5762415\",\n \"text\": \"public function init()\\n {\\n $registry = Zend_Registry::getInstance();\\n $this->_em = $registry->entitymanager;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95bcba338b409fbed9a5ed62b60ef150\",\n \"score\": \"0.5755717\",\n \"text\": \"public function setDefaultEntity() {\\n /** @var Ultimate_ModuleCreator_Model_Entity $entity */\\n $entity = Mage::getModel('modulecreator/entity');\\n $settings = Mage::getStoreConfig(Ultimate_ModuleCreator_Helper_Data::XML_ENTITY_CONFIG_PATH);\\n $entity->addData($settings);\\n $this->setEntity($entity);\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"503f1529069c0bc4421bbd92aea7b652\",\n \"score\": \"0.56984323\",\n \"text\": \"public function init() {\\n\\t\\t\\n\\t\\tparent::init();\\n\\t\\t\\n\\t\\t$this\\n\\t\\t\\t->setEntityMapping( 'id', 'bksch_id' )\\n\\t\\t\\t->setEntityMapping( 'title', 'name' )\\n\\t\\t\\t->setEntityMapping( 'slug', 'slug' )\\n\\t\\t\\t->setEntityMapping( 'content', 'description' )\\n\\t\\t;\\n\\t\\t\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fdc292c2ae26bc5ade457463fe20ee2a\",\n \"score\": \"0.56298363\",\n \"text\": \"public static function __init() {\\r\\n\\t\\t\\r\\n\\t\\tif(!isset(static::$states[get_called_class()])) static::$states[get_called_class()] = new \\\\StdClass;\\r\\n\\t\\telse return;\\r\\n\\t\\t\\r\\n\\t\\t// Model should never be initialized.\\r\\n\\t\\tif(get_called_class() === __CLASS__) return;\\r\\n\\t\\t\\r\\n\\t\\t// Store the model name (sans namespace) in the metadata.\\r\\n\\t\\tstatic::p()->name = @end(explode('\\\\\\\\', static::getName()));\\r\\n\\t\\tstatic::p()->tableName = static::$tableName ?: Inflector::tableize(static::p()->name);\\r\\n\\t\\tstatic::p()->table = Table::instance(static::p()->tableName, static::getName());\\r\\n\\t\\tstatic::p()->validate = static::$validate ?: array();\\r\\n\\t\\t\\r\\n\\t\\tstatic::normalizeRelations();\\r\\n\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d13c1a866395e060fbe4120bbcf22365\",\n \"score\": \"0.5620942\",\n \"text\": \"public function createEntity()\\n {\\n return new $this->class;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3caa2563faeb1bcfff1b28cbc61a5670\",\n \"score\": \"0.55829537\",\n \"text\": \"public function init()\\n {\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25ba173449d4fab5d233ab6664d25239\",\n \"score\": \"0.552567\",\n \"text\": \"public function init() {\\r\\n return $this;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a52209c70a756f670b97409a86eb836e\",\n \"score\": \"0.54897344\",\n \"text\": \"private function createInitializer()\\n {\\n $initializer = new Initializer();\\n\\n $initializer->addTemplate('common', new CommonTemplate());\\n $initializer->addTemplate('composer', new ComposerTemplate());\\n\\n return $initializer;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80d288fb7d300ad63da6c91acb7a554e\",\n \"score\": \"0.5473833\",\n \"text\": \"public function init() {\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"068f2fa06407c06c14f1fd7cc8833302\",\n \"score\": \"0.54643154\",\n \"text\": \"public function __construct() {\\n $this->entityToArrayConverter = new EntityToArrayConverter();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59236cda1f888f9725d059cce9e3b636\",\n \"score\": \"0.54582876\",\n \"text\": \"public function init() {\\n\\t\\treturn parent::init();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a21c51e4302fbc30d71c732d459fae8a\",\n \"score\": \"0.54452586\",\n \"text\": \"public function __construct() {\\n $config = [\\n 'name' => 'entityByPath',\\n 'type' => new EntityInterfaceType(),\\n 'args' => [\\n 'path' => new NonNullType(new StringType()),\\n ],\\n ];\\n\\n parent::__construct($config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70a2e8e643c79dc99f34fd65d8503fe7\",\n \"score\": \"0.54356295\",\n \"text\": \"public function getEntity()\\n {\\n $class = $this->entityName;\\n return new $class();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"333ba991e84bf5195bf4ae58df459fc5\",\n \"score\": \"0.5412148\",\n \"text\": \"public function testGetEntityCreatedBeforeInitialised()\\n {\\n $entityType = '\\\\AppserverIo\\\\Concurrency\\\\ExecutorService\\\\Entities\\\\Storage';\\n ExS\\\\Core::init();\\n ExS\\\\Core::newFromEntity($entityType, 'storage');\\n $exSentity = ExS\\\\Core::getEntity('storage');\\n $this->assertInstanceOf('\\\\AppserverIo\\\\Concurrency\\\\ExecutorService', $exSentity);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d54259d7189f6696bb16d8288ad31791\",\n \"score\": \"0.54053664\",\n \"text\": \"abstract protected function getInitializerInstance(Container $container);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"245539e3e8f32350eb801eaa607a9ea9\",\n \"score\": \"0.53866696\",\n \"text\": \"protected function _getEntityAdapter()\\n {\\n if (!$this->_entityAdapter) {\\n if ($this->getEntity() === InriverImportHelper::INRIVER_ENTITY) {\\n $entities = $this->_importConfig->getEntities();\\n\\n if (isset($entities[$this->getEntity()])) {\\n try {\\n $this->_entityAdapter = $this->_entityFactory->create($entities[$this->getEntity()]['model']);\\n } catch (Throwable $e) {\\n $this->_logger->critical($e);\\n\\n throw new LocalizedException(\\n __('Please enter a correct entity model.')\\n );\\n }\\n\\n if (\\n !$this->_entityAdapter instanceof AbstractEntity &&\\n !$this->_entityAdapter instanceof ImportAbstractEntity\\n ) {\\n throw new LocalizedException(\\n __(\\n 'The entity adapter object must be an instance of %1 or %2.',\\n AbstractEntity::class,\\n ImportAbstractEntity::class\\n )\\n );\\n }\\n\\n // Restore original import entity and mark import as an Inriver Import\\n $this->setEntity(Product::ENTITY);\\n $this->setData(InriverImportHelper::IS_INRIVER_IMPORT, true);\\n\\n // check for entity codes integrity\\n if ($this->getEntity() !== $this->_entityAdapter->getEntityTypeCode()) {\\n throw new LocalizedException(\\n __('The input entity code is not equal to entity adapter code.')\\n );\\n }\\n } else {\\n throw new LocalizedException(__('Please enter a correct entity.'));\\n }\\n $this->_entityAdapter->setParameters($this->getData());\\n } else {\\n return parent::_getEntityAdapter();\\n }\\n }\\n\\n return $this->_entityAdapter;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3380b447bc64018a6d6c6b2ab170dae5\",\n \"score\": \"0.5352838\",\n \"text\": \"public function init() {\\n\\t\\t\\n\\t\\tparent::init();\\n\\t\\t\\n\\t\\t$this\\n\\t\\t\\t->setEntityMapping( 'id', 'point_id' )\\n\\t\\t\\t->setEntityMapping( 'title', 'point_id' )\\n\\t\\t\\t->setEntityMapping( 'point_event_id', 'pntevt_id' )\\n\\t\\t;\\n\\t\\t\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92fd2ceae8bf4f79504495bd9496037d\",\n \"score\": \"0.53274363\",\n \"text\": \"public static function init()\\n {\\n return parent::init(__CLASS__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43d9d0ac790ec61005ce9f6156c259b6\",\n \"score\": \"0.5321826\",\n \"text\": \"public function __construct() \\n {\\n $df = new DoctrineFactory();\\n $this->em = $df->getEntityManager();\\n $this->init();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06ea4949f78264bdc11ea59ede49bc69\",\n \"score\": \"0.53181714\",\n \"text\": \"protected function _construct()\\n {\\n $this->_init('catalog_product_entity', 'entity_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5e6130a889e5fd3f1179dc0c0a1e53f\",\n \"score\": \"0.52998036\",\n \"text\": \"public static function init()\\n\\t{\\n\\t\\treturn parent::init(__CLASS__);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba10cbe58c66e6845b3f402472cb481f\",\n \"score\": \"0.5295063\",\n \"text\": \"public function testGetEntityNotCreatedBeforeInitialised()\\n {\\n ExS\\\\Core::init();\\n $entity = ExS\\\\Core::getEntity('storage');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3951f3b7cb530521d8f3b7776b3a1fa\",\n \"score\": \"0.5279046\",\n \"text\": \"function __construct() {\\n $bootstrap = new Bootstrap();\\n \\n $this->entityManager = $bootstrap->getEntityManager();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc961c237d4cfc243b5b1bbe17bf61e1\",\n \"score\": \"0.5249374\",\n \"text\": \"static public function factory() {\\n return new ContentFields_entity();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25a5159e735025b72f2a9ba2facee6f6\",\n \"score\": \"0.5233252\",\n \"text\": \"protected function setUpStorage() {\\n $storage = $this->prophesize(EntityStorageInterface::class);\\n\\n $entity_type_manager = $this->prophesize(EntityTypeManagerInterface::class);\\n $entity_type_manager->getDefinition($this->entityType->id())->willReturn($this->entityType);\\n $entity_type_manager->getStorage($this->entityType->id())->willReturn($storage->reveal());\\n\\n $this->entityForm->setEntityTypeManager($entity_type_manager->reveal());\\n\\n return $storage;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e72b87f0fe5acbcaea0101efd079a51b\",\n \"score\": \"0.5232298\",\n \"text\": \"function init() {/*{{{*/\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"637bcf5a0c11aeb66aad7e947dc6e317\",\n \"score\": \"0.52318406\",\n \"text\": \"public function makeInstanceOfEntity()\\n {\\n /** @var string|mixed|null $type **/\\n $type = $this->getEntityType();\\n\\n return $this->makeInstanceByEntityType($type);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"953a44c80475cc26a6c16152ee15442a\",\n \"score\": \"0.5229097\",\n \"text\": \"protected function getLexikFormFilter_Type_FilterEntityService()\\n {\\n return $this->services['lexik_form_filter.type.filter_entity'] = new \\\\Lexik\\\\Bundle\\\\FormFilterBundle\\\\Filter\\\\Form\\\\Type\\\\EntityFilterType(${($_ = isset($this->services['doctrine']) ? $this->services['doctrine'] : $this->get('doctrine')) && false ?: '_'});\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65af87564ab3ff25f84443755bd16731\",\n \"score\": \"0.5225737\",\n \"text\": \"protected function getInitObj()\\n {\\n $c = static::getModel();\\n //if run page root direct\\n if(!class_exists($c))\\n {\\n return null;\\n }\\n $obj = $c::getInitObj();\\n //set pre filter\\n $arr = static::getPageView();\\n foreach($arr as $field=>$value)\\n {\\n $obj->{$field} = $value;\\n }\\n return $obj;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f44487b1b6e9f566e52f2c11cb85361c\",\n \"score\": \"0.5218947\",\n \"text\": \"public function initialize()\\n {\\n $schema = new Infra();\\n $this->setSchema($schema->getSchemaBanco());\\n $this->setSource(\\\"cliente_unidade\\\");\\n $this->hasMany('id', 'Circuitos\\\\Models\\\\Circuitos', 'id_cliente_unidade', ['alias' => 'Circuitos']);\\n $this->belongsTo('id_cliente', 'Circuitos\\\\Models\\\\Cliente', 'id', ['alias' => 'Cliente']);\\n $this->hasOne('id_pessoa', 'Circuitos\\\\Models\\\\Pessoa', 'id', ['alias' => 'Pessoa']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81535c647c8513eb1cf4137fe45a99de\",\n \"score\": \"0.5199346\",\n \"text\": \"public function __construct() {\\n $entity_type_manager = \\\\Drupal::entityTypeManager();\\n $this->storeStorage = $entity_type_manager->getStorage('commerce_store');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45a3f1ac8b3f2f49d118a144aaf1bdb3\",\n \"score\": \"0.5195393\",\n \"text\": \"public static function init(): self\\n {\\n return new self(new BulkRetrieveVendorsRequest());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56bede7abb6b60fccde8107647f9a027\",\n \"score\": \"0.51939857\",\n \"text\": \"public function getEntity()\\n {\\n if (!is_object($this->configuration['entity'])) {\\n $entity = $this->configuration['entity'];\\n $this->configuration['entity'] = new $entity;\\n }\\n return $this->configuration['entity'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0dd05cf6974282f49bacc5a567bb0bd7\",\n \"score\": \"0.5174165\",\n \"text\": \"protected function _initialize()\\n {\\n $this->_object_name = strtolower(substr(get_class($this), 6));\\n\\n // Check if this model has already been initialized\\n if ( ! $init = Arr::get(ORM::$_init_cache, $this->_object_name, FALSE))\\n {\\n $init = array(\\n '_belongs_to' => array(),\\n '_has_one' => array(),\\n '_has_many' => array(),\\n '_files' => array(),\\n );\\n\\n // Set the object plural name if none predefined\\n if ( ! isset($this->_object_plural))\\n {\\n $init['_object_plural'] = Inflector::plural($this->_object_name);\\n }\\n\\n if ( ! $this->_errors_filename)\\n {\\n $init['_errors_filename'] = $this->_object_name;\\n }\\n\\n if ( ! is_object($this->_db))\\n {\\n // Get database instance\\n $init['_db'] = Database::instance($this->_db_group);\\n }\\n\\n if (empty($this->_table_name))\\n {\\n // Table name is the same as the object name\\n $init['_table_name'] = $this->_object_name;\\n\\n if ($this->_table_names_plural === TRUE)\\n {\\n // Make the table name plural\\n $init['_table_name'] = Arr::get($init, '_object_plural', $this->_object_plural);\\n }\\n }\\n\\n $defaults = array();\\n\\n foreach ($this->_belongs_to as $alias => $details)\\n {\\n if ( ! isset($details['model']))\\n {\\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', $alias)));\\n }\\n\\n $defaults['foreign_key'] = $alias.$this->_foreign_key_suffix;\\n\\n $init['_belongs_to'][$alias] = array_merge($defaults, $details);\\n }\\n\\n foreach ($this->_files as $alias)\\n {\\n $defaults['model'] = 'File';\\n $defaults['foreign_key'] = 'file'.$this->_foreign_key_suffix;\\n\\n $init['_files'][$alias] = $defaults;\\n }\\n\\n foreach ($this->_has_one as $alias => $details)\\n {\\n if ( ! isset($details['model']))\\n {\\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', $alias)));\\n }\\n\\n $defaults['foreign_key'] = $this->_object_name.$this->_foreign_key_suffix;\\n\\n $init['_has_one'][$alias] = array_merge($defaults, $details);\\n }\\n\\n foreach ($this->_has_many as $alias => $details)\\n {\\n if ( ! isset($details['model']))\\n {\\n $defaults['model'] = str_replace(' ', '_', ucwords(str_replace('_', ' ', Inflector::singular($alias))));\\n }\\n\\n $defaults['foreign_key'] = $this->_object_name.$this->_foreign_key_suffix;\\n $defaults['through'] = NULL;\\n\\n if ( ! isset($details['far_key']))\\n {\\n $defaults['far_key'] = Inflector::singular($alias).$this->_foreign_key_suffix;\\n }\\n\\n $init['_has_many'][$alias] = array_merge($defaults, $details);\\n }\\n\\n ORM::$_init_cache[$this->_object_name] = $init;\\n }\\n\\n // Assign initialized properties to the current object\\n foreach ($init as $property => $value)\\n {\\n $this->{$property} = $value;\\n }\\n\\n // Load column information\\n $this->reload_columns();\\n\\n // Clear initial model state\\n $this->clear();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6b8df15de88b7f6243b4ca7ac89592cf\",\n \"score\": \"0.5172956\",\n \"text\": \"public function initialise()\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f7d86ee01a21bdd7d18b865d07bd0de\",\n \"score\": \"0.51706976\",\n \"text\": \"public function __construct()\\n\\t{\\n\\t\\t$this->entity = new Entity(array(\\n\\t\\t\\t'name' => 'constituency',\\n\\t\\t\\t'columns' => array('id', 'name', 'short_name', 'description', 'parliament_code', 'since', 'until'),\\n\\t\\t\\t'pkey_columns' => array('id'),\\n\\t\\t\\t'readonly_columns' => array('id')\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a4d2310d89ed07872451bdce1d94dc1\",\n \"score\": \"0.51697457\",\n \"text\": \"public function init_model(){\\n return new EditEntityPageModel($this);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3a7a54649964a0731fbe30f6177918e\",\n \"score\": \"0.5157939\",\n \"text\": \"protected function _construct()\\n {\\n $this->_init('datta_storelocator/store', 'entity_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a05f962a5e283b1c295dd0d7fbe23d3\",\n \"score\": \"0.5150345\",\n \"text\": \"public function __getInitializer(): void\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be1a3b419dad620f3ee3ec1c0d96d4f8\",\n \"score\": \"0.51468563\",\n \"text\": \"public function init()\\n {\\n\\t\\t$config = new Configuration();\\n\\t\\t$config->setProxyDir(__DIR__ . '/Cache');\\n\\t\\t$config->setProxyNamespace('Proxies');\\n\\t\\t\\n\\t\\t$config->setHydratorDir(__DIR__ . '/Cache');\\n\\t\\t$config->setHydratorNamespace('Hydrators');\\n\\t\\t\\n\\t\\t$reader = new AnnotationReader();\\n\\t\\t$reader->setDefaultAnnotationNamespace('Doctrine\\\\ODM\\\\MongoDB\\\\Mapping\\\\\\\\');\\n\\t\\t$config->setMetadataDriverImpl(new AnnotationDriver($reader, __DIR__ . '/Documents'));\\n\\t\\t\\n\\t\\t$dm = DocumentManager::create(new Connection(), $config);\\n\\t\\t\\\\Zend_Registry::set('dm', $dm);\\n\\t\\treturn $dm;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27c288ea5fcd2a0e841cbfcd3e77466b\",\n \"score\": \"0.5141643\",\n \"text\": \"protected function init()\\n {\\n $this->checkDatabaseFile();\\n\\n $this->reader = new Reader(\\n $this->getDatabasePath(),\\n $this->getLocales()\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fdd43cbc1a8adf9b8531d98add493077\",\n \"score\": \"0.5135257\",\n \"text\": \"protected function init()\\n {\\n $this->evm = new EventManager();\\n $config = new Configuration();\\n\\n // timestampable\\n if (!empty($this->options['timestampable'])) {\\n $this->addTimestampable();\\n }\\n // sluggable\\n if (!empty($this->options['sluggable'])) {\\n $this->addSluggable();\\n }\\n // tree\\n if (!empty($this->options['tree'])) {\\n $this->addTree();\\n }\\n // profile logger\\n if (!empty($this->options['profile'])) {\\n $config->setSQLLogger(new EchoSQLLogger());\\n }\\n\\n $cache = new $this->config->cacheImplementation();\\n $entityFolders = $this->getEntityFolders();\\n $proxyFolder = $this->getProxyFolder();\\n $driverImpl = $config->newDefaultAnnotationDriver($entityFolders);\\n\\n AnnotationReader::addGlobalIgnoredName('package_version');\\n $annotationReader = new AnnotationReader;\\n $cachedAnnotationReader = new \\\\Doctrine\\\\Common\\\\Annotations\\\\CachedReader(\\n $annotationReader, // use reader\\n $cache // and a cache driver\\n );\\n\\n $annotationDriver = new \\\\Doctrine\\\\ORM\\\\Mapping\\\\Driver\\\\AnnotationDriver(\\n $cachedAnnotationReader, // our cached annotation reader\\n $entityFolders // paths to look in\\n );\\n\\n $this->registerAutoloadNamespaces();\\n\\n $config->setMetadataDriverImpl($annotationDriver);\\n $config->setMetadataCacheImpl($cache);\\n $config->setQueryCacheImpl($cache);\\n $config->setProxyDir($proxyFolder);\\n $config->setProxyNamespace($this->config->proxy->namespace);\\n $config->setAutoGenerateProxyClasses($this->config->autoGenerateProxyClasses);\\n\\n if ($this->config instanceof \\\\Zend_Config) {\\n $connectionConfig = $this->config->connection->toArray();\\n } else {\\n $connectionConfig = (array) $this->config->connection;\\n }\\n\\n if (true === $this->options['bibplatform']) {\\n $connectionConfig['platform'] = new MysqlBibPlatform();\\n }\\n\\n $this->em = EntityManager::create(\\n $connectionConfig,\\n $config,\\n $this->evm\\n );\\n\\n PersistentObject::setObjectManager($this->em);\\n return;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1386361a67df18f5793f5a7188c9c7a\",\n \"score\": \"0.5125127\",\n \"text\": \"public function createOffer()\\n {\\n $entityClass = 'MU\\\\\\\\YourCityModule\\\\\\\\Entity\\\\\\\\OfferEntity';\\n\\n $entity = new $entityClass();\\n\\n $this->entityInitialiser->initOffer($entity);\\n\\n return $entity;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf3b2394289026f499a143aa7f094d9e\",\n \"score\": \"0.510911\",\n \"text\": \"public function initialize()\\n {\\n $schema = new Infra();\\n $this->setSchema($schema->getSchemaBanco());\\n $this->setSource(\\\"parametros\\\");\\n $this->belongsTo('id_empresa', 'Circuitos\\\\Models\\\\Empresa', 'id', ['alias' => 'Empresa']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9010a455c17612499e4ce888f45c0e37\",\n \"score\": \"0.5108983\",\n \"text\": \"protected function init()\\n {\\n /** @var EntityManager $em */\\n $this->em = $this->getContainer()->get('doctrine.orm.default_entity_manager');\\n $this->srcDir = realpath($this->getApplication()->getKernel()->getRootDir() . '/../src/') . '/';\\n $this->translationRepository = $this->em->getRepository('TranslationsApiBundle:Translation');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df0ad7a2514cbb8a653aebac248080da\",\n \"score\": \"0.5093931\",\n \"text\": \"public function Flow_Persistence_LazyLoadingObject_initialize();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a593bbf7928af5e0ed15dde7411dfdbc\",\n \"score\": \"0.5084243\",\n \"text\": \"protected function _initialize()\\n {\\n $this->metadata()->setTablename('faixa_salarial');\\n $this->metadata()->setPackage('Model');\\n \\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\\n \\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true));\\n $this->metadata()->addField('des', 'des', 'varchar', 45, array('notnull' => true));\\n $this->metadata()->addField('minima', 'minima', 'int', 11, array('notnull' => true));\\n $this->metadata()->addField('maxima', 'maxima', 'int', 11, array('notnull' => true));\\n\\n \\n $this->metadata()->addRelation('empregos', Lumine_Metadata::ONE_TO_MANY, 'Emprego', 'faixaSalarialId', null, null, null);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae8deb18f588e99c36c660be29009498\",\n \"score\": \"0.5079303\",\n \"text\": \"public static function init() {\\n $class = get_called_class(); // late-static-bound class name\\n if(!isset(self::$instance[$class])):\\n self::$instance[$class] = new static;\\n endif;\\n return self::$instance[$class];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"789bbd5b801a6c4bd971d92d8af64e3e\",\n \"score\": \"0.50696903\",\n \"text\": \"protected function _initInvitation()\\n {\\n $invitation = $this->_invitationFactory->create()->load($this->getRequest()->getParam('id'));\\n if (!$invitation->getId()) {\\n throw new \\\\Magento\\\\Framework\\\\Exception\\\\LocalizedException(__('We can\\\\'t find this invitation.'));\\n }\\n $this->_coreRegistry->register('current_invitation', $invitation);\\n\\n return $invitation;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cf5b9790fd6e20b94a817fb219e1ebb\",\n \"score\": \"0.5063087\",\n \"text\": \"protected function getDoctrine_Orm_ValidatorInitializerService()\\n {\\n return $this->services['doctrine.orm.validator_initializer'] = new \\\\Symfony\\\\Bridge\\\\Doctrine\\\\Validator\\\\DoctrineInitializer(${($_ = isset($this->services['doctrine']) ? $this->services['doctrine'] : $this->get('doctrine')) && false ?: '_'});\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c6f98ea68902ffedda9b4592f540a49\",\n \"score\": \"0.5061051\",\n \"text\": \"public function init() {\\n\\t\\t$class = __CLASS__;\\n\\t\\tnew $class;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"deb2858a0de43c5224459dde7e6024f4\",\n \"score\": \"0.50530446\",\n \"text\": \"public function getInstance()\\n {\\n if (! isset($this->instanceOfEntity)) {\\n $this->instanceOfEntity = $this->makeInstanceOfEntity();\\n }\\n\\n return $this->instanceOfEntity;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bbf937553905a4752ea1a89aee04f7c5\",\n \"score\": \"0.50526804\",\n \"text\": \"public function init()\\n {\\n $this->diseaseModel = new Application_Model_Disease();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b779f615921715ac69a2de0deb2cc16\",\n \"score\": \"0.5045555\",\n \"text\": \"public function entity();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"220507f1b1a63a5f51ff3aab35024395\",\n \"score\": \"0.5033828\",\n \"text\": \"public function init()\\n {\\n return new Customer();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"142276eb8cf0767eacff42aef85d7658\",\n \"score\": \"0.50301015\",\n \"text\": \"public function __construct()\\n\\t{\\n\\t $this->entity = new ConceptosViaje;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66d2238499e15d4e7fa4d3f0cf6e4bc1\",\n \"score\": \"0.50274193\",\n \"text\": \"public static function init()\\n {\\n return new self;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b08419bae3ca6dbcccc03cfa7099b5d1\",\n \"score\": \"0.5002865\",\n \"text\": \"abstract protected function __init(): object;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad172ff974799d017c433a4a1943b554\",\n \"score\": \"0.49913138\",\n \"text\": \"public function __construct()\\n {\\n parent::__construct(self::TABLESCHEMA, self::TABLESCHEMAID, SettingEntity::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d507bbf004e9d369cc81a6e631efec45\",\n \"score\": \"0.49890852\",\n \"text\": \"public function __construct()\\n {\\n $this->addFieldGetter(new FieldGetter());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d84667646031e3427cbf747f22239442\",\n \"score\": \"0.49874806\",\n \"text\": \"public function _construct()\\n {\\n $this->_init(ResourceModel::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e6ed7fa0e4702f7976792bf26310d9a\",\n \"score\": \"0.49868178\",\n \"text\": \"public function init() {\\n\\t\\t\\n\\t\\tparent::init();\\n\\t\\t\\n\\t\\t$this\\n\\t\\t\\t->setEntityMapping( 'id', 'group_id' )\\n\\t\\t\\t->setEntityMapping( 'content', 'description' )\\n\\t\\t;\\n\\t\\t\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fcdce8f60dba3e03d48582cf1f85ed0\",\n \"score\": \"0.4986\",\n \"text\": \"public function testNewFromEntityFunctionNotInitialised()\\n {\\n ExS\\\\Core::newFromEntity('\\\\stdClass');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d4857dd3d2c9e00f6a92e2328a064ee\",\n \"score\": \"0.49814633\",\n \"text\": \"protected function createEntity() {\\n // Check our definition allows creation.\\n $definition = $this->getPluginDefinition();\\n if (!$definition['_allow_create']) {\\n return FALSE;\\n }\\n\\n // Check our config allows creation.\\n $config = $this->getConfiguration();\\n if (!$config['create']) {\\n return FALSE;\\n }\\n\\n // Build our values.\\n $values = [];\\n\\n // If this entity type has bundles, set the appropriate key.\\n if ($definition['_bundle_key']) {\\n $values[$definition['_bundle_key']] = $config['create'];\\n }\\n\\n // Create the entity.\\n $entity = $this->entityTypeManager->getStorage($definition['_entity_type_id'])->create($values);\\n\\n // If this has an owner, set it.\\n if ($entity instanceof EntityOwnerInterface) {\\n $entity->setOwner($this->getContextValue('user'));\\n }\\n\\n return $entity;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25363992eca2d5df0ffc274f86bd5690\",\n \"score\": \"0.49793258\",\n \"text\": \"public function init() {\\n\\t\\t\\n\\t\\tparent::init();\\n\\t\\t\\n\\t\\t$this->setEntityMapping( 'id', 'address_id' );\\n\\t\\t\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c37349ba255e42ffa23ce46bc0d7d718\",\n \"score\": \"0.49785435\",\n \"text\": \"public function initialize(): Operation\\n {\\n return new $this->model([\\n 'detail' => ''\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9188198659a8283ad09dc2df335034fe\",\n \"score\": \"0.49710032\",\n \"text\": \"public function getInitiatedBy(): ?Initiator {\\n $val = $this->getBackingStore()->get('initiatedBy');\\n if (is_null($val) || $val instanceof Initiator) {\\n return $val;\\n }\\n throw new \\\\UnexpectedValueException(\\\"Invalid type found in backing store for 'initiatedBy'\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e8b121db9950aaf6bb5986e63bc2db5\",\n \"score\": \"0.49691898\",\n \"text\": \"public function initialize()\\n {\\n $this->hasOne('id', '\\\\Application\\\\Backend\\\\Entity\\\\CompanyRevenue', 'company_id', array(\\n 'alias' => 'revenue',\\n 'foreignKey' => true\\n ));\\n\\n $this->addBehavior(new Sluggable());\\n $this->addBehavior(new Timestampable());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52a1ce64927524d506c5cef408cb7864\",\n \"score\": \"0.4967504\",\n \"text\": \"protected function _construct()\\r\\n {\\r\\n $this->_init('Inchoo\\\\Recipe\\\\Model\\\\Post', 'Inchoo\\\\Recipe\\\\Model\\\\ResourceModel\\\\Post');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de06885377167c625a82c7fae514d33a\",\n \"score\": \"0.49671125\",\n \"text\": \"public function initialize()\\n {\\n $schema = new Infra();\\n $this->setSchema($schema->getSchemaBanco());\\n $this->setSource(\\\"usuario\\\");\\n $this->hasMany('id', 'Circuitos\\\\Models\\\\Circuitos', 'id_usuario_criacao', ['alias' => 'Circuitos1']);\\n $this->hasMany('id', 'Circuitos\\\\Models\\\\Circuitos', 'id_usuario_atualizacao', ['alias' => 'Circuitos2']);\\n $this->hasMany('id', 'Circuitos\\\\Models\\\\Movimentos', 'id_usuario', ['alias' => 'Movimentos']);\\n $this->hasOne('id_pessoa', 'Circuitos\\\\Models\\\\Pessoa', 'id', ['alias' => 'Pessoa']);\\n $this->belongsTo('roles_name', 'Circuitos\\\\Models\\\\PhalconRoles', 'name', ['alias' => 'PhalconRoles']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d62fd048e86b2cc6b1fee93d9dfa2a48\",\n \"score\": \"0.49548084\",\n \"text\": \"public function initialize()\\n {\\n // Return instance\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83c7526cd90c54fa68e5aa59c09b792d\",\n \"score\": \"0.49541992\",\n \"text\": \"protected function getDoctrine_Orm_ValidatorInitializerService()\\n {\\n return $this->services['doctrine.orm.validator_initializer'] = new \\\\Symfony\\\\Bridge\\\\Doctrine\\\\Validator\\\\DoctrineInitializer($this->get('doctrine'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d630ed2ac18f2e9daba3e050cec846e1\",\n \"score\": \"0.49531916\",\n \"text\": \"public function __construct($entityManager)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0689928a63c0aa8e563c339c6ce8716\",\n \"score\": \"0.49487272\",\n \"text\": \"public function init()\\n {\\n $this->dbRole = new Admin_Model_DbTable_Acl_Role();\\n $this->dbRoleMember = new Admin_Model_DbTable_Acl_RoleMember();\\n $this->dbRoleInherit = new Admin_Model_DbTable_Acl_RoleInherit();\\n $this->dbUser = new Admin_Model_DbTable_Users();\\n $this->dbGroup = new Admin_Model_DbTable_Groups();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18fcc1c546eccbcb551af3e42e3f860b\",\n \"score\": \"0.49481788\",\n \"text\": \"public static function getInstallable()\\n {\\n return Factory::getInstallable();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7b19c9490923870e6f6edcb53de8265\",\n \"score\": \"0.49440867\",\n \"text\": \"public function init()\\n {\\n\\n // initialize the prepared statements\\n $this->eavEntityTypeStmt =\\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ENTITY_TYPES));\\n $this->eavEntityTypeByEntityTypeACodeStmt =\\n $this->getConnection()->prepare($this->loadStatement(SqlStatementKeys::EAV_ENTITY_TYPE_BY_ENTITY_TYPE_CODE));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0174e3108e0f4e20f11489b19f047a8\",\n \"score\": \"0.49386045\",\n \"text\": \"protected function initialise()\\n { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6b2f2b75b948c0e64b37e60864e86c91\",\n \"score\": \"0.4938542\",\n \"text\": \"public function __construct()\\n {\\n $this->contact_list_entity = new ContactListEntity();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ea1413f0ee8e865576e6d4846805e00\",\n \"score\": \"0.49321622\",\n \"text\": \"public function test_get_entity_factory() {\\n $this->assertInstanceOf(\\\\mod_forum\\\\local\\\\factories\\\\entity::class, \\\\mod_forum\\\\local\\\\container::get_entity_factory());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f69eb0a65b6a728e712d960bb5187f80\",\n \"score\": \"0.4926309\",\n \"text\": \"public function __construct(){\\r\\n\\t\\t\\r\\n\\t\\t$datastore = config::get($this, 'datastore');\\r\\n\\t\\t\\r\\n\\t\\tif($datastore != ''){\\r\\n\\t\\t\\t$this->datastore = $datastore;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t$map = config::get($this, 'mapDbToObject');\\r\\n\\t\\tif(is_array($map)){\\r\\n\\t\\t\\t$this->mapDbToObject = $map;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\tif($this->table == ''){\\r\\n\\t\\t\\t$this->table = inflector::getSpecificfromcontext($this);\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaad5f4356455ea85bf5cacb54036466\",\n \"score\": \"0.4924476\",\n \"text\": \"public static function init(): self\\n {\\n return new self(new InvoiceCustomField());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef4c718f159dae03ea6f1f8bcc97e15a\",\n \"score\": \"0.49244297\",\n \"text\": \"function initialize2() {\\n\\t\\t$entitydata = Vtiger_Functions::getEntityModuleInfo($this->name);\\n\\t\\tif ($entitydata) {\\n\\t\\t\\t$this->basetable = $entitydata['tablename'];\\n\\t\\t\\t$this->basetableid=$entitydata['entityidfield'];\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8c9ce69276c845881220ae685e4c08b\",\n \"score\": \"0.49158475\",\n \"text\": \"public function __construct()\\n {\\n $this->_factory = FactoryModel::getInstance();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"301b396f2e10e9368a994b407609017e\",\n \"score\": \"0.4914822\",\n \"text\": \"public function init() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"301b396f2e10e9368a994b407609017e\",\n \"score\": \"0.4914822\",\n \"text\": \"public function init() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"301b396f2e10e9368a994b407609017e\",\n \"score\": \"0.4914822\",\n \"text\": \"public function init() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"301b396f2e10e9368a994b407609017e\",\n \"score\": \"0.4914822\",\n \"text\": \"public function init() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"301b396f2e10e9368a994b407609017e\",\n \"score\": \"0.4914822\",\n \"text\": \"public function init() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbdbe53344b0020abde01018bf788775\",\n \"score\": \"0.49147215\",\n \"text\": \"public function __construct(public Entity $entity)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85a3c2d88d273395f2e623dd458d01eb\",\n \"score\": \"0.49127203\",\n \"text\": \"public function __construct($entityTypeManager) {\\n $this->entityTypeManager = $entityTypeManager;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad089ba45a4eaed38bf8133bb35e2df5\",\n \"score\": \"0.49094406\",\n \"text\": \"public function _init(){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73b31739f6a250632821f8026130d86a\",\n \"score\": \"0.49068326\",\n \"text\": \"public function __construct()\\n {\\n parent::__construct(self::table, self::columns, self::entity_class_name);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"683bb0f36ff26bc1bcef21bdec2ec1ff\",\n \"score\": \"0.49007004\",\n \"text\": \"public function initAsSpecimen()\\n\\t{\\n\\t\\t$this->id = 0;\\n\\t\\t\\n\\t\\t$this->fk_operator = '';\\n\\t\\t$this->fk_product = '';\\n\\t\\t$this->type = '';\\n\\t\\t$this->status = '';\\n\\t\\t$this->comment = '';\\n\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"339324d35c27767d8ca13b20bfbc1543\",\n \"score\": \"0.4898736\",\n \"text\": \"public function getCreator();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"339324d35c27767d8ca13b20bfbc1543\",\n \"score\": \"0.4898736\",\n \"text\": \"public function getCreator();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bcd9327a50a77e1967b2c3ba48a7a7a8\",\n \"score\": \"0.48906136\",\n \"text\": \"public function __construct() {\\r\\n $this->setEntity('mst_questionnaire_review');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52dea5c5813d31ffc3a7fcc7bc508544\",\n \"score\": \"0.48902225\",\n \"text\": \"protected function _initForm()\\n {\\n $formId = $this->resolveFormId();\\n $form = $this->_objectManager->create(\\\\BlueFormBuilder\\\\Core\\\\Model\\\\Form::class);\\n\\n if ($formId) {\\n $form->load($formId);\\n }\\n\\n $this->_objectManager->get(\\\\Magento\\\\Framework\\\\Registry::class)->register('form', $form);\\n $this->_objectManager->get(\\\\Magento\\\\Framework\\\\Registry::class)->register('current_form', $form);\\n return $form;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf14095236a1885b30a3e95e0632dde9\",\n \"score\": \"0.4887439\",\n \"text\": \"protected function _init() {}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":761,"cells":{"query_id":{"kind":"string","value":"92a80d22b673d62f8fb65e0f0cc5b1ad"},"query":{"kind":"string","value":"instantiate and use the dompdf class"},"positive_passages":{"kind":"list like","value":[{"docid":"545823f2406f08860c52e8f5ce2b8c70","score":"0.58312124","text":"public static function generateByHtml(string $html) : void\n\t{\n\t\t$dompdf = new Dompdf();\n\n\t\t$dompdf->loadHtml($html);\n\n\t\t$dompdf->setPaper('A4', 'landscape');\n\n\t\t$dompdf->render();\n\n\t\t$dompdf->stream();\n\t}","title":""}],"string":"[\n {\n \"docid\": \"545823f2406f08860c52e8f5ce2b8c70\",\n \"score\": \"0.58312124\",\n \"text\": \"public static function generateByHtml(string $html) : void\\n\\t{\\n\\t\\t$dompdf = new Dompdf();\\n\\n\\t\\t$dompdf->loadHtml($html);\\n\\n\\t\\t$dompdf->setPaper('A4', 'landscape');\\n\\n\\t\\t$dompdf->render();\\n\\n\\t\\t$dompdf->stream();\\n\\t}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"8b0a9736f570c12eb614dc2e480cbc84","score":"0.7998106","text":"public function dompdf()\n {\n $dompdf = new Dompdf();\n $dompdf->loadHtml(view('pages/dompdf'));\n // (Optional) Setup the paper size and orientation\n $dompdf->setPaper('A4', 'landscape');\n // Render the HTML as PDF\n $dompdf->render();\n // Output the generated PDF to Browser\n $dompdf->stream();\n }","title":""},{"docid":"58b7656ce94e3e586a3fadf08700a747","score":"0.78950465","text":"function __getDOMPDFInstance() {\n\t\tglobal $PWD;\n\t\trequire_once $PWD . '/modules/dompdf/dompdf_config.inc.php';\n\t\treturn new DOMPDF();\n\t}","title":""},{"docid":"8696dc6c83d69bf4d79c4cc723c8bd3c","score":"0.6828937","text":"function PDF_new(){}","title":""},{"docid":"885204ea7cca84d6b32ac15252ed8e14","score":"0.67274874","text":"public function createpdf_fpdf(){\n \n $pdf = new Pdfdocument_fpdf();\n $pdf->generarPDF();\n }","title":""},{"docid":"17d1d8cc9397d76d539c98217adfda72","score":"0.66940546","text":"function __construct()\n\t{\n\t\t$this -> fileManager = new FileManager();\n\t\t$this -> pdf = new DocumentPDF('P', 'mm', 'A4', true, 'UTF-8', false);\n\t\treturn;\n\t}","title":""},{"docid":"e445ba63566504b41839ab49606298bb","score":"0.6626917","text":"public function load_view($view, $data = array())\n{\n $options = new Options();\n $options->set('isRemoteEnabled',TRUE); // temp folder with write permission\n\n $dompdf = new Dompdf($options);\n // $dompdf->setOptions($options);\n $html = $this->ci()->load->view($view, $data, TRUE);\n\n $dompdf->loadHtml($html);\n\n // (Optional) Setup the paper size and orientation\n $dompdf->setPaper('A4', 'portrait');\n\n // Render the HTML as PDF\n $dompdf->render();\n $time = time();\n\n // Output the generated PDF to Browser\n $dompdf->set_option('isHtml5ParserEnabled', true); \n //at runtime? It uses CSS2.1 stuff like margin: 4em 1em 4em 1em;\n $dompdf->stream(\"welcome-\". $time,array('Attachment'=>false));\n\n\n // $options = new Options();\n // $options->set('isRemoteEnabled',TRUE);\n // $dompdf = new Dompdf($options);\n // $html = $this->ci->load->view($view,$data,TRUE);\n // $canvas = $dompdf->get_canvas();\n // $dompdf->loadHtml($html);\n // $dompdf->setPaper($paper,$orientation);\n // $dompdf->render();\n // $dompdf->stream($filename.\".pdf\",array(\"Attachment\"=>FALSE));\n}","title":""},{"docid":"2e4db3d54d38860c6355cc2f040a3e53","score":"0.6484848","text":"public function __construct()\n\t{\n\t\t//Get TCPDF library files\n\t\trequire_once(MW_CONST_STR_DIR_INSTALL.'libraries/tcpdf/config/lang/eng.php');\n\t\trequire_once(MW_CONST_STR_DIR_INSTALL.'libraries/tcpdf/tcpdf.php');\n\n\n\t\t// create new PDF document\n\t\tglobal $CMD;\n\t\t$Obj_Plugin = $CMD->plugin('xtcpdf');\n\t\t$Obj_Plugin->build();\n\t\t$this->Obj_Doc = $Obj_Plugin->Arr_Vars['Obj_Doc'];\n\n\t\treturn;\n\t}","title":""},{"docid":"23fba3d6d93f7e81356cb36be2bca9e2","score":"0.6433821","text":"public function pdf()\n {\n\n $pdf = \\App::make('dompdf.wrapper');\n $pdf = PDF::setOptions(['images' => true, 'defaultFont' => 'Arial',]); \n $pdf->loadHTML($this->convert_personnel_data_to_html()); // get all data and load into html format\n $pdf->setPaper('A4','landscape'); // paper orientation\n \n\n return $pdf->stream();\n\n }","title":""},{"docid":"5b4a0a8aa6fdb364a9e25b2ad7ceb85b","score":"0.6386767","text":"public function pdf()\n {\n\n }","title":""},{"docid":"6768a87c640778fe872ba38f041a4e48","score":"0.6378899","text":"function productos()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\t\t\t$data['resulProducto'] = $this->Pdf_model->getPdfproductos();\n \t\t\t$html= $this->load->view('pdf/productos', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}","title":""},{"docid":"9f2f47172c43855f4a0dfed12c6902b5","score":"0.6351662","text":"function pdf_create($html, $filename, $stream=TRUE){\n$dompdf = new Dompdf();\n$dompdf->loadHtml($html);\n // (Optional) Setup the paper size and orientation\n$dompdf->setPaper('A4', 'portrait');\n \n \n// Render the HTML as PDF\n$dompdf->render();\n\n// Output the generated PDF to Browser\n$dompdf->stream($filename.\".pdf\");\n // $dompdf->stream($filename.\".pdf\");\n \n $pdf = $dompdf->output();\n$file_location = \"docs/\";\nfile_put_contents($file_location,$pdf); \n \n}","title":""},{"docid":"a3916867ab063c13b0b7232e91081fbd","score":"0.6350853","text":"public function pdftest(){\n $old_pdf_url = 'http://www.orimi.com/pdf-test.pdf';\n $dompdf = new Dompdf();\n $dompdf->getOptions()->setIsRemoteEnabled(1 );\n $dompdf->loadHtmlFile( $old_pdf_url );\n $dompdf->setPaper('A4','landscape');\n $dompdf->render();\n $dompdf->stream();\n }","title":""},{"docid":"3f264cc6ef9dc009533f17a6b9129358","score":"0.6310585","text":"function app_event_pdf_test_1($template, $values){\n $dompdf = new Dompdf();\n $dompdf->loadHtml('

    hello world

    ');\n // (Optional) Setup the paper size and orientation\n $dompdf->setPaper('A4', 'landscape');\n // Render the HTML as PDF\n $dompdf->render();\n // Output the generated PDF to Browser\n //$dompdf->stream();\n //$dompdf->stream(\"dompdf_out.pdf\", array(\"Attachment\" => false));\n //exit(0);\n //$dompdf->output();\n //$dompdf->outputHtml();\n //$template->write($dompdf->output(),true);\n $x = '

    ';\n\n $y = 'output()).'\" type=\"application/pdf\">';\n\n #or\n\n\n\n $template->write($y);\n //$template->write($x);\n}","title":""},{"docid":"f8f06539fb854674bf1312a066fd8b00","score":"0.62936413","text":"function pdf_create($html, $filename = '', $stream = TRUE, $set_paper = '', $attach = null, $folder_name = null)\n{\n\t\t$_this = get_instance();\n\t\t\n\t\t$_this->load->library('Pdf');\n \t\t$_this->load->helper('language');\n\t\t$pdf = new Pdf('P', 'mm', 'A4', true, 'UTF-8', false);\n\t\t\n\t\t$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\t\t\n\t\t$lg = Array();\n\t\t$lg['a_meta_charset'] = 'UTF-8';\n\t\t$lg['a_meta_dir'] = 'rtl';\n\t\t$lg['a_meta_language'] = 'fa';\n\t\t$lg['w_page'] = 'page';\n\t\t\n\t\t$pdf->setLanguageArray($lg);\n\t\t\n\t\t$pdf->SetFont('aealarabiya', '', 12);\n\t\t\n\t\t$pdf->AddPage();\n\t\t\n\t\t$lng = $_this->admin_model->get_lang();\n\t\tif (!empty($lng) && $lng == 'arabic') {\n\t\t\t$pdf->setRTL(true);\n\t\t}else{\n\t\t\t$pdf->setRTL(false);\n\t\t}\n\t\t\n\t\t$pdf->SetFontSize(10);\n\t\t\n\t\t$pdf->WriteHTML($html, true, 0, true, 0);\n\t\t\n\t\t$pdf->Output(\"\" . $filename . \".pdf\", 'I');\n\n/* require_once(\"dompdf/dompdf_config.inc.php\");\n\n $dompdf = new DOMPDF();\n $dompdf->load_html($html);\n\n if ($set_paper != '') {\n $dompdf->set_paper(array(0, 0, 900, 841), 'portrait');\n } else {\n $dompdf->set_paper(\"a4\", \"landscape\");\n }\n $dompdf->render();\n if ($stream) {\n $pdf_string = $dompdf->output();\n if (!empty($attach)) {\n if (!empty($folder_name)) {\n $folder = \"uploads/\" . $folder_name . '/' . $filename . \".pdf\";;\n } else {\n $folder = \"uploads/\" . $filename . \".pdf\";;\n }\n file_put_contents($folder, $pdf_string);\n } else {\n $dompdf->stream($filename . \".pdf\");\n }\n } else {\n return $dompdf->output();\n }\n*/}","title":""},{"docid":"aec7ac2243c97af7d362816d7414979b","score":"0.62219006","text":"function oportunidades_1()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\n\t\t\t$data['resulOportunidades1'] = $this->Pdf_model->getPdfoportunidades1(1);\n \t\t\t$html= $this->load->view('pdf/oportunidades1', $data, true);\n\n \t\t\t$Clientdata['resulClientes1'] = $this->Pdf_model->getPdfclientes1(1);\n \t\t\t$Clienthtml= $this->load->view('pdf/oportunidades1', $Clientdata, true);\n\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->load_html($Clienthtml);\n \t\t\t$this->mydompdf->set_paper('A4','landscape');\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}","title":""},{"docid":"e8a70dec55816927c78fa6477ae05fe6","score":"0.6180819","text":"public function output() {\r\n\t\t$DomPDF = new DOMPDF();\r\n\t\t$DomPDF->set_paper($this->_Pdf->pageSize(), $this->_Pdf->orientation());\r\n\t\t$DomPDF->load_html($this->_Pdf->html());\r\n\t\t$DomPDF->render();\r\n\t\treturn $DomPDF->output();\r\n\t}","title":""},{"docid":"79ba3da9ee5383afadd2e4602e664668","score":"0.61624825","text":"function generatePdf($id) {\n\n\n $prodajaModel = new Prodaja();\n $data = $prodajaModel->getDataForPdfDocument($id);\n// $this->loadPdfDocument('faktura', $data);\n $html = \"\";\n foreach ($data as $podatak) {\n $html .= \"Cena je:

    {$podatak->cena}

    , treba odraditi kompletan template fakture // Nisam imao vremena\";\n }\n $document = new Dompdf();\n $document->loadHtml($html);\n $document->setPaper('A4', 'portrait');\n $document->render();\n $document->stream(\"Faktura.pdf\", array(\"Attachment\" => 0));\n\n\n }","title":""},{"docid":"8d69cdc0737f39104d982d63dac6435b","score":"0.61558974","text":"function oportunidades()\n\t{\n\t\t\t$this->load->model('Pdf_model');\n \t\t\t$this->load->library('mydompdf');\n\t\t\t$data['resulOportunidades'] = $this->Pdf_model->getPdfoportunidades();\n \t\t\t$html= $this->load->view('pdf/oportunidades', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->set_paper('A4','landscape');\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}","title":""},{"docid":"66917aeb38ddb4eca2c8a4fc6b87f3b9","score":"0.61412114","text":"public function carregar(){\r\n\t\tinclude LIB . DS . 'MPDF56/mpdf.php';\r\n\t}","title":""},{"docid":"9b2bba3d4ab974726355dc7295640e0d","score":"0.61348945","text":"public function generate() {\n $data = $this->content();\n\n $mpdf = new \\Mpdf\\Mpdf();\n $mpdf->WriteHTML($data['view'], \\Mpdf\\HTMLParserMode::HTML_BODY);\n $mpdf->Output($this->dirname . $this->filename);\n }","title":""},{"docid":"7852592659cbc17b83f3f29b26b61a42","score":"0.6115737","text":"public function toPDF() {\n }","title":""},{"docid":"946cb7292905ec4c3a4effd80f6d9bcd","score":"0.61103994","text":"private function _process_pdf() {\n\t\n\t\t// Get the EE PDF library\n\t\t$this->EE->load->library('ee_pdf');\n\t\t\n\t\t// Push our previously-declared tag data to the library\n\t\t$this->pdf = $this->EE->ee_pdf->load($this->params);\n\n\t\t// Set automatic margins if needed\n\t\t$this->_set_auto_margins();\n\t\t\n\t\t// Set PDF header if applicable\n\t\tif(isset($this->header))\n\t\t{\n\t\t\t$this->pdf->SetHTMLHeader($this->header);\n\t\t}\n\t\t\n\t\t// Set PDF footer if applicable\n\t\tif(isset($this->footer))\n\t\t{\n\t\t\t$this->pdf->SetHTMLFooter($this->footer);\n\t\t}\n\t\t\n\t\t// Write HTML to mPDF\n\t\t$this->pdf->WriteHTML($this->body);\n\t\t\n\t\t// Output final PDF\n\t\t$this->pdf->Output();\n\t\t\n\t\texit;\n\t\t\n\t}","title":""},{"docid":"d93874aa664a52365aa3ca4ece4b020e","score":"0.60978407","text":"function clientes()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\t\t\t$data['resulClientes'] = $this->Pdf_model->getPdfclientes();\n \t\t\t$html= $this->load->view('pdf/clientes', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}","title":""},{"docid":"da3a61c72f433c70eb3d7a907df0fb5e","score":"0.6094901","text":"public function mpdf_creater($data)\n { \n $pdfFilePath = FCPATH.\"downloads/pdf/\";\n if (!isset($data['file_name'])) {\n $data['file_name'] = 'temp';\n }\n $file_name = $data['file_name'].rand(1000,100000).'.pdf';\n $full_path = $pdfFilePath.$file_name;\n \n $this->load->library('pdf');\n $pdf = $this->pdf->load(); \n \n $html = $this->load->view('admin/_pdf_layout', $data, true);\n $pdf->WriteHTML($html); // write the HTML into the PDF\n $pdf->Output($full_path, 'F');\n return $file_name;\n }","title":""},{"docid":"c5183e74d8c43832a2c96a2f04f07053","score":"0.6094439","text":"function __construct() {\n\t\t\timport('classes.CBPPlatform.conv.phpDocx.classes.TransformDoc');\n\t\t\timport('classes.CBPPlatform.conv.mpdf.mpdf');\n\t\t\timport('classes.CBPPlatform.conv.cssparse.CSSParser');\n\t\t\t\n\t\t\t$this->fileDir = \".\";\n\t\t\t$this->stylesheetDir = \"styles/ebook/\";\n\t\t\t$this->contentStart = \"\\n\";\n\t\t\t$this->paperSizes = array(\n\t\t\t\t'a5' => array ('w' => '148', 'h' => '210'),\n\t\t\t\t'a4' => array ('w' => '210', 'h' => '297'),\n\t\t\t\t'trade' => array ('w' => '129', 'h' => '198')\n\t\t\t);\n\t\t}","title":""},{"docid":"b6b0b9bcd5fd3cb75adc6a94cdd3cfe2","score":"0.6090774","text":"public function create( $data )\n\t{\n\t\t# create new PDF document\n\t\t$this->pdf = new \\TCPDF( $this->configs['page_orientation'], $this->configs['unit'], $this->configs['page_format'], true, 'UTF-8', false );\n\n\t\t# set document information\n\t\t$this->pdf->SetCreator( $this->timber->config('app_name') . '-' . TIMBER_CURRENT_VERSION );\n\t\t$this->pdf->SetAuthor( $this->timber->config('app_author') );\n\n\t\t$this->pdf->SetTitle( $data['title'] );\n\t\t$this->pdf->SetSubject( $data['subject'] );\n\t\t$this->pdf->SetKeywords( $this->timber->config('app_name') . ', ' . $this->timber->config('app_author') );\n\n\t\t# set default header data\n\t\t# $this->pdf->SetHeaderData('logo.png', header_logo_width, \"Timber\", \"Web Development Service\");\n\n\t\t# Set Logo\n\t\t$this->pdf->SetHeaderData( $data['logo'], $this->configs['header_logo_width'], $data['name'], $data['description'] );\n\n\t\t# set header and footer fonts\n\t\t$this->pdf->setHeaderFont( array($this->configs['font_name_main'], '', $this->configs['font_size_main']) );\n\t\t$this->pdf->setFooterFont( array($this->configs['font_name_data'], '', $this->configs['font_size_data']) );\n\n\t\t# set default monospaced font\n\t\t$this->pdf->SetDefaultMonospacedFont( $this->configs['font_monospaced'] );\n\n\t\t# set margins\n\t\t$this->pdf->SetMargins( $this->configs['margin_left'], $this->configs['margin_top'], $this->configs['margin_right'] );\n\t\t$this->pdf->SetHeaderMargin( $this->configs['margin_header'] );\n\t\t$this->pdf->SetFooterMargin( $this->configs['margin_footer'] );\n\n\t\t# set auto page breaks\n\t\t$this->pdf->SetAutoPageBreak( TRUE, $this->configs['margin_bottom'] );\n\n\t\t# set image scale factor\n\t\t$this->pdf->setImageScale( $this->configs['image_scale_ratio'] );\n\n\t\t# Set some language-dependent strings (optional)\n\t\t$this->pdf->setLanguageArray(array(\n\t\t\t'a_meta_charset' => 'UTF-8',\n\t\t\t'a_meta_dir' => 'ltr',\n\t\t\t'a_meta_language' => 'en',\n\t\t\t'w_page' => $this->timber->translator->trans('Page'),\n\t\t));\n\n\t\t# Set Font\n\t\t$this->pdf->SetFont('helvetica', 'B', 11);\n\n\t\t# Add a page\n\t\t$this->pdf->AddPage();\n\n\t\t# Set Font\n\t\t$this->pdf->SetFont('helvetica', '', 8);\n\n\t\tif( strpos($data['ref_id'], \"ST\") > 0 ){\n\t\t\t$tbl = '\n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t';\n\t\t}else{\n\t\t\t$tbl = '
    ' . $this->timber->translator->trans('From:') . '' . $this->timber->translator->trans('Estimate No: ') . $data['ref_id'] . '
    \n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t';\n\t\t}\n\n\t\t$tbl .= '\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t';\n\n\t\t$tbl .= '\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t';\n\n\t\t$tbl .= '\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t';\n\n\t\t$tbl .= '\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t';\n\n\t\t$tbl .= '\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t';\n\n\t\t$tbl .= ($data['company']['vat'] != '') ? '' : '';\n\n\t\t$tbl .= ($data['company']['phone']) ? '' : '';\n\n\t\t$tbl .= ($data['client']['vat'] != '') ? '' : '';\n\n\t\t$tbl .= ($data['client']['phone'] != '') ? '' : '';\n\n\t\t# Client and Company\n\t\t$this->pdf->writeHTML($tbl, true, false, false, false, '');\n\n\t\t$tbl = '
    ' . $this->timber->translator->trans('From:') . '' . $this->timber->translator->trans('Invoice No: ') . $data['ref_id'] . '
    ' . $data['company']['name'] . '' . $this->timber->translator->trans('To:') . '
    ' . $data['company']['address1'] . '' . $data['client']['name'] . '
    ' . $data['company']['address2'] . '' . $data['client']['company'] . '
    ' . $data['company']['city'] . '' . $data['client']['address1'] . '
    ' . $data['company']['country'] . '' . $data['client']['address2'] . '
    ' . $this->timber->translator->trans('VAT: ') . $data['company']['vat'] . '' . $data['client']['city'] . '

    ' . $data['client']['city'] . '
    ' . $this->timber->translator->trans('Phone: ') . $data['company']['phone'] . '' . $data['client']['country'] . '

    ' . $this->timber->translator->trans('VAT: ') . $data['client']['vat'] . '

    ' . $this->timber->translator->trans('Phone: ') . $data['client']['phone'] . '

    \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t \n\t\t
    ' . $this->timber->translator->trans('Issue Date: ') . ' ' . $data['client']['issue_date'] . '
    ' . $this->timber->translator->trans('Due Date: ') . ' ' . $data['client']['due_date'] . '




    ';\n\n\t\t# Invoice Dates\n\t\t$this->pdf->writeHTML($tbl, true, false, false, false, '');\n\n\t\t# Letter To Client\n\t\t/*\n\t\t$this->pdf->Write(0, 'Dear Ms. Jane Doe,', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, '', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, 'Please find below a cost-breakdown for the recent work completed. Please make payment at your earliest convenience, and do not hesitate to contact me with any questions..', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, '', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, 'Many thanks,', '', 0, 'L', true, 0, false, false, 0);\n\t\t$this->pdf->Write(0, 'Your Name', '', 0, 'L', true, 0, false, false, 0);\n\t\t*/\n\n\t\t$this->pdf->writeHTML( $data['notes'], true, false, false, false, '' );\n\n\t\t# Cost Breakdown\n\t\t$tbl = '



    \n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t\n\t\t \t';\n\n\n\t\tforeach ($data['items'] as $item) {\n\t\t\t$tbl .='\n\t\t\t \t\t\n\t\t\t \t\t\n\t\t\t \t\t\n\t\t\t \t\t\n\t\t\t \t\t';\n\t\t}\n\n\t\t$invoice_tax_currency = ($data['overall']['tax_type'] == 'percent') ? \"%\" : $this->timber->config('_site_currency');\n\t\t$invoice_discount_currency = ($data['overall']['discount_type'] == 'percent') ? \"%\" : $this->timber->config('_site_currency');\n\n\t\t$tbl .='\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\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\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\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\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


    ' . $this->timber->translator->trans('Item') . '


    ' . $this->timber->translator->trans('Quantity') .'


    ' . $this->timber->translator->trans('Unit Price') . ' (' . $this->timber->config('_site_currency') .')


    '. $this->timber->translator->trans('Total') .' (' . $this->timber->config('_site_currency') . ')


    ' . $item['item_title'] . '
    ' . $item['item_description'] . '


    ' . $item['item_quantity'] . '


    ' . $item['item_unit_price'] . '


    ' . $item['item_sub_total'] . '

    '. $this->timber->translator->trans('Subtotal') .' (' . $this->timber->config('_site_currency') . ') :

    ' . $data['overall']['sub_total'] . '

    '. $this->timber->translator->trans('Discount') .' (' . $invoice_discount_currency . ') :

    ' . $data['overall']['discount_value'] . '

    '. $this->timber->translator->trans('Taxes') .' (' . $invoice_tax_currency . ') :

    ' . $data['overall']['tax_value'] . '

    '. $this->timber->translator->trans('Total') .' (' . $this->timber->config('_site_currency') . ') :

    ' . $data['overall']['total_value'] . '

    '. $this->timber->translator->trans('Paid') .' (' . $this->timber->config('_site_currency') . ') :

    ' . $data['overall']['paid_value'] . '




    ';\n\n\t\t# Write HTML\n\t\t$this->pdf->writeHTML($tbl, true, false, false, false, '');\n\n\t\t# Write terms\n\t\t$this->pdf->Write(0, $this->timber->translator->trans('Many thanks for your custom! We look forward to doing business with you again in due course.'), '', 0, 'L', true, 0, false, false, 0);\n\n\t\t# Close and Output\n\t\t$this->pdf->Output( $data['file'] . '.pdf', 'I' );\n\t}","title":""},{"docid":"be3b8b388ec258792e98d1a30444b403","score":"0.6088409","text":"public function created(Form $form)\n {\n // instantiate and use the dompdf class\n $dompdf = new Dompdf();\n $dompdf->loadHtml(\n \"\n \n \n \n \n \n \"\n );\n\n // (Optional) Setup the paper size and orientation\n $dompdf->setPaper('A4', 'landscape');\n\n // Render the HTML as PDF\n $dompdf->render();\n\n // Output the generated PDF to Browser\n $dompdf->stream();\n }","title":""},{"docid":"f99581e48273e318192fcab1f25e537b","score":"0.6087767","text":"public function __construct()\n\t{\n\t\t$this->pdf = new FPDF('P','mm','A4');\n\t\t//$cartaPorte = new CartaPorte();\n\t\t$this->folio = \"31231\";\n\t}","title":""},{"docid":"8e3c1a19c6d7f3feee99302df746d7d4","score":"0.60313195","text":"function iniciativa()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\n\t\t\t$data['resulIniciativas'] = $this->Pdf_model->getPdfiniciativa();\n \t\t\t$html= $this->load->view('pdf/iniciativas', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}","title":""},{"docid":"607bf406682528005b9ef8eab401123b","score":"0.60065544","text":"function createPDF($content, $paper, $orientation, $filename){\n\t\t$dompdf = new DOMPDF();\n\t\t$dompdf->load_html($content);\n\t\t$dompdf->set_paper($paper,$orientation);\n\t\t$dompdf->render();\n\t\t$dompdf->stream($filename,array('Attachment' => 0));\t\n\t}","title":""},{"docid":"ffca2dfdc8542d66d99d401a625faba2","score":"0.5998443","text":"public function getContent() : string\n {\n// $pdf = new \\TCPDF($orientation = 'L', $unit = 'mm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false, $pdfa = false);\n\n $pageMargin = 15;\n\n // set document information\n $this->pdf->SetCreator(PDF_CREATOR);\n $this->pdf->SetAuthor('Martin Dilling-Hansen');\n $this->pdf->SetTitle('Post-It Printer Template');\n $this->pdf->SetSubject('Default size');\n $this->pdf->SetKeywords('Post-It, Printer, Template');\n\n // remove default header/footer\n $this->pdf->setPrintHeader(false);\n $this->pdf->setPrintFooter(false);\n\n // set default monospaced font\n $this->pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n // set margins\n $this->pdf->SetMargins($pageMargin, $pageMargin, $pageMargin);\n\n // set auto page breaks\n $this->pdf->SetAutoPageBreak(true, $pageMargin);\n\n // set image scale factor\n $this->pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n $this->pdf->SetDisplayMode('real', 'SinglePage', 'UseNone');\n\n $this->pdf->setViewerPreferences([\n// 'HideToolbar' => true,\n// 'HideMenubar' => true,\n// 'HideWindowUI' => true,\n// 'FitWindow' => true,\n// 'CenterWindow' => true,\n// 'DisplayDocTitle' => true,\n// 'NonFullScreenPageMode' => 'UseNone', // UseNone, UseOutlines, UseThumbs, UseOC\n// 'ViewArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox\n// 'ViewClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox\n// 'PrintArea' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox\n// 'PrintClip' => 'CropBox', // CropBox, BleedBox, TrimBox, ArtBox\n 'PrintScaling' => 'None', // None, AppDefault\n// 'Duplex' => 'DuplexFlipLongEdge', // Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge\n// 'PickTrayByPDFSize' => true,\n// 'PrintPageRange' => array(1,1,2,3),\n// 'NumCopies' => 2\n ]);\n\n foreach ($this->pages as $page) {\n $this->pdf->AddPage('L', 'A4');\n $page->render($this->pdf);\n }\n\n $this->pdf->lastPage();\n\n return $this->pdf->Output('tmp.pdf', 'S');\n }","title":""},{"docid":"4077de5a253890550e25e3d1994b8e0b","score":"0.5996432","text":"public function gerar_pdf($view, $dados = array(), $papel = 'A4', $orientacao = 'portrait') //Orientacao: portrait / landscape\n {\n $dompdf = new Dompdf();\n $html = $this->ci->load->view($view, $dados, TRUE);\n $dompdf->loadHtml($html);\n $dompdf->setPaper($papel, $orientacao);\n /* Converter o HTML em PDF */\n $dompdf->render();\n $dompdf->stream(date('d-m-Y-H-i-s').\".pdf\", array(\"Attachment\" => FALSE));\n }","title":""},{"docid":"7a1737c9d7dff0da59f0f2c7e96a00f6","score":"0.59749806","text":"public function exportPDF()\n\t{\n\t\t// $data=[\n\t\t// 'karyawan'=>$this->KaryawanModel()->Alldatapdf(),\n\t\t// ]; \n\t\t\n\t\t\t\t \n\t\t// // $builder = $this->db->table('karyawan');\n // // $query = $builder->get(); \n\t\t$query = $this->db->query(\"SELECT * FROM karyawan\");\n $data['karyawan'] = $query->getResultArray();\n\t\t// echo \"
    \";\n\t\t// print_r($data);\n\t\t$html= view('karyawan/laporanpdf', $data);\n\t\t$options = new Options();\n\t\t$options->setDefaultFont('default font','Courier');\n\t\t$options->setIsHtml5ParserEnabled(true);\n\t\t\n\t\t// // instantiate and use the dompdf class\n\t\t$dompdf = new Dompdf($options);   \n\t\t$dompdf->loadHtml($html);\n\n\t\t// (Optional) Setup the paper size and orientation\n\t\t$dompdf->setPaper('A4', 'portrait');\n\n\t\t// Render the HTML as PDF\n\t\t$dompdf->render();\n\n\t\t// Output the generated PDF to Browser\n\t\t$dompdf->stream();\n\t\t\n\t\t\n\t}","title":""},{"docid":"38b3ebd7b6d5d0aaf3bb176ae4739be1","score":"0.5972795","text":"public function PDF()\n\n    {  \n       \n\n\n\n/*\n         $prestamos = \\DB::table('loans')\n          select(['id', 'loan_date', 'delivery_date', 'dependencies', 'translation', 'objetive']); \n          get();\n         $vista = view::make('insa::prueba', compact('prestamos'))->render();\n\n         $pdf =  \\App::make('dompdf.wrapper');\n         $pdf->loadHTML($vista);\n\n          return $pdf->stream('Solicitud_Prestamo.pdf');\n\n          //$pdf =\\PDF::loadView('insa::prueba', compact('prestamos'));\n          //return $pdf->stream();*/\n\n         \n    }","title":""},{"docid":"584f31a67681e75ae121411b56c600be","score":"0.5972265","text":"function __construct(){\n\t\t$this->m_doc = new DOMDocument();\n\t}","title":""},{"docid":"9ee30eb769ff81862123c95d89c64e4f","score":"0.59536916","text":"public function render($ps){\n        $common_dir = '/admin/reports/common';\n        $base_dir = '/admin/reports/'.strtolower($this->report_code);\n\n        switch ($this->format) {\n            case 'pdf':\n                ini_set(\"memory_limit\", \"512M\");\n                $filename=$this->report_code.'-'.date('Ymd', time()); #Ymd-His\n\n                $ps['f']['edit']=false; #force any edit modes off\n                $ps['IS_PRINT_MODE']=true;\n                $ps['IS_EXPORT_PDF']=true;\n\n                $html = parse_page($base_dir, $this->fw->config->PAGE_LAYOUT_PRINT, $ps, 'v');\n                #$html = parse_page($base_dir, $common_dir.'/docx.html', $ps, 'v');\n\n                if ($this->fw->config->PDF_CONVERTER){\n                   ### if wkhtmltopdf\n                   $tmp_file = Utils::getTmpFilename().'.html';\n                   $out_file = Utils::getTmpFilename().'.pdf';\n                   #logger(\"tmp files: $tmp_file, $out_file\");\n                   file_put_contents($tmp_file, $html);\n\n                   $orient = $this->render_options['landscape'] ? '--orientation Landscape' : '';\n                   $cmd=$this->fw->config->PDF_CONVERTER.\" \".$this->render_options['cmd'].\" $orient file:///$tmp_file $out_file\";\n                   #logger(\"cmd: [$cmd]\");\n                   system($cmd);\n\n                   $disposition = 'attachment';\n                   header(\"Content-type: application/pdf\");\n                   header(\"Content-Disposition: $disposition; filename=\\\"$filename\\\"\");\n\n                   readfile($out_file); //read file content and output to browser\n\n                   // unlink($tmp_file);\n                   // unlink($out_file);\n\n                }else{\n                    ### if Dompdf\n                    require_once $this->fw->config->SITE_ROOT.'/php/dompdf/autoload.inc.php';\n                    #use Dompdf\\Dompdf;\n                    $dompdf = new Dompdf\\Dompdf();\n                    $dompdf->loadHtml($html);\n                    if ($this->render_options['landscape']) {\n                        $dompdf->setPaper('A4', 'landscape');\n                    }else{\n                        $dompdf->setPaper('A4', 'portrait');\n                    }\n                    $dompdf->render();\n                    $dompdf->stream($filename);\n                }\n                break;\n\n            case 'docx':\n                $ps['IS_PRINT_MODE']=true;\n                $ps['IS_EXPORT_DOC']=true;\n\n                ini_set('display_errors', '0'); #disable \"Strict Standards\" errors in VsWord\n                error_reporting(0);\n                require_once $this->fw->config->SITE_ROOT.'/php/vsword/VsWord.php';\n                VsWord::autoLoad();\n\n                $html = parse_page($base_dir, $common_dir.'/docx.html', $ps, 'v');\n\n                $doc = new VsWord();\n                $parser = new HtmlParser($doc);\n                $parser->parse($html);\n                $tmpfname = Utils::getTmpFilename();\n                $doc->saveAs($tmpfname);\n\n                $filename=$this->report_code.'-'.date('Ymd', time()).'.docx'; #Ymd-His\n                $disposition = 'attachment';\n                //output to browser\n                header('Content-type: application/msword');\n                header('Content-Disposition: '.$disposition.'; filename=\"'.$filename.'\"');\n\n                readfile($tmpfname); //read file content and output to browser\n                //echo $html;\n\n                unlink($tmpfname);\n                break;\n\n            case 'xls':\n                $ps['IS_PRINT_MODE']=true;\n                $ps['IS_EXPORT_XLS']=true;\n\n                $html = parse_page($base_dir, $common_dir.'/xls.html', $ps, 'v');\n\n                $filename=$this->report_code.'-'.date('Ymd', time()).'.xlsx'; #Ymd-His\n                $disposition = 'attachment';\n                //output to browser\n                header('Content-type: application/vnd.ms-excel');\n                header('Content-Disposition: '.$disposition.'; filename=\"'.$filename.'\"');\n\n                echo $html;\n                break;\n\n            case 'csv':\n                $filename=$this->report_code.'-'.date('Ymd', time()).'.csv'; #Ymd-His\n                Utils::responseCSV($ps['rep']['rows'], $ps['rep']['headers'], $filename);\n                break;\n\n            default: #html - show report using templates from related report dir\n                $this->fw->parser($base_dir, $ps);\n                break;\n        }\n    }","title":""},{"docid":"3c8ea2a12fcf4a7c2246ce387103187c","score":"0.5950492","text":"public function instance(){\n\t\treturn $this->mpdf;\n\t}","title":""},{"docid":"e5be47ff242c8d57b08e3762140aa54f","score":"0.593509","text":"public function __construct() {\n\t\t$this->doc = t3lib_div::makeInstance('template');\n\t}","title":""},{"docid":"bddaf20090a7360ac91f1c79719f64dc","score":"0.59222054","text":"function campanas()\n\t{\n\t\t\t$this->load->model('Pdf_model');\n \t\t\t$this->load->library('mydompdf');\n\t\t\t$data['resulCampana'] = $this->Pdf_model->getPdfcampana();\n \t\t\t$html= $this->load->view('pdf/campana', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}","title":""},{"docid":"4b06a01cea4346922d79fa24919e01a1","score":"0.5901326","text":"public function __construct($data,$pdf)\n    {\n        $this->data =$data;\n        $this->pdf = $pdf;\n\n    }","title":""},{"docid":"1f1f1dd13f9f10a413cfa7f95c0b8059","score":"0.5895418","text":"function ventas()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\t\t\t$data['resulVentas'] = $this->Pdf_model->getPdfventas();\n \t\t\t$html= $this->load->view('pdf/ventas', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->set_paper('A4','landscape');\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}","title":""},{"docid":"a39cf015a93729f2fe3b238d60d13794","score":"0.58933645","text":"public function index()\n  {\n    // $currentPage = $this->request->getVar('page_lakip') ? $this->request->getVar('page_lakip') : 1;\n\n    // $keyword = $this->request->getVar('keyword');\n    // if ($keyword) {\n    //   $pdf = $this->pdfModel->search($keyword);\n    // } else {\n    //   $pdf = $this->pdfModel;\n    // }\n\n\n    $mpdf = new \\Mpdf\\Mpdf(['mode' => 'utf-8', 'format' => 'A4']);\n    // $mpdf = new \\Mpdf\\Mpdf();\n\n\n    $html = '\n    \n        
    My document
    \n
    \n \n \n
    \n My document\n
    \n
    \n \n \n \n \n \n \n \n \n
    {DATE j-m-Y}{PAGENO}/{nbpg}My document
    \n
    \n \n \n \n \n \n \n \n \n
    My document{PAGENO}/{nbpg}{DATE j-m-Y}
    \n
    ';\n\n\n $mpdf->SetHeader('|

    LEMBAGA ADMINISTRASI KEUANGAN DAN ILMU PEMERINTAHAN

    \n

    SKT DITJEN POLPUM KEMENDAGRI NOMOR : 001-00-00/034/I/2019

    \n

    Sekretariat : Jln. Serdang Baru Raya No. 4B, Kemayoran - Jakarta 10650

    \n

    Website : www.lakip.co.id E-mail : admin@lakip.co.id Telp./Fax. 021-42885718

    \n |');\n $mpdf->WriteHTML($html);\n // FOOTER\n // $mpdf->SetFooter('footer||Page {PAGENO}', '$footer');\n\n // $mpdf = WriteHTML($html);\n // $mpdf->WriteHTML($text);\n // $footer = array(\n // 'odd' => array(\n // 'L' => array(\n // 'content' => '',\n // 'font-size' => 12,\n // 'font-style' => 'B',\n // 'font-family' => 'serif',\n // 'color' => '#000000'\n // ),\n // 'C' => array(\n // 'content' => '',\n // 'font-size' => 12,\n // 'font-style' => 'B',\n // 'font-family' => 'serif',\n // 'color' => '#000000'\n // ),\n // 'R' => array(\n // 'content' => 'My document',\n // 'font-size' => 12,\n // 'font-style' => 'B',\n // 'font-family' => 'serif',\n // 'color' => '#000000'\n // ),\n // 'line' => 1,\n // ),\n // 'even' => array()\n // );\n // CSS\n // $mpdf->defaultheaderfontsize = 12;\n // $mpdf->defaultheaderfontstyle = 'B';\n // $mpdf->defaultheaderline = 5;\n // $mpdf->defaultfooterfontsize = 10;\n // $mpdf->defaultfooterfontstyle = 'BI';\n // $mpdf->defaultfooterline = 0;\n\n // Set initial state of layer: \"hidden\" or nothing\n // $mpdf->layerDetails[z]['state'] = 'hidden';\n // Write some HTML code:\n // $mpdf->layerDetails[z]['name'] = 'Correct Answers';\n // $html = ROOTPATH . 'public/assets/lakip.jpeg';\n\n // $mpdf->useOddEven = true;\n\n // $mpdf->SetHeader('First section header');\n // $mpdf->SetFooter('First section footer');\n // $mpdf->WriteHTML('First section text...');\n\n // Use a conditional page-break to ensure you are on an EVEN page before\n // changing the Header\n // $mpdf->AddPage('', 'E');\n\n // Now you know that this page-break takes you to an ODD page\n // $mpdf->SetHeader('Second section header');\n\n // $mpdf->AddPage();\n // $mpdf->SetFooter('Second section footer');\n // $mpdf->WriteHTML('Second section text...');\n\n\n // img_dpi = 96;\n\n // $mpdf->open_layer_pane = true;\n // $this->defaultPagebreakType;\n // $mpdf->use_kwt = true;\n\n\n\n\n\n // $mpdf->WriteHTML('Masrianto');\n\n\n\n\n $html = '\n\n\n\n\n\n \n
    My document
    \n
    \n\n \n
    My document
    \n
    \n\n \n \n \n \n \n \n \n
    {DATE j-m-Y}{PAGENO}/{nbpg}My document
    \n
    \n\n \n \n \n \n \n \n \n
    My document{PAGENO}/{nbpg}{DATE j-m-Y}
    \n
    \n\n
    Here is the text of the first chapter
    \n
    Text of Chapter 2
    \n\n
    No-Header page
    \n\n';\n\n $mpdf->WriteHTML($html);\n\n\n $html = '\n \n
    My document
    \n
    \n \n \n \n \n \n \n \n \n
    {DATE j-m-Y}{PAGENO}/{nbpg}My document
    \n
    \n \n \n \n \n
    Start of the document ... and all the rest
    ';\n\n $mpdf->WriteHTML($html);\n\n $text = '

    Lorem, ipsum dolor sit amet consectetur adipisicing elit. Eius tempore iusto, molestiae \n nesciunt animi cumque, // non-standard support for dimension iste voluptas officia harum possimus // 90 pixels, just like HTML\n accusantium quidem et sequi unde perspiciatis velit, recusandae a voluptatibus? // Can also use CSS width=\"90mm\" />

    ';\n // \n $mpdf->WriteHTML($text);\n\n $mpdf->AddPage();\n\n // $arr['L']['content'] = 'Chapter 2';\n // $mpdf->SetHeader($arr, 'O');\n // $mpdf->BeginLayer($z-index);\n // \n\n // $mpdf->EndLayer();\n // $mpdf->image($html, 0, 0, 210, 297, 'jpeg', '', true, false);\n\n // return redirect()->to($mpdf->Output('filename.pdf', 'I'));\n\n\n // $mpdf->WriteHTML('Masrianto');\n\n\n\n\n\n\n // $data = [\n // 'halaman' => 'PDF',\n // 'title' => 'Document',\n // $mpdf = $this->pdfModel,\n //// 'pdf' => $this->pdfModel->paginate(6),\n //// 'pager' => $this->pdfModel->pager,\n\n //// 'pdf' => $pdf->paginate(10, 'pdf'),\n // 'pdf' => $pdf->paginate(10, 'id'),\n // 'pager' => $this->pdfModel->pager,\n // 'currentPage' => $currentPage\n // ];\n\n return redirect()->to($mpdf->Output('filename.pdf', 'I'));\n // return view('pdf/index', $data);\n }","title":""},{"docid":"687d4cb4853a64fd62b4f206c2fbecfe","score":"0.58866453","text":"public function __construct($pdf)\n {\n $this->pdf = $pdf;\n }","title":""},{"docid":"6a121481db4e0630daa8f38fca123046","score":"0.5886421","text":"public function html_to_pdf($p1, $p2, $p3, $p4){\n\t\t$chart = $_POST['imgCode'];\n\t\tlist($type, $chart) = explode(';', $chart); \n\t\tlist(, $chart) = explode(',', $chart);\n\t\t$chart = base64_decode($chart);\n\t\tfile_put_contents('uploads/files/chartReporte.png', $chart);\n\t\t$data['startDate'] = $p3;\n\t\t$data['endDate'] = $p4;\n\t\t$data['filtro'] = $this->admin_model->getByDate($p1, $p2, $p3, $p4);\n\t\t$this->load->view('pdfDataView', $data);\n\t\t$html = $this->output->get_output();\n\t\t$this->load->library('pdf');\n\t\t$this->dompdf->loadHtml($html);\n $this->dompdf->setPaper('A4', 'portrait');\n $this->dompdf->render();\n $this->dompdf->stream(\"estadisticas_Sistema_de_Soporte_INDEBC.pdf\", array(\"Attachment\"=>0));\n }","title":""},{"docid":"7f20658e94ff4e4e2c4962e61d8c30d6","score":"0.5884071","text":"function pdfdiplomadodocente($datos,$pdf)\n {\n $data['datos']=$datos;\n $meses = array(\"enero\",\"febrero\",\"marzo\",\"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\");\n $data['fechahoy']= strftime(\" %d de \".$meses[date('n')-1].\", %Y\");\n $this->createFolder();\n $this->html2pdf->folder('./uploads/certificados/pdf/infocip/');\n \n $archivo=$pdf.\".pdf\";\n $this->html2pdf->filename($archivo);\n \n $this->html2pdf->paper('letter', 'landscape');// poner esto para imprimir diplomadosssss\n //$this->load->view('certificado/diplomado', $data);\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/diplomado_docente', $data,true)));//certificado asistido\n \n if($this->html2pdf->create('save')) \n { \n // $this->show($archivo);\n }\n }","title":""},{"docid":"da8de9be252b8dbbd6fe4d4c5cd52281","score":"0.5877873","text":"public function generatePdf()\n {\n Event::fire('initbiz.pdfgenerator.beforeGeneratePdf');\n\n $this->generateFromTwig($this->layout, $this->getLocalRootPath(), $this->data);\n }","title":""},{"docid":"0b11e5851948543436474869b77b25e9","score":"0.5862028","text":"protected function initialize_pdf() {\n global $CFG;\n require_once($CFG->libdir . '/fpdf/fpdf.php');\n\n $newpdf = new FPDF('L', 'in', 'letter');\n $newpdf->setMargins(self::marginx, self::marginy);\n $newpdf->SetFont('Arial', '', 9);\n $newpdf->AddPage();\n $newpdf->SetFont('Arial', '', 16);\n $newpdf->MultiCell(0, 0.2, $this->report->title, 0, 'C');\n $newpdf->Ln(0.2);\n $newpdf->SetFont('Arial', '', 8);\n $newpdf->SetFillColor(225, 225, 225);\n\n return $newpdf;\n }","title":""},{"docid":"b95462c1b5bf6edcab7ad410ee22a58f","score":"0.5835677","text":"public function make()\n\t{\n//\t\t$this->debug();\n\n\n\t\t$content = array();\n\t\tforeach($this->getJobs() as $job)\n\t\t{\n\t\t\t$content[] = $this->ci->load->view('cms/trabalhos/export_page_pdf', $job, true);\n\t\t}\n\n\t\t$this->setArrayContent($content);\n//\t\t$this->setOutputMode('F');\n//\t\t$this->render('pdf-name-jobs');\n\n\t\t// show on screen\n\t\t$this->setSavePath('');\n\t\t$this->setOutputMode('I');\n\t\t$this->render(url_title($this->ci->config->item('title')));\n\n\t}","title":""},{"docid":"edadc9bb7f85583aad0ef8f9a14b5448","score":"0.5830983","text":"function tcpdf()\n{\n require_once dirname(__FILE__) . '/tcpdf/tcpdf.php';\n}","title":""},{"docid":"21ab609a0b3e4dd0890713337fc0ffbb","score":"0.5830895","text":"function __construct($configuracion, $sql) {\n //include ($configuracion[\"raiz_documento\"].$configuracion[\"estilo\"].\"/\".$this->estilo.\"/tema.php\");\n //include ($configuracion[\"raiz_documento\"].$configuracion[\"estilo\"].\"/basico/tema.php\");\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/encriptar.class.php\");\n include_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/html.class.php\");\n require_once($configuracion[\"raiz_documento\"].$configuracion[\"clases\"].\"/pdf_sab_notas/pdf/mpdf.php\");\n $this->html=new html();\n \n $this->cripto=new encriptar();\n //$this->tema=$tema;\n $this->sql=$sql;\n\n //Conexion General\n $this->acceso_db=$this->conectarDB($configuracion,\"\");\n\n //Conexion sga\n $this->accesoGestion=$this->conectarDB($configuracion,\"mysqlsga\");\n\n //Conexion Oracle\n $this->accesoOracle=$this->conectarDB($configuracion,\"docente\");\n\n //Datos de sesion\n $this->formulario=\"registro_adicionarTablaHomologacion\";\n $this->usuario=$this->rescatarValorSesion($configuracion, $this->acceso_db, \"id_usuario\");\n $this->identificacion=$this->rescatarValorSesion($configuracion, $this->acceso_db, \"identificacion\");\n $this->nivel=$this->rescatarValorSesion($configuracion, $this->acceso_db, \"nivelUsuario\");\n $this->pagina=\"adminDocumentosVinculacion\";\n $this->opcion=\"mostrar\";\n //Conexion sga\n $this->configuracion = $configuracion;\n //definimos el directorio donde se guadan los archivos\n $this->path = $this->configuracion[\"raiz_documento\"].\"/documentos/docentes/\";\n $this->mpdf=new mPDF('','LETTER',9,'ARIAL',5,5,55,25,7,12);\n \n }","title":""},{"docid":"7a59e829b82d6bd008646b69bee16a49","score":"0.5823904","text":"public function __invoke($page, $html)\n {\n global $ExportFileName;\n @ini_set(\"memory_limit\", Config(\"PDF_MEMORY_LIMIT\"));\n set_time_limit(Config(\"PDF_TIME_LIMIT\"));\n $html = CheckHtml($html);\n if (Config(\"DEBUG\")) {\n $html = str_replace(\"\", GetDebugMessage() . \"\", $html);\n }\n $dompdf = new \\Dompdf\\Dompdf([\"pdf_backend\" => \"CPDF\"]);\n $doc = new \\DOMDocument(\"1.0\", \"utf-8\");\n @$doc->loadHTML('' . ConvertToUtf8($html)); // Convert to utf-8\n $spans = $doc->getElementsByTagName(\"span\");\n foreach ($spans as $span) {\n $classNames = $span->getAttribute(\"class\");\n if ($classNames == \"ew-filter-caption\") { // Insert colon\n $span->parentNode->insertBefore($doc->createElement(\"span\", \":&nbsp;\"), $span->nextSibling);\n } elseif (preg_match('/\\bicon\\-\\w+\\b/', $classNames)) { // Remove icons\n $span->parentNode->removeChild($span);\n }\n }\n $images = $doc->getElementsByTagName(\"img\");\n $pageSize = $page->ExportPageSize;\n $pageOrientation = $page->ExportPageOrientation;\n $portrait = SameText($pageOrientation, \"portrait\");\n foreach ($images as $image) {\n $imagefn = $image->getAttribute(\"src\");\n if (file_exists($imagefn)) {\n $imagefn = realpath($imagefn);\n $size = getimagesize($imagefn); // Get image size\n if ($size[0] != 0) {\n if (SameText($pageSize, \"letter\")) { // Letter paper (8.5 in. by 11 in.)\n $w = $portrait ? 216 : 279;\n } elseif (SameText($pageSize, \"legal\")) { // Legal paper (8.5 in. by 14 in.)\n $w = $portrait ? 216 : 356;\n } else {\n $w = $portrait ? 210 : 297; // A4 paper (210 mm by 297 mm)\n }\n $w = min($size[0], ($w - 20 * 2) / 25.4 * 72 * Config(\"PDF_IMAGE_SCALE_FACTOR\")); // Resize image, adjust the scale factor if necessary\n $h = $w / $size[0] * $size[1];\n $image->setAttribute(\"width\", $w);\n $image->setAttribute(\"height\", $h);\n }\n }\n }\n $html = $doc->saveHTML();\n $html = ConvertFromUtf8($html);\n $dompdf->load_html($html);\n $dompdf->set_paper($pageSize, $pageOrientation);\n $dompdf->render();\n $exportFile = EndsText(\".pdf\", $ExportFileName) ? $ExportFileName : $ExportFileName . \".pdf\";\n $dompdf->stream($exportFile, self::$StreamOptions); // 0 to open in browser, 1 to download\n DeleteTempImages();\n }","title":""},{"docid":"ff79bffdcf289e3dadfcd87b97ac736d","score":"0.5821983","text":"public function __construct($output, $field_manager)\n { \n $this->pdf = $output;\n $this->field_manager = $field_manager;\n }","title":""},{"docid":"41ee1d81b616a072661ceaec29e9864e","score":"0.58153224","text":"public function output() {\n global $TCPDF;\n $config = Configure::read('CakePdf');\n $margin = &$config['margin'];\n $options = &$config['options'];\n $header = &$options['header'];\n\t\t//TCPDF often produces a whole bunch of errors, although there is a pdf created when debug = 0\n\t\t//Configure::write('debug', 0);\n //debug(K_PATH_IMAGES);\n $fontfile = APP . 'Lib' . DS . 'Fonts' . DS . 'Open_Sans' . DS;\n $customfont = TCPDF_FONTS::addTTFfont($fontfile . 'OpenSans-Regular.ttf', 'TrueTypeUnicode', '', 32);\n TCPDF_FONTS::addTTFfont($fontfile . 'OpenSans-Bold.ttf', 'TrueTypeUnicode', '', 32);\n $TCPDF->setHeaderData($header['logo'], $header['logo_width'], $header['title'], $header['text']);\n\n // set header and footer fonts\n $TCPDF->setHeaderFont(Array($customfont, '', PDF_FONT_SIZE_MAIN));\n $TCPDF->setFooterFont(Array($customfont, '', PDF_FONT_SIZE_DATA));\n $TCPDF->Setfont($customfont, '', PDF_FONT_SIZE_MAIN);\n // set default monospaced font\n $TCPDF->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n // set margins\n $TCPDF->SetMargins($margin['left'], $margin['top'], $margin['right']);\n $TCPDF->SetHeaderMargin(PDF_MARGIN_HEADER*2);\n $TCPDF->SetFooterMargin(PDF_MARGIN_FOOTER*2);\n\n // set auto page breaks\n $TCPDF->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n $TCPDF->AddPage();\n $html = $this->_Pdf->html();\n $tidy = preg_replace('/\\s+\\s+/', ' ', $html);\n\t\t$TCPDF->writeHTML($tidy);\n\t\treturn $TCPDF->Output('', 'S');\n\t}","title":""},{"docid":"f647605b5dd52264a8f17c29572a95e8","score":"0.581242","text":"function PDF($or = 'L') {\n $this->FPDF($or);\n }","title":""},{"docid":"832710a796aa93df8c9c01f1a6bec3e1","score":"0.5788798","text":"public function __construct($post) {\n $this->name = $post['firstName'];\n $this->surname = $post['surname'];\n $this->photo = $post['photo'];\n $this->date = $post['date'];\n $this->email = $post['email'];\n $this->phone = $post['phone'];\n $this->englishSpeak = $post['englishSpeak'];\n $this->englishRead = $post['englishRead'];\n $this->englishWrite = $post['englishWrite'];\n $this->russianSpeak = $post['russianSpeak'];\n $this->russianRead = $post['russianRead'];\n $this->russianWrite = $post['russianWrite'];\n $this->latvianSpeak = $post['latvianSpeak'];\n $this->latvianRead = $post['latvianRead'];\n $this->latvianWrite = $post['latvianWrite'];\n \n\n $this->htmlcss = $post['htmlcss'];\n $this->php = $post['php'];\n\n $this->companyName = $post['companyName'];\n $this->workStart = $post['workStart'];\n $this->workEnd = $post['workEnd'];\n $this->position = $post['position'];\n $this->positionCategory = $post['positionCategory'];\n\n $this->eduName = $post['eduName'];\n $this->country = $post['country'];\n $this->startYear = $post['startYear'];\n $this->endYear = $post['endYear'];\n $this->specialty = $post['specialty'];\n\n $this->language = $post['language'];\n $this->knowledge = $post['knowledge'];\n $this->work = $post['work'];\n $this->edu = $post['edu'];\n // Connect Mpdf library\n require_once __DIR__ . '/vendor/autoload.php';\n $this->stylesheet = file_get_contents('style.css');\n $this->mpdf = new \\Mpdf\\Mpdf();\n $this->mpdf->WriteHTML($this->stylesheet,\\Mpdf\\HTMLParserMode::HEADER_CSS);\n }","title":""},{"docid":"699abef0e705b5214fc1c4f0b609cce8","score":"0.5769911","text":"function pdfdiplomado($datos,$pdf)\n {\n $data['datos']=$datos;\n $meses = array(\"enero\",\"febrero\",\"marzo\",\"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\");\n $data['fechahoy']= strftime(\" %d de \".$meses[date('n')-1].\", %Y\");\n $this->createFolder();\n $this->html2pdf->folder('./uploads/certificados/pdf/infocip/');\n \n $archivo=$pdf.\".pdf\";\n $this->html2pdf->filename($archivo);\n \n $this->html2pdf->paper('letter', 'landscape');// poner esto para imprimir diplomadosssss\n //$this->load->view('certificado/diplomado', $data);\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/diplomado', $data,true)));//certificado asistido\n \n if($this->html2pdf->create('save')) \n { \n }\n }","title":""},{"docid":"a38b28e7482a4720aa3a0cb9cedf0dd8","score":"0.5768334","text":"public function generate()\n\t{\n\t\t$fields = $this->pdfdf->extractFields($this->pdfSource);\n\n\t\t// Map the routine, athlete, and skills to fdf fields\n\t\t$this->mapCompcard($fields);\n\n\t\tforeach ($fields as $field) {\n\t\t\tif ($field->getValue() == null) $field->setValue(' ');\n\t\t}\n\n\t\t// Merge the fdf content with pdf\n\t\t$this->pdfdf->generate($this->pdfSource, Str::slug($this->athlete->name() . ' ' . $this->compcardType), $fields);\n\n\t\t$this->setPdfFileName($this->pdfdf->getFileName());\n\t}","title":""},{"docid":"68535c17a03f1e0e9649f461d5fa6b63","score":"0.5743894","text":"public function export($dom)\n\t{\n\t\t$dompdf = new Dompdf();\n\t\t$dompdf->loadHtml($dom);\n\t\t\n\t\t// (Optional) Setup the paper size and orientation\n\t\t$dompdf->setPaper('A4', 'portrait');\n\t\t// $dompdf->setPaper('A4', 'landscape');\n\n\t\t// Render the HTML as PDF\n\t\t$dompdf->render();\n\n\t\t// Output the generated PDF to Browser\n\t\t$dompdf->stream();\n\t}","title":""},{"docid":"7774d72748a2f2ffda0a5b7c38232398","score":"0.5743286","text":"function LibraryPdf($title , $body, $type = null, $confirmDate= null , $number= null){\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n // Adding font Size and And Our Font in here -----------------------------------------------------------------------\n $mpdf = new Mpdf([\n 'tempDir' => __DIR__ . '/tmp',\n 'default_font_size' => 10,\n 'default_font' => 'iransans',\n 'debug' => true,\n 'allow_output_buffering' => true\n ]);\n\n // Set Water Mark Image to our Pdf ---------------------------------------------------------------------------------\n $mpdf -> SetWatermarkImage(\"imageurl.png\", 1);\n $mpdf->showWatermarkImage = true;\n \n // set date happens Here -------------------------------------------------------------------------------------------\n $date = jdate();\n $date1 = $date -> getYear();\n $date2 = $date -> getMonth();\n $date3 = $date -> getDay();\n $date4 = $date1.\"/\".$date2.\"/\".$date3;\n\n // Important => Our Html Body That contains special Elements and some Css Codes ------------------------------------\n $data =\"\n \n \n \n \n \n \n \n\n \n
    \n \n
    \n

    تاریخ چاپ :
    $date4

    \n
    \n

    \n $title\n

    \". \n\n ($type && $confirmDate && $number ? \"\n \n \n \n \n \n
    \n

    \n نوع: $type \n

    \n
    \n

    \n تاریخ تصویب: $confirmDate \n

    \n
    \n

    \n شماره: $number\n

    \n
    \n \": ''). \n \"
    \n $body\n
    \n \n
    \n \n
    \n
    \n \n \n \";\n\n\n // Some Codes Commented That May We need Later ----------------------------------------------------------------\n // $header = \"\n //
    \n // \n //
    \n //

    تاریخ چاپ :$date4

    \";\n\n // $mpdf->SetHTMLHeader($header);\n\n\n // $mpdf->SetHTMLFooter('\n //
    \n // \n //
    ');\n\n // Load Our Html -----------------------------------------------------------------------------------------------\n $mpdf->WriteHTML($data);\n ob_end_clean();\n // Store Print -------------------------------------------------------------------------------------------------\n return $mpdf->Output();\n}","title":""},{"docid":"0da8924432cdaa094f38a09eef3529ed","score":"0.571312","text":"private function buildPdf()\n {\n require_once('PDF_ImageAlpha.php');\n $tempdir = $this->tempdir;\n $resource_dir = $this->container->getParameter('kernel.root_dir') . '/Resources/MapbenderPrintBundle';\n $format = $this->data['format'];\n\n if ($format == 'a2') {\n $format = array(420, 594);\n }\n\n if ($format == 'a1') {\n $format = array(594, 841);\n }\n\n if ($format == 'a0') {\n $format = array(841, 1189);\n }\n\n $this->pdf = new PDF_ImageAlpha($this->orientation, 'mm', $format);\n //$this->pdf = new FPDF_FPDI($this->orientation,'mm',$format);\n $pdf = $this->pdf;\n $template = $this->data['template'];\n $pdffile = $resource_dir . '/templates/' . $template . '.pdf';\n $pagecount = $pdf->setSourceFile($pdffile);\n $tplidx = $pdf->importPage(1);\n\n $pdf->SetAutoPageBreak(false);\n $pdf->addPage();\n $pdf->useTemplate($tplidx);\n\n foreach ($this->conf['fields'] as $k => $v) {\n $pdf->SetFont('Arial', '', $this->conf['fields'][$k]['fontsize']);\n $pdf->SetXY($this->conf['fields'][$k]['x'] * 10,\n $this->conf['fields'][$k]['y'] * 10);\n switch ($k) {\n case 'date' :\n $date = new \\DateTime;\n $pdf->Cell($this->conf['fields']['date']['width'] * 10,\n $this->conf['fields']['date']['height'] * 10,\n $date->format('d.m.Y'));\n break;\n case 'scale' :\n if (isset($this->data['scale_select'])) {\n $pdf->Cell($this->conf['fields']['scale']['width'] * 10,\n $this->conf['fields']['scale']['height'] * 10,\n '1 : ' . $this->data['scale_select']);\n } else {\n $pdf->Cell($this->conf['fields']['scale']['width'] * 10,\n $this->conf['fields']['scale']['height'] * 10,\n '1 : ' . $this->data['scale_text']);\n }\n break;\n default:\n if (isset($this->data['extra'][$k])) {\n $pdf->MultiCell($this->conf['fields'][$k]['width'] * 10,\n $this->conf['fields'][$k]['height'] * 10,\n $this->data['extra'][$k]);\n }\n break;\n }\n }\n\n // draw features\n if ($this->data['rotation'] == 0 && isset($this->data['features'])) {\n $this->drawFeatures();\n }\n\n if ($this->data['rotation'] == 0) {\n\n $pdf->Image($this->finalimagename, $this->x_ul,\n $this->y_ul, $this->width, $this->height, 'png', '', false,\n 0, 5, -1 * 0);\n\n $pdf->Rect($this->x_ul, $this->y_ul, $this->width, $this->height);\n if (isset($this->conf['northarrow'])) {\n $pdf->Image($resource_dir . '/images/northarrow.png',\n $this->conf['northarrow']['x'] * 10,\n $this->conf['northarrow']['y'] * 10,\n $this->conf['northarrow']['width'] * 10,\n $this->conf['northarrow']['height'] * 10);\n }\n } else {\n $pdf->Image($this->finalimagename, $this->x_ul, $this->y_ul,\n $this->width, $this->height, 'png', '', false, 0, 5, -1 * 0);\n\n $pdf->Rect($this->x_ul, $this->y_ul, $this->width, $this->height);\n if (isset($this->conf['northarrow'])) {\n $this->rotateNorthArrow();\n }\n }\n\n // add overview map\n if (isset($this->data['overview']) && isset($this->conf['overview']) ) {\n $this->getOverviewMap();\n }\n\n // add scalebar\n if (isset($this->conf['scalebar']) ) {\n $this->drawScaleBar();\n }\n\n unlink($this->finalimagename);\n\n return $pdf->Output(null, 'S');\n }","title":""},{"docid":"b2481d4d52a1a96f97e4d20871f37f8b","score":"0.5708948","text":"function printOrder(){\r\n\trequire \"../lib/FPDF/fpdf.php\";\r\n\r\n\tclass PDF extends FPDF\r\n\t{\r\n\r\n\t var $B;\r\n\t var $I;\r\n\t var $U;\r\n\t var $HREF;\r\n\r\n\t function PDF($orientation='P', $unit='mm', $size='A4'){\r\n\t // Call parent constructor\r\n\t $this->FPDF($orientation,$unit,$size);\r\n\t // Initialization\r\n\t $this->B = 0;\r\n\t $this->I = 0;\r\n\t $this->U = 0;\r\n\t $this->HREF = '';\r\n\t }\r\n\t function get_data(){\r\n\t include \"../include/connect_db.php\";\r\n\r\n\t $id = $_GET['id']; \r\n\r\n\t $order_id = 0;\r\n\t $article_id = \"\";\r\n\t $article = \"\";\r\n\t $quantity = \"\";\r\n\t $price = \"\";\r\n\t $tot_price = \"\";\r\n\t $email = \"\";\r\n\t $full_name = \"\";\r\n\t $residental_address = \"\";\r\n\t $zip_code = \"\";\r\n\t $country = \"\";\r\n\t $mobile_number = \"\";\r\n\t $city = \"\";\r\n\t $region = \"\";\r\n\t $time = \"\";\r\n\r\n\t $data = array();\r\n\r\n\t $sql = \"SELECT * FROM shipping WHERE order_id=$id\";\r\n\t $sth = $pdo->prepare($sql);\r\n\t $sth->execute();\r\n\r\n\t $result = $sth->fetchAll();\r\n\t foreach($result as $row){\r\n\t $data[0] = $row['full_name'];\r\n\t $data[1] = $row['email'];\r\n\t $data[2] = $row['country'];\r\n\t $data[3] = $row['region'];\r\n\t $data[4] = $row['city'];\r\n\t $data[5] = $row['residental_adress'];\r\n\t $data[6] = $row['zip_code'];\r\n\t $data[7] = $row['mobile_number'];\r\n\t $data[8] = $row['time'];\r\n\t $data[9] = $row['order_id'];\r\n\t $data[10] = $row['article_id'];\r\n\t $data[11] = $row['article_name'];\r\n\t $data[12] = $row['quantity'];\r\n\t $data[13] = $row['price'];\r\n\t $data[14] = $row['tot_price'];\r\n\t \r\n\t }\r\n\r\n\t return $data;\r\n\t }\r\n\r\n\t function OpenTag($tag, $attr){\r\n\t // Opening tag\r\n\t if($tag=='B' || $tag=='I' || $tag=='U')\r\n\t $this->SetStyle($tag,true);\r\n\t if($tag=='A')\r\n\t $this->HREF = $attr['HREF'];\r\n\t if($tag=='BR')\r\n\t $this->Ln(5);\r\n\t }\r\n\r\n\t function SetStyle($tag, $enable){\r\n\t // Modify style and select corresponding font\r\n\t $this->$tag += ($enable ? 1 : -1);\r\n\t $style = '';\r\n\t foreach(array('B', 'I', 'U') as $s)\r\n\t {\r\n\t if($this->$s>0)\r\n\t $style .= $s;\r\n\t }\r\n\t $this->SetFont('',$style);\r\n\t }\r\n\r\n\t function CloseTag($tag){\r\n\t // Closing tag\r\n\t if($tag=='B' || $tag=='I' || $tag=='U')\r\n\t $this->SetStyle($tag,false);\r\n\t if($tag=='A')\r\n\t $this->HREF = '';\r\n\t }\r\n\r\n\t function PutLink($URL, $txt){\r\n\t // Put a hyperlink\r\n\t $this->SetTextColor(0,0,255);\r\n\t $this->SetStyle('U',true);\r\n\t $this->Write(5,$txt,$URL);\r\n\t $this->SetStyle('U',false);\r\n\t $this->SetTextColor(0);\r\n\t }\r\n\r\n\t // Simple table\r\n\t function content($data)\r\n\t {\r\n\t /*-----Header-----*/\r\n\r\n\t // Logo\r\n\t //$this->Image('logo.png',10,6,30);\r\n\t // Arial bold 15\r\n\t $this->SetFont('Arial','B',15);\r\n\t // Move to the right\r\n\t $this->Cell(80);\r\n\t // Title\r\n\t $this->Cell(30,10,\"Order list for order: \".$data[9].\"\");\r\n\t // Line break\r\n\t $this->Ln(20);\r\n\r\n\t /*-----end of header-----*/\r\n\r\n\t $text = array(\r\n\t \"Name: \",\r\n\t \"Email: \",\r\n\t \"Country: \",\r\n\t \"Region: \",\r\n\t \"City: \",\r\n\t \"Residental address: \",\r\n\t \"Zip code: \",\r\n\t \"Mobile number: \",\r\n\t \"Time ordered: \"\r\n\t );\r\n\r\n\t $this->SetFont('Arial','B',12);\r\n\t $this->Cell(30,10,\"Customer information:\");\r\n\t $this->Ln(10);\r\n\r\n\t for($i = 0; $i < count($text); $i++){\r\n\t $this->SetFont('Arial','B',10);\r\n\t $this->Cell(40,10,$text[$i]);\r\n\t $this->SetFont('Arial','',10);\r\n\t $this->Cell(60,10,$data[$i]);\r\n\t $this->Ln(5);\r\n\t }\r\n\r\n\t $this->Ln(15);\r\n\r\n\t $this->SetFont('Arial','B',12);\r\n\t $this->Cell(30,10,\"Products:\");\r\n\t $this->Ln(10);\r\n\r\n\r\n\t $articles = array();\r\n\t for($i = 0; $i < 4; $i++){\r\n\t $articles[$i] = $data[$i+10];\r\n\t }\r\n\r\n\t $w = array(\"Article id: \", \"Article name: \", \"Quantity: \", \"Price: \");\r\n\t // Data\r\n\t $this->SetFont('Arial','B',10);\r\n\t for($i=0; $i < count($w); $i++){\r\n\t $this->Cell(47,10,$w[$i],1,0,'C');\r\n\t }\r\n\t $this->Ln();\r\n\r\n\t $string = \"\";\r\n\t $x=$this->GetX();\r\n\t $y=$this->GetY();\r\n\r\n\t $this->Ln(10);\r\n\t $this->SetXY($x,$y);\r\n\t $this->MultiCell(47,10,$articles[0],0,'C');\r\n\t $this->SetXY($x+47,$y);\r\n\t $this->MultiCell(47,10,$articles[1],0,'C');\r\n\t $this->SetXY($x+94,$y);\r\n\t $this->MultiCell(47,10,$articles[2],0,'C');\r\n\t $this->SetXY($x+141,$y);\r\n\t $this->MultiCell(47,10,$articles[3],0,'C');\r\n\t //$this->Ln(10);\r\n\t //$this->SetXY($x+141,$y);\r\n\t $this->MultiCell(191,10,\"Total price: \".$data[14].\" Kr\",0,'R');\r\n\t $this->Cell(0,0,'','T');\r\n\t }\r\n\r\n\t // Page footer\r\n\t function Footer(){\r\n\t // Position at 1.5 cm from bottom\r\n\t $this->SetY(-15);\r\n\t // Arial italic 8\r\n\t $this->SetFont('Arial','I',8);\r\n\t // Page number\r\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n\t }\r\n\t}\r\n\r\n\t // Instanciation of inherited class\r\n\t $pdf = new PDF();\r\n\r\n\t $data = $pdf->get_data();\r\n\r\n\t //$pdf->SetAutoPageBreak(false);\r\n\t $pdf->AliasNbPages();\r\n\t $pdf->AddPage();\r\n\t $pdf->SetFont('Times','',12);\r\n\t $pdf->content($data);\r\n\t $pdf->Output();\r\n}","title":""},{"docid":"b8d6b63c6e0e5301c4bbc23c0c1bbf08","score":"0.570081","text":"function categorias()\n\t{\n\t\t\t $this->load->model('Pdf_model');\n \t\t\t $this->load->library('mydompdf');\n\t\t\t$data['resulCategoria'] = $this->Pdf_model->getPdfcategoria();\n \t\t\t$html= $this->load->view('pdf/categorias', $data, true);\n \t\t\t$this->mydompdf->load_html($html);\n \t\t\t$this->mydompdf->render();\n \t\t\t$this->mydompdf->set_base_path('./assets/css/dompdf.css'); //agregar de nuevo el css\n \t\t\t$this->mydompdf->stream(\"welcome.pdf\", array(\"Attachment\" => false));\n \t}","title":""},{"docid":"63c5ea1e44b4f4857dd220b273a58f0e","score":"0.56956834","text":"function to_pdf(){\n $plataforma= $_SERVER[\"HTTP_HOST\"];\n\n date_default_timezone_set(\"America/Argentina/Buenos_Aires\");\n $date = date(\"Y-m-d H:i:s\");\n $dias = array(\"Domingo\",\"Lunes\",\"Martes\",\"Miercoles\",\"Jueves\",\"Viernes\",\"Sábado\");\n $meses = array(\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\");\n $fecha = $dias[date('w')].\" \".date('j').\" de \".$meses[date('n')-1]. \" del \".date('Y').\", \".date(\"H:i:s\") ;\n $escudo = $_SERVER[\"DOCUMENT_ROOT\"].\"/_code/vistas/img/escudo.png\";\n $municipalidad_nombre = MUNICIPALIDAD;\n\n\n $alumno = new Alumno();\n $alumno->set_run($_POST[\"run_alumno\"]);\n $alumno->validar_run();\n $run_alumno = $alumno->get_run();\n\n $matricula = new Matricula();\n $matricula->set_run_alumno($run_alumno);\n $matricula->set_periodo($_POST[\"periodo\"]);\n $matricula->set_rbd_establecimiento($_POST[\"rbd_establecimiento\"]);\n $matricula->db_get_matricula_by_run_alumno_and_rbd_esta_and_periodo();\n\n $matricula_numero = $matricula->get_id_matricula();\n $tipo_ensenanza = new TipoEnsenanza();\n $tipo_ensenanza->set_id_tipo_ensenanza($matricula->get_id_tipo_ensenanza());\n $tipo_ensenanza->db_get_tipo_ensenanza_by_id();\n\n $matricula_tipo_ensenanza = $tipo_ensenanza->get_nombre();\n $matricula_periodo = $matricula->get_periodo();\n $matricula_fi = new DateTime($matricula->get_fecha_incorporacion());\n $matricula_fecha_incorporacion = $matricula_fi->format(\"j\").\" de \".$meses[$matricula_fi->format(\"n\")-1].\" de \".$matricula_fi->format(\"Y\");\n\n $curso = new Curso();\n $curso->set_id_curso($matricula->get_id_curso());\n $curso->db_get_curso_by_id();\n\n $id_grado = $curso->get_id_grado();\n if($curso->get_id_tipo_ensenanza() == 10){\n switch ($curso->get_id_grado()){\n case 4:\n $id_grado = \"Pre-Kinder\";\n break;\n\n case 5:\n $id_grado = \"Kinder\";\n break;\n }\n }\n $matricula_curso = $id_grado.\" \".$curso->get_grupo();\n $run_apoderado = $matricula->get_run_apoderado();\n\n $establecimiento = new Establecimiento();\n $establecimiento->set_rbd_establecimiento($matricula->get_rbd_establecimiento());\n $establecimiento->db_get_establecimiento_by_rbd();\n $establecimiento_nombre = $establecimiento->get_nombre();\n\n $alumno = new Alumno();\n $alumno->set_run($matricula->get_run_alumno());\n $alumno->db_get_alumno_by_run();\n $alumno_nombre_completo = $alumno->get_nombre1().\" \".$alumno->get_nombre2().\" \".$alumno->get_apellido1().\" \".$alumno->get_apellido2();\n $alumno_fn = new DateTime($alumno->get_fecha_nacimiento());\n $alumno_fecha_nacimiento = $alumno_fn->format(\"j\").\" de \".$meses[$alumno_fn->format(\"n\")-1].\" de \".$alumno_fn->format(\"Y\");\n\n $alumno_dir = new Direccion();\n $alumno_dir->set_id_direccion($alumno->get_id_direccion());\n $alumno_dir->db_get_direccion_by_id();\n\n $alumno_comuna = new Comuna();\n $alumno_comuna->set_id_comuna($alumno_dir->get_id_comuna());\n $alumno_comuna->db_get_comuna_by_id();\n\n $alumno_direccion = $alumno_dir->get_calle().\" \"\n .$alumno_dir->get_numero().\" \"\n .$alumno_dir->get_depto().\" \"\n .$alumno_dir->get_sector().\", \"\n .$alumno_comuna->get_nombre();\n\n $apoderado = new Apoderado();\n $apoderado->set_run($matricula->get_run_apoderado());\n $apoderado->db_get_apoderado_by_run();\n $apoderado_nombre_completo = $apoderado->get_nombre1().\" \".$apoderado->get_nombre2().\" \".$apoderado->get_apellido1().\" \".$apoderado->get_apellido2();\n\n $apoderado_dir = new Direccion();\n $apoderado_dir->set_id_direccion($apoderado->get_id_direccion());\n $apoderado_dir->db_get_direccion_by_id();\n\n $apoderado_comuna = new Comuna();\n $apoderado_comuna->set_id_comuna($apoderado_dir->get_id_comuna());\n $apoderado_comuna->db_get_comuna_by_id();\n\n $apoderado_direccion = $apoderado_dir->get_calle().\" \"\n .$apoderado_dir->get_numero().\" \"\n .$apoderado_dir->get_depto().\" \"\n .$apoderado_dir->get_sector().\", \"\n .$alumno_comuna->get_nombre();\n\n $apoderado_telefono_fijo = $apoderado->get_telefono_fijo();\n $apoderado_telefono_celular = $apoderado->get_telefono_celular();\n\n //var_dump($matricula);\n //var_dump($tipo_ensenanza);\n //var_dump($curso);\n\n $html = \"\n \n \n \n Matricula $date\n \n \n \n \n \n \n \n \n \n
    \n \n

    Comprobante De Matricula

    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n

    Resumen De La Matricula

    Periodo:$matricula_periodo
    Numero:$matricula_numero
    Tipo De Enseñanza :$matricula_tipo_ensenanza
    Curso:$matricula_curso
    Fecha De Incorporación:$matricula_fecha_incorporacion


    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n

    Datos de Alumno

    RUN:$run_alumno
    Nombre Completo:$alumno_nombre_completo
    Fecha De Nacimineto:$alumno_fecha_nacimiento
    Dirección:$alumno_direccion


    \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n

    Datos de Apoderado

    RUN:$run_apoderado
    Nombre Completo:$apoderado_nombre_completo
    Dirección:$apoderado_direccion
    Teléfono Fijo:$apoderado_telefono_fijo
    Teléfono Celular:$apoderado_telefono_celular



    \n

    Acceso a la plataforma www.$plataforma

    \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n

    Alumno

    Usuario:$run_alumno
    Contraseña:$run_alumno
    \n
    \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n

    Apoderado

    Usuario:$run_apoderado
    Contraseña:$run_apoderado
    \n \n \n\";\n\n//echo $html;\n\n $dompdf = new DOMPDF();\n $dompdf->load_html($html);\n $dompdf->render();\n $dompdf->stream($run_alumno.\".pdf\");\n}","title":""},{"docid":"2eeabd1de7c46a72ede46e1427f4ecd2","score":"0.569152","text":"public function pdfAction() {\n //$html = '

    Plain HTML

    ';\n\n // but in this case we will render a symfony view !\n // We are in a controller and we can use renderView function which retrieves the html from a view\n // then we send that html to the user.\n $html = $this->renderView('@Frontend/Default/index.html.twig', array('someDataToView' => 'Something'));\n\n $this->returnPDFResponseFromHTML($html);\n }","title":""},{"docid":"ac1ce1d471613e3744f6681287979868","score":"0.56909037","text":"function PDF($or = 'P',$unit = 'mm',$papersize = 'A4') {\n $this->FPDF($or,$unit,$papersize); \n }","title":""},{"docid":"1f8e510ed2ab395a2b4f13e512c9d7ff","score":"0.5687619","text":"function PDF_initgraphics($p){}","title":""},{"docid":"4c4953fee389719f4262c552c2c3293b","score":"0.5682173","text":"function mycertificatePdf($ID){\n\t\t$data['heading']='My Certificate';\n\t\t//$this->maHeader(); \n\t\t//$this->maLeft(); \n\t\t$UserID = getUserID();\n\t\t$data['module_datac']=$this->muser->getCourseCertificate($ID);\t\t\t\n\t\t$this-> load-> view('my_certificate_pdf',$data);\n\t\t\n\t\t\t// Get output html\n\t\t$html = $this->output->get_output();\n\t\t\n\t\t// Load library\n\t\t$this->load->library('dompdf_gen');\n\t\t\n\t\t// Convert to PDF\n\t\t$this->dompdf->load_html($html);\n\t\t//$dompdf->set_paper('letter', 'landscape');\n\t\t$this->dompdf->set_paper('letter', 'landscape');\n\t\t$this->dompdf->render();\n\t\t$this->dompdf->stream(\"certificate.pdf\", array(\"Attachment\" => false));\n\t\t\n\t\t//$this->maFooter();\n\t}","title":""},{"docid":"5cea1794a91556da4a1bba199cf53720","score":"0.567266","text":"public function make(array $config = [])\n {\n return new Pdf('', $config);\n }","title":""},{"docid":"8d8e5ce50dad36261c3fb20b8fc65ae9","score":"0.5655391","text":"private function generate()\n {\n//\n// foreach ($this->data[\"fields\"] as $field => $value){\n// $template->setValue(\"\\${{$field}}\", $value);\n// }\n//\n// $template->cloneBlock('table_block', count($this->data['table']));\n// $template->cloneRowAndSetValues('name', $this->data['table'][0]);\n// $template->cloneRowAndSetValues('name', $this->data['table'][1]);\n//// $template->cloneRowAndSetValues('name', $this->data['table'][2]);\n//\n // $template->saveAs('temp1.docx');\n $filename = \"x_contract.pdf\";\n\n $wordPdf= IOFactory::load('x_contract.docx');\n\n//\n//// //Save it\n//// try {\n// // or dompdf\n// Settings::setPdfRendererPath('../vendor/tecnickcom/tcpdf');\n// Settings::setPdfRendererName('TCPDF');\n//// $xmlWriter = IOFactory::createWriter($wordPdf, 'PDF');\n//// } catch (Exception $e) {\n//// var_dump($e->getMessage());\n//// }\n//// $xmlWriter->save($filename);\n Pdf::convert('x_contract.docx', 'rezultatix.pdf');\n\n// $pdfWriter = IOFactory::createWriter($wordPdf , 'PDF');\n//// $pdfWriter->setFont('Time');\n// $pdfWriter->save($filename.\".pdf\");\n// unlink($wordPdf);\n// $this->JoinPDF(['file1.pdf','file2.pdf'], 'output.pdf');\n// $this->setOutputFile(basename($filename));\n }","title":""},{"docid":"cdb88009061226a8780d7efb1dfb9020","score":"0.5645298","text":"public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false, $pdfa=false) {\n /* Set internal character encoding to ASCII */\n if (function_exists('mb_internal_encoding') AND mb_internal_encoding()) {\n $this->internal_encoding = mb_internal_encoding();\n mb_internal_encoding('ASCII');\n }\n // set file ID for trailer\n $serformat = (is_array($format) ? json_encode($format) : $format);\n $this->file_id = md5(TCPDF_STATIC::getRandomSeed('TCPDF'.$orientation.$unit.$serformat.$encoding));\n $this->font_obj_ids = array();\n $this->page_obj_id = array();\n $this->form_obj_id = array();\n // set pdf/a mode\n $this->pdfa_mode = $pdfa;\n $this->force_srgb = false;\n // set language direction\n $this->rtl = false;\n $this->tmprtl = false;\n // some checks\n $this->_dochecks();\n // initialization of properties\n $this->isunicode = $unicode;\n $this->page = 0;\n $this->transfmrk[0] = array();\n $this->pagedim = array();\n $this->n = 2;\n $this->buffer = '';\n $this->pages = array();\n $this->state = 0;\n $this->fonts = array();\n $this->FontFiles = array();\n $this->diffs = array();\n $this->images = array();\n $this->links = array();\n $this->gradients = array();\n $this->InFooter = false;\n $this->lasth = 0;\n $this->FontFamily = defined('PDF_FONT_NAME_MAIN')?PDF_FONT_NAME_MAIN:'helvetica';\n $this->FontStyle = '';\n $this->FontSizePt = 12;\n $this->underline = false;\n $this->overline = false;\n $this->linethrough = false;\n $this->DrawColor = '0 G';\n $this->FillColor = '0 g';\n $this->TextColor = '0 g';\n $this->ColorFlag = false;\n $this->pdflayers = array();\n // encryption values\n $this->encrypted = false;\n $this->last_enc_key = '';\n // standard Unicode fonts\n $this->CoreFonts = array(\n 'courier'=>'Courier',\n 'courierB'=>'Courier-Bold',\n 'courierI'=>'Courier-Oblique',\n 'courierBI'=>'Courier-BoldOblique',\n 'helvetica'=>'Helvetica',\n 'helveticaB'=>'Helvetica-Bold',\n 'helveticaI'=>'Helvetica-Oblique',\n 'helveticaBI'=>'Helvetica-BoldOblique',\n 'times'=>'Times-Roman',\n 'timesB'=>'Times-Bold',\n 'timesI'=>'Times-Italic',\n 'timesBI'=>'Times-BoldItalic',\n 'symbol'=>'Symbol',\n 'zapfdingbats'=>'ZapfDingbats'\n );\n // set scale factor\n $this->setPageUnit($unit);\n // set page format and orientation\n $this->setPageFormat($format, $orientation);\n // page margins (1 cm)\n $margin = 28.35 / $this->k;\n $this->SetMargins($margin, $margin);\n $this->clMargin = $this->lMargin;\n $this->crMargin = $this->rMargin;\n // internal cell padding\n $cpadding = $margin / 10;\n $this->setCellPaddings($cpadding, 0, $cpadding, 0);\n // cell margins\n $this->setCellMargins(0, 0, 0, 0);\n // line width (0.2 mm)\n $this->LineWidth = 0.57 / $this->k;\n $this->linestyleWidth = sprintf('%F w', ($this->LineWidth * $this->k));\n $this->linestyleCap = '0 J';\n $this->linestyleJoin = '0 j';\n $this->linestyleDash = '[] 0 d';\n // automatic page break\n $this->SetAutoPageBreak(true, (2 * $margin));\n // full width display mode\n $this->SetDisplayMode('fullwidth');\n // compression\n $this->SetCompression();\n // set default PDF version number\n $this->setPDFVersion();\n $this->tcpdflink = true;\n $this->encoding = $encoding;\n $this->HREF = array();\n $this->getFontsList();\n $this->fgcolor = array('R' => 0, 'G' => 0, 'B' => 0);\n $this->strokecolor = array('R' => 0, 'G' => 0, 'B' => 0);\n $this->bgcolor = array('R' => 255, 'G' => 255, 'B' => 255);\n $this->extgstates = array();\n $this->setTextShadow();\n // signature\n $this->sign = false;\n $this->tsa_timestamp = false;\n $this->tsa_data = array();\n $this->signature_appearance = array('page' => 1, 'rect' => '0 0 0 0', 'name' => 'Signature');\n $this->empty_signature_appearance = array();\n // user's rights\n $this->ur['enabled'] = false;\n $this->ur['document'] = '/FullSave';\n $this->ur['annots'] = '/Create/Delete/Modify/Copy/Import/Export';\n $this->ur['form'] = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate';\n $this->ur['signature'] = '/Modify';\n $this->ur['ef'] = '/Create/Delete/Modify/Import';\n $this->ur['formex'] = '';\n // set default JPEG quality\n $this->jpeg_quality = 75;\n // initialize some settings\n TCPDF_FONTS::utf8Bidi(array(''), '', false, $this->isunicode, $this->CurrentFont);\n // set default font\n $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt);\n $this->setHeaderFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt));\n $this->setFooterFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt));\n // check if PCRE Unicode support is enabled\n if ($this->isunicode AND (@preg_match('/\\pL/u', 'a') == 1)) {\n // PCRE unicode support is turned ON\n // \\s : any whitespace character\n // \\p{Z} : any separator\n // \\p{Lo} : Unicode letter or ideograph that does not have lowercase and uppercase variants. Is used to chunk chinese words.\n // \\xa0 : Unicode Character 'NO-BREAK SPACE' (U+00A0)\n //$this->setSpacesRE('/(?!\\xa0)[\\s\\p{Z}\\p{Lo}]/u');\n $this->setSpacesRE('/(?!\\xa0)[\\s\\p{Z}]/u');\n } else {\n // PCRE unicode support is turned OFF\n $this->setSpacesRE('/[^\\S\\xa0]/');\n }\n $this->default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128));\n // set document creation and modification timestamp\n $this->doc_creation_timestamp = time();\n $this->doc_modification_timestamp = $this->doc_creation_timestamp;\n // get default graphic vars\n $this->default_graphic_vars = $this->getGraphicVars();\n $this->header_xobj_autoreset = false;\n $this->custom_xmp = '';\n // Call cleanup method after script execution finishes or exit() is called.\n // NOTE: This will not be executed if the process is killed with a SIGTERM or SIGKILL signal.\n register_shutdown_function(array($this, '_destroy'), true);\n }","title":""},{"docid":"fac6d50a260abca73c90f4e9fdd31eae","score":"0.5641504","text":"function PDF($orientation='P', $unit='mm', $size='letter')\n{\n $this->FPDF($orientation,$unit,$size);\n // Iniciación de variables\n $this->B = 0;\n $this->I = 0;\n $this->U = 0;\n $this->HREF = '';\n}","title":""},{"docid":"74b2fa29cb6246ecd3b1f71a8e326fa5","score":"0.56136036","text":"public function generatePDF()\n {\n $data = ['title' => 'Welcome to VipsPM'];\n \\View::addLocation(base_path().'/Modules/Estimate/Resources/views');\n $pdf = PDF::loadView('mypdf', $data);\n return $pdf->stream('chetsapp.pdf');\n // return \\View::make('mypdf', compact('data'));\n // return $pdf->save(public_path().'/itsolutionstuff.pdf');\n // return $pdf->download('itsolutionstuff.pdf');\n }","title":""},{"docid":"2637475b3d4405ee867e128da59ee587","score":"0.56116444","text":"function __construct() {\n parent::__construct();\n $this->load->model('finance_model');\n\t$this->load->library('pagination');\n $this->load->library('Pdf');\n }","title":""},{"docid":"00083711f82a9f94c2c8e57688e48c47","score":"0.5605376","text":"function smarty_modifier_generatePdf($html)\n{\n //Remove menu links\n $html = preg_replace('#(.*)
    #Uis', '', $html);\n \n //Delete status and error messages\n LogUtil::getStatusMessages(true);\n LogUtil::getErrorMessages(true);\n\n //Generate pdf\n $tcpdf = PluginUtil::loadPlugin('SystemPlugin_Tcpdf_Plugin');\n $pdf = $tcpdf->createPdf();\n $pdf->AddPage();\n $pdf->SetFont('dejavusans', '', 12, '', true);\n $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html);\n $pdf->Output(PageUtil::getVar('title') . '.pdf', 'I');\n}","title":""},{"docid":"954200164699e3d13f831920ead5959f","score":"0.5602911","text":"public function loadDOGenerator()\n {\n $generatorName = $this->config->getCodeGeneratorName(); \n $classSufix = GenitHelper::generatorNameToClassSufix($generatorName); \n $doClassName = Genit::getDOGeneratorClass($classSufix);\n $doGeneratorFIle = $this->getGeneratorPath() . DIRECTORY_SEPARATOR . $doClassName . '.php';\n include_once $doGeneratorFIle;\n $this->doGen = new $doClassName($this);\n }","title":""},{"docid":"8c423f916424605961bdb05e39ed38e0","score":"0.5601779","text":"public function geraPdf()\n {\n // dd($mpdf);\n return view('site/pdf',[]);\n }","title":""},{"docid":"56c94bf0f903ada04fc50feb95f180ee","score":"0.55916965","text":"function manidora_printable_pdf($pid, $url = NULL) {\n @include_once 'sites/all/libraries/tcpdf/config/lang/eng.php';\n @include_once 'sites/all/libraries/tcpdf/tcpdf.php';\n require_once dirname(__FILE__) . '/utilities.inc';\n\n // Extend the TCPDF class to create custom Header and Footer.\n class MYPDF extends TCPDF {\n\n /**\n * Constructor.\n */\n public function __construct($pid, $orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = TRUE, $encoding = 'UTF-8', $diskcache = FALSE, $pdfa = FALSE) {\n $this->pid = $pid;\n parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);\n }\n\n /**\n * Page header.\n */\n public function Header() {\n $string = manidora_retrieve_header_text($this->pid);\n if ($string) {\n $this->Cell(0, 15, $string, 0, FALSE, 'C', 0, '', 0, FALSE, 'M', 'M');\n }\n }\n }\n // Create new PDF document.\n $pdf = new MYPDF($pid, PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, TRUE, 'UTF-8', FALSE);\n\n $header_text = manidora_retrieve_header_text($pid);\n if ($header_text) {\n // Parse a bit for use below.\n $header_parts = explode(',', $header_text);\n $title = $header_parts[0];\n }\n else {\n $title = $pid;\n $header_text = $pid;\n }\n // Set document information.\n $pdf->SetTitle($title);\n $pdf->SetSubject($title);\n\n // Set default monospaced font.\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n // Set margins.\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n\n // Set auto page breaks.\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n // Set image scale factor.\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n // Set font.\n $pdf->SetFont('times', 'BI', 12);\n\n // If no url was provided (e.g. we're not coming from the clipper),\n // check to see if there's a high quality jpeg derivative. If it does not\n // exist, default to the standard JPG datastream.\n if (!isset($url)) {\n $obj = islandora_object_load($pid);\n $dsid = isset($obj['HQ_JPG']) ? 'HQ_JPG' : 'JPG';\n $url = variable_get('islandora_base_url', 'http://localhost:8080/fedora') . '/objects/' . $pid . '/datastreams/' . $dsid . '/content';\n }\n\n // Add a page.\n $pdf->AddPage();\n // Add the image.\n // Gotta specify almost ALL the parameters to get to the 'fitonpage'\n // parameter. This should fix weird clipping issues between the actual image\n // source and what gets embedded into the PDF.\n $pdf->Image($url, '0', '15', 0, 0, '', '', '', 2, 300, '', FALSE, FALSE, 0, FALSE, FALSE, TRUE);\n\n // Close and output PDF document.\n $pdf->Output($header_text . '.pdf', 'D');\n}","title":""},{"docid":"eb58218f5869e78047c4bc353604d52f","score":"0.5582807","text":"function __construct() {\n\t if (isset($_GET[\"judge\"])){\n\t if ($_GET[\"judge\"] == \"all\"){\n\t $judgesArray = self::getJudgesNames();\n\t }\n\t else{\n\t $judgesArray[] = htmlspecialchars($_GET[\"judge\"]);\n\t }\n\t }\n\t else{\n\t $judgesArray[] = \"Allen\";\n\t }\n\t \n\t $header = array('Case Number', 'Defendant','NAC Date', 'Setting');\n\t $pdf = new PDF();\n\n\t //\tLoop through judges add a page for each.\n\t foreach ($judgesArray as $key => $judge) {\n\t $pdf->setJudge( $judge );\n \t$overTimeCases = self::getOverTimeCases( $judge );\n \t// echo \"Printing overtime cases array right before passing to FancyTable:\\n\";\n \t// print_r($overTimeCases); \t\n\t\t$pdf->AddPage();\n \t\t$pdf->FancyTable( $header, $overTimeCases );\n\t }\n\t $pdf->Output();\n\t}","title":""},{"docid":"0dbc2ca2645edd38cd992d8d22a3db7b","score":"0.55812395","text":"function buildPdf( $htmlContent, $filename ){\n $mpdf = new mPDF('win-1252', 'A4', '', '', 5, 5, 5, 5, 10, 10);\n $mpdf->SetDisplayMode('fullpage');\n $mpdf->WriteHTML( $htmlContent );\n $mpdf->Output( $filename.\".pdf\", 'D');\n }","title":""},{"docid":"10cacb0224a31581e6a7037929be3284","score":"0.55808973","text":"public function cetak_pdf()\n {\n\t\t//ambil semua darta simpan di variabel$tabel_karyawan\n \t//$tabel_karyawan = DB::all();\n \t$tabel_karyawan = DB::table('tabel_karyawan')->paginate(12);\n\n \n\t\t//gunakan dompdf dengan pdf::loadview() sampai nanti buka view\n\t\t//nama view diisu karyawan_pdf\n\t\t//passing data ke profilkarjyawan\n \t$pdf = PDF::loadview('karyawan_pdf',['profilkaryawan'=>$tabel_karyawan]);\n \t//return fungsi download dari package dompdf\n\t\t//return $pdf->download('laporan-karyawan-pdf');\n\t\t//return untuk tampilkan saja\n\t\treturn $pdf->stream();\n\n }","title":""},{"docid":"ba6c5ca121d46b58de0c6aa44a3246b0","score":"0.5564276","text":"public function createPDF()\n {\n ini_set('max_execution_time', 180);\n $datas = Employee::all();\n\n // share data to view\n view()->share('employee', $datas);\n $pdf = PDF::loadView('pdf_view', compact('datas'));\n\n // download PDF file with download method\n return $pdf->download('pdf_file.pdf');\n }","title":""},{"docid":"04e9570d09be96813d3784255550ce6f","score":"0.55586624","text":"public function index(){\r\n$pdf = new pdf('P','mm','A4');\r\n$pdf->SetMargins(10,10,10);\r\n$pdf->AliasNbPages();\r\n// membuat halaman baru\r\n$pdf->AddPage();\r\n$pdf->SetFont('Times', 'B', 16);\r\n$pdf->Cell(188,2, 'INVOICE',0,1,'C');\r\n\r\n$pdf->Cell(10,9,'',0,1);\r\n$pdf->SetFont('Arial', 'B', 8);\r\n$pdf->Cell(5,5,'Harap Dikirim :',0,0,'L');\r\n$pdf->Cell(20);\r\n$pdf->Cell(5,5,'Bradika Dasantra R',0,1,'L');\r\n\r\n$pdf->Output();\r\n}","title":""},{"docid":"ca8f94eeda4e84d7b9f357f33537c805","score":"0.5552066","text":"public function __construct ($orientation = 'P', $unit = 'mm', $size = 'A4')\n {\n $this->_pdf = new WriteHTML();\n $this->_pdf->FPDF($orientation, $unit, $size);\n }","title":""},{"docid":"9f6504cd1c354a8b0602a8df15d6cd81","score":"0.5547281","text":"public function returnPDFResponseFromHTML($html) {\n // If you are not in a controller, retrieve of some way the service container and then retrieve it\n //$pdf = $this->container->get(\"white_october.tcpdf\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n //if you are in a controlller use :\n\n $pdf = $this->get(\"white_october.tcpdf\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n $pdf->SetAuthor('Our Code World');\n $pdf->SetTitle(('Our Code World Title'));\n $pdf->SetSubject('Our Code World Subject');\n $pdf->setFontSubsetting(true);\n $pdf->SetFont('helvetica', '', 11, '', true);\n //$pdf->SetMargins(20,20,40, true);\n $pdf->AddPage();\n\n $filename = 'ourcodeworld_pdf_demo2';\n\n $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n\n $location = __DIR__ . '/../../../../web/downloads/';\n// VarDumper::dump($location);\n// die();\n\n //dest = I -> Send PDF to the standard output\n //dest = D -> download PDF as file\n //dest = F, FI, FD -> save PDF to a local file\n //dest = E -> return PDF as base64 mime multi-part email attachment (RFC 2045)\n //dest = S -> returns PDF as a string\n $pdf->Output(\"{$location}/{$filename}.pdf\", 'F'); // This will output the PDF as a response directly\n }","title":""},{"docid":"7902cfbeab5f047dbe34a54bf55e9f0a","score":"0.554061","text":"public function returnPDFResponseFromHTML($html) {\n // If you are not in a controller, retrieve of some way the service container and then retrieve it\n //$pdf = $this->container->get(\"white_october.tcpdf\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n //if you are in a controlller use :\n $pdf = $this->get(\"white_october.tcpdf\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n $pdf->SetAuthor('Our Code World');\n $pdf->SetTitle(('Our Code World Title'));\n $pdf->SetSubject('Our Code World Subject');\n $pdf->setFontSubsetting(true);\n $pdf->SetAutoPageBreak(true, 10);\n // $pdf->SetFont('helvetica', '', 11, '', true);\n $pdf->SetMargins(20, 30, 20, true);\n\n\n $pdf->setPrintFooter(false);\n // $filename = 'ourcodeworld_pdf_demo';\n foreach ($html as $array) {\n $this->logControle->logWeb(print_r($array, true));\n $pdf->SetAuthor($array['nmUser']);\n $pdf->SetTitle(($array['dsTitle']));\n $pdf->SetSubject($array['dsTitle']);\n $filename = 'portfolio_' . $array['nmUser'] . '_' . $array['idPortfolioStudent'];\n $pdf->resetHeaderTemplate();\n\n $pdf->SetHeaderData('', 0, $array['dsTitle'], '');\n $this->logControle->logWeb($array['dsTitle']);\n// set header and footer fonts\n $pdf->setHeaderFont(Array('freeserif', '', 18));\n $pdf->SetHeaderMargin(10);\n $pdf->setPrintHeader(true);\n $pdf->AddPage();\n\n $texto = stripcslashes($array['textoFinal']);\n $texto = preg_replace('/(src=[\"\\'])([^\"\\']+)([\"\\'])/', 'src=\"' . $this->getParameter('web_dir') . '/web/uploads/$2\"', $texto);\n\n\n $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $texto, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n $pdf->endPage(); //do end of page\n $pdf->lastPage(); //set cursor at last page, because autopagebreak not do it\n }\n\n $pdf->Output($filename . \".pdf\", 'I'); // This will output the PDF as a response directly\n }","title":""},{"docid":"85539b6ab4d59c635e0c9ac83050b4ed","score":"0.55323386","text":"function generate()\n\t{\n\t\tglobal $g_sPDFLibKey;\n\n\t\tif ($this->m_sFileName && sizeof($this->m_aTemplates))\n\t\t{\n\t\t\t// destroy any existing file with this name\n\t\t\tif (file_exists($this->m_sSaveDirectory . $this->m_sFileName))\n\t\t\t{\n\t\t\t\tunlink($this->m_sSaveDirectory . $this->m_sFileName);\n\t\t\t}\n\n\t\t\t// create the PDF object\n\t\t\tif ($t_oPDF = PDF_new())\n\t\t\t{\n\t\t\t\tPDF_set_parameter($t_oPDF, 'license', $g_sPDFLibKey);\n\n\t\t\t\t// load any custom fonts\n\t\t\t\tif (sizeof($this->m_hFonts))\n\t\t\t\t{\n\t\t\t\t\tforeach ($this->m_hFonts as $key => $val)\n\t\t\t\t\t{\n\t\t\t\t\t\tPDF_set_parameter($t_oPDF, \"FontOutline\", $key . \"=\" . $this->m_sFontDirectory . $val);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// start the document\n\t\t\t\tif (PDF_begin_document($t_oPDF, $this->m_sSaveDirectory . $this->m_sFileName, \n\t\t\t\t\t'compatibility=1.6 masterpassword=' . $this->m_sMasterPassword . ' permissions={nocopy nomodify}'))\n\t\t\t\t{\n\t\t\t\t\t// loop through each template\n\t\t\t\t\tforeach ($this->m_aTemplates as $key => $t_sTemplate)\n\t\t\t\t\t{\n\t\t\t\t\t\t// check for landscape portrait\n\t\t\t\t\t\tif (substr($t_sTemplate, (strlen($t_sTemplate) - 3), 3) == '~ls')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->resetPageDimensions(true);\n\t\t\t\t\t\t\t$t_sTemplate = substr($t_sTemplate, 0, strlen($t_sTemplate) - 3);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->resetPageDimensions(false);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// import the current template\n\t\t\t\t\t\tif ($t_oTemplate = PDF_open_pdi($t_oPDF, $this->m_sTemplateDirectory . $t_sTemplate, 'password=' . $this->m_sMasterPassword, 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// reset the page counter\n\t\t\t\t\t\t\t$t_iPageNo = 1;\n\n\t\t\t\t\t\t\t// loop through each page of the template\n\t\t\t\t\t\t\twhile ($t_oPage = PDF_open_pdi_page($t_oPDF, $t_oTemplate, $t_iPageNo, ''))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// begin a new page\n\t\t\t\t\t\t\t\tPDF_begin_page_ext($t_oPDF, $this->m_iPageWidth, $this->m_iPageHeight, '');\n\t\t\t\t\t\t\t\tPDF_fit_pdi_page($t_oPDF, $t_oPage, 0.0, 0.0, '');\n\n\t\t\t\t\t\t\t\t// loop through each block to be replaced and insert the required value\n\t\t\t\t\t\t\t\tif (isset($this->m_hReplacements[$key + 1]) && sizeof($this->m_hReplacements[$key + 1]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach($this->m_hReplacements[$key + 1] as $key2 => $val)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tPDF_fill_textblock($t_oPDF, $t_oPage, $key2, $val, 'embedding=true');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (isset($this->m_hImages[$key + 1]) && sizeof($this->m_hImages[$key + 1]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tforeach($this->m_hImages[$key + 1] as $key2 => $val)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$t_oImage = PDF_load_image($t_oPDF, 'auto', $val, '');\n\t\t\t\t\t\t\t\t\t\tPDF_fill_imageblock($t_oPDF, $t_oPage, $key2, $t_oImage, '');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// end the page\n\t\t\t\t\t\t\t\tPDF_close_pdi_page($t_oPDF, $t_oPage);\n\t\t\t\t\t\t\t\tPDF_end_page_ext($t_oPDF, '');\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// go on to the next page of the template\n\t\t\t\t\t\t\t\t$t_iPageNo++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// close the template\n\t\t\t\t\t\t\tPDF_close_pdi($t_oPDF, $t_oTemplate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn 'unable to load template: ' . PDF_get_errmsg($t_oPDF);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// end the document\n\t\t\t\t\tPDF_end_document($t_oPDF, '');\n\t\n\t\t\t\t\tchmod($this->m_sSaveDirectory . $this->m_sFileName, 0644);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 'unable to create document: ' . PDF_get_errmsg($t_oPDF);\n\t\t\t\t}\n\n\t\t\t\t// delete the PDF object\n\t\t\t\tPDF_delete($t_oPDF);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 'unable to create PDF object';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (!$this->m_sFileName)\n\t\t\t\treturn 'no filename';\n\t\t\telse\n\t\t\t\treturn 'no template specified';\n\t\t}\n\t}","title":""},{"docid":"3ce1d861317875b6659d9a0f6350026b","score":"0.5526701","text":"function getDocPdf()\n{\n\t\tif (session_id()==\"\") session_start();\n\n\t\t$appName = $_SESSION['appli_name'];\n\t\t$filename \t= $appName.\".pdf\";\n\t\t$workdirname\t= $_SERVER['DOCUMENT_ROOT'].\"/onlinecompiler/tmp/\".$_SESSION['id'].\"/workdir/\";\n\t\t$fullname \t= $workdirname.$appName.\"-mdoc/pdf/\".$filename;\n\t\t$size \t\t= filesize($fullname);\n\n\t\theader('Content-Description: File Transfer');\n \theader('Content-Type: application/pdf');\n\t\t//header(\"Content-Length: $size\");\n\t\theader(\"Content-Disposition: attachment; filename=\\\"$filename\\\"\");\n\t\treadfile($fullname);\n\t}","title":""},{"docid":"5387acbe602634914050bc13938f5692","score":"0.55238897","text":"public function render($data)\n\t{\n //header(\"Content-type:application/pdf\");\n $html = $this->twig->render('default.html', $data);\n $mpdf = new mPDF();\n $mpdf->WriteHTML($html);\n $mpdf->Output();\n\t}","title":""},{"docid":"d2fd12a7b81612105f05b2c1938ac90e","score":"0.551675","text":"public function print_pdf_tienno()\n{\n $this->load->model('m_voxy_package_orders');\n $this->load->model('m_htmltopdf');\n\n // theo tai xe nao\n $shipper_id = $this->input->post('shipper_id');\n $ship_are_id = $this->input->post('shipper_are_id');\n\n $list_id_to_tienno = $this->input->post('list_id_to_nhathang');\n\n if ($list_id_to_tienno != \"\") {\n $list_id_to_tienno = get_object_vars(json_decode($list_id_to_tienno))['list_id'];\n }\n\n $shipper_name = $this->m_voxy_package_orders->get_name_shipper($shipper_id);\n\n $date_for_orders = $this->input->post('date_for_orders');\n $ngay_dat_hang = ($date_for_orders == \"\") ? \"\" : $date_for_orders;\n\n $date_for_orders_end = $this->input->post('date_for_orders_end');\n $ngay_chuyen_hang = ($date_for_orders_end == \"\") ? \"\" : $date_for_orders_end;\n\n $html_content = $this->m_htmltopdf->pdf_day_tienno($list_id_to_tienno, $ngay_dat_hang, $ngay_chuyen_hang, $shipper_id, $ship_are_id);\n\n //var_dump($html_content);die;\n $this->pdf->loadHtml($html_content);\n $this->pdf->setPaper('A4', 'landscape');\n $this->pdf->render();\n $font = $this->pdf->getFontMetrics()->get_font(\"helvetica\", \"\");\n $this->pdf->getCanvas()->page_text(72, 18, \"Trang: {PAGE_NUM} of {PAGE_COUNT}\", $font, 8, array(0, 0, 0));\n $this->pdf->stream($ngay_chuyen_hang . \"-\" . $shipper_name . \".pdf\", array(\"Attachment\" => 0));\n}","title":""},{"docid":"772e044f19f6764ce595f88c96745673","score":"0.5513773","text":"function pdf($nombres,$nombre_curso,$fecha_inicio,$fecha_fin,$docente_curso,$promedio,$qr,$horas,$descripcion,$pdf)\n {\n $data['title']='Certificados';\n $data['persona']= $nombres;\n $data['curso']= $nombre_curso;\n \n \n $data['fechaini']= $fecha_inicio;\n $data['fechafin']= $fecha_fin;\n \n \n $data['docente']=$docente_curso;\n $data['promedio']=$promedio;\n $data['qr']= $qr;\n $data['horas']= $horas;\n $data['descripcion']= $descripcion;\n \n \n $meses = array(\"enero\",\"febrero\",\"marzo\",\"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\");\n \n $data['fechahoy']= strftime(\" %d de \".$meses[date('n')-1].\", %Y\");\n \n $this->createFolder();\n \n //importante el slash del final o no funcionará correctamente\n $this->html2pdf->folder('./uploads/certificados/pdf/infocip/');\n \n //establecemos el nombre del archivo\n $archivo=$pdf.\".pdf\";\n $this->html2pdf->filename($archivo);\n \n //establecemos el tipo de papel\n $this->html2pdf->paper('a4', 'landscape');\n if($promedio>=14){\n // $this->load->view('certificado/pdf', $data); \n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_certificado_aprobado', $data,true)));//certificado aprobado\n \n } else if($promedio<=14&&$promedio>=10) {\n // $this->load->view('certificado/pdf3', $data); \n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_certificado_asistente', $data,true)));//certificado asistido\n }\n else if($promedio==-1){ // ceritificado para docente\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_plantilla_certificado_docente', $data,true)));\n }\n //si el pdf se guarda correctamente lo mostramos en pantalla\n if($this->html2pdf->create('save')) \n { \n // $this->show($archivo);\n }\n }","title":""},{"docid":"6c4dbac741b862b2584d8ad14f310ad0","score":"0.55106485","text":"function creatPDF($filename)\n{\n$pdf = new TCPDF('P', 'pt', 'A4', true, 'UTF-8', false);\n// set document information\n//$pdf->SetCreator(PDF_CREATOR);\n//$pdf->SetAuthor('Nicola Asuni');\n//$pdf->SetTitle('TCPDF Example 021');\n//$pdf->SetSubject('TCPDF Tutorial');\n//$pdf->SetKeywords('TCPDF, PDF, example, test, guide');\n\n// set default header data\n//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);\n\n// set header and footer fonts\n//$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n//$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n$pdf->setPrintHeader(false);\n// set default monospaced font\n$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n//set margins\n$pdf->SetMargins(0, 0, 0);\n//$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n//$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n//set auto page breaks\n$pdf->SetAutoPageBreak(TRUE, 0.1);\n\n//set image scale factor\n$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n//set some language-dependent strings\n$pdf->setLanguageArray($l);\n\n// ---------------------------------------------------------\n\n// set font\n$pdf->SetFont('helvetica', '', 8);\n\n// add a page\n$pdf->AddPage();\n\n// read html content\n$html = file_get_contents($filename, FILE_TEXT, NULL);\n// create some HTML content\n\n\n// output the HTML content\n//$pdf->writeHTML($html, true, 0, true, 0);\n$pdf->writeHTML($html, false, 0, true, 0, 'L');\n\n// reset pointer to the last page\n$pdf->lastPage();\n\n// ---------------------------------------------------------\n\n//Close and output PDF document\n$pdf->Output('pog.pdf', 'I');\n}","title":""},{"docid":"ead26fc605aa1831abb8a7d20f3fbf3f","score":"0.5504382","text":"public function render($content)\n {\n $mpdf = new \\mPDF('c', 'A4', 10, 'Helvetica');\n\n //$mpdf->mirrorMargins = 1;\n $mpdf->SetDisplayMode('fullpage', 'single');\n\n //configuracion\n $mpdf->defaultheaderfontsize = 8;\n $mpdf->defaultheaderfontstyle = \"I\";\n $mpdf->defaultfooterfontsize = 8;\n $mpdf->defaultfooterfontstyle = \"I\";\n\n $mpdf->allow_charset_conversion = true;\n $mpdf->ignore_invalid_utf8 = true;\n\n //header\n $mpdf->setHeader($this->config['title']);\n //footer\n $date = $date = date(\"r\");\n $footer = \"Documentation is powered by nicereadme and generated on $date\";\n $mpdf->SetFooter($footer.' | | {PAGENO} / {nb}');\n\n // $mpdf->h2toc = array('H2'=>0);\n $mpdf->h2bookmarks = array(\n \"H1\" => 0,\n \"H2\" => 1,\n \"H3\" => 2,\n \"H4\" => 3,\n \"H5\" => 4,\n \"H6\" => 5\n );\n\n //contenido\n $mpdf->WriteHTML($this->extraHtml().$content);\n\n //metadata\n $mpdf->SetTitle($this->config['title']);\n $mpdf->SetAuthor($this->config['copyright']);\n\n //output\n $mpdf->Output(realpath($this->config['output']).\"/\".$this->config['filename'].\".pdf\");\n }","title":""},{"docid":"9249e877f86599dd3aca3078b8390574","score":"0.54954094","text":"public function __construct()\n {\n self::$handler = array(\n new ezcDocumentPdfPhpImageHandler(),\n );\n }","title":""},{"docid":"85512c6e23d3b02768cd9b1a321603f1","score":"0.5493261","text":"public function __construct()\n {\n parent::__construct();\n\n $this->load->library(array('Mpdf'));\n $this->load->model(array('Barang/Barang_model',\n 'Reportstokcolly/Reportstokcolly_model',\n 'Cabang/Cabang_model',\n 'Aktifitas/aktifitas_model'\n ));\n\n date_default_timezone_set(\"Asia/Bangkok\");\n\n $this->template->title('Report Stock Colly');\n $this->template->page_icon('fa fa-table');\n }","title":""},{"docid":"a3a18c262d3e5353f722f88102ee2d5a","score":"0.54834175","text":"public function export(){\n $html = ' ';\n\n $res = DB::table('employees')->leftJoin('companies','employees.Company','=','companies.id')\n ->select('employees.First_name','employees.last_name','employees.email','employees.phone','companies.name as company_name')->get();\n\n foreach ( $res as $emp ){\n $html .= '';\n }\n\n $html .= '
    First_namelast_nameemailphonecompany
    '.$emp->First_name.''.$emp->last_name.''.$emp->email.''.$emp->phone.''.$emp->company_name.'
    ';\n\n //$pdf = App::make('dompdf.wrapper');\n $pdf = new Dompdf();\n\n $pdf->loadHTML( $html );\n return $pdf->stream();\n }","title":""},{"docid":"f0a85da37d13574e95533001535d9bdb","score":"0.5481148","text":"public function pdfinformes($cauditoriainspeccion,$fservicio,$cchecklist) {\n\t\t$this->load->library('pdfgenerator');\n\t\t$filename = \"Document_name\";\n\n \n $html = '\n \n \n Informe\n \n \n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n Av. Del Pinar 110 of. 405 - 407
    Urb. Chacarilla del Estanque
    Santiago de Surco, Lima - Perú
    (51-1)372-1734 / 372-8182
    www.grupofs.com
    \n\n
    ';\n\n $resultado = $this->mexcelauditoria->getpdfdatosaudi($cauditoriainspeccion,$fservicio);\n if ($resultado){\n foreach($resultado as $row){\n $NROINFORME = $row->NROINFORME;\t\n $SERVICIO = $row->SERVICIO;\t\n $SUBSERVICIO = $row->SUBSERVICIO;\t\n $CLIENTE = $row->CLIENTE;\t\n $FSERVICIO = $row->FSERVICIO;\n $ESTABLECIMIENTO = $row->ESTABLECIMIENTO;\n $TEXTFECHA = $row->TEXTFECHA;\n }\n }\n $html .= '\n
    \n\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    INFORME N° '.$NROINFORME.'
    '.$SERVICIO.' - '.$SUBSERVICIO.'
    '.$CLIENTE.'
    '.$ESTABLECIMIENTO.'
    &nbsp;
    '.$TEXTFECHA.'
    \n\n
    \n\n
    \n RESUMEN \n
    &nbsp;
    \n\n \n \n \n \n \n \n \n \n \n \n \n '; \n $reszona = $this->mexcelauditoria->getpdfcalifzona($cauditoriainspeccion,$fservicio);\n if ($reszona){\n foreach($reszona as $rowzona){\n $destablearea = $rowzona->destablearea;\t\n $calificacion = $rowzona->calificacion;\t\n $ddetallecriterioresultado = $rowzona->ddetallecriterioresultado;\n $html .= \n '\n \n \n \n ';\n }\n }\n $html .= '\n \n
    PUNTUACION POR AREA
    AREA/ZONANOTACALIFICACION
    '.$destablearea.''.$calificacion.''.$ddetallecriterioresultado.'
    \n
    &nbsp;
    \n
    &nbsp;
    \n DETALLE \n
    &nbsp;
    ';\n\n if ($reszona){\n foreach($reszona as $rowdet){\n $destableareadet = $rowdet->destablearea;\n $establearea = $rowdet->cestablearea;\n \n $html .= ' \n \n \n \n \n \n \n \n \n \n \n \n ';\n \n $parametrosCabecera = array( \n '@idaudi'\t=> $cauditoriainspeccion,\n '@fechaaudi'\t=> $fservicio,\n '@cestablearea'\t=> $establearea\n );\n $rptCabecera = $this->mexcelauditoria->xlschecklistresult($parametrosCabecera);\n if ($rptCabecera){ \n $icabe = 0;\n foreach($rptCabecera as $rowcabecera){\n $cincoS = $rowcabecera->cincoS;\n $titulo = $rowcabecera->titulo;\n $valorsubtotal = $rowcabecera->valorsubtotal;\t\n \n $icabe++;\n $html .= '\n \n \n \n \n \n ';\n }\n }\n $html .= '\n
    '.$destableareadet.'
    ID5STITULOPUNTOS
    S'.$icabe.''.$cincoS.''.$titulo.''.$valorsubtotal.'
    \n
    &nbsp;
    \n
    &nbsp;
    ';\n }\n }\n $html .= '\n HALLAZGOS \n
    &nbsp;
    ';\n if ($reszona){\n foreach($reszona as $rowhallazgozona){\n $destableareazona = $rowhallazgozona->destablearea;\n $cestableareazona = $rowhallazgozona->cestablearea;\n $cchecklist = $rowhallazgozona->cchecklist;\n \n $html .= ' \n \n \n \n \n '; \n $reshallazgocab = $this->mexcelauditoria->getpdfhallazgocab($cauditoriainspeccion,$fservicio,$cchecklist,$cestableareazona);\n if ($reshallazgocab){\n foreach($reshallazgocab as $rowhallazgocab){\n $crequisitohcab = $rowhallazgocab->crequisito;\t\n $drequisitohcab = $rowhallazgocab->drequisito;\n $html .= '\n \n \n \n \n \n ';\n $reshallazgodet = $this->mexcelauditoria->getpdfhallazgodet($cauditoriainspeccion,$fservicio,$cchecklist,$cestableareazona,$crequisitohcab);\n if ($reshallazgodet){ \n $idet = 0;\n foreach($reshallazgodet as $rowhallazgodet){\n $drequisito = $rowhallazgodet->drequisito;\t\n $dhallazgo = $rowhallazgodet->dhallazgo;\n $foto\t= $rowhallazgodet->foto;\n $idet++;\n \n $html .= '\n \n \n \n \n \n \n \n \n \n ';\n }}\n $html .= '\n \n \n ';\n }}\n $html .= ' \n \n
    '.$destableareazona.'
    ID'.$drequisitohcab.'HALLAZGOS
    '.$idet.''.$drequisito.''.$dhallazgo.'
    &nbsp;
    ';\n }\n }\n $html .= '\n
    \n
    \n \n ';\n\t\t//echo $html;\n\t\t$this->pdfgenerator->generate($html, $filename);\n\t}","title":""},{"docid":"e3be589d8d22ac99ea19f1b74f2fd540","score":"0.54800206","text":"function generatePDF($jsonData) {\n\n $today = date(\"l F j, Y g:i a\");\n\n require_once 'tcpdf/config/lang/eng.php';\n require_once 'tcpdf/tcpdf.php';\n\n // create new PDF document\n $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\n\n // set document information\n $pdf->SetCreator(PDF_CREATOR);\n $pdf->SetAuthor('scripthat.com');\n $pdf->SetTitle('Mortgage Schedule');\n $pdf->SetSubject(\"Loan Details\");\n $pdf->SetKeywords('Loan, Mortgage, Amortization');\n\n // set default header data\n // set default header data\n $pdf->SetHeaderData(\"\", 60, \"Mortgage Information\", \"$today\", array(0,64,255), array(0,64,128));\n\n // set header and footer fonts\n $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n\n // set default monospaced font\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n //set margins\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n //set auto page breaks\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n //set image scale factor\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n //set some language-dependent strings\n // ---------------------------------------------------------\n\n // set default font subsetting mode\n $pdf->setFontSubsetting(true);\n\n // Set font\n // dejavusans is a UTF-8 Unicode font, if you only need to\n // print standard ASCII chars, you can use core fonts like\n // helvetica or times to reduce file size.\n $pdf->SetFont('helvetica', '', 8, '', true);\n\n // Add a page\n // This method has several options, check the source code documentation for more information.\n $pdf->AddPage();\n\n\n $html = '

    brought to you by ' . WEBSITE . '

    ';\n $html .= $jsonData['blurb'];\n\n $html .= '

    Amortization Schedule (P & I)

    '\n . ''\n . ''\n . '';\n\n foreach ($jsonData['payment'] as $key => $val) {\n $html .= '';\n }\n $html .= '

    ' . DISCLAIMER . '

    ';\n\n // Print text using writeHTMLCell()\n $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);\n\n // ---------------------------------------------------------\n\n // Close and output PDF document\n // This method has several options, check the source code documentation for more information.\n $pdfString = $pdf->Output('dummy.pdf', 'S');\n\n return $pdfString;\n}","title":""},{"docid":"8713832b845c29585ef3bf57311d7289","score":"0.5461343","text":"public function show() {\n\t\tglobal $wgMpdfSimpleOutput;\n\n\t\t$title = $this->getTitle();\n\t\t$output = $this->getOutput();\n\t\t$request = $this->getRequest();\n\n\t\t$titletext = $title->getPrefixedText();\n\t\t$filename = str_replace( [ '\\\\', '/', ':', '*', '?', '\"', '<', '>', \"\\n\", \"\\r\", \"\\0\" ], '_', $titletext );\n\t\t$article = new Article( $title );\n\t\tMediaWikiServices::getInstance()->getHookContainer()->run( 'MpdfGetArticle', [ $title, &$article ] );\n\n\t\tif ( $wgMpdfSimpleOutput ) {\n\t\t\t$article->render();\n\t\t\tob_start();\n\t\t\t$output->output();\n\t\t\t$url = $title->getFullURL();\n\t\t\t$footer = \"

    $url

    $titletext

    \\n\";\n\t\t\t$html = $footer . ob_get_clean();\n\t\t} else {\n\t\t\t$output->setPrintable();\n\t\t\t$article->view();\n\t\t\tob_start();\n\t\t\t$output->output();\n\t\t\t$html = ob_get_clean();\n\t\t}\n\n\t\t// Initialise PDF variables\n\t\t$format = $request->getText( 'format' );\n\n\t\t// If format=html in query-string, return html content directly\n\t\tif ( $format == 'html' ) {\n\t\t\t$output->disable();\n\t\t\theader( \"Content-Type: text/html\" );\n\t\t\theader( \"Content-Disposition: attachment; filename=\\\"$filename.html\\\"\" );\n\t\t\tprint $html;\n\t\t} else {\n\t\t\t// return pdf file\n\t\t\t$mode = 'utf-8';\n\t\t\t$format = 'A4';\n\t\t\t$marginLeft = 15;\n\t\t\t$marginRight = 15;\n\t\t\t$marginTop = 16;\n\t\t\t$marginBottom = 16;\n\t\t\t$marginHeader = 9;\n\t\t\t$marginFooter = 9;\n\t\t\t$orientation = 'P';\n\t\t\t$constr1 = explode( '\\n
    PaymentInterestPrincipalNew Mortgage
    ' . $val['value'] . '' . $val['interest'] . ''\n . $val['principal'] . '' . $val['newMortgage'] . '
    \\n \\n \\n \\n \\n
    \\n \\n

    Comprobante De Matricula

    \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n\\n

    Resumen De La Matricula

    Periodo:$matricula_periodo
    Numero:$matricula_numero
    Tipo De Enseñanza :$matricula_tipo_ensenanza
    Curso:$matricula_curso
    Fecha De Incorporación:$matricula_fecha_incorporacion


    \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n

    Datos de Alumno

    RUN:$run_alumno
    Nombre Completo:$alumno_nombre_completo
    Fecha De Nacimineto:$alumno_fecha_nacimiento
    Dirección:$alumno_direccion


    \\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n

    Datos de Apoderado

    RUN:$run_apoderado
    Nombre Completo:$apoderado_nombre_completo
    Dirección:$apoderado_direccion
    Teléfono Fijo:$apoderado_telefono_fijo
    Teléfono Celular:$apoderado_telefono_celular



    \\n

    Acceso a la plataforma www.$plataforma

    \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n

    Alumno

    Usuario:$run_alumno
    Contraseña:$run_alumno
    \\n
    \\n \\n \\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n

    Apoderado

    Usuario:$run_apoderado
    Contraseña:$run_apoderado
    \\n \\n \\n\\\";\\n\\n//echo $html;\\n\\n $dompdf = new DOMPDF();\\n $dompdf->load_html($html);\\n $dompdf->render();\\n $dompdf->stream($run_alumno.\\\".pdf\\\");\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2eeabd1de7c46a72ede46e1427f4ecd2\",\n \"score\": \"0.569152\",\n \"text\": \"public function pdfAction() {\\n //$html = '

    Plain HTML

    ';\\n\\n // but in this case we will render a symfony view !\\n // We are in a controller and we can use renderView function which retrieves the html from a view\\n // then we send that html to the user.\\n $html = $this->renderView('@Frontend/Default/index.html.twig', array('someDataToView' => 'Something'));\\n\\n $this->returnPDFResponseFromHTML($html);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac1ce1d471613e3744f6681287979868\",\n \"score\": \"0.56909037\",\n \"text\": \"function PDF($or = 'P',$unit = 'mm',$papersize = 'A4') {\\n $this->FPDF($or,$unit,$papersize); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f8e510ed2ab395a2b4f13e512c9d7ff\",\n \"score\": \"0.5687619\",\n \"text\": \"function PDF_initgraphics($p){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c4953fee389719f4262c552c2c3293b\",\n \"score\": \"0.5682173\",\n \"text\": \"function mycertificatePdf($ID){\\n\\t\\t$data['heading']='My Certificate';\\n\\t\\t//$this->maHeader(); \\n\\t\\t//$this->maLeft(); \\n\\t\\t$UserID = getUserID();\\n\\t\\t$data['module_datac']=$this->muser->getCourseCertificate($ID);\\t\\t\\t\\n\\t\\t$this-> load-> view('my_certificate_pdf',$data);\\n\\t\\t\\n\\t\\t\\t// Get output html\\n\\t\\t$html = $this->output->get_output();\\n\\t\\t\\n\\t\\t// Load library\\n\\t\\t$this->load->library('dompdf_gen');\\n\\t\\t\\n\\t\\t// Convert to PDF\\n\\t\\t$this->dompdf->load_html($html);\\n\\t\\t//$dompdf->set_paper('letter', 'landscape');\\n\\t\\t$this->dompdf->set_paper('letter', 'landscape');\\n\\t\\t$this->dompdf->render();\\n\\t\\t$this->dompdf->stream(\\\"certificate.pdf\\\", array(\\\"Attachment\\\" => false));\\n\\t\\t\\n\\t\\t//$this->maFooter();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cea1794a91556da4a1bba199cf53720\",\n \"score\": \"0.567266\",\n \"text\": \"public function make(array $config = [])\\n {\\n return new Pdf('', $config);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d8e5ce50dad36261c3fb20b8fc65ae9\",\n \"score\": \"0.5655391\",\n \"text\": \"private function generate()\\n {\\n//\\n// foreach ($this->data[\\\"fields\\\"] as $field => $value){\\n// $template->setValue(\\\"\\\\${{$field}}\\\", $value);\\n// }\\n//\\n// $template->cloneBlock('table_block', count($this->data['table']));\\n// $template->cloneRowAndSetValues('name', $this->data['table'][0]);\\n// $template->cloneRowAndSetValues('name', $this->data['table'][1]);\\n//// $template->cloneRowAndSetValues('name', $this->data['table'][2]);\\n//\\n // $template->saveAs('temp1.docx');\\n $filename = \\\"x_contract.pdf\\\";\\n\\n $wordPdf= IOFactory::load('x_contract.docx');\\n\\n//\\n//// //Save it\\n//// try {\\n// // or dompdf\\n// Settings::setPdfRendererPath('../vendor/tecnickcom/tcpdf');\\n// Settings::setPdfRendererName('TCPDF');\\n//// $xmlWriter = IOFactory::createWriter($wordPdf, 'PDF');\\n//// } catch (Exception $e) {\\n//// var_dump($e->getMessage());\\n//// }\\n//// $xmlWriter->save($filename);\\n Pdf::convert('x_contract.docx', 'rezultatix.pdf');\\n\\n// $pdfWriter = IOFactory::createWriter($wordPdf , 'PDF');\\n//// $pdfWriter->setFont('Time');\\n// $pdfWriter->save($filename.\\\".pdf\\\");\\n// unlink($wordPdf);\\n// $this->JoinPDF(['file1.pdf','file2.pdf'], 'output.pdf');\\n// $this->setOutputFile(basename($filename));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdb88009061226a8780d7efb1dfb9020\",\n \"score\": \"0.5645298\",\n \"text\": \"public function __construct($orientation='P', $unit='mm', $format='A4', $unicode=true, $encoding='UTF-8', $diskcache=false, $pdfa=false) {\\n /* Set internal character encoding to ASCII */\\n if (function_exists('mb_internal_encoding') AND mb_internal_encoding()) {\\n $this->internal_encoding = mb_internal_encoding();\\n mb_internal_encoding('ASCII');\\n }\\n // set file ID for trailer\\n $serformat = (is_array($format) ? json_encode($format) : $format);\\n $this->file_id = md5(TCPDF_STATIC::getRandomSeed('TCPDF'.$orientation.$unit.$serformat.$encoding));\\n $this->font_obj_ids = array();\\n $this->page_obj_id = array();\\n $this->form_obj_id = array();\\n // set pdf/a mode\\n $this->pdfa_mode = $pdfa;\\n $this->force_srgb = false;\\n // set language direction\\n $this->rtl = false;\\n $this->tmprtl = false;\\n // some checks\\n $this->_dochecks();\\n // initialization of properties\\n $this->isunicode = $unicode;\\n $this->page = 0;\\n $this->transfmrk[0] = array();\\n $this->pagedim = array();\\n $this->n = 2;\\n $this->buffer = '';\\n $this->pages = array();\\n $this->state = 0;\\n $this->fonts = array();\\n $this->FontFiles = array();\\n $this->diffs = array();\\n $this->images = array();\\n $this->links = array();\\n $this->gradients = array();\\n $this->InFooter = false;\\n $this->lasth = 0;\\n $this->FontFamily = defined('PDF_FONT_NAME_MAIN')?PDF_FONT_NAME_MAIN:'helvetica';\\n $this->FontStyle = '';\\n $this->FontSizePt = 12;\\n $this->underline = false;\\n $this->overline = false;\\n $this->linethrough = false;\\n $this->DrawColor = '0 G';\\n $this->FillColor = '0 g';\\n $this->TextColor = '0 g';\\n $this->ColorFlag = false;\\n $this->pdflayers = array();\\n // encryption values\\n $this->encrypted = false;\\n $this->last_enc_key = '';\\n // standard Unicode fonts\\n $this->CoreFonts = array(\\n 'courier'=>'Courier',\\n 'courierB'=>'Courier-Bold',\\n 'courierI'=>'Courier-Oblique',\\n 'courierBI'=>'Courier-BoldOblique',\\n 'helvetica'=>'Helvetica',\\n 'helveticaB'=>'Helvetica-Bold',\\n 'helveticaI'=>'Helvetica-Oblique',\\n 'helveticaBI'=>'Helvetica-BoldOblique',\\n 'times'=>'Times-Roman',\\n 'timesB'=>'Times-Bold',\\n 'timesI'=>'Times-Italic',\\n 'timesBI'=>'Times-BoldItalic',\\n 'symbol'=>'Symbol',\\n 'zapfdingbats'=>'ZapfDingbats'\\n );\\n // set scale factor\\n $this->setPageUnit($unit);\\n // set page format and orientation\\n $this->setPageFormat($format, $orientation);\\n // page margins (1 cm)\\n $margin = 28.35 / $this->k;\\n $this->SetMargins($margin, $margin);\\n $this->clMargin = $this->lMargin;\\n $this->crMargin = $this->rMargin;\\n // internal cell padding\\n $cpadding = $margin / 10;\\n $this->setCellPaddings($cpadding, 0, $cpadding, 0);\\n // cell margins\\n $this->setCellMargins(0, 0, 0, 0);\\n // line width (0.2 mm)\\n $this->LineWidth = 0.57 / $this->k;\\n $this->linestyleWidth = sprintf('%F w', ($this->LineWidth * $this->k));\\n $this->linestyleCap = '0 J';\\n $this->linestyleJoin = '0 j';\\n $this->linestyleDash = '[] 0 d';\\n // automatic page break\\n $this->SetAutoPageBreak(true, (2 * $margin));\\n // full width display mode\\n $this->SetDisplayMode('fullwidth');\\n // compression\\n $this->SetCompression();\\n // set default PDF version number\\n $this->setPDFVersion();\\n $this->tcpdflink = true;\\n $this->encoding = $encoding;\\n $this->HREF = array();\\n $this->getFontsList();\\n $this->fgcolor = array('R' => 0, 'G' => 0, 'B' => 0);\\n $this->strokecolor = array('R' => 0, 'G' => 0, 'B' => 0);\\n $this->bgcolor = array('R' => 255, 'G' => 255, 'B' => 255);\\n $this->extgstates = array();\\n $this->setTextShadow();\\n // signature\\n $this->sign = false;\\n $this->tsa_timestamp = false;\\n $this->tsa_data = array();\\n $this->signature_appearance = array('page' => 1, 'rect' => '0 0 0 0', 'name' => 'Signature');\\n $this->empty_signature_appearance = array();\\n // user's rights\\n $this->ur['enabled'] = false;\\n $this->ur['document'] = '/FullSave';\\n $this->ur['annots'] = '/Create/Delete/Modify/Copy/Import/Export';\\n $this->ur['form'] = '/Add/Delete/FillIn/Import/Export/SubmitStandalone/SpawnTemplate';\\n $this->ur['signature'] = '/Modify';\\n $this->ur['ef'] = '/Create/Delete/Modify/Import';\\n $this->ur['formex'] = '';\\n // set default JPEG quality\\n $this->jpeg_quality = 75;\\n // initialize some settings\\n TCPDF_FONTS::utf8Bidi(array(''), '', false, $this->isunicode, $this->CurrentFont);\\n // set default font\\n $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt);\\n $this->setHeaderFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt));\\n $this->setFooterFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt));\\n // check if PCRE Unicode support is enabled\\n if ($this->isunicode AND (@preg_match('/\\\\pL/u', 'a') == 1)) {\\n // PCRE unicode support is turned ON\\n // \\\\s : any whitespace character\\n // \\\\p{Z} : any separator\\n // \\\\p{Lo} : Unicode letter or ideograph that does not have lowercase and uppercase variants. Is used to chunk chinese words.\\n // \\\\xa0 : Unicode Character 'NO-BREAK SPACE' (U+00A0)\\n //$this->setSpacesRE('/(?!\\\\xa0)[\\\\s\\\\p{Z}\\\\p{Lo}]/u');\\n $this->setSpacesRE('/(?!\\\\xa0)[\\\\s\\\\p{Z}]/u');\\n } else {\\n // PCRE unicode support is turned OFF\\n $this->setSpacesRE('/[^\\\\S\\\\xa0]/');\\n }\\n $this->default_form_prop = array('lineWidth'=>1, 'borderStyle'=>'solid', 'fillColor'=>array(255, 255, 255), 'strokeColor'=>array(128, 128, 128));\\n // set document creation and modification timestamp\\n $this->doc_creation_timestamp = time();\\n $this->doc_modification_timestamp = $this->doc_creation_timestamp;\\n // get default graphic vars\\n $this->default_graphic_vars = $this->getGraphicVars();\\n $this->header_xobj_autoreset = false;\\n $this->custom_xmp = '';\\n // Call cleanup method after script execution finishes or exit() is called.\\n // NOTE: This will not be executed if the process is killed with a SIGTERM or SIGKILL signal.\\n register_shutdown_function(array($this, '_destroy'), true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fac6d50a260abca73c90f4e9fdd31eae\",\n \"score\": \"0.5641504\",\n \"text\": \"function PDF($orientation='P', $unit='mm', $size='letter')\\n{\\n $this->FPDF($orientation,$unit,$size);\\n // Iniciación de variables\\n $this->B = 0;\\n $this->I = 0;\\n $this->U = 0;\\n $this->HREF = '';\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74b2fa29cb6246ecd3b1f71a8e326fa5\",\n \"score\": \"0.56136036\",\n \"text\": \"public function generatePDF()\\n {\\n $data = ['title' => 'Welcome to VipsPM'];\\n \\\\View::addLocation(base_path().'/Modules/Estimate/Resources/views');\\n $pdf = PDF::loadView('mypdf', $data);\\n return $pdf->stream('chetsapp.pdf');\\n // return \\\\View::make('mypdf', compact('data'));\\n // return $pdf->save(public_path().'/itsolutionstuff.pdf');\\n // return $pdf->download('itsolutionstuff.pdf');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2637475b3d4405ee867e128da59ee587\",\n \"score\": \"0.56116444\",\n \"text\": \"function __construct() {\\n parent::__construct();\\n $this->load->model('finance_model');\\n\\t$this->load->library('pagination');\\n $this->load->library('Pdf');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00083711f82a9f94c2c8e57688e48c47\",\n \"score\": \"0.5605376\",\n \"text\": \"function smarty_modifier_generatePdf($html)\\n{\\n //Remove menu links\\n $html = preg_replace('#(.*)
    #Uis', '', $html);\\n \\n //Delete status and error messages\\n LogUtil::getStatusMessages(true);\\n LogUtil::getErrorMessages(true);\\n\\n //Generate pdf\\n $tcpdf = PluginUtil::loadPlugin('SystemPlugin_Tcpdf_Plugin');\\n $pdf = $tcpdf->createPdf();\\n $pdf->AddPage();\\n $pdf->SetFont('dejavusans', '', 12, '', true);\\n $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html);\\n $pdf->Output(PageUtil::getVar('title') . '.pdf', 'I');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"954200164699e3d13f831920ead5959f\",\n \"score\": \"0.5602911\",\n \"text\": \"public function loadDOGenerator()\\n {\\n $generatorName = $this->config->getCodeGeneratorName(); \\n $classSufix = GenitHelper::generatorNameToClassSufix($generatorName); \\n $doClassName = Genit::getDOGeneratorClass($classSufix);\\n $doGeneratorFIle = $this->getGeneratorPath() . DIRECTORY_SEPARATOR . $doClassName . '.php';\\n include_once $doGeneratorFIle;\\n $this->doGen = new $doClassName($this);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c423f916424605961bdb05e39ed38e0\",\n \"score\": \"0.5601779\",\n \"text\": \"public function geraPdf()\\n {\\n // dd($mpdf);\\n return view('site/pdf',[]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56c94bf0f903ada04fc50feb95f180ee\",\n \"score\": \"0.55916965\",\n \"text\": \"function manidora_printable_pdf($pid, $url = NULL) {\\n @include_once 'sites/all/libraries/tcpdf/config/lang/eng.php';\\n @include_once 'sites/all/libraries/tcpdf/tcpdf.php';\\n require_once dirname(__FILE__) . '/utilities.inc';\\n\\n // Extend the TCPDF class to create custom Header and Footer.\\n class MYPDF extends TCPDF {\\n\\n /**\\n * Constructor.\\n */\\n public function __construct($pid, $orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = TRUE, $encoding = 'UTF-8', $diskcache = FALSE, $pdfa = FALSE) {\\n $this->pid = $pid;\\n parent::__construct($orientation, $unit, $format, $unicode, $encoding, $diskcache);\\n }\\n\\n /**\\n * Page header.\\n */\\n public function Header() {\\n $string = manidora_retrieve_header_text($this->pid);\\n if ($string) {\\n $this->Cell(0, 15, $string, 0, FALSE, 'C', 0, '', 0, FALSE, 'M', 'M');\\n }\\n }\\n }\\n // Create new PDF document.\\n $pdf = new MYPDF($pid, PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, TRUE, 'UTF-8', FALSE);\\n\\n $header_text = manidora_retrieve_header_text($pid);\\n if ($header_text) {\\n // Parse a bit for use below.\\n $header_parts = explode(',', $header_text);\\n $title = $header_parts[0];\\n }\\n else {\\n $title = $pid;\\n $header_text = $pid;\\n }\\n // Set document information.\\n $pdf->SetTitle($title);\\n $pdf->SetSubject($title);\\n\\n // Set default monospaced font.\\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\\n\\n // Set margins.\\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\\n\\n // Set auto page breaks.\\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\\n\\n // Set image scale factor.\\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\\n\\n // Set font.\\n $pdf->SetFont('times', 'BI', 12);\\n\\n // If no url was provided (e.g. we're not coming from the clipper),\\n // check to see if there's a high quality jpeg derivative. If it does not\\n // exist, default to the standard JPG datastream.\\n if (!isset($url)) {\\n $obj = islandora_object_load($pid);\\n $dsid = isset($obj['HQ_JPG']) ? 'HQ_JPG' : 'JPG';\\n $url = variable_get('islandora_base_url', 'http://localhost:8080/fedora') . '/objects/' . $pid . '/datastreams/' . $dsid . '/content';\\n }\\n\\n // Add a page.\\n $pdf->AddPage();\\n // Add the image.\\n // Gotta specify almost ALL the parameters to get to the 'fitonpage'\\n // parameter. This should fix weird clipping issues between the actual image\\n // source and what gets embedded into the PDF.\\n $pdf->Image($url, '0', '15', 0, 0, '', '', '', 2, 300, '', FALSE, FALSE, 0, FALSE, FALSE, TRUE);\\n\\n // Close and output PDF document.\\n $pdf->Output($header_text . '.pdf', 'D');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb58218f5869e78047c4bc353604d52f\",\n \"score\": \"0.5582807\",\n \"text\": \"function __construct() {\\n\\t if (isset($_GET[\\\"judge\\\"])){\\n\\t if ($_GET[\\\"judge\\\"] == \\\"all\\\"){\\n\\t $judgesArray = self::getJudgesNames();\\n\\t }\\n\\t else{\\n\\t $judgesArray[] = htmlspecialchars($_GET[\\\"judge\\\"]);\\n\\t }\\n\\t }\\n\\t else{\\n\\t $judgesArray[] = \\\"Allen\\\";\\n\\t }\\n\\t \\n\\t $header = array('Case Number', 'Defendant','NAC Date', 'Setting');\\n\\t $pdf = new PDF();\\n\\n\\t //\\tLoop through judges add a page for each.\\n\\t foreach ($judgesArray as $key => $judge) {\\n\\t $pdf->setJudge( $judge );\\n \\t$overTimeCases = self::getOverTimeCases( $judge );\\n \\t// echo \\\"Printing overtime cases array right before passing to FancyTable:\\\\n\\\";\\n \\t// print_r($overTimeCases); \\t\\n\\t\\t$pdf->AddPage();\\n \\t\\t$pdf->FancyTable( $header, $overTimeCases );\\n\\t }\\n\\t $pdf->Output();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0dbc2ca2645edd38cd992d8d22a3db7b\",\n \"score\": \"0.55812395\",\n \"text\": \"function buildPdf( $htmlContent, $filename ){\\n $mpdf = new mPDF('win-1252', 'A4', '', '', 5, 5, 5, 5, 10, 10);\\n $mpdf->SetDisplayMode('fullpage');\\n $mpdf->WriteHTML( $htmlContent );\\n $mpdf->Output( $filename.\\\".pdf\\\", 'D');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10cacb0224a31581e6a7037929be3284\",\n \"score\": \"0.55808973\",\n \"text\": \"public function cetak_pdf()\\n {\\n\\t\\t//ambil semua darta simpan di variabel$tabel_karyawan\\n \\t//$tabel_karyawan = DB::all();\\n \\t$tabel_karyawan = DB::table('tabel_karyawan')->paginate(12);\\n\\n \\n\\t\\t//gunakan dompdf dengan pdf::loadview() sampai nanti buka view\\n\\t\\t//nama view diisu karyawan_pdf\\n\\t\\t//passing data ke profilkarjyawan\\n \\t$pdf = PDF::loadview('karyawan_pdf',['profilkaryawan'=>$tabel_karyawan]);\\n \\t//return fungsi download dari package dompdf\\n\\t\\t//return $pdf->download('laporan-karyawan-pdf');\\n\\t\\t//return untuk tampilkan saja\\n\\t\\treturn $pdf->stream();\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba6c5ca121d46b58de0c6aa44a3246b0\",\n \"score\": \"0.5564276\",\n \"text\": \"public function createPDF()\\n {\\n ini_set('max_execution_time', 180);\\n $datas = Employee::all();\\n\\n // share data to view\\n view()->share('employee', $datas);\\n $pdf = PDF::loadView('pdf_view', compact('datas'));\\n\\n // download PDF file with download method\\n return $pdf->download('pdf_file.pdf');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04e9570d09be96813d3784255550ce6f\",\n \"score\": \"0.55586624\",\n \"text\": \"public function index(){\\r\\n$pdf = new pdf('P','mm','A4');\\r\\n$pdf->SetMargins(10,10,10);\\r\\n$pdf->AliasNbPages();\\r\\n// membuat halaman baru\\r\\n$pdf->AddPage();\\r\\n$pdf->SetFont('Times', 'B', 16);\\r\\n$pdf->Cell(188,2, 'INVOICE',0,1,'C');\\r\\n\\r\\n$pdf->Cell(10,9,'',0,1);\\r\\n$pdf->SetFont('Arial', 'B', 8);\\r\\n$pdf->Cell(5,5,'Harap Dikirim :',0,0,'L');\\r\\n$pdf->Cell(20);\\r\\n$pdf->Cell(5,5,'Bradika Dasantra R',0,1,'L');\\r\\n\\r\\n$pdf->Output();\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca8f94eeda4e84d7b9f357f33537c805\",\n \"score\": \"0.5552066\",\n \"text\": \"public function __construct ($orientation = 'P', $unit = 'mm', $size = 'A4')\\n {\\n $this->_pdf = new WriteHTML();\\n $this->_pdf->FPDF($orientation, $unit, $size);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f6504cd1c354a8b0602a8df15d6cd81\",\n \"score\": \"0.5547281\",\n \"text\": \"public function returnPDFResponseFromHTML($html) {\\n // If you are not in a controller, retrieve of some way the service container and then retrieve it\\n //$pdf = $this->container->get(\\\"white_october.tcpdf\\\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\\n //if you are in a controlller use :\\n\\n $pdf = $this->get(\\\"white_october.tcpdf\\\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\\n $pdf->SetAuthor('Our Code World');\\n $pdf->SetTitle(('Our Code World Title'));\\n $pdf->SetSubject('Our Code World Subject');\\n $pdf->setFontSubsetting(true);\\n $pdf->SetFont('helvetica', '', 11, '', true);\\n //$pdf->SetMargins(20,20,40, true);\\n $pdf->AddPage();\\n\\n $filename = 'ourcodeworld_pdf_demo2';\\n\\n $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\\n\\n $location = __DIR__ . '/../../../../web/downloads/';\\n// VarDumper::dump($location);\\n// die();\\n\\n //dest = I -> Send PDF to the standard output\\n //dest = D -> download PDF as file\\n //dest = F, FI, FD -> save PDF to a local file\\n //dest = E -> return PDF as base64 mime multi-part email attachment (RFC 2045)\\n //dest = S -> returns PDF as a string\\n $pdf->Output(\\\"{$location}/{$filename}.pdf\\\", 'F'); // This will output the PDF as a response directly\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7902cfbeab5f047dbe34a54bf55e9f0a\",\n \"score\": \"0.554061\",\n \"text\": \"public function returnPDFResponseFromHTML($html) {\\n // If you are not in a controller, retrieve of some way the service container and then retrieve it\\n //$pdf = $this->container->get(\\\"white_october.tcpdf\\\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\\n //if you are in a controlller use :\\n $pdf = $this->get(\\\"white_october.tcpdf\\\")->create('vertical', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\\n $pdf->SetAuthor('Our Code World');\\n $pdf->SetTitle(('Our Code World Title'));\\n $pdf->SetSubject('Our Code World Subject');\\n $pdf->setFontSubsetting(true);\\n $pdf->SetAutoPageBreak(true, 10);\\n // $pdf->SetFont('helvetica', '', 11, '', true);\\n $pdf->SetMargins(20, 30, 20, true);\\n\\n\\n $pdf->setPrintFooter(false);\\n // $filename = 'ourcodeworld_pdf_demo';\\n foreach ($html as $array) {\\n $this->logControle->logWeb(print_r($array, true));\\n $pdf->SetAuthor($array['nmUser']);\\n $pdf->SetTitle(($array['dsTitle']));\\n $pdf->SetSubject($array['dsTitle']);\\n $filename = 'portfolio_' . $array['nmUser'] . '_' . $array['idPortfolioStudent'];\\n $pdf->resetHeaderTemplate();\\n\\n $pdf->SetHeaderData('', 0, $array['dsTitle'], '');\\n $this->logControle->logWeb($array['dsTitle']);\\n// set header and footer fonts\\n $pdf->setHeaderFont(Array('freeserif', '', 18));\\n $pdf->SetHeaderMargin(10);\\n $pdf->setPrintHeader(true);\\n $pdf->AddPage();\\n\\n $texto = stripcslashes($array['textoFinal']);\\n $texto = preg_replace('/(src=[\\\"\\\\'])([^\\\"\\\\']+)([\\\"\\\\'])/', 'src=\\\"' . $this->getParameter('web_dir') . '/web/uploads/$2\\\"', $texto);\\n\\n\\n $pdf->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $texto, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\\n $pdf->endPage(); //do end of page\\n $pdf->lastPage(); //set cursor at last page, because autopagebreak not do it\\n }\\n\\n $pdf->Output($filename . \\\".pdf\\\", 'I'); // This will output the PDF as a response directly\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85539b6ab4d59c635e0c9ac83050b4ed\",\n \"score\": \"0.55323386\",\n \"text\": \"function generate()\\n\\t{\\n\\t\\tglobal $g_sPDFLibKey;\\n\\n\\t\\tif ($this->m_sFileName && sizeof($this->m_aTemplates))\\n\\t\\t{\\n\\t\\t\\t// destroy any existing file with this name\\n\\t\\t\\tif (file_exists($this->m_sSaveDirectory . $this->m_sFileName))\\n\\t\\t\\t{\\n\\t\\t\\t\\tunlink($this->m_sSaveDirectory . $this->m_sFileName);\\n\\t\\t\\t}\\n\\n\\t\\t\\t// create the PDF object\\n\\t\\t\\tif ($t_oPDF = PDF_new())\\n\\t\\t\\t{\\n\\t\\t\\t\\tPDF_set_parameter($t_oPDF, 'license', $g_sPDFLibKey);\\n\\n\\t\\t\\t\\t// load any custom fonts\\n\\t\\t\\t\\tif (sizeof($this->m_hFonts))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tforeach ($this->m_hFonts as $key => $val)\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tPDF_set_parameter($t_oPDF, \\\"FontOutline\\\", $key . \\\"=\\\" . $this->m_sFontDirectory . $val);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// start the document\\n\\t\\t\\t\\tif (PDF_begin_document($t_oPDF, $this->m_sSaveDirectory . $this->m_sFileName, \\n\\t\\t\\t\\t\\t'compatibility=1.6 masterpassword=' . $this->m_sMasterPassword . ' permissions={nocopy nomodify}'))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t// loop through each template\\n\\t\\t\\t\\t\\tforeach ($this->m_aTemplates as $key => $t_sTemplate)\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t// check for landscape portrait\\n\\t\\t\\t\\t\\t\\tif (substr($t_sTemplate, (strlen($t_sTemplate) - 3), 3) == '~ls')\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$this->resetPageDimensions(true);\\n\\t\\t\\t\\t\\t\\t\\t$t_sTemplate = substr($t_sTemplate, 0, strlen($t_sTemplate) - 3);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$this->resetPageDimensions(false);\\n\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t// import the current template\\n\\t\\t\\t\\t\\t\\tif ($t_oTemplate = PDF_open_pdi($t_oPDF, $this->m_sTemplateDirectory . $t_sTemplate, 'password=' . $this->m_sMasterPassword, 0))\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t// reset the page counter\\n\\t\\t\\t\\t\\t\\t\\t$t_iPageNo = 1;\\n\\n\\t\\t\\t\\t\\t\\t\\t// loop through each page of the template\\n\\t\\t\\t\\t\\t\\t\\twhile ($t_oPage = PDF_open_pdi_page($t_oPDF, $t_oTemplate, $t_iPageNo, ''))\\n\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t// begin a new page\\n\\t\\t\\t\\t\\t\\t\\t\\tPDF_begin_page_ext($t_oPDF, $this->m_iPageWidth, $this->m_iPageHeight, '');\\n\\t\\t\\t\\t\\t\\t\\t\\tPDF_fit_pdi_page($t_oPDF, $t_oPage, 0.0, 0.0, '');\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// loop through each block to be replaced and insert the required value\\n\\t\\t\\t\\t\\t\\t\\t\\tif (isset($this->m_hReplacements[$key + 1]) && sizeof($this->m_hReplacements[$key + 1]))\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($this->m_hReplacements[$key + 1] as $key2 => $val)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tPDF_fill_textblock($t_oPDF, $t_oPage, $key2, $val, 'embedding=true');\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\tif (isset($this->m_hImages[$key + 1]) && sizeof($this->m_hImages[$key + 1]))\\n\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($this->m_hImages[$key + 1] as $key2 => $val)\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$t_oImage = PDF_load_image($t_oPDF, 'auto', $val, '');\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tPDF_fill_imageblock($t_oPDF, $t_oPage, $key2, $t_oImage, '');\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t// end the page\\n\\t\\t\\t\\t\\t\\t\\t\\tPDF_close_pdi_page($t_oPDF, $t_oPage);\\n\\t\\t\\t\\t\\t\\t\\t\\tPDF_end_page_ext($t_oPDF, '');\\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t// go on to the next page of the template\\n\\t\\t\\t\\t\\t\\t\\t\\t$t_iPageNo++;\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t// close the template\\n\\t\\t\\t\\t\\t\\t\\tPDF_close_pdi($t_oPDF, $t_oTemplate);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\treturn 'unable to load template: ' . PDF_get_errmsg($t_oPDF);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t// end the document\\n\\t\\t\\t\\t\\tPDF_end_document($t_oPDF, '');\\n\\t\\n\\t\\t\\t\\t\\tchmod($this->m_sSaveDirectory . $this->m_sFileName, 0644);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\treturn 'unable to create document: ' . PDF_get_errmsg($t_oPDF);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t// delete the PDF object\\n\\t\\t\\t\\tPDF_delete($t_oPDF);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn 'unable to create PDF object';\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\tif (!$this->m_sFileName)\\n\\t\\t\\t\\treturn 'no filename';\\n\\t\\t\\telse\\n\\t\\t\\t\\treturn 'no template specified';\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ce1d861317875b6659d9a0f6350026b\",\n \"score\": \"0.5526701\",\n \"text\": \"function getDocPdf()\\n{\\n\\t\\tif (session_id()==\\\"\\\") session_start();\\n\\n\\t\\t$appName = $_SESSION['appli_name'];\\n\\t\\t$filename \\t= $appName.\\\".pdf\\\";\\n\\t\\t$workdirname\\t= $_SERVER['DOCUMENT_ROOT'].\\\"/onlinecompiler/tmp/\\\".$_SESSION['id'].\\\"/workdir/\\\";\\n\\t\\t$fullname \\t= $workdirname.$appName.\\\"-mdoc/pdf/\\\".$filename;\\n\\t\\t$size \\t\\t= filesize($fullname);\\n\\n\\t\\theader('Content-Description: File Transfer');\\n \\theader('Content-Type: application/pdf');\\n\\t\\t//header(\\\"Content-Length: $size\\\");\\n\\t\\theader(\\\"Content-Disposition: attachment; filename=\\\\\\\"$filename\\\\\\\"\\\");\\n\\t\\treadfile($fullname);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5387acbe602634914050bc13938f5692\",\n \"score\": \"0.55238897\",\n \"text\": \"public function render($data)\\n\\t{\\n //header(\\\"Content-type:application/pdf\\\");\\n $html = $this->twig->render('default.html', $data);\\n $mpdf = new mPDF();\\n $mpdf->WriteHTML($html);\\n $mpdf->Output();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2fd12a7b81612105f05b2c1938ac90e\",\n \"score\": \"0.551675\",\n \"text\": \"public function print_pdf_tienno()\\n{\\n $this->load->model('m_voxy_package_orders');\\n $this->load->model('m_htmltopdf');\\n\\n // theo tai xe nao\\n $shipper_id = $this->input->post('shipper_id');\\n $ship_are_id = $this->input->post('shipper_are_id');\\n\\n $list_id_to_tienno = $this->input->post('list_id_to_nhathang');\\n\\n if ($list_id_to_tienno != \\\"\\\") {\\n $list_id_to_tienno = get_object_vars(json_decode($list_id_to_tienno))['list_id'];\\n }\\n\\n $shipper_name = $this->m_voxy_package_orders->get_name_shipper($shipper_id);\\n\\n $date_for_orders = $this->input->post('date_for_orders');\\n $ngay_dat_hang = ($date_for_orders == \\\"\\\") ? \\\"\\\" : $date_for_orders;\\n\\n $date_for_orders_end = $this->input->post('date_for_orders_end');\\n $ngay_chuyen_hang = ($date_for_orders_end == \\\"\\\") ? \\\"\\\" : $date_for_orders_end;\\n\\n $html_content = $this->m_htmltopdf->pdf_day_tienno($list_id_to_tienno, $ngay_dat_hang, $ngay_chuyen_hang, $shipper_id, $ship_are_id);\\n\\n //var_dump($html_content);die;\\n $this->pdf->loadHtml($html_content);\\n $this->pdf->setPaper('A4', 'landscape');\\n $this->pdf->render();\\n $font = $this->pdf->getFontMetrics()->get_font(\\\"helvetica\\\", \\\"\\\");\\n $this->pdf->getCanvas()->page_text(72, 18, \\\"Trang: {PAGE_NUM} of {PAGE_COUNT}\\\", $font, 8, array(0, 0, 0));\\n $this->pdf->stream($ngay_chuyen_hang . \\\"-\\\" . $shipper_name . \\\".pdf\\\", array(\\\"Attachment\\\" => 0));\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"772e044f19f6764ce595f88c96745673\",\n \"score\": \"0.5513773\",\n \"text\": \"function pdf($nombres,$nombre_curso,$fecha_inicio,$fecha_fin,$docente_curso,$promedio,$qr,$horas,$descripcion,$pdf)\\n {\\n $data['title']='Certificados';\\n $data['persona']= $nombres;\\n $data['curso']= $nombre_curso;\\n \\n \\n $data['fechaini']= $fecha_inicio;\\n $data['fechafin']= $fecha_fin;\\n \\n \\n $data['docente']=$docente_curso;\\n $data['promedio']=$promedio;\\n $data['qr']= $qr;\\n $data['horas']= $horas;\\n $data['descripcion']= $descripcion;\\n \\n \\n $meses = array(\\\"enero\\\",\\\"febrero\\\",\\\"marzo\\\",\\\"abril\\\",\\\"mayo\\\",\\\"junio\\\",\\\"julio\\\",\\\"agosto\\\",\\\"septiembre\\\",\\\"octubre\\\",\\\"noviembre\\\",\\\"diciembre\\\");\\n \\n $data['fechahoy']= strftime(\\\" %d de \\\".$meses[date('n')-1].\\\", %Y\\\");\\n \\n $this->createFolder();\\n \\n //importante el slash del final o no funcionará correctamente\\n $this->html2pdf->folder('./uploads/certificados/pdf/infocip/');\\n \\n //establecemos el nombre del archivo\\n $archivo=$pdf.\\\".pdf\\\";\\n $this->html2pdf->filename($archivo);\\n \\n //establecemos el tipo de papel\\n $this->html2pdf->paper('a4', 'landscape');\\n if($promedio>=14){\\n // $this->load->view('certificado/pdf', $data); \\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_certificado_aprobado', $data,true)));//certificado aprobado\\n \\n } else if($promedio<=14&&$promedio>=10) {\\n // $this->load->view('certificado/pdf3', $data); \\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_certificado_asistente', $data,true)));//certificado asistido\\n }\\n else if($promedio==-1){ // ceritificado para docente\\n $this->html2pdf->html(utf8_decode($this->load->view('certificado/pdf_plantilla_certificado_docente', $data,true)));\\n }\\n //si el pdf se guarda correctamente lo mostramos en pantalla\\n if($this->html2pdf->create('save')) \\n { \\n // $this->show($archivo);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c4dbac741b862b2584d8ad14f310ad0\",\n \"score\": \"0.55106485\",\n \"text\": \"function creatPDF($filename)\\n{\\n$pdf = new TCPDF('P', 'pt', 'A4', true, 'UTF-8', false);\\n// set document information\\n//$pdf->SetCreator(PDF_CREATOR);\\n//$pdf->SetAuthor('Nicola Asuni');\\n//$pdf->SetTitle('TCPDF Example 021');\\n//$pdf->SetSubject('TCPDF Tutorial');\\n//$pdf->SetKeywords('TCPDF, PDF, example, test, guide');\\n\\n// set default header data\\n//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE, PDF_HEADER_STRING);\\n\\n// set header and footer fonts\\n//$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\\n//$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\\n$pdf->setPrintHeader(false);\\n// set default monospaced font\\n$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\\n\\n//set margins\\n$pdf->SetMargins(0, 0, 0);\\n//$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\\n//$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\\n\\n//set auto page breaks\\n$pdf->SetAutoPageBreak(TRUE, 0.1);\\n\\n//set image scale factor\\n$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\\n\\n//set some language-dependent strings\\n$pdf->setLanguageArray($l);\\n\\n// ---------------------------------------------------------\\n\\n// set font\\n$pdf->SetFont('helvetica', '', 8);\\n\\n// add a page\\n$pdf->AddPage();\\n\\n// read html content\\n$html = file_get_contents($filename, FILE_TEXT, NULL);\\n// create some HTML content\\n\\n\\n// output the HTML content\\n//$pdf->writeHTML($html, true, 0, true, 0);\\n$pdf->writeHTML($html, false, 0, true, 0, 'L');\\n\\n// reset pointer to the last page\\n$pdf->lastPage();\\n\\n// ---------------------------------------------------------\\n\\n//Close and output PDF document\\n$pdf->Output('pog.pdf', 'I');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ead26fc605aa1831abb8a7d20f3fbf3f\",\n \"score\": \"0.5504382\",\n \"text\": \"public function render($content)\\n {\\n $mpdf = new \\\\mPDF('c', 'A4', 10, 'Helvetica');\\n\\n //$mpdf->mirrorMargins = 1;\\n $mpdf->SetDisplayMode('fullpage', 'single');\\n\\n //configuracion\\n $mpdf->defaultheaderfontsize = 8;\\n $mpdf->defaultheaderfontstyle = \\\"I\\\";\\n $mpdf->defaultfooterfontsize = 8;\\n $mpdf->defaultfooterfontstyle = \\\"I\\\";\\n\\n $mpdf->allow_charset_conversion = true;\\n $mpdf->ignore_invalid_utf8 = true;\\n\\n //header\\n $mpdf->setHeader($this->config['title']);\\n //footer\\n $date = $date = date(\\\"r\\\");\\n $footer = \\\"Documentation is powered by nicereadme and generated on $date\\\";\\n $mpdf->SetFooter($footer.' | | {PAGENO} / {nb}');\\n\\n // $mpdf->h2toc = array('H2'=>0);\\n $mpdf->h2bookmarks = array(\\n \\\"H1\\\" => 0,\\n \\\"H2\\\" => 1,\\n \\\"H3\\\" => 2,\\n \\\"H4\\\" => 3,\\n \\\"H5\\\" => 4,\\n \\\"H6\\\" => 5\\n );\\n\\n //contenido\\n $mpdf->WriteHTML($this->extraHtml().$content);\\n\\n //metadata\\n $mpdf->SetTitle($this->config['title']);\\n $mpdf->SetAuthor($this->config['copyright']);\\n\\n //output\\n $mpdf->Output(realpath($this->config['output']).\\\"/\\\".$this->config['filename'].\\\".pdf\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9249e877f86599dd3aca3078b8390574\",\n \"score\": \"0.54954094\",\n \"text\": \"public function __construct()\\n {\\n self::$handler = array(\\n new ezcDocumentPdfPhpImageHandler(),\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85512c6e23d3b02768cd9b1a321603f1\",\n \"score\": \"0.5493261\",\n \"text\": \"public function __construct()\\n {\\n parent::__construct();\\n\\n $this->load->library(array('Mpdf'));\\n $this->load->model(array('Barang/Barang_model',\\n 'Reportstokcolly/Reportstokcolly_model',\\n 'Cabang/Cabang_model',\\n 'Aktifitas/aktifitas_model'\\n ));\\n\\n date_default_timezone_set(\\\"Asia/Bangkok\\\");\\n\\n $this->template->title('Report Stock Colly');\\n $this->template->page_icon('fa fa-table');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3a18c262d3e5353f722f88102ee2d5a\",\n \"score\": \"0.54834175\",\n \"text\": \"public function export(){\\n $html = ' ';\\n\\n $res = DB::table('employees')->leftJoin('companies','employees.Company','=','companies.id')\\n ->select('employees.First_name','employees.last_name','employees.email','employees.phone','companies.name as company_name')->get();\\n\\n foreach ( $res as $emp ){\\n $html .= '';\\n }\\n\\n $html .= '
    First_namelast_nameemailphonecompany
    '.$emp->First_name.''.$emp->last_name.''.$emp->email.''.$emp->phone.''.$emp->company_name.'
    ';\\n\\n //$pdf = App::make('dompdf.wrapper');\\n $pdf = new Dompdf();\\n\\n $pdf->loadHTML( $html );\\n return $pdf->stream();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0a85da37d13574e95533001535d9bdb\",\n \"score\": \"0.5481148\",\n \"text\": \"public function pdfinformes($cauditoriainspeccion,$fservicio,$cchecklist) {\\n\\t\\t$this->load->library('pdfgenerator');\\n\\t\\t$filename = \\\"Document_name\\\";\\n\\n \\n $html = '\\n \\n \\n Informe\\n \\n \\n
    \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
    \\n \\n Av. Del Pinar 110 of. 405 - 407
    Urb. Chacarilla del Estanque
    Santiago de Surco, Lima - Perú
    (51-1)372-1734 / 372-8182
    www.grupofs.com
    \\n\\n
    ';\\n\\n $resultado = $this->mexcelauditoria->getpdfdatosaudi($cauditoriainspeccion,$fservicio);\\n if ($resultado){\\n foreach($resultado as $row){\\n $NROINFORME = $row->NROINFORME;\\t\\n $SERVICIO = $row->SERVICIO;\\t\\n $SUBSERVICIO = $row->SUBSERVICIO;\\t\\n $CLIENTE = $row->CLIENTE;\\t\\n $FSERVICIO = $row->FSERVICIO;\\n $ESTABLECIMIENTO = $row->ESTABLECIMIENTO;\\n $TEXTFECHA = $row->TEXTFECHA;\\n }\\n }\\n $html .= '\\n
    \\n\\n
    \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
    INFORME N° '.$NROINFORME.'
    '.$SERVICIO.' - '.$SUBSERVICIO.'
    '.$CLIENTE.'
    '.$ESTABLECIMIENTO.'
    &nbsp;
    '.$TEXTFECHA.'
    \\n\\n
    \\n\\n
    \\n RESUMEN \\n
    &nbsp;
    \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n '; \\n $reszona = $this->mexcelauditoria->getpdfcalifzona($cauditoriainspeccion,$fservicio);\\n if ($reszona){\\n foreach($reszona as $rowzona){\\n $destablearea = $rowzona->destablearea;\\t\\n $calificacion = $rowzona->calificacion;\\t\\n $ddetallecriterioresultado = $rowzona->ddetallecriterioresultado;\\n $html .= \\n '\\n \\n \\n \\n ';\\n }\\n }\\n $html .= '\\n \\n
    PUNTUACION POR AREA
    AREA/ZONANOTACALIFICACION
    '.$destablearea.''.$calificacion.''.$ddetallecriterioresultado.'
    \\n
    &nbsp;
    \\n
    &nbsp;
    \\n DETALLE \\n
    &nbsp;
    ';\\n\\n if ($reszona){\\n foreach($reszona as $rowdet){\\n $destableareadet = $rowdet->destablearea;\\n $establearea = $rowdet->cestablearea;\\n \\n $html .= ' \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n ';\\n \\n $parametrosCabecera = array( \\n '@idaudi'\\t=> $cauditoriainspeccion,\\n '@fechaaudi'\\t=> $fservicio,\\n '@cestablearea'\\t=> $establearea\\n );\\n $rptCabecera = $this->mexcelauditoria->xlschecklistresult($parametrosCabecera);\\n if ($rptCabecera){ \\n $icabe = 0;\\n foreach($rptCabecera as $rowcabecera){\\n $cincoS = $rowcabecera->cincoS;\\n $titulo = $rowcabecera->titulo;\\n $valorsubtotal = $rowcabecera->valorsubtotal;\\t\\n \\n $icabe++;\\n $html .= '\\n \\n \\n \\n \\n \\n ';\\n }\\n }\\n $html .= '\\n
    '.$destableareadet.'
    ID5STITULOPUNTOS
    S'.$icabe.''.$cincoS.''.$titulo.''.$valorsubtotal.'
    \\n
    &nbsp;
    \\n
    &nbsp;
    ';\\n }\\n }\\n $html .= '\\n HALLAZGOS \\n
    &nbsp;
    ';\\n if ($reszona){\\n foreach($reszona as $rowhallazgozona){\\n $destableareazona = $rowhallazgozona->destablearea;\\n $cestableareazona = $rowhallazgozona->cestablearea;\\n $cchecklist = $rowhallazgozona->cchecklist;\\n \\n $html .= ' \\n \\n \\n \\n \\n '; \\n $reshallazgocab = $this->mexcelauditoria->getpdfhallazgocab($cauditoriainspeccion,$fservicio,$cchecklist,$cestableareazona);\\n if ($reshallazgocab){\\n foreach($reshallazgocab as $rowhallazgocab){\\n $crequisitohcab = $rowhallazgocab->crequisito;\\t\\n $drequisitohcab = $rowhallazgocab->drequisito;\\n $html .= '\\n \\n \\n \\n \\n \\n ';\\n $reshallazgodet = $this->mexcelauditoria->getpdfhallazgodet($cauditoriainspeccion,$fservicio,$cchecklist,$cestableareazona,$crequisitohcab);\\n if ($reshallazgodet){ \\n $idet = 0;\\n foreach($reshallazgodet as $rowhallazgodet){\\n $drequisito = $rowhallazgodet->drequisito;\\t\\n $dhallazgo = $rowhallazgodet->dhallazgo;\\n $foto\\t= $rowhallazgodet->foto;\\n $idet++;\\n \\n $html .= '\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n ';\\n }}\\n $html .= '\\n \\n \\n ';\\n }}\\n $html .= ' \\n \\n
    '.$destableareazona.'
    ID'.$drequisitohcab.'HALLAZGOS
    '.$idet.''.$drequisito.''.$dhallazgo.'
    &nbsp;
    ';\\n }\\n }\\n $html .= '\\n
    \\n
    \\n \\n ';\\n\\t\\t//echo $html;\\n\\t\\t$this->pdfgenerator->generate($html, $filename);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3be589d8d22ac99ea19f1b74f2fd540\",\n \"score\": \"0.54800206\",\n \"text\": \"function generatePDF($jsonData) {\\n\\n $today = date(\\\"l F j, Y g:i a\\\");\\n\\n require_once 'tcpdf/config/lang/eng.php';\\n require_once 'tcpdf/tcpdf.php';\\n\\n // create new PDF document\\n $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);\\n\\n // set document information\\n $pdf->SetCreator(PDF_CREATOR);\\n $pdf->SetAuthor('scripthat.com');\\n $pdf->SetTitle('Mortgage Schedule');\\n $pdf->SetSubject(\\\"Loan Details\\\");\\n $pdf->SetKeywords('Loan, Mortgage, Amortization');\\n\\n // set default header data\\n // set default header data\\n $pdf->SetHeaderData(\\\"\\\", 60, \\\"Mortgage Information\\\", \\\"$today\\\", array(0,64,255), array(0,64,128));\\n\\n // set header and footer fonts\\n $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\\n $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\\n\\n // set default monospaced font\\n $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\\n\\n //set margins\\n $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\\n $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\\n $pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\\n\\n //set auto page breaks\\n $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\\n\\n //set image scale factor\\n $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\\n\\n //set some language-dependent strings\\n // ---------------------------------------------------------\\n\\n // set default font subsetting mode\\n $pdf->setFontSubsetting(true);\\n\\n // Set font\\n // dejavusans is a UTF-8 Unicode font, if you only need to\\n // print standard ASCII chars, you can use core fonts like\\n // helvetica or times to reduce file size.\\n $pdf->SetFont('helvetica', '', 8, '', true);\\n\\n // Add a page\\n // This method has several options, check the source code documentation for more information.\\n $pdf->AddPage();\\n\\n\\n $html = '

    brought to you by ' . WEBSITE . '

    ';\\n $html .= $jsonData['blurb'];\\n\\n $html .= '

    Amortization Schedule (P & I)

    '\\n . ''\\n . ''\\n . '';\\n\\n foreach ($jsonData['payment'] as $key => $val) {\\n $html .= '';\\n }\\n $html .= '

    ' . DISCLAIMER . '

    ';\\n\\n // Print text using writeHTMLCell()\\n $pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);\\n\\n // ---------------------------------------------------------\\n\\n // Close and output PDF document\\n // This method has several options, check the source code documentation for more information.\\n $pdfString = $pdf->Output('dummy.pdf', 'S');\\n\\n return $pdfString;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8713832b845c29585ef3bf57311d7289\",\n \"score\": \"0.5461343\",\n \"text\": \"public function show() {\\n\\t\\tglobal $wgMpdfSimpleOutput;\\n\\n\\t\\t$title = $this->getTitle();\\n\\t\\t$output = $this->getOutput();\\n\\t\\t$request = $this->getRequest();\\n\\n\\t\\t$titletext = $title->getPrefixedText();\\n\\t\\t$filename = str_replace( [ '\\\\\\\\', '/', ':', '*', '?', '\\\"', '<', '>', \\\"\\\\n\\\", \\\"\\\\r\\\", \\\"\\\\0\\\" ], '_', $titletext );\\n\\t\\t$article = new Article( $title );\\n\\t\\tMediaWikiServices::getInstance()->getHookContainer()->run( 'MpdfGetArticle', [ $title, &$article ] );\\n\\n\\t\\tif ( $wgMpdfSimpleOutput ) {\\n\\t\\t\\t$article->render();\\n\\t\\t\\tob_start();\\n\\t\\t\\t$output->output();\\n\\t\\t\\t$url = $title->getFullURL();\\n\\t\\t\\t$footer = \\\"

    $url

    $titletext

    \\\\n\\\";\\n\\t\\t\\t$html = $footer . ob_get_clean();\\n\\t\\t} else {\\n\\t\\t\\t$output->setPrintable();\\n\\t\\t\\t$article->view();\\n\\t\\t\\tob_start();\\n\\t\\t\\t$output->output();\\n\\t\\t\\t$html = ob_get_clean();\\n\\t\\t}\\n\\n\\t\\t// Initialise PDF variables\\n\\t\\t$format = $request->getText( 'format' );\\n\\n\\t\\t// If format=html in query-string, return html content directly\\n\\t\\tif ( $format == 'html' ) {\\n\\t\\t\\t$output->disable();\\n\\t\\t\\theader( \\\"Content-Type: text/html\\\" );\\n\\t\\t\\theader( \\\"Content-Disposition: attachment; filename=\\\\\\\"$filename.html\\\\\\\"\\\" );\\n\\t\\t\\tprint $html;\\n\\t\\t} else {\\n\\t\\t\\t// return pdf file\\n\\t\\t\\t$mode = 'utf-8';\\n\\t\\t\\t$format = 'A4';\\n\\t\\t\\t$marginLeft = 15;\\n\\t\\t\\t$marginRight = 15;\\n\\t\\t\\t$marginTop = 16;\\n\\t\\t\\t$marginBottom = 16;\\n\\t\\t\\t$marginHeader = 9;\\n\\t\\t\\t$marginFooter = 9;\\n\\t\\t\\t$orientation = 'P';\\n\\t\\t\\t$constr1 = explode( 'RunSelectQuery($sql);\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n
    \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \n \n \"> has been cancelled.

    \n\n

    \n
    \n
    \n\n RunSelectQuery($sql);\n // 'event_status' => 'L'\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n
    \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \n \n\n style=\"color:#000000\">\n has been reorganized.\n

    \n

    \n
    \n
    \n\n RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n
    \n
    \n RunSelectQuery($sql);\n foreach ($before_result as $result)\n {\n $publicUserResult = (array)$result;\n if ($publicUserResult['profile_pic'] == null)\n {\n ?>\n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \" style=\"color:#000000\"> has commented on your style=\"color:#000000\">&nbsp;

    \n

    \"notifocation-image\"

    \n
    \n
    \n\n RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n
    \n
    \n RunSelectQuery($sql);\n foreach ($before_result as $result)\n {\n $PublicUserData = (array)$result;\n if ($PublicUserData['profile_pic'] == null)\n {\n ?>\n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n \n
    \n

    \" style=\"color:#000000\"> has commented on your style=\"color:#000000\">&nbsp;

    \n

    \"notifocation-image\"

    \n
    \n
    \n\n user_id;\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $data)\n {\n $publicUserInfo = (array)$data;\n\n $user_name = $publicUserInfo[\"firstname\"] . \" \" . $publicUserInfo[\"lastname\"];\n }\n ?>\n
    \n\n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \n \" style=\"color:#000000\">&nbsp; wants to add you as a buddy.\n\n RunSelectQuery($sql);\n if ($res_data[0]->status =='Confirmed buddy')\n {\n\n ?>\n &nbsp;Accepted\n

    \n

    \n
    \n
    \n \n
    \" style=\"display:inline-block\">
    )\" class=\"slimbuttonblue\" style=\"width:130px;\">Accept request
    \n

    \n \n \n \n RunSelectQuery($sql);\n foreach ($res_data as $resultuser)\n {\n $resultuserInfo = (array)$resultuser;\n $user_name = $resultuserInfo[\"firstname\"] . \" \" . $resultuserInfo[\"lastname\"];\n }\n ?>\n\n
    \n
    \n \" class=\"image-has-radius\" alt=\"event-image\">\n
    \n
    \n

    \" style=\"color:#000000\">&nbsp; has accepted your buddy request.

    \n

    \n
    \n\n
    \n RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n } ?>\n \n
    \n \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n \n
    \n

    sent you a booking request for \">

    \n

    \n
    \n
    \n \n\n RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n } ?>\n \n
    \n \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n \n
    \n

    Left \">

    \n

    \n
    \n
    \n \n\n \n isirdb->where('spis_data.publishdate > \"'. $lastemail .'\"', '', false);\n\n\t\tif ($ignoreminordocuments == true) {\n\t\t\t$this->isirdb->where('spis_data.is_document_minor', false);\n\t\t}\n\n\t\t$this->isirdb->order_by('spis_data.publishdate');\n\t\t$this->_prepareNewEventsSelect($userid, false, true);\n\n\t\t$temp = $this->isirdb->get('users_watches')->result_array();\n\n\t\t// then get changes for recently added subjects\n\t\t$this->isirdb->where('users_watches.date_add > \"'. $lastemail .'\"', '', false);\n\t\t$this->_prepareNewEventsSelect($userid, true, false);\n\n\t\t$tempNewlyAdded = $this->isirdb->get('users_watches')->result_array();\n\n\t\treturn $this->_mergeEvents($temp, $tempNewlyAdded);\n\t}","title":""},{"docid":"8c9a3e489fb2d6c040359f1447dd0f81","score":"0.6036853","text":"function showUserNotifications($status,$limit){\n global $DB,$user_id;\n $limit;\n $sql = \"Select * from notifications where other_user_id=$user_id and status='$status' order by id desc limit $limit\";\n $res_data_notification = $DB->RunSelectQuery($sql);\n\n foreach ($res_data_notification as $result)\n {\n $notification_data = (array)$result;\n $date = date(\"Y-m-d\", strtotime($notification_data[\"notification_date\"]));\n ?>\n RunSelectQuery($sql);\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n ?>\n
    \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \n \n \"> has been modified by organiser. Please review the changes.\n

    \n

    \n
    \n
    \n\n RunSelectQuery($sql);\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n
    \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \n \n \"> has been cancelled.

    \n\n

    \n
    \n
    \n\n RunSelectQuery($sql);\n // 'event_status' => 'L'\n foreach ($res_data_event as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n
    \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \n \n style=\"color:#000000\">\n has been reorganized.\n

    \n

    \n
    \n
    \n\n RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data_publicUser = $DB->RunSelectQuery($sql);\n foreach ($res_data_publicUser as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n
    \n
    \n RunSelectQuery($sql);\n foreach ($before_result as $result)\n {\n $publicUserResult = (array)$result;\n if ($publicUserResult['profile_pic'] == null)\n {\n ?>\n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \" style=\"color:#000000\"> has commented on your style=\"color:#000000\">&nbsp;

    \n

    \"notifocation-image\"

    \n
    \n
    \n\n RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n }\n ?>\n
    \n
    \n RunSelectQuery($sql);\n foreach ($before_result as $result)\n {\n $PublicUserData = (array)$result;\n if ($PublicUserData['profile_pic'] == null)\n {\n ?>\n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n \n
    \n

    \" style=\"color:#000000\"> has commented on your style=\"color:#000000\">&nbsp;

    \n

    \"notifocation-image\"

    \n
    \n
    \n\n user_id;\n $res_data = $DB->RunSelectQuery($sql);\n foreach ($res_data as $data)\n {\n $publicUserInfo = (array)$data;\n\n $user_name = $publicUserInfo[\"firstname\"] . \" \" . $publicUserInfo[\"lastname\"];\n }\n ?>\n
    \n\n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n\n
    \n

    \" style=\"color:#000000\">&nbsp; wants to add you as a buddy.\n RunSelectQuery($sql);\n if ($res_data[0]->status =='Confirmed buddy')\n {\n\n ?>\n &nbsp;Accepted\n

    \n

    \n
    \n
    \n \n
    \" style=\"display:inline-block\">
    )\" class=\"slimbuttonblue\" style=\"width:130px;\">Accept request
    \n

    \n \n\n RunSelectQuery($sql);\n foreach ($res_data as $resultuser)\n {\n $resultuserInfo = (array)$resultuser;\n $user_name = $resultuserInfo[\"firstname\"] . \" \" . $resultuserInfo[\"lastname\"];\n }\n ?>\n\n
    \n
    \n \" class=\"image-has-radius\" alt=\"event-image\">\n
    \n
    \n

    \" style=\"color:#000000\">&nbsp; has accepted your buddy request.

    \n

    \n
    \n\n
    \n RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n } ?>\n \n
    \n \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n \n
    \n

    sent you a booking request for \">

    \n

    \n
    \n
    \n \n\n RunSelectQuery($sql);\n foreach ($res_data as $resulteventcomment)\n {\n $resulteventcomment = (array)$resulteventcomment;\n $event_name = $resulteventcomment[\"event_name\"];\n if ($resulteventcomment[\"entry_type\"] == \"\")\n {\n $event_type = \"event\";\n $event_link = createURL('index.php', \"mod=event&do=eventdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n else if ($resulteventcomment[\"entry_type\"] == \"Ping\")\n {\n $event_type = \"ping\";\n $event_link = createURL('index.php', \"mod=ping&do=pingdetails&eventid=\" . $resulteventcomment[\"event_id\"]);\n }\n }\n\n\n $sql = \"Select * from public_users where id=\" . $notification_data[\"user_id\"];\n $res_data = $DB->RunSelectQuery($sql);\n\n foreach ($res_data as $resultusercomment)\n {\n $resultusercomment = (array)$resultusercomment;\n\n $user_name = $resultusercomment[\"firstname\"] . \" \" . $resultusercomment[\"lastname\"];\n } ?>\n \n
    \n \n
    \n \n \"event-image\"/images/no_profile_pic.gif\" />\n \n \"event-image\"\" width=\"37\" height=\"37\" />\n \n
    \n \n
    \n

    Left \">

    \n

    \n
    \n
    \n \n\n \n application_query_builder->getStatusHistoryQuery(\n\t\t\t$date, \n\t\t\t$this->getUpdatableStatusIds(), \n\t\t\t$this->config->getCompany(), \n\t\t\t$args\n\t\t);\n\t\t\n\t\t//$st = $this->config->getConnection()->prepare($query);\n\t\t$rs = $this->queryPrepared($query,$args);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setApplicationBalance'))\n\t\t);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setStatusChain'))\n\t\t);\n\t\t\n\t\treturn $this->data_builder->getApplicationData($rs);\n\t}","title":""},{"docid":"cb3c9035aafd8c0733892c983ad466be","score":"0.5998655","text":"public function getChanges();","title":""},{"docid":"cb3c9035aafd8c0733892c983ad466be","score":"0.5998655","text":"public function getChanges();","title":""},{"docid":"6c1d2717f5f897158049e95c17c8b3ae","score":"0.5992619","text":"public function getApplicationStatusChanges($application_id)\n\t{\n\t\t$args = array();\n\t\t$query = $this->application_query_builder->getApplicationStatusHistoryQuery(\n\t\t\t$application_id, \n\t\t\t$this->getUpdatableStatusIds(), \n\t\t\t$this->config->getCompany(), \n\t\t\t$args\n\t\t);\n\t\t\n\t\t//$st = $this->config->getConnection()->prepare($query);\n\t\t$rs = $this->queryPrepared($query,$args);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setApplicationBalance'))\n\t\t);\n\t\t\n\t\t$this->data_builder->attachObserver(\n\t\t\tnew Delegate_1(array($this, 'setStatusChain'))\n\t\t);\n\t\t\n\t\treturn $this->data_builder->getApplicationData($rs);\n\t}","title":""},{"docid":"8752a50d3d50c571f8563505c0ece0e9","score":"0.59067863","text":"function relist_notifications($old, $new) {\r\n $functions=1;\r\n include(\"config.php\"); // php functions\r\n\r\n\r\n $task = mysql_fetch_array(mysql_query(\"SELECT * FROM tasks WHERE id = '$old' LIMIT 1\")); //original task details\r\n $joins = mysql_query(\"SELECT * FROM joins WHERE task = '$old'\"); // people who had joined that task (if any)\r\n $subject = \"Task re-listed - \" . $task[\"title\"];\r\n \r\n while ($info = mysql_fetch_array($joins)){\r\n \r\n $member = mysql_fetch_array(mysql_query(\"SELECT * FROM `users` WHERE id = '\".$info[\"user\"].\"' LIMIT 1\"));\r\n $message = \"\r\n

    \".$member[\"firstname\"].\",

    \r\n \r\n

    Recently a task closed which you had joined, however not enough others had joined to activate it. The lister has now re-listed the task on another date, so we thought we'd let you know incase you were interested in re-joining.

    \r\n \r\n

    You can view the new listing and join the task here:

    \r\n \r\n

    $domain\" . task_link($new) . \"

    \r\n \r\n

    Thanks for being a part of Volunteezy!

    \r\n \";\r\n \r\n send_email($member[\"email\"], $subject, $message);\r\n \r\n addlog(\"Sent email to user \".$info[\"user\"].\" to let them know that task $old has been relisted as task $new\");\r\n }\r\n \r\n \r\n}","title":""},{"docid":"8c6b80e25241caae0c45c4354b5460a4","score":"0.58870816","text":"function phb_is_get_user_status($event_id,$user_id)\r\n\t{\r\n global $SITE_URL;\r\n\t\t hb_set_then_go(\"change_invitation_status_then_go\",$SITE_URL.\"future_event.php\");\r\n\t\t if($event_id!=\"\" && $user_id!=\"\")\r\n\t\t {\r\n\t\t $select_status=\"select * from tbl_invitation_responce where user_id='$user_id' and event_id='$event_id'\";\r\n\t\t $status_result=hb_mysql_query($select_status);\r\n\t\t $row_status=hb_mysql_num_rows($status_result);\r\n\t\t\t if($row_status > 0)\r\n\t\t\t {\r\n\t\t\t\t $status_data=hb_mysql_fetch_array($status_result);\r\n\t\t\t\t$rid=$status_data['id'];\r\n\t\t\t\t$uid=$status_data['user_id'];\r\n\t\t\t\t if($status_data['status']==\"1\")\r\n\t\t\t\t {\r\n\t\t\t\t\t return \"Joining
    Change :May Be | Not Joining\" ;\r\n\t\t\t\t }else if($status_data['status']==\"2\")\r\n\t\t\t\t {\r\n\t\t\t\t\t return \"Maybe
    Change :Join\" ;\r\n\t\t\t\t }else{\r\n\t\t\t\t\t return \"Not Joining
    Change :Join | May Be \";\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t \r\n\t\t }\r\n\t\r\n\t}","title":""},{"docid":"2cfe0a8721b783c767ad87bc0a86ab74","score":"0.5886645","text":"function getAllEventNotifications($user_id){\n\t\t\t\t\t\n\t\t\t$sql =\" select ef.id,ef.friend_id,e.user_id,e.event_id,u.user_name as UserName,\n\t\t\t\t\t\tu.image as UserImage,e.event_name,e.event_type,e.description,\n\t\t\t\t\t\tef.status from `events` as e ,event_friends as ef\n\t\t\t\t\t\tleft join users as u on u.user_id = ef.user_id\n\t\t\t\t\t\twhere e.event_id = ef.event_id\n\t\t\t\t\t\tand ef.friend_id = '\".$user_id.\"'\n\t\t\t\t\t\tand e.create_type = 'events'\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tand (ef.status = 'start')\n\t\t\t\t\t\tgroup by e.event_id\n\t\t\t\t\t\torder by e.event_id desc\n\t\t\t\t\t\tlimit 0,2 \";\n\t\t$query = $this->db->query($sql);\t\n\t\t$data = $query->result_array();\n\t\treturn $data;\n\t\t\n\t}","title":""},{"docid":"5b25bfdeb0eb6115d0a0ae53f2e8dda3","score":"0.5876238","text":"private function getEvents () \n\n\t\t{\n\t\t\t $dbs = new DB ( $this->config['database'] );\n $c = $dbs->query (\"SELECT * FROM tbl_events_record WHERE org_id = '\" . $this->c . \"'\");\n\t\t\t if ( count ( $c ) ) {\n\t\t\t\t$this->result['data']['id'] = trim ( $this->c );\n\t\t\t\t$this->result['data']['events'] = $c[0]['events'];\n\t\t\t\t$this->result['data']['date'] = $c[0]['date_rec'];\n\t\t\t } else \n\t\t\t\t$this->result['data']['result'] = \"Not found [error code:100:101]\";\n\n\t\t\t $dbs->CloseConnection ();\n\t\t\t\n\t\t \treturn;\n\t\t}","title":""},{"docid":"8d4b8811cdaf9f36468349d883a65787","score":"0.5870417","text":"public function getNew()\n\t{\n\t\t$msgs = $this->getAllByQuery(\"date_sent >= ?\", [$this->last_query_time]);\n\t\t$this->updateQueryTime();\n\t\treturn $msgs;\n\t}","title":""},{"docid":"fd3a13e66ed74e64d135c11a781cfce7","score":"0.5867827","text":"public function getUpdates()\n {\n $query = \"SELECT * FROM events WHERE id > ? AND game_id = ? AND player = ?\";\n $result = $this->oDB->getAll($query, array(\n $this->oData->getLastIdEvents(),\n $this->oData->getIdGames(),\n $this->oData->getOtherNumber()\n ));\n\n $updates = array();\n foreach ($result as $value) {\n switch ($value['event_type']) {\n case \"name_update\":\n $this->oData->setOtherName($value['event_value']);\n break;\n\n case \"start_game\":\n $this->oData->setOtherShips($value['event_value']);\n break;\n\n case \"shot\":\n $this->oData->appendOtherShots($value['event_value']);\n break;\n }\n\n $lastIdEvents = max($this->oData->getLastIdEvents(), $value['id']);\n $this->oData->setLastIdEvents($lastIdEvents);\n\n if ($value['event_type'] == \"chat\") {\n $eventValue = new \\stdClass();\n $eventValue->text = $value['event_value'];\n $eventValue->timestamp = $value['timestamp'];\n } elseif ($value['event_type'] == 'start_game') {\n $eventValue = true;\n } else {\n $eventValue = $value['event_value'];\n }\n\n $updates[ $value['event_type'] ][] = $eventValue;\n $updates['lastIdEvents'] = array($lastIdEvents);\n }\n\n return $updates;\n }","title":""},{"docid":"078fe78bb017c07cdba63e94856f53dd","score":"0.586162","text":"public function changes()\r\n\t{\r\n\t\t$Change = App::make('Change');\r\n\r\n\t\treturn $Change::where('fmodel', 'GalleryItem')\r\n\t\t\t\t \t ->where('fid', $this->id)\r\n\t\t\t\t \t ->with('user')\r\n\t\t\t\t \t ->orderBy('created_at', 'DESC')\r\n\t\t\t\t \t ->get();\r\n\t}","title":""},{"docid":"0887649d2c910fb4ae03aa2eb9bdcc80","score":"0.58582646","text":"public function getStatusHistory()\n\t\t{\n\t\t\t$list = ECash::getFactory()->getModel(\"StatusHistoryList\");\n\t\t\t$list->loadBy(array(\"application_id\" => $this->application_id));\n\n\t\t\treturn $list->toList();\n\t\t}","title":""},{"docid":"4ddb103dc55d8c45bde0a13c3f023008","score":"0.57783204","text":"function getRecentChanges()\r\n\t{\r\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\r\n\t\t$changes = ilWikiPage::getRecentChanges(\"wpg\", $this->wiki_id);\r\n\t\t$this->setDefaultOrderField(\"date\");\r\n\t\t$this->setDefaultOrderDirection(\"desc\");\r\n\t\t$this->setData($changes);\r\n\t}","title":""},{"docid":"1d9e678eb67aebd7fab4b8fb0518cc2f","score":"0.577272","text":"public function getChangedEntries();","title":""},{"docid":"cc97f99720212a670519ea1a872a9222","score":"0.5757922","text":"function fn_get_order_status_history($params = array(), $lang_code = CART_LANGUAGE, $items_per_page = 0)\n{\n\n // Set default values to input params\n $default_params = array(\n 'page' => 1,\n 'items_per_page' => $items_per_page\n );\n\n $params = array_merge($default_params, $params);\n\n $sortings = array(\n 'user_id' => '?:order_status_history.user_id',\n 'order_id' => '?:order_status_history.order_id',\n 'timestamp' => '?:order_status_history.timestamp',\n 'new_status' => '?:order_status_history.new_status',\n 'old_status' => '?:order_status_history.old_status',\n );\n\n $fields = array (\n '?:order_status_history.user_id',\n '?:order_status_history.order_id',\n '?:order_status_history.timestamp',\n '?:order_status_history.new_status',\n '?:order_status_history.old_status',\n '?:users.firstname'\n );\n\n $sorting = db_sort($params, $sortings, 'timestamp', 'asc');\n\n\n if (!empty($params['items_per_page'])) {\n $params['total_items'] = db_get_field(\"SELECT COUNT(*) FROM ?:order_status_history\");\n $limit = db_paginate($params['page'], $params['items_per_page'], $params['total_items']);\n }\n\n $join = 'left join ?:users on ?:order_status_history.user_id = ?:users.user_id';\n\n $status_history_list = db_get_array(\n \"SELECT ?p FROM ?:order_status_history \" .\n $join .\n \" WHERE 1 ?p ?p\",\n implode(', ', $fields), $sorting, $limit\n );\n\n $order_statuses = fn_get_statuses(STATUSES_ORDER, [], true, true);\n\n foreach ($status_history_list as &$history){\n $history['new_status_text'] = $order_statuses[$history['new_status']]['description'];\n $history['old_status_text'] = $order_statuses[$history['old_status']]['description'];\n }\n\n return array($status_history_list, $params, $order_statuses);\n}","title":""},{"docid":"34336aefb91d5d7347925cf7d4265e1d","score":"0.5696395","text":"public function getUncommittedEvents();","title":""},{"docid":"ca47fe0086805e1e2e9b3d5dce67a688","score":"0.56951195","text":"public function getnewevents_allforadded($userid, $lastemail, $ignoreminordocuments) {\n\t\t// first get all events for subjects added after last emailing\n\t\t$this->isirdb->where('users_watches.date_add > \"'. $lastemail .'\"', '', false);\n\n\t\tif ($ignoreminordocuments == true) {\n\t\t\t$this->isirdb->where('spis_data.is_document_minor', false);\n\t\t}\n\t\t\n\t\t$this->_prepareNewEventsSelect($userid, false, false);\n\n\t\t$tempNewlyAdded = $this->isirdb->get('users_watches')->result_array();\n\n\t\t// then get changes since the last emailing for subjects added before last emailing\n\t\t$this->isirdb->where('spis_data.publishdate > \"'. $lastemail .'\"', '', false);\n\n\t\tif ($ignoreminordocuments == true) {\n\t\t\t$this->isirdb->where('spis_data.is_document_minor', false);\n\t\t}\n\n\t\t$this->isirdb->order_by('spis_data.publishdate');\n\t\t$this->_prepareNewEventsSelect($userid, false, true);\n\n\t\t$temp = $this->isirdb->get('users_watches')->result_array();\n\t\t\n\t\treturn $this->_mergeEvents($tempNewlyAdded, $temp);\n\t}","title":""},{"docid":"2bca3b0a6cd8c616fe90d5e82b352737","score":"0.5682046","text":"public function groupNotChangedMails()\n {\n $conditions = array('GroupChangeRequest.request_type'=>'cr','GroupChangeRequest.is_moved'=>0);\n $pendingRequests = $this->GroupChangeRequest->find('all',array('conditions'=>$conditions));\n $cuttentTimeStamp = strtotime(date('Y-m-d'));\n if(!empty($pendingRequests)) {\n $count = 0;\n foreach($pendingRequests as $row){\n $timeDiff = round(abs($cuttentTimeStamp - strtotime($row['GroupChangeRequest']['created'])) / (60*60),0);\n if($timeDiff < 48) {\n //Send Mails\n $count++;\n $emailLib = new Email();\n $to = $userInfo['BusinessOwner']['email'];\n //$to = 'rohan.julka@a3logics.in';\n $subject = 'FoxHopr: Group change request status';\n $template ='group_change_pending';\n $variable = array('name'=>$row['BusinessOwner']['fname'] . \" \" . $row['BusinessOwner']['lname']);\n $success = $emailLib->sendEmail($to,$subject,$variable,$template,'both');\n }\n }\n }\n }","title":""},{"docid":"bf2678bcc3c780d07d0980a61ef8d20d","score":"0.56779945","text":"function get_notifications($profile_id=0){\n\tglobal $mysqli;\n\n\t\t$query=\"SELECT * FROM event_invitees WHERE profile_id=\".$profile_id;\n\t\t$notifications=array();\n\t\t$result=$mysqli->query($query);\n\t\twhile($row=$result->fetch_assoc())\n\t\t{\n\t\t\t\n\t\t\t$response['notification_type']='event';\n\t\t\t$response['notification_status']=$row['accepted'];\n\t\t\t$response['notification_id']=$row['invitation_id'];\n\t\t\t$response['notification_datetime']=$row['created'];\n\n\t\t\t$sql_notifier=\"SELECT * FROM events WHERE event_id=\".$row['event_id'];\n\t\t\t$res_notifier=$mysqli->query($sql_notifier);\n\t\t\t$row_notifier=$res_notifier->fetch_assoc();\n\t\t\t$response['notification_by']=$row_notifier['event_createdby'];\n\t\t\t$sql_getprofile=\"SELECT * FROM profiles WHERE profile_id=\".$response['notification_by'];\n\t\t\t$res_getprofile=$mysqli->query($sql_getprofile);\n\t\t\t$row_getprofile=$res_getprofile->fetch_assoc();\n\t\t\t$response['notifier_profile_name']=$row_getprofile['profile_name'];\n\t\t\t$response['notifier_thumbnail']=$row_getprofile['profile_thumbnail'];\n\t\t\t$response['notification_title']=$row_notifier['event_title'];\n\t\t\t$response['event_details']=$row_notifier;\n\t\t\tarray_push($notifications, $response);\n\t\t\t//echo $row['event_id'];\n\t\t}\n\t\t$query2=\"SELECT * FROM friends2 WHERE profile2_id=\".$profile_id;\n\t\t$result2=$mysqli->query($query2);\n\t\twhile($row2=$result2->fetch_assoc())\n\t\t{\n\t\t\t$response2['notification_type']='friend';\n\t\t\t$response2['notification_status']=$row2['status'];\n\t\t\t$response2['notification_by']=$row2['profile1_id'];\n\t\t\t$sql_getprofile2=\"SELECT * FROM profiles WHERE profile_id=\".$response2['notification_by'];\n\t\t\t$res_getprofile2=$mysqli->query($sql_getprofile2);\n\t\t\t$row_getprofile2=$res_getprofile2->fetch_assoc();\n\t\t\t$response2['notifier_profile_name']=$row_getprofile2['profile_name'];\n\t\t\t$response2['notifier_thumbnail']=$row_getprofile2['profile_thumbnail'];\n\t\t\t$response2['notification_title']='New Friend Request';\n\t\t\tarray_push($notifications, $response2);\n\t\t\t//echo $row['event_id'];\n\t\t}\n\n\t\theader('Content-Type: application/json');\n\t\techo json_encode($notifications, JSON_UNESCAPED_SLASHES);\n}","title":""},{"docid":"c68b95d929704e93d49ff23ba22f0725","score":"0.5667366","text":"public function updateStatusOnNewDay() {\n // Update advs\n UIAdv::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update advgroups\n UIAdvGroup::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update campaign\n UICampaign::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update project\n UIProject::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n }","title":""},{"docid":"24d3f33105c97839dca890e5570f05d8","score":"0.56469476","text":"public function on_all_status_transitions( $new_status, $old_status, $post ){\n\t\tif ( $new_status != $old_status ) {\n\t\t\tif( $new_status == 'pending' ) {\n\t\t\t\t$result = $this->post_to_discord( 'Pending: ' . $post->post_title . ' -- ' . get_edit_post_link( $post->ID, '&' ) );\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"d9aa387b250629e1a710c0cb84f97006","score":"0.5639933","text":"public function getUpdated();","title":""},{"docid":"d9aa387b250629e1a710c0cb84f97006","score":"0.5639933","text":"public function getUpdated();","title":""},{"docid":"5ef1aa26dc862481597d277f53c99bcd","score":"0.5633387","text":"public function listEvents()\n\t{\n\n\t\t$table=CaseItemModel::getInstance()->getTable();\n $pTable=ProcessModel::getInstance()->getTable();\n $piTable=ProcessItemModel::getInstance()->getTable();\n \n\t\t$status =\"status not in ('Complete','Terminated') \";\n \n\t\t$sql=\"select 'Case Item' as source,id,null as processName, processNodeId,caseId,type,subType,label,timer,timerDue,message,signalName \"\n . \" from $table \"\n . \" where $status\"\n .\" and subType in('timer','message','signal')\";\n\t\t$arr1= $this->db->select($sql);\n\n\t\t$sql=\"select 'Process Item' as source ,p.processName as processName, pi.id as id,pi.processNodeId,null as caseId,pi.type,subType,label,timer,timerDue,message,signalName \"\n . \" from $piTable pi\n join $pTable p on p.processId=pi.processId\n where subType in('timer','message','signal')\";\n \n \n\t\t$arr2= $this->db->select($sql);\n\t\t$results= array_merge($arr1,$arr2);\n\n\t\treturn $results;\n\t}","title":""},{"docid":"2fbfdd0eeeb2a8410e4c261eaa0eedf9","score":"0.5630141","text":"function getCurrentEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE starttime < CURRENT_DATE && event_complete != 1 ORDER BY starttime\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }","title":""},{"docid":"ab15c2ec47515a1cd6858117dc0f510f","score":"0.56260914","text":"function printNewRequests() {\r\n $criteria = array('status' => Appeal::$STATUS_NEW);\r\n return printAppealList($criteria);\r\n}","title":""},{"docid":"41aa412f7c452c818a39d7eeae992b96","score":"0.5620924","text":"function getLastCheckinList($minutes, $eventId)\r\n{\r\n $response = array('ok' => false, 'msg' => \"Undefined error\");\r\n \r\n $sqlCon = openDatabase();\r\n \r\n $query = \"SELECT eventcheckin.checkin_time, eventcheckin.checked_in, \" .\r\n \"attendees.user_id, attendees.firstname, attendees.lastname, attendees.email \" .\r\n \"FROM \".DB_SCHEMA.\".eventcheckin \" .\r\n \"JOIN \".DB_SCHEMA.\".attendees ON \" .\r\n \"eventcheckin.attendee_id = attendees.user_id \" .\r\n \"WHERE eventcheckin.event_id=\" . SQLE($eventId) . \r\n \" AND eventcheckin.checkin_time > date_sub( now( ) , INTERVAL \" . SQLE($minutes) . \" MINUTE ) \" .\r\n \" ORDER BY eventcheckin.checkin_time DESC;\";\r\n\r\n $list = array();\r\n $result = mysql_query($query);\r\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\r\n $list[] = $row;\r\n }\r\n $response = array('ok' => true, 'msg' => \"OK\", 'list' => $list);\r\n \r\n closeDatabase();\r\n \r\n return $response;\r\n}","title":""},{"docid":"612a4a7b3aea426495ae5ef1522b99d7","score":"0.5596961","text":"public function getNotificationsCollection()\n {\n return Mage::getModel('kdcatalogupdates/log')->getCollection();\n }","title":""},{"docid":"e52181cf399874494a35ee000128ac1e","score":"0.5595261","text":"function get_events_notification($start, $event_limit, $cond=array(), $count=false)\r\n\t{\r\n\t\t$c_filter = '';\r\n\t\tif (is_domain_user() == true) {\r\n\t\t\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\r\n\t\t}\r\n\t\tif (valid_array($cond)) {\r\n\t\t\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\r\n\t\t}\r\n\t\tif(!$count) {\r\n\t\t\t$query = 'select TL.*, TLE.event_title, TLE.event_icon \r\n\t\t\t\t\tfrom timeline TL \r\n\t\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\t\tJOIN timeline_event_user_map TEU ON TEU.timeline_fk=TL.origin\r\n\t\t\t\t\tJOIN user U on U.user_id=TEU.user_id and TEU.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\t\twhere TL.event_origin=TLE.origin '.$c_filter.' order by TL.origin desc limit '.$start.','.$event_limit;\r\n\t\t\treturn $this->CI->db->query($query)->result_array();\r\n\t\t} else {\r\n\t\t\t$query = 'select count(*) as total \r\n\t\t\t\tfrom timeline TL\r\n\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\tJOIN timeline_event_user_map TEU ON TEU.timeline_fk=TL.origin\r\n\t\t\t\tJOIN user U on U.user_id=TEU.user_id and TEU.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\twhere TL.event_origin=TLE.origin '. $c_filter.' group by TL.origin';\r\n\t\t\t\treturn $this->CI->db->query($query)->row();\r\n\t\t}\r\n\t}","title":""},{"docid":"fc71acba9269fa38610d60ba0bf46df2","score":"0.5593158","text":"function getEvents() {\n\n $events = ['new' => __('New change'),\n 'update' => __('Update of a change'),\n 'solved' => __('Change solved'),\n 'validation' => __('Validation request'),\n 'validation_answer' => __('Validation request answer'),\n 'closed' => __('Closure of a change'),\n 'delete' => __('Deleting a change')];\n\n $events = array_merge($events, parent::getEvents());\n asort($events);\n return $events;\n }","title":""},{"docid":"313015d0c4b8869a8d54ba75e14b0666","score":"0.5561922","text":"public function get_account_changes($userid, $lastemail) {\n// // - modified after last emailing\n// // - not older than addition of a subject\n// $this->db->where('users_watches_accounts.modified_on > ', $lastemail);\n// \n// $date_add_where = '(users_watches_accounts.date_end > users_watches.date_add '\n// . 'OR users_watches_accounts.date_start > users_watches.date_add)';\n// $this->db->where($date_add_where, '', false);\n\t\t\n\t\t// replace until line $this->db->where('users_watches.user_id', $userid); - ten uz nie\n\t\t$date_where = '(users_watches_accounts.date_end > \"'. $lastemail . '\" '\n\t\t\t. 'OR users_watches_accounts.date_start > \"'. $lastemail . '\")';\n\t\t\n\t\t$this->isirdb->where($date_where, '', false);\n\t\t\n\t\t$this->isirdb->where('users_watches.user_id', $userid);\n\t\t$this->isirdb->join('users_watches', 'users_watches.id = users_watches_accounts.user_watch_id');\n\t\t$this->isirdb->select('\n\t\t\tusers_watches_accounts.account AS account,\n\t\t\tusers_watches_accounts.date_start AS date_start,\n\t\t\tusers_watches_accounts.date_end AS date_end,\n\t\t\tusers_watches.official_name AS official_name,\n\t\t\tusers_watches.name AS name,\n\t\t\tusers_watches.ic AS ic,\n\t\t\tusers_watches.rc AS rc,\n\t\t\tusers_watches.id AS id');\n\t\t\n\t\t$result = $this->isirdb->get('users_watches_accounts')->result_array();\n\t\t\n\t\treturn $result;\n\t}","title":""},{"docid":"b903b307c0bca72c84caf971812e7b02","score":"0.5518713","text":"public function getActiveStatusChanges($date)\n\t{\n\t\t$args = array();\n\t\t$disb_query = $this->application_query_builder->getFailedRedisbursementsQuery(\n\t\t\t$date,\n\t\t\t$this->config->getCompany(),\n\t\t\t$args\n\t\t);\n\n\t\t$disb_rs = DB_Util_1::queryPrepared($this->config->getConnection(), $disb_query, $args);\n\t\t$disb_apps = $this->data_builder->getApplicationData($disb_rs);\n\t\t\n\t\t$args = array();\n\t\t$inactive_query = $this->application_query_builder->getStatusChangesFromInactiveQuery(\n\t\t\t$date,\n\t\t\t$this->config->getCompany(),\n\t\t\t$args\n\t\t);\n\t\t$inactive_rs = DB_Util_1::queryPrepared($this->config->getConnection(), $inactive_query, $args);\n\t\t$inactive_apps = $this->data_builder->getApplicationData($inactive_rs);\n\n\t\treturn array_merge(\n\t\t\t$disb_apps,\n\t\t\t$inactive_apps\n\t\t);\n\t}","title":""},{"docid":"ee8c04cab113472f2050ef87030c2af7","score":"0.55175453","text":"function getUpcomingEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE starttime > CURRENT_DATE && archive != 1 ORDER BY starttime\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }","title":""},{"docid":"cf15ee9e5537c792a5ca4641c950cf69","score":"0.5515022","text":"public function getEvents();","title":""},{"docid":"cf15ee9e5537c792a5ca4641c950cf69","score":"0.5515022","text":"public function getEvents();","title":""},{"docid":"5a202967cc7cb2122c88f5f8509f9a6e","score":"0.55111283","text":"public function getChanges(array $context, $new)\n {\n $select = clone $this->_select;\n\n foreach ($this->_filter as $fieldName => $contextName) {\n if ($contextName instanceof \\Zend_Db_Expr) {\n $select->where($fieldName . ' = ?', $contextName);\n } elseif (null === $context[$contextName]) {\n $select->where($fieldName . ' IS NULL');\n } else {\n $select->where($fieldName . ' = ?', $context[$contextName]);\n }\n }\n\n $options = $this->db->fetchPairs($select);\n\n // \\MUtil_Echo::track($this->getEffecteds());\n $results = array();\n foreach ($this->getEffecteds() as $name => $settings) {\n foreach ($settings as $setting) {\n $results[$name][$setting] = $options;\n }\n }\n\n return $results;\n }","title":""},{"docid":"21bccd649c1152a832b568b6797531b4","score":"0.5508003","text":"public function getUserEvents() {\n $user = Auth::user();\n $userEvents = $user->events()->get();\n $userEvents = $userEvents->concat(Event::where('leader_id', $user->id)->get());\n return Response(EventResource::collection($userEvents), 200);\n }","title":""},{"docid":"9e3c0700bd36c46f903491334a29d63d","score":"0.5486314","text":"public function getRecurrentEvents(array $filters = array());","title":""},{"docid":"796ac54f68af127da383ae567a7dbbb6","score":"0.5482742","text":"public function onRefreshEvents()\n {\n $startTime = post('startTime');\n $endTime = post('endTime');\n $timeZone = post('timeZone');\n\n $data = [\n 'startTime' => $startTime,\n 'endTime' => $endTime,\n 'timeZone' => $timeZone\n ];\n\n if ($this->isFilteredByDateRange()){\n $startTime = 0;\n $endTime = 0;\n }\n\n return Response::json($this->getRecords($startTime, $endTime));\n }","title":""},{"docid":"438649867cf1511e495ef48ea945b03c","score":"0.54772687","text":"public function getFbChanges($oid){\n return $this->slc(\"changed\", \"feedback\", array(\"order_id\" => $oid));\n }","title":""},{"docid":"3008f2509ec8d292f51b02d28df500f8","score":"0.5463365","text":"public function getEvents()\n {\n\n $cached = $this->getFromCache('events_cache');\n if ($cached !== null) {\n return $cached;\n }\n\n // Fetch past and future events (only upcoming contains the current event)\n $events = $this->client->getEvents(\n array(\n 'group_urlname' => $this->group,\n 'status' => 'past,upcoming',\n 'desc' => 'desc'\n )\n );\n\n // Filter out events further in the future than a day\n $dayFromNow = (time() + (24 * 60 * 60)) * 1000;\n $events = $events->filter(function($value) use ($dayFromNow) {\n return ($value['time'] < $dayFromNow)? true : false;\n });\n\n $this->saveInCache('events_cache', $events);\n\n return $events;\n }","title":""},{"docid":"de7138a75123dbfe668dac52fbfe1dd2","score":"0.54506916","text":"public function get_event_status()\n {\n return array(0 => 'undefined'//, 1 => 'due for approval'\n ,2 => 'confirmed', 3 => 'cancelled'//, 4 => 'delegated'\n ,10 => 'tentative', 11 => 'needs-action'\n );\n }","title":""},{"docid":"892ca89d0fc9e7f5452442e1b38e9891","score":"0.5447151","text":"public function getUpcomingEvents()\n {\n $now = date('Y-m-d');\n $joinTable = Versioned::get_stage() === Versioned::LIVE ? 'EventPage_Live' : 'EventPage';\n $events = EventDateTime::get()\n ->filter(['Event.ParentID' => $this->ID,])\n ->where(\"(\\\"StartDate\\\" >= '$now') OR (\\\"StartDate\\\" <= '$now' AND \\\"EndDate\\\" >= '$now')\")\n ->innerJoin($joinTable, \"\\\"$joinTable\\\".\\\"ID\\\" = \\\"EventDateTime\\\".\\\"EventID\\\"\");\n\n $this->extend('updateEvents', $events);\n\n return $events;\n }","title":""},{"docid":"e8b2fe13bf41d90cbde5f9c815649050","score":"0.54412955","text":"function get_new_events( $options=array() ){\n\t\t\n\t\tglobal $gamo, $dbh;\n\t\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\t\t\n\t\tCore::ensure_defaults(array(\n\t\t\t\t'start' => 0,\n\t\t\t\t'number' => 1\n\t\t\t),\n\t\t$options);\n\t\t\n\t\t$sql = \"SELECT id FROM \" . CORE_DB . \".\" . self::$table_name.\n\t\t\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC LIMIT \".$options['start'].\",\".$options['number'];\n\n\t\t$sth = $dbh->prepare($sql);\n\n\t\t$vevents = array();\n\t\t$sth->execute();\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\t$row = Core::r('virtual_events')->get_event(array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'public_has' => 1,\n\t\t\t\t\t'show_private_has' => 0\n\t\t\t\t)\n\t\t\t);\n\n\t\t\tarray_push($vevents, $row);\n\n\t\t}\n\n\t\treturn $vevents;\n\t\t\n\t}","title":""},{"docid":"61bf4b4c2fe5ed28e1987a093913952d","score":"0.5439631","text":"public function getAllByTask($task_id){\n $changes = $this->find('all', array(\n 'conditions'=>array(\n 'Change.task_id'=>$task_id),\n 'order'=>array(\n 'Change.created DESC')));\n return $changes; \n }","title":""},{"docid":"7bc8ff9d762f37ae882c4aae9607c821","score":"0.5432469","text":"public function listEvent($userId){\n\t\t$this->db->select('name, id, CAST(status AS UNSIGNED) AS status');\n\t\t$this->db->from('event');\n\t\t$this->db->where('userId',$userId);\n\t\t$this->db->order_by('creationDate', 'DESC'); \n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\n\t}","title":""},{"docid":"439ccfcae477f8a5b0c4cece2ab96bd0","score":"0.54290295","text":"function getAllRouteEventNotifications($user_id){\n\t\t\t\t\n\t\t$sql =\t\"select e.user_id,e.event_id,u.user_name as UserName,\n\t\t\t\t\tu.image as UserImage,e.event_name,e.event_type,e.description,\n\t\t\t\t\tef.status from `events` as e ,event_friends as ef\n\t\t\t\t\t\n\t\t\t\t\tleft join users as u on u.user_id = ef.user_id\n\t\t\t\t\twhere e.event_id = ef.event_id\n\t\t\t\t\t\n\t\t\t\t\tand ef.friend_id = '\".$user_id.\"' \n\t\t\t\t\t\n\t\t\t\t\tand (ef.status = 'start')\n\t\t\t\t\tgroup by e.event_id\n\t\t\t\t\torder by e.event_id desc limit 0,2\";\n\t\t\t\t\n\t\t\t\t\n\t\t$query = $this->db->query($sql);\t\n\t\t$data = $query->result_array();\n\t\treturn $data;\n\t\t\t\t\n\t}","title":""},{"docid":"7aa376fac52d98be913c816fbfb37113","score":"0.5425724","text":"public function getEvents(){\n\t\t// prepares the request\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://\" . IP . \"/bde_site/api/event\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\n\n\t\t// send the request\n\t\t$output = curl_exec($ch);\n\t\t$info = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\n\t\t// decode the reponse of the API\n\t\t$events = json_decode($output, true);\n\n\t\t// format the date\n\t\tforeach ($events as $key => $event) {\n\t\t\t$events[$key]['date'] = explode('T', $event['date'])[0];\n\t\t}\n\n\t\t// if the user is not connected or if he is a student, remove events which are not public\n\t\tif (!isset($_SESSION['status']) || $_SESSION['status'] == 'student'){\n\t\t\t$publicEvents = [];\n\t\t\t$eventNumber = sizeof($events);\n\t\t\tfor($i=0 ; $i < $eventNumber; $i++){\n\t\t\t\t$event = array_shift($events);\n\t\t\t\tif($event['is_public'] == 1){\n\t\t\t\t\tarray_push($publicEvents, $event);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $publicEvents;\n\t\t}\n\n\t\t// return all events\n\t\treturn $events;\n\t}","title":""},{"docid":"9c54f4b68a0f3a3885c71b8c2337ee23","score":"0.54237294","text":"public function displayHistory()\n\t\t\t{\n\t\t\t\t$data_arr = array();\n\t\t\t\t$inc = 0;\n\n\t\t\t\twhile($row = $this->fetchResultRecord())\n\t\t\t\t\t{\n\t\t\t\t\t\t$uDetails = $this->isMemberJoined($row['email']);\n\t\t\t\t\t\t$statusClass = '';\n\t\t\t\t\t\t$status = $this->LANG['invitation_history_email_status_not_joined'];\n\t\t\t\t\t\tif ($uDetails)\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t$status = $this->LANG['invitation_history_email_status_joined'];\n\t\t\t\t\t\t }\n\n\t\t\t\t\t\t$data_arr[$inc]['date_added'] = $row['date_added'];\n\t\t\t\t\t\t$data_arr[$inc]['attempts'] = $row['attempts'];\n\t\t\t\t\t\t$data_arr[$inc]['email'] = $row['email'];\n\t\t\t\t\t\t$data_arr[$inc]['class'] = ($uDetails)?'clsJoined':'clsNotJoined';;\n\t\t\t\t\t\t$data_arr[$inc]['status'] = $status;\n\t\t\t\t\t\t$data_arr[$inc]['remind_url'] = getUrl('invitationhistory', '?action=remind&id='.$row['invitation_id'].'&start='.$this->fields_arr['start'], '?action=remind&id='.$row['invitation_id'].'&start='.$this->fields_arr['start']);\n\t\t\t\t\t\t$data_arr[$inc]['delete_url'] = getUrl('invitationhistory', '?action=delete&id='.$row['invitation_id'].'&start'.$this->fields_arr['start'], '?action=delete&id='.$row['invitation_id'].'&start'.$this->fields_arr['start']);\n\t\t\t\t\t\t$data_arr[$inc]['check_box_value'] = $row['invitation_id'];\n\t\t\t\t\t\t$inc++;\n\t\t\t\t\t}\n\t\t\t\treturn $data_arr;\n\t\t\t}","title":""},{"docid":"e5f03062cc7ffa7cb82017fd70521cc0","score":"0.5423034","text":"function disable_active_event_notification($cond=array())\r\n\t{\r\n\t\t$c_filter = '';\r\n\t\tif (is_domain_user() == true) {\r\n\t\t\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\r\n\t\t}\r\n\t\tif (valid_array($cond)) {\r\n\t\t\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\r\n\t\t}\r\n\t\t$temp_query = '\tupdate user u1\r\n\t\t\t\t\tinner join user u2\r\n\t\t\t\t\ton u2.user_id = u1.user_id\r\n\t\t\t\t\tset u1.user_name = u2.email';\r\n\t\t\r\n\t\t$query = 'update timeline_event_user_map TEU1\r\n\t\t\t\tinner join timeline_event_user_map TEU2 on TEU2.origin = TEU1.origin\r\n\t\t\t\tJOIN timeline TL\r\n\t\t\t\tJOIN timeline_master_event TLE\r\n\t\t\t\tJOIN timeline_event_user_map TEU3 ON TEU3.timeline_fk=TL.origin\r\n\t\t\t\tJOIN user U on U.user_id=TEU3.user_id and TEU3.user_id='.intval($this->CI->entity_user_id).'\r\n\t\t\t\tset TEU1.viewed_datetime=\"'.db_current_datetime().'\"\r\n\t\t\t\twhere TEU3.viewed_datetime IS NULL AND TEU2.origin=TEU3.origin AND TL.event_origin=TLE.origin '.$c_filter.' ';\r\n\t\treturn $this->CI->db->query($query);\r\n\t}","title":""},{"docid":"2f45b98d7101f4bf88dea2695ba84fc5","score":"0.5419468","text":"public function getAll(){\n //old : \n // $events = $this->events;\n // return $events;\n $repo = $this->om->getRepository(Event::class); \n return $repo->findAll();\n }","title":""},{"docid":"ff30e564d96a76e7d663524424e010ce","score":"0.5400968","text":"public function fetchEvents()\n {\n // TODO: Implement fetchEvents() method.\n }","title":""},{"docid":"5d78d2ee42f5fa9edbb4bdccc3b75203","score":"0.54002","text":"private function getOldTicketsList() {\r\n\t\t$sql = \"SELECT TOP 5 summary, TicketNbr, status_description AS status, \";\r\n\t\t$sql .= \"company_name, age, resource_list as resources \";\r\n\t\t$sql .= \"FROM v_rpt_Service \";\r\n\t\t$sql .= \"WHERE status_description NOT LIKE '>%' \";\r\n\t\t$sql .= \"AND status_description NOT LIKE 'Completed' \";\r\n\t\t$sql .= \"ORDER BY age desc\";\r\n\t\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\r\n\r\n\t\t$r = null;\r\n\t\t$i = 0;\r\n\t\twhile($row = sqlsrv_fetch_array($result)) {\r\n\t\t\t$r[$i]['summary'] = $row['summary'];\r\n\t\t\t$r[$i]['status'] = $row['status'];\r\n\t\t\t$r[$i]['ticket'] = $row['TicketNbr'];\r\n\t\t\t$r[$i]['client'] = $row['company_name'];\r\n\t\t\t$r[$i]['age'] = $row['age'];\r\n\t\t\t$r[$i]['resources'] = $row['resources'];\r\n\t\t\t$i++;\r\n\t\t}\r\n\r\n\t\treturn($r);\r\n\t}","title":""},{"docid":"8d28c8676a77217b6b591e27e5dcc0d2","score":"0.53971356","text":"function getAdminEvents(){\r\n $response = array('ok' => false, 'msg' => \"Undefined error\");\r\n \r\n openDatabase();\r\n $adminId = getLoggedInAdminId();\r\n \r\n // Make sure we can retrieve user session's admin id\r\n if (!$adminId) {\r\n $response['ok'] = false;\r\n $response['msg'] = \"Failed to retrieve logged in user id\";\r\n }\r\n else {\r\n $query = sprintf(\"SELECT * from events WHERE admin_id=%s ORDER BY event_id ASC;\", $adminId);\r\n $result = mysql_query($query);\r\n\r\n $eventsArray = array();\r\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\r\n $eventsArray[] = $row;\r\n }\r\n \r\n $response['eventsArray'] = $eventsArray; \r\n $response['ok'] = true;\r\n $response['msg'] = \"OK\";\r\n }\r\n closeDatabase();\r\n \r\n return $response;\r\n}","title":""},{"docid":"2acd68079bb9219066cf67315c0ce2be","score":"0.5378306","text":"public function event_history(/* ... */)\n {\n return $this->_event_history;\n }","title":""},{"docid":"2e032258ce17587fb4a3b87d622fdd9d","score":"0.53782415","text":"public function getEventList() {\n $response = $this->client->get(\n $this->apiUrl . \"events\");\n return $response->json();\n }","title":""},{"docid":"f1f0344503041e639c2a336ed3e6828c","score":"0.537361","text":"public function getChanges(array $context, $new)\n {\n $empty = $this->util->getTranslated()->getEmptyDropdownArray();\n $inputFieldName = reset($this->_dependentOn);\n $organizationId = $context[$inputFieldName];\n\n \\MUtil_Echo::track($organizationId);\n\n if ($organizationId) {\n $tracks = $this->loader->getUtil()->getTrackData()->getTracksForOrgs([$organizationId => $organizationId]);\n foreach($this->_effecteds as $effectedField=>$effectedData) {\n foreach($effectedData as $type) {\n $output[$effectedField][$type] = $empty + $tracks;\n }\n }\n return $output;\n }\n }","title":""},{"docid":"7562cb62866d8f4d61a9c2f679b46979","score":"0.53729236","text":"public function get_all_events()\n {\n // get today date for check past events or not\n $todayData = date(\"m/d/Y\");\n // get option from database\n $past_events_option = get_option('past_events');\n // preparing sql query\n $sql = \"SELECT * FROM $this->tableName \";\n if ($past_events_option != 'yes') {\n $sql .= \"WHERE `date` >= \" . $todayData;\n }\n global $wpdb;\n $allevents = $wpdb->get_results($sql);\n return $allevents;\n }","title":""},{"docid":"f6d19e091b07b4e3e94f4029b07fbe6b","score":"0.536159","text":"public function changestatusAction()\n {\n $user_params=$this->_request->getParams();\n $automail=new Ep_Message_AutoEmails();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n\n if($user_params['status'] == 'closed')\n $data = array(\"status\"=>$user_params['status'], \"cancelled_at\"=>date('Y-m-d H:i:s'));////////updating\n elseif($user_params['status'] == 'done')\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>date('Y-m-d H:i:s'));////////updating\n else\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>NULL, \"cancelled_at\"=>NULL);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $requestdetails = $ftvrequest_obj->requestDetailsById($user_params['requestId']);\n $contactId = $requestdetails[0]['request_by'];\n $contactdetails = $ftvcontacts_obj->getFtvContactDetails($contactId);\n $contactName = $contactdetails[0]['first_name'].\" \".$contactdetails[0]['last_name'];\n $parameters['ftvobject'] = $requestdetails[0]['request_object'];\n $parameters['ftvcontactName'] = $contactName;\n $ftvrequest_obj->updateFtvRequests($data,$query);\n ////making the time resume if its in pause////\n $inpause = $ftvpausetime_obj->inPause($user_params['requestId']);\n if($inpause == 'yes')\n {\n $data = array(\"resume_at\"=>date('Y-m-d H:i:s'));////////updating\n $query = \"ftvrequest_id = '\".$user_params['requestId'].\"' AND resume_at IS NULL \";\n $ftvpausetime_obj->updateFtvPauseTime($data,$query);\n }\n if($user_params['status'] == 'done')\n {\n if($this->adminLogin->userId != '110823103540627' ) ///when not johny head of BO user for FTV changed\n {\n $parameters['ftvrequestlink'] = \"/ftvchaine/ftvch-requests?submenuId=ML11-SL6\";\n $parameters['ftvType'] = \"chaine\";\n $automail->messageToEPMail('110823103540627',114,$parameters);// to johny\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n else // in case jhony change the status\n {\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n }\n\n }","title":""},{"docid":"b4d1a0e5c518cd25aa3e7e611a0a0661","score":"0.53550774","text":"function getAllPendingEmailData($id){\n\t\t\t$this->db->select('ticked_id,subject,isCreated,fromEmailId',false);\n\t\t\t$this->db->from('helpdesk_ticked_records as htr');\t\t\n\t\t\t$this->db->where('htr.teamId',$id);\t\n\t\t\t$where = '(status=\"1\" or status=\"2\" or status=\"3\")';\n\t\t\t$this->db->where($where);\t\t \t\t\t \n\t\t\t$result = $this->db->get()->result_array();\t\t\t\n\t\t\treturn $result; \n\t }","title":""},{"docid":"3cec38af29dd4e75091971ec86196d5e","score":"0.53546435","text":"public function getOtherEvents();","title":""},{"docid":"2fc87d8d9a3618f440542d4884489945","score":"0.53449064","text":"function updateStatus($order, $newStatus) {\n $data = [];\n switch ($newStatus) {\n case 2: #processed\n $event = new OrderWasProcessed($order);\n $data['processed_on'] = Carbon::now();\n break;\n\n case 4: #traveling\n $event = new OrderShippedOn($order);\n $data['shipped_on'] = Carbon::now();\n $data['expected_delivery_on'] = Carbon::now()->addDay();\n break;\n\n case 5: #delivered\n $event = new OrderWasDelivered($order);\n $data['delivered_on'] = Carbon::now();\n break;\n }\n\n if (isset($event) && $event) {\n event($event);\n }\n\n return $data;\n}","title":""},{"docid":"968fa31ab19d1f2cb99299af9b30d2d0","score":"0.5343663","text":"public function getEvents()\n {\n $startDate = new \\DateTime(\"-1 months\");\n $endDate = new \\DateTime(\"+3 months\");\n\n $repo = EntityUtils::getRepository(\"EventLegacy\");\n\n //Use a different function for getting events for a student\n if ($this->user_context->isStudent()) {\n return $this->getStudentEvents($startDate, $endDate);\n }\n\n $eventResults = $repo->getStudentEventsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n $quickAddResults = $repo->getStudentQuickAddShiftsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\n\n return ['events' => $eventResults, 'quick_add_shifts' => $quickAddResults];\n }","title":""},{"docid":"9ddd301b1fdbafe2123ea8962eb93e22","score":"0.53342885","text":"public function getTimeEventsList(){\n return $this->_get(8);\n }","title":""},{"docid":"d0b163b9556042647756978620deea74","score":"0.5333301","text":"public function getChange();","title":""},{"docid":"6d04dad6bb065f74039c4721b47b1a33","score":"0.533169","text":"protected function getHistoryWith($args) {\n\n if ($args['ent_pas_email'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\n\n if (is_array($returned))\n return $returned;\n\n $pageNum = (int) $args['ent_page'];\n\n if ($args['ent_page'] == '')\n $pageNum = 1;\n\n $lowerLimit = ($this->historyPageSize * $pageNum) - $this->historyPageSize;\n $upperLimit = $this->historyPageSize * $pageNum;\n\n $selectAppntsQry = \"select a.remarks,a.appointment_dt from appointment a,slave p \";\n $selectAppntsQry .= \"where a.slave_id = p.slave_id and a.mas_id = '\" . $this->User['entityId'] . \"' and p.email = '\" . $args['ent_pas_email'] . \"' \";\n $selectAppntsQry .= \"limit $lowerLimit,$upperLimit\";\n\n $selectAppntsRes = mysql_query($selectAppntsQry, $this->db->conn);\n\n if (mysql_num_rows($selectAppntsRes) <= 0)\n return $this->_getStatusMessage(32, 12);\n\n $data = array();\n\n while ($details = mysql_fetch_assoc($selectAppntsRes)) {\n $data[] = array('apptDt' => $details['appointment_dt'], 'remarks' => $details['remarks']);\n }\n\n $errMsgArr = $this->_getStatusMessage(33, 2);\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'history' => $data);\n }","title":""},{"docid":"0dbb8e6b6393c3bd750a3bc6e72e9a0e","score":"0.5328096","text":"public function getEvents(){\n\t\t$events = Event::where('owner', Auth::user()->id)->where('deleted', 0)->get();\n\t\treturn response()->json(['data' => $events]);\n\t}","title":""},{"docid":"87806c6cfc3a5817663caff27eca043b","score":"0.53221697","text":"public function getFollowUpEvents($notification)\n {\n $couponsTable = CouponsTable::getTableName();\n $eventsTable = EventsTable::getTableName();\n $eventsPeriodsTable = EventsPeriodsTable::getTableName();\n $customerBookingsEventsPeriods = CustomerBookingsToEventsPeriodsTable::getTableName();\n $eventsProvidersTable = EventsProvidersTable::getTableName();\n $paymentsTable = PaymentsTable::getTableName();\n\n try {\n $notificationType = $notification->getType()->getValue();\n\n $statement = $this->connection->query(\n \"SELECT\n e.id AS event_id,\n e.name AS event_name,\n e.status AS event_status,\n e.bookingOpens AS event_bookingOpens,\n e.bookingCloses AS event_bookingCloses,\n e.recurringCycle AS event_recurringCycle,\n e.recurringOrder AS event_recurringOrder,\n e.recurringUntil AS event_recurringUntil,\n e.maxCapacity AS event_maxCapacity,\n e.price AS event_price,\n e.description AS event_description,\n e.color AS event_color,\n e.show AS event_show,\n e.locationId AS event_locationId,\n e.customLocation AS event_customLocation,\n e.parentId AS event_parentId,\n e.created AS event_created,\n e.notifyParticipants AS event_notifyParticipants,\n e.deposit AS event_deposit,\n e.depositPayment AS event_depositPayment,\n e.depositPerPerson AS event_depositPerPerson,\n \n \n ep.id AS event_periodId,\n ep.periodStart AS event_periodStart,\n ep.periodEnd AS event_periodEnd,\n \n cb.id AS booking_id,\n cb.customerId AS booking_customerId,\n cb.status AS booking_status,\n cb.price AS booking_price,\n cb.info AS booking_info,\n cb.utcOffset AS booking_utcOffset,\n cb.aggregatedPrice AS booking_aggregatedPrice,\n cb.persons AS booking_persons,\n \n p.id AS payment_id,\n p.amount AS payment_amount,\n p.dateTime AS payment_dateTime,\n p.status AS payment_status,\n p.gateway AS payment_gateway,\n p.gatewayTitle AS payment_gatewayTitle,\n p.data AS payment_data,\n \n c.id AS coupon_id,\n c.code AS coupon_code,\n c.discount AS coupon_discount,\n c.deduction AS coupon_deduction,\n c.limit AS coupon_limit,\n c.customerLimit AS coupon_customerLimit,\n c.status AS coupon_status\n FROM {$eventsTable} e\n INNER JOIN {$eventsPeriodsTable} ep ON ep.eventId = e.id\n INNER JOIN {$customerBookingsEventsPeriods} cbe ON cbe.eventPeriodId = ep.id\n INNER JOIN {$this->bookingsTable} cb ON cb.id = cbe.customerBookingId\n LEFT JOIN {$paymentsTable} p ON p.customerBookingId = cb.id\n LEFT JOIN {$couponsTable} c ON c.id = cb.couponId\n LEFT JOIN {$eventsProvidersTable} epr ON epr.eventId = e.id\n LEFT JOIN {$this->usersTable} pu ON pu.id = epr.userId\n WHERE e.notifyParticipants = 1 \n AND cb.status = 'approved' \n AND e.id NOT IN (\n SELECT nl.eventId \n FROM {$this->table} nl \n INNER JOIN {$this->notificationsTable} n ON nl.notificationId = n.id \n WHERE n.name = 'customer_event_follow_up' \n AND n.type = '{$notificationType}'\n )\"\n );\n\n $rows = $statement->fetchAll();\n } catch (\\Exception $e) {\n throw new QueryExecutionException('Unable to find events in ' . __CLASS__, $e->getCode(), $e);\n }\n\n return EventFactory::createCollection($rows);\n }","title":""},{"docid":"5496d1bfcfeb0b05f677debdf90ee92c","score":"0.53145677","text":"public function readNewMembers(){\r\n $results = array();\r\n\r\n if ( null !== $this->getDB() ) {\r\n $dbs = $this->getDB()->prepare('select * from Members, MemberStatus where members.MemberID = memberstatus.MemberID and StatusCode = \"A\" and DateNew = CURDATE()');\r\n\r\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\r\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n } \r\n return $results;\r\n }","title":""},{"docid":"b9e1d4125921728018d4a497e28c4f96","score":"0.53049886","text":"function hookAjaxGetEvents() {\n\n\t \t$start = intval($_POST['start']);\n\t \t$end = intval($_POST['end']);\n\n\t \t$args['datefrom'] = $start;\n\t \t$args['dateto'] = $end;\n\t \t$args['datemode'] = FSE_DATE_MODE_ALL;\n\t \t$args['number'] = 0; // Do not limit!\n\n\t \tif (isset($_POST['state']))\n\t \t$args['state'] = $_POST['state'];\n\t \tif (isset($_POST['author']))\n\t \t$args['author'] = $_POST['author'];\n\t \tif (isset($_POST['categories']))\n\t \t$args['categories'] = $_POST['categories'];\n\t \tif (isset($_POST['include']))\n\t \t$args['include'] = $_POST['include'];\n\t \tif (isset($_POST['exclude']))\n\t \t$args['exclude'] = $_POST['exclude'];\n\t \t$events = $this->getEventsExternal($args);\n\n\t \t// Process array of events\n\t \t$events_out = array();\n\t \tforeach($events as $evt) {\n\t \t\tunset($e);\n\t \t\t$e['id'] = $evt->eventid;\n\t \t\t$e['post_id'] = $evt->postid;\n\t \t\t$e['post_url'] = (empty($evt->postid) ? '' : get_permalink($evt->postid));\n\t \t\t$e['title'] = $evt->subject;\n\t \t\t$e['allDay'] = ($evt->allday == true ? true : false);\n\t \t\t$e['start'] = mysql2date('c', $evt->from);\n\t \t\t$e['end'] = mysql2date('c', $evt->to);\n\t \t\t$e['editable'] = false;\n\n\t \t\t$classes = array();\n\t \t\tforeach($evt->categories as $c) {\n\t \t\t\t$classes[] = 'category-'.$c;\n\t \t\t}\n\t \t\tif (count($classes) > 0) {\n\t \t\t\t$e['className'] = $classes;\n\t \t\t}\n\t \t\t\n\t \t\t$events_out[] = $e;\n\t \t}\n\n\t \t$response = json_encode($events_out);\n\n\t \theader(\"Content-Type: application/json\");\n\t \techo $response;\n\n\t \texit;\n\t }","title":""},{"docid":"57a9e2ddb7158771c2bc2f1cdf610b5b","score":"0.5302713","text":"private function emailChanges(){\n $emails = $this->getAdminEmails(get_option('notification_users'));\n $custom_email = get_option('notification_email');\n\n if(isset($custom_email['email_add']) && !empty($custom_email['email_add']))\n $emails[] = $custom_email['email_add'];\n\n if(!$emails){\n $emails = get_bloginfo('admin_email');\n }\n\n $message = \" Changed Files(\".count($this->md5_changed_output).\"):\\n\";\n $changes = $this->order_changed_log();\n $files = 0;\n foreach($changes as $ext => $log_type){\n $message .= \"\\nFile Type (\".$ext.\"): \\n\";\n foreach($log_type as $k => $v){\n $files++;\n $message .= $v['real_path'].' => '.$v['modified']. \"\\n\";\n }\n }\n\n wp_mail( $emails, 'WP-Checksum File Modifications: '.$files, $message, '', array(MD5_HASHER_DIR.$this->file_change));\n }","title":""},{"docid":"70f99c272aec4f7c3e9aea559ed9cf13","score":"0.5301871","text":"public function AddEditStatusCode(){\n\t\ttry{\n\t\t\tif(isset($this->getData['emailstatus'])){\n\t\t\t\t\tif($this->getData['emailstatus'] == '0' && isset($this->getData['new_notification_name']) && $this->getData['new_notification_name'] != ''){\n\t\t\t\t\t\t$inserted = $this->_db->insert(MAIL_NOTIFY_TYPES,array('notification_name' => $this->getData['new_notification_name'],'notification_staus' => $this->getData['notification_sta'],'admin_display'=>'1','templatecategory_id'=>3));\n\t\t\t\t\t\t$this->getData['notification_id'] = ($inserted)?$this->_db->lastInsertId():'0';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tunset($this->getData['notification_id']);\n\t\t\t\t}\n\t\t\tif(isset($this->getData['mode']) && $this->getData['mode'] == 'add'){\n\t\t\t\treturn ($this->insertInToTable(STATUS_MASTER,array($this->getData))) ? TRUE : FALSE;\n\t\t\t}else{\n\t\t\t\t$where = 'master_id ='.Zend_Encript_Encription:: decode($this->getData['token']);\n\t\t\t\t$this->getData['modify_by'] = $this->Useconfig['user_id'];\n\t\t\t\t$this->getData['modify_ip'] = commonfunction::loggedinIP();\n\t\t\t\t$this->getData['modify_date'] = '';\n\t\t\t\treturn ($this->UpdateInToTable(STATUS_MASTER,array($this->getData),$where)) ? TRUE : FALSE;\n\t\t\t}\n\t\t}catch (Exception $e) {\n\t\t\t\t $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\t\t}\n }","title":""},{"docid":"7c5fbb9219c27190ef3c6e08cac453dc","score":"0.52981585","text":"public function taskhistory(){\n\n // SQL statement\n $sql = \"SELECT user_id FROM user WHERE user_name = '\".$_SESSION['user'].\"'\";\n $result = $this->con->query($sql);\n $result = $result->fetch_assoc();\n $id = $result['user_id'];\n\n\n // Get Task History Based on user ID\n\n // SQL statement\n $sql = \"SELECT * FROM approval WHERE user_id = '\".$id.\"' ORDER BY date DESC LIMIT 10\";\n $result = $this->con->query($sql);\n if ($result->num_rows > 0){\n while ($row = $result->fetch_assoc()){\n $array[] = $row;\n }\n return $array;\n }\n }","title":""},{"docid":"30bb550c3c18511ded63a7b771afa708","score":"0.5285222","text":"public function getEvents()\n {\n return json_decode((string) $this->response->getBody())->events;\n }","title":""},{"docid":"e6e44e4e531f04f10ece0a4f31e662dc","score":"0.5283579","text":"public function sendStatusUpdateNotifications(OrderEvent $event)\n {\n $order = $event->getOrder();\n switch ($order->getStatus()) {\n\n case Order::STATUS_AWAITING_SEPA:\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_AWAITING_SEPA,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_NEW:\n // get payment\n $payment = $order->getPayments()->first();\n\n // is transport\n $isTransport = true;\n if (Shipping::TYPE_NOT_SHIPPED === $order->getShippingType()) {\n $isTransport = false;\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'invoiceUrl' => $this->router->generate('order_invoice_download', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $payment->getChargeId(),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'BoolTransport' => $isTransport,\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'expectedDeliveryDate' => null !== $order->getExpectedDeliveryDate() ? $order->getExpectedDeliveryDate()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y') : '',\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CONFIRMATION_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'BoolTransport' => $isTransport,\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'shippingLimitDate' => null !== $order->getShouldBeReadyAt() ? $order->getShouldBeReadyAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y') . ' avant 17h' : '',\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountForMakerTaxIncl() / 100), 2)// only display production amount - coupon amount to maker\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CONFIRMATION_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n\n case Order::STATUS_CANCELED:\n // order has been canceled by the customer\n if (OrderEvent::ORIGIN_CUSTOMER === $event->getOrigin()) {\n\n // get order payment id\n $paymentId = 'n/a';\n $payments = $order->getPayments();\n if (0 < count($payments)) {\n /** @var Payment $payment */\n $payment = $payments[0];\n $paymentId = $payment->getChargeId();\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $paymentId,\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CANCELLATION_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountForMakerTaxIncl() / 100), 2)// only display production amount - coupon amount to maker\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_CANCELLATION_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n }\n break;\n\n case Order::STATUS_TRANSIT:\n\n // get shipment\n $shipments = $order->getShipments();\n /** @var Shipment $shipment */\n $shipment = $shipments[0];\n\n // send customer e-mail\n $emailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'trackingUrl' => $shipment->getTrackingUrl(),\n 'trackingNumber' => $shipment->getParcelNumber(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_SHIPPED,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $emailVars\n );\n\n break;\n\n case Order::STATUS_READY_FOR_PICKUP:\n\n // send customer e-mail\n $emailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_READY_FOR_PICKUP,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $emailVars\n );\n\n break;\n\n case Order::STATUS_REFUNDED:\n\n // get order payment id\n $paymentId = 'n/a';\n $payments = $order->getPayments();\n if (0 < count($payments)) {\n /** @var Payment $payment */\n $payment = $payments[0];\n $paymentId = $payment->getChargeId();\n }\n\n // get order refund id\n $refundId = 'n/a';\n $refunds = $order->getRefunds();\n if (0 < count($refunds)) {\n /** @var Refund $refund */\n $refund = $refunds[0];\n $refundId = $refund->getRefundId();\n }\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'paymentId' => $paymentId,\n 'refundId' => $refundId,\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_REFUNDED,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_DELIVERED:\n\n // send customer e-mail\n /* There is no longer any immediate notification sending when the order is delivered. The notification is made on D + 1 via the reminder system\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n //'ratingUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL) . '#rating'\n 'ratingUrl' => $this->router->generate('order_rating', array('token' => $order->getToken()), $this->router::ABSOLUTE_URL) . '#rating'\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_RATING,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n */\n break;\n\n case Order::STATUS_CLOSED:\n\n if ($order->getRating()->getEnabled() == True ) {\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\n 'orderRateValue' => $order->getRating()->getRate(),\n 'orderRateValue' => $order->getRating()->getComment(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_RATE,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n }\n break;\n\n\n\n\n case Order::STATUS_FILE_AVAILABLE:\n\n // send customer e-mail\n $customerEmailVars = array(\n 'customerName' => $order->getCustomer()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_AVAILABLE_CUSTOMER,\n $order->getCustomer()->getEmail(),\n $order->getCustomer()->getFullname(),\n $customerEmailVars\n );\n\n break;\n\n case Order::STATUS_FILE_REJECTED:\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_REJECTED_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n\n case Order::STATUS_FILE_VALIDATED:\n\n // send maker e-mail\n $makerEmailVars = array(\n 'makerName' => $order->getMaker()->getFullname(),\n 'orderReference' => $order->getReference(),\n 'BoolTransport' => $order->getQuotation()->getProject()->getType()->isShipping(),\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\n );\n $this->sendinBlue->sendTransactional(\n SendinBlue::TEMPLATE_ID_ORDER_FILE_VALIDATED_MAKER,\n $order->getMaker()->getUser()->getEmail(),\n $order->getMaker()->getFullname(),\n $makerEmailVars\n );\n\n break;\n }\n }","title":""},{"docid":"8f8f72633f1eace62dff3089066a2a4c","score":"0.52754956","text":"public function viewNewEvents()\n {\n $this->load->model('M_Event_table');\n $this->load->model('M_Customer_table');\n $events = $this->M_Event_table->getNewEvents();\n $customers = $this->M_Customer_table->getAllCustomers();\n\n $returnData['newEventsMore']= $events;\n $returnData['customers'] = $customers;\n\n $this->load->view('admin/viewNewEvents',$returnData);\n }","title":""},{"docid":"b17a067b3c982e8e9fd93d655dbcd1bb","score":"0.52652997","text":"public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }","title":""},{"docid":"5fa237c2f07eb91b11f7d54fea307fec","score":"0.5264332","text":"function get_all_events(){\n global $database_ged;\n $events = array();\n $sql = \"SELECT id FROM nagios_queue_active\";\n $result = sql($database_ged, $sql);\n foreach($result as $row){\n array_push($events,$row[\"id\"].\":nagios\");\n }\n $result = null;\n $sql = \"SELECT id FROM snmptrap_queue_active\";\n $result = sql($database_ged, $sql);\n foreach($result as $row){\n array_push($events,$row[\"id\"].\":snmptrap\");\n }\n\n return $events;\n}","title":""},{"docid":"598871ab9f2dd16e89e1bf530471cea7","score":"0.5257694","text":"protected function getChangedRemoteObjects()\n {\n $query = $this->getRemoteObjectsQuery();\n $table = $this->getRemoteBaseTable();\n $query->addWhere(\"\\\"{$table}\\\".\\\"_ImportedID\\\" > 0\");\n $query->addWhereAny(array(\n \"\\\"{$table}\\\".\\\"_ImportedDate\\\" IS NULL\",\n \"\\\"{$table}\\\".\\\"_ImportedDate\\\" < \\\"{$table}\\\".\\\"LastEdited\\\"\"\n ));\n $items = iterator_to_array($this->task->query($query));\n return new ArrayList($items);\n }","title":""},{"docid":"141d51cff33be87ca2832d7424f8d4fa","score":"0.52539617","text":"function ef_notifications_get($transition = NULL, $rid = NULL) {\n $emails = array();\n $query = db_select('ef_notifications_emails', 'wve')\n ->fields('wve', array('rid', 'from_name', 'to_name', 'subject', 'message'));\n if ($transition) {\n $query->condition('wve.from_name', $transition->from_name);\n $query->condition('wve.to_name', $transition->to_name);\n }\n if ($rid) {\n $query->condition('wve.rid', $rid);\n }\n $result = $query->execute();\n foreach ($result as $row) {\n $emails[$row->from_name . '_to_' . $row->to_name][$row->rid] = $row;\n }\n return $emails;\n}","title":""},{"docid":"baee53a61ad0e70ad7a214b096156c0b","score":"0.5248705","text":"abstract public static function getStatuses();","title":""},{"docid":"a7cc08b83b3330eaf861a29face3e1f1","score":"0.52453005","text":"public function getWhoToNotifyByEmail()\n\t{\n\t\t//return array\n\t\t$group = Group::model()->findByPk($this->groupId);\n\t\t$emails = $group->getMembersByStatus(User::STATUS_ACTIVE);\n\t\treturn $emails->data;\n\t}","title":""},{"docid":"3fe85f6d0765e83640fbb0ee2bcc5762","score":"0.5243674","text":"public function past_events()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n\n $allRsvps = $this->Event->EventsUser->find('all');\n $this->set('rsvps', $allRsvps);\n\n $this->EventHelper();\n\n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }","title":""},{"docid":"8825e264da7b9b367f960c35d6adcca7","score":"0.52436244","text":"function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}","title":""},{"docid":"6d5c1297dca14849af4d11a9779624bd","score":"0.52364635","text":"public function Upcoming() {\n return $this->get_all_events( 'start_date', 'ASC', true );\n }","title":""},{"docid":"391d857bc5797044dc6e02cbb799bdde","score":"0.5233952","text":"public function getEvents() { return $this->_events; }","title":""},{"docid":"f4620b4080a9b067f3f0d43441d09398","score":"0.52312607","text":"public function getBorrowReminderLost() {\n $dataReminder = DB::table('settings')->where('name', 'daylost')->select('content')->get()[0];\n $fromDate = new Carbon('now');\n\n\n $data = Borrow::where('status', '=', '20')->where( 'ngaydaohan', '<=', $fromDate->toDateTimeString())->orderBy('ngaydaohan', 'asc')->get();\n if (count($data)) {\n foreach ($data as $record) {\n $toDate = Carbon::parse($record['ngaydaohan'])->addDays($dataReminder->content);\n $dataAdd['dateLost'] = $toDate->toDateTimeString();\n $userObj = User::where('id', $record->uid)->first();\n\n emailSend($record, $userObj['email'], 'Email Reminder ' .$userObj['username'] .' - '.$toDate->toDateTimeString(), 'REMINDER_LOST', $dataAdd);\n\n // update - neu da send email reminder => cap nhat trang thai cua khoan vay la da reminder lan 1 => status = 20\n Borrow::where('id', $record->id)->update(array('status'=> '30'));\n }\n } else {\n echo 'No data';\n }\n }","title":""},{"docid":"31403dfaf79cadf166e45ad82f950328","score":"0.52293193","text":"function getPastEvents()\n {\n //1. Define the query\n $sql = \"SELECT * FROM events WHERE endtime < CURRENT_DATE AND archive != 1 ORDER BY starttime DESC\";\n\n //2. Prepare the statement\n $statement = $this->_dbh->prepare($sql);\n\n //4. Execute the query\n $statement->execute();\n\n //5. Process the results (get OrderID)\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }","title":""},{"docid":"ad495e3ac20afb26cbf2d75f8e8e8774","score":"0.5229228","text":"public function actionUpdateAllNews(){\n\t\t// UPDATE `customer` SET `status` = 1 WHERE `email` LIKE `%@example.com%`\n\t\t$update = NotificationsReaders::updateAll(\n\t\t\t[\n\t\t\t\t'alreadyread' => NotificationsReaders::STATUS_READ\n\t\t\t],\n\t\t\t[\n\t\t\t\t'like', 'id_user', Yii::$app->user->id\n\t\t\t]\n\t\t);\n\n\t\tYii::$app->response->format = Response::FORMAT_JSON;\n\t\treturn ['success'=>true,'response'=>$update];\n\t}","title":""},{"docid":"ed0bac56f2385b8ec81683cf7e277a16","score":"0.5225388","text":"public function getOldMessages(Request $request)\n {\n if(!$request->old_message_id || !$request->to_user)\n return;\n \n $message = Message::find($request->old_message_id);\n\n //return $message->created_at;\n \n $lastMessages = Message::where(function($query) use ($request, $message) {\n $query->where('MessageSenderId', Auth::user()->id)\n ->where('MessageReceiverId', $request->to_user)\n ->where('created_at', '<=', $message->created_at)\n ->where('id', '<', $message->id);\n })\n ->orWhere(function ($query) use ($request, $message) {\n $query->where('MessageSenderId', $request->to_user)\n ->where('MessageReceiverId', Auth::user()->id)\n ->where('created_at', '<=', $message->created_at)\n ->where('id', '<', $message->id);\n })->orderBy('id', 'DESC')->get();\n\n //return $lastMessages;\n \n $return = [];\n \n if($lastMessages->count() > 0) {\n \n foreach ($lastMessages as $message) {\n $message->time = Carbon::parse($message->created_at)->diffForHumans();\n $return[] = view('users/message-line')->with('message', $message)->render();\n }\n \n PusherFactory::make()->trigger('chat', 'oldMsgs', ['to_user' => $request->to_user, 'data' => $return]);\n }\n \n return response()->json(['state' => 1, 'data' => $return]);\n }","title":""},{"docid":"f6d6674d1efbb9584437f65c94945692","score":"0.5223696","text":"public function getModified(Request $request)\n {\n $evento = Event::find($request->idevento);\n $evento->descripcion = $request->descripcion;\n $evento->save();\n if($request->tutor_on)\n {\n $usuarios = User::where('type', '=', 'Tutor')->get();\n foreach($usuarios as $usuario)\n {\n $nuevo_evento = new Event;\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\n $nuevo_evento->start = $evento->start;\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\n $nuevo_evento->borderColor = $evento->borderColor;\n $nuevo_evento->allDay = $evento->allDay;\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\n $nuevo_evento->descripcion = $evento->descripcion;\n $nuevo_evento->user_id = $usuario->id;\n $nuevo_evento->save();\n }\n }\n if($request->cursante_on)\n {\n $usuarios = User::where('type', '=', 'Cursante')->get();\n foreach($usuarios as $usuario)\n {\n $nuevo_evento = new Event;\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\n $nuevo_evento->start = $evento->start;\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\n $nuevo_evento->borderColor = $evento->borderColor;\n $nuevo_evento->allDay = $evento->allDay;\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\n $nuevo_evento->descripcion = $evento->descripcion;\n $nuevo_evento->user_id = $usuario->id;\n $nuevo_evento->save();\n }\n }\n if($request->tutor != \"\")\n {\n $usuario = User::find($request->idtutor);\n $nombre = $usuario->first_name.' '.$usuario->father_last_name;\n if($nombre == $request->tutor)\n {\n $nuevo_evento = new Event;\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\n $nuevo_evento->start = $evento->start;\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\n $nuevo_evento->borderColor = $evento->borderColor;\n $nuevo_evento->allDay = $evento->allDay;\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\n $nuevo_evento->descripcion = $evento->descripcion;\n $nuevo_evento->user_id = $usuario->id;\n $nuevo_evento->save();\n }\n }\n return redirect('calendar/calendar');\n }","title":""},{"docid":"df09177357811a78bce835ab5e687f9d","score":"0.52228683","text":"public function sendUserStatusChangeNotificationEmailDataProvider()\n {\n return [\n [1, 'getActivateCustomerTemplateId', 'customer/customer_change_status/email_activate_customer_template'],\n [0, 'getInactivateCustomerTemplateId', 'customer/customer_change_status/email_lock_customer_template']\n ];\n }","title":""},{"docid":"219f3d22dda81b7dc748145b07f9882e","score":"0.52125174","text":"public function updateStatusRequest()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $items = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $items->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $items->getSelect()->group('store_id');\n if($items->getSize() >0 ){\n $data = $items->getData();\n\n foreach($data as $unit) { \n $storeId = $unit['store_id'];\n $day = Mage::getStoreConfig('qquoteadv/general/expirtime_proposal', (int)$storeId); \n \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $collection->getSelect()\n ->where('created_atload(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST_EXPIRED);\n $item->save(); \n }\n }\n }\n }","title":""},{"docid":"4af78b556444bc433433e4a49035a8f2","score":"0.5208411","text":"public function getStatusesList(){\n return $this->_get(1);\n }","title":""},{"docid":"7bc0a98ddf3c5456c5eaf189eb35fda2","score":"0.52069104","text":"public function update_INVOICE_Change_Status_Completed(){\n $this->update_INVOICE_Change_Status_Ongoing();\n $dateToday=date_default_timezone_set(\"Y-m-d\");\n $strInsertQry=\"update sidhus_invoice set Status='Completed Events' where sidhus_invoice.eventDate < '\".$dateToday.\"'\";\n // $stmt = $this->con->prepare($strInsertQry);\n // $stmt->bind_param(\"sssssssssssiisssssiiiii\",$cust_fullname,$cust_address,$theme_name,$color_combo,$cust_mobileno,$cust_alternate_mobileno,$cust_emailId,$event_address,$event_pincode,$event_location,$event_landmark,$event_id,$subcat_id,$venue_type,$eventDate,$eventTime,$concept_type,$notes_or_Remarks,$transportation_Rate,$Tax_percentage,$Advance,$Total,$invoice_no);\n//return $strInsertQry;\n $stmt = $this->con->prepare($strInsertQry);\n // $stmt->bind_param(\"ss\", $newpassword, $username);\n $result = $stmt->execute();\n $stmt->close();\n return $result;// $num_affected_rows>=0;\n\n }","title":""}],"string":"[\n {\n \"docid\": \"1fd937ba47e275ade85da44a0cb8abfd\",\n \"score\": \"0.65930843\",\n \"text\": \"function api_email_updates() {\\n\\t$rv = array(\\\"status\\\" => true);\\n\\t\\n\\t$query = \\\"SELECT `created_date` FROM `events` WHERE `type`='email' ORDER BY `created_date` DESC LIMIT 1\\\";\\n\\t$result = db_query($query);\\n\\t\\n\\tif (db_num_rows($result) > 0) {\\n\\t\\t$row = db_fetch_assoc($result);\\n\\t\\t\\n\\t\\t$query = \\\"SELECT * FROM `events` WHERE `created_date` > '\\\".db_escape($row[\\\"created_date\\\"]).\\\"'\\\";\\n\\t}\\n\\telse {\\n\\t\\t$query = \\\"SELECT * FROM `events`\\\";\\n\\t}\\n\\t\\n\\t$query .= \\\" GROUP BY `type`, `key` ORDER BY `created_date` ASC\\\";\\n\\t$result = db_query($query);\\n\\t\\n\\tif (db_num_rows($result) > 0) {\\n\\t\\t$e = new Event();\\n\\t\\t$e->type = \\\"email\\\";\\n\\t\\t$e->user_id = sess_id();\\n\\t\\t$e->save();\\n\\t\\n\\t\\t$emails = array();\\n\\t\\n\\t\\twhile ($row = db_fetch_assoc($result)) {\\n\\t\\t\\t$meta = json_decode($row[\\\"meta\\\"]);\\n\\t\\t\\t\\n\\t\\t\\tswitch ($row[\\\"type\\\"]) {\\n\\t\\t\\t\\tcase \\\"extension:insert\\\":\\n\\t\\t\\t\\t\\t// Alert anyone who asked for notifications on all new extensions\\n\\t\\t\\t\\t\\t// except for the user who uploaded it.\\n\\t\\t\\t\\t\\t$user_query = \\\"SELECT * FROM `users` WHERE `email_preferences` & \\\".db_escape(User::$EMAIL_FLAG_EXTENSION_INSERT).\\\" AND `id` <> '\\\".db_escape($row[\\\"user_id\\\"]).\\\"'\\\";\\n\\t\\t\\t\\t\\t$user_result = db_query($user_query);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\twhile ($user_row = db_fetch_assoc($user_result)) {\\n\\t\\t\\t\\t\\t\\t$emails[$user_row[\\\"id\\\"]][$row[\\\"type\\\"]][] = $meta;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase \\\"extension:update\\\":\\n\\t\\t\\t\\t\\t// Alert anyone who asked for notifications on extension updates\\n\\t\\t\\t\\t\\t// when they've contributed to a locale.\\n\\t\\t\\t\\t\\t$user_query = \\\"SELECT \\n\\t\\t\\t\\t\\t\\t\\t`u`.*\\n\\t\\t\\t\\t\\t\\tFROM `users` `u`\\n\\t\\t\\t\\t\\t\\t\\tLEFT JOIN `message_history` `mh` ON `u`.`id`=`mh`.`user_id`\\n\\t\\t\\t\\t\\t\\t\\tLEFT JOIN `message_index` `mi` ON `mh`.`message_index_id`=`mi`.`id`\\n\\t\\t\\t\\t\\t\\tWHERE `mi`.`extension_id`='\\\".db_escape($meta->extension_id).\\\"'\\n\\t\\t\\t\\t\\t\\t\\tAND `u`.`id` <> '\\\".db_escape($row[\\\"user_id\\\"]).\\\"'\\n\\t\\t\\t\\t\\t\\t\\tAND `email_preferences` & \\\".db_escape(User::$EMAIL_FLAG_EXTENSION_UPDATE).\\\"\\n\\t\\t\\t\\t\\t\\tGROUP BY `u`.`id`\\\";\\n\\t\\t\\t\\t\\t$user_result = db_query($user_query);\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\twhile ($user_row = db_fetch_assoc($user_result)) {\\n\\t\\t\\t\\t\\t\\t$emails[$user_row[\\\"id\\\"]][$row[\\\"type\\\"]][] = $meta;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase \\\"locale:complete\\\":\\n\\t\\t\\t\\t\\t// Alert anyone who asked for notifications when a locale is completed on their extension.\\n\\t\\t\\t\\t\\t$extension = new Extension($meta->extension_id);\\n\\t\\t\\t\\t\\t$user = new User($extension->user_id);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tif ($user->email_preferences & User::$EMAIL_FLAG_LOCALE_COMPLETE) {\\n\\t\\t\\t\\t\\t\\t$emails[$user->id][$row[\\\"type\\\"]][] = $meta;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase \\\"message:update\\\":\\n\\t\\t\\t\\t\\t// Alert anyone who asked for notifications when their translations are changed.\\n\\t\\t\\t\\t\\t$user = new User($meta->previous_user_id);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tif ($user->email_preferences & User::$EMAIL_FLAG_MESSAGE_CHANGE) {\\n\\t\\t\\t\\t\\t\\t$mindex = new MessageIndex($meta->message_index_id);\\n\\t\\t\\t\\t\\t\\t$meta->extension_id = $mindex->extension_id;\\n\\t\\t\\t\\t\\t\\t$meta->name = $mindex->name;\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$emails[$user->id][$row[\\\"type\\\"]][] = $meta;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\t$email_objects = array();\\n\\t\\t\\n\\t\\t$default_locale_code = get_locale();\\n\\t\\t\\n\\t\\tforeach ($emails as $user_id => $events) {\\n\\t\\t\\t// Emails default to English, even if the API call is made to a localized subdomain.\\n\\t\\t\\tset_locale(\\\"en_US\\\");\\n\\t\\t\\t\\n\\t\\t\\t$user = new User($user_id);\\n\\t\\t\\t\\n\\t\\t\\tif ($user->preferred_locale) {\\n\\t\\t\\t\\tset_locale($user->preferred_locale);\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t\\t$email_object = array();\\n\\t\\t\\t$email_object[\\\"to\\\"] = $user->email;\\n\\t\\t\\t$email_object[\\\"subject\\\"] = __(\\\"email_notification_subject\\\");\\n\\t\\t\\t\\n\\t\\t\\tob_start();\\n\\t\\t\\tinclude INCLUDE_PATH . \\\"/templates/email/notification.php\\\";\\n\\t\\t\\t$html = ob_get_clean();\\n\\t\\t\\tob_end_clean();\\n\\t\\t\\t\\n\\t\\t\\t$email_object[\\\"body\\\"] = $html;\\n\\t\\t\\n\\t\\t\\t$email_objects[] = $email_object;\\n\\t\\t}\\n\\t\\t\\n\\t\\tset_locale($default_locale_code);\\n\\t\\t\\n\\t\\tforeach ($email_objects as $email) {\\n\\t\\t\\temail($email[\\\"to\\\"], $email[\\\"subject\\\"], $email[\\\"body\\\"]);\\n\\t\\t}\\n\\t}\\n\\t\\n\\treturn $rv;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b491893ee1fb4b89ca4736b1c67bf73e\",\n \"score\": \"0.61207205\",\n \"text\": \"function showUserPendingNotifications($status){\\n global $DB,$user_id;\\n\\n $sql = \\\"Select * from notifications where other_user_id=$user_id and status='$status' order by id desc limit 5\\\";\\n $res_data_notification = $DB->RunSelectQuery($sql);\\n\\n foreach ($res_data_notification as $result)\\n {\\n $notification_data = (array)$result;\\n $date = date(\\\"Y-m-d\\\", strtotime($notification_data[\\\"notification_date\\\"]));\\n ?>\\n\\n RunSelectQuery($sql);\\n foreach ($res_data_event as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data_publicUser = $DB->RunSelectQuery($sql);\\n ?>\\n
    \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n
    \\n

    \\n \\n \\\"> has been modified by organiser. Please review the changes.\\n

    \\n

    \\n
    \\n
    \\n\\n RunSelectQuery($sql);\\n foreach ($res_data_event as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data_publicUser = $DB->RunSelectQuery($sql);\\n foreach ($res_data_publicUser as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n
    \\n

    \\n \\n \\\"> has been cancelled.

    \\n\\n

    \\n
    \\n
    \\n\\n RunSelectQuery($sql);\\n // 'event_status' => 'L'\\n foreach ($res_data_event as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data_publicUser = $DB->RunSelectQuery($sql);\\n foreach ($res_data_publicUser as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n
    \\n

    \\n \\n\\n style=\\\"color:#000000\\\">\\n has been reorganized.\\n

    \\n

    \\n
    \\n
    \\n\\n RunSelectQuery($sql);\\n foreach ($res_data as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data_publicUser = $DB->RunSelectQuery($sql);\\n foreach ($res_data_publicUser as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n
    \\n RunSelectQuery($sql);\\n foreach ($before_result as $result)\\n {\\n $publicUserResult = (array)$result;\\n if ($publicUserResult['profile_pic'] == null)\\n {\\n ?>\\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n \\n
    \\n\\n RunSelectQuery($sql);\\n foreach ($res_data as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data = $DB->RunSelectQuery($sql);\\n foreach ($res_data as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n
    \\n RunSelectQuery($sql);\\n foreach ($before_result as $result)\\n {\\n $PublicUserData = (array)$result;\\n if ($PublicUserData['profile_pic'] == null)\\n {\\n ?>\\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n \\n \\n
    \\n\\n user_id;\\n $res_data = $DB->RunSelectQuery($sql);\\n foreach ($res_data as $data)\\n {\\n $publicUserInfo = (array)$data;\\n\\n $user_name = $publicUserInfo[\\\"firstname\\\"] . \\\" \\\" . $publicUserInfo[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n\\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n
    \\n

    \\n \\\" style=\\\"color:#000000\\\">&nbsp; wants to add you as a buddy.\\n\\n RunSelectQuery($sql);\\n if ($res_data[0]->status =='Confirmed buddy')\\n {\\n\\n ?>\\n &nbsp;Accepted\\n

    \\n

    \\n
    \\n
    \\n \\n
    \\\" style=\\\"display:inline-block\\\">
    )\\\" class=\\\"slimbuttonblue\\\" style=\\\"width:130px;\\\">Accept request
    \\n

    \\n \\n \\n \\n RunSelectQuery($sql);\\n foreach ($res_data as $resultuser)\\n {\\n $resultuserInfo = (array)$resultuser;\\n $user_name = $resultuserInfo[\\\"firstname\\\"] . \\\" \\\" . $resultuserInfo[\\\"lastname\\\"];\\n }\\n ?>\\n\\n
    \\n
    \\n \\\" class=\\\"image-has-radius\\\" alt=\\\"event-image\\\">\\n
    \\n
    \\n

    \\\" style=\\\"color:#000000\\\">&nbsp; has accepted your buddy request.

    \\n

    \\n
    \\n\\n
    \\n RunSelectQuery($sql);\\n foreach ($res_data as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n\\n\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data = $DB->RunSelectQuery($sql);\\n\\n foreach ($res_data as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n } ?>\\n \\n
    \\n \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n \\n
    \\n

    sent you a booking request for \\\">

    \\n

    \\n
    \\n
    \\n \\n\\n RunSelectQuery($sql);\\n foreach ($res_data as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n\\n\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data = $DB->RunSelectQuery($sql);\\n\\n foreach ($res_data as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n } ?>\\n \\n
    \\n \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n \\n
    \\n

    Left \\\">

    \\n

    \\n
    \\n
    \\n \\n\\n \\n isirdb->where('spis_data.publishdate > \\\"'. $lastemail .'\\\"', '', false);\\n\\n\\t\\tif ($ignoreminordocuments == true) {\\n\\t\\t\\t$this->isirdb->where('spis_data.is_document_minor', false);\\n\\t\\t}\\n\\n\\t\\t$this->isirdb->order_by('spis_data.publishdate');\\n\\t\\t$this->_prepareNewEventsSelect($userid, false, true);\\n\\n\\t\\t$temp = $this->isirdb->get('users_watches')->result_array();\\n\\n\\t\\t// then get changes for recently added subjects\\n\\t\\t$this->isirdb->where('users_watches.date_add > \\\"'. $lastemail .'\\\"', '', false);\\n\\t\\t$this->_prepareNewEventsSelect($userid, true, false);\\n\\n\\t\\t$tempNewlyAdded = $this->isirdb->get('users_watches')->result_array();\\n\\n\\t\\treturn $this->_mergeEvents($temp, $tempNewlyAdded);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c9a3e489fb2d6c040359f1447dd0f81\",\n \"score\": \"0.6036853\",\n \"text\": \"function showUserNotifications($status,$limit){\\n global $DB,$user_id;\\n $limit;\\n $sql = \\\"Select * from notifications where other_user_id=$user_id and status='$status' order by id desc limit $limit\\\";\\n $res_data_notification = $DB->RunSelectQuery($sql);\\n\\n foreach ($res_data_notification as $result)\\n {\\n $notification_data = (array)$result;\\n $date = date(\\\"Y-m-d\\\", strtotime($notification_data[\\\"notification_date\\\"]));\\n ?>\\n RunSelectQuery($sql);\\n foreach ($res_data_event as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data_publicUser = $DB->RunSelectQuery($sql);\\n ?>\\n
    \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n
    \\n

    \\n \\n \\\"> has been modified by organiser. Please review the changes.\\n

    \\n

    \\n
    \\n
    \\n\\n RunSelectQuery($sql);\\n foreach ($res_data_event as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data_publicUser = $DB->RunSelectQuery($sql);\\n foreach ($res_data_publicUser as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n
    \\n

    \\n \\n \\\"> has been cancelled.

    \\n\\n

    \\n
    \\n
    \\n\\n RunSelectQuery($sql);\\n // 'event_status' => 'L'\\n foreach ($res_data_event as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data_publicUser = $DB->RunSelectQuery($sql);\\n foreach ($res_data_publicUser as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n
    \\n

    \\n \\n style=\\\"color:#000000\\\">\\n has been reorganized.\\n

    \\n

    \\n
    \\n
    \\n\\n RunSelectQuery($sql);\\n foreach ($res_data as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data_publicUser = $DB->RunSelectQuery($sql);\\n foreach ($res_data_publicUser as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n
    \\n RunSelectQuery($sql);\\n foreach ($before_result as $result)\\n {\\n $publicUserResult = (array)$result;\\n if ($publicUserResult['profile_pic'] == null)\\n {\\n ?>\\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n \\n
    \\n\\n RunSelectQuery($sql);\\n foreach ($res_data as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data = $DB->RunSelectQuery($sql);\\n foreach ($res_data as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n
    \\n RunSelectQuery($sql);\\n foreach ($before_result as $result)\\n {\\n $PublicUserData = (array)$result;\\n if ($PublicUserData['profile_pic'] == null)\\n {\\n ?>\\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n \\n \\n
    \\n\\n user_id;\\n $res_data = $DB->RunSelectQuery($sql);\\n foreach ($res_data as $data)\\n {\\n $publicUserInfo = (array)$data;\\n\\n $user_name = $publicUserInfo[\\\"firstname\\\"] . \\\" \\\" . $publicUserInfo[\\\"lastname\\\"];\\n }\\n ?>\\n
    \\n\\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n\\n
    \\n

    \\\" style=\\\"color:#000000\\\">&nbsp; wants to add you as a buddy.\\n RunSelectQuery($sql);\\n if ($res_data[0]->status =='Confirmed buddy')\\n {\\n\\n ?>\\n &nbsp;Accepted\\n

    \\n

    \\n
    \\n
    \\n \\n
    \\\" style=\\\"display:inline-block\\\">
    )\\\" class=\\\"slimbuttonblue\\\" style=\\\"width:130px;\\\">Accept request
    \\n

    \\n \\n\\n RunSelectQuery($sql);\\n foreach ($res_data as $resultuser)\\n {\\n $resultuserInfo = (array)$resultuser;\\n $user_name = $resultuserInfo[\\\"firstname\\\"] . \\\" \\\" . $resultuserInfo[\\\"lastname\\\"];\\n }\\n ?>\\n\\n
    \\n
    \\n \\\" class=\\\"image-has-radius\\\" alt=\\\"event-image\\\">\\n
    \\n
    \\n

    \\\" style=\\\"color:#000000\\\">&nbsp; has accepted your buddy request.

    \\n

    \\n
    \\n\\n
    \\n RunSelectQuery($sql);\\n foreach ($res_data as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n\\n\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data = $DB->RunSelectQuery($sql);\\n\\n foreach ($res_data as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n } ?>\\n \\n
    \\n \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n \\n
    \\n

    sent you a booking request for \\\">

    \\n

    \\n
    \\n
    \\n \\n\\n RunSelectQuery($sql);\\n foreach ($res_data as $resulteventcomment)\\n {\\n $resulteventcomment = (array)$resulteventcomment;\\n $event_name = $resulteventcomment[\\\"event_name\\\"];\\n if ($resulteventcomment[\\\"entry_type\\\"] == \\\"\\\")\\n {\\n $event_type = \\\"event\\\";\\n $event_link = createURL('index.php', \\\"mod=event&do=eventdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n else if ($resulteventcomment[\\\"entry_type\\\"] == \\\"Ping\\\")\\n {\\n $event_type = \\\"ping\\\";\\n $event_link = createURL('index.php', \\\"mod=ping&do=pingdetails&eventid=\\\" . $resulteventcomment[\\\"event_id\\\"]);\\n }\\n }\\n\\n\\n $sql = \\\"Select * from public_users where id=\\\" . $notification_data[\\\"user_id\\\"];\\n $res_data = $DB->RunSelectQuery($sql);\\n\\n foreach ($res_data as $resultusercomment)\\n {\\n $resultusercomment = (array)$resultusercomment;\\n\\n $user_name = $resultusercomment[\\\"firstname\\\"] . \\\" \\\" . $resultusercomment[\\\"lastname\\\"];\\n } ?>\\n \\n
    \\n \\n
    \\n \\n \\\"event-image\\\"/images/no_profile_pic.gif\\\" />\\n \\n \\\"event-image\\\"\\\" width=\\\"37\\\" height=\\\"37\\\" />\\n \\n
    \\n \\n
    \\n

    Left \\\">

    \\n

    \\n
    \\n
    \\n \\n\\n \\n application_query_builder->getStatusHistoryQuery(\\n\\t\\t\\t$date, \\n\\t\\t\\t$this->getUpdatableStatusIds(), \\n\\t\\t\\t$this->config->getCompany(), \\n\\t\\t\\t$args\\n\\t\\t);\\n\\t\\t\\n\\t\\t//$st = $this->config->getConnection()->prepare($query);\\n\\t\\t$rs = $this->queryPrepared($query,$args);\\n\\t\\t\\n\\t\\t$this->data_builder->attachObserver(\\n\\t\\t\\tnew Delegate_1(array($this, 'setApplicationBalance'))\\n\\t\\t);\\n\\t\\t\\n\\t\\t$this->data_builder->attachObserver(\\n\\t\\t\\tnew Delegate_1(array($this, 'setStatusChain'))\\n\\t\\t);\\n\\t\\t\\n\\t\\treturn $this->data_builder->getApplicationData($rs);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb3c9035aafd8c0733892c983ad466be\",\n \"score\": \"0.5998655\",\n \"text\": \"public function getChanges();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb3c9035aafd8c0733892c983ad466be\",\n \"score\": \"0.5998655\",\n \"text\": \"public function getChanges();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c1d2717f5f897158049e95c17c8b3ae\",\n \"score\": \"0.5992619\",\n \"text\": \"public function getApplicationStatusChanges($application_id)\\n\\t{\\n\\t\\t$args = array();\\n\\t\\t$query = $this->application_query_builder->getApplicationStatusHistoryQuery(\\n\\t\\t\\t$application_id, \\n\\t\\t\\t$this->getUpdatableStatusIds(), \\n\\t\\t\\t$this->config->getCompany(), \\n\\t\\t\\t$args\\n\\t\\t);\\n\\t\\t\\n\\t\\t//$st = $this->config->getConnection()->prepare($query);\\n\\t\\t$rs = $this->queryPrepared($query,$args);\\n\\t\\t\\n\\t\\t$this->data_builder->attachObserver(\\n\\t\\t\\tnew Delegate_1(array($this, 'setApplicationBalance'))\\n\\t\\t);\\n\\t\\t\\n\\t\\t$this->data_builder->attachObserver(\\n\\t\\t\\tnew Delegate_1(array($this, 'setStatusChain'))\\n\\t\\t);\\n\\t\\t\\n\\t\\treturn $this->data_builder->getApplicationData($rs);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8752a50d3d50c571f8563505c0ece0e9\",\n \"score\": \"0.59067863\",\n \"text\": \"function relist_notifications($old, $new) {\\r\\n $functions=1;\\r\\n include(\\\"config.php\\\"); // php functions\\r\\n\\r\\n\\r\\n $task = mysql_fetch_array(mysql_query(\\\"SELECT * FROM tasks WHERE id = '$old' LIMIT 1\\\")); //original task details\\r\\n $joins = mysql_query(\\\"SELECT * FROM joins WHERE task = '$old'\\\"); // people who had joined that task (if any)\\r\\n $subject = \\\"Task re-listed - \\\" . $task[\\\"title\\\"];\\r\\n \\r\\n while ($info = mysql_fetch_array($joins)){\\r\\n \\r\\n $member = mysql_fetch_array(mysql_query(\\\"SELECT * FROM `users` WHERE id = '\\\".$info[\\\"user\\\"].\\\"' LIMIT 1\\\"));\\r\\n $message = \\\"\\r\\n

    \\\".$member[\\\"firstname\\\"].\\\",

    \\r\\n \\r\\n

    Recently a task closed which you had joined, however not enough others had joined to activate it. The lister has now re-listed the task on another date, so we thought we'd let you know incase you were interested in re-joining.

    \\r\\n \\r\\n

    You can view the new listing and join the task here:

    \\r\\n \\r\\n

    $domain\\\" . task_link($new) . \\\"

    \\r\\n \\r\\n

    Thanks for being a part of Volunteezy!

    \\r\\n \\\";\\r\\n \\r\\n send_email($member[\\\"email\\\"], $subject, $message);\\r\\n \\r\\n addlog(\\\"Sent email to user \\\".$info[\\\"user\\\"].\\\" to let them know that task $old has been relisted as task $new\\\");\\r\\n }\\r\\n \\r\\n \\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c6b80e25241caae0c45c4354b5460a4\",\n \"score\": \"0.58870816\",\n \"text\": \"function phb_is_get_user_status($event_id,$user_id)\\r\\n\\t{\\r\\n global $SITE_URL;\\r\\n\\t\\t hb_set_then_go(\\\"change_invitation_status_then_go\\\",$SITE_URL.\\\"future_event.php\\\");\\r\\n\\t\\t if($event_id!=\\\"\\\" && $user_id!=\\\"\\\")\\r\\n\\t\\t {\\r\\n\\t\\t $select_status=\\\"select * from tbl_invitation_responce where user_id='$user_id' and event_id='$event_id'\\\";\\r\\n\\t\\t $status_result=hb_mysql_query($select_status);\\r\\n\\t\\t $row_status=hb_mysql_num_rows($status_result);\\r\\n\\t\\t\\t if($row_status > 0)\\r\\n\\t\\t\\t {\\r\\n\\t\\t\\t\\t $status_data=hb_mysql_fetch_array($status_result);\\r\\n\\t\\t\\t\\t$rid=$status_data['id'];\\r\\n\\t\\t\\t\\t$uid=$status_data['user_id'];\\r\\n\\t\\t\\t\\t if($status_data['status']==\\\"1\\\")\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t return \\\"Joining
    Change : May Be | Not Joining\\\" ;\\r\\n\\t\\t\\t\\t }else if($status_data['status']==\\\"2\\\")\\r\\n\\t\\t\\t\\t {\\r\\n\\t\\t\\t\\t\\t return \\\"Maybe
    Change :Join\\\" ;\\r\\n\\t\\t\\t\\t }else{\\r\\n\\t\\t\\t\\t\\t return \\\"Not Joining
    Change : Join | May Be \\\";\\r\\n\\t\\t\\t\\t }\\r\\n\\t\\t\\t }\\r\\n\\t\\t \\r\\n\\t\\t }\\r\\n\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2cfe0a8721b783c767ad87bc0a86ab74\",\n \"score\": \"0.5886645\",\n \"text\": \"function getAllEventNotifications($user_id){\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t$sql =\\\" select ef.id,ef.friend_id,e.user_id,e.event_id,u.user_name as UserName,\\n\\t\\t\\t\\t\\t\\tu.image as UserImage,e.event_name,e.event_type,e.description,\\n\\t\\t\\t\\t\\t\\tef.status from `events` as e ,event_friends as ef\\n\\t\\t\\t\\t\\t\\tleft join users as u on u.user_id = ef.user_id\\n\\t\\t\\t\\t\\t\\twhere e.event_id = ef.event_id\\n\\t\\t\\t\\t\\t\\tand ef.friend_id = '\\\".$user_id.\\\"'\\n\\t\\t\\t\\t\\t\\tand e.create_type = 'events'\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tand (ef.status = 'start')\\n\\t\\t\\t\\t\\t\\tgroup by e.event_id\\n\\t\\t\\t\\t\\t\\torder by e.event_id desc\\n\\t\\t\\t\\t\\t\\tlimit 0,2 \\\";\\n\\t\\t$query = $this->db->query($sql);\\t\\n\\t\\t$data = $query->result_array();\\n\\t\\treturn $data;\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b25bfdeb0eb6115d0a0ae53f2e8dda3\",\n \"score\": \"0.5876238\",\n \"text\": \"private function getEvents () \\n\\n\\t\\t{\\n\\t\\t\\t $dbs = new DB ( $this->config['database'] );\\n $c = $dbs->query (\\\"SELECT * FROM tbl_events_record WHERE org_id = '\\\" . $this->c . \\\"'\\\");\\n\\t\\t\\t if ( count ( $c ) ) {\\n\\t\\t\\t\\t$this->result['data']['id'] = trim ( $this->c );\\n\\t\\t\\t\\t$this->result['data']['events'] = $c[0]['events'];\\n\\t\\t\\t\\t$this->result['data']['date'] = $c[0]['date_rec'];\\n\\t\\t\\t } else \\n\\t\\t\\t\\t$this->result['data']['result'] = \\\"Not found [error code:100:101]\\\";\\n\\n\\t\\t\\t $dbs->CloseConnection ();\\n\\t\\t\\t\\n\\t\\t \\treturn;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d4b8811cdaf9f36468349d883a65787\",\n \"score\": \"0.5870417\",\n \"text\": \"public function getNew()\\n\\t{\\n\\t\\t$msgs = $this->getAllByQuery(\\\"date_sent >= ?\\\", [$this->last_query_time]);\\n\\t\\t$this->updateQueryTime();\\n\\t\\treturn $msgs;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd3a13e66ed74e64d135c11a781cfce7\",\n \"score\": \"0.5867827\",\n \"text\": \"public function getUpdates()\\n {\\n $query = \\\"SELECT * FROM events WHERE id > ? AND game_id = ? AND player = ?\\\";\\n $result = $this->oDB->getAll($query, array(\\n $this->oData->getLastIdEvents(),\\n $this->oData->getIdGames(),\\n $this->oData->getOtherNumber()\\n ));\\n\\n $updates = array();\\n foreach ($result as $value) {\\n switch ($value['event_type']) {\\n case \\\"name_update\\\":\\n $this->oData->setOtherName($value['event_value']);\\n break;\\n\\n case \\\"start_game\\\":\\n $this->oData->setOtherShips($value['event_value']);\\n break;\\n\\n case \\\"shot\\\":\\n $this->oData->appendOtherShots($value['event_value']);\\n break;\\n }\\n\\n $lastIdEvents = max($this->oData->getLastIdEvents(), $value['id']);\\n $this->oData->setLastIdEvents($lastIdEvents);\\n\\n if ($value['event_type'] == \\\"chat\\\") {\\n $eventValue = new \\\\stdClass();\\n $eventValue->text = $value['event_value'];\\n $eventValue->timestamp = $value['timestamp'];\\n } elseif ($value['event_type'] == 'start_game') {\\n $eventValue = true;\\n } else {\\n $eventValue = $value['event_value'];\\n }\\n\\n $updates[ $value['event_type'] ][] = $eventValue;\\n $updates['lastIdEvents'] = array($lastIdEvents);\\n }\\n\\n return $updates;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"078fe78bb017c07cdba63e94856f53dd\",\n \"score\": \"0.586162\",\n \"text\": \"public function changes()\\r\\n\\t{\\r\\n\\t\\t$Change = App::make('Change');\\r\\n\\r\\n\\t\\treturn $Change::where('fmodel', 'GalleryItem')\\r\\n\\t\\t\\t\\t \\t ->where('fid', $this->id)\\r\\n\\t\\t\\t\\t \\t ->with('user')\\r\\n\\t\\t\\t\\t \\t ->orderBy('created_at', 'DESC')\\r\\n\\t\\t\\t\\t \\t ->get();\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0887649d2c910fb4ae03aa2eb9bdcc80\",\n \"score\": \"0.58582646\",\n \"text\": \"public function getStatusHistory()\\n\\t\\t{\\n\\t\\t\\t$list = ECash::getFactory()->getModel(\\\"StatusHistoryList\\\");\\n\\t\\t\\t$list->loadBy(array(\\\"application_id\\\" => $this->application_id));\\n\\n\\t\\t\\treturn $list->toList();\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ddb103dc55d8c45bde0a13c3f023008\",\n \"score\": \"0.57783204\",\n \"text\": \"function getRecentChanges()\\r\\n\\t{\\r\\n\\t\\tinclude_once(\\\"./Modules/Wiki/classes/class.ilWikiPage.php\\\");\\r\\n\\t\\t$changes = ilWikiPage::getRecentChanges(\\\"wpg\\\", $this->wiki_id);\\r\\n\\t\\t$this->setDefaultOrderField(\\\"date\\\");\\r\\n\\t\\t$this->setDefaultOrderDirection(\\\"desc\\\");\\r\\n\\t\\t$this->setData($changes);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d9e678eb67aebd7fab4b8fb0518cc2f\",\n \"score\": \"0.577272\",\n \"text\": \"public function getChangedEntries();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc97f99720212a670519ea1a872a9222\",\n \"score\": \"0.5757922\",\n \"text\": \"function fn_get_order_status_history($params = array(), $lang_code = CART_LANGUAGE, $items_per_page = 0)\\n{\\n\\n // Set default values to input params\\n $default_params = array(\\n 'page' => 1,\\n 'items_per_page' => $items_per_page\\n );\\n\\n $params = array_merge($default_params, $params);\\n\\n $sortings = array(\\n 'user_id' => '?:order_status_history.user_id',\\n 'order_id' => '?:order_status_history.order_id',\\n 'timestamp' => '?:order_status_history.timestamp',\\n 'new_status' => '?:order_status_history.new_status',\\n 'old_status' => '?:order_status_history.old_status',\\n );\\n\\n $fields = array (\\n '?:order_status_history.user_id',\\n '?:order_status_history.order_id',\\n '?:order_status_history.timestamp',\\n '?:order_status_history.new_status',\\n '?:order_status_history.old_status',\\n '?:users.firstname'\\n );\\n\\n $sorting = db_sort($params, $sortings, 'timestamp', 'asc');\\n\\n\\n if (!empty($params['items_per_page'])) {\\n $params['total_items'] = db_get_field(\\\"SELECT COUNT(*) FROM ?:order_status_history\\\");\\n $limit = db_paginate($params['page'], $params['items_per_page'], $params['total_items']);\\n }\\n\\n $join = 'left join ?:users on ?:order_status_history.user_id = ?:users.user_id';\\n\\n $status_history_list = db_get_array(\\n \\\"SELECT ?p FROM ?:order_status_history \\\" .\\n $join .\\n \\\" WHERE 1 ?p ?p\\\",\\n implode(', ', $fields), $sorting, $limit\\n );\\n\\n $order_statuses = fn_get_statuses(STATUSES_ORDER, [], true, true);\\n\\n foreach ($status_history_list as &$history){\\n $history['new_status_text'] = $order_statuses[$history['new_status']]['description'];\\n $history['old_status_text'] = $order_statuses[$history['old_status']]['description'];\\n }\\n\\n return array($status_history_list, $params, $order_statuses);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34336aefb91d5d7347925cf7d4265e1d\",\n \"score\": \"0.5696395\",\n \"text\": \"public function getUncommittedEvents();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca47fe0086805e1e2e9b3d5dce67a688\",\n \"score\": \"0.56951195\",\n \"text\": \"public function getnewevents_allforadded($userid, $lastemail, $ignoreminordocuments) {\\n\\t\\t// first get all events for subjects added after last emailing\\n\\t\\t$this->isirdb->where('users_watches.date_add > \\\"'. $lastemail .'\\\"', '', false);\\n\\n\\t\\tif ($ignoreminordocuments == true) {\\n\\t\\t\\t$this->isirdb->where('spis_data.is_document_minor', false);\\n\\t\\t}\\n\\t\\t\\n\\t\\t$this->_prepareNewEventsSelect($userid, false, false);\\n\\n\\t\\t$tempNewlyAdded = $this->isirdb->get('users_watches')->result_array();\\n\\n\\t\\t// then get changes since the last emailing for subjects added before last emailing\\n\\t\\t$this->isirdb->where('spis_data.publishdate > \\\"'. $lastemail .'\\\"', '', false);\\n\\n\\t\\tif ($ignoreminordocuments == true) {\\n\\t\\t\\t$this->isirdb->where('spis_data.is_document_minor', false);\\n\\t\\t}\\n\\n\\t\\t$this->isirdb->order_by('spis_data.publishdate');\\n\\t\\t$this->_prepareNewEventsSelect($userid, false, true);\\n\\n\\t\\t$temp = $this->isirdb->get('users_watches')->result_array();\\n\\t\\t\\n\\t\\treturn $this->_mergeEvents($tempNewlyAdded, $temp);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bca3b0a6cd8c616fe90d5e82b352737\",\n \"score\": \"0.5682046\",\n \"text\": \"public function groupNotChangedMails()\\n {\\n $conditions = array('GroupChangeRequest.request_type'=>'cr','GroupChangeRequest.is_moved'=>0);\\n $pendingRequests = $this->GroupChangeRequest->find('all',array('conditions'=>$conditions));\\n $cuttentTimeStamp = strtotime(date('Y-m-d'));\\n if(!empty($pendingRequests)) {\\n $count = 0;\\n foreach($pendingRequests as $row){\\n $timeDiff = round(abs($cuttentTimeStamp - strtotime($row['GroupChangeRequest']['created'])) / (60*60),0);\\n if($timeDiff < 48) {\\n //Send Mails\\n $count++;\\n $emailLib = new Email();\\n $to = $userInfo['BusinessOwner']['email'];\\n //$to = 'rohan.julka@a3logics.in';\\n $subject = 'FoxHopr: Group change request status';\\n $template ='group_change_pending';\\n $variable = array('name'=>$row['BusinessOwner']['fname'] . \\\" \\\" . $row['BusinessOwner']['lname']);\\n $success = $emailLib->sendEmail($to,$subject,$variable,$template,'both');\\n }\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf2678bcc3c780d07d0980a61ef8d20d\",\n \"score\": \"0.56779945\",\n \"text\": \"function get_notifications($profile_id=0){\\n\\tglobal $mysqli;\\n\\n\\t\\t$query=\\\"SELECT * FROM event_invitees WHERE profile_id=\\\".$profile_id;\\n\\t\\t$notifications=array();\\n\\t\\t$result=$mysqli->query($query);\\n\\t\\twhile($row=$result->fetch_assoc())\\n\\t\\t{\\n\\t\\t\\t\\n\\t\\t\\t$response['notification_type']='event';\\n\\t\\t\\t$response['notification_status']=$row['accepted'];\\n\\t\\t\\t$response['notification_id']=$row['invitation_id'];\\n\\t\\t\\t$response['notification_datetime']=$row['created'];\\n\\n\\t\\t\\t$sql_notifier=\\\"SELECT * FROM events WHERE event_id=\\\".$row['event_id'];\\n\\t\\t\\t$res_notifier=$mysqli->query($sql_notifier);\\n\\t\\t\\t$row_notifier=$res_notifier->fetch_assoc();\\n\\t\\t\\t$response['notification_by']=$row_notifier['event_createdby'];\\n\\t\\t\\t$sql_getprofile=\\\"SELECT * FROM profiles WHERE profile_id=\\\".$response['notification_by'];\\n\\t\\t\\t$res_getprofile=$mysqli->query($sql_getprofile);\\n\\t\\t\\t$row_getprofile=$res_getprofile->fetch_assoc();\\n\\t\\t\\t$response['notifier_profile_name']=$row_getprofile['profile_name'];\\n\\t\\t\\t$response['notifier_thumbnail']=$row_getprofile['profile_thumbnail'];\\n\\t\\t\\t$response['notification_title']=$row_notifier['event_title'];\\n\\t\\t\\t$response['event_details']=$row_notifier;\\n\\t\\t\\tarray_push($notifications, $response);\\n\\t\\t\\t//echo $row['event_id'];\\n\\t\\t}\\n\\t\\t$query2=\\\"SELECT * FROM friends2 WHERE profile2_id=\\\".$profile_id;\\n\\t\\t$result2=$mysqli->query($query2);\\n\\t\\twhile($row2=$result2->fetch_assoc())\\n\\t\\t{\\n\\t\\t\\t$response2['notification_type']='friend';\\n\\t\\t\\t$response2['notification_status']=$row2['status'];\\n\\t\\t\\t$response2['notification_by']=$row2['profile1_id'];\\n\\t\\t\\t$sql_getprofile2=\\\"SELECT * FROM profiles WHERE profile_id=\\\".$response2['notification_by'];\\n\\t\\t\\t$res_getprofile2=$mysqli->query($sql_getprofile2);\\n\\t\\t\\t$row_getprofile2=$res_getprofile2->fetch_assoc();\\n\\t\\t\\t$response2['notifier_profile_name']=$row_getprofile2['profile_name'];\\n\\t\\t\\t$response2['notifier_thumbnail']=$row_getprofile2['profile_thumbnail'];\\n\\t\\t\\t$response2['notification_title']='New Friend Request';\\n\\t\\t\\tarray_push($notifications, $response2);\\n\\t\\t\\t//echo $row['event_id'];\\n\\t\\t}\\n\\n\\t\\theader('Content-Type: application/json');\\n\\t\\techo json_encode($notifications, JSON_UNESCAPED_SLASHES);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c68b95d929704e93d49ff23ba22f0725\",\n \"score\": \"0.5667366\",\n \"text\": \"public function updateStatusOnNewDay() {\\n // Update advs\\n UIAdv::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\\n 'last_update_time' => Carbon::now(),\\n 'status' => 0\\n ]);\\n\\n // Update advgroups\\n UIAdvGroup::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\\n 'last_update_time' => Carbon::now(),\\n 'status' => 0\\n ]);\\n\\n // Update campaign\\n UICampaign::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\\n 'last_update_time' => Carbon::now(),\\n 'status' => 0\\n ]);\\n\\n // Update project\\n UIProject::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\\n 'last_update_time' => Carbon::now(),\\n 'status' => 0\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24d3f33105c97839dca890e5570f05d8\",\n \"score\": \"0.56469476\",\n \"text\": \"public function on_all_status_transitions( $new_status, $old_status, $post ){\\n\\t\\tif ( $new_status != $old_status ) {\\n\\t\\t\\tif( $new_status == 'pending' ) {\\n\\t\\t\\t\\t$result = $this->post_to_discord( 'Pending: ' . $post->post_title . ' -- ' . get_edit_post_link( $post->ID, '&' ) );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9aa387b250629e1a710c0cb84f97006\",\n \"score\": \"0.5639933\",\n \"text\": \"public function getUpdated();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9aa387b250629e1a710c0cb84f97006\",\n \"score\": \"0.5639933\",\n \"text\": \"public function getUpdated();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ef1aa26dc862481597d277f53c99bcd\",\n \"score\": \"0.5633387\",\n \"text\": \"public function listEvents()\\n\\t{\\n\\n\\t\\t$table=CaseItemModel::getInstance()->getTable();\\n $pTable=ProcessModel::getInstance()->getTable();\\n $piTable=ProcessItemModel::getInstance()->getTable();\\n \\n\\t\\t$status =\\\"status not in ('Complete','Terminated') \\\";\\n \\n\\t\\t$sql=\\\"select 'Case Item' as source,id,null as processName, processNodeId,caseId,type,subType,label,timer,timerDue,message,signalName \\\"\\n . \\\" from $table \\\"\\n . \\\" where $status\\\"\\n .\\\" and subType in('timer','message','signal')\\\";\\n\\t\\t$arr1= $this->db->select($sql);\\n\\n\\t\\t$sql=\\\"select 'Process Item' as source ,p.processName as processName, pi.id as id,pi.processNodeId,null as caseId,pi.type,subType,label,timer,timerDue,message,signalName \\\"\\n . \\\" from $piTable pi\\n join $pTable p on p.processId=pi.processId\\n where subType in('timer','message','signal')\\\";\\n \\n \\n\\t\\t$arr2= $this->db->select($sql);\\n\\t\\t$results= array_merge($arr1,$arr2);\\n\\n\\t\\treturn $results;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fbfdd0eeeb2a8410e4c261eaa0eedf9\",\n \"score\": \"0.5630141\",\n \"text\": \"function getCurrentEvents()\\n {\\n //1. Define the query\\n $sql = \\\"SELECT * FROM events WHERE starttime < CURRENT_DATE && event_complete != 1 ORDER BY starttime\\\";\\n\\n //2. Prepare the statement\\n $statement = $this->_dbh->prepare($sql);\\n\\n //4. Execute the query\\n $statement->execute();\\n\\n //5. Process the results (get OrderID)\\n return $statement->fetchAll(PDO::FETCH_ASSOC);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab15c2ec47515a1cd6858117dc0f510f\",\n \"score\": \"0.56260914\",\n \"text\": \"function printNewRequests() {\\r\\n $criteria = array('status' => Appeal::$STATUS_NEW);\\r\\n return printAppealList($criteria);\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41aa412f7c452c818a39d7eeae992b96\",\n \"score\": \"0.5620924\",\n \"text\": \"function getLastCheckinList($minutes, $eventId)\\r\\n{\\r\\n $response = array('ok' => false, 'msg' => \\\"Undefined error\\\");\\r\\n \\r\\n $sqlCon = openDatabase();\\r\\n \\r\\n $query = \\\"SELECT eventcheckin.checkin_time, eventcheckin.checked_in, \\\" .\\r\\n \\\"attendees.user_id, attendees.firstname, attendees.lastname, attendees.email \\\" .\\r\\n \\\"FROM \\\".DB_SCHEMA.\\\".eventcheckin \\\" .\\r\\n \\\"JOIN \\\".DB_SCHEMA.\\\".attendees ON \\\" .\\r\\n \\\"eventcheckin.attendee_id = attendees.user_id \\\" .\\r\\n \\\"WHERE eventcheckin.event_id=\\\" . SQLE($eventId) . \\r\\n \\\" AND eventcheckin.checkin_time > date_sub( now( ) , INTERVAL \\\" . SQLE($minutes) . \\\" MINUTE ) \\\" .\\r\\n \\\" ORDER BY eventcheckin.checkin_time DESC;\\\";\\r\\n\\r\\n $list = array();\\r\\n $result = mysql_query($query);\\r\\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\\r\\n $list[] = $row;\\r\\n }\\r\\n $response = array('ok' => true, 'msg' => \\\"OK\\\", 'list' => $list);\\r\\n \\r\\n closeDatabase();\\r\\n \\r\\n return $response;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"612a4a7b3aea426495ae5ef1522b99d7\",\n \"score\": \"0.5596961\",\n \"text\": \"public function getNotificationsCollection()\\n {\\n return Mage::getModel('kdcatalogupdates/log')->getCollection();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e52181cf399874494a35ee000128ac1e\",\n \"score\": \"0.5595261\",\n \"text\": \"function get_events_notification($start, $event_limit, $cond=array(), $count=false)\\r\\n\\t{\\r\\n\\t\\t$c_filter = '';\\r\\n\\t\\tif (is_domain_user() == true) {\\r\\n\\t\\t\\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\\r\\n\\t\\t}\\r\\n\\t\\tif (valid_array($cond)) {\\r\\n\\t\\t\\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\\r\\n\\t\\t}\\r\\n\\t\\tif(!$count) {\\r\\n\\t\\t\\t$query = 'select TL.*, TLE.event_title, TLE.event_icon \\r\\n\\t\\t\\t\\t\\tfrom timeline TL \\r\\n\\t\\t\\t\\t\\tJOIN timeline_master_event TLE\\r\\n\\t\\t\\t\\t\\tJOIN timeline_event_user_map TEU ON TEU.timeline_fk=TL.origin\\r\\n\\t\\t\\t\\t\\tJOIN user U on U.user_id=TEU.user_id and TEU.user_id='.intval($this->CI->entity_user_id).'\\r\\n\\t\\t\\t\\t\\twhere TL.event_origin=TLE.origin '.$c_filter.' order by TL.origin desc limit '.$start.','.$event_limit;\\r\\n\\t\\t\\treturn $this->CI->db->query($query)->result_array();\\r\\n\\t\\t} else {\\r\\n\\t\\t\\t$query = 'select count(*) as total \\r\\n\\t\\t\\t\\tfrom timeline TL\\r\\n\\t\\t\\t\\tJOIN timeline_master_event TLE\\r\\n\\t\\t\\t\\tJOIN timeline_event_user_map TEU ON TEU.timeline_fk=TL.origin\\r\\n\\t\\t\\t\\tJOIN user U on U.user_id=TEU.user_id and TEU.user_id='.intval($this->CI->entity_user_id).'\\r\\n\\t\\t\\t\\twhere TL.event_origin=TLE.origin '. $c_filter.' group by TL.origin';\\r\\n\\t\\t\\t\\treturn $this->CI->db->query($query)->row();\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc71acba9269fa38610d60ba0bf46df2\",\n \"score\": \"0.5593158\",\n \"text\": \"function getEvents() {\\n\\n $events = ['new' => __('New change'),\\n 'update' => __('Update of a change'),\\n 'solved' => __('Change solved'),\\n 'validation' => __('Validation request'),\\n 'validation_answer' => __('Validation request answer'),\\n 'closed' => __('Closure of a change'),\\n 'delete' => __('Deleting a change')];\\n\\n $events = array_merge($events, parent::getEvents());\\n asort($events);\\n return $events;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"313015d0c4b8869a8d54ba75e14b0666\",\n \"score\": \"0.5561922\",\n \"text\": \"public function get_account_changes($userid, $lastemail) {\\n// // - modified after last emailing\\n// // - not older than addition of a subject\\n// $this->db->where('users_watches_accounts.modified_on > ', $lastemail);\\n// \\n// $date_add_where = '(users_watches_accounts.date_end > users_watches.date_add '\\n// . 'OR users_watches_accounts.date_start > users_watches.date_add)';\\n// $this->db->where($date_add_where, '', false);\\n\\t\\t\\n\\t\\t// replace until line $this->db->where('users_watches.user_id', $userid); - ten uz nie\\n\\t\\t$date_where = '(users_watches_accounts.date_end > \\\"'. $lastemail . '\\\" '\\n\\t\\t\\t. 'OR users_watches_accounts.date_start > \\\"'. $lastemail . '\\\")';\\n\\t\\t\\n\\t\\t$this->isirdb->where($date_where, '', false);\\n\\t\\t\\n\\t\\t$this->isirdb->where('users_watches.user_id', $userid);\\n\\t\\t$this->isirdb->join('users_watches', 'users_watches.id = users_watches_accounts.user_watch_id');\\n\\t\\t$this->isirdb->select('\\n\\t\\t\\tusers_watches_accounts.account AS account,\\n\\t\\t\\tusers_watches_accounts.date_start AS date_start,\\n\\t\\t\\tusers_watches_accounts.date_end AS date_end,\\n\\t\\t\\tusers_watches.official_name AS official_name,\\n\\t\\t\\tusers_watches.name AS name,\\n\\t\\t\\tusers_watches.ic AS ic,\\n\\t\\t\\tusers_watches.rc AS rc,\\n\\t\\t\\tusers_watches.id AS id');\\n\\t\\t\\n\\t\\t$result = $this->isirdb->get('users_watches_accounts')->result_array();\\n\\t\\t\\n\\t\\treturn $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b903b307c0bca72c84caf971812e7b02\",\n \"score\": \"0.5518713\",\n \"text\": \"public function getActiveStatusChanges($date)\\n\\t{\\n\\t\\t$args = array();\\n\\t\\t$disb_query = $this->application_query_builder->getFailedRedisbursementsQuery(\\n\\t\\t\\t$date,\\n\\t\\t\\t$this->config->getCompany(),\\n\\t\\t\\t$args\\n\\t\\t);\\n\\n\\t\\t$disb_rs = DB_Util_1::queryPrepared($this->config->getConnection(), $disb_query, $args);\\n\\t\\t$disb_apps = $this->data_builder->getApplicationData($disb_rs);\\n\\t\\t\\n\\t\\t$args = array();\\n\\t\\t$inactive_query = $this->application_query_builder->getStatusChangesFromInactiveQuery(\\n\\t\\t\\t$date,\\n\\t\\t\\t$this->config->getCompany(),\\n\\t\\t\\t$args\\n\\t\\t);\\n\\t\\t$inactive_rs = DB_Util_1::queryPrepared($this->config->getConnection(), $inactive_query, $args);\\n\\t\\t$inactive_apps = $this->data_builder->getApplicationData($inactive_rs);\\n\\n\\t\\treturn array_merge(\\n\\t\\t\\t$disb_apps,\\n\\t\\t\\t$inactive_apps\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee8c04cab113472f2050ef87030c2af7\",\n \"score\": \"0.55175453\",\n \"text\": \"function getUpcomingEvents()\\n {\\n //1. Define the query\\n $sql = \\\"SELECT * FROM events WHERE starttime > CURRENT_DATE && archive != 1 ORDER BY starttime\\\";\\n\\n //2. Prepare the statement\\n $statement = $this->_dbh->prepare($sql);\\n\\n //4. Execute the query\\n $statement->execute();\\n\\n //5. Process the results (get OrderID)\\n return $statement->fetchAll(PDO::FETCH_ASSOC);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf15ee9e5537c792a5ca4641c950cf69\",\n \"score\": \"0.5515022\",\n \"text\": \"public function getEvents();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf15ee9e5537c792a5ca4641c950cf69\",\n \"score\": \"0.5515022\",\n \"text\": \"public function getEvents();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a202967cc7cb2122c88f5f8509f9a6e\",\n \"score\": \"0.55111283\",\n \"text\": \"public function getChanges(array $context, $new)\\n {\\n $select = clone $this->_select;\\n\\n foreach ($this->_filter as $fieldName => $contextName) {\\n if ($contextName instanceof \\\\Zend_Db_Expr) {\\n $select->where($fieldName . ' = ?', $contextName);\\n } elseif (null === $context[$contextName]) {\\n $select->where($fieldName . ' IS NULL');\\n } else {\\n $select->where($fieldName . ' = ?', $context[$contextName]);\\n }\\n }\\n\\n $options = $this->db->fetchPairs($select);\\n\\n // \\\\MUtil_Echo::track($this->getEffecteds());\\n $results = array();\\n foreach ($this->getEffecteds() as $name => $settings) {\\n foreach ($settings as $setting) {\\n $results[$name][$setting] = $options;\\n }\\n }\\n\\n return $results;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21bccd649c1152a832b568b6797531b4\",\n \"score\": \"0.5508003\",\n \"text\": \"public function getUserEvents() {\\n $user = Auth::user();\\n $userEvents = $user->events()->get();\\n $userEvents = $userEvents->concat(Event::where('leader_id', $user->id)->get());\\n return Response(EventResource::collection($userEvents), 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e3c0700bd36c46f903491334a29d63d\",\n \"score\": \"0.5486314\",\n \"text\": \"public function getRecurrentEvents(array $filters = array());\",\n \"title\": \"\"\n },\n {\n \"docid\": \"796ac54f68af127da383ae567a7dbbb6\",\n \"score\": \"0.5482742\",\n \"text\": \"public function onRefreshEvents()\\n {\\n $startTime = post('startTime');\\n $endTime = post('endTime');\\n $timeZone = post('timeZone');\\n\\n $data = [\\n 'startTime' => $startTime,\\n 'endTime' => $endTime,\\n 'timeZone' => $timeZone\\n ];\\n\\n if ($this->isFilteredByDateRange()){\\n $startTime = 0;\\n $endTime = 0;\\n }\\n\\n return Response::json($this->getRecords($startTime, $endTime));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"438649867cf1511e495ef48ea945b03c\",\n \"score\": \"0.54772687\",\n \"text\": \"public function getFbChanges($oid){\\n return $this->slc(\\\"changed\\\", \\\"feedback\\\", array(\\\"order_id\\\" => $oid));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3008f2509ec8d292f51b02d28df500f8\",\n \"score\": \"0.5463365\",\n \"text\": \"public function getEvents()\\n {\\n\\n $cached = $this->getFromCache('events_cache');\\n if ($cached !== null) {\\n return $cached;\\n }\\n\\n // Fetch past and future events (only upcoming contains the current event)\\n $events = $this->client->getEvents(\\n array(\\n 'group_urlname' => $this->group,\\n 'status' => 'past,upcoming',\\n 'desc' => 'desc'\\n )\\n );\\n\\n // Filter out events further in the future than a day\\n $dayFromNow = (time() + (24 * 60 * 60)) * 1000;\\n $events = $events->filter(function($value) use ($dayFromNow) {\\n return ($value['time'] < $dayFromNow)? true : false;\\n });\\n\\n $this->saveInCache('events_cache', $events);\\n\\n return $events;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de7138a75123dbfe668dac52fbfe1dd2\",\n \"score\": \"0.54506916\",\n \"text\": \"public function get_event_status()\\n {\\n return array(0 => 'undefined'//, 1 => 'due for approval'\\n ,2 => 'confirmed', 3 => 'cancelled'//, 4 => 'delegated'\\n ,10 => 'tentative', 11 => 'needs-action'\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"892ca89d0fc9e7f5452442e1b38e9891\",\n \"score\": \"0.5447151\",\n \"text\": \"public function getUpcomingEvents()\\n {\\n $now = date('Y-m-d');\\n $joinTable = Versioned::get_stage() === Versioned::LIVE ? 'EventPage_Live' : 'EventPage';\\n $events = EventDateTime::get()\\n ->filter(['Event.ParentID' => $this->ID,])\\n ->where(\\\"(\\\\\\\"StartDate\\\\\\\" >= '$now') OR (\\\\\\\"StartDate\\\\\\\" <= '$now' AND \\\\\\\"EndDate\\\\\\\" >= '$now')\\\")\\n ->innerJoin($joinTable, \\\"\\\\\\\"$joinTable\\\\\\\".\\\\\\\"ID\\\\\\\" = \\\\\\\"EventDateTime\\\\\\\".\\\\\\\"EventID\\\\\\\"\\\");\\n\\n $this->extend('updateEvents', $events);\\n\\n return $events;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8b2fe13bf41d90cbde5f9c815649050\",\n \"score\": \"0.54412955\",\n \"text\": \"function get_new_events( $options=array() ){\\n\\t\\t\\n\\t\\tglobal $gamo, $dbh;\\n\\t\\t\\n\\t\\t$error_append = \\\" CLASS[\\\".__CLASS__.\\\"] METHOD[\\\".__METHOD__.\\\"] DATE[\\\".date('Y-m-d H:i:s').\\\"]\\\";\\n\\t\\t\\n\\t\\tCore::ensure_defaults(array(\\n\\t\\t\\t\\t'start' => 0,\\n\\t\\t\\t\\t'number' => 1\\n\\t\\t\\t),\\n\\t\\t$options);\\n\\t\\t\\n\\t\\t$sql = \\\"SELECT id FROM \\\" . CORE_DB . \\\".\\\" . self::$table_name.\\n\\t\\t\\\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC LIMIT \\\".$options['start'].\\\",\\\".$options['number'];\\n\\n\\t\\t$sth = $dbh->prepare($sql);\\n\\n\\t\\t$vevents = array();\\n\\t\\t$sth->execute();\\n\\n\\t\\twhile($row = $sth->fetch()) {\\n\\n\\t\\t\\t$row = Core::r('virtual_events')->get_event(array(\\n\\t\\t\\t\\t\\t'id' => $row['id'],\\n\\t\\t\\t\\t\\t'public_has' => 1,\\n\\t\\t\\t\\t\\t'show_private_has' => 0\\n\\t\\t\\t\\t)\\n\\t\\t\\t);\\n\\n\\t\\t\\tarray_push($vevents, $row);\\n\\n\\t\\t}\\n\\n\\t\\treturn $vevents;\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61bf4b4c2fe5ed28e1987a093913952d\",\n \"score\": \"0.5439631\",\n \"text\": \"public function getAllByTask($task_id){\\n $changes = $this->find('all', array(\\n 'conditions'=>array(\\n 'Change.task_id'=>$task_id),\\n 'order'=>array(\\n 'Change.created DESC')));\\n return $changes; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7bc8ff9d762f37ae882c4aae9607c821\",\n \"score\": \"0.5432469\",\n \"text\": \"public function listEvent($userId){\\n\\t\\t$this->db->select('name, id, CAST(status AS UNSIGNED) AS status');\\n\\t\\t$this->db->from('event');\\n\\t\\t$this->db->where('userId',$userId);\\n\\t\\t$this->db->order_by('creationDate', 'DESC'); \\n\\t\\t$query = $this->db->get();\\n\\t\\treturn $query->result_array();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"439ccfcae477f8a5b0c4cece2ab96bd0\",\n \"score\": \"0.54290295\",\n \"text\": \"function getAllRouteEventNotifications($user_id){\\n\\t\\t\\t\\t\\n\\t\\t$sql =\\t\\\"select e.user_id,e.event_id,u.user_name as UserName,\\n\\t\\t\\t\\t\\tu.image as UserImage,e.event_name,e.event_type,e.description,\\n\\t\\t\\t\\t\\tef.status from `events` as e ,event_friends as ef\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tleft join users as u on u.user_id = ef.user_id\\n\\t\\t\\t\\t\\twhere e.event_id = ef.event_id\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tand ef.friend_id = '\\\".$user_id.\\\"' \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tand (ef.status = 'start')\\n\\t\\t\\t\\t\\tgroup by e.event_id\\n\\t\\t\\t\\t\\torder by e.event_id desc limit 0,2\\\";\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t$query = $this->db->query($sql);\\t\\n\\t\\t$data = $query->result_array();\\n\\t\\treturn $data;\\n\\t\\t\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7aa376fac52d98be913c816fbfb37113\",\n \"score\": \"0.5425724\",\n \"text\": \"public function getEvents(){\\n\\t\\t// prepares the request\\n\\t\\t$ch = curl_init();\\n\\t\\tcurl_setopt($ch, CURLOPT_URL, \\\"http://\\\" . IP . \\\"/bde_site/api/event\\\");\\n\\t\\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\\n\\t\\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: ' . TOKEN));\\n\\n\\t\\t// send the request\\n\\t\\t$output = curl_exec($ch);\\n\\t\\t$info = curl_getinfo($ch);\\n\\t\\tcurl_close($ch);\\n\\n\\t\\t// decode the reponse of the API\\n\\t\\t$events = json_decode($output, true);\\n\\n\\t\\t// format the date\\n\\t\\tforeach ($events as $key => $event) {\\n\\t\\t\\t$events[$key]['date'] = explode('T', $event['date'])[0];\\n\\t\\t}\\n\\n\\t\\t// if the user is not connected or if he is a student, remove events which are not public\\n\\t\\tif (!isset($_SESSION['status']) || $_SESSION['status'] == 'student'){\\n\\t\\t\\t$publicEvents = [];\\n\\t\\t\\t$eventNumber = sizeof($events);\\n\\t\\t\\tfor($i=0 ; $i < $eventNumber; $i++){\\n\\t\\t\\t\\t$event = array_shift($events);\\n\\t\\t\\t\\tif($event['is_public'] == 1){\\n\\t\\t\\t\\t\\tarray_push($publicEvents, $event);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn $publicEvents;\\n\\t\\t}\\n\\n\\t\\t// return all events\\n\\t\\treturn $events;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c54f4b68a0f3a3885c71b8c2337ee23\",\n \"score\": \"0.54237294\",\n \"text\": \"public function displayHistory()\\n\\t\\t\\t{\\n\\t\\t\\t\\t$data_arr = array();\\n\\t\\t\\t\\t$inc = 0;\\n\\n\\t\\t\\t\\twhile($row = $this->fetchResultRecord())\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$uDetails = $this->isMemberJoined($row['email']);\\n\\t\\t\\t\\t\\t\\t$statusClass = '';\\n\\t\\t\\t\\t\\t\\t$status = $this->LANG['invitation_history_email_status_not_joined'];\\n\\t\\t\\t\\t\\t\\tif ($uDetails)\\n\\t\\t\\t\\t\\t\\t {\\n\\t\\t\\t\\t\\t\\t\\t\\t$status = $this->LANG['invitation_history_email_status_joined'];\\n\\t\\t\\t\\t\\t\\t }\\n\\n\\t\\t\\t\\t\\t\\t$data_arr[$inc]['date_added'] = $row['date_added'];\\n\\t\\t\\t\\t\\t\\t$data_arr[$inc]['attempts'] = $row['attempts'];\\n\\t\\t\\t\\t\\t\\t$data_arr[$inc]['email'] = $row['email'];\\n\\t\\t\\t\\t\\t\\t$data_arr[$inc]['class'] = ($uDetails)?'clsJoined':'clsNotJoined';;\\n\\t\\t\\t\\t\\t\\t$data_arr[$inc]['status'] = $status;\\n\\t\\t\\t\\t\\t\\t$data_arr[$inc]['remind_url'] = getUrl('invitationhistory', '?action=remind&id='.$row['invitation_id'].'&start='.$this->fields_arr['start'], '?action=remind&id='.$row['invitation_id'].'&start='.$this->fields_arr['start']);\\n\\t\\t\\t\\t\\t\\t$data_arr[$inc]['delete_url'] = getUrl('invitationhistory', '?action=delete&id='.$row['invitation_id'].'&start'.$this->fields_arr['start'], '?action=delete&id='.$row['invitation_id'].'&start'.$this->fields_arr['start']);\\n\\t\\t\\t\\t\\t\\t$data_arr[$inc]['check_box_value'] = $row['invitation_id'];\\n\\t\\t\\t\\t\\t\\t$inc++;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\treturn $data_arr;\\n\\t\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5f03062cc7ffa7cb82017fd70521cc0\",\n \"score\": \"0.5423034\",\n \"text\": \"function disable_active_event_notification($cond=array())\\r\\n\\t{\\r\\n\\t\\t$c_filter = '';\\r\\n\\t\\tif (is_domain_user() == true) {\\r\\n\\t\\t\\t$c_filter .= ' AND TL.domain_origin = '.get_domain_auth_id();\\r\\n\\t\\t}\\r\\n\\t\\tif (valid_array($cond)) {\\r\\n\\t\\t\\t$c_filter .= $this->CI->custom_db->get_custom_condition($cond);\\r\\n\\t\\t}\\r\\n\\t\\t$temp_query = '\\tupdate user u1\\r\\n\\t\\t\\t\\t\\tinner join user u2\\r\\n\\t\\t\\t\\t\\ton u2.user_id = u1.user_id\\r\\n\\t\\t\\t\\t\\tset u1.user_name = u2.email';\\r\\n\\t\\t\\r\\n\\t\\t$query = 'update timeline_event_user_map TEU1\\r\\n\\t\\t\\t\\tinner join timeline_event_user_map TEU2 on TEU2.origin = TEU1.origin\\r\\n\\t\\t\\t\\tJOIN timeline TL\\r\\n\\t\\t\\t\\tJOIN timeline_master_event TLE\\r\\n\\t\\t\\t\\tJOIN timeline_event_user_map TEU3 ON TEU3.timeline_fk=TL.origin\\r\\n\\t\\t\\t\\tJOIN user U on U.user_id=TEU3.user_id and TEU3.user_id='.intval($this->CI->entity_user_id).'\\r\\n\\t\\t\\t\\tset TEU1.viewed_datetime=\\\"'.db_current_datetime().'\\\"\\r\\n\\t\\t\\t\\twhere TEU3.viewed_datetime IS NULL AND TEU2.origin=TEU3.origin AND TL.event_origin=TLE.origin '.$c_filter.' ';\\r\\n\\t\\treturn $this->CI->db->query($query);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f45b98d7101f4bf88dea2695ba84fc5\",\n \"score\": \"0.5419468\",\n \"text\": \"public function getAll(){\\n //old : \\n // $events = $this->events;\\n // return $events;\\n $repo = $this->om->getRepository(Event::class); \\n return $repo->findAll();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff30e564d96a76e7d663524424e010ce\",\n \"score\": \"0.5400968\",\n \"text\": \"public function fetchEvents()\\n {\\n // TODO: Implement fetchEvents() method.\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d78d2ee42f5fa9edbb4bdccc3b75203\",\n \"score\": \"0.54002\",\n \"text\": \"private function getOldTicketsList() {\\r\\n\\t\\t$sql = \\\"SELECT TOP 5 summary, TicketNbr, status_description AS status, \\\";\\r\\n\\t\\t$sql .= \\\"company_name, age, resource_list as resources \\\";\\r\\n\\t\\t$sql .= \\\"FROM v_rpt_Service \\\";\\r\\n\\t\\t$sql .= \\\"WHERE status_description NOT LIKE '>%' \\\";\\r\\n\\t\\t$sql .= \\\"AND status_description NOT LIKE 'Completed' \\\";\\r\\n\\t\\t$sql .= \\\"ORDER BY age desc\\\";\\r\\n\\t\\t$result = sqlsrv_query($this->conn, $sql) or die ('Error in SQL: ' . $sql);\\r\\n\\r\\n\\t\\t$r = null;\\r\\n\\t\\t$i = 0;\\r\\n\\t\\twhile($row = sqlsrv_fetch_array($result)) {\\r\\n\\t\\t\\t$r[$i]['summary'] = $row['summary'];\\r\\n\\t\\t\\t$r[$i]['status'] = $row['status'];\\r\\n\\t\\t\\t$r[$i]['ticket'] = $row['TicketNbr'];\\r\\n\\t\\t\\t$r[$i]['client'] = $row['company_name'];\\r\\n\\t\\t\\t$r[$i]['age'] = $row['age'];\\r\\n\\t\\t\\t$r[$i]['resources'] = $row['resources'];\\r\\n\\t\\t\\t$i++;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\treturn($r);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d28c8676a77217b6b591e27e5dcc0d2\",\n \"score\": \"0.53971356\",\n \"text\": \"function getAdminEvents(){\\r\\n $response = array('ok' => false, 'msg' => \\\"Undefined error\\\");\\r\\n \\r\\n openDatabase();\\r\\n $adminId = getLoggedInAdminId();\\r\\n \\r\\n // Make sure we can retrieve user session's admin id\\r\\n if (!$adminId) {\\r\\n $response['ok'] = false;\\r\\n $response['msg'] = \\\"Failed to retrieve logged in user id\\\";\\r\\n }\\r\\n else {\\r\\n $query = sprintf(\\\"SELECT * from events WHERE admin_id=%s ORDER BY event_id ASC;\\\", $adminId);\\r\\n $result = mysql_query($query);\\r\\n\\r\\n $eventsArray = array();\\r\\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\\r\\n $eventsArray[] = $row;\\r\\n }\\r\\n \\r\\n $response['eventsArray'] = $eventsArray; \\r\\n $response['ok'] = true;\\r\\n $response['msg'] = \\\"OK\\\";\\r\\n }\\r\\n closeDatabase();\\r\\n \\r\\n return $response;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2acd68079bb9219066cf67315c0ce2be\",\n \"score\": \"0.5378306\",\n \"text\": \"public function event_history(/* ... */)\\n {\\n return $this->_event_history;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e032258ce17587fb4a3b87d622fdd9d\",\n \"score\": \"0.53782415\",\n \"text\": \"public function getEventList() {\\n $response = $this->client->get(\\n $this->apiUrl . \\\"events\\\");\\n return $response->json();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1f0344503041e639c2a336ed3e6828c\",\n \"score\": \"0.537361\",\n \"text\": \"public function getChanges(array $context, $new)\\n {\\n $empty = $this->util->getTranslated()->getEmptyDropdownArray();\\n $inputFieldName = reset($this->_dependentOn);\\n $organizationId = $context[$inputFieldName];\\n\\n \\\\MUtil_Echo::track($organizationId);\\n\\n if ($organizationId) {\\n $tracks = $this->loader->getUtil()->getTrackData()->getTracksForOrgs([$organizationId => $organizationId]);\\n foreach($this->_effecteds as $effectedField=>$effectedData) {\\n foreach($effectedData as $type) {\\n $output[$effectedField][$type] = $empty + $tracks;\\n }\\n }\\n return $output;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7562cb62866d8f4d61a9c2f679b46979\",\n \"score\": \"0.53729236\",\n \"text\": \"public function get_all_events()\\n {\\n // get today date for check past events or not\\n $todayData = date(\\\"m/d/Y\\\");\\n // get option from database\\n $past_events_option = get_option('past_events');\\n // preparing sql query\\n $sql = \\\"SELECT * FROM $this->tableName \\\";\\n if ($past_events_option != 'yes') {\\n $sql .= \\\"WHERE `date` >= \\\" . $todayData;\\n }\\n global $wpdb;\\n $allevents = $wpdb->get_results($sql);\\n return $allevents;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6d19e091b07b4e3e94f4029b07fbe6b\",\n \"score\": \"0.536159\",\n \"text\": \"public function changestatusAction()\\n {\\n $user_params=$this->_request->getParams();\\n $automail=new Ep_Message_AutoEmails();\\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\\n\\n if($user_params['status'] == 'closed')\\n $data = array(\\\"status\\\"=>$user_params['status'], \\\"cancelled_at\\\"=>date('Y-m-d H:i:s'));////////updating\\n elseif($user_params['status'] == 'done')\\n $data = array(\\\"status\\\"=>$user_params['status'], \\\"closed_at\\\"=>date('Y-m-d H:i:s'));////////updating\\n else\\n $data = array(\\\"status\\\"=>$user_params['status'], \\\"closed_at\\\"=>NULL, \\\"cancelled_at\\\"=>NULL);////////updating\\n $query = \\\"identifier= '\\\".$user_params['requestId'].\\\"'\\\";\\n $requestdetails = $ftvrequest_obj->requestDetailsById($user_params['requestId']);\\n $contactId = $requestdetails[0]['request_by'];\\n $contactdetails = $ftvcontacts_obj->getFtvContactDetails($contactId);\\n $contactName = $contactdetails[0]['first_name'].\\\" \\\".$contactdetails[0]['last_name'];\\n $parameters['ftvobject'] = $requestdetails[0]['request_object'];\\n $parameters['ftvcontactName'] = $contactName;\\n $ftvrequest_obj->updateFtvRequests($data,$query);\\n ////making the time resume if its in pause////\\n $inpause = $ftvpausetime_obj->inPause($user_params['requestId']);\\n if($inpause == 'yes')\\n {\\n $data = array(\\\"resume_at\\\"=>date('Y-m-d H:i:s'));////////updating\\n $query = \\\"ftvrequest_id = '\\\".$user_params['requestId'].\\\"' AND resume_at IS NULL \\\";\\n $ftvpausetime_obj->updateFtvPauseTime($data,$query);\\n }\\n if($user_params['status'] == 'done')\\n {\\n if($this->adminLogin->userId != '110823103540627' ) ///when not johny head of BO user for FTV changed\\n {\\n $parameters['ftvrequestlink'] = \\\"/ftvchaine/ftvch-requests?submenuId=ML11-SL6\\\";\\n $parameters['ftvType'] = \\\"chaine\\\";\\n $automail->messageToEPMail('110823103540627',114,$parameters);// to johny\\n $parameters['ftvrequestlink'] = \\\"http://ep-test.edit-place.com/ftvchaine/index\\\";\\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\\n }\\n else // in case jhony change the status\\n {\\n $parameters['ftvrequestlink'] = \\\"http://ep-test.edit-place.com/ftvchaine/index\\\";\\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\\n }\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4d1a0e5c518cd25aa3e7e611a0a0661\",\n \"score\": \"0.53550774\",\n \"text\": \"function getAllPendingEmailData($id){\\n\\t\\t\\t$this->db->select('ticked_id,subject,isCreated,fromEmailId',false);\\n\\t\\t\\t$this->db->from('helpdesk_ticked_records as htr');\\t\\t\\n\\t\\t\\t$this->db->where('htr.teamId',$id);\\t\\n\\t\\t\\t$where = '(status=\\\"1\\\" or status=\\\"2\\\" or status=\\\"3\\\")';\\n\\t\\t\\t$this->db->where($where);\\t\\t \\t\\t\\t \\n\\t\\t\\t$result = $this->db->get()->result_array();\\t\\t\\t\\n\\t\\t\\treturn $result; \\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3cec38af29dd4e75091971ec86196d5e\",\n \"score\": \"0.53546435\",\n \"text\": \"public function getOtherEvents();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fc87d8d9a3618f440542d4884489945\",\n \"score\": \"0.53449064\",\n \"text\": \"function updateStatus($order, $newStatus) {\\n $data = [];\\n switch ($newStatus) {\\n case 2: #processed\\n $event = new OrderWasProcessed($order);\\n $data['processed_on'] = Carbon::now();\\n break;\\n\\n case 4: #traveling\\n $event = new OrderShippedOn($order);\\n $data['shipped_on'] = Carbon::now();\\n $data['expected_delivery_on'] = Carbon::now()->addDay();\\n break;\\n\\n case 5: #delivered\\n $event = new OrderWasDelivered($order);\\n $data['delivered_on'] = Carbon::now();\\n break;\\n }\\n\\n if (isset($event) && $event) {\\n event($event);\\n }\\n\\n return $data;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"968fa31ab19d1f2cb99299af9b30d2d0\",\n \"score\": \"0.5343663\",\n \"text\": \"public function getEvents()\\n {\\n $startDate = new \\\\DateTime(\\\"-1 months\\\");\\n $endDate = new \\\\DateTime(\\\"+3 months\\\");\\n\\n $repo = EntityUtils::getRepository(\\\"EventLegacy\\\");\\n\\n //Use a different function for getting events for a student\\n if ($this->user_context->isStudent()) {\\n return $this->getStudentEvents($startDate, $endDate);\\n }\\n\\n $eventResults = $repo->getStudentEventsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\\n $quickAddResults = $repo->getStudentQuickAddShiftsByProgram($this->user_context->program->id, $startDate, $endDate, $this->filters);\\n\\n return ['events' => $eventResults, 'quick_add_shifts' => $quickAddResults];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ddd301b1fdbafe2123ea8962eb93e22\",\n \"score\": \"0.53342885\",\n \"text\": \"public function getTimeEventsList(){\\n return $this->_get(8);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0b163b9556042647756978620deea74\",\n \"score\": \"0.5333301\",\n \"text\": \"public function getChange();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d04dad6bb065f74039c4721b47b1a33\",\n \"score\": \"0.533169\",\n \"text\": \"protected function getHistoryWith($args) {\\n\\n if ($args['ent_pas_email'] == '' || $args['ent_date_time'] == '')\\n return $this->_getStatusMessage(1, 1);\\n\\n $this->curr_date_time = urldecode($args['ent_date_time']);\\n\\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\\n\\n if (is_array($returned))\\n return $returned;\\n\\n $pageNum = (int) $args['ent_page'];\\n\\n if ($args['ent_page'] == '')\\n $pageNum = 1;\\n\\n $lowerLimit = ($this->historyPageSize * $pageNum) - $this->historyPageSize;\\n $upperLimit = $this->historyPageSize * $pageNum;\\n\\n $selectAppntsQry = \\\"select a.remarks,a.appointment_dt from appointment a,slave p \\\";\\n $selectAppntsQry .= \\\"where a.slave_id = p.slave_id and a.mas_id = '\\\" . $this->User['entityId'] . \\\"' and p.email = '\\\" . $args['ent_pas_email'] . \\\"' \\\";\\n $selectAppntsQry .= \\\"limit $lowerLimit,$upperLimit\\\";\\n\\n $selectAppntsRes = mysql_query($selectAppntsQry, $this->db->conn);\\n\\n if (mysql_num_rows($selectAppntsRes) <= 0)\\n return $this->_getStatusMessage(32, 12);\\n\\n $data = array();\\n\\n while ($details = mysql_fetch_assoc($selectAppntsRes)) {\\n $data[] = array('apptDt' => $details['appointment_dt'], 'remarks' => $details['remarks']);\\n }\\n\\n $errMsgArr = $this->_getStatusMessage(33, 2);\\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'history' => $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0dbb8e6b6393c3bd750a3bc6e72e9a0e\",\n \"score\": \"0.5328096\",\n \"text\": \"public function getEvents(){\\n\\t\\t$events = Event::where('owner', Auth::user()->id)->where('deleted', 0)->get();\\n\\t\\treturn response()->json(['data' => $events]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87806c6cfc3a5817663caff27eca043b\",\n \"score\": \"0.53221697\",\n \"text\": \"public function getFollowUpEvents($notification)\\n {\\n $couponsTable = CouponsTable::getTableName();\\n $eventsTable = EventsTable::getTableName();\\n $eventsPeriodsTable = EventsPeriodsTable::getTableName();\\n $customerBookingsEventsPeriods = CustomerBookingsToEventsPeriodsTable::getTableName();\\n $eventsProvidersTable = EventsProvidersTable::getTableName();\\n $paymentsTable = PaymentsTable::getTableName();\\n\\n try {\\n $notificationType = $notification->getType()->getValue();\\n\\n $statement = $this->connection->query(\\n \\\"SELECT\\n e.id AS event_id,\\n e.name AS event_name,\\n e.status AS event_status,\\n e.bookingOpens AS event_bookingOpens,\\n e.bookingCloses AS event_bookingCloses,\\n e.recurringCycle AS event_recurringCycle,\\n e.recurringOrder AS event_recurringOrder,\\n e.recurringUntil AS event_recurringUntil,\\n e.maxCapacity AS event_maxCapacity,\\n e.price AS event_price,\\n e.description AS event_description,\\n e.color AS event_color,\\n e.show AS event_show,\\n e.locationId AS event_locationId,\\n e.customLocation AS event_customLocation,\\n e.parentId AS event_parentId,\\n e.created AS event_created,\\n e.notifyParticipants AS event_notifyParticipants,\\n e.deposit AS event_deposit,\\n e.depositPayment AS event_depositPayment,\\n e.depositPerPerson AS event_depositPerPerson,\\n \\n \\n ep.id AS event_periodId,\\n ep.periodStart AS event_periodStart,\\n ep.periodEnd AS event_periodEnd,\\n \\n cb.id AS booking_id,\\n cb.customerId AS booking_customerId,\\n cb.status AS booking_status,\\n cb.price AS booking_price,\\n cb.info AS booking_info,\\n cb.utcOffset AS booking_utcOffset,\\n cb.aggregatedPrice AS booking_aggregatedPrice,\\n cb.persons AS booking_persons,\\n \\n p.id AS payment_id,\\n p.amount AS payment_amount,\\n p.dateTime AS payment_dateTime,\\n p.status AS payment_status,\\n p.gateway AS payment_gateway,\\n p.gatewayTitle AS payment_gatewayTitle,\\n p.data AS payment_data,\\n \\n c.id AS coupon_id,\\n c.code AS coupon_code,\\n c.discount AS coupon_discount,\\n c.deduction AS coupon_deduction,\\n c.limit AS coupon_limit,\\n c.customerLimit AS coupon_customerLimit,\\n c.status AS coupon_status\\n FROM {$eventsTable} e\\n INNER JOIN {$eventsPeriodsTable} ep ON ep.eventId = e.id\\n INNER JOIN {$customerBookingsEventsPeriods} cbe ON cbe.eventPeriodId = ep.id\\n INNER JOIN {$this->bookingsTable} cb ON cb.id = cbe.customerBookingId\\n LEFT JOIN {$paymentsTable} p ON p.customerBookingId = cb.id\\n LEFT JOIN {$couponsTable} c ON c.id = cb.couponId\\n LEFT JOIN {$eventsProvidersTable} epr ON epr.eventId = e.id\\n LEFT JOIN {$this->usersTable} pu ON pu.id = epr.userId\\n WHERE e.notifyParticipants = 1 \\n AND cb.status = 'approved' \\n AND e.id NOT IN (\\n SELECT nl.eventId \\n FROM {$this->table} nl \\n INNER JOIN {$this->notificationsTable} n ON nl.notificationId = n.id \\n WHERE n.name = 'customer_event_follow_up' \\n AND n.type = '{$notificationType}'\\n )\\\"\\n );\\n\\n $rows = $statement->fetchAll();\\n } catch (\\\\Exception $e) {\\n throw new QueryExecutionException('Unable to find events in ' . __CLASS__, $e->getCode(), $e);\\n }\\n\\n return EventFactory::createCollection($rows);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5496d1bfcfeb0b05f677debdf90ee92c\",\n \"score\": \"0.53145677\",\n \"text\": \"public function readNewMembers(){\\r\\n $results = array();\\r\\n\\r\\n if ( null !== $this->getDB() ) {\\r\\n $dbs = $this->getDB()->prepare('select * from Members, MemberStatus where members.MemberID = memberstatus.MemberID and StatusCode = \\\"A\\\" and DateNew = CURDATE()');\\r\\n\\r\\n if ( $dbs->execute() && $dbs->rowCount() > 0 ) {\\r\\n $results = $dbs->fetchAll(PDO::FETCH_ASSOC);\\r\\n }\\r\\n } \\r\\n return $results;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9e1d4125921728018d4a497e28c4f96\",\n \"score\": \"0.53049886\",\n \"text\": \"function hookAjaxGetEvents() {\\n\\n\\t \\t$start = intval($_POST['start']);\\n\\t \\t$end = intval($_POST['end']);\\n\\n\\t \\t$args['datefrom'] = $start;\\n\\t \\t$args['dateto'] = $end;\\n\\t \\t$args['datemode'] = FSE_DATE_MODE_ALL;\\n\\t \\t$args['number'] = 0; // Do not limit!\\n\\n\\t \\tif (isset($_POST['state']))\\n\\t \\t$args['state'] = $_POST['state'];\\n\\t \\tif (isset($_POST['author']))\\n\\t \\t$args['author'] = $_POST['author'];\\n\\t \\tif (isset($_POST['categories']))\\n\\t \\t$args['categories'] = $_POST['categories'];\\n\\t \\tif (isset($_POST['include']))\\n\\t \\t$args['include'] = $_POST['include'];\\n\\t \\tif (isset($_POST['exclude']))\\n\\t \\t$args['exclude'] = $_POST['exclude'];\\n\\t \\t$events = $this->getEventsExternal($args);\\n\\n\\t \\t// Process array of events\\n\\t \\t$events_out = array();\\n\\t \\tforeach($events as $evt) {\\n\\t \\t\\tunset($e);\\n\\t \\t\\t$e['id'] = $evt->eventid;\\n\\t \\t\\t$e['post_id'] = $evt->postid;\\n\\t \\t\\t$e['post_url'] = (empty($evt->postid) ? '' : get_permalink($evt->postid));\\n\\t \\t\\t$e['title'] = $evt->subject;\\n\\t \\t\\t$e['allDay'] = ($evt->allday == true ? true : false);\\n\\t \\t\\t$e['start'] = mysql2date('c', $evt->from);\\n\\t \\t\\t$e['end'] = mysql2date('c', $evt->to);\\n\\t \\t\\t$e['editable'] = false;\\n\\n\\t \\t\\t$classes = array();\\n\\t \\t\\tforeach($evt->categories as $c) {\\n\\t \\t\\t\\t$classes[] = 'category-'.$c;\\n\\t \\t\\t}\\n\\t \\t\\tif (count($classes) > 0) {\\n\\t \\t\\t\\t$e['className'] = $classes;\\n\\t \\t\\t}\\n\\t \\t\\t\\n\\t \\t\\t$events_out[] = $e;\\n\\t \\t}\\n\\n\\t \\t$response = json_encode($events_out);\\n\\n\\t \\theader(\\\"Content-Type: application/json\\\");\\n\\t \\techo $response;\\n\\n\\t \\texit;\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57a9e2ddb7158771c2bc2f1cdf610b5b\",\n \"score\": \"0.5302713\",\n \"text\": \"private function emailChanges(){\\n $emails = $this->getAdminEmails(get_option('notification_users'));\\n $custom_email = get_option('notification_email');\\n\\n if(isset($custom_email['email_add']) && !empty($custom_email['email_add']))\\n $emails[] = $custom_email['email_add'];\\n\\n if(!$emails){\\n $emails = get_bloginfo('admin_email');\\n }\\n\\n $message = \\\" Changed Files(\\\".count($this->md5_changed_output).\\\"):\\\\n\\\";\\n $changes = $this->order_changed_log();\\n $files = 0;\\n foreach($changes as $ext => $log_type){\\n $message .= \\\"\\\\nFile Type (\\\".$ext.\\\"): \\\\n\\\";\\n foreach($log_type as $k => $v){\\n $files++;\\n $message .= $v['real_path'].' => '.$v['modified']. \\\"\\\\n\\\";\\n }\\n }\\n\\n wp_mail( $emails, 'WP-Checksum File Modifications: '.$files, $message, '', array(MD5_HASHER_DIR.$this->file_change));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70f99c272aec4f7c3e9aea559ed9cf13\",\n \"score\": \"0.5301871\",\n \"text\": \"public function AddEditStatusCode(){\\n\\t\\ttry{\\n\\t\\t\\tif(isset($this->getData['emailstatus'])){\\n\\t\\t\\t\\t\\tif($this->getData['emailstatus'] == '0' && isset($this->getData['new_notification_name']) && $this->getData['new_notification_name'] != ''){\\n\\t\\t\\t\\t\\t\\t$inserted = $this->_db->insert(MAIL_NOTIFY_TYPES,array('notification_name' => $this->getData['new_notification_name'],'notification_staus' => $this->getData['notification_sta'],'admin_display'=>'1','templatecategory_id'=>3));\\n\\t\\t\\t\\t\\t\\t$this->getData['notification_id'] = ($inserted)?$this->_db->lastInsertId():'0';\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\tunset($this->getData['notification_id']);\\n\\t\\t\\t\\t}\\n\\t\\t\\tif(isset($this->getData['mode']) && $this->getData['mode'] == 'add'){\\n\\t\\t\\t\\treturn ($this->insertInToTable(STATUS_MASTER,array($this->getData))) ? TRUE : FALSE;\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$where = 'master_id ='.Zend_Encript_Encription:: decode($this->getData['token']);\\n\\t\\t\\t\\t$this->getData['modify_by'] = $this->Useconfig['user_id'];\\n\\t\\t\\t\\t$this->getData['modify_ip'] = commonfunction::loggedinIP();\\n\\t\\t\\t\\t$this->getData['modify_date'] = '';\\n\\t\\t\\t\\treturn ($this->UpdateInToTable(STATUS_MASTER,array($this->getData),$where)) ? TRUE : FALSE;\\n\\t\\t\\t}\\n\\t\\t}catch (Exception $e) {\\n\\t\\t\\t\\t $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\\n\\t\\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c5fbb9219c27190ef3c6e08cac453dc\",\n \"score\": \"0.52981585\",\n \"text\": \"public function taskhistory(){\\n\\n // SQL statement\\n $sql = \\\"SELECT user_id FROM user WHERE user_name = '\\\".$_SESSION['user'].\\\"'\\\";\\n $result = $this->con->query($sql);\\n $result = $result->fetch_assoc();\\n $id = $result['user_id'];\\n\\n\\n // Get Task History Based on user ID\\n\\n // SQL statement\\n $sql = \\\"SELECT * FROM approval WHERE user_id = '\\\".$id.\\\"' ORDER BY date DESC LIMIT 10\\\";\\n $result = $this->con->query($sql);\\n if ($result->num_rows > 0){\\n while ($row = $result->fetch_assoc()){\\n $array[] = $row;\\n }\\n return $array;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30bb550c3c18511ded63a7b771afa708\",\n \"score\": \"0.5285222\",\n \"text\": \"public function getEvents()\\n {\\n return json_decode((string) $this->response->getBody())->events;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6e44e4e531f04f10ece0a4f31e662dc\",\n \"score\": \"0.5283579\",\n \"text\": \"public function sendStatusUpdateNotifications(OrderEvent $event)\\n {\\n $order = $event->getOrder();\\n switch ($order->getStatus()) {\\n\\n case Order::STATUS_AWAITING_SEPA:\\n // send customer e-mail\\n $customerEmailVars = array(\\n 'customerName' => $order->getCustomer()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_AWAITING_SEPA,\\n $order->getCustomer()->getEmail(),\\n $order->getCustomer()->getFullname(),\\n $customerEmailVars\\n );\\n\\n break;\\n\\n case Order::STATUS_NEW:\\n // get payment\\n $payment = $order->getPayments()->first();\\n\\n // is transport\\n $isTransport = true;\\n if (Shipping::TYPE_NOT_SHIPPED === $order->getShippingType()) {\\n $isTransport = false;\\n }\\n\\n // send customer e-mail\\n $customerEmailVars = array(\\n 'customerName' => $order->getCustomer()->getFullname(),\\n 'invoiceUrl' => $this->router->generate('order_invoice_download', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\\n 'orderReference' => $order->getReference(),\\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\\n 'paymentId' => $payment->getChargeId(),\\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\\n 'BoolTransport' => $isTransport,\\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\\n 'expectedDeliveryDate' => null !== $order->getExpectedDeliveryDate() ? $order->getExpectedDeliveryDate()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y') : '',\\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_CONFIRMATION_CUSTOMER,\\n $order->getCustomer()->getEmail(),\\n $order->getCustomer()->getFullname(),\\n $customerEmailVars\\n );\\n\\n // send maker e-mail\\n $makerEmailVars = array(\\n 'makerName' => $order->getMaker()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\\n 'BoolTransport' => $isTransport,\\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\\n 'shippingLimitDate' => null !== $order->getShouldBeReadyAt() ? $order->getShouldBeReadyAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y') . ' avant 17h' : '',\\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountForMakerTaxIncl() / 100), 2)// only display production amount - coupon amount to maker\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_CONFIRMATION_MAKER,\\n $order->getMaker()->getUser()->getEmail(),\\n $order->getMaker()->getFullname(),\\n $makerEmailVars\\n );\\n\\n break;\\n\\n case Order::STATUS_CANCELED:\\n // order has been canceled by the customer\\n if (OrderEvent::ORIGIN_CUSTOMER === $event->getOrigin()) {\\n\\n // get order payment id\\n $paymentId = 'n/a';\\n $payments = $order->getPayments();\\n if (0 < count($payments)) {\\n /** @var Payment $payment */\\n $payment = $payments[0];\\n $paymentId = $payment->getChargeId();\\n }\\n\\n // send customer e-mail\\n $customerEmailVars = array(\\n 'customerName' => $order->getCustomer()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\\n 'paymentId' => $paymentId,\\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_CANCELLATION_CUSTOMER,\\n $order->getCustomer()->getEmail(),\\n $order->getCustomer()->getFullname(),\\n $customerEmailVars\\n );\\n\\n // send maker e-mail\\n $makerEmailVars = array(\\n 'makerName' => $order->getMaker()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountForMakerTaxIncl() / 100), 2)// only display production amount - coupon amount to maker\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_CANCELLATION_MAKER,\\n $order->getMaker()->getUser()->getEmail(),\\n $order->getMaker()->getFullname(),\\n $makerEmailVars\\n );\\n }\\n break;\\n\\n case Order::STATUS_TRANSIT:\\n\\n // get shipment\\n $shipments = $order->getShipments();\\n /** @var Shipment $shipment */\\n $shipment = $shipments[0];\\n\\n // send customer e-mail\\n $emailVars = array(\\n 'customerName' => $order->getCustomer()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\\n 'trackingUrl' => $shipment->getTrackingUrl(),\\n 'trackingNumber' => $shipment->getParcelNumber(),\\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_SHIPPED,\\n $order->getCustomer()->getEmail(),\\n $order->getCustomer()->getFullname(),\\n $emailVars\\n );\\n\\n break;\\n\\n case Order::STATUS_READY_FOR_PICKUP:\\n\\n // send customer e-mail\\n $emailVars = array(\\n 'customerName' => $order->getCustomer()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\\n 'shippingType' => Shipping::getReadableShippingType($order->getShippingType()),\\n 'shippingAddress' => $order->getShippingAddress()->getFlatAddress(),\\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL),\\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_READY_FOR_PICKUP,\\n $order->getCustomer()->getEmail(),\\n $order->getCustomer()->getFullname(),\\n $emailVars\\n );\\n\\n break;\\n\\n case Order::STATUS_REFUNDED:\\n\\n // get order payment id\\n $paymentId = 'n/a';\\n $payments = $order->getPayments();\\n if (0 < count($payments)) {\\n /** @var Payment $payment */\\n $payment = $payments[0];\\n $paymentId = $payment->getChargeId();\\n }\\n\\n // get order refund id\\n $refundId = 'n/a';\\n $refunds = $order->getRefunds();\\n if (0 < count($refunds)) {\\n /** @var Refund $refund */\\n $refund = $refunds[0];\\n $refundId = $refund->getRefundId();\\n }\\n\\n // send customer e-mail\\n $customerEmailVars = array(\\n 'customerName' => $order->getCustomer()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\\n 'paymentId' => $paymentId,\\n 'refundId' => $refundId,\\n 'orderTotalAmountTaxIncl' => number_format(($order->getTotalAmountTaxIncl() / 100), 2)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_REFUNDED,\\n $order->getCustomer()->getEmail(),\\n $order->getCustomer()->getFullname(),\\n $customerEmailVars\\n );\\n\\n break;\\n\\n case Order::STATUS_DELIVERED:\\n\\n // send customer e-mail\\n /* There is no longer any immediate notification sending when the order is delivered. The notification is made on D + 1 via the reminder system\\n $customerEmailVars = array(\\n 'customerName' => $order->getCustomer()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n //'ratingUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL) . '#rating'\\n 'ratingUrl' => $this->router->generate('order_rating', array('token' => $order->getToken()), $this->router::ABSOLUTE_URL) . '#rating'\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_RATING,\\n $order->getCustomer()->getEmail(),\\n $order->getCustomer()->getFullname(),\\n $customerEmailVars\\n );\\n */\\n break;\\n\\n case Order::STATUS_CLOSED:\\n\\n if ($order->getRating()->getEnabled() == True ) {\\n // send maker e-mail\\n $makerEmailVars = array(\\n 'makerName' => $order->getMaker()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'orderDate' => $order->getCreatedAt()->setTimezone(new \\\\DateTimeZone('Europe/Paris'))->format('d/m/Y à H:i'),\\n 'orderRateValue' => $order->getRating()->getRate(),\\n 'orderRateValue' => $order->getRating()->getComment(),\\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\\n\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_RATE,\\n $order->getMaker()->getUser()->getEmail(),\\n $order->getMaker()->getFullname(),\\n $makerEmailVars\\n );\\n }\\n break;\\n\\n\\n\\n\\n case Order::STATUS_FILE_AVAILABLE:\\n\\n // send customer e-mail\\n $customerEmailVars = array(\\n 'customerName' => $order->getCustomer()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'accountUrl' => $this->router->generate('order_customer_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_FILE_AVAILABLE_CUSTOMER,\\n $order->getCustomer()->getEmail(),\\n $order->getCustomer()->getFullname(),\\n $customerEmailVars\\n );\\n\\n break;\\n\\n case Order::STATUS_FILE_REJECTED:\\n\\n // send maker e-mail\\n $makerEmailVars = array(\\n 'makerName' => $order->getMaker()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_FILE_REJECTED_MAKER,\\n $order->getMaker()->getUser()->getEmail(),\\n $order->getMaker()->getFullname(),\\n $makerEmailVars\\n );\\n\\n break;\\n\\n case Order::STATUS_FILE_VALIDATED:\\n\\n // send maker e-mail\\n $makerEmailVars = array(\\n 'makerName' => $order->getMaker()->getFullname(),\\n 'orderReference' => $order->getReference(),\\n 'BoolTransport' => $order->getQuotation()->getProject()->getType()->isShipping(),\\n 'accountUrl' => $this->router->generate('order_maker_see', array('reference' => $order->getReference()), $this->router::ABSOLUTE_URL)\\n );\\n $this->sendinBlue->sendTransactional(\\n SendinBlue::TEMPLATE_ID_ORDER_FILE_VALIDATED_MAKER,\\n $order->getMaker()->getUser()->getEmail(),\\n $order->getMaker()->getFullname(),\\n $makerEmailVars\\n );\\n\\n break;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f8f72633f1eace62dff3089066a2a4c\",\n \"score\": \"0.52754956\",\n \"text\": \"public function viewNewEvents()\\n {\\n $this->load->model('M_Event_table');\\n $this->load->model('M_Customer_table');\\n $events = $this->M_Event_table->getNewEvents();\\n $customers = $this->M_Customer_table->getAllCustomers();\\n\\n $returnData['newEventsMore']= $events;\\n $returnData['customers'] = $customers;\\n\\n $this->load->view('admin/viewNewEvents',$returnData);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b17a067b3c982e8e9fd93d655dbcd1bb\",\n \"score\": \"0.52652997\",\n \"text\": \"public function updateUrgencyStatuses() {\\n\\n\\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\\n\\n foreach ($overdueTickets as $i => $overdueTicket) {\\n\\n $this->id = $overdueTicket['Ticket']['ticket_id'];\\n $overdueTicket['Ticket']['status'] = 'Overdue';\\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\\n }\\n\\n\\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\\n\\n foreach ($urgendTickets as $i => $urgendTicket) {\\n\\n $this->id = $urgendTicket['Ticket']['ticket_id'];\\n $urgendTicket['Ticket']['status'] = 'Urgend';\\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fa237c2f07eb91b11f7d54fea307fec\",\n \"score\": \"0.5264332\",\n \"text\": \"function get_all_events(){\\n global $database_ged;\\n $events = array();\\n $sql = \\\"SELECT id FROM nagios_queue_active\\\";\\n $result = sql($database_ged, $sql);\\n foreach($result as $row){\\n array_push($events,$row[\\\"id\\\"].\\\":nagios\\\");\\n }\\n $result = null;\\n $sql = \\\"SELECT id FROM snmptrap_queue_active\\\";\\n $result = sql($database_ged, $sql);\\n foreach($result as $row){\\n array_push($events,$row[\\\"id\\\"].\\\":snmptrap\\\");\\n }\\n\\n return $events;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"598871ab9f2dd16e89e1bf530471cea7\",\n \"score\": \"0.5257694\",\n \"text\": \"protected function getChangedRemoteObjects()\\n {\\n $query = $this->getRemoteObjectsQuery();\\n $table = $this->getRemoteBaseTable();\\n $query->addWhere(\\\"\\\\\\\"{$table}\\\\\\\".\\\\\\\"_ImportedID\\\\\\\" > 0\\\");\\n $query->addWhereAny(array(\\n \\\"\\\\\\\"{$table}\\\\\\\".\\\\\\\"_ImportedDate\\\\\\\" IS NULL\\\",\\n \\\"\\\\\\\"{$table}\\\\\\\".\\\\\\\"_ImportedDate\\\\\\\" < \\\\\\\"{$table}\\\\\\\".\\\\\\\"LastEdited\\\\\\\"\\\"\\n ));\\n $items = iterator_to_array($this->task->query($query));\\n return new ArrayList($items);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"141d51cff33be87ca2832d7424f8d4fa\",\n \"score\": \"0.52539617\",\n \"text\": \"function ef_notifications_get($transition = NULL, $rid = NULL) {\\n $emails = array();\\n $query = db_select('ef_notifications_emails', 'wve')\\n ->fields('wve', array('rid', 'from_name', 'to_name', 'subject', 'message'));\\n if ($transition) {\\n $query->condition('wve.from_name', $transition->from_name);\\n $query->condition('wve.to_name', $transition->to_name);\\n }\\n if ($rid) {\\n $query->condition('wve.rid', $rid);\\n }\\n $result = $query->execute();\\n foreach ($result as $row) {\\n $emails[$row->from_name . '_to_' . $row->to_name][$row->rid] = $row;\\n }\\n return $emails;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"baee53a61ad0e70ad7a214b096156c0b\",\n \"score\": \"0.5248705\",\n \"text\": \"abstract public static function getStatuses();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7cc08b83b3330eaf861a29face3e1f1\",\n \"score\": \"0.52453005\",\n \"text\": \"public function getWhoToNotifyByEmail()\\n\\t{\\n\\t\\t//return array\\n\\t\\t$group = Group::model()->findByPk($this->groupId);\\n\\t\\t$emails = $group->getMembersByStatus(User::STATUS_ACTIVE);\\n\\t\\treturn $emails->data;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fe85f6d0765e83640fbb0ee2bcc5762\",\n \"score\": \"0.5243674\",\n \"text\": \"public function past_events()\\n {\\n if($this->Auth->user('level') != \\\"Officer\\\" && $this->Auth->user('level') != \\\"Admin\\\")\\n $this->redirect(\\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\\n\\n $allRsvps = $this->Event->EventsUser->find('all');\\n $this->set('rsvps', $allRsvps);\\n\\n $this->EventHelper();\\n\\n $this->layout = 'hero-ish';\\n $this->Session->write('Page', 'Hub');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8825e264da7b9b367f960c35d6adcca7\",\n \"score\": \"0.52436244\",\n \"text\": \"function update_status()\\n\\t{\\n\\t\\t$data = filter_forwarded_data($this);\\n\\t\\t\\n\\t\\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\\n\\t\\t\\n\\t\\t# all good\\n\\t\\tif(!empty($response) && $response['boolean']){\\n\\t\\t\\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\\n\\t\\t\\t$data['area'] = 'refresh_list_msg';\\n\\t\\t} \\n\\t\\t# there was an error\\n\\t\\telse {\\n\\t\\t\\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\\n\\t\\t\\t$data['area'] = 'basic_msg';\\n\\t\\t}\\n\\t\\t\\n\\t\\t$this->load->view('addons/basic_addons', $data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d5c1297dca14849af4d11a9779624bd\",\n \"score\": \"0.52364635\",\n \"text\": \"public function Upcoming() {\\n return $this->get_all_events( 'start_date', 'ASC', true );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"391d857bc5797044dc6e02cbb799bdde\",\n \"score\": \"0.5233952\",\n \"text\": \"public function getEvents() { return $this->_events; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4620b4080a9b067f3f0d43441d09398\",\n \"score\": \"0.52312607\",\n \"text\": \"public function getBorrowReminderLost() {\\n $dataReminder = DB::table('settings')->where('name', 'daylost')->select('content')->get()[0];\\n $fromDate = new Carbon('now');\\n\\n\\n $data = Borrow::where('status', '=', '20')->where( 'ngaydaohan', '<=', $fromDate->toDateTimeString())->orderBy('ngaydaohan', 'asc')->get();\\n if (count($data)) {\\n foreach ($data as $record) {\\n $toDate = Carbon::parse($record['ngaydaohan'])->addDays($dataReminder->content);\\n $dataAdd['dateLost'] = $toDate->toDateTimeString();\\n $userObj = User::where('id', $record->uid)->first();\\n\\n emailSend($record, $userObj['email'], 'Email Reminder ' .$userObj['username'] .' - '.$toDate->toDateTimeString(), 'REMINDER_LOST', $dataAdd);\\n\\n // update - neu da send email reminder => cap nhat trang thai cua khoan vay la da reminder lan 1 => status = 20\\n Borrow::where('id', $record->id)->update(array('status'=> '30'));\\n }\\n } else {\\n echo 'No data';\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31403dfaf79cadf166e45ad82f950328\",\n \"score\": \"0.52293193\",\n \"text\": \"function getPastEvents()\\n {\\n //1. Define the query\\n $sql = \\\"SELECT * FROM events WHERE endtime < CURRENT_DATE AND archive != 1 ORDER BY starttime DESC\\\";\\n\\n //2. Prepare the statement\\n $statement = $this->_dbh->prepare($sql);\\n\\n //4. Execute the query\\n $statement->execute();\\n\\n //5. Process the results (get OrderID)\\n return $statement->fetchAll(PDO::FETCH_ASSOC);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad495e3ac20afb26cbf2d75f8e8e8774\",\n \"score\": \"0.5229228\",\n \"text\": \"public function actionUpdateAllNews(){\\n\\t\\t// UPDATE `customer` SET `status` = 1 WHERE `email` LIKE `%@example.com%`\\n\\t\\t$update = NotificationsReaders::updateAll(\\n\\t\\t\\t[\\n\\t\\t\\t\\t'alreadyread' => NotificationsReaders::STATUS_READ\\n\\t\\t\\t],\\n\\t\\t\\t[\\n\\t\\t\\t\\t'like', 'id_user', Yii::$app->user->id\\n\\t\\t\\t]\\n\\t\\t);\\n\\n\\t\\tYii::$app->response->format = Response::FORMAT_JSON;\\n\\t\\treturn ['success'=>true,'response'=>$update];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed0bac56f2385b8ec81683cf7e277a16\",\n \"score\": \"0.5225388\",\n \"text\": \"public function getOldMessages(Request $request)\\n {\\n if(!$request->old_message_id || !$request->to_user)\\n return;\\n \\n $message = Message::find($request->old_message_id);\\n\\n //return $message->created_at;\\n \\n $lastMessages = Message::where(function($query) use ($request, $message) {\\n $query->where('MessageSenderId', Auth::user()->id)\\n ->where('MessageReceiverId', $request->to_user)\\n ->where('created_at', '<=', $message->created_at)\\n ->where('id', '<', $message->id);\\n })\\n ->orWhere(function ($query) use ($request, $message) {\\n $query->where('MessageSenderId', $request->to_user)\\n ->where('MessageReceiverId', Auth::user()->id)\\n ->where('created_at', '<=', $message->created_at)\\n ->where('id', '<', $message->id);\\n })->orderBy('id', 'DESC')->get();\\n\\n //return $lastMessages;\\n \\n $return = [];\\n \\n if($lastMessages->count() > 0) {\\n \\n foreach ($lastMessages as $message) {\\n $message->time = Carbon::parse($message->created_at)->diffForHumans();\\n $return[] = view('users/message-line')->with('message', $message)->render();\\n }\\n \\n PusherFactory::make()->trigger('chat', 'oldMsgs', ['to_user' => $request->to_user, 'data' => $return]);\\n }\\n \\n return response()->json(['state' => 1, 'data' => $return]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6d6674d1efbb9584437f65c94945692\",\n \"score\": \"0.5223696\",\n \"text\": \"public function getModified(Request $request)\\n {\\n $evento = Event::find($request->idevento);\\n $evento->descripcion = $request->descripcion;\\n $evento->save();\\n if($request->tutor_on)\\n {\\n $usuarios = User::where('type', '=', 'Tutor')->get();\\n foreach($usuarios as $usuario)\\n {\\n $nuevo_evento = new Event;\\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\\n $nuevo_evento->start = $evento->start;\\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\\n $nuevo_evento->borderColor = $evento->borderColor;\\n $nuevo_evento->allDay = $evento->allDay;\\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\\n $nuevo_evento->descripcion = $evento->descripcion;\\n $nuevo_evento->user_id = $usuario->id;\\n $nuevo_evento->save();\\n }\\n }\\n if($request->cursante_on)\\n {\\n $usuarios = User::where('type', '=', 'Cursante')->get();\\n foreach($usuarios as $usuario)\\n {\\n $nuevo_evento = new Event;\\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\\n $nuevo_evento->start = $evento->start;\\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\\n $nuevo_evento->borderColor = $evento->borderColor;\\n $nuevo_evento->allDay = $evento->allDay;\\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\\n $nuevo_evento->descripcion = $evento->descripcion;\\n $nuevo_evento->user_id = $usuario->id;\\n $nuevo_evento->save();\\n }\\n }\\n if($request->tutor != \\\"\\\")\\n {\\n $usuario = User::find($request->idtutor);\\n $nombre = $usuario->first_name.' '.$usuario->father_last_name;\\n if($nombre == $request->tutor)\\n {\\n $nuevo_evento = new Event;\\n $nuevo_evento->titulo_evento = $evento->titulo_evento;\\n $nuevo_evento->start = $evento->start;\\n $nuevo_evento->backgroundColor = $evento->backgroundColor;\\n $nuevo_evento->borderColor = $evento->borderColor;\\n $nuevo_evento->allDay = $evento->allDay;\\n $nuevo_evento->id_eventoCallendar = $evento->id_eventoCallendar;\\n $nuevo_evento->descripcion = $evento->descripcion;\\n $nuevo_evento->user_id = $usuario->id;\\n $nuevo_evento->save();\\n }\\n }\\n return redirect('calendar/calendar');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df09177357811a78bce835ab5e687f9d\",\n \"score\": \"0.52228683\",\n \"text\": \"public function sendUserStatusChangeNotificationEmailDataProvider()\\n {\\n return [\\n [1, 'getActivateCustomerTemplateId', 'customer/customer_change_status/email_activate_customer_template'],\\n [0, 'getInactivateCustomerTemplateId', 'customer/customer_change_status/email_lock_customer_template']\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"219f3d22dda81b7dc748145b07f9882e\",\n \"score\": \"0.52125174\",\n \"text\": \"public function updateStatusRequest()\\n { \\n $now = Mage::getSingleton('core/date')->gmtDate(); \\n $items = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\\n $items->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\\n $items->getSelect()->group('store_id');\\n if($items->getSize() >0 ){\\n $data = $items->getData();\\n\\n foreach($data as $unit) { \\n $storeId = $unit['store_id'];\\n $day = Mage::getStoreConfig('qquoteadv/general/expirtime_proposal', (int)$storeId); \\n \\n $now = Mage::getSingleton('core/date')->gmtDate(); \\n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\\n $collection->getSelect()\\n ->where('created_atload(); \\n\\n foreach ($collection as $item) { \\n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST_EXPIRED);\\n $item->save(); \\n }\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4af78b556444bc433433e4a49035a8f2\",\n \"score\": \"0.5208411\",\n \"text\": \"public function getStatusesList(){\\n return $this->_get(1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7bc0a98ddf3c5456c5eaf189eb35fda2\",\n \"score\": \"0.52069104\",\n \"text\": \"public function update_INVOICE_Change_Status_Completed(){\\n $this->update_INVOICE_Change_Status_Ongoing();\\n $dateToday=date_default_timezone_set(\\\"Y-m-d\\\");\\n $strInsertQry=\\\"update sidhus_invoice set Status='Completed Events' where sidhus_invoice.eventDate < '\\\".$dateToday.\\\"'\\\";\\n // $stmt = $this->con->prepare($strInsertQry);\\n // $stmt->bind_param(\\\"sssssssssssiisssssiiiii\\\",$cust_fullname,$cust_address,$theme_name,$color_combo,$cust_mobileno,$cust_alternate_mobileno,$cust_emailId,$event_address,$event_pincode,$event_location,$event_landmark,$event_id,$subcat_id,$venue_type,$eventDate,$eventTime,$concept_type,$notes_or_Remarks,$transportation_Rate,$Tax_percentage,$Advance,$Total,$invoice_no);\\n//return $strInsertQry;\\n $stmt = $this->con->prepare($strInsertQry);\\n // $stmt->bind_param(\\\"ss\\\", $newpassword, $username);\\n $result = $stmt->execute();\\n $stmt->close();\\n return $result;// $num_affected_rows>=0;\\n\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":768,"cells":{"query_id":{"kind":"string","value":"389d103373214e3d89dbc0ff975de3bf"},"query":{"kind":"string","value":"Magic method, searches for the key and returns its value. $value = $this>foo;"},"positive_passages":{"kind":"list like","value":[{"docid":"c94093d1b4b978db2665511774b66485","score":"0.0","text":"public function __get($key)\n {\n if (isset($this->$key)) {\n return $this->_data[$key];\n } else {\n throw new Exception('The variable \"'.$key.'\" is not set.');\n }\n }","title":""}],"string":"[\n {\n \"docid\": \"c94093d1b4b978db2665511774b66485\",\n \"score\": \"0.0\",\n \"text\": \"public function __get($key)\\n {\\n if (isset($this->$key)) {\\n return $this->_data[$key];\\n } else {\\n throw new Exception('The variable \\\"'.$key.'\\\" is not set.');\\n }\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"9a83e46ceaed1011ad999b524060b8e2","score":"0.6433605","text":"public function get($key) {}","title":""},{"docid":"9a83e46ceaed1011ad999b524060b8e2","score":"0.6433605","text":"public function get($key) {}","title":""},{"docid":"c2adf493aac0d84385a82e0403ecece7","score":"0.642471","text":"function get($key);","title":""},{"docid":"c2adf493aac0d84385a82e0403ecece7","score":"0.642471","text":"function get($key);","title":""},{"docid":"26a235ad5041955bdca5cad00d0238bf","score":"0.6423377","text":"function get( $key );","title":""},{"docid":"8440f0f0625b56b9f41f3fdd5df27ac6","score":"0.6380379","text":"public abstract function get($key);","title":""},{"docid":"c922ab9f030e805635bc8b891779c3d3","score":"0.6375671","text":"public function __get(string $key);","title":""},{"docid":"c922ab9f030e805635bc8b891779c3d3","score":"0.6375671","text":"public function __get(string $key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"c8a7641a3bd1e45dd2b096165fe81ae3","score":"0.63680494","text":"public function get($key);","title":""},{"docid":"286839213d1897a2708ddd8457641efc","score":"0.63639724","text":"public function __get($key)\n\t{\n\t\treturn call_user_func([$this, $key]);\n\t}","title":""},{"docid":"e3af4d89bab5a3edd8359982dfb2b941","score":"0.6342044","text":"abstract public function get($key);","title":""},{"docid":"e3af4d89bab5a3edd8359982dfb2b941","score":"0.6342044","text":"abstract public function get($key);","title":""},{"docid":"e3af4d89bab5a3edd8359982dfb2b941","score":"0.6342044","text":"abstract public function get($key);","title":""},{"docid":"6584860e95ae474457ada515a1d98808","score":"0.63129354","text":"public function __get ($key) { return $this->offsetGet($key); }","title":""},{"docid":"38b0dd49f7152e2db959e0b4a118e05d","score":"0.6303341","text":"public function __get($key)\n\t{\n\t\treturn $this[$key];\n\t}","title":""},{"docid":"eb7ae1b26b520947e641069ab4367e0d","score":"0.6302003","text":"function __get($key) {\r\n\t\treturn $this->$key;\r\n\t}","title":""},{"docid":"5cb1ebf98c327e291c1400a2cbc66445","score":"0.629104","text":"public function get($key){\n\t\treturn $this->$key;\n\t}","title":""},{"docid":"110d4fb236fd952993ba8ffa9a6b9f9d","score":"0.6280689","text":"abstract protected function getValue($key);","title":""},{"docid":"79e04538591f713dcfb41c38af60c5de","score":"0.62586045","text":"public function __get($key)\n\t{\n\t\t$item = array_get($this->hit, $this->getPath($key));\n\n\t\treturn $item;\n\t}","title":""},{"docid":"563bb97077872bb101778beb5454aed9","score":"0.6229586","text":"public function __get($key){\n return $this->$key;\n }","title":""},{"docid":"19802d79ba1ebb7a32f964271168644d","score":"0.62024194","text":"public function get($key){ }","title":""},{"docid":"7d67afdd919ed796d24c8c50e00fce68","score":"0.61924744","text":"public function __get($key)\n {\n return $this[$key];\n }","title":""},{"docid":"7d67afdd919ed796d24c8c50e00fce68","score":"0.61924744","text":"public function __get($key)\n {\n return $this[$key];\n }","title":""},{"docid":"4205c8d4049a797da5f0aac472d73b88","score":"0.61658686","text":"public function __get($key)\n {\n return $this->getResult()->$key;\n }","title":""},{"docid":"477d1c4bbade14531458e13275470902","score":"0.6143359","text":"function __get($key)\n {\n return $this->$key;\n }","title":""},{"docid":"93c91da8dd663ec4ec72e47ada73c4ed","score":"0.6123491","text":"public function __get( /* string */ $key )\n\t{\n\t\t// If a get* method exists for this key, use that method to get this value.\n\t\tif ( method_exists( $this, $key ) )\n\t\t{\n\t\t\treturn $this->$key();\n\t\t}\n\t\t\n\t\tif ( isset( $this->$key ) )\n\t\t{\n\t\t\treturn $this->$key;\n\t\t}\n\t}","title":""},{"docid":"243886fa8606be9f0b754af67ab66b3f","score":"0.61105484","text":"public function getValue($key);","title":""},{"docid":"243886fa8606be9f0b754af67ab66b3f","score":"0.61105484","text":"public function getValue($key);","title":""},{"docid":"632c12eb81f55975791da220c4e9614f","score":"0.6106451","text":"public function get(string $key);","title":""},{"docid":"632c12eb81f55975791da220c4e9614f","score":"0.6106451","text":"public function get(string $key);","title":""},{"docid":"632c12eb81f55975791da220c4e9614f","score":"0.6106451","text":"public function get(string $key);","title":""},{"docid":"632c12eb81f55975791da220c4e9614f","score":"0.6106451","text":"public function get(string $key);","title":""},{"docid":"8d0802a7da452e5029d4fbbaa06f4217","score":"0.6099965","text":"public function __get($key)\n\t{\n\t\treturn $this->$key;\n\t}","title":""},{"docid":"8d0802a7da452e5029d4fbbaa06f4217","score":"0.6099965","text":"public function __get($key)\n\t{\n\t\treturn $this->$key;\n\t}","title":""},{"docid":"d1289aa662b9f385f716a1ae5e84a9eb","score":"0.6097443","text":"abstract public function get(string $key);","title":""},{"docid":"a181e9c1004137f2b529bba93a3dd9b5","score":"0.60898894","text":"public function __get($key) {\n $value = false;\n // Allow for easy customization of getting certain keys or faux attributes\n $override_function_name = '_get_' . $key;\n if(method_exists($this, $override_function_name)) {\n $value = $this->$override_function_name();\n }\n elseif(is_array($this->_data) && array_key_exists($key, $this->_data)) {\n $value = $this->_data[$key];\n }\n \n /*\n elseif(method_exists($this, $key)) {\n $value = call_user_func_array(array($this, $key), func_get_args());\n }\n */\n \n return $value;\n }","title":""},{"docid":"75d1ad396f405a185a4332d3bcba6b9b","score":"0.6077347","text":"public function get($key)\n {\n return $this->$key;\n }","title":""},{"docid":"2bb8515fbdf17c8779245be55d7ae24d","score":"0.60692066","text":"public function get(/*# string */ $key);","title":""},{"docid":"8d4534276e3f538b45abace415d89acf","score":"0.60484254","text":"public function __get($key)\n {\n return $this->{$key};\n }","title":""},{"docid":"8d4534276e3f538b45abace415d89acf","score":"0.60484254","text":"public function __get($key)\n {\n return $this->{$key};\n }","title":""},{"docid":"b6f47d688e86ebf4ac9e506451442944","score":"0.6046547","text":"public function __get( string $key )\n\t{\n\t\treturn $this->get( $key );\n\t}","title":""},{"docid":"73d34694c32d38ff57486d6cea8efc18","score":"0.603986","text":"function get( $key ) {\n\t\t\n\t\tif ( isset( $key ) AND ! empty( $key ) AND isset( $this->$key ) AND ! empty( $this->$key ) ) {\n\t\t\treturn $this->$key;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}","title":""},{"docid":"c7998047e3bfcac5efee543f627a3b8e","score":"0.6038764","text":"public function __get($key) {\n\t\t\tif(isset($this->$key)) return $this->$key;\n\t\t}","title":""},{"docid":"9135caa6c08a1b85330e7270103ab318","score":"0.5993537","text":"public function __get(string $key): mixed\n {\n return $this->items->{$key};\n }","title":""},{"docid":"b674388c2bf6407decf2cbb425d48b97","score":"0.59858596","text":"public function get(string $key): mixed;","title":""},{"docid":"34ce3617ddde1100a8170176a6d5be1d","score":"0.5972233","text":"public function getValue(string $key);","title":""},{"docid":"18276c89c5c8b68c8f5107f4daf954c9","score":"0.5970728","text":"public function __get($key)\n\t{\n\t\treturn $this->get($key);\n\t}","title":""},{"docid":"665ae87bd2e0871894ac5bda30836884","score":"0.5959383","text":"function __get($key) {\n\t\treturn $this->data[$key];\n\t}","title":""},{"docid":"a6df9e27f404e861a0989309962f8451","score":"0.59591055","text":"public static function get(string $key);","title":""},{"docid":"0a2988ffaf33a267e43b6f9add9560c8","score":"0.5953584","text":"public function __get($key)\n {\n if (isset($this->$key))\n return $this->$key;\n }","title":""},{"docid":"3742027468e81ae3f6e624f6a38e81d6","score":"0.5952946","text":"public function __get( $key ) {\n\t\treturn $this->offsetGet( $key );\n\t}","title":""},{"docid":"1a8af4d5d3d55941e5a4597d7a8ec1a5","score":"0.5932331","text":"public function __getKey($key) {\n \t if (property_exists($this, $key)) {\n \t\treturn $this->$key;\n \t}\n \t}","title":""},{"docid":"b91da51e2145d8afdeab696a9bfcc0dd","score":"0.5924954","text":"public function get( $key) {\n\t\treturn parent::offsetGet($key);\n\t}","title":""},{"docid":"0d83d2caea09eaa39c84dda78ff3c63e","score":"0.5923098","text":"public function __get($key) {\n return $this->parsed[$key];\n }","title":""},{"docid":"b066bf512ffff0c81c25d8f8b54bc9ab","score":"0.59107107","text":"public function __get( $key )\n\t\t{\n\t\t\tif( !isset( $this->$key ) && $this->first() !== false )\n\t\t\t{\n\t\t\t\treturn $this->first()->$key;\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}","title":""},{"docid":"af52f472d819aca9f7f560de10f3444d","score":"0.59082866","text":"public function __get (string $key)\n {\n return $this->data[$key];\n }","title":""},{"docid":"4be0f9be95280c2ef5245ab3bc05e5f5","score":"0.58899844","text":"public function get($key = NULL);","title":""},{"docid":"9e1be4af8cfd13696437eae0c389dbe5","score":"0.58850783","text":"public function __get($key) {\n return $this->get($key);\n }","title":""},{"docid":"9e1be4af8cfd13696437eae0c389dbe5","score":"0.58850783","text":"public function __get($key) {\n return $this->get($key);\n }","title":""},{"docid":"665c4be47c23a0222bd4590ef6d5e879","score":"0.5883407","text":"public function get(string $key)\n {\n return $this->$key;\n }","title":""},{"docid":"63d97958523cb3fd5421c3c89c4a0de3","score":"0.5872726","text":"function __get($key) {\n return Wee()->$key;\n }","title":""},{"docid":"25d1d2253da0612ba2a432d0ac9fc2a4","score":"0.58610415","text":"public function __get($key)\n {\n if( ($method = 'get' . ucfirst($key)) &&\n method_exists($this, $method) ) {\n return $this->$method();\n } else if( isset($this->$key) ) {\n return $this->$key;\n } else if( isset($this->{'_' . $key}) ) {\n return $this->{'_' . $key};\n } else {\n return null;\n }\n }","title":""},{"docid":"29b35483ca515565cef98334cf880f9e","score":"0.58208156","text":"abstract public function get(string $key): string;","title":""},{"docid":"14d1a530f6f352bbe3af95a9c3154818","score":"0.5820225","text":"public function &__get ($key)\n {\n return $this->_Data[ $this->_CI_Keys ? $this->_CI_Map[ $this->setCase( $key ) ] : $key ];\n\t}","title":""},{"docid":"c25e823ec597d9248af48f6690f20874","score":"0.58189815","text":"function __get($key)\n\t{\n\t\treturn $this->MD->$key;\n\t}","title":""},{"docid":"7074b2996c9b569f0c1bbed0cdfd48a3","score":"0.5809957","text":"public function __get($key) {\n if (is_callable($this->values[$key])) {\n return $this->values[$key]($this);\n } else {\n return $this->values[$key];\n }\n }","title":""},{"docid":"8ace23940f088daea8912f24c21558ec","score":"0.58078593","text":"public abstract function retrieve($key);","title":""},{"docid":"4ca997bb42ac5c2151f4ca16cd9a2344","score":"0.58004457","text":"public function get(string $key): string;","title":""}],"string":"[\n {\n \"docid\": \"9a83e46ceaed1011ad999b524060b8e2\",\n \"score\": \"0.6433605\",\n \"text\": \"public function get($key) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a83e46ceaed1011ad999b524060b8e2\",\n \"score\": \"0.6433605\",\n \"text\": \"public function get($key) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2adf493aac0d84385a82e0403ecece7\",\n \"score\": \"0.642471\",\n \"text\": \"function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2adf493aac0d84385a82e0403ecece7\",\n \"score\": \"0.642471\",\n \"text\": \"function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26a235ad5041955bdca5cad00d0238bf\",\n \"score\": \"0.6423377\",\n \"text\": \"function get( $key );\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8440f0f0625b56b9f41f3fdd5df27ac6\",\n \"score\": \"0.6380379\",\n \"text\": \"public abstract function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c922ab9f030e805635bc8b891779c3d3\",\n \"score\": \"0.6375671\",\n \"text\": \"public function __get(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c922ab9f030e805635bc8b891779c3d3\",\n \"score\": \"0.6375671\",\n \"text\": \"public function __get(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8a7641a3bd1e45dd2b096165fe81ae3\",\n \"score\": \"0.63680494\",\n \"text\": \"public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"286839213d1897a2708ddd8457641efc\",\n \"score\": \"0.63639724\",\n \"text\": \"public function __get($key)\\n\\t{\\n\\t\\treturn call_user_func([$this, $key]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3af4d89bab5a3edd8359982dfb2b941\",\n \"score\": \"0.6342044\",\n \"text\": \"abstract public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3af4d89bab5a3edd8359982dfb2b941\",\n \"score\": \"0.6342044\",\n \"text\": \"abstract public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3af4d89bab5a3edd8359982dfb2b941\",\n \"score\": \"0.6342044\",\n \"text\": \"abstract public function get($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6584860e95ae474457ada515a1d98808\",\n \"score\": \"0.63129354\",\n \"text\": \"public function __get ($key) { return $this->offsetGet($key); }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38b0dd49f7152e2db959e0b4a118e05d\",\n \"score\": \"0.6303341\",\n \"text\": \"public function __get($key)\\n\\t{\\n\\t\\treturn $this[$key];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb7ae1b26b520947e641069ab4367e0d\",\n \"score\": \"0.6302003\",\n \"text\": \"function __get($key) {\\r\\n\\t\\treturn $this->$key;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cb1ebf98c327e291c1400a2cbc66445\",\n \"score\": \"0.629104\",\n \"text\": \"public function get($key){\\n\\t\\treturn $this->$key;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"110d4fb236fd952993ba8ffa9a6b9f9d\",\n \"score\": \"0.6280689\",\n \"text\": \"abstract protected function getValue($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79e04538591f713dcfb41c38af60c5de\",\n \"score\": \"0.62586045\",\n \"text\": \"public function __get($key)\\n\\t{\\n\\t\\t$item = array_get($this->hit, $this->getPath($key));\\n\\n\\t\\treturn $item;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"563bb97077872bb101778beb5454aed9\",\n \"score\": \"0.6229586\",\n \"text\": \"public function __get($key){\\n return $this->$key;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19802d79ba1ebb7a32f964271168644d\",\n \"score\": \"0.62024194\",\n \"text\": \"public function get($key){ }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d67afdd919ed796d24c8c50e00fce68\",\n \"score\": \"0.61924744\",\n \"text\": \"public function __get($key)\\n {\\n return $this[$key];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d67afdd919ed796d24c8c50e00fce68\",\n \"score\": \"0.61924744\",\n \"text\": \"public function __get($key)\\n {\\n return $this[$key];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4205c8d4049a797da5f0aac472d73b88\",\n \"score\": \"0.61658686\",\n \"text\": \"public function __get($key)\\n {\\n return $this->getResult()->$key;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"477d1c4bbade14531458e13275470902\",\n \"score\": \"0.6143359\",\n \"text\": \"function __get($key)\\n {\\n return $this->$key;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93c91da8dd663ec4ec72e47ada73c4ed\",\n \"score\": \"0.6123491\",\n \"text\": \"public function __get( /* string */ $key )\\n\\t{\\n\\t\\t// If a get* method exists for this key, use that method to get this value.\\n\\t\\tif ( method_exists( $this, $key ) )\\n\\t\\t{\\n\\t\\t\\treturn $this->$key();\\n\\t\\t}\\n\\t\\t\\n\\t\\tif ( isset( $this->$key ) )\\n\\t\\t{\\n\\t\\t\\treturn $this->$key;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"243886fa8606be9f0b754af67ab66b3f\",\n \"score\": \"0.61105484\",\n \"text\": \"public function getValue($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"243886fa8606be9f0b754af67ab66b3f\",\n \"score\": \"0.61105484\",\n \"text\": \"public function getValue($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"632c12eb81f55975791da220c4e9614f\",\n \"score\": \"0.6106451\",\n \"text\": \"public function get(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"632c12eb81f55975791da220c4e9614f\",\n \"score\": \"0.6106451\",\n \"text\": \"public function get(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"632c12eb81f55975791da220c4e9614f\",\n \"score\": \"0.6106451\",\n \"text\": \"public function get(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"632c12eb81f55975791da220c4e9614f\",\n \"score\": \"0.6106451\",\n \"text\": \"public function get(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d0802a7da452e5029d4fbbaa06f4217\",\n \"score\": \"0.6099965\",\n \"text\": \"public function __get($key)\\n\\t{\\n\\t\\treturn $this->$key;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d0802a7da452e5029d4fbbaa06f4217\",\n \"score\": \"0.6099965\",\n \"text\": \"public function __get($key)\\n\\t{\\n\\t\\treturn $this->$key;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1289aa662b9f385f716a1ae5e84a9eb\",\n \"score\": \"0.6097443\",\n \"text\": \"abstract public function get(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a181e9c1004137f2b529bba93a3dd9b5\",\n \"score\": \"0.60898894\",\n \"text\": \"public function __get($key) {\\n $value = false;\\n // Allow for easy customization of getting certain keys or faux attributes\\n $override_function_name = '_get_' . $key;\\n if(method_exists($this, $override_function_name)) {\\n $value = $this->$override_function_name();\\n }\\n elseif(is_array($this->_data) && array_key_exists($key, $this->_data)) {\\n $value = $this->_data[$key];\\n }\\n \\n /*\\n elseif(method_exists($this, $key)) {\\n $value = call_user_func_array(array($this, $key), func_get_args());\\n }\\n */\\n \\n return $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75d1ad396f405a185a4332d3bcba6b9b\",\n \"score\": \"0.6077347\",\n \"text\": \"public function get($key)\\n {\\n return $this->$key;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bb8515fbdf17c8779245be55d7ae24d\",\n \"score\": \"0.60692066\",\n \"text\": \"public function get(/*# string */ $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d4534276e3f538b45abace415d89acf\",\n \"score\": \"0.60484254\",\n \"text\": \"public function __get($key)\\n {\\n return $this->{$key};\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d4534276e3f538b45abace415d89acf\",\n \"score\": \"0.60484254\",\n \"text\": \"public function __get($key)\\n {\\n return $this->{$key};\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6f47d688e86ebf4ac9e506451442944\",\n \"score\": \"0.6046547\",\n \"text\": \"public function __get( string $key )\\n\\t{\\n\\t\\treturn $this->get( $key );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73d34694c32d38ff57486d6cea8efc18\",\n \"score\": \"0.603986\",\n \"text\": \"function get( $key ) {\\n\\t\\t\\n\\t\\tif ( isset( $key ) AND ! empty( $key ) AND isset( $this->$key ) AND ! empty( $this->$key ) ) {\\n\\t\\t\\treturn $this->$key;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7998047e3bfcac5efee543f627a3b8e\",\n \"score\": \"0.6038764\",\n \"text\": \"public function __get($key) {\\n\\t\\t\\tif(isset($this->$key)) return $this->$key;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9135caa6c08a1b85330e7270103ab318\",\n \"score\": \"0.5993537\",\n \"text\": \"public function __get(string $key): mixed\\n {\\n return $this->items->{$key};\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b674388c2bf6407decf2cbb425d48b97\",\n \"score\": \"0.59858596\",\n \"text\": \"public function get(string $key): mixed;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34ce3617ddde1100a8170176a6d5be1d\",\n \"score\": \"0.5972233\",\n \"text\": \"public function getValue(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18276c89c5c8b68c8f5107f4daf954c9\",\n \"score\": \"0.5970728\",\n \"text\": \"public function __get($key)\\n\\t{\\n\\t\\treturn $this->get($key);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"665ae87bd2e0871894ac5bda30836884\",\n \"score\": \"0.5959383\",\n \"text\": \"function __get($key) {\\n\\t\\treturn $this->data[$key];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6df9e27f404e861a0989309962f8451\",\n \"score\": \"0.59591055\",\n \"text\": \"public static function get(string $key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a2988ffaf33a267e43b6f9add9560c8\",\n \"score\": \"0.5953584\",\n \"text\": \"public function __get($key)\\n {\\n if (isset($this->$key))\\n return $this->$key;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3742027468e81ae3f6e624f6a38e81d6\",\n \"score\": \"0.5952946\",\n \"text\": \"public function __get( $key ) {\\n\\t\\treturn $this->offsetGet( $key );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a8af4d5d3d55941e5a4597d7a8ec1a5\",\n \"score\": \"0.5932331\",\n \"text\": \"public function __getKey($key) {\\n \\t if (property_exists($this, $key)) {\\n \\t\\treturn $this->$key;\\n \\t}\\n \\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b91da51e2145d8afdeab696a9bfcc0dd\",\n \"score\": \"0.5924954\",\n \"text\": \"public function get( $key) {\\n\\t\\treturn parent::offsetGet($key);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d83d2caea09eaa39c84dda78ff3c63e\",\n \"score\": \"0.5923098\",\n \"text\": \"public function __get($key) {\\n return $this->parsed[$key];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b066bf512ffff0c81c25d8f8b54bc9ab\",\n \"score\": \"0.59107107\",\n \"text\": \"public function __get( $key )\\n\\t\\t{\\n\\t\\t\\tif( !isset( $this->$key ) && $this->first() !== false )\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn $this->first()->$key;\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn null;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af52f472d819aca9f7f560de10f3444d\",\n \"score\": \"0.59082866\",\n \"text\": \"public function __get (string $key)\\n {\\n return $this->data[$key];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4be0f9be95280c2ef5245ab3bc05e5f5\",\n \"score\": \"0.58899844\",\n \"text\": \"public function get($key = NULL);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e1be4af8cfd13696437eae0c389dbe5\",\n \"score\": \"0.58850783\",\n \"text\": \"public function __get($key) {\\n return $this->get($key);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e1be4af8cfd13696437eae0c389dbe5\",\n \"score\": \"0.58850783\",\n \"text\": \"public function __get($key) {\\n return $this->get($key);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"665c4be47c23a0222bd4590ef6d5e879\",\n \"score\": \"0.5883407\",\n \"text\": \"public function get(string $key)\\n {\\n return $this->$key;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63d97958523cb3fd5421c3c89c4a0de3\",\n \"score\": \"0.5872726\",\n \"text\": \"function __get($key) {\\n return Wee()->$key;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25d1d2253da0612ba2a432d0ac9fc2a4\",\n \"score\": \"0.58610415\",\n \"text\": \"public function __get($key)\\n {\\n if( ($method = 'get' . ucfirst($key)) &&\\n method_exists($this, $method) ) {\\n return $this->$method();\\n } else if( isset($this->$key) ) {\\n return $this->$key;\\n } else if( isset($this->{'_' . $key}) ) {\\n return $this->{'_' . $key};\\n } else {\\n return null;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29b35483ca515565cef98334cf880f9e\",\n \"score\": \"0.58208156\",\n \"text\": \"abstract public function get(string $key): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14d1a530f6f352bbe3af95a9c3154818\",\n \"score\": \"0.5820225\",\n \"text\": \"public function &__get ($key)\\n {\\n return $this->_Data[ $this->_CI_Keys ? $this->_CI_Map[ $this->setCase( $key ) ] : $key ];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c25e823ec597d9248af48f6690f20874\",\n \"score\": \"0.58189815\",\n \"text\": \"function __get($key)\\n\\t{\\n\\t\\treturn $this->MD->$key;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7074b2996c9b569f0c1bbed0cdfd48a3\",\n \"score\": \"0.5809957\",\n \"text\": \"public function __get($key) {\\n if (is_callable($this->values[$key])) {\\n return $this->values[$key]($this);\\n } else {\\n return $this->values[$key];\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ace23940f088daea8912f24c21558ec\",\n \"score\": \"0.58078593\",\n \"text\": \"public abstract function retrieve($key);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ca997bb42ac5c2151f4ca16cd9a2344\",\n \"score\": \"0.58004457\",\n \"text\": \"public function get(string $key): string;\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":769,"cells":{"query_id":{"kind":"string","value":"26db7c11537064e22bfe260aeaf4607c"},"query":{"kind":"string","value":"Adiciona o filtro Minhas Paginas"},"positive_passages":{"kind":"list like","value":[{"docid":"27da8a926f6631411cdff838d0b1cd37","score":"0.0","text":"function wp38_add_movies_filter($views){\n\t\n\t// pega as informacoes do usuario logado\n\t$user = wp_get_current_user();\n\n\tif($user->roles[0] == 'contributor'){\n\n\t\tif( $_GET['filter'] == 'grupo' ){\n\n\t\t\t$views['grupos'] = \"Minhas Páginas\";\n\t\treturn $views;\n\n\t\t} else {\n\t\t\t$views['grupos'] = \"Minhas Páginas\";\n\t\treturn $views;\n\t\t}\n\t}\n\n\treturn $views;\n}","title":""}],"string":"[\n {\n \"docid\": \"27da8a926f6631411cdff838d0b1cd37\",\n \"score\": \"0.0\",\n \"text\": \"function wp38_add_movies_filter($views){\\n\\t\\n\\t// pega as informacoes do usuario logado\\n\\t$user = wp_get_current_user();\\n\\n\\tif($user->roles[0] == 'contributor'){\\n\\n\\t\\tif( $_GET['filter'] == 'grupo' ){\\n\\n\\t\\t\\t$views['grupos'] = \\\"Minhas Páginas\\\";\\n\\t\\treturn $views;\\n\\n\\t\\t} else {\\n\\t\\t\\t$views['grupos'] = \\\"Minhas Páginas\\\";\\n\\t\\treturn $views;\\n\\t\\t}\\n\\t}\\n\\n\\treturn $views;\\n}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"e0985e36155127a8d4266cfad70c654c","score":"0.69461966","text":"public function filter(){\r\n\t\t\t$this->pagina = 1;\r\n\t\t\t$this->filtroSQL = \"SELECT p.long_name pais, pro.provincia, pf.long_name fpais, prof.provincia fprovincia, cli.* \r\n\t\t\t\tFROM clientes cli LEFT JOIN pais p ON (cli.id_pais=p.id) LEFT JOIN provincias pro ON (cli.id_provincia=pro.id) \r\n\t\t\t\tLEFT JOIN pais pf ON (cli.f_id_pais=pf.id) LEFT JOIN provincias prof ON (cli.f_id_provincia=prof.id) WHERE\";\r\n\t\t\t$this->computeFilter();\r\n\t\t\t$this->listAll();\r\n\t\t}","title":""},{"docid":"9369b7ce9f7eed53236ab1d11adebc35","score":"0.65426093","text":"function getFilterPagination($getRequest) {\n $arrFiltro = array();\n\n if ($getRequest != null) {\n foreach ($getRequest as $key => $value) {\n if ($key != null \n && trim(strtolower($key)) != \"metodo\" \n && trim(strtolower($key)) != \"_\" \n && trim(strtolower($key)) != \"maximum\"\n && trim(strtolower($key)) != \"page\") {\n if (trim(strtolower($key)) != \"query\") {\n $arrFiltro[$key] = $value;\n } else {\n $arrFiltro['search'] = $value;\n }\n }\n }\n }\n\n return $arrFiltro;\n}","title":""},{"docid":"0efe9f43c688e62499d554613d18b23f","score":"0.6475194","text":"function filtre_pagination($total, $nom, $position, $pas, $liste = true, $modele='', $connect='', $env=array()) {\r\n\r\n\tif (!$modele){\r\n\t\tif (!function_exists('lire_config'))\r\n\t\t\tinclude_spip('inc/config');\r\n\t\t$modele = lire_config('sarkaspip/modeles/modele_pagination','page');\r\n\t}\r\n\treturn filtre_pagination_dist($total, $nom, $position, $pas, $liste, $modele, $connect, $env);\r\n}","title":""},{"docid":"fcbc71774c723756ed1438615f43ae58","score":"0.62827444","text":"function getMateriales($filter,$page,$model)\r\n { \r\n $where = \" INNER JOIN categoria on articulo.categoria=categoria.id_categoria WHERE articulo.bar_code LIKE :barcode OR articulo.modelo LIKE :modelo OR categoria.name LIKE :nameM\";\r\n $array=array('barcode'=>'%'.$filter.'%','modelo'=>'%'.$filter.'%','nameM'=>'%'.$filter.'%');\r\n $columns=\"articulo.idarticulo,articulo.num_serie,articulo.num_itap,articulo.num_rm,articulo.bar_code,articulo.modelo, categoria.name,articulo.ubicacion,articulo.prestado\";\r\n return $model->paginador($columns,\"articulo\",\"Articulo\",$page,$where,$array);\r\n }","title":""},{"docid":"43ce9e0c413fe6ba1a97356ced57a95c","score":"0.6196702","text":"function filter( )\n\t{\n\t\tif ( array_key_exists( \"next\", $_GET))\n\t\t{\n\t\t\t$_next = filter::next( $_GET[ \"next\"]);\n\t\t\tif ( !$_next)\n\t\t\t\tunset( $_GET[ \"next\"]);\n\t\t}\n\n\t\tif ( array_key_exists( \"limit\", $_GET))\n\t\t{\n\t\t\t$_limit = filter::limit( $_GET[ \"limit\"]);\n\t\t\tif ( !$_limit)\n\t\t\t\tunset( $_GET[ \"limit\"]);\n\t\t}\n\t}","title":""},{"docid":"6be8d5f195938f1821208787370ba124","score":"0.6134341","text":"public function getTotalFilteredPages ();","title":""},{"docid":"ea08311e1b44d5fdd690179bfd5e10fd","score":"0.6132163","text":"public function index(){\n if (!$_GET) {\n $posteos = posteo::paginate(15);\n return view('home',compact('posteos'));\n }\n if ($_GET) {\n if ($_GET['filtro']=='encon') {\n $posteos = posteo::where('estado','=','Encontrado')->paginate(15);\n return view('home',compact('posteos'));\n }\n if ($_GET['filtro']=='perd') {\n $posteos = posteo::where('estado','=','Perdido')->paginate(15);\n return view('home',compact('posteos'));\n }\n if ($_GET['filtro']=='adopt') {\n $posteos = posteo::where('estado','=','En adopción')->paginate(15);\n return view('home',compact('posteos'));\n }\n if ($_GET['filtro']=='todos') {\n $posteos = posteo::paginate(15);\n return view('home',compact('posteos'));\n }\n\n}}","title":""},{"docid":"04a5d71ed47ea260f7bc39a60c72a5e4","score":"0.6121736","text":"public function filtro() {\r\n\t\tif (Input::hasPost('articulos')) {\r\n\r\n\t\t\t$articulos = new Articulos(Input::post('articulos'));\n\t\t\t$this->lista = $articulos->filtro($id);\n\t\t}\n\t}","title":""},{"docid":"188ab21784fb0bc45d944e8378eccba3","score":"0.6112553","text":"private function getList() {\n\t\n\t\tif (isset($this->request->get['page'])) {\n\t\t\t$page = $this->request->get['page'];\n\t\t} else {\n\t\t\t$page = 1;\n\t\t}\t\t\n\t\t\n\t\tif (isset($this->request->get['sort'])) {\n\t\t\t$sort = $this->request->get['sort'];\n\t\t} else {\n\t\t\t$sort = 'invoice_num';\n\t\t}\n\t\tif (isset($this->request->get['order'])) {\n\t\t\t$order = $this->request->get['order'];\n\t\t} else {\n\t\t\t$order = 'DESC';\n\t\t}\n\t\t\n\t\t/*Softronikx Technologies*/\n\t\tif (isset($this->request->get['user_id'])) {\n\t\t\t$filter_user_id = $this->request->get['user_id'];\n\t\t} \t\n\t\t/*End of code by Softronikx Technologies */\n\t\t\n\t\tif (isset($this->request->get['filter_invoice_status'])) {\n\t\t\t$filter_invoice_status = $this->request->get['filter_invoice_status'];\n\t\t} else {\n\t\t\t$filter_invoice_status = NULL;\n\t\t}\n\t\tif (isset($this->request->get['filter_invoice_date'])) {\n\t\t\t$filter_invoice_date = $this->request->get['filter_invoice_date'];\n\t\t} else {\n\t\t\t$filter_invoice_date = NULL;\n\t\t}\n\t\tif (isset($this->request->get['filter_student_name'])) {\n\t\t\t$filter_student_name = $this->request->get['filter_student_name'];\n\t\t} else {\n\t\t\t$filter_student_name = NULL;\n\t\t}\t\n\t\tif (isset($this->request->get['filter_total_amount'])) {\n\t\t\t$filter_total_amount = $this->request->get['filter_total_amount'];\n\t\t} else {\n\t\t\t$filter_total_amount = NULL;\n\t\t}\t\n\t\t\n\t\tif (isset($this->request->get['filter_total_hours'])) {\n\t\t\t$filter_total_hours = $this->request->get['filter_total_hours'];\n\t\t} else {\n\t\t\t$filter_total_hours = NULL;\n\t\t}\n\t\t\n\t\tif (isset($this->request->get['filter_invoice_num'])) {\n\t\t\t$filter_invoice_num = $this->request->get['filter_invoice_num'];\n\t\t} else {\n\t\t\t$filter_invoice_num = NULL;\n\t\t}\t\n\n \t\t$this->document->breadcrumbs = array();\n \t\t$this->document->breadcrumbs[] = array(\n \t\t'href' => HTTPS_SERVER . 'index.php?route=common/home&token=' . $this->session->data['token'],\n \t\t'text' => $this->language->get('text_home'),\n \t\t'separator' => FALSE\n \t\t);\n \t\t\n \t\t$this->document->breadcrumbs[] = array(\n \t\t'href' => 'javascript:void(0)',\n \t\t'text' => 'Payments',\n \t\t'separator' => ' :: '\n \t\t);\n\n \t\t$this->document->breadcrumbs[] = array(\n \t\t'href' => HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'],\n \t\t'text' => $this->language->get('heading_title'),\n \t\t'separator' => ' :: '\n \t\t);\n\t\n\t\t$this->data['heading_title'] = $this->language->get('heading_title');\n\t\t$this->data['text_no_results'] = $this->language->get('text_no_results');\n\n\t\t$this->data['column_invoice_status'] = $this->language->get('column_invoice_status');\n\t\t$this->data['column_invoice_date'] = $this->language->get('column_invoice_date');\n\t\t$this->data['column_student_name'] = $this->language->get('column_student_name');\n\t\t$this->data['column_invoice_num'] = $this->language->get('column_invoice_num');\n\t\t$this->data['column_total_amount'] = $this->language->get('column_total_amount');\n\t\t$this->data['column_total_hours'] = $this->language->get('column_total_hours');\n\t\t$this->data['column_action'] = $this->language->get('column_action');\t\t\n\t\t\n\t\t$this->data['button_delete'] = $this->language->get('button_delete');\n\t\t$this->data['button_lock'] = $this->language->get('button_lock');\n\t\t$this->data['button_unlock'] = $this->language->get('button_unlock');\n\t\t$this->data['button_filter'] = $this->language->get('button_filter');\n\t\t$this->data['button_late_fee'] = $this->language->get('button_late_fee');\n\t\t\n\t\t$this->data['button_print_all_invoices'] = $this->language->get('button_print_all_invoices');\n\t\t\n\t\t\n\t\t$this->data['token'] = $this->session->data['token'];\n \n \t\tif (isset($this->error['warning'])) {\n\t\t\t$this->data['error_warning'] = $this->error['warning'];\n\t\t} else {\n\t\t\t$this->data['error_warning'] = '';\n\t\t}\n\t\t\n\t\tif (isset($this->session->data['success'])) {\n\t\t\t$this->data['success'] = $this->session->data['success'];\n\t\t\n\t\t\tunset($this->session->data['success']);\n\t\t} else {\n\t\t\t$this->data['success'] = '';\n\t\t}\n\t\t\n\t\t$url = '';\n\t\t\n\t\tif (isset($this->request->get['filter_invoice_status'])) {\n\t\t\t$url .= '&filter_invoice_status=' . $this->request->get['filter_invoice_status'];\n\t\t}\n\t\tif (isset($this->request->get['filter_invoice_date'])) {\n\t\t\t$url .= '&filter_invoice_date=' . $this->request->get['filter_invoice_date'];\n\t\t}\n\t\tif (isset($this->request->get['filter_student_name'])) {\n\t\t\t$url .= '&filter_student_name=' . $this->request->get['filter_student_name'];\n\t\t}\n\t\tif (isset($this->request->get['filter_total_amount'])) {\n\t\t\t$url .= '&filter_total_amount=' . $this->request->get['filter_total_amount'];\n\t\t}\t\t\n\t\tif (isset($this->request->get['filter_invoice_num'])) {\n\t\t\t$url .= '&filter_invoice_num=' . $this->request->get['filter_invoice_num'];\n\t\t}\t\t\n\t\tif (isset($this->request->get['filter_total_hours'])) {\n\t\t\t$url .= '&filter_total_hours=' . $this->request->get['filter_total_hours'];\n\t\t}\n\t\t\n\t\t/*Softronikx Technologies*/\n\t\tif (isset($this->request->get['user_id'])) {\n\t\t\t$url .= '&user_id=' . $this->request->get['user_id'];\n\t\t\t$this->data['user_id']=$this->request->get['user_id'];\n\t\t}\t\n\t\t\n\t\tif (isset($this->request->get['src'])) {\n\t\t\t$url .= '&src=' . $this->request->get['src'];\n\t\t\t$this->data['src']=$this->request->get['src'];\n\t\t}\n\t\t\n\t\t/*End of Code by Softronikx Technologies */\n\t\t\n\t\tif (isset($this->request->get['page'])) {\n\t\t\t$url .= '&page=' . $this->request->get['page'];\n\t\t}\n\t\tif ($order == 'ASC') {\n\t\t\t$url .= '&order=DESC';\n\t\t} else {\n\t\t\t$url .= '&order=ASC';\n\t\t}\n\t\t\n\t\t$this->data['sort_invoice_status'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_status' . $url;\n\t\t$this->data['sort_invoice_date'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_date' . $url;\n\t\t$this->data['sort_student_name'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=student_name' . $url;\n\t\t$this->data['sort_invoice_num'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_num' . $url;\n\t\t$this->data['sort_total_amount'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=total_amount' . $url;\n\t\t$this->data['sort_total_hours'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=total_hours' . $url;\n\t\t\n\t\t$url = '';\n\n\t\t$filters = array(\t\t\t\n\t\t\t'filter_invoice_status',\n\t\t\t'filter_invoice_date',\n\t\t\t'filter_student_name',\n\t\t\t'filter_invoice_num',\n\t\t\t'filter_total_amount',\n\t\t\t'filter_total_hours',\n\t\t\t'page',\n\t\t\t'sort',\n\t\t\t'order'\n\t\t);\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\tif (isset($this->request->get[$filter])) {\n\t\t\t\t$url .= '&' . $filter . '=' . $this->request->get[$filter];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Softronikx Technologies */\n\t\tif (isset($this->request->get['user_id'])) {\n\t\t\t$url .= '&user_id=' . $this->request->get['user_id'];\n\t\t}\n\t\t\n\t\tif (isset($this->request->get['src'])) {\n\t\t\t$url .= '&src=' . $this->request->get['src'];\n\t\t}\n\t\t\n\t\t/* End of Code by Softronikx Technologies */\n\t\t\n\t\t$this->data['delete'] = HTTPS_SERVER . 'index.php?route=cms/invoices/delete&token=' . $this->session->data['token'] . $url;\n\t\t$this->data['lock_sessions'] = HTTPS_SERVER . 'index.php?route=cms/invoices/lock&token=' . $this->session->data['token'] . $url;\t\t\n\t\t$this->data['unlock_sessions'] = HTTPS_SERVER . 'index.php?route=cms/invoices/unlock&token=' . $this->session->data['token'] . $url;\t\t\n\t\t$this->data['apply_late_fee'] = HTTPS_SERVER . 'index.php?route=cms/invoices/late_fee&token=' . $this->session->data['token'] . $url;\t\t\n\t\t\n\t\t$this->data['print_all_invoices'] = HTTPS_SERVER . 'index.php?route=cms/invoices/print_all_invoices&print=1&token=' . $this->session->data['token'] . $url;\n\t\t\n\t\t\n\t\tif($this->user->getUserGroupId() > 3)\n\t\t\t$this->data['sessions_controll'] = 1;\n\t\telse\n\t\t\t$this->data['sessions_controll'] = 0;\n\n\t\t$this->data['sessions'] = array();\n\t\t\n\t\t\n\t\t$data = array(\n\t\t\t'filter_user_id'\t\t\t\t=> $filter_user_id, //softronikx\n\t\t\t'filter_invoice_status' => $filter_invoice_status, \n\t\t\t'filter_invoice_date' => $filter_invoice_date, \n\t\t\t'filter_student_name' => $filter_student_name,\n\t\t\t'filter_invoice_num' => $filter_invoice_num, \n\t\t\t'filter_total_amount' => $filter_total_amount, \n\t\t\t'filter_total_hours' => $filter_total_hours, \n\t\t\t'sort' => $sort,\n\t\t\t'order' => $order,\n\t\t\t'start' => ($page - 1) * $this->config->get('config_admin_limit'),\n\t\t\t'limit' => $this->config->get('config_admin_limit')\n\t\t);\n\t\t\n\t\t$this->data['filter_user_id']=$filter_user_id; //softronikx \n\t\t$this->data['user_id']=$filter_user_id; //softronikx \n\t\t$this->data['filter_invoice_status']=$filter_invoice_status; \n\t\t$this->data['filter_invoice_date']=$filter_invoice_date; \n\t\t$this->data['filter_student_name']=$filter_student_name;\n\t\t$this->data['filter_invoice_num']=$filter_invoice_num; \n\t\t$this->data['filter_total_amount']=$filter_total_amount; \n\t\t$this->data['filter_total_hours']=$filter_total_hours; \n\t\t$this->data['sort']=$sort; \n\t\t$this->data['order']=$order; \n\t\t\n\t\t$this->data['invoices'] = array();\n\t\t$invoice_total = $this->model_cms_invoices->getTotalInvoices($data);\n\t\t$results = $this->model_cms_invoices->getInvoices($data);\n \n \tforeach ($results as $result) {\n\t\t\t$action = array();\n\t\t\t\n\t\t\t$action[] = array(\n\t\t\t\t'text' => \"View / Edit\",\n\t\t\t\t'href' => HTTPS_SERVER . 'index.php?route=cms/invoices/update&token=' . $this->session->data['token'] . '&invoice_id=' . $result['invoice_id'] . $url\n\t\t\t);\n\t\t\t\n\t\t\tif($result['is_locked'])\n\t\t\t$action[] = array(\n\t\t\t\t'text' => \"Locked\",\n\t\t\t\t'href' => 'javascript:void(0)' \n\t\t\t);\n\t\t\t\t\t\t\n\t\t\t$this->data['invoices'][] = array(\n\t\t\t\t'invoice_id' => $result['invoice_id'],\n\t\t\t\t'invoice_status' => $result['invoice_status'],\n\t\t\t\t'student_name' => $result['student_name'],\n\t\t\t\t'invoice_num' => $result['invoice_prefix'].\"-\".$result['invoice_num'],\n\t\t\t\t'total_amount' => $result['total_amount'],\n\t\t\t\t'total_hours' => $result['total_hours'],\n\t\t\t\t'invoice_date' => date($this->language->get('date_format_short'), strtotime($result['invoice_date'])),\n\t\t\t\t'selected' => isset($this->request->post['selected']) && in_array($result['invoice_id'], $this->request->post['selected']),\n\t\t\t\t'action' => $action\n\t\t\t);\n\t\t}\t\n\n\t\t$pagination = new Pagination();\n\t\t$pagination->total = $invoice_total;\n\t\t$pagination->page = $page;\n\t\t$pagination->limit = $this->config->get('config_admin_limit');\n\t\t$pagination->text = $this->language->get('text_pagination');\n\t\t$pagination->url = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . $url . '&page={page}';\n\t\t\t\n\t\t$this->data['pagination'] = $pagination->render();\n\t\t$this->template = 'cms/invoices_list.tpl';\n\t\t$this->children = array(\n\t\t\t'common/header',\t\n\t\t\t'common/footer'\t\n\t\t);\n\t\t\n\t\t$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));\n\t}","title":""},{"docid":"16c0cce1f2b2921756e9c8acdf4fd336","score":"0.6026169","text":"public function getPaginate();","title":""},{"docid":"81ab68e7cef238839c7589a71e4bf5b2","score":"0.5946625","text":"public function listar($pagina){\n\t\t $this->load('model/MarcaModel.php');\n\t\t \n\t\t //si me piden APLICAR un filtro\n\t\t if(!empty($_POST['filtrar'])){\n\t\t //recupera el filtro a aplicar\n\t\t $f = new stdClass(); //filtro\n\t\t $f->texto = htmlspecialchars($_POST['texto']);\n\t\t $f->campo = htmlspecialchars($_POST['campo']);\n\t\t $f->campoOrden = htmlspecialchars($_POST['campoOrden']);\n\t\t $f->sentidoOrden = htmlspecialchars($_POST['sentidoOrden']);\n\t\t \n\t\t //guarda el filtro en un var de sesión\n\t\t $_SESSION['filtroMarcas'] = serialize($f);\n\t\t }\n\t\t \n\t\t //si me piden QUITAR un filtro\n\t\t if(!empty($_POST['quitarFiltro']))\n\t\t unset($_SESSION['filtroMarcas']);\n\t\t \n\t\t \n\t //comprobar si hay filtro\n\t $filtro = empty($_SESSION['filtroMarcas'])? false : unserialize($_SESSION['filtroMarcas']);\n\t\t \n\t\t //para la paginación\n\t\t $num = 5; //numero de resultados por página\n\t\t $pagina = abs(intval($pagina)); //para evitar cosas raras por url\n\t\t $pagina = empty($pagina)? 1 : $pagina; //página a mostrar\n\t\t $offset = $num*($pagina-1); //offset\n\t\t \n\t\t //si no hay que filtrar los resultados...\n\t\t if(!$filtro){\n\t\t //recupera todas las marcas\n\t\t $marcas = MarcaModel::getMarcas(1000);\n\t\t //total de registros (para paginación)\n\t\t $totalRegistros = MarcaModel::getTotal();\n\t\t }else{\n\t\t //recupera las marcas con el filtro aplicado\n\t\t $marcas = MarcaModel::getMarcas($num, $offset, $filtro->texto, $filtro->campo, $filtro->campoOrden, $filtro->sentidoOrden);\n\t\t //total de registros (para paginación)\n\t\t $totalRegistros = MarcaModel::getTotal($filtro->texto, $filtro->campo);\n\t\t }\n\t\t \n\t\t //cargar la vista del listado\n\t\t $datos = array();\n\t\t $datos['usuario'] = Login::getUsuario();\n\t\t $datos['marcas'] = $marcas;\n\t\t $datos['filtro'] = $filtro;\n\t\t $datos['paginaActual'] = $pagina;\n\t\t $datos['paginas'] = ceil($totalRegistros/$num); //total de páginas (para paginación)\n\t\t $datos['totalRegistros'] = $totalRegistros;\n\t\t $datos['regPorPagina'] = $num;\n\t\t \n $this->load_view('view/marcas/lista.php', $datos);\n\t\t}","title":""},{"docid":"d77b8c1cd3b1d08459d4e776e8c83a3d","score":"0.59332955","text":"public function filter(Request $request){\n if ($request->has('filter')){\n list($criteria, $value) = explode(':', $request->filter);\n\n $sortInstitution = Institution::query()->where($criteria,'>', $value);\n return response()->json([\n \"result\" => $sortInstitution->paginate(3),\n ], 201);\n }\n }","title":""},{"docid":"8985c88eef7a3f94062e96b53629f35a","score":"0.5897872","text":"public function detalhesFiltrosPaginationAction()\n {\n #$this->params()->fromQuery('paramname'); // From GET\n #$this->params()->fromRoute('paramname'); // From RouteMatch\n #$this->params()->fromHeader('paramname'); // From header\n #$this->params()->fromFiles('paramname'); // From file being uploaded\n $filter = $this->getFilterPage();\n $request = $this->getRequest();\n $post = \\Estrutura\\Helpers\\Utilities::arrayMapArray('trim', $request->getPost()->toArray());\n\n $camposFilter = [\n ];\n\n $paginator = $this->service->getDetalhesFiltrosPaginator($post, $filter, $camposFilter);\n $paginator->setItemCountPerPage($paginator->getTotalItemCount());\n\n $countPerPage = $this->getCountPerPage(\n current(\\Estrutura\\Helpers\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\n );\n\n $paginator->setItemCountPerPage($this->getCountPerPage(\n current(\\Estrutura\\Helpers\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\n ))->setCurrentPageNumber($this->getCurrentPage());\n\n $viewModel = new ViewModel([\n 'service' => $this->service,\n 'form' => new \\Pesquisar\\Form\\PesquisarForm(),\n 'paginator' => $paginator,\n 'filter' => $filter,\n 'countPerPage' => $countPerPage,\n 'camposFilter' => $camposFilter,\n 'controller' => $this->params('controller'),\n 'atributos' => array()\n ]);\n\n return $viewModel->setTerminal(TRUE);\n }","title":""},{"docid":"8985c88eef7a3f94062e96b53629f35a","score":"0.5897872","text":"public function detalhesFiltrosPaginationAction()\n {\n #$this->params()->fromQuery('paramname'); // From GET\n #$this->params()->fromRoute('paramname'); // From RouteMatch\n #$this->params()->fromHeader('paramname'); // From header\n #$this->params()->fromFiles('paramname'); // From file being uploaded\n $filter = $this->getFilterPage();\n $request = $this->getRequest();\n $post = \\Estrutura\\Helpers\\Utilities::arrayMapArray('trim', $request->getPost()->toArray());\n\n $camposFilter = [\n ];\n\n $paginator = $this->service->getDetalhesFiltrosPaginator($post, $filter, $camposFilter);\n $paginator->setItemCountPerPage($paginator->getTotalItemCount());\n\n $countPerPage = $this->getCountPerPage(\n current(\\Estrutura\\Helpers\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\n );\n\n $paginator->setItemCountPerPage($this->getCountPerPage(\n current(\\Estrutura\\Helpers\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\n ))->setCurrentPageNumber($this->getCurrentPage());\n\n $viewModel = new ViewModel([\n 'service' => $this->service,\n 'form' => new \\Pesquisar\\Form\\PesquisarForm(),\n 'paginator' => $paginator,\n 'filter' => $filter,\n 'countPerPage' => $countPerPage,\n 'camposFilter' => $camposFilter,\n 'controller' => $this->params('controller'),\n 'atributos' => array()\n ]);\n\n return $viewModel->setTerminal(TRUE);\n }","title":""},{"docid":"8fd598d23b4dda2201bce41fb52102b0","score":"0.584715","text":"public function getAllWithPaginate($filter = [], $pageSize = 20,$orderby = ['created_at' => 'DESC'],$with=\"\")\n\t{\n $data_return = $this->model;\n\n $no_filter_more = false;\n\t\tif ( ! empty($filter))\n\t\t{\n\t\t\tforeach ($filter as $key => $value)\n\t\t\t{\n\t\t\t\tif ($value == ''){\n\t\t\t\t\tunset($filter[$key]);\n\t\t\t\t}\n\n \t// Nếu là aray quy định\n \tif (is_array($value)) {\n \t$op = array_get($value, 'operator');\n \t$val = array_get($value, 'value');\n \t$column = $key;\n \t$data_return = $data_return->where($column, $op, $val); \n \t$no_filter_more = true;\n \t} else {\n \t\t$data_return = $data_return->where($key,$value);\n \t}\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($orderby)){\n\t\t\tforeach ($orderby as $key => $value) {\n\t\t\t\t$data_return = $data_return->orderby($key,$value);\n\t\t\t}\n\t\t}\n\n\t\tif($with != \"\"){\n\t\t\t$data_return->with($with);\n\t\t}\n\n\t\treturn $data_return->paginate($pageSize);\n\t}","title":""},{"docid":"08b6a46993bc9b679115740906f90daf","score":"0.58149856","text":"public function addFilters() {\n\t\t$this->addFilter(new Generator\\Filters\\Upper);\n\t\t$this->addFilter(new Generator\\Filters\\Lower);\n\t\t$this->addFilter(new Generator\\Filters\\Date);\n\t\t$this->addFilter(new Generator\\Filters\\Number);\n\t}","title":""},{"docid":"df0e7981f46ed95b99a11954c96f05fa","score":"0.5808622","text":"function getAlumnos($filter,$page,$model)\r\n { \r\n $where = \" INNER JOIN carrera ON alumno.career = carrera.idcarrera WHERE alumno.numcontrol LIKE :numcontrol OR alumno.nameA LIKE :nameA\";\r\n $array=array('numcontrol'=>'%'.$filter.'%','nameA'=>'%'.$filter.'%');\r\n $columns=\"alumno.numcontrol, alumno.nameA, carrera.short_name, alumno.phone\";\r\n return $model->paginador($columns,\"alumno\",\"Alumno\",$page,$where,$array);\r\n }","title":""},{"docid":"e5eaac1ef017c328de5aee20d3ea95db","score":"0.5791585","text":"public function showPostFilterAsPaginationPublic($filter='latest',$sort='desc',$genre1='',$genre2='',$country='',$year='') {\n\t\t\t$newgenre1 = \"and a.Tags like '%\".str_replace(\"'\",\"\",$genre1).\"%' \";\n\t\t\t$newgenre2 = (!empty($genre2)?\"and a.Tags like '%\".str_replace(\"'\",\"\",$genre2).\"%' \":\"\");\n\t\t\t$newcountry = \"and a.Country like '%\".str_replace(\"'\",\"\",$country).\"%' \";\n\t\t\t$newyear = \"and a.Released like '%\".str_replace(\"'\",\"\",$year).\"%' \";\n\t\t\tif ($filter == 'rating'){\n\t\t\t\t$newfilter = 'a.Rating '.str_replace(\"'\",\"\",$sort).',a.Released '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'popular'){\n\t\t\t\t$newfilter = 'a.Released '.str_replace(\"'\",\"\",$sort).',a.Viewer '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'released'){\n\t\t\t\t$newfilter = 'a.Released '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'latest'){\n\t\t\t\t$newfilter = 'a.Created_at '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'alphabet'){\n\t\t\t\t$newfilter = 'a.Title '.str_replace(\"'\",\"\",$sort);\n\t\t\t} else if ($filter == 'favorite'){\n\t\t\t\tif (str_replace(\"'\",\"\",$sort) == 'desc'){\n\t\t\t\t\t$newsort = 'asc';\n\t\t\t\t} else {\n\t\t\t\t\t$newsort = 'desc';\n\t\t\t\t}\n\t\t\t\t$newfilter = 'a.Released '.str_replace(\"'\",\"\",$sort).',a.Liked '.str_replace(\"'\",\"\",$sort).', a.Disliked '.$newsort;\n\t\t\t} else {\n\t\t\t\t$newfilter = 'a.Created_at '.str_replace(\"'\",\"\",$sort);\n\t\t\t}\n\t\t\t$sqlcountrow = \"SELECT count(a.PostID) as TotalRow\n\t\t\t\tfrom data_post a\n\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\twhere a.StatusID='51'\n\t\t\t\t\".$newgenre1.\"\n\t\t\t\t\".$newgenre2.\"\n\t\t\t\t\".$newcountry.\"\n\t\t\t\t\".$newyear.\"\n\t\t\t\torder by \".$newfilter.\";\";\n\t\t\t\t$stmt = $this->db->prepare($sqlcountrow);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \tif ($stmt->rowCount() > 0){\n\t\t\t\t\t\t$single = $stmt->fetch();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Paginate won't work if page and items per page is negative.\n\t\t\t\t\t\t// So make sure that page and items per page is always return minimum zero number.\n\t\t\t\t\t\t$newpage = Validation::integerOnly($this->page);\n\t\t\t\t\t\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\n\t\t\t\t\t\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\n\t\t\t\t\t\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\n\n\t\t\t\t\t\t// Query Data\n\t\t\t\t\t\t$sql = \"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\n\t\t\t\t\t\t\t\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\n\t\t\t\t\t\t\t\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\n\t\t\t\t\t\t\tfrom data_post a\n\t\t\t\t\t\t\tinner join core_status b on a.StatusID=b.StatusID\n\t\t\t\t\t\t\twhere a.StatusID='51' \n\t\t\t\t\t\t\t\".$newgenre1.\"\n\t\t\t\t\t\t\t\".$newgenre2.\"\n\t\t\t\t\t\t\t\".$newcountry.\"\n\t\t\t\t\t\t\t\".$newyear.\"\n\t\t\t\t\t\t\torder by \".$newfilter.\" LIMIT :limpage , :offpage;\";\n\t\t\t\t\t\t$stmt2 = $this->db->prepare($sql);\n\t\t\t\t\t\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\n\t\t\t\t\t\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($stmt2->execute()){\n\t\t\t\t\t\t\tif ($stmt2->rowCount() > 0){\n\t\t\t\t\t\t\t\t$datares = \"[\";\n\t\t\t\t\t\t\t\twhile($redata = $stmt2->fetch()) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//Start Tags\n\t\t\t\t\t\t\t\t\t$return_arr = null;\n\t\t\t\t\t\t\t\t\t$names = $redata['Tags'];\t\n\t\t\t\t\t\t\t\t\t$named = preg_split( \"/[,]/\", $names );\n\t\t\t\t\t\t\t\t\tforeach($named as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$return_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Tags\n\n\t\t\t\t\t\t\t\t\t//Start Stars\n\t\t\t\t\t\t\t\t\t$stars_arr = null;\n\t\t\t\t\t\t\t\t\t$starnames = $redata['Stars'];\t\n\t\t\t\t\t\t\t\t\t$starnamed = preg_split( \"/[,]/\", $starnames );\n\t\t\t\t\t\t\t\t\tforeach($starnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$stars_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Stars\n\n\t\t\t\t\t\t\t\t\t//Start Cast\n\t\t\t\t\t\t\t\t\t$cast_arr = null;\n\t\t\t\t\t\t\t\t\t$castnames = $redata['Cast'];\t\n\t\t\t\t\t\t\t\t\t$castnamed = preg_split( \"/[,]/\", $castnames );\n\t\t\t\t\t\t\t\t\tforeach($castnamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$cast_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Cast\n\n\t\t\t\t\t\t\t\t\t//Start Director\n\t\t\t\t\t\t\t\t\t$director_arr = null;\n\t\t\t\t\t\t\t\t\t$directornames = $redata['Director'];\t\n\t\t\t\t\t\t\t\t\t$directornamed = preg_split( \"/[,]/\", $directornames );\n\t\t\t\t\t\t\t\t\tforeach($directornamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$director_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Director\n\n\t\t\t\t\t\t\t\t\t//Start Country\n\t\t\t\t\t\t\t\t\t$country_arr = null;\n\t\t\t\t\t\t\t\t\t$countrynames = $redata['Country'];\t\n\t\t\t\t\t\t\t\t\t$countrynamed = preg_split( \"/[,]/\", $countrynames );\n\t\t\t\t\t\t\t\t\tforeach($countrynamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$country_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Country\n\n\t\t\t\t\t\t\t\t\t//Start Embed\n\t\t\t\t\t\t\t\t\t$embed_arr = null;\n\t\t\t\t\t\t\t\t\t$embednames = $redata['Embed_video'];\t\n\t\t\t\t\t\t\t\t\t$embednamed = preg_split( \"/[,]/\", $embednames );\n\t\t\t\t\t\t\t\t\tforeach($embednamed as $name){\n\t\t\t\t\t\t\t\t\t\tif ($name != null){$embed_arr[] = trim($name);}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t//End Embed\n\n\t\t\t\t\t\t\t\t\t$datares .= '{\"PostID\":'.json_encode($redata['PostID']).',\n\t\t\t\t\t\t\t\t\t\t\"Title\":'.json_encode($redata['Title']).',\n\t\t\t\t\t\t\t\t\t\t\"Description\":'.json_encode($redata['Description']).',\n\t\t\t\t\t\t\t\t\t\t\"Image\":'.json_encode($redata['Image']).',\n\t\t\t\t\t\t\t\t\t\t\"Embed\":'.json_encode($embed_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Duration\":'.json_encode($redata['Duration']).',\n\t\t\t\t\t\t\t\t\t\t\"Stars\":'.json_encode($stars_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Cast\":'.json_encode($cast_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Director\":'.json_encode($director_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Tags\":'.json_encode($return_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Country\":'.json_encode($country_arr).',\n\t\t\t\t\t\t\t\t\t\t\"Released\":'.json_encode($redata['Released']).',\n\t\t\t\t\t\t\t\t\t\t\"Rating\":'.json_encode($redata['Rating']).',\n\t\t\t\t\t\t\t\t\t\t\"Viewer\":'.json_encode($redata['Viewer']).',\n\t\t\t\t\t\t\t\t\t\t\"Liked\":'.json_encode($redata['Liked']).',\n\t\t\t\t\t\t\t\t\t\t\"Disliked\":'.json_encode($redata['Disliked']).',\n\t\t\t\t\t\t\t\t\t\t\"Created_at\":'.json_encode($redata['Created_at']).',\n\t\t\t\t\t\t\t\t\t\t\"User\":'.json_encode($redata['User']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_at\":'.json_encode($redata['Updated_at']).',\n\t\t\t\t\t\t\t\t\t\t\"Updated_by\":'.json_encode($redata['Updated_by']).',\n\t\t\t\t\t\t\t\t\t\t\"StatusID\":'.json_encode($redata['StatusID']).',\n\t\t\t\t\t\t\t\t\t\t\"Status\":'.json_encode($redata['Status']).'},';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$datares = substr($datares, 0, -1);\n\t\t\t\t\t\t\t\t$datares .= \"]\";\n\t\t\t\t\t\t\t\t$pagination = new \\classes\\Pagination();\n\t\t\t\t\t\t\t\t$pagination->totalRow = $single['TotalRow'];\n\t\t\t\t\t\t\t\t$pagination->page = $this->page;\n\t\t\t\t\t\t\t\t$pagination->itemsPerPage = $this->itemsPerPage;\n\t\t\t\t\t\t\t\t$pagination->fetchAllAssoc = json_decode($datares);\n\t\t\t\t\t\t\t\t$data = $pagination->toDataArray();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$data = [\n\t\t \t \t \t\t\t'status' => 'error',\n\t \t\t \t\t \t'code' => 'RS601',\n\t \t\t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$data = [\n \t \t \t\t'status' => 'error',\n\t\t \t\t \t'code' => 'RS202',\n\t \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t } else {\n \t \t\t $data = [\n \t\t\t \t'status' => 'error',\n\t\t\t \t\t 'code' => 'RS601',\n \t\t\t \t 'message' => CustomHandlers::getreSlimMessage('RS601')\n\t\t\t\t\t\t];\n\t\t \t } \t \t\n\t\t\t\t} else {\n\t\t\t\t\t$data = [\n \t\t\t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS202')\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n \n\t\t\treturn json_encode($data, JSON_PRETTY_PRINT);\n\t $this->db= null;\n\t\t}","title":""},{"docid":"644a30949b8aa3ccaef52557d5205151","score":"0.5790531","text":"public function listado($paginaActual = 0,$porpagina = 10)\n\t{\n\t}","title":""},{"docid":"e5a87c4d75c60e2b947741ee6ae06b75","score":"0.57839924","text":"public function addInCmsPageFilter()\n {\n return $this->getSelect()->where('main_table.in_cms_page = 1');\n }","title":""},{"docid":"acc77a85a4b7741bca920294681fda78","score":"0.5775686","text":"public function getFilters() {\n\t\t// Number of Google page for SERPS\n\t\t$incrementOptions = array ();\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 10, JText::_ ( 'COM_JMAP_10PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 100, JText::_ ( 'COM_JMAP_100PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 200, JText::_ ( 'COM_JMAP_200PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 500, JText::_ ( 'COM_JMAP_500PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 1000, JText::_ ( 'COM_JMAP_1000PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 5000, JText::_ ( 'COM_JMAP_5000PAGES' ) );\n\t\t$incrementOptions [] = JHtml::_ ( 'select.option', 10000, JText::_ ( 'COM_JMAP_10000PAGES' ) );\n\t\t$lists ['numpages'] = JHtml::_ ( 'select.genericlist', $incrementOptions, 'numpages', 'onchange=\"Joomla.submitform();\" class=\"inputbox input-medium\"', 'value', 'text', $this->getState ( 'numpages' ) );\n\t\t\n\t\t// Languages\n\t\t$languagesHttpAcceptHeaders = array (\n\t\t\t\t\"af-NA\"=>\"Afrikaans (Namibia)\",\n\t\t\t\t\"af-ZA\"=>\"Afrikaans (South Africa)\",\n\t\t\t\t\"ak-GH\"=>\"Akan (Ghana)\",\n\t\t\t\t\"sq-AL\"=>\"Albanian (Albania)\",\n\t\t\t\t\"am-ET\"=>\"Amharic (Ethiopia)\",\n\t\t\t\t\"ar-DZ\"=>\"Arabic (Algeria)\",\n\t\t\t\t\"ar-BH\"=>\"Arabic (Bahrain)\",\n\t\t\t\t\"ar-EG\"=>\"Arabic (Egypt)\",\n\t\t\t\t\"ar-IQ\"=>\"Arabic (Iraq)\",\n\t\t\t\t\"ar-JO\"=>\"Arabic (Jordan)\",\n\t\t\t\t\"ar-KW\"=>\"Arabic (Kuwait)\",\n\t\t\t\t\"ar-LB\"=>\"Arabic (Lebanon)\",\n\t\t\t\t\"ar-LY\"=>\"Arabic (Libya)\",\n\t\t\t\t\"ar-MA\"=>\"Arabic (Morocco)\",\n\t\t\t\t\"ar-OM\"=>\"Arabic (Oman)\",\n\t\t\t\t\"ar-QA\"=>\"Arabic (Qatar)\",\n\t\t\t\t\"ar-SA\"=>\"Arabic (Saudi Arabia)\",\n\t\t\t\t\"ar-SD\"=>\"Arabic (Sudan)\",\n\t\t\t\t\"ar-SY\"=>\"Arabic (Syria)\",\n\t\t\t\t\"ar-TN\"=>\"Arabic (Tunisia)\",\n\t\t\t\t\"ar-AE\"=>\"Arabic (United Arab Emirates)\",\n\t\t\t\t\"ar-YE\"=>\"Arabic (Yemen)\",\n\t\t\t\t\"hy-AM\"=>\"Armenian (Armenia)\",\n\t\t\t\t\"as-IN\"=>\"Assamese (India)\",\n\t\t\t\t\"asa-TZ\"=>\"Asu (Tanzania)\",\n\t\t\t\t\"az-Cyrl\"=>\"Azerbaijani (Cyrillic)\",\n\t\t\t\t\"az-Cyrl-AZ\"=>\"Azerbaijani (Cyrillic, Azerbaijan)\",\n\t\t\t\t\"az-Latn\"=>\"Azerbaijani (Latin)\",\n\t\t\t\t\"az-Latn-AZ\"=>\"Azerbaijani (Latin, Azerbaijan)\",\n\t\t\t\t\"bm-ML\"=>\"Bambara (Mali)\",\n\t\t\t\t\"eu-ES\"=>\"Basque (Spain)\",\n\t\t\t\t\"be-BY\"=>\"Belarusian (Belarus)\",\n\t\t\t\t\"bem-ZM\"=>\"Bemba (Zambia)\",\n\t\t\t\t\"bez-TZ\"=>\"Bena (Tanzania)\",\n\t\t\t\t\"bn-BD\"=>\"Bengali (Bangladesh)\",\n\t\t\t\t\"bn-IN\"=>\"Bengali (India)\",\n\t\t\t\t\"bs-BA\"=>\"Bosnian (Bosnia and Herzegovina)\",\n\t\t\t\t\"bg-BG\"=>\"Bulgarian (Bulgaria)\",\n\t\t\t\t\"my-MM\"=>\"Burmese (Myanmar [Burma])\",\n\t\t\t\t\"ca-ES\"=>\"Catalan (Spain)\",\n\t\t\t\t\"tzm-Latn\"=>\"Central Morocco Tamazight (Latin)\",\n\t\t\t\t\"tzm-Latn-MA\"=>\"Central Morocco Tamazight (Latin, Morocco)\",\n\t\t\t\t\"tzm\"=>\"Central Morocco Tamazight\",\n\t\t\t\t\"chr-US\"=>\"Cherokee (United States)\",\n\t\t\t\t\"cgg-UG\"=>\"Chiga (Uganda)\",\n\t\t\t\t\"zh-Hans\"=>\"Chinese (Simplified Han)\",\n\t\t\t\t\"zh-Hans-CN\"=>\"Chinese (Simplified Han, China)\",\n\t\t\t\t\"zh-Hans-HK\"=>\"Chinese (Simplified Han, Hong Kong SAR China)\",\n\t\t\t\t\"zh-Hans-MO\"=>\"Chinese (Simplified Han, Macau SAR China)\",\n\t\t\t\t\"zh-Hans-SG\"=>\"Chinese (Simplified Han, Singapore)\",\n\t\t\t\t\"zh-Hant\"=>\"Chinese (Traditional Han)\",\n\t\t\t\t\"zh-Hant-HK\"=>\"Chinese (Traditional Han, Hong Kong SAR China)\",\n\t\t\t\t\"zh-Hant-MO\"=>\"Chinese (Traditional Han, Macau SAR China)\",\n\t\t\t\t\"zh-Hant-TW\"=>\"Chinese (Traditional Han, Taiwan)\",\n\t\t\t\t\"kw-GB\"=>\"Cornish (United Kingdom)\",\n\t\t\t\t\"hr-HR\"=>\"Croatian (Croatia)\",\n\t\t\t\t\"cs-CZ\"=>\"Czech (Czech Republic)\",\n\t\t\t\t\"da-DK\"=>\"Danish (Denmark)\",\n\t\t\t\t\"nl-BE\"=>\"Dutch (Belgium)\",\n\t\t\t\t\"nl-NL\"=>\"Dutch (Netherlands)\",\n\t\t\t\t\"ebu-KE\"=>\"Embu (Kenya)\",\n\t\t\t\t\"en-AS\"=>\"English (American Samoa)\",\n\t\t\t\t\"en-AU\"=>\"English (Australia)\",\n\t\t\t\t\"en-BE\"=>\"English (Belgium)\",\n\t\t\t\t\"en-BZ\"=>\"English (Belize)\",\n\t\t\t\t\"en-BW\"=>\"English (Botswana)\",\n\t\t\t\t\"en-CA\"=>\"English (Canada)\",\n\t\t\t\t\"en-GU\"=>\"English (Guam)\",\n\t\t\t\t\"en-HK\"=>\"English (Hong Kong SAR China)\",\n\t\t\t\t\"en-IN\"=>\"English (India)\",\n\t\t\t\t\"en-IE\"=>\"English (Ireland)\",\n\t\t\t\t\"en-JM\"=>\"English (Jamaica)\",\n\t\t\t\t\"en-MT\"=>\"English (Malta)\",\n\t\t\t\t\"en-MH\"=>\"English (Marshall Islands)\",\n\t\t\t\t\"en-MU\"=>\"English (Mauritius)\",\n\t\t\t\t\"en-NA\"=>\"English (Namibia)\",\n\t\t\t\t\"en-NZ\"=>\"English (New Zealand)\",\n\t\t\t\t\"en-MP\"=>\"English (Northern Mariana Islands)\",\n\t\t\t\t\"en-PK\"=>\"English (Pakistan)\",\n\t\t\t\t\"en-PH\"=>\"English (Philippines)\",\n\t\t\t\t\"en-SG\"=>\"English (Singapore)\",\n\t\t\t\t\"en-ZA\"=>\"English (South Africa)\",\n\t\t\t\t\"en-TT\"=>\"English (Trinidad and Tobago)\",\n\t\t\t\t\"en-UM\"=>\"English (U.S. Minor Outlying Islands)\",\n\t\t\t\t\"en-VI\"=>\"English (U.S. Virgin Islands)\",\n\t\t\t\t\"en-GB\"=>\"English (United Kingdom)\",\n\t\t\t\t\"en-US\"=>\"English (United States)\",\n\t\t\t\t\"en-ZW\"=>\"English (Zimbabwe)\",\n\t\t\t\t\"et-EE\"=>\"Estonian (Estonia)\",\n\t\t\t\t\"ee-GH\"=>\"Ewe (Ghana)\",\n\t\t\t\t\"ee-TG\"=>\"Ewe (Togo)\",\n\t\t\t\t\"fo-FO\"=>\"Faroese (Faroe Islands)\",\n\t\t\t\t\"fil-PH\"=>\"Filipino (Philippines)\",\n\t\t\t\t\"fi-FI\"=>\"Finnish (Finland)\",\n\t\t\t\t\"fr-BE\"=>\"French (Belgium)\",\n\t\t\t\t\"fr-BJ\"=>\"French (Benin)\",\n\t\t\t\t\"fr-BF\"=>\"French (Burkina Faso)\",\n\t\t\t\t\"fr-BI\"=>\"French (Burundi)\",\n\t\t\t\t\"fr-CM\"=>\"French (Cameroon)\",\n\t\t\t\t\"fr-CA\"=>\"French (Canada)\",\n\t\t\t\t\"fr-CF\"=>\"French (Central African Republic)\",\n\t\t\t\t\"fr-TD\"=>\"French (Chad)\",\n\t\t\t\t\"fr-KM\"=>\"French (Comoros)\",\n\t\t\t\t\"fr-CG\"=>\"French (Congo - Brazzaville)\",\n\t\t\t\t\"fr-CD\"=>\"French (Congo - Kinshasa)\",\n\t\t\t\t\"fr-CI\"=>\"French (Cote Ivoire)\",\n\t\t\t\t\"fr-DJ\"=>\"French (Djibouti)\",\n\t\t\t\t\"fr-GQ\"=>\"French (Equatorial Guinea)\",\n\t\t\t\t\"fr-FR\"=>\"French (France)\",\n\t\t\t\t\"fr-GA\"=>\"French (Gabon)\",\n\t\t\t\t\"fr-GP\"=>\"French (Guadeloupe)\",\n\t\t\t\t\"fr-GN\"=>\"French (Guinea)\",\n\t\t\t\t\"fr-LU\"=>\"French (Luxembourg)\",\n\t\t\t\t\"fr-MG\"=>\"French (Madagascar)\",\n\t\t\t\t\"fr-ML\"=>\"French (Mali)\",\n\t\t\t\t\"fr-MQ\"=>\"French (Martinique)\",\n\t\t\t\t\"fr-MC\"=>\"French (Monaco)\",\n\t\t\t\t\"fr-NE\"=>\"French (Niger)\",\n\t\t\t\t\"fr-RW\"=>\"French (Rwanda)\",\n\t\t\t\t\"fr-RE\"=>\"French (Reunion)\",\n\t\t\t\t\"fr-BL\"=>\"French (Saint Barthelemy)\",\n\t\t\t\t\"fr-MF\"=>\"French (Saint Martin)\",\n\t\t\t\t\"fr-SN\"=>\"French (Senegal)\",\n\t\t\t\t\"fr-CH\"=>\"French (Switzerland)\",\n\t\t\t\t\"fr-TG\"=>\"French (Togo)\",\n\t\t\t\t\"ff-SN\"=>\"Fulah (Senegal)\",\n\t\t\t\t\"gl-ES\"=>\"Galician (Spain)\",\n\t\t\t\t\"lg-UG\"=>\"Ganda (Uganda)\",\n\t\t\t\t\"ka-GE\"=>\"Georgian (Georgia)\",\n\t\t\t\t\"de-AT\"=>\"German (Austria)\",\n\t\t\t\t\"de-BE\"=>\"German (Belgium)\",\n\t\t\t\t\"de-DE\"=>\"German (Germany)\",\n\t\t\t\t\"de-LI\"=>\"German (Liechtenstein)\",\n\t\t\t\t\"de-LU\"=>\"German (Luxembourg)\",\n\t\t\t\t\"de-CH\"=>\"German (Switzerland)\",\n\t\t\t\t\"el-CY\"=>\"Greek (Cyprus)\",\n\t\t\t\t\"el-GR\"=>\"Greek (Greece)\",\n\t\t\t\t\"gu-IN\"=>\"Gujarati (India)\",\n\t\t\t\t\"guz-KE\"=>\"Gusii (Kenya)\",\n\t\t\t\t\"ha-Latn\"=>\"Hausa (Latin)\",\n\t\t\t\t\"ha-Latn-GH\"=>\"Hausa (Latin, Ghana)\",\n\t\t\t\t\"ha-Latn-NE\"=>\"Hausa (Latin, Niger)\",\n\t\t\t\t\"ha-Latn-NG\"=>\"Hausa (Latin, Nigeria)\",\n\t\t\t\t\"haw-US\"=>\"Hawaiian (United States)\",\n\t\t\t\t\"he-IL\"=>\"Hebrew (Israel)\",\n\t\t\t\t\"hi-IN\"=>\"Hindi (India)\",\n\t\t\t\t\"hu-HU\"=>\"Hungarian (Hungary)\",\n\t\t\t\t\"is-IS\"=>\"Icelandic (Iceland)\",\n\t\t\t\t\"ig-NG\"=>\"Igbo (Nigeria)\",\n\t\t\t\t\"id-ID\"=>\"Indonesian (Indonesia)\",\n\t\t\t\t\"ga-IE\"=>\"Irish (Ireland)\",\n\t\t\t\t\"it-IT\"=>\"Italian (Italy)\",\n\t\t\t\t\"it-CH\"=>\"Italian (Switzerland)\",\n\t\t\t\t\"ja-JP\"=>\"Japanese (Japan)\",\n\t\t\t\t\"kea-CV\"=>\"Kabuverdianu (Cape Verde)\",\n\t\t\t\t\"kab-DZ\"=>\"Kabyle (Algeria)\",\n\t\t\t\t\"kl-GL\"=>\"Kalaallisut (Greenland)\",\n\t\t\t\t\"kln-KE\"=>\"Kalenjin (Kenya)\",\n\t\t\t\t\"kam-KE\"=>\"Kamba (Kenya)\",\n\t\t\t\t\"kn-IN\"=>\"Kannada (India)\",\n\t\t\t\t\"kk-Cyrl\"=>\"Kazakh (Cyrillic)\",\n\t\t\t\t\"kk-Cyrl-KZ\"=>\"Kazakh (Cyrillic, Kazakhstan)\",\n\t\t\t\t\"km-KH\"=>\"Khmer (Cambodia)\",\n\t\t\t\t\"ki-KE\"=>\"Kikuyu (Kenya)\",\n\t\t\t\t\"rw-RW\"=>\"Kinyarwanda (Rwanda)\",\n\t\t\t\t\"kok-IN\"=>\"Konkani (India)\",\n\t\t\t\t\"ko-KR\"=>\"Korean (South Korea)\",\n\t\t\t\t\"khq-ML\"=>\"Koyra Chiini (Mali)\",\n\t\t\t\t\"ses-ML\"=>\"Koyraboro Senni (Mali)\",\n\t\t\t\t\"lag-TZ\"=>\"Langi (Tanzania)\",\n\t\t\t\t\"lv-LV\"=>\"Latvian (Latvia)\",\n\t\t\t\t\"lt-LT\"=>\"Lithuanian (Lithuania)\",\n\t\t\t\t\"luo-KE\"=>\"Luo (Kenya)\",\n\t\t\t\t\"luy-KE\"=>\"Luyia (Kenya)\",\n\t\t\t\t\"mk-MK\"=>\"Macedonian (Macedonia)\",\n\t\t\t\t\"jmc-TZ\"=>\"Machame (Tanzania)\",\n\t\t\t\t\"kde-TZ\"=>\"Makonde (Tanzania)\",\n\t\t\t\t\"mg-MG\"=>\"Malagasy (Madagascar)\",\n\t\t\t\t\"ms-BN\"=>\"Malay (Brunei)\",\n\t\t\t\t\"ms-MY\"=>\"Malay (Malaysia)\",\n\t\t\t\t\"ml-IN\"=>\"Malayalam (India)\",\n\t\t\t\t\"mt-MT\"=>\"Maltese (Malta)\",\n\t\t\t\t\"gv-GB\"=>\"Manx (United Kingdom)\",\n\t\t\t\t\"mr-IN\"=>\"Marathi (India)\",\n\t\t\t\t\"mas-KE\"=>\"Masai (Kenya)\",\n\t\t\t\t\"mas-TZ\"=>\"Masai (Tanzania)\",\n\t\t\t\t\"mer-KE\"=>\"Meru (Kenya)\",\n\t\t\t\t\"mfe-MU\"=>\"Morisyen (Mauritius)\",\n\t\t\t\t\"naq-NA\"=>\"Nama (Namibia)\",\n\t\t\t\t\"ne-IN\"=>\"Nepali (India)\",\n\t\t\t\t\"ne-NP\"=>\"Nepali (Nepal)\",\n\t\t\t\t\"nd-ZW\"=>\"North Ndebele (Zimbabwe)\",\n\t\t\t\t\"nb-NO\"=>\"Norwegian Bokmal (Norway)\",\n\t\t\t\t\"nn-NO\"=>\"Norwegian Nynorsk (Norway)\",\n\t\t\t\t\"nyn-UG\"=>\"Nyankole (Uganda)\",\n\t\t\t\t\"or-IN\"=>\"Oriya (India)\",\n\t\t\t\t\"om-ET\"=>\"Oromo (Ethiopia)\",\n\t\t\t\t\"m-KE\"=>\"Oromo (Kenya)\",\n\t\t\t\t\"ps-AF\"=>\"Pashto (Afghanistan)\",\n\t\t\t\t\"fa-AF\"=>\"Persian (Afghanistan)\",\n\t\t\t\t\"fa-IR\"=>\"Persian (Iran)\",\n\t\t\t\t\"pl-PL\"=>\"Polish (Poland)\",\n\t\t\t\t\"pt-BR\"=>\"Portuguese (Brazil)\",\n\t\t\t\t\"pt-GW\"=>\"Portuguese (Guinea-Bissau)\",\n\t\t\t\t\"pt-MZ\"=>\"Portuguese (Mozambique)\",\n\t\t\t\t\"pt-PT\"=>\"Portuguese (Portugal)\",\n\t\t\t\t\"pa-Arab\"=>\"Punjabi (Arabic)\",\n\t\t\t\t\"pa-Arab-PK\"=>\"Punjabi (Arabic, Pakistan)\",\n\t\t\t\t\"pa-Guru\"=>\"Punjabi (Gurmukhi)\",\n\t\t\t\t\"pa-Guru-IN\"=>\"Punjabi (Gurmukhi, India)\",\n\t\t\t\t\"ro-MD\"=>\"Romanian (Moldova)\",\n\t\t\t\t\"ro-RO\"=>\"Romanian (Romania)\",\n\t\t\t\t\"rm-CH\"=>\"Romansh (Switzerland)\",\n\t\t\t\t\"rof-TZ\"=>\"Rombo (Tanzania)\",\n\t\t\t\t\"ru-MD\"=>\"Russian (Moldova)\",\n\t\t\t\t\"ru-RU\"=>\"Russian (Russia)\",\n\t\t\t\t\"ru-UA\"=>\"Russian (Ukraine)\",\n\t\t\t\t\"rwk-TZ\"=>\"Rwa (Tanzania)\",\n\t\t\t\t\"saq-KE\"=>\"Samburu (Kenya)\",\n\t\t\t\t\"sg-CF\"=>\"Sango (Central African Republic)\",\n\t\t\t\t\"seh-MZ\"=>\"Sena (Mozambique)\",\n\t\t\t\t\"sr-Cyrl\"=>\"Serbian (Cyrillic)\",\n\t\t\t\t\"sr-Cyrl-BA\"=>\"Serbian (Cyrillic, Bosnia and Herzegovina)\",\n\t\t\t\t\"sr-Cyrl-ME\"=>\"Serbian (Cyrillic, Montenegro)\",\n\t\t\t\t\"sr-Cyrl-RS\"=>\"Serbian (Cyrillic, Serbia)\",\n\t\t\t\t\"sr-Latn\"=>\"Serbian (Latin)\",\n\t\t\t\t\"sr-Latn-BA\"=>\"Serbian (Latin, Bosnia and Herzegovina)\",\n\t\t\t\t\"sr-Latn-ME\"=>\"Serbian (Latin, Montenegro)\",\n\t\t\t\t\"sr-Latn-RS\"=>\"Serbian (Latin, Serbia)\",\n\t\t\t\t\"sn-ZW\"=>\"Shona (Zimbabwe)\",\n\t\t\t\t\"ii-CN\"=>\"Sichuan Yi (China)\",\n\t\t\t\t\"si-LK\"=>\"Sinhala (Sri Lanka)\",\n\t\t\t\t\"sk-SK\"=>\"Slovak (Slovakia)\",\n\t\t\t\t\"sl-SI\"=>\"Slovenian (Slovenia)\",\n\t\t\t\t\"xog-UG\"=>\"Soga (Uganda)\",\n\t\t\t\t\"so-DJ\"=>\"Somali (Djibouti)\",\n\t\t\t\t\"so-ET\"=>\"Somali (Ethiopia)\",\n\t\t\t\t\"so-KE\"=>\"Somali (Kenya)\",\n\t\t\t\t\"so-SO\"=>\"Somali (Somalia)\",\n\t\t\t\t\"es-AR\"=>\"Spanish (Argentina)\",\n\t\t\t\t\"es-BO\"=>\"Spanish (Bolivia)\",\n\t\t\t\t\"es-CL\"=>\"Spanish (Chile)\",\n\t\t\t\t\"es-CO\"=>\"Spanish (Colombia)\",\n\t\t\t\t\"es-CR\"=>\"Spanish (Costa Rica)\",\n\t\t\t\t\"es-DO\"=>\"Spanish (Dominican Republic)\",\n\t\t\t\t\"es-EC\"=>\"Spanish (Ecuador)\",\n\t\t\t\t\"es-SV\"=>\"Spanish (El Salvador)\",\n\t\t\t\t\"es-GQ\"=>\"Spanish (Equatorial Guinea)\",\n\t\t\t\t\"es-GT\"=>\"Spanish (Guatemala)\",\n\t\t\t\t\"es-HN\"=>\"Spanish (Honduras)\",\n\t\t\t\t\"es-419\"=>\"Spanish (Latin America)\",\n\t\t\t\t\"es-MX\"=>\"Spanish (Mexico)\",\n\t\t\t\t\"es-NI\"=>\"Spanish (Nicaragua)\",\n\t\t\t\t\"es-PA\"=>\"Spanish (Panama)\",\n\t\t\t\t\"es-PY\"=>\"Spanish (Paraguay)\",\n\t\t\t\t\"es-PE\"=>\"Spanish (Peru)\",\n\t\t\t\t\"es-PR\"=>\"Spanish (Puerto Rico)\",\n\t\t\t\t\"es-ES\"=>\"Spanish (Spain)\",\n\t\t\t\t\"es-US\"=>\"Spanish (United States)\",\n\t\t\t\t\"es-UY\"=>\"Spanish (Uruguay)\",\n\t\t\t\t\"es-VE\"=>\"Spanish (Venezuela)\",\n\t\t\t\t\"sw-KE\"=>\"Swahili (Kenya)\",\n\t\t\t\t\"sw-TZ\"=>\"Swahili (Tanzania)\",\n\t\t\t\t\"sv-FI\"=>\"Swedish (Finland)\",\n\t\t\t\t\"sv-SE\"=>\"Swedish (Sweden)\",\n\t\t\t\t\"gsw-CH\"=>\"Swiss German (Switzerland)\",\n\t\t\t\t\"shi-Latn\"=>\"Tachelhit (Latin)\",\n\t\t\t\t\"shi-Latn-MA\"=>\"Tachelhit (Latin, Morocco)\",\n\t\t\t\t\"shi-Tfng\"=>\"Tachelhit (Tifinagh)\",\n\t\t\t\t\"shi-Tfng-MA\"=>\"Tachelhit (Tifinagh, Morocco)\",\n\t\t\t\t\"dav-KE\"=>\"Taita (Kenya)\",\n\t\t\t\t\"ta-IN\"=>\"Tamil (India)\",\n\t\t\t\t\"ta-LK\"=>\"Tamil (Sri Lanka)\",\n\t\t\t\t\"te-IN\"=>\"Telugu (India)\",\n\t\t\t\t\"teo-KE\"=>\"Teso (Kenya)\",\n\t\t\t\t\"teo-UG\"=>\"Teso (Uganda)\",\n\t\t\t\t\"th-TH\"=>\"Thai (Thailand)\",\n\t\t\t\t\"bo-CN\"=>\"Tibetan (China)\",\n\t\t\t\t\"bo-IN\"=>\"Tibetan (India)\",\n\t\t\t\t\"ti-ER\"=>\"Tigrinya (Eritrea)\",\n\t\t\t\t\"ti-ET\"=>\"Tigrinya (Ethiopia)\",\n\t\t\t\t\"to-TO\"=>\"Tonga (Tonga)\",\n\t\t\t\t\"tr-TR\"=>\"Turkish (Turkey)\",\n\t\t\t\t\"uk-UA\"=>\"Ukrainian (Ukraine)\",\n\t\t\t\t\"ur-IN\"=>\"Urdu (India)\",\n\t\t\t\t\"ur-PK\"=>\"Urdu (Pakistan)\",\n\t\t\t\t\"uz-Arab\"=>\"Uzbek (Arabic)\",\n\t\t\t\t\"uz-Arab-AF\"=>\"Uzbek (Arabic, Afghanistan)\",\n\t\t\t\t\"uz-Cyrl\"=>\"Uzbek (Cyrillic)\",\n\t\t\t\t\"uz-Cyrl-UZ\"=>\"Uzbek (Cyrillic, Uzbekistan)\",\n\t\t\t\t\"uz-Latn\"=>\"Uzbek (Latin)\",\n\t\t\t\t\"uz-Latn-UZ\"=>\"Uzbek (Latin, Uzbekistan)\",\n\t\t\t\t\"vi-VN\"=>\"Vietnamese (Vietnam)\",\n\t\t\t\t\"vun-TZ\"=>\"Vunjo (Tanzania)\",\n\t\t\t\t\"cy-GB\"=>\"Welsh (United Kingdom)\",\n\t\t\t\t\"yo-NG\"=>\"Yoruba (Nigeria)\",\n\t\t\t\t\"zu-ZA\"=>\"Zulu (South Africa)\" \n\t\t);\n\t\t\n\t\t$languagesHttpAcceptHeadersOptions = array ();\n\t\t$languagesHttpAcceptHeadersOptions [] = JHtml::_ ( 'select.option', null, JText::_('COM_JMAP_INDEXING_SELECT_DEFAULT') );\n\t\tforeach ($languagesHttpAcceptHeaders as $value=>$text) {\n\t\t\t$languagesHttpAcceptHeadersOptions [] = JHtml::_ ( 'select.option', $value, $text );\n\t\t}\n\t\t$lists ['acceptlanguages'] = JHtml::_ ( 'select.genericlist', $languagesHttpAcceptHeadersOptions, 'acceptlanguage', 'class=\"inputbox input-medium serpcontrol\"', 'value', 'text', $this->getState ( 'acceptlanguage' ) );\n\t\t\n\t\t$countriedTopLevelDomains = array (\n\t\t\t\t'Algeria'=>'dz',\n\t\t\t\t'Ascension Island'=>'ac',\n\t\t\t\t'Andorra'=>'ad',\n\t\t\t\t'Afghanistan'=>'com.af',\n\t\t\t\t'Antigua and Barbuda'=>'com.ag',\n\t\t\t\t'Anguilla'=>'com.ai',\n\t\t\t\t'Albania'=>'al',\n\t\t\t\t'Armenia'=>'am',\n\t\t\t\t'Angola'=>'co.ao',\n\t\t\t\t'Argentina'=>'com.ar',\n\t\t\t\t'American Samoa'=>'as',\n\t\t\t\t'Austria'=>'at',\n\t\t\t\t'Australia'=>'com.au',\n\t\t\t\t'Azerbaijan'=>'az',\n\t\t\t\t'Bosnia and Herzegovina'=>'ba',\n\t\t\t\t'Bangladesh'=>'com.bd',\n\t\t\t\t'Belgium'=>'be',\n\t\t\t\t'Burkina Faso'=>'bf',\n\t\t\t\t'Bulgaria'=>'bg',\n\t\t\t\t'Bahrain'=>'com.bh',\n\t\t\t\t'Burma'=>'com.mm',\n\t\t\t\t'Burundi'=>'bi',\n\t\t\t\t'Benin'=>'bj',\n\t\t\t\t'Brunei'=>'com.bn',\n\t\t\t\t'Bolivia'=>'com.bo',\n\t\t\t\t'Brazil'=>'com.br',\n\t\t\t\t'Bahamas'=>'bs',\n\t\t\t\t'Bhutan'=>'bt',\n\t\t\t\t'Botswana'=>'co.bw',\n\t\t\t\t'Belarus'=>'by',\n\t\t\t\t'Belize'=>'com.bz',\n\t\t\t\t'British Indian Ocean Territory'=>'io',\n\t\t\t\t'British Virgin Islands'=>'vg',\n\t\t\t\t'Canada'=>'ca',\n\t\t\t\t'Cambodia'=>'com.kh',\n\t\t\t\t'Cocos (Keeling) Islands'=>'cc',\n\t\t\t\t'Central African Republic'=>'cf',\n\t\t\t\t'Catalonia Catalan Countries'=>'cat',\n\t\t\t\t'Cook Islands'=>'co.ck',\n\t\t\t\t'Chile'=>'cl',\n\t\t\t\t'Cameroon'=>'cm',\n\t\t\t\t'Chad'=>'td',\n\t\t\t\t'China'=>'cn',\n\t\t\t\t'Colombia'=>'com.co',\n\t\t\t\t'Costa Rica'=>'co.cr',\n\t\t\t\t'Croatia'=>'hr',\n\t\t\t\t'Cuba'=>'com.cu',\n\t\t\t\t'Cape Verde'=>'cv',\n\t\t\t\t'Cyprus'=>'com.cy',\n\t\t\t\t'Czech Republic'=>'cz',\n\t\t\t\t'Democratic Republic of the Congo'=>'cd',\n\t\t\t\t'Denmark'=>'dk',\n\t\t\t\t'Djibouti'=>'dj',\n\t\t\t\t'Dominica'=>'dm',\n\t\t\t\t'Dominican Republic'=>'com.do',\n\t\t\t\t'Ecuador'=>'com.ec',\n\t\t\t\t'Estonia'=>'ee',\n\t\t\t\t'Egypt'=>'com.eg',\n\t\t\t\t'El Salvador'=>'com.sv',\n\t\t\t\t'Ethiopia'=>'com.et',\n\t\t\t\t'Finland'=>'fi',\n\t\t\t\t'Fiji'=>'com.fj',\n\t\t\t\t'Federated States of Micronesia'=>'fm',\n\t\t\t\t'France'=>'fr',\n\t\t\t\t'French Guiana'=>'gf',\n\t\t\t\t'Gabon'=>'ga',\n\t\t\t\t'Georgia'=>'ge',\n\t\t\t\t'Germany'=>'de',\n\t\t\t\t'Guernsey'=>'gg',\n\t\t\t\t'Ghana'=>'com.gh',\n\t\t\t\t'Gibraltar'=>'com.gi',\n\t\t\t\t'Greenland'=>'gl',\n\t\t\t\t'Gambia'=>'gm',\n\t\t\t\t'Guadeloupe'=>'gp',\n\t\t\t\t'Greece'=>'gr',\n\t\t\t\t'Guatemala'=>'com.gt',\n\t\t\t\t'Guyana'=>'gy',\n\t\t\t\t'Hong Kong'=>'com.hk',\n\t\t\t\t'Honduras'=>'hn',\n\t\t\t\t'Haiti'=>'ht',\n\t\t\t\t'Hungary'=>'hu',\n\t\t\t\t'Indonesia'=>'co.id',\n\t\t\t\t'Iran'=>'ir',\n\t\t\t\t'Iraq'=>'iq',\n\t\t\t\t'Ireland'=>'ie',\n\t\t\t\t'Israel'=>'co.il',\n\t\t\t\t'India'=>'co.in',\n\t\t\t\t'Iceland'=>'is',\n\t\t\t\t'Italy'=>'it',\n\t\t\t\t'Ivory Coast'=>'ci',\n\t\t\t\t'Jersey'=>'je',\n\t\t\t\t'Jamaica'=>'com.jm',\n\t\t\t\t'Jordan'=>'jo',\n\t\t\t\t'Japan'=>'co.jp',\n\t\t\t\t'Kenya'=>'co.ke',\n\t\t\t\t'Kiribati'=>'ki',\n\t\t\t\t'Kyrgyzstan'=>'kg',\n\t\t\t\t'Kuwait'=>'com.kw',\n\t\t\t\t'Kazakhstan'=>'kz',\n\t\t\t\t'Laos'=>'la',\n\t\t\t\t'Lebanon'=>'com.lb',\n\t\t\t\t'Liechtenstein'=>'li',\n\t\t\t\t'Lesotho'=>'co.ls',\n\t\t\t\t'Lithuania'=>'lt',\n\t\t\t\t'Luxembourg'=>'u',\n\t\t\t\t'Latvia'=>'lv',\n\t\t\t\t'Libya'=>'ly',\n\t\t\t\t'Morocco'=>'co.ma',\n\t\t\t\t'Moldova'=>'md',\n\t\t\t\t'Montenegro'=>'me',\n\t\t\t\t'Madagascar'=>'mg',\n\t\t\t\t'Macedonia'=>'mk',\n\t\t\t\t'Mali'=>'ml',\n\t\t\t\t'Mongolia'=>'mn',\n\t\t\t\t'Montserrat'=>'ms',\n\t\t\t\t'Malta'=>'com.mt',\n\t\t\t\t'Mauritius'=>'mu',\n\t\t\t\t'Maldives'=>'mv',\n\t\t\t\t'Malawi'=>'mw',\n\t\t\t\t'Mexico'=>'com.mx',\n\t\t\t\t'Malaysia'=>'com.my',\n\t\t\t\t'Mozambique'=>'co.mz',\n\t\t\t\t'Namibia'=>'com.na',\n\t\t\t\t'Niger'=>'ne',\n\t\t\t\t'Norfolk Island'=>'com.nf',\n\t\t\t\t'Nigeria'=>'com.ng',\n\t\t\t\t'Nicaragua'=>'com.ni',\n\t\t\t\t'Netherlands'=>'nl',\n\t\t\t\t'Norway'=>'no',\n\t\t\t\t'Nepal'=>'com.np',\n\t\t\t\t'Nauru'=>'nr',\n\t\t\t\t'Niue'=>'nu',\n\t\t\t\t'New Zealand'=>'co.nz',\n\t\t\t\t'Oman'=>'com.om',\n\t\t\t\t'Panama'=>'com.pa',\n\t\t\t\t'Peru'=>'com.pe',\n\t\t\t\t'Philippines'=>'com.ph',\n\t\t\t\t'Pakistan'=>'com.pk',\n\t\t\t\t'Poland'=>'pl',\n\t\t\t\t'Papua New Guinea'=>'com.pg',\n\t\t\t\t'Pitcairn Islands'=>'pn',\n\t\t\t\t'Puerto Rico'=>'com.pr',\n\t\t\t\t'Palestine'=>'ps',\n\t\t\t\t'Portugal'=>'pt',\n\t\t\t\t'Paraguay'=>'com.py',\n\t\t\t\t'Qatar'=>'com.qa',\n\t\t\t\t'Romania'=>'ro',\n\t\t\t\t'Republic of the Congo'=>'cg',\n\t\t\t\t'Russia'=>'ru',\n\t\t\t\t'Rwanda'=>'rw',\n\t\t\t\t'Saint Vincent and the Grenadines'=>'com.vc',\n\t\t\t\t'Sao Tome and Principe'=>'st',\n\t\t\t\t'Saudi Arabia'=>'com.sa',\n\t\t\t\t'Serbia'=>'rs',\n\t\t\t\t'Solomon Islands'=>'com.sb',\n\t\t\t\t'Seychelles'=>'sc',\n\t\t\t\t'Singapore'=>'com.sg',\n\t\t\t\t'Saint Helena'=>'sh',\n\t\t\t\t'Saint Lucia'=>'com.lc',\n\t\t\t\t'Samoa'=>'ws',\n\t\t\t\t'Slovenia'=>'si',\n\t\t\t\t'Slovakia'=>'sk',\n\t\t\t\t'Sierra Leone'=>'com.sl',\n\t\t\t\t'Senegal'=>'sn',\n\t\t\t\t'San Marino'=>'sm',\n\t\t\t\t'Somalia'=>'so',\n\t\t\t\t'South Africa'=>'co.za',\n\t\t\t\t'South Korea'=>'co.kr',\n\t\t\t\t'Spain'=>'es',\n\t\t\t\t'Sri Lanka'=>'lk',\n\t\t\t\t'Sweden'=>'se',\n\t\t\t\t'Switzerland'=>'ch',\n\t\t\t\t'Togo'=>'tg',\n\t\t\t\t'Thailand'=>'co.th',\n\t\t\t\t'Tajikistan'=>'com.tj',\n\t\t\t\t'Tokelau'=>'tk',\n\t\t\t\t'Timor-Leste'=>'tl',\n\t\t\t\t'Turkmenistan'=>'tm',\n\t\t\t\t'Tonga'=>'to',\n\t\t\t\t'Tunisia'=>'tn',\n\t\t\t\t'Tunisia com.tn',\n\t\t\t\t'Turkey'=>'com.tr',\n\t\t\t\t'Trinidad and Tobago'=>'tt',\n\t\t\t\t'Taiwan'=>'com.tw',\n\t\t\t\t'Tanzania'=>'co.tz',\n\t\t\t\t'Ukraine'=>'com.ua',\n\t\t\t\t'Uganda'=>'co.ug',\n\t\t\t\t'United Kingdom'=>'co.uk',\n\t\t\t\t'United Arab Emirates'=>'ae',\n\t\t\t\t'United States'=>'com',\n\t\t\t\t'Uruguay'=>'com.uy',\n\t\t\t\t'Uzbekistan'=>'co.uz',\n\t\t\t\t'Venezuela'=>'co.ve',\n\t\t\t\t'United States Virgin Islands'=>'co.vi',\n\t\t\t\t'Vietnam'=>'com.vn',\n\t\t\t\t'Vanuatu'=>'vu',\n\t\t\t\t'Zambia'=>'co.zm',\n\t\t\t\t'Zimbabwe'=>'co.zw' \n\t\t);\n\t\t$countriesOptions = array ();\n\t\t$countriesOptions [] = JHtml::_ ( 'select.option', null, JText::_('COM_JMAP_INDEXING_SELECT_DEFAULT') );\n\t\tforeach ($countriedTopLevelDomains as $text=>$value) {\n\t\t\t$countriesOptions [] = JHtml::_ ( 'select.option', $value, $text );\n\t\t}\n\t\t$lists ['countriestld'] = JHtml::_ ( 'select.genericlist', $countriesOptions, 'countriestld', 'class=\"inputbox input-medium serpcontrol\"', 'value', 'text', $this->getState ( 'countriestld' ) );\n\t\t\n\t\treturn $lists;\n\t}","title":""},{"docid":"ff28e3c81a842a19ae0126c27228e36b","score":"0.57610923","text":"private function filtro4()\n {\n\n $sucursal = request()->has(\"SUCURSAL\") ? request()->input(\"SUCURSAL\") : session(\"SUCURSAL\");\n\n $mes = request()->has(\"MES\") ? request()->input(\"MES\") : date(\"m\");\n $anio = request()->has(\"ANIO\") ? request()->input(\"ANIO\") : date(\"Y\");\n\n $medio_pago = Ventas::where(\"SUCURSAL\", $sucursal)->select(DB::raw(\"sum(TOTAL) AS TOTAL_RECAUDADO\"), DB::raw(\"concat(MONTH(FECHA) , concat('/',year(FECHA)) ) AS MES\"))\n ->groupByRaw(\"MONTH(FECHA)\")\n ->groupByRaw(\"YEAR(FECHA)\")\n ->orderByRaw(\" MONTH(FECHA) DESC \")\n ->orderByRaw(\"YEAR(FECHA) DESC\")\n ->limit(6);\n\n $sucursalModel = Sucursal::find($sucursal);\n $descripcionSucursal = \"\";\n if (!is_null($sucursalModel))\n $descripcionSucursal = $sucursalModel->MATRIZ == \"S\" ? \"CASA CENTRAL\" : \"SUC. $sucursalModel->DESCRIPCION\";\n\n $titulo = \"RECAUDACIÓN Gs. - $descripcionSucursal\";\n return ['titulo' => $titulo, \"data\" => $medio_pago];\n }","title":""},{"docid":"2f67889702f0d42abd48e05e63eb3ece","score":"0.5747793","text":"public function index(Request $request)\n {\n $keyword = $request->get('search');\n $operator = $request->get('operator');\n $total = $request->get('total');\n $price = $request->get('price');\n $sort = $request->get('sort','number');\n $numbers = $request->get('numbers');\n $birthday = $request->get('birthday');\n $whitelist = $request->get('whitelist');\n $blacklist = $request->get('blacklist');\n $tags = [];\n $perPage = 99;\n \n \n $filter_number_string = \"__________\";\n if( is_array($numbers) ){\n for($i=0; $igetTag($whitelist_sum);\n }\n \n \n $tags[] = strtoupper($operator);\n\n $price = empty($price) ? 1000000 : $price;\n // print_r($whitelist);\n // echo \"
    \";\n // print_r($blacklist) ;\n // exit();\n //FILTER\n $query = Number::where('operator', 'LIKE', \"%$operator%\")\n ->where('price', '<', $price)\n ->where('total', 'LIKE', \"%$total%\")\n ->where('number', 'LIKE', $filter_number_string)\n ->where('number', 'LIKE', \"%$keyword%\");\n //WHITELIST\n $query = $query->where(function ($query) use ($whitelist) {\n for($i=0; $iwhere('number', 'LIKE', \"%{$whitelist[$i]}%\");\n }else{\n $query = $query->orWhere('number', 'LIKE', \"%{$whitelist[$i]}%\");\n }\n }\n });\n //BLACKLIST\n $query = $query->where(function ($query) use ($blacklist) {\n for($i=0; $iwhere('number', 'NOT LIKE', \"%{$blacklist[$i]}%\");\n }else{\n $query = $query->where('number', 'NOT LIKE', \"%{$blacklist[$i]}%\");\n }\n }\n });\n //BIRTHDAY\n if(!empty($birthday)){\n $birthday_indexes = [\n \"sun\" => [3,6],\n \"mon\" => [1,5],\n \"tue\" => [1,2],\n \"wed\" => [3,8],\n \"thu\" => [2,7],\n \"fri\" => [7,8],\n \"saa\" => [4,6],\n ];\n $blacklist_birthday = $birthday_indexes[$birthday];\n \n $blacklist_square = array_map(function ($n) { return($n*$n);},$blacklist_birthday) ; \n $blacklist_sum = array_sum($blacklist_square);\n $tags[] = $this->getTag($blacklist_sum);\n \n $query = $query->where(function ($query) use ($blacklist_birthday) {\n for($i=0; $iwhere('number', 'NOT LIKE', \"%{$blacklist_birthday[$i]}%\");\n }else{\n $query = $query->where('number', 'NOT LIKE', \"%{$blacklist_birthday[$i]}%\");\n }\n }\n });\n }\n \n //SORT\n switch($sort){\n case \"asc\" :\n case \"desc\" : \n $number = $query->orderBy('price', $sort)->latest()->paginate($perPage);\n break; \n default : \n $number = $query->orderBy('number', 'asc')->latest()->paginate($perPage);\n }\n \n } else {\n $number = Number::orderBy('number', 'asc')->latest()->paginate($perPage);\n }\n\n \n $total_array = Number::selectRaw('total,count(total) as count')\n ->orderBy('total', 'asc')\n ->groupBy('total')\n ->get();\n\n $operator_array = Number::selectRaw('operator,count(operator) as count')\n ->orderBy('operator', 'asc')\n ->groupBy('operator')\n ->get();\n\n\n return view('number.index', compact('number','total_array','operator_array','tags'));\n }","title":""},{"docid":"4b891a1a8f086f5c40f00bfe6efc0dea","score":"0.5721374","text":"function beforeFilter() {\n parent::beforeFilter();\n $this->Auth->allow('*');\n $this->paginate = array('limit'=>Configure::read('Site.ItemsPerPage'));\n }","title":""},{"docid":"b5a6389ad4596e445fa3366a91579055","score":"0.5712146","text":"private function obtenerConsultaPaginada(){\n \t$offset=($this->paginaActual<=1)?0:(($this->paginaActual-1)*$this->filasPorPagina);\n $this->query=$this->bd->addLimit($this->filasPorPagina, $offset,$this->queryReal);\n\n\n }","title":""},{"docid":"75099842f62a879dcfbea75cb5efaaa3","score":"0.5710433","text":"public function computeFilter(){\r\n\t\t\t$this->oSystem->getLogger()->debug( \"Aplicando filtro \" . get_class($this) );\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_estado'] )\r\n\t\t\t\t$this->filtroSQL .= \" cli.estado='$_REQUEST[_estado]'\";\r\n\t\t\telse\r\n\t\t\t\t$this->filtroSQL .= \" cli.estado NOT IN ('XXX')\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_id_cliente'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND cli.id=\\\"$_REQUEST[_id_cliente]\\\"\";\r\n\t\t\t\r\n\t\t\tif ( !$_REQUEST['_id_cliente'] && $_REQUEST['_cliente'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND (cli.nombre LIKE '%$_REQUEST[_cliente]%' OR cli.razon LIKE '%$_REQUEST[_cliente]%')\";\t\t\t\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_email'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND cli.email LIKE '%$_REQUEST[_email]%'\";\r\n\t\t\t\r\n\t\t\tif ( $_REQUEST['_telefono'] )\r\n\t\t\t\t$this->filtroSQL .= \" AND telefono LIKE '%$_REQUEST[_telefono]%'\";\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_desde'] ){\r\n\t\t\t\t$desde = substr($_REQUEST['_desde'], 6).'-'.substr($_REQUEST['_desde'], 3,2).'-'.substr($_REQUEST['_desde'], 0,2);\r\n\t\t\t\t$this->filtroSQL .= \" AND falta >= '$desde'\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tif ( $_REQUEST['_hasta'] ){\r\n\t\t\t\t$desde = substr($_REQUEST['_hasta'], 6).'-'.substr($_REQUEST['_hasta'], 3,2).'-'.substr($_REQUEST['_hasta'], 0,2);\r\n\t\t\t\t$this->filtroSQL .= \" AND falta <= '$desde'\";\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$this->filtroSQL .= ' ORDER BY cli.nombre';\r\n\t\t\t\t\r\n\t\t}","title":""},{"docid":"9f797547488130473e5d398fd01a49ce","score":"0.56824774","text":"function getAll($approved = true){\n\t\t\n\t\t$conds = \"WHERE 1\";\n\t\t\n\t\tforeach($this->filters as $filter){\n\t\t\tif($this->f3->exists(\"GET.$filter\")){\n\t\t\t\t$conds .= \" AND LOWER($filter) like '%\".strtolower($this->f3->get(\"GET.$filter\")).\"%'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn parent::paginate($page, 10 , \"created\", \"DESC\",$conds);\n\t}","title":""},{"docid":"c7a4b32834c114261d61f01eef15d075","score":"0.5679019","text":"public function test122DisplayPromotionsListByFilteringTotalRecordsPerPage()\n {\n $this->markTestIncomplete('Mark skip test to find solution');\n }","title":""},{"docid":"0b71e6a8306ead7f57c2092d4652e146","score":"0.5678996","text":"protected function preparePaginateData()\n {\n return [\n 'criteria' => is_null(request()->input('filter')) || request()->isMethod('GET') ? [] : request()->input('filter'),\n 'order_by' => is_null(request()->input('sort')) || request()->isMethod('GET') ? null : request()->input('sort'),\n 'per_page' => is_null(request()->input('limit')) ? 15 : request()->input('limit'),\n ];\n }","title":""},{"docid":"aab8260802099a292ce62663d85b394b","score":"0.5666408","text":"public function hotSearchList(Request $request){\n $validator = Validator::make($request->all(),[\n 'token'=>'required'\n ]);\n\n if($validator->fails()){\n showMsg(2,$validator->errors());\n }\n\n $resourceModel = new Resource();\n\n $map = [\n ['search_num','>',0]\n ];\n\n $limit = isset($request->limit)?$request->limit:6;\n\n $list = $resourceModel->where($map)->orderBy('search_num','desc')->paginate($limit,['label as name'])->toArray();\n\n showMsg(1,$list);\n\n }","title":""},{"docid":"1153896b7186babc13fb47130626925d","score":"0.56652296","text":"public function my_filters(){\n $max=$this->input->post('max');\n $min=$this->input->post('min');\n $cat=$this->input->post('cat');\n $per_page=$this->input->post('per_page');\n $sub_cat=$this->input->post('sub_cat');\n $brand= $this->input->post('brand');\n $order_by=$this->input->post('order_by');\n $srt=$this->input->post('srt');\n $search=$this->input->post('search');\n $num_rows=$this->Comman_model->get_num_rows($max,$min,$cat,$sub_cat,$brand,$search);\n $total_rows= $num_rows;\n $this->load->library('pagination');\n $config['base_url'] = '#';\n $config['total_rows'] =$total_rows;\n $config['per_page'] =$per_page;\n $config['uri_segment']=3;\n $config['use_page_numbers']=TRUE;\n \n $config['full_tag_open']='\";\n $config['last_tag_open']='
  • ';\n $config['last_tag_close']=\"
  • \";\n $config['first_tag_open']='
  • ';\n $config['first_tag_close']=\"
  • \";\n $config['prev_tag_open']='
  • ';\n $config['prev_tag_close']=\"
  • \";\n $config['last_tag_open']='
  • ';\n $config['last_tag_close']=\"
  • \";\n $config['cur_tag_open']=\"
  • \";\n $config['cur_tag_close']=\"
  • \";\n $config['num_tag_open']='
  • ';\n $config['num_tag_close']=\"
  • \";\n $config['next_tag_open']='
  • ';\n $config['next_tag_close']=\"
  • \";\n \n $this->pagination->initialize($config); \n // getting products \n $limit=$config['per_page'];\n $offset=($this->uri->segment('3')-1)*$limit;\n $products=$this->Comman_model->filter_data($max,$min,$cat,$sub_cat,$brand,$order_by,$srt,$limit,$offset,$search);\n \n // getting brands\n $brands=$this->Comman_model->get_brand($cat,$sub_cat);\n \n // // pagination links\n // 'pagination_links'=>$this->pagination->create_links(),\n // json response\n $output=array('pagination_links'=>$this->pagination->create_links(),'brands'=>$brands,'products'=>$products);\n echo json_encode($output);\n }","title":""},{"docid":"44652e36591220c6759b6ffa6b8ab39e","score":"0.5663082","text":"public static function get_paginacao($paginacao,$controller)\n\t\t{\n\t\t\t\n\t\t\t$qtd_paginas = $paginacao['size'] / $paginacao['itens_por_pagina'];\n\n\t\t\t$method = \"index\";\n\n\t\t\tif(isset($paginacao['method']))\n\t\t\t\t$method = $paginacao['method'];\n\n\t\t\t$parameter = \"\";//caso haja algum parametro na tela de listagem\n\t\t\tif(isset($paginacao['parameter']))\n\t\t\t\t$parameter = $paginacao['parameter'].\"/\";\n\n\t\t\tif(ceil($qtd_paginas) > 1)\n\t\t\t{\n\t\t\t\t$filtros = \"\";\n\t\t\t\t//VERIFICAR SE HÁ FILTROS\n\t\t\t\tif(!empty($paginacao['filter']))\n\t\t\t\t\t$filtros = $paginacao['filter'];\n\t\t\t\t/////\n\n\t\t\t\t$inicio = $paginacao['pg_atual'] - 2;\n\t\t\t\t\n\t\t\t\t$offset = 0;\n\t\t\t\tif($inicio < 1)\n\t\t\t\t{\n\t\t\t\t\t$offset = $inicio * (-1);\n\t\t\t\t\t$inicio = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$inicio = $inicio + 1;\n\t\t\t\t\n\t\t\t\tif((ceil($qtd_paginas) - $paginacao['pg_atual']) + 1 < 5)\n\t\t\t\t\t$inicio = $paginacao['pg_atual'] - (5 - (ceil($qtd_paginas) - $paginacao['pg_atual'] + 1));\n\t\t\t\t\n\t\t\t\tif($inicio <= 1)\n\t\t\t\t\t$inicio = 1;\n\t\t\t\t\n\t\t\t\t$fim = $paginacao['pg_atual'] + $offset + 3;\n\t\t\t\t\n\t\t\t\tif($fim > ceil($qtd_paginas))\n\t\t\t\t\t$fim = ceil($qtd_paginas);\n\t\t\t\techo\"
    \";\n\t\t\t\t\techo\"\";\n\t\t\t\techo \"
    \";\n\t\t\t}\n\t\t}","title":""},{"docid":"516db908271614c0def00fea5818e1b1","score":"0.56598973","text":"function paginador($pagina, $orden = NULL, $nombreOrden = NULL, $consultaGlobal = NULL, $cantidadRegistros = NULL) {\n global $configuracion;\n\n $item = '';\n $respuesta = array();\n $objeto = new Proveedor();\n\n $registros = $configuracion['GENERAL']['registrosPorPagina'];\n\n if (!empty($cantidadRegistros)) {\n $registros = (int) $cantidadRegistros;\n }\n\n if (isset($pagina)) {\n $pagina = $pagina;\n } else {\n $pagina = 1;\n }\n\n if (isset($consultaGlobal) && $consultaGlobal != '') {\n\n $data = explode('[', $consultaGlobal);\n $datos = $data[0];\n $palabras = explode(' ', $datos);\n\n if ($data[1] != '') {\n $condicionales = explode('|', $data[1]);\n\n $condicion = '(';\n $tam = sizeof($condicionales) - 1;\n for ($i = 0; $i < $tam; $i++) {\n $condicion .= $condicionales[$i] . ' REGEXP \"(' . implode(\"|\", $palabras) . ')\" ';\n if ($i != $tam - 1) {\n $condicion .= ' OR ';\n }\n }\n $condicion .= ')';\n\n $consultaGlobal = $condicion;\n } else {\n $consultaGlobal = '(p.nombre REGEXP \"(' . implode(\"|\", $palabras) . ')\")';\n }\n } else {\n $consultaGlobal = '';\n }\n\n if (empty($nombreOrden)) {\n $nombreOrden = $objeto->ordenInicial;\n }\n\n\n if (isset($orden) && $orden == 'ascendente') {//ordenamiento\n $objeto->listaAscendente = true;\n } else {\n $objeto->listaAscendente = false;\n }\n\n if (isset($nombreOrden) && $nombreOrden == 'estado') {//ordenamiento\n $nombreOrden = 'activo';\n }\n\n $registroInicial = ($pagina - 1) * $registros;\n\n\n $arregloItems = $objeto->listar($registroInicial, $registros, array('0'), $consultaGlobal, $nombreOrden);\n\n if ($objeto->registrosConsulta) {//si la consulta trajo registros\n $datosPaginacion = array($objeto->registrosConsulta, $registroInicial, $registros, $pagina);\n $item .= $objeto->generarTabla($arregloItems, $datosPaginacion);\n }\n\n $respuesta['error'] = false;\n $respuesta['accion'] = 'insertar';\n $respuesta['contenido'] = $item;\n $respuesta['idContenedor'] = '#tablaRegistros';\n $respuesta['idDestino'] = '#contenedorTablaRegistros';\n $respuesta['paginarTabla'] = true;\n\n Servidor::enviarJSON($respuesta);\n}","title":""},{"docid":"57a7eb43480e15edae6c7c13facf9459","score":"0.56531996","text":"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $paginator = $this->get('knp_paginator');\n\n $kryteria = null;\n\n if($this->get('request')->query->get('filterField') && $this->get('request')->query->get('filterValue'))\n {\n $pole = $this->get('request')->query->get('filterField');\n $wartosc = $this->get('request')->query->get('filterValue');\n $kryteria = array('filterField'=>$pole,'filterValue'=>$wartosc);\n }\n\n $query = $em->getRepository('DFPEtapIBundle:Klient')->getListaKlientowQuery($kryteria);\n\n $pagination = $paginator->paginate($query,$this->get('request')->query->get('strona',1),21,array('wrap-queries'=>true));\n $pagination->setFiltrationTemplate('::filtration.html.twig');\n\n return array(\n 'lista_klientow' => $pagination,\n );\n }","title":""},{"docid":"21c190357b0dc427ab26b6b77083e8f0","score":"0.5650529","text":"public function allPaged();","title":""},{"docid":"b37435c5c83628aca4945b0ab65e2f2d","score":"0.5647757","text":"private function filters() {\n\n\t}","title":""},{"docid":"8faa442f4fc0a86eeb174ce296d398a5","score":"0.5631252","text":"function wp37_limit_posts_to_author($query) {\n\n\t// pega as informacoes do usuario logado\n\t$user = wp_get_current_user();\n\n\t// \tfiltra as paginas pelo grupo pertencente\n\tif( $_GET['filter'] == 'grupo' && $user->roles[0] == 'contributor') {\n\t\t\n\t\t$variable = get_user_meta($user->ID, 'grupo', true);\n\t\t$variable = array_flatten($variable);\n $variable = array_unique($variable);\n\t\t\n\t\t$pages = array();\n\n\t\tif($variable && $variable != ''){\n foreach($variable as $grupo){\n\t\t\t\t$pages[] = get_post_meta($grupo, 'selecionar_paginas', true);\n\t\t\t\t$pages[] = get_post_meta($grupo, 'contatos_sme', true);\n\t\t\t}\n }\n\n\t\t$pages = array_flatten($pages);\n $pages = array_unique($pages);\n\t\t\n\t\t//print_r($variable);\n\t\t$query->set('post__in', $pages);\n\t} \n\n\t// \tfiltra as paginas por grupos\n\tif( $_GET['grupo_id'] != '') {\n\t\t\n\t\t$grupo = $_GET['grupo_id'];\n\n\t\tif($grupo && $grupo != ''){ \n\t\t\tif($_GET['post_type'] == 'contato'){\n\t\t\t\t$pages = get_post_meta($grupo, 'contatos_sme', true);\n\t\t\t} else {\n\t\t\t\t$pages = get_post_meta($grupo, 'selecionar_paginas', true);\n\t\t\t}\n\t\t\t\n }\t\n\n\t\t$pages = array_flatten($pages);\n $pages = array_unique($pages);\n\t\t\n\t\t//print_r($variable);\n\t\t$query->set('post__in', $pages);\n\t}\t\n\t\n\treturn $query;\n\t\n}","title":""},{"docid":"18d55259506eed189dd49d14e05a8d4f","score":"0.56279755","text":"function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Configurazione interfaccia\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}","title":""},{"docid":"b344335941ed3069472e0ebc8ee27534","score":"0.56269014","text":"public function listarvehiculos($pagina){\n\t\t $this->load('model/VehiculoModel.php');\n\t\t \n\t\t //si me piden APLICAR un filtro\n\t\t if(!empty($_POST['filtrar'])){\n\t\t //recupera el filtro a aplicar\n\t\t $f = new stdClass(); //filtro\n\t\t $f->texto = htmlspecialchars($_POST['texto']);\n\t\t $f->campo = htmlspecialchars($_POST['campo']);\n\t\t $f->campoOrden = htmlspecialchars($_POST['campoOrden']);\n\t\t $f->sentidoOrden = htmlspecialchars($_POST['sentidoOrden']);\n\t\t \n\t\t //guarda el filtro en un var de sesión\n\t\t $_SESSION['filtrovehiculos'] = serialize($f);\n\t\t }\n\t\t \n\t\t //si me piden QUITAR un filtro\n\t\t if(!empty($_POST['quitarFiltro']))\n\t\t unset($_SESSION['filtrovehiculos']);\n\t\t \n\t\t \n\t //comprobar si hay filtro\n\t $filtro = empty($_SESSION['filtrovehiculos'])? false : unserialize($_SESSION['filtrovehiculos']);\n\t\t \n\t\t //para la paginación\n\t\t $num = 5; //numero de resultados por página\n\t\t $pagina = abs(intval($pagina)); //para evitar cosas raras por url\n\t\t $pagina = empty($pagina)? 1 : $pagina; //página a mostrar\n\t\t $offset = $num*($pagina-1); //offset\n\t\t \n\t\t //si no hay que filtrar los resultados...\n\t\t if(!$filtro){\n\t\t //recupera todas las vehiculos\n\t\t $vehiculos = VehiculoModel::getVehiculos($num, $offset);\n\t\t //total de registros (para paginación)\n\t\t $totalRegistros = VehiculoModel::getTotal();\n\t\t }else{\n\t\t //recupera las vehiculos con el filtro aplicado\n\t\t $vehiculos = VehiculoModel::getVehiculos($num, $offset, $filtro->texto, $filtro->campo, $filtro->campoOrden, $filtro->sentidoOrden);\n\t\t //total de registros (para paginación)\n\t\t $totalRegistros = VehiculoModel::getTotal($filtro->texto, $filtro->campo);\n\t\t }\n\t\t \n\t\t //cargar la vista del listado\n\t\t $datos = array();\n\t\t $datos['usuario'] = Login::getUsuario();\n\t\t $datos['vehiculos'] = $vehiculos;\n\t\t $datos['filtro'] = $filtro;\n\t\t $datos['paginaActual'] = $pagina;\n\t\t $datos['paginas'] = ceil($totalRegistros/$num); //total de páginas (para paginación)\n\t\t $datos['totalRegistros'] = $totalRegistros;\n\t\t $datos['regPorPagina'] = $num;\n\n\n\t\t if(Login::getUsuario()->admin) //Admin\n \t\t $this->load_view('view/vehiculos/listarvehiculosA.php', $datos);\n \t\tif(Login::getUsuario()->privilegio==1) // Comprador\n \t\t $this->load_view('view/vehiculos/listarvehiculosC.php', $datos);\n \t\tif(Login::getUsuario()->privilegio==2) // Vendedor\n \t\t $this->load_view('view/vehiculos/listarvehiculosV.php', $datos);\n \n\t\t}","title":""},{"docid":"9d981e47f0655bf615c74407ee2aabb6","score":"0.56261885","text":"function beforeFilter() {\n\n $this->checkSession();\n\n // Segundo filtro: CheckPermiso. Si pasa continua. Sino se va al home.\n\n $this->checkPermiso();\n }","title":""},{"docid":"30cbff5ae741ab4238c3dc36e6a5e1fa","score":"0.560532","text":"public function filter($request){\n $data = RetailUser::with('spatieRole');\n if($request->search != \"\"){\n $data->where('name','like','%'.$request->search.'%');\n }\n\n if($request->role_id != \"\"){\n $data->where(['spatie_role_id'=>$request->role_id]);\n }\n return $data->paginate(100);\n }","title":""},{"docid":"c3d88eaa4f41bd3e65c51e5abbeca134","score":"0.56044585","text":"public static function filtrar($app, $produto=\"\", $finalidade=\"\", $pag=\"1\") {\n $param = (!empty($_GET) ? $_GET : null);\n #print_r($param);\n //validação obrigtória de pagina e data\n\n $jObject = self::filtro($app, $produto, $finalidade, $param, $pag);\n\n $jObject->produto = (!empty($produto) ? $produto : \"imovel\"); \n $jObject->produtotag = (!empty($finalidade) ? $finalidade : \"prontos\"); \n \n //itens por pagina //\n $itensPorPag = (!empty($param['take']) ? $param['take'] : 12);\n //itens por pagina //\n\n Util::paginationParams($jObject, $itensPorPag);\n\n //Util::dbg($imoveis);\n \n $assets = array(); \n\n //carrega os blocos para essa página \n $page = array(); \n $page = array(\n 'template' => null, \n 'content' => $jObject\n );\n\n\n $scripts = array(); \n //$scripts = array( 'assets/jvs/imoveis-init.js'); \n\n\n $data = array(\n 'page' => $page, \n 'scripts' => $scripts\n ); \n\n return $app['twig']->render('base-filtro.twig.php', $data);\n }","title":""},{"docid":"92146dff1226b1b6e3a79b3f0c0d56ea","score":"0.56013256","text":"public function paginetion() {\r\n }","title":""},{"docid":"a13ab1b53a2bc50d479c7f38d2fac199","score":"0.5591906","text":"protected function filters()\n {\n if ($this->getRequest()->isPost()== true or 1==1) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();\n\t\t\t\t\t$parramsfilter['log_usuario'] = $this->_getSanitizedParam(\"log_usuario\");\n\t\t\t\t\t$parramsfilter['log_tipo'] = $this->_getSanitizedParam(\"log_tipo\");\n\t\t\t\t\t$parramsfilter['log_fecha'] = $this->_getSanitizedParam(\"log_fecha\");\n\t\t\t\t\t$parramsfilter['log_log'] = $this->_getSanitizedParam(\"log_log\");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 }","title":""},{"docid":"a3750f5b2c4562a44013cf7db05864c4","score":"0.5587235","text":"public function addFilter()\n\t{\n\t}","title":""},{"docid":"8e51e3699c2110a9ba5947031a17c0af","score":"0.5581067","text":"public function filter()\n {\n $limit = request()->input('limit', 15);\n $model = $this->paginate($limit);\n\n return $model;\n }","title":""},{"docid":"ff5edaf0791617740ad3548c3172ae17","score":"0.55647975","text":"public function index(Request $request)\n {\n $mises_bas = mises_bas::where([\n ['date', '!=', NULL],\n [function ($query) use ($request){\n if (($term = $request->term)){\n $query->orWhere('date','LIKE', '%' . $term . '%')\n -> orWhere('nombreAgneauVivant','LIKE', '%' . $term . '%')\n ->orWhere('nombreAgneauMort','LIKE', '%' . $term . '%')\n ->orWhere('ProblemeMisesBas','LIKE', '%' . $term . '%')\n ->orWhere('periodeMisesBas','LIKE', '%' . $term . '%')\n ->orWhere('methode','LIKE', '%' . $term . '%')\n ->orWhere('commentaire','LIKE', '%' . $term . '%')\n ->orWhere('ovins_RFID','LIKE', '%' . $term . '%')\n ->orWhere('echographies_id','LIKE', '%' . $term . '%')\n ->orWhere('id','LIKE', '%' . $term . '%')->get();\n }\n }]\n ])\n ->orderBy('id', \"desc\")\n ->paginate(15);\n return view('mises_bas.index' , compact('mises_bas'))\n ->with('i', (request()->input('page', 1) -1) *5);\n\n /* $mises_bas = mises_bas::paginate(2);\n return view('mises_bas.index', compact('mises_bas'));*/\n }","title":""},{"docid":"2eba38f3e9fb00c455a368aa42c5e357","score":"0.55603737","text":"function VisualizzaMercatinoFiltro($cid, $ID){\n\n\n\n\n\n $pagina = 1;\n \tif (isset($_POST[\"pagina\"]))\n \t\t$pagina = $_POST[\"pagina\"];\n\n \t$nrows = 5;\n \t$offset = 5*($pagina-1);\n\n\n $sql=\"SELECT Titolo,Bicicletta.Marca,Bicicletta.Colore,Bicicletta.Anno_Produzione,Anno_Acquisto,Tipo_Bicicletta,Annuncio.Prezzo,Descrizione,Stato,Venditore,ID_Annuncio\n FROM Annuncio INNER JOIN Bicicletta ON (Bicicletta=ID_Bike) JOIN FiltroAnnuncio ON Utente='$ID' WHERE Stato='In vendita' AND Bicicletta.Marca=FiltroAnnuncio.Marca AND Bicicletta.Colore=FiltroAnnuncio.Colore AND Annuncio.Prezzo<=FiltroAnnuncio.Prezzo\n LIMIT $nrows OFFSET $offset\";\n\n \t $res=$cid->query($sql) Or die (\"

    Inpossibile eseguire query.

    \" . \"

    Codice errore \" . $cid->errno\n \t. \": \" . $cid->error) . \"

    \";\n\n \tif ($res->num_rows==0)\n \t\techo \"
    PaymentInterestPrincipalNew Mortgage
    ' . $val['value'] . '' . $val['interest'] . ''\\n . $val['principal'] . '' . $val['newMortgage'] . '
    Non ci sono annunci corrispondenti al tuo filtro.

    \";\n \telse{\n \t\techo \"\";\n \t\techo \"\";\n \t}\n \twhile ($row = $res->fetch_row()){\n \techo \"\";\n \techo \"\";\n \techo \"\";\n \techo \"\";\n \techo \"\";\n echo \"\";\n echo \"\";\n echo \"\";\n echo \"\";\n echo \"\";\n echo \"\";\n\n\n \techo \"\";\n \t}\n \techo \"\";\n \t echo \"
    Titolo annuncioMarcaColoreAnno di ProduzioneAnno di acquistoTipo biciclettaPrezzoDescrizioneStato
    $row[0]$row[1]$row[2]$row[3]$row[4]$row[5]$row[6]$row[7]$row[8]Visualizza
    \";\n\n \t$sql2=\"SELECT Titolo,Bicicletta.Marca,Bicicletta.Colore,Bicicletta.Anno_Produzione,Anno_Acquisto,Tipo_Bicicletta,Annuncio.Prezzo,Descrizione,Stato,Venditore,ID_Annuncio\n FROM Annuncio INNER JOIN Bicicletta ON (Bicicletta=ID_Bike) JOIN FiltroAnnuncio ON Utente='$ID' WHERE Stato='In vendita' AND Bicicletta.Marca=FiltroAnnuncio.Marca AND Bicicletta.Colore=FiltroAnnuncio.Colore AND Annuncio.Prezzo<=FiltroAnnuncio.Prezzo\";\n \t $res2 = $cid->query($sql2)\n \t\t or die(\"Impossibile eseguire query.
    Codice errore \". $cid->errno .\": \". $cid->error .\"
    \");\n \t $numrows = $res2->num_rows;\n \t $paginaMax = ceil($numrows/$nrows); //con ceil arrotondo per eccesso\n\n \t echo \"
    \";\n \t if($pagina!=1) {\n \t\t ?>\n \t\t \">\n \n \t';\n \t }\n \techo \"
    \";\n \techo '
    ';\n \t if($pagina!=$paginaMax && $paginaMax!=0) {\n \t\t ?>\n \t\t \">\n \n \t';\n \t }\n \techo \"
    \";\n\n \t echo \"
    \";\n \t echo '

    ';\n }","title":""},{"docid":"7a00606d89ec49cd1de8d40d2d678175","score":"0.5548884","text":"public function index(Request $request)\n { \n $this->data['filter'] = $request->query('filter');\n if($this->data['filter']!=null){\n $this->data['filter'] = $request->query('filter');\n $this->data['pegawai']=Pegawai::where('pegawai.full_name', 'like', '%'.$this->data['filter'].'%')\n ->orWhere('pegawai.nik', 'like', '%'.$this->data['filter'].'%')->orderBy('id', 'DESC')->paginate(2);\n }\n else{\n $this->data['pegawai'] = Pegawai::orderBy('id', 'DESC')->paginate(1); \n } \n return view('admin.pegawai.index', $this->data);\n }","title":""},{"docid":"66cd2f3344fe97fd8375397ada746c23","score":"0.553504","text":"public function findMedecinParregionAction($ville,$page) {\n $professionmedecin= $this->getDoctrine()->getRepository('PortailFrontBundle:Profession')->findOneBy(array('designation'=>'Médecin')); \n $repository = $this->getDoctrine()->getRepository('PortailFrontBundle:User'); \n $adapter = new ArrayAdapter($repository->findBy(array('enabled'=>1,'profession'=>$professionmedecin->getId(),'ville'=>$ville)));\n $pager = new Pagerfanta($adapter);\n\n $pager->setMaxPerPage(3); \n if( !$page ) {\n\n $page = 1; }\n\n try {\n\n $pager->setCurrentPage($page);\n\n } catch (NotValidCurrentPageException $e) {\n\n throw new NotFoundHttpException();\n }\n $specialite = $this->getDoctrine()->getRepository('PortailFrontBundle:Specialite')->findAll();\n return $this->render('PortailAnnuaireBundle:AnnuaireMedecin:RechercheParcarte.html.twig',array('pager'=> $pager,'specialite'=> $specialite));\n \n }","title":""},{"docid":"1fface8a93601011d620a71300607a2a","score":"0.553265","text":"function nattours_remove_filters() {\n remove_filter('piklist_admin_pages', array('piklist_setting', 'admin_pages'));\n }","title":""},{"docid":"6603a4dc9cd33aa7b520602df10cf955","score":"0.55239","text":"public function servicios( $filtro = '' ){\n\t // verificar permisos\n \tif( $this->checkPermissions( 'reporte', 'servicios' ) === FALSE ):\n \t\t$this->iraBuscar('alert-danger','Acceso denegado: usted no ha sido autorizado a acceder a esta secci&oacute;n.');\n \tendif;\n \n $this->Paginator->settings = $this->servicios_paginate;\n $this->set('servicios',$this->Paginator->paginate($this->ServicioTecnologico,array(\n 'OR' => \n array('ServicioTecnologico.nombre_servicio LIKE'=>\"%{$filtro}%\",'ServicioTecnologico.descripcion_servicio LIKE'=>\"%{$filtro}%\",'Empresa.nombre_empresa LIKE'=>\"{$filtro}%\")\n )\n ));\n $this->set('filtro',$filtro);\n }","title":""},{"docid":"00eee76b8477ac1b30c54e07fa6b7490","score":"0.5514365","text":"public function addInLandingPageFilter()\n {\n return $this->getSelect()->where('main_table.in_landingpage = 1');\n }","title":""},{"docid":"8f30de585cefe29b85a00b2b32084f6e","score":"0.5504066","text":"function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda documento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}","title":""},{"docid":"e5720b373bc3d0021ffa0a9e6f493e83","score":"0.55031544","text":"public function serverPaginationFilteringFor(Request $request): LengthAwarePaginator\n {\n $roles = $this->allWithBuilder();\n\n if ($request->get('search') !== null) {\n $term = $request->get('search');\n $roles->where('first_name', 'LIKE', \"%{$term}%\")\n ->orWhere('last_name', 'LIKE', \"%{$term}%\")\n ->orWhere('email', 'LIKE', \"%{$term}%\")\n ->orWhere('id', $term);\n }\n\n if ($request->get('order_by') !== null && $request->get('order') !== 'null') {\n $order = $request->get('order') === 'ascending' ? 'asc' : 'desc';\n\n $roles->orderBy($request->get('order_by'), $order);\n } else {\n $roles->orderBy('created_at', 'desc');\n }\n\n return $roles->paginate($request->get('per_page', 10));\n }","title":""},{"docid":"10bcee80d7f409bd89a871e21845b644","score":"0.5502223","text":"public function getPaginator();","title":""},{"docid":"fffd22f18f0e225b9c7b14c84c0ba24a","score":"0.54999185","text":"public function getListFilter(ServerRequestInterface $request)\n {\n $params = $request->getQueryParams();\n\n $keywords = [\n 'per_page',\n 'page',\n 'order',\n ];\n\n $keywords = array_flip($keywords);\n\n $allowedFilterFields = $this->getAllowedFilterFields();\n\n $translations = $this->getApiNames(true);\n\n $filters = [];\n\n foreach($params as $key=>$value) {\n if (isset($keywords[$key])) {\n continue;\n }\n\n if (isset($this->routeOptions['multiOranizationField'], $this->routeOptions['multiOranizationField']['field'])\n && $key == $this->routeOptions['multiOranizationField']['field']) {\n $field = $this->routeOptions['multiOranizationField']['field'];\n $separator = $this->routeOptions['multiOranizationField']['separator'];\n $organizationIds = $value;\n if (!is_array($organizationIds)) {\n $organizationIds = explode(',', $organizationIds);\n }\n\n $organizationFilter = [];\n foreach($organizationIds as $organizationId) {\n $organizationFilter[] = $field . ' LIKE '. $this->db1->quote('%'.$separator . $organizationId . $separator . '%');\n }\n if (!empty($organizationFilter)) {\n $filters[] = '(' . join(' OR ', $organizationFilter) . ')';\n }\n\n continue;\n }\n\n $colName = $key;\n if (isset($translations[$key])) {\n $colName = $translations[$key];\n }\n\n if ($allowedFilterFields === null || in_array($colName, $allowedFilterFields)) {\n if (is_string($value) || is_numeric($value)) {\n if (strpos($value, '[') === 0 && strpos($value, ']') === strlen($value) - 1) {\n $values = explode(',', str_replace(['[', ']'], '', $value));\n $firstValue = reset($values);\n switch ($firstValue) {\n case '<':\n case '>':\n case '<=':\n case '>=':\n case '!=':\n case 'LIKE':\n case 'NOT LIKE':\n $secondValue = end($values);\n if (is_numeric($secondValue)) {\n $secondValue = ($secondValue == (int)$secondValue) ? (int)$secondValue : (float)$secondValue;\n }\n if ($firstValue == 'LIKE' || $firstValue == 'NOT LIKE') {\n $secondValue = $this->db1->quote($secondValue);\n }\n $filters[] = $colName . ' ' . $firstValue . ' ' . $secondValue;\n break;\n default:\n $filters[$colName] = $values;\n break;\n }\n } else {\n switch (strtoupper($value)) {\n case 'IS NULL':\n case 'IS NOT NULL':\n $filters[] = $colName . ' ' . $value;\n break;\n default:\n $filters[$colName] = $value;\n }\n }\n } elseif (is_array($value)) {\n $filters[$colName] = $value;\n }\n }\n }\n\n return $filters;\n }","title":""},{"docid":"88c88dc4818c43388886f9d6d8e2d91c","score":"0.54998785","text":"public function beforeFilter(){\n\t\t$this->verificarModulo('proyecto.comentarios');\n\t\tparent::beforeFilter();\n\t}","title":""},{"docid":"522d70df593874631743e29ef667fb5c","score":"0.5487846","text":"public function paginar($page_size, $offset, $busqueda, $campo)\n {\n\n $this->db->select();\n $this->db->from('informacion');\n $this->db->limit($page_size, $offset);\n if ($busqueda != \"\" && $campo != \"\") {\n $this->db->group_start();\n if ($campo == \"id_corregimiento\") {\n $this->db->where(\"id_corregimiento\", $busqueda);\n }\n if ($campo == \"nombrecorregimiento\") {\n $this->db->like('nombrecorregimiento', $busqueda);\n }\n if ($campo == \"municipio\") {\n $this->db->like(\"municipio\", $busqueda);\n }\n if ($campo == \"veredas\") {\n $this->db->like(\"veredas\", $busqueda);\n }\n if ($campo == \"pobladores\") {\n $this->db->like(\"pobladores\", $busqueda);\n }\n if ($campo == \"ubicacionlatitud\") {\n $this->db->like(\"ubicacionlatitud\", $busqueda);\n }\n if($campo ==\"area\"){\n $this->db->like(\"area\", $busqueda);\n }\n if($campo ==\"nautoridadprincipal\"){\n $this->db->like(\"nautoridadprincipal\", $busqueda);\n }\n if($campo ==\"nautoridadpolicial\"){\n $this->db->like(\"nautoridadpolicial\", $busqueda);\n }\n if($campo ==\"miembrosjal\"){\n $this->db->like(\"miembrosjal\", $busqueda);\n }\n if ($campo == \"jal\") {\n $this->db->like(\"jal\", $busqueda);\n }\n if ($campo == \"codigodane\") {\n $this->db->like(\"codigodane\", $busqueda);\n }\n if ($campo == \"numeroadministrativo\") {\n $this->db->like(\"numeroadministrativo\", $busqueda);\n }\n $this->db->group_end();\n }\n\n $sql = $this->db->get();\n return $sql->result();\n }","title":""},{"docid":"ded659c7c7c8ba8c1acdb9cdf857e38e","score":"0.5478417","text":"function getAllPaginatedFiltered($page=1,$perPage=-1) {\n\t\tif ($perPage == -1)\n\t\t\t$perPage = \tActionLogPeer::getRowsPerPage();\n\t\tif (empty($page))\n\t\t\t$page = 1;\n\t\t$cond = $this->getSearchCriteria();\n\t\t$pager = new PropelPager($cond,\"ActionLogPeer\", \"doSelect\",$page,$perPage);\n\t\treturn $pager;\n\t }","title":""},{"docid":"2846e3c3938befd6e0201d18e84ee13c","score":"0.54718506","text":"public function getAllAndPaginate($limit = 10, $params = []);","title":""},{"docid":"5bb1050069dcde0761935759b9f5dcb4","score":"0.54686","text":"function mostraPagina()\n\t\t{\n\t\t// prepara la pagina, ossia il contenitore della tabella\n\t\t$this->aggiungiElemento($this->dammiMenu());\n\t\t$this->aggiungiElemento(\"Azioni tabelle\", \"titolo\");\n\t\t$this->aggiungiElemento($this->creaTabella());\n\t\t\n\t\t// manda in output l'intera pagina\n\t\t$this->mostra();\n\t\t}","title":""},{"docid":"245c7be2882d29e49437c87ae19fd33d","score":"0.54635274","text":"function selectProductoFiltro($desde,$hasta)\n\t\t{\n\t\t//include(\"cms/core/mapping/functions.mapping.php\");\n\t\t$db = new Database();\n\t\t$db->connect();\n\t\t$constructor = new CMS_mapping(\"cms_productos\", $db);\n\t\t$db->doQuery(\"SELECT * FROM cms_productos WHERE precio_producto BETWEEN '\".$desde.\"' AND '\".$hasta.\"' ORDER BY precio_producto,nombre_producto_es asc\", SELECT_QUERY);\n\t\t$results = $db->results;\n\t\t$obj = $constructor->mapping($results);\n\t\t//print_r($obj);\n\t\t echo \"
      \";\n\t\tif(count($obj->id_producto) > 0){ \n\t\t\t$datos=6;\n\t\t\t$pagina=1;\n\t\t\tif (!empty($_GET['pagina'])){\n\t\t\t$pagina=$_GET['pagina'];\n\t\t\t}\n\t\t\t\t\t\n\t\t\t$pg=paginacion1($datos,count($obj->id_producto),$pagina);\n\t\t\t\t\t\n\t\t\tfor($c=$pg[1]; $c < $pg[2]; $c++){\n\t\t\t\t echo \"
    • \n\t\t\t\t\t\t\n\t\t\t\t\t\t entrar\n\t\t\t\t\t\t \n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t if($_SESSION['idioma'] == \"en\"){\t\n\t\t\t\t\t echo \"

      \".$obj->nombre_producto_en[$c].\"

      \n\t\t\t\t\t\t\t

      Ref: \".$obj->referencia_producto_en[$c].\"

      \n\t\t\t\t\t\t\t

      $\".$obj->precio_producto[$c].\"

      \";\n\t\t\t\t }else{ \n\t\t\t\t\t echo \"

      \".$obj->nombre_producto_es[$c].\"

      \n\t\t\t\t\t\t\t

      Ref: \".$obj->referencia_producto_es[$c].\"

      \n\t\t\t\t\t\t\t

      $\".$obj->precio_producto[$c].\"

      \";\n\t\t\t\t }\n\t\t\t\t\t echo \"
    • \";\n\t\t\t}\n\t\t\techo \"
    \";\n \t\t\techo \"
    \";\n\t\t\t\t\t\n\t\t\t\t\t$html = paginacion2($pagina,\"resultados.php?buscar=$buscar&\",$pg[0]);\n\t\t\t\t\techo $html;\n\t\t\t\t\t\n\t\t\techo \"
    \";\t\t\t\n\t\t}else{\n\t\t\techo \"No hay registros en esta busqueda \".$buscar.\"\";\t\n\t\t}\n\t\t$db->disconnect();\n\t\t}","title":""},{"docid":"418fde381f58676e98d1f47beaa74c42","score":"0.5462224","text":"private function filtro3()\n {\n //Cuanto se vendio, por tarjeta, giro, efectivo\n $sucursal = request()->has(\"SUCURSAL\") ? request()->input(\"SUCURSAL\") : session(\"SUCURSAL\");\n\n $medio_pago = Ventas::where(\"SUCURSAL\", $sucursal)->select(DB::raw(\"count(REGNRO) AS NUMERO_VENTAS\"), \"FORMA\")->groupBy(\"FORMA\")\n ->orderByRaw(\" count(REGNRO) DESC \");\n\n $sucursalModel = Sucursal::find($sucursal);\n $descripcionSucursal = \"\";\n if (!is_null($sucursalModel))\n $descripcionSucursal = $sucursalModel->MATRIZ == \"S\" ? \"CASA CENTRAL\" : \"SUC. $sucursalModel->DESCRIPCION\";\n\n $titulo = \"MEDIOS DE PAGO PREFERIDOS - $descripcionSucursal\";\n return ['titulo' => $titulo, \"data\" => $medio_pago];\n }","title":""},{"docid":"a5ccc7c75e6c67599cdfc9e6aebe0da6","score":"0.5458542","text":"private function setFilter()\n {\n $this->filter['categories'] = $this->getParameter('categories', 'array');\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\n }","title":""},{"docid":"ffe356cf7d5601d270cc34e934591623","score":"0.5458007","text":"function bizz_wp_pagenavi($before = '', $after = '') {\n global $wpdb, $wp_query;\n\t\n\t// custom filter\n\t$args = apply_filters('bizz_filter_pagination', null);\n\t\n if (!is_single()) {\n\t\t// custom variables\n $request = $wp_query->request;\n $posts_per_page = intval(get_query_var('posts_per_page'));\n $paged = intval(get_query_var('paged'));\n $pagenavi_options = get_option('pagenavi_options');\n $pagenavi_options = wp_parse_args( (array) $args, $pagenavi_options );\n $numposts = $wp_query->found_posts;\n $max_page = $wp_query->max_num_pages;\n\t\t$container_before = ( isset($args['container_before']) ) ? $args['container_before'] : \"
    \\n
    \\n\";\n\t\t$container_after = ( isset($args['container_after']) ) ? $args['container_after'] : \"
    \\n
    \\n\";\n\t\t$ul_class = ( isset($args['ul_class']) ) ? $args['ul_class'] : \"lpag\";\n\t\t$active_class = ( isset($args['active_class']) ) ? $args['active_class'] : \"current\";\n\t\t$prev_link = ( isset($args['prev_link']) ) ? $args['prev_link'] : \"
  • \\n\".get_previous_posts_link($pagenavi_options['prev_text']).\"
  • \\n\";\n\t\t$next_link = ( isset($args['next_link']) ) ? $args['next_link'] : \"
  • \\n\".get_next_posts_link($pagenavi_options['next_text'], $max_page).\"
  • \\n\";\n\t\t\t\t\t\t\n if(empty($paged) || $paged == 0) {\n $paged = 1;\n }\n $pages_to_show = intval($pagenavi_options['num_pages']);\n $pages_to_show_minus_1 = $pages_to_show-1;\n $half_page_start = floor($pages_to_show_minus_1/2);\n $half_page_end = ceil($pages_to_show_minus_1/2);\n $start_page = $paged - $half_page_start;\n if($start_page <= 0) {\n $start_page = 1;\n }\n $end_page = $paged + $half_page_end;\n if(($end_page - $start_page) != $pages_to_show_minus_1) {\n $end_page = $start_page + $pages_to_show_minus_1;\n }\n if($end_page > $max_page) {\n $start_page = $max_page - $pages_to_show_minus_1;\n $end_page = $max_page;\n }\n if($start_page <= 0) {\n $start_page = 1;\n }\n if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {\n echo $container_before;\n\t\t\techo $before.'
      '.\"\\n\";\n switch(intval($pagenavi_options['style'])) {\n case 1: \n if ($start_page >= 2 && $pages_to_show < $max_page) {\n $first_page_text = str_replace(\"%TOTAL_PAGES%\", number_format_i18n($max_page), '&laquo; '.stripslashes(__('First', 'bizzthemes')));\n echo '
    • '.$first_page_text.'
    • ';\n if(!empty($pagenavi_options['dotleft_text'])) {\n echo '
    • '.$pagenavi_options['dotleft_text'].'
    • ';\n }\n }\n\t\t\t\t\t// Previous\n\t\t\t\t\techo $prev_link;\n\t\t\t\t\t\n for($i = $start_page; $i <= $end_page; $i++) { \n if($i == $paged) {\n $current_page_text = str_replace(\"%PAGE_NUMBER%\", number_format_i18n($i), $pagenavi_options['current_text']);\n echo '
    • '.$current_page_text.'
    • ';\n } else {\n $page_text = str_replace(\"%PAGE_NUMBER%\", number_format_i18n($i), $pagenavi_options['page_text']);\n echo '
    • '.$page_text.'
    • ';\n }\n }\n\t\t\t\t\t// Next\n\t\t\t\t\techo $next_link;\n\t\t\t\t\t\n if ($end_page < $max_page) {\n if(!empty($pagenavi_options['dotright_text'])) {\n echo '
    • '.$pagenavi_options['dotright_text'].'
    • ';\n }\n $last_page_text = str_replace(\"%TOTAL_PAGES%\", number_format_i18n($max_page), ''.stripslashes(__('Last', 'bizzthemes')).' &raquo;');\n echo '
    • '.$last_page_text.'
    • ';\n }\n break;\n case 2;\n echo '
      '.\"\\n\";\n echo '\\n\";\n echo \"
      \\n\";\n break;\n }\n echo '
    '.$after.\"\\n\";\n\t\t\techo $container_after;\n }\n }\n}","title":""},{"docid":"7dcb3eb1d03c37528bf826750f9ca260","score":"0.5456983","text":"public function filter(Request $request) \n {\n $auth = \\Auth::user(); \n $theme = $auth->theme;\n\n $filters=$this->getControllerStateSession('mappingprogramtoopd','filters');\n $json_data = [];\n\n //index\n if ($request->exists('OrgIDRPJMD'))\n {\n $OrgIDRPJMD = $request->input('OrgIDRPJMD')==''?'none':$request->input('OrgIDRPJMD');\n $filters['OrgIDRPJMD']=$OrgIDRPJMD; \n $this->putControllerStateSession('mappingprogramtoopd','filters',$filters);\n\n $data = $this->populateData();\n\n $datatable = view(\"pages.$theme.dmaster.mappingprogramtoopd.datatable\")->with(['page_active'=>'mappingprogramtoopd', \n 'search'=>$this->getControllerStateSession('mappingprogramtoopd','search'),\n 'numberRecordPerPage'=>$this->getControllerStateSession('global_controller','numberRecordPerPage'), \n 'column_order'=>$this->getControllerStateSession('mappingprogramtoopd.orderby','column_name'),\n 'direction'=>$this->getControllerStateSession('mappingprogramtoopd.orderby','order'),\n 'data'=>$data])->render();\n\n $json_data = ['success'=>true,'datatable'=>$datatable];\n } \n return $json_data;\n }","title":""},{"docid":"824cac10709521f245413291367ff1a5","score":"0.54531723","text":"public function sorties_paginate() {\n $this->autoRender = false;\n header('Cache-Control: no-cache, must-revalidate');\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\n// header('Content-type: application/json');\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS\");\n header(\"Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With\");\n if ($this->request->is('post')) {\n $data = $this->request->data;\n// debug($data);\n $limit = 15;\n if (!empty($data['Sortie']['limit'])) {\n $limit = $data['Sortie']['limit'];\n }\n $search = \"\";\n if (!empty($data['Sortie']['searchKey'])) {\n $search = $data['Sortie']['searchKey'];\n $filters = array(\n 'Sortie.type' => 'Sortie',\n \"lower(Sortie.ref) like '%\" . $search . \"%' or \"\n . \"lower(Sortie.entrepot_depart) like '%\" . $search . \"%' or \"\n . \"lower(Sortie.entrepot_arrivee) like '%\" . $search . \"%' or \"\n . \"lower(Sortie.created) like '%\" . $search . \"%' or \"\n . \"lower(Sortie.date_livraison) like '%\" . $search . \"%'\");\n $this->Paginator->settings['paramType'] = 'querystring';\n $this->Paginator->settings['conditions'] = $filters;\n $this->Paginator->settings['order'] = 'Sortie.created DESC';\n $this->Paginator->settings['limit'] = $limit;\n $sorties = $this->paginate('Sortie');\n } else {\n $this->Paginator->settings['paramType'] = 'querystring';\n $this->Paginator->settings['order'] = 'Sortie.created DESC';\n $filters = array('Sortie.type' => 'Sortie');\n $this->Paginator->settings['conditions'] = $filters;\n $this->Paginator->settings['limit'] = $limit;\n $sorties = $this->paginate('Sortie');\n }\n http_response_code(200);\n echo json_encode(array(\n 'data' => array(\n 'sorties' => $sorties,\n 'pageCount' => $this->params['paging']\n ),\n 'status' => 200,\n 'type' => 'success'\n ));\n die();\n }\n }","title":""},{"docid":"b44c9bc8189c08e3314c71caa3d0bc4c","score":"0.54460406","text":"protected function getFilters()\n { \n $filters = parent::getFilters(); \n $filters['internado_id'] = sfContext::getInstance()->getRequest()->getParameter('internado_id');\n return $filters;\n }","title":""},{"docid":"e893513e3094322841e72f21e494e774","score":"0.5443467","text":"public function paginate(FilterInterface $filter): ?Paginate;","title":""},{"docid":"b8d10318a0e095d634b59ba0dabea71a","score":"0.54408216","text":"public function getNoticiaAction($pagina)\n {\n $em = $this->getDoctrine()->getManager();\n $qb = $em->createQueryBuilder('i');\n $parameters = array( //parametros para el query\n 'fechadehoy' => new \\DateTime(),\n\n );\n\n //query para filtrar las visibles y con fecha anterior al dia de hoy (no futura)\n $results = $em->createQuery('SELECT i FROM SitioBundle:Noticia i'\n . ' WHERE i.visible=TRUE and i.fechaHora <= :fechadehoy'\n . ' ORDER BY i.id DESC')\n ->setParameters($parameters)\n ->setFirstResult($pagina)\n ->setMaxResults(1)\n ->getResult();\n return $results;\n }","title":""},{"docid":"7e49d4f61ffb8f972ec42cba3d2a4172","score":"0.5431636","text":"public function index(Request $request)\n {\n \n $buscar = $request->buscar;\n $criterio = $request->criterio;\n \n if ($buscar==''){\n $recepcion = Recepcion::join('personas','id_prs_entrega','=','personas.id')\n ->select('recepcion.id','recepcion.id_prs_entrega as identrega','recepcion.codigo','recepcion.cantidad','personas.paterno as paterno','recepcion.fecha as fecha','recepcion.hora','recepcion.liquido','recepcion.solido','recepcion.cliente','recepcion.observaciones','recepcion.usr_id','recepcion.estado')\n ->orderBy('recepcion.id', 'desc')->paginate(10);\n }\n else{\n $recepcion = Recepcion::join('personas','id_prs_entrega','=','personas.id')\n ->select('recepcion.id','recepcion.id_prs_entrega as identrega','recepcion.codigo','recepcion.cantidad','personas.paterno as paterno','recepcion.fecha as fecha','recepcion.hora','recepcion.liquido','recepcion.solido','recepcion.cliente','recepcion.observaciones','recepcion.usr_id','recepcion.estado')\n ->where('recepcion.'.$criterio, 'like', '%'. $buscar . '%')\n ->orderBy('recepcion.id', 'desc')->paginate(10);\n }\n \n \n return [\n 'pagination' => [\n 'total' => $recepcion->total(),\n 'current_page' => $recepcion->currentPage(),\n 'per_page' => $recepcion->perPage(),\n 'last_page' => $recepcion->lastPage(),\n 'from' => $recepcion->firstItem(),\n 'to' => $recepcion->lastItem(),\n ],\n 'recepcion' => $recepcion\n ];\n }","title":""},{"docid":"4e1f3cce8993adb2d60db41d594bccf0","score":"0.5430642","text":"function PaginatedPages() {\n\t\t$list = new PaginatedList(NewsArticle::get()->filter(\"ParentID\",$this->ID), $this->request);\n\t\t$list->setPageLength(10);\n\t\treturn $list;\n\t}","title":""},{"docid":"55330b33b1bf561e03501cff9cc3aa7b","score":"0.54260737","text":"protected function filters()\n {\n if ($this->getRequest()->isPost()== true) {\n \tSession::getInstance()->set($this->namepageactual,1);\n $parramsfilter = array();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 }","title":""},{"docid":"a9fe688833b8fe1dc76e8e75e50051b9","score":"0.54237014","text":"public function list() {\n $content = [];\n $gets =\\Drupal::request()->query->all();\n $nomu = $gets['nomu'];\n $co_orie = $gets['co_orie'];\n\n\n $content['filtres'] = \\Drupal::formBuilder()->getForm('Drupal\\plan\\Form\\FiltresForm', $r->comment, $r->co_omodu);\n\n $headers = array(\n 'nomu_o' => t('Resp. O'),\n 'co_tpla' => t('Plan'),\n 'co_orie' => t('Orie'),\n 'id_disp' => t('Id disp'),\n 'co_modu' => t('Module'),\n 'libl' => t('Titre'),\n 'nomu_p' => t('Resp. P.'),\n 'prio_nat' => array('data' => t('Priorité nationale'), 'class' => 'orangebg'),\n 'thematique' => array('data' => t('Thématique'), 'class' => 'orangebg'),\n );\n\n // switch database (cf settings.php)\n \\Drupal\\Core\\Database\\Database::setActiveConnection('external');\n // Build query\n $count = 12;\n\n $query = db_select('gbb_gdisp', 'd');\n $query ->leftjoin('gbb_gmodu', 'm', 'd.co_disp = m.co_disp and d.co_degre=m.co_degre');\n $query ->leftjoin('gbb_gmodu_plus', 'mm', 'mm.co_modu = m.co_modu AND mm.co_degre = m.co_degre');\n $query ->leftjoin('gbb_gdire', 'do', 'do.co_modu = m.co_modu AND do.co_degre = m.co_degre AND do.co_tres = 2');\n $query ->leftjoin('gbb_gdire', 'dp', 'dp.co_modu = m.co_modu AND dp.co_degre = m.co_degre AND dp.co_tres = 3');\n $query ->leftjoin('gbb_gresp', 'ro', 'do.co_resp = ro.co_resp AND do.co_degre = ro.co_degre');\n $query ->leftjoin('gbb_gresp', 'rp', 'dp.co_resp = rp.co_resp AND dp.co_degre = rp.co_degre');\n $query ->condition('d.id_disp', '19%', 'LIKE');\n $query ->condition('d.id_disp', '19N%', 'NOT LIKE');\n // $query ->condition('d.co_andi', '19%', 'LIKE');\n if (strlen($nomu)>0) $query ->condition('ro.nomu', $nomu, 'like');\n if (strlen($co_orie)>0) $query ->condition('d.co_orie', $co_orie, 'like');\n $query ->fields('m', array(\n 'libl', 'co_modu', 'co_degre', 'lpeda', 'co_anmo',\n ));\n $query ->fields('d', array(\n 'id_disp', 'co_tpla', 'co_orie',\n ));\n $query ->fields('mm', array(\n 'prio_nat', 'thematique',\n ));\n // $query ->fields('ro', array('nomu'));\n $query ->addfield('d', 'libl', 'libdispo');\n $query ->addField('ro', 'nomu', 'nomu_o');\n $query ->addField('rp', 'nomu', 'nomu_p');\n $query ->distinct();\n $pager = $query->extend('Drupal\\Core\\Database\\Query\\PagerSelectExtender')->limit($count);\n\n $rows = array();\n foreach ($result = $pager->execute()->fetchAll() as $r) {\n $prio_nat = \\Drupal::formBuilder()->getForm('Drupal\\plan\\Form\\PrioNatForm', $r->prio_nat, $r->co_modu, $r->co_degre, $r->co_tpla,$r->id_disp);\n $thematique = \\Drupal::formBuilder()->getForm('Drupal\\plan\\Form\\ThematiqueForm', $r->thematique, $r->co_modu, $r->co_degre, $r->co_tpla,$r->id_disp);\n\n $titre = $r->libl;\n $class = \"normal\";\n if ($titre==\"\") {\n $titre = $r->libdispo;\n $class = \"red\";\n };\n if (strlen($r->co_anmo)>=1) {\n $class = \"strike\";\n }\n\n $rows[] = array(\n 'nomu_o' => array('data' => $r->nomu_o),\n 'co_tpla' => array('data' => $r->co_tpla),\n 'co_orie' => array('data' => $r->co_orie),\n 'id_disp' => array('data' => $r->id_disp),\n 'co_modu' => array('data' => new FormattableMarkup('@name', [':link' => \"../moduleng/\".$r->co_degre.\"/\".$r->co_modu, '@name' => $r->co_modu]), \"title\"=> $r->lpeda),\n 'libl' => array('data' => $titre, \"class\"=>$class),\n 'nomu_p' => array('data' => $r->nomu_p),\n 'prio_nat' => array('data' => $prio_nat),\n 'thematique' => array('data' => $thematique),\n );\n }\n\n $content['table'][] = array(\n '#type' => 'table',\n '#header' => $headers,\n '#rows' => $rows,\n );\n $content['table'][] = array(\n '#type' => 'pager',\n );\n\n // Don't cache this page.\n $content['#cache']['max-age'] = 0;\n\n// drupal_flush_all_caches(); // For Drupal-8\n CacheCommands::clearRender();\n CacheCommands::clearPlugin();\n\n return $content;\n }","title":""},{"docid":"6bde9785fb0684dacb73c6e49543c39c","score":"0.54212683","text":"function penerimaan_invoice_list($filter,$start,$end){\r\n\t\t\t$query = \"SELECT * FROM penerimaan_invoice\";\r\n\t\t\t\r\n\t\t\t// For simple search\r\n\t\t\tif ($filter<>\"\"){\r\n\t\t\t\t$query .=eregi(\"WHERE\",$query)? \" AND \":\" WHERE \";\r\n\t\t\t\t$query .= \" (invoice_id LIKE '%\".addslashes($filter).\"%' OR invoice_no LIKE '%\".addslashes($filter).\"%' OR invoice_supplier LIKE '%\".addslashes($filter).\"%' OR invoice_noorder LIKE '%\".addslashes($filter).\"%' OR invoice_tanggal LIKE '%\".addslashes($filter).\"%' OR invoice_nilai LIKE '%\".addslashes($filter).\"%' )\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$result = $this->db->query($query);\r\n\t\t\t$nbrows = $result->num_rows();\r\n\t\t\t$limit = $query.\" LIMIT \".$start.\",\".$end;\t\t\r\n\t\t\t$result = $this->db->query($limit); \r\n\t\t\t\r\n\t\t\tif($nbrows>0){\r\n\t\t\t\tforeach($result->result() as $row){\r\n\t\t\t\t\t$arr[] = $row;\r\n\t\t\t\t}\r\n\t\t\t\t$jsonresult = json_encode($arr);\r\n\t\t\t\treturn '({\"total\":\"'.$nbrows.'\",\"results\":'.$jsonresult.'})';\r\n\t\t\t} else {\r\n\t\t\t\treturn '({\"total\":\"0\", \"results\":\"\"})';\r\n\t\t\t}\r\n\t\t}","title":""},{"docid":"8a620773de37888229d6d77af636ffe1","score":"0.54204375","text":"public function set_items_filtered() {\n\n\t\t$filter_by = $this->get_filter_by();\n\t\t$this->items = appthemes_wp_list_filter( $this->items, $filter_by );\n\n\t\t// Look for a keyword search.\n\t\tif ( ! empty( $_GET['s'] ) ) { // Input var okay.\n\n\t\t\t$keyword = sanitize_text_field( wp_unslash( $_GET['s'] ) ); // Input var okay.\n\n\t\t\t$keyword = wp_strip_all_tags( $keyword );\n\t\t\t$filter_by = array( 'title' => $keyword, 'description' => $keyword );\n\n\t\t\t$this->items = appthemes_wp_list_filter( $this->items, $filter_by, $operator = 'OR', $match = true );\n\t\t}\n\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => count( $this->items ),\n\t\t\t'per_page' => $this->args['addons_per_page'],\n\t\t) );\n\n\t\t// Limit the add-ons list based on the current page.\n\t\t$this->items = array_slice( $this->items, ( $this->args['page'] - 1 ) * $this->args['addons_per_page'], $this->args['addons_per_page'] );\n\t}","title":""},{"docid":"02489538861f164e7784ba72cd1920d9","score":"0.5418394","text":"function pagination($search, $filters=true)\n {\n if(method_exists($search, 'appends'))\n {\n $html = '
    ';\n $html .= $search->appends( $filters ? $_GET : null);\n $html .= \"
    \";\n\n return $html;\n }\n\n return '';\n }","title":""},{"docid":"1e58c5cfd1ba1392b650cfac0e6a5597","score":"0.5416447","text":"public function list_permohonan($search_string, $search_in, $order, $order_type, $uri3, $per_page, $for)\r\n\t{\r\n\t\t$limit_end = ($uri3 * $per_page - $per_page);\r\n\t\tif ($limit_end < 0){\r\n\t\t\t$limit_end = 0;\r\n\t\t}\r\n\r\n\t\t//we must avoid a page reload with the previous session data\r\n\t\t//if any filter post was sent, then it's the first time we load the content\r\n\t\t//in this case we clean the session filter data\r\n\t\t//if any filter post was sent but we are in some page, we must load the session data\r\n\r\n\t\t//filtered && || paginated\r\n\r\n\t\t/*kemungkinan kondisi\r\n\t\tfirst load ; $search_string=null, $this->uri->segment(3) !== true\r\n\t\tclick empty search; $search_string='', $this->uri->segment(3) !== true\r\n\t\tclick search; $search_string='xxx', $this->uri->segment(3) !== true\r\n\t\tclick pagination; $search_string=null, $this->uri->segment(3) == true*/\r\n\t\tif($uri3 == null){\r\n\t\t\tif( $search_string == null && $search_string !== '' ){\r\n\t\t\t\t$search_string = '';\r\n\t\t\t\t$search_in = 'NamaGedung';\r\n\t\t\t\t$order ='id';\r\n\t\t\t\t$order_type ='Desc';\r\n\t\t\t\t//console_log( '1' );\r\n\t\t\t}else{\r\n\t\t\t\t//console_log( '2' );\r\n\t\t\t}\r\n\t\t\t$filter_session_data['search_string_selected'] = $search_string;\r\n\t\t\t$filter_session_data['search_in_field'] = $search_in;\r\n\t\t\t$filter_session_data['order'] = $order;\r\n\t\t\t$filter_session_data['order_type'] = $order_type;\r\n\t\t\t$this->CI->session->set_userdata($filter_session_data);\r\n\t\t}else {\r\n\t\t\t$search_string = $this->CI->session->userdata('search_string_selected');\r\n\t\t\t$search_in = $this->CI->session->userdata('search_in_field');\r\n\t\t\t$order = $this->CI->session->userdata('order');\r\n\t\t\t$order_type = $this->CI->session->userdata('order_type');\r\n\t\t\t//console_log( '3' );\r\n\t\t}\r\n\r\n\t\t$data['search_string_selected'] = $search_string;\r\n\t\t$data['search_in_field'] = $search_in;\r\n\t\t$data['order'] = $order;\r\n\t\t$data['order_type_selected'] = $order_type;\r\n\t\t$data['permohonans'] = $this->CI->permohonan_model->get_permohonan_disposisi($search_string, $search_in, $order, $order_type, $per_page, $limit_end, $for);\r\n\t\t$data['count_permohonans']= $this->CI->permohonan_model->count_permohonan_disposisi($search_string, $search_in, $order, $for);\r\n\t\treturn $data;\r\n\r\n\t}","title":""},{"docid":"cbbd480d9ce1a36dc78ff12c1936fb72","score":"0.540318","text":"public function filterAction(Request $request)\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $conf = $this->getUser()->getCurrentMainEvent();\n //Filters\n $filters = $this->createForm(new LocationFilterType($this->getUser()));\n $filters->submit($request);\n\n if ($filters->isValid())\n {\n // bind values from the request\n\n $entities = $em->getRepository('fibeContentBundle:Location')->filtering($filters->getData(), $conf);\n $nbResult = count($entities);\n\n //Pager\n $adapter = new ArrayAdapter($entities);\n $pager = new PagerFanta($adapter);\n $pager->setMaxPerPage($this->container->getParameter('max_per_page'));\n try\n {\n $pager->setCurrentPage($request->query->get('page', 1));\n } catch (NotValidCurrentPageException $e)\n {\n throw new NotFoundHttpException();\n }\n\n return $this->render(\n 'fibeContentBundle:Location:list.html.twig',\n array(\n 'pager' => $pager,\n 'nbResult' => $nbResult,\n )\n );\n }\n }","title":""},{"docid":"ebf7216a6d083642d9852965412b149a","score":"0.5403093","text":"function get_my_questions_filter($id_siswa,$perpage,$page,$bab,$tingpel,$key){\n\n\t\t$this->db->select('`pertanyaan`.`id` AS `pertanyaanID`, `photo`, \n\t\t\t`namaDepan`, `namaBelakang`, `judulPertanyaan`, `tp.id` AS tingpel,\n\t\t\t`isiPertanyaan`, `pertanyaan`.`date_created`, mp.namaMataPelajaran, tp.keterangan,`bab`.`id` AS babID,\n\t\t\t`bab`.`judulBab`,(SELECT COUNT(id) FROM `tb_k_jawab` WHERE pertanyaanID = pertanyaan.id) AS jumlah,\n\t\t\t(SELECT CONCAT(`namaDepan`,\" \",`namaBelakang`) from tb_guru where id = pertanyaan.mentorID) as namaGuru');\n\t\t$this->db->join('`tb_bab` `bab`','`pertanyaan`.`babID` = `bab`.`id`');\n\t\t$this->db->join('`tb_tingkat-pelajaran` `tp`','`bab`.`tingkatPelajaranID` = `tp`.`id`');\n\t\t$this->db->join('`tb_siswa` `siswa`','`pertanyaan`.`siswaID` = `siswa`.`id`');\n\t\t$this->db->join('tb_mata-pelajaran mp', 'mp.id = tp.mataPelajaranID');\n\n\t\t$this->db->where('`siswa`.`id`', $id_siswa )->order_by('`pertanyaan`.`id`','desc');\n\t\t\n\t\tif ($bab=='all') {\n\t\t\t$this->db->where(\"tp.id\",$tingpel);\n\t\t}else{\n\t\t\t$this->db->where(\"tp.id\",$tingpel);\n\t\t\t$this->db->where(\"bab.id\",$bab);\n\t\t}\n\n\t\tif($key==!\"\"){\n\t\t\t$this->db->where(\"judulPertanyaan LIKE '%$key%'\n\t\t\t\")->order_by('`pertanyaan.date_created`','asc');\n\t\t}\n\t\t\n\n\t\t$query = $this->db->get('`tb_k_pertanyaan` `pertanyaan`',$perpage,$page);\n\t\tif ($query->result_array()==array()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn $query->result_array();\n\t\t}\n\n\t}","title":""},{"docid":"6551a36c37f1b2449f0c027036c905cb","score":"0.54009384","text":"function peopledirectorykomentar_searchdata_all_bypage( $tbl_peopledirectorykomentar, $cari, $offset, $dataperPage ){\n\t\t$sql = mysql_query(\"SELECT * FROM $tbl_peopledirectorykomentar WHERE \n\t\t\tjudul LIKE '$cari' OR\n\t\t\tpesan LIKE '$cari' \n\t\t\t\tORDER BY id ASC LIMIT $offset, $dataperPage\n\t\t\"); \n \t\treturn $sql;\n}","title":""},{"docid":"1069ef7b22006352b116ea33ed63550e","score":"0.539918","text":"public function index()\n {\n //\n $query = Ingredient::query();\n\n foreach (request('filter',[]) as $filter => $value) {\n\n if(!$query->hasNamedScope($filter)){\n return response()->json([\n 'Message' => \"El Filtro '{$filter}' no es permitido\"], 400);\n }\n\n $query->{$filter}($value);\n }\n\n\n return response()->json($query->simplePaginate(), 200);\n }","title":""},{"docid":"0d7e1e95b1637059a247fe720eebdbfa","score":"0.53987676","text":"private function addPager() {\n\t\t$this->addHiddenValue('page', 1);\n\t}","title":""},{"docid":"7f8d654f25c5e7f4224888023eaa5de1","score":"0.53948706","text":"function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda intervento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}","title":""},{"docid":"371790ca1bbd9e99f27dc032eb2cab1f","score":"0.53912205","text":"public function empresas( $filtro = '' ){\n\t // verificar permisos\n \tif( $this->checkPermissions( 'reporte', 'empresas' ) === FALSE ):\n \t\t$this->iraBuscar('alert-danger','Acceso denegado: usted no ha sido autorizado a acceder a esta secci&oacute;n.');\n \tendif;\n \n $this->Paginator->settings = $this->empresas_paginate;\n $this->set('empresas',$this->Paginator->paginate($this->Empresa,array(\n 'OR' => \n array('Empresa.nombre_empresa LIKE'=>\"%{$filtro}%\",'Empresa.nit LIKE'=>\"%{$filtro}%\",'Empresa.numero_registro LIKE'=>\"%{$filtro}%\")\n )\n ));\n $this->set('filtro',$filtro);\n }","title":""},{"docid":"fdd889441936b7fa9707faf4689ffa02","score":"0.53911865","text":"public function index(Request $request){\n try{\n DB::enableQueryLog();\n $usuario = JWTAuth::parseToken()->getPayload();\n\n $elementos_por_pagina = 50;\n $pagina = Input::get('pagina');\n if(!$pagina){\n $pagina = 1;\n }\n\n $query = Input::get('query');\n $filtro = Input::get('filtro');\n\n $recurso = Entrada::with('proveedor')->where('entradas.clues',$usuario->get('clues'))->whereNull('entradas.acta_id');\n\n /*\n if($query){\n if(is_numeric($query)){\n $actas = Requisicion::where ('numero',intval($query))->lists('acta_id');\n $recurso = $recurso->whereIn('id',$actas);\n }else{\n $recurso = $recurso->where(function($condition)use($query){\n $condition->where('folio','LIKE','%'.$query.'%')\n ->orWhere('lugar_reunion','LIKE','%'.$query.'%')\n ->orWhere('ciudad','LIKE','%'.$query.'%');\n });\n }\n }\n\n if($filtro){\n if(isset($filtro['estatus'])){\n if($filtro['estatus'] == 'nuevos'){\n $recurso = $recurso->whereNull('total_claves_recibidas');\n }else if($filtro['estatus'] == 'incompletos'){\n $recurso = $recurso->whereRaw('total_claves_recibidas < total_claves_validadas');\n }else if($filtro['estatus'] == 'completos'){\n $recurso = $recurso->whereRaw('total_claves_validadas = total_claves_recibidas');\n }\n }\n }*/\n\n $totales = $recurso->count();\n \n $recurso = $recurso->select('entradas.*', DB::raw('sum(stock_insumos.cantidad_recibida) as cantidad_recibida'), \n DB::raw('sum(stock_insumos.cantidad_recibida*insumos.precio) as total'))\n ->leftjoin('stock_insumos','stock_insumos.entrada_id','=','entradas.id')\n ->leftjoin('insumos','insumos.id','=','stock_insumos.insumo_id')\n ->groupBy('entradas.id')\n ->skip(($pagina-1)*$elementos_por_pagina)->take($elementos_por_pagina)\n //->orderBy('estatus','asc')\n ->orderBy('entradas.created_at','desc')\n ->get();\n\n //$queries = DB::getQueryLog();\n //$last_query = end($queries);\n return Response::json(['data'=>$recurso,'totales'=>$totales],200);\n }catch(Exception $ex){\n return Response::json(['error'=>$ex->getMessage()],500);\n }\n }","title":""},{"docid":"0a5d31fc668073ab11b01fb5d3ccea8a","score":"0.53893805","text":"public function index(PaymentFilterRequest $request)\n { \n $query = Payment::filterBy($request->all())->ordered();\n $result = $query->paginate(15);\n return new PaymentCollection($result, $query);\n }","title":""},{"docid":"dce3f47bac524b75daf78dc80f6a8f37","score":"0.5388592","text":"function home_filter()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t$this->load->view('providers/list_filter', $data);\n\t}","title":""},{"docid":"c91ba4d18bf126110897f4292954f3e7","score":"0.53813165","text":"public function __construct()\n {\n $this->beforeFilter('salteVendedor');\n }","title":""},{"docid":"1a980a8802f647d7ef6f0525fe6ef00f","score":"0.53797656","text":"public function filtrePrix()\n {\n $hebergement = new Hebergement();\n $hebergements = Session::get('hebergements');\n $hebergements = $hebergementDispo = $hebergements->whereIn('HEBERGEMENT.NOHEB',$hebergement->getHebergementByPrixMax($prixmax)\n ->lists('TARIF.NOHEB'));\n }","title":""},{"docid":"c9efc8a299da2a0587a082b4a2261eac","score":"0.5370328","text":"public function init_filters() {\n add_filter( 'erp_settings_pages', array( $this, 'add_settings_page' ) );\n }","title":""},{"docid":"a67997fe95a198a9d7454c7f0eb98a0e","score":"0.53639895","text":"public function spo_list_by_filter()\n {\n $data['perpage'] = $perpage = ($this->input->post('perpage')) ? $this->input->post('perpage') : '25';\n $data['search_val'] = $search_val = ($this->input->post('search_val')) ? $this->input->post('search_val') : '';\n $data['current_pagination_index'] = $current_pagination_index = ($this->input->post('current_pagination_index')) ? $this->input->post('current_pagination_index') : '1';\n $data['page'] = $page = ($this->input->post('pagecount')) ? $this->input->post('pagecount') : '0';\n\n if ($search_val != '') {\n $sc = ' AND (spo.supplier_purchase_order_no LIKE \"%'.$search_val.'%\" OR v.vendor_name LIKE \"%'.$search_val.'%\" OR p.product_name LIKE \"%'.$search_val.'%\" OR cb.lead_name LIKE \"%'.$search_val.'%\")';\n // $data['page'] = $page = '0';\n }\n else {\n $sc = '';\n }\n $data['dtrange_from'] = '';\n $data['dtrange_to'] = '';\n $data['vendor_list'] = $this->Supplierpo_model->get_vendor_list();\n $financial_year_to2 = (date('m') > 3) ? date('Y') +1 : date('Y');\n $financial_year_from2 = $financial_year_to2 - 1;\n $data['ypick'] = $financial_year_from2.'-'.$financial_year_to2;\n if($_SERVER['REQUEST_METHOD'] == 'POST')\n {\n $user_id = $this->input->post('user_id');\n\n if($user_id !='')\n {\n $uid = \" AND spo.vendor_id = '$user_id'\";\n }\n else\n {\n $uid = '';\n }\n $data['f_l_user'] = $user_id;\n\n $fbase = $this->input->post('fbase');\n $data['fbasesearch'] = $fbase;\n\n if($fbase == '')\n {\n $data['purchasesearch'] = '';\n $data['drnge'] = '';\n $data['fquartersearch'] = '';\n //$data['ypick'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n }\n else if($fbase == 'BonQuarter')\n {\n $btn = $this->input->post('goButtonboq');\n $fqtr = $this->input->post('fquarter');\n $yrange = $this->input->post('ypick');\n\n $data['fquartersearch'] = $fqtr;\n $data['ypick'] = $yrange;\n\n if($fqtr == '') \n {\n $yr = explode('-', $yrange);\n\n $fdate = $yr[0].'-04-01';\n $tdate = $yr[1].'-03-31';\n\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n }\n else\n {\n $yr = explode('-', $yrange);\n if($fqtr=='Q1')\n {\n $fdate = $yr[0].'-04-01';\n $tdate = $yr[0].'-06-30';\n }\n else if($fqtr=='Q2')\n {\n $fdate = $yr[0].'-07-01';\n $tdate = $yr[0].'-09-30';\n }\n else if($fqtr=='Q3')\n {\n $fdate = $yr[0].'-10-01';\n $tdate = $yr[0].'-12-31';\n }\n else\n {\n $fdate = $yr[1].'-01-01';\n $tdate = $yr[1].'-03-31';\n }\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n\n $data['purchasesearch'] = '';\n $data['drnge'] = '';\n //else if()\n }\n else\n {\n $btn = $this->input->post('goButton');\n $schange = $this->input->post('searchChange');\n //echo $schange;\n $dtrange_from = $this->input->post('dtrange_from');\n $dtrange_to = $this->input->post('dtrange_to');\n\n if ($dtrange_from != '' && $dtrange_to != '') {\n $dtrange = $dtrange_from.' - '.$dtrange_to;\n }\n else {\n $dtrange = ''; \n }\n // $dtrange = $this->input->post('dtrange');\n if($btn=='')\n {\n $dtrange='';\n }\n if($schange == '')\n $schange='';\n\n if($schange == '')\n {\n $data['drnge'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n elseif($schange == 'today')\n {\n $data['drnge'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') = CURDATE() $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') = CURDATE() $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n else if($schange == 'thisweek')\n {\n $data['drnge'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND YEARWEEK(STR_TO_DATE(spo.created_on, '%Y-%m-%d'), 1) = YEARWEEK(CURDATE(), 1) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND YEARWEEK(STR_TO_DATE(spo.created_on, '%Y-%m-%d'), 1) = YEARWEEK(CURDATE(), 1) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n } \n else if($schange == 'thismonth')\n {\n $data['drnge'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND MONTH(STR_TO_DATE(spo.created_on, '%Y-%m-%d')) = MONTH(CURDATE()) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND MONTH(STR_TO_DATE(spo.created_on, '%Y-%m-%d')) = MONTH(CURDATE()) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n } \n else if($schange == 'thisyear')\n {\n $data['drnge'] = '';\n $finstart = $_SESSION['finstart'];\n $finend = $_SESSION['finend'];\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$finstart.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$finend.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$finstart.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$finend.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n else\n {\n $data['drnge'] = $dtrange;\n $data['dtrange_from'] = $dtrange_from;\n $data['dtrange_to'] = $dtrange_to;\n $dr = explode(' - ', $dtrange);\n\n $fd = explode('/', $dr[0]);\n $td = explode('/', $dr[1]);\n\n $fdate = $fd[2].'-'.$fd[0].'-'.$fd[1];\n $tdate = $td[2].'-'.$td[0].'-'.$td[1];\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\".$fdate.\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\".$tdate.\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n }\n //echo $schange;exit;\n $data['purchasesearch'] = $schange;\n $data['drnge'] = $dtrange;\n $data['fquartersearch'] = '';\n //$data['ypick'] = '';\n }\n }\n else\n { \n $data['f_l_user'] = '';\n $data['fbasesearch'] = '';\n $data['purchasesearch'] = '';\n $data['drnge'] = '';\n $data['fquartersearch'] = '';\n $data['supplierpo_list_count'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\")->result_array();\n\n $data['supplierpo_list'] = $this->db->query(\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\")->result_array();\n // $data['supplierpo_list'] = $this->Supplierpo_model->get_supplierpo_list();\n }\n $this->load->view('supplierpo/supplierpo_list_table',$data);\n }","title":""},{"docid":"a6330f27b0b130cd57373868c0f98ddd","score":"0.5363245","text":"public function testFilters() {\n // Test the name filter page, which filters for name contains 'Comida'.\n // Should show just the Spanish translation, once.\n $this->assertPageCounts('test-name-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida name filter');\n\n // Test the description filter page, which filters for description contains\n // 'Comida'. Should show just the Spanish translation, once.\n $this->assertPageCounts('test-desc-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida description filter');\n\n // Test the field filter page, which filters for field_foo contains\n // 'Comida'. Should show just the Spanish translation, once.\n $this->assertPageCounts('test-field-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida field filter');\n\n // Test the name Paris filter page, which filters for name contains\n // 'Paris'. Should show each translation once.\n $this->assertPageCounts('test-name-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris name filter');\n\n // Test the description Paris page, which filters for description contains\n // 'Paris'. Should show each translation, once.\n $this->assertPageCounts('test-desc-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris description filter');\n\n // Test the field Paris filter page, which filters for field_foo contains\n // 'Paris'. Should show each translation once.\n $this->assertPageCounts('test-field-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris field filter');\n\n }","title":""},{"docid":"67ba6629c790b9142d7c23fd589219d0","score":"0.53589445","text":"public function actionIndex($idCategoria = null, $vendido = \"false\", $novo = \"false\" )\n { \n \n// $query = Produto::find()->orderBy(['vendido'=>SORT_DESC]);\n// $dataProvider = new ActiveDataProvider([\n// 'query' =>$query ,\n// ]);\n $query = Produto::find()->orderBy(['nome'=>SORT_DESC]);\n \n \n \n \n if($idCategoria != 0){\n $query->andFilterWhere([\"=\", \"id_categoria\", $idCategoria]);\n }\n if($vendido == \"true\"){\n $query->andFilterWhere([\"=\", \"vendido\", 0]);\n }\n if($novo == \"true\"){\n \n $query->andFilterWhere([\"=\", \"novo\", 0]);\n \n \n }\n $countQuery = clone $query;\n $pages = new Pagination(['totalCount' => $countQuery->count()]);\n $models = $query->offset($pages->offset)\n ->limit($pages->limit)\n ->all();\n return $this->render('index', [\n 'models' => $models,\n 'idCategoria' => $idCategoria,\n 'vendido' => $vendido,\n 'novo' => $novo,\n 'pages' => $pages\n ]);\n }","title":""},{"docid":"c5823c826c01172bd42527ad90591699","score":"0.53576046","text":"public function indextodos(Request $request)\n {\n\n $buscar = $request->buscar;\n $criterio = $request->criterio;\n if ($buscar==''){\n $reserva = reserva::join('cliente','reserva.idCliente','=', 'cliente.id')\n ->join('salon','reserva.idSalon','=','salon.id')\n ->select('reserva.id','reserva.fecha','reserva.fechaInicio','reserva.fechaFin','reserva.pago','cliente.nombre as nombrecli','salon.nombre as nombresalon','reserva.estado as estadoreser')\n ->where('reserva.estado','<>','anulado' )\n ->orderBy('reserva.id','desc')->paginate(20);\n }\n else{$reserva = reserva::join('cliente','reserva.idCliente','=', 'cliente.id')\n ->join('salon','reserva.idSalon','=','salon.id')\n ->select('reserva.id','reserva.fecha','reserva.fechaInicio','reserva.fechaFin','reserva.pago','cliente.nombre as nombrecli','salon.nombre as nombresalon','reserva.estado as estadoreser')\n ->where('cliente.'.$criterio, 'like', '%'. $buscar . '%' ) \n ->orderBy('reserva.id','desc')->paginate(20);\n }\n return [\n 'pagination' => [\n 'total' => $reserva->total(),\n 'current_page' => $reserva->currentPage(),\n 'per_page' => $reserva->perPage(),\n 'last_page' => $reserva->lastPage(),\n 'from' => $reserva->firstItem(),\n 'to' => $reserva->lastItem(),\n ],\n 'reserv' =>$reserva\n ];\n }","title":""},{"docid":"24653f7a60ecb7a2ae8f41a55324e64c","score":"0.535633","text":"public function index(Request $request)\n {\n $filtro = \"\";\n $order = \" id \";\n $order_type = \"asc\";\n $id_emissora = \"\";\n $id_programa = \"\";\n\n if ($request->input(\"filtro\") != \"\") {\n $str_filt = str_replace(\"'\", \"''\", $request->input(\"filtro\"));\n $filtro .= \" and ( texto like '%\" . $str_filt . \"%' ) \";\n }\n if ($request->input(\"id_programa\") != \"\") {\n $id_programa = \\App\\Http\\Dao\\ConfigDao::getIDByOrigem($request->input(\"id_programa\"), \"programa\");\n if ($id_programa != \"\") {\n $filtro .= \" and ev.id_programa = \" . $id_programa;\n }\n }\n if ($request->input(\"id_emissora\") != \"\") {\n $id_emissora = \\App\\Http\\Dao\\ConfigDao::getIDByOrigem($request->input(\"id_emissora\"), \"emissora\");\n if ($id_emissora != \"\") {\n $filtro .= \" and ev.id_emissora = \" . $id_emissora;\n }\n }\n if ($request->input(\"com_busca_salva\") != \"\") {\n $filtro .= \" and p.com_temp_search = \" . $request->input(\"com_busca_salva\");\n }\n $filtro .= \" and ev.tipo = 'pai' \";\n\n if ($request->input(\"data_inicio\") != \"\") {\n $filtro .= \" and ev.data >= '\" . $request->input(\"data_inicio\") . \" 00:00:00' \";\n }\n if ($request->input(\"data_fim\") != \"\") {\n $filtro .= \" and ev.data <= '\" . $request->input(\"data_fim\") . \" 23:59:59' \";\n }\n if ($request->input(\"min_id\") != \"\") {\n $filtro .= \" and p.id > \" . $request->input(\"min_id\");\n }\n\n if ($request->input(\"order\") != \"\") {\n $order = $request->input(\"order\");\n }\n\n if ($request->input(\"order_type\") != \"\") {\n $order_type = $request->input(\"order_type\");\n }\n\n $itens = \\App\\Http\\Dao\\EventosArquivosDao::getListGridCad($filtro, $order, $order_type);\n\n return $this->sendResponse(array(\"qtde\" => count($itens), \"data\" => $itens));\n }","title":""},{"docid":"93c6783d913fef58d6eaf5c7126b1721","score":"0.5355447","text":"public function paginate($limit);","title":""},{"docid":"93c6783d913fef58d6eaf5c7126b1721","score":"0.5355447","text":"public function paginate($limit);","title":""},{"docid":"54518e421a1f283f8f61f111c40eab1d","score":"0.5349417","text":"function fn_twigmo_get_pages(\n &$params,\n &$join,\n &$condition,\n &$fields,\n &$group_by,\n &$sortings,\n &$lang_code\n) {\n if (!empty($params['page_types'])) {\n $condition['twg_pages_page_type'] = db_quote(\n \" AND ?:pages.page_type IN (?a)\",\n $params['page_types']\n );\n }\n}","title":""},{"docid":"9879fb94b18b7f47ea7da964c469d94b","score":"0.5342611","text":"function seo_pagination() {\n\t\t$this->start = intval($this->get_vars['start']);\n\t\t$this->start = ( $this->start > 0 ) ? $this->seo_static['start'] . $this->get_vars['start'] : '';\n\t\tunset($this->get_vars['start']);\n\t}","title":""}],"string":"[\n {\n \"docid\": \"e0985e36155127a8d4266cfad70c654c\",\n \"score\": \"0.69461966\",\n \"text\": \"public function filter(){\\r\\n\\t\\t\\t$this->pagina = 1;\\r\\n\\t\\t\\t$this->filtroSQL = \\\"SELECT p.long_name pais, pro.provincia, pf.long_name fpais, prof.provincia fprovincia, cli.* \\r\\n\\t\\t\\t\\tFROM clientes cli LEFT JOIN pais p ON (cli.id_pais=p.id) LEFT JOIN provincias pro ON (cli.id_provincia=pro.id) \\r\\n\\t\\t\\t\\tLEFT JOIN pais pf ON (cli.f_id_pais=pf.id) LEFT JOIN provincias prof ON (cli.f_id_provincia=prof.id) WHERE\\\";\\r\\n\\t\\t\\t$this->computeFilter();\\r\\n\\t\\t\\t$this->listAll();\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9369b7ce9f7eed53236ab1d11adebc35\",\n \"score\": \"0.65426093\",\n \"text\": \"function getFilterPagination($getRequest) {\\n $arrFiltro = array();\\n\\n if ($getRequest != null) {\\n foreach ($getRequest as $key => $value) {\\n if ($key != null \\n && trim(strtolower($key)) != \\\"metodo\\\" \\n && trim(strtolower($key)) != \\\"_\\\" \\n && trim(strtolower($key)) != \\\"maximum\\\"\\n && trim(strtolower($key)) != \\\"page\\\") {\\n if (trim(strtolower($key)) != \\\"query\\\") {\\n $arrFiltro[$key] = $value;\\n } else {\\n $arrFiltro['search'] = $value;\\n }\\n }\\n }\\n }\\n\\n return $arrFiltro;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0efe9f43c688e62499d554613d18b23f\",\n \"score\": \"0.6475194\",\n \"text\": \"function filtre_pagination($total, $nom, $position, $pas, $liste = true, $modele='', $connect='', $env=array()) {\\r\\n\\r\\n\\tif (!$modele){\\r\\n\\t\\tif (!function_exists('lire_config'))\\r\\n\\t\\t\\tinclude_spip('inc/config');\\r\\n\\t\\t$modele = lire_config('sarkaspip/modeles/modele_pagination','page');\\r\\n\\t}\\r\\n\\treturn filtre_pagination_dist($total, $nom, $position, $pas, $liste, $modele, $connect, $env);\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcbc71774c723756ed1438615f43ae58\",\n \"score\": \"0.62827444\",\n \"text\": \"function getMateriales($filter,$page,$model)\\r\\n { \\r\\n $where = \\\" INNER JOIN categoria on articulo.categoria=categoria.id_categoria WHERE articulo.bar_code LIKE :barcode OR articulo.modelo LIKE :modelo OR categoria.name LIKE :nameM\\\";\\r\\n $array=array('barcode'=>'%'.$filter.'%','modelo'=>'%'.$filter.'%','nameM'=>'%'.$filter.'%');\\r\\n $columns=\\\"articulo.idarticulo,articulo.num_serie,articulo.num_itap,articulo.num_rm,articulo.bar_code,articulo.modelo, categoria.name,articulo.ubicacion,articulo.prestado\\\";\\r\\n return $model->paginador($columns,\\\"articulo\\\",\\\"Articulo\\\",$page,$where,$array);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43ce9e0c413fe6ba1a97356ced57a95c\",\n \"score\": \"0.6196702\",\n \"text\": \"function filter( )\\n\\t{\\n\\t\\tif ( array_key_exists( \\\"next\\\", $_GET))\\n\\t\\t{\\n\\t\\t\\t$_next = filter::next( $_GET[ \\\"next\\\"]);\\n\\t\\t\\tif ( !$_next)\\n\\t\\t\\t\\tunset( $_GET[ \\\"next\\\"]);\\n\\t\\t}\\n\\n\\t\\tif ( array_key_exists( \\\"limit\\\", $_GET))\\n\\t\\t{\\n\\t\\t\\t$_limit = filter::limit( $_GET[ \\\"limit\\\"]);\\n\\t\\t\\tif ( !$_limit)\\n\\t\\t\\t\\tunset( $_GET[ \\\"limit\\\"]);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6be8d5f195938f1821208787370ba124\",\n \"score\": \"0.6134341\",\n \"text\": \"public function getTotalFilteredPages ();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea08311e1b44d5fdd690179bfd5e10fd\",\n \"score\": \"0.6132163\",\n \"text\": \"public function index(){\\n if (!$_GET) {\\n $posteos = posteo::paginate(15);\\n return view('home',compact('posteos'));\\n }\\n if ($_GET) {\\n if ($_GET['filtro']=='encon') {\\n $posteos = posteo::where('estado','=','Encontrado')->paginate(15);\\n return view('home',compact('posteos'));\\n }\\n if ($_GET['filtro']=='perd') {\\n $posteos = posteo::where('estado','=','Perdido')->paginate(15);\\n return view('home',compact('posteos'));\\n }\\n if ($_GET['filtro']=='adopt') {\\n $posteos = posteo::where('estado','=','En adopción')->paginate(15);\\n return view('home',compact('posteos'));\\n }\\n if ($_GET['filtro']=='todos') {\\n $posteos = posteo::paginate(15);\\n return view('home',compact('posteos'));\\n }\\n\\n}}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04a5d71ed47ea260f7bc39a60c72a5e4\",\n \"score\": \"0.6121736\",\n \"text\": \"public function filtro() {\\r\\n\\t\\tif (Input::hasPost('articulos')) {\\r\\n\\r\\n\\t\\t\\t$articulos = new Articulos(Input::post('articulos'));\\n\\t\\t\\t$this->lista = $articulos->filtro($id);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"188ab21784fb0bc45d944e8378eccba3\",\n \"score\": \"0.6112553\",\n \"text\": \"private function getList() {\\n\\t\\n\\t\\tif (isset($this->request->get['page'])) {\\n\\t\\t\\t$page = $this->request->get['page'];\\n\\t\\t} else {\\n\\t\\t\\t$page = 1;\\n\\t\\t}\\t\\t\\n\\t\\t\\n\\t\\tif (isset($this->request->get['sort'])) {\\n\\t\\t\\t$sort = $this->request->get['sort'];\\n\\t\\t} else {\\n\\t\\t\\t$sort = 'invoice_num';\\n\\t\\t}\\n\\t\\tif (isset($this->request->get['order'])) {\\n\\t\\t\\t$order = $this->request->get['order'];\\n\\t\\t} else {\\n\\t\\t\\t$order = 'DESC';\\n\\t\\t}\\n\\t\\t\\n\\t\\t/*Softronikx Technologies*/\\n\\t\\tif (isset($this->request->get['user_id'])) {\\n\\t\\t\\t$filter_user_id = $this->request->get['user_id'];\\n\\t\\t} \\t\\n\\t\\t/*End of code by Softronikx Technologies */\\n\\t\\t\\n\\t\\tif (isset($this->request->get['filter_invoice_status'])) {\\n\\t\\t\\t$filter_invoice_status = $this->request->get['filter_invoice_status'];\\n\\t\\t} else {\\n\\t\\t\\t$filter_invoice_status = NULL;\\n\\t\\t}\\n\\t\\tif (isset($this->request->get['filter_invoice_date'])) {\\n\\t\\t\\t$filter_invoice_date = $this->request->get['filter_invoice_date'];\\n\\t\\t} else {\\n\\t\\t\\t$filter_invoice_date = NULL;\\n\\t\\t}\\n\\t\\tif (isset($this->request->get['filter_student_name'])) {\\n\\t\\t\\t$filter_student_name = $this->request->get['filter_student_name'];\\n\\t\\t} else {\\n\\t\\t\\t$filter_student_name = NULL;\\n\\t\\t}\\t\\n\\t\\tif (isset($this->request->get['filter_total_amount'])) {\\n\\t\\t\\t$filter_total_amount = $this->request->get['filter_total_amount'];\\n\\t\\t} else {\\n\\t\\t\\t$filter_total_amount = NULL;\\n\\t\\t}\\t\\n\\t\\t\\n\\t\\tif (isset($this->request->get['filter_total_hours'])) {\\n\\t\\t\\t$filter_total_hours = $this->request->get['filter_total_hours'];\\n\\t\\t} else {\\n\\t\\t\\t$filter_total_hours = NULL;\\n\\t\\t}\\n\\t\\t\\n\\t\\tif (isset($this->request->get['filter_invoice_num'])) {\\n\\t\\t\\t$filter_invoice_num = $this->request->get['filter_invoice_num'];\\n\\t\\t} else {\\n\\t\\t\\t$filter_invoice_num = NULL;\\n\\t\\t}\\t\\n\\n \\t\\t$this->document->breadcrumbs = array();\\n \\t\\t$this->document->breadcrumbs[] = array(\\n \\t\\t'href' => HTTPS_SERVER . 'index.php?route=common/home&token=' . $this->session->data['token'],\\n \\t\\t'text' => $this->language->get('text_home'),\\n \\t\\t'separator' => FALSE\\n \\t\\t);\\n \\t\\t\\n \\t\\t$this->document->breadcrumbs[] = array(\\n \\t\\t'href' => 'javascript:void(0)',\\n \\t\\t'text' => 'Payments',\\n \\t\\t'separator' => ' :: '\\n \\t\\t);\\n\\n \\t\\t$this->document->breadcrumbs[] = array(\\n \\t\\t'href' => HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'],\\n \\t\\t'text' => $this->language->get('heading_title'),\\n \\t\\t'separator' => ' :: '\\n \\t\\t);\\n\\t\\n\\t\\t$this->data['heading_title'] = $this->language->get('heading_title');\\n\\t\\t$this->data['text_no_results'] = $this->language->get('text_no_results');\\n\\n\\t\\t$this->data['column_invoice_status'] = $this->language->get('column_invoice_status');\\n\\t\\t$this->data['column_invoice_date'] = $this->language->get('column_invoice_date');\\n\\t\\t$this->data['column_student_name'] = $this->language->get('column_student_name');\\n\\t\\t$this->data['column_invoice_num'] = $this->language->get('column_invoice_num');\\n\\t\\t$this->data['column_total_amount'] = $this->language->get('column_total_amount');\\n\\t\\t$this->data['column_total_hours'] = $this->language->get('column_total_hours');\\n\\t\\t$this->data['column_action'] = $this->language->get('column_action');\\t\\t\\n\\t\\t\\n\\t\\t$this->data['button_delete'] = $this->language->get('button_delete');\\n\\t\\t$this->data['button_lock'] = $this->language->get('button_lock');\\n\\t\\t$this->data['button_unlock'] = $this->language->get('button_unlock');\\n\\t\\t$this->data['button_filter'] = $this->language->get('button_filter');\\n\\t\\t$this->data['button_late_fee'] = $this->language->get('button_late_fee');\\n\\t\\t\\n\\t\\t$this->data['button_print_all_invoices'] = $this->language->get('button_print_all_invoices');\\n\\t\\t\\n\\t\\t\\n\\t\\t$this->data['token'] = $this->session->data['token'];\\n \\n \\t\\tif (isset($this->error['warning'])) {\\n\\t\\t\\t$this->data['error_warning'] = $this->error['warning'];\\n\\t\\t} else {\\n\\t\\t\\t$this->data['error_warning'] = '';\\n\\t\\t}\\n\\t\\t\\n\\t\\tif (isset($this->session->data['success'])) {\\n\\t\\t\\t$this->data['success'] = $this->session->data['success'];\\n\\t\\t\\n\\t\\t\\tunset($this->session->data['success']);\\n\\t\\t} else {\\n\\t\\t\\t$this->data['success'] = '';\\n\\t\\t}\\n\\t\\t\\n\\t\\t$url = '';\\n\\t\\t\\n\\t\\tif (isset($this->request->get['filter_invoice_status'])) {\\n\\t\\t\\t$url .= '&filter_invoice_status=' . $this->request->get['filter_invoice_status'];\\n\\t\\t}\\n\\t\\tif (isset($this->request->get['filter_invoice_date'])) {\\n\\t\\t\\t$url .= '&filter_invoice_date=' . $this->request->get['filter_invoice_date'];\\n\\t\\t}\\n\\t\\tif (isset($this->request->get['filter_student_name'])) {\\n\\t\\t\\t$url .= '&filter_student_name=' . $this->request->get['filter_student_name'];\\n\\t\\t}\\n\\t\\tif (isset($this->request->get['filter_total_amount'])) {\\n\\t\\t\\t$url .= '&filter_total_amount=' . $this->request->get['filter_total_amount'];\\n\\t\\t}\\t\\t\\n\\t\\tif (isset($this->request->get['filter_invoice_num'])) {\\n\\t\\t\\t$url .= '&filter_invoice_num=' . $this->request->get['filter_invoice_num'];\\n\\t\\t}\\t\\t\\n\\t\\tif (isset($this->request->get['filter_total_hours'])) {\\n\\t\\t\\t$url .= '&filter_total_hours=' . $this->request->get['filter_total_hours'];\\n\\t\\t}\\n\\t\\t\\n\\t\\t/*Softronikx Technologies*/\\n\\t\\tif (isset($this->request->get['user_id'])) {\\n\\t\\t\\t$url .= '&user_id=' . $this->request->get['user_id'];\\n\\t\\t\\t$this->data['user_id']=$this->request->get['user_id'];\\n\\t\\t}\\t\\n\\t\\t\\n\\t\\tif (isset($this->request->get['src'])) {\\n\\t\\t\\t$url .= '&src=' . $this->request->get['src'];\\n\\t\\t\\t$this->data['src']=$this->request->get['src'];\\n\\t\\t}\\n\\t\\t\\n\\t\\t/*End of Code by Softronikx Technologies */\\n\\t\\t\\n\\t\\tif (isset($this->request->get['page'])) {\\n\\t\\t\\t$url .= '&page=' . $this->request->get['page'];\\n\\t\\t}\\n\\t\\tif ($order == 'ASC') {\\n\\t\\t\\t$url .= '&order=DESC';\\n\\t\\t} else {\\n\\t\\t\\t$url .= '&order=ASC';\\n\\t\\t}\\n\\t\\t\\n\\t\\t$this->data['sort_invoice_status'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_status' . $url;\\n\\t\\t$this->data['sort_invoice_date'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_date' . $url;\\n\\t\\t$this->data['sort_student_name'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=student_name' . $url;\\n\\t\\t$this->data['sort_invoice_num'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=invoice_num' . $url;\\n\\t\\t$this->data['sort_total_amount'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=total_amount' . $url;\\n\\t\\t$this->data['sort_total_hours'] = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . '&sort=total_hours' . $url;\\n\\t\\t\\n\\t\\t$url = '';\\n\\n\\t\\t$filters = array(\\t\\t\\t\\n\\t\\t\\t'filter_invoice_status',\\n\\t\\t\\t'filter_invoice_date',\\n\\t\\t\\t'filter_student_name',\\n\\t\\t\\t'filter_invoice_num',\\n\\t\\t\\t'filter_total_amount',\\n\\t\\t\\t'filter_total_hours',\\n\\t\\t\\t'page',\\n\\t\\t\\t'sort',\\n\\t\\t\\t'order'\\n\\t\\t);\\n\\t\\t\\n\\t\\tforeach($filters as $filter) {\\n\\t\\t\\tif (isset($this->request->get[$filter])) {\\n\\t\\t\\t\\t$url .= '&' . $filter . '=' . $this->request->get[$filter];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\t/* Softronikx Technologies */\\n\\t\\tif (isset($this->request->get['user_id'])) {\\n\\t\\t\\t$url .= '&user_id=' . $this->request->get['user_id'];\\n\\t\\t}\\n\\t\\t\\n\\t\\tif (isset($this->request->get['src'])) {\\n\\t\\t\\t$url .= '&src=' . $this->request->get['src'];\\n\\t\\t}\\n\\t\\t\\n\\t\\t/* End of Code by Softronikx Technologies */\\n\\t\\t\\n\\t\\t$this->data['delete'] = HTTPS_SERVER . 'index.php?route=cms/invoices/delete&token=' . $this->session->data['token'] . $url;\\n\\t\\t$this->data['lock_sessions'] = HTTPS_SERVER . 'index.php?route=cms/invoices/lock&token=' . $this->session->data['token'] . $url;\\t\\t\\n\\t\\t$this->data['unlock_sessions'] = HTTPS_SERVER . 'index.php?route=cms/invoices/unlock&token=' . $this->session->data['token'] . $url;\\t\\t\\n\\t\\t$this->data['apply_late_fee'] = HTTPS_SERVER . 'index.php?route=cms/invoices/late_fee&token=' . $this->session->data['token'] . $url;\\t\\t\\n\\t\\t\\n\\t\\t$this->data['print_all_invoices'] = HTTPS_SERVER . 'index.php?route=cms/invoices/print_all_invoices&print=1&token=' . $this->session->data['token'] . $url;\\n\\t\\t\\n\\t\\t\\n\\t\\tif($this->user->getUserGroupId() > 3)\\n\\t\\t\\t$this->data['sessions_controll'] = 1;\\n\\t\\telse\\n\\t\\t\\t$this->data['sessions_controll'] = 0;\\n\\n\\t\\t$this->data['sessions'] = array();\\n\\t\\t\\n\\t\\t\\n\\t\\t$data = array(\\n\\t\\t\\t'filter_user_id'\\t\\t\\t\\t=> $filter_user_id, //softronikx\\n\\t\\t\\t'filter_invoice_status' => $filter_invoice_status, \\n\\t\\t\\t'filter_invoice_date' => $filter_invoice_date, \\n\\t\\t\\t'filter_student_name' => $filter_student_name,\\n\\t\\t\\t'filter_invoice_num' => $filter_invoice_num, \\n\\t\\t\\t'filter_total_amount' => $filter_total_amount, \\n\\t\\t\\t'filter_total_hours' => $filter_total_hours, \\n\\t\\t\\t'sort' => $sort,\\n\\t\\t\\t'order' => $order,\\n\\t\\t\\t'start' => ($page - 1) * $this->config->get('config_admin_limit'),\\n\\t\\t\\t'limit' => $this->config->get('config_admin_limit')\\n\\t\\t);\\n\\t\\t\\n\\t\\t$this->data['filter_user_id']=$filter_user_id; //softronikx \\n\\t\\t$this->data['user_id']=$filter_user_id; //softronikx \\n\\t\\t$this->data['filter_invoice_status']=$filter_invoice_status; \\n\\t\\t$this->data['filter_invoice_date']=$filter_invoice_date; \\n\\t\\t$this->data['filter_student_name']=$filter_student_name;\\n\\t\\t$this->data['filter_invoice_num']=$filter_invoice_num; \\n\\t\\t$this->data['filter_total_amount']=$filter_total_amount; \\n\\t\\t$this->data['filter_total_hours']=$filter_total_hours; \\n\\t\\t$this->data['sort']=$sort; \\n\\t\\t$this->data['order']=$order; \\n\\t\\t\\n\\t\\t$this->data['invoices'] = array();\\n\\t\\t$invoice_total = $this->model_cms_invoices->getTotalInvoices($data);\\n\\t\\t$results = $this->model_cms_invoices->getInvoices($data);\\n \\n \\tforeach ($results as $result) {\\n\\t\\t\\t$action = array();\\n\\t\\t\\t\\n\\t\\t\\t$action[] = array(\\n\\t\\t\\t\\t'text' => \\\"View / Edit\\\",\\n\\t\\t\\t\\t'href' => HTTPS_SERVER . 'index.php?route=cms/invoices/update&token=' . $this->session->data['token'] . '&invoice_id=' . $result['invoice_id'] . $url\\n\\t\\t\\t);\\n\\t\\t\\t\\n\\t\\t\\tif($result['is_locked'])\\n\\t\\t\\t$action[] = array(\\n\\t\\t\\t\\t'text' => \\\"Locked\\\",\\n\\t\\t\\t\\t'href' => 'javascript:void(0)' \\n\\t\\t\\t);\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t$this->data['invoices'][] = array(\\n\\t\\t\\t\\t'invoice_id' => $result['invoice_id'],\\n\\t\\t\\t\\t'invoice_status' => $result['invoice_status'],\\n\\t\\t\\t\\t'student_name' => $result['student_name'],\\n\\t\\t\\t\\t'invoice_num' => $result['invoice_prefix'].\\\"-\\\".$result['invoice_num'],\\n\\t\\t\\t\\t'total_amount' => $result['total_amount'],\\n\\t\\t\\t\\t'total_hours' => $result['total_hours'],\\n\\t\\t\\t\\t'invoice_date' => date($this->language->get('date_format_short'), strtotime($result['invoice_date'])),\\n\\t\\t\\t\\t'selected' => isset($this->request->post['selected']) && in_array($result['invoice_id'], $this->request->post['selected']),\\n\\t\\t\\t\\t'action' => $action\\n\\t\\t\\t);\\n\\t\\t}\\t\\n\\n\\t\\t$pagination = new Pagination();\\n\\t\\t$pagination->total = $invoice_total;\\n\\t\\t$pagination->page = $page;\\n\\t\\t$pagination->limit = $this->config->get('config_admin_limit');\\n\\t\\t$pagination->text = $this->language->get('text_pagination');\\n\\t\\t$pagination->url = HTTPS_SERVER . 'index.php?route=cms/invoices&token=' . $this->session->data['token'] . $url . '&page={page}';\\n\\t\\t\\t\\n\\t\\t$this->data['pagination'] = $pagination->render();\\n\\t\\t$this->template = 'cms/invoices_list.tpl';\\n\\t\\t$this->children = array(\\n\\t\\t\\t'common/header',\\t\\n\\t\\t\\t'common/footer'\\t\\n\\t\\t);\\n\\t\\t\\n\\t\\t$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16c0cce1f2b2921756e9c8acdf4fd336\",\n \"score\": \"0.6026169\",\n \"text\": \"public function getPaginate();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81ab68e7cef238839c7589a71e4bf5b2\",\n \"score\": \"0.5946625\",\n \"text\": \"public function listar($pagina){\\n\\t\\t $this->load('model/MarcaModel.php');\\n\\t\\t \\n\\t\\t //si me piden APLICAR un filtro\\n\\t\\t if(!empty($_POST['filtrar'])){\\n\\t\\t //recupera el filtro a aplicar\\n\\t\\t $f = new stdClass(); //filtro\\n\\t\\t $f->texto = htmlspecialchars($_POST['texto']);\\n\\t\\t $f->campo = htmlspecialchars($_POST['campo']);\\n\\t\\t $f->campoOrden = htmlspecialchars($_POST['campoOrden']);\\n\\t\\t $f->sentidoOrden = htmlspecialchars($_POST['sentidoOrden']);\\n\\t\\t \\n\\t\\t //guarda el filtro en un var de sesión\\n\\t\\t $_SESSION['filtroMarcas'] = serialize($f);\\n\\t\\t }\\n\\t\\t \\n\\t\\t //si me piden QUITAR un filtro\\n\\t\\t if(!empty($_POST['quitarFiltro']))\\n\\t\\t unset($_SESSION['filtroMarcas']);\\n\\t\\t \\n\\t\\t \\n\\t //comprobar si hay filtro\\n\\t $filtro = empty($_SESSION['filtroMarcas'])? false : unserialize($_SESSION['filtroMarcas']);\\n\\t\\t \\n\\t\\t //para la paginación\\n\\t\\t $num = 5; //numero de resultados por página\\n\\t\\t $pagina = abs(intval($pagina)); //para evitar cosas raras por url\\n\\t\\t $pagina = empty($pagina)? 1 : $pagina; //página a mostrar\\n\\t\\t $offset = $num*($pagina-1); //offset\\n\\t\\t \\n\\t\\t //si no hay que filtrar los resultados...\\n\\t\\t if(!$filtro){\\n\\t\\t //recupera todas las marcas\\n\\t\\t $marcas = MarcaModel::getMarcas(1000);\\n\\t\\t //total de registros (para paginación)\\n\\t\\t $totalRegistros = MarcaModel::getTotal();\\n\\t\\t }else{\\n\\t\\t //recupera las marcas con el filtro aplicado\\n\\t\\t $marcas = MarcaModel::getMarcas($num, $offset, $filtro->texto, $filtro->campo, $filtro->campoOrden, $filtro->sentidoOrden);\\n\\t\\t //total de registros (para paginación)\\n\\t\\t $totalRegistros = MarcaModel::getTotal($filtro->texto, $filtro->campo);\\n\\t\\t }\\n\\t\\t \\n\\t\\t //cargar la vista del listado\\n\\t\\t $datos = array();\\n\\t\\t $datos['usuario'] = Login::getUsuario();\\n\\t\\t $datos['marcas'] = $marcas;\\n\\t\\t $datos['filtro'] = $filtro;\\n\\t\\t $datos['paginaActual'] = $pagina;\\n\\t\\t $datos['paginas'] = ceil($totalRegistros/$num); //total de páginas (para paginación)\\n\\t\\t $datos['totalRegistros'] = $totalRegistros;\\n\\t\\t $datos['regPorPagina'] = $num;\\n\\t\\t \\n $this->load_view('view/marcas/lista.php', $datos);\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d77b8c1cd3b1d08459d4e776e8c83a3d\",\n \"score\": \"0.59332955\",\n \"text\": \"public function filter(Request $request){\\n if ($request->has('filter')){\\n list($criteria, $value) = explode(':', $request->filter);\\n\\n $sortInstitution = Institution::query()->where($criteria,'>', $value);\\n return response()->json([\\n \\\"result\\\" => $sortInstitution->paginate(3),\\n ], 201);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8985c88eef7a3f94062e96b53629f35a\",\n \"score\": \"0.5897872\",\n \"text\": \"public function detalhesFiltrosPaginationAction()\\n {\\n #$this->params()->fromQuery('paramname'); // From GET\\n #$this->params()->fromRoute('paramname'); // From RouteMatch\\n #$this->params()->fromHeader('paramname'); // From header\\n #$this->params()->fromFiles('paramname'); // From file being uploaded\\n $filter = $this->getFilterPage();\\n $request = $this->getRequest();\\n $post = \\\\Estrutura\\\\Helpers\\\\Utilities::arrayMapArray('trim', $request->getPost()->toArray());\\n\\n $camposFilter = [\\n ];\\n\\n $paginator = $this->service->getDetalhesFiltrosPaginator($post, $filter, $camposFilter);\\n $paginator->setItemCountPerPage($paginator->getTotalItemCount());\\n\\n $countPerPage = $this->getCountPerPage(\\n current(\\\\Estrutura\\\\Helpers\\\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\\n );\\n\\n $paginator->setItemCountPerPage($this->getCountPerPage(\\n current(\\\\Estrutura\\\\Helpers\\\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\\n ))->setCurrentPageNumber($this->getCurrentPage());\\n\\n $viewModel = new ViewModel([\\n 'service' => $this->service,\\n 'form' => new \\\\Pesquisar\\\\Form\\\\PesquisarForm(),\\n 'paginator' => $paginator,\\n 'filter' => $filter,\\n 'countPerPage' => $countPerPage,\\n 'camposFilter' => $camposFilter,\\n 'controller' => $this->params('controller'),\\n 'atributos' => array()\\n ]);\\n\\n return $viewModel->setTerminal(TRUE);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8985c88eef7a3f94062e96b53629f35a\",\n \"score\": \"0.5897872\",\n \"text\": \"public function detalhesFiltrosPaginationAction()\\n {\\n #$this->params()->fromQuery('paramname'); // From GET\\n #$this->params()->fromRoute('paramname'); // From RouteMatch\\n #$this->params()->fromHeader('paramname'); // From header\\n #$this->params()->fromFiles('paramname'); // From file being uploaded\\n $filter = $this->getFilterPage();\\n $request = $this->getRequest();\\n $post = \\\\Estrutura\\\\Helpers\\\\Utilities::arrayMapArray('trim', $request->getPost()->toArray());\\n\\n $camposFilter = [\\n ];\\n\\n $paginator = $this->service->getDetalhesFiltrosPaginator($post, $filter, $camposFilter);\\n $paginator->setItemCountPerPage($paginator->getTotalItemCount());\\n\\n $countPerPage = $this->getCountPerPage(\\n current(\\\\Estrutura\\\\Helpers\\\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\\n );\\n\\n $paginator->setItemCountPerPage($this->getCountPerPage(\\n current(\\\\Estrutura\\\\Helpers\\\\Pagination::getCountPerPage($paginator->getTotalItemCount()))\\n ))->setCurrentPageNumber($this->getCurrentPage());\\n\\n $viewModel = new ViewModel([\\n 'service' => $this->service,\\n 'form' => new \\\\Pesquisar\\\\Form\\\\PesquisarForm(),\\n 'paginator' => $paginator,\\n 'filter' => $filter,\\n 'countPerPage' => $countPerPage,\\n 'camposFilter' => $camposFilter,\\n 'controller' => $this->params('controller'),\\n 'atributos' => array()\\n ]);\\n\\n return $viewModel->setTerminal(TRUE);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fd598d23b4dda2201bce41fb52102b0\",\n \"score\": \"0.584715\",\n \"text\": \"public function getAllWithPaginate($filter = [], $pageSize = 20,$orderby = ['created_at' => 'DESC'],$with=\\\"\\\")\\n\\t{\\n $data_return = $this->model;\\n\\n $no_filter_more = false;\\n\\t\\tif ( ! empty($filter))\\n\\t\\t{\\n\\t\\t\\tforeach ($filter as $key => $value)\\n\\t\\t\\t{\\n\\t\\t\\t\\tif ($value == ''){\\n\\t\\t\\t\\t\\tunset($filter[$key]);\\n\\t\\t\\t\\t}\\n\\n \\t// Nếu là aray quy định\\n \\tif (is_array($value)) {\\n \\t$op = array_get($value, 'operator');\\n \\t$val = array_get($value, 'value');\\n \\t$column = $key;\\n \\t$data_return = $data_return->where($column, $op, $val); \\n \\t$no_filter_more = true;\\n \\t} else {\\n \\t\\t$data_return = $data_return->where($key,$value);\\n \\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif(!empty($orderby)){\\n\\t\\t\\tforeach ($orderby as $key => $value) {\\n\\t\\t\\t\\t$data_return = $data_return->orderby($key,$value);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif($with != \\\"\\\"){\\n\\t\\t\\t$data_return->with($with);\\n\\t\\t}\\n\\n\\t\\treturn $data_return->paginate($pageSize);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08b6a46993bc9b679115740906f90daf\",\n \"score\": \"0.58149856\",\n \"text\": \"public function addFilters() {\\n\\t\\t$this->addFilter(new Generator\\\\Filters\\\\Upper);\\n\\t\\t$this->addFilter(new Generator\\\\Filters\\\\Lower);\\n\\t\\t$this->addFilter(new Generator\\\\Filters\\\\Date);\\n\\t\\t$this->addFilter(new Generator\\\\Filters\\\\Number);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df0e7981f46ed95b99a11954c96f05fa\",\n \"score\": \"0.5808622\",\n \"text\": \"function getAlumnos($filter,$page,$model)\\r\\n { \\r\\n $where = \\\" INNER JOIN carrera ON alumno.career = carrera.idcarrera WHERE alumno.numcontrol LIKE :numcontrol OR alumno.nameA LIKE :nameA\\\";\\r\\n $array=array('numcontrol'=>'%'.$filter.'%','nameA'=>'%'.$filter.'%');\\r\\n $columns=\\\"alumno.numcontrol, alumno.nameA, carrera.short_name, alumno.phone\\\";\\r\\n return $model->paginador($columns,\\\"alumno\\\",\\\"Alumno\\\",$page,$where,$array);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5eaac1ef017c328de5aee20d3ea95db\",\n \"score\": \"0.5791585\",\n \"text\": \"public function showPostFilterAsPaginationPublic($filter='latest',$sort='desc',$genre1='',$genre2='',$country='',$year='') {\\n\\t\\t\\t$newgenre1 = \\\"and a.Tags like '%\\\".str_replace(\\\"'\\\",\\\"\\\",$genre1).\\\"%' \\\";\\n\\t\\t\\t$newgenre2 = (!empty($genre2)?\\\"and a.Tags like '%\\\".str_replace(\\\"'\\\",\\\"\\\",$genre2).\\\"%' \\\":\\\"\\\");\\n\\t\\t\\t$newcountry = \\\"and a.Country like '%\\\".str_replace(\\\"'\\\",\\\"\\\",$country).\\\"%' \\\";\\n\\t\\t\\t$newyear = \\\"and a.Released like '%\\\".str_replace(\\\"'\\\",\\\"\\\",$year).\\\"%' \\\";\\n\\t\\t\\tif ($filter == 'rating'){\\n\\t\\t\\t\\t$newfilter = 'a.Rating '.str_replace(\\\"'\\\",\\\"\\\",$sort).',a.Released '.str_replace(\\\"'\\\",\\\"\\\",$sort);\\n\\t\\t\\t} else if ($filter == 'popular'){\\n\\t\\t\\t\\t$newfilter = 'a.Released '.str_replace(\\\"'\\\",\\\"\\\",$sort).',a.Viewer '.str_replace(\\\"'\\\",\\\"\\\",$sort);\\n\\t\\t\\t} else if ($filter == 'released'){\\n\\t\\t\\t\\t$newfilter = 'a.Released '.str_replace(\\\"'\\\",\\\"\\\",$sort);\\n\\t\\t\\t} else if ($filter == 'latest'){\\n\\t\\t\\t\\t$newfilter = 'a.Created_at '.str_replace(\\\"'\\\",\\\"\\\",$sort);\\n\\t\\t\\t} else if ($filter == 'alphabet'){\\n\\t\\t\\t\\t$newfilter = 'a.Title '.str_replace(\\\"'\\\",\\\"\\\",$sort);\\n\\t\\t\\t} else if ($filter == 'favorite'){\\n\\t\\t\\t\\tif (str_replace(\\\"'\\\",\\\"\\\",$sort) == 'desc'){\\n\\t\\t\\t\\t\\t$newsort = 'asc';\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$newsort = 'desc';\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$newfilter = 'a.Released '.str_replace(\\\"'\\\",\\\"\\\",$sort).',a.Liked '.str_replace(\\\"'\\\",\\\"\\\",$sort).', a.Disliked '.$newsort;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$newfilter = 'a.Created_at '.str_replace(\\\"'\\\",\\\"\\\",$sort);\\n\\t\\t\\t}\\n\\t\\t\\t$sqlcountrow = \\\"SELECT count(a.PostID) as TotalRow\\n\\t\\t\\t\\tfrom data_post a\\n\\t\\t\\t\\tinner join core_status b on a.StatusID=b.StatusID\\n\\t\\t\\t\\twhere a.StatusID='51'\\n\\t\\t\\t\\t\\\".$newgenre1.\\\"\\n\\t\\t\\t\\t\\\".$newgenre2.\\\"\\n\\t\\t\\t\\t\\\".$newcountry.\\\"\\n\\t\\t\\t\\t\\\".$newyear.\\\"\\n\\t\\t\\t\\torder by \\\".$newfilter.\\\";\\\";\\n\\t\\t\\t\\t$stmt = $this->db->prepare($sqlcountrow);\\n\\n\\t\\t\\t\\tif ($stmt->execute()) {\\t\\n \\t \\tif ($stmt->rowCount() > 0){\\n\\t\\t\\t\\t\\t\\t$single = $stmt->fetch();\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t// Paginate won't work if page and items per page is negative.\\n\\t\\t\\t\\t\\t\\t// So make sure that page and items per page is always return minimum zero number.\\n\\t\\t\\t\\t\\t\\t$newpage = Validation::integerOnly($this->page);\\n\\t\\t\\t\\t\\t\\t$newitemsperpage = Validation::integerOnly($this->itemsPerPage);\\n\\t\\t\\t\\t\\t\\t$limits = (((($newpage-1)*$newitemsperpage) <= 0)?0:(($newpage-1)*$newitemsperpage));\\n\\t\\t\\t\\t\\t\\t$offsets = (($newitemsperpage <= 0)?0:$newitemsperpage);\\n\\n\\t\\t\\t\\t\\t\\t// Query Data\\n\\t\\t\\t\\t\\t\\t$sql = \\\"SELECT a.PostID,a.Created_at,a.Image,a.Title,a.Description,a.Embed_video,a.Duration,a.Stars,a.Cast,\\n\\t\\t\\t\\t\\t\\t\\t\\ta.Director,a.Tags,a.Country,a.Released,a.Rating,a.Viewer,a.Liked,a.Disliked,a.Username as 'User',\\n\\t\\t\\t\\t\\t\\t\\t\\ta.Updated_at,a.Updated_by,a.StatusID,b.`Status`\\n\\t\\t\\t\\t\\t\\t\\tfrom data_post a\\n\\t\\t\\t\\t\\t\\t\\tinner join core_status b on a.StatusID=b.StatusID\\n\\t\\t\\t\\t\\t\\t\\twhere a.StatusID='51' \\n\\t\\t\\t\\t\\t\\t\\t\\\".$newgenre1.\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\\".$newgenre2.\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\\".$newcountry.\\\"\\n\\t\\t\\t\\t\\t\\t\\t\\\".$newyear.\\\"\\n\\t\\t\\t\\t\\t\\t\\torder by \\\".$newfilter.\\\" LIMIT :limpage , :offpage;\\\";\\n\\t\\t\\t\\t\\t\\t$stmt2 = $this->db->prepare($sql);\\n\\t\\t\\t\\t\\t\\t$stmt2->bindValue(':limpage', (INT) $limits, PDO::PARAM_INT);\\n\\t\\t\\t\\t\\t\\t$stmt2->bindValue(':offpage', (INT) $offsets, PDO::PARAM_INT);\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tif ($stmt2->execute()){\\n\\t\\t\\t\\t\\t\\t\\tif ($stmt2->rowCount() > 0){\\n\\t\\t\\t\\t\\t\\t\\t\\t$datares = \\\"[\\\";\\n\\t\\t\\t\\t\\t\\t\\t\\twhile($redata = $stmt2->fetch()) \\n\\t\\t\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//Start Tags\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$return_arr = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$names = $redata['Tags'];\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$named = preg_split( \\\"/[,]/\\\", $names );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($named as $name){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ($name != null){$return_arr[] = trim($name);}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//End Tags\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//Start Stars\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$stars_arr = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$starnames = $redata['Stars'];\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$starnamed = preg_split( \\\"/[,]/\\\", $starnames );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($starnamed as $name){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ($name != null){$stars_arr[] = trim($name);}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//End Stars\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//Start Cast\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$cast_arr = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$castnames = $redata['Cast'];\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$castnamed = preg_split( \\\"/[,]/\\\", $castnames );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($castnamed as $name){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ($name != null){$cast_arr[] = trim($name);}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//End Cast\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//Start Director\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$director_arr = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$directornames = $redata['Director'];\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$directornamed = preg_split( \\\"/[,]/\\\", $directornames );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($directornamed as $name){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ($name != null){$director_arr[] = trim($name);}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//End Director\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//Start Country\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$country_arr = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$countrynames = $redata['Country'];\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$countrynamed = preg_split( \\\"/[,]/\\\", $countrynames );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($countrynamed as $name){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ($name != null){$country_arr[] = trim($name);}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//End Country\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//Start Embed\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$embed_arr = null;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$embednames = $redata['Embed_video'];\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$embednamed = preg_split( \\\"/[,]/\\\", $embednames );\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tforeach($embednamed as $name){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tif ($name != null){$embed_arr[] = trim($name);}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t//End Embed\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$datares .= '{\\\"PostID\\\":'.json_encode($redata['PostID']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Title\\\":'.json_encode($redata['Title']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Description\\\":'.json_encode($redata['Description']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Image\\\":'.json_encode($redata['Image']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Embed\\\":'.json_encode($embed_arr).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Duration\\\":'.json_encode($redata['Duration']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Stars\\\":'.json_encode($stars_arr).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Cast\\\":'.json_encode($cast_arr).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Director\\\":'.json_encode($director_arr).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Tags\\\":'.json_encode($return_arr).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Country\\\":'.json_encode($country_arr).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Released\\\":'.json_encode($redata['Released']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Rating\\\":'.json_encode($redata['Rating']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Viewer\\\":'.json_encode($redata['Viewer']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Liked\\\":'.json_encode($redata['Liked']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Disliked\\\":'.json_encode($redata['Disliked']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Created_at\\\":'.json_encode($redata['Created_at']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"User\\\":'.json_encode($redata['User']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Updated_at\\\":'.json_encode($redata['Updated_at']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Updated_by\\\":'.json_encode($redata['Updated_by']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"StatusID\\\":'.json_encode($redata['StatusID']).',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\\"Status\\\":'.json_encode($redata['Status']).'},';\\n\\t\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t\\t\\t$datares = substr($datares, 0, -1);\\n\\t\\t\\t\\t\\t\\t\\t\\t$datares .= \\\"]\\\";\\n\\t\\t\\t\\t\\t\\t\\t\\t$pagination = new \\\\classes\\\\Pagination();\\n\\t\\t\\t\\t\\t\\t\\t\\t$pagination->totalRow = $single['TotalRow'];\\n\\t\\t\\t\\t\\t\\t\\t\\t$pagination->page = $this->page;\\n\\t\\t\\t\\t\\t\\t\\t\\t$pagination->itemsPerPage = $this->itemsPerPage;\\n\\t\\t\\t\\t\\t\\t\\t\\t$pagination->fetchAllAssoc = json_decode($datares);\\n\\t\\t\\t\\t\\t\\t\\t\\t$data = $pagination->toDataArray();\\n\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t$data = [\\n\\t\\t \\t \\t \\t\\t\\t'status' => 'error',\\n\\t \\t\\t \\t\\t \\t'code' => 'RS601',\\n\\t \\t\\t\\t\\t 'message' => CustomHandlers::getreSlimMessage('RS601')\\n\\t\\t\\t\\t\\t\\t\\t\\t];\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t$data = [\\n \\t \\t \\t\\t'status' => 'error',\\n\\t\\t \\t\\t \\t'code' => 'RS202',\\n\\t \\t\\t\\t \\t 'message' => CustomHandlers::getreSlimMessage('RS202')\\n\\t\\t\\t\\t\\t\\t\\t];\\t\\n\\t\\t\\t\\t\\t\\t}\\t\\t\\t\\n\\t\\t\\t\\t } else {\\n \\t \\t\\t $data = [\\n \\t\\t\\t \\t'status' => 'error',\\n\\t\\t\\t \\t\\t 'code' => 'RS601',\\n \\t\\t\\t \\t 'message' => CustomHandlers::getreSlimMessage('RS601')\\n\\t\\t\\t\\t\\t\\t];\\n\\t\\t \\t } \\t \\t\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$data = [\\n \\t\\t\\t\\t\\t'status' => 'error',\\n\\t\\t\\t\\t\\t\\t'code' => 'RS202',\\n \\t\\t\\t 'message' => CustomHandlers::getreSlimMessage('RS202')\\n\\t\\t\\t\\t\\t];\\n\\t\\t\\t\\t}\\t\\t\\n \\n\\t\\t\\treturn json_encode($data, JSON_PRETTY_PRINT);\\n\\t $this->db= null;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"644a30949b8aa3ccaef52557d5205151\",\n \"score\": \"0.5790531\",\n \"text\": \"public function listado($paginaActual = 0,$porpagina = 10)\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5a87c4d75c60e2b947741ee6ae06b75\",\n \"score\": \"0.57839924\",\n \"text\": \"public function addInCmsPageFilter()\\n {\\n return $this->getSelect()->where('main_table.in_cms_page = 1');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"acc77a85a4b7741bca920294681fda78\",\n \"score\": \"0.5775686\",\n \"text\": \"public function getFilters() {\\n\\t\\t// Number of Google page for SERPS\\n\\t\\t$incrementOptions = array ();\\n\\t\\t$incrementOptions [] = JHtml::_ ( 'select.option', 10, JText::_ ( 'COM_JMAP_10PAGES' ) );\\n\\t\\t$incrementOptions [] = JHtml::_ ( 'select.option', 100, JText::_ ( 'COM_JMAP_100PAGES' ) );\\n\\t\\t$incrementOptions [] = JHtml::_ ( 'select.option', 200, JText::_ ( 'COM_JMAP_200PAGES' ) );\\n\\t\\t$incrementOptions [] = JHtml::_ ( 'select.option', 500, JText::_ ( 'COM_JMAP_500PAGES' ) );\\n\\t\\t$incrementOptions [] = JHtml::_ ( 'select.option', 1000, JText::_ ( 'COM_JMAP_1000PAGES' ) );\\n\\t\\t$incrementOptions [] = JHtml::_ ( 'select.option', 5000, JText::_ ( 'COM_JMAP_5000PAGES' ) );\\n\\t\\t$incrementOptions [] = JHtml::_ ( 'select.option', 10000, JText::_ ( 'COM_JMAP_10000PAGES' ) );\\n\\t\\t$lists ['numpages'] = JHtml::_ ( 'select.genericlist', $incrementOptions, 'numpages', 'onchange=\\\"Joomla.submitform();\\\" class=\\\"inputbox input-medium\\\"', 'value', 'text', $this->getState ( 'numpages' ) );\\n\\t\\t\\n\\t\\t// Languages\\n\\t\\t$languagesHttpAcceptHeaders = array (\\n\\t\\t\\t\\t\\\"af-NA\\\"=>\\\"Afrikaans (Namibia)\\\",\\n\\t\\t\\t\\t\\\"af-ZA\\\"=>\\\"Afrikaans (South Africa)\\\",\\n\\t\\t\\t\\t\\\"ak-GH\\\"=>\\\"Akan (Ghana)\\\",\\n\\t\\t\\t\\t\\\"sq-AL\\\"=>\\\"Albanian (Albania)\\\",\\n\\t\\t\\t\\t\\\"am-ET\\\"=>\\\"Amharic (Ethiopia)\\\",\\n\\t\\t\\t\\t\\\"ar-DZ\\\"=>\\\"Arabic (Algeria)\\\",\\n\\t\\t\\t\\t\\\"ar-BH\\\"=>\\\"Arabic (Bahrain)\\\",\\n\\t\\t\\t\\t\\\"ar-EG\\\"=>\\\"Arabic (Egypt)\\\",\\n\\t\\t\\t\\t\\\"ar-IQ\\\"=>\\\"Arabic (Iraq)\\\",\\n\\t\\t\\t\\t\\\"ar-JO\\\"=>\\\"Arabic (Jordan)\\\",\\n\\t\\t\\t\\t\\\"ar-KW\\\"=>\\\"Arabic (Kuwait)\\\",\\n\\t\\t\\t\\t\\\"ar-LB\\\"=>\\\"Arabic (Lebanon)\\\",\\n\\t\\t\\t\\t\\\"ar-LY\\\"=>\\\"Arabic (Libya)\\\",\\n\\t\\t\\t\\t\\\"ar-MA\\\"=>\\\"Arabic (Morocco)\\\",\\n\\t\\t\\t\\t\\\"ar-OM\\\"=>\\\"Arabic (Oman)\\\",\\n\\t\\t\\t\\t\\\"ar-QA\\\"=>\\\"Arabic (Qatar)\\\",\\n\\t\\t\\t\\t\\\"ar-SA\\\"=>\\\"Arabic (Saudi Arabia)\\\",\\n\\t\\t\\t\\t\\\"ar-SD\\\"=>\\\"Arabic (Sudan)\\\",\\n\\t\\t\\t\\t\\\"ar-SY\\\"=>\\\"Arabic (Syria)\\\",\\n\\t\\t\\t\\t\\\"ar-TN\\\"=>\\\"Arabic (Tunisia)\\\",\\n\\t\\t\\t\\t\\\"ar-AE\\\"=>\\\"Arabic (United Arab Emirates)\\\",\\n\\t\\t\\t\\t\\\"ar-YE\\\"=>\\\"Arabic (Yemen)\\\",\\n\\t\\t\\t\\t\\\"hy-AM\\\"=>\\\"Armenian (Armenia)\\\",\\n\\t\\t\\t\\t\\\"as-IN\\\"=>\\\"Assamese (India)\\\",\\n\\t\\t\\t\\t\\\"asa-TZ\\\"=>\\\"Asu (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"az-Cyrl\\\"=>\\\"Azerbaijani (Cyrillic)\\\",\\n\\t\\t\\t\\t\\\"az-Cyrl-AZ\\\"=>\\\"Azerbaijani (Cyrillic, Azerbaijan)\\\",\\n\\t\\t\\t\\t\\\"az-Latn\\\"=>\\\"Azerbaijani (Latin)\\\",\\n\\t\\t\\t\\t\\\"az-Latn-AZ\\\"=>\\\"Azerbaijani (Latin, Azerbaijan)\\\",\\n\\t\\t\\t\\t\\\"bm-ML\\\"=>\\\"Bambara (Mali)\\\",\\n\\t\\t\\t\\t\\\"eu-ES\\\"=>\\\"Basque (Spain)\\\",\\n\\t\\t\\t\\t\\\"be-BY\\\"=>\\\"Belarusian (Belarus)\\\",\\n\\t\\t\\t\\t\\\"bem-ZM\\\"=>\\\"Bemba (Zambia)\\\",\\n\\t\\t\\t\\t\\\"bez-TZ\\\"=>\\\"Bena (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"bn-BD\\\"=>\\\"Bengali (Bangladesh)\\\",\\n\\t\\t\\t\\t\\\"bn-IN\\\"=>\\\"Bengali (India)\\\",\\n\\t\\t\\t\\t\\\"bs-BA\\\"=>\\\"Bosnian (Bosnia and Herzegovina)\\\",\\n\\t\\t\\t\\t\\\"bg-BG\\\"=>\\\"Bulgarian (Bulgaria)\\\",\\n\\t\\t\\t\\t\\\"my-MM\\\"=>\\\"Burmese (Myanmar [Burma])\\\",\\n\\t\\t\\t\\t\\\"ca-ES\\\"=>\\\"Catalan (Spain)\\\",\\n\\t\\t\\t\\t\\\"tzm-Latn\\\"=>\\\"Central Morocco Tamazight (Latin)\\\",\\n\\t\\t\\t\\t\\\"tzm-Latn-MA\\\"=>\\\"Central Morocco Tamazight (Latin, Morocco)\\\",\\n\\t\\t\\t\\t\\\"tzm\\\"=>\\\"Central Morocco Tamazight\\\",\\n\\t\\t\\t\\t\\\"chr-US\\\"=>\\\"Cherokee (United States)\\\",\\n\\t\\t\\t\\t\\\"cgg-UG\\\"=>\\\"Chiga (Uganda)\\\",\\n\\t\\t\\t\\t\\\"zh-Hans\\\"=>\\\"Chinese (Simplified Han)\\\",\\n\\t\\t\\t\\t\\\"zh-Hans-CN\\\"=>\\\"Chinese (Simplified Han, China)\\\",\\n\\t\\t\\t\\t\\\"zh-Hans-HK\\\"=>\\\"Chinese (Simplified Han, Hong Kong SAR China)\\\",\\n\\t\\t\\t\\t\\\"zh-Hans-MO\\\"=>\\\"Chinese (Simplified Han, Macau SAR China)\\\",\\n\\t\\t\\t\\t\\\"zh-Hans-SG\\\"=>\\\"Chinese (Simplified Han, Singapore)\\\",\\n\\t\\t\\t\\t\\\"zh-Hant\\\"=>\\\"Chinese (Traditional Han)\\\",\\n\\t\\t\\t\\t\\\"zh-Hant-HK\\\"=>\\\"Chinese (Traditional Han, Hong Kong SAR China)\\\",\\n\\t\\t\\t\\t\\\"zh-Hant-MO\\\"=>\\\"Chinese (Traditional Han, Macau SAR China)\\\",\\n\\t\\t\\t\\t\\\"zh-Hant-TW\\\"=>\\\"Chinese (Traditional Han, Taiwan)\\\",\\n\\t\\t\\t\\t\\\"kw-GB\\\"=>\\\"Cornish (United Kingdom)\\\",\\n\\t\\t\\t\\t\\\"hr-HR\\\"=>\\\"Croatian (Croatia)\\\",\\n\\t\\t\\t\\t\\\"cs-CZ\\\"=>\\\"Czech (Czech Republic)\\\",\\n\\t\\t\\t\\t\\\"da-DK\\\"=>\\\"Danish (Denmark)\\\",\\n\\t\\t\\t\\t\\\"nl-BE\\\"=>\\\"Dutch (Belgium)\\\",\\n\\t\\t\\t\\t\\\"nl-NL\\\"=>\\\"Dutch (Netherlands)\\\",\\n\\t\\t\\t\\t\\\"ebu-KE\\\"=>\\\"Embu (Kenya)\\\",\\n\\t\\t\\t\\t\\\"en-AS\\\"=>\\\"English (American Samoa)\\\",\\n\\t\\t\\t\\t\\\"en-AU\\\"=>\\\"English (Australia)\\\",\\n\\t\\t\\t\\t\\\"en-BE\\\"=>\\\"English (Belgium)\\\",\\n\\t\\t\\t\\t\\\"en-BZ\\\"=>\\\"English (Belize)\\\",\\n\\t\\t\\t\\t\\\"en-BW\\\"=>\\\"English (Botswana)\\\",\\n\\t\\t\\t\\t\\\"en-CA\\\"=>\\\"English (Canada)\\\",\\n\\t\\t\\t\\t\\\"en-GU\\\"=>\\\"English (Guam)\\\",\\n\\t\\t\\t\\t\\\"en-HK\\\"=>\\\"English (Hong Kong SAR China)\\\",\\n\\t\\t\\t\\t\\\"en-IN\\\"=>\\\"English (India)\\\",\\n\\t\\t\\t\\t\\\"en-IE\\\"=>\\\"English (Ireland)\\\",\\n\\t\\t\\t\\t\\\"en-JM\\\"=>\\\"English (Jamaica)\\\",\\n\\t\\t\\t\\t\\\"en-MT\\\"=>\\\"English (Malta)\\\",\\n\\t\\t\\t\\t\\\"en-MH\\\"=>\\\"English (Marshall Islands)\\\",\\n\\t\\t\\t\\t\\\"en-MU\\\"=>\\\"English (Mauritius)\\\",\\n\\t\\t\\t\\t\\\"en-NA\\\"=>\\\"English (Namibia)\\\",\\n\\t\\t\\t\\t\\\"en-NZ\\\"=>\\\"English (New Zealand)\\\",\\n\\t\\t\\t\\t\\\"en-MP\\\"=>\\\"English (Northern Mariana Islands)\\\",\\n\\t\\t\\t\\t\\\"en-PK\\\"=>\\\"English (Pakistan)\\\",\\n\\t\\t\\t\\t\\\"en-PH\\\"=>\\\"English (Philippines)\\\",\\n\\t\\t\\t\\t\\\"en-SG\\\"=>\\\"English (Singapore)\\\",\\n\\t\\t\\t\\t\\\"en-ZA\\\"=>\\\"English (South Africa)\\\",\\n\\t\\t\\t\\t\\\"en-TT\\\"=>\\\"English (Trinidad and Tobago)\\\",\\n\\t\\t\\t\\t\\\"en-UM\\\"=>\\\"English (U.S. Minor Outlying Islands)\\\",\\n\\t\\t\\t\\t\\\"en-VI\\\"=>\\\"English (U.S. Virgin Islands)\\\",\\n\\t\\t\\t\\t\\\"en-GB\\\"=>\\\"English (United Kingdom)\\\",\\n\\t\\t\\t\\t\\\"en-US\\\"=>\\\"English (United States)\\\",\\n\\t\\t\\t\\t\\\"en-ZW\\\"=>\\\"English (Zimbabwe)\\\",\\n\\t\\t\\t\\t\\\"et-EE\\\"=>\\\"Estonian (Estonia)\\\",\\n\\t\\t\\t\\t\\\"ee-GH\\\"=>\\\"Ewe (Ghana)\\\",\\n\\t\\t\\t\\t\\\"ee-TG\\\"=>\\\"Ewe (Togo)\\\",\\n\\t\\t\\t\\t\\\"fo-FO\\\"=>\\\"Faroese (Faroe Islands)\\\",\\n\\t\\t\\t\\t\\\"fil-PH\\\"=>\\\"Filipino (Philippines)\\\",\\n\\t\\t\\t\\t\\\"fi-FI\\\"=>\\\"Finnish (Finland)\\\",\\n\\t\\t\\t\\t\\\"fr-BE\\\"=>\\\"French (Belgium)\\\",\\n\\t\\t\\t\\t\\\"fr-BJ\\\"=>\\\"French (Benin)\\\",\\n\\t\\t\\t\\t\\\"fr-BF\\\"=>\\\"French (Burkina Faso)\\\",\\n\\t\\t\\t\\t\\\"fr-BI\\\"=>\\\"French (Burundi)\\\",\\n\\t\\t\\t\\t\\\"fr-CM\\\"=>\\\"French (Cameroon)\\\",\\n\\t\\t\\t\\t\\\"fr-CA\\\"=>\\\"French (Canada)\\\",\\n\\t\\t\\t\\t\\\"fr-CF\\\"=>\\\"French (Central African Republic)\\\",\\n\\t\\t\\t\\t\\\"fr-TD\\\"=>\\\"French (Chad)\\\",\\n\\t\\t\\t\\t\\\"fr-KM\\\"=>\\\"French (Comoros)\\\",\\n\\t\\t\\t\\t\\\"fr-CG\\\"=>\\\"French (Congo - Brazzaville)\\\",\\n\\t\\t\\t\\t\\\"fr-CD\\\"=>\\\"French (Congo - Kinshasa)\\\",\\n\\t\\t\\t\\t\\\"fr-CI\\\"=>\\\"French (Cote Ivoire)\\\",\\n\\t\\t\\t\\t\\\"fr-DJ\\\"=>\\\"French (Djibouti)\\\",\\n\\t\\t\\t\\t\\\"fr-GQ\\\"=>\\\"French (Equatorial Guinea)\\\",\\n\\t\\t\\t\\t\\\"fr-FR\\\"=>\\\"French (France)\\\",\\n\\t\\t\\t\\t\\\"fr-GA\\\"=>\\\"French (Gabon)\\\",\\n\\t\\t\\t\\t\\\"fr-GP\\\"=>\\\"French (Guadeloupe)\\\",\\n\\t\\t\\t\\t\\\"fr-GN\\\"=>\\\"French (Guinea)\\\",\\n\\t\\t\\t\\t\\\"fr-LU\\\"=>\\\"French (Luxembourg)\\\",\\n\\t\\t\\t\\t\\\"fr-MG\\\"=>\\\"French (Madagascar)\\\",\\n\\t\\t\\t\\t\\\"fr-ML\\\"=>\\\"French (Mali)\\\",\\n\\t\\t\\t\\t\\\"fr-MQ\\\"=>\\\"French (Martinique)\\\",\\n\\t\\t\\t\\t\\\"fr-MC\\\"=>\\\"French (Monaco)\\\",\\n\\t\\t\\t\\t\\\"fr-NE\\\"=>\\\"French (Niger)\\\",\\n\\t\\t\\t\\t\\\"fr-RW\\\"=>\\\"French (Rwanda)\\\",\\n\\t\\t\\t\\t\\\"fr-RE\\\"=>\\\"French (Reunion)\\\",\\n\\t\\t\\t\\t\\\"fr-BL\\\"=>\\\"French (Saint Barthelemy)\\\",\\n\\t\\t\\t\\t\\\"fr-MF\\\"=>\\\"French (Saint Martin)\\\",\\n\\t\\t\\t\\t\\\"fr-SN\\\"=>\\\"French (Senegal)\\\",\\n\\t\\t\\t\\t\\\"fr-CH\\\"=>\\\"French (Switzerland)\\\",\\n\\t\\t\\t\\t\\\"fr-TG\\\"=>\\\"French (Togo)\\\",\\n\\t\\t\\t\\t\\\"ff-SN\\\"=>\\\"Fulah (Senegal)\\\",\\n\\t\\t\\t\\t\\\"gl-ES\\\"=>\\\"Galician (Spain)\\\",\\n\\t\\t\\t\\t\\\"lg-UG\\\"=>\\\"Ganda (Uganda)\\\",\\n\\t\\t\\t\\t\\\"ka-GE\\\"=>\\\"Georgian (Georgia)\\\",\\n\\t\\t\\t\\t\\\"de-AT\\\"=>\\\"German (Austria)\\\",\\n\\t\\t\\t\\t\\\"de-BE\\\"=>\\\"German (Belgium)\\\",\\n\\t\\t\\t\\t\\\"de-DE\\\"=>\\\"German (Germany)\\\",\\n\\t\\t\\t\\t\\\"de-LI\\\"=>\\\"German (Liechtenstein)\\\",\\n\\t\\t\\t\\t\\\"de-LU\\\"=>\\\"German (Luxembourg)\\\",\\n\\t\\t\\t\\t\\\"de-CH\\\"=>\\\"German (Switzerland)\\\",\\n\\t\\t\\t\\t\\\"el-CY\\\"=>\\\"Greek (Cyprus)\\\",\\n\\t\\t\\t\\t\\\"el-GR\\\"=>\\\"Greek (Greece)\\\",\\n\\t\\t\\t\\t\\\"gu-IN\\\"=>\\\"Gujarati (India)\\\",\\n\\t\\t\\t\\t\\\"guz-KE\\\"=>\\\"Gusii (Kenya)\\\",\\n\\t\\t\\t\\t\\\"ha-Latn\\\"=>\\\"Hausa (Latin)\\\",\\n\\t\\t\\t\\t\\\"ha-Latn-GH\\\"=>\\\"Hausa (Latin, Ghana)\\\",\\n\\t\\t\\t\\t\\\"ha-Latn-NE\\\"=>\\\"Hausa (Latin, Niger)\\\",\\n\\t\\t\\t\\t\\\"ha-Latn-NG\\\"=>\\\"Hausa (Latin, Nigeria)\\\",\\n\\t\\t\\t\\t\\\"haw-US\\\"=>\\\"Hawaiian (United States)\\\",\\n\\t\\t\\t\\t\\\"he-IL\\\"=>\\\"Hebrew (Israel)\\\",\\n\\t\\t\\t\\t\\\"hi-IN\\\"=>\\\"Hindi (India)\\\",\\n\\t\\t\\t\\t\\\"hu-HU\\\"=>\\\"Hungarian (Hungary)\\\",\\n\\t\\t\\t\\t\\\"is-IS\\\"=>\\\"Icelandic (Iceland)\\\",\\n\\t\\t\\t\\t\\\"ig-NG\\\"=>\\\"Igbo (Nigeria)\\\",\\n\\t\\t\\t\\t\\\"id-ID\\\"=>\\\"Indonesian (Indonesia)\\\",\\n\\t\\t\\t\\t\\\"ga-IE\\\"=>\\\"Irish (Ireland)\\\",\\n\\t\\t\\t\\t\\\"it-IT\\\"=>\\\"Italian (Italy)\\\",\\n\\t\\t\\t\\t\\\"it-CH\\\"=>\\\"Italian (Switzerland)\\\",\\n\\t\\t\\t\\t\\\"ja-JP\\\"=>\\\"Japanese (Japan)\\\",\\n\\t\\t\\t\\t\\\"kea-CV\\\"=>\\\"Kabuverdianu (Cape Verde)\\\",\\n\\t\\t\\t\\t\\\"kab-DZ\\\"=>\\\"Kabyle (Algeria)\\\",\\n\\t\\t\\t\\t\\\"kl-GL\\\"=>\\\"Kalaallisut (Greenland)\\\",\\n\\t\\t\\t\\t\\\"kln-KE\\\"=>\\\"Kalenjin (Kenya)\\\",\\n\\t\\t\\t\\t\\\"kam-KE\\\"=>\\\"Kamba (Kenya)\\\",\\n\\t\\t\\t\\t\\\"kn-IN\\\"=>\\\"Kannada (India)\\\",\\n\\t\\t\\t\\t\\\"kk-Cyrl\\\"=>\\\"Kazakh (Cyrillic)\\\",\\n\\t\\t\\t\\t\\\"kk-Cyrl-KZ\\\"=>\\\"Kazakh (Cyrillic, Kazakhstan)\\\",\\n\\t\\t\\t\\t\\\"km-KH\\\"=>\\\"Khmer (Cambodia)\\\",\\n\\t\\t\\t\\t\\\"ki-KE\\\"=>\\\"Kikuyu (Kenya)\\\",\\n\\t\\t\\t\\t\\\"rw-RW\\\"=>\\\"Kinyarwanda (Rwanda)\\\",\\n\\t\\t\\t\\t\\\"kok-IN\\\"=>\\\"Konkani (India)\\\",\\n\\t\\t\\t\\t\\\"ko-KR\\\"=>\\\"Korean (South Korea)\\\",\\n\\t\\t\\t\\t\\\"khq-ML\\\"=>\\\"Koyra Chiini (Mali)\\\",\\n\\t\\t\\t\\t\\\"ses-ML\\\"=>\\\"Koyraboro Senni (Mali)\\\",\\n\\t\\t\\t\\t\\\"lag-TZ\\\"=>\\\"Langi (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"lv-LV\\\"=>\\\"Latvian (Latvia)\\\",\\n\\t\\t\\t\\t\\\"lt-LT\\\"=>\\\"Lithuanian (Lithuania)\\\",\\n\\t\\t\\t\\t\\\"luo-KE\\\"=>\\\"Luo (Kenya)\\\",\\n\\t\\t\\t\\t\\\"luy-KE\\\"=>\\\"Luyia (Kenya)\\\",\\n\\t\\t\\t\\t\\\"mk-MK\\\"=>\\\"Macedonian (Macedonia)\\\",\\n\\t\\t\\t\\t\\\"jmc-TZ\\\"=>\\\"Machame (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"kde-TZ\\\"=>\\\"Makonde (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"mg-MG\\\"=>\\\"Malagasy (Madagascar)\\\",\\n\\t\\t\\t\\t\\\"ms-BN\\\"=>\\\"Malay (Brunei)\\\",\\n\\t\\t\\t\\t\\\"ms-MY\\\"=>\\\"Malay (Malaysia)\\\",\\n\\t\\t\\t\\t\\\"ml-IN\\\"=>\\\"Malayalam (India)\\\",\\n\\t\\t\\t\\t\\\"mt-MT\\\"=>\\\"Maltese (Malta)\\\",\\n\\t\\t\\t\\t\\\"gv-GB\\\"=>\\\"Manx (United Kingdom)\\\",\\n\\t\\t\\t\\t\\\"mr-IN\\\"=>\\\"Marathi (India)\\\",\\n\\t\\t\\t\\t\\\"mas-KE\\\"=>\\\"Masai (Kenya)\\\",\\n\\t\\t\\t\\t\\\"mas-TZ\\\"=>\\\"Masai (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"mer-KE\\\"=>\\\"Meru (Kenya)\\\",\\n\\t\\t\\t\\t\\\"mfe-MU\\\"=>\\\"Morisyen (Mauritius)\\\",\\n\\t\\t\\t\\t\\\"naq-NA\\\"=>\\\"Nama (Namibia)\\\",\\n\\t\\t\\t\\t\\\"ne-IN\\\"=>\\\"Nepali (India)\\\",\\n\\t\\t\\t\\t\\\"ne-NP\\\"=>\\\"Nepali (Nepal)\\\",\\n\\t\\t\\t\\t\\\"nd-ZW\\\"=>\\\"North Ndebele (Zimbabwe)\\\",\\n\\t\\t\\t\\t\\\"nb-NO\\\"=>\\\"Norwegian Bokmal (Norway)\\\",\\n\\t\\t\\t\\t\\\"nn-NO\\\"=>\\\"Norwegian Nynorsk (Norway)\\\",\\n\\t\\t\\t\\t\\\"nyn-UG\\\"=>\\\"Nyankole (Uganda)\\\",\\n\\t\\t\\t\\t\\\"or-IN\\\"=>\\\"Oriya (India)\\\",\\n\\t\\t\\t\\t\\\"om-ET\\\"=>\\\"Oromo (Ethiopia)\\\",\\n\\t\\t\\t\\t\\\"m-KE\\\"=>\\\"Oromo (Kenya)\\\",\\n\\t\\t\\t\\t\\\"ps-AF\\\"=>\\\"Pashto (Afghanistan)\\\",\\n\\t\\t\\t\\t\\\"fa-AF\\\"=>\\\"Persian (Afghanistan)\\\",\\n\\t\\t\\t\\t\\\"fa-IR\\\"=>\\\"Persian (Iran)\\\",\\n\\t\\t\\t\\t\\\"pl-PL\\\"=>\\\"Polish (Poland)\\\",\\n\\t\\t\\t\\t\\\"pt-BR\\\"=>\\\"Portuguese (Brazil)\\\",\\n\\t\\t\\t\\t\\\"pt-GW\\\"=>\\\"Portuguese (Guinea-Bissau)\\\",\\n\\t\\t\\t\\t\\\"pt-MZ\\\"=>\\\"Portuguese (Mozambique)\\\",\\n\\t\\t\\t\\t\\\"pt-PT\\\"=>\\\"Portuguese (Portugal)\\\",\\n\\t\\t\\t\\t\\\"pa-Arab\\\"=>\\\"Punjabi (Arabic)\\\",\\n\\t\\t\\t\\t\\\"pa-Arab-PK\\\"=>\\\"Punjabi (Arabic, Pakistan)\\\",\\n\\t\\t\\t\\t\\\"pa-Guru\\\"=>\\\"Punjabi (Gurmukhi)\\\",\\n\\t\\t\\t\\t\\\"pa-Guru-IN\\\"=>\\\"Punjabi (Gurmukhi, India)\\\",\\n\\t\\t\\t\\t\\\"ro-MD\\\"=>\\\"Romanian (Moldova)\\\",\\n\\t\\t\\t\\t\\\"ro-RO\\\"=>\\\"Romanian (Romania)\\\",\\n\\t\\t\\t\\t\\\"rm-CH\\\"=>\\\"Romansh (Switzerland)\\\",\\n\\t\\t\\t\\t\\\"rof-TZ\\\"=>\\\"Rombo (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"ru-MD\\\"=>\\\"Russian (Moldova)\\\",\\n\\t\\t\\t\\t\\\"ru-RU\\\"=>\\\"Russian (Russia)\\\",\\n\\t\\t\\t\\t\\\"ru-UA\\\"=>\\\"Russian (Ukraine)\\\",\\n\\t\\t\\t\\t\\\"rwk-TZ\\\"=>\\\"Rwa (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"saq-KE\\\"=>\\\"Samburu (Kenya)\\\",\\n\\t\\t\\t\\t\\\"sg-CF\\\"=>\\\"Sango (Central African Republic)\\\",\\n\\t\\t\\t\\t\\\"seh-MZ\\\"=>\\\"Sena (Mozambique)\\\",\\n\\t\\t\\t\\t\\\"sr-Cyrl\\\"=>\\\"Serbian (Cyrillic)\\\",\\n\\t\\t\\t\\t\\\"sr-Cyrl-BA\\\"=>\\\"Serbian (Cyrillic, Bosnia and Herzegovina)\\\",\\n\\t\\t\\t\\t\\\"sr-Cyrl-ME\\\"=>\\\"Serbian (Cyrillic, Montenegro)\\\",\\n\\t\\t\\t\\t\\\"sr-Cyrl-RS\\\"=>\\\"Serbian (Cyrillic, Serbia)\\\",\\n\\t\\t\\t\\t\\\"sr-Latn\\\"=>\\\"Serbian (Latin)\\\",\\n\\t\\t\\t\\t\\\"sr-Latn-BA\\\"=>\\\"Serbian (Latin, Bosnia and Herzegovina)\\\",\\n\\t\\t\\t\\t\\\"sr-Latn-ME\\\"=>\\\"Serbian (Latin, Montenegro)\\\",\\n\\t\\t\\t\\t\\\"sr-Latn-RS\\\"=>\\\"Serbian (Latin, Serbia)\\\",\\n\\t\\t\\t\\t\\\"sn-ZW\\\"=>\\\"Shona (Zimbabwe)\\\",\\n\\t\\t\\t\\t\\\"ii-CN\\\"=>\\\"Sichuan Yi (China)\\\",\\n\\t\\t\\t\\t\\\"si-LK\\\"=>\\\"Sinhala (Sri Lanka)\\\",\\n\\t\\t\\t\\t\\\"sk-SK\\\"=>\\\"Slovak (Slovakia)\\\",\\n\\t\\t\\t\\t\\\"sl-SI\\\"=>\\\"Slovenian (Slovenia)\\\",\\n\\t\\t\\t\\t\\\"xog-UG\\\"=>\\\"Soga (Uganda)\\\",\\n\\t\\t\\t\\t\\\"so-DJ\\\"=>\\\"Somali (Djibouti)\\\",\\n\\t\\t\\t\\t\\\"so-ET\\\"=>\\\"Somali (Ethiopia)\\\",\\n\\t\\t\\t\\t\\\"so-KE\\\"=>\\\"Somali (Kenya)\\\",\\n\\t\\t\\t\\t\\\"so-SO\\\"=>\\\"Somali (Somalia)\\\",\\n\\t\\t\\t\\t\\\"es-AR\\\"=>\\\"Spanish (Argentina)\\\",\\n\\t\\t\\t\\t\\\"es-BO\\\"=>\\\"Spanish (Bolivia)\\\",\\n\\t\\t\\t\\t\\\"es-CL\\\"=>\\\"Spanish (Chile)\\\",\\n\\t\\t\\t\\t\\\"es-CO\\\"=>\\\"Spanish (Colombia)\\\",\\n\\t\\t\\t\\t\\\"es-CR\\\"=>\\\"Spanish (Costa Rica)\\\",\\n\\t\\t\\t\\t\\\"es-DO\\\"=>\\\"Spanish (Dominican Republic)\\\",\\n\\t\\t\\t\\t\\\"es-EC\\\"=>\\\"Spanish (Ecuador)\\\",\\n\\t\\t\\t\\t\\\"es-SV\\\"=>\\\"Spanish (El Salvador)\\\",\\n\\t\\t\\t\\t\\\"es-GQ\\\"=>\\\"Spanish (Equatorial Guinea)\\\",\\n\\t\\t\\t\\t\\\"es-GT\\\"=>\\\"Spanish (Guatemala)\\\",\\n\\t\\t\\t\\t\\\"es-HN\\\"=>\\\"Spanish (Honduras)\\\",\\n\\t\\t\\t\\t\\\"es-419\\\"=>\\\"Spanish (Latin America)\\\",\\n\\t\\t\\t\\t\\\"es-MX\\\"=>\\\"Spanish (Mexico)\\\",\\n\\t\\t\\t\\t\\\"es-NI\\\"=>\\\"Spanish (Nicaragua)\\\",\\n\\t\\t\\t\\t\\\"es-PA\\\"=>\\\"Spanish (Panama)\\\",\\n\\t\\t\\t\\t\\\"es-PY\\\"=>\\\"Spanish (Paraguay)\\\",\\n\\t\\t\\t\\t\\\"es-PE\\\"=>\\\"Spanish (Peru)\\\",\\n\\t\\t\\t\\t\\\"es-PR\\\"=>\\\"Spanish (Puerto Rico)\\\",\\n\\t\\t\\t\\t\\\"es-ES\\\"=>\\\"Spanish (Spain)\\\",\\n\\t\\t\\t\\t\\\"es-US\\\"=>\\\"Spanish (United States)\\\",\\n\\t\\t\\t\\t\\\"es-UY\\\"=>\\\"Spanish (Uruguay)\\\",\\n\\t\\t\\t\\t\\\"es-VE\\\"=>\\\"Spanish (Venezuela)\\\",\\n\\t\\t\\t\\t\\\"sw-KE\\\"=>\\\"Swahili (Kenya)\\\",\\n\\t\\t\\t\\t\\\"sw-TZ\\\"=>\\\"Swahili (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"sv-FI\\\"=>\\\"Swedish (Finland)\\\",\\n\\t\\t\\t\\t\\\"sv-SE\\\"=>\\\"Swedish (Sweden)\\\",\\n\\t\\t\\t\\t\\\"gsw-CH\\\"=>\\\"Swiss German (Switzerland)\\\",\\n\\t\\t\\t\\t\\\"shi-Latn\\\"=>\\\"Tachelhit (Latin)\\\",\\n\\t\\t\\t\\t\\\"shi-Latn-MA\\\"=>\\\"Tachelhit (Latin, Morocco)\\\",\\n\\t\\t\\t\\t\\\"shi-Tfng\\\"=>\\\"Tachelhit (Tifinagh)\\\",\\n\\t\\t\\t\\t\\\"shi-Tfng-MA\\\"=>\\\"Tachelhit (Tifinagh, Morocco)\\\",\\n\\t\\t\\t\\t\\\"dav-KE\\\"=>\\\"Taita (Kenya)\\\",\\n\\t\\t\\t\\t\\\"ta-IN\\\"=>\\\"Tamil (India)\\\",\\n\\t\\t\\t\\t\\\"ta-LK\\\"=>\\\"Tamil (Sri Lanka)\\\",\\n\\t\\t\\t\\t\\\"te-IN\\\"=>\\\"Telugu (India)\\\",\\n\\t\\t\\t\\t\\\"teo-KE\\\"=>\\\"Teso (Kenya)\\\",\\n\\t\\t\\t\\t\\\"teo-UG\\\"=>\\\"Teso (Uganda)\\\",\\n\\t\\t\\t\\t\\\"th-TH\\\"=>\\\"Thai (Thailand)\\\",\\n\\t\\t\\t\\t\\\"bo-CN\\\"=>\\\"Tibetan (China)\\\",\\n\\t\\t\\t\\t\\\"bo-IN\\\"=>\\\"Tibetan (India)\\\",\\n\\t\\t\\t\\t\\\"ti-ER\\\"=>\\\"Tigrinya (Eritrea)\\\",\\n\\t\\t\\t\\t\\\"ti-ET\\\"=>\\\"Tigrinya (Ethiopia)\\\",\\n\\t\\t\\t\\t\\\"to-TO\\\"=>\\\"Tonga (Tonga)\\\",\\n\\t\\t\\t\\t\\\"tr-TR\\\"=>\\\"Turkish (Turkey)\\\",\\n\\t\\t\\t\\t\\\"uk-UA\\\"=>\\\"Ukrainian (Ukraine)\\\",\\n\\t\\t\\t\\t\\\"ur-IN\\\"=>\\\"Urdu (India)\\\",\\n\\t\\t\\t\\t\\\"ur-PK\\\"=>\\\"Urdu (Pakistan)\\\",\\n\\t\\t\\t\\t\\\"uz-Arab\\\"=>\\\"Uzbek (Arabic)\\\",\\n\\t\\t\\t\\t\\\"uz-Arab-AF\\\"=>\\\"Uzbek (Arabic, Afghanistan)\\\",\\n\\t\\t\\t\\t\\\"uz-Cyrl\\\"=>\\\"Uzbek (Cyrillic)\\\",\\n\\t\\t\\t\\t\\\"uz-Cyrl-UZ\\\"=>\\\"Uzbek (Cyrillic, Uzbekistan)\\\",\\n\\t\\t\\t\\t\\\"uz-Latn\\\"=>\\\"Uzbek (Latin)\\\",\\n\\t\\t\\t\\t\\\"uz-Latn-UZ\\\"=>\\\"Uzbek (Latin, Uzbekistan)\\\",\\n\\t\\t\\t\\t\\\"vi-VN\\\"=>\\\"Vietnamese (Vietnam)\\\",\\n\\t\\t\\t\\t\\\"vun-TZ\\\"=>\\\"Vunjo (Tanzania)\\\",\\n\\t\\t\\t\\t\\\"cy-GB\\\"=>\\\"Welsh (United Kingdom)\\\",\\n\\t\\t\\t\\t\\\"yo-NG\\\"=>\\\"Yoruba (Nigeria)\\\",\\n\\t\\t\\t\\t\\\"zu-ZA\\\"=>\\\"Zulu (South Africa)\\\" \\n\\t\\t);\\n\\t\\t\\n\\t\\t$languagesHttpAcceptHeadersOptions = array ();\\n\\t\\t$languagesHttpAcceptHeadersOptions [] = JHtml::_ ( 'select.option', null, JText::_('COM_JMAP_INDEXING_SELECT_DEFAULT') );\\n\\t\\tforeach ($languagesHttpAcceptHeaders as $value=>$text) {\\n\\t\\t\\t$languagesHttpAcceptHeadersOptions [] = JHtml::_ ( 'select.option', $value, $text );\\n\\t\\t}\\n\\t\\t$lists ['acceptlanguages'] = JHtml::_ ( 'select.genericlist', $languagesHttpAcceptHeadersOptions, 'acceptlanguage', 'class=\\\"inputbox input-medium serpcontrol\\\"', 'value', 'text', $this->getState ( 'acceptlanguage' ) );\\n\\t\\t\\n\\t\\t$countriedTopLevelDomains = array (\\n\\t\\t\\t\\t'Algeria'=>'dz',\\n\\t\\t\\t\\t'Ascension Island'=>'ac',\\n\\t\\t\\t\\t'Andorra'=>'ad',\\n\\t\\t\\t\\t'Afghanistan'=>'com.af',\\n\\t\\t\\t\\t'Antigua and Barbuda'=>'com.ag',\\n\\t\\t\\t\\t'Anguilla'=>'com.ai',\\n\\t\\t\\t\\t'Albania'=>'al',\\n\\t\\t\\t\\t'Armenia'=>'am',\\n\\t\\t\\t\\t'Angola'=>'co.ao',\\n\\t\\t\\t\\t'Argentina'=>'com.ar',\\n\\t\\t\\t\\t'American Samoa'=>'as',\\n\\t\\t\\t\\t'Austria'=>'at',\\n\\t\\t\\t\\t'Australia'=>'com.au',\\n\\t\\t\\t\\t'Azerbaijan'=>'az',\\n\\t\\t\\t\\t'Bosnia and Herzegovina'=>'ba',\\n\\t\\t\\t\\t'Bangladesh'=>'com.bd',\\n\\t\\t\\t\\t'Belgium'=>'be',\\n\\t\\t\\t\\t'Burkina Faso'=>'bf',\\n\\t\\t\\t\\t'Bulgaria'=>'bg',\\n\\t\\t\\t\\t'Bahrain'=>'com.bh',\\n\\t\\t\\t\\t'Burma'=>'com.mm',\\n\\t\\t\\t\\t'Burundi'=>'bi',\\n\\t\\t\\t\\t'Benin'=>'bj',\\n\\t\\t\\t\\t'Brunei'=>'com.bn',\\n\\t\\t\\t\\t'Bolivia'=>'com.bo',\\n\\t\\t\\t\\t'Brazil'=>'com.br',\\n\\t\\t\\t\\t'Bahamas'=>'bs',\\n\\t\\t\\t\\t'Bhutan'=>'bt',\\n\\t\\t\\t\\t'Botswana'=>'co.bw',\\n\\t\\t\\t\\t'Belarus'=>'by',\\n\\t\\t\\t\\t'Belize'=>'com.bz',\\n\\t\\t\\t\\t'British Indian Ocean Territory'=>'io',\\n\\t\\t\\t\\t'British Virgin Islands'=>'vg',\\n\\t\\t\\t\\t'Canada'=>'ca',\\n\\t\\t\\t\\t'Cambodia'=>'com.kh',\\n\\t\\t\\t\\t'Cocos (Keeling) Islands'=>'cc',\\n\\t\\t\\t\\t'Central African Republic'=>'cf',\\n\\t\\t\\t\\t'Catalonia Catalan Countries'=>'cat',\\n\\t\\t\\t\\t'Cook Islands'=>'co.ck',\\n\\t\\t\\t\\t'Chile'=>'cl',\\n\\t\\t\\t\\t'Cameroon'=>'cm',\\n\\t\\t\\t\\t'Chad'=>'td',\\n\\t\\t\\t\\t'China'=>'cn',\\n\\t\\t\\t\\t'Colombia'=>'com.co',\\n\\t\\t\\t\\t'Costa Rica'=>'co.cr',\\n\\t\\t\\t\\t'Croatia'=>'hr',\\n\\t\\t\\t\\t'Cuba'=>'com.cu',\\n\\t\\t\\t\\t'Cape Verde'=>'cv',\\n\\t\\t\\t\\t'Cyprus'=>'com.cy',\\n\\t\\t\\t\\t'Czech Republic'=>'cz',\\n\\t\\t\\t\\t'Democratic Republic of the Congo'=>'cd',\\n\\t\\t\\t\\t'Denmark'=>'dk',\\n\\t\\t\\t\\t'Djibouti'=>'dj',\\n\\t\\t\\t\\t'Dominica'=>'dm',\\n\\t\\t\\t\\t'Dominican Republic'=>'com.do',\\n\\t\\t\\t\\t'Ecuador'=>'com.ec',\\n\\t\\t\\t\\t'Estonia'=>'ee',\\n\\t\\t\\t\\t'Egypt'=>'com.eg',\\n\\t\\t\\t\\t'El Salvador'=>'com.sv',\\n\\t\\t\\t\\t'Ethiopia'=>'com.et',\\n\\t\\t\\t\\t'Finland'=>'fi',\\n\\t\\t\\t\\t'Fiji'=>'com.fj',\\n\\t\\t\\t\\t'Federated States of Micronesia'=>'fm',\\n\\t\\t\\t\\t'France'=>'fr',\\n\\t\\t\\t\\t'French Guiana'=>'gf',\\n\\t\\t\\t\\t'Gabon'=>'ga',\\n\\t\\t\\t\\t'Georgia'=>'ge',\\n\\t\\t\\t\\t'Germany'=>'de',\\n\\t\\t\\t\\t'Guernsey'=>'gg',\\n\\t\\t\\t\\t'Ghana'=>'com.gh',\\n\\t\\t\\t\\t'Gibraltar'=>'com.gi',\\n\\t\\t\\t\\t'Greenland'=>'gl',\\n\\t\\t\\t\\t'Gambia'=>'gm',\\n\\t\\t\\t\\t'Guadeloupe'=>'gp',\\n\\t\\t\\t\\t'Greece'=>'gr',\\n\\t\\t\\t\\t'Guatemala'=>'com.gt',\\n\\t\\t\\t\\t'Guyana'=>'gy',\\n\\t\\t\\t\\t'Hong Kong'=>'com.hk',\\n\\t\\t\\t\\t'Honduras'=>'hn',\\n\\t\\t\\t\\t'Haiti'=>'ht',\\n\\t\\t\\t\\t'Hungary'=>'hu',\\n\\t\\t\\t\\t'Indonesia'=>'co.id',\\n\\t\\t\\t\\t'Iran'=>'ir',\\n\\t\\t\\t\\t'Iraq'=>'iq',\\n\\t\\t\\t\\t'Ireland'=>'ie',\\n\\t\\t\\t\\t'Israel'=>'co.il',\\n\\t\\t\\t\\t'India'=>'co.in',\\n\\t\\t\\t\\t'Iceland'=>'is',\\n\\t\\t\\t\\t'Italy'=>'it',\\n\\t\\t\\t\\t'Ivory Coast'=>'ci',\\n\\t\\t\\t\\t'Jersey'=>'je',\\n\\t\\t\\t\\t'Jamaica'=>'com.jm',\\n\\t\\t\\t\\t'Jordan'=>'jo',\\n\\t\\t\\t\\t'Japan'=>'co.jp',\\n\\t\\t\\t\\t'Kenya'=>'co.ke',\\n\\t\\t\\t\\t'Kiribati'=>'ki',\\n\\t\\t\\t\\t'Kyrgyzstan'=>'kg',\\n\\t\\t\\t\\t'Kuwait'=>'com.kw',\\n\\t\\t\\t\\t'Kazakhstan'=>'kz',\\n\\t\\t\\t\\t'Laos'=>'la',\\n\\t\\t\\t\\t'Lebanon'=>'com.lb',\\n\\t\\t\\t\\t'Liechtenstein'=>'li',\\n\\t\\t\\t\\t'Lesotho'=>'co.ls',\\n\\t\\t\\t\\t'Lithuania'=>'lt',\\n\\t\\t\\t\\t'Luxembourg'=>'u',\\n\\t\\t\\t\\t'Latvia'=>'lv',\\n\\t\\t\\t\\t'Libya'=>'ly',\\n\\t\\t\\t\\t'Morocco'=>'co.ma',\\n\\t\\t\\t\\t'Moldova'=>'md',\\n\\t\\t\\t\\t'Montenegro'=>'me',\\n\\t\\t\\t\\t'Madagascar'=>'mg',\\n\\t\\t\\t\\t'Macedonia'=>'mk',\\n\\t\\t\\t\\t'Mali'=>'ml',\\n\\t\\t\\t\\t'Mongolia'=>'mn',\\n\\t\\t\\t\\t'Montserrat'=>'ms',\\n\\t\\t\\t\\t'Malta'=>'com.mt',\\n\\t\\t\\t\\t'Mauritius'=>'mu',\\n\\t\\t\\t\\t'Maldives'=>'mv',\\n\\t\\t\\t\\t'Malawi'=>'mw',\\n\\t\\t\\t\\t'Mexico'=>'com.mx',\\n\\t\\t\\t\\t'Malaysia'=>'com.my',\\n\\t\\t\\t\\t'Mozambique'=>'co.mz',\\n\\t\\t\\t\\t'Namibia'=>'com.na',\\n\\t\\t\\t\\t'Niger'=>'ne',\\n\\t\\t\\t\\t'Norfolk Island'=>'com.nf',\\n\\t\\t\\t\\t'Nigeria'=>'com.ng',\\n\\t\\t\\t\\t'Nicaragua'=>'com.ni',\\n\\t\\t\\t\\t'Netherlands'=>'nl',\\n\\t\\t\\t\\t'Norway'=>'no',\\n\\t\\t\\t\\t'Nepal'=>'com.np',\\n\\t\\t\\t\\t'Nauru'=>'nr',\\n\\t\\t\\t\\t'Niue'=>'nu',\\n\\t\\t\\t\\t'New Zealand'=>'co.nz',\\n\\t\\t\\t\\t'Oman'=>'com.om',\\n\\t\\t\\t\\t'Panama'=>'com.pa',\\n\\t\\t\\t\\t'Peru'=>'com.pe',\\n\\t\\t\\t\\t'Philippines'=>'com.ph',\\n\\t\\t\\t\\t'Pakistan'=>'com.pk',\\n\\t\\t\\t\\t'Poland'=>'pl',\\n\\t\\t\\t\\t'Papua New Guinea'=>'com.pg',\\n\\t\\t\\t\\t'Pitcairn Islands'=>'pn',\\n\\t\\t\\t\\t'Puerto Rico'=>'com.pr',\\n\\t\\t\\t\\t'Palestine'=>'ps',\\n\\t\\t\\t\\t'Portugal'=>'pt',\\n\\t\\t\\t\\t'Paraguay'=>'com.py',\\n\\t\\t\\t\\t'Qatar'=>'com.qa',\\n\\t\\t\\t\\t'Romania'=>'ro',\\n\\t\\t\\t\\t'Republic of the Congo'=>'cg',\\n\\t\\t\\t\\t'Russia'=>'ru',\\n\\t\\t\\t\\t'Rwanda'=>'rw',\\n\\t\\t\\t\\t'Saint Vincent and the Grenadines'=>'com.vc',\\n\\t\\t\\t\\t'Sao Tome and Principe'=>'st',\\n\\t\\t\\t\\t'Saudi Arabia'=>'com.sa',\\n\\t\\t\\t\\t'Serbia'=>'rs',\\n\\t\\t\\t\\t'Solomon Islands'=>'com.sb',\\n\\t\\t\\t\\t'Seychelles'=>'sc',\\n\\t\\t\\t\\t'Singapore'=>'com.sg',\\n\\t\\t\\t\\t'Saint Helena'=>'sh',\\n\\t\\t\\t\\t'Saint Lucia'=>'com.lc',\\n\\t\\t\\t\\t'Samoa'=>'ws',\\n\\t\\t\\t\\t'Slovenia'=>'si',\\n\\t\\t\\t\\t'Slovakia'=>'sk',\\n\\t\\t\\t\\t'Sierra Leone'=>'com.sl',\\n\\t\\t\\t\\t'Senegal'=>'sn',\\n\\t\\t\\t\\t'San Marino'=>'sm',\\n\\t\\t\\t\\t'Somalia'=>'so',\\n\\t\\t\\t\\t'South Africa'=>'co.za',\\n\\t\\t\\t\\t'South Korea'=>'co.kr',\\n\\t\\t\\t\\t'Spain'=>'es',\\n\\t\\t\\t\\t'Sri Lanka'=>'lk',\\n\\t\\t\\t\\t'Sweden'=>'se',\\n\\t\\t\\t\\t'Switzerland'=>'ch',\\n\\t\\t\\t\\t'Togo'=>'tg',\\n\\t\\t\\t\\t'Thailand'=>'co.th',\\n\\t\\t\\t\\t'Tajikistan'=>'com.tj',\\n\\t\\t\\t\\t'Tokelau'=>'tk',\\n\\t\\t\\t\\t'Timor-Leste'=>'tl',\\n\\t\\t\\t\\t'Turkmenistan'=>'tm',\\n\\t\\t\\t\\t'Tonga'=>'to',\\n\\t\\t\\t\\t'Tunisia'=>'tn',\\n\\t\\t\\t\\t'Tunisia com.tn',\\n\\t\\t\\t\\t'Turkey'=>'com.tr',\\n\\t\\t\\t\\t'Trinidad and Tobago'=>'tt',\\n\\t\\t\\t\\t'Taiwan'=>'com.tw',\\n\\t\\t\\t\\t'Tanzania'=>'co.tz',\\n\\t\\t\\t\\t'Ukraine'=>'com.ua',\\n\\t\\t\\t\\t'Uganda'=>'co.ug',\\n\\t\\t\\t\\t'United Kingdom'=>'co.uk',\\n\\t\\t\\t\\t'United Arab Emirates'=>'ae',\\n\\t\\t\\t\\t'United States'=>'com',\\n\\t\\t\\t\\t'Uruguay'=>'com.uy',\\n\\t\\t\\t\\t'Uzbekistan'=>'co.uz',\\n\\t\\t\\t\\t'Venezuela'=>'co.ve',\\n\\t\\t\\t\\t'United States Virgin Islands'=>'co.vi',\\n\\t\\t\\t\\t'Vietnam'=>'com.vn',\\n\\t\\t\\t\\t'Vanuatu'=>'vu',\\n\\t\\t\\t\\t'Zambia'=>'co.zm',\\n\\t\\t\\t\\t'Zimbabwe'=>'co.zw' \\n\\t\\t);\\n\\t\\t$countriesOptions = array ();\\n\\t\\t$countriesOptions [] = JHtml::_ ( 'select.option', null, JText::_('COM_JMAP_INDEXING_SELECT_DEFAULT') );\\n\\t\\tforeach ($countriedTopLevelDomains as $text=>$value) {\\n\\t\\t\\t$countriesOptions [] = JHtml::_ ( 'select.option', $value, $text );\\n\\t\\t}\\n\\t\\t$lists ['countriestld'] = JHtml::_ ( 'select.genericlist', $countriesOptions, 'countriestld', 'class=\\\"inputbox input-medium serpcontrol\\\"', 'value', 'text', $this->getState ( 'countriestld' ) );\\n\\t\\t\\n\\t\\treturn $lists;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff28e3c81a842a19ae0126c27228e36b\",\n \"score\": \"0.57610923\",\n \"text\": \"private function filtro4()\\n {\\n\\n $sucursal = request()->has(\\\"SUCURSAL\\\") ? request()->input(\\\"SUCURSAL\\\") : session(\\\"SUCURSAL\\\");\\n\\n $mes = request()->has(\\\"MES\\\") ? request()->input(\\\"MES\\\") : date(\\\"m\\\");\\n $anio = request()->has(\\\"ANIO\\\") ? request()->input(\\\"ANIO\\\") : date(\\\"Y\\\");\\n\\n $medio_pago = Ventas::where(\\\"SUCURSAL\\\", $sucursal)->select(DB::raw(\\\"sum(TOTAL) AS TOTAL_RECAUDADO\\\"), DB::raw(\\\"concat(MONTH(FECHA) , concat('/',year(FECHA)) ) AS MES\\\"))\\n ->groupByRaw(\\\"MONTH(FECHA)\\\")\\n ->groupByRaw(\\\"YEAR(FECHA)\\\")\\n ->orderByRaw(\\\" MONTH(FECHA) DESC \\\")\\n ->orderByRaw(\\\"YEAR(FECHA) DESC\\\")\\n ->limit(6);\\n\\n $sucursalModel = Sucursal::find($sucursal);\\n $descripcionSucursal = \\\"\\\";\\n if (!is_null($sucursalModel))\\n $descripcionSucursal = $sucursalModel->MATRIZ == \\\"S\\\" ? \\\"CASA CENTRAL\\\" : \\\"SUC. $sucursalModel->DESCRIPCION\\\";\\n\\n $titulo = \\\"RECAUDACIÓN Gs. - $descripcionSucursal\\\";\\n return ['titulo' => $titulo, \\\"data\\\" => $medio_pago];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f67889702f0d42abd48e05e63eb3ece\",\n \"score\": \"0.5747793\",\n \"text\": \"public function index(Request $request)\\n {\\n $keyword = $request->get('search');\\n $operator = $request->get('operator');\\n $total = $request->get('total');\\n $price = $request->get('price');\\n $sort = $request->get('sort','number');\\n $numbers = $request->get('numbers');\\n $birthday = $request->get('birthday');\\n $whitelist = $request->get('whitelist');\\n $blacklist = $request->get('blacklist');\\n $tags = [];\\n $perPage = 99;\\n \\n \\n $filter_number_string = \\\"__________\\\";\\n if( is_array($numbers) ){\\n for($i=0; $igetTag($whitelist_sum);\\n }\\n \\n \\n $tags[] = strtoupper($operator);\\n\\n $price = empty($price) ? 1000000 : $price;\\n // print_r($whitelist);\\n // echo \\\"
    \\\";\\n // print_r($blacklist) ;\\n // exit();\\n //FILTER\\n $query = Number::where('operator', 'LIKE', \\\"%$operator%\\\")\\n ->where('price', '<', $price)\\n ->where('total', 'LIKE', \\\"%$total%\\\")\\n ->where('number', 'LIKE', $filter_number_string)\\n ->where('number', 'LIKE', \\\"%$keyword%\\\");\\n //WHITELIST\\n $query = $query->where(function ($query) use ($whitelist) {\\n for($i=0; $iwhere('number', 'LIKE', \\\"%{$whitelist[$i]}%\\\");\\n }else{\\n $query = $query->orWhere('number', 'LIKE', \\\"%{$whitelist[$i]}%\\\");\\n }\\n }\\n });\\n //BLACKLIST\\n $query = $query->where(function ($query) use ($blacklist) {\\n for($i=0; $iwhere('number', 'NOT LIKE', \\\"%{$blacklist[$i]}%\\\");\\n }else{\\n $query = $query->where('number', 'NOT LIKE', \\\"%{$blacklist[$i]}%\\\");\\n }\\n }\\n });\\n //BIRTHDAY\\n if(!empty($birthday)){\\n $birthday_indexes = [\\n \\\"sun\\\" => [3,6],\\n \\\"mon\\\" => [1,5],\\n \\\"tue\\\" => [1,2],\\n \\\"wed\\\" => [3,8],\\n \\\"thu\\\" => [2,7],\\n \\\"fri\\\" => [7,8],\\n \\\"saa\\\" => [4,6],\\n ];\\n $blacklist_birthday = $birthday_indexes[$birthday];\\n \\n $blacklist_square = array_map(function ($n) { return($n*$n);},$blacklist_birthday) ; \\n $blacklist_sum = array_sum($blacklist_square);\\n $tags[] = $this->getTag($blacklist_sum);\\n \\n $query = $query->where(function ($query) use ($blacklist_birthday) {\\n for($i=0; $iwhere('number', 'NOT LIKE', \\\"%{$blacklist_birthday[$i]}%\\\");\\n }else{\\n $query = $query->where('number', 'NOT LIKE', \\\"%{$blacklist_birthday[$i]}%\\\");\\n }\\n }\\n });\\n }\\n \\n //SORT\\n switch($sort){\\n case \\\"asc\\\" :\\n case \\\"desc\\\" : \\n $number = $query->orderBy('price', $sort)->latest()->paginate($perPage);\\n break; \\n default : \\n $number = $query->orderBy('number', 'asc')->latest()->paginate($perPage);\\n }\\n \\n } else {\\n $number = Number::orderBy('number', 'asc')->latest()->paginate($perPage);\\n }\\n\\n \\n $total_array = Number::selectRaw('total,count(total) as count')\\n ->orderBy('total', 'asc')\\n ->groupBy('total')\\n ->get();\\n\\n $operator_array = Number::selectRaw('operator,count(operator) as count')\\n ->orderBy('operator', 'asc')\\n ->groupBy('operator')\\n ->get();\\n\\n\\n return view('number.index', compact('number','total_array','operator_array','tags'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b891a1a8f086f5c40f00bfe6efc0dea\",\n \"score\": \"0.5721374\",\n \"text\": \"function beforeFilter() {\\n parent::beforeFilter();\\n $this->Auth->allow('*');\\n $this->paginate = array('limit'=>Configure::read('Site.ItemsPerPage'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5a6389ad4596e445fa3366a91579055\",\n \"score\": \"0.5712146\",\n \"text\": \"private function obtenerConsultaPaginada(){\\n \\t$offset=($this->paginaActual<=1)?0:(($this->paginaActual-1)*$this->filasPorPagina);\\n $this->query=$this->bd->addLimit($this->filasPorPagina, $offset,$this->queryReal);\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75099842f62a879dcfbea75cb5efaaa3\",\n \"score\": \"0.5710433\",\n \"text\": \"public function computeFilter(){\\r\\n\\t\\t\\t$this->oSystem->getLogger()->debug( \\\"Aplicando filtro \\\" . get_class($this) );\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif ( $_REQUEST['_estado'] )\\r\\n\\t\\t\\t\\t$this->filtroSQL .= \\\" cli.estado='$_REQUEST[_estado]'\\\";\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t\\t$this->filtroSQL .= \\\" cli.estado NOT IN ('XXX')\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif ( $_REQUEST['_id_cliente'] )\\r\\n\\t\\t\\t\\t$this->filtroSQL .= \\\" AND cli.id=\\\\\\\"$_REQUEST[_id_cliente]\\\\\\\"\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif ( !$_REQUEST['_id_cliente'] && $_REQUEST['_cliente'] )\\r\\n\\t\\t\\t\\t$this->filtroSQL .= \\\" AND (cli.nombre LIKE '%$_REQUEST[_cliente]%' OR cli.razon LIKE '%$_REQUEST[_cliente]%')\\\";\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\tif ( $_REQUEST['_email'] )\\r\\n\\t\\t\\t\\t$this->filtroSQL .= \\\" AND cli.email LIKE '%$_REQUEST[_email]%'\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif ( $_REQUEST['_telefono'] )\\r\\n\\t\\t\\t\\t$this->filtroSQL .= \\\" AND telefono LIKE '%$_REQUEST[_telefono]%'\\\";\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\tif ( $_REQUEST['_desde'] ){\\r\\n\\t\\t\\t\\t$desde = substr($_REQUEST['_desde'], 6).'-'.substr($_REQUEST['_desde'], 3,2).'-'.substr($_REQUEST['_desde'], 0,2);\\r\\n\\t\\t\\t\\t$this->filtroSQL .= \\\" AND falta >= '$desde'\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\tif ( $_REQUEST['_hasta'] ){\\r\\n\\t\\t\\t\\t$desde = substr($_REQUEST['_hasta'], 6).'-'.substr($_REQUEST['_hasta'], 3,2).'-'.substr($_REQUEST['_hasta'], 0,2);\\r\\n\\t\\t\\t\\t$this->filtroSQL .= \\\" AND falta <= '$desde'\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t$this->filtroSQL .= ' ORDER BY cli.nombre';\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f797547488130473e5d398fd01a49ce\",\n \"score\": \"0.56824774\",\n \"text\": \"function getAll($approved = true){\\n\\t\\t\\n\\t\\t$conds = \\\"WHERE 1\\\";\\n\\t\\t\\n\\t\\tforeach($this->filters as $filter){\\n\\t\\t\\tif($this->f3->exists(\\\"GET.$filter\\\")){\\n\\t\\t\\t\\t$conds .= \\\" AND LOWER($filter) like '%\\\".strtolower($this->f3->get(\\\"GET.$filter\\\")).\\\"%'\\\";\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn parent::paginate($page, 10 , \\\"created\\\", \\\"DESC\\\",$conds);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7a4b32834c114261d61f01eef15d075\",\n \"score\": \"0.5679019\",\n \"text\": \"public function test122DisplayPromotionsListByFilteringTotalRecordsPerPage()\\n {\\n $this->markTestIncomplete('Mark skip test to find solution');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b71e6a8306ead7f57c2092d4652e146\",\n \"score\": \"0.5678996\",\n \"text\": \"protected function preparePaginateData()\\n {\\n return [\\n 'criteria' => is_null(request()->input('filter')) || request()->isMethod('GET') ? [] : request()->input('filter'),\\n 'order_by' => is_null(request()->input('sort')) || request()->isMethod('GET') ? null : request()->input('sort'),\\n 'per_page' => is_null(request()->input('limit')) ? 15 : request()->input('limit'),\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aab8260802099a292ce62663d85b394b\",\n \"score\": \"0.5666408\",\n \"text\": \"public function hotSearchList(Request $request){\\n $validator = Validator::make($request->all(),[\\n 'token'=>'required'\\n ]);\\n\\n if($validator->fails()){\\n showMsg(2,$validator->errors());\\n }\\n\\n $resourceModel = new Resource();\\n\\n $map = [\\n ['search_num','>',0]\\n ];\\n\\n $limit = isset($request->limit)?$request->limit:6;\\n\\n $list = $resourceModel->where($map)->orderBy('search_num','desc')->paginate($limit,['label as name'])->toArray();\\n\\n showMsg(1,$list);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1153896b7186babc13fb47130626925d\",\n \"score\": \"0.56652296\",\n \"text\": \"public function my_filters(){\\n $max=$this->input->post('max');\\n $min=$this->input->post('min');\\n $cat=$this->input->post('cat');\\n $per_page=$this->input->post('per_page');\\n $sub_cat=$this->input->post('sub_cat');\\n $brand= $this->input->post('brand');\\n $order_by=$this->input->post('order_by');\\n $srt=$this->input->post('srt');\\n $search=$this->input->post('search');\\n $num_rows=$this->Comman_model->get_num_rows($max,$min,$cat,$sub_cat,$brand,$search);\\n $total_rows= $num_rows;\\n $this->load->library('pagination');\\n $config['base_url'] = '#';\\n $config['total_rows'] =$total_rows;\\n $config['per_page'] =$per_page;\\n $config['uri_segment']=3;\\n $config['use_page_numbers']=TRUE;\\n \\n $config['full_tag_open']='\\\";\\n $config['last_tag_open']='
  • ';\\n $config['last_tag_close']=\\\"
  • \\\";\\n $config['first_tag_open']='
  • ';\\n $config['first_tag_close']=\\\"
  • \\\";\\n $config['prev_tag_open']='
  • ';\\n $config['prev_tag_close']=\\\"
  • \\\";\\n $config['last_tag_open']='
  • ';\\n $config['last_tag_close']=\\\"
  • \\\";\\n $config['cur_tag_open']=\\\"
  • \\\";\\n $config['cur_tag_close']=\\\"
  • \\\";\\n $config['num_tag_open']='
  • ';\\n $config['num_tag_close']=\\\"
  • \\\";\\n $config['next_tag_open']='
  • ';\\n $config['next_tag_close']=\\\"
  • \\\";\\n \\n $this->pagination->initialize($config); \\n // getting products \\n $limit=$config['per_page'];\\n $offset=($this->uri->segment('3')-1)*$limit;\\n $products=$this->Comman_model->filter_data($max,$min,$cat,$sub_cat,$brand,$order_by,$srt,$limit,$offset,$search);\\n \\n // getting brands\\n $brands=$this->Comman_model->get_brand($cat,$sub_cat);\\n \\n // // pagination links\\n // 'pagination_links'=>$this->pagination->create_links(),\\n // json response\\n $output=array('pagination_links'=>$this->pagination->create_links(),'brands'=>$brands,'products'=>$products);\\n echo json_encode($output);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44652e36591220c6759b6ffa6b8ab39e\",\n \"score\": \"0.5663082\",\n \"text\": \"public static function get_paginacao($paginacao,$controller)\\n\\t\\t{\\n\\t\\t\\t\\n\\t\\t\\t$qtd_paginas = $paginacao['size'] / $paginacao['itens_por_pagina'];\\n\\n\\t\\t\\t$method = \\\"index\\\";\\n\\n\\t\\t\\tif(isset($paginacao['method']))\\n\\t\\t\\t\\t$method = $paginacao['method'];\\n\\n\\t\\t\\t$parameter = \\\"\\\";//caso haja algum parametro na tela de listagem\\n\\t\\t\\tif(isset($paginacao['parameter']))\\n\\t\\t\\t\\t$parameter = $paginacao['parameter'].\\\"/\\\";\\n\\n\\t\\t\\tif(ceil($qtd_paginas) > 1)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$filtros = \\\"\\\";\\n\\t\\t\\t\\t//VERIFICAR SE HÁ FILTROS\\n\\t\\t\\t\\tif(!empty($paginacao['filter']))\\n\\t\\t\\t\\t\\t$filtros = $paginacao['filter'];\\n\\t\\t\\t\\t/////\\n\\n\\t\\t\\t\\t$inicio = $paginacao['pg_atual'] - 2;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$offset = 0;\\n\\t\\t\\t\\tif($inicio < 1)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$offset = $inicio * (-1);\\n\\t\\t\\t\\t\\t$inicio = 1;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t$inicio = $inicio + 1;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\tif((ceil($qtd_paginas) - $paginacao['pg_atual']) + 1 < 5)\\n\\t\\t\\t\\t\\t$inicio = $paginacao['pg_atual'] - (5 - (ceil($qtd_paginas) - $paginacao['pg_atual'] + 1));\\n\\t\\t\\t\\t\\n\\t\\t\\t\\tif($inicio <= 1)\\n\\t\\t\\t\\t\\t$inicio = 1;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t$fim = $paginacao['pg_atual'] + $offset + 3;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\tif($fim > ceil($qtd_paginas))\\n\\t\\t\\t\\t\\t$fim = ceil($qtd_paginas);\\n\\t\\t\\t\\techo\\\"
    \\\";\\n\\t\\t\\t\\t\\techo\\\"\\\";\\n\\t\\t\\t\\techo \\\"
    \\\";\\n\\t\\t\\t}\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"516db908271614c0def00fea5818e1b1\",\n \"score\": \"0.56598973\",\n \"text\": \"function paginador($pagina, $orden = NULL, $nombreOrden = NULL, $consultaGlobal = NULL, $cantidadRegistros = NULL) {\\n global $configuracion;\\n\\n $item = '';\\n $respuesta = array();\\n $objeto = new Proveedor();\\n\\n $registros = $configuracion['GENERAL']['registrosPorPagina'];\\n\\n if (!empty($cantidadRegistros)) {\\n $registros = (int) $cantidadRegistros;\\n }\\n\\n if (isset($pagina)) {\\n $pagina = $pagina;\\n } else {\\n $pagina = 1;\\n }\\n\\n if (isset($consultaGlobal) && $consultaGlobal != '') {\\n\\n $data = explode('[', $consultaGlobal);\\n $datos = $data[0];\\n $palabras = explode(' ', $datos);\\n\\n if ($data[1] != '') {\\n $condicionales = explode('|', $data[1]);\\n\\n $condicion = '(';\\n $tam = sizeof($condicionales) - 1;\\n for ($i = 0; $i < $tam; $i++) {\\n $condicion .= $condicionales[$i] . ' REGEXP \\\"(' . implode(\\\"|\\\", $palabras) . ')\\\" ';\\n if ($i != $tam - 1) {\\n $condicion .= ' OR ';\\n }\\n }\\n $condicion .= ')';\\n\\n $consultaGlobal = $condicion;\\n } else {\\n $consultaGlobal = '(p.nombre REGEXP \\\"(' . implode(\\\"|\\\", $palabras) . ')\\\")';\\n }\\n } else {\\n $consultaGlobal = '';\\n }\\n\\n if (empty($nombreOrden)) {\\n $nombreOrden = $objeto->ordenInicial;\\n }\\n\\n\\n if (isset($orden) && $orden == 'ascendente') {//ordenamiento\\n $objeto->listaAscendente = true;\\n } else {\\n $objeto->listaAscendente = false;\\n }\\n\\n if (isset($nombreOrden) && $nombreOrden == 'estado') {//ordenamiento\\n $nombreOrden = 'activo';\\n }\\n\\n $registroInicial = ($pagina - 1) * $registros;\\n\\n\\n $arregloItems = $objeto->listar($registroInicial, $registros, array('0'), $consultaGlobal, $nombreOrden);\\n\\n if ($objeto->registrosConsulta) {//si la consulta trajo registros\\n $datosPaginacion = array($objeto->registrosConsulta, $registroInicial, $registros, $pagina);\\n $item .= $objeto->generarTabla($arregloItems, $datosPaginacion);\\n }\\n\\n $respuesta['error'] = false;\\n $respuesta['accion'] = 'insertar';\\n $respuesta['contenido'] = $item;\\n $respuesta['idContenedor'] = '#tablaRegistros';\\n $respuesta['idDestino'] = '#contenedorTablaRegistros';\\n $respuesta['paginarTabla'] = true;\\n\\n Servidor::enviarJSON($respuesta);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57a7eb43480e15edae6c7c13facf9459\",\n \"score\": \"0.56531996\",\n \"text\": \"public function indexAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $paginator = $this->get('knp_paginator');\\n\\n $kryteria = null;\\n\\n if($this->get('request')->query->get('filterField') && $this->get('request')->query->get('filterValue'))\\n {\\n $pole = $this->get('request')->query->get('filterField');\\n $wartosc = $this->get('request')->query->get('filterValue');\\n $kryteria = array('filterField'=>$pole,'filterValue'=>$wartosc);\\n }\\n\\n $query = $em->getRepository('DFPEtapIBundle:Klient')->getListaKlientowQuery($kryteria);\\n\\n $pagination = $paginator->paginate($query,$this->get('request')->query->get('strona',1),21,array('wrap-queries'=>true));\\n $pagination->setFiltrationTemplate('::filtration.html.twig');\\n\\n return array(\\n 'lista_klientow' => $pagination,\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21c190357b0dc427ab26b6b77083e8f0\",\n \"score\": \"0.5650529\",\n \"text\": \"public function allPaged();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b37435c5c83628aca4945b0ab65e2f2d\",\n \"score\": \"0.5647757\",\n \"text\": \"private function filters() {\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8faa442f4fc0a86eeb174ce296d398a5\",\n \"score\": \"0.5631252\",\n \"text\": \"function wp37_limit_posts_to_author($query) {\\n\\n\\t// pega as informacoes do usuario logado\\n\\t$user = wp_get_current_user();\\n\\n\\t// \\tfiltra as paginas pelo grupo pertencente\\n\\tif( $_GET['filter'] == 'grupo' && $user->roles[0] == 'contributor') {\\n\\t\\t\\n\\t\\t$variable = get_user_meta($user->ID, 'grupo', true);\\n\\t\\t$variable = array_flatten($variable);\\n $variable = array_unique($variable);\\n\\t\\t\\n\\t\\t$pages = array();\\n\\n\\t\\tif($variable && $variable != ''){\\n foreach($variable as $grupo){\\n\\t\\t\\t\\t$pages[] = get_post_meta($grupo, 'selecionar_paginas', true);\\n\\t\\t\\t\\t$pages[] = get_post_meta($grupo, 'contatos_sme', true);\\n\\t\\t\\t}\\n }\\n\\n\\t\\t$pages = array_flatten($pages);\\n $pages = array_unique($pages);\\n\\t\\t\\n\\t\\t//print_r($variable);\\n\\t\\t$query->set('post__in', $pages);\\n\\t} \\n\\n\\t// \\tfiltra as paginas por grupos\\n\\tif( $_GET['grupo_id'] != '') {\\n\\t\\t\\n\\t\\t$grupo = $_GET['grupo_id'];\\n\\n\\t\\tif($grupo && $grupo != ''){ \\n\\t\\t\\tif($_GET['post_type'] == 'contato'){\\n\\t\\t\\t\\t$pages = get_post_meta($grupo, 'contatos_sme', true);\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$pages = get_post_meta($grupo, 'selecionar_paginas', true);\\n\\t\\t\\t}\\n\\t\\t\\t\\n }\\t\\n\\n\\t\\t$pages = array_flatten($pages);\\n $pages = array_unique($pages);\\n\\t\\t\\n\\t\\t//print_r($variable);\\n\\t\\t$query->set('post__in', $pages);\\n\\t}\\t\\n\\t\\n\\treturn $query;\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18d55259506eed189dd49d14e05a8d4f\",\n \"score\": \"0.56279755\",\n \"text\": \"function mostraPagina()\\n\\t\\t{\\n\\t\\t$this->aggiungiElemento(\\\"Configurazione interfaccia\\\", \\\"titolo\\\");\\n\\t\\t$this->aggiungiElemento($this->modulo);\\n\\t\\t$this->mostra();\\n\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b344335941ed3069472e0ebc8ee27534\",\n \"score\": \"0.56269014\",\n \"text\": \"public function listarvehiculos($pagina){\\n\\t\\t $this->load('model/VehiculoModel.php');\\n\\t\\t \\n\\t\\t //si me piden APLICAR un filtro\\n\\t\\t if(!empty($_POST['filtrar'])){\\n\\t\\t //recupera el filtro a aplicar\\n\\t\\t $f = new stdClass(); //filtro\\n\\t\\t $f->texto = htmlspecialchars($_POST['texto']);\\n\\t\\t $f->campo = htmlspecialchars($_POST['campo']);\\n\\t\\t $f->campoOrden = htmlspecialchars($_POST['campoOrden']);\\n\\t\\t $f->sentidoOrden = htmlspecialchars($_POST['sentidoOrden']);\\n\\t\\t \\n\\t\\t //guarda el filtro en un var de sesión\\n\\t\\t $_SESSION['filtrovehiculos'] = serialize($f);\\n\\t\\t }\\n\\t\\t \\n\\t\\t //si me piden QUITAR un filtro\\n\\t\\t if(!empty($_POST['quitarFiltro']))\\n\\t\\t unset($_SESSION['filtrovehiculos']);\\n\\t\\t \\n\\t\\t \\n\\t //comprobar si hay filtro\\n\\t $filtro = empty($_SESSION['filtrovehiculos'])? false : unserialize($_SESSION['filtrovehiculos']);\\n\\t\\t \\n\\t\\t //para la paginación\\n\\t\\t $num = 5; //numero de resultados por página\\n\\t\\t $pagina = abs(intval($pagina)); //para evitar cosas raras por url\\n\\t\\t $pagina = empty($pagina)? 1 : $pagina; //página a mostrar\\n\\t\\t $offset = $num*($pagina-1); //offset\\n\\t\\t \\n\\t\\t //si no hay que filtrar los resultados...\\n\\t\\t if(!$filtro){\\n\\t\\t //recupera todas las vehiculos\\n\\t\\t $vehiculos = VehiculoModel::getVehiculos($num, $offset);\\n\\t\\t //total de registros (para paginación)\\n\\t\\t $totalRegistros = VehiculoModel::getTotal();\\n\\t\\t }else{\\n\\t\\t //recupera las vehiculos con el filtro aplicado\\n\\t\\t $vehiculos = VehiculoModel::getVehiculos($num, $offset, $filtro->texto, $filtro->campo, $filtro->campoOrden, $filtro->sentidoOrden);\\n\\t\\t //total de registros (para paginación)\\n\\t\\t $totalRegistros = VehiculoModel::getTotal($filtro->texto, $filtro->campo);\\n\\t\\t }\\n\\t\\t \\n\\t\\t //cargar la vista del listado\\n\\t\\t $datos = array();\\n\\t\\t $datos['usuario'] = Login::getUsuario();\\n\\t\\t $datos['vehiculos'] = $vehiculos;\\n\\t\\t $datos['filtro'] = $filtro;\\n\\t\\t $datos['paginaActual'] = $pagina;\\n\\t\\t $datos['paginas'] = ceil($totalRegistros/$num); //total de páginas (para paginación)\\n\\t\\t $datos['totalRegistros'] = $totalRegistros;\\n\\t\\t $datos['regPorPagina'] = $num;\\n\\n\\n\\t\\t if(Login::getUsuario()->admin) //Admin\\n \\t\\t $this->load_view('view/vehiculos/listarvehiculosA.php', $datos);\\n \\t\\tif(Login::getUsuario()->privilegio==1) // Comprador\\n \\t\\t $this->load_view('view/vehiculos/listarvehiculosC.php', $datos);\\n \\t\\tif(Login::getUsuario()->privilegio==2) // Vendedor\\n \\t\\t $this->load_view('view/vehiculos/listarvehiculosV.php', $datos);\\n \\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d981e47f0655bf615c74407ee2aabb6\",\n \"score\": \"0.56261885\",\n \"text\": \"function beforeFilter() {\\n\\n $this->checkSession();\\n\\n // Segundo filtro: CheckPermiso. Si pasa continua. Sino se va al home.\\n\\n $this->checkPermiso();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30cbff5ae741ab4238c3dc36e6a5e1fa\",\n \"score\": \"0.560532\",\n \"text\": \"public function filter($request){\\n $data = RetailUser::with('spatieRole');\\n if($request->search != \\\"\\\"){\\n $data->where('name','like','%'.$request->search.'%');\\n }\\n\\n if($request->role_id != \\\"\\\"){\\n $data->where(['spatie_role_id'=>$request->role_id]);\\n }\\n return $data->paginate(100);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3d88eaa4f41bd3e65c51e5abbeca134\",\n \"score\": \"0.56044585\",\n \"text\": \"public static function filtrar($app, $produto=\\\"\\\", $finalidade=\\\"\\\", $pag=\\\"1\\\") {\\n $param = (!empty($_GET) ? $_GET : null);\\n #print_r($param);\\n //validação obrigtória de pagina e data\\n\\n $jObject = self::filtro($app, $produto, $finalidade, $param, $pag);\\n\\n $jObject->produto = (!empty($produto) ? $produto : \\\"imovel\\\"); \\n $jObject->produtotag = (!empty($finalidade) ? $finalidade : \\\"prontos\\\"); \\n \\n //itens por pagina //\\n $itensPorPag = (!empty($param['take']) ? $param['take'] : 12);\\n //itens por pagina //\\n\\n Util::paginationParams($jObject, $itensPorPag);\\n\\n //Util::dbg($imoveis);\\n \\n $assets = array(); \\n\\n //carrega os blocos para essa página \\n $page = array(); \\n $page = array(\\n 'template' => null, \\n 'content' => $jObject\\n );\\n\\n\\n $scripts = array(); \\n //$scripts = array( 'assets/jvs/imoveis-init.js'); \\n\\n\\n $data = array(\\n 'page' => $page, \\n 'scripts' => $scripts\\n ); \\n\\n return $app['twig']->render('base-filtro.twig.php', $data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92146dff1226b1b6e3a79b3f0c0d56ea\",\n \"score\": \"0.56013256\",\n \"text\": \"public function paginetion() {\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a13ab1b53a2bc50d479c7f38d2fac199\",\n \"score\": \"0.5591906\",\n \"text\": \"protected function filters()\\n {\\n if ($this->getRequest()->isPost()== true or 1==1) {\\n \\tSession::getInstance()->set($this->namepageactual,1);\\n $parramsfilter = array();\\n\\t\\t\\t\\t\\t$parramsfilter['log_usuario'] = $this->_getSanitizedParam(\\\"log_usuario\\\");\\n\\t\\t\\t\\t\\t$parramsfilter['log_tipo'] = $this->_getSanitizedParam(\\\"log_tipo\\\");\\n\\t\\t\\t\\t\\t$parramsfilter['log_fecha'] = $this->_getSanitizedParam(\\\"log_fecha\\\");\\n\\t\\t\\t\\t\\t$parramsfilter['log_log'] = $this->_getSanitizedParam(\\\"log_log\\\");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 }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3750f5b2c4562a44013cf7db05864c4\",\n \"score\": \"0.5587235\",\n \"text\": \"public function addFilter()\\n\\t{\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e51e3699c2110a9ba5947031a17c0af\",\n \"score\": \"0.5581067\",\n \"text\": \"public function filter()\\n {\\n $limit = request()->input('limit', 15);\\n $model = $this->paginate($limit);\\n\\n return $model;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff5edaf0791617740ad3548c3172ae17\",\n \"score\": \"0.55647975\",\n \"text\": \"public function index(Request $request)\\n {\\n $mises_bas = mises_bas::where([\\n ['date', '!=', NULL],\\n [function ($query) use ($request){\\n if (($term = $request->term)){\\n $query->orWhere('date','LIKE', '%' . $term . '%')\\n -> orWhere('nombreAgneauVivant','LIKE', '%' . $term . '%')\\n ->orWhere('nombreAgneauMort','LIKE', '%' . $term . '%')\\n ->orWhere('ProblemeMisesBas','LIKE', '%' . $term . '%')\\n ->orWhere('periodeMisesBas','LIKE', '%' . $term . '%')\\n ->orWhere('methode','LIKE', '%' . $term . '%')\\n ->orWhere('commentaire','LIKE', '%' . $term . '%')\\n ->orWhere('ovins_RFID','LIKE', '%' . $term . '%')\\n ->orWhere('echographies_id','LIKE', '%' . $term . '%')\\n ->orWhere('id','LIKE', '%' . $term . '%')->get();\\n }\\n }]\\n ])\\n ->orderBy('id', \\\"desc\\\")\\n ->paginate(15);\\n return view('mises_bas.index' , compact('mises_bas'))\\n ->with('i', (request()->input('page', 1) -1) *5);\\n\\n /* $mises_bas = mises_bas::paginate(2);\\n return view('mises_bas.index', compact('mises_bas'));*/\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2eba38f3e9fb00c455a368aa42c5e357\",\n \"score\": \"0.55603737\",\n \"text\": \"function VisualizzaMercatinoFiltro($cid, $ID){\\n\\n\\n\\n\\n\\n $pagina = 1;\\n \\tif (isset($_POST[\\\"pagina\\\"]))\\n \\t\\t$pagina = $_POST[\\\"pagina\\\"];\\n\\n \\t$nrows = 5;\\n \\t$offset = 5*($pagina-1);\\n\\n\\n $sql=\\\"SELECT Titolo,Bicicletta.Marca,Bicicletta.Colore,Bicicletta.Anno_Produzione,Anno_Acquisto,Tipo_Bicicletta,Annuncio.Prezzo,Descrizione,Stato,Venditore,ID_Annuncio\\n FROM Annuncio INNER JOIN Bicicletta ON (Bicicletta=ID_Bike) JOIN FiltroAnnuncio ON Utente='$ID' WHERE Stato='In vendita' AND Bicicletta.Marca=FiltroAnnuncio.Marca AND Bicicletta.Colore=FiltroAnnuncio.Colore AND Annuncio.Prezzo<=FiltroAnnuncio.Prezzo\\n LIMIT $nrows OFFSET $offset\\\";\\n\\n \\t $res=$cid->query($sql) Or die (\\\"

    Inpossibile eseguire query.

    \\\" . \\\"

    Codice errore \\\" . $cid->errno\\n \\t. \\\": \\\" . $cid->error) . \\\"

    \\\";\\n\\n \\tif ($res->num_rows==0)\\n \\t\\techo \\\"
    Non ci sono annunci corrispondenti al tuo filtro.

    \\\";\\n \\telse{\\n \\t\\techo \\\"\\\";\\n \\t\\techo \\\"\\\";\\n \\t}\\n \\twhile ($row = $res->fetch_row()){\\n \\techo \\\"\\\";\\n \\techo \\\"\\\";\\n \\techo \\\"\\\";\\n \\techo \\\"\\\";\\n \\techo \\\"\\\";\\n echo \\\"\\\";\\n echo \\\"\\\";\\n echo \\\"\\\";\\n echo \\\"\\\";\\n echo \\\"\\\";\\n echo \\\"\\\";\\n\\n\\n \\techo \\\"\\\";\\n \\t}\\n \\techo \\\"\\\";\\n \\t echo \\\"
    Titolo annuncioMarcaColoreAnno di ProduzioneAnno di acquistoTipo biciclettaPrezzoDescrizioneStato
    $row[0]$row[1]$row[2]$row[3]$row[4]$row[5]$row[6]$row[7]$row[8]Visualizza
    \\\";\\n\\n \\t$sql2=\\\"SELECT Titolo,Bicicletta.Marca,Bicicletta.Colore,Bicicletta.Anno_Produzione,Anno_Acquisto,Tipo_Bicicletta,Annuncio.Prezzo,Descrizione,Stato,Venditore,ID_Annuncio\\n FROM Annuncio INNER JOIN Bicicletta ON (Bicicletta=ID_Bike) JOIN FiltroAnnuncio ON Utente='$ID' WHERE Stato='In vendita' AND Bicicletta.Marca=FiltroAnnuncio.Marca AND Bicicletta.Colore=FiltroAnnuncio.Colore AND Annuncio.Prezzo<=FiltroAnnuncio.Prezzo\\\";\\n \\t $res2 = $cid->query($sql2)\\n \\t\\t or die(\\\"Impossibile eseguire query.
    Codice errore \\\". $cid->errno .\\\": \\\". $cid->error .\\\"
    \\\");\\n \\t $numrows = $res2->num_rows;\\n \\t $paginaMax = ceil($numrows/$nrows); //con ceil arrotondo per eccesso\\n\\n \\t echo \\\"
    \\\";\\n \\t if($pagina!=1) {\\n \\t\\t ?>\\n \\t\\t \\\">\\n \\n \\t';\\n \\t }\\n \\techo \\\"
    \\\";\\n \\techo '
    ';\\n \\t if($pagina!=$paginaMax && $paginaMax!=0) {\\n \\t\\t ?>\\n \\t\\t \\\">\\n \\n \\t';\\n \\t }\\n \\techo \\\"
    \\\";\\n\\n \\t echo \\\"
    \\\";\\n \\t echo '

    ';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a00606d89ec49cd1de8d40d2d678175\",\n \"score\": \"0.5548884\",\n \"text\": \"public function index(Request $request)\\n { \\n $this->data['filter'] = $request->query('filter');\\n if($this->data['filter']!=null){\\n $this->data['filter'] = $request->query('filter');\\n $this->data['pegawai']=Pegawai::where('pegawai.full_name', 'like', '%'.$this->data['filter'].'%')\\n ->orWhere('pegawai.nik', 'like', '%'.$this->data['filter'].'%')->orderBy('id', 'DESC')->paginate(2);\\n }\\n else{\\n $this->data['pegawai'] = Pegawai::orderBy('id', 'DESC')->paginate(1); \\n } \\n return view('admin.pegawai.index', $this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66cd2f3344fe97fd8375397ada746c23\",\n \"score\": \"0.553504\",\n \"text\": \"public function findMedecinParregionAction($ville,$page) {\\n $professionmedecin= $this->getDoctrine()->getRepository('PortailFrontBundle:Profession')->findOneBy(array('designation'=>'Médecin')); \\n $repository = $this->getDoctrine()->getRepository('PortailFrontBundle:User'); \\n $adapter = new ArrayAdapter($repository->findBy(array('enabled'=>1,'profession'=>$professionmedecin->getId(),'ville'=>$ville)));\\n $pager = new Pagerfanta($adapter);\\n\\n $pager->setMaxPerPage(3); \\n if( !$page ) {\\n\\n $page = 1; }\\n\\n try {\\n\\n $pager->setCurrentPage($page);\\n\\n } catch (NotValidCurrentPageException $e) {\\n\\n throw new NotFoundHttpException();\\n }\\n $specialite = $this->getDoctrine()->getRepository('PortailFrontBundle:Specialite')->findAll();\\n return $this->render('PortailAnnuaireBundle:AnnuaireMedecin:RechercheParcarte.html.twig',array('pager'=> $pager,'specialite'=> $specialite));\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1fface8a93601011d620a71300607a2a\",\n \"score\": \"0.553265\",\n \"text\": \"function nattours_remove_filters() {\\n remove_filter('piklist_admin_pages', array('piklist_setting', 'admin_pages'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6603a4dc9cd33aa7b520602df10cf955\",\n \"score\": \"0.55239\",\n \"text\": \"public function servicios( $filtro = '' ){\\n\\t // verificar permisos\\n \\tif( $this->checkPermissions( 'reporte', 'servicios' ) === FALSE ):\\n \\t\\t$this->iraBuscar('alert-danger','Acceso denegado: usted no ha sido autorizado a acceder a esta secci&oacute;n.');\\n \\tendif;\\n \\n $this->Paginator->settings = $this->servicios_paginate;\\n $this->set('servicios',$this->Paginator->paginate($this->ServicioTecnologico,array(\\n 'OR' => \\n array('ServicioTecnologico.nombre_servicio LIKE'=>\\\"%{$filtro}%\\\",'ServicioTecnologico.descripcion_servicio LIKE'=>\\\"%{$filtro}%\\\",'Empresa.nombre_empresa LIKE'=>\\\"{$filtro}%\\\")\\n )\\n ));\\n $this->set('filtro',$filtro);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"00eee76b8477ac1b30c54e07fa6b7490\",\n \"score\": \"0.5514365\",\n \"text\": \"public function addInLandingPageFilter()\\n {\\n return $this->getSelect()->where('main_table.in_landingpage = 1');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f30de585cefe29b85a00b2b32084f6e\",\n \"score\": \"0.5504066\",\n \"text\": \"function mostraPagina()\\n\\t\\t{\\n\\t\\t$this->aggiungiElemento(\\\"Scheda documento\\\", \\\"titolo\\\");\\n\\t\\t$this->aggiungiElemento($this->modulo);\\n\\t\\t$this->mostra();\\n\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5720b373bc3d0021ffa0a9e6f493e83\",\n \"score\": \"0.55031544\",\n \"text\": \"public function serverPaginationFilteringFor(Request $request): LengthAwarePaginator\\n {\\n $roles = $this->allWithBuilder();\\n\\n if ($request->get('search') !== null) {\\n $term = $request->get('search');\\n $roles->where('first_name', 'LIKE', \\\"%{$term}%\\\")\\n ->orWhere('last_name', 'LIKE', \\\"%{$term}%\\\")\\n ->orWhere('email', 'LIKE', \\\"%{$term}%\\\")\\n ->orWhere('id', $term);\\n }\\n\\n if ($request->get('order_by') !== null && $request->get('order') !== 'null') {\\n $order = $request->get('order') === 'ascending' ? 'asc' : 'desc';\\n\\n $roles->orderBy($request->get('order_by'), $order);\\n } else {\\n $roles->orderBy('created_at', 'desc');\\n }\\n\\n return $roles->paginate($request->get('per_page', 10));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10bcee80d7f409bd89a871e21845b644\",\n \"score\": \"0.5502223\",\n \"text\": \"public function getPaginator();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fffd22f18f0e225b9c7b14c84c0ba24a\",\n \"score\": \"0.54999185\",\n \"text\": \"public function getListFilter(ServerRequestInterface $request)\\n {\\n $params = $request->getQueryParams();\\n\\n $keywords = [\\n 'per_page',\\n 'page',\\n 'order',\\n ];\\n\\n $keywords = array_flip($keywords);\\n\\n $allowedFilterFields = $this->getAllowedFilterFields();\\n\\n $translations = $this->getApiNames(true);\\n\\n $filters = [];\\n\\n foreach($params as $key=>$value) {\\n if (isset($keywords[$key])) {\\n continue;\\n }\\n\\n if (isset($this->routeOptions['multiOranizationField'], $this->routeOptions['multiOranizationField']['field'])\\n && $key == $this->routeOptions['multiOranizationField']['field']) {\\n $field = $this->routeOptions['multiOranizationField']['field'];\\n $separator = $this->routeOptions['multiOranizationField']['separator'];\\n $organizationIds = $value;\\n if (!is_array($organizationIds)) {\\n $organizationIds = explode(',', $organizationIds);\\n }\\n\\n $organizationFilter = [];\\n foreach($organizationIds as $organizationId) {\\n $organizationFilter[] = $field . ' LIKE '. $this->db1->quote('%'.$separator . $organizationId . $separator . '%');\\n }\\n if (!empty($organizationFilter)) {\\n $filters[] = '(' . join(' OR ', $organizationFilter) . ')';\\n }\\n\\n continue;\\n }\\n\\n $colName = $key;\\n if (isset($translations[$key])) {\\n $colName = $translations[$key];\\n }\\n\\n if ($allowedFilterFields === null || in_array($colName, $allowedFilterFields)) {\\n if (is_string($value) || is_numeric($value)) {\\n if (strpos($value, '[') === 0 && strpos($value, ']') === strlen($value) - 1) {\\n $values = explode(',', str_replace(['[', ']'], '', $value));\\n $firstValue = reset($values);\\n switch ($firstValue) {\\n case '<':\\n case '>':\\n case '<=':\\n case '>=':\\n case '!=':\\n case 'LIKE':\\n case 'NOT LIKE':\\n $secondValue = end($values);\\n if (is_numeric($secondValue)) {\\n $secondValue = ($secondValue == (int)$secondValue) ? (int)$secondValue : (float)$secondValue;\\n }\\n if ($firstValue == 'LIKE' || $firstValue == 'NOT LIKE') {\\n $secondValue = $this->db1->quote($secondValue);\\n }\\n $filters[] = $colName . ' ' . $firstValue . ' ' . $secondValue;\\n break;\\n default:\\n $filters[$colName] = $values;\\n break;\\n }\\n } else {\\n switch (strtoupper($value)) {\\n case 'IS NULL':\\n case 'IS NOT NULL':\\n $filters[] = $colName . ' ' . $value;\\n break;\\n default:\\n $filters[$colName] = $value;\\n }\\n }\\n } elseif (is_array($value)) {\\n $filters[$colName] = $value;\\n }\\n }\\n }\\n\\n return $filters;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88c88dc4818c43388886f9d6d8e2d91c\",\n \"score\": \"0.54998785\",\n \"text\": \"public function beforeFilter(){\\n\\t\\t$this->verificarModulo('proyecto.comentarios');\\n\\t\\tparent::beforeFilter();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"522d70df593874631743e29ef667fb5c\",\n \"score\": \"0.5487846\",\n \"text\": \"public function paginar($page_size, $offset, $busqueda, $campo)\\n {\\n\\n $this->db->select();\\n $this->db->from('informacion');\\n $this->db->limit($page_size, $offset);\\n if ($busqueda != \\\"\\\" && $campo != \\\"\\\") {\\n $this->db->group_start();\\n if ($campo == \\\"id_corregimiento\\\") {\\n $this->db->where(\\\"id_corregimiento\\\", $busqueda);\\n }\\n if ($campo == \\\"nombrecorregimiento\\\") {\\n $this->db->like('nombrecorregimiento', $busqueda);\\n }\\n if ($campo == \\\"municipio\\\") {\\n $this->db->like(\\\"municipio\\\", $busqueda);\\n }\\n if ($campo == \\\"veredas\\\") {\\n $this->db->like(\\\"veredas\\\", $busqueda);\\n }\\n if ($campo == \\\"pobladores\\\") {\\n $this->db->like(\\\"pobladores\\\", $busqueda);\\n }\\n if ($campo == \\\"ubicacionlatitud\\\") {\\n $this->db->like(\\\"ubicacionlatitud\\\", $busqueda);\\n }\\n if($campo ==\\\"area\\\"){\\n $this->db->like(\\\"area\\\", $busqueda);\\n }\\n if($campo ==\\\"nautoridadprincipal\\\"){\\n $this->db->like(\\\"nautoridadprincipal\\\", $busqueda);\\n }\\n if($campo ==\\\"nautoridadpolicial\\\"){\\n $this->db->like(\\\"nautoridadpolicial\\\", $busqueda);\\n }\\n if($campo ==\\\"miembrosjal\\\"){\\n $this->db->like(\\\"miembrosjal\\\", $busqueda);\\n }\\n if ($campo == \\\"jal\\\") {\\n $this->db->like(\\\"jal\\\", $busqueda);\\n }\\n if ($campo == \\\"codigodane\\\") {\\n $this->db->like(\\\"codigodane\\\", $busqueda);\\n }\\n if ($campo == \\\"numeroadministrativo\\\") {\\n $this->db->like(\\\"numeroadministrativo\\\", $busqueda);\\n }\\n $this->db->group_end();\\n }\\n\\n $sql = $this->db->get();\\n return $sql->result();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ded659c7c7c8ba8c1acdb9cdf857e38e\",\n \"score\": \"0.5478417\",\n \"text\": \"function getAllPaginatedFiltered($page=1,$perPage=-1) {\\n\\t\\tif ($perPage == -1)\\n\\t\\t\\t$perPage = \\tActionLogPeer::getRowsPerPage();\\n\\t\\tif (empty($page))\\n\\t\\t\\t$page = 1;\\n\\t\\t$cond = $this->getSearchCriteria();\\n\\t\\t$pager = new PropelPager($cond,\\\"ActionLogPeer\\\", \\\"doSelect\\\",$page,$perPage);\\n\\t\\treturn $pager;\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2846e3c3938befd6e0201d18e84ee13c\",\n \"score\": \"0.54718506\",\n \"text\": \"public function getAllAndPaginate($limit = 10, $params = []);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5bb1050069dcde0761935759b9f5dcb4\",\n \"score\": \"0.54686\",\n \"text\": \"function mostraPagina()\\n\\t\\t{\\n\\t\\t// prepara la pagina, ossia il contenitore della tabella\\n\\t\\t$this->aggiungiElemento($this->dammiMenu());\\n\\t\\t$this->aggiungiElemento(\\\"Azioni tabelle\\\", \\\"titolo\\\");\\n\\t\\t$this->aggiungiElemento($this->creaTabella());\\n\\t\\t\\n\\t\\t// manda in output l'intera pagina\\n\\t\\t$this->mostra();\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"245c7be2882d29e49437c87ae19fd33d\",\n \"score\": \"0.54635274\",\n \"text\": \"function selectProductoFiltro($desde,$hasta)\\n\\t\\t{\\n\\t\\t//include(\\\"cms/core/mapping/functions.mapping.php\\\");\\n\\t\\t$db = new Database();\\n\\t\\t$db->connect();\\n\\t\\t$constructor = new CMS_mapping(\\\"cms_productos\\\", $db);\\n\\t\\t$db->doQuery(\\\"SELECT * FROM cms_productos WHERE precio_producto BETWEEN '\\\".$desde.\\\"' AND '\\\".$hasta.\\\"' ORDER BY precio_producto,nombre_producto_es asc\\\", SELECT_QUERY);\\n\\t\\t$results = $db->results;\\n\\t\\t$obj = $constructor->mapping($results);\\n\\t\\t//print_r($obj);\\n\\t\\t echo \\\"
      \\\";\\n\\t\\tif(count($obj->id_producto) > 0){ \\n\\t\\t\\t$datos=6;\\n\\t\\t\\t$pagina=1;\\n\\t\\t\\tif (!empty($_GET['pagina'])){\\n\\t\\t\\t$pagina=$_GET['pagina'];\\n\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t$pg=paginacion1($datos,count($obj->id_producto),$pagina);\\n\\t\\t\\t\\t\\t\\n\\t\\t\\tfor($c=$pg[1]; $c < $pg[2]; $c++){\\n\\t\\t\\t\\t echo \\\"
    • \\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t entrar\\n\\t\\t\\t\\t\\t\\t \\n\\t\\t\\t\\t\\t\\t\\\";\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t if($_SESSION['idioma'] == \\\"en\\\"){\\t\\n\\t\\t\\t\\t\\t echo \\\"

      \\\".$obj->nombre_producto_en[$c].\\\"

      \\n\\t\\t\\t\\t\\t\\t\\t

      Ref: \\\".$obj->referencia_producto_en[$c].\\\"

      \\n\\t\\t\\t\\t\\t\\t\\t

      $\\\".$obj->precio_producto[$c].\\\"

      \\\";\\n\\t\\t\\t\\t }else{ \\n\\t\\t\\t\\t\\t echo \\\"

      \\\".$obj->nombre_producto_es[$c].\\\"

      \\n\\t\\t\\t\\t\\t\\t\\t

      Ref: \\\".$obj->referencia_producto_es[$c].\\\"

      \\n\\t\\t\\t\\t\\t\\t\\t

      $\\\".$obj->precio_producto[$c].\\\"

      \\\";\\n\\t\\t\\t\\t }\\n\\t\\t\\t\\t\\t echo \\\"
    • \\\";\\n\\t\\t\\t}\\n\\t\\t\\techo \\\"
    \\\";\\n \\t\\t\\techo \\\"
    \\\";\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$html = paginacion2($pagina,\\\"resultados.php?buscar=$buscar&\\\",$pg[0]);\\n\\t\\t\\t\\t\\techo $html;\\n\\t\\t\\t\\t\\t\\n\\t\\t\\techo \\\"
    \\\";\\t\\t\\t\\n\\t\\t}else{\\n\\t\\t\\techo \\\"No hay registros en esta busqueda \\\".$buscar.\\\"\\\";\\t\\n\\t\\t}\\n\\t\\t$db->disconnect();\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"418fde381f58676e98d1f47beaa74c42\",\n \"score\": \"0.5462224\",\n \"text\": \"private function filtro3()\\n {\\n //Cuanto se vendio, por tarjeta, giro, efectivo\\n $sucursal = request()->has(\\\"SUCURSAL\\\") ? request()->input(\\\"SUCURSAL\\\") : session(\\\"SUCURSAL\\\");\\n\\n $medio_pago = Ventas::where(\\\"SUCURSAL\\\", $sucursal)->select(DB::raw(\\\"count(REGNRO) AS NUMERO_VENTAS\\\"), \\\"FORMA\\\")->groupBy(\\\"FORMA\\\")\\n ->orderByRaw(\\\" count(REGNRO) DESC \\\");\\n\\n $sucursalModel = Sucursal::find($sucursal);\\n $descripcionSucursal = \\\"\\\";\\n if (!is_null($sucursalModel))\\n $descripcionSucursal = $sucursalModel->MATRIZ == \\\"S\\\" ? \\\"CASA CENTRAL\\\" : \\\"SUC. $sucursalModel->DESCRIPCION\\\";\\n\\n $titulo = \\\"MEDIOS DE PAGO PREFERIDOS - $descripcionSucursal\\\";\\n return ['titulo' => $titulo, \\\"data\\\" => $medio_pago];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5ccc7c75e6c67599cdfc9e6aebe0da6\",\n \"score\": \"0.5458542\",\n \"text\": \"private function setFilter()\\n {\\n $this->filter['categories'] = $this->getParameter('categories', 'array');\\n $this->filter['value'] = $this->getParameter('value') == null ? '' : $this->getParameter('value');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ffe356cf7d5601d270cc34e934591623\",\n \"score\": \"0.5458007\",\n \"text\": \"function bizz_wp_pagenavi($before = '', $after = '') {\\n global $wpdb, $wp_query;\\n\\t\\n\\t// custom filter\\n\\t$args = apply_filters('bizz_filter_pagination', null);\\n\\t\\n if (!is_single()) {\\n\\t\\t// custom variables\\n $request = $wp_query->request;\\n $posts_per_page = intval(get_query_var('posts_per_page'));\\n $paged = intval(get_query_var('paged'));\\n $pagenavi_options = get_option('pagenavi_options');\\n $pagenavi_options = wp_parse_args( (array) $args, $pagenavi_options );\\n $numposts = $wp_query->found_posts;\\n $max_page = $wp_query->max_num_pages;\\n\\t\\t$container_before = ( isset($args['container_before']) ) ? $args['container_before'] : \\\"
    \\\\n
    \\\\n\\\";\\n\\t\\t$container_after = ( isset($args['container_after']) ) ? $args['container_after'] : \\\"
    \\\\n
    \\\\n\\\";\\n\\t\\t$ul_class = ( isset($args['ul_class']) ) ? $args['ul_class'] : \\\"lpag\\\";\\n\\t\\t$active_class = ( isset($args['active_class']) ) ? $args['active_class'] : \\\"current\\\";\\n\\t\\t$prev_link = ( isset($args['prev_link']) ) ? $args['prev_link'] : \\\"
  • \\\\n\\\".get_previous_posts_link($pagenavi_options['prev_text']).\\\"
  • \\\\n\\\";\\n\\t\\t$next_link = ( isset($args['next_link']) ) ? $args['next_link'] : \\\"
  • \\\\n\\\".get_next_posts_link($pagenavi_options['next_text'], $max_page).\\\"
  • \\\\n\\\";\\n\\t\\t\\t\\t\\t\\t\\n if(empty($paged) || $paged == 0) {\\n $paged = 1;\\n }\\n $pages_to_show = intval($pagenavi_options['num_pages']);\\n $pages_to_show_minus_1 = $pages_to_show-1;\\n $half_page_start = floor($pages_to_show_minus_1/2);\\n $half_page_end = ceil($pages_to_show_minus_1/2);\\n $start_page = $paged - $half_page_start;\\n if($start_page <= 0) {\\n $start_page = 1;\\n }\\n $end_page = $paged + $half_page_end;\\n if(($end_page - $start_page) != $pages_to_show_minus_1) {\\n $end_page = $start_page + $pages_to_show_minus_1;\\n }\\n if($end_page > $max_page) {\\n $start_page = $max_page - $pages_to_show_minus_1;\\n $end_page = $max_page;\\n }\\n if($start_page <= 0) {\\n $start_page = 1;\\n }\\n if($max_page > 1 || intval($pagenavi_options['always_show']) == 1) {\\n echo $container_before;\\n\\t\\t\\techo $before.'
      '.\\\"\\\\n\\\";\\n switch(intval($pagenavi_options['style'])) {\\n case 1: \\n if ($start_page >= 2 && $pages_to_show < $max_page) {\\n $first_page_text = str_replace(\\\"%TOTAL_PAGES%\\\", number_format_i18n($max_page), '&laquo; '.stripslashes(__('First', 'bizzthemes')));\\n echo '
    • '.$first_page_text.'
    • ';\\n if(!empty($pagenavi_options['dotleft_text'])) {\\n echo '
    • '.$pagenavi_options['dotleft_text'].'
    • ';\\n }\\n }\\n\\t\\t\\t\\t\\t// Previous\\n\\t\\t\\t\\t\\techo $prev_link;\\n\\t\\t\\t\\t\\t\\n for($i = $start_page; $i <= $end_page; $i++) { \\n if($i == $paged) {\\n $current_page_text = str_replace(\\\"%PAGE_NUMBER%\\\", number_format_i18n($i), $pagenavi_options['current_text']);\\n echo '
    • '.$current_page_text.'
    • ';\\n } else {\\n $page_text = str_replace(\\\"%PAGE_NUMBER%\\\", number_format_i18n($i), $pagenavi_options['page_text']);\\n echo '
    • '.$page_text.'
    • ';\\n }\\n }\\n\\t\\t\\t\\t\\t// Next\\n\\t\\t\\t\\t\\techo $next_link;\\n\\t\\t\\t\\t\\t\\n if ($end_page < $max_page) {\\n if(!empty($pagenavi_options['dotright_text'])) {\\n echo '
    • '.$pagenavi_options['dotright_text'].'
    • ';\\n }\\n $last_page_text = str_replace(\\\"%TOTAL_PAGES%\\\", number_format_i18n($max_page), ''.stripslashes(__('Last', 'bizzthemes')).' &raquo;');\\n echo '
    • '.$last_page_text.'
    • ';\\n }\\n break;\\n case 2;\\n echo '
      '.\\\"\\\\n\\\";\\n echo '\\\\n\\\";\\n echo \\\"
      \\\\n\\\";\\n break;\\n }\\n echo '
    '.$after.\\\"\\\\n\\\";\\n\\t\\t\\techo $container_after;\\n }\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7dcb3eb1d03c37528bf826750f9ca260\",\n \"score\": \"0.5456983\",\n \"text\": \"public function filter(Request $request) \\n {\\n $auth = \\\\Auth::user(); \\n $theme = $auth->theme;\\n\\n $filters=$this->getControllerStateSession('mappingprogramtoopd','filters');\\n $json_data = [];\\n\\n //index\\n if ($request->exists('OrgIDRPJMD'))\\n {\\n $OrgIDRPJMD = $request->input('OrgIDRPJMD')==''?'none':$request->input('OrgIDRPJMD');\\n $filters['OrgIDRPJMD']=$OrgIDRPJMD; \\n $this->putControllerStateSession('mappingprogramtoopd','filters',$filters);\\n\\n $data = $this->populateData();\\n\\n $datatable = view(\\\"pages.$theme.dmaster.mappingprogramtoopd.datatable\\\")->with(['page_active'=>'mappingprogramtoopd', \\n 'search'=>$this->getControllerStateSession('mappingprogramtoopd','search'),\\n 'numberRecordPerPage'=>$this->getControllerStateSession('global_controller','numberRecordPerPage'), \\n 'column_order'=>$this->getControllerStateSession('mappingprogramtoopd.orderby','column_name'),\\n 'direction'=>$this->getControllerStateSession('mappingprogramtoopd.orderby','order'),\\n 'data'=>$data])->render();\\n\\n $json_data = ['success'=>true,'datatable'=>$datatable];\\n } \\n return $json_data;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"824cac10709521f245413291367ff1a5\",\n \"score\": \"0.54531723\",\n \"text\": \"public function sorties_paginate() {\\n $this->autoRender = false;\\n header('Cache-Control: no-cache, must-revalidate');\\n header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\\n// header('Content-type: application/json');\\n header('Access-Control-Allow-Origin: *');\\n header(\\\"Access-Control-Allow-Methods: GET,POST,PUT,DELETE,OPTIONS\\\");\\n header(\\\"Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With\\\");\\n if ($this->request->is('post')) {\\n $data = $this->request->data;\\n// debug($data);\\n $limit = 15;\\n if (!empty($data['Sortie']['limit'])) {\\n $limit = $data['Sortie']['limit'];\\n }\\n $search = \\\"\\\";\\n if (!empty($data['Sortie']['searchKey'])) {\\n $search = $data['Sortie']['searchKey'];\\n $filters = array(\\n 'Sortie.type' => 'Sortie',\\n \\\"lower(Sortie.ref) like '%\\\" . $search . \\\"%' or \\\"\\n . \\\"lower(Sortie.entrepot_depart) like '%\\\" . $search . \\\"%' or \\\"\\n . \\\"lower(Sortie.entrepot_arrivee) like '%\\\" . $search . \\\"%' or \\\"\\n . \\\"lower(Sortie.created) like '%\\\" . $search . \\\"%' or \\\"\\n . \\\"lower(Sortie.date_livraison) like '%\\\" . $search . \\\"%'\\\");\\n $this->Paginator->settings['paramType'] = 'querystring';\\n $this->Paginator->settings['conditions'] = $filters;\\n $this->Paginator->settings['order'] = 'Sortie.created DESC';\\n $this->Paginator->settings['limit'] = $limit;\\n $sorties = $this->paginate('Sortie');\\n } else {\\n $this->Paginator->settings['paramType'] = 'querystring';\\n $this->Paginator->settings['order'] = 'Sortie.created DESC';\\n $filters = array('Sortie.type' => 'Sortie');\\n $this->Paginator->settings['conditions'] = $filters;\\n $this->Paginator->settings['limit'] = $limit;\\n $sorties = $this->paginate('Sortie');\\n }\\n http_response_code(200);\\n echo json_encode(array(\\n 'data' => array(\\n 'sorties' => $sorties,\\n 'pageCount' => $this->params['paging']\\n ),\\n 'status' => 200,\\n 'type' => 'success'\\n ));\\n die();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b44c9bc8189c08e3314c71caa3d0bc4c\",\n \"score\": \"0.54460406\",\n \"text\": \"protected function getFilters()\\n { \\n $filters = parent::getFilters(); \\n $filters['internado_id'] = sfContext::getInstance()->getRequest()->getParameter('internado_id');\\n return $filters;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e893513e3094322841e72f21e494e774\",\n \"score\": \"0.5443467\",\n \"text\": \"public function paginate(FilterInterface $filter): ?Paginate;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8d10318a0e095d634b59ba0dabea71a\",\n \"score\": \"0.54408216\",\n \"text\": \"public function getNoticiaAction($pagina)\\n {\\n $em = $this->getDoctrine()->getManager();\\n $qb = $em->createQueryBuilder('i');\\n $parameters = array( //parametros para el query\\n 'fechadehoy' => new \\\\DateTime(),\\n\\n );\\n\\n //query para filtrar las visibles y con fecha anterior al dia de hoy (no futura)\\n $results = $em->createQuery('SELECT i FROM SitioBundle:Noticia i'\\n . ' WHERE i.visible=TRUE and i.fechaHora <= :fechadehoy'\\n . ' ORDER BY i.id DESC')\\n ->setParameters($parameters)\\n ->setFirstResult($pagina)\\n ->setMaxResults(1)\\n ->getResult();\\n return $results;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e49d4f61ffb8f972ec42cba3d2a4172\",\n \"score\": \"0.5431636\",\n \"text\": \"public function index(Request $request)\\n {\\n \\n $buscar = $request->buscar;\\n $criterio = $request->criterio;\\n \\n if ($buscar==''){\\n $recepcion = Recepcion::join('personas','id_prs_entrega','=','personas.id')\\n ->select('recepcion.id','recepcion.id_prs_entrega as identrega','recepcion.codigo','recepcion.cantidad','personas.paterno as paterno','recepcion.fecha as fecha','recepcion.hora','recepcion.liquido','recepcion.solido','recepcion.cliente','recepcion.observaciones','recepcion.usr_id','recepcion.estado')\\n ->orderBy('recepcion.id', 'desc')->paginate(10);\\n }\\n else{\\n $recepcion = Recepcion::join('personas','id_prs_entrega','=','personas.id')\\n ->select('recepcion.id','recepcion.id_prs_entrega as identrega','recepcion.codigo','recepcion.cantidad','personas.paterno as paterno','recepcion.fecha as fecha','recepcion.hora','recepcion.liquido','recepcion.solido','recepcion.cliente','recepcion.observaciones','recepcion.usr_id','recepcion.estado')\\n ->where('recepcion.'.$criterio, 'like', '%'. $buscar . '%')\\n ->orderBy('recepcion.id', 'desc')->paginate(10);\\n }\\n \\n \\n return [\\n 'pagination' => [\\n 'total' => $recepcion->total(),\\n 'current_page' => $recepcion->currentPage(),\\n 'per_page' => $recepcion->perPage(),\\n 'last_page' => $recepcion->lastPage(),\\n 'from' => $recepcion->firstItem(),\\n 'to' => $recepcion->lastItem(),\\n ],\\n 'recepcion' => $recepcion\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e1f3cce8993adb2d60db41d594bccf0\",\n \"score\": \"0.5430642\",\n \"text\": \"function PaginatedPages() {\\n\\t\\t$list = new PaginatedList(NewsArticle::get()->filter(\\\"ParentID\\\",$this->ID), $this->request);\\n\\t\\t$list->setPageLength(10);\\n\\t\\treturn $list;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55330b33b1bf561e03501cff9cc3aa7b\",\n \"score\": \"0.54260737\",\n \"text\": \"protected function filters()\\n {\\n if ($this->getRequest()->isPost()== true) {\\n \\tSession::getInstance()->set($this->namepageactual,1);\\n $parramsfilter = array();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 }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9fe688833b8fe1dc76e8e75e50051b9\",\n \"score\": \"0.54237014\",\n \"text\": \"public function list() {\\n $content = [];\\n $gets =\\\\Drupal::request()->query->all();\\n $nomu = $gets['nomu'];\\n $co_orie = $gets['co_orie'];\\n\\n\\n $content['filtres'] = \\\\Drupal::formBuilder()->getForm('Drupal\\\\plan\\\\Form\\\\FiltresForm', $r->comment, $r->co_omodu);\\n\\n $headers = array(\\n 'nomu_o' => t('Resp. O'),\\n 'co_tpla' => t('Plan'),\\n 'co_orie' => t('Orie'),\\n 'id_disp' => t('Id disp'),\\n 'co_modu' => t('Module'),\\n 'libl' => t('Titre'),\\n 'nomu_p' => t('Resp. P.'),\\n 'prio_nat' => array('data' => t('Priorité nationale'), 'class' => 'orangebg'),\\n 'thematique' => array('data' => t('Thématique'), 'class' => 'orangebg'),\\n );\\n\\n // switch database (cf settings.php)\\n \\\\Drupal\\\\Core\\\\Database\\\\Database::setActiveConnection('external');\\n // Build query\\n $count = 12;\\n\\n $query = db_select('gbb_gdisp', 'd');\\n $query ->leftjoin('gbb_gmodu', 'm', 'd.co_disp = m.co_disp and d.co_degre=m.co_degre');\\n $query ->leftjoin('gbb_gmodu_plus', 'mm', 'mm.co_modu = m.co_modu AND mm.co_degre = m.co_degre');\\n $query ->leftjoin('gbb_gdire', 'do', 'do.co_modu = m.co_modu AND do.co_degre = m.co_degre AND do.co_tres = 2');\\n $query ->leftjoin('gbb_gdire', 'dp', 'dp.co_modu = m.co_modu AND dp.co_degre = m.co_degre AND dp.co_tres = 3');\\n $query ->leftjoin('gbb_gresp', 'ro', 'do.co_resp = ro.co_resp AND do.co_degre = ro.co_degre');\\n $query ->leftjoin('gbb_gresp', 'rp', 'dp.co_resp = rp.co_resp AND dp.co_degre = rp.co_degre');\\n $query ->condition('d.id_disp', '19%', 'LIKE');\\n $query ->condition('d.id_disp', '19N%', 'NOT LIKE');\\n // $query ->condition('d.co_andi', '19%', 'LIKE');\\n if (strlen($nomu)>0) $query ->condition('ro.nomu', $nomu, 'like');\\n if (strlen($co_orie)>0) $query ->condition('d.co_orie', $co_orie, 'like');\\n $query ->fields('m', array(\\n 'libl', 'co_modu', 'co_degre', 'lpeda', 'co_anmo',\\n ));\\n $query ->fields('d', array(\\n 'id_disp', 'co_tpla', 'co_orie',\\n ));\\n $query ->fields('mm', array(\\n 'prio_nat', 'thematique',\\n ));\\n // $query ->fields('ro', array('nomu'));\\n $query ->addfield('d', 'libl', 'libdispo');\\n $query ->addField('ro', 'nomu', 'nomu_o');\\n $query ->addField('rp', 'nomu', 'nomu_p');\\n $query ->distinct();\\n $pager = $query->extend('Drupal\\\\Core\\\\Database\\\\Query\\\\PagerSelectExtender')->limit($count);\\n\\n $rows = array();\\n foreach ($result = $pager->execute()->fetchAll() as $r) {\\n $prio_nat = \\\\Drupal::formBuilder()->getForm('Drupal\\\\plan\\\\Form\\\\PrioNatForm', $r->prio_nat, $r->co_modu, $r->co_degre, $r->co_tpla,$r->id_disp);\\n $thematique = \\\\Drupal::formBuilder()->getForm('Drupal\\\\plan\\\\Form\\\\ThematiqueForm', $r->thematique, $r->co_modu, $r->co_degre, $r->co_tpla,$r->id_disp);\\n\\n $titre = $r->libl;\\n $class = \\\"normal\\\";\\n if ($titre==\\\"\\\") {\\n $titre = $r->libdispo;\\n $class = \\\"red\\\";\\n };\\n if (strlen($r->co_anmo)>=1) {\\n $class = \\\"strike\\\";\\n }\\n\\n $rows[] = array(\\n 'nomu_o' => array('data' => $r->nomu_o),\\n 'co_tpla' => array('data' => $r->co_tpla),\\n 'co_orie' => array('data' => $r->co_orie),\\n 'id_disp' => array('data' => $r->id_disp),\\n 'co_modu' => array('data' => new FormattableMarkup('@name', [':link' => \\\"../moduleng/\\\".$r->co_degre.\\\"/\\\".$r->co_modu, '@name' => $r->co_modu]), \\\"title\\\"=> $r->lpeda),\\n 'libl' => array('data' => $titre, \\\"class\\\"=>$class),\\n 'nomu_p' => array('data' => $r->nomu_p),\\n 'prio_nat' => array('data' => $prio_nat),\\n 'thematique' => array('data' => $thematique),\\n );\\n }\\n\\n $content['table'][] = array(\\n '#type' => 'table',\\n '#header' => $headers,\\n '#rows' => $rows,\\n );\\n $content['table'][] = array(\\n '#type' => 'pager',\\n );\\n\\n // Don't cache this page.\\n $content['#cache']['max-age'] = 0;\\n\\n// drupal_flush_all_caches(); // For Drupal-8\\n CacheCommands::clearRender();\\n CacheCommands::clearPlugin();\\n\\n return $content;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bde9785fb0684dacb73c6e49543c39c\",\n \"score\": \"0.54212683\",\n \"text\": \"function penerimaan_invoice_list($filter,$start,$end){\\r\\n\\t\\t\\t$query = \\\"SELECT * FROM penerimaan_invoice\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t// For simple search\\r\\n\\t\\t\\tif ($filter<>\\\"\\\"){\\r\\n\\t\\t\\t\\t$query .=eregi(\\\"WHERE\\\",$query)? \\\" AND \\\":\\\" WHERE \\\";\\r\\n\\t\\t\\t\\t$query .= \\\" (invoice_id LIKE '%\\\".addslashes($filter).\\\"%' OR invoice_no LIKE '%\\\".addslashes($filter).\\\"%' OR invoice_supplier LIKE '%\\\".addslashes($filter).\\\"%' OR invoice_noorder LIKE '%\\\".addslashes($filter).\\\"%' OR invoice_tanggal LIKE '%\\\".addslashes($filter).\\\"%' OR invoice_nilai LIKE '%\\\".addslashes($filter).\\\"%' )\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t$result = $this->db->query($query);\\r\\n\\t\\t\\t$nbrows = $result->num_rows();\\r\\n\\t\\t\\t$limit = $query.\\\" LIMIT \\\".$start.\\\",\\\".$end;\\t\\t\\r\\n\\t\\t\\t$result = $this->db->query($limit); \\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif($nbrows>0){\\r\\n\\t\\t\\t\\tforeach($result->result() as $row){\\r\\n\\t\\t\\t\\t\\t$arr[] = $row;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t$jsonresult = json_encode($arr);\\r\\n\\t\\t\\t\\treturn '({\\\"total\\\":\\\"'.$nbrows.'\\\",\\\"results\\\":'.$jsonresult.'})';\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\treturn '({\\\"total\\\":\\\"0\\\", \\\"results\\\":\\\"\\\"})';\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a620773de37888229d6d77af636ffe1\",\n \"score\": \"0.54204375\",\n \"text\": \"public function set_items_filtered() {\\n\\n\\t\\t$filter_by = $this->get_filter_by();\\n\\t\\t$this->items = appthemes_wp_list_filter( $this->items, $filter_by );\\n\\n\\t\\t// Look for a keyword search.\\n\\t\\tif ( ! empty( $_GET['s'] ) ) { // Input var okay.\\n\\n\\t\\t\\t$keyword = sanitize_text_field( wp_unslash( $_GET['s'] ) ); // Input var okay.\\n\\n\\t\\t\\t$keyword = wp_strip_all_tags( $keyword );\\n\\t\\t\\t$filter_by = array( 'title' => $keyword, 'description' => $keyword );\\n\\n\\t\\t\\t$this->items = appthemes_wp_list_filter( $this->items, $filter_by, $operator = 'OR', $match = true );\\n\\t\\t}\\n\\n\\t\\t$this->set_pagination_args( array(\\n\\t\\t\\t'total_items' => count( $this->items ),\\n\\t\\t\\t'per_page' => $this->args['addons_per_page'],\\n\\t\\t) );\\n\\n\\t\\t// Limit the add-ons list based on the current page.\\n\\t\\t$this->items = array_slice( $this->items, ( $this->args['page'] - 1 ) * $this->args['addons_per_page'], $this->args['addons_per_page'] );\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02489538861f164e7784ba72cd1920d9\",\n \"score\": \"0.5418394\",\n \"text\": \"function pagination($search, $filters=true)\\n {\\n if(method_exists($search, 'appends'))\\n {\\n $html = '
    ';\\n $html .= $search->appends( $filters ? $_GET : null);\\n $html .= \\\"
    \\\";\\n\\n return $html;\\n }\\n\\n return '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e58c5cfd1ba1392b650cfac0e6a5597\",\n \"score\": \"0.5416447\",\n \"text\": \"public function list_permohonan($search_string, $search_in, $order, $order_type, $uri3, $per_page, $for)\\r\\n\\t{\\r\\n\\t\\t$limit_end = ($uri3 * $per_page - $per_page);\\r\\n\\t\\tif ($limit_end < 0){\\r\\n\\t\\t\\t$limit_end = 0;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t//we must avoid a page reload with the previous session data\\r\\n\\t\\t//if any filter post was sent, then it's the first time we load the content\\r\\n\\t\\t//in this case we clean the session filter data\\r\\n\\t\\t//if any filter post was sent but we are in some page, we must load the session data\\r\\n\\r\\n\\t\\t//filtered && || paginated\\r\\n\\r\\n\\t\\t/*kemungkinan kondisi\\r\\n\\t\\tfirst load ; $search_string=null, $this->uri->segment(3) !== true\\r\\n\\t\\tclick empty search; $search_string='', $this->uri->segment(3) !== true\\r\\n\\t\\tclick search; $search_string='xxx', $this->uri->segment(3) !== true\\r\\n\\t\\tclick pagination; $search_string=null, $this->uri->segment(3) == true*/\\r\\n\\t\\tif($uri3 == null){\\r\\n\\t\\t\\tif( $search_string == null && $search_string !== '' ){\\r\\n\\t\\t\\t\\t$search_string = '';\\r\\n\\t\\t\\t\\t$search_in = 'NamaGedung';\\r\\n\\t\\t\\t\\t$order ='id';\\r\\n\\t\\t\\t\\t$order_type ='Desc';\\r\\n\\t\\t\\t\\t//console_log( '1' );\\r\\n\\t\\t\\t}else{\\r\\n\\t\\t\\t\\t//console_log( '2' );\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t$filter_session_data['search_string_selected'] = $search_string;\\r\\n\\t\\t\\t$filter_session_data['search_in_field'] = $search_in;\\r\\n\\t\\t\\t$filter_session_data['order'] = $order;\\r\\n\\t\\t\\t$filter_session_data['order_type'] = $order_type;\\r\\n\\t\\t\\t$this->CI->session->set_userdata($filter_session_data);\\r\\n\\t\\t}else {\\r\\n\\t\\t\\t$search_string = $this->CI->session->userdata('search_string_selected');\\r\\n\\t\\t\\t$search_in = $this->CI->session->userdata('search_in_field');\\r\\n\\t\\t\\t$order = $this->CI->session->userdata('order');\\r\\n\\t\\t\\t$order_type = $this->CI->session->userdata('order_type');\\r\\n\\t\\t\\t//console_log( '3' );\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t$data['search_string_selected'] = $search_string;\\r\\n\\t\\t$data['search_in_field'] = $search_in;\\r\\n\\t\\t$data['order'] = $order;\\r\\n\\t\\t$data['order_type_selected'] = $order_type;\\r\\n\\t\\t$data['permohonans'] = $this->CI->permohonan_model->get_permohonan_disposisi($search_string, $search_in, $order, $order_type, $per_page, $limit_end, $for);\\r\\n\\t\\t$data['count_permohonans']= $this->CI->permohonan_model->count_permohonan_disposisi($search_string, $search_in, $order, $for);\\r\\n\\t\\treturn $data;\\r\\n\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbbd480d9ce1a36dc78ff12c1936fb72\",\n \"score\": \"0.540318\",\n \"text\": \"public function filterAction(Request $request)\\n {\\n\\n $em = $this->getDoctrine()->getManager();\\n\\n $conf = $this->getUser()->getCurrentMainEvent();\\n //Filters\\n $filters = $this->createForm(new LocationFilterType($this->getUser()));\\n $filters->submit($request);\\n\\n if ($filters->isValid())\\n {\\n // bind values from the request\\n\\n $entities = $em->getRepository('fibeContentBundle:Location')->filtering($filters->getData(), $conf);\\n $nbResult = count($entities);\\n\\n //Pager\\n $adapter = new ArrayAdapter($entities);\\n $pager = new PagerFanta($adapter);\\n $pager->setMaxPerPage($this->container->getParameter('max_per_page'));\\n try\\n {\\n $pager->setCurrentPage($request->query->get('page', 1));\\n } catch (NotValidCurrentPageException $e)\\n {\\n throw new NotFoundHttpException();\\n }\\n\\n return $this->render(\\n 'fibeContentBundle:Location:list.html.twig',\\n array(\\n 'pager' => $pager,\\n 'nbResult' => $nbResult,\\n )\\n );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebf7216a6d083642d9852965412b149a\",\n \"score\": \"0.5403093\",\n \"text\": \"function get_my_questions_filter($id_siswa,$perpage,$page,$bab,$tingpel,$key){\\n\\n\\t\\t$this->db->select('`pertanyaan`.`id` AS `pertanyaanID`, `photo`, \\n\\t\\t\\t`namaDepan`, `namaBelakang`, `judulPertanyaan`, `tp.id` AS tingpel,\\n\\t\\t\\t`isiPertanyaan`, `pertanyaan`.`date_created`, mp.namaMataPelajaran, tp.keterangan,`bab`.`id` AS babID,\\n\\t\\t\\t`bab`.`judulBab`,(SELECT COUNT(id) FROM `tb_k_jawab` WHERE pertanyaanID = pertanyaan.id) AS jumlah,\\n\\t\\t\\t(SELECT CONCAT(`namaDepan`,\\\" \\\",`namaBelakang`) from tb_guru where id = pertanyaan.mentorID) as namaGuru');\\n\\t\\t$this->db->join('`tb_bab` `bab`','`pertanyaan`.`babID` = `bab`.`id`');\\n\\t\\t$this->db->join('`tb_tingkat-pelajaran` `tp`','`bab`.`tingkatPelajaranID` = `tp`.`id`');\\n\\t\\t$this->db->join('`tb_siswa` `siswa`','`pertanyaan`.`siswaID` = `siswa`.`id`');\\n\\t\\t$this->db->join('tb_mata-pelajaran mp', 'mp.id = tp.mataPelajaranID');\\n\\n\\t\\t$this->db->where('`siswa`.`id`', $id_siswa )->order_by('`pertanyaan`.`id`','desc');\\n\\t\\t\\n\\t\\tif ($bab=='all') {\\n\\t\\t\\t$this->db->where(\\\"tp.id\\\",$tingpel);\\n\\t\\t}else{\\n\\t\\t\\t$this->db->where(\\\"tp.id\\\",$tingpel);\\n\\t\\t\\t$this->db->where(\\\"bab.id\\\",$bab);\\n\\t\\t}\\n\\n\\t\\tif($key==!\\\"\\\"){\\n\\t\\t\\t$this->db->where(\\\"judulPertanyaan LIKE '%$key%'\\n\\t\\t\\t\\\")->order_by('`pertanyaan.date_created`','asc');\\n\\t\\t}\\n\\t\\t\\n\\n\\t\\t$query = $this->db->get('`tb_k_pertanyaan` `pertanyaan`',$perpage,$page);\\n\\t\\tif ($query->result_array()==array()) {\\n\\t\\t\\treturn false;\\n\\t\\t} else {\\n\\t\\t\\treturn $query->result_array();\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6551a36c37f1b2449f0c027036c905cb\",\n \"score\": \"0.54009384\",\n \"text\": \"function peopledirectorykomentar_searchdata_all_bypage( $tbl_peopledirectorykomentar, $cari, $offset, $dataperPage ){\\n\\t\\t$sql = mysql_query(\\\"SELECT * FROM $tbl_peopledirectorykomentar WHERE \\n\\t\\t\\tjudul LIKE '$cari' OR\\n\\t\\t\\tpesan LIKE '$cari' \\n\\t\\t\\t\\tORDER BY id ASC LIMIT $offset, $dataperPage\\n\\t\\t\\\"); \\n \\t\\treturn $sql;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1069ef7b22006352b116ea33ed63550e\",\n \"score\": \"0.539918\",\n \"text\": \"public function index()\\n {\\n //\\n $query = Ingredient::query();\\n\\n foreach (request('filter',[]) as $filter => $value) {\\n\\n if(!$query->hasNamedScope($filter)){\\n return response()->json([\\n 'Message' => \\\"El Filtro '{$filter}' no es permitido\\\"], 400);\\n }\\n\\n $query->{$filter}($value);\\n }\\n\\n\\n return response()->json($query->simplePaginate(), 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d7e1e95b1637059a247fe720eebdbfa\",\n \"score\": \"0.53987676\",\n \"text\": \"private function addPager() {\\n\\t\\t$this->addHiddenValue('page', 1);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f8d654f25c5e7f4224888023eaa5de1\",\n \"score\": \"0.53948706\",\n \"text\": \"function mostraPagina()\\n\\t\\t{\\n\\t\\t$this->aggiungiElemento(\\\"Scheda intervento\\\", \\\"titolo\\\");\\n\\t\\t$this->aggiungiElemento($this->modulo);\\n\\t\\t$this->mostra();\\n\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"371790ca1bbd9e99f27dc032eb2cab1f\",\n \"score\": \"0.53912205\",\n \"text\": \"public function empresas( $filtro = '' ){\\n\\t // verificar permisos\\n \\tif( $this->checkPermissions( 'reporte', 'empresas' ) === FALSE ):\\n \\t\\t$this->iraBuscar('alert-danger','Acceso denegado: usted no ha sido autorizado a acceder a esta secci&oacute;n.');\\n \\tendif;\\n \\n $this->Paginator->settings = $this->empresas_paginate;\\n $this->set('empresas',$this->Paginator->paginate($this->Empresa,array(\\n 'OR' => \\n array('Empresa.nombre_empresa LIKE'=>\\\"%{$filtro}%\\\",'Empresa.nit LIKE'=>\\\"%{$filtro}%\\\",'Empresa.numero_registro LIKE'=>\\\"%{$filtro}%\\\")\\n )\\n ));\\n $this->set('filtro',$filtro);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fdd889441936b7fa9707faf4689ffa02\",\n \"score\": \"0.53911865\",\n \"text\": \"public function index(Request $request){\\n try{\\n DB::enableQueryLog();\\n $usuario = JWTAuth::parseToken()->getPayload();\\n\\n $elementos_por_pagina = 50;\\n $pagina = Input::get('pagina');\\n if(!$pagina){\\n $pagina = 1;\\n }\\n\\n $query = Input::get('query');\\n $filtro = Input::get('filtro');\\n\\n $recurso = Entrada::with('proveedor')->where('entradas.clues',$usuario->get('clues'))->whereNull('entradas.acta_id');\\n\\n /*\\n if($query){\\n if(is_numeric($query)){\\n $actas = Requisicion::where ('numero',intval($query))->lists('acta_id');\\n $recurso = $recurso->whereIn('id',$actas);\\n }else{\\n $recurso = $recurso->where(function($condition)use($query){\\n $condition->where('folio','LIKE','%'.$query.'%')\\n ->orWhere('lugar_reunion','LIKE','%'.$query.'%')\\n ->orWhere('ciudad','LIKE','%'.$query.'%');\\n });\\n }\\n }\\n\\n if($filtro){\\n if(isset($filtro['estatus'])){\\n if($filtro['estatus'] == 'nuevos'){\\n $recurso = $recurso->whereNull('total_claves_recibidas');\\n }else if($filtro['estatus'] == 'incompletos'){\\n $recurso = $recurso->whereRaw('total_claves_recibidas < total_claves_validadas');\\n }else if($filtro['estatus'] == 'completos'){\\n $recurso = $recurso->whereRaw('total_claves_validadas = total_claves_recibidas');\\n }\\n }\\n }*/\\n\\n $totales = $recurso->count();\\n \\n $recurso = $recurso->select('entradas.*', DB::raw('sum(stock_insumos.cantidad_recibida) as cantidad_recibida'), \\n DB::raw('sum(stock_insumos.cantidad_recibida*insumos.precio) as total'))\\n ->leftjoin('stock_insumos','stock_insumos.entrada_id','=','entradas.id')\\n ->leftjoin('insumos','insumos.id','=','stock_insumos.insumo_id')\\n ->groupBy('entradas.id')\\n ->skip(($pagina-1)*$elementos_por_pagina)->take($elementos_por_pagina)\\n //->orderBy('estatus','asc')\\n ->orderBy('entradas.created_at','desc')\\n ->get();\\n\\n //$queries = DB::getQueryLog();\\n //$last_query = end($queries);\\n return Response::json(['data'=>$recurso,'totales'=>$totales],200);\\n }catch(Exception $ex){\\n return Response::json(['error'=>$ex->getMessage()],500);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a5d31fc668073ab11b01fb5d3ccea8a\",\n \"score\": \"0.53893805\",\n \"text\": \"public function index(PaymentFilterRequest $request)\\n { \\n $query = Payment::filterBy($request->all())->ordered();\\n $result = $query->paginate(15);\\n return new PaymentCollection($result, $query);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dce3f47bac524b75daf78dc80f6a8f37\",\n \"score\": \"0.5388592\",\n \"text\": \"function home_filter()\\n\\t{\\n\\t\\t$data = filter_forwarded_data($this);\\n\\t\\t$this->load->view('providers/list_filter', $data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c91ba4d18bf126110897f4292954f3e7\",\n \"score\": \"0.53813165\",\n \"text\": \"public function __construct()\\n {\\n $this->beforeFilter('salteVendedor');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a980a8802f647d7ef6f0525fe6ef00f\",\n \"score\": \"0.53797656\",\n \"text\": \"public function filtrePrix()\\n {\\n $hebergement = new Hebergement();\\n $hebergements = Session::get('hebergements');\\n $hebergements = $hebergementDispo = $hebergements->whereIn('HEBERGEMENT.NOHEB',$hebergement->getHebergementByPrixMax($prixmax)\\n ->lists('TARIF.NOHEB'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9efc8a299da2a0587a082b4a2261eac\",\n \"score\": \"0.5370328\",\n \"text\": \"public function init_filters() {\\n add_filter( 'erp_settings_pages', array( $this, 'add_settings_page' ) );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a67997fe95a198a9d7454c7f0eb98a0e\",\n \"score\": \"0.53639895\",\n \"text\": \"public function spo_list_by_filter()\\n {\\n $data['perpage'] = $perpage = ($this->input->post('perpage')) ? $this->input->post('perpage') : '25';\\n $data['search_val'] = $search_val = ($this->input->post('search_val')) ? $this->input->post('search_val') : '';\\n $data['current_pagination_index'] = $current_pagination_index = ($this->input->post('current_pagination_index')) ? $this->input->post('current_pagination_index') : '1';\\n $data['page'] = $page = ($this->input->post('pagecount')) ? $this->input->post('pagecount') : '0';\\n\\n if ($search_val != '') {\\n $sc = ' AND (spo.supplier_purchase_order_no LIKE \\\"%'.$search_val.'%\\\" OR v.vendor_name LIKE \\\"%'.$search_val.'%\\\" OR p.product_name LIKE \\\"%'.$search_val.'%\\\" OR cb.lead_name LIKE \\\"%'.$search_val.'%\\\")';\\n // $data['page'] = $page = '0';\\n }\\n else {\\n $sc = '';\\n }\\n $data['dtrange_from'] = '';\\n $data['dtrange_to'] = '';\\n $data['vendor_list'] = $this->Supplierpo_model->get_vendor_list();\\n $financial_year_to2 = (date('m') > 3) ? date('Y') +1 : date('Y');\\n $financial_year_from2 = $financial_year_to2 - 1;\\n $data['ypick'] = $financial_year_from2.'-'.$financial_year_to2;\\n if($_SERVER['REQUEST_METHOD'] == 'POST')\\n {\\n $user_id = $this->input->post('user_id');\\n\\n if($user_id !='')\\n {\\n $uid = \\\" AND spo.vendor_id = '$user_id'\\\";\\n }\\n else\\n {\\n $uid = '';\\n }\\n $data['f_l_user'] = $user_id;\\n\\n $fbase = $this->input->post('fbase');\\n $data['fbasesearch'] = $fbase;\\n\\n if($fbase == '')\\n {\\n $data['purchasesearch'] = '';\\n $data['drnge'] = '';\\n $data['fquartersearch'] = '';\\n //$data['ypick'] = '';\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n }\\n else if($fbase == 'BonQuarter')\\n {\\n $btn = $this->input->post('goButtonboq');\\n $fqtr = $this->input->post('fquarter');\\n $yrange = $this->input->post('ypick');\\n\\n $data['fquartersearch'] = $fqtr;\\n $data['ypick'] = $yrange;\\n\\n if($fqtr == '') \\n {\\n $yr = explode('-', $yrange);\\n\\n $fdate = $yr[0].'-04-01';\\n $tdate = $yr[1].'-03-31';\\n\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\\\".$fdate.\\\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\\\".$tdate.\\\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\\\".$fdate.\\\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\\\".$tdate.\\\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n }\\n else\\n {\\n $yr = explode('-', $yrange);\\n if($fqtr=='Q1')\\n {\\n $fdate = $yr[0].'-04-01';\\n $tdate = $yr[0].'-06-30';\\n }\\n else if($fqtr=='Q2')\\n {\\n $fdate = $yr[0].'-07-01';\\n $tdate = $yr[0].'-09-30';\\n }\\n else if($fqtr=='Q3')\\n {\\n $fdate = $yr[0].'-10-01';\\n $tdate = $yr[0].'-12-31';\\n }\\n else\\n {\\n $fdate = $yr[1].'-01-01';\\n $tdate = $yr[1].'-03-31';\\n }\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\\\".$fdate.\\\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\\\".$tdate.\\\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\\\".$fdate.\\\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\\\".$tdate.\\\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\\\")->result_array();\\n }\\n\\n $data['purchasesearch'] = '';\\n $data['drnge'] = '';\\n //else if()\\n }\\n else\\n {\\n $btn = $this->input->post('goButton');\\n $schange = $this->input->post('searchChange');\\n //echo $schange;\\n $dtrange_from = $this->input->post('dtrange_from');\\n $dtrange_to = $this->input->post('dtrange_to');\\n\\n if ($dtrange_from != '' && $dtrange_to != '') {\\n $dtrange = $dtrange_from.' - '.$dtrange_to;\\n }\\n else {\\n $dtrange = ''; \\n }\\n // $dtrange = $this->input->post('dtrange');\\n if($btn=='')\\n {\\n $dtrange='';\\n }\\n if($schange == '')\\n $schange='';\\n\\n if($schange == '')\\n {\\n $data['drnge'] = '';\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\\\")->result_array();\\n }\\n elseif($schange == 'today')\\n {\\n $data['drnge'] = '';\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') = CURDATE() $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') = CURDATE() $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\\\")->result_array();\\n }\\n else if($schange == 'thisweek')\\n {\\n $data['drnge'] = '';\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND YEARWEEK(STR_TO_DATE(spo.created_on, '%Y-%m-%d'), 1) = YEARWEEK(CURDATE(), 1) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND YEARWEEK(STR_TO_DATE(spo.created_on, '%Y-%m-%d'), 1) = YEARWEEK(CURDATE(), 1) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\\\")->result_array();\\n } \\n else if($schange == 'thismonth')\\n {\\n $data['drnge'] = '';\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND MONTH(STR_TO_DATE(spo.created_on, '%Y-%m-%d')) = MONTH(CURDATE()) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND MONTH(STR_TO_DATE(spo.created_on, '%Y-%m-%d')) = MONTH(CURDATE()) $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\\\")->result_array();\\n } \\n else if($schange == 'thisyear')\\n {\\n $data['drnge'] = '';\\n $finstart = $_SESSION['finstart'];\\n $finend = $_SESSION['finend'];\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\\\".$finstart.\\\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\\\".$finend.\\\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\\\".$finstart.\\\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\\\".$finend.\\\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\\\")->result_array();\\n }\\n else\\n {\\n $data['drnge'] = $dtrange;\\n $data['dtrange_from'] = $dtrange_from;\\n $data['dtrange_to'] = $dtrange_to;\\n $dr = explode(' - ', $dtrange);\\n\\n $fd = explode('/', $dr[0]);\\n $td = explode('/', $dr[1]);\\n\\n $fdate = $fd[2].'-'.$fd[0].'-'.$fd[1];\\n $tdate = $td[2].'-'.$td[0].'-'.$td[1];\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\\\".$fdate.\\\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\\\".$tdate.\\\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id AND STR_TO_DATE(spo.created_on, '%Y-%m-%d') >= STR_TO_DATE('\\\".$fdate.\\\"', '%Y-%m-%d') and STR_TO_DATE(spo.created_on, '%Y-%m-%d') <= STR_TO_DATE('\\\".$tdate.\\\"', '%Y-%m-%d') $uid $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\\\")->result_array();\\n }\\n //echo $schange;exit;\\n $data['purchasesearch'] = $schange;\\n $data['drnge'] = $dtrange;\\n $data['fquartersearch'] = '';\\n //$data['ypick'] = '';\\n }\\n }\\n else\\n { \\n $data['f_l_user'] = '';\\n $data['fbasesearch'] = '';\\n $data['purchasesearch'] = '';\\n $data['drnge'] = '';\\n $data['fquartersearch'] = '';\\n $data['supplierpo_list_count'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC\\\")->result_array();\\n\\n $data['supplierpo_list'] = $this->db->query(\\\"SELECT spo.*,v.vendor_name,v.phone_no,cb.lead_name,p.product_name,pi.product_item FROM supplier_purchase_order spo,vendor v,supplier_purchase_order_product spop,leads l,products p,product_items pi,buyer_order bo, contact_book cb WHERE spo.vendor_id = v.vendor_id AND spop.supplier_purchase_order_id = spo.supplier_purchase_order_id AND spop.product_item_id = pi.product_item_id AND pi.product_id = p.product_id AND spo.buyer_order_id = bo.buyer_order_id AND bo.lead_id = l.lead_id AND cb.contact_book_id = l.contact_book_id $sc GROUP BY spo.supplier_purchase_order_id ORDER BY spo.supplier_purchase_order_id DESC LIMIT $page, $perpage\\\")->result_array();\\n // $data['supplierpo_list'] = $this->Supplierpo_model->get_supplierpo_list();\\n }\\n $this->load->view('supplierpo/supplierpo_list_table',$data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6330f27b0b130cd57373868c0f98ddd\",\n \"score\": \"0.5363245\",\n \"text\": \"public function testFilters() {\\n // Test the name filter page, which filters for name contains 'Comida'.\\n // Should show just the Spanish translation, once.\\n $this->assertPageCounts('test-name-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida name filter');\\n\\n // Test the description filter page, which filters for description contains\\n // 'Comida'. Should show just the Spanish translation, once.\\n $this->assertPageCounts('test-desc-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida description filter');\\n\\n // Test the field filter page, which filters for field_foo contains\\n // 'Comida'. Should show just the Spanish translation, once.\\n $this->assertPageCounts('test-field-filter', ['es' => 1, 'fr' => 0, 'en' => 0], 'Comida field filter');\\n\\n // Test the name Paris filter page, which filters for name contains\\n // 'Paris'. Should show each translation once.\\n $this->assertPageCounts('test-name-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris name filter');\\n\\n // Test the description Paris page, which filters for description contains\\n // 'Paris'. Should show each translation, once.\\n $this->assertPageCounts('test-desc-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris description filter');\\n\\n // Test the field Paris filter page, which filters for field_foo contains\\n // 'Paris'. Should show each translation once.\\n $this->assertPageCounts('test-field-paris', ['es' => 1, 'fr' => 1, 'en' => 1], 'Paris field filter');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67ba6629c790b9142d7c23fd589219d0\",\n \"score\": \"0.53589445\",\n \"text\": \"public function actionIndex($idCategoria = null, $vendido = \\\"false\\\", $novo = \\\"false\\\" )\\n { \\n \\n// $query = Produto::find()->orderBy(['vendido'=>SORT_DESC]);\\n// $dataProvider = new ActiveDataProvider([\\n// 'query' =>$query ,\\n// ]);\\n $query = Produto::find()->orderBy(['nome'=>SORT_DESC]);\\n \\n \\n \\n \\n if($idCategoria != 0){\\n $query->andFilterWhere([\\\"=\\\", \\\"id_categoria\\\", $idCategoria]);\\n }\\n if($vendido == \\\"true\\\"){\\n $query->andFilterWhere([\\\"=\\\", \\\"vendido\\\", 0]);\\n }\\n if($novo == \\\"true\\\"){\\n \\n $query->andFilterWhere([\\\"=\\\", \\\"novo\\\", 0]);\\n \\n \\n }\\n $countQuery = clone $query;\\n $pages = new Pagination(['totalCount' => $countQuery->count()]);\\n $models = $query->offset($pages->offset)\\n ->limit($pages->limit)\\n ->all();\\n return $this->render('index', [\\n 'models' => $models,\\n 'idCategoria' => $idCategoria,\\n 'vendido' => $vendido,\\n 'novo' => $novo,\\n 'pages' => $pages\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5823c826c01172bd42527ad90591699\",\n \"score\": \"0.53576046\",\n \"text\": \"public function indextodos(Request $request)\\n {\\n\\n $buscar = $request->buscar;\\n $criterio = $request->criterio;\\n if ($buscar==''){\\n $reserva = reserva::join('cliente','reserva.idCliente','=', 'cliente.id')\\n ->join('salon','reserva.idSalon','=','salon.id')\\n ->select('reserva.id','reserva.fecha','reserva.fechaInicio','reserva.fechaFin','reserva.pago','cliente.nombre as nombrecli','salon.nombre as nombresalon','reserva.estado as estadoreser')\\n ->where('reserva.estado','<>','anulado' )\\n ->orderBy('reserva.id','desc')->paginate(20);\\n }\\n else{$reserva = reserva::join('cliente','reserva.idCliente','=', 'cliente.id')\\n ->join('salon','reserva.idSalon','=','salon.id')\\n ->select('reserva.id','reserva.fecha','reserva.fechaInicio','reserva.fechaFin','reserva.pago','cliente.nombre as nombrecli','salon.nombre as nombresalon','reserva.estado as estadoreser')\\n ->where('cliente.'.$criterio, 'like', '%'. $buscar . '%' ) \\n ->orderBy('reserva.id','desc')->paginate(20);\\n }\\n return [\\n 'pagination' => [\\n 'total' => $reserva->total(),\\n 'current_page' => $reserva->currentPage(),\\n 'per_page' => $reserva->perPage(),\\n 'last_page' => $reserva->lastPage(),\\n 'from' => $reserva->firstItem(),\\n 'to' => $reserva->lastItem(),\\n ],\\n 'reserv' =>$reserva\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24653f7a60ecb7a2ae8f41a55324e64c\",\n \"score\": \"0.535633\",\n \"text\": \"public function index(Request $request)\\n {\\n $filtro = \\\"\\\";\\n $order = \\\" id \\\";\\n $order_type = \\\"asc\\\";\\n $id_emissora = \\\"\\\";\\n $id_programa = \\\"\\\";\\n\\n if ($request->input(\\\"filtro\\\") != \\\"\\\") {\\n $str_filt = str_replace(\\\"'\\\", \\\"''\\\", $request->input(\\\"filtro\\\"));\\n $filtro .= \\\" and ( texto like '%\\\" . $str_filt . \\\"%' ) \\\";\\n }\\n if ($request->input(\\\"id_programa\\\") != \\\"\\\") {\\n $id_programa = \\\\App\\\\Http\\\\Dao\\\\ConfigDao::getIDByOrigem($request->input(\\\"id_programa\\\"), \\\"programa\\\");\\n if ($id_programa != \\\"\\\") {\\n $filtro .= \\\" and ev.id_programa = \\\" . $id_programa;\\n }\\n }\\n if ($request->input(\\\"id_emissora\\\") != \\\"\\\") {\\n $id_emissora = \\\\App\\\\Http\\\\Dao\\\\ConfigDao::getIDByOrigem($request->input(\\\"id_emissora\\\"), \\\"emissora\\\");\\n if ($id_emissora != \\\"\\\") {\\n $filtro .= \\\" and ev.id_emissora = \\\" . $id_emissora;\\n }\\n }\\n if ($request->input(\\\"com_busca_salva\\\") != \\\"\\\") {\\n $filtro .= \\\" and p.com_temp_search = \\\" . $request->input(\\\"com_busca_salva\\\");\\n }\\n $filtro .= \\\" and ev.tipo = 'pai' \\\";\\n\\n if ($request->input(\\\"data_inicio\\\") != \\\"\\\") {\\n $filtro .= \\\" and ev.data >= '\\\" . $request->input(\\\"data_inicio\\\") . \\\" 00:00:00' \\\";\\n }\\n if ($request->input(\\\"data_fim\\\") != \\\"\\\") {\\n $filtro .= \\\" and ev.data <= '\\\" . $request->input(\\\"data_fim\\\") . \\\" 23:59:59' \\\";\\n }\\n if ($request->input(\\\"min_id\\\") != \\\"\\\") {\\n $filtro .= \\\" and p.id > \\\" . $request->input(\\\"min_id\\\");\\n }\\n\\n if ($request->input(\\\"order\\\") != \\\"\\\") {\\n $order = $request->input(\\\"order\\\");\\n }\\n\\n if ($request->input(\\\"order_type\\\") != \\\"\\\") {\\n $order_type = $request->input(\\\"order_type\\\");\\n }\\n\\n $itens = \\\\App\\\\Http\\\\Dao\\\\EventosArquivosDao::getListGridCad($filtro, $order, $order_type);\\n\\n return $this->sendResponse(array(\\\"qtde\\\" => count($itens), \\\"data\\\" => $itens));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93c6783d913fef58d6eaf5c7126b1721\",\n \"score\": \"0.5355447\",\n \"text\": \"public function paginate($limit);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93c6783d913fef58d6eaf5c7126b1721\",\n \"score\": \"0.5355447\",\n \"text\": \"public function paginate($limit);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54518e421a1f283f8f61f111c40eab1d\",\n \"score\": \"0.5349417\",\n \"text\": \"function fn_twigmo_get_pages(\\n &$params,\\n &$join,\\n &$condition,\\n &$fields,\\n &$group_by,\\n &$sortings,\\n &$lang_code\\n) {\\n if (!empty($params['page_types'])) {\\n $condition['twg_pages_page_type'] = db_quote(\\n \\\" AND ?:pages.page_type IN (?a)\\\",\\n $params['page_types']\\n );\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9879fb94b18b7f47ea7da964c469d94b\",\n \"score\": \"0.5342611\",\n \"text\": \"function seo_pagination() {\\n\\t\\t$this->start = intval($this->get_vars['start']);\\n\\t\\t$this->start = ( $this->start > 0 ) ? $this->seo_static['start'] . $this->get_vars['start'] : '';\\n\\t\\tunset($this->get_vars['start']);\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":770,"cells":{"query_id":{"kind":"string","value":"7bc6e59c0904ba086b7601929bcb07d3"},"query":{"kind":"string","value":"check if user registered,his data(username,password) is correct ,if yes set session and cookie"},"positive_passages":{"kind":"list like","value":[{"docid":"237f7f028699624e6c00e085e728e775","score":"0.0","text":"function user_login($username, $password)\n{\n if (user_exists($username) == FALSE) { // check if user exists\n return \"You are not a registered member\";\n }\n else if (confirm_user($username, md5($password)) === FALSE) { // check if login data is correct\n return \"Authentication error\";\n }\n else {\n $_SESSION['username'] = $username;\n $_SESSION['user_pass'] = $password;\n $row = dbFetchAssoc(confirm_user($username, md5($password)));\n $_SESSION['user_id'] = $row['id'];\n $_SESSION['last_login'] = $row['last_login'];\n // if choose remember_me save his login in the cookie\n if (isset($_POST['remember_me'])) {\n $_SESSION['user_rem'] = $_POST['remember_me'];\n setcookie(\"cookname\", $_SESSION['username'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\n setcookie(\"cookpass\", $_SESSION['user_pass'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\n setcookie(\"cookrem\", $_SESSION['user_rem'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\n } else {\n //destroy any previously set cookie\n setcookie(\"cookname\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\n setcookie(\"cookpass\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\n setcookie(\"cookrem\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\n }\n\n //Login history\n $sql = \"UPDATE users SET last_login= NOW() WHERE username='\" . $username . \"'\";\n\n dbQuery($sql);\n\n header('Location:' . WEB_ROOT . 'index.php');\n exit;\n }\n}","title":""}],"string":"[\n {\n \"docid\": \"237f7f028699624e6c00e085e728e775\",\n \"score\": \"0.0\",\n \"text\": \"function user_login($username, $password)\\n{\\n if (user_exists($username) == FALSE) { // check if user exists\\n return \\\"You are not a registered member\\\";\\n }\\n else if (confirm_user($username, md5($password)) === FALSE) { // check if login data is correct\\n return \\\"Authentication error\\\";\\n }\\n else {\\n $_SESSION['username'] = $username;\\n $_SESSION['user_pass'] = $password;\\n $row = dbFetchAssoc(confirm_user($username, md5($password)));\\n $_SESSION['user_id'] = $row['id'];\\n $_SESSION['last_login'] = $row['last_login'];\\n // if choose remember_me save his login in the cookie\\n if (isset($_POST['remember_me'])) {\\n $_SESSION['user_rem'] = $_POST['remember_me'];\\n setcookie(\\\"cookname\\\", $_SESSION['username'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\\n setcookie(\\\"cookpass\\\", $_SESSION['user_pass'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\\n setcookie(\\\"cookrem\\\", $_SESSION['user_rem'], time() + 60 * 60 * 24 * COOKIE_TIME_OUT);\\n } else {\\n //destroy any previously set cookie\\n setcookie(\\\"cookname\\\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\\n setcookie(\\\"cookpass\\\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\\n setcookie(\\\"cookrem\\\", '', time() - 60 * 60 * 24 * COOKIE_TIME_OUT);\\n }\\n\\n //Login history\\n $sql = \\\"UPDATE users SET last_login= NOW() WHERE username='\\\" . $username . \\\"'\\\";\\n\\n dbQuery($sql);\\n\\n header('Location:' . WEB_ROOT . 'index.php');\\n exit;\\n }\\n}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"6ccf19fc4ef459b35538d6545b06be62","score":"0.7156944","text":"public function login($thepost)\n{\n extract($thepost);\n $password = md5(mysql_real_escape_string($password));\n //check if present in sul_signup_profile\n $r = mysql_query(\"SELECT * from sul_signup_profile where Username = '$uname' AND Password = '$password'\");\n if (mysql_num_rows($r))// user exist\n {\n //create session\n session_start();\n $r = mysql_fetch_assoc($r);\n foreach($r as $k=>$v)\n {\n $_SESSION[$k] = $v;\n }\n header(\"location:\".SITE_DIR.\"/home.php\");\n //signin\n }\n else\n {\n \n header(\"location:$sender_url?errmsg=1\");\n //wrong credentials\n }\n}","title":""},{"docid":"984ef10632d99e0c7370aa8f75958382","score":"0.7081511","text":"public function checkLogin(){\n if( !empty( $_SESSION['userid']) && !empty( $_SESSION['sessionhash'] ) ){\n $this->_userinfo['userid'] = $_SESSION['userid'];\n $this->_userinfo['sessionhash'] = $_SESSION['sessionhash'];\n return true;\n }\n return false;\n \n }","title":""},{"docid":"155896ab8318909206d2fd6554e2f414","score":"0.7071743","text":"function checkLogin(){\n if(session(\"?userName\") && session(\"userName\") != null){\n return true;\n }else{\n //header(\"location: http://219.224.30.99:8081/jwcdd/Login/login\");\n }\n return true;\n }","title":""},{"docid":"613d0473c863f6427d05a35612493846","score":"0.70150846","text":"function IsLoggedIn() {\n if($_COOKIE['name']!=null) {\n $resid=GetSelectField(\"SELECT * FROM user WHERE name='\".$_COOKIE['name'].\"' && password='\".$_COOKIE['password'].\"'\",\"id\");\n if($resid!=\"\") {\n\t\t$_SESSION[\"userid\"] = $resid;\n return true;\n }\n } \n return false;\n }","title":""},{"docid":"ed430bfb7f112808c519e7edd9666af6","score":"0.699291","text":"public function cookieLogin() {\n if(!empty($this->_data)) {\n Session::insert($this->_session_name, $this->_data->id);\n }\n }","title":""},{"docid":"e37de6331186c785853d2f25e2eb1751","score":"0.69751006","text":"public function check_session(){ \n\t\t$this->disable_cache(); \n\t\t//$this->Session->destroy();\n\t\tif(count($this->Session->read('USER'))){\n\t\t\treturn true;\n\t\t}else if($this->Cookie->read('KEYUSER') != ''){ \n\t\t\t$this->loadModel('Register');\n\t\t\t$data = $this->Register->find('first', array('fields' => array('first_name','last_name','email_id','id','mobile','test1_complete','test2_complete','otp','language_id'),\n\t\t\t'conditions' =>array('Register.id' => $this->Functions->decrypt($this->Cookie->read('KEYUSER')), 'is_deleted' => 'N', 'status' => '1')));\t\t\t\t\t\n\t\t\tif(empty($data)){\n\t\t\t\t$this->Session->setFlash('Invalid Attempt', 'default', array('class' => 'alert alert-danger'));\t\t\t\t\n\t\t\t\t$this->redirect('/register/');\n\t\t\t}\t\t\n\t\t\t$this->Session->write('USER', $data);\n\t\t\treturn true;\n\t\t}else if($this->Cookie->read('KEYUSER') == ''){\n\t\t\t$this->Session->setFlash('Session got expired', 'default', array('class' => 'alert alert-danger'));\t\n\t\t\t$this->redirect('/register/');\n\t\t\t// echo \"\";\n\t\t\t// $this->redirect('/');\n\t\t}else{ \n\t\t\t$this->Session->setFlash('Session got expired', 'default', array('class' => 'alert alert-danger'));\n\t\t\t$this->delete_cookie('KEYUSER');\t\n\t\t\t$this->redirect('/register/');\n\t\t}\n\t}","title":""},{"docid":"b63c69a0a782112ba4431f3d95da3ddf","score":"0.69650996","text":"public static function cookieLogin() : bool {\n\t\t$user\t= new Models\\User();\n\t\tif ( static::viaCookie( $user ) ) {\n\t\t\tstatic::applySession( $user );\n\t\t\tstatic::refreshCookie();\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}","title":""},{"docid":"2201536ae3ddc8856fee929a0afd8809","score":"0.69323534","text":"static function login(){\n // Load Database Record\n $user = new Axon(F3::get('dbprefix').'users');\n $user->load(array('username=:un',array(':un'=>F3::get('POST.username'))));\n\n // Check Password\n if(sha1(F3::get('POST.password').$user->salt) != $user->password)\n F3::error(404);\n\n // Create Session\n $session = new Axon(F3::get('dbprefix').'sessions');\n $session->id = sha1(mcrypt_create_iv(12,MCRYPT_DEV_URANDOM));\n $session->start = time();\n $session->expires = time() + F3::get('logintime');\n $session->username = $user->username;\n $session->access = $user->access;\n $session->save();\n\n setcookie('pg_session', $session->id, $session->expires);\n }","title":""},{"docid":"ce482375434270c192bc6b0116b8f1d7","score":"0.69084615","text":"function setUserCookie() {\n if(isset($_COOKIE['username'])) {\n setcookie('username',$_COOKIE['username']);\n }\n else if(isset($_POST['username']) && (validLogin() || validLogin())) {\n setcookie('username',$_POST['username']);\n }\n }","title":""},{"docid":"d92b7a78771eee42f1cf6734a742f69f","score":"0.6898792","text":"public function checkuser(){\n\t\t$email = req('email');\n\t\t$password = req('password');\n\t\tdbSelect('SELECT * FROM '.ADMIN.' WHERE email = ' . Nullify($email) . ' AND password = ' . Nullify(sha1($password)) . '',$bUserFound,$aUserFound);\n\t\tif($bUserFound){\n\t\t\t $newdata = array(\n\t\t\t 'id' => $aUserFound[0]['id'],\n\t\t\t 'email' => $aUserFound[0]['email'],\n\t\t\t 'logged_in' => TRUE\n\t\t\t );\n\t\t\t$this->session->set_userdata($newdata);\n\t\t\treturn array('success'=>'yes');\n\t\t}else{\n\t\t\treturn array('success'=>'falied');\n\t\t}\n\t}","title":""},{"docid":"b1733d5836f65b7bcff69b053707300c","score":"0.68909186","text":"function validarUsuario(){\n if(isset($_SESSION['email'])){\n return true;\n }elseif (isset($_COOKIE['email'])) {\n $_SESSION['email'] = $_COOKIE['email'];\n return true;\n }else{\n return false;\n }\n}","title":""},{"docid":"1420851e9a7dbbc14d8ca5fad7f7f445","score":"0.6803762","text":"function login()\n{\n\t$email = $_POST['usr_email'];\n\t$passwd = $_POST['usr_passwd'];\n\t\n\tif(isset($email) && isset($passwd))\n\t{\n\t\t// find user\n\t\t$usr = User::selectByEmail($email);\n\t\tif(isset($usr))\n\t\t{\n\t\t\t// check password\n\t\t\tif($passwd == $usr->usr_password)\n\t\t\t{\n\t\t\t\t// set user session ID\n\t\t\t\t$usr->usr_sessionid = session_id();\n\t\t\t\t\n\t\t\t\t// set last visit time\n\t\t\t\t$usr->usr_lastvisit = date(\"Y-m-d H:i:s\");\n\t\t\t\t\n\t\t\t\t// update in DB\n\t\t\t\t$usr->update();\n\t\t\t\tConfigManager::getInstance()->logDebug('User '.$usr->toJSON().' logged in with session '.session_id());\n\t\t\t\t\n\t\t\t\treturn json_encode('OK');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn json_encode('WRONG_USR_PASSWD');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn json_encode('WRONG_USR_PASSWD');\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn json_encode('REQUEST_ERROR');\n\t}\n}","title":""},{"docid":"19f19ac86f3925b1eceb894f07210f62","score":"0.67992604","text":"public function login(){\n\t\t$login = mysqli_real_escape_string($this->db, $_POST['login']); \n\t\t$password = $_POST['password']; \n\t\t$user = Helper::select($this->db, \"SELECT id, login, password FROM user WHERE '$login' = login LIMIT 1\", 1);\n\t\t\t\n\t\tif(crypt($password, $user['password']) == $user['password']){\n\t\t\t$this->setUser($login);\n\t \t\tSession::set(['login-status' => \"default\"]);\n\t\t}\n\t\telse{ \n\t\t\tSession::set(['login-status' => \"fail\"]);\n\t\t}\n\t}","title":""},{"docid":"d5f9d80debb11c3592d78622912958e0","score":"0.67969966","text":"public function verificarLogin() {\n // verifica se nao existir session ou se existir e esta vazio a session\n if (!isset($_SESSION['dmrlogin']) || (isset($_SESSION['dmrlogin']) && empty($_SESSION['dmrlogin']))) {\n header(\"Location:\" . BASE_URL . \"login\");\n exit;\n }\n }","title":""},{"docid":"f098ecd4e80d41b2da52ac4d1197eedc","score":"0.67732656","text":"function checkSession($afterlogin='/') {\n\t\tif (@$this->edrnAuth->isLoggedIn()) {\n\t\t\t// Store the details for the templates to use\n\t\t\t$this->Session->write('username',@$this->edrnAuth->getCurrentUsername());\n\t\t\t$this->set('LdapUser',@$this->edrnAuth->getCurrentUsername());\n\t\t\t// We have a valid user, so just return\n\t\t\treturn;\n\t\t} else {\n\t\t\t// No magic cookie, no party. send them to the login page\n\t\t\t$this->Session->write('afterlogin',$afterlogin);\n\t\t\t$this->redirect('/users/login/');\n\t\t}\n }","title":""},{"docid":"0de37ca6b879e54f75ce9e798c1e2d67","score":"0.6766077","text":"function logged_in(){\n\n\tif ( isset($_SESSION['email']) || isset($_COOKIE['email']) ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}","title":""},{"docid":"e5713dfd586f2769f8f1d963ff278d80","score":"0.6763505","text":"public function login()\n {\n $user = $this->checkCredentials();\n if ($user) {\n $this->_user = $user;\n $_SESSION['user'] = $user;\n $_SESSION['loggedIn'] = true;\n $_SESSION['del_ids'] = null;\n $_SESSION['del_multi_ids'] = null;\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['user_email'] = $this->_email;\n $_SESSION['password'] = $user['password'];\n return true;\n }\n return false;\n }","title":""},{"docid":"042e67957e333ff1308fc28143838c9f","score":"0.67558336","text":"private function log_in() {\n\t\tglobal $db, $table_prefix, $cj_pathfinder, $cj_modules, $cj_error,$cj_theme;\n\n\t\t$cj_error->put_error(\"DEBUG\", \"checking login details\");\n\t\t$username = $db->escape($_POST['username']);\n\t\t$password = $_POST['password'];\n\t\t$check_username = $db->get_row(\"SELECT user_id, user_key, user_salt, count(*) as is_real FROM \".$table_prefix.\"users WHERE user_name='\".$username.\"' LIMIT 0,1\", ARRAY_A);\n\t\tif ($check_username['is_real'] > 0) {\n\t\t\t$attempted_key = md5($check_username['user_salt'].$password);\n\t\t\tif ($attempted_key == $check_username['user_key']) {\n\t\t\t\t$_SESSION['user_id'] = $check_username['user_id'];\n\t\t\t\t$_SESSION['user_key'] = $check_username['user_key'];\n\t\t\t} else {\n\t\t\t\t//need to work this bit out!\n\t\t\t\t$this->login_attempt = FALSE;\n\t\t\t}\n\t\t} else {\n\t\t\t//need to work this bit out!\n\t\t\t$this->login_attempt = FALSE;\n\t\t}\n\t}","title":""},{"docid":"c6933f73cf6e9d893d32a06ce2a5af4e","score":"0.6747253","text":"public function login()\n\t{\n\t\tif ($this->input->post())\n\t\t{\n\t\t\t$login_data = _post('login');\n\t\t\t$password = _post('password');\n\t\t\t$cookie_password = _post('password');\n\t\t\t$remember = _post('remember');\n\n\t\t\t$result = $this->admin->check_login($login_data, $cookie_password);\n\t\t\t\n\t\t\tif ($remember == 1)\n\t\t\t{\n\t\t\t\t//echo 'set';\n\t\t\t\t$this->input->set_cookie('login', $login_data, 86500);\n\t\t\t\t$this->input->set_cookie('password', $cookie_password, 86500);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//echo \"unset\";\n\t\t\t\tdelete_cookie('login');\n\t\t\t\tdelete_cookie('password');\n\t\t\t}\n\n\t\t\tif ($result)\n\t\t\t{\n\t\t\t\techo \"true\";\n\t\t\t\tset_session('login_data', $login_data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"false\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['display'] = $this->load->view('admin/signup/login', '', true);\n\t\t\t$this->load->view('admin/common_signup', $data);\n\t\t}\n\t}","title":""},{"docid":"9b2469abb61dec17af7f9cce7f10e44f","score":"0.6738578","text":"function logged_in(){\n\tif (isset($_SESSION['email']) || isset($_COOKIE['email'])) {\n\t\treturn true;\n\t} else\n\t{\n\t\treturn false;\n\t}\n}","title":""},{"docid":"be9f295ee572b5a46dd764f0e05f77f9","score":"0.6733309","text":"public function login(){\n $this->logname = $_POST['logname'];\n $this->password = $_POST['password'];\n if($this->find_account()){ $this->make_session();\n return true;\n }\n else{ return false; }\n }","title":""},{"docid":"d6c8100e08a64bcf4a57bcd7af405ff5","score":"0.672198","text":"public function signIn(){ \r\n $user = new User();\r\n $user->username = $_POST['username'];\r\n $user->password = md5($_POST['password']);\r\n $verif = User::compareUser($user);\r\n if($verif->username == \"\"){\r\n echo \"error_username\";\r\n }\r\n else{\r\n if($user->password == $verif->password){\r\n echo $user->username;\r\n $_SESSION['username'] = $user->username;\r\n }\r\n else{\r\n echo \"error_password\";\r\n }\r\n }\r\n }","title":""},{"docid":"3fb70e7d159797daef9c0521b020a448","score":"0.67215246","text":"function f_login($email,$password){\r\n\t $res3=mysql_query(\"SELECT * FROM f_regform WHERE email='$email' and password='$password'\");\r\n\t\t$Row=mysql_num_rows($res3);\r\n\t\tif($Row==0){ return false; \r\n\t\t//echo \"0 row\";\r\n\t\t}else{ \r\n\t\tsession_start();\r\n\t\t$userData = mysql_fetch_assoc($res3);\r\n\t\t$_SESSION['fname']=$userData['fname'];\r\n\t\t$_SESSION['lname']=$userData['lname'];\r\n\t\t$_SESSION['email']=$userData['email'];\r\n\t\treturn true;\r\n\t\r\n\t\t}\r\n\t}","title":""},{"docid":"dac8317dd827a3793a83b6b3d2561197","score":"0.6697053","text":"public function login()\n {\n $db = new Apps_Models_Users();\n $query = $db->buildQueryParams([\n \"where\" => \"username = :username AND password = :password\",\n \"param\" => [\n \":username\" => trim($this->username),\n \":password\" => $this->encryptPassword()\n ]\n ])->selectOne();\n\n if($query) {\n $_SESSION[\"userId\"] = $query[\"id\"];\n $_SESSION[\"username\"] = $query[\"username\"];\n return true; \n }\n return false;\n }","title":""},{"docid":"43abd9f59f96931f4d7a7d6459fd1e60","score":"0.669062","text":"public function logged_in()\n\t{\n\t\tif ($this->_ci->session->userdata('user_id') > 0 && $this->_ci->session->userdata('hash'))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telseif (get_cookie($this->_cookie_name)) \n\t\t{\n\t\t\tif ($this->_check_cookie() === TRUE) \n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}","title":""},{"docid":"a6eb939d854befc585601c352c4decee","score":"0.6677383","text":"function login() {\n\t\tglobal $_SESSION;\n\n\t\t$query = \"SELECT `name` FROM `{$this->table}` WHERE `name`='{$this->name}' AND `pass`=sha1('{$this->pass}') AND (`site` = '{$this->site}' OR `site` = 'ri')\";\n\t\t$reply = InkXMS_Database::query($query);\n\n\t\tif(mysql_num_rows($reply) > 0) {\n\t\t\t// if the user verification was successful\n\t\t\t// register the user with the session\n\t\t\t$valid_user = $this->name;\n\t\t\t$_SESSION[$this->site.'_valid'] = 'boolean';\n\n\t\t\t$info = mysql_fetch_assoc($reply);\n\t\t\tmysql_free_result($reply);\n\t\t\t$_SESSION['user'] = $info['name'];\n\n\t\t\t// make it official\n\t\t\t$this->check = true;\n\t\t}\n\t\telse {\n\t\t\t$this->console = \"username or password is incorrect\";\n\t\t}\n\t}","title":""},{"docid":"b9cd8e4762926b6d200186df1d5c83d6","score":"0.66664165","text":"function AuthenticateCookie($uid, $session)\n{\n\t$result = mysql_query(\"SELECT session FROM users WHERE id = '$uid'\") or die();\n\t// check if correct result found\n\tif(mysql_num_rows($result) < 1) {\n\t\treturn false;\n\t} else {\n\t\t$res = mysql_fetch_assoc($result);\n\t\t$sql_session = $res['session'];\n\n\t\t// check validity \n\t\tif($sql_session == $session) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n}","title":""},{"docid":"ddee4d2776c0d63107202ec574186830","score":"0.6662699","text":"public function login()\n {\n if($this->user->isLogon())\n {\n //$this->locate($this->createLink('user', 'index'));// m=index&f=index\n session_unset();\n }\n\n /* Passed account and password by post or get. */\n if(!empty($_POST))\n {\n $name = $this->post->name;\n $password = $this->post->password;\n\t\t\t\t\t\t$code = $this->post->code;\n\n\t\t\t\t\t\t$try = $this->session->try;\n\t\t\t\t\t\tif(!$try) $try = 0;\n\t\t\t\t\t\t$try ++;\n\n\t\t\t\t\t\t//$failed = $this->session->failed;\n\t\t\t\t\t\t//if(!$failed) $failed = 0;\n\n\t\t\t\t\t\t//两次登录之间的时间间隔需要限制\n\t\t\t\t\t\t$time = $this->session->time;\n\t\t\t\t\t\tif(!$time)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$time = time();\n\t\t\t\t\t\t\t$diff = $this->config->minTime;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$diff = time() - $time;\n\t\t\t\t\t\t\t$time = time();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->session->set('time',$time);\n\n\t\t\t\t\t\t//echo \"$time,$diff\";\n\n\n\t\t\t\t\t\t//rand(1000,9999)\n\t\t\t\t\t\tif(!$this->session->code //check code未生成,漏洞\n\t\t\t\t\t\t\t|| $try > $this->config->maxTry //重试次数超过限制\n//\t\t\t\t\t\t\t|| $failed > $this->config->maxFailed\n\t\t\t\t\t\t\t|| strtolower($code) <> strtolower($this->session->code)\n\t\t\t\t\t\t\t|| $diff < $this->config->minTime//抵御蛮力攻击\n\t\t\t\t\t\t\t) die(js::error($this->lang->user->error->codeMismatch));\n\n $user = $this->user->identify($name, $password);\n\n\t\t\t\t\t\t$this->session->set('try',$try);\n\n if($user)\n {\n /* Authorize him and save to session. */\n session_regenerate_id(true);//重新生成session,抵抗固定会话攻击\n\n $this->session->remove('try');\n $this->session->remove('code');\n $this->session->remove('time');\n $this->session->remove('ctime');\n\n //session溢出攻击\n $token = rand() . ':' . $this->server->remote_addr . ':' . $this->server->remote_port . ':' .time() . ':' . $user->rand;\n// echo $token;\n $token = crc32($token);\n $this->session->set('token', $token);\n setcookie('token', $token);\n\n $this->session->set('user', $user);\n die(js::locate(helper::createLink('user', 'index'), 'parent'));\n }\n else\n {\n \t //$failed ++;\n\t\t\t\t\t\t\t\t//$this->session->set('failed', $failed);\n die(js::error($this->lang->user->error->loginFailed));\n }\n }\n else\n {\n $this->display();\n }\n }","title":""},{"docid":"e98259f02224bfce426db65957d32971","score":"0.66569906","text":"public function session(){\n $exist = !empty($this->data['id_user']) && !empty($this->data['token']);\n if (!$exist) $this->response(['error' => true, 'errorCode' => 403, 'errorMessage' => 'not autorized']);\n $Security = new Security();\n $Security->set_token($this->data['token']);\n $Security->set_id($this->data['id_user']);\n $uotorized = $Security->authorize();\n if(!$uotorized) $this->response(['error' => true, 'errorCode' => 403, 'errorMessage' => 'not autorized!']);\n $this->session = (int) $this->data['id_user'];\n return true;\n }","title":""},{"docid":"ff86e4530dced1f94a8691541867b62f","score":"0.66412985","text":"public function p_login() {\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\n // Hash user-submitted password\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\n // Check is email/password combination is correct.\n $q = \"SELECT token FROM users WHERE email='\".$_POST['email'].\"' AND password='\".$_POST['password'].\"'\";\n $token = DB::instance(DB_NAME)->select_field($q);\n\n\n // Check if the user token exists\n if ($token) {\n // Login success\n setcookie('token', $token, strtotime('+1 week'), '/');\n\n\n Router::redirect('/posts/index');\n }\n else {\n // Login failure\n Router::redirect('/users/login/'.ERROR_INVALIDUSRPWD);\n }\n }","title":""},{"docid":"2818d4d3a8e1b720e80983abe9fa66ac","score":"0.66352963","text":"function auth_check(){\n session_start();\n if (!isset($_SESSION['user'])) {\n $this->redirect(\"/login\");\n exit();\n }\n }","title":""},{"docid":"c2531cce13cf0a3cb60bf8248a399a81","score":"0.6633372","text":"function login_verification_user()\r\n {\r\n global $connection;\r\n $username=strip_tags($_POST['username']);\r\n $password=strip_tags($_POST['password']);\r\n $password=encrypt($password);\r\n $user_data=bool_login_verification($username,$password,'user');\r\n if ( $user_data[0] >0 )//user_id\r\n {\r\n set_user_session_id($user_data[0]);\r\n set_user_session_name($user_data[1]);\r\n //print_r($_SESSION);\r\n redirect(\"user_notification.php\"); \r\n }\r\n else\r\n {\r\n show_error_message(\"Incorrect Username or Password\");\r\n } \r\n }","title":""},{"docid":"025bd508d8fbd4c7d80c2459b86b970d","score":"0.6625727","text":"public function log_in($data){\r\n $email=$data['email'];\r\n $password=md5($data['password']);\r\n// $time= time();\r\n\r\n $sql=\"SELECT user_id,name,username FROM user_info WHERE email='$email' AND password='$password' AND Status='activated'\";\r\n $query=mysqli_query($this->connection,$sql);\r\n $user= mysqli_fetch_assoc($query);\r\n\r\n if($user){\r\n// session_start();\r\n $_SESSION['user_id']=$user['user_id'];\r\n $_SESSION['name']=$user['name'];\r\n $_SESSION['username']=$user['username'];\r\n \r\n \r\n// echo '
    ';\r\n//                    print_r($count_user);\r\n//                    exit();\r\n                        header('Location:user/index.php');\r\n                    }else{\r\n                        $msg='
    Sorry..Email or Password are not valid
    ';\r\n return $msg;\r\n }\r\n }","title":""},{"docid":"f1cc0c80142924b3febaf321c0278f6a","score":"0.66255677","text":"function Login($name, $password) {\n $resid=GetSelectField(\"SELECT * FROM user WHERE name='$name' && password='\".MD5($password+$dbsalt).\"'\",\"id\");\n if($resid==\"\") {\n return false;\n } else {\n \n $_SESSION[\"loggedin\"] = \"TRUE\";\n $_SESSION[\"name\"] = $name;\n $_SESSION[\"userid\"] = $resid;\n \n setcookie('name', $name, strtotime(\"+1 month\"), \"/\", \".uni-muenster.de\" );\n setcookie('password', MD5($password+$dbsalt), strtotime(\"+1 month\"), \"/\", \".uni-muenster.de\");\n $_COOKIE['name'] = $name; \n $_COOKIE['password'] = $password; \n\n return true;\n }\n }","title":""},{"docid":"b2ea8cf59496c03725efdf985dc3e760","score":"0.6618249","text":"public function SetLoginStatus()\t{\n\n\t\t\t$query = \"SELECT * \n FROM users \n WHERE userName = '{$_POST['name']}' \n AND userPass = '{$_POST['pass']}'\";\n\n\t\t\tif ( ReturnRows($query) == 1) {\n\t setcookie('this->userName' , $_POST['name'] , time() + 1000);\n\t setcookie('this->password' , $pass , time() + 0);\n\t $_SESSION['this->loggedIn'] = 1;\n\t }\n\n\t\t}","title":""},{"docid":"66cc5e52ddf74217749bb564330679a6","score":"0.6617521","text":"public function login() {\n \n // création des nouveaux objets\n $user = new User();\n $dao = new DAOUser();\n $secu = new MySecu();\n \n // Récupération des variables nécessaires à la connexion\n $user->setPseudo($_POST[\"pseudo\"]);\n $user->setPassword($_POST[\"password\"]);\n \n // si le l'utilisateur est bien confirmé en BDD alors on appelle la methode getRang en argument de Privilege_id()\n // et on génère le Cookie\n if($dao->verifUser()){\n $user->setPrivilege_id($dao->getRang($_POST['pseudo'])['rang']);\n $user->setId($dao->getRang($_POST['pseudo'])['id']);\n\n $secu->generateCookie($user);\n \n \n }else{\n header(\"Location: http://dreamfrom/\");\n }\n \n }","title":""},{"docid":"901d0e4c0e1674c139cd3b025199f137","score":"0.6614523","text":"function login($data){\n\n global $conn;\n $email = mysqli_real_escape_string($conn, $data[\"email\"] );\n $password = mysqli_real_escape_string($conn, $data[\"password\"] );\n \n\n $query = mysqli_query($conn, \"SELECT * FROM user WHERE email ='$email'\");\n\n if( $row = mysqli_fetch_assoc($query) ){\n\n $passwordAsli = $row[\"password\"];\n if( password_verify($password, $passwordAsli) ){\n\n $_SESSION[\"user\"] = $row[\"username\"];\n $_SESSION[\"login\"] = true;\n if( isset($data[\"remember\"]) ){\n setcookie('id',$row[\"id\"],time()+ 60*60*24*7);\n setcookie('key',hash('sha256',$row[\"username\"]),time()+ 60*60*24*7);\n }\n return true;\n }\n \n}else{\n return false; \n}\n\n}","title":""},{"docid":"39d20864d82d6b92796e653f732d934f","score":"0.6608201","text":"public function authenticUser()\n\t\t{\n\t\t\t$DB = new Database(HOST,USER,PASS);\n\t\t\tif(isset($_SESSION['emailUser']) && isset($_SESSION['passwordUser'])) {\n\t\t\t\t$L_user = $_SESSION['emailUser'];\n\t\t\t\t$L_pass = $_SESSION['passwordUser'];\n\t\t\t\t$condition = \"WHERE email = '{$L_user}' AND password = '{$L_pass}'\";\n\t\t\t\t$selection = $DB->QRSelect('_user',$condition);\n\t\t\t\tif ($selection) {\n\t\t\t\t\tsession_destroy(); \n\t\t\t\t\tunset($_SESSION['passwordUser']); \n\t\t\t\t\tunset($_SESSION['emailUser']); \n\t\t\t\t\techo '';\n\t\t\t\t\tdie;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsession_destroy();\n\t\t\t\tunset($_SESSION['emailUser']);\n\t\t\t\tunset($_SESSION['passwordUser']); \n\t\t\t\techo '';\n\t\t\t\tdie; \n\t\t\t}\n\t\t}","title":""},{"docid":"0d2175ffe2d6ef0f4d7cf8e053153e3c","score":"0.6606196","text":"private function log_user_in($data) {\n $uname = (isset($data['uname'])) ? clean(trim($data['uname'])) : Session::get_var('uname');\n\t\t\t$pass = clean(trim($data['pass']));\n $referer = $this->referer;\n\t\t\t\t$this->_auth->el_login($uname, $pass);\n\t\t\t\tif($this->_auth->is_login()) {\n if(!strpos('/login', $this->referer)) {\n $this->referer = $referer;\n return true;\n } else {\n $this->referer = get_option('home');\n return true;\n }\n\t\t\t\t} else {\n\t\t\t\t\t$this->_error = $this->_auth->get_auth_last_error();\n\t\t\t\t}\n return false;\n }","title":""},{"docid":"2c143fa6eabd3b3148112cb8b97a0db3","score":"0.6593335","text":"function require_auth()\n {\n global $errors;\n $cookie_login = false;\n $username = '';\n $password = '';\n\n // If person has already logged in...\n if ($this->logged_in) {\n return TRUE;\n }\n\n // Authenticate by POST data\n if (isset($_POST['username'])) {\n $username = $_POST['username'];\n $password = $_POST['password'];\n $person = get_first(\"SELECT * FROM persons\n WHERE username = '$username'\n AND password = '$password'\n AND deleted = 0\");\n if (! empty($person['person_id'])) {\n $_SESSION['person_id'] = $person['person_id'];\n $this->load_user_data($person);\n return true;\n\n } else {\n $errors[] = \"Vale kasutajanimi või parool\";\n }\n }\n\n // Authenticate by cookie\n //var_dump($_COOKIE);\n //die();\n if (isset($_COOKIE['teodor_SID'])) {\n $username = get_one(\"SELECT username FROM persons WHERE person_SID='{$_COOKIE['teodor_SID']}'\");\n if (!empty($username)) $cookie_login = true;\n }\n\n $username = $cookie_login ? $username : (isset($_POST['username']) ? $_POST['username'] : NULL);\n $password = isset($_POST['password']) ? $_POST['password'] : NULL;\n $remember_me = isset($_POST['remember_me']) && $_POST['remember_me'] == 'on' ? 1 : 0;\n\n // Authenticate by POST data\n if ($cookie_login or isset($_POST['username'])) {\n\n // Authenticate user against Google\n if ($cookie_login or $this->login($username, $password)) {\n\n // Check if person already exsists in db\n $person = get_first(\"SELECT person_id, is_admin, person_first_visit, person_last_visit FROM persons\n WHERE username = '$username'\n AND deleted = 0\");\n\n if (empty($person['person_id'])) {\n\n // Person did not exsist, insert this person and log the person in\n $now = date('Y-m-d H:i:s');\n $person = array('username' => $username, 'is_admin' => 0, 'person_first_visit' => $now, 'person_last_visit' => $now);\n $person['person_id'] = insert('persons', $person);\n\n } else {\n\n // Person existed, update person's last visit time\n q(\"UPDATE persons SET person_last_visit=NOW() WHERE username = '$username'\");\n }\n\n // Log the person in\n $_SESSION['person_id'] = $person['person_id'];\n\n // Set remember me cookie\n if ($remember_me) {\n\n // Generate 7 char random string\n $SID = substr(md5(rand()), 0, 7);\n\n // Set cookie to expire in January 2038\n $time = 2147483647;\n\n // Associate that random string with this user\n update('persons', array('person_SID' => $SID), \"username = '$username'\");\n\n // Write that random string to cookie\n setcookie(\"teodor_SID\", $SID, $time, '/');\n }\n\n if(!get_one(\"SELECT setup FROM persons WHERE person_id={$person['person_id']}\")){\n header('Location: ' . BASE_URL . 'user_setup');\n exit();\n }\n\n //Load user data and return\n $this->load_user_data($person);\n return true;\n\n } else {\n\n // Login failed - set error\n $errors[] = __('Wrong username or password', true);\n }\n }\n\n // Display the login form\n require 'templates/auth_template.php';\n\n // Prevent loading the requested controller (not authenticated)\n exit();\n }","title":""},{"docid":"aa2dfe9464c4a3bdfb6e1fd32da10cfc","score":"0.65926206","text":"function login_user($email,$password ,$remember, $username){\r\n $sql = \"SELECT passwd, id FROM users WHERE email='\".escape($email).\"' AND active=1 \";#use only this if not encrypted\r\n $result = execute($sql);\r\n confirm($result);\r\n \r\n if(row_count($result) ==1){\r\n #once password is found the fetch the password then decrypt it.\r\n $row = fetch_array($result);\r\n\r\n $db_password = $row['passwd'];\r\n if(password_verify($password, $db_password)){\r\n if($remember =\"on\"){\r\n setcookie('email',$email, time()+86400);\r\n // setcookie('username',$username,time()+86400);\r\n }\r\n $_SESSION['email'] = $email;\r\n \r\n \r\n return true; \r\n\r\n\r\n }else{\r\n return false;\r\n }\r\n\r\n\r\n\r\n return true;\r\n }else{\r\n return false;#if no result found return false.\r\n }\r\n\r\n}","title":""},{"docid":"46494deb51e49b9dcdaf3212432d88fa","score":"0.65866363","text":"function check_auth_user(){\n global $_SESSION;\n if (isset($_SESSION['usu']))\n {\n return true;\n }\n else\n {\n return false;\n }\n }","title":""},{"docid":"98f6ec375c1d82709cb38710636376af","score":"0.65828073","text":"function validate_user() // Funkcija koja se poziva nakon uspješnog logiranja korisnika\n{\n $_SESSION['valid'] = true;\n $_SESSION['username'] = $username; // Pamti korisničko ime trenutno ulogiranog korisnika.\n}","title":""},{"docid":"e3281dba745c02d219b346c58e8943b7","score":"0.6578678","text":"function login($usuario) {\n $_SESSION[\"email\"] = $usuario[\"email\"];\n setcookie(\"email\", $usuario[\"email\"], time()+3600);\n }","title":""},{"docid":"6f96c546d70d73380fe8d965b0266139","score":"0.65777856","text":"public function autenticate(){\n\t\t//obtiene la cookie del navegador\n\t\t$contenido = $_COOKIE[\"id_user_sesion_kawaii\"]; \n\t\tif($contenido == null) {\n\t\t\t//uncomment para usar login\n\t\t\theader(\"Location: http://localhost:8000/usuarios/login\");\n\t\t\texit;\n\t\t}\n\t\t\n\t}","title":""},{"docid":"cac0d65defeb7727125f67f73ec280d0","score":"0.6568076","text":"public static function login()\r\n {\r\n \r\n //$record = accounts::findUser($_POST['uname']); // testing \r\n $record = new account();\r\n $record = accounts::findUserbyUsername($_POST['uname']);\r\n if ($record == FALSE) {\r\n // for wrong pasword and usrname @vm368\r\n\t\t\theader('Location: index.php?wrongpasswordusername=1');\r\n \r\n } else {\r\n if($record->checkPassword($_POST['psw']) == TRUE) {\r\n echo 'login';\r\n session_start();\r\n $_SESSION[\"userID\"] = $record->id;\r\n $_SESSION[\"userEmail\"] = $record->email;\r\n print_r($_SESSION);\r\n header('Location: index.php?page=tasks&action=allOneUser&id='.$record->id);\r\n } else {\r\n \r\n echo 'enter correct password';\r\n }\r\n }\r\n }","title":""},{"docid":"5f4c9b924a7412c8c5bb1134fcc58d25","score":"0.6567918","text":"function logged_in()\n{\n\n if (isset($_SESSION['email']) || isset($_COOKIE['email'])) {\n\n return true;\n } else {\n return false;\n }\n}","title":""},{"docid":"638bf31b74fca7954f0f871b27a4405e","score":"0.6564178","text":"function validaSessao() {\r\n\tif ($_SESSION [\"usuario\"] != $_COOKIE [\"i3geousuariologin\"]) {\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}","title":""},{"docid":"6cd3303b00c5c69293a9af0fe886d898","score":"0.6562747","text":"public function checkCookies() {\n\t// $this->cookieStorage->getCookieValue(self::$username) === $this->getUsernameInput() &&\n // $this->cookieStorage->getCookieValue(self::$password) === $this->sessionHelper->encryptString($this->getPasswordInput()))\n \n if ($this->cookieStorage->isCookieSet(self::$uniqueID)) {\n \t\n // Check if uniqid is valid from right browser //TODO set uniqueID is based on browser-detail\n if ($this->cookieStorage->getCookieValue(self::$uniqueID) === $this->sessionHelper->setUniqueID() )\n {\n\t\t \n\t // Check if the uniqid cookie is valid and not time-manipulated\n\t if (!$this->cookieStorage->isCookieValid($this->cookieStorage->getCookieValue(self::$uniqueID))) {\n\t \t\n\t // Destroy all cookies\n \t\t $this->destroyCookies();\n\t\n\t // Set an alert\n\t $this->sessionHelper->setAlert(\"Wrong information in cookie.\");\n\t return false;\n\t }\n\n\t return true;\n\t\t\t }\n \t else {\n // Destroy all cookies\n $this->cookieStorage->destroy(self::$uniqueID);\n $this->cookieStorage->destroy(self::$username);\n $this->cookieStorage->destroy(self::$password);\n\t\t \n // Set an alert\n $this->sessionHelper->setAlert(\"Wrong information in cookie.\");\n return false;\n }\n } else {\n return false;\n }\n }","title":""},{"docid":"285eff13fb0bdedd1f1e8ae814ae5a2d","score":"0.6557762","text":"public function login() {\n\t\tif($_SERVER['REQUEST_METHOD'] == 'POST'){\n\t\t\t// Sanitize data \n\t\t\t$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\n\t\t\t// Init data \n\t\t\t$data = [\n\t\t\t\t'username' => trim($_POST['username']),\n\t\t\t\t'password' => trim($_POST['password']),\n\t\t\t\t'username_err' => '',\n\t\t\t\t'password_err' => ''\n\t\t\t];\n\t\t\t// Validate username \n\t\t\t\tif(empty(trim($_POST['username']))){\n\t\t\t\t\t$data['username_err'] = \"Please enter your username\";\n\t\t\t\t}else{\n\t\t\t\t\t$data['username'] = trim($_POST['username']);\n\t\t\t\t} // end of username validation \n\t\t\t// Validate password \n\t\t\t\tif(empty(trim($_POST['password']))){\n\t\t\t\t\t$data['password_err'] = \"Please enter your password\";\n\t\t\t\t} else {\n\t\t\t\t\t$data['password'] = trim($_POST['password']);\n\t\t\t\t} // end of password validation\n\n\t\t\t// Validate credentials \n\t\t\tif(empty($data['username']) && empty($data['password'])){\n\t\t\t\t// prepare a select statement \n\t\t\t\t$sql = \"SELECT id, username, password FROM tbl_user WHERE username = :username\";\n\t\t\t\tif($sth = $this->db->dbh->prepare($sql)){\n\t\t\t\t\t// Bind values with params \n\t\t\t\t\t$sth->bindParam(\":username\", $param_username, PDO::PARAM_STR);$sth->bindParam(\":password\", $param_password, PDO::PARAM_STR);\n\n\t\t\t\t\t// Set parameters \n\t\t\t\t\t$param_username = trim($data['username']);\n\t\t\t\t\t$param_password = trim($data['password']);\n\t\t\t\t\t// Attempt to execute prepared statement\n\t\t\t\t\tif($sth->execute()){\n\t\t\t\t\t\t// check if the username exists, if yes then verify password \n\t\t\t\t\t\tif($sth->rowCount() < 0 ){\n\t\t\t\t\t\t\tif($row = $sth->fetch()){\n\t\t\t\t\t\t\t\t$id = $row['id'];\n\t\t\t\t\t\t\t\t$username = $row['username'];\n\t\t\t\t\t\t\t\t$hashpassword = $row['password'];\n\t\t\t\t\t\t\t\tif(password_verify($password, $hashed_password)){\n\t\t\t\t\t\t\t\t\t// password is correct , so start a new session \n\t\t\t\t\t\t\t\t\tSession::init();\n\t\t\t\t\t\t\t\t\t// Set data in Session \n\t\t\t\t\t\t\t\t\tSession::set('login', true);\n\t\t\t\t\t\t\t\t\tSession::set('id', $id);\n\t\t\t\t\t\t\t\t\tSession::set('username', $username);\n\t\t\t\t\t\t\t\t\tSession::set('loginmsg', \"
    Login successfull
    \");\n\n\t\t\t\t\t\t\t\t\t// Redirect user to welcome page\n\t\t\t\t\t\t\t\t\theader('location:../index.php');\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$data['password_err'] = \"Password did not match\";\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} else{\n\t\t\t\t\techo \"Data not found\";\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else {\n\t\t\t// Init data \n\t\t\t$data = [\n\t\t\t\t'username' => '',\n\t\t\t\t'password' => '',\n\t\t\t\t'username_err' => '',\n\t\t\t\t'password_err' => ''\n\t\t\t];\n\t\t\t\n\t\t\t// Load login page\n\t\t\theader('location:login.php');\n\n\t\t} // end of server request checking \n\n\t}","title":""},{"docid":"ef925fa1c9287f3fb29d3290d30cdabf","score":"0.6552759","text":"function verify()\n{\n\tsession_start();\n\tif (isset($_SESSION['user']))\n\treturn true;\n\t\n\t\n\t// check to see if visitor has just tried to log on\n\n if(isset($_POST['u_name'])&&(isset($_POST['u_password'])))\n {\n $u_name=$_POST['u_name'];\n $u_password=md5($_POST['u_password']);\n\n // validate username and password\n\n include('ccconfig.php');\n include('dbal.php');\n\n\t$conn=openconn();\n\n\tselectdb();\n\n $sql=\"Select * from users where email=\\\"$u_name\\\" and password=\\\"$u_password\\\" \";\n $qry=mysql_query($sql,$conn);\n $fetchqry=mysql_fetch_array($qry);\n \n \n if($u_password==$fetchqry['password'])\n {\n $_SESSION['user']=$fetchqry['email'];\n return true;\n }\n else\n {\n header(\"location:index.php\");\n }\n }\n \n}","title":""},{"docid":"c68bc1db336a988980fbb70155906135","score":"0.6552527","text":"function auto_login(){\r\n\t\t\tif(!empty($_COOKIE['auth'])){\r\n\t\t\t\t$split = explode(':', $_COOKIE['auth']);\r\n\r\n\t\t\t\tif(count($plit) != 2){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\t//Recupere via ce cookie selector, token\r\n\t\t\t\tlist($selector,$token) = $split;\r\n\r\n\t\t\t\t$req = $db->prepare('SELECT auth_tokens.id, auth_tokens.token, auth_tokens.user_id \r\n\t\t\t\t\t\t\t\t\t users.id, users.pseudo, users.avatart, users.email\r\n\t\t\t\t\t\t\t\t\t FROM auth_tokens \r\n\t\t\t\t\t\t\t\t\t LEFT JOIN users\r\n\t\t\t\t\t\t\t\t\t ON auth_tokens.user_id = users.id\r\n\t\t\t\t\t\t\t\t\t WHERE selector = ?' AND execute >= CURDATE());\r\n\t\t\t\t$req->execute([base64_decode($selector)]);\r\n\r\n\t\t\t\t$data = $req->fetch(PDO::FETCH_OBJ);\r\n\t\t\t\tif ($data) {\r\n\t\t\t\t\tif (hash_equal($data->token,hash('sha256',base64_decode($token)))) {\r\n\t\t\t\t\t\tsession_regenerate_id(true);\r\n\t\t\t\t\t\t$_SESSION['user_id'] = $data->id;\r\n\t\t\t\t\t\t$_SESSION['pseudo'] = $data->pseudo;\r\n\t\t\t\t\t\t$_SESSION['avatar'] = $data->avatar;\r\n\t\t\t\t\t\t$_SESSION['email'] = $data->email;\r\n\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}","title":""},{"docid":"18d7d0008ae35529b433acb53e40f98e","score":"0.6548544","text":"public function userLogin(){\n\t\t// Si el email y la password no estan vacias se procede\n\t\tif (!empty($_POST['email']) && !empty($_POST['password'])) {\n\t\t\t// La variable response se convierte en un objeto que contendra el resultado de la consulta\n\t\t\t$response = $this->model->userLogin('*',\"email = '\".$_POST['email'].\"'\");\n\t\t\t// Se obtiene la consulta en la posicion 0 y se almacena en la variable response, ahora es un array\n\t\t\t$response = $response[0];\n\t\t\t// Si la password de la db es igual a la password recibida del formulario se imprime 1\n\t\t\tif ($response['password'] == $_POST['password']) {\n\t\t\t\t$this->createSession($response['username']);\n\t\t\t\techo 1;\n\t\t\t}\n\t\t}else{\n\t\t\techo \"No hay coincidencia\";\n\t\t}\n\t}","title":""},{"docid":"52553bd677c17ce7c61fb7630b4bf34c","score":"0.65447545","text":"function users_pre_authenticate() {\n\t\n\t$user = new User();\n\t$user = $user->find('WHERE login_token = \"'.$_COOKIE['remember_me'].'\"');\n\tif(isset($user[0])) {\n\t\t$_SESSION['user_id'] = $user[0]->id;\n\t\t$_SESSION['current_user'] = $user[0];\n\t}\n}","title":""},{"docid":"68bfabbebab450a719f112f1a02c8be5","score":"0.6537953","text":"private function check_login(){\n\t\t\tif(isset($_SESSION['user_id'])){\n\t\t\t\t$this->user_id = $_SESSION['user_id'];\n\t\t\t\t$this->logged_in = true;\n\t\t\t} else {\n\t\t\t\tunset($this->user_id);\n\t\t\t\t$this->logged_in = false;\n\t\t\t}\n\t\t}","title":""},{"docid":"7f2099cb4dbfe6205bc180e2da6adefd","score":"0.65273035","text":"function loginauth()\n {\n $this->set(\"title\",\"IEEE NIEC | User Login\");\n $username=sqlSafe($_POST['username']);\n $password=sqlSafe($_POST['password']);\n\n $salt=$this->User->getUserSalt($username);\n if($salt==false)\n {\n $this->set(\"message\",\"Username/Password Invalid\");\n }\n else\n {\n $inPass=$this->User->getUserPassword($username);\n if($inPass==generateHash($password.$salt) && $this->User->getUserStatus($username)==1)\n {\n $userID=$this->User->getUserID($username);\n initiateSession();\n setSessionData(\"user_id\",md5($userID));\n setSessionData(\"user_username\",$username);\n setSessionData(\"user_identifier\",md5($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR']));\n $this->set(\"message\",\"Login successful\");\n header(\"LOCATION: /indexs/home\");\n }\n else\n {\n $this->set(\"message\",\"Username/Password Invalid or Account not activate.\");\n }\n }\n }","title":""},{"docid":"1c8fe315bc3b438ad5cdb4a37c29fa47","score":"0.65226793","text":"public function p_login() {\n\n // Get the encrypted value of the password\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n // Get the token\n $sql = 'SELECT token, email\n FROM users\n WHERE email = \"'.$_POST['email'].'\"\n AND password = \"'.$_POST['password'].'\"';\n\n $data = DB::instance(DB_NAME)->select_row($sql);\n\n $token = $data['token'];\n $email = $data['email'];\n\n if ($token) {\n setcookie('token', $token, strtotime('+1 year'), '/');\n Router::redirect('/index/index');\n }\n else {\n Router::redirect(\"/users/login/err\");\n }\n }","title":""},{"docid":"7957e26b9aa398e65a36d3801c4b8343","score":"0.65184474","text":"public static function check_login() {\n $db = Db::getInstance();\n if(isset($_REQUEST['submit'])) {\n // print_r($_REQUEST);\n $sql= \"Select * from users where email='\".$_REQUEST['username'].\"' and password='\".$_REQUEST['password'].\"'\";\n $result= $db->query($sql);\n $num= $result->fetchColumn();\n if($num>0) {\n foreach($db->query($sql) as $row) {\n // echo $row['email'];\n $_SESSION['session_email']= $row['email'];\n $_SESSION['session_user_id']= $row['user_id'];\n $_SESSION['session_first_name']= $row['first_name'];\n $_SESSION['session_last_name']= $row['last_name'];\n\n }\n } \n \n }\n }","title":""},{"docid":"3bf5845ccb8bec8164ab22da13f3b451","score":"0.6513424","text":"public function check_session_auth() {\n // Check if session exist\n if (isset($this->session->userdata['username'])) {\n // Check if user checked remember me checkbox\n if (isset($this->session->userdata['autodelete'])) {\n if ($this->session->userdata['autodelete'] < time()) {\n // Delete session and redirect to home page\n $this->session->unset_userdata('username');\n $this->session->unset_userdata('member');\n $this->session->unset_userdata('autodelete');\n } else {\n redirect('/user/home');\n }\n } else {\n redirect('/user/home');\n }\n }\n }","title":""},{"docid":"fa2e20fc46c0192119781cb9c79765ae","score":"0.65126884","text":"function login($data, $remember = false){\n\t\tif($this->exists()){\n \t\t$session_data = array(\n 'username' => $this->data()->staff_username,\n 'staff_db_id' => $this->data()->id,\n 'staff_id' => $this->data()->staff_id,\n 'isLoggedIn' => TRUE\n );\n\n $this->session->set_userdata($session_data);\n }else{\n\t// grab user input\n\n\t\t//print_r($data);exit;\n\t\tunset($data['log_show']);\t// this is the name attribute for the button clicked for login section\n\n \t$username = $data['staff_username'];\n $password = $data['password'];\n\t\t$remember = '';\n\n\t\tif(isset($data['rememberme'])){\n\n \t$remember = $data['rememberme'];\n\n\t\t}\n\n\t\t$user = $this->find($username); // this find the username in the database\n\n\t\tif($user){\n\t\t\tif($this->hash_created->decode_password($password, $this->data()->password)){\n\t\t\t\t// setting user session\n\t\t\t\t$session_data = array(\n 'username' => $this->data()->staff_username,\n 'staff_db_id' => $this->data()->id,\n 'staff_id' => $this->data()->staff_id,\n 'isLoggedIn' => TRUE\n );\n\n\t\t\t\t$this->session->set_userdata($session_data);\n\n\t\t\t\t// if remember me function is activated\n \tif($remember == 'on' && $remember != ''){\n $hash = $this->hash_created->unique();\n $hashCheck = $this->db->get_where('users_session', array('staff_id' => $this->data()->staff_id));\n\n if(!$hashCheck->num_rows){\n $this->db->insert('users_session', array(\n 'staff_id' => $this->data()->staff_id,\n 'ip_address'\t => $this->input->ip_address(),\n 'hash' => $hash\n ));\n }else{\n $hash = $hashCheck->row()->hash;\n }\n // setting the cookie\n $cookie = array(\n\t\t 'name' => $this->config->item('cookie_name'), // username cookie_hash\n\t\t 'value' => $hash,\n\t\t 'expire' => $this->config->item('cookie_expiry') // the expiry date is a day privilege\n\t\t );\n\n\t\t\t $this->input->set_cookie($cookie);\n\t\t\t\t\t// $this->input->cookie('username', false);\n\n \t} // end remember me function\n \t\techo 1;\n \t \t\t \t\treturn true;\n \t \t\t}else{\n \t \t\t\treturn 3; // incorrect password\n\t\t\t\treturn false;\n \t \t\t}\n\t\t}else{\n\t\t\t// not found, can't find the username\n\t\t\treturn 2;\n\t\t\treturn false;\n\t\t}\n\t}\n\t\treturn 4; // if nothing, can't login\n\t\treturn false;\n\t}","title":""},{"docid":"91219bb898db13f1815460f97196367f","score":"0.6501701","text":"function logged_in() {\n if(isset($_SESSION['mail']) || isset($_COOKIE['name'])) {\n return false;\n }\n else {\n return true;\n }\n}","title":""},{"docid":"769fe33806d8ce5e8feee08320365469","score":"0.64931244","text":"public static function userAuthenticated() : bool\n {\n if (!isset($_SESSION['acc_number'] , $_SESSION['token'])) {\n return false;\n }\n return true;\n }","title":""},{"docid":"0db0fd47e40140871c666662954521bd","score":"0.64883333","text":"public function login()\n {\n $admin_login = $this->get_admin_login();\n // ambil username dan password user yang login dari database\n $admin_from_db = $this->get_admin(\"SELECT * FROM admin WHERE username='$admin_login->username'\");\n // validasi\n if ($admin_login->password === $admin_from_db->password) {\n // set session\n $_SESSION[\"user_logged\"] = (object) [\n \"username\" => $admin_from_db->username,\n \"role\" => \"admin\"\n ];\n return true;\n } else {\n return false;\n }\n }","title":""},{"docid":"4fd3c5dd944d6d6a31d60cac404d4032","score":"0.64882314","text":"function _manage_login(){\n if((!isset($_COOKIE['username']))||(!isset($_SESSION['admin']))){\n _alert_back('非法登录');\n }\n}","title":""},{"docid":"bb8442f92c5966c32d787bf187436a17","score":"0.64879405","text":"function user_authorized() {\n\t\tif (isset($_COOKIE['login']) && $_COOKIE['login'] &&\n\t\t\tisset($_COOKIE['passwd']) && $_COOKIE['passwd']) {\n\t\t\tif (user_pass_valid($_COOKIE['login'], $_COOKIE['passwd'])){\n\t\t\t\t$_SESSION[\"logged_user\"] = $_COOKIE['login'];\n\t\t\t\treturn (1);\n\t\t\t}\n\t\t}\n\t\treturn (0);\n\t}","title":""},{"docid":"8628fcb0b14d5440396f768796ae6ed9","score":"0.6479218","text":"function authd() {\n $app = registry('app');\n $sess = $app->request->session->get('user');\n\n if ($sess === false) {\n return false;\n }\n\n return true;\n }","title":""},{"docid":"366f81c461d9c0cf9aa472f1b3d93c88","score":"0.64728963","text":"public function verificar_session(){\n\t\t\t\n\t\t}","title":""},{"docid":"43c367bc5a98e9f3b8b49c4c5b0ef161","score":"0.64646673","text":"private function register(){\n\t\t$user = D(\"User\");\n\t\tif(!$data = $user->create()){\n // 防止输出中文乱码\n header(\"Content-type: text/html; charset=utf-8\");\n exit($user->getError());\n\t\t}\n\t\t$userId = $user->add($data);\n\t\tsession('starballkids_userId', $userId);\n\t\tsession('starballkids_userName', I('userName'));\n\t\tsession('starballkids_email', I('email'));\n\t\t//注册成功后把当前session的购物车加到用户下面\n\t\t$this->appendSessionToUser();\n\t\t//从哪里跳到登录页面,跳回去\n\t\tif(session('fromAction') != ''){\n\t\t\t$actionArray = C('FROM_ACTION');\n\t\t\t$actionDetail = $actionArray[session('fromAction')];\n\t\t\t$this->redirect($actionDetail['url'], $actionDetail['params']);\n\t\t}\n\t}","title":""},{"docid":"d2ca710699d21af13d563ac1dcdcf628","score":"0.6462741","text":"public function checkSigninUser()\n {\n if ( !empty($_COOKIE['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin');\n // Check session('nsmle') if isset redirect to admin home page\n } else if ( !empty($_SESSION['nsmle']) ) {\n header('Location: ' . BASEURL . '/admin');\n }\n }","title":""},{"docid":"037ef8289b13377e7a14e66f63245522","score":"0.6462697","text":"public function checkLogin()\n {\n $user_ok = false;\n $user_id = \"\";\n $log_usename = \"\";\n if (isset($_SESSION['user_id']) && isset($_SESSION['username'])) {\n $user_id = preg_replace('#[^0-9]#', '', $_SESSION['user_id']);\n $log_usename = preg_replace('#[^a-z0-9]#i', '', $_SESSION['username']);\n // Verify the user\n $user_ok = $this->evalLoggedUser($user_id, $log_usename);\n } else if (isset($_COOKIE[\"user_id\"]) && isset($_COOKIE[\"username\"])) {\n $_SESSION['user_id'] = preg_replace('#[^0-9]#', '', $_COOKIE['user_id']);\n $_SESSION['username'] = preg_replace('#[^a-z0-9]#i', '', $_COOKIE['username']);\n $user_id = preg_replace('#[^0-9]#', '', $_SESSION['user_id']);\n $log_usename = preg_replace('#[^a-z0-9]#i', '', $_SESSION['username']);\n // Verify the user\n $user_ok = $this->evalLoggedUser($user_id, $log_usename);\n }\n return $user_ok;\n }","title":""},{"docid":"963d7114396cd43aaee83ffadccf9f3a","score":"0.64592606","text":"public static function logged_in(){\r\n\r\n if(isset($_SESSION['username']) && isset($_SESSION['id'])){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }","title":""},{"docid":"c4854cb08642ec5e0469b1be430f5b71","score":"0.6452056","text":"private function check_login() {\n\t\tif ( isset($_SESSION['id']) ) {\n\t\t\t$this->user_id = $_SESSION['id'];\n\t\t\t$this->username = $_SESSION['username'];\n\t\t\t$this->logged_in = true;\n\t\t\t$this->admin_rights = $_SESSION['admin_rights'];\n\t\t\t$this->hashed_email = $_SESSION['hashed_email'];\n\t\t} else {\n\t\t\tunset( $this->user_id );\n\t\t\tunset( $this->username);\n\t\t\t$this->logged_in = false;\n\t\t} // end of isset\n\t}","title":""},{"docid":"26bb2a834e6d6422460fe27154ffccc1","score":"0.6451311","text":"public function doLogin(){\n\t\t$data = array();\n\t\t$data['username'] = $_POST[\"username\"];\n\t\t$data['password'] = $_POST[\"password\"];\n\t\t$user = D('User','Home')->getLocalUser($data['username'],$data['password']);\n\t\tif($user['username']&&$user['userid']){//login success\n\t\t\t$validates = D('Home.Validation');\n\t\t\t$status = $validates->getStatus($user['userid']);\n\t\t\tif($status==0){\n\t\t\t\t$this->assign('jumpUrl',U('Home/Public/login'));\n\t\t\t $this->error('该账户已经注册,但是没有通过邮箱验证。通过邮箱验证后即可激活帐号');\n\t\t\t}else if($status==1){\n\t\t\t\t$userservice = new UserService();\n\t\t\t\t$user['usertype'] = 'user';\n\t\t\t\tif($userservice->registerLogin($user,false))\n\t\t\t\t{\n\t\t\t\t\tU('Home/User/index','',true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->assign('jumpUrl',U('Home/Public/login'));\n\t\t\t $this->error('用户名或密码错误');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->assign('jumpUrl',U('Home/Index/index'));\n\t\t\t $this->error('非法账户!');\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{//login fail\n\t\t\t$this->assign('jumpUrl',U('Home/Public/login'));\n\t\t\t$this->error('用户名或密码错误');\n\t\t}\n\t}","title":""},{"docid":"4ad6ef238a9579bc5b8e83669c87a13d","score":"0.6450615","text":"public function checklogin() {\n\t\t\t\n\t\tif (!$this->input->post()) {\n\t\t\taudit_log(\"Error: parametri post non impostati. (login/checklogin)\");\n\t\t\texit(\"accesso non autorizzato\");\n\t\t}\n\t\t\n\t\t$post=$this->input->post();\n\t\t\n\t\tif ( (!isset($post['username'])) || (!isset($post['password'])) ) {\n\t\t\taudit_log(\"Error: dati post login errati o incompleti: \".json_encode($post).\". (login/checklogin)\");\n\t\t\techo \"Login errato\";\n\t\t\texit();\n\t\t}\n\t\t\n\t\t$post['password']=sha1($post['password']);\n\t\n\t\tif ($user=$this->users->checkLogin($post)) {\n\t\t\t$this->session->user=$user;\t\t\t\n\t\t\t$this->users->setLastLogin($user->username);\n\t\t\taudit_log(\"Message: login effettuato. Dati utente: \".json_encode($user).\". (login/index)\");\n\t\t\thttp_response_code(200);\n\t\t}else{\n\t\t\taudit_log(\"Error: login errato. Dati login: \".json_encode($post).\" (login/checklogin)\");\n\t\t\thttp_response_code(401);\n\t\t}\n\t\t\n\t}","title":""},{"docid":"2b46f985c46048b22b49ccf91568954c","score":"0.6440932","text":"function validateLogin(){\n $logged = $this->userManager->checkLogin($_POST['username'], hash('sha256', $_POST['password']))->fetch();\n if($logged){\n $_SESSION['login'] = $logged;\n header('Location: /admin');\n } else {\n header('Location: /');\n }\n }","title":""},{"docid":"faf22a3ef358179aa1729744516ce2b5","score":"0.6437138","text":"private function doLoginWithSessionData()\n {\n $this->user_is_logged_in = true; // ?\n }","title":""},{"docid":"2ce0400fa235650d1abf4479e0e927ae","score":"0.6434879","text":"private function session_login() {\n $this->_auth->el_login(Session::get_var('user_login'), Session::get_var('user_pass'));\n $referer = $this->referer;\n \t\tif($this->_auth->is_login()) {\n if(!strpos('/login', $this->referer)) {\n $this->referer = $referer;\n return true;\n } else {\n $this->referer = get_option('home');\n return true;\n }\n \t\t} else {\n \t\t\t$this->_error = $this->_auth->get_auth_last_error();\n \t\t}\n return false;\n }","title":""},{"docid":"7831dc290669ec92866bed71fefadf70","score":"0.6427877","text":"static function loginWithForm($db) {\n $user = $_POST[\"username\"];\n $pass = $_POST[\"password\"];\n $passHash = sha1($pass);\n\n $q = 'SELECT `userID`,`username`,`passHash`,`cookieHash` FROM `user` WHERE username = :user AND passHash = :passHash';\n $ps = $db->prepare($q);\n\n $ps->execute([\"user\"=>$user,\"passHash\"=>$passHash]);\n\n\n if($ps->rowCount() == 1) {\n $user_data = $ps->fetch();\n\n // logged in successfully\n $cookieHash = sha1(time().$passHash);\n $q = \"UPDATE `user` SET `cookieHash` = ? WHERE username = ?\";\n $ps = $db->prepare($q);\n\n $ps->execute([$cookieHash,$user]);\n\n\n setcookie(\"user\",$user,time()+60*60*24*7);\n setcookie(\"h\",$cookieHash,time()+60*60*24*7); \n \n return $user_data;\n } \n }","title":""},{"docid":"272f4b4f25907a3874737ddae30977c9","score":"0.6424914","text":"function registerUser() {\n\t$uname = strip_tags($_POST['name']);\n\t$umobile = strip_tags($_POST['mobile']);\n\t$uemail = strip_tags($_POST['email']);\n\t$upassword = strip_tags($_POST['password']);\n\t$ucpassword = strip_tags($_POST['cpassword']);\n\n\t$validInputs = $uname != '' && $umobile != '' && $uemail != '' && $upassword != '' && ($upassword == $ucpassword);\n\tif ($validInputs) {\n\n\t\t$userExists = qSelectObject(\"users\", \"email\", array(\"email\" => $uemail));\n\t\tif ($userExists) {\n\t\t\techo jsonResponse(array(\"success\" => false, \"message\" => \"This email is already in use!\"));\n\t\t\treturn;\n\t\t}\n\n\t\t// Hash password before inserting into database\n\t\t$hashed_password = getEncodedHash($upassword);\n\t\t$newUser = array(\"name\" => $uname, \"mobile\" => $umobile, \"email\" => $uemail, \"password\" => $hashed_password);\n\t\t$insertId = qInsert(\"users\", $newUser);\n\t\t// Creation error\n\t\tif (!$insertId) {\n\t\t\techo jsonResponse(array(\"success\" => false, \"message\" => \"Failed to create user. Please try again!\"));\n\t\t\treturn;\n\t\t}\n\n\t\t// Use encoded hash so that when we enable payments, we can identify sessions\n\t\t// by the hash of the email\n\t\t$_SESSION['id'] = getEncodedHash($uemail);\n\t\t$_SESSION['name'] = $uname;\n\t\t$_SESSION['email'] = $uemail;\n\t\t$_SESSION['uid'] = $insertId;\n\t\t//Setting the cookie at time of register\n\t\t//login_email: c1\n\t\t//login_pass: q\n\t\tsetcookie(\"c1\", $uemail, time() + (86400 * 30), \"/\");\n\t\tsetcookie(\"q\", $hashed_password, time() + (86400 * 30), \"/\");\n\t\techo jsonResponse(array(\"success\" => true, \"message\" => \"\", \"redirect\" => true, \"redirect_target\" => \"index.php\"));\n\t} elseif ($upassword != $ucpassword) {\n\t\techo jsonResponse(array(\"success\" => false, \"message\" => \"The passwords do not match!\"));\n\t} else {\n\t\techo jsonResponse(array(\"success\" => false, \"message\" => \"Invalid inputs!\"));\n\t}\n\treturn;\n}","title":""},{"docid":"e9e2a8c7da4a0477424649426bfc998e","score":"0.6424182","text":"public function loginUser()\n\t{\n\t\t//$tokenstr = json_encode($token);\n\t\t$coll = new FormCollection($this->request->data['usermodel']);\n\t\t$username = $coll->getItem('username');\n\t\t$pwd = $coll->getItem('password');\n\t\t\n\t\t$sen = new Sentinel();\n\t\t$usr = $sen->validateUser($username, $pwd);\n\t\t\n\t\tif($usr){\n\t\t\t$cookie = array(\n\t\t\t\t'name' => 'SiteToken',\n\t\t\t\t'value' => $usr->getId(),\n\t\t\t\t'expire' => 0,\n\t\t\t\t'secure' => FALSE\n\t\t\t);\n\t\t\t\n\t\t\t$succ = setcookie('SiteToken', $usr->getId(), 0, '/', '', FALSE);\n\t\t\t//echo \"Return value of setting cookie: \" . $succ;\n\t\t\t$this->redirect('/dashboard/');\n\t\t}else{\n\t\t\t$this->set(array('status'=>'fail'));\n\t\t\treturn $this->render(array('template'=>'login'));\n\t\t}\n\t\t\n\t}","title":""},{"docid":"a50a4a05ddc5799bdcf5d58567262dcd","score":"0.6420513","text":"public static function checkCookie() {\n if(isset($_COOKIE['login'])) {\n \n\t \n\t list($user, $token, $sig) = explode(':', $_COOKIE['login'], 3);\n\t \n\t $serverSig = hash('sha256', sha1(Account::$serverSignKey) . $token);\n\t \n\t \n\t if ($serverSig != $sig) {\n\t return false;\n\t } else {\n\t \n\t \n connect();\n \n $account = new Account($user);\n Account::reLogin($account, $account->getHash());\n\t return true;\n\t\t }\n\t }\n \n return false;\n }","title":""},{"docid":"1c31c5bf25a9205393c3d5b9bf4fb7ba","score":"0.6420151","text":"function login($username, $password){\n\tinclude_once(\"db.inc.php\");\n\tif($username == USERNAME && $password == USERPASS){\n\t\tsession_set_cookie_params(3600*6, '/', 'mtl.parkr.me');\n\t\tsession_id(SESSION_ID);\n\t\tsession_start();\n\t\tsession_register(SESSION_ID);\n\t\t$_SESSION['started'] = true;\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}","title":""},{"docid":"a17663f69bc508fbc1d61fd9e4efd91f","score":"0.64171785","text":"public function validateCookieAndLogIn(User $user) {\n\t\tassert (!is_null($user));\n\t\t$storedUser = $this->userDAL->getUserWithToken($user);\n\t\t\n\t\t// If it's null there is no data and the cookie is probably tampered with\n\t\tif (is_null($storedUser)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$result = ($user->getUsername() == $storedUser->getUsername() && $this->verifyHashedToken($user->getPassword(), $storedUser->getPassword()));\n\t\tif ($result) {\n\t\t\t$_SESSION[self::$loggedIn] = true;\n\t\t\t$_SESSION[self::$sessionUserLocation] = new loggedInUser($user->getUsername());\n\t\t}\n\t\treturn $result;\n\t}","title":""},{"docid":"3bba09d210cba30b6b880eaa4aa51592","score":"0.6416556","text":"public function CookieSet(){\n if (isset($_COOKIE[$this->_cookieUsername]) && isset($_COOKIE[$this->_cookiePassword])){\n return true;\n }\n else {\n return false;\n }\n }","title":""},{"docid":"65cc18c509d7403f05728194451106d7","score":"0.64163846","text":"public function login()\n {\n\n if(server('REQUEST_METHOD') == 'POST'){\n\n $email = $_POST['email'];//принимаем данные из формы (email,пароль)\n $password = $_POST['password'];\n\n if ($user = User::login($email, $password))\n {\n Session::set('email', $user['email']);//создаем сессию авторизованному пользователю\n header('Location: ' . server('HTTP_REFERER'));\n }\n else if (!empty($_POST)){//нужно чтобы если поля еще не заполнены ничем - не выводилась ошибка, что неправильный логин/пароль\n $errors = \"Вы ввели неправильный логин или пароль!\";\n Session::set('errors', $errors);\n redirect(301, server('HTTP_REFERER'));\n }\n\n }else{\n redirect(301, '/');\n }\n\n }","title":""},{"docid":"677f199e339783b7f461947957a84c92","score":"0.64124537","text":"public function login() {\n\t\t$name = filter_var(Helper::post('name'), FILTER_SANITIZE_STRING);\n\t\t$password = filter_var(Helper::post('password'), FILTER_SANITIZE_STRING);\n\n\t\t/*** now we can encrypt the password ***/\n\t\t$password = sha1($password);\n\n\t\ttry {\n\t\t\t//$dbh = $db->base;\n\t\t\t//$stmt= $dbh->base->query(\"SELECT id, name, password FROM users WHERE name = '$name' AND password = '$password'\");\n\t\t\t$stmt = $this -> db -> prepare(\"SELECT id, name, email, password FROM \".DBPREFIX.\"users WHERE (name = ? OR email = ?) AND password = ?\");\n\t\t\t$stmt -> execute(array($name, $name, $password));\n\n\t\t\t/*** check for a result ***/\n\t\t\t$user_id = $stmt -> fetchColumn();\n\n\t\t\t/*** if we have no result then fail boat ***/\n\t\t\tif ($user_id == FALSE) {\n\t\t\t\treturn 101;\n\t\t\t} else {\n\t\t\t\tHelper::session_set('id', $user_id);\n\t\t\t\t//Helper::session_set('user_name', $row['name']);\n\t\t\t\t//Helper::session_set('user_email', $row['email']);\n\t\t\t\t//$search = \"%$search%\";\n\t\t\t\t$user_data = $this -> db -> prepare(\"SELECT * FROM \".DBPREFIX.\"users WHERE name = ? OR email = ?\");\n\t\t\t\t$user_data -> execute(array($name, $name));\n\t\t\t\t$data = $user_data -> fetchAll();\n\t\t\t\tHelper::session_set('user_name', $data[0]['name']);\n\t\t\t\tHelper::session_set('user_email', $data[0]['email']);\n\t\t\t\tHelper::session_set('user_role', $data[0]['role']);\n\t\t\t\tHelper::session_set('user_access', $data[0]['role_id']);\n\t\t\t\t//var_dump($data[0]);\n\t\t\t\t//while ($row = $stmt -> fetch()) {\n\n\t\t\t\t//}\n\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t} catch(Exception $e) {\n\t\t\t/*** if we are here, something has gone wrong with the database ***/\n\t\t\treturn 102;\n\t\t}\n\t}","title":""},{"docid":"e3d80da2dcf9f4f8d59ebe45b1ccec99","score":"0.6406421","text":"public function IsAuthenticatedUser()\n { \n if(isset($_SESSION['user'])){\n return true;\n }\n else{\n return false;\n } \n }","title":""},{"docid":"6e7bc1820f5a30ec5e783c9565885f3e","score":"0.640456","text":"public function checkCredentials($username, $password) {\n if($this->getUsername()==$username && $this->getPassword()==$password) {\n if (!isset($_COOKIE[\"username\"])) {\n setcookie(\"username\", \"$username\", time() + (86400 * 7));\n setcookie(\"password\",\"$password\",time() + (86400 * 7));\n }\n return \"Yes\";\n } else {\n return \"No\";\n }\n }","title":""},{"docid":"5ccd218f66e07ba32ad58dba85010022","score":"0.6401537","text":"function login_user($email, $password, $remember){\n\n\t$result = query(\"SELECT password, id FROM users WHERE email='\".escape($email).\"' AND active=1\");\n\tconfirm($result);\n\n\tif (row_count($result) ==1 ) {\n\t\t\n\t\t$row = fetch_array($result);\n\n\t\t$db_password = $row['password'];\n\n\t\tif (md5($password)==$db_password ) {\n\n\t\t\t//set remember\n\t\t\tif ($remember == \"on\") {\n\t\t\t\tsetcookie('email', $email, time() + 86400 );\n\t\t\t}\n\t\t\t//\n\n\t\t\t$_SESSION['email'] = $email;\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\n\n\n\t}\n\n}","title":""},{"docid":"2543018583e38de711baea8570080921","score":"0.64015037","text":"function jakChecklogged() {\n\t if (isset($_COOKIE['jak_lcp_cookname']) && isset($_COOKIE['jak_lcp_cookid'])) {\n\t $_SESSION['jak_lcp_username'] = $_COOKIE['jak_lcp_cookname'];\n\t $_SESSION['jak_lcp_idhash'] = $_COOKIE['jak_lcp_cookid'];\n\t }\n\t\n\t /* Username and idhash have been set */\n\t if (isset($_SESSION['jak_lcp_username']) && isset($_SESSION['jak_lcp_idhash']) && $_SESSION['jak_lcp_username'] != $this->username) {\n\t /* Confirm that username and userid are valid */\n\t if (!JAK_userlogin::jakConfirmidhash($_SESSION['jak_lcp_username'], $_SESSION['jak_lcp_idhash'])) {\n\t \t/* Variables are incorrect, user not logged in */\n\t unset($_SESSION['jak_lcp_username']);\n\t unset($_SESSION['jak_lcp_idhash']);\n\t \n\t return false;\n\t }\n\t \n\t // Return the user data\n\t return JAK_userlogin::jakUserinfo($_SESSION['jak_lcp_username']);\n\n\t /* User not logged in */\n\t } else {\n\t \treturn false;\n\t }\n\t}","title":""},{"docid":"6a2d39df0676c07437dd8754900cc6b3","score":"0.63981324","text":"function aksi_login(){\n\t\t$username = $this->input->post('username');\n\t\t$password = $this->input->post('password');\n\t\t$where = array(\n\t\t\t'username' => $username,\n\t\t\t'password' => md5($password)\n\t\t\t);\n\t\t$cek = $this->UserLoginModel->cek_login($where)->num_rows();\n\t\tif($cek > 0){\n\t\t\t$data_session = array(\n\t\t\t\t'nama' => $username,\n\t\t\t\t'status_login'=>1\n\t\t\t\t);\n \n\t\t\t$this->session->set_userdata($data_session);\n \n\t\t\tredirect(site_url(\"dashboard\"));\n \n\t\t}else{\n\t\t\techo \"Username dan password salah !\";\n\t\t}\n\t}","title":""},{"docid":"85de01999543458dfbdce4c410cc7342","score":"0.6396937","text":"public function login(){\n if (isset($_POST)) {\n # Identificar el usuario\n $user = new User();\n $identity =$user->login($_POST['email']);\n //mantener usuario identificado\n if($identity && is_object($identity)){\n\t\t\t\t$_SESSION['identity'] = $identity;\n\t\t\t\t//identificacion de administrador\n\t\t\t\tif($identity->rol == 'admin'){\n\t\t\t\t\t$_SESSION['admin'] = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$_SESSION['error_login'] = 'Identificación fallida !!';\n }\n }\n header(\"Location:\".URL);\n }","title":""},{"docid":"cff2ba20bb5d16977e239b86889f6043","score":"0.63910264","text":"public function User_Login()\n\t {\n\t\t $active_user = $this->input->post('username');\n \t\t $is_user = get_cookie('active_user', TRUE);\n\n\t\t if (!$is_user) {\n\t\t\t set_cookie('active_user', $active_user, 10000);\n\n\t\t } else {\n\t\t\t delete_cookie('active_user');\n\t\t }\n\n\t\t $this->index();\n\t }","title":""},{"docid":"a0635c5d8fd4a85c24b85c71f6a6081b","score":"0.6390137","text":"public function checkLogin()\r\n {\r\n $this->form_validation->set_rules('username', 'Username', 'required|valid_email');\r\n $this->form_validation->set_rules('password', 'Password', 'required|callback_verifyUser');//callback is sort of \r\n if($this->form_validation->run()==false) //calling verifyUser fxn\r\n {\r\n $this->load->view('login');\r\n }\r\n else\r\n {\r\n $username = $this->input->post('username');\r\n $password = $this->input->post('password');\r\n // $data['username']= $username;\r\n //$data['password']= $password;\r\n $session_data = array(\"username\"=>$username);\r\n $this->session->set_userdata($session_data);\r\n \r\n redirect('splController/toLoadProductsPage');\r\n }\r\n }","title":""},{"docid":"306cad28d2b2c9249ac703dce6315a13","score":"0.6386265","text":"public function login()\n\t{\n\t\t//appelle le usermanager pour les requetes sql\n\t\t//affichage du formulaire\n\n\t\t$error = '';\n\t\t//si le form est soumis...\n\n\t\tif (!empty($_POST)){\n\n\t\t\t$usernameOrEmail = $_POST['usernameOrEmail'];\n\n\t\t\t$userManager = new \\Model\\Manager\\UserManager();\n\t\t\t//on va chercher le user en fonction du pseudo ou de l'email\n\t\t\t$user = $userManager->searchUser($usernameOrEmail);\n\n\t\t\t//hache le mot de passe et le compare à celui de la bdd\n\t\t\tif (password_verify($_POST['password'], $user['password'])){\n\t\t\t\t//connectez l'user en stockant une ou des infos dans la session.\n\t\t\t\t//On vérifiera ces infos sur les pages à sécuriser.\n\t\t\t\t$_SESSION['user'] = $user;\n\n\t\t\t\t//$_COOKIE pour la lecture\n\t\t\t\t//on stocke le token dans un cookie\n\t\t\t\t//on ne devrait placer ce cookie que si une case est cochée\n\t\t\t\t//pour l'instant, ce cookie ne sert à rien !!!\n\t\t\t\tsetcookie(\"remember_me\", $user['token'], strtotime(\"+ 6 months\"), \"/\");\n\t\t\t\theader(\"Location: user\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//on garde ça vague pour ne pas donner d'infos aux méchants\n\t\t\t\t$error = \"Wrong username or email !\";\n\t\t\t}\n\n\t\t}\n\n\t\t$data = [\n\t\t\t\"error\" => $error\n\t\t];\n\t\tView::show(\"login.php\", \"Website | User Home\", $data);\n\t}","title":""},{"docid":"226160a6c2a2a7d4c7b09ac3a5714a99","score":"0.6384861","text":"function login_user($email, $password, $remember)\n{\n\t$database \t= \"SELECT password, email FROM users WHERE email = '\".escape($email).\"' AND ACTIVE = 1\";\n\t$result \t= query($database);\n\tif (row_count($result) == 1)\n\t{\n\t\t$row \t\t\t= fetch_array($result);\n\t\t$db_password \t= $row['password'];\n\n\t\tif (md5($password) === $db_password) {\n\n\t\t\tif ($remember == \"on\") {\n\t\t\n\t\t\t\tsetcookie('email', $email, time() + 86400);\n\t\t\t}\n\n\t\t\t$_SESSION['email'] = $email;\n\t\t\n\t\t\treturn true;\n\t\t}\n\t}\n\telse{\n\t\treturn false;\n\t}\n}","title":""},{"docid":"7417f64bbdafb75e30d4f9ddba8284f5","score":"0.63844806","text":"function userAuthorised($dbConnected,$username,$password){\n \n $md5password=md5($password);\n \n $sql_query= \"SELECT ID,password,accesslevel FROM tuser where username='$username'\";\n \n \n $sql_selectQuery= mysqli_query($dbConnected, $sql_query);\n echo mysqli_error($dbConnected);\n while($row= mysqli_fetch_array($sql_selectQuery,MYSQLI_ASSOC)){\n $ID = $row['ID'];\n $passwordretrieved = $row['password'];\n $accesslevel = $row['accesslevel']; \n }\n mysqli_free_result($sql_selectQuery);\n $returncode=false;\n if(!empty($passwordretrieved) AND ($passwordretrieved==$md5password)) {\n \n $_SESSION['user'] = $accesslevel;\n setcookie('userID', $ID, time()+7200);\n $returncode=true;\n }\n return $returncode;\n \n }","title":""},{"docid":"68fc762a905553ca3e0f353f0f4133b9","score":"0.63808966","text":"private function cookie_login()\n\t{\n\t\tglobal $mwf_cookie;\n\t\t// We need to have a cookie to work with.\n\t\tif ($mwf_cookie === NULL || !isset($_COOKIE[$mwf_cookie]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t$split = explode(':', $_COOKIE[$mwf_cookie]);\n\t\ttry\n\t\t{\n\t\t\t$mwf_user = new MwfUser($split[0], MwfUser::IdentId);\n\t\t\tif ($mwf_user->cookie_authenticate($split[1]))\n\t\t\t{\n\t\t\t\t// Defer to login to set up the session.\n\t\t\t\t$this->login($mwf_user->get_user_name(), NULL, true);\n\t\t\t\t$_SESSION['logged_in_via_cookie'] = true;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Just give up.\n\t\t}\n\t}","title":""},{"docid":"f58821a3c63e4ac9da3cc2f2fcd46a9a","score":"0.6380493","text":"function login()\n{\n\n\t$username = $_POST['username'];\n\t$password = $_POST['password'];\n\n\t$result = admin()->get(\"username='$username' and password = '\".sha1($password).\"' and level='hr'\");\n\n\tif ($result){\n\t\t$_SESSION['hr_session'] = $username;\n\t\tif (sha1($password) == sha1('temppassword')){\n\t\t\t$_SESSION['temp_session'] = $username;\n\t\t\theader('Location: index.php?view=changepassword');\n\t\t}else{\n\t\theader('Location: index.php');\n\t\t}\n\t}\n\telse {\n\t\t\theader('Location: index.php?error=User not found in the Database');\n\t}\n}","title":""},{"docid":"f440767206a875ee28d084e7d8787322","score":"0.6379213","text":"private function isLoggedInBefore() {\n\n\t\t# If user data was saved\n\t\tif(!$sessionId = ud::$cookie->key('sessionId')->typeFilter(FilterRule::TYPE_EMPTY_STRING)->valueOr(null))\n\t\t\treturn false;\n\n\t\ttry {\n\n\t\t\t# We try to authorise user\n\t\t\tif($user = self::authenticationBySession($sessionId))\n\t\t\t\tself::authorisation($user);\n\t\t\telse\n\t\t\t\t$this->logout(false);\n\n\t\t} catch(\\Exception $e) {\n\t\t\tif($e instanceof DatabaseException)\n\t\t\t\tthrow new DatabaseException(\"Can't auth user, \".$e->getMessage());\n\t\t\tInfo::error(\"Во время восстановления сессии произошла ошибка\");\n\t\t}\n\n\t\t# False if auth failed\n\t\treturn false;\n\n\t}","title":""},{"docid":"3008091a779f85613a4afe61b531d9fb","score":"0.6378229","text":"public function _checkLogin()\n {\n $excludePage = array('reset-password', 'create-password', 'login');\n \n if (!Session::has('ses_userid') && !in_array($this->currentPath, $excludePage))\n \t{\n \t if ( Request::cookie('u_hash') && Request::cookie('e_hash'))\n {\n $user = User::where('hash', Request::cookie('u_hash'))->with('pegawai')->first();\n \n if ( count($user)>0 && sha1($user->user_email) == Request::cookie('e_hash') )\n {\n return $this->_setSessionLogin($user);\n }\n }\n \n $this->setNotif( Lang::get('login.must_login') );\n\n header(\"location:\".BeUrl('login'));exit;\n }\n }","title":""}],"string":"[\n {\n \"docid\": \"6ccf19fc4ef459b35538d6545b06be62\",\n \"score\": \"0.7156944\",\n \"text\": \"public function login($thepost)\\n{\\n extract($thepost);\\n $password = md5(mysql_real_escape_string($password));\\n //check if present in sul_signup_profile\\n $r = mysql_query(\\\"SELECT * from sul_signup_profile where Username = '$uname' AND Password = '$password'\\\");\\n if (mysql_num_rows($r))// user exist\\n {\\n //create session\\n session_start();\\n $r = mysql_fetch_assoc($r);\\n foreach($r as $k=>$v)\\n {\\n $_SESSION[$k] = $v;\\n }\\n header(\\\"location:\\\".SITE_DIR.\\\"/home.php\\\");\\n //signin\\n }\\n else\\n {\\n \\n header(\\\"location:$sender_url?errmsg=1\\\");\\n //wrong credentials\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"984ef10632d99e0c7370aa8f75958382\",\n \"score\": \"0.7081511\",\n \"text\": \"public function checkLogin(){\\n if( !empty( $_SESSION['userid']) && !empty( $_SESSION['sessionhash'] ) ){\\n $this->_userinfo['userid'] = $_SESSION['userid'];\\n $this->_userinfo['sessionhash'] = $_SESSION['sessionhash'];\\n return true;\\n }\\n return false;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"155896ab8318909206d2fd6554e2f414\",\n \"score\": \"0.7071743\",\n \"text\": \"function checkLogin(){\\n if(session(\\\"?userName\\\") && session(\\\"userName\\\") != null){\\n return true;\\n }else{\\n //header(\\\"location: http://219.224.30.99:8081/jwcdd/Login/login\\\");\\n }\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"613d0473c863f6427d05a35612493846\",\n \"score\": \"0.70150846\",\n \"text\": \"function IsLoggedIn() {\\n if($_COOKIE['name']!=null) {\\n $resid=GetSelectField(\\\"SELECT * FROM user WHERE name='\\\".$_COOKIE['name'].\\\"' && password='\\\".$_COOKIE['password'].\\\"'\\\",\\\"id\\\");\\n if($resid!=\\\"\\\") {\\n\\t\\t$_SESSION[\\\"userid\\\"] = $resid;\\n return true;\\n }\\n } \\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed430bfb7f112808c519e7edd9666af6\",\n \"score\": \"0.699291\",\n \"text\": \"public function cookieLogin() {\\n if(!empty($this->_data)) {\\n Session::insert($this->_session_name, $this->_data->id);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e37de6331186c785853d2f25e2eb1751\",\n \"score\": \"0.69751006\",\n \"text\": \"public function check_session(){ \\n\\t\\t$this->disable_cache(); \\n\\t\\t//$this->Session->destroy();\\n\\t\\tif(count($this->Session->read('USER'))){\\n\\t\\t\\treturn true;\\n\\t\\t}else if($this->Cookie->read('KEYUSER') != ''){ \\n\\t\\t\\t$this->loadModel('Register');\\n\\t\\t\\t$data = $this->Register->find('first', array('fields' => array('first_name','last_name','email_id','id','mobile','test1_complete','test2_complete','otp','language_id'),\\n\\t\\t\\t'conditions' =>array('Register.id' => $this->Functions->decrypt($this->Cookie->read('KEYUSER')), 'is_deleted' => 'N', 'status' => '1')));\\t\\t\\t\\t\\t\\n\\t\\t\\tif(empty($data)){\\n\\t\\t\\t\\t$this->Session->setFlash('Invalid Attempt', 'default', array('class' => 'alert alert-danger'));\\t\\t\\t\\t\\n\\t\\t\\t\\t$this->redirect('/register/');\\n\\t\\t\\t}\\t\\t\\n\\t\\t\\t$this->Session->write('USER', $data);\\n\\t\\t\\treturn true;\\n\\t\\t}else if($this->Cookie->read('KEYUSER') == ''){\\n\\t\\t\\t$this->Session->setFlash('Session got expired', 'default', array('class' => 'alert alert-danger'));\\t\\n\\t\\t\\t$this->redirect('/register/');\\n\\t\\t\\t// echo \\\"\\\";\\n\\t\\t\\t// $this->redirect('/');\\n\\t\\t}else{ \\n\\t\\t\\t$this->Session->setFlash('Session got expired', 'default', array('class' => 'alert alert-danger'));\\n\\t\\t\\t$this->delete_cookie('KEYUSER');\\t\\n\\t\\t\\t$this->redirect('/register/');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b63c69a0a782112ba4431f3d95da3ddf\",\n \"score\": \"0.69650996\",\n \"text\": \"public static function cookieLogin() : bool {\\n\\t\\t$user\\t= new Models\\\\User();\\n\\t\\tif ( static::viaCookie( $user ) ) {\\n\\t\\t\\tstatic::applySession( $user );\\n\\t\\t\\tstatic::refreshCookie();\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2201536ae3ddc8856fee929a0afd8809\",\n \"score\": \"0.69323534\",\n \"text\": \"static function login(){\\n // Load Database Record\\n $user = new Axon(F3::get('dbprefix').'users');\\n $user->load(array('username=:un',array(':un'=>F3::get('POST.username'))));\\n\\n // Check Password\\n if(sha1(F3::get('POST.password').$user->salt) != $user->password)\\n F3::error(404);\\n\\n // Create Session\\n $session = new Axon(F3::get('dbprefix').'sessions');\\n $session->id = sha1(mcrypt_create_iv(12,MCRYPT_DEV_URANDOM));\\n $session->start = time();\\n $session->expires = time() + F3::get('logintime');\\n $session->username = $user->username;\\n $session->access = $user->access;\\n $session->save();\\n\\n setcookie('pg_session', $session->id, $session->expires);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce482375434270c192bc6b0116b8f1d7\",\n \"score\": \"0.69084615\",\n \"text\": \"function setUserCookie() {\\n if(isset($_COOKIE['username'])) {\\n setcookie('username',$_COOKIE['username']);\\n }\\n else if(isset($_POST['username']) && (validLogin() || validLogin())) {\\n setcookie('username',$_POST['username']);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d92b7a78771eee42f1cf6734a742f69f\",\n \"score\": \"0.6898792\",\n \"text\": \"public function checkuser(){\\n\\t\\t$email = req('email');\\n\\t\\t$password = req('password');\\n\\t\\tdbSelect('SELECT * FROM '.ADMIN.' WHERE email = ' . Nullify($email) . ' AND password = ' . Nullify(sha1($password)) . '',$bUserFound,$aUserFound);\\n\\t\\tif($bUserFound){\\n\\t\\t\\t $newdata = array(\\n\\t\\t\\t 'id' => $aUserFound[0]['id'],\\n\\t\\t\\t 'email' => $aUserFound[0]['email'],\\n\\t\\t\\t 'logged_in' => TRUE\\n\\t\\t\\t );\\n\\t\\t\\t$this->session->set_userdata($newdata);\\n\\t\\t\\treturn array('success'=>'yes');\\n\\t\\t}else{\\n\\t\\t\\treturn array('success'=>'falied');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1733d5836f65b7bcff69b053707300c\",\n \"score\": \"0.68909186\",\n \"text\": \"function validarUsuario(){\\n if(isset($_SESSION['email'])){\\n return true;\\n }elseif (isset($_COOKIE['email'])) {\\n $_SESSION['email'] = $_COOKIE['email'];\\n return true;\\n }else{\\n return false;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1420851e9a7dbbc14d8ca5fad7f7f445\",\n \"score\": \"0.6803762\",\n \"text\": \"function login()\\n{\\n\\t$email = $_POST['usr_email'];\\n\\t$passwd = $_POST['usr_passwd'];\\n\\t\\n\\tif(isset($email) && isset($passwd))\\n\\t{\\n\\t\\t// find user\\n\\t\\t$usr = User::selectByEmail($email);\\n\\t\\tif(isset($usr))\\n\\t\\t{\\n\\t\\t\\t// check password\\n\\t\\t\\tif($passwd == $usr->usr_password)\\n\\t\\t\\t{\\n\\t\\t\\t\\t// set user session ID\\n\\t\\t\\t\\t$usr->usr_sessionid = session_id();\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t// set last visit time\\n\\t\\t\\t\\t$usr->usr_lastvisit = date(\\\"Y-m-d H:i:s\\\");\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t// update in DB\\n\\t\\t\\t\\t$usr->update();\\n\\t\\t\\t\\tConfigManager::getInstance()->logDebug('User '.$usr->toJSON().' logged in with session '.session_id());\\n\\t\\t\\t\\t\\n\\t\\t\\t\\treturn json_encode('OK');\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\treturn json_encode('WRONG_USR_PASSWD');\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\treturn json_encode('WRONG_USR_PASSWD');\\n\\t\\t}\\n\\t}\\n\\telse\\n\\t{\\n\\t\\treturn json_encode('REQUEST_ERROR');\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19f19ac86f3925b1eceb894f07210f62\",\n \"score\": \"0.67992604\",\n \"text\": \"public function login(){\\n\\t\\t$login = mysqli_real_escape_string($this->db, $_POST['login']); \\n\\t\\t$password = $_POST['password']; \\n\\t\\t$user = Helper::select($this->db, \\\"SELECT id, login, password FROM user WHERE '$login' = login LIMIT 1\\\", 1);\\n\\t\\t\\t\\n\\t\\tif(crypt($password, $user['password']) == $user['password']){\\n\\t\\t\\t$this->setUser($login);\\n\\t \\t\\tSession::set(['login-status' => \\\"default\\\"]);\\n\\t\\t}\\n\\t\\telse{ \\n\\t\\t\\tSession::set(['login-status' => \\\"fail\\\"]);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5f9d80debb11c3592d78622912958e0\",\n \"score\": \"0.67969966\",\n \"text\": \"public function verificarLogin() {\\n // verifica se nao existir session ou se existir e esta vazio a session\\n if (!isset($_SESSION['dmrlogin']) || (isset($_SESSION['dmrlogin']) && empty($_SESSION['dmrlogin']))) {\\n header(\\\"Location:\\\" . BASE_URL . \\\"login\\\");\\n exit;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f098ecd4e80d41b2da52ac4d1197eedc\",\n \"score\": \"0.67732656\",\n \"text\": \"function checkSession($afterlogin='/') {\\n\\t\\tif (@$this->edrnAuth->isLoggedIn()) {\\n\\t\\t\\t// Store the details for the templates to use\\n\\t\\t\\t$this->Session->write('username',@$this->edrnAuth->getCurrentUsername());\\n\\t\\t\\t$this->set('LdapUser',@$this->edrnAuth->getCurrentUsername());\\n\\t\\t\\t// We have a valid user, so just return\\n\\t\\t\\treturn;\\n\\t\\t} else {\\n\\t\\t\\t// No magic cookie, no party. send them to the login page\\n\\t\\t\\t$this->Session->write('afterlogin',$afterlogin);\\n\\t\\t\\t$this->redirect('/users/login/');\\n\\t\\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0de37ca6b879e54f75ce9e798c1e2d67\",\n \"score\": \"0.6766077\",\n \"text\": \"function logged_in(){\\n\\n\\tif ( isset($_SESSION['email']) || isset($_COOKIE['email']) ) {\\n\\t\\treturn true;\\n\\t}else{\\n\\t\\treturn false;\\n\\t}\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e5713dfd586f2769f8f1d963ff278d80\",\n \"score\": \"0.6763505\",\n \"text\": \"public function login()\\n {\\n $user = $this->checkCredentials();\\n if ($user) {\\n $this->_user = $user;\\n $_SESSION['user'] = $user;\\n $_SESSION['loggedIn'] = true;\\n $_SESSION['del_ids'] = null;\\n $_SESSION['del_multi_ids'] = null;\\n $_SESSION['user_id'] = $user['id'];\\n $_SESSION['user_email'] = $this->_email;\\n $_SESSION['password'] = $user['password'];\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"042e67957e333ff1308fc28143838c9f\",\n \"score\": \"0.67558336\",\n \"text\": \"private function log_in() {\\n\\t\\tglobal $db, $table_prefix, $cj_pathfinder, $cj_modules, $cj_error,$cj_theme;\\n\\n\\t\\t$cj_error->put_error(\\\"DEBUG\\\", \\\"checking login details\\\");\\n\\t\\t$username = $db->escape($_POST['username']);\\n\\t\\t$password = $_POST['password'];\\n\\t\\t$check_username = $db->get_row(\\\"SELECT user_id, user_key, user_salt, count(*) as is_real FROM \\\".$table_prefix.\\\"users WHERE user_name='\\\".$username.\\\"' LIMIT 0,1\\\", ARRAY_A);\\n\\t\\tif ($check_username['is_real'] > 0) {\\n\\t\\t\\t$attempted_key = md5($check_username['user_salt'].$password);\\n\\t\\t\\tif ($attempted_key == $check_username['user_key']) {\\n\\t\\t\\t\\t$_SESSION['user_id'] = $check_username['user_id'];\\n\\t\\t\\t\\t$_SESSION['user_key'] = $check_username['user_key'];\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t//need to work this bit out!\\n\\t\\t\\t\\t$this->login_attempt = FALSE;\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\t//need to work this bit out!\\n\\t\\t\\t$this->login_attempt = FALSE;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6933f73cf6e9d893d32a06ce2a5af4e\",\n \"score\": \"0.6747253\",\n \"text\": \"public function login()\\n\\t{\\n\\t\\tif ($this->input->post())\\n\\t\\t{\\n\\t\\t\\t$login_data = _post('login');\\n\\t\\t\\t$password = _post('password');\\n\\t\\t\\t$cookie_password = _post('password');\\n\\t\\t\\t$remember = _post('remember');\\n\\n\\t\\t\\t$result = $this->admin->check_login($login_data, $cookie_password);\\n\\t\\t\\t\\n\\t\\t\\tif ($remember == 1)\\n\\t\\t\\t{\\n\\t\\t\\t\\t//echo 'set';\\n\\t\\t\\t\\t$this->input->set_cookie('login', $login_data, 86500);\\n\\t\\t\\t\\t$this->input->set_cookie('password', $cookie_password, 86500);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t//echo \\\"unset\\\";\\n\\t\\t\\t\\tdelete_cookie('login');\\n\\t\\t\\t\\tdelete_cookie('password');\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ($result)\\n\\t\\t\\t{\\n\\t\\t\\t\\techo \\\"true\\\";\\n\\t\\t\\t\\tset_session('login_data', $login_data);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\techo \\\"false\\\";\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t$data['display'] = $this->load->view('admin/signup/login', '', true);\\n\\t\\t\\t$this->load->view('admin/common_signup', $data);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b2469abb61dec17af7f9cce7f10e44f\",\n \"score\": \"0.6738578\",\n \"text\": \"function logged_in(){\\n\\tif (isset($_SESSION['email']) || isset($_COOKIE['email'])) {\\n\\t\\treturn true;\\n\\t} else\\n\\t{\\n\\t\\treturn false;\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be9f295ee572b5a46dd764f0e05f77f9\",\n \"score\": \"0.6733309\",\n \"text\": \"public function login(){\\n $this->logname = $_POST['logname'];\\n $this->password = $_POST['password'];\\n if($this->find_account()){ $this->make_session();\\n return true;\\n }\\n else{ return false; }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6c8100e08a64bcf4a57bcd7af405ff5\",\n \"score\": \"0.672198\",\n \"text\": \"public function signIn(){ \\r\\n $user = new User();\\r\\n $user->username = $_POST['username'];\\r\\n $user->password = md5($_POST['password']);\\r\\n $verif = User::compareUser($user);\\r\\n if($verif->username == \\\"\\\"){\\r\\n echo \\\"error_username\\\";\\r\\n }\\r\\n else{\\r\\n if($user->password == $verif->password){\\r\\n echo $user->username;\\r\\n $_SESSION['username'] = $user->username;\\r\\n }\\r\\n else{\\r\\n echo \\\"error_password\\\";\\r\\n }\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fb70e7d159797daef9c0521b020a448\",\n \"score\": \"0.67215246\",\n \"text\": \"function f_login($email,$password){\\r\\n\\t $res3=mysql_query(\\\"SELECT * FROM f_regform WHERE email='$email' and password='$password'\\\");\\r\\n\\t\\t$Row=mysql_num_rows($res3);\\r\\n\\t\\tif($Row==0){ return false; \\r\\n\\t\\t//echo \\\"0 row\\\";\\r\\n\\t\\t}else{ \\r\\n\\t\\tsession_start();\\r\\n\\t\\t$userData = mysql_fetch_assoc($res3);\\r\\n\\t\\t$_SESSION['fname']=$userData['fname'];\\r\\n\\t\\t$_SESSION['lname']=$userData['lname'];\\r\\n\\t\\t$_SESSION['email']=$userData['email'];\\r\\n\\t\\treturn true;\\r\\n\\t\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dac8317dd827a3793a83b6b3d2561197\",\n \"score\": \"0.6697053\",\n \"text\": \"public function login()\\n {\\n $db = new Apps_Models_Users();\\n $query = $db->buildQueryParams([\\n \\\"where\\\" => \\\"username = :username AND password = :password\\\",\\n \\\"param\\\" => [\\n \\\":username\\\" => trim($this->username),\\n \\\":password\\\" => $this->encryptPassword()\\n ]\\n ])->selectOne();\\n\\n if($query) {\\n $_SESSION[\\\"userId\\\"] = $query[\\\"id\\\"];\\n $_SESSION[\\\"username\\\"] = $query[\\\"username\\\"];\\n return true; \\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43abd9f59f96931f4d7a7d6459fd1e60\",\n \"score\": \"0.669062\",\n \"text\": \"public function logged_in()\\n\\t{\\n\\t\\tif ($this->_ci->session->userdata('user_id') > 0 && $this->_ci->session->userdata('hash'))\\n\\t\\t{\\n\\t\\t\\treturn TRUE;\\n\\t\\t}\\n\\t\\telseif (get_cookie($this->_cookie_name)) \\n\\t\\t{\\n\\t\\t\\tif ($this->_check_cookie() === TRUE) \\n\\t\\t\\t{\\n\\t\\t\\t\\treturn TRUE;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn FALSE;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6eb939d854befc585601c352c4decee\",\n \"score\": \"0.6677383\",\n \"text\": \"function login() {\\n\\t\\tglobal $_SESSION;\\n\\n\\t\\t$query = \\\"SELECT `name` FROM `{$this->table}` WHERE `name`='{$this->name}' AND `pass`=sha1('{$this->pass}') AND (`site` = '{$this->site}' OR `site` = 'ri')\\\";\\n\\t\\t$reply = InkXMS_Database::query($query);\\n\\n\\t\\tif(mysql_num_rows($reply) > 0) {\\n\\t\\t\\t// if the user verification was successful\\n\\t\\t\\t// register the user with the session\\n\\t\\t\\t$valid_user = $this->name;\\n\\t\\t\\t$_SESSION[$this->site.'_valid'] = 'boolean';\\n\\n\\t\\t\\t$info = mysql_fetch_assoc($reply);\\n\\t\\t\\tmysql_free_result($reply);\\n\\t\\t\\t$_SESSION['user'] = $info['name'];\\n\\n\\t\\t\\t// make it official\\n\\t\\t\\t$this->check = true;\\n\\t\\t}\\n\\t\\telse {\\n\\t\\t\\t$this->console = \\\"username or password is incorrect\\\";\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9cd8e4762926b6d200186df1d5c83d6\",\n \"score\": \"0.66664165\",\n \"text\": \"function AuthenticateCookie($uid, $session)\\n{\\n\\t$result = mysql_query(\\\"SELECT session FROM users WHERE id = '$uid'\\\") or die();\\n\\t// check if correct result found\\n\\tif(mysql_num_rows($result) < 1) {\\n\\t\\treturn false;\\n\\t} else {\\n\\t\\t$res = mysql_fetch_assoc($result);\\n\\t\\t$sql_session = $res['session'];\\n\\n\\t\\t// check validity \\n\\t\\tif($sql_session == $session) {\\n\\t\\t\\treturn true;\\n\\t\\t} else {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ddee4d2776c0d63107202ec574186830\",\n \"score\": \"0.6662699\",\n \"text\": \"public function login()\\n {\\n if($this->user->isLogon())\\n {\\n //$this->locate($this->createLink('user', 'index'));// m=index&f=index\\n session_unset();\\n }\\n\\n /* Passed account and password by post or get. */\\n if(!empty($_POST))\\n {\\n $name = $this->post->name;\\n $password = $this->post->password;\\n\\t\\t\\t\\t\\t\\t$code = $this->post->code;\\n\\n\\t\\t\\t\\t\\t\\t$try = $this->session->try;\\n\\t\\t\\t\\t\\t\\tif(!$try) $try = 0;\\n\\t\\t\\t\\t\\t\\t$try ++;\\n\\n\\t\\t\\t\\t\\t\\t//$failed = $this->session->failed;\\n\\t\\t\\t\\t\\t\\t//if(!$failed) $failed = 0;\\n\\n\\t\\t\\t\\t\\t\\t//两次登录之间的时间间隔需要限制\\n\\t\\t\\t\\t\\t\\t$time = $this->session->time;\\n\\t\\t\\t\\t\\t\\tif(!$time)\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$time = time();\\n\\t\\t\\t\\t\\t\\t\\t$diff = $this->config->minTime;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$diff = time() - $time;\\n\\t\\t\\t\\t\\t\\t\\t$time = time();\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\t$this->session->set('time',$time);\\n\\n\\t\\t\\t\\t\\t\\t//echo \\\"$time,$diff\\\";\\n\\n\\n\\t\\t\\t\\t\\t\\t//rand(1000,9999)\\n\\t\\t\\t\\t\\t\\tif(!$this->session->code //check code未生成,漏洞\\n\\t\\t\\t\\t\\t\\t\\t|| $try > $this->config->maxTry //重试次数超过限制\\n//\\t\\t\\t\\t\\t\\t\\t|| $failed > $this->config->maxFailed\\n\\t\\t\\t\\t\\t\\t\\t|| strtolower($code) <> strtolower($this->session->code)\\n\\t\\t\\t\\t\\t\\t\\t|| $diff < $this->config->minTime//抵御蛮力攻击\\n\\t\\t\\t\\t\\t\\t\\t) die(js::error($this->lang->user->error->codeMismatch));\\n\\n $user = $this->user->identify($name, $password);\\n\\n\\t\\t\\t\\t\\t\\t$this->session->set('try',$try);\\n\\n if($user)\\n {\\n /* Authorize him and save to session. */\\n session_regenerate_id(true);//重新生成session,抵抗固定会话攻击\\n\\n $this->session->remove('try');\\n $this->session->remove('code');\\n $this->session->remove('time');\\n $this->session->remove('ctime');\\n\\n //session溢出攻击\\n $token = rand() . ':' . $this->server->remote_addr . ':' . $this->server->remote_port . ':' .time() . ':' . $user->rand;\\n// echo $token;\\n $token = crc32($token);\\n $this->session->set('token', $token);\\n setcookie('token', $token);\\n\\n $this->session->set('user', $user);\\n die(js::locate(helper::createLink('user', 'index'), 'parent'));\\n }\\n else\\n {\\n \\t //$failed ++;\\n\\t\\t\\t\\t\\t\\t\\t\\t//$this->session->set('failed', $failed);\\n die(js::error($this->lang->user->error->loginFailed));\\n }\\n }\\n else\\n {\\n $this->display();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e98259f02224bfce426db65957d32971\",\n \"score\": \"0.66569906\",\n \"text\": \"public function session(){\\n $exist = !empty($this->data['id_user']) && !empty($this->data['token']);\\n if (!$exist) $this->response(['error' => true, 'errorCode' => 403, 'errorMessage' => 'not autorized']);\\n $Security = new Security();\\n $Security->set_token($this->data['token']);\\n $Security->set_id($this->data['id_user']);\\n $uotorized = $Security->authorize();\\n if(!$uotorized) $this->response(['error' => true, 'errorCode' => 403, 'errorMessage' => 'not autorized!']);\\n $this->session = (int) $this->data['id_user'];\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff86e4530dced1f94a8691541867b62f\",\n \"score\": \"0.66412985\",\n \"text\": \"public function p_login() {\\n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\\n\\n\\n // Hash user-submitted password\\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\\n\\n\\n // Check is email/password combination is correct.\\n $q = \\\"SELECT token FROM users WHERE email='\\\".$_POST['email'].\\\"' AND password='\\\".$_POST['password'].\\\"'\\\";\\n $token = DB::instance(DB_NAME)->select_field($q);\\n\\n\\n // Check if the user token exists\\n if ($token) {\\n // Login success\\n setcookie('token', $token, strtotime('+1 week'), '/');\\n\\n\\n Router::redirect('/posts/index');\\n }\\n else {\\n // Login failure\\n Router::redirect('/users/login/'.ERROR_INVALIDUSRPWD);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2818d4d3a8e1b720e80983abe9fa66ac\",\n \"score\": \"0.66352963\",\n \"text\": \"function auth_check(){\\n session_start();\\n if (!isset($_SESSION['user'])) {\\n $this->redirect(\\\"/login\\\");\\n exit();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2531cce13cf0a3cb60bf8248a399a81\",\n \"score\": \"0.6633372\",\n \"text\": \"function login_verification_user()\\r\\n {\\r\\n global $connection;\\r\\n $username=strip_tags($_POST['username']);\\r\\n $password=strip_tags($_POST['password']);\\r\\n $password=encrypt($password);\\r\\n $user_data=bool_login_verification($username,$password,'user');\\r\\n if ( $user_data[0] >0 )//user_id\\r\\n {\\r\\n set_user_session_id($user_data[0]);\\r\\n set_user_session_name($user_data[1]);\\r\\n //print_r($_SESSION);\\r\\n redirect(\\\"user_notification.php\\\"); \\r\\n }\\r\\n else\\r\\n {\\r\\n show_error_message(\\\"Incorrect Username or Password\\\");\\r\\n } \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"025bd508d8fbd4c7d80c2459b86b970d\",\n \"score\": \"0.6625727\",\n \"text\": \"public function log_in($data){\\r\\n $email=$data['email'];\\r\\n $password=md5($data['password']);\\r\\n// $time= time();\\r\\n\\r\\n $sql=\\\"SELECT user_id,name,username FROM user_info WHERE email='$email' AND password='$password' AND Status='activated'\\\";\\r\\n $query=mysqli_query($this->connection,$sql);\\r\\n $user= mysqli_fetch_assoc($query);\\r\\n\\r\\n if($user){\\r\\n// session_start();\\r\\n $_SESSION['user_id']=$user['user_id'];\\r\\n $_SESSION['name']=$user['name'];\\r\\n $_SESSION['username']=$user['username'];\\r\\n \\r\\n \\r\\n// echo '
    ';\\r\\n//                    print_r($count_user);\\r\\n//                    exit();\\r\\n                        header('Location:user/index.php');\\r\\n                    }else{\\r\\n                        $msg='
    Sorry..Email or Password are not valid
    ';\\r\\n return $msg;\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1cc0c80142924b3febaf321c0278f6a\",\n \"score\": \"0.66255677\",\n \"text\": \"function Login($name, $password) {\\n $resid=GetSelectField(\\\"SELECT * FROM user WHERE name='$name' && password='\\\".MD5($password+$dbsalt).\\\"'\\\",\\\"id\\\");\\n if($resid==\\\"\\\") {\\n return false;\\n } else {\\n \\n $_SESSION[\\\"loggedin\\\"] = \\\"TRUE\\\";\\n $_SESSION[\\\"name\\\"] = $name;\\n $_SESSION[\\\"userid\\\"] = $resid;\\n \\n setcookie('name', $name, strtotime(\\\"+1 month\\\"), \\\"/\\\", \\\".uni-muenster.de\\\" );\\n setcookie('password', MD5($password+$dbsalt), strtotime(\\\"+1 month\\\"), \\\"/\\\", \\\".uni-muenster.de\\\");\\n $_COOKIE['name'] = $name; \\n $_COOKIE['password'] = $password; \\n\\n return true;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2ea8cf59496c03725efdf985dc3e760\",\n \"score\": \"0.6618249\",\n \"text\": \"public function SetLoginStatus()\\t{\\n\\n\\t\\t\\t$query = \\\"SELECT * \\n FROM users \\n WHERE userName = '{$_POST['name']}' \\n AND userPass = '{$_POST['pass']}'\\\";\\n\\n\\t\\t\\tif ( ReturnRows($query) == 1) {\\n\\t setcookie('this->userName' , $_POST['name'] , time() + 1000);\\n\\t setcookie('this->password' , $pass , time() + 0);\\n\\t $_SESSION['this->loggedIn'] = 1;\\n\\t }\\n\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"66cc5e52ddf74217749bb564330679a6\",\n \"score\": \"0.6617521\",\n \"text\": \"public function login() {\\n \\n // création des nouveaux objets\\n $user = new User();\\n $dao = new DAOUser();\\n $secu = new MySecu();\\n \\n // Récupération des variables nécessaires à la connexion\\n $user->setPseudo($_POST[\\\"pseudo\\\"]);\\n $user->setPassword($_POST[\\\"password\\\"]);\\n \\n // si le l'utilisateur est bien confirmé en BDD alors on appelle la methode getRang en argument de Privilege_id()\\n // et on génère le Cookie\\n if($dao->verifUser()){\\n $user->setPrivilege_id($dao->getRang($_POST['pseudo'])['rang']);\\n $user->setId($dao->getRang($_POST['pseudo'])['id']);\\n\\n $secu->generateCookie($user);\\n \\n \\n }else{\\n header(\\\"Location: http://dreamfrom/\\\");\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"901d0e4c0e1674c139cd3b025199f137\",\n \"score\": \"0.6614523\",\n \"text\": \"function login($data){\\n\\n global $conn;\\n $email = mysqli_real_escape_string($conn, $data[\\\"email\\\"] );\\n $password = mysqli_real_escape_string($conn, $data[\\\"password\\\"] );\\n \\n\\n $query = mysqli_query($conn, \\\"SELECT * FROM user WHERE email ='$email'\\\");\\n\\n if( $row = mysqli_fetch_assoc($query) ){\\n\\n $passwordAsli = $row[\\\"password\\\"];\\n if( password_verify($password, $passwordAsli) ){\\n\\n $_SESSION[\\\"user\\\"] = $row[\\\"username\\\"];\\n $_SESSION[\\\"login\\\"] = true;\\n if( isset($data[\\\"remember\\\"]) ){\\n setcookie('id',$row[\\\"id\\\"],time()+ 60*60*24*7);\\n setcookie('key',hash('sha256',$row[\\\"username\\\"]),time()+ 60*60*24*7);\\n }\\n return true;\\n }\\n \\n}else{\\n return false; \\n}\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39d20864d82d6b92796e653f732d934f\",\n \"score\": \"0.6608201\",\n \"text\": \"public function authenticUser()\\n\\t\\t{\\n\\t\\t\\t$DB = new Database(HOST,USER,PASS);\\n\\t\\t\\tif(isset($_SESSION['emailUser']) && isset($_SESSION['passwordUser'])) {\\n\\t\\t\\t\\t$L_user = $_SESSION['emailUser'];\\n\\t\\t\\t\\t$L_pass = $_SESSION['passwordUser'];\\n\\t\\t\\t\\t$condition = \\\"WHERE email = '{$L_user}' AND password = '{$L_pass}'\\\";\\n\\t\\t\\t\\t$selection = $DB->QRSelect('_user',$condition);\\n\\t\\t\\t\\tif ($selection) {\\n\\t\\t\\t\\t\\tsession_destroy(); \\n\\t\\t\\t\\t\\tunset($_SESSION['passwordUser']); \\n\\t\\t\\t\\t\\tunset($_SESSION['emailUser']); \\n\\t\\t\\t\\t\\techo '';\\n\\t\\t\\t\\t\\tdie;\\n\\t\\t\\t\\t}\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tsession_destroy();\\n\\t\\t\\t\\tunset($_SESSION['emailUser']);\\n\\t\\t\\t\\tunset($_SESSION['passwordUser']); \\n\\t\\t\\t\\techo '';\\n\\t\\t\\t\\tdie; \\n\\t\\t\\t}\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d2175ffe2d6ef0f4d7cf8e053153e3c\",\n \"score\": \"0.6606196\",\n \"text\": \"private function log_user_in($data) {\\n $uname = (isset($data['uname'])) ? clean(trim($data['uname'])) : Session::get_var('uname');\\n\\t\\t\\t$pass = clean(trim($data['pass']));\\n $referer = $this->referer;\\n\\t\\t\\t\\t$this->_auth->el_login($uname, $pass);\\n\\t\\t\\t\\tif($this->_auth->is_login()) {\\n if(!strpos('/login', $this->referer)) {\\n $this->referer = $referer;\\n return true;\\n } else {\\n $this->referer = get_option('home');\\n return true;\\n }\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$this->_error = $this->_auth->get_auth_last_error();\\n\\t\\t\\t\\t}\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c143fa6eabd3b3148112cb8b97a0db3\",\n \"score\": \"0.6593335\",\n \"text\": \"function require_auth()\\n {\\n global $errors;\\n $cookie_login = false;\\n $username = '';\\n $password = '';\\n\\n // If person has already logged in...\\n if ($this->logged_in) {\\n return TRUE;\\n }\\n\\n // Authenticate by POST data\\n if (isset($_POST['username'])) {\\n $username = $_POST['username'];\\n $password = $_POST['password'];\\n $person = get_first(\\\"SELECT * FROM persons\\n WHERE username = '$username'\\n AND password = '$password'\\n AND deleted = 0\\\");\\n if (! empty($person['person_id'])) {\\n $_SESSION['person_id'] = $person['person_id'];\\n $this->load_user_data($person);\\n return true;\\n\\n } else {\\n $errors[] = \\\"Vale kasutajanimi või parool\\\";\\n }\\n }\\n\\n // Authenticate by cookie\\n //var_dump($_COOKIE);\\n //die();\\n if (isset($_COOKIE['teodor_SID'])) {\\n $username = get_one(\\\"SELECT username FROM persons WHERE person_SID='{$_COOKIE['teodor_SID']}'\\\");\\n if (!empty($username)) $cookie_login = true;\\n }\\n\\n $username = $cookie_login ? $username : (isset($_POST['username']) ? $_POST['username'] : NULL);\\n $password = isset($_POST['password']) ? $_POST['password'] : NULL;\\n $remember_me = isset($_POST['remember_me']) && $_POST['remember_me'] == 'on' ? 1 : 0;\\n\\n // Authenticate by POST data\\n if ($cookie_login or isset($_POST['username'])) {\\n\\n // Authenticate user against Google\\n if ($cookie_login or $this->login($username, $password)) {\\n\\n // Check if person already exsists in db\\n $person = get_first(\\\"SELECT person_id, is_admin, person_first_visit, person_last_visit FROM persons\\n WHERE username = '$username'\\n AND deleted = 0\\\");\\n\\n if (empty($person['person_id'])) {\\n\\n // Person did not exsist, insert this person and log the person in\\n $now = date('Y-m-d H:i:s');\\n $person = array('username' => $username, 'is_admin' => 0, 'person_first_visit' => $now, 'person_last_visit' => $now);\\n $person['person_id'] = insert('persons', $person);\\n\\n } else {\\n\\n // Person existed, update person's last visit time\\n q(\\\"UPDATE persons SET person_last_visit=NOW() WHERE username = '$username'\\\");\\n }\\n\\n // Log the person in\\n $_SESSION['person_id'] = $person['person_id'];\\n\\n // Set remember me cookie\\n if ($remember_me) {\\n\\n // Generate 7 char random string\\n $SID = substr(md5(rand()), 0, 7);\\n\\n // Set cookie to expire in January 2038\\n $time = 2147483647;\\n\\n // Associate that random string with this user\\n update('persons', array('person_SID' => $SID), \\\"username = '$username'\\\");\\n\\n // Write that random string to cookie\\n setcookie(\\\"teodor_SID\\\", $SID, $time, '/');\\n }\\n\\n if(!get_one(\\\"SELECT setup FROM persons WHERE person_id={$person['person_id']}\\\")){\\n header('Location: ' . BASE_URL . 'user_setup');\\n exit();\\n }\\n\\n //Load user data and return\\n $this->load_user_data($person);\\n return true;\\n\\n } else {\\n\\n // Login failed - set error\\n $errors[] = __('Wrong username or password', true);\\n }\\n }\\n\\n // Display the login form\\n require 'templates/auth_template.php';\\n\\n // Prevent loading the requested controller (not authenticated)\\n exit();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa2dfe9464c4a3bdfb6e1fd32da10cfc\",\n \"score\": \"0.65926206\",\n \"text\": \"function login_user($email,$password ,$remember, $username){\\r\\n $sql = \\\"SELECT passwd, id FROM users WHERE email='\\\".escape($email).\\\"' AND active=1 \\\";#use only this if not encrypted\\r\\n $result = execute($sql);\\r\\n confirm($result);\\r\\n \\r\\n if(row_count($result) ==1){\\r\\n #once password is found the fetch the password then decrypt it.\\r\\n $row = fetch_array($result);\\r\\n\\r\\n $db_password = $row['passwd'];\\r\\n if(password_verify($password, $db_password)){\\r\\n if($remember =\\\"on\\\"){\\r\\n setcookie('email',$email, time()+86400);\\r\\n // setcookie('username',$username,time()+86400);\\r\\n }\\r\\n $_SESSION['email'] = $email;\\r\\n \\r\\n \\r\\n return true; \\r\\n\\r\\n\\r\\n }else{\\r\\n return false;\\r\\n }\\r\\n\\r\\n\\r\\n\\r\\n return true;\\r\\n }else{\\r\\n return false;#if no result found return false.\\r\\n }\\r\\n\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46494deb51e49b9dcdaf3212432d88fa\",\n \"score\": \"0.65866363\",\n \"text\": \"function check_auth_user(){\\n global $_SESSION;\\n if (isset($_SESSION['usu']))\\n {\\n return true;\\n }\\n else\\n {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98f6ec375c1d82709cb38710636376af\",\n \"score\": \"0.65828073\",\n \"text\": \"function validate_user() // Funkcija koja se poziva nakon uspješnog logiranja korisnika\\n{\\n $_SESSION['valid'] = true;\\n $_SESSION['username'] = $username; // Pamti korisničko ime trenutno ulogiranog korisnika.\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3281dba745c02d219b346c58e8943b7\",\n \"score\": \"0.6578678\",\n \"text\": \"function login($usuario) {\\n $_SESSION[\\\"email\\\"] = $usuario[\\\"email\\\"];\\n setcookie(\\\"email\\\", $usuario[\\\"email\\\"], time()+3600);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f96c546d70d73380fe8d965b0266139\",\n \"score\": \"0.65777856\",\n \"text\": \"public function autenticate(){\\n\\t\\t//obtiene la cookie del navegador\\n\\t\\t$contenido = $_COOKIE[\\\"id_user_sesion_kawaii\\\"]; \\n\\t\\tif($contenido == null) {\\n\\t\\t\\t//uncomment para usar login\\n\\t\\t\\theader(\\\"Location: http://localhost:8000/usuarios/login\\\");\\n\\t\\t\\texit;\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cac0d65defeb7727125f67f73ec280d0\",\n \"score\": \"0.6568076\",\n \"text\": \"public static function login()\\r\\n {\\r\\n \\r\\n //$record = accounts::findUser($_POST['uname']); // testing \\r\\n $record = new account();\\r\\n $record = accounts::findUserbyUsername($_POST['uname']);\\r\\n if ($record == FALSE) {\\r\\n // for wrong pasword and usrname @vm368\\r\\n\\t\\t\\theader('Location: index.php?wrongpasswordusername=1');\\r\\n \\r\\n } else {\\r\\n if($record->checkPassword($_POST['psw']) == TRUE) {\\r\\n echo 'login';\\r\\n session_start();\\r\\n $_SESSION[\\\"userID\\\"] = $record->id;\\r\\n $_SESSION[\\\"userEmail\\\"] = $record->email;\\r\\n print_r($_SESSION);\\r\\n header('Location: index.php?page=tasks&action=allOneUser&id='.$record->id);\\r\\n } else {\\r\\n \\r\\n echo 'enter correct password';\\r\\n }\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f4c9b924a7412c8c5bb1134fcc58d25\",\n \"score\": \"0.6567918\",\n \"text\": \"function logged_in()\\n{\\n\\n if (isset($_SESSION['email']) || isset($_COOKIE['email'])) {\\n\\n return true;\\n } else {\\n return false;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"638bf31b74fca7954f0f871b27a4405e\",\n \"score\": \"0.6564178\",\n \"text\": \"function validaSessao() {\\r\\n\\tif ($_SESSION [\\\"usuario\\\"] != $_COOKIE [\\\"i3geousuariologin\\\"]) {\\r\\n\\t\\treturn false;\\r\\n\\t}\\r\\n\\treturn true;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6cd3303b00c5c69293a9af0fe886d898\",\n \"score\": \"0.6562747\",\n \"text\": \"public function checkCookies() {\\n\\t// $this->cookieStorage->getCookieValue(self::$username) === $this->getUsernameInput() &&\\n // $this->cookieStorage->getCookieValue(self::$password) === $this->sessionHelper->encryptString($this->getPasswordInput()))\\n \\n if ($this->cookieStorage->isCookieSet(self::$uniqueID)) {\\n \\t\\n // Check if uniqid is valid from right browser //TODO set uniqueID is based on browser-detail\\n if ($this->cookieStorage->getCookieValue(self::$uniqueID) === $this->sessionHelper->setUniqueID() )\\n {\\n\\t\\t \\n\\t // Check if the uniqid cookie is valid and not time-manipulated\\n\\t if (!$this->cookieStorage->isCookieValid($this->cookieStorage->getCookieValue(self::$uniqueID))) {\\n\\t \\t\\n\\t // Destroy all cookies\\n \\t\\t $this->destroyCookies();\\n\\t\\n\\t // Set an alert\\n\\t $this->sessionHelper->setAlert(\\\"Wrong information in cookie.\\\");\\n\\t return false;\\n\\t }\\n\\n\\t return true;\\n\\t\\t\\t }\\n \\t else {\\n // Destroy all cookies\\n $this->cookieStorage->destroy(self::$uniqueID);\\n $this->cookieStorage->destroy(self::$username);\\n $this->cookieStorage->destroy(self::$password);\\n\\t\\t \\n // Set an alert\\n $this->sessionHelper->setAlert(\\\"Wrong information in cookie.\\\");\\n return false;\\n }\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"285eff13fb0bdedd1f1e8ae814ae5a2d\",\n \"score\": \"0.6557762\",\n \"text\": \"public function login() {\\n\\t\\tif($_SERVER['REQUEST_METHOD'] == 'POST'){\\n\\t\\t\\t// Sanitize data \\n\\t\\t\\t$_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);\\n\\t\\t\\t// Init data \\n\\t\\t\\t$data = [\\n\\t\\t\\t\\t'username' => trim($_POST['username']),\\n\\t\\t\\t\\t'password' => trim($_POST['password']),\\n\\t\\t\\t\\t'username_err' => '',\\n\\t\\t\\t\\t'password_err' => ''\\n\\t\\t\\t];\\n\\t\\t\\t// Validate username \\n\\t\\t\\t\\tif(empty(trim($_POST['username']))){\\n\\t\\t\\t\\t\\t$data['username_err'] = \\\"Please enter your username\\\";\\n\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t$data['username'] = trim($_POST['username']);\\n\\t\\t\\t\\t} // end of username validation \\n\\t\\t\\t// Validate password \\n\\t\\t\\t\\tif(empty(trim($_POST['password']))){\\n\\t\\t\\t\\t\\t$data['password_err'] = \\\"Please enter your password\\\";\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$data['password'] = trim($_POST['password']);\\n\\t\\t\\t\\t} // end of password validation\\n\\n\\t\\t\\t// Validate credentials \\n\\t\\t\\tif(empty($data['username']) && empty($data['password'])){\\n\\t\\t\\t\\t// prepare a select statement \\n\\t\\t\\t\\t$sql = \\\"SELECT id, username, password FROM tbl_user WHERE username = :username\\\";\\n\\t\\t\\t\\tif($sth = $this->db->dbh->prepare($sql)){\\n\\t\\t\\t\\t\\t// Bind values with params \\n\\t\\t\\t\\t\\t$sth->bindParam(\\\":username\\\", $param_username, PDO::PARAM_STR);$sth->bindParam(\\\":password\\\", $param_password, PDO::PARAM_STR);\\n\\n\\t\\t\\t\\t\\t// Set parameters \\n\\t\\t\\t\\t\\t$param_username = trim($data['username']);\\n\\t\\t\\t\\t\\t$param_password = trim($data['password']);\\n\\t\\t\\t\\t\\t// Attempt to execute prepared statement\\n\\t\\t\\t\\t\\tif($sth->execute()){\\n\\t\\t\\t\\t\\t\\t// check if the username exists, if yes then verify password \\n\\t\\t\\t\\t\\t\\tif($sth->rowCount() < 0 ){\\n\\t\\t\\t\\t\\t\\t\\tif($row = $sth->fetch()){\\n\\t\\t\\t\\t\\t\\t\\t\\t$id = $row['id'];\\n\\t\\t\\t\\t\\t\\t\\t\\t$username = $row['username'];\\n\\t\\t\\t\\t\\t\\t\\t\\t$hashpassword = $row['password'];\\n\\t\\t\\t\\t\\t\\t\\t\\tif(password_verify($password, $hashed_password)){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// password is correct , so start a new session \\n\\t\\t\\t\\t\\t\\t\\t\\t\\tSession::init();\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Set data in Session \\n\\t\\t\\t\\t\\t\\t\\t\\t\\tSession::set('login', true);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tSession::set('id', $id);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tSession::set('username', $username);\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tSession::set('loginmsg', \\\"
    Login successfull
    \\\");\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// Redirect user to welcome page\\n\\t\\t\\t\\t\\t\\t\\t\\t\\theader('location:../index.php');\\n\\t\\t\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t$data['password_err'] = \\\"Password did not match\\\";\\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} else{\\n\\t\\t\\t\\t\\techo \\\"Data not found\\\";\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t}\\n\\t\\t} else {\\n\\t\\t\\t// Init data \\n\\t\\t\\t$data = [\\n\\t\\t\\t\\t'username' => '',\\n\\t\\t\\t\\t'password' => '',\\n\\t\\t\\t\\t'username_err' => '',\\n\\t\\t\\t\\t'password_err' => ''\\n\\t\\t\\t];\\n\\t\\t\\t\\n\\t\\t\\t// Load login page\\n\\t\\t\\theader('location:login.php');\\n\\n\\t\\t} // end of server request checking \\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef925fa1c9287f3fb29d3290d30cdabf\",\n \"score\": \"0.6552759\",\n \"text\": \"function verify()\\n{\\n\\tsession_start();\\n\\tif (isset($_SESSION['user']))\\n\\treturn true;\\n\\t\\n\\t\\n\\t// check to see if visitor has just tried to log on\\n\\n if(isset($_POST['u_name'])&&(isset($_POST['u_password'])))\\n {\\n $u_name=$_POST['u_name'];\\n $u_password=md5($_POST['u_password']);\\n\\n // validate username and password\\n\\n include('ccconfig.php');\\n include('dbal.php');\\n\\n\\t$conn=openconn();\\n\\n\\tselectdb();\\n\\n $sql=\\\"Select * from users where email=\\\\\\\"$u_name\\\\\\\" and password=\\\\\\\"$u_password\\\\\\\" \\\";\\n $qry=mysql_query($sql,$conn);\\n $fetchqry=mysql_fetch_array($qry);\\n \\n \\n if($u_password==$fetchqry['password'])\\n {\\n $_SESSION['user']=$fetchqry['email'];\\n return true;\\n }\\n else\\n {\\n header(\\\"location:index.php\\\");\\n }\\n }\\n \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c68bc1db336a988980fbb70155906135\",\n \"score\": \"0.6552527\",\n \"text\": \"function auto_login(){\\r\\n\\t\\t\\tif(!empty($_COOKIE['auth'])){\\r\\n\\t\\t\\t\\t$split = explode(':', $_COOKIE['auth']);\\r\\n\\r\\n\\t\\t\\t\\tif(count($plit) != 2){\\r\\n\\t\\t\\t\\t\\treturn false;\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t//Recupere via ce cookie selector, token\\r\\n\\t\\t\\t\\tlist($selector,$token) = $split;\\r\\n\\r\\n\\t\\t\\t\\t$req = $db->prepare('SELECT auth_tokens.id, auth_tokens.token, auth_tokens.user_id \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t users.id, users.pseudo, users.avatart, users.email\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t FROM auth_tokens \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t LEFT JOIN users\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t ON auth_tokens.user_id = users.id\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t WHERE selector = ?' AND execute >= CURDATE());\\r\\n\\t\\t\\t\\t$req->execute([base64_decode($selector)]);\\r\\n\\r\\n\\t\\t\\t\\t$data = $req->fetch(PDO::FETCH_OBJ);\\r\\n\\t\\t\\t\\tif ($data) {\\r\\n\\t\\t\\t\\t\\tif (hash_equal($data->token,hash('sha256',base64_decode($token)))) {\\r\\n\\t\\t\\t\\t\\t\\tsession_regenerate_id(true);\\r\\n\\t\\t\\t\\t\\t\\t$_SESSION['user_id'] = $data->id;\\r\\n\\t\\t\\t\\t\\t\\t$_SESSION['pseudo'] = $data->pseudo;\\r\\n\\t\\t\\t\\t\\t\\t$_SESSION['avatar'] = $data->avatar;\\r\\n\\t\\t\\t\\t\\t\\t$_SESSION['email'] = $data->email;\\r\\n\\r\\n\\t\\t\\t\\t\\t\\treturn true;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18d7d0008ae35529b433acb53e40f98e\",\n \"score\": \"0.6548544\",\n \"text\": \"public function userLogin(){\\n\\t\\t// Si el email y la password no estan vacias se procede\\n\\t\\tif (!empty($_POST['email']) && !empty($_POST['password'])) {\\n\\t\\t\\t// La variable response se convierte en un objeto que contendra el resultado de la consulta\\n\\t\\t\\t$response = $this->model->userLogin('*',\\\"email = '\\\".$_POST['email'].\\\"'\\\");\\n\\t\\t\\t// Se obtiene la consulta en la posicion 0 y se almacena en la variable response, ahora es un array\\n\\t\\t\\t$response = $response[0];\\n\\t\\t\\t// Si la password de la db es igual a la password recibida del formulario se imprime 1\\n\\t\\t\\tif ($response['password'] == $_POST['password']) {\\n\\t\\t\\t\\t$this->createSession($response['username']);\\n\\t\\t\\t\\techo 1;\\n\\t\\t\\t}\\n\\t\\t}else{\\n\\t\\t\\techo \\\"No hay coincidencia\\\";\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52553bd677c17ce7c61fb7630b4bf34c\",\n \"score\": \"0.65447545\",\n \"text\": \"function users_pre_authenticate() {\\n\\t\\n\\t$user = new User();\\n\\t$user = $user->find('WHERE login_token = \\\"'.$_COOKIE['remember_me'].'\\\"');\\n\\tif(isset($user[0])) {\\n\\t\\t$_SESSION['user_id'] = $user[0]->id;\\n\\t\\t$_SESSION['current_user'] = $user[0];\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68bfabbebab450a719f112f1a02c8be5\",\n \"score\": \"0.6537953\",\n \"text\": \"private function check_login(){\\n\\t\\t\\tif(isset($_SESSION['user_id'])){\\n\\t\\t\\t\\t$this->user_id = $_SESSION['user_id'];\\n\\t\\t\\t\\t$this->logged_in = true;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tunset($this->user_id);\\n\\t\\t\\t\\t$this->logged_in = false;\\n\\t\\t\\t}\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7f2099cb4dbfe6205bc180e2da6adefd\",\n \"score\": \"0.65273035\",\n \"text\": \"function loginauth()\\n {\\n $this->set(\\\"title\\\",\\\"IEEE NIEC | User Login\\\");\\n $username=sqlSafe($_POST['username']);\\n $password=sqlSafe($_POST['password']);\\n\\n $salt=$this->User->getUserSalt($username);\\n if($salt==false)\\n {\\n $this->set(\\\"message\\\",\\\"Username/Password Invalid\\\");\\n }\\n else\\n {\\n $inPass=$this->User->getUserPassword($username);\\n if($inPass==generateHash($password.$salt) && $this->User->getUserStatus($username)==1)\\n {\\n $userID=$this->User->getUserID($username);\\n initiateSession();\\n setSessionData(\\\"user_id\\\",md5($userID));\\n setSessionData(\\\"user_username\\\",$username);\\n setSessionData(\\\"user_identifier\\\",md5($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR']));\\n $this->set(\\\"message\\\",\\\"Login successful\\\");\\n header(\\\"LOCATION: /indexs/home\\\");\\n }\\n else\\n {\\n $this->set(\\\"message\\\",\\\"Username/Password Invalid or Account not activate.\\\");\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c8fe315bc3b438ad5cdb4a37c29fa47\",\n \"score\": \"0.65226793\",\n \"text\": \"public function p_login() {\\n\\n // Get the encrypted value of the password\\n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\\n\\n // Get the token\\n $sql = 'SELECT token, email\\n FROM users\\n WHERE email = \\\"'.$_POST['email'].'\\\"\\n AND password = \\\"'.$_POST['password'].'\\\"';\\n\\n $data = DB::instance(DB_NAME)->select_row($sql);\\n\\n $token = $data['token'];\\n $email = $data['email'];\\n\\n if ($token) {\\n setcookie('token', $token, strtotime('+1 year'), '/');\\n Router::redirect('/index/index');\\n }\\n else {\\n Router::redirect(\\\"/users/login/err\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7957e26b9aa398e65a36d3801c4b8343\",\n \"score\": \"0.65184474\",\n \"text\": \"public static function check_login() {\\n $db = Db::getInstance();\\n if(isset($_REQUEST['submit'])) {\\n // print_r($_REQUEST);\\n $sql= \\\"Select * from users where email='\\\".$_REQUEST['username'].\\\"' and password='\\\".$_REQUEST['password'].\\\"'\\\";\\n $result= $db->query($sql);\\n $num= $result->fetchColumn();\\n if($num>0) {\\n foreach($db->query($sql) as $row) {\\n // echo $row['email'];\\n $_SESSION['session_email']= $row['email'];\\n $_SESSION['session_user_id']= $row['user_id'];\\n $_SESSION['session_first_name']= $row['first_name'];\\n $_SESSION['session_last_name']= $row['last_name'];\\n\\n }\\n } \\n \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bf5845ccb8bec8164ab22da13f3b451\",\n \"score\": \"0.6513424\",\n \"text\": \"public function check_session_auth() {\\n // Check if session exist\\n if (isset($this->session->userdata['username'])) {\\n // Check if user checked remember me checkbox\\n if (isset($this->session->userdata['autodelete'])) {\\n if ($this->session->userdata['autodelete'] < time()) {\\n // Delete session and redirect to home page\\n $this->session->unset_userdata('username');\\n $this->session->unset_userdata('member');\\n $this->session->unset_userdata('autodelete');\\n } else {\\n redirect('/user/home');\\n }\\n } else {\\n redirect('/user/home');\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa2e20fc46c0192119781cb9c79765ae\",\n \"score\": \"0.65126884\",\n \"text\": \"function login($data, $remember = false){\\n\\t\\tif($this->exists()){\\n \\t\\t$session_data = array(\\n 'username' => $this->data()->staff_username,\\n 'staff_db_id' => $this->data()->id,\\n 'staff_id' => $this->data()->staff_id,\\n 'isLoggedIn' => TRUE\\n );\\n\\n $this->session->set_userdata($session_data);\\n }else{\\n\\t// grab user input\\n\\n\\t\\t//print_r($data);exit;\\n\\t\\tunset($data['log_show']);\\t// this is the name attribute for the button clicked for login section\\n\\n \\t$username = $data['staff_username'];\\n $password = $data['password'];\\n\\t\\t$remember = '';\\n\\n\\t\\tif(isset($data['rememberme'])){\\n\\n \\t$remember = $data['rememberme'];\\n\\n\\t\\t}\\n\\n\\t\\t$user = $this->find($username); // this find the username in the database\\n\\n\\t\\tif($user){\\n\\t\\t\\tif($this->hash_created->decode_password($password, $this->data()->password)){\\n\\t\\t\\t\\t// setting user session\\n\\t\\t\\t\\t$session_data = array(\\n 'username' => $this->data()->staff_username,\\n 'staff_db_id' => $this->data()->id,\\n 'staff_id' => $this->data()->staff_id,\\n 'isLoggedIn' => TRUE\\n );\\n\\n\\t\\t\\t\\t$this->session->set_userdata($session_data);\\n\\n\\t\\t\\t\\t// if remember me function is activated\\n \\tif($remember == 'on' && $remember != ''){\\n $hash = $this->hash_created->unique();\\n $hashCheck = $this->db->get_where('users_session', array('staff_id' => $this->data()->staff_id));\\n\\n if(!$hashCheck->num_rows){\\n $this->db->insert('users_session', array(\\n 'staff_id' => $this->data()->staff_id,\\n 'ip_address'\\t => $this->input->ip_address(),\\n 'hash' => $hash\\n ));\\n }else{\\n $hash = $hashCheck->row()->hash;\\n }\\n // setting the cookie\\n $cookie = array(\\n\\t\\t 'name' => $this->config->item('cookie_name'), // username cookie_hash\\n\\t\\t 'value' => $hash,\\n\\t\\t 'expire' => $this->config->item('cookie_expiry') // the expiry date is a day privilege\\n\\t\\t );\\n\\n\\t\\t\\t $this->input->set_cookie($cookie);\\n\\t\\t\\t\\t\\t// $this->input->cookie('username', false);\\n\\n \\t} // end remember me function\\n \\t\\techo 1;\\n \\t \\t\\t \\t\\treturn true;\\n \\t \\t\\t}else{\\n \\t \\t\\t\\treturn 3; // incorrect password\\n\\t\\t\\t\\treturn false;\\n \\t \\t\\t}\\n\\t\\t}else{\\n\\t\\t\\t// not found, can't find the username\\n\\t\\t\\treturn 2;\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\t}\\n\\t\\treturn 4; // if nothing, can't login\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91219bb898db13f1815460f97196367f\",\n \"score\": \"0.6501701\",\n \"text\": \"function logged_in() {\\n if(isset($_SESSION['mail']) || isset($_COOKIE['name'])) {\\n return false;\\n }\\n else {\\n return true;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"769fe33806d8ce5e8feee08320365469\",\n \"score\": \"0.64931244\",\n \"text\": \"public static function userAuthenticated() : bool\\n {\\n if (!isset($_SESSION['acc_number'] , $_SESSION['token'])) {\\n return false;\\n }\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0db0fd47e40140871c666662954521bd\",\n \"score\": \"0.64883333\",\n \"text\": \"public function login()\\n {\\n $admin_login = $this->get_admin_login();\\n // ambil username dan password user yang login dari database\\n $admin_from_db = $this->get_admin(\\\"SELECT * FROM admin WHERE username='$admin_login->username'\\\");\\n // validasi\\n if ($admin_login->password === $admin_from_db->password) {\\n // set session\\n $_SESSION[\\\"user_logged\\\"] = (object) [\\n \\\"username\\\" => $admin_from_db->username,\\n \\\"role\\\" => \\\"admin\\\"\\n ];\\n return true;\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fd3c5dd944d6d6a31d60cac404d4032\",\n \"score\": \"0.64882314\",\n \"text\": \"function _manage_login(){\\n if((!isset($_COOKIE['username']))||(!isset($_SESSION['admin']))){\\n _alert_back('非法登录');\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb8442f92c5966c32d787bf187436a17\",\n \"score\": \"0.64879405\",\n \"text\": \"function user_authorized() {\\n\\t\\tif (isset($_COOKIE['login']) && $_COOKIE['login'] &&\\n\\t\\t\\tisset($_COOKIE['passwd']) && $_COOKIE['passwd']) {\\n\\t\\t\\tif (user_pass_valid($_COOKIE['login'], $_COOKIE['passwd'])){\\n\\t\\t\\t\\t$_SESSION[\\\"logged_user\\\"] = $_COOKIE['login'];\\n\\t\\t\\t\\treturn (1);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\treturn (0);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8628fcb0b14d5440396f768796ae6ed9\",\n \"score\": \"0.6479218\",\n \"text\": \"function authd() {\\n $app = registry('app');\\n $sess = $app->request->session->get('user');\\n\\n if ($sess === false) {\\n return false;\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"366f81c461d9c0cf9aa472f1b3d93c88\",\n \"score\": \"0.64728963\",\n \"text\": \"public function verificar_session(){\\n\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"43c367bc5a98e9f3b8b49c4c5b0ef161\",\n \"score\": \"0.64646673\",\n \"text\": \"private function register(){\\n\\t\\t$user = D(\\\"User\\\");\\n\\t\\tif(!$data = $user->create()){\\n // 防止输出中文乱码\\n header(\\\"Content-type: text/html; charset=utf-8\\\");\\n exit($user->getError());\\n\\t\\t}\\n\\t\\t$userId = $user->add($data);\\n\\t\\tsession('starballkids_userId', $userId);\\n\\t\\tsession('starballkids_userName', I('userName'));\\n\\t\\tsession('starballkids_email', I('email'));\\n\\t\\t//注册成功后把当前session的购物车加到用户下面\\n\\t\\t$this->appendSessionToUser();\\n\\t\\t//从哪里跳到登录页面,跳回去\\n\\t\\tif(session('fromAction') != ''){\\n\\t\\t\\t$actionArray = C('FROM_ACTION');\\n\\t\\t\\t$actionDetail = $actionArray[session('fromAction')];\\n\\t\\t\\t$this->redirect($actionDetail['url'], $actionDetail['params']);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2ca710699d21af13d563ac1dcdcf628\",\n \"score\": \"0.6462741\",\n \"text\": \"public function checkSigninUser()\\n {\\n if ( !empty($_COOKIE['nsmle']) ) {\\n header('Location: ' . BASEURL . '/admin');\\n // Check session('nsmle') if isset redirect to admin home page\\n } else if ( !empty($_SESSION['nsmle']) ) {\\n header('Location: ' . BASEURL . '/admin');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"037ef8289b13377e7a14e66f63245522\",\n \"score\": \"0.6462697\",\n \"text\": \"public function checkLogin()\\n {\\n $user_ok = false;\\n $user_id = \\\"\\\";\\n $log_usename = \\\"\\\";\\n if (isset($_SESSION['user_id']) && isset($_SESSION['username'])) {\\n $user_id = preg_replace('#[^0-9]#', '', $_SESSION['user_id']);\\n $log_usename = preg_replace('#[^a-z0-9]#i', '', $_SESSION['username']);\\n // Verify the user\\n $user_ok = $this->evalLoggedUser($user_id, $log_usename);\\n } else if (isset($_COOKIE[\\\"user_id\\\"]) && isset($_COOKIE[\\\"username\\\"])) {\\n $_SESSION['user_id'] = preg_replace('#[^0-9]#', '', $_COOKIE['user_id']);\\n $_SESSION['username'] = preg_replace('#[^a-z0-9]#i', '', $_COOKIE['username']);\\n $user_id = preg_replace('#[^0-9]#', '', $_SESSION['user_id']);\\n $log_usename = preg_replace('#[^a-z0-9]#i', '', $_SESSION['username']);\\n // Verify the user\\n $user_ok = $this->evalLoggedUser($user_id, $log_usename);\\n }\\n return $user_ok;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"963d7114396cd43aaee83ffadccf9f3a\",\n \"score\": \"0.64592606\",\n \"text\": \"public static function logged_in(){\\r\\n\\r\\n if(isset($_SESSION['username']) && isset($_SESSION['id'])){\\r\\n return true;\\r\\n }else{\\r\\n return false;\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c4854cb08642ec5e0469b1be430f5b71\",\n \"score\": \"0.6452056\",\n \"text\": \"private function check_login() {\\n\\t\\tif ( isset($_SESSION['id']) ) {\\n\\t\\t\\t$this->user_id = $_SESSION['id'];\\n\\t\\t\\t$this->username = $_SESSION['username'];\\n\\t\\t\\t$this->logged_in = true;\\n\\t\\t\\t$this->admin_rights = $_SESSION['admin_rights'];\\n\\t\\t\\t$this->hashed_email = $_SESSION['hashed_email'];\\n\\t\\t} else {\\n\\t\\t\\tunset( $this->user_id );\\n\\t\\t\\tunset( $this->username);\\n\\t\\t\\t$this->logged_in = false;\\n\\t\\t} // end of isset\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26bb2a834e6d6422460fe27154ffccc1\",\n \"score\": \"0.6451311\",\n \"text\": \"public function doLogin(){\\n\\t\\t$data = array();\\n\\t\\t$data['username'] = $_POST[\\\"username\\\"];\\n\\t\\t$data['password'] = $_POST[\\\"password\\\"];\\n\\t\\t$user = D('User','Home')->getLocalUser($data['username'],$data['password']);\\n\\t\\tif($user['username']&&$user['userid']){//login success\\n\\t\\t\\t$validates = D('Home.Validation');\\n\\t\\t\\t$status = $validates->getStatus($user['userid']);\\n\\t\\t\\tif($status==0){\\n\\t\\t\\t\\t$this->assign('jumpUrl',U('Home/Public/login'));\\n\\t\\t\\t $this->error('该账户已经注册,但是没有通过邮箱验证。通过邮箱验证后即可激活帐号');\\n\\t\\t\\t}else if($status==1){\\n\\t\\t\\t\\t$userservice = new UserService();\\n\\t\\t\\t\\t$user['usertype'] = 'user';\\n\\t\\t\\t\\tif($userservice->registerLogin($user,false))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tU('Home/User/index','',true);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse{\\n\\t\\t\\t\\t\\t$this->assign('jumpUrl',U('Home/Public/login'));\\n\\t\\t\\t $this->error('用户名或密码错误');\\n\\t\\t\\t\\t}\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$this->assign('jumpUrl',U('Home/Index/index'));\\n\\t\\t\\t $this->error('非法账户!');\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t}\\n\\t\\telse{//login fail\\n\\t\\t\\t$this->assign('jumpUrl',U('Home/Public/login'));\\n\\t\\t\\t$this->error('用户名或密码错误');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ad6ef238a9579bc5b8e83669c87a13d\",\n \"score\": \"0.6450615\",\n \"text\": \"public function checklogin() {\\n\\t\\t\\t\\n\\t\\tif (!$this->input->post()) {\\n\\t\\t\\taudit_log(\\\"Error: parametri post non impostati. (login/checklogin)\\\");\\n\\t\\t\\texit(\\\"accesso non autorizzato\\\");\\n\\t\\t}\\n\\t\\t\\n\\t\\t$post=$this->input->post();\\n\\t\\t\\n\\t\\tif ( (!isset($post['username'])) || (!isset($post['password'])) ) {\\n\\t\\t\\taudit_log(\\\"Error: dati post login errati o incompleti: \\\".json_encode($post).\\\". (login/checklogin)\\\");\\n\\t\\t\\techo \\\"Login errato\\\";\\n\\t\\t\\texit();\\n\\t\\t}\\n\\t\\t\\n\\t\\t$post['password']=sha1($post['password']);\\n\\t\\n\\t\\tif ($user=$this->users->checkLogin($post)) {\\n\\t\\t\\t$this->session->user=$user;\\t\\t\\t\\n\\t\\t\\t$this->users->setLastLogin($user->username);\\n\\t\\t\\taudit_log(\\\"Message: login effettuato. Dati utente: \\\".json_encode($user).\\\". (login/index)\\\");\\n\\t\\t\\thttp_response_code(200);\\n\\t\\t}else{\\n\\t\\t\\taudit_log(\\\"Error: login errato. Dati login: \\\".json_encode($post).\\\" (login/checklogin)\\\");\\n\\t\\t\\thttp_response_code(401);\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b46f985c46048b22b49ccf91568954c\",\n \"score\": \"0.6440932\",\n \"text\": \"function validateLogin(){\\n $logged = $this->userManager->checkLogin($_POST['username'], hash('sha256', $_POST['password']))->fetch();\\n if($logged){\\n $_SESSION['login'] = $logged;\\n header('Location: /admin');\\n } else {\\n header('Location: /');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"faf22a3ef358179aa1729744516ce2b5\",\n \"score\": \"0.6437138\",\n \"text\": \"private function doLoginWithSessionData()\\n {\\n $this->user_is_logged_in = true; // ?\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ce0400fa235650d1abf4479e0e927ae\",\n \"score\": \"0.6434879\",\n \"text\": \"private function session_login() {\\n $this->_auth->el_login(Session::get_var('user_login'), Session::get_var('user_pass'));\\n $referer = $this->referer;\\n \\t\\tif($this->_auth->is_login()) {\\n if(!strpos('/login', $this->referer)) {\\n $this->referer = $referer;\\n return true;\\n } else {\\n $this->referer = get_option('home');\\n return true;\\n }\\n \\t\\t} else {\\n \\t\\t\\t$this->_error = $this->_auth->get_auth_last_error();\\n \\t\\t}\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7831dc290669ec92866bed71fefadf70\",\n \"score\": \"0.6427877\",\n \"text\": \"static function loginWithForm($db) {\\n $user = $_POST[\\\"username\\\"];\\n $pass = $_POST[\\\"password\\\"];\\n $passHash = sha1($pass);\\n\\n $q = 'SELECT `userID`,`username`,`passHash`,`cookieHash` FROM `user` WHERE username = :user AND passHash = :passHash';\\n $ps = $db->prepare($q);\\n\\n $ps->execute([\\\"user\\\"=>$user,\\\"passHash\\\"=>$passHash]);\\n\\n\\n if($ps->rowCount() == 1) {\\n $user_data = $ps->fetch();\\n\\n // logged in successfully\\n $cookieHash = sha1(time().$passHash);\\n $q = \\\"UPDATE `user` SET `cookieHash` = ? WHERE username = ?\\\";\\n $ps = $db->prepare($q);\\n\\n $ps->execute([$cookieHash,$user]);\\n\\n\\n setcookie(\\\"user\\\",$user,time()+60*60*24*7);\\n setcookie(\\\"h\\\",$cookieHash,time()+60*60*24*7); \\n \\n return $user_data;\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"272f4b4f25907a3874737ddae30977c9\",\n \"score\": \"0.6424914\",\n \"text\": \"function registerUser() {\\n\\t$uname = strip_tags($_POST['name']);\\n\\t$umobile = strip_tags($_POST['mobile']);\\n\\t$uemail = strip_tags($_POST['email']);\\n\\t$upassword = strip_tags($_POST['password']);\\n\\t$ucpassword = strip_tags($_POST['cpassword']);\\n\\n\\t$validInputs = $uname != '' && $umobile != '' && $uemail != '' && $upassword != '' && ($upassword == $ucpassword);\\n\\tif ($validInputs) {\\n\\n\\t\\t$userExists = qSelectObject(\\\"users\\\", \\\"email\\\", array(\\\"email\\\" => $uemail));\\n\\t\\tif ($userExists) {\\n\\t\\t\\techo jsonResponse(array(\\\"success\\\" => false, \\\"message\\\" => \\\"This email is already in use!\\\"));\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Hash password before inserting into database\\n\\t\\t$hashed_password = getEncodedHash($upassword);\\n\\t\\t$newUser = array(\\\"name\\\" => $uname, \\\"mobile\\\" => $umobile, \\\"email\\\" => $uemail, \\\"password\\\" => $hashed_password);\\n\\t\\t$insertId = qInsert(\\\"users\\\", $newUser);\\n\\t\\t// Creation error\\n\\t\\tif (!$insertId) {\\n\\t\\t\\techo jsonResponse(array(\\\"success\\\" => false, \\\"message\\\" => \\\"Failed to create user. Please try again!\\\"));\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t// Use encoded hash so that when we enable payments, we can identify sessions\\n\\t\\t// by the hash of the email\\n\\t\\t$_SESSION['id'] = getEncodedHash($uemail);\\n\\t\\t$_SESSION['name'] = $uname;\\n\\t\\t$_SESSION['email'] = $uemail;\\n\\t\\t$_SESSION['uid'] = $insertId;\\n\\t\\t//Setting the cookie at time of register\\n\\t\\t//login_email: c1\\n\\t\\t//login_pass: q\\n\\t\\tsetcookie(\\\"c1\\\", $uemail, time() + (86400 * 30), \\\"/\\\");\\n\\t\\tsetcookie(\\\"q\\\", $hashed_password, time() + (86400 * 30), \\\"/\\\");\\n\\t\\techo jsonResponse(array(\\\"success\\\" => true, \\\"message\\\" => \\\"\\\", \\\"redirect\\\" => true, \\\"redirect_target\\\" => \\\"index.php\\\"));\\n\\t} elseif ($upassword != $ucpassword) {\\n\\t\\techo jsonResponse(array(\\\"success\\\" => false, \\\"message\\\" => \\\"The passwords do not match!\\\"));\\n\\t} else {\\n\\t\\techo jsonResponse(array(\\\"success\\\" => false, \\\"message\\\" => \\\"Invalid inputs!\\\"));\\n\\t}\\n\\treturn;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e9e2a8c7da4a0477424649426bfc998e\",\n \"score\": \"0.6424182\",\n \"text\": \"public function loginUser()\\n\\t{\\n\\t\\t//$tokenstr = json_encode($token);\\n\\t\\t$coll = new FormCollection($this->request->data['usermodel']);\\n\\t\\t$username = $coll->getItem('username');\\n\\t\\t$pwd = $coll->getItem('password');\\n\\t\\t\\n\\t\\t$sen = new Sentinel();\\n\\t\\t$usr = $sen->validateUser($username, $pwd);\\n\\t\\t\\n\\t\\tif($usr){\\n\\t\\t\\t$cookie = array(\\n\\t\\t\\t\\t'name' => 'SiteToken',\\n\\t\\t\\t\\t'value' => $usr->getId(),\\n\\t\\t\\t\\t'expire' => 0,\\n\\t\\t\\t\\t'secure' => FALSE\\n\\t\\t\\t);\\n\\t\\t\\t\\n\\t\\t\\t$succ = setcookie('SiteToken', $usr->getId(), 0, '/', '', FALSE);\\n\\t\\t\\t//echo \\\"Return value of setting cookie: \\\" . $succ;\\n\\t\\t\\t$this->redirect('/dashboard/');\\n\\t\\t}else{\\n\\t\\t\\t$this->set(array('status'=>'fail'));\\n\\t\\t\\treturn $this->render(array('template'=>'login'));\\n\\t\\t}\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a50a4a05ddc5799bdcf5d58567262dcd\",\n \"score\": \"0.6420513\",\n \"text\": \"public static function checkCookie() {\\n if(isset($_COOKIE['login'])) {\\n \\n\\t \\n\\t list($user, $token, $sig) = explode(':', $_COOKIE['login'], 3);\\n\\t \\n\\t $serverSig = hash('sha256', sha1(Account::$serverSignKey) . $token);\\n\\t \\n\\t \\n\\t if ($serverSig != $sig) {\\n\\t return false;\\n\\t } else {\\n\\t \\n\\t \\n connect();\\n \\n $account = new Account($user);\\n Account::reLogin($account, $account->getHash());\\n\\t return true;\\n\\t\\t }\\n\\t }\\n \\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c31c5bf25a9205393c3d5b9bf4fb7ba\",\n \"score\": \"0.6420151\",\n \"text\": \"function login($username, $password){\\n\\tinclude_once(\\\"db.inc.php\\\");\\n\\tif($username == USERNAME && $password == USERPASS){\\n\\t\\tsession_set_cookie_params(3600*6, '/', 'mtl.parkr.me');\\n\\t\\tsession_id(SESSION_ID);\\n\\t\\tsession_start();\\n\\t\\tsession_register(SESSION_ID);\\n\\t\\t$_SESSION['started'] = true;\\n\\t\\treturn true;\\n\\t}else{\\n\\t\\treturn false;\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a17663f69bc508fbc1d61fd9e4efd91f\",\n \"score\": \"0.64171785\",\n \"text\": \"public function validateCookieAndLogIn(User $user) {\\n\\t\\tassert (!is_null($user));\\n\\t\\t$storedUser = $this->userDAL->getUserWithToken($user);\\n\\t\\t\\n\\t\\t// If it's null there is no data and the cookie is probably tampered with\\n\\t\\tif (is_null($storedUser)) {\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\t\\t$result = ($user->getUsername() == $storedUser->getUsername() && $this->verifyHashedToken($user->getPassword(), $storedUser->getPassword()));\\n\\t\\tif ($result) {\\n\\t\\t\\t$_SESSION[self::$loggedIn] = true;\\n\\t\\t\\t$_SESSION[self::$sessionUserLocation] = new loggedInUser($user->getUsername());\\n\\t\\t}\\n\\t\\treturn $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bba09d210cba30b6b880eaa4aa51592\",\n \"score\": \"0.6416556\",\n \"text\": \"public function CookieSet(){\\n if (isset($_COOKIE[$this->_cookieUsername]) && isset($_COOKIE[$this->_cookiePassword])){\\n return true;\\n }\\n else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65cc18c509d7403f05728194451106d7\",\n \"score\": \"0.64163846\",\n \"text\": \"public function login()\\n {\\n\\n if(server('REQUEST_METHOD') == 'POST'){\\n\\n $email = $_POST['email'];//принимаем данные из формы (email,пароль)\\n $password = $_POST['password'];\\n\\n if ($user = User::login($email, $password))\\n {\\n Session::set('email', $user['email']);//создаем сессию авторизованному пользователю\\n header('Location: ' . server('HTTP_REFERER'));\\n }\\n else if (!empty($_POST)){//нужно чтобы если поля еще не заполнены ничем - не выводилась ошибка, что неправильный логин/пароль\\n $errors = \\\"Вы ввели неправильный логин или пароль!\\\";\\n Session::set('errors', $errors);\\n redirect(301, server('HTTP_REFERER'));\\n }\\n\\n }else{\\n redirect(301, '/');\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"677f199e339783b7f461947957a84c92\",\n \"score\": \"0.64124537\",\n \"text\": \"public function login() {\\n\\t\\t$name = filter_var(Helper::post('name'), FILTER_SANITIZE_STRING);\\n\\t\\t$password = filter_var(Helper::post('password'), FILTER_SANITIZE_STRING);\\n\\n\\t\\t/*** now we can encrypt the password ***/\\n\\t\\t$password = sha1($password);\\n\\n\\t\\ttry {\\n\\t\\t\\t//$dbh = $db->base;\\n\\t\\t\\t//$stmt= $dbh->base->query(\\\"SELECT id, name, password FROM users WHERE name = '$name' AND password = '$password'\\\");\\n\\t\\t\\t$stmt = $this -> db -> prepare(\\\"SELECT id, name, email, password FROM \\\".DBPREFIX.\\\"users WHERE (name = ? OR email = ?) AND password = ?\\\");\\n\\t\\t\\t$stmt -> execute(array($name, $name, $password));\\n\\n\\t\\t\\t/*** check for a result ***/\\n\\t\\t\\t$user_id = $stmt -> fetchColumn();\\n\\n\\t\\t\\t/*** if we have no result then fail boat ***/\\n\\t\\t\\tif ($user_id == FALSE) {\\n\\t\\t\\t\\treturn 101;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\tHelper::session_set('id', $user_id);\\n\\t\\t\\t\\t//Helper::session_set('user_name', $row['name']);\\n\\t\\t\\t\\t//Helper::session_set('user_email', $row['email']);\\n\\t\\t\\t\\t//$search = \\\"%$search%\\\";\\n\\t\\t\\t\\t$user_data = $this -> db -> prepare(\\\"SELECT * FROM \\\".DBPREFIX.\\\"users WHERE name = ? OR email = ?\\\");\\n\\t\\t\\t\\t$user_data -> execute(array($name, $name));\\n\\t\\t\\t\\t$data = $user_data -> fetchAll();\\n\\t\\t\\t\\tHelper::session_set('user_name', $data[0]['name']);\\n\\t\\t\\t\\tHelper::session_set('user_email', $data[0]['email']);\\n\\t\\t\\t\\tHelper::session_set('user_role', $data[0]['role']);\\n\\t\\t\\t\\tHelper::session_set('user_access', $data[0]['role_id']);\\n\\t\\t\\t\\t//var_dump($data[0]);\\n\\t\\t\\t\\t//while ($row = $stmt -> fetch()) {\\n\\n\\t\\t\\t\\t//}\\n\\t\\t\\t\\treturn 0;\\n\\t\\t\\t}\\n\\n\\t\\t} catch(Exception $e) {\\n\\t\\t\\t/*** if we are here, something has gone wrong with the database ***/\\n\\t\\t\\treturn 102;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3d80da2dcf9f4f8d59ebe45b1ccec99\",\n \"score\": \"0.6406421\",\n \"text\": \"public function IsAuthenticatedUser()\\n { \\n if(isset($_SESSION['user'])){\\n return true;\\n }\\n else{\\n return false;\\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e7bc1820f5a30ec5e783c9565885f3e\",\n \"score\": \"0.640456\",\n \"text\": \"public function checkCredentials($username, $password) {\\n if($this->getUsername()==$username && $this->getPassword()==$password) {\\n if (!isset($_COOKIE[\\\"username\\\"])) {\\n setcookie(\\\"username\\\", \\\"$username\\\", time() + (86400 * 7));\\n setcookie(\\\"password\\\",\\\"$password\\\",time() + (86400 * 7));\\n }\\n return \\\"Yes\\\";\\n } else {\\n return \\\"No\\\";\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ccd218f66e07ba32ad58dba85010022\",\n \"score\": \"0.6401537\",\n \"text\": \"function login_user($email, $password, $remember){\\n\\n\\t$result = query(\\\"SELECT password, id FROM users WHERE email='\\\".escape($email).\\\"' AND active=1\\\");\\n\\tconfirm($result);\\n\\n\\tif (row_count($result) ==1 ) {\\n\\t\\t\\n\\t\\t$row = fetch_array($result);\\n\\n\\t\\t$db_password = $row['password'];\\n\\n\\t\\tif (md5($password)==$db_password ) {\\n\\n\\t\\t\\t//set remember\\n\\t\\t\\tif ($remember == \\\"on\\\") {\\n\\t\\t\\t\\tsetcookie('email', $email, time() + 86400 );\\n\\t\\t\\t}\\n\\t\\t\\t//\\n\\n\\t\\t\\t$_SESSION['email'] = $email;\\n\\t\\t\\treturn true;\\n\\t\\t}else{\\n\\t\\t\\treturn false;\\n\\t\\t}\\n\\n\\n\\n\\t}\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2543018583e38de711baea8570080921\",\n \"score\": \"0.64015037\",\n \"text\": \"function jakChecklogged() {\\n\\t if (isset($_COOKIE['jak_lcp_cookname']) && isset($_COOKIE['jak_lcp_cookid'])) {\\n\\t $_SESSION['jak_lcp_username'] = $_COOKIE['jak_lcp_cookname'];\\n\\t $_SESSION['jak_lcp_idhash'] = $_COOKIE['jak_lcp_cookid'];\\n\\t }\\n\\t\\n\\t /* Username and idhash have been set */\\n\\t if (isset($_SESSION['jak_lcp_username']) && isset($_SESSION['jak_lcp_idhash']) && $_SESSION['jak_lcp_username'] != $this->username) {\\n\\t /* Confirm that username and userid are valid */\\n\\t if (!JAK_userlogin::jakConfirmidhash($_SESSION['jak_lcp_username'], $_SESSION['jak_lcp_idhash'])) {\\n\\t \\t/* Variables are incorrect, user not logged in */\\n\\t unset($_SESSION['jak_lcp_username']);\\n\\t unset($_SESSION['jak_lcp_idhash']);\\n\\t \\n\\t return false;\\n\\t }\\n\\t \\n\\t // Return the user data\\n\\t return JAK_userlogin::jakUserinfo($_SESSION['jak_lcp_username']);\\n\\n\\t /* User not logged in */\\n\\t } else {\\n\\t \\treturn false;\\n\\t }\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a2d39df0676c07437dd8754900cc6b3\",\n \"score\": \"0.63981324\",\n \"text\": \"function aksi_login(){\\n\\t\\t$username = $this->input->post('username');\\n\\t\\t$password = $this->input->post('password');\\n\\t\\t$where = array(\\n\\t\\t\\t'username' => $username,\\n\\t\\t\\t'password' => md5($password)\\n\\t\\t\\t);\\n\\t\\t$cek = $this->UserLoginModel->cek_login($where)->num_rows();\\n\\t\\tif($cek > 0){\\n\\t\\t\\t$data_session = array(\\n\\t\\t\\t\\t'nama' => $username,\\n\\t\\t\\t\\t'status_login'=>1\\n\\t\\t\\t\\t);\\n \\n\\t\\t\\t$this->session->set_userdata($data_session);\\n \\n\\t\\t\\tredirect(site_url(\\\"dashboard\\\"));\\n \\n\\t\\t}else{\\n\\t\\t\\techo \\\"Username dan password salah !\\\";\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85de01999543458dfbdce4c410cc7342\",\n \"score\": \"0.6396937\",\n \"text\": \"public function login(){\\n if (isset($_POST)) {\\n # Identificar el usuario\\n $user = new User();\\n $identity =$user->login($_POST['email']);\\n //mantener usuario identificado\\n if($identity && is_object($identity)){\\n\\t\\t\\t\\t$_SESSION['identity'] = $identity;\\n\\t\\t\\t\\t//identificacion de administrador\\n\\t\\t\\t\\tif($identity->rol == 'admin'){\\n\\t\\t\\t\\t\\t$_SESSION['admin'] = true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$_SESSION['error_login'] = 'Identificación fallida !!';\\n }\\n }\\n header(\\\"Location:\\\".URL);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cff2ba20bb5d16977e239b86889f6043\",\n \"score\": \"0.63910264\",\n \"text\": \"public function User_Login()\\n\\t {\\n\\t\\t $active_user = $this->input->post('username');\\n \\t\\t $is_user = get_cookie('active_user', TRUE);\\n\\n\\t\\t if (!$is_user) {\\n\\t\\t\\t set_cookie('active_user', $active_user, 10000);\\n\\n\\t\\t } else {\\n\\t\\t\\t delete_cookie('active_user');\\n\\t\\t }\\n\\n\\t\\t $this->index();\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0635c5d8fd4a85c24b85c71f6a6081b\",\n \"score\": \"0.6390137\",\n \"text\": \"public function checkLogin()\\r\\n {\\r\\n $this->form_validation->set_rules('username', 'Username', 'required|valid_email');\\r\\n $this->form_validation->set_rules('password', 'Password', 'required|callback_verifyUser');//callback is sort of \\r\\n if($this->form_validation->run()==false) //calling verifyUser fxn\\r\\n {\\r\\n $this->load->view('login');\\r\\n }\\r\\n else\\r\\n {\\r\\n $username = $this->input->post('username');\\r\\n $password = $this->input->post('password');\\r\\n // $data['username']= $username;\\r\\n //$data['password']= $password;\\r\\n $session_data = array(\\\"username\\\"=>$username);\\r\\n $this->session->set_userdata($session_data);\\r\\n \\r\\n redirect('splController/toLoadProductsPage');\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"306cad28d2b2c9249ac703dce6315a13\",\n \"score\": \"0.6386265\",\n \"text\": \"public function login()\\n\\t{\\n\\t\\t//appelle le usermanager pour les requetes sql\\n\\t\\t//affichage du formulaire\\n\\n\\t\\t$error = '';\\n\\t\\t//si le form est soumis...\\n\\n\\t\\tif (!empty($_POST)){\\n\\n\\t\\t\\t$usernameOrEmail = $_POST['usernameOrEmail'];\\n\\n\\t\\t\\t$userManager = new \\\\Model\\\\Manager\\\\UserManager();\\n\\t\\t\\t//on va chercher le user en fonction du pseudo ou de l'email\\n\\t\\t\\t$user = $userManager->searchUser($usernameOrEmail);\\n\\n\\t\\t\\t//hache le mot de passe et le compare à celui de la bdd\\n\\t\\t\\tif (password_verify($_POST['password'], $user['password'])){\\n\\t\\t\\t\\t//connectez l'user en stockant une ou des infos dans la session.\\n\\t\\t\\t\\t//On vérifiera ces infos sur les pages à sécuriser.\\n\\t\\t\\t\\t$_SESSION['user'] = $user;\\n\\n\\t\\t\\t\\t//$_COOKIE pour la lecture\\n\\t\\t\\t\\t//on stocke le token dans un cookie\\n\\t\\t\\t\\t//on ne devrait placer ce cookie que si une case est cochée\\n\\t\\t\\t\\t//pour l'instant, ce cookie ne sert à rien !!!\\n\\t\\t\\t\\tsetcookie(\\\"remember_me\\\", $user['token'], strtotime(\\\"+ 6 months\\\"), \\\"/\\\");\\n\\t\\t\\t\\theader(\\\"Location: user\\\");\\n\\t\\t\\t}\\n\\t\\t\\telse {\\n\\t\\t\\t\\t//on garde ça vague pour ne pas donner d'infos aux méchants\\n\\t\\t\\t\\t$error = \\\"Wrong username or email !\\\";\\n\\t\\t\\t}\\n\\n\\t\\t}\\n\\n\\t\\t$data = [\\n\\t\\t\\t\\\"error\\\" => $error\\n\\t\\t];\\n\\t\\tView::show(\\\"login.php\\\", \\\"Website | User Home\\\", $data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"226160a6c2a2a7d4c7b09ac3a5714a99\",\n \"score\": \"0.6384861\",\n \"text\": \"function login_user($email, $password, $remember)\\n{\\n\\t$database \\t= \\\"SELECT password, email FROM users WHERE email = '\\\".escape($email).\\\"' AND ACTIVE = 1\\\";\\n\\t$result \\t= query($database);\\n\\tif (row_count($result) == 1)\\n\\t{\\n\\t\\t$row \\t\\t\\t= fetch_array($result);\\n\\t\\t$db_password \\t= $row['password'];\\n\\n\\t\\tif (md5($password) === $db_password) {\\n\\n\\t\\t\\tif ($remember == \\\"on\\\") {\\n\\t\\t\\n\\t\\t\\t\\tsetcookie('email', $email, time() + 86400);\\n\\t\\t\\t}\\n\\n\\t\\t\\t$_SESSION['email'] = $email;\\n\\t\\t\\n\\t\\t\\treturn true;\\n\\t\\t}\\n\\t}\\n\\telse{\\n\\t\\treturn false;\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7417f64bbdafb75e30d4f9ddba8284f5\",\n \"score\": \"0.63844806\",\n \"text\": \"function userAuthorised($dbConnected,$username,$password){\\n \\n $md5password=md5($password);\\n \\n $sql_query= \\\"SELECT ID,password,accesslevel FROM tuser where username='$username'\\\";\\n \\n \\n $sql_selectQuery= mysqli_query($dbConnected, $sql_query);\\n echo mysqli_error($dbConnected);\\n while($row= mysqli_fetch_array($sql_selectQuery,MYSQLI_ASSOC)){\\n $ID = $row['ID'];\\n $passwordretrieved = $row['password'];\\n $accesslevel = $row['accesslevel']; \\n }\\n mysqli_free_result($sql_selectQuery);\\n $returncode=false;\\n if(!empty($passwordretrieved) AND ($passwordretrieved==$md5password)) {\\n \\n $_SESSION['user'] = $accesslevel;\\n setcookie('userID', $ID, time()+7200);\\n $returncode=true;\\n }\\n return $returncode;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68fc762a905553ca3e0f353f0f4133b9\",\n \"score\": \"0.63808966\",\n \"text\": \"private function cookie_login()\\n\\t{\\n\\t\\tglobal $mwf_cookie;\\n\\t\\t// We need to have a cookie to work with.\\n\\t\\tif ($mwf_cookie === NULL || !isset($_COOKIE[$mwf_cookie]))\\n\\t\\t{\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\t\\t$split = explode(':', $_COOKIE[$mwf_cookie]);\\n\\t\\ttry\\n\\t\\t{\\n\\t\\t\\t$mwf_user = new MwfUser($split[0], MwfUser::IdentId);\\n\\t\\t\\tif ($mwf_user->cookie_authenticate($split[1]))\\n\\t\\t\\t{\\n\\t\\t\\t\\t// Defer to login to set up the session.\\n\\t\\t\\t\\t$this->login($mwf_user->get_user_name(), NULL, true);\\n\\t\\t\\t\\t$_SESSION['logged_in_via_cookie'] = true;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tcatch (Exception $e)\\n\\t\\t{\\n\\t\\t\\t// Just give up.\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f58821a3c63e4ac9da3cc2f2fcd46a9a\",\n \"score\": \"0.6380493\",\n \"text\": \"function login()\\n{\\n\\n\\t$username = $_POST['username'];\\n\\t$password = $_POST['password'];\\n\\n\\t$result = admin()->get(\\\"username='$username' and password = '\\\".sha1($password).\\\"' and level='hr'\\\");\\n\\n\\tif ($result){\\n\\t\\t$_SESSION['hr_session'] = $username;\\n\\t\\tif (sha1($password) == sha1('temppassword')){\\n\\t\\t\\t$_SESSION['temp_session'] = $username;\\n\\t\\t\\theader('Location: index.php?view=changepassword');\\n\\t\\t}else{\\n\\t\\theader('Location: index.php');\\n\\t\\t}\\n\\t}\\n\\telse {\\n\\t\\t\\theader('Location: index.php?error=User not found in the Database');\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f440767206a875ee28d084e7d8787322\",\n \"score\": \"0.6379213\",\n \"text\": \"private function isLoggedInBefore() {\\n\\n\\t\\t# If user data was saved\\n\\t\\tif(!$sessionId = ud::$cookie->key('sessionId')->typeFilter(FilterRule::TYPE_EMPTY_STRING)->valueOr(null))\\n\\t\\t\\treturn false;\\n\\n\\t\\ttry {\\n\\n\\t\\t\\t# We try to authorise user\\n\\t\\t\\tif($user = self::authenticationBySession($sessionId))\\n\\t\\t\\t\\tself::authorisation($user);\\n\\t\\t\\telse\\n\\t\\t\\t\\t$this->logout(false);\\n\\n\\t\\t} catch(\\\\Exception $e) {\\n\\t\\t\\tif($e instanceof DatabaseException)\\n\\t\\t\\t\\tthrow new DatabaseException(\\\"Can't auth user, \\\".$e->getMessage());\\n\\t\\t\\tInfo::error(\\\"Во время восстановления сессии произошла ошибка\\\");\\n\\t\\t}\\n\\n\\t\\t# False if auth failed\\n\\t\\treturn false;\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3008091a779f85613a4afe61b531d9fb\",\n \"score\": \"0.6378229\",\n \"text\": \"public function _checkLogin()\\n {\\n $excludePage = array('reset-password', 'create-password', 'login');\\n \\n if (!Session::has('ses_userid') && !in_array($this->currentPath, $excludePage))\\n \\t{\\n \\t if ( Request::cookie('u_hash') && Request::cookie('e_hash'))\\n {\\n $user = User::where('hash', Request::cookie('u_hash'))->with('pegawai')->first();\\n \\n if ( count($user)>0 && sha1($user->user_email) == Request::cookie('e_hash') )\\n {\\n return $this->_setSessionLogin($user);\\n }\\n }\\n \\n $this->setNotif( Lang::get('login.must_login') );\\n\\n header(\\\"location:\\\".BeUrl('login'));exit;\\n }\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":771,"cells":{"query_id":{"kind":"string","value":"921313a2b04ed2afcf91b6e31fb3010d"},"query":{"kind":"string","value":"Sets the policy length"},"positive_passages":{"kind":"list like","value":[{"docid":"4ba75df55724c5c75d6438749eea6465","score":"0.7534722","text":"public function setPolicyLength($policyLength)\n {\n $this->policyLength = $policyLength;\n return $this;\n }","title":""}],"string":"[\n {\n \"docid\": \"4ba75df55724c5c75d6438749eea6465\",\n \"score\": \"0.7534722\",\n \"text\": \"public function setPolicyLength($policyLength)\\n {\\n $this->policyLength = $policyLength;\\n return $this;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"3f5246e87c2db78e1a85bc8d567852a6","score":"0.72333366","text":"public function setLength($length);","title":""},{"docid":"5eb262aa7755be6452fd36bd5b237ad0","score":"0.7053596","text":"function SetRequestedLength($length){}","title":""},{"docid":"18b3b057e0aaec07b62e11584666cb28","score":"0.6901299","text":"public function getPolicyLength()\n {\n return $this->policyLength;\n }","title":""},{"docid":"c5b251fcd9a60def3ca565b35dd2cb84","score":"0.68694514","text":"function SetMaxLength($len){}","title":""},{"docid":"903aec70e28c55265067786520faf6f0","score":"0.6733522","text":"public function setLength($length)\n\t{\n\t\t$this->length = $length;\n\t}","title":""},{"docid":"f9d12d13ef7e2fc8ff41dbe92ba31819","score":"0.67033416","text":"public function setLength($length)\n {\n $this->length = $length;\n }","title":""},{"docid":"ac7b74f5ac5b15c1f0c7c8cfa18689b2","score":"0.6687289","text":"public function setLength($length) {\n $this->length = $length;\n }","title":""},{"docid":"12b3b78f72e855d34687d21f79398fbe","score":"0.66056967","text":"public function setLength(int $length)\n {\n $this->expiration[self::EXPIRATION][self::LENGTH] = $length;\n }","title":""},{"docid":"fb8575c2c7e0098827c5bfd8b1324b90","score":"0.6276504","text":"function setBlockLength($length)\n {\n return;\n }","title":""},{"docid":"c62f7178d40b48da3b91d74b6696988e","score":"0.61493695","text":"function set_cache_length( $length ) {\n\n\t\tself::$cache_length = $length;\n\n\t}","title":""},{"docid":"714615793460dfd831d8acc7de38beec","score":"0.6139987","text":"public function setPageLength() {\n $length = Input::get('length');\n if (!isset($length)) {\n $length = 50;\n }\n\n $this->length = $length;\n }","title":""},{"docid":"75e279915b8320097bdb3591e5fe5af0","score":"0.60727847","text":"private function updateLength()\n {\n $this->_length = count($this->_result);\n }","title":""},{"docid":"cb7061aec2a1a0d10778cd39cb3ecb8b","score":"0.60417795","text":"private function prepareLength() {\n $result = $this->getValuesForSelectorSetting(WooCommerceSettings::WC_LENGTH_SELECTORS, 'text', false, true, true);\n if (!$result) return;\n\n $this->wcData->setLength($result);\n }","title":""},{"docid":"ebc142aee413541082142fcebc82a282","score":"0.59237224","text":"public function setRemainLen($len)\n {\n $this->remainLen = (int) $len;\n }","title":""},{"docid":"34ef456f30236c25af0fa24f3c08711f","score":"0.5904502","text":"public function setLength($length)\n {\n $this->values['Length'] = $length;\n return $this;\n }","title":""},{"docid":"5895665b65049facb82348ab7062264a","score":"0.5894496","text":"public function setMaxLength($maxLength);","title":""},{"docid":"3fc0fa818717132d09fc2d7ad1e32bbe","score":"0.5858925","text":"public function length ( $length ) {\n $this->length = (int) $length;\n return $this;\n }","title":""},{"docid":"667bc1dce2bfc631947d74ea9be6fffb","score":"0.5813086","text":"function setKeyLength($length)\n {\n $length >>= 5;\n if ($length > 8) {\n $length = 8;\n } else if ($length < 4) {\n $length = 4;\n }\n $this->Nk = $length;\n $this->key_size = $length << 2;\n\n $this->explicit_key_length = true;\n $this->changed = true;\n }","title":""},{"docid":"b831e6b5ae3d44a326e444e07adbb73c","score":"0.58068115","text":"public function setLength(?string $length): self\n {\n $this->length = $length === '' ? null : $length;\n return $this;\n }","title":""},{"docid":"e8fccc84488153b0aebf9b1d15e2bbe6","score":"0.5761249","text":"public function setPageLength($length = 10)\n {\n \t$this->pageLength = $length;\n }","title":""},{"docid":"464d37fbbd98ffa3bb6ccb3f282c80ed","score":"0.5756916","text":"function setBlockLength($length)\n {\n $length >>= 5;\n if ($length > 8) {\n $length = 8;\n } else if ($length < 4) {\n $length = 4;\n }\n $this->Nb = $length;\n $this->block_size = $length << 2;\n $this->changed = true;\n }","title":""},{"docid":"bf3c069c98396707b54f320c88c96410","score":"0.5750564","text":"public function __construct($length)\n\t{\n\t\t$this->length = $length;\n\t}","title":""},{"docid":"be6f4df7b3ab1b7b02d3a2e2e5588192","score":"0.5729382","text":"public static function length($new_length = 55) {\n Excerpt::$length = $new_length;\n \n add_filter('excerpt_length', 'Excerpt::new_length');\n \n Excerpt::output();\n }","title":""},{"docid":"d2567250d9d9e524968c27c8012fa384","score":"0.57176214","text":"public function length(?int $length)\n {\n $this->fields[$this->current]['length'] = $length;\n\n return $this;\n }","title":""},{"docid":"5847bb23b77a387e8958923fe49c90d4","score":"0.5690842","text":"public function setLength($length)\n {\n $this->length = $length;\n\n return $this;\n }","title":""},{"docid":"f0848ab1d9bbf3e16b9f24d7f27d7bdc","score":"0.56657726","text":"public function setLength($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }","title":""},{"docid":"f0848ab1d9bbf3e16b9f24d7f27d7bdc","score":"0.56657726","text":"public function setLength($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }","title":""},{"docid":"90595160558f4f2759e9ad612611e278","score":"0.565583","text":"protected function length($length) {\n\t\tif (strlen($this->value) !== $length) $this->setIssue('is length');\n\t}","title":""},{"docid":"edbb4be7a59ec77150eb127427543d6a","score":"0.5649616","text":"public static function length($new_length = 55) {\n Excerpt::$length = $new_length;\n\n add_filter('excerpt_length', 'Excerpt::new_length');\n\n Excerpt::output();\n }","title":""},{"docid":"edbb4be7a59ec77150eb127427543d6a","score":"0.5649616","text":"public static function length($new_length = 55) {\n Excerpt::$length = $new_length;\n\n add_filter('excerpt_length', 'Excerpt::new_length');\n\n Excerpt::output();\n }","title":""},{"docid":"e98aaba44ae1838b070b6e3c0712b2b0","score":"0.56425273","text":"public function SetRoadLength($road_length)\n {\n $this->road_length=$road_length;\n }","title":""},{"docid":"a0466e5f01c55aeb5a746aec40ce2120","score":"0.56123817","text":"public function setMaxLength($length)\r\n {\r\n $this->_maxLength = $length;\r\n return $this;\r\n }","title":""},{"docid":"78726e31ee2c7caab813f97c5b1f6553","score":"0.5563726","text":"public function setLength($length = null): object\n\t{\n\t\tif (null !== $length && !($length instanceof FHIRInteger)) {\n\t\t\t$length = new FHIRInteger($length);\n\t\t}\n\t\t$this->_trackValueSet($this->length, $length);\n\t\t$this->length = $length;\n\t\treturn $this;\n\t}","title":""},{"docid":"9a5ef73d71fd9df5fd1bf522ce925155","score":"0.5551003","text":"public function setPolicy($val)\n {\n $this->_propDict[\"policy\"] = $val;\n return $this;\n }","title":""},{"docid":"6818b1cd2cc4ad362de3547b4d8e28e4","score":"0.5547685","text":"public static function length($new_length = 55) {\n BarristarExcerpt::$length = $new_length;\n add_filter('excerpt_length', 'BarristarExcerpt::new_length');\n BarristarExcerpt::output();\n }","title":""},{"docid":"40b09d260d3eccf5119885547e8a6d5f","score":"0.55374414","text":"public function setMinimumRequiredConstraints(int $number): PasswordPolicyInterface;","title":""},{"docid":"c340d34e6e27d371ada431189d1dcd20","score":"0.55198336","text":"public function length($value) {\n return $this->setProperty('length', $value);\n }","title":""},{"docid":"1100541649f7cb921d45192624ca181d","score":"0.5487957","text":"protected function defineTotalLengthOfSides(): void\n {\n $this->fullLengthOfSides = $this->getLengthOfSides() * $this->numberOfProducts;\n }","title":""},{"docid":"b48654335f6b6c8953c1e3bc71bd89a0","score":"0.547445","text":"public function setPasswordMinimumLength($val)\n {\n $this->_propDict[\"passwordMinimumLength\"] = intval($val);\n return $this;\n }","title":""},{"docid":"8af2930931c4f07d4207f1864d0534c5","score":"0.54452443","text":"public function setMaxPasswordLength($length);","title":""},{"docid":"9f9a58ffb92c23062fd8451661883050","score":"0.54417074","text":"public function setMinPasswordLength($length);","title":""},{"docid":"cafde09ff4804fe724102b50cd35d4e2","score":"0.54394513","text":"protected function getLength()\n {\n return 10;\n }","title":""},{"docid":"888647a8d224eef33ecddee96311b1e4","score":"0.53954494","text":"public function length($value) {\n $this->annotations['length'] = $value;\n return $this;\n }","title":""},{"docid":"f7a835734fa78f784429f14ca0e2358e","score":"0.5387838","text":"function setSize($size)\r\n\t{\r\n\t\t$this->size = 0+$size;\r\n\t}","title":""},{"docid":"8e5f2a5008694b2f3d86c773c5e3d245","score":"0.53679097","text":"function setwidth($width){\r\n\t\t$this->width = $width;\r\n\t}","title":""},{"docid":"c96860b43dbb4d3c567b95ecc8f73ab3","score":"0.53393435","text":"function SetWidth($width){}","title":""},{"docid":"c96860b43dbb4d3c567b95ecc8f73ab3","score":"0.53393435","text":"function SetWidth($width){}","title":""},{"docid":"c96860b43dbb4d3c567b95ecc8f73ab3","score":"0.53393435","text":"function SetWidth($width){}","title":""},{"docid":"c96860b43dbb4d3c567b95ecc8f73ab3","score":"0.53393435","text":"function SetWidth($width){}","title":""},{"docid":"c96860b43dbb4d3c567b95ecc8f73ab3","score":"0.53393435","text":"function SetWidth($width){}","title":""},{"docid":"c96860b43dbb4d3c567b95ecc8f73ab3","score":"0.53393435","text":"function SetWidth($width){}","title":""},{"docid":"f8d69dc53095f354efcee46c56d81107","score":"0.5333394","text":"public static function new_length() {\n if( isset(Excerpt::$types[Excerpt::$length]) )\n return Excerpt::$types[Excerpt::$length];\n else\n return Excerpt::$length;\n }","title":""},{"docid":"f8d69dc53095f354efcee46c56d81107","score":"0.5333394","text":"public static function new_length() {\n if( isset(Excerpt::$types[Excerpt::$length]) )\n return Excerpt::$types[Excerpt::$length];\n else\n return Excerpt::$length;\n }","title":""},{"docid":"d4833e6f7b2d8033706544ce64373338","score":"0.5327041","text":"function setWidth( $width ) \n {\n $this->parameterValues ['width'] = $width;\n $this->areParametersSet = true;\n }","title":""},{"docid":"40f223cea29c13fb4780d74dd833a2b4","score":"0.5326015","text":"private function _initializeBasePasswordPolicy() {\r\n $this->_basePasswordPolicy['illegal_attempts_limit'] = 3; //count\r\n $this->_basePasswordPolicy['password_reset_frequency'] = 45; //days\r\n $this->_basePasswordPolicy['password_repeat_minimum'] = 5; //count\r\n $this->_basePasswordPolicy['illegal_attempts_penalty_seconds'] = 600; //seconds\r\n $this->_setUdfPasswordPolicy($this->_basePasswordPolicy);\r\n }","title":""},{"docid":"560f7ab6335008c81f7add481a58eaf4","score":"0.5318311","text":"public static function new_length() {\n if( isset(Excerpt::$types[Excerpt::$length]) )\n return Excerpt::$types[Excerpt::$length];\n else\n return Excerpt::$length;\n }","title":""},{"docid":"5bc9dc20eb14e667ba64efbab20d6aea","score":"0.52950174","text":"public function setMaxLength(?int $value): void {\n $this->getBackingStore()->set('maxLength', $value);\n }","title":""},{"docid":"6228f8a1641fadfac0fb78b08b1c2346","score":"0.52937037","text":"function qed_custom_excerpt_length($length) {\r\n\t\treturn qed_get_option( 'excerpt_length', 'option' );\r\n\t}","title":""},{"docid":"df8faf1dceb37dbfc4a32a089b21174e","score":"0.5291431","text":"function setMaxSize($size) {}","title":""},{"docid":"1061cc86de8357f6db1bdbd3716f5dee","score":"0.5264089","text":"function change_excerpt_length($length){\n\t\treturn 15;\n\t}","title":""},{"docid":"3caad2d5989850b845d04eb61c2081d6","score":"0.5262052","text":"public function setEntropyLength( $length )\n\t{\n\t\tini_set( 'session.entropy_length', $length );\n\t\t\n\t\treturn $this;\n\t}","title":""},{"docid":"c717142f26158a8acc22345b9894cc6d","score":"0.52558833","text":"function AutoCompSetMaxWidth($characterCount){}","title":""},{"docid":"13acdc6fd9154acd96a2982cc591712a","score":"0.52303326","text":"public function setFixedWidth($width)\n {\n $this->fixedWidth = $width;\n }","title":""},{"docid":"b39acac941bd4fb27e28a0effd3657a8","score":"0.521658","text":"static public function max_len($value = null) {\n if ($value === null) return self::$max_len;\n self::$max_len = (int) $value;\n }","title":""},{"docid":"b1a617091620fb1737cf4118a50dcc20","score":"0.521258","text":"function setMaxWidth($width)\n\t{\n\t\t$this->_max_width = $width;\n\t}","title":""},{"docid":"2a9b40a916e8c832254aa49a9bb2ec5d","score":"0.5203501","text":"public static function new_length() {\n if( isset(BarristarExcerpt::$types[BarristarExcerpt::$length]) )\n return BarristarExcerpt::$types[BarristarExcerpt::$length];\n else\n return BarristarExcerpt::$length;\n }","title":""},{"docid":"8ee141015112e3b96e54f1ca83364078","score":"0.5201321","text":"public function set_width ($width) {\n $this->width = $width;\n }","title":""},{"docid":"0410e610fc34c5e4b50838b6bf8c2c50","score":"0.5197396","text":"public function set_width($width)\n {\n $this->width = $width;\n }","title":""},{"docid":"ef15f6b2c69c39e8ba256cede12c85ff","score":"0.5194563","text":"protected static function validates_length_of($attribute, $options=array()) {\n static::set_validation('validate_length_of', $attribute, $options);\n }","title":""},{"docid":"893e0b190c0bf0c050012b036659656f","score":"0.519445","text":"public function setWidth($value) {\n $this->getOptions()->add('width', $value);\n }","title":""},{"docid":"e8a223d1c06ec286a3071f19f62c269f","score":"0.5190115","text":"function set_prefix_length($prefix_length)\n {\n $this->prefix_length = $prefix_length;\n return $this;\n }","title":""},{"docid":"f20416b28500efd91317e85c2b1c013b","score":"0.51857466","text":"public function length($length)\n {\n if (!is_int($length)) {\n throw new InvalidArgumentException('length should be an int');\n }\n\n $new = clone $this;\n $new->length = $length;\n\n return $new;\n }","title":""},{"docid":"1f6f05abfe858e32b470b35a70942ea7","score":"0.518408","text":"function setwidth($width) {\n\t\t\t$this->width = (string) $width; \n\t\t}","title":""},{"docid":"1ec5db9e0250fbc00d7f9d36ee2de5d9","score":"0.51731163","text":"public function setPageLength($l){\n\t\t$l = (int) $l;\n\t\tif($l < 2 or $l > 100) return false;\n\t\t$this->pageLenght = $l;\n\t}","title":""},{"docid":"79b5b26f44e56b67af6d5efe4c0f4b59","score":"0.5170274","text":"public function setCodeLength($length = 6)\n {\n $this->caplength = $length;\n }","title":""},{"docid":"91f2cf3108ef4b752e338a4f3c7f4f18","score":"0.5169255","text":"function obf_custom_excerpt_length( $length ) {\n return 20;\n }","title":""},{"docid":"1696113f20c39a70258ed9eda5484e37","score":"0.5163803","text":"function new_excerpt_length($length) {\n\t\tglobal $data;\n\t return $data['text_excerptlength'];;\n\t}","title":""},{"docid":"4a11f33c2a7720d511c7aeba743f47c3","score":"0.51481193","text":"function SetWidths($w)\n{\n $this->widths=$w;\n}","title":""},{"docid":"4a11f33c2a7720d511c7aeba743f47c3","score":"0.51481193","text":"function SetWidths($w)\n{\n $this->widths=$w;\n}","title":""},{"docid":"4a11f33c2a7720d511c7aeba743f47c3","score":"0.51481193","text":"function SetWidths($w)\n{\n $this->widths=$w;\n}","title":""},{"docid":"4a11f33c2a7720d511c7aeba743f47c3","score":"0.51481193","text":"function SetWidths($w)\n{\n $this->widths=$w;\n}","title":""},{"docid":"4a11f33c2a7720d511c7aeba743f47c3","score":"0.51481193","text":"function SetWidths($w)\n{\n $this->widths=$w;\n}","title":""},{"docid":"6bcfa1ce110cade7046caf2d14aea526","score":"0.514487","text":"public function setOptimizedMaximumWidth($width);","title":""},{"docid":"47269b1f2d55a633b785ef2351fb3872","score":"0.5139229","text":"public function setWidth($value)\n {\n $this->width = $value;\n }","title":""},{"docid":"47269b1f2d55a633b785ef2351fb3872","score":"0.5139229","text":"public function setWidth($value)\n {\n $this->width = $value;\n }","title":""},{"docid":"526248158adefe71ae23ae6d165aef11","score":"0.51300824","text":"function SetMaxSize(wxSize $size){}","title":""},{"docid":"526248158adefe71ae23ae6d165aef11","score":"0.51300824","text":"function SetMaxSize(wxSize $size){}","title":""},{"docid":"f9587af91d6cb738d5beb73f9af51b78","score":"0.51244235","text":"public function set_max_line_length($v)\n\t\t{\n\t\t$this->max_line_length = $v;\n\t\t}","title":""},{"docid":"f405fd5a72eb35a716c889d72d13bb1e","score":"0.5108876","text":"function bpmagic_custom_excerpt_length( $length ) {\r\n//allow to customize\r\n\treturn 40;\r\n}","title":""},{"docid":"d115c63054841c696c86d67d530c325e","score":"0.509421","text":"private function setWidth($width) {\n if (is_int($width)) {\n $this->_width = $width;\n }\n //TODO: Error handling\n }","title":""},{"docid":"708e3fadf0e4c71420ab17f3afaa389b","score":"0.50922555","text":"public function setWidth($width) {\n $this->width = $width;\n }","title":""},{"docid":"dd3f4017217beb9a50c2f25694cfc1f0","score":"0.508476","text":"function new_excerpt_length($length) {\n\t\treturn 25;\n\t}","title":""},{"docid":"2f1f1e08a8ac63cddc42a88b1691837f","score":"0.50741434","text":"#[@fromDia(xpath= 'dia:attribute[@name=\"comment_line_length\"]/dia:int/@val', value= 'int')]\n public function setCommentLineLength($length) {\n $this->setInt('comment_line_length', $length);\n }","title":""},{"docid":"502573a05d3baf0707cf59d18464847f","score":"0.50727355","text":"protected function defineLengthOfSides(): void\n {\n $lengthOfSides = 0;\n\n if ($this->fourSides->isTopSideSelected()) {\n $lengthOfSides += $this->widthOfProduct;\n } else if ($this->fourSides->isRightSideSelected()) {\n $lengthOfSides += $this->heigthOfProduct;\n } else if ($this->fourSides->isBottomSideSelected()) {\n $lengthOfSides += $this->widthOfProduct;\n } else if ($this->fourSides->isLeftSideSelected()) {\n $lengthOfSides += $this->heigthOfProduct;\n }\n\n $this->lengthOfSides = $lengthOfSides;\n }","title":""},{"docid":"3e90c2471dd9d44c25fcf18443e81646","score":"0.50682217","text":"public function setLineLength($lineLength)\n {\n Console::setLineLength($lineLength);\n }","title":""},{"docid":"5d502fb98b3fc38aac23a2e3a3cf3344","score":"0.5056765","text":"public function SetMinLen( $minLen ) {\n $this->minLen = $minLen;\n }","title":""},{"docid":"d29f6e3322f67b043c4744a09353e3e4","score":"0.50543296","text":"public function setSize($_size) {\n\t\t\t$this->size = $_size;\n\t}","title":""},{"docid":"ee18ae4f72511ae7a3421146b2efcf0c","score":"0.5053607","text":"public function setPolicyNumber($policyNumber);","title":""},{"docid":"8739bc5baa5f3cf50b8e25a41483c9bc","score":"0.50534546","text":"public function getMaxAllowedLen();","title":""},{"docid":"8950e70854f31f9a5be09da1fe2a450e","score":"0.50416213","text":"function setContentLength($length)\n\t{\n\t\t$this->writeLog('setContentLength('.$length.')');\n\t\t$this->obj->setFileSize($length);\n\t}","title":""}],"string":"[\n {\n \"docid\": \"3f5246e87c2db78e1a85bc8d567852a6\",\n \"score\": \"0.72333366\",\n \"text\": \"public function setLength($length);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5eb262aa7755be6452fd36bd5b237ad0\",\n \"score\": \"0.7053596\",\n \"text\": \"function SetRequestedLength($length){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18b3b057e0aaec07b62e11584666cb28\",\n \"score\": \"0.6901299\",\n \"text\": \"public function getPolicyLength()\\n {\\n return $this->policyLength;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5b251fcd9a60def3ca565b35dd2cb84\",\n \"score\": \"0.68694514\",\n \"text\": \"function SetMaxLength($len){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"903aec70e28c55265067786520faf6f0\",\n \"score\": \"0.6733522\",\n \"text\": \"public function setLength($length)\\n\\t{\\n\\t\\t$this->length = $length;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9d12d13ef7e2fc8ff41dbe92ba31819\",\n \"score\": \"0.67033416\",\n \"text\": \"public function setLength($length)\\n {\\n $this->length = $length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac7b74f5ac5b15c1f0c7c8cfa18689b2\",\n \"score\": \"0.6687289\",\n \"text\": \"public function setLength($length) {\\n $this->length = $length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12b3b78f72e855d34687d21f79398fbe\",\n \"score\": \"0.66056967\",\n \"text\": \"public function setLength(int $length)\\n {\\n $this->expiration[self::EXPIRATION][self::LENGTH] = $length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb8575c2c7e0098827c5bfd8b1324b90\",\n \"score\": \"0.6276504\",\n \"text\": \"function setBlockLength($length)\\n {\\n return;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c62f7178d40b48da3b91d74b6696988e\",\n \"score\": \"0.61493695\",\n \"text\": \"function set_cache_length( $length ) {\\n\\n\\t\\tself::$cache_length = $length;\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"714615793460dfd831d8acc7de38beec\",\n \"score\": \"0.6139987\",\n \"text\": \"public function setPageLength() {\\n $length = Input::get('length');\\n if (!isset($length)) {\\n $length = 50;\\n }\\n\\n $this->length = $length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"75e279915b8320097bdb3591e5fe5af0\",\n \"score\": \"0.60727847\",\n \"text\": \"private function updateLength()\\n {\\n $this->_length = count($this->_result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb7061aec2a1a0d10778cd39cb3ecb8b\",\n \"score\": \"0.60417795\",\n \"text\": \"private function prepareLength() {\\n $result = $this->getValuesForSelectorSetting(WooCommerceSettings::WC_LENGTH_SELECTORS, 'text', false, true, true);\\n if (!$result) return;\\n\\n $this->wcData->setLength($result);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebc142aee413541082142fcebc82a282\",\n \"score\": \"0.59237224\",\n \"text\": \"public function setRemainLen($len)\\n {\\n $this->remainLen = (int) $len;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34ef456f30236c25af0fa24f3c08711f\",\n \"score\": \"0.5904502\",\n \"text\": \"public function setLength($length)\\n {\\n $this->values['Length'] = $length;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5895665b65049facb82348ab7062264a\",\n \"score\": \"0.5894496\",\n \"text\": \"public function setMaxLength($maxLength);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fc0fa818717132d09fc2d7ad1e32bbe\",\n \"score\": \"0.5858925\",\n \"text\": \"public function length ( $length ) {\\n $this->length = (int) $length;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"667bc1dce2bfc631947d74ea9be6fffb\",\n \"score\": \"0.5813086\",\n \"text\": \"function setKeyLength($length)\\n {\\n $length >>= 5;\\n if ($length > 8) {\\n $length = 8;\\n } else if ($length < 4) {\\n $length = 4;\\n }\\n $this->Nk = $length;\\n $this->key_size = $length << 2;\\n\\n $this->explicit_key_length = true;\\n $this->changed = true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b831e6b5ae3d44a326e444e07adbb73c\",\n \"score\": \"0.58068115\",\n \"text\": \"public function setLength(?string $length): self\\n {\\n $this->length = $length === '' ? null : $length;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8fccc84488153b0aebf9b1d15e2bbe6\",\n \"score\": \"0.5761249\",\n \"text\": \"public function setPageLength($length = 10)\\n {\\n \\t$this->pageLength = $length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"464d37fbbd98ffa3bb6ccb3f282c80ed\",\n \"score\": \"0.5756916\",\n \"text\": \"function setBlockLength($length)\\n {\\n $length >>= 5;\\n if ($length > 8) {\\n $length = 8;\\n } else if ($length < 4) {\\n $length = 4;\\n }\\n $this->Nb = $length;\\n $this->block_size = $length << 2;\\n $this->changed = true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf3c069c98396707b54f320c88c96410\",\n \"score\": \"0.5750564\",\n \"text\": \"public function __construct($length)\\n\\t{\\n\\t\\t$this->length = $length;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be6f4df7b3ab1b7b02d3a2e2e5588192\",\n \"score\": \"0.5729382\",\n \"text\": \"public static function length($new_length = 55) {\\n Excerpt::$length = $new_length;\\n \\n add_filter('excerpt_length', 'Excerpt::new_length');\\n \\n Excerpt::output();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2567250d9d9e524968c27c8012fa384\",\n \"score\": \"0.57176214\",\n \"text\": \"public function length(?int $length)\\n {\\n $this->fields[$this->current]['length'] = $length;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5847bb23b77a387e8958923fe49c90d4\",\n \"score\": \"0.5690842\",\n \"text\": \"public function setLength($length)\\n {\\n $this->length = $length;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0848ab1d9bbf3e16b9f24d7f27d7bdc\",\n \"score\": \"0.56657726\",\n \"text\": \"public function setLength($a = null)\\n {\\n throw new NotImplementedException(__METHOD__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0848ab1d9bbf3e16b9f24d7f27d7bdc\",\n \"score\": \"0.56657726\",\n \"text\": \"public function setLength($a = null)\\n {\\n throw new NotImplementedException(__METHOD__);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90595160558f4f2759e9ad612611e278\",\n \"score\": \"0.565583\",\n \"text\": \"protected function length($length) {\\n\\t\\tif (strlen($this->value) !== $length) $this->setIssue('is length');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edbb4be7a59ec77150eb127427543d6a\",\n \"score\": \"0.5649616\",\n \"text\": \"public static function length($new_length = 55) {\\n Excerpt::$length = $new_length;\\n\\n add_filter('excerpt_length', 'Excerpt::new_length');\\n\\n Excerpt::output();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"edbb4be7a59ec77150eb127427543d6a\",\n \"score\": \"0.5649616\",\n \"text\": \"public static function length($new_length = 55) {\\n Excerpt::$length = $new_length;\\n\\n add_filter('excerpt_length', 'Excerpt::new_length');\\n\\n Excerpt::output();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e98aaba44ae1838b070b6e3c0712b2b0\",\n \"score\": \"0.56425273\",\n \"text\": \"public function SetRoadLength($road_length)\\n {\\n $this->road_length=$road_length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0466e5f01c55aeb5a746aec40ce2120\",\n \"score\": \"0.56123817\",\n \"text\": \"public function setMaxLength($length)\\r\\n {\\r\\n $this->_maxLength = $length;\\r\\n return $this;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78726e31ee2c7caab813f97c5b1f6553\",\n \"score\": \"0.5563726\",\n \"text\": \"public function setLength($length = null): object\\n\\t{\\n\\t\\tif (null !== $length && !($length instanceof FHIRInteger)) {\\n\\t\\t\\t$length = new FHIRInteger($length);\\n\\t\\t}\\n\\t\\t$this->_trackValueSet($this->length, $length);\\n\\t\\t$this->length = $length;\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a5ef73d71fd9df5fd1bf522ce925155\",\n \"score\": \"0.5551003\",\n \"text\": \"public function setPolicy($val)\\n {\\n $this->_propDict[\\\"policy\\\"] = $val;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6818b1cd2cc4ad362de3547b4d8e28e4\",\n \"score\": \"0.5547685\",\n \"text\": \"public static function length($new_length = 55) {\\n BarristarExcerpt::$length = $new_length;\\n add_filter('excerpt_length', 'BarristarExcerpt::new_length');\\n BarristarExcerpt::output();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40b09d260d3eccf5119885547e8a6d5f\",\n \"score\": \"0.55374414\",\n \"text\": \"public function setMinimumRequiredConstraints(int $number): PasswordPolicyInterface;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c340d34e6e27d371ada431189d1dcd20\",\n \"score\": \"0.55198336\",\n \"text\": \"public function length($value) {\\n return $this->setProperty('length', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1100541649f7cb921d45192624ca181d\",\n \"score\": \"0.5487957\",\n \"text\": \"protected function defineTotalLengthOfSides(): void\\n {\\n $this->fullLengthOfSides = $this->getLengthOfSides() * $this->numberOfProducts;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b48654335f6b6c8953c1e3bc71bd89a0\",\n \"score\": \"0.547445\",\n \"text\": \"public function setPasswordMinimumLength($val)\\n {\\n $this->_propDict[\\\"passwordMinimumLength\\\"] = intval($val);\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8af2930931c4f07d4207f1864d0534c5\",\n \"score\": \"0.54452443\",\n \"text\": \"public function setMaxPasswordLength($length);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f9a58ffb92c23062fd8451661883050\",\n \"score\": \"0.54417074\",\n \"text\": \"public function setMinPasswordLength($length);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cafde09ff4804fe724102b50cd35d4e2\",\n \"score\": \"0.54394513\",\n \"text\": \"protected function getLength()\\n {\\n return 10;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"888647a8d224eef33ecddee96311b1e4\",\n \"score\": \"0.53954494\",\n \"text\": \"public function length($value) {\\n $this->annotations['length'] = $value;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7a835734fa78f784429f14ca0e2358e\",\n \"score\": \"0.5387838\",\n \"text\": \"function setSize($size)\\r\\n\\t{\\r\\n\\t\\t$this->size = 0+$size;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e5f2a5008694b2f3d86c773c5e3d245\",\n \"score\": \"0.53679097\",\n \"text\": \"function setwidth($width){\\r\\n\\t\\t$this->width = $width;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c96860b43dbb4d3c567b95ecc8f73ab3\",\n \"score\": \"0.53393435\",\n \"text\": \"function SetWidth($width){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c96860b43dbb4d3c567b95ecc8f73ab3\",\n \"score\": \"0.53393435\",\n \"text\": \"function SetWidth($width){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c96860b43dbb4d3c567b95ecc8f73ab3\",\n \"score\": \"0.53393435\",\n \"text\": \"function SetWidth($width){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c96860b43dbb4d3c567b95ecc8f73ab3\",\n \"score\": \"0.53393435\",\n \"text\": \"function SetWidth($width){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c96860b43dbb4d3c567b95ecc8f73ab3\",\n \"score\": \"0.53393435\",\n \"text\": \"function SetWidth($width){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c96860b43dbb4d3c567b95ecc8f73ab3\",\n \"score\": \"0.53393435\",\n \"text\": \"function SetWidth($width){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8d69dc53095f354efcee46c56d81107\",\n \"score\": \"0.5333394\",\n \"text\": \"public static function new_length() {\\n if( isset(Excerpt::$types[Excerpt::$length]) )\\n return Excerpt::$types[Excerpt::$length];\\n else\\n return Excerpt::$length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8d69dc53095f354efcee46c56d81107\",\n \"score\": \"0.5333394\",\n \"text\": \"public static function new_length() {\\n if( isset(Excerpt::$types[Excerpt::$length]) )\\n return Excerpt::$types[Excerpt::$length];\\n else\\n return Excerpt::$length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d4833e6f7b2d8033706544ce64373338\",\n \"score\": \"0.5327041\",\n \"text\": \"function setWidth( $width ) \\n {\\n $this->parameterValues ['width'] = $width;\\n $this->areParametersSet = true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40f223cea29c13fb4780d74dd833a2b4\",\n \"score\": \"0.5326015\",\n \"text\": \"private function _initializeBasePasswordPolicy() {\\r\\n $this->_basePasswordPolicy['illegal_attempts_limit'] = 3; //count\\r\\n $this->_basePasswordPolicy['password_reset_frequency'] = 45; //days\\r\\n $this->_basePasswordPolicy['password_repeat_minimum'] = 5; //count\\r\\n $this->_basePasswordPolicy['illegal_attempts_penalty_seconds'] = 600; //seconds\\r\\n $this->_setUdfPasswordPolicy($this->_basePasswordPolicy);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"560f7ab6335008c81f7add481a58eaf4\",\n \"score\": \"0.5318311\",\n \"text\": \"public static function new_length() {\\n if( isset(Excerpt::$types[Excerpt::$length]) )\\n return Excerpt::$types[Excerpt::$length];\\n else\\n return Excerpt::$length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5bc9dc20eb14e667ba64efbab20d6aea\",\n \"score\": \"0.52950174\",\n \"text\": \"public function setMaxLength(?int $value): void {\\n $this->getBackingStore()->set('maxLength', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6228f8a1641fadfac0fb78b08b1c2346\",\n \"score\": \"0.52937037\",\n \"text\": \"function qed_custom_excerpt_length($length) {\\r\\n\\t\\treturn qed_get_option( 'excerpt_length', 'option' );\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df8faf1dceb37dbfc4a32a089b21174e\",\n \"score\": \"0.5291431\",\n \"text\": \"function setMaxSize($size) {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1061cc86de8357f6db1bdbd3716f5dee\",\n \"score\": \"0.5264089\",\n \"text\": \"function change_excerpt_length($length){\\n\\t\\treturn 15;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3caad2d5989850b845d04eb61c2081d6\",\n \"score\": \"0.5262052\",\n \"text\": \"public function setEntropyLength( $length )\\n\\t{\\n\\t\\tini_set( 'session.entropy_length', $length );\\n\\t\\t\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c717142f26158a8acc22345b9894cc6d\",\n \"score\": \"0.52558833\",\n \"text\": \"function AutoCompSetMaxWidth($characterCount){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13acdc6fd9154acd96a2982cc591712a\",\n \"score\": \"0.52303326\",\n \"text\": \"public function setFixedWidth($width)\\n {\\n $this->fixedWidth = $width;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b39acac941bd4fb27e28a0effd3657a8\",\n \"score\": \"0.521658\",\n \"text\": \"static public function max_len($value = null) {\\n if ($value === null) return self::$max_len;\\n self::$max_len = (int) $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1a617091620fb1737cf4118a50dcc20\",\n \"score\": \"0.521258\",\n \"text\": \"function setMaxWidth($width)\\n\\t{\\n\\t\\t$this->_max_width = $width;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a9b40a916e8c832254aa49a9bb2ec5d\",\n \"score\": \"0.5203501\",\n \"text\": \"public static function new_length() {\\n if( isset(BarristarExcerpt::$types[BarristarExcerpt::$length]) )\\n return BarristarExcerpt::$types[BarristarExcerpt::$length];\\n else\\n return BarristarExcerpt::$length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ee141015112e3b96e54f1ca83364078\",\n \"score\": \"0.5201321\",\n \"text\": \"public function set_width ($width) {\\n $this->width = $width;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0410e610fc34c5e4b50838b6bf8c2c50\",\n \"score\": \"0.5197396\",\n \"text\": \"public function set_width($width)\\n {\\n $this->width = $width;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef15f6b2c69c39e8ba256cede12c85ff\",\n \"score\": \"0.5194563\",\n \"text\": \"protected static function validates_length_of($attribute, $options=array()) {\\n static::set_validation('validate_length_of', $attribute, $options);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"893e0b190c0bf0c050012b036659656f\",\n \"score\": \"0.519445\",\n \"text\": \"public function setWidth($value) {\\n $this->getOptions()->add('width', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8a223d1c06ec286a3071f19f62c269f\",\n \"score\": \"0.5190115\",\n \"text\": \"function set_prefix_length($prefix_length)\\n {\\n $this->prefix_length = $prefix_length;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f20416b28500efd91317e85c2b1c013b\",\n \"score\": \"0.51857466\",\n \"text\": \"public function length($length)\\n {\\n if (!is_int($length)) {\\n throw new InvalidArgumentException('length should be an int');\\n }\\n\\n $new = clone $this;\\n $new->length = $length;\\n\\n return $new;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f6f05abfe858e32b470b35a70942ea7\",\n \"score\": \"0.518408\",\n \"text\": \"function setwidth($width) {\\n\\t\\t\\t$this->width = (string) $width; \\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ec5db9e0250fbc00d7f9d36ee2de5d9\",\n \"score\": \"0.51731163\",\n \"text\": \"public function setPageLength($l){\\n\\t\\t$l = (int) $l;\\n\\t\\tif($l < 2 or $l > 100) return false;\\n\\t\\t$this->pageLenght = $l;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79b5b26f44e56b67af6d5efe4c0f4b59\",\n \"score\": \"0.5170274\",\n \"text\": \"public function setCodeLength($length = 6)\\n {\\n $this->caplength = $length;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"91f2cf3108ef4b752e338a4f3c7f4f18\",\n \"score\": \"0.5169255\",\n \"text\": \"function obf_custom_excerpt_length( $length ) {\\n return 20;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1696113f20c39a70258ed9eda5484e37\",\n \"score\": \"0.5163803\",\n \"text\": \"function new_excerpt_length($length) {\\n\\t\\tglobal $data;\\n\\t return $data['text_excerptlength'];;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a11f33c2a7720d511c7aeba743f47c3\",\n \"score\": \"0.51481193\",\n \"text\": \"function SetWidths($w)\\n{\\n $this->widths=$w;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a11f33c2a7720d511c7aeba743f47c3\",\n \"score\": \"0.51481193\",\n \"text\": \"function SetWidths($w)\\n{\\n $this->widths=$w;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a11f33c2a7720d511c7aeba743f47c3\",\n \"score\": \"0.51481193\",\n \"text\": \"function SetWidths($w)\\n{\\n $this->widths=$w;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a11f33c2a7720d511c7aeba743f47c3\",\n \"score\": \"0.51481193\",\n \"text\": \"function SetWidths($w)\\n{\\n $this->widths=$w;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a11f33c2a7720d511c7aeba743f47c3\",\n \"score\": \"0.51481193\",\n \"text\": \"function SetWidths($w)\\n{\\n $this->widths=$w;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bcfa1ce110cade7046caf2d14aea526\",\n \"score\": \"0.514487\",\n \"text\": \"public function setOptimizedMaximumWidth($width);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47269b1f2d55a633b785ef2351fb3872\",\n \"score\": \"0.5139229\",\n \"text\": \"public function setWidth($value)\\n {\\n $this->width = $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47269b1f2d55a633b785ef2351fb3872\",\n \"score\": \"0.5139229\",\n \"text\": \"public function setWidth($value)\\n {\\n $this->width = $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"526248158adefe71ae23ae6d165aef11\",\n \"score\": \"0.51300824\",\n \"text\": \"function SetMaxSize(wxSize $size){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"526248158adefe71ae23ae6d165aef11\",\n \"score\": \"0.51300824\",\n \"text\": \"function SetMaxSize(wxSize $size){}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f9587af91d6cb738d5beb73f9af51b78\",\n \"score\": \"0.51244235\",\n \"text\": \"public function set_max_line_length($v)\\n\\t\\t{\\n\\t\\t$this->max_line_length = $v;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f405fd5a72eb35a716c889d72d13bb1e\",\n \"score\": \"0.5108876\",\n \"text\": \"function bpmagic_custom_excerpt_length( $length ) {\\r\\n//allow to customize\\r\\n\\treturn 40;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d115c63054841c696c86d67d530c325e\",\n \"score\": \"0.509421\",\n \"text\": \"private function setWidth($width) {\\n if (is_int($width)) {\\n $this->_width = $width;\\n }\\n //TODO: Error handling\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"708e3fadf0e4c71420ab17f3afaa389b\",\n \"score\": \"0.50922555\",\n \"text\": \"public function setWidth($width) {\\n $this->width = $width;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd3f4017217beb9a50c2f25694cfc1f0\",\n \"score\": \"0.508476\",\n \"text\": \"function new_excerpt_length($length) {\\n\\t\\treturn 25;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f1f1e08a8ac63cddc42a88b1691837f\",\n \"score\": \"0.50741434\",\n \"text\": \"#[@fromDia(xpath= 'dia:attribute[@name=\\\"comment_line_length\\\"]/dia:int/@val', value= 'int')]\\n public function setCommentLineLength($length) {\\n $this->setInt('comment_line_length', $length);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"502573a05d3baf0707cf59d18464847f\",\n \"score\": \"0.50727355\",\n \"text\": \"protected function defineLengthOfSides(): void\\n {\\n $lengthOfSides = 0;\\n\\n if ($this->fourSides->isTopSideSelected()) {\\n $lengthOfSides += $this->widthOfProduct;\\n } else if ($this->fourSides->isRightSideSelected()) {\\n $lengthOfSides += $this->heigthOfProduct;\\n } else if ($this->fourSides->isBottomSideSelected()) {\\n $lengthOfSides += $this->widthOfProduct;\\n } else if ($this->fourSides->isLeftSideSelected()) {\\n $lengthOfSides += $this->heigthOfProduct;\\n }\\n\\n $this->lengthOfSides = $lengthOfSides;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e90c2471dd9d44c25fcf18443e81646\",\n \"score\": \"0.50682217\",\n \"text\": \"public function setLineLength($lineLength)\\n {\\n Console::setLineLength($lineLength);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d502fb98b3fc38aac23a2e3a3cf3344\",\n \"score\": \"0.5056765\",\n \"text\": \"public function SetMinLen( $minLen ) {\\n $this->minLen = $minLen;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d29f6e3322f67b043c4744a09353e3e4\",\n \"score\": \"0.50543296\",\n \"text\": \"public function setSize($_size) {\\n\\t\\t\\t$this->size = $_size;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee18ae4f72511ae7a3421146b2efcf0c\",\n \"score\": \"0.5053607\",\n \"text\": \"public function setPolicyNumber($policyNumber);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8739bc5baa5f3cf50b8e25a41483c9bc\",\n \"score\": \"0.50534546\",\n \"text\": \"public function getMaxAllowedLen();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8950e70854f31f9a5be09da1fe2a450e\",\n \"score\": \"0.50416213\",\n \"text\": \"function setContentLength($length)\\n\\t{\\n\\t\\t$this->writeLog('setContentLength('.$length.')');\\n\\t\\t$this->obj->setFileSize($length);\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":772,"cells":{"query_id":{"kind":"string","value":"a64da42041bafee9241b2da2c405e26d"},"query":{"kind":"string","value":"Destroy (remove) the namespace file resource and all contents"},"positive_passages":{"kind":"list like","value":[{"docid":"8ea9c7229f9e01ed244ac3bef3f3e34c","score":"0.762664","text":"protected function destroy( $namespace = null ) {\n\n $exist = false;\n $path = $this->getFile( $namespace, null, $exist );\n if( $exist ) $this->destroyFile( $path );\n }","title":""}],"string":"[\n {\n \"docid\": \"8ea9c7229f9e01ed244ac3bef3f3e34c\",\n \"score\": \"0.762664\",\n \"text\": \"protected function destroy( $namespace = null ) {\\n\\n $exist = false;\\n $path = $this->getFile( $namespace, null, $exist );\\n if( $exist ) $this->destroyFile( $path );\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"2961fd7e3d8100bdb9570443ca486260","score":"0.71656996","text":"public function destroy()\n {\n if ($this->resource) {\n sem_remove($this->resource);\n @unlink($this->filePath);\n }\n }","title":""},{"docid":"cf15f6055f619cfcdccce83fd0e77156","score":"0.6656933","text":"function __destruct()\n {\n $preserveRunFolder = $this->preserveRunFolder;\n $fs = Filesystem::create();\n foreach ( $this->files as $file ) {\n if ( $file[ 'preserve' ] ) {\n $preserveRunFolder = true;\n }\n if ( file_exists($file[ 'file' ]) && is_file($file[ 'file' ]) && !$file[ 'preserve' ] ) {\n $fs->remove($file[ 'file' ]);\n }\n }\n if ( !$preserveRunFolder ) {\n $fs->remove($this->getTmpPath());\n }\n }","title":""},{"docid":"6521de49d5517ef17742054847b1b2f4","score":"0.6624687","text":"public function __destruct() {\n\t\tif (file_exists($this->fileName) && (!$this->cache)) {\n\t\t\tunlink($this->fileName);\n\t\t}\n\t}","title":""},{"docid":"ab9242b0dff2d6f287a513cd2765006b","score":"0.6588498","text":"public function __destruct()\n\t{\n\t\t$this->delete_local_file();\n\t}","title":""},{"docid":"2494b022b33aca629d30024743b947f2","score":"0.6584001","text":"private function destroy(): void\n {\n set_error_handler(static function () {});\n try {\n unlink($this->getFilePath());\n } finally {\n restore_error_handler();\n }\n }","title":""},{"docid":"4d14f856514d2c61be0194d84b35e3bd","score":"0.6533366","text":"public function __destruct() {\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test.json' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test.xml' );\n\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/json.json' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/xml.xml' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/ini.ini' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/php.php' );\n @unlink( \\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/json.php' );\n }","title":""},{"docid":"74175c60976c04dbaf4bc8b37f23ba9c","score":"0.6519189","text":"public function cleanup() {\r\n\t\t$this->resource->cleanup();\r\n\t}","title":""},{"docid":"fcd3f9a6ab94fd62fb81fbf5f3cbc53e","score":"0.6482885","text":"public function __destruct()\r\n\t{\r\n\t\t@unlink($this->targetFile);\r\n\t\tif (strcmp($this->referenceFile, $this->outputReferenceFile) !== 0)\r\n\t\t\t@unlink($this->referenceFile);\r\n\t}","title":""},{"docid":"6a1925015f5c54bb1554a932b7c36ee0","score":"0.643904","text":"public function destroy()\n {\n $this->contents = [];\n $filepath = $this->getFilepath();\n\n if ($this->getFilesystem()->has($filepath)) {\n return $this->getFilesystem()->delete($filepath);\n }\n }","title":""},{"docid":"c6821270bce7c29555a3d0ca63e8ff36","score":"0.6396501","text":"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}","title":""},{"docid":"3e5a662d718cf1b2a159639ea903b46e","score":"0.6387996","text":"public static function destroy() {}","title":""},{"docid":"57755b83ebf259d31741c9bc6b59e926","score":"0.63600045","text":"function __destruct() {\r\n\t\tunlink($this->uploadfile);\r\n\t}","title":""},{"docid":"ab23112013cfca5b333b5f60b4d4edc2","score":"0.63565004","text":"public function __destruct()\n\t{\n\t\t//Remove temporal files\n\t\tif (isset($this->generated_documents['url_docx']) AND file_exists($this->generated_documents['url_docx']))\n\t\t{\n\t\t\tsystem('rm '.$this->generated_documents['url_docx']);\n\t\t}\n\t\tif (isset($this->generated_documents['url_pdf']) AND file_exists($this->generated_documents['url_pdf']))\n\t\t{\n\t\t\tsystem('rm '.$this->generated_documents['url_pdf']);\n\t\t}\n\t}","title":""},{"docid":"a8fcb45badd8ea400af381f7e99d276d","score":"0.6355004","text":"function delete(){\n\n ob_start();\n try{\n AJXP_Controller::findActionAndApply(\"delete\", array(\n \"dir\" => dirname($this->path),\n \"file_0\" => $this->path\n ), array());\n }catch(Exception $e){\n\n }\n ob_get_flush();\n $this->putResourceData(array());\n\n }","title":""},{"docid":"3a6c9146972b858f8f86423e675d8780","score":"0.63048935","text":"public function __destruct()\n\t{\n\t\tif (isset($this->filetmp) && file_exists($this->filetmp))\n\t\t{\n\t\t\t// Free all resources\n\t\t\tunlink($this->filetmp);\n\t\t}\n\t}","title":""},{"docid":"8156bcdcec8c26be39d49d6d04dd1a85","score":"0.6278397","text":"public function __destruct()\n {\n if (file_exists($this->tempFilesFromFilename)) {\n unlink($this->tempFilesFromFilename);\n }\n }","title":""},{"docid":"3fc0ca027327e3c808b12d4cdd81c10d","score":"0.62760776","text":"public function __destruct() {\n if (file_exists($this->tempFile)) {\n unlink($this->tempFile);\n }\n }","title":""},{"docid":"7d0319a2ce0aaf6fd13ba6850b76a4e4","score":"0.62370497","text":"public function __destruct()\n {\n exec('rm -rf ' . $this->dir);\n }","title":""},{"docid":"ebc79a91879b1741098af91303fbb578","score":"0.6228805","text":"public function destroy();","title":""},{"docid":"ebc79a91879b1741098af91303fbb578","score":"0.6228805","text":"public function destroy();","title":""},{"docid":"ebc79a91879b1741098af91303fbb578","score":"0.6228805","text":"public function destroy();","title":""},{"docid":"ebc79a91879b1741098af91303fbb578","score":"0.6228805","text":"public function destroy();","title":""},{"docid":"ebc79a91879b1741098af91303fbb578","score":"0.6228805","text":"public function destroy();","title":""},{"docid":"ebc79a91879b1741098af91303fbb578","score":"0.6228805","text":"public function destroy();","title":""},{"docid":"ebc79a91879b1741098af91303fbb578","score":"0.6228805","text":"public function destroy();","title":""},{"docid":"9ca475bf5f49104a8c73c0481279e0e7","score":"0.62142533","text":"public function destroy()\n {\n $downloads = Redis::get(\"themes/download/{id}\");\n Redis::incr(\"themes/download/{id}\");\n //\n return Storage::download('iaa-group.docx');\n\n }","title":""},{"docid":"976bd42363f0e839ad100c9d4fe6f8c8","score":"0.6203401","text":"public static function cleanResources()\n {\n File::deleteDirectory(resource_path('sass'));\n File::delete(resource_path('js/app.js'));\n File::delete(resource_path('js/bootstrap.js'));\n }","title":""},{"docid":"9d41c12b2878246892e453cf002c1ee4","score":"0.6191242","text":"public function destroy()\n {\n $this->_info = new stdClass();\n if( is_resource($this->_resource) )\n {\n imagedestroy($this->_resource);\n }\n }","title":""},{"docid":"8f98860f37339af18cb44b61f6f167b6","score":"0.61841387","text":"public function destroy() {}","title":""},{"docid":"8f98860f37339af18cb44b61f6f167b6","score":"0.61841387","text":"public function destroy() {}","title":""},{"docid":"8f98860f37339af18cb44b61f6f167b6","score":"0.61841387","text":"public function destroy() {}","title":""},{"docid":"8f98860f37339af18cb44b61f6f167b6","score":"0.6183906","text":"public function destroy() {}","title":""},{"docid":"8f98860f37339af18cb44b61f6f167b6","score":"0.6182274","text":"public function destroy() {}","title":""},{"docid":"8f98860f37339af18cb44b61f6f167b6","score":"0.6182274","text":"public function destroy() {}","title":""},{"docid":"e74d41ab2400f980d8e96c2d1cfabacb","score":"0.61804885","text":"function __destruct() {\n\t\t@fclose($this->FILE);\n\t\tunset($this->FILE, $this->HEADERS, $this->DATA);\n\t}","title":""},{"docid":"55e6fd2a3a7f4ccb32214b16ef2df61c","score":"0.6157687","text":"public function __destruct()\n {\n unlink($this->tmpListFile);\n }","title":""},{"docid":"385e69d603b938952baeb3edc255a4ea","score":"0.6145105","text":"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}","title":""},{"docid":"aee27c8c841a838f9586cd524e3aefb6","score":"0.6131508","text":"public function __destroy()\n\t{\n\t\t$this->Obj_Doc->disconnectWorksheets();\n\t\tunset($this->Obj_Doc);\n\t\t$this->Obj_Doc = false;\n\t}","title":""},{"docid":"198fd165c47b33ebd5bc956ccfa7d7d5","score":"0.61014134","text":"function __destruct()\n {\n // No los borro si estoy en debug\n if (!ConfigGlobal::is_debug_mode()) {\n $this->deleteFile($this->getFileNew());\n $this->deleteFile($this->getFileRef());\n $this->deleteFile($this->getFileLogR());\n $this->deleteFile($this->getFileLogW());\n }\n }","title":""},{"docid":"dc750acc8639c8e37ae9a3994fa36c91","score":"0.61009914","text":"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}","title":""},{"docid":"708bfbe9cabb48f36f7f44c706485423","score":"0.60953736","text":"public function __destruct() {\n fclose($this->file);\n }","title":""},{"docid":"85a8d03b0c01970f57fe2403d38a7103","score":"0.60911876","text":"public function delete(): void\n {\n\t\tif(@unlink($this->getPath())) {\n\t\t\t$this->deleteCacheEntries();\n\t\t\tself::unsetInstance($this->getPath());\n\t\t}\n\t\telse {\n\t\t\tthrow new FilesystemFileException(\"Delete of file '{$this->getPath()}' failed.\", FilesystemFileException::FILE_DELETE_FAILED);\n\t\t}\n\t}","title":""},{"docid":"b72a7ee87298ca4a8d70f43d3b130b9c","score":"0.6074544","text":"public function destroy()\n\t{\n\t\t//\n\t}","title":""},{"docid":"b75bbe3f24a5ba55eef26610aebdbb92","score":"0.6066565","text":"public function __destruct()\n {\n $iMax = count($this->aFiles);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n if (true === file_exists($this->aFiles[$iFor])) {\n\n unlink($this->aFiles[$iFor]);\n }\n\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\n }\n }","title":""},{"docid":"06b2dcd47261f131ba6c939b43de4165","score":"0.60623753","text":"public function cleanup();","title":""},{"docid":"06b2dcd47261f131ba6c939b43de4165","score":"0.60623753","text":"public function cleanup();","title":""},{"docid":"47dcda213186401223dc21b03c4b391d","score":"0.60609776","text":"public function __destruct()\n {\n unset($this->file_info);\n }","title":""},{"docid":"fc39af53e8aed20dece10ce27edca8ab","score":"0.6049737","text":"public function __destruct() {\n\t\tfclose($this->file);\n\t}","title":""},{"docid":"0b127512262550e76a03f7a907a800c9","score":"0.60172427","text":"public function __destruct()\n {\n if ($this->resource != null) fclose($this->resource);\n }","title":""},{"docid":"989843fa3021035cbd711826bd3576d3","score":"0.5978969","text":"public function deleteFile();","title":""},{"docid":"b283827044a31ab708f077a3a2cb5ce6","score":"0.59769744","text":"function __destruct() {\n fclose($this->file);\n }","title":""},{"docid":"3d85f46131c29f9ae8aa17d59efdb42d","score":"0.5972637","text":"public function clear()\n\t{\n\t\tif (file_exists($this->_file)) {\n\t\t\tunlink($this->_file);\n\t\t}\n\t\t$this->_contents = null;\n\t}","title":""},{"docid":"437665da46dd9c2275dd153eea9fcbf3","score":"0.59688056","text":"protected function removeFile()\n {\n }","title":""},{"docid":"aa9d389eaa27c520583ce20f1b7bdff6","score":"0.59655356","text":"function __destroy() {\n }","title":""},{"docid":"4c31c26ab7bd872d8354dee91aebab8b","score":"0.59604234","text":"public function __destruct() {\n if ( $this->fileHandle ) {\n fclose($this->fileHandle);\n }\n }","title":""},{"docid":"d745a13b5a04a001c2fcfb15d5c77035","score":"0.59560585","text":"private function cleanup()\n {\n if ($this->cookiefile && is_file($this->cookiefile)) {\n @unlink($this->cookiefile);\n }\n }","title":""},{"docid":"de8dcb45eb78fd3a990cbeea9c11c645","score":"0.59559053","text":"public function destroy(): void;","title":""},{"docid":"53e256ddd47bf3ed31ee86fc6a4ea59a","score":"0.5947983","text":"protected function destroy() {\n\t}","title":""},{"docid":"837f5afa885cec5c5652529a0eca7013","score":"0.5940339","text":"public function __destruct()\n {\n $this->closeFile();\n }","title":""},{"docid":"837f5afa885cec5c5652529a0eca7013","score":"0.5940339","text":"public function __destruct()\n {\n $this->closeFile();\n }","title":""},{"docid":"f37978716e8b9f8fb3e1fbe9124a865b","score":"0.5939706","text":"function __destruct() {\r\r\n\r\r\nif (file_exists ( TMP_FOLDER ) & strlen ( TMP_FOLDER ) > 4)\r\r\n$this->removetmp ();\r\r\n\r\r\n}","title":""},{"docid":"22663c89502d5fd46809491a759b567d","score":"0.59299576","text":"protected static function removeComponent()\n {\n (new Filesystem)->deleteDirectory(\n resource_path('assets/js/components')\n );\n }","title":""},{"docid":"8241a069e38e9a6fa2ded00d70eca95a","score":"0.5924094","text":"function __destruct () {\n fclose($this->file);\n }","title":""},{"docid":"7eb7d30090b06f1d6024bf2187534c7e","score":"0.59218866","text":"public function destroy()\n {\n }","title":""},{"docid":"9b96f71bf4216e5ddda4a6d8bfe16cea","score":"0.5902774","text":"public function destroy()\n {\n }","title":""},{"docid":"5c5ce5810621f4a3c403096bc5e7bbf0","score":"0.58996856","text":"public static function reset(): void\n {\n self::getFile()->delete();\n }","title":""},{"docid":"a553fabc3803142c562d0fe909b804d1","score":"0.5887557","text":"public function destroy()\r\n {\r\n }","title":""},{"docid":"9ea78b987e463ef29803827f30131beb","score":"0.58875275","text":"public function __destruct() {\n\t\tparent::__destruct();\n\t\tif($this->auto_delete) {\n\t\t\t$this->unlink();\n\t\t}\n\t}","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"e4a54a30e406a86fbfdb33fedc0f2b45","score":"0.5880992","text":"public function destroy()\n {\n }","title":""},{"docid":"f00ed406394df4778e8e1d177ed8f48c","score":"0.5880617","text":"public function destroy()\n\t{\n\t\t\n\t}","title":""},{"docid":"c8154cfa526e91eb5af85d8d9972c5c2","score":"0.5872198","text":"public function destroy()\n {\n \n }","title":""},{"docid":"ff1587ef150c614c90938270678eed0a","score":"0.5871427","text":"abstract public function destroy();","title":""},{"docid":"648d6d7d32feeab3ce33b9aa1a96bdfb","score":"0.5857267","text":"public function destroy()\n {\n //\n }","title":""},{"docid":"648d6d7d32feeab3ce33b9aa1a96bdfb","score":"0.5857267","text":"public function destroy()\n {\n //\n }","title":""}],"string":"[\n {\n \"docid\": \"2961fd7e3d8100bdb9570443ca486260\",\n \"score\": \"0.71656996\",\n \"text\": \"public function destroy()\\n {\\n if ($this->resource) {\\n sem_remove($this->resource);\\n @unlink($this->filePath);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf15f6055f619cfcdccce83fd0e77156\",\n \"score\": \"0.6656933\",\n \"text\": \"function __destruct()\\n {\\n $preserveRunFolder = $this->preserveRunFolder;\\n $fs = Filesystem::create();\\n foreach ( $this->files as $file ) {\\n if ( $file[ 'preserve' ] ) {\\n $preserveRunFolder = true;\\n }\\n if ( file_exists($file[ 'file' ]) && is_file($file[ 'file' ]) && !$file[ 'preserve' ] ) {\\n $fs->remove($file[ 'file' ]);\\n }\\n }\\n if ( !$preserveRunFolder ) {\\n $fs->remove($this->getTmpPath());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6521de49d5517ef17742054847b1b2f4\",\n \"score\": \"0.6624687\",\n \"text\": \"public function __destruct() {\\n\\t\\tif (file_exists($this->fileName) && (!$this->cache)) {\\n\\t\\t\\tunlink($this->fileName);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab9242b0dff2d6f287a513cd2765006b\",\n \"score\": \"0.6588498\",\n \"text\": \"public function __destruct()\\n\\t{\\n\\t\\t$this->delete_local_file();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2494b022b33aca629d30024743b947f2\",\n \"score\": \"0.6584001\",\n \"text\": \"private function destroy(): void\\n {\\n set_error_handler(static function () {});\\n try {\\n unlink($this->getFilePath());\\n } finally {\\n restore_error_handler();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d14f856514d2c61be0194d84b35e3bd\",\n \"score\": \"0.6533366\",\n \"text\": \"public function __destruct() {\\n @unlink( \\\\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test.json' );\\n @unlink( \\\\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test.xml' );\\n\\n @unlink( \\\\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/json.json' );\\n @unlink( \\\\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/xml.xml' );\\n @unlink( \\\\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/ini.ini' );\\n @unlink( \\\\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/php.php' );\\n @unlink( \\\\Framework::PATH_BASE . '.test/FrameworkStoragePermanentTest/test/json.php' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74175c60976c04dbaf4bc8b37f23ba9c\",\n \"score\": \"0.6519189\",\n \"text\": \"public function cleanup() {\\r\\n\\t\\t$this->resource->cleanup();\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcd3f9a6ab94fd62fb81fbf5f3cbc53e\",\n \"score\": \"0.6482885\",\n \"text\": \"public function __destruct()\\r\\n\\t{\\r\\n\\t\\t@unlink($this->targetFile);\\r\\n\\t\\tif (strcmp($this->referenceFile, $this->outputReferenceFile) !== 0)\\r\\n\\t\\t\\t@unlink($this->referenceFile);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a1925015f5c54bb1554a932b7c36ee0\",\n \"score\": \"0.643904\",\n \"text\": \"public function destroy()\\n {\\n $this->contents = [];\\n $filepath = $this->getFilepath();\\n\\n if ($this->getFilesystem()->has($filepath)) {\\n return $this->getFilesystem()->delete($filepath);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6821270bce7c29555a3d0ca63e8ff36\",\n \"score\": \"0.6396501\",\n \"text\": \"public function destroy()\\n\\t{\\n\\t\\treturn unlink(self::filepath($this->name));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e5a662d718cf1b2a159639ea903b46e\",\n \"score\": \"0.6387996\",\n \"text\": \"public static function destroy() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57755b83ebf259d31741c9bc6b59e926\",\n \"score\": \"0.63600045\",\n \"text\": \"function __destruct() {\\r\\n\\t\\tunlink($this->uploadfile);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab23112013cfca5b333b5f60b4d4edc2\",\n \"score\": \"0.63565004\",\n \"text\": \"public function __destruct()\\n\\t{\\n\\t\\t//Remove temporal files\\n\\t\\tif (isset($this->generated_documents['url_docx']) AND file_exists($this->generated_documents['url_docx']))\\n\\t\\t{\\n\\t\\t\\tsystem('rm '.$this->generated_documents['url_docx']);\\n\\t\\t}\\n\\t\\tif (isset($this->generated_documents['url_pdf']) AND file_exists($this->generated_documents['url_pdf']))\\n\\t\\t{\\n\\t\\t\\tsystem('rm '.$this->generated_documents['url_pdf']);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a8fcb45badd8ea400af381f7e99d276d\",\n \"score\": \"0.6355004\",\n \"text\": \"function delete(){\\n\\n ob_start();\\n try{\\n AJXP_Controller::findActionAndApply(\\\"delete\\\", array(\\n \\\"dir\\\" => dirname($this->path),\\n \\\"file_0\\\" => $this->path\\n ), array());\\n }catch(Exception $e){\\n\\n }\\n ob_get_flush();\\n $this->putResourceData(array());\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a6c9146972b858f8f86423e675d8780\",\n \"score\": \"0.63048935\",\n \"text\": \"public function __destruct()\\n\\t{\\n\\t\\tif (isset($this->filetmp) && file_exists($this->filetmp))\\n\\t\\t{\\n\\t\\t\\t// Free all resources\\n\\t\\t\\tunlink($this->filetmp);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8156bcdcec8c26be39d49d6d04dd1a85\",\n \"score\": \"0.6278397\",\n \"text\": \"public function __destruct()\\n {\\n if (file_exists($this->tempFilesFromFilename)) {\\n unlink($this->tempFilesFromFilename);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fc0ca027327e3c808b12d4cdd81c10d\",\n \"score\": \"0.62760776\",\n \"text\": \"public function __destruct() {\\n if (file_exists($this->tempFile)) {\\n unlink($this->tempFile);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d0319a2ce0aaf6fd13ba6850b76a4e4\",\n \"score\": \"0.62370497\",\n \"text\": \"public function __destruct()\\n {\\n exec('rm -rf ' . $this->dir);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebc79a91879b1741098af91303fbb578\",\n \"score\": \"0.6228805\",\n \"text\": \"public function destroy();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebc79a91879b1741098af91303fbb578\",\n \"score\": \"0.6228805\",\n \"text\": \"public function destroy();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebc79a91879b1741098af91303fbb578\",\n \"score\": \"0.6228805\",\n \"text\": \"public function destroy();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebc79a91879b1741098af91303fbb578\",\n \"score\": \"0.6228805\",\n \"text\": \"public function destroy();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebc79a91879b1741098af91303fbb578\",\n \"score\": \"0.6228805\",\n \"text\": \"public function destroy();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebc79a91879b1741098af91303fbb578\",\n \"score\": \"0.6228805\",\n \"text\": \"public function destroy();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebc79a91879b1741098af91303fbb578\",\n \"score\": \"0.6228805\",\n \"text\": \"public function destroy();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ca475bf5f49104a8c73c0481279e0e7\",\n \"score\": \"0.62142533\",\n \"text\": \"public function destroy()\\n {\\n $downloads = Redis::get(\\\"themes/download/{id}\\\");\\n Redis::incr(\\\"themes/download/{id}\\\");\\n //\\n return Storage::download('iaa-group.docx');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"976bd42363f0e839ad100c9d4fe6f8c8\",\n \"score\": \"0.6203401\",\n \"text\": \"public static function cleanResources()\\n {\\n File::deleteDirectory(resource_path('sass'));\\n File::delete(resource_path('js/app.js'));\\n File::delete(resource_path('js/bootstrap.js'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d41c12b2878246892e453cf002c1ee4\",\n \"score\": \"0.6191242\",\n \"text\": \"public function destroy()\\n {\\n $this->_info = new stdClass();\\n if( is_resource($this->_resource) )\\n {\\n imagedestroy($this->_resource);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f98860f37339af18cb44b61f6f167b6\",\n \"score\": \"0.61841387\",\n \"text\": \"public function destroy() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f98860f37339af18cb44b61f6f167b6\",\n \"score\": \"0.61841387\",\n \"text\": \"public function destroy() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f98860f37339af18cb44b61f6f167b6\",\n \"score\": \"0.61841387\",\n \"text\": \"public function destroy() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f98860f37339af18cb44b61f6f167b6\",\n \"score\": \"0.6183906\",\n \"text\": \"public function destroy() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f98860f37339af18cb44b61f6f167b6\",\n \"score\": \"0.6182274\",\n \"text\": \"public function destroy() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f98860f37339af18cb44b61f6f167b6\",\n \"score\": \"0.6182274\",\n \"text\": \"public function destroy() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e74d41ab2400f980d8e96c2d1cfabacb\",\n \"score\": \"0.61804885\",\n \"text\": \"function __destruct() {\\n\\t\\t@fclose($this->FILE);\\n\\t\\tunset($this->FILE, $this->HEADERS, $this->DATA);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55e6fd2a3a7f4ccb32214b16ef2df61c\",\n \"score\": \"0.6157687\",\n \"text\": \"public function __destruct()\\n {\\n unlink($this->tmpListFile);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"385e69d603b938952baeb3edc255a4ea\",\n \"score\": \"0.6145105\",\n \"text\": \"public function destroyResourceImage(): void\\n\\t{\\n\\t\\tif (isset($this->image)) {\\n\\t\\t\\t@imagedestroy($this->image->getImageResource());\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aee27c8c841a838f9586cd524e3aefb6\",\n \"score\": \"0.6131508\",\n \"text\": \"public function __destroy()\\n\\t{\\n\\t\\t$this->Obj_Doc->disconnectWorksheets();\\n\\t\\tunset($this->Obj_Doc);\\n\\t\\t$this->Obj_Doc = false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"198fd165c47b33ebd5bc956ccfa7d7d5\",\n \"score\": \"0.61014134\",\n \"text\": \"function __destruct()\\n {\\n // No los borro si estoy en debug\\n if (!ConfigGlobal::is_debug_mode()) {\\n $this->deleteFile($this->getFileNew());\\n $this->deleteFile($this->getFileRef());\\n $this->deleteFile($this->getFileLogR());\\n $this->deleteFile($this->getFileLogW());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc750acc8639c8e37ae9a3994fa36c91\",\n \"score\": \"0.61009914\",\n \"text\": \"public function delete()\\n\\t{\\n\\t\\t@unlink($this->get_filepath());\\n\\t\\t@unlink($this->get_filepath(true));\\n\\t\\tparent::delete();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"708bfbe9cabb48f36f7f44c706485423\",\n \"score\": \"0.60953736\",\n \"text\": \"public function __destruct() {\\n fclose($this->file);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85a8d03b0c01970f57fe2403d38a7103\",\n \"score\": \"0.60911876\",\n \"text\": \"public function delete(): void\\n {\\n\\t\\tif(@unlink($this->getPath())) {\\n\\t\\t\\t$this->deleteCacheEntries();\\n\\t\\t\\tself::unsetInstance($this->getPath());\\n\\t\\t}\\n\\t\\telse {\\n\\t\\t\\tthrow new FilesystemFileException(\\\"Delete of file '{$this->getPath()}' failed.\\\", FilesystemFileException::FILE_DELETE_FAILED);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b72a7ee87298ca4a8d70f43d3b130b9c\",\n \"score\": \"0.6074544\",\n \"text\": \"public function destroy()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b75bbe3f24a5ba55eef26610aebdbb92\",\n \"score\": \"0.6066565\",\n \"text\": \"public function __destruct()\\n {\\n $iMax = count($this->aFiles);\\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\\n\\n if (true === file_exists($this->aFiles[$iFor])) {\\n\\n unlink($this->aFiles[$iFor]);\\n }\\n\\n $sMessage = 'delete: ' . $this->aFiles[$iFor];\\n $this->oLog->writeLog(Log::HF_DEBUG, $sMessage);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06b2dcd47261f131ba6c939b43de4165\",\n \"score\": \"0.60623753\",\n \"text\": \"public function cleanup();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06b2dcd47261f131ba6c939b43de4165\",\n \"score\": \"0.60623753\",\n \"text\": \"public function cleanup();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47dcda213186401223dc21b03c4b391d\",\n \"score\": \"0.60609776\",\n \"text\": \"public function __destruct()\\n {\\n unset($this->file_info);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc39af53e8aed20dece10ce27edca8ab\",\n \"score\": \"0.6049737\",\n \"text\": \"public function __destruct() {\\n\\t\\tfclose($this->file);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b127512262550e76a03f7a907a800c9\",\n \"score\": \"0.60172427\",\n \"text\": \"public function __destruct()\\n {\\n if ($this->resource != null) fclose($this->resource);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"989843fa3021035cbd711826bd3576d3\",\n \"score\": \"0.5978969\",\n \"text\": \"public function deleteFile();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b283827044a31ab708f077a3a2cb5ce6\",\n \"score\": \"0.59769744\",\n \"text\": \"function __destruct() {\\n fclose($this->file);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3d85f46131c29f9ae8aa17d59efdb42d\",\n \"score\": \"0.5972637\",\n \"text\": \"public function clear()\\n\\t{\\n\\t\\tif (file_exists($this->_file)) {\\n\\t\\t\\tunlink($this->_file);\\n\\t\\t}\\n\\t\\t$this->_contents = null;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"437665da46dd9c2275dd153eea9fcbf3\",\n \"score\": \"0.59688056\",\n \"text\": \"protected function removeFile()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa9d389eaa27c520583ce20f1b7bdff6\",\n \"score\": \"0.59655356\",\n \"text\": \"function __destroy() {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c31c26ab7bd872d8354dee91aebab8b\",\n \"score\": \"0.59604234\",\n \"text\": \"public function __destruct() {\\n if ( $this->fileHandle ) {\\n fclose($this->fileHandle);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d745a13b5a04a001c2fcfb15d5c77035\",\n \"score\": \"0.59560585\",\n \"text\": \"private function cleanup()\\n {\\n if ($this->cookiefile && is_file($this->cookiefile)) {\\n @unlink($this->cookiefile);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de8dcb45eb78fd3a990cbeea9c11c645\",\n \"score\": \"0.59559053\",\n \"text\": \"public function destroy(): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53e256ddd47bf3ed31ee86fc6a4ea59a\",\n \"score\": \"0.5947983\",\n \"text\": \"protected function destroy() {\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"837f5afa885cec5c5652529a0eca7013\",\n \"score\": \"0.5940339\",\n \"text\": \"public function __destruct()\\n {\\n $this->closeFile();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"837f5afa885cec5c5652529a0eca7013\",\n \"score\": \"0.5940339\",\n \"text\": \"public function __destruct()\\n {\\n $this->closeFile();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f37978716e8b9f8fb3e1fbe9124a865b\",\n \"score\": \"0.5939706\",\n \"text\": \"function __destruct() {\\r\\r\\n\\r\\r\\nif (file_exists ( TMP_FOLDER ) & strlen ( TMP_FOLDER ) > 4)\\r\\r\\n$this->removetmp ();\\r\\r\\n\\r\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"22663c89502d5fd46809491a759b567d\",\n \"score\": \"0.59299576\",\n \"text\": \"protected static function removeComponent()\\n {\\n (new Filesystem)->deleteDirectory(\\n resource_path('assets/js/components')\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8241a069e38e9a6fa2ded00d70eca95a\",\n \"score\": \"0.5924094\",\n \"text\": \"function __destruct () {\\n fclose($this->file);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7eb7d30090b06f1d6024bf2187534c7e\",\n \"score\": \"0.59218866\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b96f71bf4216e5ddda4a6d8bfe16cea\",\n \"score\": \"0.5902774\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c5ce5810621f4a3c403096bc5e7bbf0\",\n \"score\": \"0.58996856\",\n \"text\": \"public static function reset(): void\\n {\\n self::getFile()->delete();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a553fabc3803142c562d0fe909b804d1\",\n \"score\": \"0.5887557\",\n \"text\": \"public function destroy()\\r\\n {\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ea78b987e463ef29803827f30131beb\",\n \"score\": \"0.58875275\",\n \"text\": \"public function __destruct() {\\n\\t\\tparent::__destruct();\\n\\t\\tif($this->auto_delete) {\\n\\t\\t\\t$this->unlink();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a54a30e406a86fbfdb33fedc0f2b45\",\n \"score\": \"0.5880992\",\n \"text\": \"public function destroy()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f00ed406394df4778e8e1d177ed8f48c\",\n \"score\": \"0.5880617\",\n \"text\": \"public function destroy()\\n\\t{\\n\\t\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8154cfa526e91eb5af85d8d9972c5c2\",\n \"score\": \"0.5872198\",\n \"text\": \"public function destroy()\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff1587ef150c614c90938270678eed0a\",\n \"score\": \"0.5871427\",\n \"text\": \"abstract public function destroy();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"648d6d7d32feeab3ce33b9aa1a96bdfb\",\n \"score\": \"0.5857267\",\n \"text\": \"public function destroy()\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"648d6d7d32feeab3ce33b9aa1a96bdfb\",\n \"score\": \"0.5857267\",\n \"text\": \"public function destroy()\\n {\\n //\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":773,"cells":{"query_id":{"kind":"string","value":"c7e1cfd095b953b34e405d7918288eb0"},"query":{"kind":"string","value":"Archives one comment and renders comment/view"},"positive_passages":{"kind":"list like","value":[{"docid":"81ecf020cef611ef22566bfc596548f6","score":"0.7396747","text":"public function actionArchive()\n {\n $id = Yii::$app->request->get('id');\n $comment = new Comment();\n $comment->archiveComment($id);\n Yii::$app->session->setFlash('messageArchived');\n $this->redirect(\n Yii::$app->getUrlManager()->createUrl('/comment/view')\n );\n }","title":""}],"string":"[\n {\n \"docid\": \"81ecf020cef611ef22566bfc596548f6\",\n \"score\": \"0.7396747\",\n \"text\": \"public function actionArchive()\\n {\\n $id = Yii::$app->request->get('id');\\n $comment = new Comment();\\n $comment->archiveComment($id);\\n Yii::$app->session->setFlash('messageArchived');\\n $this->redirect(\\n Yii::$app->getUrlManager()->createUrl('/comment/view')\\n );\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"5f76ae3d5b9948a113f2d5023eb6d6c3","score":"0.61477387","text":"public function comment()\n { \n\n $author = $this->ctrlRequest->requestGetParam(\"author\");\n $content = $this->ctrlRequest->requestGetParam(\"content\");\n $idPost = $this->ctrlRequest->requestGetParam(\"idpost\");\n\n //Data saving\n $this->modelComment->addComment($author, $content, $idPost);\n\n //Updating of the view\n $this->ctrlExecuteAction(\"index\");\n }","title":""},{"docid":"a2e141df105cfa2b949413d3c0e15861","score":"0.6112625","text":"public function comment()\n {\n $data = array(\n 'aid' => $_POST['articleid'],\n 'time' => time(),\n 'username' => $_POST['username'],\n 'content' => $_POST['comment']\n );\n\n $result = M('comments')->data($data)->add(); //add the comment into the table\n\n M('articles')->where('id='.$_POST['articleid'])->setInc('reply',1); // add the reply numbers;\n \n $str = ''; //return the ajax string\n if ($result) \n {\n $str .='
    ';\n $str .='
    ';\n $str .='
    ';\n $str .='
    ';\n $str .='
    ';\n $str .='';\n $str .=$_POST['username'];\n $str .='';\n $str .='';\n $str .='•'.formatTime(time() - 1);\n $str .='
    ';\n $str .='
    ';\n $str .='
    ';\n $str .=$_POST['comment'];\n $str .='
    ';\n\n echo $str;\n }\n else\n {\n echo 'false';\n }\n }","title":""},{"docid":"322d735bb25cb1c716635be188cbbc54","score":"0.607771","text":"public function commentSubmit()\n {\n $PostRepository = new PostRepository();\n $CommentRepository = new CommentRepository();\n $post = $PostRepository->getPosts($_GET['params']);\n if (isset($_GET['commentSubmit'])) {\n if (strlen($_POST['comment-username']) <= 2) {\n $Notif = 'username';\n } elseif (strlen($_POST['comment-content']) <= 2) {\n $Notif = 'content';\n } else {\n $allowedTags='

    ';\n $allowedTags.='

      • ';\n $sHeader = strip_tags(stripslashes($_POST['comment-username']));\n $sContent = strip_tags(stripslashes($_POST['comment-content']), $allowedTags);\n $commentToSubmit = new Comment(\n null,\n htmlspecialchars($_POST['comment-username']),\n htmlspecialchars($_POST['comment-content']),\n null,\n $post->getId()\n );\n $_POST = array();\n $CommentRepository->submitComment($commentToSubmit);\n }\n } else {\n die($this->error('500'));\n }\n header('Location: ?p=post.single&params='.$_GET['params'].'&notif='.$Notif.'#commentbox');\n }","title":""},{"docid":"c52a74e1db2c136c55b76ecbadbc74cd","score":"0.60363555","text":"function comment()\n{\n $modelManager = new ModelBackend();\n $comment = $modelManager->getComments($_GET['id']);\n $post = $modelManager->getPost($_GET['id']);\n require('adminViews/comment.php');\n}","title":""},{"docid":"451ffc2548aecc6915b246a843193699","score":"0.60104185","text":"function comments()\n{\n $modelManager = new ModelBackend();\n $post = $modelManager->getPosts();\n require('adminViews/comments.php');\n}","title":""},{"docid":"a03dbf476217bf1c2406bd99f1510620","score":"0.5924464","text":"public function commentsFeedAction()\n\t{\n\t\t$this->getResponse()\n\t\t\t->setHeader('Content-Type', 'text/xml; charset=UTF-8')\n\t\t\t->setBody(\n\t\t\t\t$this->getLayout()->createBlock('wordpress/feed_post_comment')\n\t\t\t\t\t->setSource(Mage::registry('wordpress_post'))\n\t\t\t\t\t->setFeedType($this->getRequest()->getParam('feed', 'rss2'))\n\t\t\t\t\t->toHtml()\n\t\t\t);\n\t}","title":""},{"docid":"167cca6cd08ec9b67cc9a302b8fecea8","score":"0.5890786","text":"public function posts(int $id)\n {\n// $output = ['posts' => $this->model->getPostComment($id), 'count' => $this->model->getCountComment($id)];\n//$array = $this->model->getPostComment(1);\n// var_dump($this->model->renderAllComment($array));\n\n $this->view->generate('article-view.php', 'templateView.php', $this->model->getPostId($id), $this->model->commentView($this->model->getPostComment($id)));\n }","title":""},{"docid":"cdfdfc2a529eb50613ec438edca40b50","score":"0.58784777","text":"function postWithComments() {\n \n $this->viewData['post'] = PostModel::create()->selectPostByPostId($_GET['postId']);\n $this->viewData['comments'] = PostModel::create()->selectComments( $_GET['postId'] );\n // Render the action with template\n $this->render('post/postWithComments');\n }","title":""},{"docid":"098f68332bcdfb09267ac994477dc8b5","score":"0.58387625","text":"function bimber_render_entry_comments_link() {\n\techo bimber_capture_entry_comments_link();\n}","title":""},{"docid":"f437d549756de7e21463c549472e949d","score":"0.5799368","text":"public function run() {\n\t\t//First check if the user just submitted a comment\n\t\t//by asking our view.\n\t\tif($this->postView->isCommentSubmit()) {\n\t\t\ttry {\n\t\t\t\t//Get the comment-\n\t\t\t\t$comment = $this->commentView->getComment();\n\n\t\t\t\t//Save the comment to the system.\n\t\t\t\t$this->commentModel->saveComment($comment);\n\t\t\t}\n\n\t\t\tcatch(\\Exception $e) {\n\t\t\t\t//If something goes wrong with creating\n\t\t\t\t//a comment object we need to show the user\n\t\t\t\t//some kind of error message.\n\t\t\t\t$this->postView->newCommentFailed($this->commentView);\n\t\t\t}\n\t\t}\n\n\t\t//Then we try to retrieve our post.\n\t\ttry {\n\t\t\t//PostID.\n\t\t\t$id = $this->postView->getPostId();\n\n\t\t\t//Get the post from our system.\n\t\t\t$this->post = $this->postModel->getPost($id);\n\n\t\t\t//Get the comments aswell.\n\t\t\t$this->comments = $this->commentModel->getComments($this->post);\n\t\t}\n\n\t\tcatch(\\Exception $e) {\n\t\t\t$this->appView->redirectToFrontPage();\n\t\t}\n\t}","title":""},{"docid":"ef62bb9e17b0f88d7ddcb1c8c57e322a","score":"0.5795941","text":"public function getCommentView()\n {\n $title = \"H&G - Comment view\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n $comment = new Comment();\n $comment->setDb($this->di->get(\"db\"));\n $reply = new Reply();\n $reply->setDb($this->di->get(\"db\"));\n\n $data = [\n \"items\" => $comment->findAll(),\n \"replies\" => $reply->findAll(),\n ];\n\n $view->add(\"comments/comment-view\", $data);\n\n $pageRender->renderPage([\"title\" => $title]);\n }","title":""},{"docid":"d2d648b49705c669776fa9b24583c7cb","score":"0.5781956","text":"public function show_comment()\n {\n PeepSoTemplate::exec_template('activity', 'comment', $this->comment_data);\n }","title":""},{"docid":"9b55262b3d34a9b44323cc3a18e29948","score":"0.5756396","text":"public function post_edit_comment() {\n\t\t$idComment = static::find(Input::get('id'));\n\t\tif(!$idComment) { return false; }\n\n\t\t$Avant = \\DB::table('projects_issues_comments')->where('id', '=', Input::get('id'))->first(array('id', 'project_id', 'issue_id', 'comment', 'created_at'));\n\t\t$Avant->comment = str_replace(\"`\", \"'\", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"
      • \", \"&nbsp;&nbsp;&nbsp;-&nbsp;\", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"
      • \", \"
        \", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"
          \", \"
          \", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"
        \", \"
        \", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"
          \", \"
          \", $Avant->comment );\n\t\t$Avant->comment = str_replace(\"
        \", \"
        \", $Avant->comment );\n\n\t\t\\User\\Activity::add(12, $Avant->project_id, $Avant->issue_id, Input::get('id'), $Avant->comment, $Avant->created_at, NULL);\n\t\t\\DB::table('projects_issues_comments')->where('id', '=', Input::get('id'))->update(array('comment' => Input::get('body'), 'updated_at' => date(\"Y-m-d H:i:s\")));\n\n\t\treturn Redirect::to(Project\\Issue::current()->to())\n\t\t\t->with('notice', __('tinyissue.comment_edited'));\n\t}","title":""},{"docid":"1a3d252075c10c0eddf07b155622e7e6","score":"0.5753428","text":"function presscore_comment( $comment, $args, $depth ) {\n\t\t$GLOBALS['comment'] = $comment;\n\n\t\tswitch ( $comment->comment_type ) :\n\t\t\tcase 'pingback' :\n\t\t\tcase 'trackback' :\n\t\t?>\n\t\t
      • \n\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\n\t\t\t
      • id=\"comment-\">\n\t\t\t\t
        \" class=\"comment-body\">\n\t\t\t\t\t
        \n\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$author_url = get_comment_author_url();\n\t\t\t\t\t\t\tif ( ! empty( $author_url ) && 'http://' !== $author_url ) {\n\t\t\t\t\t\t\t\t$avatar = '' . $avatar . '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Output comment author avatar.\n\t\t\t\t\t\t\techo $avatar;\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\tsays:', 'the7mk2' ), sprintf( '%s', get_comment_author_link( $comment ) ) ); ?>\n\t\t\t\t\t\t
        \n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tcomment_approved ) : ?>\n\t\t\t\t\t\t\t

        \n\t\t\t\t\t\t\n\t\t\t\t\t
        \n\n\t\t\t\t\t
        \n\t\t\t\t\t\t\n\t\t\t\t\t
        \n\n\t\t\t\t\t&nbsp;';\n\n\t\t\t\t\tcomment_reply_link(array_merge( $args, array(\n\t\t\t\t\t\t'add_below' => 'div-comment',\n\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t'before' => '
        ',\n\t\t\t\t\t\t'after' => '
        ',\n\t\t\t\t\t\t'reply_text' => $icon . __( 'Reply', 'the7mk2' ),\n\t\t\t\t\t\t'reply_to_text' => $icon . __( 'Reply to %s', 'the7mk2' ),\n\t\t\t\t\t\t'login_text' => $icon . __( 'Log in to Reply', 'the7mk2' ),\n\t\t\t\t\t) ));\n\t\t\t\t\t?>\n\t\t\t\t
        \n\t\tget($_GET['comment']);\n if(CommentaryManager::getManager()->delete($comment)) {\n $article = ArticleManager::getManager()->get($_GET['article']);\n $comment = CommentaryManager::getManager()->getAll($article->getId());\n $this->render('article', 'Article', [\n \"article\" => $article,\n \"comment\" => $comment\n ]);\n }\n }\n }","title":""},{"docid":"5aeba31f5336209d32db8d84a50cf6c8","score":"0.5726556","text":"public function archiveBlogEntryAction() {\n \n $this->view->currentPage = 'connect';\n $blogEntries = new Datasource_Cms_Connect_BlogEntries();\n \n $blogEntryID = $this->getRequest()->getParam('id');\n $blogEntries->setArchivedStatus($blogEntryID, true);\n \n // Changes saved - so send them back with a nice success message\n $this->_helper->getHelper('FlashMessenger')->addMessage(array('deleted' => true));\n $this->_helper->getHelper('Redirector')->goToUrl('/cms-admin/connect/blog');\n }","title":""},{"docid":"88b4da7e08e6612a7eb1aa6303eeba84","score":"0.57196236","text":"function pyb_comment( $comment ) { ?>\n\n\t
      • id=\"li-comment-\">\n\t\t
        \">\n \t\t
        \n \t\tcomment_parent )\n \t\t\t$avatar_size = 39;\n\t\t\t\t\t\t\t\t\t\t\t\n \t\techo get_avatar( $comment, $avatar_size ); ?>\t\t\n \t\t\n \t\t
        \n \t\t
        \n \t\t \t%s', get_comment_author() ),\n \t\t \t\t\tsprintf( '',\n \t\t \t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n \t\t \t\t\t\tget_comment_time( 'c' ),\n \t\t \t\t\t\t/* translators: 1: date, 2: time */\n \t\t \t\t\t\tsprintf( __( '%1$s at %2$s', 'pyb' ), get_comment_date(), get_comment_time() )\n \t\t \t\t\t)\n \t\t \t\t);\n \t\t \t?>\n \t\t\n \t\t \t', '' ); ?>\n \t\t
        \t\t\n \t\t
        \t\t\n \t\t
        \n\n\t\t\t
        \n \t\t\t\n
        \n\t\t
        getComments();\n $title = \"Blog de Jean Forteroche - Billet simple pour l'Alaska\";\n $header = '';\n $posts = \"\";\n if (sizeof($PostRepository->getPosts()) > 0) {\n foreach ($PostRepository->getPosts() as $post) {\n if (strlen($post->getContent()) > 500) {\n $content = substr(strip_tags($post->getContent()), 0, 500) . '... getId() . '\">lire la suite' ;\n } else {\n $content = strip_tags($post->getContent());\n }\n $coms = 0;\n foreach ($comments as $comment) {\n if ($comment->getArticleId() == $post->getId()) {\n $coms++;\n }\n }\n $posts .= \"
        \n
        \n

        getId() . \"\\\"> \" . $post->getTitle() .\"\n

        Commentaires: \" . $coms . \"

        \n

        \n
        \" . $post->getDate() . \"
        \n
        \n

        \" . $content . \"

        \n
        \";\n }\n } else {\n $posts = \"
        \n

        Aucun article :/


        \n

        Aucun article n'as encore été rédiger.

        \n
        \";\n }\n require('../src/View/IndexView.php');\n }","title":""},{"docid":"70a763dca7d4d090732ce3fd6a29ede1","score":"0.56596345","text":"function comment($f3) {\n\t\t$slug=($f3->get('POST.slug')?:'');\n\t\tif (!$f3->exists('POST.name') || !strlen($f3->get('POST.name')))\n\t\t\t$f3->set('message','Name is required');\n\t\telseif (!$f3->exists('POST.email') ||\n\t\t\t!strlen($email=$f3->get('POST.email')) ||\n\t\t\t!Audit::instance()->email($email))\n\t\t\t$f3->set('message','Invalid e-mail address');\n\t\telseif (!$f3->exists('POST.contents') ||\n\t\t\t!strlen($f3->get('POST.contents')))\n\t\t\t$f3->set('message','Comment cannot be blank');\n\t\telse {\n\t\t\t$db=$this->db;\n\t\t\t$comment=new DB\\SQL\\Mapper($db,'comments');\n\t\t\t$comment->copyfrom('POST');\n\t\t\t$img=new Image;\n\t\t\t$comment->set('identicon',\n\t\t\t\t$f3->base64($img->identicon($f3->get('POST.email'),48)->\n\t\t\t\tdump(),'image/png'));\n\t\t\t$comment->set('slug',$slug);\n\t\t\t$comment->set('posted',time());\n\t\t\t$comment->save();\n\t\t\t$f3->reroute('/'.$slug);\n\t\t}\n\t\t$args=array('slug'=>$slug);\n\t\t$this->show($f3,$args);\n\t}","title":""},{"docid":"d94d894b3af852ac1611b3f2d8038d59","score":"0.5639993","text":"function comment_format($comment, $args, $depth) {\n $GLOBALS['comment'] = $comment; ?>\n
        id=\"li-comment-\">\n
        \">\n \n
        \n ', $alt='Gravatar Image for '. get_comment_author('').'' ); ?>\n \n\t\t\t\n\t\t
        \t\t\n\t\n %s writes:'), get_comment_author_link()) ?>\n
        \n comment_approved == '0') : ?>\n \n
        \n \n\n \n \n
        \nmodel->get_posts_comments_by_id( $id );\r\n \r\n $template_name = ROOT_DIR . $this->views_dir . 'single-comment.php';\r\n include_once ROOT_DIR . '/views/layout/' . $this->layout;\r\n }","title":""},{"docid":"e6b207149339690ab800b1ab2d9d682b","score":"0.5626609","text":"public function commenter() {\r\n $idBillet = $this->requete->getParametre(\"id\");\r\n $auteur = $this->requete->getParametre(\"auteur\");\r\n $contenu = $this->requete->getParametre(\"contenu\");\r\n \r\n $commentaire = $this->commentaire->ajouterCommentaire($auteur, $contenu, $idBillet);\r\n // Exécution de l'action par défaut pour réafficher la liste des billets\r\n $this-> genererVue(['commentaire' => $commentaire ], null, false);\r\n }","title":""},{"docid":"528018ebbdbe95b7963fd8c9ec020ca6","score":"0.56126183","text":"public function add() {\n $article = ArticleManager::getManager()->get($_GET['article']);\n\n if(isset($_POST['comment'], $_SESSION['id'])) {\n $comment = htmlentities($_POST['comment']);\n $commentary = new Commentary();\n $user = UserManager::getManager()->getById($_SESSION['id']);\n\n $commentary->setContent($comment)->setArticleFk($article)->setUserFk($user);\n\n if(CommentaryManager::getManager()->add($commentary)) {\n $comment = CommentaryManager::getManager()->getAll($article->getId());\n $this->render('article', 'Article', [\n \"article\" => $article,\n \"comment\" => $comment\n ]);\n }\n }\n else {\n $comment = CommentaryManager::getManager()->getAll($article->getId());\n $this->render('article', 'Article', [\n \"article\" => $article,\n \"comment\" => $comment,\n \"error\" => \"9\"\n ]);\n }\n }","title":""},{"docid":"4e943c0691a1b59202c3c32d3f0f2d18","score":"0.561122","text":"public function displayComments()\n {\n $template = $this->templateService->getSubpart($this->templateFile, '###DISPLAY_COMMENTS###');\n $this->marker['###B_PUBLISH_FEED###'] = ($this->marker['###B_PUBLISH_FEED###'] == 1 ? 'true' : 'false');\n $this->marker['###B_URL###'] = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');\n $content = $this->templateService->substituteMarkerArray($template, $this->marker);\n return $content;\n }","title":""},{"docid":"d893e5af057185426142c0c3fa8d0531","score":"0.5594555","text":"public function comment($comment, $key){\n global $users, $security, $snicker;\n\n // Get Page\n $page = new Page($comment->page_key());\n\n // Check User\n $user = $users->exists($comment->getValue(\"username\"));\n if($user && $comment->getValue(\"uuid\") === \"bludit\"){\n $user = new User($comment->getValue(\"username\"));\n }\n\n // Render\n $token = $security->getTokenCSRF();\n $depth = (int) $snicker->getValue(\"comment_depth\");\n $url = $page->permalink() . \"?action=snicker&snicker=form&page_key=%s&uid=%s&tokenCSRF=%s\";\n $url = sprintf($url, $comment->page_key(), $comment->uid(), $token);\n ?>\n
        uid(); ?>\" class=\"comment\">\n
        \n
        \n gravatar($comment->email()); ?>\" alt=\"username(); ?>\" />\n username() === $page->username()){\n echo 'Author';\n } else if($user && $user->role() === \"admin\"){\n echo 'Admin';\n }\n ?>\n
        \n\n
        \n getValue(\"comment_title\") !== \"disabled\" && !empty($comment->title())){ ?>\n
        title(); ?>
        \n \n
        \n Written by username(); ?>\n on date(); ?>\n
        \n
        \n comment(); ?>\n
        \n \n
        \n
        \n
        \n ' [at] ', '.' => ' [dot] ', '-' => ' [dash] '));\n\n $text = htmlspecialchars($row['text']);\n $text = preg_replace('/\\t/',' ',$text);\n $text = preg_replace('/ /',' &nbsp;',$text);\n $text = preg_replace_callback('/((https?|ftp):\\/\\/[\\w-?&;:#~=\\.\\/\\@]+[\\w\\/])/ui',\n array($this,'_format_link'),$text);\n $text = nl2br($text);\n\n $opts = str_replace('@MD5@',$md5,$this->gravopts);\n\n echo '
        ';\n echo '\"\"';\n echo ''.$number.'';\n\n echo '
        ';\n echo $text;\n echo '
        ';\n\n echo '
        ';\n\n echo '
        ';\n echo $row['date'];\n echo '
        ';\n\n echo '
        ';\n if($row['web']){\n echo 'target.' class=\"url\">';\n echo htmlspecialchars($row['name']);\n echo '';\n }elseif($this->showmail){\n echo '';\n echo htmlspecialchars($row['name']);\n echo '';\n }else{\n echo htmlspecialchars($row['name']);\n }\n echo '
        ';\n\n echo '
        ';\n\n echo '
        ';\n $this->_admin_opts($row['id']);\n echo '
        ';\n }","title":""},{"docid":"478cce1d3bef00e03897c51afdb74bd3","score":"0.5580467","text":"public function writeComment($comment){\n global $comments, $pages, $url, $users;\n $referer = DOMAIN . $url->uri();\n\n // Temp\n if(!Session::started()){\n Session::start();\n }\n Session::set(\"snicker-comment\", $comment);\n\n // Check Basics\n if(!isset($comment[\"page_key\"]) || !$pages->exists($comment[\"page_key\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => \"snicker-response-004\"));\n }\n if(isset($comment[\"parent_uid\"])){\n if(!$comments->exists($comment[\"parent_uid\"])){\n $comment[\"parent_uid\"] = null;\n } else {\n $parent = $comments->getCommentDB($comment[\"parent_uid\"]);\n $comment[\"type\"] = \"reply\";\n $comment[\"depth\"] = $parent[\"depth\"]+1;\n }\n }\n\n // Sanitize Terms\n if($this->getValue(\"frontend_terms\") !== \"disabled\"){\n if(!isset($comment[\"terms\"]) || $comment[\"terms\"] !== \"1\"){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_5\")\n ));\n }\n }\n\n // Sanitize Title\n if($this->getValue(\"comment_title\") === \"required\"){\n if(!isset($comment[\"title\"]) || empty($comment[\"title\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_4\")\n ));\n }\n }\n $comment[\"title\"] = isset($comment[\"title\"])? Sanitize::html($comment[\"title\"]): \"\";\n\n // Sanitize Comment\n if(!isset($comment[\"comment\"]) || empty($comment[\"comment\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_3\")\n ));\n }\n $comment[\"comment\"] = Sanitize::html($comment[\"comment\"]);\n\n // Sanitize User\n if(isset($comment[\"user\"]) && isset($comment[\"token\"])){\n if(!$users->exists($comment[\"user\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_2\")\n ));\n }\n $user = new User($comment[\"user\"]);\n\n if(md5($user->tokenAuth()) !== $comment[\"token\"]){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_2\")\n ));\n }\n unset($comment[\"user\"], $comment[\"token\"]);\n\n $comment[\"uuid\"] = \"bludit\";\n $comment[\"status\"] = \"approved\";\n $comment[\"username\"] = $user->username();\n $comment[\"email\"] = null;\n } else if(isset($comment[\"username\"]) && isset($comment[\"email\"])){\n if(!Valid::email($comment[\"email\"])){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_2\")\n ));\n }\n $comment[\"uuid\"] = null;\n $comment[\"status\"] = \"pending\";\n $comment[\"username\"] = Sanitize::html(strip_tags($comment[\"username\"]));\n $comment[\"email\"] = Sanitize::email($comment[\"email\"]);\n } else {\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_2\")\n ));;\n }\n\n // Sanitize Data\n $comment[\"like\"] = 0;\n $comment[\"dislike\"] = 0;\n $comment[\"subscribe\"] = isset($comment[\"subscribe\"]);\n\n // Check\n if(($uid = $comments->add($comment)) === false){\n return $this->handleResponse(false, array(\n \"referer\" => $referer . \"#snicker-comments-form\",\n \"error\" => $this->getValue(\"string_error_1\")\n ));\n }\n\n Session::set(\"snicker-comment\", null);\n return $this->handleResponse(true, array(\n \"referer\" => $referer . \"#comment-\" . $uid,\n \"success\" => $this->getValue(\"string_success_\" . ((int) $comment[\"subscribe\"] + 1)),\n \"comment\" => $this->renderTheme(\"comment\", array(new Comment($uid), $uid))\n ));\n }","title":""},{"docid":"1ea074669729412a9a06f0ba288b956f","score":"0.55765134","text":"public function createPost() {\n //skip rendering first ad post\n echo '\n
        \n
        \n
        \n

        getPosturl().'\">'.$this->getHeading().'

        \n

        '.$this->getText().'

        \n
        \n
        \n

        By '. $this->getMeta()['author'].'

        \n

        '.$this->getMeta()['publishDate'].'

        \n

        '.$this->getMeta()['publishTime'].'

        \n
        \n
        \n
        \n \n
        \n
        \n ';\n }","title":""},{"docid":"a546036354bf64dae753d0f36d0abca2","score":"0.5565282","text":"function kt_comment( $comment, $args, $depth) {\n\t\t$GLOBALS['comment'] = $comment;\n\t\tswitch ( $comment->comment_type):\n\t\tcase 'pingback':\n\t\tcase 'trackback':\n\t\t\t// Display trackbacks differently than normal comments. ?>\n\t\t\t
      • id=\"comment-\">\n\t\t\t\t

        ', '' ); ?>

        \n\t\t\t\t\n\t\t\t
      • id=\"li-comment-\">\n\t\t\t
        \" class=\"comment\">\n\t\t\t
        \n\t\t\t%1$s %2$s',\n\t\t\t\tget_comment_author_link(),\n\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t( $comment->user_id === $post->post_author) ? ' ' . __( 'Post author', 'kwik' ) . '' : ''\n\t\t\t);\n\t\t\tprintf( '',\n\t\t\t\tesc_url( get_comment_link( $comment->comment_ID) ),\n\t\t\t\tget_comment_time( 'c' ),\n\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\tsprintf(__( '%1$s at %2$s', 'kwik' ), get_comment_date(), get_comment_time())\n\t\t\t);\n\t\t\t?>\n\t\t\t\t
        \n\t\t\t\tcomment_approved): ?>\n\t\t\t\t

        \n\t\t\t\t\n\t\t
        \n\t\t\n\t\t\t\t\t\t\t\t\t\t', '

        ' ); ?>\n\t\t
        \n\t\t\t
        \n\t\t __( 'Reply', 'kwik' ), 'after' => ' &darr;', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\n\t\t
        \n\t\t
        \n\t\tdata && $this->data->comments > 0){\n\t\t\t$this->builder->h1(fc_t('!gears comments').' ('.$this->builder->a($this->data->comments,array('id'=>'comments_counter','class'=>'comments_counter','href'=>'#comments')).') &darr;',TRUE);\n\t\t}\n\t\t$this->check_access();\n\t\tif(!$comments){\n\t\t\t\t//$comments = $this->cache->get('comments/'.$this->table.'/'.$this->data->id);\n\t\t\t\t//if(!$comments){\n\t\t\t\t\t$this->db->join($this->links_table,$this->links_table.'.cid = comments.id','inner');\n\t\t\t\t\t$this->db->where($this->links_table.'.'.$this->link_field,$this->data->id);\n\t\t\t\t\t$this->db->order_by($type == 'tree' ? 'path' : 'comments.id',$type == 'tree' ? 'asc' : 'desc');\n\t\t\t\t\t$this->query();\n\t\t\t\t\t$comments = array4key($this->db->get('comments')->result_array(),'id');\n\t\t\t\t//\t$this->cache->set('comments/'.$this->table.'/'.$this->data->id,$comments);\n\t\t\t\t//}\n\t\t}\n\t\tif($type == 'tree'){\n\t\t\t$last_id = $this->comments_views($comments);\n\t\t\tforeach($comments as $key=>&$comment){\n\t\t\t\tif($last_id && $last_id < $key && $comment['aid'] != $this->user->get('id')){\n\t\t\t\t\t$comment['class'] = 'new';\n\t\t\t\t}\n\t\t\t\t$comment = $this->process($comment,$type);\n\t\t\t}\n\t\t\tif($this->user->get('id')){\n\t\t\t js('/gears/comments/js/inline/updater.class',FALSE,TRUE);\n\t\t\t if ($this->gears->comments->show_updater) js('/gears/comments/js/inline/comments',FALSE,TRUE);\n\t\t\t}\n\t\t\tif($this->access['edit'] OR $this->access['edit_all']){\n\t\t\t\tjs('/gears/comments/js/inline/edit',FALSE,TRUE);\n\t\t\t}\n\t\t\tif($this->access['destroy']){\n\t\t\t\tjs('/gears/comments/js/inline/destroy',FALSE,TRUE);\n\t\t\t}\n\t\t}\n\t\tif(is_object($comments)) $comments = object2array($comments);\n\t\treturn $return === TRUE ? $comments : $this->_template('comments comments',array('comments'=>$comments,'wrapper'=>$wrapper,'type'=>$type),$return);\n\t}","title":""},{"docid":"f60720c1985d2e5bc55e9fd70c730f31","score":"0.55521584","text":"protected function _handlePostedComment()\n\t{\n\t\t$commentId = $this->getRequest()->getParam('comment');\n\t\t\n\t\tif ($commentId && $this->getRequest()->getActionName() === 'view') {\n\t\t\t$comment = Mage::getModel('wordpress/post_comment')->load($commentId);\n\t\t\t\n\t\t\tif ($comment->getId() && $comment->getPost()->getId() === $this->getEntityObject()->getId()) {\n\t\t\t\tif ($comment->isApproved()) {\n\t\t\t\t\theader('Location: ' . $comment->getUrl());\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tMage::getSingleton('core/session')->addSuccess($this->__('Your comment is awaiting moderation.'));\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}","title":""},{"docid":"d680adf2b19a53b0b8d4cd809cfa1083","score":"0.55275214","text":"public function actionView()\n\t{\n\t\t$post=$this->loadModel();\n\t\t$comment=$this->newComment($post);\n\n\t\t$this->render('view',array(\n\t\t\t'model'=>$post,\n\t\t\t'comment'=>$comment,\n\t\t));\n\t}","title":""},{"docid":"e21d8035932abead57f5f00cd8b600b5","score":"0.5525533","text":"public function commentsAction()\n\t{\n\t\t$error = [];\n\t\t$model = new CommentsModel();\n\t\t$verifs = new ValidationTool();\n\t\t$items = new ItemsModel();\n\n\t\t$comments = $model->last5Comments();\n\n\t\t$user = $this->getUser();\n\n\t\tif(!empty($_POST['submit']))\n\t\t{\n\t\t\t$user = $this->getUser();\n\t\t\t$username = $user['username'];\n\t\t\t$user_id = $user['id'];\n\t\t\t$created_at = date('Y-m-d G:i:s');\n\n\n\t\t\t$comment = trim(strip_tags($_POST['comment']));\n\n\t\t\t$error['comment'] = $verifs->textValid($comment, 'commentaire',10,500);\n\n\t\t\tif($verifs->IsValid($error))\n\t\t\t{\n\t\t\t\t$model->insert(['users_id' => $user_id,\n\t\t\t\t\t\t\t\t\t\t\t\t'comment' => $comment,\n\t\t\t\t\t\t\t\t\t\t\t\t'created_at' => $created_at ]);\n\n\t\t\t\t\t\t\t\t\t\t\t\t$this->flash('Commentaire en attente de moderation', 'success');\n\t\t\t\t\t\t\t\t\t\t\t\t$this->redirectToRoute('default_home');\n\t\t\t} else {\n\t\t\t\t$results = $items->findAllproductactive('home', '1', $orderBy = 'created_at', $orderDir = 'DESC', $limit = 5);\n\t\t\t\t$this->show('default/home',['user' => $user , 'error' => $error , 'comments' => $comments, 'actualComment' => $comment, 'results' => $results]);\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"a208ffb48e1c5679548634c7dde5575d","score":"0.55253154","text":"function renderComments() {\n\t\tglobal $wgUser;\n\t\t$html = '';\n\t\tforeach( $this->comments as $id => $comment ) {\n\t\t\tif( $comment[AJAXCOMMENTS_PARENT] === false ) $html = $this->renderComment( $id ) . $html;\n\t\t}\n\t\tif( $html == '' ) $html = \"\" . wfMessage( 'ajaxcomments-none' )->text() . \"
        \";\n\n\t\t// If logged in, allow replies and editing etc\n\t\tif( $this->canComment ) {\n\t\t\t$html = \"\\n$html\";\n\t\t} else $html = \"\" . wfMessage( 'ajaxcomments-anon' )->text() . \"
        $html\";\n\t\treturn $html;\n\t}","title":""},{"docid":"e02f4c3d842bb1af5e6c87a6322b626b","score":"0.55135447","text":"function view($id){\r\n $this->layout = \"ajax\";\r\n\t\t$this->Comment->id = $id;\r\n\t\t$this->data = $this->Comment->read();\r\n\t\t$this->data['Comment']['read'] = 1;\r\n\t\t$this->Comment->save($this->data);\r\n\t\t$com_view = $this->Comment->read();\r\n\t\t$this->set('comments',$com_view);\r\n\t}","title":""},{"docid":"f98c2c8a3adb0c1104d2c161dd768c23","score":"0.5511305","text":"public function single($id)\n {\n $this->checkParams();\n $PostRepository = new PostRepository();\n $post = $PostRepository->getPosts($id);\n $title = $post->getTitle() . \" - Jean Forteroche, Billet simple pour l'Alaska\";\n $header = '';\n if ($post == null) {\n die($this->error('404'));\n }\n if (isset($_GET['notif'])) {\n switch ($_GET['notif']) {\n case \"username\":\n $NotifWindow = new NotifWindow('red', 'Message non envoyé, nom d\\'utilisateur trop court.');\n break;\n case \"content\":\n $NotifWindow = new NotifWindow('red', 'Message non envoyé, contenu trop court.');\n break;\n }\n }\n $CommentRepository = new CommentRepository();\n $comments = $CommentRepository->getComments($id);\n $content = \"\";\n $i = 0;\n \n foreach ($comments as $comment) {\n $content .=\n \"
        getId() . \"\\\">\n

        \" . $comment->getUsername() . \" \" . $comment->getDate() . \"

        \n

        \" . htmlspecialchars_decode($comment->getContent()) . \"

        \";\n if (isset($_SESSION['auth'])) {\n $content .= 'getId() . '\" class=\"btn btn-danger comment-btn-suppr\">Supprimer';\n } else {\n $content .= 'getId() . '&flag=' . $comment->getId() . '\">Signaler';\n }\n $content .= \"\n
        \";\n }\n require('../src/View/SingleView.php');\n if (isset($_GET['flag'])) {\n $CommentService = new CommentService;\n $CommentService->flag($_GET['flag']);\n $flaggedUsername;\n foreach ($comments as $comment) {\n if ($comment->getId() == $_GET['flag']) {\n $flaggedUsername = $comment->getUsername();\n }\n }\n $NotifWindow = new NotifWindow('red', 'Le commentaire de ' . $flaggedUsername . ' à bien été signalé.');\n }\n if (isset($_GET['submit'])) {\n $NotifWindow = new NotifWindow('#47ff78', 'Message envoyé.');\n }\n }","title":""},{"docid":"7a85949ce4c07e145869f0b70a92b5fc","score":"0.55049074","text":"function dashboardCommentListAction()\n\t{\n\t\t$comments = Comment::findAll();\n\n\t\techo self::$twig->load('DashboardCommentList.html.twig')->render(array(\n\t\t\t\"comments\" => $comments\n\t\t));\n\t}","title":""},{"docid":"88f0c1661c2674d08d17b99741bc5c68","score":"0.5504267","text":"private function emailComment()\n {\n $app = App::getInstance();\n\n // Get content\n ob_start();\n $data = array(\n 'app' => $app,\n 'comment' => $this,\n );\n\n // Render email template\n call_user_func(function () use ($data) {\n extract($data);\n include realpath(__DIR__ . '/../../../templates/') . '/new_external_comment.php';\n });\n $content = ob_get_contents();\n ob_end_clean();\n\n // Create message\n $message = \\Swift_Message::newInstance()\n ->setSubject('New comment to moderate on \"'.$this->getArticle()->getTitle().'\"')\n ->setTo(explode(\", \", Settings::get('email_extcomment_notifyaddr')))\n ->setFrom(array(Settings::get('email_replyto_addr') => Settings::get('email_replyto_name')))\n ->setBody($content, 'text/html');\n\n // Send message\n return $app['email']->send($message);\n }","title":""},{"docid":"cf309a7cbe736d5c0f4696a3c5b360ea","score":"0.55037117","text":"static public function showCallback( O_Dao_Renderer_Show_Params $params )\r\n\t{\r\n\t\t$comment = $params->record();\r\n\t\tif (!$comment instanceof R_Mdl_Site_Comment) {\r\n\t\t\techo \"Error
        \";\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t$isList = $params->params() == \"list\";\r\n\t\tif ($isList && !$comment->root->isVisible())\r\n\t\t\treturn;\r\n\t\t?>\r\n\r\n
        style=\"margin-left:level?>em\" id=\"comm-id?>\">\r\n
        owner->link()?>\r\n\towner->avatar()?>
        \r\nid?>\">\r\n\r\n\r\n
        \r\nКомментарий на: root->link()?> - root->owner->link()?>; root->system->link()?>\r\n
        \r\n\r\n\r\n\t
        time )?>
        \r\n\r\ncontent?>\r\n
        \r\n\r\nroot->system->id, $comment->id, \r\n\t\t\t\t\tR_Mdl_Session::can( \"delete\", $comment ) );\r\n\t\t}\r\n\t}","title":""},{"docid":"3ec400028915f13ad25bcd761f522aa6","score":"0.55004066","text":"function flatmarket_comment( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment;\n\n\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\n\n\t
      • \" >\n\t\t
        \n\t\t\t ', '' ); ?>\n\t\t
        \n\n\t\n\n\t
      • \" >\n\t\t
        \" class=\"comment-body\">\n\t\t\t\n\t\t\t
        \n\t\t\t\t
        \n\t\t\t\t\t\n\t\t\t\t\t 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t\t
        \n\t\t\t\t
        \n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t
        \n\n\t\t\t\t
        \n\t\t\t\t\tsays: ', 'flatmarket' ), sprintf( '%s', get_comment_author_link() ) ); ?>\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\tcomment_approved ) : ?>\n\t\t\t\t\t

        \n\t\t\t\t\t\n\t\t\t\t\t
        \n\t\t\t\t\t\t\n\t\t\t\t\t
        \n\t\t\t\t
        \n\n\t\t\t\t\n\t\t\t
        \n\n\t\t\t\n\n\t\t\t\n\t\t
        \n\n\tgetInputManager()->doFilter();\n $this->addInputToModel($data, $this->getModel());\n\n try {\n $this->getModel()->addCommentToMovie($data['Comment']);\n systemLog::message('User posted comment to movie ' . $data['MovieID']);\n\n $message = 'Your comment has been added successfully.';\n $level = mvcSession::MESSAGE_OK;\n } catch (Exception $e) {\n systemLog::error($e->getMessage());\n $message = $e->getMessage();\n $level = mvcSession::MESSAGE_ERROR;\n }\n\n if ($this->getRequest()->isAjaxRequest()) {\n $oView = new videosView($this);\n $oView->sendJsonResult($message, $level);\n } else {\n $this->getRequest()->getSession()->setStatusMessage($message, $level);\n $this->redirect($this->buildUriPath(self::ACTION_EDIT, $this->getModel()->getMovieID()));\n }\n }","title":""},{"docid":"a3cbf14adf1d920e02ff148f78d749e9","score":"0.54762554","text":"public function actionView()\n\t{\n\t\t$post=$this->loadModel();\n\t\t$comment=$this->newComment($post);\n\t\tif (!Yii::app()->user->isGuest)\n\t\t{\n\t\t\t$comment->author = Yii::app()->user->user->fullname;\n\t\t\t$comment->email = Yii::app()->user->user->email;\n\t\t}\n\n\t\t$this->render('view',array(\n\t\t\t'model'=>$post,\n\t\t\t'comment'=>$comment,\n\t\t));\n\t}","title":""},{"docid":"96307efecb09e0df0f943baa1527c605","score":"0.54722184","text":"function bhp_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
      • \n\t\t

        ', '' ); ?>

        \n\t\n\t
      • id=\"li-comment-\">\n\t\t
        \" class=\"comment\">\n\t\t\t
        \n\t\t\t\t
        \n\t\t\t\t\tcomment_parent )\n\t\t\t\t\t\t\t$avatar_size = 39;\n\n\t\t\t\t\t\techo get_avatar( $comment, $avatar_size );\n\n\t\t\t\t\t\t/* translators: 1: comment author, 2: date and time */\n\t\t\t\t\t\tprintf( __( '%1$s on %2$s said:', 'bhp' ),\n\t\t\t\t\t\t\tsprintf( '%s', get_comment_author_link() ),\n\t\t\t\t\t\t\tsprintf( '',\n\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\tsprintf( __( '%1$s at %2$s', 'bhp' ), get_comment_date(), get_comment_time() )\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t?>\n\n\t\t\t\t\t', '' ); ?>\n\t\t\t\t
        \n\n\t\t\t\tcomment_approved == '0' ) : ?>\n\t\t\t\t\t\n\t\t\t\t\t
        \n\t\t\t\t\n\n\t\t\t
        \n\n\t\t\t
        \n\n\t\t\t
        \n\t\t\t\t __( 'Reply &darr;', 'bhp' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t\t
        \n\t\t
        \n\n\tcomment_ID);\n $time = get_comment_time();\n //$avatar = get_avatar($comment, 40);\n //$edit = get_edit_comment_link('Edit', '

        ', '

        ');\n //$reply = get_comment_reply_link();\n\n // Generate comment output\n $output = \"
      • \";\n $output .= \"

        $author on $date at $time

        \";\n if($comment->comment_approved) {\n $output .= apply_filters( 'comment_text', get_comment_text() );\n } else {\n $output .= '

        Your comment is awaiting moderation.

        ';\n }\n echo $output;\n\n}","title":""},{"docid":"bd63913138d68e1961dc81db55152989","score":"0.5454307","text":"function displayPost($ar=NULL) {\n $p=new XParam($ar, array());\n $tplentry=$p->get('tplentry');\n $oid=$p->get('oid');\n $post=$p->get('post');\n\n $r = $this->xset->display(array('tplentry'=>TZR_RETURN_DATA, 'oid'=>$oid));\n XShell::toScreen1($tplentry.'blog',$r);\n $r = $this->xset->display(array('tplentry'=>TZR_RETURN_DATA, 'oid'=>$post));\n if ($this->object_sec){\n $lang_data = XShell::getLangData();\n $oids = array($post);\n list($r['object_sec']) = $GLOBALS['XUSER']->getObjectsAccess($this, $lang_data, $oids);\n }\n XShell::toScreen1($tplentry.'post',$r);\n $right= $this->secure($oid, 'validatePost');\n if($right)\n $query=$this->xset->select_query(array('order'=>'datep ASC',\n\t\t\t\t\t 'cond'=>array('blog'=>array('=',$oid),\n\t\t\t\t\t\t\t 'paperup'=>array('=',$post),\n\t\t\t\t\t\t\t 'dtype'=>array('=','comment'))));\n else\n $query=$this->xset->select_query(array('order'=>'datep ASC',\n\t\t\t\t\t 'cond'=>array('blog'=>array('=',$oid),\n\t\t\t\t\t\t\t 'paperup'=>array('=',$post),\n\t\t\t\t\t\t\t 'PUBLISH'=>array('=',1),\n\t\t\t\t\t\t\t 'dtype'=>array('=','comment'))));\n\n $this->xset->browse(array('tplentry'=>$tplentry.'comment','select'=>$query, \n\t\t\t 'pagesize'=>100, 'selectedfields'=>'all'));\n $this->addComment(array('tplentry'=>$tplentry.'add'));\t\n\n $ar=array();\n $ar['select']=$this->xset->select_query(array('order'=>'datep DESC','cond'=>\n\t\t\t\t\t\t array('dtype'=>array('=','post'),\n\t\t\t\t\t\t\t'blog'=>array('=',$oid))));\n $ar['selectedfields']=array('datep','title');\n $ar['pagesize']=100;\n $ar['tplentry']=$tplentry.'posts';\n XModTable::browse($ar);\n // commentaires recents\n $ar=array();\n $ar['select']=$this->xset->select_query(array('order'=>'datep DESC','cond'=>\n\t\t\t\t\t\t array('dtype'=>array('=','comment'),'blog'=>array('=',$oid))));\n $ar['selectedfields']=array('datep','title','blog','paperup');\n $ar['pagesize']=10;\n $ar['tplentry']=$tplentry.'comments';\n XModTable::browse($ar);\n }","title":""},{"docid":"3f60062c3433c59884b3cb5d7b7e4b15","score":"0.5452976","text":"function bones_comments( $comment, $args, $depth ) {\n\t$GLOBALS['comment'] = $comment; ?>\n\t
        \" >\n\t\t
        \n\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\n\t\t\t\t?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"/library/images/nothing.gif\" />\n\t\t\t\t\n\t\t\t\t%1$s %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\n\t\t\t\t\n\n\t\t\t
        \n\t\t\tcomment_approved == '0') : ?>\n\t\t\t
        \n\t\t\t

        \n\t\t\t
        \n\t\t\t\n\t\t\t
        \n\t\t\t\t\n\t\t\t
        \n\t\t\t $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t
        \n\t is added by WordPress automatically ?>\ngetRequest()->getPost();\n $invitationstatus = $this->_initInvitationstatus();\n $session = Mage::getSingleton('core/session');\n if ($invitationstatus) {\n if ($invitationstatus->getAllowComments()) {\n if ((Mage::getSingleton('customer/session')->isLoggedIn() ||\n Mage::getStoreConfigFlag('tpl_eventsmanager/invitationstatus/allow_guest_comment'))) {\n $comment = Mage::getModel('tpl_eventsmanager/invitationstatus_comment')->setData($data);\n $validate = $comment->validate();\n if ($validate === true) {\n try {\n $comment->setInvitationstatusId($invitationstatus->getId())\n ->setStatus(Tpl_EventsManager_Model_Invitationstatus_Comment::STATUS_PENDING)\n ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())\n ->setStores(array(Mage::app()->getStore()->getId()))\n ->save();\n $session->addSuccess($this->__('Your comment has been accepted for moderation.'));\n } catch (Exception $e) {\n $session->setInvitationstatusCommentData($data);\n $session->addError($this->__('Unable to post the comment.'));\n }\n } else {\n $session->setInvitationstatusCommentData($data);\n if (is_array($validate)) {\n foreach ($validate as $errorMessage) {\n $session->addError($errorMessage);\n }\n } else {\n $session->addError($this->__('Unable to post the comment.'));\n }\n }\n } else {\n $session->addError($this->__('Guest comments are not allowed'));\n }\n } else {\n $session->addError($this->__('This invitation status does not allow comments'));\n }\n }\n $this->_redirectReferer();\n }","title":""},{"docid":"13af2257f06ea593cfe575a3a8c1f959","score":"0.54463565","text":"function renren_comment(&$comment, $op) {\n global $user;\n if (!is_array($comment)) {\n $comment = (array)$comment;\n }\n $comment_body = renren_clean_data($comment['comment']);\n $comment_subject = renren_clean_data($comment['subject']);\n \n if ($body_pattern = variable_get('renren_template_comment_body', '')) {\n $body = '{\"'.$body_pattern.'\" : \"'.$comment_body.'\"}';\n }\n\n if ($title_pattern = variable_get('renren_template_comment_title', '')) {\n $title = '{\"'.$title_pattern.'\" : \"'.$comment_subject.'\"}';\n }\n //$body = '{\"content\":\"'.$comment_body.'\"}';\n //$title = '{\"feedtype\":\"'.$comment_subject.'\"}';\n \n // if renren user logined\n $comment_author = renren_user_profile();\n if (isset($comment_author)) {\n global $RR_client;\n $result = $RR_client->POST('feed.publishTemplatizedAction', array(1, $title, $body));\n if ($result->result) {\n drupal_set_message('Successful share this comment on renren');\n }\n else {\n drupal_set_message('Renren Error: '.$result->error_msg);\n drupal_set_message('Renren Error Code: '.$result->error_code);\n }\n }\n}","title":""},{"docid":"a430148b5799fe518c7951eac51dfa26","score":"0.5435875","text":"function comments_template() {\n\tglobal $bj,$entries,$entry,$comments,$comment;\r\n\tif(is_entry()) {\n\t\tforeach ($entries as $entry) {\n\t\t\t$comments = get_comments('postid='.get_entry_ID());\n\t\t\tif(file_exists(BJPATH . 'content/skins/' . current_skinname() . '/comments.php'))\r\n\t\t\t\tinclude(BJPATH . 'content/skins/' . current_skinname() . '/comments.php');\n\t\t}\n\t}\n}","title":""},{"docid":"887fbdc58f700daeabdb3281c3c1f75c","score":"0.54284525","text":"function buggm_format_ticket_comment( $comment, $args, $depth ) {\t\n\t$GLOBALS[ 'comment' ] = $comment;\n\t\n $updates =buggm_get_ticket_changes(get_comment_ID());\n\t\t\n\t$i = 0;\n ?>\n\t
      • id=\"comment-\"> \n\t\t\">\n\t\t
        \n\t\t\t\n user_id); ?>\">\n user_id, 24);?> \n user_id);?>\n \n \n %s ', 'buggm' ), buggm_time_since( get_comment_time( 'U' ),current_time( 'timestamp' ) )); ?>\n\t\t
        \n
        \n\t\t
        \n\t\t\n\t\t\t
        \n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
          \n\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\n\t\t\t\t\n\t\t\t\t\n\t\t\t
        \n\t\t\t\n\t\t
        \n\n \t
        >\n\t \t
        \">\n\t \t\t\n\t\t
        \n\t\t \n \t\t
        \n \t\t \n\t\t\t\t
        \">\n\t\t \t\t
        \n\t\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\n\t\t\t \t
        \n\t\t\t\t \t\n\t\t\t\t \t\n\t
        \n\t
        \n\t\t\t\t\t\t
        $depth, 'max_depth' => $args['max_depth'], 'add_below' => 'comment-content', 'reply_text' => '' . __('Reply', 'romangie')))) ?>
        \n\n\t \n\t\t \t\t
        \n\n\t\t\t\t\t\n\t\t\t \t
        \n\t\t\t
        \n\n\t\t\t\n\t\t
        \n\t\t \n\t\t
        \n \t\t \n\t\t \tcomment_approved == '0') : ?>\n\t\t\t\t\t
        \n\t\t\t\t\n\t\t \t
        \">\n\t\t\t\t\t\n\t\t\t\t
        \n\t\t
        \n\t\t
        \n\t
        \n\tget_request_method() == \"POST\" ) {\n $data = json_decode( file_get_contents('php://input'), true );\n if ( !$this->authenticate( $data ) ){\n $this->response( \"unauthorized access\", 400 );\n }\n\n // write the comment to the database\n $comment = $data['data'];\n $post_id = $comment['post_id'];\n $comment_m = $comment['comment'];\n $user_id = $this->user['user_id'];\n $query = \"INSERT INTO comment( post_id, comment, user_id ) VALUES( $post_id, '$comment_m', $user_id)\";\n mysqli_query( $this->db, $query );\n $this->response( $this->json( $comment ), 200 );\n }\n else if ( $this->get_request_method() == \"GET\" ) {\n $post_id = $_REQUEST['post_id'];\n if ( !$post_id ) {\n $post_id = \"*\";\n }\n $query = \"SELECT * FROM comment WHERE post_id = $post_id\";\n $result = $this->convertMysqlToArray( mysqli_query( $this->db, $query ) );\n $this->response( $this->json( $result ), 200 );\n }\n }","title":""},{"docid":"1cb3926c5b5ee118b08319c87dac2ca2","score":"0.5417217","text":"public function showComment()\n\t{\n\t\t /* $comments = Article::find(1)->comment;\n \n foreach($comments as $comment){\n print_r($comment->detail_comment.\"
        \");\n }\n */\n return View::make('showComment');\n\t}","title":""},{"docid":"a0c527049d1772bf42d3cb8aa0c4a242","score":"0.5409652","text":"public function show(BlogComment $blogComment)\n {\n //\n }","title":""},{"docid":"ba215564fc57f212936f7ef3860762af","score":"0.54088104","text":"public function comment_attachment()\n {\n global $post;\n global $PeepSoActivityDidInit;\n\n if(!isset($PeepSoActivityDidInit)) {\n $PeepSoActivityDidInit = TRUE;\n $this->init();\n }\n\n // let other add-ons have a chance to attach content to the comment\n do_action('peepso_activity_comment_attachment', $post, $post->ID, $post->act_module_id);\n }","title":""},{"docid":"78181968bc5db325f5119742bf6abf40","score":"0.54039353","text":"public function post($comments)\n {\n\n $addOne = $this->db->prepare(\n 'INSERT INTO comments (content, createdAt, entryID)\n VALUES (:content, :createdAt, :entryID)');\n\n date_default_timezone_set('Europe/Stockholm');\n $date = date(\"Y-m-d H:i:s\");\n\n $addOne->execute([\n ':content' => $comments['content'],\n ':createdAt' => $date,\n ':entryID' => $comments['entryID']\n ]);\n }","title":""},{"docid":"83c8f258943d080e1f3011860e623344","score":"0.53998333","text":"protected function html5_comment( $comment, $depth, $args ) {\r\n $this->comment_count++;\r\n\r\n $tag = ( 'div' === $args['style'] ) ? 'div' : 'li';\r\n\r\n $commenter = wp_get_current_commenter();\r\n $show_pending_links = ! empty( $commenter['comment_author'] );\r\n\r\n if ( $commenter['comment_author_email'] ) {\r\n $moderation_note = __( 'Your comment is awaiting moderation.' );\r\n } else {\r\n $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.' );\r\n }\r\n ?>\r\n < id=\"comment-\" has_children ? 'parent' : '', $comment ); ?>>\r\n
        \" class=\"comment-body py-8 flex flex-wrap md:flex-no-wrap comment_count == 1 ? \"\" : \"border-t-2 border-gray-200 \"; ?>\">\r\n
        1 ? \"ml-16\" : \"\" ?>\">\r\n
        \r\n
        \r\n \r\n
        \r\n comment_approved && ! $show_pending_links ) {\r\n $comment_author = get_comment_author( $comment );\r\n }\r\n\r\n printf(\r\n /* translators: %s: Comment author link. */\r\n __( '%s says:' ),\r\n sprintf( '%s', $comment_author )\r\n );\r\n ?>\r\n
        \r\n
        \r\n\r\n \r\n\r\n comment_approved ) : ?>\r\n \r\n \r\n
        \r\n
        \r\n
        \r\n
        \r\n 'leading-relaxed'));\r\n// comment_text();\r\n ?>\r\n\r\n \r\n \r\n \r\n ',__( 'Edit' )),\r\n '', '' ); ?>\r\n comment_approved || $show_pending_links ) {\r\n comment_reply_link(\r\n array_merge(\r\n $args,\r\n array(\r\n 'add_below' => 'div-comment',\r\n 'depth' => $depth,\r\n 'max_depth' => $args['max_depth'],\r\n 'before' => '
        ',\r\n 'after' => '
        ',\r\n 'reply_text' => sprintf('%s ', __( 'Reply' )),\r\n /* translators: Comment reply button text. %s: Comment author name. */\r\n 'reply_to_text' => sprintf('%s ', __( 'Reply to %s' )),\r\n 'login_text' => sprintf('%s ', __( 'Log in to Reply' ))\r\n )\r\n )\r\n );\r\n }\r\n ?>\r\n
        \r\n
        \r\n\r\n\r\n\r\n
        \r\n getValue(\"comment_title\") === \"disabled\")? false: $title;\n\n // Prepare User Data\n $login = is_a($login, \"Login\")? $login: new Login();\n if($login->isLogged()){\n $user = new User($login->username());\n $user = array($user->username(), md5($user->tokenAuth()), $user->nickname());\n }\n\n // Render Form\n ?>
        allowComments()){\n print($this->renderTheme(\"form\", array($user, $mail, $title, $comment)));\n } else {\n ?>\n
        \n The comment section on this page has been disabled by the author!\n
        \n
        getValue(\"frontend_per_page\");\n $count = $comments->count(\"approved\", $page->key());\n $max = ceil($count / $limit);\n if(isset($_GET[\"cpage\"]) && $_GET[\"cpage\"] > 1){\n $num = ($_GET[\"cpage\"] < $max)? $_GET[\"cpage\"]: $max;\n } else {\n $num = 1;\n }\n $list = $comments->getList($num, $limit, \"approved\", $page->key());\n\n // Render Comment List\n ?>
        allowComments()){\n ?>\n
        \n Currently there are no comments, so be the first!\n
        \n $limit){\n print($this->renderTheme(\"pagination\", array(\"top\", $num, $limit, $count)));\n }\n foreach($list AS $key){\n $comment = new Comment($key);\n print($this->renderTheme(\"comment\", array($comment, $key)));\n }\n if($count > $limit){\n print($this->renderTheme(\"pagination\", array(\"bottom\", $num, $limit, $count)));\n }\n }\n ?>
        save();\n return $this->renderSingle($id);\n }","title":""},{"docid":"c3584e2c44d7fcd904c6754b380ff264","score":"0.5381761","text":"public function render()\n {\n return view('components.comment');\n }","title":""},{"docid":"c3584e2c44d7fcd904c6754b380ff264","score":"0.5381761","text":"public function render()\n {\n return view('components.comment');\n }","title":""},{"docid":"68b70ff71b1293f78695aac4e806a4c5","score":"0.5378006","text":"function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) {\n\t\t$depth++;\n\t\t$GLOBALS['comment_depth'] = $depth;\n\t\t$GLOBALS['comment'] = $comment;\n\t\t$parent_class = ( empty( $args['has_children'] ) ? '' : 'parent' ); \n\n\t\tif ( 'article' == $args['style'] ) {\n\t\t\t$tag = 'article';\n\t\t\t$add_below = 'comment';\n\t\t} else {\n\t\t\t$tag = 'article';\n\t\t\t$add_below = 'comment';\n\t\t} ?>\n\n\t\t
        id=\"comment-\" itemprop=\"comment\" itemscope itemtype=\"http://schema.org/Comment\">\n\t\t\t
        \n\t\t\t\t
        \n\t\t\t\t
        \n\t\t\t\t\t
        \n\t\t\t\t\t\n\t\t\t\t\t
        \n\t\t\t\t\t\t\n\t\t\t\t\t
        \n\t\t\t\t\tcomment_approved == '0') :\n\t\t\t\t\t\techo __('Your comment is awaiting moderation.', 'easydita_knowledge_portal');\n\t\t\t\t\tendif; ?>\n\t\t\t\t
        \n\t\t\t
        \n\t\t\t
        \n\t\t\t\t\n\t\t\t\t
        \n\t\t\t\t\t\n\t\t\t\t\t $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t\t\t
        \n\t\t\t
        \n\n\tget('oid');\n $ar['paperup']=$p->get('post');\n $ar['datep']=date('Y-m-d H:i:s');\n if(!XUser::isNobody()) {\n $ar['whoa'] = XUser::get_current_user_uid();\n }\n parent::procInsert($ar);\n }","title":""},{"docid":"487381a5d439f3d5fc6f29e360484278","score":"0.53750205","text":"function gothic_comment($comment, $args, $depth) {\n$GLOBALS['comment'] = $comment; ?>\n
        \n\t
        \n\t\t
        \n\t
        \n\t
        \n\t\n\t
        \n\tcomment_ID ) ) ?>\">\n\t\n
        \n
        \n\t
        \">\n\t
        \n\tcomment_approved == '0') : ?>\n\t\t

        \n\t\t
        \n\t\n\t\t\n\t
        \n\t
        \n\t\t $depth, 'max_depth' => $args['max_depth']))) ?>\n\t
        \n
        \nstreams->entries->get_entry($comment_id, 'comments', 'streams');\n \tif($comment->created_by == $this->current_user->id){\t\n \t\t$deleted = $this->streams->entries->delete_entry($comment_id, 'comments', 'streams');\n \t\tif($deleted){\n \t\t\t$this->discuss->decrease_counter($comment->thread, $this->thread_table, 'total_komentar');\n\t \t\tif(!$for_ajax)\n\t\t \t\tredirect(getenv('HTTP_REFERER'));\n \t\t\techo $deleted;\t\n \t\t}\n \t}\n }","title":""},{"docid":"34752c7763991ff1949e3f7e6e2004a7","score":"0.5359972","text":"public function deleteComment ()\n {\n $idPost = $this->request->getSetting( 'idComment' );\n $this->post->deleteComment( $idPost );\n $this->redirect( 'Admin' , 'allComments/' );\n }","title":""},{"docid":"c8888098a63d16cd9d8d66fa60d783df","score":"0.5354615","text":"function snowproblem_comment($comment, $args, $depth) {\n\t$GLOBALS['comment'] = $comment;\n\textract($args, EXTR_SKIP);\n?>\n\t
        \n\t
        id=\"comment-\">\n\t\t\n\t\t\t
        \n\t\t\t\t\n\t\t\t
        \n\t\t\n\n\t\t
        \n\t\t\t\n\t\t\t\t%s' ), get_comment_author_link() ); ?>\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
        \n\n\t\t
        \n\t\t\t\n\t\t
        \n\n\t\t
        \n\t\t\t $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\n\t\t
        \n\n\t
        \nforcePostRequest();\n\n $json = array();\n $json['success'] = false; // default\n\n $id = (int) Yii::app()->request->getParam('id', \"\");\n $className = Yii::app()->request->getParam('className', \"\");\n\n $object = Content::Get($className, $id);\n if ($object != null && $object->content->canArchive()) {\n $object->content->archive();\n\n $json['success'] = true;\n $json['wallEntryIds'] = $object->content->getWallEntryIds();\n }\n\n // returns JSON\n echo CJSON::encode($json);\n Yii::app()->end();\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"4482aae5f22c8502a7ab23ce997b3ac4","score":"0.53401566","text":"public function show(Comment $comment)\n {\n //\n }","title":""},{"docid":"9c33f33c38f9ab537856c4c680b7e85b","score":"0.5336853","text":"function cera_comment( $comment, $args, $depth ) {\n\t\t// @codingStandardsIgnoreLine\n\t\t$GLOBALS['comment'] = $comment;\n\n\t\tif ( 'pingback' === $comment->comment_type || 'trackback' === $comment->comment_type ) : ?>\n\n\t\t\t
      • \" >\n\n\t\t\t\t
        \n\t\t\t\t\t
        \n\t\t\t\t\t
        \n\t\t\t\t
        \n\n\t\t\t
      • \n\n\t\t\t\n\n\t\t
      • \" >\n\n\t\t\t
        \" class=\"comment-main comment-main- row ml-0 mr-0 mb-md-0 mb-4 mt-0\">\n\n\t\t\t\t
        \n\t\t\t\t\t\n\t\t\t\t
        \n\n\t\t\t\t
        \n\n\t\t\t\t\t
        \n\n\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
        \n\n\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tcomment_approved ) : ?>\n\t\t\t\t\t\t\t\t

        \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t
        \n\n\t\t\t\t\t\t
        \n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t 'div-comment',\n\t\t\t\t\t\t\t\t'depth' => $depth,\n\t\t\t\t\t\t\t\t'max_depth' => $args['max_depth'],\n\t\t\t\t\t\t\t\t'before' => '',\n\t\t\t\t\t\t\t\t'after' => '',\n\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\tcomment_reply_link( $args ); ?>\n\n\t\t\t\t\t\t\t', '' ); ?>\n\n\t\t\t\t\t\t
        \n\n\t\t\t\t\t
        \n\n\t\t\t\t
        \n\n\t\t\t
        \n\n\t\t\t\n\t\t\tsetPostID($_POST['postID']);\n\t$manager = new CommentManager();\n\t$try = $manager->addComment($comment);\n\theader(\"location:\". $_SERVER['HTTP_REFERER']);\n}","title":""},{"docid":"2fa4b26405cca6183a5db90d5584afb1","score":"0.53280896","text":"function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n\t
      • >\n\t\t
        \" class=\"clearfix\">\n\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\n\t\t\t\t?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"/library/images/nothing.gif\" />\n\t\t\t\t\n\t\t\t\t%s', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t\n\t\t\t\t\n\t\t\t
        \n\t\t\tcomment_approved == '0') : ?>\n\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\t\n\t\t\t
        \n\t\t\t $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t
        \n\t is added by WordPress automatically ?>\n\n\t
      • >\n\t\t
        \" class=\"clearfix\">\n\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\n\t\t\t\t?s=32\" class=\"load-gravatar avatar avatar-48 photo\" height=\"32\" width=\"32\" src=\"/library/images/nothing.gif\" />\n\t\t\t\t\n\t\t\t\t%s', 'bonestheme' ), get_comment_author_link()) ?>\n\t\t\t\t\n\t\t\t\t\n\t\t\t
        \n\t\t\tcomment_approved == '0') : ?>\n\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\t\n\t\t\t
        \n\t\t\t $depth, 'max_depth' => $args['max_depth']))) ?>\n\t\t
        \n\t is added by WordPress automatically ?>\ncomment_type ) :\n\t\tcase 'pingback' :\n\t\tcase 'trackback' :\n\t\t// Display trackbacks differently than normal comments.\n\t\t?>\n\t\t
        \" >\n\t\t\t
        \n\t\t\t\t
        \n\t\t\t\t\t
        \n\t\t\t\t\t
        \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\t
        \n\t\t\t\t\t
        \n\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t%1$s %2$s :',\n\t\t\t\t\t\t\t\t\tget_comment_author_link(),\n\t\t\t\t\t\t\t\t\t// If current post author is also comment author, make it known visually.\n\t\t\t\t\t\t\t\t\t( $comment->user_id === $post->post_author ) ? '' . __( 'Post author', 'twentytwelve' ) . '' : ''\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tprintf( '',\n\t\t\t\t\t\t\t\t\tesc_url( get_comment_link( $comment->comment_ID ) ),\n\t\t\t\t\t\t\t\t\tget_comment_time( 'c' ),\n\t\t\t\t\t\t\t\t\t/* translators: 1: date, 2: time */\n\t\t\t\t\t\t\t\t\tsprintf( __( '%1$s %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\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
        \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\t
        \n\t\t\t\t\t\t\t
        \" class=\"comment\">\n\t\t\t\t\t\t\t\tcomment_approved ) : ?>\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\n\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\t\t\t\t
        \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t
        \n\t\t\t\t\t\t\t\t\t __( 'Répondre', 'artscore_studio' ), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\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
        \n\t\t\t\n\t\t\tdbConnect();\n $req = $db->prepare('INSERT INTO comment(post_id, author, comment, comment_date) VALUES(:post_id, :author, :comment, NOW())');\n $comments = $req->execute(array(\n 'post_id' => $_GET['id'],\n 'author' => $comment->getAuthor(),\n 'comment' => $comment->getComments()\n ));\n } catch (\\PDOException $exception) {\n var_dump($db->errorInfo());\n die('Erreur : ' . $exception->getMessage());\n }\n\n return $comments;\n }","title":""},{"docid":"c65da1e7d89cf30047af0adcc6422c37","score":"0.53166723","text":"function vieddwCommentAction() {\n // Traitement des parametres\n $id_request_comment = $this->_request->getParam('id_request_comment');\n\n Zend_Loader::loadClass('Request');\n $information = Request::viewComment($id_request_comment);\n \n $this->view->information = $information;\n $this->view->comment = str_replace(\"\\'\", \"'\", $information->comment);\n \n $this->view->request = Request::getSummary($information->id_request);\n \n Zend_Loader::loadClass('User');\n $this->view->user = User::getCompleteName($information->id_user);\n\n // Variables\n $id_request = $information->id_request;\n \n // Requete\n if ($this->_request->isPost()) {\n // Traitement des variables POST\n Zend_Loader::loadClass('Zend_Filter_StripTags');\n $f = new Zend_Filter_StripTags();\n $comment = $f->filter($this->_request->getPost('comment'));\n \n // Verification avant enregistrement\n Zend_Loader::loadClass('Zend_Validate');\n \n $error = '';\n \n Zend_Loader::loadClass('Zend_Validate_NotEmpty');\n $validator = new Zend_Validate_NotEmpty();\n if (!$validator->isValid($comment)) {\n $error .= 'Veuillez indiquer un commentaire
        ';\n }\n \n // Enregistrement\n if ($error) {\n $this->view->error = $error;\n } else {\n // Enregistrement\n Zend_Loader::loadClass('Request');\n Request::updateComment($id_request_comment, $comment);\n\n // Redirection\n $this->_redirect($this->baseUrl.'/request/view/'.$id_request);\n }\n }\n \n\n }","title":""},{"docid":"39a7e45195d8b02fe515113496b38eb7","score":"0.5311658","text":"private function AddComment()\n\t{\n\t\tglobal $DB;\n\t\t$arNotification = $this->Notify->getNotification();\n\n\t\t$arLog = CSocNetLog::GetList(\n\t\t\tarray(\"ID\" => \"DESC\"),\n\t\t\tarray(\n\t\t\t\t\"ENTITY_TYPE\" => SONET_ENTITY_USER,\n\t\t\t\t\"EVENT_ID\" => \"idea\",\n\t\t\t\t\"SOURCE_ID\" => $arNotification[\"POST_ID\"]),\n\t\t\tfalse,\n\t\t\tfalse,\n\t\t\tarray(\"ID\", \"RATING_ENTITY_ID\")\n\t\t)->Fetch();\n\n\t\tif($arLog)\n\t\t{\n\t\t\t$arNotify = Array(\n\t\t\t\t\"EVENT_ID\" => \"idea_comment\",\n\t\t\t\t\"URL\" => $arNotification[\"PATH\"],\n\t\t\t\t\"MESSAGE\" => $arNotification[\"POST_TEXT\"],\n\t\t\t\t\"SOURCE_ID\" => $arNotification[\"ID\"],\n\t\t\t\t\"ENTITY_TYPE\" => SONET_ENTITY_USER,\n\t\t\t\t\"ENTITY_ID\" => $arNotification[\"AUTHOR_ID\"],\n\t\t\t\t\"USER_ID\" => $arNotification[\"AUTHOR_ID\"],\n\t\t\t\t\"MODULE_ID\" => 'idea',\n\t\t\t\t\"LOG_ID\" => $arLog[\"ID\"],\n\t\t\t);\n\n\t\t\tif (isset($arNotification[\"LOG_DATE\"]))\n\t\t\t{\n\t\t\t\t$arNotify[\"LOG_DATE\"] = $arNotification[\"LOG_DATE\"];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$arNotify[\"=LOG_DATE\"] = $DB->CurrentTimeFunction();\n\t\t\t}\n\n\t\t\tif($arLog[\"RATING_ENTITY_ID\"]>0)\n\t\t\t{\n\t\t\t\t$arNotify[\"RATING_ENTITY_ID\"] = $arNotification[\"ID\"];\n\t\t\t\t$arNotify[\"RATING_TYPE_ID\"] = \"BLOG_COMMENT\";\n\t\t\t}\n\n\t\t\tif($arNotification[\"ACTION\"] == \"ADD\")\n\t\t\t{\n\t\t\t\t$LogCommentID = CSocNetLogComments::Add($arNotify, false, false);\n\t\t\t\tCSocNetLog::CounterIncrement($LogCommentID, false, false, \"LC\");\n\t\t\t}\n\t\t\telseif($arNotification[\"ACTION\"] == \"UPDATE\")\n\t\t\t{\n\t\t\t\t$arLogComment = CSocNetLogComments::GetList(\n\t\t\t\t\tarray(\"ID\" => \"DESC\"),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\"ENTITY_TYPE\" => SONET_ENTITY_USER,\n\t\t\t\t\t\t\"EVENT_ID\" => \"idea_comment\",\n\t\t\t\t\t\t\"SOURCE_ID\" => $arNotification[\"ID\"]),\n\t\t\t\t\tfalse,\n\t\t\t\t\tfalse,\n\t\t\t\t\tarray(\"ID\")\n\t\t\t\t)->Fetch();\n\n\t\t\t\tif($arLogComment)\n\t\t\t\t{\n\t\t\t\t\tunset($arNotify[\"USER_ID\"]);\n\t\t\t\t\t$LogCommentID = CSocNetLogComments::Update($arLogComment[\"ID\"], $arNotify);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $LogCommentID>0;\n\t}","title":""},{"docid":"d6ee0b5e5f6d5b9fd575809d6a8029cd","score":"0.5304038","text":"function bones_comments( $comment, $args, $depth ) {\n $GLOBALS['comment'] = $comment; ?>\n
        \" >\n
        \n
        \n ' );\n */\n ?>\n \n \n ?s=40\" class=\"load-gravatar avatar avatar-48 photo\" height=\"40\" width=\"40\" src=\"/library/images/nothing.gif\" />\n \n %1$s %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\n \n\n
        \n comment_approved == '0') : ?>\n
        \n

        \n
        \n \n
        \n \n
        \n $depth, 'max_depth' => $args['max_depth']))) ?>\n
        \n is added by WordPress automatically ?>\npostComment($postId, $author, $comment);\r\n\r\n if ($affectedLines === false) {\r\n throw new Exception('Impossible d\\'ajouter le commentaire !');\r\n } else {\r\n header('Location: ' .$GLOBALS['nomDeDomaine']. '?url=post&id=' . $postId);\r\n }\r\n}","title":""},{"docid":"0a669856bc1e76200058a253d16e1bdb","score":"0.5299247","text":"function sumerian_comment( $comment, $args, $depth ) {\n switch ( $comment->comment_type ) :\n case 'pingback' :\n case 'trackback' :\n // Display trackbacks differently than normal comments.\n ?>\n
      • id=\"comment-\">\n

        ', '' ); ?>

        \n \n
      • id=\"li-comment-\">\n
        \" class=\"comment clearfix\">\n\n \n\n
        \n\n
        \n %1$s %2$s',\n get_comment_author_link(),\n // If current post author is also comment author, make it known visually.\n ( $comment->user_id === $post->post_author ) ? '' . __( 'Post author', 'sumerian' ) . '' : ''\n );\n printf( '',\n esc_url( get_comment_link( $comment->comment_ID ) ),\n get_comment_time( 'c' ),\n /* translators: 1: date, 2: time */\n get_comment_date()\n );\n comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'sumerian' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );\n edit_comment_link( __( 'Edit', 'sumerian' ), '', '' );\n ?>\n
        \n\n comment_approved ) : ?>\n

        \n \n\n
        \n \n \n
        \n\n
        \n\n
        \n di->get(\"page\");\n $request = $this->di->get(\"request\");\n $session = $this->di->get(\"session\");\n $response = $this->di->get(\"response\");\n\n $question = new Question();\n $question->setDb($this->di->get(\"dbqb\"));\n\n $id = $request->getGet(\"id\", null);\n $question = $question->getSingleQById($id);\n\n $login = $session->get(\"login\");\n if ($login) {\n $form = new CreateCommentForm($this->di);\n $form->check();\n\n $page->add(\"questions/singleqoraforcomment\", [\n \"newComment\" => $form->getHTML(),\n \"question\" => $question,\n ]);\n\n return $page->render([\n \"title\" => \"New comment\",\n ]);\n }\n //If not logged in, return to Q\n return $response->redirect(\"q/showq?id=$id\");\n }","title":""}],"string":"[\n {\n \"docid\": \"5f76ae3d5b9948a113f2d5023eb6d6c3\",\n \"score\": \"0.61477387\",\n \"text\": \"public function comment()\\n { \\n\\n $author = $this->ctrlRequest->requestGetParam(\\\"author\\\");\\n $content = $this->ctrlRequest->requestGetParam(\\\"content\\\");\\n $idPost = $this->ctrlRequest->requestGetParam(\\\"idpost\\\");\\n\\n //Data saving\\n $this->modelComment->addComment($author, $content, $idPost);\\n\\n //Updating of the view\\n $this->ctrlExecuteAction(\\\"index\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2e141df105cfa2b949413d3c0e15861\",\n \"score\": \"0.6112625\",\n \"text\": \"public function comment()\\n {\\n $data = array(\\n 'aid' => $_POST['articleid'],\\n 'time' => time(),\\n 'username' => $_POST['username'],\\n 'content' => $_POST['comment']\\n );\\n\\n $result = M('comments')->data($data)->add(); //add the comment into the table\\n\\n M('articles')->where('id='.$_POST['articleid'])->setInc('reply',1); // add the reply numbers;\\n \\n $str = ''; //return the ajax string\\n if ($result) \\n {\\n $str .='
        ';\\n $str .='
        ';\\n $str .='
        ';\\n $str .='
      • ';\\n $str .='
        ';\\n $str .='';\\n $str .=$_POST['username'];\\n $str .='';\\n $str .='';\\n $str .='•'.formatTime(time() - 1);\\n $str .='
        ';\\n $str .='
        ';\\n $str .='
        ';\\n $str .=$_POST['comment'];\\n $str .='
        ';\\n\\n echo $str;\\n }\\n else\\n {\\n echo 'false';\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"322d735bb25cb1c716635be188cbbc54\",\n \"score\": \"0.607771\",\n \"text\": \"public function commentSubmit()\\n {\\n $PostRepository = new PostRepository();\\n $CommentRepository = new CommentRepository();\\n $post = $PostRepository->getPosts($_GET['params']);\\n if (isset($_GET['commentSubmit'])) {\\n if (strlen($_POST['comment-username']) <= 2) {\\n $Notif = 'username';\\n } elseif (strlen($_POST['comment-content']) <= 2) {\\n $Notif = 'content';\\n } else {\\n $allowedTags='

        ';\\n $allowedTags.='

          • ';\\n $sHeader = strip_tags(stripslashes($_POST['comment-username']));\\n $sContent = strip_tags(stripslashes($_POST['comment-content']), $allowedTags);\\n $commentToSubmit = new Comment(\\n null,\\n htmlspecialchars($_POST['comment-username']),\\n htmlspecialchars($_POST['comment-content']),\\n null,\\n $post->getId()\\n );\\n $_POST = array();\\n $CommentRepository->submitComment($commentToSubmit);\\n }\\n } else {\\n die($this->error('500'));\\n }\\n header('Location: ?p=post.single&params='.$_GET['params'].'&notif='.$Notif.'#commentbox');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c52a74e1db2c136c55b76ecbadbc74cd\",\n \"score\": \"0.60363555\",\n \"text\": \"function comment()\\n{\\n $modelManager = new ModelBackend();\\n $comment = $modelManager->getComments($_GET['id']);\\n $post = $modelManager->getPost($_GET['id']);\\n require('adminViews/comment.php');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"451ffc2548aecc6915b246a843193699\",\n \"score\": \"0.60104185\",\n \"text\": \"function comments()\\n{\\n $modelManager = new ModelBackend();\\n $post = $modelManager->getPosts();\\n require('adminViews/comments.php');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a03dbf476217bf1c2406bd99f1510620\",\n \"score\": \"0.5924464\",\n \"text\": \"public function commentsFeedAction()\\n\\t{\\n\\t\\t$this->getResponse()\\n\\t\\t\\t->setHeader('Content-Type', 'text/xml; charset=UTF-8')\\n\\t\\t\\t->setBody(\\n\\t\\t\\t\\t$this->getLayout()->createBlock('wordpress/feed_post_comment')\\n\\t\\t\\t\\t\\t->setSource(Mage::registry('wordpress_post'))\\n\\t\\t\\t\\t\\t->setFeedType($this->getRequest()->getParam('feed', 'rss2'))\\n\\t\\t\\t\\t\\t->toHtml()\\n\\t\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"167cca6cd08ec9b67cc9a302b8fecea8\",\n \"score\": \"0.5890786\",\n \"text\": \"public function posts(int $id)\\n {\\n// $output = ['posts' => $this->model->getPostComment($id), 'count' => $this->model->getCountComment($id)];\\n//$array = $this->model->getPostComment(1);\\n// var_dump($this->model->renderAllComment($array));\\n\\n $this->view->generate('article-view.php', 'templateView.php', $this->model->getPostId($id), $this->model->commentView($this->model->getPostComment($id)));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdfdfc2a529eb50613ec438edca40b50\",\n \"score\": \"0.58784777\",\n \"text\": \"function postWithComments() {\\n \\n $this->viewData['post'] = PostModel::create()->selectPostByPostId($_GET['postId']);\\n $this->viewData['comments'] = PostModel::create()->selectComments( $_GET['postId'] );\\n // Render the action with template\\n $this->render('post/postWithComments');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"098f68332bcdfb09267ac994477dc8b5\",\n \"score\": \"0.58387625\",\n \"text\": \"function bimber_render_entry_comments_link() {\\n\\techo bimber_capture_entry_comments_link();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f437d549756de7e21463c549472e949d\",\n \"score\": \"0.5799368\",\n \"text\": \"public function run() {\\n\\t\\t//First check if the user just submitted a comment\\n\\t\\t//by asking our view.\\n\\t\\tif($this->postView->isCommentSubmit()) {\\n\\t\\t\\ttry {\\n\\t\\t\\t\\t//Get the comment-\\n\\t\\t\\t\\t$comment = $this->commentView->getComment();\\n\\n\\t\\t\\t\\t//Save the comment to the system.\\n\\t\\t\\t\\t$this->commentModel->saveComment($comment);\\n\\t\\t\\t}\\n\\n\\t\\t\\tcatch(\\\\Exception $e) {\\n\\t\\t\\t\\t//If something goes wrong with creating\\n\\t\\t\\t\\t//a comment object we need to show the user\\n\\t\\t\\t\\t//some kind of error message.\\n\\t\\t\\t\\t$this->postView->newCommentFailed($this->commentView);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t//Then we try to retrieve our post.\\n\\t\\ttry {\\n\\t\\t\\t//PostID.\\n\\t\\t\\t$id = $this->postView->getPostId();\\n\\n\\t\\t\\t//Get the post from our system.\\n\\t\\t\\t$this->post = $this->postModel->getPost($id);\\n\\n\\t\\t\\t//Get the comments aswell.\\n\\t\\t\\t$this->comments = $this->commentModel->getComments($this->post);\\n\\t\\t}\\n\\n\\t\\tcatch(\\\\Exception $e) {\\n\\t\\t\\t$this->appView->redirectToFrontPage();\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef62bb9e17b0f88d7ddcb1c8c57e322a\",\n \"score\": \"0.5795941\",\n \"text\": \"public function getCommentView()\\n {\\n $title = \\\"H&G - Comment view\\\";\\n $view = $this->di->get(\\\"view\\\");\\n $pageRender = $this->di->get(\\\"pageRender\\\");\\n $comment = new Comment();\\n $comment->setDb($this->di->get(\\\"db\\\"));\\n $reply = new Reply();\\n $reply->setDb($this->di->get(\\\"db\\\"));\\n\\n $data = [\\n \\\"items\\\" => $comment->findAll(),\\n \\\"replies\\\" => $reply->findAll(),\\n ];\\n\\n $view->add(\\\"comments/comment-view\\\", $data);\\n\\n $pageRender->renderPage([\\\"title\\\" => $title]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2d648b49705c669776fa9b24583c7cb\",\n \"score\": \"0.5781956\",\n \"text\": \"public function show_comment()\\n {\\n PeepSoTemplate::exec_template('activity', 'comment', $this->comment_data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b55262b3d34a9b44323cc3a18e29948\",\n \"score\": \"0.5756396\",\n \"text\": \"public function post_edit_comment() {\\n\\t\\t$idComment = static::find(Input::get('id'));\\n\\t\\tif(!$idComment) { return false; }\\n\\n\\t\\t$Avant = \\\\DB::table('projects_issues_comments')->where('id', '=', Input::get('id'))->first(array('id', 'project_id', 'issue_id', 'comment', 'created_at'));\\n\\t\\t$Avant->comment = str_replace(\\\"`\\\", \\\"'\\\", $Avant->comment );\\n\\t\\t$Avant->comment = str_replace(\\\"
          • \\\", \\\"&nbsp;&nbsp;&nbsp;-&nbsp;\\\", $Avant->comment );\\n\\t\\t$Avant->comment = str_replace(\\\"
          • \\\", \\\"
            \\\", $Avant->comment );\\n\\t\\t$Avant->comment = str_replace(\\\"
              \\\", \\\"
              \\\", $Avant->comment );\\n\\t\\t$Avant->comment = str_replace(\\\"
            \\\", \\\"
            \\\", $Avant->comment );\\n\\t\\t$Avant->comment = str_replace(\\\"
              \\\", \\\"
              \\\", $Avant->comment );\\n\\t\\t$Avant->comment = str_replace(\\\"
            \\\", \\\"
            \\\", $Avant->comment );\\n\\n\\t\\t\\\\User\\\\Activity::add(12, $Avant->project_id, $Avant->issue_id, Input::get('id'), $Avant->comment, $Avant->created_at, NULL);\\n\\t\\t\\\\DB::table('projects_issues_comments')->where('id', '=', Input::get('id'))->update(array('comment' => Input::get('body'), 'updated_at' => date(\\\"Y-m-d H:i:s\\\")));\\n\\n\\t\\treturn Redirect::to(Project\\\\Issue::current()->to())\\n\\t\\t\\t->with('notice', __('tinyissue.comment_edited'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a3d252075c10c0eddf07b155622e7e6\",\n \"score\": \"0.5753428\",\n \"text\": \"function presscore_comment( $comment, $args, $depth ) {\\n\\t\\t$GLOBALS['comment'] = $comment;\\n\\n\\t\\tswitch ( $comment->comment_type ) :\\n\\t\\t\\tcase 'pingback' :\\n\\t\\t\\tcase 'trackback' :\\n\\t\\t?>\\n\\t\\t
          • \\n\\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\\n\\t\\t\\t
          • id=\\\"comment-\\\">\\n\\t\\t\\t\\t
            \\\" class=\\\"comment-body\\\">\\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\t';\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t$author_url = get_comment_author_url();\\n\\t\\t\\t\\t\\t\\t\\tif ( ! empty( $author_url ) && 'http://' !== $author_url ) {\\n\\t\\t\\t\\t\\t\\t\\t\\t$avatar = '' . $avatar . '';\\n\\t\\t\\t\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t\\t\\t\\t// Output comment author avatar.\\n\\t\\t\\t\\t\\t\\t\\techo $avatar;\\n\\t\\t\\t\\t\\t\\t\\t?>\\n\\t\\t\\t\\t\\t\\t\\tsays:', 'the7mk2' ), sprintf( '%s', get_comment_author_link( $comment ) ) ); ?>\\n\\t\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\t\\tcomment_approved ) : ?>\\n\\t\\t\\t\\t\\t\\t\\t

            \\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t&nbsp;';\\n\\n\\t\\t\\t\\t\\tcomment_reply_link(array_merge( $args, array(\\n\\t\\t\\t\\t\\t\\t'add_below' => 'div-comment',\\n\\t\\t\\t\\t\\t\\t'depth' => $depth,\\n\\t\\t\\t\\t\\t\\t'max_depth' => $args['max_depth'],\\n\\t\\t\\t\\t\\t\\t'before' => '
            ',\\n\\t\\t\\t\\t\\t\\t'after' => '
            ',\\n\\t\\t\\t\\t\\t\\t'reply_text' => $icon . __( 'Reply', 'the7mk2' ),\\n\\t\\t\\t\\t\\t\\t'reply_to_text' => $icon . __( 'Reply to %s', 'the7mk2' ),\\n\\t\\t\\t\\t\\t\\t'login_text' => $icon . __( 'Log in to Reply', 'the7mk2' ),\\n\\t\\t\\t\\t\\t) ));\\n\\t\\t\\t\\t\\t?>\\n\\t\\t\\t\\t
            \\n\\t\\tget($_GET['comment']);\\n if(CommentaryManager::getManager()->delete($comment)) {\\n $article = ArticleManager::getManager()->get($_GET['article']);\\n $comment = CommentaryManager::getManager()->getAll($article->getId());\\n $this->render('article', 'Article', [\\n \\\"article\\\" => $article,\\n \\\"comment\\\" => $comment\\n ]);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5aeba31f5336209d32db8d84a50cf6c8\",\n \"score\": \"0.5726556\",\n \"text\": \"public function archiveBlogEntryAction() {\\n \\n $this->view->currentPage = 'connect';\\n $blogEntries = new Datasource_Cms_Connect_BlogEntries();\\n \\n $blogEntryID = $this->getRequest()->getParam('id');\\n $blogEntries->setArchivedStatus($blogEntryID, true);\\n \\n // Changes saved - so send them back with a nice success message\\n $this->_helper->getHelper('FlashMessenger')->addMessage(array('deleted' => true));\\n $this->_helper->getHelper('Redirector')->goToUrl('/cms-admin/connect/blog');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88b4da7e08e6612a7eb1aa6303eeba84\",\n \"score\": \"0.57196236\",\n \"text\": \"function pyb_comment( $comment ) { ?>\\n\\n\\t
          • id=\\\"li-comment-\\\">\\n\\t\\t
            \\\">\\n \\t\\t
            \\n \\t\\tcomment_parent )\\n \\t\\t\\t$avatar_size = 39;\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\n \\t\\techo get_avatar( $comment, $avatar_size ); ?>\\t\\t\\n \\t\\t\\n \\t\\t
            \\n \\t\\t
            \\n \\t\\t \\t%s', get_comment_author() ),\\n \\t\\t \\t\\t\\tsprintf( '',\\n \\t\\t \\t\\t\\t\\tesc_url( get_comment_link( $comment->comment_ID ) ),\\n \\t\\t \\t\\t\\t\\tget_comment_time( 'c' ),\\n \\t\\t \\t\\t\\t\\t/* translators: 1: date, 2: time */\\n \\t\\t \\t\\t\\t\\tsprintf( __( '%1$s at %2$s', 'pyb' ), get_comment_date(), get_comment_time() )\\n \\t\\t \\t\\t\\t)\\n \\t\\t \\t\\t);\\n \\t\\t \\t?>\\n \\t\\t\\n \\t\\t \\t', '' ); ?>\\n \\t\\t
            \\t\\t\\n \\t\\t
            \\t\\t\\n \\t\\t
            \\n\\n\\t\\t\\t
            \\n \\t\\t\\t\\n
            \\n\\t\\t
            getComments();\\n $title = \\\"Blog de Jean Forteroche - Billet simple pour l'Alaska\\\";\\n $header = '';\\n $posts = \\\"\\\";\\n if (sizeof($PostRepository->getPosts()) > 0) {\\n foreach ($PostRepository->getPosts() as $post) {\\n if (strlen($post->getContent()) > 500) {\\n $content = substr(strip_tags($post->getContent()), 0, 500) . '... getId() . '\\\">lire la suite' ;\\n } else {\\n $content = strip_tags($post->getContent());\\n }\\n $coms = 0;\\n foreach ($comments as $comment) {\\n if ($comment->getArticleId() == $post->getId()) {\\n $coms++;\\n }\\n }\\n $posts .= \\\"
            \\n
            \\n

            getId() . \\\"\\\\\\\"> \\\" . $post->getTitle() .\\\"\\n

            Commentaires: \\\" . $coms . \\\"

            \\n

            \\n
            \\\" . $post->getDate() . \\\"
            \\n
            \\n

            \\\" . $content . \\\"

            \\n
            \\\";\\n }\\n } else {\\n $posts = \\\"
            \\n

            Aucun article :/


            \\n

            Aucun article n'as encore été rédiger.

            \\n
            \\\";\\n }\\n require('../src/View/IndexView.php');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70a763dca7d4d090732ce3fd6a29ede1\",\n \"score\": \"0.56596345\",\n \"text\": \"function comment($f3) {\\n\\t\\t$slug=($f3->get('POST.slug')?:'');\\n\\t\\tif (!$f3->exists('POST.name') || !strlen($f3->get('POST.name')))\\n\\t\\t\\t$f3->set('message','Name is required');\\n\\t\\telseif (!$f3->exists('POST.email') ||\\n\\t\\t\\t!strlen($email=$f3->get('POST.email')) ||\\n\\t\\t\\t!Audit::instance()->email($email))\\n\\t\\t\\t$f3->set('message','Invalid e-mail address');\\n\\t\\telseif (!$f3->exists('POST.contents') ||\\n\\t\\t\\t!strlen($f3->get('POST.contents')))\\n\\t\\t\\t$f3->set('message','Comment cannot be blank');\\n\\t\\telse {\\n\\t\\t\\t$db=$this->db;\\n\\t\\t\\t$comment=new DB\\\\SQL\\\\Mapper($db,'comments');\\n\\t\\t\\t$comment->copyfrom('POST');\\n\\t\\t\\t$img=new Image;\\n\\t\\t\\t$comment->set('identicon',\\n\\t\\t\\t\\t$f3->base64($img->identicon($f3->get('POST.email'),48)->\\n\\t\\t\\t\\tdump(),'image/png'));\\n\\t\\t\\t$comment->set('slug',$slug);\\n\\t\\t\\t$comment->set('posted',time());\\n\\t\\t\\t$comment->save();\\n\\t\\t\\t$f3->reroute('/'.$slug);\\n\\t\\t}\\n\\t\\t$args=array('slug'=>$slug);\\n\\t\\t$this->show($f3,$args);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d94d894b3af852ac1611b3f2d8038d59\",\n \"score\": \"0.5639993\",\n \"text\": \"function comment_format($comment, $args, $depth) {\\n $GLOBALS['comment'] = $comment; ?>\\n
            id=\\\"li-comment-\\\">\\n
            \\\">\\n \\n
            \\n ', $alt='Gravatar Image for '. get_comment_author('').'' ); ?>\\n \\n\\t\\t\\t\\n\\t\\t
            \\t\\t\\n\\t\\n %s writes:'), get_comment_author_link()) ?>\\n
            \\n comment_approved == '0') : ?>\\n \\n
            \\n \\n\\n \\n \\n
            \\nmodel->get_posts_comments_by_id( $id );\\r\\n \\r\\n $template_name = ROOT_DIR . $this->views_dir . 'single-comment.php';\\r\\n include_once ROOT_DIR . '/views/layout/' . $this->layout;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6b207149339690ab800b1ab2d9d682b\",\n \"score\": \"0.5626609\",\n \"text\": \"public function commenter() {\\r\\n $idBillet = $this->requete->getParametre(\\\"id\\\");\\r\\n $auteur = $this->requete->getParametre(\\\"auteur\\\");\\r\\n $contenu = $this->requete->getParametre(\\\"contenu\\\");\\r\\n \\r\\n $commentaire = $this->commentaire->ajouterCommentaire($auteur, $contenu, $idBillet);\\r\\n // Exécution de l'action par défaut pour réafficher la liste des billets\\r\\n $this-> genererVue(['commentaire' => $commentaire ], null, false);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"528018ebbdbe95b7963fd8c9ec020ca6\",\n \"score\": \"0.56126183\",\n \"text\": \"public function add() {\\n $article = ArticleManager::getManager()->get($_GET['article']);\\n\\n if(isset($_POST['comment'], $_SESSION['id'])) {\\n $comment = htmlentities($_POST['comment']);\\n $commentary = new Commentary();\\n $user = UserManager::getManager()->getById($_SESSION['id']);\\n\\n $commentary->setContent($comment)->setArticleFk($article)->setUserFk($user);\\n\\n if(CommentaryManager::getManager()->add($commentary)) {\\n $comment = CommentaryManager::getManager()->getAll($article->getId());\\n $this->render('article', 'Article', [\\n \\\"article\\\" => $article,\\n \\\"comment\\\" => $comment\\n ]);\\n }\\n }\\n else {\\n $comment = CommentaryManager::getManager()->getAll($article->getId());\\n $this->render('article', 'Article', [\\n \\\"article\\\" => $article,\\n \\\"comment\\\" => $comment,\\n \\\"error\\\" => \\\"9\\\"\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e943c0691a1b59202c3c32d3f0f2d18\",\n \"score\": \"0.561122\",\n \"text\": \"public function displayComments()\\n {\\n $template = $this->templateService->getSubpart($this->templateFile, '###DISPLAY_COMMENTS###');\\n $this->marker['###B_PUBLISH_FEED###'] = ($this->marker['###B_PUBLISH_FEED###'] == 1 ? 'true' : 'false');\\n $this->marker['###B_URL###'] = \\\\TYPO3\\\\CMS\\\\Core\\\\Utility\\\\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');\\n $content = $this->templateService->substituteMarkerArray($template, $this->marker);\\n return $content;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d893e5af057185426142c0c3fa8d0531\",\n \"score\": \"0.5594555\",\n \"text\": \"public function comment($comment, $key){\\n global $users, $security, $snicker;\\n\\n // Get Page\\n $page = new Page($comment->page_key());\\n\\n // Check User\\n $user = $users->exists($comment->getValue(\\\"username\\\"));\\n if($user && $comment->getValue(\\\"uuid\\\") === \\\"bludit\\\"){\\n $user = new User($comment->getValue(\\\"username\\\"));\\n }\\n\\n // Render\\n $token = $security->getTokenCSRF();\\n $depth = (int) $snicker->getValue(\\\"comment_depth\\\");\\n $url = $page->permalink() . \\\"?action=snicker&snicker=form&page_key=%s&uid=%s&tokenCSRF=%s\\\";\\n $url = sprintf($url, $comment->page_key(), $comment->uid(), $token);\\n ?>\\n
            uid(); ?>\\\" class=\\\"comment\\\">\\n
            \\n
            \\n gravatar($comment->email()); ?>\\\" alt=\\\"username(); ?>\\\" />\\n username() === $page->username()){\\n echo 'Author';\\n } else if($user && $user->role() === \\\"admin\\\"){\\n echo 'Admin';\\n }\\n ?>\\n
            \\n\\n
            \\n getValue(\\\"comment_title\\\") !== \\\"disabled\\\" && !empty($comment->title())){ ?>\\n
            title(); ?>
            \\n \\n
            \\n Written by username(); ?>\\n on date(); ?>\\n
            \\n
            \\n comment(); ?>\\n
            \\n \\n
            \\n
            \\n
            \\n ' [at] ', '.' => ' [dot] ', '-' => ' [dash] '));\\n\\n $text = htmlspecialchars($row['text']);\\n $text = preg_replace('/\\\\t/',' ',$text);\\n $text = preg_replace('/ /',' &nbsp;',$text);\\n $text = preg_replace_callback('/((https?|ftp):\\\\/\\\\/[\\\\w-?&;:#~=\\\\.\\\\/\\\\@]+[\\\\w\\\\/])/ui',\\n array($this,'_format_link'),$text);\\n $text = nl2br($text);\\n\\n $opts = str_replace('@MD5@',$md5,$this->gravopts);\\n\\n echo '
            ';\\n echo '\\\"\\\"';\\n echo ''.$number.'';\\n\\n echo '
            ';\\n echo $text;\\n echo '
            ';\\n\\n echo '
            ';\\n\\n echo '
            ';\\n echo $row['date'];\\n echo '
            ';\\n\\n echo '
            ';\\n if($row['web']){\\n echo 'target.' class=\\\"url\\\">';\\n echo htmlspecialchars($row['name']);\\n echo '';\\n }elseif($this->showmail){\\n echo '';\\n echo htmlspecialchars($row['name']);\\n echo '';\\n }else{\\n echo htmlspecialchars($row['name']);\\n }\\n echo '
            ';\\n\\n echo '
            ';\\n\\n echo '
            ';\\n $this->_admin_opts($row['id']);\\n echo '
            ';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"478cce1d3bef00e03897c51afdb74bd3\",\n \"score\": \"0.5580467\",\n \"text\": \"public function writeComment($comment){\\n global $comments, $pages, $url, $users;\\n $referer = DOMAIN . $url->uri();\\n\\n // Temp\\n if(!Session::started()){\\n Session::start();\\n }\\n Session::set(\\\"snicker-comment\\\", $comment);\\n\\n // Check Basics\\n if(!isset($comment[\\\"page_key\\\"]) || !$pages->exists($comment[\\\"page_key\\\"])){\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => \\\"snicker-response-004\\\"));\\n }\\n if(isset($comment[\\\"parent_uid\\\"])){\\n if(!$comments->exists($comment[\\\"parent_uid\\\"])){\\n $comment[\\\"parent_uid\\\"] = null;\\n } else {\\n $parent = $comments->getCommentDB($comment[\\\"parent_uid\\\"]);\\n $comment[\\\"type\\\"] = \\\"reply\\\";\\n $comment[\\\"depth\\\"] = $parent[\\\"depth\\\"]+1;\\n }\\n }\\n\\n // Sanitize Terms\\n if($this->getValue(\\\"frontend_terms\\\") !== \\\"disabled\\\"){\\n if(!isset($comment[\\\"terms\\\"]) || $comment[\\\"terms\\\"] !== \\\"1\\\"){\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => $this->getValue(\\\"string_error_5\\\")\\n ));\\n }\\n }\\n\\n // Sanitize Title\\n if($this->getValue(\\\"comment_title\\\") === \\\"required\\\"){\\n if(!isset($comment[\\\"title\\\"]) || empty($comment[\\\"title\\\"])){\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => $this->getValue(\\\"string_error_4\\\")\\n ));\\n }\\n }\\n $comment[\\\"title\\\"] = isset($comment[\\\"title\\\"])? Sanitize::html($comment[\\\"title\\\"]): \\\"\\\";\\n\\n // Sanitize Comment\\n if(!isset($comment[\\\"comment\\\"]) || empty($comment[\\\"comment\\\"])){\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => $this->getValue(\\\"string_error_3\\\")\\n ));\\n }\\n $comment[\\\"comment\\\"] = Sanitize::html($comment[\\\"comment\\\"]);\\n\\n // Sanitize User\\n if(isset($comment[\\\"user\\\"]) && isset($comment[\\\"token\\\"])){\\n if(!$users->exists($comment[\\\"user\\\"])){\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => $this->getValue(\\\"string_error_2\\\")\\n ));\\n }\\n $user = new User($comment[\\\"user\\\"]);\\n\\n if(md5($user->tokenAuth()) !== $comment[\\\"token\\\"]){\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => $this->getValue(\\\"string_error_2\\\")\\n ));\\n }\\n unset($comment[\\\"user\\\"], $comment[\\\"token\\\"]);\\n\\n $comment[\\\"uuid\\\"] = \\\"bludit\\\";\\n $comment[\\\"status\\\"] = \\\"approved\\\";\\n $comment[\\\"username\\\"] = $user->username();\\n $comment[\\\"email\\\"] = null;\\n } else if(isset($comment[\\\"username\\\"]) && isset($comment[\\\"email\\\"])){\\n if(!Valid::email($comment[\\\"email\\\"])){\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => $this->getValue(\\\"string_error_2\\\")\\n ));\\n }\\n $comment[\\\"uuid\\\"] = null;\\n $comment[\\\"status\\\"] = \\\"pending\\\";\\n $comment[\\\"username\\\"] = Sanitize::html(strip_tags($comment[\\\"username\\\"]));\\n $comment[\\\"email\\\"] = Sanitize::email($comment[\\\"email\\\"]);\\n } else {\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => $this->getValue(\\\"string_error_2\\\")\\n ));;\\n }\\n\\n // Sanitize Data\\n $comment[\\\"like\\\"] = 0;\\n $comment[\\\"dislike\\\"] = 0;\\n $comment[\\\"subscribe\\\"] = isset($comment[\\\"subscribe\\\"]);\\n\\n // Check\\n if(($uid = $comments->add($comment)) === false){\\n return $this->handleResponse(false, array(\\n \\\"referer\\\" => $referer . \\\"#snicker-comments-form\\\",\\n \\\"error\\\" => $this->getValue(\\\"string_error_1\\\")\\n ));\\n }\\n\\n Session::set(\\\"snicker-comment\\\", null);\\n return $this->handleResponse(true, array(\\n \\\"referer\\\" => $referer . \\\"#comment-\\\" . $uid,\\n \\\"success\\\" => $this->getValue(\\\"string_success_\\\" . ((int) $comment[\\\"subscribe\\\"] + 1)),\\n \\\"comment\\\" => $this->renderTheme(\\\"comment\\\", array(new Comment($uid), $uid))\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ea074669729412a9a06f0ba288b956f\",\n \"score\": \"0.55765134\",\n \"text\": \"public function createPost() {\\n //skip rendering first ad post\\n echo '\\n
            \\n
            \\n
            \\n

            getPosturl().'\\\">'.$this->getHeading().'

            \\n

            '.$this->getText().'

            \\n
            \\n
            \\n

            By '. $this->getMeta()['author'].'

            \\n

            '.$this->getMeta()['publishDate'].'

            \\n

            '.$this->getMeta()['publishTime'].'

            \\n
            \\n
            \\n
            \\n \\n
            \\n
            \\n ';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a546036354bf64dae753d0f36d0abca2\",\n \"score\": \"0.5565282\",\n \"text\": \"function kt_comment( $comment, $args, $depth) {\\n\\t\\t$GLOBALS['comment'] = $comment;\\n\\t\\tswitch ( $comment->comment_type):\\n\\t\\tcase 'pingback':\\n\\t\\tcase 'trackback':\\n\\t\\t\\t// Display trackbacks differently than normal comments. ?>\\n\\t\\t\\t
          • id=\\\"comment-\\\">\\n\\t\\t\\t\\t

            ', '' ); ?>

            \\n\\t\\t\\t\\t\\n\\t\\t\\t
          • id=\\\"li-comment-\\\">\\n\\t\\t\\t
            \\\" class=\\\"comment\\\">\\n\\t\\t\\t
            \\n\\t\\t\\t%1$s %2$s',\\n\\t\\t\\t\\tget_comment_author_link(),\\n\\t\\t\\t\\t// If current post author is also comment author, make it known visually.\\n\\t\\t\\t\\t( $comment->user_id === $post->post_author) ? ' ' . __( 'Post author', 'kwik' ) . '' : ''\\n\\t\\t\\t);\\n\\t\\t\\tprintf( '',\\n\\t\\t\\t\\tesc_url( get_comment_link( $comment->comment_ID) ),\\n\\t\\t\\t\\tget_comment_time( 'c' ),\\n\\t\\t\\t/* translators: 1: date, 2: time */\\n\\t\\t\\t\\tsprintf(__( '%1$s at %2$s', 'kwik' ), get_comment_date(), get_comment_time())\\n\\t\\t\\t);\\n\\t\\t\\t?>\\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\tcomment_approved): ?>\\n\\t\\t\\t\\t

            \\n\\t\\t\\t\\t\\n\\t\\t
            \\n\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t', '

            ' ); ?>\\n\\t\\t
            \\n\\t\\t\\t
            \\n\\t\\t __( 'Reply', 'kwik' ), 'after' => ' &darr;', 'depth' => $depth, 'max_depth' => $args['max_depth']))); ?>\\n\\t\\t
            \\n\\t\\t
            \\n\\t\\tdata && $this->data->comments > 0){\\n\\t\\t\\t$this->builder->h1(fc_t('!gears comments').' ('.$this->builder->a($this->data->comments,array('id'=>'comments_counter','class'=>'comments_counter','href'=>'#comments')).') &darr;',TRUE);\\n\\t\\t}\\n\\t\\t$this->check_access();\\n\\t\\tif(!$comments){\\n\\t\\t\\t\\t//$comments = $this->cache->get('comments/'.$this->table.'/'.$this->data->id);\\n\\t\\t\\t\\t//if(!$comments){\\n\\t\\t\\t\\t\\t$this->db->join($this->links_table,$this->links_table.'.cid = comments.id','inner');\\n\\t\\t\\t\\t\\t$this->db->where($this->links_table.'.'.$this->link_field,$this->data->id);\\n\\t\\t\\t\\t\\t$this->db->order_by($type == 'tree' ? 'path' : 'comments.id',$type == 'tree' ? 'asc' : 'desc');\\n\\t\\t\\t\\t\\t$this->query();\\n\\t\\t\\t\\t\\t$comments = array4key($this->db->get('comments')->result_array(),'id');\\n\\t\\t\\t\\t//\\t$this->cache->set('comments/'.$this->table.'/'.$this->data->id,$comments);\\n\\t\\t\\t\\t//}\\n\\t\\t}\\n\\t\\tif($type == 'tree'){\\n\\t\\t\\t$last_id = $this->comments_views($comments);\\n\\t\\t\\tforeach($comments as $key=>&$comment){\\n\\t\\t\\t\\tif($last_id && $last_id < $key && $comment['aid'] != $this->user->get('id')){\\n\\t\\t\\t\\t\\t$comment['class'] = 'new';\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$comment = $this->process($comment,$type);\\n\\t\\t\\t}\\n\\t\\t\\tif($this->user->get('id')){\\n\\t\\t\\t js('/gears/comments/js/inline/updater.class',FALSE,TRUE);\\n\\t\\t\\t if ($this->gears->comments->show_updater) js('/gears/comments/js/inline/comments',FALSE,TRUE);\\n\\t\\t\\t}\\n\\t\\t\\tif($this->access['edit'] OR $this->access['edit_all']){\\n\\t\\t\\t\\tjs('/gears/comments/js/inline/edit',FALSE,TRUE);\\n\\t\\t\\t}\\n\\t\\t\\tif($this->access['destroy']){\\n\\t\\t\\t\\tjs('/gears/comments/js/inline/destroy',FALSE,TRUE);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\tif(is_object($comments)) $comments = object2array($comments);\\n\\t\\treturn $return === TRUE ? $comments : $this->_template('comments comments',array('comments'=>$comments,'wrapper'=>$wrapper,'type'=>$type),$return);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f60720c1985d2e5bc55e9fd70c730f31\",\n \"score\": \"0.55521584\",\n \"text\": \"protected function _handlePostedComment()\\n\\t{\\n\\t\\t$commentId = $this->getRequest()->getParam('comment');\\n\\t\\t\\n\\t\\tif ($commentId && $this->getRequest()->getActionName() === 'view') {\\n\\t\\t\\t$comment = Mage::getModel('wordpress/post_comment')->load($commentId);\\n\\t\\t\\t\\n\\t\\t\\tif ($comment->getId() && $comment->getPost()->getId() === $this->getEntityObject()->getId()) {\\n\\t\\t\\t\\tif ($comment->isApproved()) {\\n\\t\\t\\t\\t\\theader('Location: ' . $comment->getUrl());\\n\\t\\t\\t\\t\\texit;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse {\\n\\t\\t\\t\\t\\tMage::getSingleton('core/session')->addSuccess($this->__('Your comment is awaiting moderation.'));\\t\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d680adf2b19a53b0b8d4cd809cfa1083\",\n \"score\": \"0.55275214\",\n \"text\": \"public function actionView()\\n\\t{\\n\\t\\t$post=$this->loadModel();\\n\\t\\t$comment=$this->newComment($post);\\n\\n\\t\\t$this->render('view',array(\\n\\t\\t\\t'model'=>$post,\\n\\t\\t\\t'comment'=>$comment,\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e21d8035932abead57f5f00cd8b600b5\",\n \"score\": \"0.5525533\",\n \"text\": \"public function commentsAction()\\n\\t{\\n\\t\\t$error = [];\\n\\t\\t$model = new CommentsModel();\\n\\t\\t$verifs = new ValidationTool();\\n\\t\\t$items = new ItemsModel();\\n\\n\\t\\t$comments = $model->last5Comments();\\n\\n\\t\\t$user = $this->getUser();\\n\\n\\t\\tif(!empty($_POST['submit']))\\n\\t\\t{\\n\\t\\t\\t$user = $this->getUser();\\n\\t\\t\\t$username = $user['username'];\\n\\t\\t\\t$user_id = $user['id'];\\n\\t\\t\\t$created_at = date('Y-m-d G:i:s');\\n\\n\\n\\t\\t\\t$comment = trim(strip_tags($_POST['comment']));\\n\\n\\t\\t\\t$error['comment'] = $verifs->textValid($comment, 'commentaire',10,500);\\n\\n\\t\\t\\tif($verifs->IsValid($error))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$model->insert(['users_id' => $user_id,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'comment' => $comment,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'created_at' => $created_at ]);\\n\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$this->flash('Commentaire en attente de moderation', 'success');\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t$this->redirectToRoute('default_home');\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$results = $items->findAllproductactive('home', '1', $orderBy = 'created_at', $orderDir = 'DESC', $limit = 5);\\n\\t\\t\\t\\t$this->show('default/home',['user' => $user , 'error' => $error , 'comments' => $comments, 'actualComment' => $comment, 'results' => $results]);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a208ffb48e1c5679548634c7dde5575d\",\n \"score\": \"0.55253154\",\n \"text\": \"function renderComments() {\\n\\t\\tglobal $wgUser;\\n\\t\\t$html = '';\\n\\t\\tforeach( $this->comments as $id => $comment ) {\\n\\t\\t\\tif( $comment[AJAXCOMMENTS_PARENT] === false ) $html = $this->renderComment( $id ) . $html;\\n\\t\\t}\\n\\t\\tif( $html == '' ) $html = \\\"\\\" . wfMessage( 'ajaxcomments-none' )->text() . \\\"
            \\\";\\n\\n\\t\\t// If logged in, allow replies and editing etc\\n\\t\\tif( $this->canComment ) {\\n\\t\\t\\t$html = \\\"\\\\n$html\\\";\\n\\t\\t} else $html = \\\"\\\" . wfMessage( 'ajaxcomments-anon' )->text() . \\\"
            $html\\\";\\n\\t\\treturn $html;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e02f4c3d842bb1af5e6c87a6322b626b\",\n \"score\": \"0.55135447\",\n \"text\": \"function view($id){\\r\\n $this->layout = \\\"ajax\\\";\\r\\n\\t\\t$this->Comment->id = $id;\\r\\n\\t\\t$this->data = $this->Comment->read();\\r\\n\\t\\t$this->data['Comment']['read'] = 1;\\r\\n\\t\\t$this->Comment->save($this->data);\\r\\n\\t\\t$com_view = $this->Comment->read();\\r\\n\\t\\t$this->set('comments',$com_view);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f98c2c8a3adb0c1104d2c161dd768c23\",\n \"score\": \"0.5511305\",\n \"text\": \"public function single($id)\\n {\\n $this->checkParams();\\n $PostRepository = new PostRepository();\\n $post = $PostRepository->getPosts($id);\\n $title = $post->getTitle() . \\\" - Jean Forteroche, Billet simple pour l'Alaska\\\";\\n $header = '';\\n if ($post == null) {\\n die($this->error('404'));\\n }\\n if (isset($_GET['notif'])) {\\n switch ($_GET['notif']) {\\n case \\\"username\\\":\\n $NotifWindow = new NotifWindow('red', 'Message non envoyé, nom d\\\\'utilisateur trop court.');\\n break;\\n case \\\"content\\\":\\n $NotifWindow = new NotifWindow('red', 'Message non envoyé, contenu trop court.');\\n break;\\n }\\n }\\n $CommentRepository = new CommentRepository();\\n $comments = $CommentRepository->getComments($id);\\n $content = \\\"\\\";\\n $i = 0;\\n \\n foreach ($comments as $comment) {\\n $content .=\\n \\\"
            getId() . \\\"\\\\\\\">\\n

            \\\" . $comment->getUsername() . \\\" \\\" . $comment->getDate() . \\\"

            \\n

            \\\" . htmlspecialchars_decode($comment->getContent()) . \\\"

            \\\";\\n if (isset($_SESSION['auth'])) {\\n $content .= 'getId() . '\\\" class=\\\"btn btn-danger comment-btn-suppr\\\">Supprimer';\\n } else {\\n $content .= 'getId() . '&flag=' . $comment->getId() . '\\\">Signaler';\\n }\\n $content .= \\\"\\n
            \\\";\\n }\\n require('../src/View/SingleView.php');\\n if (isset($_GET['flag'])) {\\n $CommentService = new CommentService;\\n $CommentService->flag($_GET['flag']);\\n $flaggedUsername;\\n foreach ($comments as $comment) {\\n if ($comment->getId() == $_GET['flag']) {\\n $flaggedUsername = $comment->getUsername();\\n }\\n }\\n $NotifWindow = new NotifWindow('red', 'Le commentaire de ' . $flaggedUsername . ' à bien été signalé.');\\n }\\n if (isset($_GET['submit'])) {\\n $NotifWindow = new NotifWindow('#47ff78', 'Message envoyé.');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a85949ce4c07e145869f0b70a92b5fc\",\n \"score\": \"0.55049074\",\n \"text\": \"function dashboardCommentListAction()\\n\\t{\\n\\t\\t$comments = Comment::findAll();\\n\\n\\t\\techo self::$twig->load('DashboardCommentList.html.twig')->render(array(\\n\\t\\t\\t\\\"comments\\\" => $comments\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88f0c1661c2674d08d17b99741bc5c68\",\n \"score\": \"0.5504267\",\n \"text\": \"private function emailComment()\\n {\\n $app = App::getInstance();\\n\\n // Get content\\n ob_start();\\n $data = array(\\n 'app' => $app,\\n 'comment' => $this,\\n );\\n\\n // Render email template\\n call_user_func(function () use ($data) {\\n extract($data);\\n include realpath(__DIR__ . '/../../../templates/') . '/new_external_comment.php';\\n });\\n $content = ob_get_contents();\\n ob_end_clean();\\n\\n // Create message\\n $message = \\\\Swift_Message::newInstance()\\n ->setSubject('New comment to moderate on \\\"'.$this->getArticle()->getTitle().'\\\"')\\n ->setTo(explode(\\\", \\\", Settings::get('email_extcomment_notifyaddr')))\\n ->setFrom(array(Settings::get('email_replyto_addr') => Settings::get('email_replyto_name')))\\n ->setBody($content, 'text/html');\\n\\n // Send message\\n return $app['email']->send($message);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf309a7cbe736d5c0f4696a3c5b360ea\",\n \"score\": \"0.55037117\",\n \"text\": \"static public function showCallback( O_Dao_Renderer_Show_Params $params )\\r\\n\\t{\\r\\n\\t\\t$comment = $params->record();\\r\\n\\t\\tif (!$comment instanceof R_Mdl_Site_Comment) {\\r\\n\\t\\t\\techo \\\"Error
            \\\";\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t}\\r\\n\\t\\t$isList = $params->params() == \\\"list\\\";\\r\\n\\t\\tif ($isList && !$comment->root->isVisible())\\r\\n\\t\\t\\treturn;\\r\\n\\t\\t?>\\r\\n\\r\\n
            style=\\\"margin-left:level?>em\\\" id=\\\"comm-id?>\\\">\\r\\n
            owner->link()?>\\r\\n\\towner->avatar()?>
            \\r\\nid?>\\\">\\r\\n\\r\\n\\r\\n
            \\r\\nКомментарий на: root->link()?> - root->owner->link()?>; root->system->link()?>\\r\\n
            \\r\\n\\r\\n\\r\\n\\t
            time )?>
            \\r\\n\\r\\ncontent?>\\r\\n
            \\r\\n\\r\\nroot->system->id, $comment->id, \\r\\n\\t\\t\\t\\t\\tR_Mdl_Session::can( \\\"delete\\\", $comment ) );\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ec400028915f13ad25bcd761f522aa6\",\n \"score\": \"0.55004066\",\n \"text\": \"function flatmarket_comment( $comment, $args, $depth ) {\\n\\t$GLOBALS['comment'] = $comment;\\n\\n\\tif ( 'pingback' == $comment->comment_type || 'trackback' == $comment->comment_type ) : ?>\\n\\n\\t
          • \\\" >\\n\\t\\t
            \\n\\t\\t\\t ', '' ); ?>\\n\\t\\t
            \\n\\n\\t\\n\\n\\t
          • \\\" >\\n\\t\\t
            \\\" class=\\\"comment-body\\\">\\n\\t\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t 'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\tsays: ', 'flatmarket' ), sprintf( '%s', get_comment_author_link() ) ); ?>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\tcomment_approved ) : ?>\\n\\t\\t\\t\\t\\t

            \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\n\\t\\t\\t
            \\n\\n\\t\\t\\t\\n\\n\\t\\t\\t\\n\\t\\t
            \\n\\n\\tgetInputManager()->doFilter();\\n $this->addInputToModel($data, $this->getModel());\\n\\n try {\\n $this->getModel()->addCommentToMovie($data['Comment']);\\n systemLog::message('User posted comment to movie ' . $data['MovieID']);\\n\\n $message = 'Your comment has been added successfully.';\\n $level = mvcSession::MESSAGE_OK;\\n } catch (Exception $e) {\\n systemLog::error($e->getMessage());\\n $message = $e->getMessage();\\n $level = mvcSession::MESSAGE_ERROR;\\n }\\n\\n if ($this->getRequest()->isAjaxRequest()) {\\n $oView = new videosView($this);\\n $oView->sendJsonResult($message, $level);\\n } else {\\n $this->getRequest()->getSession()->setStatusMessage($message, $level);\\n $this->redirect($this->buildUriPath(self::ACTION_EDIT, $this->getModel()->getMovieID()));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3cbf14adf1d920e02ff148f78d749e9\",\n \"score\": \"0.54762554\",\n \"text\": \"public function actionView()\\n\\t{\\n\\t\\t$post=$this->loadModel();\\n\\t\\t$comment=$this->newComment($post);\\n\\t\\tif (!Yii::app()->user->isGuest)\\n\\t\\t{\\n\\t\\t\\t$comment->author = Yii::app()->user->user->fullname;\\n\\t\\t\\t$comment->email = Yii::app()->user->user->email;\\n\\t\\t}\\n\\n\\t\\t$this->render('view',array(\\n\\t\\t\\t'model'=>$post,\\n\\t\\t\\t'comment'=>$comment,\\n\\t\\t));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"96307efecb09e0df0f943baa1527c605\",\n \"score\": \"0.54722184\",\n \"text\": \"function bhp_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
          • \\n\\t\\t

            ', '' ); ?>

            \\n\\t\\n\\t
          • id=\\\"li-comment-\\\">\\n\\t\\t
            \\\" class=\\\"comment\\\">\\n\\t\\t\\t
            \\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\tcomment_parent )\\n\\t\\t\\t\\t\\t\\t\\t$avatar_size = 39;\\n\\n\\t\\t\\t\\t\\t\\techo get_avatar( $comment, $avatar_size );\\n\\n\\t\\t\\t\\t\\t\\t/* translators: 1: comment author, 2: date and time */\\n\\t\\t\\t\\t\\t\\tprintf( __( '%1$s on %2$s said:', 'bhp' ),\\n\\t\\t\\t\\t\\t\\t\\tsprintf( '%s', get_comment_author_link() ),\\n\\t\\t\\t\\t\\t\\t\\tsprintf( '',\\n\\t\\t\\t\\t\\t\\t\\t\\tesc_url( get_comment_link( $comment->comment_ID ) ),\\n\\t\\t\\t\\t\\t\\t\\t\\tget_comment_time( 'c' ),\\n\\t\\t\\t\\t\\t\\t\\t\\t/* translators: 1: date, 2: time */\\n\\t\\t\\t\\t\\t\\t\\t\\tsprintf( __( '%1$s at %2$s', 'bhp' ), get_comment_date(), get_comment_time() )\\n\\t\\t\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t?>\\n\\n\\t\\t\\t\\t\\t', '' ); ?>\\n\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\tcomment_approved == '0' ) : ?>\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\n\\n\\t\\t\\t
            \\n\\n\\t\\t\\t
            \\n\\n\\t\\t\\t
            \\n\\t\\t\\t\\t __( 'Reply &darr;', 'bhp' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\\n\\t\\t\\t
            \\n\\t\\t
            \\n\\n\\tcomment_ID);\\n $time = get_comment_time();\\n //$avatar = get_avatar($comment, 40);\\n //$edit = get_edit_comment_link('Edit', '

            ', '

            ');\\n //$reply = get_comment_reply_link();\\n\\n // Generate comment output\\n $output = \\\"
          • \\\";\\n $output .= \\\"

            $author on $date at $time

            \\\";\\n if($comment->comment_approved) {\\n $output .= apply_filters( 'comment_text', get_comment_text() );\\n } else {\\n $output .= '

            Your comment is awaiting moderation.

            ';\\n }\\n echo $output;\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bd63913138d68e1961dc81db55152989\",\n \"score\": \"0.5454307\",\n \"text\": \"function displayPost($ar=NULL) {\\n $p=new XParam($ar, array());\\n $tplentry=$p->get('tplentry');\\n $oid=$p->get('oid');\\n $post=$p->get('post');\\n\\n $r = $this->xset->display(array('tplentry'=>TZR_RETURN_DATA, 'oid'=>$oid));\\n XShell::toScreen1($tplentry.'blog',$r);\\n $r = $this->xset->display(array('tplentry'=>TZR_RETURN_DATA, 'oid'=>$post));\\n if ($this->object_sec){\\n $lang_data = XShell::getLangData();\\n $oids = array($post);\\n list($r['object_sec']) = $GLOBALS['XUSER']->getObjectsAccess($this, $lang_data, $oids);\\n }\\n XShell::toScreen1($tplentry.'post',$r);\\n $right= $this->secure($oid, 'validatePost');\\n if($right)\\n $query=$this->xset->select_query(array('order'=>'datep ASC',\\n\\t\\t\\t\\t\\t 'cond'=>array('blog'=>array('=',$oid),\\n\\t\\t\\t\\t\\t\\t\\t 'paperup'=>array('=',$post),\\n\\t\\t\\t\\t\\t\\t\\t 'dtype'=>array('=','comment'))));\\n else\\n $query=$this->xset->select_query(array('order'=>'datep ASC',\\n\\t\\t\\t\\t\\t 'cond'=>array('blog'=>array('=',$oid),\\n\\t\\t\\t\\t\\t\\t\\t 'paperup'=>array('=',$post),\\n\\t\\t\\t\\t\\t\\t\\t 'PUBLISH'=>array('=',1),\\n\\t\\t\\t\\t\\t\\t\\t 'dtype'=>array('=','comment'))));\\n\\n $this->xset->browse(array('tplentry'=>$tplentry.'comment','select'=>$query, \\n\\t\\t\\t 'pagesize'=>100, 'selectedfields'=>'all'));\\n $this->addComment(array('tplentry'=>$tplentry.'add'));\\t\\n\\n $ar=array();\\n $ar['select']=$this->xset->select_query(array('order'=>'datep DESC','cond'=>\\n\\t\\t\\t\\t\\t\\t array('dtype'=>array('=','post'),\\n\\t\\t\\t\\t\\t\\t\\t'blog'=>array('=',$oid))));\\n $ar['selectedfields']=array('datep','title');\\n $ar['pagesize']=100;\\n $ar['tplentry']=$tplentry.'posts';\\n XModTable::browse($ar);\\n // commentaires recents\\n $ar=array();\\n $ar['select']=$this->xset->select_query(array('order'=>'datep DESC','cond'=>\\n\\t\\t\\t\\t\\t\\t array('dtype'=>array('=','comment'),'blog'=>array('=',$oid))));\\n $ar['selectedfields']=array('datep','title','blog','paperup');\\n $ar['pagesize']=10;\\n $ar['tplentry']=$tplentry.'comments';\\n XModTable::browse($ar);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f60062c3433c59884b3cb5d7b7e4b15\",\n \"score\": \"0.5452976\",\n \"text\": \"function bones_comments( $comment, $args, $depth ) {\\n\\t$GLOBALS['comment'] = $comment; ?>\\n\\t
            \\\" >\\n\\t\\t
            \\n\\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\\n\\t\\t\\t\\t?s=40\\\" class=\\\"load-gravatar avatar avatar-48 photo\\\" height=\\\"40\\\" width=\\\"40\\\" src=\\\"/library/images/nothing.gif\\\" />\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t%1$s %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\\n\\t\\t\\t\\t\\n\\n\\t\\t\\t
            \\n\\t\\t\\tcomment_approved == '0') : ?>\\n\\t\\t\\t
            \\n\\t\\t\\t

            \\n\\t\\t\\t
            \\n\\t\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\t $depth, 'max_depth' => $args['max_depth']))) ?>\\n\\t\\t
            \\n\\t is added by WordPress automatically ?>\\ngetRequest()->getPost();\\n $invitationstatus = $this->_initInvitationstatus();\\n $session = Mage::getSingleton('core/session');\\n if ($invitationstatus) {\\n if ($invitationstatus->getAllowComments()) {\\n if ((Mage::getSingleton('customer/session')->isLoggedIn() ||\\n Mage::getStoreConfigFlag('tpl_eventsmanager/invitationstatus/allow_guest_comment'))) {\\n $comment = Mage::getModel('tpl_eventsmanager/invitationstatus_comment')->setData($data);\\n $validate = $comment->validate();\\n if ($validate === true) {\\n try {\\n $comment->setInvitationstatusId($invitationstatus->getId())\\n ->setStatus(Tpl_EventsManager_Model_Invitationstatus_Comment::STATUS_PENDING)\\n ->setCustomerId(Mage::getSingleton('customer/session')->getCustomerId())\\n ->setStores(array(Mage::app()->getStore()->getId()))\\n ->save();\\n $session->addSuccess($this->__('Your comment has been accepted for moderation.'));\\n } catch (Exception $e) {\\n $session->setInvitationstatusCommentData($data);\\n $session->addError($this->__('Unable to post the comment.'));\\n }\\n } else {\\n $session->setInvitationstatusCommentData($data);\\n if (is_array($validate)) {\\n foreach ($validate as $errorMessage) {\\n $session->addError($errorMessage);\\n }\\n } else {\\n $session->addError($this->__('Unable to post the comment.'));\\n }\\n }\\n } else {\\n $session->addError($this->__('Guest comments are not allowed'));\\n }\\n } else {\\n $session->addError($this->__('This invitation status does not allow comments'));\\n }\\n }\\n $this->_redirectReferer();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13af2257f06ea593cfe575a3a8c1f959\",\n \"score\": \"0.54463565\",\n \"text\": \"function renren_comment(&$comment, $op) {\\n global $user;\\n if (!is_array($comment)) {\\n $comment = (array)$comment;\\n }\\n $comment_body = renren_clean_data($comment['comment']);\\n $comment_subject = renren_clean_data($comment['subject']);\\n \\n if ($body_pattern = variable_get('renren_template_comment_body', '')) {\\n $body = '{\\\"'.$body_pattern.'\\\" : \\\"'.$comment_body.'\\\"}';\\n }\\n\\n if ($title_pattern = variable_get('renren_template_comment_title', '')) {\\n $title = '{\\\"'.$title_pattern.'\\\" : \\\"'.$comment_subject.'\\\"}';\\n }\\n //$body = '{\\\"content\\\":\\\"'.$comment_body.'\\\"}';\\n //$title = '{\\\"feedtype\\\":\\\"'.$comment_subject.'\\\"}';\\n \\n // if renren user logined\\n $comment_author = renren_user_profile();\\n if (isset($comment_author)) {\\n global $RR_client;\\n $result = $RR_client->POST('feed.publishTemplatizedAction', array(1, $title, $body));\\n if ($result->result) {\\n drupal_set_message('Successful share this comment on renren');\\n }\\n else {\\n drupal_set_message('Renren Error: '.$result->error_msg);\\n drupal_set_message('Renren Error Code: '.$result->error_code);\\n }\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a430148b5799fe518c7951eac51dfa26\",\n \"score\": \"0.5435875\",\n \"text\": \"function comments_template() {\\n\\tglobal $bj,$entries,$entry,$comments,$comment;\\r\\n\\tif(is_entry()) {\\n\\t\\tforeach ($entries as $entry) {\\n\\t\\t\\t$comments = get_comments('postid='.get_entry_ID());\\n\\t\\t\\tif(file_exists(BJPATH . 'content/skins/' . current_skinname() . '/comments.php'))\\r\\n\\t\\t\\t\\tinclude(BJPATH . 'content/skins/' . current_skinname() . '/comments.php');\\n\\t\\t}\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"887fbdc58f700daeabdb3281c3c1f75c\",\n \"score\": \"0.54284525\",\n \"text\": \"function buggm_format_ticket_comment( $comment, $args, $depth ) {\\t\\n\\t$GLOBALS[ 'comment' ] = $comment;\\n\\t\\n $updates =buggm_get_ticket_changes(get_comment_ID());\\n\\t\\t\\n\\t$i = 0;\\n ?>\\n\\t
          • id=\\\"comment-\\\"> \\n\\t\\t\\\">\\n\\t\\t
            \\n\\t\\t\\t\\n user_id); ?>\\\">\\n user_id, 24);?> \\n user_id);?>\\n \\n \\n %s ', 'buggm' ), buggm_time_since( get_comment_time( 'U' ),current_time( 'timestamp' ) )); ?>\\n\\t\\t
            \\n
            \\n\\t\\t
            \\n\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
              \\n\\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\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\t\\n\\t\\t
            \\n\\n \\t
            >\\n\\t \\t
            \\\">\\n\\t \\t\\t\\n\\t\\t
            \\n\\t\\t \\n \\t\\t
            \\n \\t\\t \\n\\t\\t\\t\\t
            \\\">\\n\\t\\t \\t\\t
            \\n\\t\\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\\n\\t\\t\\t \\t
            \\n\\t\\t\\t\\t \\t\\n\\t\\t\\t\\t \\t\\n\\t
            \\n\\t
            \\n\\t\\t\\t\\t\\t\\t
            $depth, 'max_depth' => $args['max_depth'], 'add_below' => 'comment-content', 'reply_text' => '' . __('Reply', 'romangie')))) ?>
            \\n\\n\\t \\n\\t\\t \\t\\t
            \\n\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t \\t
            \\n\\t\\t\\t
            \\n\\n\\t\\t\\t\\n\\t\\t
            \\n\\t\\t \\n\\t\\t
            \\n \\t\\t \\n\\t\\t \\tcomment_approved == '0') : ?>\\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\n\\t\\t \\t
            \\\">\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
            \\n\\t\\t
            \\n\\t\\t
            \\n\\t
            \\n\\tget_request_method() == \\\"POST\\\" ) {\\n $data = json_decode( file_get_contents('php://input'), true );\\n if ( !$this->authenticate( $data ) ){\\n $this->response( \\\"unauthorized access\\\", 400 );\\n }\\n\\n // write the comment to the database\\n $comment = $data['data'];\\n $post_id = $comment['post_id'];\\n $comment_m = $comment['comment'];\\n $user_id = $this->user['user_id'];\\n $query = \\\"INSERT INTO comment( post_id, comment, user_id ) VALUES( $post_id, '$comment_m', $user_id)\\\";\\n mysqli_query( $this->db, $query );\\n $this->response( $this->json( $comment ), 200 );\\n }\\n else if ( $this->get_request_method() == \\\"GET\\\" ) {\\n $post_id = $_REQUEST['post_id'];\\n if ( !$post_id ) {\\n $post_id = \\\"*\\\";\\n }\\n $query = \\\"SELECT * FROM comment WHERE post_id = $post_id\\\";\\n $result = $this->convertMysqlToArray( mysqli_query( $this->db, $query ) );\\n $this->response( $this->json( $result ), 200 );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1cb3926c5b5ee118b08319c87dac2ca2\",\n \"score\": \"0.5417217\",\n \"text\": \"public function showComment()\\n\\t{\\n\\t\\t /* $comments = Article::find(1)->comment;\\n \\n foreach($comments as $comment){\\n print_r($comment->detail_comment.\\\"
            \\\");\\n }\\n */\\n return View::make('showComment');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0c527049d1772bf42d3cb8aa0c4a242\",\n \"score\": \"0.5409652\",\n \"text\": \"public function show(BlogComment $blogComment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ba215564fc57f212936f7ef3860762af\",\n \"score\": \"0.54088104\",\n \"text\": \"public function comment_attachment()\\n {\\n global $post;\\n global $PeepSoActivityDidInit;\\n\\n if(!isset($PeepSoActivityDidInit)) {\\n $PeepSoActivityDidInit = TRUE;\\n $this->init();\\n }\\n\\n // let other add-ons have a chance to attach content to the comment\\n do_action('peepso_activity_comment_attachment', $post, $post->ID, $post->act_module_id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78181968bc5db325f5119742bf6abf40\",\n \"score\": \"0.54039353\",\n \"text\": \"public function post($comments)\\n {\\n\\n $addOne = $this->db->prepare(\\n 'INSERT INTO comments (content, createdAt, entryID)\\n VALUES (:content, :createdAt, :entryID)');\\n\\n date_default_timezone_set('Europe/Stockholm');\\n $date = date(\\\"Y-m-d H:i:s\\\");\\n\\n $addOne->execute([\\n ':content' => $comments['content'],\\n ':createdAt' => $date,\\n ':entryID' => $comments['entryID']\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83c8f258943d080e1f3011860e623344\",\n \"score\": \"0.53998333\",\n \"text\": \"protected function html5_comment( $comment, $depth, $args ) {\\r\\n $this->comment_count++;\\r\\n\\r\\n $tag = ( 'div' === $args['style'] ) ? 'div' : 'li';\\r\\n\\r\\n $commenter = wp_get_current_commenter();\\r\\n $show_pending_links = ! empty( $commenter['comment_author'] );\\r\\n\\r\\n if ( $commenter['comment_author_email'] ) {\\r\\n $moderation_note = __( 'Your comment is awaiting moderation.' );\\r\\n } else {\\r\\n $moderation_note = __( 'Your comment is awaiting moderation. This is a preview, your comment will be visible after it has been approved.' );\\r\\n }\\r\\n ?>\\r\\n < id=\\\"comment-\\\" has_children ? 'parent' : '', $comment ); ?>>\\r\\n
            \\\" class=\\\"comment-body py-8 flex flex-wrap md:flex-no-wrap comment_count == 1 ? \\\"\\\" : \\\"border-t-2 border-gray-200 \\\"; ?>\\\">\\r\\n
            1 ? \\\"ml-16\\\" : \\\"\\\" ?>\\\">\\r\\n
            \\r\\n
            \\r\\n \\r\\n
            \\r\\n comment_approved && ! $show_pending_links ) {\\r\\n $comment_author = get_comment_author( $comment );\\r\\n }\\r\\n\\r\\n printf(\\r\\n /* translators: %s: Comment author link. */\\r\\n __( '%s says:' ),\\r\\n sprintf( '%s', $comment_author )\\r\\n );\\r\\n ?>\\r\\n
            \\r\\n
            \\r\\n\\r\\n \\r\\n\\r\\n comment_approved ) : ?>\\r\\n \\r\\n \\r\\n
            \\r\\n
            \\r\\n
            \\r\\n
            \\r\\n 'leading-relaxed'));\\r\\n// comment_text();\\r\\n ?>\\r\\n\\r\\n \\r\\n \\r\\n \\r\\n ',__( 'Edit' )),\\r\\n '', '' ); ?>\\r\\n comment_approved || $show_pending_links ) {\\r\\n comment_reply_link(\\r\\n array_merge(\\r\\n $args,\\r\\n array(\\r\\n 'add_below' => 'div-comment',\\r\\n 'depth' => $depth,\\r\\n 'max_depth' => $args['max_depth'],\\r\\n 'before' => '
            ',\\r\\n 'after' => '
            ',\\r\\n 'reply_text' => sprintf('%s ', __( 'Reply' )),\\r\\n /* translators: Comment reply button text. %s: Comment author name. */\\r\\n 'reply_to_text' => sprintf('%s ', __( 'Reply to %s' )),\\r\\n 'login_text' => sprintf('%s ', __( 'Log in to Reply' ))\\r\\n )\\r\\n )\\r\\n );\\r\\n }\\r\\n ?>\\r\\n
            \\r\\n
            \\r\\n\\r\\n\\r\\n\\r\\n
            \\r\\n getValue(\\\"comment_title\\\") === \\\"disabled\\\")? false: $title;\\n\\n // Prepare User Data\\n $login = is_a($login, \\\"Login\\\")? $login: new Login();\\n if($login->isLogged()){\\n $user = new User($login->username());\\n $user = array($user->username(), md5($user->tokenAuth()), $user->nickname());\\n }\\n\\n // Render Form\\n ?>
            allowComments()){\\n print($this->renderTheme(\\\"form\\\", array($user, $mail, $title, $comment)));\\n } else {\\n ?>\\n
            \\n The comment section on this page has been disabled by the author!\\n
            \\n
            getValue(\\\"frontend_per_page\\\");\\n $count = $comments->count(\\\"approved\\\", $page->key());\\n $max = ceil($count / $limit);\\n if(isset($_GET[\\\"cpage\\\"]) && $_GET[\\\"cpage\\\"] > 1){\\n $num = ($_GET[\\\"cpage\\\"] < $max)? $_GET[\\\"cpage\\\"]: $max;\\n } else {\\n $num = 1;\\n }\\n $list = $comments->getList($num, $limit, \\\"approved\\\", $page->key());\\n\\n // Render Comment List\\n ?>
            allowComments()){\\n ?>\\n
            \\n Currently there are no comments, so be the first!\\n
            \\n $limit){\\n print($this->renderTheme(\\\"pagination\\\", array(\\\"top\\\", $num, $limit, $count)));\\n }\\n foreach($list AS $key){\\n $comment = new Comment($key);\\n print($this->renderTheme(\\\"comment\\\", array($comment, $key)));\\n }\\n if($count > $limit){\\n print($this->renderTheme(\\\"pagination\\\", array(\\\"bottom\\\", $num, $limit, $count)));\\n }\\n }\\n ?>
            save();\\n return $this->renderSingle($id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3584e2c44d7fcd904c6754b380ff264\",\n \"score\": \"0.5381761\",\n \"text\": \"public function render()\\n {\\n return view('components.comment');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3584e2c44d7fcd904c6754b380ff264\",\n \"score\": \"0.5381761\",\n \"text\": \"public function render()\\n {\\n return view('components.comment');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68b70ff71b1293f78695aac4e806a4c5\",\n \"score\": \"0.5378006\",\n \"text\": \"function start_el( &$output, $comment, $depth = 0, $args = array(), $id = 0 ) {\\n\\t\\t$depth++;\\n\\t\\t$GLOBALS['comment_depth'] = $depth;\\n\\t\\t$GLOBALS['comment'] = $comment;\\n\\t\\t$parent_class = ( empty( $args['has_children'] ) ? '' : 'parent' ); \\n\\n\\t\\tif ( 'article' == $args['style'] ) {\\n\\t\\t\\t$tag = 'article';\\n\\t\\t\\t$add_below = 'comment';\\n\\t\\t} else {\\n\\t\\t\\t$tag = 'article';\\n\\t\\t\\t$add_below = 'comment';\\n\\t\\t} ?>\\n\\n\\t\\t
            id=\\\"comment-\\\" itemprop=\\\"comment\\\" itemscope itemtype=\\\"http://schema.org/Comment\\\">\\n\\t\\t\\t
            \\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\tcomment_approved == '0') :\\n\\t\\t\\t\\t\\t\\techo __('Your comment is awaiting moderation.', 'easydita_knowledge_portal');\\n\\t\\t\\t\\t\\tendif; ?>\\n\\t\\t\\t\\t
            \\n\\t\\t\\t
            \\n\\t\\t\\t
            \\n\\t\\t\\t\\t\\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>\\n\\t\\t\\t\\t
            \\n\\t\\t\\t
            \\n\\n\\tget('oid');\\n $ar['paperup']=$p->get('post');\\n $ar['datep']=date('Y-m-d H:i:s');\\n if(!XUser::isNobody()) {\\n $ar['whoa'] = XUser::get_current_user_uid();\\n }\\n parent::procInsert($ar);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"487381a5d439f3d5fc6f29e360484278\",\n \"score\": \"0.53750205\",\n \"text\": \"function gothic_comment($comment, $args, $depth) {\\n$GLOBALS['comment'] = $comment; ?>\\n
            \\n\\t
            \\n\\t\\t
            \\n\\t
            \\n\\t
            \\n\\t\\n\\t
            \\n\\tcomment_ID ) ) ?>\\\">\\n\\t\\n
            \\n
            \\n\\t
            \\\">\\n\\t
            \\n\\tcomment_approved == '0') : ?>\\n\\t\\t

            \\n\\t\\t
            \\n\\t\\n\\t\\t\\n\\t
            \\n\\t
            \\n\\t\\t $depth, 'max_depth' => $args['max_depth']))) ?>\\n\\t
            \\n
            \\nstreams->entries->get_entry($comment_id, 'comments', 'streams');\\n \\tif($comment->created_by == $this->current_user->id){\\t\\n \\t\\t$deleted = $this->streams->entries->delete_entry($comment_id, 'comments', 'streams');\\n \\t\\tif($deleted){\\n \\t\\t\\t$this->discuss->decrease_counter($comment->thread, $this->thread_table, 'total_komentar');\\n\\t \\t\\tif(!$for_ajax)\\n\\t\\t \\t\\tredirect(getenv('HTTP_REFERER'));\\n \\t\\t\\techo $deleted;\\t\\n \\t\\t}\\n \\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34752c7763991ff1949e3f7e6e2004a7\",\n \"score\": \"0.5359972\",\n \"text\": \"public function deleteComment ()\\n {\\n $idPost = $this->request->getSetting( 'idComment' );\\n $this->post->deleteComment( $idPost );\\n $this->redirect( 'Admin' , 'allComments/' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8888098a63d16cd9d8d66fa60d783df\",\n \"score\": \"0.5354615\",\n \"text\": \"function snowproblem_comment($comment, $args, $depth) {\\n\\t$GLOBALS['comment'] = $comment;\\n\\textract($args, EXTR_SKIP);\\n?>\\n\\t
            \\n\\t
            id=\\\"comment-\\\">\\n\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\n\\n\\t\\t
            \\n\\t\\t\\t\\n\\t\\t\\t\\t%s' ), get_comment_author_link() ); ?>\\n\\t\\t\\t\\n\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t
            \\n\\n\\t\\t
            \\n\\t\\t\\t\\n\\t\\t
            \\n\\n\\t\\t
            \\n\\t\\t\\t $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\\n\\t\\t
            \\n\\n\\t
            \\nforcePostRequest();\\n\\n $json = array();\\n $json['success'] = false; // default\\n\\n $id = (int) Yii::app()->request->getParam('id', \\\"\\\");\\n $className = Yii::app()->request->getParam('className', \\\"\\\");\\n\\n $object = Content::Get($className, $id);\\n if ($object != null && $object->content->canArchive()) {\\n $object->content->archive();\\n\\n $json['success'] = true;\\n $json['wallEntryIds'] = $object->content->getWallEntryIds();\\n }\\n\\n // returns JSON\\n echo CJSON::encode($json);\\n Yii::app()->end();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4482aae5f22c8502a7ab23ce997b3ac4\",\n \"score\": \"0.53401566\",\n \"text\": \"public function show(Comment $comment)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c33f33c38f9ab537856c4c680b7e85b\",\n \"score\": \"0.5336853\",\n \"text\": \"function cera_comment( $comment, $args, $depth ) {\\n\\t\\t// @codingStandardsIgnoreLine\\n\\t\\t$GLOBALS['comment'] = $comment;\\n\\n\\t\\tif ( 'pingback' === $comment->comment_type || 'trackback' === $comment->comment_type ) : ?>\\n\\n\\t\\t\\t
          • \\\" >\\n\\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t
            \\n\\n\\t\\t\\t
          • \\n\\n\\t\\t\\t\\n\\n\\t\\t
          • \\\" >\\n\\n\\t\\t\\t
            \\\" class=\\\"comment-main comment-main- row ml-0 mr-0 mb-md-0 mb-4 mt-0\\\">\\n\\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\t\\t\\tcomment_approved ) : ?>\\n\\t\\t\\t\\t\\t\\t\\t\\t

            \\n\\t\\t\\t\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t\\t\\t\\n\\n\\t\\t\\t\\t\\t\\t\\t 'div-comment',\\n\\t\\t\\t\\t\\t\\t\\t\\t'depth' => $depth,\\n\\t\\t\\t\\t\\t\\t\\t\\t'max_depth' => $args['max_depth'],\\n\\t\\t\\t\\t\\t\\t\\t\\t'before' => '',\\n\\t\\t\\t\\t\\t\\t\\t\\t'after' => '',\\n\\t\\t\\t\\t\\t\\t\\t) );\\n\\t\\t\\t\\t\\t\\t\\tcomment_reply_link( $args ); ?>\\n\\n\\t\\t\\t\\t\\t\\t\\t', '' ); ?>\\n\\n\\t\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t\\t
            \\n\\n\\t\\t\\t\\t
            \\n\\n\\t\\t\\t
            \\n\\n\\t\\t\\t\\n\\t\\t\\tsetPostID($_POST['postID']);\\n\\t$manager = new CommentManager();\\n\\t$try = $manager->addComment($comment);\\n\\theader(\\\"location:\\\". $_SERVER['HTTP_REFERER']);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fa4b26405cca6183a5db90d5584afb1\",\n \"score\": \"0.53280896\",\n \"text\": \"function bones_comments( $comment, $args, $depth ) {\\n $GLOBALS['comment'] = $comment; ?>\\n\\t
          • >\\n\\t\\t
            \\\" class=\\\"clearfix\\\">\\n\\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\\n\\t\\t\\t\\t?s=32\\\" class=\\\"load-gravatar avatar avatar-48 photo\\\" height=\\\"32\\\" width=\\\"32\\\" src=\\\"/library/images/nothing.gif\\\" />\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t%s', 'bonestheme' ), get_comment_author_link()) ?>\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\tcomment_approved == '0') : ?>\\n\\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\\t\\n\\t\\t\\t
            \\n\\t\\t\\t $depth, 'max_depth' => $args['max_depth']))) ?>\\n\\t\\t
            \\n\\t is added by WordPress automatically ?>\\n\\n\\t
          • >\\n\\t\\t
            \\\" class=\\\"clearfix\\\">\\n\\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\\n\\t\\t\\t\\t?s=32\\\" class=\\\"load-gravatar avatar avatar-48 photo\\\" height=\\\"32\\\" width=\\\"32\\\" src=\\\"/library/images/nothing.gif\\\" />\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t%s', 'bonestheme' ), get_comment_author_link()) ?>\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t
            \\n\\t\\t\\tcomment_approved == '0') : ?>\\n\\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\\t\\n\\t\\t\\t
            \\n\\t\\t\\t $depth, 'max_depth' => $args['max_depth']))) ?>\\n\\t\\t
            \\n\\t is added by WordPress automatically ?>\\ncomment_type ) :\\n\\t\\tcase 'pingback' :\\n\\t\\tcase 'trackback' :\\n\\t\\t// Display trackbacks differently than normal comments.\\n\\t\\t?>\\n\\t\\t
            \\\" >\\n\\t\\t\\t
            \\n\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t
            \\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\\t
            \\n\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\t%1$s %2$s :',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tget_comment_author_link(),\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t// If current post author is also comment author, make it known visually.\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t( $comment->user_id === $post->post_author ) ? '' . __( 'Post author', 'twentytwelve' ) . '' : ''\\n\\t\\t\\t\\t\\t\\t\\t\\t);\\n\\t\\t\\t\\t\\t\\t\\t\\tprintf( '',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tesc_url( get_comment_link( $comment->comment_ID ) ),\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tget_comment_time( 'c' ),\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t/* translators: 1: date, 2: time */\\n\\t\\t\\t\\t\\t\\t\\t\\t\\tsprintf( __( '%1$s %2$s', 'twentytwelve' ), get_comment_date(), get_comment_time() )\\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
            \\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\\t
            \\n\\t\\t\\t\\t\\t\\t\\t
            \\\" class=\\\"comment\\\">\\n\\t\\t\\t\\t\\t\\t\\t\\tcomment_approved ) : ?>\\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\\n\\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\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t
            \\n\\t\\t\\t\\t\\t\\t\\t\\t\\t __( 'Répondre', 'artscore_studio' ), 'after' => ' ', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>\\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
            \\n\\t\\t\\t\\n\\t\\t\\tdbConnect();\\n $req = $db->prepare('INSERT INTO comment(post_id, author, comment, comment_date) VALUES(:post_id, :author, :comment, NOW())');\\n $comments = $req->execute(array(\\n 'post_id' => $_GET['id'],\\n 'author' => $comment->getAuthor(),\\n 'comment' => $comment->getComments()\\n ));\\n } catch (\\\\PDOException $exception) {\\n var_dump($db->errorInfo());\\n die('Erreur : ' . $exception->getMessage());\\n }\\n\\n return $comments;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c65da1e7d89cf30047af0adcc6422c37\",\n \"score\": \"0.53166723\",\n \"text\": \"function vieddwCommentAction() {\\n // Traitement des parametres\\n $id_request_comment = $this->_request->getParam('id_request_comment');\\n\\n Zend_Loader::loadClass('Request');\\n $information = Request::viewComment($id_request_comment);\\n \\n $this->view->information = $information;\\n $this->view->comment = str_replace(\\\"\\\\'\\\", \\\"'\\\", $information->comment);\\n \\n $this->view->request = Request::getSummary($information->id_request);\\n \\n Zend_Loader::loadClass('User');\\n $this->view->user = User::getCompleteName($information->id_user);\\n\\n // Variables\\n $id_request = $information->id_request;\\n \\n // Requete\\n if ($this->_request->isPost()) {\\n // Traitement des variables POST\\n Zend_Loader::loadClass('Zend_Filter_StripTags');\\n $f = new Zend_Filter_StripTags();\\n $comment = $f->filter($this->_request->getPost('comment'));\\n \\n // Verification avant enregistrement\\n Zend_Loader::loadClass('Zend_Validate');\\n \\n $error = '';\\n \\n Zend_Loader::loadClass('Zend_Validate_NotEmpty');\\n $validator = new Zend_Validate_NotEmpty();\\n if (!$validator->isValid($comment)) {\\n $error .= 'Veuillez indiquer un commentaire
            ';\\n }\\n \\n // Enregistrement\\n if ($error) {\\n $this->view->error = $error;\\n } else {\\n // Enregistrement\\n Zend_Loader::loadClass('Request');\\n Request::updateComment($id_request_comment, $comment);\\n\\n // Redirection\\n $this->_redirect($this->baseUrl.'/request/view/'.$id_request);\\n }\\n }\\n \\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39a7e45195d8b02fe515113496b38eb7\",\n \"score\": \"0.5311658\",\n \"text\": \"private function AddComment()\\n\\t{\\n\\t\\tglobal $DB;\\n\\t\\t$arNotification = $this->Notify->getNotification();\\n\\n\\t\\t$arLog = CSocNetLog::GetList(\\n\\t\\t\\tarray(\\\"ID\\\" => \\\"DESC\\\"),\\n\\t\\t\\tarray(\\n\\t\\t\\t\\t\\\"ENTITY_TYPE\\\" => SONET_ENTITY_USER,\\n\\t\\t\\t\\t\\\"EVENT_ID\\\" => \\\"idea\\\",\\n\\t\\t\\t\\t\\\"SOURCE_ID\\\" => $arNotification[\\\"POST_ID\\\"]),\\n\\t\\t\\tfalse,\\n\\t\\t\\tfalse,\\n\\t\\t\\tarray(\\\"ID\\\", \\\"RATING_ENTITY_ID\\\")\\n\\t\\t)->Fetch();\\n\\n\\t\\tif($arLog)\\n\\t\\t{\\n\\t\\t\\t$arNotify = Array(\\n\\t\\t\\t\\t\\\"EVENT_ID\\\" => \\\"idea_comment\\\",\\n\\t\\t\\t\\t\\\"URL\\\" => $arNotification[\\\"PATH\\\"],\\n\\t\\t\\t\\t\\\"MESSAGE\\\" => $arNotification[\\\"POST_TEXT\\\"],\\n\\t\\t\\t\\t\\\"SOURCE_ID\\\" => $arNotification[\\\"ID\\\"],\\n\\t\\t\\t\\t\\\"ENTITY_TYPE\\\" => SONET_ENTITY_USER,\\n\\t\\t\\t\\t\\\"ENTITY_ID\\\" => $arNotification[\\\"AUTHOR_ID\\\"],\\n\\t\\t\\t\\t\\\"USER_ID\\\" => $arNotification[\\\"AUTHOR_ID\\\"],\\n\\t\\t\\t\\t\\\"MODULE_ID\\\" => 'idea',\\n\\t\\t\\t\\t\\\"LOG_ID\\\" => $arLog[\\\"ID\\\"],\\n\\t\\t\\t);\\n\\n\\t\\t\\tif (isset($arNotification[\\\"LOG_DATE\\\"]))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$arNotify[\\\"LOG_DATE\\\"] = $arNotification[\\\"LOG_DATE\\\"];\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t$arNotify[\\\"=LOG_DATE\\\"] = $DB->CurrentTimeFunction();\\n\\t\\t\\t}\\n\\n\\t\\t\\tif($arLog[\\\"RATING_ENTITY_ID\\\"]>0)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$arNotify[\\\"RATING_ENTITY_ID\\\"] = $arNotification[\\\"ID\\\"];\\n\\t\\t\\t\\t$arNotify[\\\"RATING_TYPE_ID\\\"] = \\\"BLOG_COMMENT\\\";\\n\\t\\t\\t}\\n\\n\\t\\t\\tif($arNotification[\\\"ACTION\\\"] == \\\"ADD\\\")\\n\\t\\t\\t{\\n\\t\\t\\t\\t$LogCommentID = CSocNetLogComments::Add($arNotify, false, false);\\n\\t\\t\\t\\tCSocNetLog::CounterIncrement($LogCommentID, false, false, \\\"LC\\\");\\n\\t\\t\\t}\\n\\t\\t\\telseif($arNotification[\\\"ACTION\\\"] == \\\"UPDATE\\\")\\n\\t\\t\\t{\\n\\t\\t\\t\\t$arLogComment = CSocNetLogComments::GetList(\\n\\t\\t\\t\\t\\tarray(\\\"ID\\\" => \\\"DESC\\\"),\\n\\t\\t\\t\\t\\tarray(\\n\\t\\t\\t\\t\\t\\t\\\"ENTITY_TYPE\\\" => SONET_ENTITY_USER,\\n\\t\\t\\t\\t\\t\\t\\\"EVENT_ID\\\" => \\\"idea_comment\\\",\\n\\t\\t\\t\\t\\t\\t\\\"SOURCE_ID\\\" => $arNotification[\\\"ID\\\"]),\\n\\t\\t\\t\\t\\tfalse,\\n\\t\\t\\t\\t\\tfalse,\\n\\t\\t\\t\\t\\tarray(\\\"ID\\\")\\n\\t\\t\\t\\t)->Fetch();\\n\\n\\t\\t\\t\\tif($arLogComment)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tunset($arNotify[\\\"USER_ID\\\"]);\\n\\t\\t\\t\\t\\t$LogCommentID = CSocNetLogComments::Update($arLogComment[\\\"ID\\\"], $arNotify);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn $LogCommentID>0;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6ee0b5e5f6d5b9fd575809d6a8029cd\",\n \"score\": \"0.5304038\",\n \"text\": \"function bones_comments( $comment, $args, $depth ) {\\n $GLOBALS['comment'] = $comment; ?>\\n
            \\\" >\\n
            \\n
            \\n ' );\\n */\\n ?>\\n \\n \\n ?s=40\\\" class=\\\"load-gravatar avatar avatar-48 photo\\\" height=\\\"40\\\" width=\\\"40\\\" src=\\\"/library/images/nothing.gif\\\" />\\n \\n %1$s %2$s', 'bonestheme' ), get_comment_author_link(), edit_comment_link(__( '(Edit)', 'bonestheme' ),' ','') ) ?>\\n \\n\\n
            \\n comment_approved == '0') : ?>\\n
            \\n

            \\n
            \\n \\n
            \\n \\n
            \\n $depth, 'max_depth' => $args['max_depth']))) ?>\\n
            \\n is added by WordPress automatically ?>\\npostComment($postId, $author, $comment);\\r\\n\\r\\n if ($affectedLines === false) {\\r\\n throw new Exception('Impossible d\\\\'ajouter le commentaire !');\\r\\n } else {\\r\\n header('Location: ' .$GLOBALS['nomDeDomaine']. '?url=post&id=' . $postId);\\r\\n }\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a669856bc1e76200058a253d16e1bdb\",\n \"score\": \"0.5299247\",\n \"text\": \"function sumerian_comment( $comment, $args, $depth ) {\\n switch ( $comment->comment_type ) :\\n case 'pingback' :\\n case 'trackback' :\\n // Display trackbacks differently than normal comments.\\n ?>\\n
          • id=\\\"comment-\\\">\\n

            ', '' ); ?>

            \\n \\n
          • id=\\\"li-comment-\\\">\\n
            \\\" class=\\\"comment clearfix\\\">\\n\\n \\n\\n
            \\n\\n
            \\n %1$s %2$s',\\n get_comment_author_link(),\\n // If current post author is also comment author, make it known visually.\\n ( $comment->user_id === $post->post_author ) ? '' . __( 'Post author', 'sumerian' ) . '' : ''\\n );\\n printf( '',\\n esc_url( get_comment_link( $comment->comment_ID ) ),\\n get_comment_time( 'c' ),\\n /* translators: 1: date, 2: time */\\n get_comment_date()\\n );\\n comment_reply_link( array_merge( $args, array( 'reply_text' => __( 'Reply', 'sumerian' ), 'after' => '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) );\\n edit_comment_link( __( 'Edit', 'sumerian' ), '', '' );\\n ?>\\n
            \\n\\n comment_approved ) : ?>\\n

            \\n \\n\\n
            \\n \\n \\n
            \\n\\n
            \\n\\n
            \\n di->get(\\\"page\\\");\\n $request = $this->di->get(\\\"request\\\");\\n $session = $this->di->get(\\\"session\\\");\\n $response = $this->di->get(\\\"response\\\");\\n\\n $question = new Question();\\n $question->setDb($this->di->get(\\\"dbqb\\\"));\\n\\n $id = $request->getGet(\\\"id\\\", null);\\n $question = $question->getSingleQById($id);\\n\\n $login = $session->get(\\\"login\\\");\\n if ($login) {\\n $form = new CreateCommentForm($this->di);\\n $form->check();\\n\\n $page->add(\\\"questions/singleqoraforcomment\\\", [\\n \\\"newComment\\\" => $form->getHTML(),\\n \\\"question\\\" => $question,\\n ]);\\n\\n return $page->render([\\n \\\"title\\\" => \\\"New comment\\\",\\n ]);\\n }\\n //If not logged in, return to Q\\n return $response->redirect(\\\"q/showq?id=$id\\\");\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":774,"cells":{"query_id":{"kind":"string","value":"07ae77acec9374c4891afd15f8ae307f"},"query":{"kind":"string","value":"Rachitha:this function will give topcards."},"positive_passages":{"kind":"list like","value":[{"docid":"670b9ce2905e11bd546562723d59c7e7","score":"0.0","text":"function filter_top_cards($icon,$cardtitle,$data,$color){\n global $DB, $OUTPUT;\n $cardarray=[\n 'cards' =>array(\"hascard\"=>1,\n 'icon' =>$icon,\n 'cardtitle' =>strtoupper($cardtitle),\n 'data' =>$data,\n 'color' =>$color)];\n\n return $OUTPUT->render_from_template('local_deptrpts/card', $cardarray);\n }","title":""}],"string":"[\n {\n \"docid\": \"670b9ce2905e11bd546562723d59c7e7\",\n \"score\": \"0.0\",\n \"text\": \"function filter_top_cards($icon,$cardtitle,$data,$color){\\n global $DB, $OUTPUT;\\n $cardarray=[\\n 'cards' =>array(\\\"hascard\\\"=>1,\\n 'icon' =>$icon,\\n 'cardtitle' =>strtoupper($cardtitle),\\n 'data' =>$data,\\n 'color' =>$color)];\\n\\n return $OUTPUT->render_from_template('local_deptrpts/card', $cardarray);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"841795e327d045775881f1d44ca5c2f6","score":"0.57414246","text":"function supercard($pid){\n\t\n\t$playerstats = get_player_data($pid);\n\t$info = get_player_basic_info($pid);\n\t$firstname = $info[0]['first'];\n\t$lastname = $info[0]['last'];\n\t$position = $info[0]['position'];\n\n\t$getpotw = get_player_of_week();\n\t$thecount = array_count_values($getpotw);\n\n\t$plpotw = $totalpotw[$pid];\n\tif(is_array($sumpotw)){\n\t\t$sumpotw = array_sum($plpotw);\n\t}\n\t\n\t$career = get_player_career_stats($pid);\n\t$pbapps = array();\n\t$playerchamps = array();\n\t$printawards = array();\n\t\n\t$playerimgobj = get_attachment_url_by_slug($pid);\n\t$imgid = attachment_url_to_postid( $playerimgobj );\n\t$image_attributes = wp_get_attachment_image_src($imgid, array( 100, 100 ));\t\n\t$playerimg = $image_attributes[0];\n $teamsbyid = teamlist();\n\t$honorring = get_ring_of_honor();\n\t\n\t$justchamps = get_just_champions();\n\t$teams = get_teams();\n\t$teamslist = get_player_teams_season($pid);\n\t\t\t\t\t\t\n\t$get = playerplayoffs($pid);\n\t\n\tif(!empty($get)){\n\t\tforeach($get as $key => $value){\n\t\t\tif($value['week'] == 16){\n\t\t\t\t$pbapps[$value['year']] = $value['team'];\n\t\t\t}\n\t\t}\n\t}\n\t\n\tforeach ($pbapps as $key => $value){\n\t\tif ($value == $justchamps[$key]){\n\t\t\t$playerchamps[$key] = $value;\n\t\t}\n\t}\n\n\t$plawards = get_player_award($pid);\n\t\n\tif(!empty($plawards)){\n\t\tforeach ($plawards as $key => $value){\n\t\t\tif ($value['award'] != 'Hall of Fame Inductee'){\n\t\t\t\t$printawards[] = $value['awardid'];\n\t\t\t}\n\t\t}\n\t}\n\n\t$number_ones = get_number_ones();\n\t$halloffame = get_award_hall();\n\t$gamesbyteam = get_player_team_games($pid);\n\t\n\t\techo '
            ';\n\t\t\techo '
            ';\n\t\t\t\techo '
            ';\n\t\t\t\t\techo '

            Posse Football League

            ';\n\t\t\t\techo '
            ';\n\t\t\t\t\n\t\t\t\techo '
            ';\n\t\t\t\t\techo ''.$firstname.' '.$lastname.'&nbsp;'.$position;\n\t\t\t\t\tif($info[0]['height'] != ''):\n\t\t\t\t\t\techo '

            '.$info[0]['height'].', '.$info[0]['weight'].' lbs. | '.$info[0]['college'].' | #'.$info[0]['number'].'

            ';\n\t\t\t\t\tendif;\n\t\t\t\t//echo '';\n if($playerimg):\n\t\t\t\t echo '\"Profile';\n endif;\n ?>\n $value):\n if ($r == 0):\n $string .= ''.$teams[$key]['team'].', ';\n else:\n $string .= $teams[$key]['team'].', ';\n endif;\n $r++;\n endforeach;\n echo 'PFL Teams: '.substr($string, 0, -2);\n endif;\n ?>\n\n\t\t\t\t
            \n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\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\n\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\n\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\n\t\t\t\t\t\t 0){\t\n\t\t\t\t\t\t\t$end = end($career['years']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($st != $end){\t?>\n\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\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\n\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\n\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\n\t\t\t\t\t\n\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\n\t\t\t\t\t\n\t\t\t\t\t $value){\n\t\t\t\t\t\t\tif ($value['playerid'] == $pid){\n\t\t\t\t\t\t\t\t$player_number_ones[$key] = array(\n\t\t\t\t\t\t\t\t\t'id' => $value['id'],\n\t\t\t\t\t\t\t\t\t'points' => $value['points'],\n\t\t\t\t\t\t\t\t\t'team' => $value['teams']\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\t\n\t\t\t\t\t\tif(!empty($player_number_ones)){?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\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\n\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\t\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\n\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\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t
            Points Scored 0){ echo number_format($career['points'],0); } else {echo 0; } ?>
            Games Played 0){ echo $career['games']; } else { echo 0; } ?>
            Position Rank
            SeasonsSeason
            Points Per Game
            Career High
            Career Awards\n\t\t\t\t\t\t\t';\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\t}?>\n\t\t\t\t\t\t
            Position Scoring Titles\n\t\t\t\t\t\t\t';\n\t\t\t\t\n\t\t\t\t\t\t\t\t}?>\n\t\t\t\t\t\t\t
            Player of The Week Time Times
            Posse Bowl Appearances\n\t\t\t\t\t\t\t $value){\n\t\t\t\t\t\t\t\t\techo $key.' - '.$teams[$value]['team'].'
            ';\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
            PFL Championships\n\t\t\t\t\t\t\t $value){\n\t\t\t\t\t\t\t\t\techo $key.' - '.$teams[$value]['team'].'
            ';\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
            \n\t\t\t\t\t&nbsp;Inducted into the PFL Hall of Fame
      • ';\n endif;\n\t\t\t\t\t\tif(in_array($pid, $honorring)):\n $pidkey = array_search ($pid, $honorring);\n\t\t\t\t\t\t $honorteam = substr($pidkey, 0,3);\n echo '
        '.$teamsbyid[$honorteam].' Ring of Honor
        ';\n endif;\n echo '
        ';\n\n\t\t\t//TEMPORARY TO BUILD OLD PLAYER INFO DATA\n\t\t\tif($info[0]['weight'] == ''):\n\t\t\t\tif($position == 'PK'):\n\t\t\t\t\techo 'INDEX LINK';\n\t\t\t\tendif;\n\t\t\tendif;\n\t\t\t\n\t\techo '
      • ';\n\t\t\n\t\techo '
  • ';\n\t\techo '
    ';\n\n}","title":""},{"docid":"8ff3c867429f177c3f5f35c0c466df48","score":"0.5646972","text":"public function getICards();","title":""},{"docid":"68dce60066a2d6b11342f4c9b21d4487","score":"0.5501153","text":"public function getCards()\n {\n }","title":""},{"docid":"828ca849511c91d0777187386c0793cd","score":"0.5495686","text":"public function getSortoutCards() : array;","title":""},{"docid":"634af0e6b176178d47bbdb3c26dba351","score":"0.5448515","text":"protected function mappingCards(){\n\t\tfor($chairId=1;$chairId <= $this->chairAmount;$chairId++){\n\n\t\t\t$cards = $this->detailCards[$chairId]['single'];\n\n\t\t\t//cari kartu jendral\n\t\t\t$jendralCards = $this->getJendralCards($cards);\n\t\t\tif($jendralCards){\n\t\t\t\t$this->detailCards[$chairId]['jendral']=$jendralCards;\n\t\t\t\tforeach($jendralCards as $v){\n\t\t\t\t\t$cards=array_diff($cards,$v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//cari kartu urut 4 kartu\n\t\t\t$fourSeriesCards = $this->getFourSeriesCards($cards);\n\t\t\tif($fourSeriesCards){\n\t\t\t\t$this->detailCards[$chairId]['fourSeries']=$fourSeriesCards;\n\t\t\t\tforeach($fourSeriesCards as $v){\n\t\t\t\t\t$cards=array_diff($cards,$v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//cari kartu urut 3 kartu\n\t\t\t$treeSeriesCards = $this->getTreeSeriesCards($cards);\n\t\t\tif($treeSeriesCards){\n\t\t\t\t$this->detailCards[$chairId]['treeSeries']=$treeSeriesCards;\n\t\t\t\tforeach($treeSeriesCards as $v){\n\t\t\t\t\t$cards=array_diff($cards,$v);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//cari kartu tree\n\t\t\t$treeCards = $this->getTreeCards($cards);\n\t\t\tif($treeCards){\n\t\t\t\t$this->detailCards[$chairId]['tree']=$treeCards;\n\t\t\t\tforeach($treeCards as $v){\n\t\t\t\t\t$cards=array_diff($cards,$v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->detailCards[$chairId]['single'] = $cards;\n\t\t}\n\t}","title":""},{"docid":"bce68ea547f40ac2be18e29bb360bdae","score":"0.5426097","text":"private function distribute()\n {\n // A,2-9,X,J,Q,K\n $this->loadmodel('Cards');\n $deck = $this->Cards->find();\n\n $player_and_cards = array();\n foreach($deck as $eachCard) {\n \n // distribute each card to random player\n $player_to_distribute = rand(1,$this->players);\n $card = ($eachCard['suit'].'-'.$eachCard['card_number']);\n if (!isset($player_and_cards[$player_to_distribute]['cards'])) {\n $player_and_cards[$player_to_distribute]['cards'] = array();\n }\n array_push($player_and_cards[$player_to_distribute]['cards'], $card);\n }\n\n // dd($player_and_cards);\n $this->request->getSession()->write('cards', $player_and_cards);\n $this->redirect(['controller' => 'Pages', 'action' => 'display', 'index']);\n \n }","title":""},{"docid":"8274f866ea72e7fb89e9becd95bc10c9","score":"0.53157175","text":"public function getHoleCards(){\n\t\treturn array($this->dealCard(), $this->dealCard());\n\t}","title":""},{"docid":"b7b711226b9ab1bd0d6ad85f8056365b","score":"0.5313573","text":"public function createJourney(): array\n {\n $boardingCards = $this->boardingCards->getBoardingCards();\n\n $sortedBoardingCards = $this->arraySorter($boardingCards);\n\n return $sortedBoardingCards;\n }","title":""},{"docid":"a354a668b8886342f9d4a9a6a4ced410","score":"0.5228113","text":"public function get_hands() {\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$hand = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif (isset($card['place']['value']) && \r\n\t\t\t\t$card['place']['value'] == 'hand') {\r\n\t\t\t\tarray_push($hand, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hand;\r\n\t}","title":""},{"docid":"ae7850c033f82190579d5e3d235a84d2","score":"0.5195402","text":"public function getFiveCards() : array;","title":""},{"docid":"056c66534d084bda2d8b0e8932926451","score":"0.5173233","text":"public function dealICards();","title":""},{"docid":"4e2b5e59b9188fa546dd71028e9a2b4b","score":"0.51257366","text":"public function cards()\n {\n //creating array of cardzz\n $cardzz = [];\n $i = 0; //taking temp var and intializing to 0\n for ($x = 0; $x < count($this->suite); $x++) {\n\n for ($y = 0; $y < count($this->rank); $y++) {\n\n //adding all the data into the cardzz array\n $cardzz[$i++] = $this->rank[$y] . \",\" . $this->suite[$x];\n\n }\n }\n return $cardzz;\n }","title":""},{"docid":"29bef98939264d1a991756a147cb7ac7","score":"0.5112266","text":"function generate_crommosom() {\n $numb = 0;\n while($numb < $this->num_crommosom) { //diulang sesuai jumlah kromosom yang diinputkan\n $cro = $this->get_rand_crommosom(); \n $this->crommosom[] = $cro; \n $this->fitness[] = 0; \n $numb++;\n } \n //print_r($this->fitness);\n }","title":""},{"docid":"8e1ddf0827494788569ccaed3bc7881e","score":"0.5096745","text":"function stGiveCards()\n {\n $this->gamestate->setAllPlayersMultiactive();\n\t\t// (and keep the current sentence builder non-active)\n\t\t$active_player_id = self::getGameStateValue( 'playerBuildingSentence' );\n $this->gamestate->setPlayerNonMultiactive( $active_player_id , \"giveCards\" );\n $players = self::loadPlayersBasicInfos();\t\n // give everybody except the active player time to choose cards \n foreach( $players as $player_id => $player ) {\n\n if ($player_id != $active_player_id) {\n $this-> giveExtraTime( $player_id);\n \n }\n }\n\n }","title":""},{"docid":"0134b14db0fc5e76506a302caaf10567","score":"0.50958425","text":"function generate_crommosom() {\r\n $numb = 0;\r\n while($numb < $this->num_crommosom) { //diulang sesuai jumlah kromosom yang diinputkan\r\n $cro = $this->get_rand_crommosom(); \r\n $this->crommosom[] = $cro; \r\n $this->fitness[] = 0; \r\n $numb++;\r\n } \r\n //print_r($this->fitness);\r\n }","title":""},{"docid":"54556f83e2796190d8f1e2ba5c72f4e5","score":"0.5077199","text":"function pmp_get_creators() {\n\treturn array(\n\t\t'APM' => '98bf597a-2a6f-446c-9b7e-d8ae60122f0d',\n\t\t'NPR' => '6140faf0-fb45-4a95-859a-070037fafa01',\n\t\t'PBS' => 'fc53c568-e939-4d9c-86ea-c2a2c70f1a99',\n\t\t'PRI' => '7a865268-c9de-4b27-a3c1-983adad90921',\n\t\t'PRX' => '609a539c-9177-4aa7-acde-c10b77a6a525'\n\t);\n}","title":""},{"docid":"33edb8e50a49db5d0f6a173dfa867377","score":"0.5042517","text":"function getCards() {\n $query = \"select * from pkr_card where game=\" . $this->curr_game . \" order by seq\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }","title":""},{"docid":"10f5929044e4a5f79b017a7b742bb507","score":"0.5041633","text":"public function calculateAllPossibilitiesProvider()\n {\n return array(\n array(\n new Subject(\n array(\n 'name' => 'Mario',\n 'surname' => 'Rossi',\n 'birthDate' => '1985-12-10',\n 'gender' => 'M',\n 'belfioreCode' => 'A562',\n )\n ),\n array(\n 'RSSMRA85T10A562S',\n 'RSSMRA85T10A56NH',\n 'RSSMRA85T10A5S2E',\n 'RSSMRA85T10A5SNT',\n 'RSSMRA85T10AR62N',\n 'RSSMRA85T10AR6NC',\n 'RSSMRA85T10ARS2Z',\n 'RSSMRA85T10ARSNO',\n 'RSSMRA85T1LA562V',\n 'RSSMRA85T1LA56NK',\n 'RSSMRA85T1LA5S2H',\n 'RSSMRA85T1LA5SNW',\n 'RSSMRA85T1LAR62Q',\n 'RSSMRA85T1LAR6NF',\n 'RSSMRA85T1LARS2C',\n 'RSSMRA85T1LARSNR',\n 'RSSMRA85TM0A562D',\n 'RSSMRA85TM0A56NS',\n 'RSSMRA85TM0A5S2P',\n 'RSSMRA85TM0A5SNE',\n 'RSSMRA85TM0AR62Y',\n 'RSSMRA85TM0AR6NN',\n 'RSSMRA85TM0ARS2K',\n 'RSSMRA85TM0ARSNZ',\n 'RSSMRA85TMLA562G',\n 'RSSMRA85TMLA56NV',\n 'RSSMRA85TMLA5S2S',\n 'RSSMRA85TMLA5SNH',\n 'RSSMRA85TMLAR62B',\n 'RSSMRA85TMLAR6NQ',\n 'RSSMRA85TMLARS2N',\n 'RSSMRA85TMLARSNC',\n 'RSSMRA8RT10A562E',\n 'RSSMRA8RT10A56NT',\n 'RSSMRA8RT10A5S2Q',\n 'RSSMRA8RT10A5SNF',\n 'RSSMRA8RT10AR62Z',\n 'RSSMRA8RT10AR6NO',\n 'RSSMRA8RT10ARS2L',\n 'RSSMRA8RT10ARSNA',\n 'RSSMRA8RT1LA562H',\n 'RSSMRA8RT1LA56NW',\n 'RSSMRA8RT1LA5S2T',\n 'RSSMRA8RT1LA5SNI',\n 'RSSMRA8RT1LAR62C',\n 'RSSMRA8RT1LAR6NR',\n 'RSSMRA8RT1LARS2O',\n 'RSSMRA8RT1LARSND',\n 'RSSMRA8RTM0A562P',\n 'RSSMRA8RTM0A56NE',\n 'RSSMRA8RTM0A5S2B',\n 'RSSMRA8RTM0A5SNQ',\n 'RSSMRA8RTM0AR62K',\n 'RSSMRA8RTM0AR6NZ',\n 'RSSMRA8RTM0ARS2W',\n 'RSSMRA8RTM0ARSNL',\n 'RSSMRA8RTMLA562S',\n 'RSSMRA8RTMLA56NH',\n 'RSSMRA8RTMLA5S2E',\n 'RSSMRA8RTMLA5SNT',\n 'RSSMRA8RTMLAR62N',\n 'RSSMRA8RTMLAR6NC',\n 'RSSMRA8RTMLARS2Z',\n 'RSSMRA8RTMLARSNO',\n 'RSSMRAU5T10A562P',\n 'RSSMRAU5T10A56NE',\n 'RSSMRAU5T10A5S2B',\n 'RSSMRAU5T10A5SNQ',\n 'RSSMRAU5T10AR62K',\n 'RSSMRAU5T10AR6NZ',\n 'RSSMRAU5T10ARS2W',\n 'RSSMRAU5T10ARSNL',\n 'RSSMRAU5T1LA562S',\n 'RSSMRAU5T1LA56NH',\n 'RSSMRAU5T1LA5S2E',\n 'RSSMRAU5T1LA5SNT',\n 'RSSMRAU5T1LAR62N',\n 'RSSMRAU5T1LAR6NC',\n 'RSSMRAU5T1LARS2Z',\n 'RSSMRAU5T1LARSNO',\n 'RSSMRAU5TM0A562A',\n 'RSSMRAU5TM0A56NP',\n 'RSSMRAU5TM0A5S2M',\n 'RSSMRAU5TM0A5SNB',\n 'RSSMRAU5TM0AR62V',\n 'RSSMRAU5TM0AR6NK',\n 'RSSMRAU5TM0ARS2H',\n 'RSSMRAU5TM0ARSNW',\n 'RSSMRAU5TMLA562D',\n 'RSSMRAU5TMLA56NS',\n 'RSSMRAU5TMLA5S2P',\n 'RSSMRAU5TMLA5SNE',\n 'RSSMRAU5TMLAR62Y',\n 'RSSMRAU5TMLAR6NN',\n 'RSSMRAU5TMLARS2K',\n 'RSSMRAU5TMLARSNZ',\n 'RSSMRAURT10A562B',\n 'RSSMRAURT10A56NQ',\n 'RSSMRAURT10A5S2N',\n 'RSSMRAURT10A5SNC',\n 'RSSMRAURT10AR62W',\n 'RSSMRAURT10AR6NL',\n 'RSSMRAURT10ARS2I',\n 'RSSMRAURT10ARSNX',\n 'RSSMRAURT1LA562E',\n 'RSSMRAURT1LA56NT',\n 'RSSMRAURT1LA5S2Q',\n 'RSSMRAURT1LA5SNF',\n 'RSSMRAURT1LAR62Z',\n 'RSSMRAURT1LAR6NO',\n 'RSSMRAURT1LARS2L',\n 'RSSMRAURT1LARSNA',\n 'RSSMRAURTM0A562M',\n 'RSSMRAURTM0A56NB',\n 'RSSMRAURTM0A5S2Y',\n 'RSSMRAURTM0A5SNN',\n 'RSSMRAURTM0AR62H',\n 'RSSMRAURTM0AR6NW',\n 'RSSMRAURTM0ARS2T',\n 'RSSMRAURTM0ARSNI',\n 'RSSMRAURTMLA562P',\n 'RSSMRAURTMLA56NE',\n 'RSSMRAURTMLA5S2B',\n 'RSSMRAURTMLA5SNQ',\n 'RSSMRAURTMLAR62K',\n 'RSSMRAURTMLAR6NZ',\n 'RSSMRAURTMLARS2W',\n 'RSSMRAURTMLARSNL',\n ),\n ),\n array(\n new Subject(\n array(\n 'name' => 'Roberto',\n 'surname' => 'Santi',\n 'birthDate' => '1963-05-08',\n 'gender' => 'M',\n 'belfioreCode' => 'H501',\n )\n ),\n array(\n 'SNTRRT63E08H501T',\n 'SNTRRT63E08H50ML',\n 'SNTRRT63E08H5L1E',\n 'SNTRRT63E08H5LMW',\n 'SNTRRT63E08HR01O',\n 'SNTRRT63E08HR0MG',\n 'SNTRRT63E08HRL1Z',\n 'SNTRRT63E08HRLMR',\n 'SNTRRT63E0UH501Q',\n 'SNTRRT63E0UH50MI',\n 'SNTRRT63E0UH5L1B',\n 'SNTRRT63E0UH5LMT',\n 'SNTRRT63E0UHR01L',\n 'SNTRRT63E0UHR0MD',\n 'SNTRRT63E0UHRL1W',\n 'SNTRRT63E0UHRLMO',\n 'SNTRRT63EL8H501E',\n 'SNTRRT63EL8H50MW',\n 'SNTRRT63EL8H5L1P',\n 'SNTRRT63EL8H5LMH',\n 'SNTRRT63EL8HR01Z',\n 'SNTRRT63EL8HR0MR',\n 'SNTRRT63EL8HRL1K',\n 'SNTRRT63EL8HRLMC',\n 'SNTRRT63ELUH501B',\n 'SNTRRT63ELUH50MT',\n 'SNTRRT63ELUH5L1M',\n 'SNTRRT63ELUH5LME',\n 'SNTRRT63ELUHR01W',\n 'SNTRRT63ELUHR0MO',\n 'SNTRRT63ELUHRL1H',\n 'SNTRRT63ELUHRLMZ',\n 'SNTRRT6PE08H501F',\n 'SNTRRT6PE08H50MX',\n 'SNTRRT6PE08H5L1Q',\n 'SNTRRT6PE08H5LMI',\n 'SNTRRT6PE08HR01A',\n 'SNTRRT6PE08HR0MS',\n 'SNTRRT6PE08HRL1L',\n 'SNTRRT6PE08HRLMD',\n 'SNTRRT6PE0UH501C',\n 'SNTRRT6PE0UH50MU',\n 'SNTRRT6PE0UH5L1N',\n 'SNTRRT6PE0UH5LMF',\n 'SNTRRT6PE0UHR01X',\n 'SNTRRT6PE0UHR0MP',\n 'SNTRRT6PE0UHRL1I',\n 'SNTRRT6PE0UHRLMA',\n 'SNTRRT6PEL8H501Q',\n 'SNTRRT6PEL8H50MI',\n 'SNTRRT6PEL8H5L1B',\n 'SNTRRT6PEL8H5LMT',\n 'SNTRRT6PEL8HR01L',\n 'SNTRRT6PEL8HR0MD',\n 'SNTRRT6PEL8HRL1W',\n 'SNTRRT6PEL8HRLMO',\n 'SNTRRT6PELUH501N',\n 'SNTRRT6PELUH50MF',\n 'SNTRRT6PELUH5L1Y',\n 'SNTRRT6PELUH5LMQ',\n 'SNTRRT6PELUHR01I',\n 'SNTRRT6PELUHR0MA',\n 'SNTRRT6PELUHRL1T',\n 'SNTRRT6PELUHRLML',\n 'SNTRRTS3E08H501Q',\n 'SNTRRTS3E08H50MI',\n 'SNTRRTS3E08H5L1B',\n 'SNTRRTS3E08H5LMT',\n 'SNTRRTS3E08HR01L',\n 'SNTRRTS3E08HR0MD',\n 'SNTRRTS3E08HRL1W',\n 'SNTRRTS3E08HRLMO',\n 'SNTRRTS3E0UH501N',\n 'SNTRRTS3E0UH50MF',\n 'SNTRRTS3E0UH5L1Y',\n 'SNTRRTS3E0UH5LMQ',\n 'SNTRRTS3E0UHR01I',\n 'SNTRRTS3E0UHR0MA',\n 'SNTRRTS3E0UHRL1T',\n 'SNTRRTS3E0UHRLML',\n 'SNTRRTS3EL8H501B',\n 'SNTRRTS3EL8H50MT',\n 'SNTRRTS3EL8H5L1M',\n 'SNTRRTS3EL8H5LME',\n 'SNTRRTS3EL8HR01W',\n 'SNTRRTS3EL8HR0MO',\n 'SNTRRTS3EL8HRL1H',\n 'SNTRRTS3EL8HRLMZ',\n 'SNTRRTS3ELUH501Y',\n 'SNTRRTS3ELUH50MQ',\n 'SNTRRTS3ELUH5L1J',\n 'SNTRRTS3ELUH5LMB',\n 'SNTRRTS3ELUHR01T',\n 'SNTRRTS3ELUHR0ML',\n 'SNTRRTS3ELUHRL1E',\n 'SNTRRTS3ELUHRLMW',\n 'SNTRRTSPE08H501C',\n 'SNTRRTSPE08H50MU',\n 'SNTRRTSPE08H5L1N',\n 'SNTRRTSPE08H5LMF',\n 'SNTRRTSPE08HR01X',\n 'SNTRRTSPE08HR0MP',\n 'SNTRRTSPE08HRL1I',\n 'SNTRRTSPE08HRLMA',\n 'SNTRRTSPE0UH501Z',\n 'SNTRRTSPE0UH50MR',\n 'SNTRRTSPE0UH5L1K',\n 'SNTRRTSPE0UH5LMC',\n 'SNTRRTSPE0UHR01U',\n 'SNTRRTSPE0UHR0MM',\n 'SNTRRTSPE0UHRL1F',\n 'SNTRRTSPE0UHRLMX',\n 'SNTRRTSPEL8H501N',\n 'SNTRRTSPEL8H50MF',\n 'SNTRRTSPEL8H5L1Y',\n 'SNTRRTSPEL8H5LMQ',\n 'SNTRRTSPEL8HR01I',\n 'SNTRRTSPEL8HR0MA',\n 'SNTRRTSPEL8HRL1T',\n 'SNTRRTSPEL8HRLML',\n 'SNTRRTSPELUH501K',\n 'SNTRRTSPELUH50MC',\n 'SNTRRTSPELUH5L1V',\n 'SNTRRTSPELUH5LMN',\n 'SNTRRTSPELUHR01F',\n 'SNTRRTSPELUHR0MX',\n 'SNTRRTSPELUHRL1Q',\n 'SNTRRTSPELUHRLMI',\n ),\n ),\n );\n }","title":""},{"docid":"ccbdc7088a4ebdadd9d10fc507b37b86","score":"0.5028845","text":"public function getFinishRewards() \n {/*\n $conf = Common::getConfig('FinishRewards');\n \n $oUser = User::getById(Controller::$uId);\n $oEvent = Event::getById(Controller::$uId);\n $maxPearFlower = Common::getConfig('General','PearFlowerInfo','maxgetPearFlower');\n $rand_Id = $this->newRandom($conf);\n do\n {\n $gifId = $this->newRandom($conf[$rand_Id]['Rewards']);\n }\n while($conf[$rand_Id]['Rewards'][$gifId]['Color'] == 4 && $oEvent->EventList['PearFlower']['MaxPearFlower'] >=$maxPearFlower);\n if($conf[$rand_Id]['Rewards'][$gifId]['Color'] == 4)\n $oEvent->EventList['PearFlower']['MaxPearFlower'] += 1 ;\n \n $gift = $conf[$rand_Id]['Rewards'][$gifId] ;\n \n $arr_gift = array();\n \n if(SoldierEquipment::checkExist($gift['ItemType']))\n {\n $AutoId = $oUser->getAutoId(); \n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'][] = $oEquipment ;\n $arr_gift['SpecialGift'][] = $oEquipment ;\n }\n else\n {\n unset($gift['Rate']);\n $arr_gift['NormalGift'][]= $gift ; \n } \n */\n // them kinh nghiem\n $successExp = Common::getParam('SuccessRewards');\n $ExpGift = array('ItemType'=>'Exp','Num'=>$successExp);\n $arr_gift['NormalGift'][]= $ExpGift;\n \n return $arr_gift ;\n }","title":""},{"docid":"5179137bf4bd93d3e2a7847c1af7630a","score":"0.50281733","text":"public function getTreasureRewards() \n {\n $conf_treasure = Common::getConfig('TreasureRewards') ;\n \n $oUser = User::getById(Controller::$uId); \n \n \n // kiem tra xem da ra maze key hay chua\n if($this->MazeKeyInfo['Num2'] > 0)\n $rand_Id = $this->newRandom($conf_treasure,12); // loai truong hop ra mazekey\n else if($this->MazeKeyInfo['OpenTreasure'] >= 6)\n $rand_Id = 12; // cho ra maze key luon\n else \n $rand_Id = $this->newRandom($conf_treasure);\n \n \n $gifId = $this->newRandom($conf_treasure[$rand_Id]['Rewards']);\n $gift = $conf_treasure[$rand_Id]['Rewards'][$gifId] ;\n \n //update MazekeyInfo\n if($rand_Id == 12 )\n {\n $this->MazeKeyInfo['Num']++ ;\n $this->MazeKeyInfo['Num2']++ ;\n }\n \n \n $this->MazeKeyInfo['OpenTreasure']++;\n \n \n $arr_gift = array();\n \n if(SoldierEquipment::checkExist($gift['ItemType']))\n {\n $AutoId = $oUser->getAutoId(); \n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'] = $oEquipment ;\n $arr_gift['SpecialGift'] = $oEquipment ; \n }\n else\n { \n unset($gift['Rate']);\n $arr_gift['NormalGift'] = $gift ;\n \n } \n return $arr_gift ;\n \n }","title":""},{"docid":"a8281fcc96c4a4f6ff87c6f018d8f983","score":"0.50109696","text":"private function createCards()\n {\n \n $values = array('2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A');\n $suits = array('S', 'H', 'D', 'C');\n \n $response = array();\n foreach ($suits as $suit) {\n foreach ($values as $value) {\n $response[] = $value . $suit;\n }\n }\n \n return $response;\n \n }","title":""},{"docid":"7e2d2f25e2072cbf868f9045a095df83","score":"0.49926955","text":"public function getRewardsList(){\n return $this->_get(5);\n }","title":""},{"docid":"3a1a0146de2eb5e3b0da3b2e35fb4d85","score":"0.49921963","text":"public function getRewardsList(){\n return $this->_get(34);\n }","title":""},{"docid":"a47e65d9be646409630099c0ed3a8b5d","score":"0.4985543","text":"public function planta_artigo()\n {\n \n }","title":""},{"docid":"a42ce027f46eb7945a0dc879ba38e185","score":"0.4969522","text":"public function cards() {\n return $this->morphToMany('TypiCMS\\Modules\\Cards\\Models\\Card', 'insurancepages_card', 'insurancepages_cards', 'insurancepage_id', 'card_id')\n ->withPivot('card_id')\n ->orderBy('position')\n ->withTimestamps();\n }","title":""},{"docid":"802397e709bdd6572ac9f981df6ba0f3","score":"0.4966512","text":"protected function cards()\n {\n return [\n new PaymentsPerDay,\n new ActiveMembers,\n new AttendancePerWeek,\n new ActiveAttendanceBreakdown,\n ];\n }","title":""},{"docid":"123a46a163466616c3221da1c7abf68d","score":"0.49628118","text":"function isStraight() \n\t{\n\t\t$result[\"bool\"] = false;\n\t\t$result[\"ptg\"] = array();\n\t\t$result[\"type\"] = array();\t\n\t\n\t\t$c_cards = count($this->cards);\n\t for ($i=0; $i < $c_cards; $i++) \n\t {\n\t\t $arr_temp_i = $this->cards[$i];\n\t foreach($arr_temp_i as $nKey => $nValue) \n\t {\n\t $cache[$i] = $nKey;\n\t }\n\t }\n\t\t\t\t \t \n\t unset($arr_temp_i);\n\t \n\t // Se ho un K allora mi conviene cambiare il 1 in 14 per la scala...\n\t // Siccome ho trasformato l'1 in 14 lo rimetto a 1\n\t $c_cache = count($cache);\n\t if (!in_array(13,$cache))\n\t {\n\t for ($i = 0; $i < $c_cache; $i++)\n\t \t{\n\t\t \tif ($cache[$i]==14)\n\t\t \t\t$cache[$i]=1;\n\t \t}\n\t\t}\t\t\t\n\t\t\n\t arsort($cache);\t\n\t \n\t $total = count($cache);\n\t $retries = $total - 5;\n\t $counter = $start = current($cache);\n\t \n\t foreach ($cache as $a => $b) {\n\t if ($cache[$a] != $counter) {\n\t if ($retries > 0) {\n\t $retries--;\n\t $counter = $start = $cache[$a];\n\t } else {\n\t return $result;\n\t }\n\t }\n\t if (($start - 5) == $counter ) {\n\t break;\n\t }\n\t $counter--;\n\t }\n\t \n\n\t // Se nn ho 13 allora il 14 lo trasformo in 1 in caso di scala !!\n\t $c_cache = count($cache);\n\t if (!in_array(13,$cache))\n\t {\n\t for ($i = 0; $i < $c_cache; $i++)\n\t \t{\n\t\t \t$k = key($this->cards[$i]);\n\t\t \t$s = $this->cards[$i][$k];\n\t\t \tif ($k==14) {\n\t\t\t \tunset($this->cards[$i]);\n\t\t \t\t$this->cards[$i][1] = $s;\t\t \t\t\n\t \t\t}\n\t \t}\n\t\t}\t \n\t\t\n\t\tusort($this->cards, by_key);\n\n\t\t$result[\"bool\"] = true;\n\t\t$result[\"ptg\"] = $this->cards;\n\t\t$result[\"type\"] = PKR_STRAIGHT;\n\t return $result;\n\t}","title":""},{"docid":"07cc776c66a922765cd88a768a95e68d","score":"0.49538156","text":"function getBestHand() {\n $checkptg = new CheckPtg($this->cards);\n\n $var = $checkptg->isRoyalFlush();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isStraightFlush();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isFourOfAKind();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n // Non mi serve fare Usort\n $var = $checkptg->isFullHouse();\n //usort($var[\"ptg\"], by_key);\t\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isFlush();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isStraight();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isThreeOfAKind();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isTwoPair();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isPair();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n\n $var = $checkptg->isHighCard();\n usort($var[\"ptg\"], by_key);\n if ($var[\"bool\"])\n return $var;\n }","title":""},{"docid":"5a44dad25eafe2c89ede1550b07eb379","score":"0.49374753","text":"public function getCard();","title":""},{"docid":"8c503209f419104071412d3d996ecf93","score":"0.49326724","text":"function TirageAleatoire(){\n $couleur = array(\"green\", \"yellow\", \"red\", \"blue\", \"pink\", \"purple\", \"orange\", \"grey\");\n\n shuffle($couleur);\n $rand_keys = array_rand($couleur, 2);\n $pion1 = $couleur[$rand_keys[0]];\n\n shuffle($couleur);\n $rand_keys = array_rand($couleur, 2);\n $pion2 = $couleur[$rand_keys[0]];\n\n shuffle($couleur);\n $rand_keys = array_rand($couleur, 2);\n $pion3 = $couleur[$rand_keys[0]];\n\n shuffle($couleur);\n $rand_keys = array_rand($couleur, 2);\n $pion4 = $couleur[$rand_keys[0]];\n\n $resultat = array(\"$pion1\", \"$pion2\", \"$pion3\", \"$pion4\");\n return $resultat;\n }","title":""},{"docid":"0d8114e2dcd2637547749f63aa3055e3","score":"0.49278986","text":"protected function cards()\n {\n return [];\n }","title":""},{"docid":"93438a8ff0c2fbbc38b9e5c4b9a391a0","score":"0.4924486","text":"function do_all_pings()\n{\n}","title":""},{"docid":"cea353b48a53d3b3b03c10e56791e9bb","score":"0.49088225","text":"function limitrofes($pais1,$pais2){\n\t\t\tswitch( $pais1->getId() ){\n\t\t\t\tcase 0: //yucon\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 1://canada\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2://alasca\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4://oregon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\tcase 1: //canada\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 0://yucon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4://oregon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5://nueva york\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6://terranova\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 2: //alasca\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 0://yucon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4://oregon\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 35://alasca\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 3: //groenlandia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 7://labrador\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5://nueva york\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 22://islandia\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 4: //oregon\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 5: //nueva york\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 6: //terranova\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 7: //labrador\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 8: //california\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 9:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 9: //mexico\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 10:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 10: //colombia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 9:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 11: //brasil\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 10:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 15:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 12: //peru\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 10:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 13: //chile\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 47:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 14: //argentina\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 15:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 15: //uruguay\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 14:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 16: //sahara\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 11:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 17: //egipto\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 21:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 26:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 42:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 18: //etiopia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 20:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 19: //zaire\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 21:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 20:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 20: //sudafrica\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 18:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 21: //madagascar\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 19:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 22: //islandia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 23:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 23: //gran bretaña\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 22:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 24: //suecia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 22:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 25: //rusia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 24:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 26:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 26: //polonia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 27: //alemania\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 23:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 28:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 26:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 28: //italia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 29: //francia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 27:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 28:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 30:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 30: //españa\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 23:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 29:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 16:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\n\t\t\t\tbreak;\n\t\t\t\tcase 31: //aral\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 32: //tartaria\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 33:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 33: //taimir\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 34: //siberia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 33:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 35:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 35: //camchatca\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 36:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 36: //japon\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 35:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 37: //iran\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 44:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 38: //mongolia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 31:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 39: //china\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 34:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 35:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 36:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 40:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 44:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 45:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 40: //gobi\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 38:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 41: //turquia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 25:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 26:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 42:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 43:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 42: //israel\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 17:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 43:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 43: //arabia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 41:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 42:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 44: //india\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 37:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 45:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 46:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 45: //malasia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 39:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 44:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 48:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 46: //sumatra\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 44:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 47:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 47: //australia\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 46:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 48:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 49:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 13:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 48: //borneo\n\t\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 45:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 47:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase 49: //java\n\t\t\t\t\tswitch($pais2->getId()){\n\t\t\t\t\t\tcase 47:\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault: return 0;\n\t\t\t\t\t//llave switch hijos\t\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t//llave switch superior\t\n\t\t\t}\n\t\t\n\t\t//llave function\n\t\t}","title":""},{"docid":"e1cd3343b991464f97e8bac0cb9dcd2d","score":"0.48944932","text":"private function splitCards()\n {\n \n //$cards = $this->shuffleCards($this->createCards());\n $cards = $this->createCards();\n shuffle($cards);\n \n return array_chunk($cards, intval(ceil(sizeof($cards) / 2)));\n \n }","title":""},{"docid":"002d38c1d7bbc79480dc76460a0ff404","score":"0.48690617","text":"function getHand(){\n $players = 0;\n \n //creates arrays for the cards for each player\n $player1 = array();\n $player2 = array();\n $player3 = array();\n $player4 = array();\n \n //array to hold the scores of each player\n $scores = array();\n \n //value that cards will stop being distributed at\n $stop = 36;\n \n //creates the deck\n $deck = array();\n for ($i = 1; $i <= 52; $i++) {\n $deck[] = $i;\n }\n \n //shuffles the deck\n shuffle($deck);\n \n $j = 0;\n $k = 0;\n $temp;\n \n //test printing of array\n //prints each value of the array one a new line\n for($i = 0; $i < 4; $i++){\n while($players == 0)\n {\n if($score < $stop){\n $player1[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 1)\n {\n if($score < $stop){\n $player2[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 2)\n {\n if($score < $stop){\n $player3[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n\n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n while($players == 3)\n {\n if($score < $stop){\n $player4[$j] = $deck[$k];\n \n if($deck[$k] >= 13){\n $temp = $deck[$k] % 13;\n \n $score = $score + $temp;\n }\n \n else{\n $score = $score + $deck[$k];\n }\n \n $k++;\n $j++;\n }\n \n if($score >= $stop){\n $scores[$players] = $score;\n $players++;\n $j = 0;\n $score = 0;\n }\n }\n }\n echo $scores[0];\n echo \"\";\n displayHand($player1);\n \n echo $scores[1];\n echo \"\";\n displayHand($player2);\n \n echo $scores[2];\n echo \"\";\n displayHand($player3);\n \n echo $scores[3];\n echo \"\";\n displayHand($player4);\n \n \n $f = 0;\n \n ///////used to display the scores/////////////////////////\n \n // while ($f < 4) {\n // echo $scores[$f] . \"
    \";\n // $f++;\n // }\n return $scores;\n////////////////////////////////////////////\n \n}","title":""},{"docid":"7088cfb763ea915df79bdc1e861ed818","score":"0.4867626","text":"public function processPool($p) {\r\n\t\t$p = $this->filterColor($p);\r\n\t\t$p = $this->filterBasics($p);\r\n\r\n\t\t$cardCount = count($p);\r\n\t\t$avgCMC = $this->averageCMC($p);\r\n\r\n\t\t// trim a card until we hit the sweet spot\r\n\t\t$isSaturated = false;\r\n\t\twhile(!$isSaturated) {\r\n\t\t\t$nonLandCount = $this->countNonLands($p);\r\n\t\t\tif(($this->model->getSize() == 60 && $nonLandCount >= 38)\r\n\t\t\t|| ($this->model->getSize() == 40 && $nonLandCount >= 22)) {\r\n\t\t\t\t$p = $this->trim($p);\r\n\t\t\t} else {\r\n\t\t\t\t$isSaturated = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$p = $this->addBasics($p);\r\n\t\treturn $p;\r\n\t}","title":""},{"docid":"c16ee4c5f6e4df4dfa08fdb18d28818a","score":"0.48627716","text":"public function shuffleCards()\n {\n\n // looping over the suite array\n for ($i = 0; $i < count($this->suite); $i++) {\n\n // looping over the rank array\n for ($j = 0; $j < count($this->rank); $j++) {\n $firstRand = mt_rand(0, 3); //getting a random value btw 0 and 3\n $secondRand = mt_rand(0, 12); //getting a random value btw 0 and 12\n\n // creating a temporary variable and swaping the data\n $temp = $this->cards[$firstRand][$secondRand];\n $this->cards[$firstRand][$secondRand] = $this->cards[$i][$j];\n $this->cards[$i][$j] = $temp;\n }\n }\n // returns the card array\n return $this->cards;\n }","title":""},{"docid":"1278a2121bcd8a5659542a67bc2a8876","score":"0.48577997","text":"public function getPerms();","title":""},{"docid":"88b30a6638241bd292d54e7a048f0c03","score":"0.48550534","text":"public function getCard() {\n\n }","title":""},{"docid":"6c288e26ea50161b8e8d701b9c69cca8","score":"0.4853681","text":"public function refrescacampos(){\n $this->hp=$this->nhorasparadainterna; //horas parada por mo interna o break dowwna\n $this->hpp=$this->nhorasparadaprogramada; //hora spdara programada precheck\n $this->hps=$this->nhorasparadaexterna; //horas prada por servicios\n $this->hd=$this->horasdisponibles();\n $this->hmt=$this->horasmotor();\n $this->hpt=$this->horasperfo();\n $this->tbd=$this->gethorasparada();//horas de parada total\n $this->np=$this->nparadasint;\n $this->ns=$this->nparadasext;\n $this->npp=$this->nparadasprog;\n $this->npp=$this->ns+$this->np+$this->npp;///veces parada servicio+veces parada interno, +veces parada programnada\n $this->ntt=$this->nparadastotales();\n $this->htt=$this->horasmotor()+$this->horasperfo();\n $this->dispo=$this->porcdispo();\n $this->util=$this->porcutil();\n }","title":""},{"docid":"a6b50b96540823dc1068d0aaf0ca680f","score":"0.48434305","text":"public function zCard()\n {\n }","title":""},{"docid":"d0c3057224056bd2145b5072a6c7271a","score":"0.48432365","text":"public function toolCardSplit()\n {\n ini_set('max_execution_time', 180); //3 minutes\n // grab all the info from cards\n\n $cards = Card::all();\n foreach ($cards as $card) {\n\n // Figure out the type for type id\n $color = $card->color;\n if ($color == 'red') {\n $type = 1;\n } else if ($color == 'blue') {\n $type = 2;\n } else if ($color == 'yellow') {\n $type = 3;\n } else {\n // There shouldnt be any here but just in case\n $type = 0;\n }\n\n\n // Make a new card stat\n $s = new Cardstat;\n $s->card_id = $card->id;\n $s->game_id = $card->game_id;\n $s->type_id = $type;\n $s->da = $card->da;\n $s->vo = $card->vo;\n $s->pf = $card->pf;\n $s->gr = 0;\n $s->da_max = $card->da_max;\n $s->vo_max = $card->vo_max;\n $s->pf_max = $card->pf_max;\n $s->gr_max = 0;\n $s->da_max5 = $card->da_max5;\n $s->vo_max5 = $card->vo_max5;\n $s->pf_max5 = $card->pf_max5;\n $s->gr_max5 = 0;\n $s->u_dorifes_id = $card->u_dorifes_id;\n $s->u_dorifes_j = '';\n $s->u_dorifes_e = '';\n $s->dorifes_id = $card->dorifes_id;\n $s->dorifes_j = '';\n $s->dorifes_e = '';\n $s->u_lesson_id = $card->u_lesson_id;\n $s->u_lesson_j = '';\n $s->u_lesson_e = '';\n $s->lesson_id = $card->lesson_id;\n $s->lesson_j = '';\n $s->lesson_e = '';\n $s->save();\n\n // Create an entry for music cards if the card is a basic card\n if ($card->game_id == 2) {\n $s = new Cardstat;\n $s->card_id = $card->id;\n $s->game_id = 3;\n $s->type_id = 0;\n $s->da = 0;\n $s->vo = 0;\n $s->pf = 0;\n $s->gr = 0;\n $s->da_max = 0;\n $s->vo_max = 0;\n $s->pf_max = 0;\n $s->gr_max = 0;\n $s->da_max5 = 0;\n $s->vo_max5 = 0;\n $s->pf_max5 = 0;\n $s->gr_max5 = 0;\n $s->u_dorifes_id = 0;\n $s->u_dorifes_j = '';\n $s->u_dorifes_e = '';\n $s->dorifes_id = 0;\n $s->dorifes_j = '';\n $s->dorifes_e = '';\n $s->u_lesson_id = 0;\n $s->u_lesson_j = '';\n $s->u_lesson_e = '';\n $s->lesson_id = 0;\n $s->lesson_j = '';\n $s->lesson_e = '';\n $s->save();\n }\n }\n }","title":""},{"docid":"1416f73408a1e2418093cef54d370b6b","score":"0.48347446","text":"function getUserCards() { \t\n\t\n\t\t$query\t= \"SELECT bi_card_id,vc_billingid,bi_card_num,dt_expiry,i_isPrimary,vc_card_type FROM tbl_creditcard where bi_MemberId= $this->memberid ORDER BY bi_ord_id DESC\";\t\t\n\t\t\n\t\t$dbQry\t= new dbQuery($query, $this->connect->connId);\t\n\t\treturn $this->retrieveCardRowArray($dbQry);\n\t\n}","title":""},{"docid":"2d37372206cfd3a00e9804463059bf64","score":"0.48344857","text":"function determineGrantedAwards($geokretow_w_puli) {\n if ($geokretow_w_puli >= 1) {\n $odznaczenia_pliki['1'] = 'medal-1-1.png';\n }\n if ($geokretow_w_puli >= 10) {\n $odznaczenia_pliki['10'] = 'medal-1-2.png';\n }\n if ($geokretow_w_puli >= 20) {\n $odznaczenia_pliki['20'] = 'medal-1-3.png';\n }\n if ($geokretow_w_puli >= 50) {\n $odznaczenia_pliki['50'] = 'medal-1-4.png';\n }\n if ($geokretow_w_puli >= 100) {\n $odznaczenia_pliki['100'] = 'medal-bialy.png';\n }\n if ($geokretow_w_puli >= 120) {\n $odznaczenia_pliki['5! = 120'] = 'medal-120.png';\n }\n if ($geokretow_w_puli >= 200) {\n $odznaczenia_pliki['200'] = 'medal-brazowy.png';\n }\n if ($geokretow_w_puli >= 314) {\n $odznaczenia_pliki['100* Pi = 100 * 3.14 = 314'] = 'medal-pi.png';\n }\n if ($geokretow_w_puli >= 500) {\n $odznaczenia_pliki['500'] = 'medal-srebrny.png';\n }\n if ($geokretow_w_puli >= 512) {\n $odznaczenia_pliki['2^9 = 512'] = 'medal-512.png';\n }\n if ($geokretow_w_puli >= 720) {\n $odznaczenia_pliki['6! = 1*2*3*4*5*6 = 720'] = 'medal-720.png';\n }\n if ($geokretow_w_puli >= 800) {\n $odznaczenia_pliki['800'] = 'medal-zloty.png';\n }\n if ($geokretow_w_puli >= 1000) {\n $odznaczenia_pliki['1000'] = 'medal-1000.png';\n }\n if ($geokretow_w_puli >= 1024) {\n $odznaczenia_pliki['2^10 = 1024'] = 'medal-1024.png';\n }\n if ($geokretow_w_puli >= 2000) {\n $odznaczenia_pliki['2000'] = 'medal-2000.png';\n }\n if ($geokretow_w_puli >= 3000) {\n $odznaczenia_pliki['3000'] = 'medal-3000.png';\n }\n if ($geokretow_w_puli >= 5000) {\n $odznaczenia_pliki['5000'] = 'medal-5000.png';\n }\n if ($geokretow_w_puli >= 5040) {\n $odznaczenia_pliki['7! = 1*2*3*4*5*6*7 = 5040'] = 'medal-5040.png';\n }\n if ($geokretow_w_puli >= 10000) {\n $odznaczenia_pliki['10000'] = 'medal-10000.png';\n }\n\n return $odznaczenia_pliki;\n }","title":""},{"docid":"eaa30337557e9a61df59cb7f38091f69","score":"0.48332614","text":"function getPermisstionList();","title":""},{"docid":"6bb464f45d5a8828cc7f4bddd5604ae5","score":"0.48215383","text":"function cardShuffle($deck)\n {\n for ($i = 0; $i < count($deck); $i++) {\n for ($j = 0; $j < count($deck[$i]); $j++) {\n $r1 = rand(0, 3);\n $c1 = rand(0, 12);\n $r = rand(0, count($deck));\n $r2 = rand(0, 3);\n $r = rand(0, count($deck));\n $c2 = rand(0, 12);\n $r = rand(0, count($deck));\n $temp = $deck[$r1][$c1];\n $r = rand(0, count($deck));\n $deck[$r1][$c1] = $deck[$r2][$c2];\n $deck[$r2][$c2] = $temp;\n }\n }\n // print_r($deck);\n return $deck;\n }","title":""},{"docid":"384746644fd1d98ca33d8759b38b8596","score":"0.48203185","text":"function doPageCollectorActions() {\n\t\t\t// add\n\t\tif ($this->piVars['prozess'] == 'add') {\n\t\t\t$this->currentPageCollectorValueArray[] = $this->piVars['pid'];\n\t\t\t\t// delete\n\t\t} elseif ($this->piVars['prozess'] == 'del') {\n\t\t\t$changedPageCollectorValueArray = array();\n\t\t\twhile (list($k, $v) = each($this->currentPageCollectorValueArray)) {\n\t\t\t\tif ($v != $this->piVars['pid']) {\n\t\t\t\t\t$changedPageCollectorValueArray[] = $v;\n\t\t\t\t} else {\n\t\t\t\t\t// no new value\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t// rechange\n\t\t\t$this->currentPageCollectorValueArray = $changedPageCollectorValueArray;\n\t\t\t// move up\n\t\t} elseif ($this->piVars['prozess'] == 'up') {\n\t\t\t\t// get changings\n\t\t\t$keyCurrentMove = array_search($this->piVars['pid'], $this->currentPageCollectorValueArray);\n\t\t\t$valCurrentMove = $this->piVars['pid'];\n\t\t\t$keyContiguousMove = $keyCurrentMove -1;\n\t\t\t$valContiguousMove = $this->currentPageCollectorValueArray[$keyContiguousMove];\n\t\t\t\t// make changings now\n\t\t\t$this->currentPageCollectorValueArray[$keyContiguousMove] = $valCurrentMove;\n\t\t\t$this->currentPageCollectorValueArray[$keyCurrentMove] = $valContiguousMove;\n\t\t\t\t// move down\n\t\t} elseif ($this->piVars['prozess'] == 'down') {\n\t\t\t\t// get changings\n\t\t\t$keyCurrentMove = array_search($this->piVars['pid'], $this->currentPageCollectorValueArray);\n\t\t\t$valCurrentMove = $this->piVars['pid'];\n\t\t\t$keyContiguousMove = $keyCurrentMove +1;\n\t\t\t$valContiguousMove = $this->currentPageCollectorValueArray[$keyContiguousMove];\n\t\t\t\t// make changings now\n\t\t\t$this->currentPageCollectorValueArray[$keyContiguousMove] = $valCurrentMove;\n\t\t\t$this->currentPageCollectorValueArray[$keyCurrentMove] = $valContiguousMove;\n\t\t\t\t// add a holy list of pids (used via hmenu & TSscript by vikingeskibsmussets 'spor')\n\t\t} elseif ($this->piVars['prozess'] == 'addList') {\n\t\t\t$newPageCollectorValueArray = explode(',', $this->piVars['pid'], 1000);\n\t\t\twhile (list($k, $v) = each($newPageCollectorValueArray)) {\n\t\t\t\tif (!in_array($v, $this->currentPageCollectorValueArray)) {\n\t\t\t\t\tarray_push($this->currentPageCollectorValueArray, $v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// clearall action\n\t\t} elseif ($this->piVars['prozess'] == 'clearall') {\n\t\t\t$this->currentPageCollectorValueArray = array();\n\t\t\t// any other action\n\t\t} else {\n\t\t\t// any other action can be placed here\n\t\t}\n\t\t\t// any changings will result in dbUpdate for this session\n\t\t$this->updateUserSession();\n\t\treturn;\n\t}","title":""},{"docid":"afe8cdfffe992d7d5c1e0e7104372073","score":"0.47951308","text":"function attack($p1, $p2)\n{\n for ($x = 0; $x <= 20; $x++) {\n\n if ($p1['title'] === \"hero\") {\n $p1['luc'] = rand(10, 30);\n $p2['luc'] = rand(25, 40);\n $heroIsLuckier = isLuckier($p1['luc'], $p2['luc']);\n if (getProb(10) === true) {\n echo \"\\n RAPID STRIKE hERE p1 hero..\";\n $p1['hp'] = (int)$p1['hp'] - (((int)$p2['str'] - (int)$p1['def']) * 2);\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n } else if (getProb(20) === true) {\n echo \"\\n MAGIC SHIELD hERE p1 hero..\";\n $p1['hp'] = (int)$p1['hp'] - (2 / ((int)$p2['str'] - (int)$p1['def']));\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n } else if ($heroIsLuckier === true) {\n\n echo \"\\n HERO LUCKIER HERE hERE p1 hero..\";\n $p1['hp'] = (int)$p1['hp'] - 0;\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n } else if ($heroIsLuckier === false) {\n echo \"\\n MAGE LUCKIER HERE hERE p2 mage..\";\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - 0;\n } else {\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n }\n } else if ($p2['title'] === \"hero\") {\n $p2['luc'] = rand(10, 30);\n $p1['luc'] = rand(25, 40);\n $heroIsLuckier = isLuckier($p2['luc'], $p1['luc']);\n if (getProb(10) === true) {\n echo \"\\n RAPID STRIKE hERE p2 hero..\";\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - (((int)$p1['str'] - (int)$p2['def']) * 2);\n } else if (getProb(20) === true) {\n echo \"\\n MAGIC SHIELD hERE p2 hero..\";\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - (2 / ((int)$p1['str'] - (int)$p2['def']));\n } else if ($heroIsLuckier === true) {\n echo \"\\n HERO LUCKIER HERE hERE p2 hero..\";\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - 0;\n } else if ($heroIsLuckier === false) {\n echo \"\\n MAGE LUCKIER HERE hERE p1 mage..\";\n $p1['hp'] = (int)$p1['hp'] - 0;\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n } else {\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\n }\n }\n\n var_dump(\"\\n \" . $p2['title'] . \"'s heath:\" . intval($p2['hp']));\n var_dump(\"\\n\" . $p1['title'] . \"'s health:\" . intval($p1['hp']));\n if ($p2['hp'] <= 0) {\n echo \"\\n fight ended!\";\n var_dump($p2['hp']);\n echo \"\\niteration: $x\";\n die(\"\\n\" . $p2['title'] . \" died and\" . \" \" . $p1['title'] . \" won!\");\n } else if ($p1['hp'] <= 0) {\n echo \"\\n fight ended!\";\n var_dump($p1['hp']);\n echo \"\\niteration: $x\";\n die(\"\\n\" . $p1['title'] . \" died and\" . \" \" . $p2['title'] . \" won!\");\n }\n }\n}","title":""},{"docid":"f45ea3a7cea860a25fc7fbde61554bd2","score":"0.47905305","text":"function shuffleCards($values)\n{\n// i used shuffle to randomize the order of the elements in my array\n shuffle($values);\n// i used the foreach loop so that it can loop through the values of my array, it will loop\n// through the array and each value\n foreach ($values as $value) {\n // The shuffle array variable is equal to the value\n $shuffleArray[] = $value;\n // i used array_slice so it can return a part of my array,\n $sliceFour = array_slice($shuffleArray, 0, 4);\n }\n// i used return so i could stop and get back the array\n return $sliceFour;\n}","title":""},{"docid":"7e0ebd9f1aacc15b221e2599b35018df","score":"0.47835618","text":"function getCardioGoals()\n {\n return $this->cardioGoals;\n }","title":""},{"docid":"d9084e497d1a8e83332c7aa87f7722bf","score":"0.47802114","text":"protected function shuffleCard()\n\t{\n\t\t$this->getCache('singleCardName');\n\t\t$cards = range(1, 54);\n\t\t$shuffleRound = range(1,10);\n\t\tfor($i=0;$i < shuffle($shuffleRound);$i++){\n\t\t\tshuffle($cards);\n\t\t}\n\n\t\t$chairId=$this->lastWinner?:1;\n\t\tfor ($i=0;$i < 54;$i++) {\n\t\t\t$this->cards[$chairId][]=$this->_singleCardName[$cards[$i]];\n\t\t\t$this->detailCards[$chairId]['single'][]=$this->_singleCardName[$cards[$i]];\n\t\t\tif($chairId==$this->chairAmount){\n\t\t\t\t$chairId = 1;\n\t\t\t}else{\n\t\t\t\t$chairId++;\n\t\t\t}\n\t\t}\n\n\t\tif($this->firstRound){\n\t\t\tforeach($this->cards as $k=>$v){\n\t\t\t\tif(in_array('3c',$v)){\n\t\t\t\t\t$this->have3c = $k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"7137d137e8111432c75755d9dcf5ed0a","score":"0.47695926","text":"function roar()\r\n {\r\n }","title":""},{"docid":"03ae7cbb0002af81c50bcf0a771346a4","score":"0.47584644","text":"protected function cards()\n\t{\n\t\t$user = auth()->user();\n\n\t\treturn [\n\t\t\t//new Help,\n\t\t\t(new MentorRequestCount)->canSee(function () use ($user) {\n\t\t\t\treturn $user->hasRole(RoleableInterface::ADMINISTRATOR);\n\t\t\t}),\n\t\t\t(new UsersPerRole)->canSee(function () use ($user) {\n\t\t\t\treturn $user->hasRole(RoleableInterface::ADMINISTRATOR);\n\t\t\t}),\n\t\t];\n\t}","title":""},{"docid":"9b416a27a8350abac44e98656a58b5af","score":"0.47562635","text":"function getCard() {\n //$query = \"select number,card,seed,seat,s.player as player from pkr_dealer d inner join pkr_seat s on d.seat=s.seat_number where s.player=\".$this->curr_player.\" and game=\".$this->curr_game.\" and d.idtable=\".$this->curr_table.\" and s.status=\".PLAYING.\" order by number\";\n $query = \"select number,card,seed,seat,player from pkr_dealer where player=\" . $this->curr_player . \" and game=\" . $this->curr_game . \" and idtable=\" . $this->curr_table . \" and player in (select player from pkr_seat where status=\" . PLAYING . \") order by number\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }","title":""},{"docid":"94026294fb5d15c8ae1fa6da424eeaaa","score":"0.4754023","text":"function generateRechargeCards($total, $length){\n\t\t// get the first number\n\t\t$card = genRandomNumber($length);\n\t\techo('1: ' . $card);\n\t\techo('
    ');\n\n\t\tfor ($i = 2; $i <= $total; $i++) {\n\t\t\t$card += 7;\n\t\t\techo(\"$i: \" .$card);\n\t\t\techo '
    ';\n\t\t}\n\t}","title":""},{"docid":"968a837cf959bb571dcae62689bf40b5","score":"0.47489887","text":"function giveCards( $choice )\n {\n\t\t//convert choice into card\n\t\t$params = explode(\"_\", $choice);\n\t\t$card_id = $params[1];\n\t\t$card_pos = $params[2];\n\n // make sure noone else has submitted this card $type\n $count = self::getUniqueValueFromDB(\"select count(p.contribution) from card c JOIN player p\n ON p.contribution = c.card_type WHERE c.card_id='$card_id'\");\n if ($count > 0) {\n throw new BgaUserException( self::_(\"Sorry! Someone submitted this card type before you.\") );\n }\n \n\t\t\n\t\t// get object card\n\t\t$card = $this->cards->getCard( $card_id );\n $type = $card['type'];\n self::checkAction( \"giveCards\" );\n \n // !! Here we have to get CURRENT player (= player who send the request) and not\n // active player, cause we are in a multiple active player state and the \"active player\"\n // correspond to nothing.\n $current_player_id = self::getCurrentPlayerId();\n\n\n $players = self::loadPlayersBasicInfos();\t\n\t\t$active_player_id = self::getGameStateValue( 'playerBuildingSentence' );\n $current_player_name = $players[ $current_player_id ]['player_name'];\n\t\t$active_player_name = $players[ $active_player_id ]['player_name'];\n\t\t\n\t\t\n\t\t$card_ids[] = $card_id;\n \n //if( count( $card_ids ) != 1 )\n // throw new feException( self::_(\"You must give exactly 1 card\") );\n \n // Check if these cards are in player hands\n $cards[] = $card;\n \n if( count( $cards ) != 1 )\n throw new feException( self::_(\"This card doesn't exist\") );\n \n foreach( $cards as $card )\n {\n if( $card['location'] != 'hand' || $card['location_arg'] != $current_player_id )\n throw new feException( self::_(\"This card is not in your hand\") );\n }\n \n\n\t\t$this->cards->moveCard($card_id, 'current_sentence', $current_player_id);\t\t// add card to sentence\n\t\t\n\t\t// record the player's guess for helper scoring\n $sql = \"\n UPDATE player\n SET contribution = $type,\n guess = $card_pos\n WHERE player_id = $current_player_id\n \";\n self::DbQuery( $sql );\n $data = self::getNonEmptyObjectFromDB( 'SELECT verb, object from data where data_id = 1');\n $object = $data['object'];\n // handle (MY) cards\n if (preg_match('/^\\(MY\\)/', $object)) {\n $array = explode(\" \", $object);\n array_shift($array); // drop off (MY)\n $object = implode(\" \", $array);\n $article = clienttranslate('their');\n } else {\n $article = clienttranslate('the');\n }\n\t\n $message='ERROR with message';\n switch ($card['type']) {\n case 1:\n case 2:\n case 3:\n case 8:\n $message = '${player_name} guessed ${html}${color_displayed}${endHtml} ${active_player_name} ${verb} ${article} ${object}. ';\n break;\n case 5:\n case 6:\n $message = '${player_name} guessed ${html}${color_displayed}${endHtml} ${object} ${active_player_name} ${verb}. ';\n break;\n }\n \n \n // And notify\n self::notifyAllPlayers( \n\t\t\t'addCardToSentence', \n\t\t\tclienttranslate($message), \n\t\t\tarray(\n\t\t\t\t'i18n' => array( 'color_displayed', 'value_displayed' ),\n\t\t\t\t'card_id' => $card['id'],\n 'card' => $this->populateCard($card),\n\t\t\t\t'player_id' => $current_player_id,\n\t\t\t\t'player_name' => $current_player_name,\n\t\t\t\t'active_player_name' => $active_player_name,\n\t\t\t\t'color' => $card['type'],\n\t\t\t\t'color_displayed' => $this->colors[ $card['type'] ]['name'],\n 'verb' => $data['verb'],\n 'article' => $article,\n 'object' => $object,\n 'html' => \"\",\n 'endHtml' => \"\"\n\t\t\t) \n\t\t);\n\n\n // Notify the player so we can make these cards disapear\n self::notifyPlayer( $current_player_id, \"cardGiven\", \"\", array(\n \"card\" => $card\n ) );\n\n // Make this player unactive now\n // (and tell the machine state to use transtion \"giveCards\" if all players are now unactive\n $this->gamestate->setPlayerNonMultiactive( $current_player_id, \"giveCards\" );\n }","title":""},{"docid":"f8cf53894483fa32fa204c51b3650835","score":"0.47487012","text":"function randAward($aid){\n\t$actList = $GLOBALS['db']->getAll ( \"SELECT title,lid,randnum,awardname,num FROM \".$GLOBALS['aos']->table('wx_prize').\" where aid=$aid and isopen=1 and num>num2 order by num desc\" );\n\tif($actList){\n\t\tforeach($actList as $v){\n\t\t\tif(intval(rand(1,10000)) <= $v['randnum']*100){\n\t\t\t\t$v['code'] = uniqid();\n\t\t\t\t$GLOBALS['db']->query(\"update \" . $GLOBALS['aos']->table('wx_prize') . \" set num2=num2+1 where lid={$v['lid']}\");\n\t\t\t\treturn $v;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}","title":""},{"docid":"6c09e23fde51b38c2d222baf29b967ed","score":"0.47412404","text":"public function create($qtd) : array\n {\n $checks = [];\n $array = [];\n $sorteio = 1;\n if(self::LIMITE >= $qtd){\n while($this->cartela <= $qtd){\n for($i = 1; $i <= self::MARCADOR; $i++){\n $sorteio = $this->random(); \n if(!in_array($sorteio, $checks)){\n $checks[] = $sorteio; \n $array[$this->cartela][] = $sorteio; \n if(count($checks) == self::MARCADOR )\n $checks = [];\n }\n else{\n $sorteio = $this->inArrayNumber($sorteio, $checks);\n $checks[] = $sorteio; \n $array[$this->cartela][] = $sorteio; \n if(count($checks) == self::MARCADOR )\n $checks = [];\n } \n } \n $this->cartela++; \n }\n } \n return $array; \n }","title":""},{"docid":"5e4151abdb6dcac44f33127e729c8b35","score":"0.4740878","text":"function getCardioProgresses()\n {\n return $this->cardioProgresses;\n }","title":""},{"docid":"b7030e883a3a3ce9019720b8c9cdb1ea","score":"0.47365975","text":"public function roam() {\n echo $this->getNameSpecies().' is roaming';\n \n }","title":""},{"docid":"1795362eea137aa10f90db9c39a453a1","score":"0.47351933","text":"public function getCreditCards() {\n return $this->creditcards;\n }","title":""},{"docid":"8aa1459913affcf3311b81855fceceda","score":"0.47329614","text":"public function cards (): Vault;","title":""},{"docid":"20f680d10ca2ae6193bcf417ffabaf13","score":"0.47301275","text":"protected function getFingerprintOfOrder() {}","title":""},{"docid":"126e0d03745074ba886e63ea25da00d3","score":"0.47267088","text":"function consulta_CapacitacionPermanente()\n\t\t{\n\t\t\t$this->sql=\"select * from capacitacion\";\n\t\t\treturn parent::ejecutaQUERY();\n\t\t}","title":""},{"docid":"19aed454c400be4f589dd23a92b3c6a4","score":"0.4726021","text":"function shufflecards32(){\n\t$cards = 1;\n\tdo {\n\t\t$number = rand(1,32);\n\t\tif ($number == 1 AND $a[$number] != 1)\t\t{$deck[$cards]= \"1-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 2 AND $a[$number] != 1)\t{$deck[$cards]= \"2-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 3 AND $a[$number] != 1)\t{$deck[$cards]= \"3-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 4 AND $a[$number] != 1)\t{$deck[$cards]= \"4-7\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 5 AND $a[$number] != 1)\t{$deck[$cards]= \"1-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 6 AND $a[$number] != 1)\t{$deck[$cards]= \"2-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 7 AND $a[$number] != 1)\t{$deck[$cards]= \"3-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 8 AND $a[$number] != 1)\t{$deck[$cards]= \"4-8\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 9 AND $a[$number] != 1)\t{$deck[$cards]= \"1-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 10 AND $a[$number] != 1)\t{$deck[$cards]= \"2-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 11 AND $a[$number] != 1)\t{$deck[$cards]= \"3-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 12 AND $a[$number] != 1)\t{$deck[$cards]= \"4-9\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 13 AND $a[$number] != 1)\t{$deck[$cards]= \"1-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 14 AND $a[$number] != 1)\t{$deck[$cards]= \"2-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 15 AND $a[$number] != 1)\t{$deck[$cards]= \"3-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 16 AND $a[$number] != 1)\t{$deck[$cards]= \"4-10\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 17 AND $a[$number] != 1)\t{$deck[$cards]= \"1-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 18 AND $a[$number] != 1)\t{$deck[$cards]= \"2-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 19 AND $a[$number] != 1)\t{$deck[$cards]= \"3-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 20 AND $a[$number] != 1)\t{$deck[$cards]= \"4-11\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 21 AND $a[$number] != 1)\t{$deck[$cards]= \"1-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 22 AND $a[$number] != 1)\t{$deck[$cards]= \"2-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 23 AND $a[$number] != 1)\t{$deck[$cards]= \"3-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 24 AND $a[$number] != 1)\t{$deck[$cards]= \"4-12\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 25 AND $a[$number] != 1)\t{$deck[$cards]= \"1-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 26 AND $a[$number] != 1)\t{$deck[$cards]= \"2-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 27 AND $a[$number] != 1)\t{$deck[$cards]= \"3-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 28 AND $a[$number] != 1)\t{$deck[$cards]= \"4-13\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 29 AND $a[$number] != 1)\t{$deck[$cards]= \"1-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 30 AND $a[$number] != 1)\t{$deck[$cards]= \"2-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 31 AND $a[$number] != 1)\t{$deck[$cards]= \"3-14\" ;$cards++; $a[$number] = 1;}\n\t\telseif ($number == 32 AND $a[$number] != 1)\t{$deck[$cards]= \"4-14\" ;$cards++; $a[$number] = 1;}\n\t} while ($cards <= 32);\n\t\n\treturn $deck;\n}","title":""},{"docid":"cfb3673ea6800a134ce3fdb6fc91b658","score":"0.4724078","text":"public function getCards(): array\n {\n return $this->cards;\n }","title":""},{"docid":"8f4d1e82967781113cf2b898a46aa095","score":"0.47220796","text":"public function get_chambres(){ return $this->_chambres;}","title":""},{"docid":"6508b3339114f2fd284a8222100c5215","score":"0.47203156","text":"function buscasprvmgas(){\n\t\t$tipo = $this->input->post('cargo');\n\t\t$cta = $this->input->post('acelem');\n\n\t\tif ( $cta == 'ctade')\n\t\t\t$tipo = substr($tipo,0,1);\n\t\telse\n\t\t\t$tipo = substr($tipo,2,1);\n\n\t\tif ( $tipo == 'P')\n\t\t\t$this->buscasprv();\n\t\telse\n\t\t\t$this->buscamgas();\n\t}","title":""},{"docid":"6a52500cd5f8cb728fe716442c85f0ab","score":"0.4719765","text":"public function getCard()\n {\n $arr=array();\n foreach ( $this->_prop as $value ){\n $arr[$value] = $this->$value;\n }\n return $arr;\n }","title":""},{"docid":"9a014fe7358e8bdbaacc35002df1c522","score":"0.47177142","text":"function getComplinePsalm(){\n return 4;\n}","title":""},{"docid":"97e7086d3e7083591909f1a8cb1065fd","score":"0.47165954","text":"function snax_the_card() {\n\tsnax()->cards_query->the_post();\n}","title":""},{"docid":"62b4b6d609b85281924e7536654b1f79","score":"0.46873227","text":"public function getSpecialTreasureRewards()\n {\n $arr_gift = array(); \n $conf_treasure = Common::getConfig('SpecialTreasure');\n \n $oUser = User::getById(Controller::$uId); \n \n $rand_Id = $this->newRandom($conf_treasure);\n $gifId = $this->newRandom($conf_treasure[$rand_Id]['Rewards']);\n $gift = $conf_treasure[$rand_Id]['Rewards'][$gifId] ; \n if(empty($gift))\n return $arr_gift ;\n \n if(SoldierEquipment::checkExist($gift['ItemType']))\n {\n $AutoId = $oUser->getAutoId(); \n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'] = $oEquipment ;\n $arr_gift['SpecialGift'] = $oEquipment ; \n }\n else\n { \n unset($gift['Rate']);\n $arr_gift['NormalGift'] = $gift ;\n \n }\n return $arr_gift ;\n \n }","title":""},{"docid":"e3582deb55d6d514acac26cb9493632a","score":"0.46825","text":"function generateRareBlock($rares, $mythic){\n\tif (rand(1, 8) == 8){\n\t\treturn takeCards(1, $mythic);\n\t} else {\n\t\treturn takeCards(1, $rares);\n\t}\n}","title":""},{"docid":"ede31127c221546cbe80240c6c04123d","score":"0.46788722","text":"public function getPieces()\n {\n }","title":""},{"docid":"cf2083a1c7efd8cd6d30255e1dfede1c","score":"0.46767625","text":"function prepOutput($numDoors){\n global $globalNumRooms;\n\t global $array;\n\t global $gid;\n\t $id = 2;\n\t $subId = 1;\n $exits = 0;\n for( $i = 0; $i < $numDoors; $i++ ){\n //echo \"here\\n\";\n\n $globalNumRooms++;\n //echo $globalNumRooms . \"\\n\";\n if($globalNumRooms<=10){\n $exits = getChamberExits();\n array_push($array, array(\n \"id\" => $id,\n \"roomType\" => \"chamber\",\n \"passage\" => getPassage(),\n\t\t\t\"data\" => getChamber(),\n\t\t\t\"gid\" => $gid,\n \"chamberExits\" => $exits,\n ));\n\n\t }\n\t\twhile($exits > 0){\n array_push($array, array(\n \"id\" => $id . \".\" . $subId,\n \"roomType\" => \"chamber\",\n \"passage\" => getPassage(),\n\t\t\t\"data\" => getChamber(),\n\t\t\t\"gid\" => $gid,\n ));\n\t\t $subId++;\n\t\t $exits--;\n\t\t \t\n\t\t}\n\t\t$subId = 1;\n\t\t$id++;\n }\n return $array;\n }","title":""},{"docid":"c9a9e09c6a796f40994b6e22d85fd6c0","score":"0.4675262","text":"public function haspermission($rota){\n\t\t\n\n\t}","title":""},{"docid":"991fe27c369615da18297bdabb87cb6d","score":"0.46747848","text":"public function getBoardCards(){\n\t\treturn $this->boardCards;\n\t}","title":""},{"docid":"482fc746cd70727f6f023234eccd3af3","score":"0.46710575","text":"function getBoardCards() {\n $query = \"select * from pkr_dealer where idtable=\" . $this->curr_table . \" and game=\" . $this->curr_game . \" and seat=\" . BOARD . \" order by number\";\n $rows = $GLOBALS['mydb']->select($query);\n return $rows;\n }","title":""},{"docid":"fda88f7ea8001247f6db7ffe6c78afdd","score":"0.46707994","text":"function getTotal($hand)\n{\n $total = 0;\n $hold = []; \n foreach ($hand as $card)\n {\n \n $hold[] = explode('-', $card);\n \n }\n foreach ($hold as $card){\n \t\n switch($card[0]) {\n \t \tcase 'A':\n \t \t\tbreak;\n \t \tcase 'K':\n \t \tcase 'Q':\n \t \tcase 'J':\n $total +=10;\n break;\n default:\n \t \t\t$total += (int)$card[0];\n \t \t\tbreak;\n \t }\n\n }\n foreach ($hold as $card){\n\n \tif($card[0] == 'A') {\n \t\tif(($total + 11) <=\t 21) {\n \t\t\t$total += 11;\n \t\t} else {\n \t\t\t$total += 1;\n \t\t}\n\n \t}\n }\n\n\n return $total;\n}","title":""},{"docid":"c1ed2b1b5e35b4efd458e7fc382a6b0c","score":"0.46536115","text":"function get_player_award($pid){\n\tglobal $wpdb;\n\t$getaward = $wpdb->get_results(\"select * from wp_awards WHERE pid = '$pid'\", ARRAY_N);\n\t\n\tforeach ($getaward as $key => $revisequery){\n\t\t$awardinfo[] = array(\n\t\t\t'awardid' => $revisequery[0], \n\t\t\t'award' => $revisequery[1], \n\t\t\t'year' => $revisequery[2], \n\t\t\t'first' => $revisequery[3], \n\t\t\t'last' => $revisequery[4],\n\t\t\t'team' => $revisequery[5],\n\t\t\t'position' => $revisequery[6],\n\t\t\t'owner' => $revisequery[7],\n\t\t\t'pid' => $revisequery[8],\n\t\t\t'gamepoints' => $revisequery[9]\n\t\t);\n\t}\n\t\n\treturn $awardinfo;\n}","title":""},{"docid":"a81f8edf07994386dcbce28689cd0db5","score":"0.4649996","text":"public function get_hand($player_id = null) {\r\n\t\tif ($player_id === null) $player_id = $this->session->userdata('user_id');\r\n\t\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\r\n\t\t$hand = array();\r\n\t\tforeach ($all as $card) {\r\n\t\t\t$card = (array)$card;\r\n\t\t\t$card['place'] = unserialize($card['place']);\r\n\t\t\tif (isset($card['place']['value']) && \r\n\t\t\t\t$card['place']['value'] == 'hand' &&\r\n\t\t\t\t$card['place']['id'] == $player_id) {\r\n\t\t\t\tarray_push($hand, $card);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $hand;\r\n\t}","title":""},{"docid":"2269c67847601ba46d8920eaecb22397","score":"0.46480885","text":"function make_deck()\n{\n $deck = [];\n for($rank = 0; $rank < RANK_COUNT; $rank++){\n for($suit = 0; $suit < SUIT_COUNT; $suit++){\n $deck[] = [$rank, $suit];\n }\n }\n shuffle($deck);\n return($deck);\n}","title":""},{"docid":"aa2119ff117bcc4994cee93a49d6da51","score":"0.4642982","text":"public function tarjetaPrimaria()\n {\n return $this->hasOne('App\\CardPerson', 'id', 'card_people1');\n }","title":""},{"docid":"a6c7596a731c0edfeb382f56663d61f5","score":"0.46410817","text":"public function getCards()\n {\n return $this->_cards;\n }","title":""},{"docid":"a6c7596a731c0edfeb382f56663d61f5","score":"0.46410817","text":"public function getCards()\n {\n return $this->_cards;\n }","title":""},{"docid":"dd03c3879927c1d3edfeee072246134d","score":"0.46377414","text":"function GetPeticionesAbiertas()\r\n{\r\n$maquinas = array();\r\n//recibimos las peticiones pendientes de finalizar\r\n$peticiones = GetPeticionesPendientes();\r\n\tforeach($peticiones as $v_peticion)\r\n\t{\r\n\t //comprobamos que realmente esta abierta realizando un peticion a la api\r\n\t if( comprobarPeticion($v_peticion[0]) != \"terminated\" and comprobarPeticion($v_peticion[0]) != \"shutting-down\" ){\r\n\t $maquinas[] = $v_peticion[0];\r\n\t }\r\n\t}\r\n return $maquinas;\r\n}","title":""},{"docid":"80a61c2e18e943d18ca99331e5e4da7d","score":"0.46367055","text":"private function calcBuffPheromone() {\n $t = $this->iter; //aktualna iteracja\n $allFoundedPoints = $this->antsVisitedPoints[$this->antNumber][$t]; //punkty przez ktore przeszla mrowka\n $i = array_shift($allFoundedPoints);\n\n while(!empty($allFoundPoints)){ // oblicz dawke feromonow pozostawioną przez mrowke\n $j = array_shift($allFoundPoints);\n $this->bufPheromone[$i][$j][$this->antNumber] = ($this->q3)/($this->graph[$i][$j]);\n $i = $j;\n }\n }","title":""},{"docid":"1881c4cdf1835ab6673db3bf6343b876","score":"0.4635588","text":"public function get_list_card(){\n\t\t$cards = $this->db->get(db_prefix().'loy_card')->result_array();\n\t\treturn $cards;\n\t}","title":""},{"docid":"1385489a6f612d744af167a2f145ebb2","score":"0.4628046","text":"function Chores(){\n $out = getChores();\n $out .= \"

    \";\n //$out .= getChoresDesc();\n //$out .= \"

    \";\n $out .= pickChoreList(1);\n return $out;\n\t\n}","title":""},{"docid":"77552a561cd361af8f330a232307988f","score":"0.46266922","text":"function showcards($hand) {\n\tfor ($i=0; $hand[$i]; $i++) {\n\t\t\t$cards .= '\"card\"';\n\t}\n\t\n\treturn $cards;\n}","title":""},{"docid":"1cc82584e6403e4670dd8b7960cb0131","score":"0.46264967","text":"function playerDist($deck)\n {\n $playerQue = new queue();\n for ($i = 1; $i < 5; $i++) {\n echo \"Enter player $i name \";\n $player = new Player(Utility::String_input());\n for ($j = 0; $j < 9; $j++) {\n $r = rand(0, 3);\n $c = rand(0, count($deck[$r]) - 1);\n $player->pushCard($deck[$r][$c]);\n array_splice($deck[$r], $c, 1);\n }\n $playerQue->enqueue($player);\n }\n return $playerQue;\n }","title":""},{"docid":"ab4f7c7b52e2ae46c55e3b46ebbb6524","score":"0.46256393","text":"function list_pembicara(){\r\n }","title":""},{"docid":"5880b687e5ffd619c884be696be7794d","score":"0.4624098","text":"function isFullHouse()\n\t{\n\t\t$result[\"bool\"] = false;\n\t\t$result[\"ptg\"] = array();\n\t\t$result[\"type\"] = array();\n\t\t\n\t\t$myTrisCard = 0; \n\t\t\t\t\n\t\t$c_cards = count($this->cards);\n\t\tfor ($x = 0; $x < $c_cards; $x++)\n\t\t{\n\t\t\tfor ($y = ($x+1); $y < $c_cards; $y++)\n\t\t\t{\n\t\t\t\tfor ($t = ($y+1); $t < $c_cards; $t++)\n\t\t\t\t{\n\t\t\t\t\t$arr_temp_x = $this->cards[$x];\n\t\t\t\t\t$arr_temp_y = $this->cards[$y];\n\t\t\t\t\t$arr_temp_t = $this->cards[$t];\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (\n\t\t\t\t\t\t(key($arr_temp_x)==key($arr_temp_y)) && \n\t\t\t\t\t\t(key($arr_temp_x)==key($arr_temp_t))\n\t\t\t\t\t\t) \n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t$result[\"ptg\"][0][key($arr_temp_x)] = $this->cards[$x][key($arr_temp_x)];\n\t\t\t\t\t\t$result[\"ptg\"][1][key($arr_temp_y)] = $this->cards[$y][key($arr_temp_y)];\n\t\t\t\t\t\t$result[\"ptg\"][2][key($arr_temp_t)] = $this->cards[$t][key($arr_temp_t)];\n\t\t\t\t\t\t$myTrisCard = key($arr_temp_x);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\tunset($arr_temp_x);\n\t\tunset($arr_temp_y);\n\t\tunset($arr_temp_t);\n\t\t\t\n\t\t\n\t\tif ($myTrisCard != 0) \n\t\t{\n\t\t\tfor($x = 0; $x < $c_cards; $x++)\n\t\t\t{\n\t\t\t\tfor ($y = ($x+1); $y < $c_cards; $y++)\n\t\t\t\t{\n\t\t\t\t\t$arr_temp_x = $this->cards[$x];\n\t\t\t\t\t$arr_temp_y = $this->cards[$y];\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (\n\t\t\t\t\t\t(key($arr_temp_x)==key($arr_temp_y)) && \n\t\t\t\t\t\t(key($arr_temp_x) != $myTrisCard) \n\t\t\t\t\t\t) \n\t\t\t\t\t{\n\t\t\t\t\t\t$result[\"ptg\"][3][key($arr_temp_x)] = $this->cards[$x][key($arr_temp_x)];\n\t\t\t\t\t\t$result[\"ptg\"][4][key($arr_temp_y)] = $this->cards[$y][key($arr_temp_y)];\n\t\t\t\t\t\t$result[\"type\"] = PKR_FULLHOUSE;\n\t\t\t\t\t\t$result[\"bool\"] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\t\n\t\tunset($arr_temp_x);\n\t\tunset($arr_temp_y);\t\t\n\t\t\n\t\treturn $result; \t\n\t}","title":""},{"docid":"7755e152d6bb2a7c6d281f0af462a0b0","score":"0.46230718","text":"function getCardioGoals()\n {\n //make array of all cardio goals and index to iterate through\n $cardioGoals = [];\n $index = 0;\n\n //query database to get all cardio distance goals\n $cardioSQL = \"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_DISTANCE FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-DISTANCE' AND FITNESS_GOAL_ACTIVE='1'\";\n $cardioQuery = $this->comMod->queryDatabase($cardioSQL);\n\n //add distance goals to array\n while($currGoal = mysqli_fetch_array($cardioQuery))\n {\n //get goal details from database\n $days = $currGoal['FITNESS_GOAL_DURATION'];\n $type = $currGoal['FITNESS_GOAL_TYPE'];\n $milestone = $currGoal['FITNESS_GOAL_DISTANCE'];\n $id = $currGoal['FITNESS_GOAL_ID'];\n\n //create new goal object and add to array\n $goal = new CardioGoal($days, $type, $milestone, $id);\n $cardioGoals[$index] = $goal;\n\n //increase array index\n $index++;\n }//close while\n\n //query database to get all cardio speed goals\n $speedSQL = \"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_SPEED FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-SPEED' AND FITNESS_GOAL_ACTIVE='1'\";\n $speedQuery = $this->comMod->queryDatabase($speedSQL);\n\n //add speed goals to array\n while($currGoal = mysqli_fetch_array($speedQuery))\n {\n //get goal details from database\n $days = $currGoal['FITNESS_GOAL_DURATION'];\n $type = $currGoal['FITNESS_GOAL_TYPE'];\n $milestone = $currGoal['FITNESS_GOAL_SPEED'];\n $id = $currGoal['FITNESS_GOAL_ID'];\n\n //create new goal object and add to array\n $goal = new CardioGoal($days, $type, $milestone, $id);\n $cardioGoals[$index] = $goal;\n\n //increase array index\n $index++;\n }//close while\n\n //query database to get all cardio time goals\n $timeSQL = \"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_TIME FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-TIME' AND FITNESS_GOAL_ACTIVE='1'\";\n $timeQuery = $this->comMod->queryDatabase($timeSQL);\n\n //add time goals to array\n while($currGoal = mysqli_fetch_array($timeQuery))\n {\n //get goal details from database\n $days = $currGoal['FITNESS_GOAL_DURATION'];\n $type = $currGoal['FITNESS_GOAL_TYPE'];\n $milestone = $currGoal['FITNESS_GOAL_TIME'];\n $id = $currGoal['FITNESS_GOAL_ID'];\n\n //create new goal object and add to array\n $goal = new CardioGoal($days, $type, $milestone, $id);\n $cardioGoals[$index] = $goal;\n\n //increase array index\n $index++;\n }//close while\n\n //return array of all three cardio goal types\n return $cardioGoals;\n }","title":""},{"docid":"3bbb3c310aaa55d29de1c9c0fe63d871","score":"0.46204194","text":"public function getCards()\n {\n return $this->cards;\n }","title":""},{"docid":"3bbb3c310aaa55d29de1c9c0fe63d871","score":"0.46204194","text":"public function getCards()\n {\n return $this->cards;\n }","title":""},{"docid":"3bbb3c310aaa55d29de1c9c0fe63d871","score":"0.46204194","text":"public function getCards()\n {\n return $this->cards;\n }","title":""},{"docid":"04d035bd61f2e161b1ce4e98bd8942b1","score":"0.46150744","text":"public function includes_toprank_herokills() \n\t{\n\t\tglobal $home_module; // PHP Globals\r\n\r\n\t\t$CTM_HTML = NULL;\n\t\t$CTM_HTML .= \" \t
    \r\n \t\".(count($home_module['rankings']['heroKills']) > 0 ? \"\".($this->settings['HOME']['TOP_RANK']['HERO_KILLS'][2] == true ? \"
      \r\n \t\".$this->loop__includes_toprank_herokills__0x04().\"\r\n \t\t
    \" : \"
      \r\n
    • \r\n {$this->lang->words['Home']['TopRank']['Words']['Position']}\r\n {$this->lang->words['Home']['TopRank']['Words']['Name']}\r\n {$this->lang->words['Home']['TopRank']['Words']['HeroKills']}\r\n
    • \r\n \".$this->loop__includes_toprank_herokills__0x05().\"\r\n
    \").\"\" : NULL).\"\r\n \t\t
    \";\n\t\treturn $CTM_HTML;\n\t}","title":""},{"docid":"5bbe3e17996f13bb3cbd997b1eead792","score":"0.46130693","text":"function get_allp(){\n\t \n\t\t $this->db->order_by('p_name asc, cnum asc');\n\t\t $query = $this->db->get('patients'); \n return $query->result(); \n\t }","title":""},{"docid":"bbd1321755f197b4d43431a49abd6b48","score":"0.46096805","text":"public function play() {\n\t\t// Jogo os Tokens Primeiro !\n\t\t$quantidade_cartas = count ( $this->hand );\n\t\tif ($quantidade_cartas == 0)\n\t\t\treturn;\n\t\tforeach ( $this->hand as $indice => $carta ) {\n\t\t\tif ($carta ['type'] == TOKEN) {\n\t\t\t\t$this->board [] = $this->hand [$indice];\n\t\t\t\tunset ( $this->hand [$indice] );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->board [] = array_shift ( $this->hand );\n\t\treturn;\n\t}","title":""},{"docid":"21d85b1c4670d969a4e92de83dab4794","score":"0.4607595","text":"protected function buildRoute() {\n\t\t$count = $this->holder->getCount();\n $result = [];\n\n\t\tif ($count) {\n\t\t\tfor ($item = 0; $item < $count; $item++) {\n\t\t\t\t$card = $this->holder->getCard($item);\n\n\t\t\t\t$result[] = $card;\n\t\t\t\t$tmp_card = $card;\n\n\t\t\t\tfor ($index = 1; $index < $count; $index++) {\n\t\t\t\t $destination = $tmp_card->getDestination();\n\n\t\t\t\t\tif ($next_card = $this->holder->getCardByOrigin($destination)) {\n\t\t\t\t\t\t$result[] = $next_card;\n\t\t\t\t\t\t$tmp_card = $next_card;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (count($result) == $count) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t $result = [];\n }\n\t\t\t}\n\t\t}\n\n $this->route = $result;\n\t}","title":""}],"string":"[\n {\n \"docid\": \"841795e327d045775881f1d44ca5c2f6\",\n \"score\": \"0.57414246\",\n \"text\": \"function supercard($pid){\\n\\t\\n\\t$playerstats = get_player_data($pid);\\n\\t$info = get_player_basic_info($pid);\\n\\t$firstname = $info[0]['first'];\\n\\t$lastname = $info[0]['last'];\\n\\t$position = $info[0]['position'];\\n\\n\\t$getpotw = get_player_of_week();\\n\\t$thecount = array_count_values($getpotw);\\n\\n\\t$plpotw = $totalpotw[$pid];\\n\\tif(is_array($sumpotw)){\\n\\t\\t$sumpotw = array_sum($plpotw);\\n\\t}\\n\\t\\n\\t$career = get_player_career_stats($pid);\\n\\t$pbapps = array();\\n\\t$playerchamps = array();\\n\\t$printawards = array();\\n\\t\\n\\t$playerimgobj = get_attachment_url_by_slug($pid);\\n\\t$imgid = attachment_url_to_postid( $playerimgobj );\\n\\t$image_attributes = wp_get_attachment_image_src($imgid, array( 100, 100 ));\\t\\n\\t$playerimg = $image_attributes[0];\\n $teamsbyid = teamlist();\\n\\t$honorring = get_ring_of_honor();\\n\\t\\n\\t$justchamps = get_just_champions();\\n\\t$teams = get_teams();\\n\\t$teamslist = get_player_teams_season($pid);\\n\\t\\t\\t\\t\\t\\t\\n\\t$get = playerplayoffs($pid);\\n\\t\\n\\tif(!empty($get)){\\n\\t\\tforeach($get as $key => $value){\\n\\t\\t\\tif($value['week'] == 16){\\n\\t\\t\\t\\t$pbapps[$value['year']] = $value['team'];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\t\\n\\tforeach ($pbapps as $key => $value){\\n\\t\\tif ($value == $justchamps[$key]){\\n\\t\\t\\t$playerchamps[$key] = $value;\\n\\t\\t}\\n\\t}\\n\\n\\t$plawards = get_player_award($pid);\\n\\t\\n\\tif(!empty($plawards)){\\n\\t\\tforeach ($plawards as $key => $value){\\n\\t\\t\\tif ($value['award'] != 'Hall of Fame Inductee'){\\n\\t\\t\\t\\t$printawards[] = $value['awardid'];\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t$number_ones = get_number_ones();\\n\\t$halloffame = get_award_hall();\\n\\t$gamesbyteam = get_player_team_games($pid);\\n\\t\\n\\t\\techo '
    ';\\n\\t\\t\\techo '
    ';\\n\\t\\t\\t\\techo '
    ';\\n\\t\\t\\t\\t\\techo '

    Posse Football League

    ';\\n\\t\\t\\t\\techo '
    ';\\n\\t\\t\\t\\t\\n\\t\\t\\t\\techo '
    ';\\n\\t\\t\\t\\t\\techo ''.$firstname.' '.$lastname.'&nbsp;'.$position;\\n\\t\\t\\t\\t\\tif($info[0]['height'] != ''):\\n\\t\\t\\t\\t\\t\\techo '

    '.$info[0]['height'].', '.$info[0]['weight'].' lbs. | '.$info[0]['college'].' | #'.$info[0]['number'].'

    ';\\n\\t\\t\\t\\t\\tendif;\\n\\t\\t\\t\\t//echo '';\\n if($playerimg):\\n\\t\\t\\t\\t echo '\\\"Profile';\\n endif;\\n ?>\\n $value):\\n if ($r == 0):\\n $string .= ''.$teams[$key]['team'].', ';\\n else:\\n $string .= $teams[$key]['team'].', ';\\n endif;\\n $r++;\\n endforeach;\\n echo 'PFL Teams: '.substr($string, 0, -2);\\n endif;\\n ?>\\n\\n\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\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\\n\\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\\n\\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\\n\\t\\t\\t\\t\\t\\t 0){\\t\\n\\t\\t\\t\\t\\t\\t\\t$end = end($career['years']);\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\tif ($st != $end){\\t?>\\n\\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\\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\\n\\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\\n\\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\\n\\t\\t\\t\\t\\t\\n\\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\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t $value){\\n\\t\\t\\t\\t\\t\\t\\tif ($value['playerid'] == $pid){\\n\\t\\t\\t\\t\\t\\t\\t\\t$player_number_ones[$key] = array(\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'id' => $value['id'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'points' => $value['points'],\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t'team' => $value['teams']\\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\\t\\n\\t\\t\\t\\t\\t\\tif(!empty($player_number_ones)){?>\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\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\\n\\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\\t\\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\\n\\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\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t
    Points Scored 0){ echo number_format($career['points'],0); } else {echo 0; } ?>
    Games Played 0){ echo $career['games']; } else { echo 0; } ?>
    Position Rank
    SeasonsSeason
    Points Per Game
    Career High
    Career Awards\\n\\t\\t\\t\\t\\t\\t\\t';\\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\\t}?>\\n\\t\\t\\t\\t\\t\\t
    Position Scoring Titles\\n\\t\\t\\t\\t\\t\\t\\t';\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t\\t\\t}?>\\n\\t\\t\\t\\t\\t\\t\\t
    Player of The Week Time Times
    Posse Bowl Appearances\\n\\t\\t\\t\\t\\t\\t\\t $value){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\techo $key.' - '.$teams[$value]['team'].'
    ';\\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
    PFL Championships\\n\\t\\t\\t\\t\\t\\t\\t $value){\\n\\t\\t\\t\\t\\t\\t\\t\\t\\techo $key.' - '.$teams[$value]['team'].'
    ';\\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
    \\n\\t\\t\\t\\t\\t&nbsp;Inducted into the PFL Hall of Fame';\\n endif;\\n\\t\\t\\t\\t\\t\\tif(in_array($pid, $honorring)):\\n $pidkey = array_search ($pid, $honorring);\\n\\t\\t\\t\\t\\t\\t $honorteam = substr($pidkey, 0,3);\\n echo '
    '.$teamsbyid[$honorteam].' Ring of Honor
    ';\\n endif;\\n echo '
    ';\\n\\n\\t\\t\\t//TEMPORARY TO BUILD OLD PLAYER INFO DATA\\n\\t\\t\\tif($info[0]['weight'] == ''):\\n\\t\\t\\t\\tif($position == 'PK'):\\n\\t\\t\\t\\t\\techo 'INDEX LINK';\\n\\t\\t\\t\\tendif;\\n\\t\\t\\tendif;\\n\\t\\t\\t\\n\\t\\techo '
    ';\\n\\t\\t\\n\\t\\techo '
    ';\\n\\t\\techo '
    ';\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ff3c867429f177c3f5f35c0c466df48\",\n \"score\": \"0.5646972\",\n \"text\": \"public function getICards();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68dce60066a2d6b11342f4c9b21d4487\",\n \"score\": \"0.5501153\",\n \"text\": \"public function getCards()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"828ca849511c91d0777187386c0793cd\",\n \"score\": \"0.5495686\",\n \"text\": \"public function getSortoutCards() : array;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"634af0e6b176178d47bbdb3c26dba351\",\n \"score\": \"0.5448515\",\n \"text\": \"protected function mappingCards(){\\n\\t\\tfor($chairId=1;$chairId <= $this->chairAmount;$chairId++){\\n\\n\\t\\t\\t$cards = $this->detailCards[$chairId]['single'];\\n\\n\\t\\t\\t//cari kartu jendral\\n\\t\\t\\t$jendralCards = $this->getJendralCards($cards);\\n\\t\\t\\tif($jendralCards){\\n\\t\\t\\t\\t$this->detailCards[$chairId]['jendral']=$jendralCards;\\n\\t\\t\\t\\tforeach($jendralCards as $v){\\n\\t\\t\\t\\t\\t$cards=array_diff($cards,$v);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t//cari kartu urut 4 kartu\\n\\t\\t\\t$fourSeriesCards = $this->getFourSeriesCards($cards);\\n\\t\\t\\tif($fourSeriesCards){\\n\\t\\t\\t\\t$this->detailCards[$chairId]['fourSeries']=$fourSeriesCards;\\n\\t\\t\\t\\tforeach($fourSeriesCards as $v){\\n\\t\\t\\t\\t\\t$cards=array_diff($cards,$v);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t//cari kartu urut 3 kartu\\n\\t\\t\\t$treeSeriesCards = $this->getTreeSeriesCards($cards);\\n\\t\\t\\tif($treeSeriesCards){\\n\\t\\t\\t\\t$this->detailCards[$chairId]['treeSeries']=$treeSeriesCards;\\n\\t\\t\\t\\tforeach($treeSeriesCards as $v){\\n\\t\\t\\t\\t\\t$cards=array_diff($cards,$v);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\t//cari kartu tree\\n\\t\\t\\t$treeCards = $this->getTreeCards($cards);\\n\\t\\t\\tif($treeCards){\\n\\t\\t\\t\\t$this->detailCards[$chairId]['tree']=$treeCards;\\n\\t\\t\\t\\tforeach($treeCards as $v){\\n\\t\\t\\t\\t\\t$cards=array_diff($cards,$v);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t$this->detailCards[$chairId]['single'] = $cards;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bce68ea547f40ac2be18e29bb360bdae\",\n \"score\": \"0.5426097\",\n \"text\": \"private function distribute()\\n {\\n // A,2-9,X,J,Q,K\\n $this->loadmodel('Cards');\\n $deck = $this->Cards->find();\\n\\n $player_and_cards = array();\\n foreach($deck as $eachCard) {\\n \\n // distribute each card to random player\\n $player_to_distribute = rand(1,$this->players);\\n $card = ($eachCard['suit'].'-'.$eachCard['card_number']);\\n if (!isset($player_and_cards[$player_to_distribute]['cards'])) {\\n $player_and_cards[$player_to_distribute]['cards'] = array();\\n }\\n array_push($player_and_cards[$player_to_distribute]['cards'], $card);\\n }\\n\\n // dd($player_and_cards);\\n $this->request->getSession()->write('cards', $player_and_cards);\\n $this->redirect(['controller' => 'Pages', 'action' => 'display', 'index']);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8274f866ea72e7fb89e9becd95bc10c9\",\n \"score\": \"0.53157175\",\n \"text\": \"public function getHoleCards(){\\n\\t\\treturn array($this->dealCard(), $this->dealCard());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7b711226b9ab1bd0d6ad85f8056365b\",\n \"score\": \"0.5313573\",\n \"text\": \"public function createJourney(): array\\n {\\n $boardingCards = $this->boardingCards->getBoardingCards();\\n\\n $sortedBoardingCards = $this->arraySorter($boardingCards);\\n\\n return $sortedBoardingCards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a354a668b8886342f9d4a9a6a4ced410\",\n \"score\": \"0.5228113\",\n \"text\": \"public function get_hands() {\\r\\n\\t\\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\\r\\n\\t\\t$hand = array();\\r\\n\\t\\tforeach ($all as $card) {\\r\\n\\t\\t\\t$card = (array)$card;\\r\\n\\t\\t\\t$card['place'] = unserialize($card['place']);\\r\\n\\t\\t\\tif (isset($card['place']['value']) && \\r\\n\\t\\t\\t\\t$card['place']['value'] == 'hand') {\\r\\n\\t\\t\\t\\tarray_push($hand, $card);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $hand;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae7850c033f82190579d5e3d235a84d2\",\n \"score\": \"0.5195402\",\n \"text\": \"public function getFiveCards() : array;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"056c66534d084bda2d8b0e8932926451\",\n \"score\": \"0.5173233\",\n \"text\": \"public function dealICards();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e2b5e59b9188fa546dd71028e9a2b4b\",\n \"score\": \"0.51257366\",\n \"text\": \"public function cards()\\n {\\n //creating array of cardzz\\n $cardzz = [];\\n $i = 0; //taking temp var and intializing to 0\\n for ($x = 0; $x < count($this->suite); $x++) {\\n\\n for ($y = 0; $y < count($this->rank); $y++) {\\n\\n //adding all the data into the cardzz array\\n $cardzz[$i++] = $this->rank[$y] . \\\",\\\" . $this->suite[$x];\\n\\n }\\n }\\n return $cardzz;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29bef98939264d1a991756a147cb7ac7\",\n \"score\": \"0.5112266\",\n \"text\": \"function generate_crommosom() {\\n $numb = 0;\\n while($numb < $this->num_crommosom) { //diulang sesuai jumlah kromosom yang diinputkan\\n $cro = $this->get_rand_crommosom(); \\n $this->crommosom[] = $cro; \\n $this->fitness[] = 0; \\n $numb++;\\n } \\n //print_r($this->fitness);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e1ddf0827494788569ccaed3bc7881e\",\n \"score\": \"0.5096745\",\n \"text\": \"function stGiveCards()\\n {\\n $this->gamestate->setAllPlayersMultiactive();\\n\\t\\t// (and keep the current sentence builder non-active)\\n\\t\\t$active_player_id = self::getGameStateValue( 'playerBuildingSentence' );\\n $this->gamestate->setPlayerNonMultiactive( $active_player_id , \\\"giveCards\\\" );\\n $players = self::loadPlayersBasicInfos();\\t\\n // give everybody except the active player time to choose cards \\n foreach( $players as $player_id => $player ) {\\n\\n if ($player_id != $active_player_id) {\\n $this-> giveExtraTime( $player_id);\\n \\n }\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0134b14db0fc5e76506a302caaf10567\",\n \"score\": \"0.50958425\",\n \"text\": \"function generate_crommosom() {\\r\\n $numb = 0;\\r\\n while($numb < $this->num_crommosom) { //diulang sesuai jumlah kromosom yang diinputkan\\r\\n $cro = $this->get_rand_crommosom(); \\r\\n $this->crommosom[] = $cro; \\r\\n $this->fitness[] = 0; \\r\\n $numb++;\\r\\n } \\r\\n //print_r($this->fitness);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54556f83e2796190d8f1e2ba5c72f4e5\",\n \"score\": \"0.5077199\",\n \"text\": \"function pmp_get_creators() {\\n\\treturn array(\\n\\t\\t'APM' => '98bf597a-2a6f-446c-9b7e-d8ae60122f0d',\\n\\t\\t'NPR' => '6140faf0-fb45-4a95-859a-070037fafa01',\\n\\t\\t'PBS' => 'fc53c568-e939-4d9c-86ea-c2a2c70f1a99',\\n\\t\\t'PRI' => '7a865268-c9de-4b27-a3c1-983adad90921',\\n\\t\\t'PRX' => '609a539c-9177-4aa7-acde-c10b77a6a525'\\n\\t);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33edb8e50a49db5d0f6a173dfa867377\",\n \"score\": \"0.5042517\",\n \"text\": \"function getCards() {\\n $query = \\\"select * from pkr_card where game=\\\" . $this->curr_game . \\\" order by seq\\\";\\n $rows = $GLOBALS['mydb']->select($query);\\n return $rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10f5929044e4a5f79b017a7b742bb507\",\n \"score\": \"0.5041633\",\n \"text\": \"public function calculateAllPossibilitiesProvider()\\n {\\n return array(\\n array(\\n new Subject(\\n array(\\n 'name' => 'Mario',\\n 'surname' => 'Rossi',\\n 'birthDate' => '1985-12-10',\\n 'gender' => 'M',\\n 'belfioreCode' => 'A562',\\n )\\n ),\\n array(\\n 'RSSMRA85T10A562S',\\n 'RSSMRA85T10A56NH',\\n 'RSSMRA85T10A5S2E',\\n 'RSSMRA85T10A5SNT',\\n 'RSSMRA85T10AR62N',\\n 'RSSMRA85T10AR6NC',\\n 'RSSMRA85T10ARS2Z',\\n 'RSSMRA85T10ARSNO',\\n 'RSSMRA85T1LA562V',\\n 'RSSMRA85T1LA56NK',\\n 'RSSMRA85T1LA5S2H',\\n 'RSSMRA85T1LA5SNW',\\n 'RSSMRA85T1LAR62Q',\\n 'RSSMRA85T1LAR6NF',\\n 'RSSMRA85T1LARS2C',\\n 'RSSMRA85T1LARSNR',\\n 'RSSMRA85TM0A562D',\\n 'RSSMRA85TM0A56NS',\\n 'RSSMRA85TM0A5S2P',\\n 'RSSMRA85TM0A5SNE',\\n 'RSSMRA85TM0AR62Y',\\n 'RSSMRA85TM0AR6NN',\\n 'RSSMRA85TM0ARS2K',\\n 'RSSMRA85TM0ARSNZ',\\n 'RSSMRA85TMLA562G',\\n 'RSSMRA85TMLA56NV',\\n 'RSSMRA85TMLA5S2S',\\n 'RSSMRA85TMLA5SNH',\\n 'RSSMRA85TMLAR62B',\\n 'RSSMRA85TMLAR6NQ',\\n 'RSSMRA85TMLARS2N',\\n 'RSSMRA85TMLARSNC',\\n 'RSSMRA8RT10A562E',\\n 'RSSMRA8RT10A56NT',\\n 'RSSMRA8RT10A5S2Q',\\n 'RSSMRA8RT10A5SNF',\\n 'RSSMRA8RT10AR62Z',\\n 'RSSMRA8RT10AR6NO',\\n 'RSSMRA8RT10ARS2L',\\n 'RSSMRA8RT10ARSNA',\\n 'RSSMRA8RT1LA562H',\\n 'RSSMRA8RT1LA56NW',\\n 'RSSMRA8RT1LA5S2T',\\n 'RSSMRA8RT1LA5SNI',\\n 'RSSMRA8RT1LAR62C',\\n 'RSSMRA8RT1LAR6NR',\\n 'RSSMRA8RT1LARS2O',\\n 'RSSMRA8RT1LARSND',\\n 'RSSMRA8RTM0A562P',\\n 'RSSMRA8RTM0A56NE',\\n 'RSSMRA8RTM0A5S2B',\\n 'RSSMRA8RTM0A5SNQ',\\n 'RSSMRA8RTM0AR62K',\\n 'RSSMRA8RTM0AR6NZ',\\n 'RSSMRA8RTM0ARS2W',\\n 'RSSMRA8RTM0ARSNL',\\n 'RSSMRA8RTMLA562S',\\n 'RSSMRA8RTMLA56NH',\\n 'RSSMRA8RTMLA5S2E',\\n 'RSSMRA8RTMLA5SNT',\\n 'RSSMRA8RTMLAR62N',\\n 'RSSMRA8RTMLAR6NC',\\n 'RSSMRA8RTMLARS2Z',\\n 'RSSMRA8RTMLARSNO',\\n 'RSSMRAU5T10A562P',\\n 'RSSMRAU5T10A56NE',\\n 'RSSMRAU5T10A5S2B',\\n 'RSSMRAU5T10A5SNQ',\\n 'RSSMRAU5T10AR62K',\\n 'RSSMRAU5T10AR6NZ',\\n 'RSSMRAU5T10ARS2W',\\n 'RSSMRAU5T10ARSNL',\\n 'RSSMRAU5T1LA562S',\\n 'RSSMRAU5T1LA56NH',\\n 'RSSMRAU5T1LA5S2E',\\n 'RSSMRAU5T1LA5SNT',\\n 'RSSMRAU5T1LAR62N',\\n 'RSSMRAU5T1LAR6NC',\\n 'RSSMRAU5T1LARS2Z',\\n 'RSSMRAU5T1LARSNO',\\n 'RSSMRAU5TM0A562A',\\n 'RSSMRAU5TM0A56NP',\\n 'RSSMRAU5TM0A5S2M',\\n 'RSSMRAU5TM0A5SNB',\\n 'RSSMRAU5TM0AR62V',\\n 'RSSMRAU5TM0AR6NK',\\n 'RSSMRAU5TM0ARS2H',\\n 'RSSMRAU5TM0ARSNW',\\n 'RSSMRAU5TMLA562D',\\n 'RSSMRAU5TMLA56NS',\\n 'RSSMRAU5TMLA5S2P',\\n 'RSSMRAU5TMLA5SNE',\\n 'RSSMRAU5TMLAR62Y',\\n 'RSSMRAU5TMLAR6NN',\\n 'RSSMRAU5TMLARS2K',\\n 'RSSMRAU5TMLARSNZ',\\n 'RSSMRAURT10A562B',\\n 'RSSMRAURT10A56NQ',\\n 'RSSMRAURT10A5S2N',\\n 'RSSMRAURT10A5SNC',\\n 'RSSMRAURT10AR62W',\\n 'RSSMRAURT10AR6NL',\\n 'RSSMRAURT10ARS2I',\\n 'RSSMRAURT10ARSNX',\\n 'RSSMRAURT1LA562E',\\n 'RSSMRAURT1LA56NT',\\n 'RSSMRAURT1LA5S2Q',\\n 'RSSMRAURT1LA5SNF',\\n 'RSSMRAURT1LAR62Z',\\n 'RSSMRAURT1LAR6NO',\\n 'RSSMRAURT1LARS2L',\\n 'RSSMRAURT1LARSNA',\\n 'RSSMRAURTM0A562M',\\n 'RSSMRAURTM0A56NB',\\n 'RSSMRAURTM0A5S2Y',\\n 'RSSMRAURTM0A5SNN',\\n 'RSSMRAURTM0AR62H',\\n 'RSSMRAURTM0AR6NW',\\n 'RSSMRAURTM0ARS2T',\\n 'RSSMRAURTM0ARSNI',\\n 'RSSMRAURTMLA562P',\\n 'RSSMRAURTMLA56NE',\\n 'RSSMRAURTMLA5S2B',\\n 'RSSMRAURTMLA5SNQ',\\n 'RSSMRAURTMLAR62K',\\n 'RSSMRAURTMLAR6NZ',\\n 'RSSMRAURTMLARS2W',\\n 'RSSMRAURTMLARSNL',\\n ),\\n ),\\n array(\\n new Subject(\\n array(\\n 'name' => 'Roberto',\\n 'surname' => 'Santi',\\n 'birthDate' => '1963-05-08',\\n 'gender' => 'M',\\n 'belfioreCode' => 'H501',\\n )\\n ),\\n array(\\n 'SNTRRT63E08H501T',\\n 'SNTRRT63E08H50ML',\\n 'SNTRRT63E08H5L1E',\\n 'SNTRRT63E08H5LMW',\\n 'SNTRRT63E08HR01O',\\n 'SNTRRT63E08HR0MG',\\n 'SNTRRT63E08HRL1Z',\\n 'SNTRRT63E08HRLMR',\\n 'SNTRRT63E0UH501Q',\\n 'SNTRRT63E0UH50MI',\\n 'SNTRRT63E0UH5L1B',\\n 'SNTRRT63E0UH5LMT',\\n 'SNTRRT63E0UHR01L',\\n 'SNTRRT63E0UHR0MD',\\n 'SNTRRT63E0UHRL1W',\\n 'SNTRRT63E0UHRLMO',\\n 'SNTRRT63EL8H501E',\\n 'SNTRRT63EL8H50MW',\\n 'SNTRRT63EL8H5L1P',\\n 'SNTRRT63EL8H5LMH',\\n 'SNTRRT63EL8HR01Z',\\n 'SNTRRT63EL8HR0MR',\\n 'SNTRRT63EL8HRL1K',\\n 'SNTRRT63EL8HRLMC',\\n 'SNTRRT63ELUH501B',\\n 'SNTRRT63ELUH50MT',\\n 'SNTRRT63ELUH5L1M',\\n 'SNTRRT63ELUH5LME',\\n 'SNTRRT63ELUHR01W',\\n 'SNTRRT63ELUHR0MO',\\n 'SNTRRT63ELUHRL1H',\\n 'SNTRRT63ELUHRLMZ',\\n 'SNTRRT6PE08H501F',\\n 'SNTRRT6PE08H50MX',\\n 'SNTRRT6PE08H5L1Q',\\n 'SNTRRT6PE08H5LMI',\\n 'SNTRRT6PE08HR01A',\\n 'SNTRRT6PE08HR0MS',\\n 'SNTRRT6PE08HRL1L',\\n 'SNTRRT6PE08HRLMD',\\n 'SNTRRT6PE0UH501C',\\n 'SNTRRT6PE0UH50MU',\\n 'SNTRRT6PE0UH5L1N',\\n 'SNTRRT6PE0UH5LMF',\\n 'SNTRRT6PE0UHR01X',\\n 'SNTRRT6PE0UHR0MP',\\n 'SNTRRT6PE0UHRL1I',\\n 'SNTRRT6PE0UHRLMA',\\n 'SNTRRT6PEL8H501Q',\\n 'SNTRRT6PEL8H50MI',\\n 'SNTRRT6PEL8H5L1B',\\n 'SNTRRT6PEL8H5LMT',\\n 'SNTRRT6PEL8HR01L',\\n 'SNTRRT6PEL8HR0MD',\\n 'SNTRRT6PEL8HRL1W',\\n 'SNTRRT6PEL8HRLMO',\\n 'SNTRRT6PELUH501N',\\n 'SNTRRT6PELUH50MF',\\n 'SNTRRT6PELUH5L1Y',\\n 'SNTRRT6PELUH5LMQ',\\n 'SNTRRT6PELUHR01I',\\n 'SNTRRT6PELUHR0MA',\\n 'SNTRRT6PELUHRL1T',\\n 'SNTRRT6PELUHRLML',\\n 'SNTRRTS3E08H501Q',\\n 'SNTRRTS3E08H50MI',\\n 'SNTRRTS3E08H5L1B',\\n 'SNTRRTS3E08H5LMT',\\n 'SNTRRTS3E08HR01L',\\n 'SNTRRTS3E08HR0MD',\\n 'SNTRRTS3E08HRL1W',\\n 'SNTRRTS3E08HRLMO',\\n 'SNTRRTS3E0UH501N',\\n 'SNTRRTS3E0UH50MF',\\n 'SNTRRTS3E0UH5L1Y',\\n 'SNTRRTS3E0UH5LMQ',\\n 'SNTRRTS3E0UHR01I',\\n 'SNTRRTS3E0UHR0MA',\\n 'SNTRRTS3E0UHRL1T',\\n 'SNTRRTS3E0UHRLML',\\n 'SNTRRTS3EL8H501B',\\n 'SNTRRTS3EL8H50MT',\\n 'SNTRRTS3EL8H5L1M',\\n 'SNTRRTS3EL8H5LME',\\n 'SNTRRTS3EL8HR01W',\\n 'SNTRRTS3EL8HR0MO',\\n 'SNTRRTS3EL8HRL1H',\\n 'SNTRRTS3EL8HRLMZ',\\n 'SNTRRTS3ELUH501Y',\\n 'SNTRRTS3ELUH50MQ',\\n 'SNTRRTS3ELUH5L1J',\\n 'SNTRRTS3ELUH5LMB',\\n 'SNTRRTS3ELUHR01T',\\n 'SNTRRTS3ELUHR0ML',\\n 'SNTRRTS3ELUHRL1E',\\n 'SNTRRTS3ELUHRLMW',\\n 'SNTRRTSPE08H501C',\\n 'SNTRRTSPE08H50MU',\\n 'SNTRRTSPE08H5L1N',\\n 'SNTRRTSPE08H5LMF',\\n 'SNTRRTSPE08HR01X',\\n 'SNTRRTSPE08HR0MP',\\n 'SNTRRTSPE08HRL1I',\\n 'SNTRRTSPE08HRLMA',\\n 'SNTRRTSPE0UH501Z',\\n 'SNTRRTSPE0UH50MR',\\n 'SNTRRTSPE0UH5L1K',\\n 'SNTRRTSPE0UH5LMC',\\n 'SNTRRTSPE0UHR01U',\\n 'SNTRRTSPE0UHR0MM',\\n 'SNTRRTSPE0UHRL1F',\\n 'SNTRRTSPE0UHRLMX',\\n 'SNTRRTSPEL8H501N',\\n 'SNTRRTSPEL8H50MF',\\n 'SNTRRTSPEL8H5L1Y',\\n 'SNTRRTSPEL8H5LMQ',\\n 'SNTRRTSPEL8HR01I',\\n 'SNTRRTSPEL8HR0MA',\\n 'SNTRRTSPEL8HRL1T',\\n 'SNTRRTSPEL8HRLML',\\n 'SNTRRTSPELUH501K',\\n 'SNTRRTSPELUH50MC',\\n 'SNTRRTSPELUH5L1V',\\n 'SNTRRTSPELUH5LMN',\\n 'SNTRRTSPELUHR01F',\\n 'SNTRRTSPELUHR0MX',\\n 'SNTRRTSPELUHRL1Q',\\n 'SNTRRTSPELUHRLMI',\\n ),\\n ),\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccbdc7088a4ebdadd9d10fc507b37b86\",\n \"score\": \"0.5028845\",\n \"text\": \"public function getFinishRewards() \\n {/*\\n $conf = Common::getConfig('FinishRewards');\\n \\n $oUser = User::getById(Controller::$uId);\\n $oEvent = Event::getById(Controller::$uId);\\n $maxPearFlower = Common::getConfig('General','PearFlowerInfo','maxgetPearFlower');\\n $rand_Id = $this->newRandom($conf);\\n do\\n {\\n $gifId = $this->newRandom($conf[$rand_Id]['Rewards']);\\n }\\n while($conf[$rand_Id]['Rewards'][$gifId]['Color'] == 4 && $oEvent->EventList['PearFlower']['MaxPearFlower'] >=$maxPearFlower);\\n if($conf[$rand_Id]['Rewards'][$gifId]['Color'] == 4)\\n $oEvent->EventList['PearFlower']['MaxPearFlower'] += 1 ;\\n \\n $gift = $conf[$rand_Id]['Rewards'][$gifId] ;\\n \\n $arr_gift = array();\\n \\n if(SoldierEquipment::checkExist($gift['ItemType']))\\n {\\n $AutoId = $oUser->getAutoId(); \\n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'][] = $oEquipment ;\\n $arr_gift['SpecialGift'][] = $oEquipment ;\\n }\\n else\\n {\\n unset($gift['Rate']);\\n $arr_gift['NormalGift'][]= $gift ; \\n } \\n */\\n // them kinh nghiem\\n $successExp = Common::getParam('SuccessRewards');\\n $ExpGift = array('ItemType'=>'Exp','Num'=>$successExp);\\n $arr_gift['NormalGift'][]= $ExpGift;\\n \\n return $arr_gift ;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5179137bf4bd93d3e2a7847c1af7630a\",\n \"score\": \"0.50281733\",\n \"text\": \"public function getTreasureRewards() \\n {\\n $conf_treasure = Common::getConfig('TreasureRewards') ;\\n \\n $oUser = User::getById(Controller::$uId); \\n \\n \\n // kiem tra xem da ra maze key hay chua\\n if($this->MazeKeyInfo['Num2'] > 0)\\n $rand_Id = $this->newRandom($conf_treasure,12); // loai truong hop ra mazekey\\n else if($this->MazeKeyInfo['OpenTreasure'] >= 6)\\n $rand_Id = 12; // cho ra maze key luon\\n else \\n $rand_Id = $this->newRandom($conf_treasure);\\n \\n \\n $gifId = $this->newRandom($conf_treasure[$rand_Id]['Rewards']);\\n $gift = $conf_treasure[$rand_Id]['Rewards'][$gifId] ;\\n \\n //update MazekeyInfo\\n if($rand_Id == 12 )\\n {\\n $this->MazeKeyInfo['Num']++ ;\\n $this->MazeKeyInfo['Num2']++ ;\\n }\\n \\n \\n $this->MazeKeyInfo['OpenTreasure']++;\\n \\n \\n $arr_gift = array();\\n \\n if(SoldierEquipment::checkExist($gift['ItemType']))\\n {\\n $AutoId = $oUser->getAutoId(); \\n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'] = $oEquipment ;\\n $arr_gift['SpecialGift'] = $oEquipment ; \\n }\\n else\\n { \\n unset($gift['Rate']);\\n $arr_gift['NormalGift'] = $gift ;\\n \\n } \\n return $arr_gift ;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a8281fcc96c4a4f6ff87c6f018d8f983\",\n \"score\": \"0.50109696\",\n \"text\": \"private function createCards()\\n {\\n \\n $values = array('2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A');\\n $suits = array('S', 'H', 'D', 'C');\\n \\n $response = array();\\n foreach ($suits as $suit) {\\n foreach ($values as $value) {\\n $response[] = $value . $suit;\\n }\\n }\\n \\n return $response;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e2d2f25e2072cbf868f9045a095df83\",\n \"score\": \"0.49926955\",\n \"text\": \"public function getRewardsList(){\\n return $this->_get(5);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a1a0146de2eb5e3b0da3b2e35fb4d85\",\n \"score\": \"0.49921963\",\n \"text\": \"public function getRewardsList(){\\n return $this->_get(34);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a47e65d9be646409630099c0ed3a8b5d\",\n \"score\": \"0.4985543\",\n \"text\": \"public function planta_artigo()\\n {\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a42ce027f46eb7945a0dc879ba38e185\",\n \"score\": \"0.4969522\",\n \"text\": \"public function cards() {\\n return $this->morphToMany('TypiCMS\\\\Modules\\\\Cards\\\\Models\\\\Card', 'insurancepages_card', 'insurancepages_cards', 'insurancepage_id', 'card_id')\\n ->withPivot('card_id')\\n ->orderBy('position')\\n ->withTimestamps();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"802397e709bdd6572ac9f981df6ba0f3\",\n \"score\": \"0.4966512\",\n \"text\": \"protected function cards()\\n {\\n return [\\n new PaymentsPerDay,\\n new ActiveMembers,\\n new AttendancePerWeek,\\n new ActiveAttendanceBreakdown,\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"123a46a163466616c3221da1c7abf68d\",\n \"score\": \"0.49628118\",\n \"text\": \"function isStraight() \\n\\t{\\n\\t\\t$result[\\\"bool\\\"] = false;\\n\\t\\t$result[\\\"ptg\\\"] = array();\\n\\t\\t$result[\\\"type\\\"] = array();\\t\\n\\t\\n\\t\\t$c_cards = count($this->cards);\\n\\t for ($i=0; $i < $c_cards; $i++) \\n\\t {\\n\\t\\t $arr_temp_i = $this->cards[$i];\\n\\t foreach($arr_temp_i as $nKey => $nValue) \\n\\t {\\n\\t $cache[$i] = $nKey;\\n\\t }\\n\\t }\\n\\t\\t\\t\\t \\t \\n\\t unset($arr_temp_i);\\n\\t \\n\\t // Se ho un K allora mi conviene cambiare il 1 in 14 per la scala...\\n\\t // Siccome ho trasformato l'1 in 14 lo rimetto a 1\\n\\t $c_cache = count($cache);\\n\\t if (!in_array(13,$cache))\\n\\t {\\n\\t for ($i = 0; $i < $c_cache; $i++)\\n\\t \\t{\\n\\t\\t \\tif ($cache[$i]==14)\\n\\t\\t \\t\\t$cache[$i]=1;\\n\\t \\t}\\n\\t\\t}\\t\\t\\t\\n\\t\\t\\n\\t arsort($cache);\\t\\n\\t \\n\\t $total = count($cache);\\n\\t $retries = $total - 5;\\n\\t $counter = $start = current($cache);\\n\\t \\n\\t foreach ($cache as $a => $b) {\\n\\t if ($cache[$a] != $counter) {\\n\\t if ($retries > 0) {\\n\\t $retries--;\\n\\t $counter = $start = $cache[$a];\\n\\t } else {\\n\\t return $result;\\n\\t }\\n\\t }\\n\\t if (($start - 5) == $counter ) {\\n\\t break;\\n\\t }\\n\\t $counter--;\\n\\t }\\n\\t \\n\\n\\t // Se nn ho 13 allora il 14 lo trasformo in 1 in caso di scala !!\\n\\t $c_cache = count($cache);\\n\\t if (!in_array(13,$cache))\\n\\t {\\n\\t for ($i = 0; $i < $c_cache; $i++)\\n\\t \\t{\\n\\t\\t \\t$k = key($this->cards[$i]);\\n\\t\\t \\t$s = $this->cards[$i][$k];\\n\\t\\t \\tif ($k==14) {\\n\\t\\t\\t \\tunset($this->cards[$i]);\\n\\t\\t \\t\\t$this->cards[$i][1] = $s;\\t\\t \\t\\t\\n\\t \\t\\t}\\n\\t \\t}\\n\\t\\t}\\t \\n\\t\\t\\n\\t\\tusort($this->cards, by_key);\\n\\n\\t\\t$result[\\\"bool\\\"] = true;\\n\\t\\t$result[\\\"ptg\\\"] = $this->cards;\\n\\t\\t$result[\\\"type\\\"] = PKR_STRAIGHT;\\n\\t return $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"07cc776c66a922765cd88a768a95e68d\",\n \"score\": \"0.49538156\",\n \"text\": \"function getBestHand() {\\n $checkptg = new CheckPtg($this->cards);\\n\\n $var = $checkptg->isRoyalFlush();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n $var = $checkptg->isStraightFlush();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n $var = $checkptg->isFourOfAKind();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n // Non mi serve fare Usort\\n $var = $checkptg->isFullHouse();\\n //usort($var[\\\"ptg\\\"], by_key);\\t\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n $var = $checkptg->isFlush();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n $var = $checkptg->isStraight();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n $var = $checkptg->isThreeOfAKind();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n $var = $checkptg->isTwoPair();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n $var = $checkptg->isPair();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n\\n $var = $checkptg->isHighCard();\\n usort($var[\\\"ptg\\\"], by_key);\\n if ($var[\\\"bool\\\"])\\n return $var;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a44dad25eafe2c89ede1550b07eb379\",\n \"score\": \"0.49374753\",\n \"text\": \"public function getCard();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c503209f419104071412d3d996ecf93\",\n \"score\": \"0.49326724\",\n \"text\": \"function TirageAleatoire(){\\n $couleur = array(\\\"green\\\", \\\"yellow\\\", \\\"red\\\", \\\"blue\\\", \\\"pink\\\", \\\"purple\\\", \\\"orange\\\", \\\"grey\\\");\\n\\n shuffle($couleur);\\n $rand_keys = array_rand($couleur, 2);\\n $pion1 = $couleur[$rand_keys[0]];\\n\\n shuffle($couleur);\\n $rand_keys = array_rand($couleur, 2);\\n $pion2 = $couleur[$rand_keys[0]];\\n\\n shuffle($couleur);\\n $rand_keys = array_rand($couleur, 2);\\n $pion3 = $couleur[$rand_keys[0]];\\n\\n shuffle($couleur);\\n $rand_keys = array_rand($couleur, 2);\\n $pion4 = $couleur[$rand_keys[0]];\\n\\n $resultat = array(\\\"$pion1\\\", \\\"$pion2\\\", \\\"$pion3\\\", \\\"$pion4\\\");\\n return $resultat;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d8114e2dcd2637547749f63aa3055e3\",\n \"score\": \"0.49278986\",\n \"text\": \"protected function cards()\\n {\\n return [];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93438a8ff0c2fbbc38b9e5c4b9a391a0\",\n \"score\": \"0.4924486\",\n \"text\": \"function do_all_pings()\\n{\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cea353b48a53d3b3b03c10e56791e9bb\",\n \"score\": \"0.49088225\",\n \"text\": \"function limitrofes($pais1,$pais2){\\n\\t\\t\\tswitch( $pais1->getId() ){\\n\\t\\t\\t\\tcase 0: //yucon\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tcase 1://canada\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 2://alasca\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 4://oregon\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tcase 1: //canada\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tcase 0://yucon\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 4://oregon\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 5://nueva york\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 6://terranova\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 2: //alasca\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 0://yucon\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 4://oregon\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 35://alasca\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\tcase 3: //groenlandia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 7://labrador\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 5://nueva york\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 22://islandia\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 4: //oregon\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 2:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 0:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 1:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 5:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 8:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 5: //nueva york\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 1:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 4:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 8:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 6:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 3:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 6: //terranova\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 1:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 5:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 7:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 7: //labrador\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 6:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 3:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 8: //california\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 4:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 5:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 9:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 9: //mexico\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 8:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 10:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 10: //colombia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 9:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 12:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 11:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 11: //brasil\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 10:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 12:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 14:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 15:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 16:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 12: //peru\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 10:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 11:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 13:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 14:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 13: //chile\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 12:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 14:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 47:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 14: //argentina\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 11:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 12:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 13:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 15:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 15: //uruguay\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 11:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 14:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 16: //sahara\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 11:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 30:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 17:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 18:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 19:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 17: //egipto\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 16:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 18:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 21:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 26:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 41:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\n\\t\\t\\t\\t\\t\\tcase 42:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 18: //etiopia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 16:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 17:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 19:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 20:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 19: //zaire\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 16:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 18:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 21:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 20:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 20: //sudafrica\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 19:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 18:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 21: //madagascar\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 17:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 19:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 22: //islandia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 3:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 23:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 24:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 23: //gran bretaña\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 27:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 30:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 22:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 24: //suecia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 25:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 22:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 25: //rusia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 24:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 26:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 31:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 37:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 41:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 26: //polonia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 27:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 25:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\n\\t\\t\\t\\t\\t\\tcase 17:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 41:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 27: //alemania\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 23:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 29:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 28:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 26:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 28: //italia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 27:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 29:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 29: //francia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 27:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 28:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 30:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 30: //españa\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 23:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 29:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 16:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 31: //aral\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 25:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 37:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 34:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 32:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 38:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 32: //tartaria\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 31:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 33:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 34:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 33: //taimir\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 32:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 34:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 34: //siberia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 31:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 32:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 33:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 35:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 38:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\n\\t\\t\\t\\t\\t\\tcase 39:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 35: //camchatca\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 34:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 36:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 39:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 2:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 36: //japon\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 35:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 39:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 37: //iran\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 25:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 31:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 41:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 44:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 39:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 40:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 38:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 38: //mongolia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 31:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 34:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 37:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 39:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 40:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 39: //china\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 34:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 35:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 38:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 36:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 40:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\n\\t\\t\\t\\t\\t\\tcase 37:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 44:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 45:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 40: //gobi\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 37:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 38:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 39:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 41: //turquia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 25:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 26:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 37:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 42:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 43:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\t\\n\\t\\t\\t\\t\\t\\tcase 17:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 42: //israel\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 41:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 17:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 43:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 43: //arabia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 41:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 42:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 44: //india\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 37:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 39:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 45:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 46:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 45: //malasia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 39:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 44:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 48:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 46: //sumatra\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 44:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 47:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 47: //australia\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 46:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 48:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 49:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 13:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 48: //borneo\\n\\t\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 45:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tcase 47:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 49: //java\\n\\t\\t\\t\\t\\tswitch($pais2->getId()){\\n\\t\\t\\t\\t\\t\\tcase 47:\\n\\t\\t\\t\\t\\t\\t\\treturn 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t\\tdefault: return 0;\\n\\t\\t\\t\\t\\t//llave switch hijos\\t\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t//llave switch superior\\t\\n\\t\\t\\t}\\n\\t\\t\\n\\t\\t//llave function\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1cd3343b991464f97e8bac0cb9dcd2d\",\n \"score\": \"0.48944932\",\n \"text\": \"private function splitCards()\\n {\\n \\n //$cards = $this->shuffleCards($this->createCards());\\n $cards = $this->createCards();\\n shuffle($cards);\\n \\n return array_chunk($cards, intval(ceil(sizeof($cards) / 2)));\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"002d38c1d7bbc79480dc76460a0ff404\",\n \"score\": \"0.48690617\",\n \"text\": \"function getHand(){\\n $players = 0;\\n \\n //creates arrays for the cards for each player\\n $player1 = array();\\n $player2 = array();\\n $player3 = array();\\n $player4 = array();\\n \\n //array to hold the scores of each player\\n $scores = array();\\n \\n //value that cards will stop being distributed at\\n $stop = 36;\\n \\n //creates the deck\\n $deck = array();\\n for ($i = 1; $i <= 52; $i++) {\\n $deck[] = $i;\\n }\\n \\n //shuffles the deck\\n shuffle($deck);\\n \\n $j = 0;\\n $k = 0;\\n $temp;\\n \\n //test printing of array\\n //prints each value of the array one a new line\\n for($i = 0; $i < 4; $i++){\\n while($players == 0)\\n {\\n if($score < $stop){\\n $player1[$j] = $deck[$k];\\n \\n if($deck[$k] >= 13){\\n $temp = $deck[$k] % 13;\\n \\n $score = $score + $temp;\\n }\\n \\n else{\\n $score = $score + $deck[$k];\\n }\\n\\n $k++;\\n $j++;\\n }\\n \\n if($score >= $stop){\\n $scores[$players] = $score;\\n $players++;\\n $j = 0;\\n $score = 0;\\n }\\n }\\n while($players == 1)\\n {\\n if($score < $stop){\\n $player2[$j] = $deck[$k];\\n \\n if($deck[$k] >= 13){\\n $temp = $deck[$k] % 13;\\n \\n $score = $score + $temp;\\n }\\n \\n else{\\n $score = $score + $deck[$k];\\n }\\n $k++;\\n $j++;\\n }\\n \\n if($score >= $stop){\\n $scores[$players] = $score;\\n $players++;\\n $j = 0;\\n $score = 0;\\n }\\n }\\n while($players == 2)\\n {\\n if($score < $stop){\\n $player3[$j] = $deck[$k];\\n \\n if($deck[$k] >= 13){\\n $temp = $deck[$k] % 13;\\n \\n $score = $score + $temp;\\n }\\n \\n else{\\n $score = $score + $deck[$k];\\n }\\n\\n $k++;\\n $j++;\\n }\\n \\n if($score >= $stop){\\n $scores[$players] = $score;\\n $players++;\\n $j = 0;\\n $score = 0;\\n }\\n }\\n while($players == 3)\\n {\\n if($score < $stop){\\n $player4[$j] = $deck[$k];\\n \\n if($deck[$k] >= 13){\\n $temp = $deck[$k] % 13;\\n \\n $score = $score + $temp;\\n }\\n \\n else{\\n $score = $score + $deck[$k];\\n }\\n \\n $k++;\\n $j++;\\n }\\n \\n if($score >= $stop){\\n $scores[$players] = $score;\\n $players++;\\n $j = 0;\\n $score = 0;\\n }\\n }\\n }\\n echo $scores[0];\\n echo \\\"\\\";\\n displayHand($player1);\\n \\n echo $scores[1];\\n echo \\\"\\\";\\n displayHand($player2);\\n \\n echo $scores[2];\\n echo \\\"\\\";\\n displayHand($player3);\\n \\n echo $scores[3];\\n echo \\\"\\\";\\n displayHand($player4);\\n \\n \\n $f = 0;\\n \\n ///////used to display the scores/////////////////////////\\n \\n // while ($f < 4) {\\n // echo $scores[$f] . \\\"
    \\\";\\n // $f++;\\n // }\\n return $scores;\\n////////////////////////////////////////////\\n \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7088cfb763ea915df79bdc1e861ed818\",\n \"score\": \"0.4867626\",\n \"text\": \"public function processPool($p) {\\r\\n\\t\\t$p = $this->filterColor($p);\\r\\n\\t\\t$p = $this->filterBasics($p);\\r\\n\\r\\n\\t\\t$cardCount = count($p);\\r\\n\\t\\t$avgCMC = $this->averageCMC($p);\\r\\n\\r\\n\\t\\t// trim a card until we hit the sweet spot\\r\\n\\t\\t$isSaturated = false;\\r\\n\\t\\twhile(!$isSaturated) {\\r\\n\\t\\t\\t$nonLandCount = $this->countNonLands($p);\\r\\n\\t\\t\\tif(($this->model->getSize() == 60 && $nonLandCount >= 38)\\r\\n\\t\\t\\t|| ($this->model->getSize() == 40 && $nonLandCount >= 22)) {\\r\\n\\t\\t\\t\\t$p = $this->trim($p);\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t$isSaturated = true;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t$p = $this->addBasics($p);\\r\\n\\t\\treturn $p;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c16ee4c5f6e4df4dfa08fdb18d28818a\",\n \"score\": \"0.48627716\",\n \"text\": \"public function shuffleCards()\\n {\\n\\n // looping over the suite array\\n for ($i = 0; $i < count($this->suite); $i++) {\\n\\n // looping over the rank array\\n for ($j = 0; $j < count($this->rank); $j++) {\\n $firstRand = mt_rand(0, 3); //getting a random value btw 0 and 3\\n $secondRand = mt_rand(0, 12); //getting a random value btw 0 and 12\\n\\n // creating a temporary variable and swaping the data\\n $temp = $this->cards[$firstRand][$secondRand];\\n $this->cards[$firstRand][$secondRand] = $this->cards[$i][$j];\\n $this->cards[$i][$j] = $temp;\\n }\\n }\\n // returns the card array\\n return $this->cards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1278a2121bcd8a5659542a67bc2a8876\",\n \"score\": \"0.48577997\",\n \"text\": \"public function getPerms();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88b30a6638241bd292d54e7a048f0c03\",\n \"score\": \"0.48550534\",\n \"text\": \"public function getCard() {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c288e26ea50161b8e8d701b9c69cca8\",\n \"score\": \"0.4853681\",\n \"text\": \"public function refrescacampos(){\\n $this->hp=$this->nhorasparadainterna; //horas parada por mo interna o break dowwna\\n $this->hpp=$this->nhorasparadaprogramada; //hora spdara programada precheck\\n $this->hps=$this->nhorasparadaexterna; //horas prada por servicios\\n $this->hd=$this->horasdisponibles();\\n $this->hmt=$this->horasmotor();\\n $this->hpt=$this->horasperfo();\\n $this->tbd=$this->gethorasparada();//horas de parada total\\n $this->np=$this->nparadasint;\\n $this->ns=$this->nparadasext;\\n $this->npp=$this->nparadasprog;\\n $this->npp=$this->ns+$this->np+$this->npp;///veces parada servicio+veces parada interno, +veces parada programnada\\n $this->ntt=$this->nparadastotales();\\n $this->htt=$this->horasmotor()+$this->horasperfo();\\n $this->dispo=$this->porcdispo();\\n $this->util=$this->porcutil();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6b50b96540823dc1068d0aaf0ca680f\",\n \"score\": \"0.48434305\",\n \"text\": \"public function zCard()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0c3057224056bd2145b5072a6c7271a\",\n \"score\": \"0.48432365\",\n \"text\": \"public function toolCardSplit()\\n {\\n ini_set('max_execution_time', 180); //3 minutes\\n // grab all the info from cards\\n\\n $cards = Card::all();\\n foreach ($cards as $card) {\\n\\n // Figure out the type for type id\\n $color = $card->color;\\n if ($color == 'red') {\\n $type = 1;\\n } else if ($color == 'blue') {\\n $type = 2;\\n } else if ($color == 'yellow') {\\n $type = 3;\\n } else {\\n // There shouldnt be any here but just in case\\n $type = 0;\\n }\\n\\n\\n // Make a new card stat\\n $s = new Cardstat;\\n $s->card_id = $card->id;\\n $s->game_id = $card->game_id;\\n $s->type_id = $type;\\n $s->da = $card->da;\\n $s->vo = $card->vo;\\n $s->pf = $card->pf;\\n $s->gr = 0;\\n $s->da_max = $card->da_max;\\n $s->vo_max = $card->vo_max;\\n $s->pf_max = $card->pf_max;\\n $s->gr_max = 0;\\n $s->da_max5 = $card->da_max5;\\n $s->vo_max5 = $card->vo_max5;\\n $s->pf_max5 = $card->pf_max5;\\n $s->gr_max5 = 0;\\n $s->u_dorifes_id = $card->u_dorifes_id;\\n $s->u_dorifes_j = '';\\n $s->u_dorifes_e = '';\\n $s->dorifes_id = $card->dorifes_id;\\n $s->dorifes_j = '';\\n $s->dorifes_e = '';\\n $s->u_lesson_id = $card->u_lesson_id;\\n $s->u_lesson_j = '';\\n $s->u_lesson_e = '';\\n $s->lesson_id = $card->lesson_id;\\n $s->lesson_j = '';\\n $s->lesson_e = '';\\n $s->save();\\n\\n // Create an entry for music cards if the card is a basic card\\n if ($card->game_id == 2) {\\n $s = new Cardstat;\\n $s->card_id = $card->id;\\n $s->game_id = 3;\\n $s->type_id = 0;\\n $s->da = 0;\\n $s->vo = 0;\\n $s->pf = 0;\\n $s->gr = 0;\\n $s->da_max = 0;\\n $s->vo_max = 0;\\n $s->pf_max = 0;\\n $s->gr_max = 0;\\n $s->da_max5 = 0;\\n $s->vo_max5 = 0;\\n $s->pf_max5 = 0;\\n $s->gr_max5 = 0;\\n $s->u_dorifes_id = 0;\\n $s->u_dorifes_j = '';\\n $s->u_dorifes_e = '';\\n $s->dorifes_id = 0;\\n $s->dorifes_j = '';\\n $s->dorifes_e = '';\\n $s->u_lesson_id = 0;\\n $s->u_lesson_j = '';\\n $s->u_lesson_e = '';\\n $s->lesson_id = 0;\\n $s->lesson_j = '';\\n $s->lesson_e = '';\\n $s->save();\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1416f73408a1e2418093cef54d370b6b\",\n \"score\": \"0.48347446\",\n \"text\": \"function getUserCards() { \\t\\n\\t\\n\\t\\t$query\\t= \\\"SELECT bi_card_id,vc_billingid,bi_card_num,dt_expiry,i_isPrimary,vc_card_type FROM tbl_creditcard where bi_MemberId= $this->memberid ORDER BY bi_ord_id DESC\\\";\\t\\t\\n\\t\\t\\n\\t\\t$dbQry\\t= new dbQuery($query, $this->connect->connId);\\t\\n\\t\\treturn $this->retrieveCardRowArray($dbQry);\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d37372206cfd3a00e9804463059bf64\",\n \"score\": \"0.48344857\",\n \"text\": \"function determineGrantedAwards($geokretow_w_puli) {\\n if ($geokretow_w_puli >= 1) {\\n $odznaczenia_pliki['1'] = 'medal-1-1.png';\\n }\\n if ($geokretow_w_puli >= 10) {\\n $odznaczenia_pliki['10'] = 'medal-1-2.png';\\n }\\n if ($geokretow_w_puli >= 20) {\\n $odznaczenia_pliki['20'] = 'medal-1-3.png';\\n }\\n if ($geokretow_w_puli >= 50) {\\n $odznaczenia_pliki['50'] = 'medal-1-4.png';\\n }\\n if ($geokretow_w_puli >= 100) {\\n $odznaczenia_pliki['100'] = 'medal-bialy.png';\\n }\\n if ($geokretow_w_puli >= 120) {\\n $odznaczenia_pliki['5! = 120'] = 'medal-120.png';\\n }\\n if ($geokretow_w_puli >= 200) {\\n $odznaczenia_pliki['200'] = 'medal-brazowy.png';\\n }\\n if ($geokretow_w_puli >= 314) {\\n $odznaczenia_pliki['100* Pi = 100 * 3.14 = 314'] = 'medal-pi.png';\\n }\\n if ($geokretow_w_puli >= 500) {\\n $odznaczenia_pliki['500'] = 'medal-srebrny.png';\\n }\\n if ($geokretow_w_puli >= 512) {\\n $odznaczenia_pliki['2^9 = 512'] = 'medal-512.png';\\n }\\n if ($geokretow_w_puli >= 720) {\\n $odznaczenia_pliki['6! = 1*2*3*4*5*6 = 720'] = 'medal-720.png';\\n }\\n if ($geokretow_w_puli >= 800) {\\n $odznaczenia_pliki['800'] = 'medal-zloty.png';\\n }\\n if ($geokretow_w_puli >= 1000) {\\n $odznaczenia_pliki['1000'] = 'medal-1000.png';\\n }\\n if ($geokretow_w_puli >= 1024) {\\n $odznaczenia_pliki['2^10 = 1024'] = 'medal-1024.png';\\n }\\n if ($geokretow_w_puli >= 2000) {\\n $odznaczenia_pliki['2000'] = 'medal-2000.png';\\n }\\n if ($geokretow_w_puli >= 3000) {\\n $odznaczenia_pliki['3000'] = 'medal-3000.png';\\n }\\n if ($geokretow_w_puli >= 5000) {\\n $odznaczenia_pliki['5000'] = 'medal-5000.png';\\n }\\n if ($geokretow_w_puli >= 5040) {\\n $odznaczenia_pliki['7! = 1*2*3*4*5*6*7 = 5040'] = 'medal-5040.png';\\n }\\n if ($geokretow_w_puli >= 10000) {\\n $odznaczenia_pliki['10000'] = 'medal-10000.png';\\n }\\n\\n return $odznaczenia_pliki;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaa30337557e9a61df59cb7f38091f69\",\n \"score\": \"0.48332614\",\n \"text\": \"function getPermisstionList();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bb464f45d5a8828cc7f4bddd5604ae5\",\n \"score\": \"0.48215383\",\n \"text\": \"function cardShuffle($deck)\\n {\\n for ($i = 0; $i < count($deck); $i++) {\\n for ($j = 0; $j < count($deck[$i]); $j++) {\\n $r1 = rand(0, 3);\\n $c1 = rand(0, 12);\\n $r = rand(0, count($deck));\\n $r2 = rand(0, 3);\\n $r = rand(0, count($deck));\\n $c2 = rand(0, 12);\\n $r = rand(0, count($deck));\\n $temp = $deck[$r1][$c1];\\n $r = rand(0, count($deck));\\n $deck[$r1][$c1] = $deck[$r2][$c2];\\n $deck[$r2][$c2] = $temp;\\n }\\n }\\n // print_r($deck);\\n return $deck;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"384746644fd1d98ca33d8759b38b8596\",\n \"score\": \"0.48203185\",\n \"text\": \"function doPageCollectorActions() {\\n\\t\\t\\t// add\\n\\t\\tif ($this->piVars['prozess'] == 'add') {\\n\\t\\t\\t$this->currentPageCollectorValueArray[] = $this->piVars['pid'];\\n\\t\\t\\t\\t// delete\\n\\t\\t} elseif ($this->piVars['prozess'] == 'del') {\\n\\t\\t\\t$changedPageCollectorValueArray = array();\\n\\t\\t\\twhile (list($k, $v) = each($this->currentPageCollectorValueArray)) {\\n\\t\\t\\t\\tif ($v != $this->piVars['pid']) {\\n\\t\\t\\t\\t\\t$changedPageCollectorValueArray[] = $v;\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t// no new value\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t\\t// rechange\\n\\t\\t\\t$this->currentPageCollectorValueArray = $changedPageCollectorValueArray;\\n\\t\\t\\t// move up\\n\\t\\t} elseif ($this->piVars['prozess'] == 'up') {\\n\\t\\t\\t\\t// get changings\\n\\t\\t\\t$keyCurrentMove = array_search($this->piVars['pid'], $this->currentPageCollectorValueArray);\\n\\t\\t\\t$valCurrentMove = $this->piVars['pid'];\\n\\t\\t\\t$keyContiguousMove = $keyCurrentMove -1;\\n\\t\\t\\t$valContiguousMove = $this->currentPageCollectorValueArray[$keyContiguousMove];\\n\\t\\t\\t\\t// make changings now\\n\\t\\t\\t$this->currentPageCollectorValueArray[$keyContiguousMove] = $valCurrentMove;\\n\\t\\t\\t$this->currentPageCollectorValueArray[$keyCurrentMove] = $valContiguousMove;\\n\\t\\t\\t\\t// move down\\n\\t\\t} elseif ($this->piVars['prozess'] == 'down') {\\n\\t\\t\\t\\t// get changings\\n\\t\\t\\t$keyCurrentMove = array_search($this->piVars['pid'], $this->currentPageCollectorValueArray);\\n\\t\\t\\t$valCurrentMove = $this->piVars['pid'];\\n\\t\\t\\t$keyContiguousMove = $keyCurrentMove +1;\\n\\t\\t\\t$valContiguousMove = $this->currentPageCollectorValueArray[$keyContiguousMove];\\n\\t\\t\\t\\t// make changings now\\n\\t\\t\\t$this->currentPageCollectorValueArray[$keyContiguousMove] = $valCurrentMove;\\n\\t\\t\\t$this->currentPageCollectorValueArray[$keyCurrentMove] = $valContiguousMove;\\n\\t\\t\\t\\t// add a holy list of pids (used via hmenu & TSscript by vikingeskibsmussets 'spor')\\n\\t\\t} elseif ($this->piVars['prozess'] == 'addList') {\\n\\t\\t\\t$newPageCollectorValueArray = explode(',', $this->piVars['pid'], 1000);\\n\\t\\t\\twhile (list($k, $v) = each($newPageCollectorValueArray)) {\\n\\t\\t\\t\\tif (!in_array($v, $this->currentPageCollectorValueArray)) {\\n\\t\\t\\t\\t\\tarray_push($this->currentPageCollectorValueArray, $v);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t// clearall action\\n\\t\\t} elseif ($this->piVars['prozess'] == 'clearall') {\\n\\t\\t\\t$this->currentPageCollectorValueArray = array();\\n\\t\\t\\t// any other action\\n\\t\\t} else {\\n\\t\\t\\t// any other action can be placed here\\n\\t\\t}\\n\\t\\t\\t// any changings will result in dbUpdate for this session\\n\\t\\t$this->updateUserSession();\\n\\t\\treturn;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afe8cdfffe992d7d5c1e0e7104372073\",\n \"score\": \"0.47951308\",\n \"text\": \"function attack($p1, $p2)\\n{\\n for ($x = 0; $x <= 20; $x++) {\\n\\n if ($p1['title'] === \\\"hero\\\") {\\n $p1['luc'] = rand(10, 30);\\n $p2['luc'] = rand(25, 40);\\n $heroIsLuckier = isLuckier($p1['luc'], $p2['luc']);\\n if (getProb(10) === true) {\\n echo \\\"\\\\n RAPID STRIKE hERE p1 hero..\\\";\\n $p1['hp'] = (int)$p1['hp'] - (((int)$p2['str'] - (int)$p1['def']) * 2);\\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\\n } else if (getProb(20) === true) {\\n echo \\\"\\\\n MAGIC SHIELD hERE p1 hero..\\\";\\n $p1['hp'] = (int)$p1['hp'] - (2 / ((int)$p2['str'] - (int)$p1['def']));\\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\\n } else if ($heroIsLuckier === true) {\\n\\n echo \\\"\\\\n HERO LUCKIER HERE hERE p1 hero..\\\";\\n $p1['hp'] = (int)$p1['hp'] - 0;\\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\\n } else if ($heroIsLuckier === false) {\\n echo \\\"\\\\n MAGE LUCKIER HERE hERE p2 mage..\\\";\\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\\n $p2['hp'] = (int)$p2['hp'] - 0;\\n } else {\\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\\n }\\n } else if ($p2['title'] === \\\"hero\\\") {\\n $p2['luc'] = rand(10, 30);\\n $p1['luc'] = rand(25, 40);\\n $heroIsLuckier = isLuckier($p2['luc'], $p1['luc']);\\n if (getProb(10) === true) {\\n echo \\\"\\\\n RAPID STRIKE hERE p2 hero..\\\";\\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\\n $p2['hp'] = (int)$p2['hp'] - (((int)$p1['str'] - (int)$p2['def']) * 2);\\n } else if (getProb(20) === true) {\\n echo \\\"\\\\n MAGIC SHIELD hERE p2 hero..\\\";\\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\\n $p2['hp'] = (int)$p2['hp'] - (2 / ((int)$p1['str'] - (int)$p2['def']));\\n } else if ($heroIsLuckier === true) {\\n echo \\\"\\\\n HERO LUCKIER HERE hERE p2 hero..\\\";\\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\\n $p2['hp'] = (int)$p2['hp'] - 0;\\n } else if ($heroIsLuckier === false) {\\n echo \\\"\\\\n MAGE LUCKIER HERE hERE p1 mage..\\\";\\n $p1['hp'] = (int)$p1['hp'] - 0;\\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\\n } else {\\n $p1['hp'] = (int)$p1['hp'] - ((int)$p2['str'] - (int)$p1['def']);\\n $p2['hp'] = (int)$p2['hp'] - ((int)$p1['str'] - (int)$p2['def']);\\n }\\n }\\n\\n var_dump(\\\"\\\\n \\\" . $p2['title'] . \\\"'s heath:\\\" . intval($p2['hp']));\\n var_dump(\\\"\\\\n\\\" . $p1['title'] . \\\"'s health:\\\" . intval($p1['hp']));\\n if ($p2['hp'] <= 0) {\\n echo \\\"\\\\n fight ended!\\\";\\n var_dump($p2['hp']);\\n echo \\\"\\\\niteration: $x\\\";\\n die(\\\"\\\\n\\\" . $p2['title'] . \\\" died and\\\" . \\\" \\\" . $p1['title'] . \\\" won!\\\");\\n } else if ($p1['hp'] <= 0) {\\n echo \\\"\\\\n fight ended!\\\";\\n var_dump($p1['hp']);\\n echo \\\"\\\\niteration: $x\\\";\\n die(\\\"\\\\n\\\" . $p1['title'] . \\\" died and\\\" . \\\" \\\" . $p2['title'] . \\\" won!\\\");\\n }\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f45ea3a7cea860a25fc7fbde61554bd2\",\n \"score\": \"0.47905305\",\n \"text\": \"function shuffleCards($values)\\n{\\n// i used shuffle to randomize the order of the elements in my array\\n shuffle($values);\\n// i used the foreach loop so that it can loop through the values of my array, it will loop\\n// through the array and each value\\n foreach ($values as $value) {\\n // The shuffle array variable is equal to the value\\n $shuffleArray[] = $value;\\n // i used array_slice so it can return a part of my array,\\n $sliceFour = array_slice($shuffleArray, 0, 4);\\n }\\n// i used return so i could stop and get back the array\\n return $sliceFour;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e0ebd9f1aacc15b221e2599b35018df\",\n \"score\": \"0.47835618\",\n \"text\": \"function getCardioGoals()\\n {\\n return $this->cardioGoals;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9084e497d1a8e83332c7aa87f7722bf\",\n \"score\": \"0.47802114\",\n \"text\": \"protected function shuffleCard()\\n\\t{\\n\\t\\t$this->getCache('singleCardName');\\n\\t\\t$cards = range(1, 54);\\n\\t\\t$shuffleRound = range(1,10);\\n\\t\\tfor($i=0;$i < shuffle($shuffleRound);$i++){\\n\\t\\t\\tshuffle($cards);\\n\\t\\t}\\n\\n\\t\\t$chairId=$this->lastWinner?:1;\\n\\t\\tfor ($i=0;$i < 54;$i++) {\\n\\t\\t\\t$this->cards[$chairId][]=$this->_singleCardName[$cards[$i]];\\n\\t\\t\\t$this->detailCards[$chairId]['single'][]=$this->_singleCardName[$cards[$i]];\\n\\t\\t\\tif($chairId==$this->chairAmount){\\n\\t\\t\\t\\t$chairId = 1;\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$chairId++;\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\tif($this->firstRound){\\n\\t\\t\\tforeach($this->cards as $k=>$v){\\n\\t\\t\\t\\tif(in_array('3c',$v)){\\n\\t\\t\\t\\t\\t$this->have3c = $k;\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7137d137e8111432c75755d9dcf5ed0a\",\n \"score\": \"0.47695926\",\n \"text\": \"function roar()\\r\\n {\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03ae7cbb0002af81c50bcf0a771346a4\",\n \"score\": \"0.47584644\",\n \"text\": \"protected function cards()\\n\\t{\\n\\t\\t$user = auth()->user();\\n\\n\\t\\treturn [\\n\\t\\t\\t//new Help,\\n\\t\\t\\t(new MentorRequestCount)->canSee(function () use ($user) {\\n\\t\\t\\t\\treturn $user->hasRole(RoleableInterface::ADMINISTRATOR);\\n\\t\\t\\t}),\\n\\t\\t\\t(new UsersPerRole)->canSee(function () use ($user) {\\n\\t\\t\\t\\treturn $user->hasRole(RoleableInterface::ADMINISTRATOR);\\n\\t\\t\\t}),\\n\\t\\t];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b416a27a8350abac44e98656a58b5af\",\n \"score\": \"0.47562635\",\n \"text\": \"function getCard() {\\n //$query = \\\"select number,card,seed,seat,s.player as player from pkr_dealer d inner join pkr_seat s on d.seat=s.seat_number where s.player=\\\".$this->curr_player.\\\" and game=\\\".$this->curr_game.\\\" and d.idtable=\\\".$this->curr_table.\\\" and s.status=\\\".PLAYING.\\\" order by number\\\";\\n $query = \\\"select number,card,seed,seat,player from pkr_dealer where player=\\\" . $this->curr_player . \\\" and game=\\\" . $this->curr_game . \\\" and idtable=\\\" . $this->curr_table . \\\" and player in (select player from pkr_seat where status=\\\" . PLAYING . \\\") order by number\\\";\\n $rows = $GLOBALS['mydb']->select($query);\\n return $rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94026294fb5d15c8ae1fa6da424eeaaa\",\n \"score\": \"0.4754023\",\n \"text\": \"function generateRechargeCards($total, $length){\\n\\t\\t// get the first number\\n\\t\\t$card = genRandomNumber($length);\\n\\t\\techo('1: ' . $card);\\n\\t\\techo('
    ');\\n\\n\\t\\tfor ($i = 2; $i <= $total; $i++) {\\n\\t\\t\\t$card += 7;\\n\\t\\t\\techo(\\\"$i: \\\" .$card);\\n\\t\\t\\techo '
    ';\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"968a837cf959bb571dcae62689bf40b5\",\n \"score\": \"0.47489887\",\n \"text\": \"function giveCards( $choice )\\n {\\n\\t\\t//convert choice into card\\n\\t\\t$params = explode(\\\"_\\\", $choice);\\n\\t\\t$card_id = $params[1];\\n\\t\\t$card_pos = $params[2];\\n\\n // make sure noone else has submitted this card $type\\n $count = self::getUniqueValueFromDB(\\\"select count(p.contribution) from card c JOIN player p\\n ON p.contribution = c.card_type WHERE c.card_id='$card_id'\\\");\\n if ($count > 0) {\\n throw new BgaUserException( self::_(\\\"Sorry! Someone submitted this card type before you.\\\") );\\n }\\n \\n\\t\\t\\n\\t\\t// get object card\\n\\t\\t$card = $this->cards->getCard( $card_id );\\n $type = $card['type'];\\n self::checkAction( \\\"giveCards\\\" );\\n \\n // !! Here we have to get CURRENT player (= player who send the request) and not\\n // active player, cause we are in a multiple active player state and the \\\"active player\\\"\\n // correspond to nothing.\\n $current_player_id = self::getCurrentPlayerId();\\n\\n\\n $players = self::loadPlayersBasicInfos();\\t\\n\\t\\t$active_player_id = self::getGameStateValue( 'playerBuildingSentence' );\\n $current_player_name = $players[ $current_player_id ]['player_name'];\\n\\t\\t$active_player_name = $players[ $active_player_id ]['player_name'];\\n\\t\\t\\n\\t\\t\\n\\t\\t$card_ids[] = $card_id;\\n \\n //if( count( $card_ids ) != 1 )\\n // throw new feException( self::_(\\\"You must give exactly 1 card\\\") );\\n \\n // Check if these cards are in player hands\\n $cards[] = $card;\\n \\n if( count( $cards ) != 1 )\\n throw new feException( self::_(\\\"This card doesn't exist\\\") );\\n \\n foreach( $cards as $card )\\n {\\n if( $card['location'] != 'hand' || $card['location_arg'] != $current_player_id )\\n throw new feException( self::_(\\\"This card is not in your hand\\\") );\\n }\\n \\n\\n\\t\\t$this->cards->moveCard($card_id, 'current_sentence', $current_player_id);\\t\\t// add card to sentence\\n\\t\\t\\n\\t\\t// record the player's guess for helper scoring\\n $sql = \\\"\\n UPDATE player\\n SET contribution = $type,\\n guess = $card_pos\\n WHERE player_id = $current_player_id\\n \\\";\\n self::DbQuery( $sql );\\n $data = self::getNonEmptyObjectFromDB( 'SELECT verb, object from data where data_id = 1');\\n $object = $data['object'];\\n // handle (MY) cards\\n if (preg_match('/^\\\\(MY\\\\)/', $object)) {\\n $array = explode(\\\" \\\", $object);\\n array_shift($array); // drop off (MY)\\n $object = implode(\\\" \\\", $array);\\n $article = clienttranslate('their');\\n } else {\\n $article = clienttranslate('the');\\n }\\n\\t\\n $message='ERROR with message';\\n switch ($card['type']) {\\n case 1:\\n case 2:\\n case 3:\\n case 8:\\n $message = '${player_name} guessed ${html}${color_displayed}${endHtml} ${active_player_name} ${verb} ${article} ${object}. ';\\n break;\\n case 5:\\n case 6:\\n $message = '${player_name} guessed ${html}${color_displayed}${endHtml} ${object} ${active_player_name} ${verb}. ';\\n break;\\n }\\n \\n \\n // And notify\\n self::notifyAllPlayers( \\n\\t\\t\\t'addCardToSentence', \\n\\t\\t\\tclienttranslate($message), \\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'i18n' => array( 'color_displayed', 'value_displayed' ),\\n\\t\\t\\t\\t'card_id' => $card['id'],\\n 'card' => $this->populateCard($card),\\n\\t\\t\\t\\t'player_id' => $current_player_id,\\n\\t\\t\\t\\t'player_name' => $current_player_name,\\n\\t\\t\\t\\t'active_player_name' => $active_player_name,\\n\\t\\t\\t\\t'color' => $card['type'],\\n\\t\\t\\t\\t'color_displayed' => $this->colors[ $card['type'] ]['name'],\\n 'verb' => $data['verb'],\\n 'article' => $article,\\n 'object' => $object,\\n 'html' => \\\"\\\",\\n 'endHtml' => \\\"\\\"\\n\\t\\t\\t) \\n\\t\\t);\\n\\n\\n // Notify the player so we can make these cards disapear\\n self::notifyPlayer( $current_player_id, \\\"cardGiven\\\", \\\"\\\", array(\\n \\\"card\\\" => $card\\n ) );\\n\\n // Make this player unactive now\\n // (and tell the machine state to use transtion \\\"giveCards\\\" if all players are now unactive\\n $this->gamestate->setPlayerNonMultiactive( $current_player_id, \\\"giveCards\\\" );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8cf53894483fa32fa204c51b3650835\",\n \"score\": \"0.47487012\",\n \"text\": \"function randAward($aid){\\n\\t$actList = $GLOBALS['db']->getAll ( \\\"SELECT title,lid,randnum,awardname,num FROM \\\".$GLOBALS['aos']->table('wx_prize').\\\" where aid=$aid and isopen=1 and num>num2 order by num desc\\\" );\\n\\tif($actList){\\n\\t\\tforeach($actList as $v){\\n\\t\\t\\tif(intval(rand(1,10000)) <= $v['randnum']*100){\\n\\t\\t\\t\\t$v['code'] = uniqid();\\n\\t\\t\\t\\t$GLOBALS['db']->query(\\\"update \\\" . $GLOBALS['aos']->table('wx_prize') . \\\" set num2=num2+1 where lid={$v['lid']}\\\");\\n\\t\\t\\t\\treturn $v;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\treturn false;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c09e23fde51b38c2d222baf29b967ed\",\n \"score\": \"0.47412404\",\n \"text\": \"public function create($qtd) : array\\n {\\n $checks = [];\\n $array = [];\\n $sorteio = 1;\\n if(self::LIMITE >= $qtd){\\n while($this->cartela <= $qtd){\\n for($i = 1; $i <= self::MARCADOR; $i++){\\n $sorteio = $this->random(); \\n if(!in_array($sorteio, $checks)){\\n $checks[] = $sorteio; \\n $array[$this->cartela][] = $sorteio; \\n if(count($checks) == self::MARCADOR )\\n $checks = [];\\n }\\n else{\\n $sorteio = $this->inArrayNumber($sorteio, $checks);\\n $checks[] = $sorteio; \\n $array[$this->cartela][] = $sorteio; \\n if(count($checks) == self::MARCADOR )\\n $checks = [];\\n } \\n } \\n $this->cartela++; \\n }\\n } \\n return $array; \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e4151abdb6dcac44f33127e729c8b35\",\n \"score\": \"0.4740878\",\n \"text\": \"function getCardioProgresses()\\n {\\n return $this->cardioProgresses;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7030e883a3a3ce9019720b8c9cdb1ea\",\n \"score\": \"0.47365975\",\n \"text\": \"public function roam() {\\n echo $this->getNameSpecies().' is roaming';\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1795362eea137aa10f90db9c39a453a1\",\n \"score\": \"0.47351933\",\n \"text\": \"public function getCreditCards() {\\n return $this->creditcards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8aa1459913affcf3311b81855fceceda\",\n \"score\": \"0.47329614\",\n \"text\": \"public function cards (): Vault;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20f680d10ca2ae6193bcf417ffabaf13\",\n \"score\": \"0.47301275\",\n \"text\": \"protected function getFingerprintOfOrder() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"126e0d03745074ba886e63ea25da00d3\",\n \"score\": \"0.47267088\",\n \"text\": \"function consulta_CapacitacionPermanente()\\n\\t\\t{\\n\\t\\t\\t$this->sql=\\\"select * from capacitacion\\\";\\n\\t\\t\\treturn parent::ejecutaQUERY();\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19aed454c400be4f589dd23a92b3c6a4\",\n \"score\": \"0.4726021\",\n \"text\": \"function shufflecards32(){\\n\\t$cards = 1;\\n\\tdo {\\n\\t\\t$number = rand(1,32);\\n\\t\\tif ($number == 1 AND $a[$number] != 1)\\t\\t{$deck[$cards]= \\\"1-7\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 2 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"2-7\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 3 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"3-7\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 4 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"4-7\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 5 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"1-8\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 6 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"2-8\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 7 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"3-8\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 8 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"4-8\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 9 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"1-9\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 10 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"2-9\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 11 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"3-9\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 12 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"4-9\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 13 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"1-10\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 14 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"2-10\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 15 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"3-10\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 16 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"4-10\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 17 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"1-11\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 18 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"2-11\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 19 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"3-11\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 20 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"4-11\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 21 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"1-12\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 22 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"2-12\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 23 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"3-12\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 24 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"4-12\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 25 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"1-13\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 26 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"2-13\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 27 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"3-13\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 28 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"4-13\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 29 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"1-14\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 30 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"2-14\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 31 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"3-14\\\" ;$cards++; $a[$number] = 1;}\\n\\t\\telseif ($number == 32 AND $a[$number] != 1)\\t{$deck[$cards]= \\\"4-14\\\" ;$cards++; $a[$number] = 1;}\\n\\t} while ($cards <= 32);\\n\\t\\n\\treturn $deck;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cfb3673ea6800a134ce3fdb6fc91b658\",\n \"score\": \"0.4724078\",\n \"text\": \"public function getCards(): array\\n {\\n return $this->cards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f4d1e82967781113cf2b898a46aa095\",\n \"score\": \"0.47220796\",\n \"text\": \"public function get_chambres(){ return $this->_chambres;}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6508b3339114f2fd284a8222100c5215\",\n \"score\": \"0.47203156\",\n \"text\": \"function buscasprvmgas(){\\n\\t\\t$tipo = $this->input->post('cargo');\\n\\t\\t$cta = $this->input->post('acelem');\\n\\n\\t\\tif ( $cta == 'ctade')\\n\\t\\t\\t$tipo = substr($tipo,0,1);\\n\\t\\telse\\n\\t\\t\\t$tipo = substr($tipo,2,1);\\n\\n\\t\\tif ( $tipo == 'P')\\n\\t\\t\\t$this->buscasprv();\\n\\t\\telse\\n\\t\\t\\t$this->buscamgas();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a52500cd5f8cb728fe716442c85f0ab\",\n \"score\": \"0.4719765\",\n \"text\": \"public function getCard()\\n {\\n $arr=array();\\n foreach ( $this->_prop as $value ){\\n $arr[$value] = $this->$value;\\n }\\n return $arr;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a014fe7358e8bdbaacc35002df1c522\",\n \"score\": \"0.47177142\",\n \"text\": \"function getComplinePsalm(){\\n return 4;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97e7086d3e7083591909f1a8cb1065fd\",\n \"score\": \"0.47165954\",\n \"text\": \"function snax_the_card() {\\n\\tsnax()->cards_query->the_post();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62b4b6d609b85281924e7536654b1f79\",\n \"score\": \"0.46873227\",\n \"text\": \"public function getSpecialTreasureRewards()\\n {\\n $arr_gift = array(); \\n $conf_treasure = Common::getConfig('SpecialTreasure');\\n \\n $oUser = User::getById(Controller::$uId); \\n \\n $rand_Id = $this->newRandom($conf_treasure);\\n $gifId = $this->newRandom($conf_treasure[$rand_Id]['Rewards']);\\n $gift = $conf_treasure[$rand_Id]['Rewards'][$gifId] ; \\n if(empty($gift))\\n return $arr_gift ;\\n \\n if(SoldierEquipment::checkExist($gift['ItemType']))\\n {\\n $AutoId = $oUser->getAutoId(); \\n $oEquipment = Common::randomEquipment($AutoId,$gift['Rank'],$gift['Color'],SourceEquipment::EVENT,$gift['ItemType']); $arr_gift['SpecialGift'] = $oEquipment ;\\n $arr_gift['SpecialGift'] = $oEquipment ; \\n }\\n else\\n { \\n unset($gift['Rate']);\\n $arr_gift['NormalGift'] = $gift ;\\n \\n }\\n return $arr_gift ;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3582deb55d6d514acac26cb9493632a\",\n \"score\": \"0.46825\",\n \"text\": \"function generateRareBlock($rares, $mythic){\\n\\tif (rand(1, 8) == 8){\\n\\t\\treturn takeCards(1, $mythic);\\n\\t} else {\\n\\t\\treturn takeCards(1, $rares);\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ede31127c221546cbe80240c6c04123d\",\n \"score\": \"0.46788722\",\n \"text\": \"public function getPieces()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf2083a1c7efd8cd6d30255e1dfede1c\",\n \"score\": \"0.46767625\",\n \"text\": \"function prepOutput($numDoors){\\n global $globalNumRooms;\\n\\t global $array;\\n\\t global $gid;\\n\\t $id = 2;\\n\\t $subId = 1;\\n $exits = 0;\\n for( $i = 0; $i < $numDoors; $i++ ){\\n //echo \\\"here\\\\n\\\";\\n\\n $globalNumRooms++;\\n //echo $globalNumRooms . \\\"\\\\n\\\";\\n if($globalNumRooms<=10){\\n $exits = getChamberExits();\\n array_push($array, array(\\n \\\"id\\\" => $id,\\n \\\"roomType\\\" => \\\"chamber\\\",\\n \\\"passage\\\" => getPassage(),\\n\\t\\t\\t\\\"data\\\" => getChamber(),\\n\\t\\t\\t\\\"gid\\\" => $gid,\\n \\\"chamberExits\\\" => $exits,\\n ));\\n\\n\\t }\\n\\t\\twhile($exits > 0){\\n array_push($array, array(\\n \\\"id\\\" => $id . \\\".\\\" . $subId,\\n \\\"roomType\\\" => \\\"chamber\\\",\\n \\\"passage\\\" => getPassage(),\\n\\t\\t\\t\\\"data\\\" => getChamber(),\\n\\t\\t\\t\\\"gid\\\" => $gid,\\n ));\\n\\t\\t $subId++;\\n\\t\\t $exits--;\\n\\t\\t \\t\\n\\t\\t}\\n\\t\\t$subId = 1;\\n\\t\\t$id++;\\n }\\n return $array;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9a9e09c6a796f40994b6e22d85fd6c0\",\n \"score\": \"0.4675262\",\n \"text\": \"public function haspermission($rota){\\n\\t\\t\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"991fe27c369615da18297bdabb87cb6d\",\n \"score\": \"0.46747848\",\n \"text\": \"public function getBoardCards(){\\n\\t\\treturn $this->boardCards;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"482fc746cd70727f6f023234eccd3af3\",\n \"score\": \"0.46710575\",\n \"text\": \"function getBoardCards() {\\n $query = \\\"select * from pkr_dealer where idtable=\\\" . $this->curr_table . \\\" and game=\\\" . $this->curr_game . \\\" and seat=\\\" . BOARD . \\\" order by number\\\";\\n $rows = $GLOBALS['mydb']->select($query);\\n return $rows;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fda88f7ea8001247f6db7ffe6c78afdd\",\n \"score\": \"0.46707994\",\n \"text\": \"function getTotal($hand)\\n{\\n $total = 0;\\n $hold = []; \\n foreach ($hand as $card)\\n {\\n \\n $hold[] = explode('-', $card);\\n \\n }\\n foreach ($hold as $card){\\n \\t\\n switch($card[0]) {\\n \\t \\tcase 'A':\\n \\t \\t\\tbreak;\\n \\t \\tcase 'K':\\n \\t \\tcase 'Q':\\n \\t \\tcase 'J':\\n $total +=10;\\n break;\\n default:\\n \\t \\t\\t$total += (int)$card[0];\\n \\t \\t\\tbreak;\\n \\t }\\n\\n }\\n foreach ($hold as $card){\\n\\n \\tif($card[0] == 'A') {\\n \\t\\tif(($total + 11) <=\\t 21) {\\n \\t\\t\\t$total += 11;\\n \\t\\t} else {\\n \\t\\t\\t$total += 1;\\n \\t\\t}\\n\\n \\t}\\n }\\n\\n\\n return $total;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c1ed2b1b5e35b4efd458e7fc382a6b0c\",\n \"score\": \"0.46536115\",\n \"text\": \"function get_player_award($pid){\\n\\tglobal $wpdb;\\n\\t$getaward = $wpdb->get_results(\\\"select * from wp_awards WHERE pid = '$pid'\\\", ARRAY_N);\\n\\t\\n\\tforeach ($getaward as $key => $revisequery){\\n\\t\\t$awardinfo[] = array(\\n\\t\\t\\t'awardid' => $revisequery[0], \\n\\t\\t\\t'award' => $revisequery[1], \\n\\t\\t\\t'year' => $revisequery[2], \\n\\t\\t\\t'first' => $revisequery[3], \\n\\t\\t\\t'last' => $revisequery[4],\\n\\t\\t\\t'team' => $revisequery[5],\\n\\t\\t\\t'position' => $revisequery[6],\\n\\t\\t\\t'owner' => $revisequery[7],\\n\\t\\t\\t'pid' => $revisequery[8],\\n\\t\\t\\t'gamepoints' => $revisequery[9]\\n\\t\\t);\\n\\t}\\n\\t\\n\\treturn $awardinfo;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a81f8edf07994386dcbce28689cd0db5\",\n \"score\": \"0.4649996\",\n \"text\": \"public function get_hand($player_id = null) {\\r\\n\\t\\tif ($player_id === null) $player_id = $this->session->userdata('user_id');\\r\\n\\t\\t$all = (array)$this->get_many_by('room_id', $this->session->userdata('room_id'));\\r\\n\\t\\t$hand = array();\\r\\n\\t\\tforeach ($all as $card) {\\r\\n\\t\\t\\t$card = (array)$card;\\r\\n\\t\\t\\t$card['place'] = unserialize($card['place']);\\r\\n\\t\\t\\tif (isset($card['place']['value']) && \\r\\n\\t\\t\\t\\t$card['place']['value'] == 'hand' &&\\r\\n\\t\\t\\t\\t$card['place']['id'] == $player_id) {\\r\\n\\t\\t\\t\\tarray_push($hand, $card);\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $hand;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2269c67847601ba46d8920eaecb22397\",\n \"score\": \"0.46480885\",\n \"text\": \"function make_deck()\\n{\\n $deck = [];\\n for($rank = 0; $rank < RANK_COUNT; $rank++){\\n for($suit = 0; $suit < SUIT_COUNT; $suit++){\\n $deck[] = [$rank, $suit];\\n }\\n }\\n shuffle($deck);\\n return($deck);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa2119ff117bcc4994cee93a49d6da51\",\n \"score\": \"0.4642982\",\n \"text\": \"public function tarjetaPrimaria()\\n {\\n return $this->hasOne('App\\\\CardPerson', 'id', 'card_people1');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6c7596a731c0edfeb382f56663d61f5\",\n \"score\": \"0.46410817\",\n \"text\": \"public function getCards()\\n {\\n return $this->_cards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6c7596a731c0edfeb382f56663d61f5\",\n \"score\": \"0.46410817\",\n \"text\": \"public function getCards()\\n {\\n return $this->_cards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd03c3879927c1d3edfeee072246134d\",\n \"score\": \"0.46377414\",\n \"text\": \"function GetPeticionesAbiertas()\\r\\n{\\r\\n$maquinas = array();\\r\\n//recibimos las peticiones pendientes de finalizar\\r\\n$peticiones = GetPeticionesPendientes();\\r\\n\\tforeach($peticiones as $v_peticion)\\r\\n\\t{\\r\\n\\t //comprobamos que realmente esta abierta realizando un peticion a la api\\r\\n\\t if( comprobarPeticion($v_peticion[0]) != \\\"terminated\\\" and comprobarPeticion($v_peticion[0]) != \\\"shutting-down\\\" ){\\r\\n\\t $maquinas[] = $v_peticion[0];\\r\\n\\t }\\r\\n\\t}\\r\\n return $maquinas;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80a61c2e18e943d18ca99331e5e4da7d\",\n \"score\": \"0.46367055\",\n \"text\": \"private function calcBuffPheromone() {\\n $t = $this->iter; //aktualna iteracja\\n $allFoundedPoints = $this->antsVisitedPoints[$this->antNumber][$t]; //punkty przez ktore przeszla mrowka\\n $i = array_shift($allFoundedPoints);\\n\\n while(!empty($allFoundPoints)){ // oblicz dawke feromonow pozostawioną przez mrowke\\n $j = array_shift($allFoundPoints);\\n $this->bufPheromone[$i][$j][$this->antNumber] = ($this->q3)/($this->graph[$i][$j]);\\n $i = $j;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1881c4cdf1835ab6673db3bf6343b876\",\n \"score\": \"0.4635588\",\n \"text\": \"public function get_list_card(){\\n\\t\\t$cards = $this->db->get(db_prefix().'loy_card')->result_array();\\n\\t\\treturn $cards;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1385489a6f612d744af167a2f145ebb2\",\n \"score\": \"0.4628046\",\n \"text\": \"function Chores(){\\n $out = getChores();\\n $out .= \\\"

    \\\";\\n //$out .= getChoresDesc();\\n //$out .= \\\"

    \\\";\\n $out .= pickChoreList(1);\\n return $out;\\n\\t\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77552a561cd361af8f330a232307988f\",\n \"score\": \"0.46266922\",\n \"text\": \"function showcards($hand) {\\n\\tfor ($i=0; $hand[$i]; $i++) {\\n\\t\\t\\t$cards .= '\\\"card\\\"';\\n\\t}\\n\\t\\n\\treturn $cards;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1cc82584e6403e4670dd8b7960cb0131\",\n \"score\": \"0.46264967\",\n \"text\": \"function playerDist($deck)\\n {\\n $playerQue = new queue();\\n for ($i = 1; $i < 5; $i++) {\\n echo \\\"Enter player $i name \\\";\\n $player = new Player(Utility::String_input());\\n for ($j = 0; $j < 9; $j++) {\\n $r = rand(0, 3);\\n $c = rand(0, count($deck[$r]) - 1);\\n $player->pushCard($deck[$r][$c]);\\n array_splice($deck[$r], $c, 1);\\n }\\n $playerQue->enqueue($player);\\n }\\n return $playerQue;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab4f7c7b52e2ae46c55e3b46ebbb6524\",\n \"score\": \"0.46256393\",\n \"text\": \"function list_pembicara(){\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5880b687e5ffd619c884be696be7794d\",\n \"score\": \"0.4624098\",\n \"text\": \"function isFullHouse()\\n\\t{\\n\\t\\t$result[\\\"bool\\\"] = false;\\n\\t\\t$result[\\\"ptg\\\"] = array();\\n\\t\\t$result[\\\"type\\\"] = array();\\n\\t\\t\\n\\t\\t$myTrisCard = 0; \\n\\t\\t\\t\\t\\n\\t\\t$c_cards = count($this->cards);\\n\\t\\tfor ($x = 0; $x < $c_cards; $x++)\\n\\t\\t{\\n\\t\\t\\tfor ($y = ($x+1); $y < $c_cards; $y++)\\n\\t\\t\\t{\\n\\t\\t\\t\\tfor ($t = ($y+1); $t < $c_cards; $t++)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$arr_temp_x = $this->cards[$x];\\n\\t\\t\\t\\t\\t$arr_temp_y = $this->cards[$y];\\n\\t\\t\\t\\t\\t$arr_temp_t = $this->cards[$t];\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tif (\\n\\t\\t\\t\\t\\t\\t(key($arr_temp_x)==key($arr_temp_y)) && \\n\\t\\t\\t\\t\\t\\t(key($arr_temp_x)==key($arr_temp_t))\\n\\t\\t\\t\\t\\t\\t) \\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\t$result[\\\"ptg\\\"][0][key($arr_temp_x)] = $this->cards[$x][key($arr_temp_x)];\\n\\t\\t\\t\\t\\t\\t$result[\\\"ptg\\\"][1][key($arr_temp_y)] = $this->cards[$y][key($arr_temp_y)];\\n\\t\\t\\t\\t\\t\\t$result[\\\"ptg\\\"][2][key($arr_temp_t)] = $this->cards[$t][key($arr_temp_t)];\\n\\t\\t\\t\\t\\t\\t$myTrisCard = key($arr_temp_x);\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t}\\t\\t\\t\\t\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\t\\t\\n\\t\\tunset($arr_temp_x);\\n\\t\\tunset($arr_temp_y);\\n\\t\\tunset($arr_temp_t);\\n\\t\\t\\t\\n\\t\\t\\n\\t\\tif ($myTrisCard != 0) \\n\\t\\t{\\n\\t\\t\\tfor($x = 0; $x < $c_cards; $x++)\\n\\t\\t\\t{\\n\\t\\t\\t\\tfor ($y = ($x+1); $y < $c_cards; $y++)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$arr_temp_x = $this->cards[$x];\\n\\t\\t\\t\\t\\t$arr_temp_y = $this->cards[$y];\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tif (\\n\\t\\t\\t\\t\\t\\t(key($arr_temp_x)==key($arr_temp_y)) && \\n\\t\\t\\t\\t\\t\\t(key($arr_temp_x) != $myTrisCard) \\n\\t\\t\\t\\t\\t\\t) \\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$result[\\\"ptg\\\"][3][key($arr_temp_x)] = $this->cards[$x][key($arr_temp_x)];\\n\\t\\t\\t\\t\\t\\t$result[\\\"ptg\\\"][4][key($arr_temp_y)] = $this->cards[$y][key($arr_temp_y)];\\n\\t\\t\\t\\t\\t\\t$result[\\\"type\\\"] = PKR_FULLHOUSE;\\n\\t\\t\\t\\t\\t\\t$result[\\\"bool\\\"] = true;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\t\\t\\t\\n\\t\\t\\t}\\n\\t\\t}\\t\\t\\n\\t\\t\\t\\n\\t\\tunset($arr_temp_x);\\n\\t\\tunset($arr_temp_y);\\t\\t\\n\\t\\t\\n\\t\\treturn $result; \\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7755e152d6bb2a7c6d281f0af462a0b0\",\n \"score\": \"0.46230718\",\n \"text\": \"function getCardioGoals()\\n {\\n //make array of all cardio goals and index to iterate through\\n $cardioGoals = [];\\n $index = 0;\\n\\n //query database to get all cardio distance goals\\n $cardioSQL = \\\"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_DISTANCE FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-DISTANCE' AND FITNESS_GOAL_ACTIVE='1'\\\";\\n $cardioQuery = $this->comMod->queryDatabase($cardioSQL);\\n\\n //add distance goals to array\\n while($currGoal = mysqli_fetch_array($cardioQuery))\\n {\\n //get goal details from database\\n $days = $currGoal['FITNESS_GOAL_DURATION'];\\n $type = $currGoal['FITNESS_GOAL_TYPE'];\\n $milestone = $currGoal['FITNESS_GOAL_DISTANCE'];\\n $id = $currGoal['FITNESS_GOAL_ID'];\\n\\n //create new goal object and add to array\\n $goal = new CardioGoal($days, $type, $milestone, $id);\\n $cardioGoals[$index] = $goal;\\n\\n //increase array index\\n $index++;\\n }//close while\\n\\n //query database to get all cardio speed goals\\n $speedSQL = \\\"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_SPEED FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-SPEED' AND FITNESS_GOAL_ACTIVE='1'\\\";\\n $speedQuery = $this->comMod->queryDatabase($speedSQL);\\n\\n //add speed goals to array\\n while($currGoal = mysqli_fetch_array($speedQuery))\\n {\\n //get goal details from database\\n $days = $currGoal['FITNESS_GOAL_DURATION'];\\n $type = $currGoal['FITNESS_GOAL_TYPE'];\\n $milestone = $currGoal['FITNESS_GOAL_SPEED'];\\n $id = $currGoal['FITNESS_GOAL_ID'];\\n\\n //create new goal object and add to array\\n $goal = new CardioGoal($days, $type, $milestone, $id);\\n $cardioGoals[$index] = $goal;\\n\\n //increase array index\\n $index++;\\n }//close while\\n\\n //query database to get all cardio time goals\\n $timeSQL = \\\"SELECT FITNESS_GOAL_ID,FITNESS_GOAL_DURATION,FITNESS_GOAL_TYPE,FITNESS_GOAL_TIME FROM FITNESS_GOALS WHERE FITNESS_GOAL_OWNER='$this->goalOwner' AND FITNESS_GOAL_TYPE='CARDIO-TIME' AND FITNESS_GOAL_ACTIVE='1'\\\";\\n $timeQuery = $this->comMod->queryDatabase($timeSQL);\\n\\n //add time goals to array\\n while($currGoal = mysqli_fetch_array($timeQuery))\\n {\\n //get goal details from database\\n $days = $currGoal['FITNESS_GOAL_DURATION'];\\n $type = $currGoal['FITNESS_GOAL_TYPE'];\\n $milestone = $currGoal['FITNESS_GOAL_TIME'];\\n $id = $currGoal['FITNESS_GOAL_ID'];\\n\\n //create new goal object and add to array\\n $goal = new CardioGoal($days, $type, $milestone, $id);\\n $cardioGoals[$index] = $goal;\\n\\n //increase array index\\n $index++;\\n }//close while\\n\\n //return array of all three cardio goal types\\n return $cardioGoals;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bbb3c310aaa55d29de1c9c0fe63d871\",\n \"score\": \"0.46204194\",\n \"text\": \"public function getCards()\\n {\\n return $this->cards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bbb3c310aaa55d29de1c9c0fe63d871\",\n \"score\": \"0.46204194\",\n \"text\": \"public function getCards()\\n {\\n return $this->cards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bbb3c310aaa55d29de1c9c0fe63d871\",\n \"score\": \"0.46204194\",\n \"text\": \"public function getCards()\\n {\\n return $this->cards;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04d035bd61f2e161b1ce4e98bd8942b1\",\n \"score\": \"0.46150744\",\n \"text\": \"public function includes_toprank_herokills() \\n\\t{\\n\\t\\tglobal $home_module; // PHP Globals\\r\\n\\r\\n\\t\\t$CTM_HTML = NULL;\\n\\t\\t$CTM_HTML .= \\\" \\t
    \\r\\n \\t\\\".(count($home_module['rankings']['heroKills']) > 0 ? \\\"\\\".($this->settings['HOME']['TOP_RANK']['HERO_KILLS'][2] == true ? \\\"
      \\r\\n \\t\\\".$this->loop__includes_toprank_herokills__0x04().\\\"\\r\\n \\t\\t
    \\\" : \\\"
      \\r\\n
    • \\r\\n {$this->lang->words['Home']['TopRank']['Words']['Position']}\\r\\n {$this->lang->words['Home']['TopRank']['Words']['Name']}\\r\\n {$this->lang->words['Home']['TopRank']['Words']['HeroKills']}\\r\\n
    • \\r\\n \\\".$this->loop__includes_toprank_herokills__0x05().\\\"\\r\\n
    \\\").\\\"\\\" : NULL).\\\"\\r\\n \\t\\t
    \\\";\\n\\t\\treturn $CTM_HTML;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5bbe3e17996f13bb3cbd997b1eead792\",\n \"score\": \"0.46130693\",\n \"text\": \"function get_allp(){\\n\\t \\n\\t\\t $this->db->order_by('p_name asc, cnum asc');\\n\\t\\t $query = $this->db->get('patients'); \\n return $query->result(); \\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bbd1321755f197b4d43431a49abd6b48\",\n \"score\": \"0.46096805\",\n \"text\": \"public function play() {\\n\\t\\t// Jogo os Tokens Primeiro !\\n\\t\\t$quantidade_cartas = count ( $this->hand );\\n\\t\\tif ($quantidade_cartas == 0)\\n\\t\\t\\treturn;\\n\\t\\tforeach ( $this->hand as $indice => $carta ) {\\n\\t\\t\\tif ($carta ['type'] == TOKEN) {\\n\\t\\t\\t\\t$this->board [] = $this->hand [$indice];\\n\\t\\t\\t\\tunset ( $this->hand [$indice] );\\n\\t\\t\\t\\treturn;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t\\n\\t\\t$this->board [] = array_shift ( $this->hand );\\n\\t\\treturn;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21d85b1c4670d969a4e92de83dab4794\",\n \"score\": \"0.4607595\",\n \"text\": \"protected function buildRoute() {\\n\\t\\t$count = $this->holder->getCount();\\n $result = [];\\n\\n\\t\\tif ($count) {\\n\\t\\t\\tfor ($item = 0; $item < $count; $item++) {\\n\\t\\t\\t\\t$card = $this->holder->getCard($item);\\n\\n\\t\\t\\t\\t$result[] = $card;\\n\\t\\t\\t\\t$tmp_card = $card;\\n\\n\\t\\t\\t\\tfor ($index = 1; $index < $count; $index++) {\\n\\t\\t\\t\\t $destination = $tmp_card->getDestination();\\n\\n\\t\\t\\t\\t\\tif ($next_card = $this->holder->getCardByOrigin($destination)) {\\n\\t\\t\\t\\t\\t\\t$result[] = $next_card;\\n\\t\\t\\t\\t\\t\\t$tmp_card = $next_card;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tif (count($result) == $count) {\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse {\\n\\t\\t\\t\\t $result = [];\\n }\\n\\t\\t\\t}\\n\\t\\t}\\n\\n $this->route = $result;\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":775,"cells":{"query_id":{"kind":"string","value":"66e76a62a6e4b2253ab75f18f904745f"},"query":{"kind":"string","value":"Operation deletePackageTypeWithHttpInfo Delete an packagetype"},"positive_passages":{"kind":"list like","value":[{"docid":"4b9e6238e6180e8b2725ccff0246b259","score":"0.65124476","text":"public function deletePackageTypeWithHttpInfo($package_type_id)\n {\n // verify the required parameter 'package_type_id' is set\n if ($package_type_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $package_type_id when calling deletePackageType');\n }\n // parse inputs\n $resourcePath = \"/package-type/{packageTypeId}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // path params\n if ($package_type_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"packageTypeId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($package_type_id),\n $resourcePath\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\ApiResponse',\n '/package-type/{packageTypeId}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }","title":""}],"string":"[\n {\n \"docid\": \"4b9e6238e6180e8b2725ccff0246b259\",\n \"score\": \"0.65124476\",\n \"text\": \"public function deletePackageTypeWithHttpInfo($package_type_id)\\n {\\n // verify the required parameter 'package_type_id' is set\\n if ($package_type_id === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $package_type_id when calling deletePackageType');\\n }\\n // parse inputs\\n $resourcePath = \\\"/package-type/{packageTypeId}\\\";\\n $httpBody = '';\\n $queryParams = [];\\n $headerParams = [];\\n $formParams = [];\\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\\n\\n // path params\\n if ($package_type_id !== null) {\\n $resourcePath = str_replace(\\n \\\"{\\\" . \\\"packageTypeId\\\" . \\\"}\\\",\\n $this->apiClient->getSerializer()->toPathValue($package_type_id),\\n $resourcePath\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\\n if (strlen($apiKey) !== 0) {\\n $headerParams['ApiKey'] = $apiKey;\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'DELETE',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n '\\\\BumbalClient\\\\Model\\\\ApiResponse',\\n '/package-type/{packageTypeId}'\\n );\\n\\n return [$this->apiClient->getSerializer()->deserialize($response, '\\\\BumbalClient\\\\Model\\\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 200:\\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\\\BumbalClient\\\\Model\\\\ApiResponse', $e->getResponseHeaders());\\n $e->setResponseObject($data);\\n break;\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"5f17a7cce1965dab5df1bb09fcf32b93","score":"0.5600216","text":"public function deleteWithHttpInfo($request)\n {\n $request = $this->deleteRequest($request);\n \n $response = $this->callClient($request);\n return [null, $response->getStatusCode(), $response->getHeaders()];\n }","title":""},{"docid":"0e60a26115824b2022408cb7102193e7","score":"0.5524437","text":"function deleteType($dType){\n $result = $this->dma->managementApiCall('DELETE', \"{$this->hashid}/types/{$dType}\");\n return $result['statusCode'] == 204;\n }","title":""},{"docid":"1dac7f22ffd3c9b61b0ee22decf8e240","score":"0.5494976","text":"function og_micro_type_delete($info) {\n variable_del('og_group_type_' . $info->machine_name);\n variable_del('og_group_content_type_' . $info->machine_name);\n}","title":""},{"docid":"24bb90f034edcee5d9f9f6970e86a5ed","score":"0.5456284","text":"public function deletePaymentType(Request $request)\n {\n // VALIDATE Payment type id\n $payment_type_id_validator = Validator::make($request->all(), [\n 'payment_type_id' => ['required','integer','exists:App\\Models\\Student\\Payment\\Type,id'],\n ]);\n\n // CHECK VALIDATOR FAILS\n if($payment_type_id_validator->fails()):\n return response()->json(['status'=>'error', 'errors'=>$payment_type_id_validator->errors()]);\n else:\n Type::destroy($request->payment_type_id);\n return response()->json(['status'=>'success']);\n endif;\n return response()->json(['status'=>'error', 'data'=>$request->all()]);\n }","title":""},{"docid":"39242301e83513243964f5f857023d26","score":"0.5403116","text":"function deleteType()\n {\n global $objDatabase, $_ARRAYLANG;\n\n if (isset($_GET['typeId'])) {\n $typeId=intval($_GET['typeId']);\n $objResult = $objDatabase->Execute(\"SELECT id FROM \".DBPREFIX.\"module_news WHERE typeid=\".$typeId);\n\n if ($objResult !== false) {\n if (!$objResult->EOF) {\n $this->strErrMessage = $_ARRAYLANG['TXT_TYPE_NOT_DELETED_BECAUSE_IN_USE'];\n }\n else {\n if ($objDatabase->Execute(\n \"DELETE tblC, tblL\n FROM \".DBPREFIX.\"module_news_types AS tblC\n INNER JOIN \".DBPREFIX.\"module_news_types_locale AS tblL ON tblL.type_id=tblC.typeid\n WHERE tblC.typeid=\".$typeId\n ) !== false\n ) {\n $this->strOkMessage = $_ARRAYLANG['TXT_DATA_RECORD_DELETED_SUCCESSFUL'];\n } else {\n $this->strErrMessage = $_ARRAYLANG['TXT_DATABASE_QUERY_ERROR'];\n }\n }\n }\n }\n }","title":""},{"docid":"eb82fc067566fc2ad6fc16119bf7844f","score":"0.5182083","text":"abstract public function deleteContentTypeFromIndex($type_name);","title":""},{"docid":"7b90c8fdd92dd1088c42f88f888b712a","score":"0.50645626","text":"public function deleteCommonBandwidthPackageWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->bandwidthPackageId)) {\n $query['BandwidthPackageId'] = $request->bandwidthPackageId;\n }\n if (!Utils::isUnset($request->force)) {\n $query['Force'] = $request->force;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteCommonBandwidthPackage',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteCommonBandwidthPackageResponse::fromMap($this->callApi($params, $req, $runtime));\n }","title":""},{"docid":"04d6f6cc8ac5a317b37befd80acdd583","score":"0.5061891","text":"public function deleteById($packageId);","title":""},{"docid":"d71e4452ec7a5a5b2bd196b49502a4e1","score":"0.5008056","text":"public function deleteCharterStatusTypeByIdWithHttpInfo($id, $if_match = null)\n {\n \n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling deleteCharterStatusTypeById');\n }\n \n // parse inputs\n $resourcePath = \"/charterStatusTypes/{id}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\n \n \n // header params\n \n if ($if_match !== null) {\n $headerParams['If-Match'] = $this->apiClient->getSerializer()->toHeaderValue($if_match);\n }\n // path params\n \n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'DELETE',\n $queryParams, $httpBody,\n $headerParams\n );\n \n return array(null, $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 500:\n $data = \\Swagger\\Client\\ObjectSerializer::deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\WebServiceError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n }","title":""},{"docid":"a99a70a898f240f8d0856572d1318000","score":"0.49986213","text":"public function typesRemove()\n {\n $session = FR_Session::singleton();\n $id_type = null;\n\n // Support POST & GET\n if(filter_input(INPUT_POST, 'type_id') != ''){\n $id_type = filter_input(INPUT_POST, 'type_id');\n }\n else{\n $id_type = filter_input(INPUT_GET, 'type_id');\n }\n\n if($id_type != null){\n require_once 'models/TypesModel.php';\n $model = new TypesModel();\n\n $status = 9; // 9 removed status\n\n // remove\n $result = $model->updateStatusType($id_type, $session->id_tenant, $status);\n\n if($result != null){\n $error = $result->errorInfo();\n $numr = $result->rowCount();\n\n if($error[0] == 00000 && $numr > 0){\n header(\"Location: \".$this->root.\"?controller=types&action=typesDt&error_flag=1'\");\n }\n else{\n header(\"Location: \".$this->root.\"?controller=types&action=typesDt&error_flag=10&message='No se lograron aplicar cambios: \".$error[2].\"'\");\n }\n }\n else{\n header(\"Location: \".$this->root.\"?controller=types&action=typesDt&error_flag=10&message='Error: no se ha podido eliminar!\");\n }\n }\n else{\n header(\"Location: \".$this->root.\"?controller=types&action=typesDt&error_flag=10&message='Error: esta materia ya no existe!\");\n }\n }","title":""},{"docid":"09af0bfb980cf45472af8c61ba6ca7f7","score":"0.49855638","text":"public function destroy(Type $type)\n {\n // remove TYPE\n $type->delete();\n return response(Type::all()->jsonSerialize(), Response::HTTP_OK);\n }","title":""},{"docid":"757d6ad9ffd8bf0b6dfd9251101636e5","score":"0.4943237","text":"public function delEntityWithHttpInfo()\n {\n // parse inputs\n $resourcePath = \"/{uuid}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/{uuid}'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }","title":""},{"docid":"ce1abab548a2ccbc0f8f6df7bbe26292","score":"0.49417755","text":"public function setPackageTypeWithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/package-type/set\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\ApiResponse',\n '/package-type/set'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }","title":""},{"docid":"3555b05ed731f5342f51c74c80131dbe","score":"0.4938556","text":"public function deleteExamType(Request $request)\n {\n //Validate exam type id\n $exam_type_id_validator = Validator::make($request->all(), [\n 'exam_type_id' => ['required', 'integer', 'exists:App\\Models\\Exam\\Types,id'],\n ]);\n\n //Check validator fails\n if($exam_type_id_validator->fails()):\n return response()->json(['status'=>'error', 'errors'=>$exam_type_id_validator->errors()]);\n else:\n if(Types::destroy($request->exam_type_id)):\n return response()->json(['status'=>'success']);\n endif;\n endif;\n return response()->json(['status'=>'error', 'data'=>$request->all()]);\n }","title":""},{"docid":"70e997e3761cd5306c421217a3683f46","score":"0.4935121","text":"public function delete($name, $type) {\n $this->redisClient->del([$this->generateKey($name, $type)]);\n }","title":""},{"docid":"9d75661158b60d8bf8adc33699718f79","score":"0.492966","text":"public function createPackageTypeWithHttpInfo($body = null)\n {\n // parse inputs\n $resourcePath = \"/package-type\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\ApiResponse',\n '/package-type'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }","title":""},{"docid":"e8d8fc0c21645d627578370170912d0e","score":"0.49048853","text":"public function billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteWithHttpInfo($accept, $document_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteRequest($accept, $document_type_id, $jiwa_stateful);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }","title":""},{"docid":"cf8d898dafdf90869b24dee7ae7d57fb","score":"0.48920533","text":"public function teamBuilderConfigsIdProductGroupsNkTypesDeleteWithHttpInfo($id, $nk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsNkTypesDelete');\n }\n // verify the required parameter 'nk' is set\n if ($nk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $nk when calling teamBuilderConfigsIdProductGroupsNkTypesDelete');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productGroups/{nk}/types\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($nk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"nk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($nk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/TeamBuilderConfigs/{id}/productGroups/{nk}/types'\n );\n\n return array(null, $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }","title":""},{"docid":"cc280bc3a6484e124d2befeadf3af996","score":"0.48444647","text":"function deleteType($typeId) {\n\t\tthrow new CmisNotImplementedException(\"deleteType\");\n\t}","title":""},{"docid":"a4fe06f87a503169106664c5efc64c39","score":"0.48351854","text":"public function deleteById(int $idCompanyType): void;","title":""},{"docid":"4d9de03b38fd028f30ddc37c8f204722","score":"0.4823014","text":"function delete_type($id)\n {\n return $this->db->delete('type',array('id'=>$id));\n }","title":""},{"docid":"45c6fba3cea7dc0c45ebb87cc10d148f","score":"0.4808812","text":"function entity_type_delete($projectId, $entityTypeId)\n{\n $entityTypesClient = new EntityTypesClient();\n\n $parent = $entityTypesClient->entityTypeName($projectId,\n $entityTypeId);\n $entityTypesClient->deleteEntityType($parent);\n printf('Entity type deleted: %s' . PHP_EOL, $parent);\n\n $entityTypesClient->close();\n}","title":""},{"docid":"68fdb27004606f40480fbaa9f0963f28","score":"0.48045158","text":"public function deleteAction() {\n\t\t$id = intval ( $this->getRequest ()->getParam ( 'id' ) );\n\t\t$ProductType = ProductType::getById ( $id );\n\t\tif ($ProductType) {\n\t\t\t$title = $ProductType->name;\n\t\t\t$id = $ProductType->id;\n\t\t\tif ($this->getRequest ()->isPost ()) {\n\t\t\t\tif ($ProductType->delete ()) {\n\t\t\t\t\t$this->Member->log ( 'Xóa Loại Danh mục: ' . $title . ' (' . $id . ')', '$ProductType' );\n\t\t\t\t\t\n\t\t\t\t\tMy_Plugin_Libs::setSplash ( 'Loại Danh mục ' . $title . ' đã được xóa' );\n\t\t\t\t}\n\t\t\t\t// NewsCategories::db2js ();\n\t\t\t\t$this->_redirect ( 'admin/producttype' );\n\t\t\t}\n\t\t\t$this->view->ProductType = $ProductType;\n\t\t}\n\t}","title":""},{"docid":"24f575304aba4770f56d308f618e4420","score":"0.48042196","text":"function flowadmin_delete_devicetype()\r\n{\r\n\tglobal $user;\t\r\n\t$deviceTypeId = func_get_arg(0);\r\n\t\r\n\tflowadmin_access();\r\n\t\r\n\ttry {\r\n\t\t\t$oauthInfo = flowautho_get_oauth_credentials($user->mail);\r\n\t\t\t$deviceTypesServices = new FDWDeviceTypeServicesImpl($oauthInfo, $user);\r\n\t\t\t\t\r\n\t\t\tif (isset($deviceTypeId)) \r\n\t\t\t{\r\n\t\t\t\tif ($deviceTypesServices->deleteDeviceTypeByID($deviceTypeId)) \r\n\t\t\t\t{\r\n\t\t\t\t\t$msg = t('Your device type was successfully deleted.');\r\n\t\t\t\t\tflowautho_set_message('c-ate-delete-devicetype-success', $msg, 'status', true);\r\n\t\t\t\t\tdrupal_goto(FLOWADMIN_DASHBOARD.'/'.FLOWADMIN.'/'.FLOWADMIN_DEVICETYPES.'/1');\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$msg = t('Sorry an error occrured when we tried to delete your device type.');\r\n\t\t\t\t\tflowautho_set_message('c-ate-delete-devicetype-error', $msg, 'error', true);\r\n\t\t\t\t\tdrupal_goto(FLOWADMIN_DASHBOARD.'/'.FLOWADMIN.'/'.FLOWADMIN_DEVICETYPES.'/1');\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t} catch (FDWUnknownUserException $e) {\r\n\t\twatchdog('error', 'FDWDeviceTypeServicesImpl error:: '. print_r($e->getMessage(),true));\r\n\t}\t\r\n\t\r\n}","title":""},{"docid":"19558b71dd08049ca1cd0f4b78861e84","score":"0.47947705","text":"public function teamBuilderConfigsIdProductTypesFkDeleteWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductTypesFkDelete');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductTypesFkDelete');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productTypes/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/TeamBuilderConfigs/{id}/productTypes/{fk}'\n );\n\n return array(null, $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }","title":""},{"docid":"8c35cb86d8cc0fa7c5984cb3ae303504","score":"0.4759362","text":"public function billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 204:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Jiwa\\Model\\Object',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }","title":""},{"docid":"8937d7eb91d617bc42224453b91af717","score":"0.4730612","text":"public function billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteAsyncWithHttpInfo($accept, $document_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteRequest($accept, $document_type_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }","title":""},{"docid":"80b3e9c6de5b40a923b5ba1b38f4b464","score":"0.47259614","text":"public function destroy($id)\n {\n $model = Type::find($id);\n //删除该类型对应的属性, todo 删除了该类型下的所有商品属性,则库存也需要删除\n Attribute::where('type_id', $id)->delete();\n if (!$model)\n return response('删除失败',403);\n $res = $model->delete(); //成功返回1?失败返回0?\n return (string) $res;\n }","title":""},{"docid":"afd9bc7b98fa71f9598d623f6bcfe635","score":"0.47247607","text":"public function destory(Request $request){\n $model = Type::find($request->input('id'));\n if(!empty($model)){\n if($model->delete()){\n return response()->json(['code' => 200, 'msg' => '删除成功']);\n }\n return response()->json(['code' => 400, 'msg' => '删除失败']);\n }\n return response()->json(['code' => 204, 'msg' => '信息不存在']);\n }","title":""},{"docid":"3e7231aefb0442833a4b69a3c91de619","score":"0.47111487","text":"public function deleteItem() {\n $this->request->onlyAllow('post');\n $this->response->type('json');\n\n $status = false;\n $message = \"\";\n\n if (isset($this->request->data)) {\n $id = $this->request->data['id'];\n $type = $this->request->data['type'];\n $status = $this->Library->deleteItem($type, $id);\n }\n\n if ($status) {\n $message = \"Deletion successful\";\n } else {\n $message = \"Deletion unsuccessful\";\n }\n\n $this->set(compact('status', 'message', 'data'));\n $this->set('_serialize', array('data', 'status', 'message'));\n }","title":""},{"docid":"25bcba90991fafb20a9da8d108721f1e","score":"0.46833473","text":"public function actionDelete($pro_type){\n\t\t$searchdata = Request::all();\n\t\t$recorddata = array();\n\t\t$recorddata['tr_action'] = 3; //異動動作:刪除\n\t\ttry {\n\t\t\tif($pro_type == 1){ //專案任務\n\t\t\t\t$recorddata['tr_goal'] = 1; //異動目標:專案任務\n\t\t\t\treturn $this->deleteProject($searchdata,$recorddata);\n\t\t\t}\n\t\t\tif($pro_type == 2){ //專案子任務\n\t\t\t\t$recorddata['tr_goal'] = 2; //異動目標:專案子任務\n\t\t\t\treturn $this->deleteSubProject($searchdata,$recorddata);\n\t\t\t}\n\t\t\tif($pro_type == 3){ //專案訊息\n\t\t\t\t$recorddata['tr_goal'] = 3; //異動目標:專案訊息\n\t\t\t\treturn $this->deleteProjectInformation($searchdata,$recorddata);\n\t\t\t}\n\t\t\tif($pro_type == 4){ //專案紀錄\n\t\t\t\t$recorddata['tr_goal'] = 4; //異動目標:專案紀錄\n\t\t\t\treturn $this->deleteProjectRecord($searchdata,$recorddata);\n\t\t\t}\n\t\t\tif($pro_type == 5){ //標籤\n\t\t\t\t$recorddata['tr_goal'] = 5; //異動目標:標籤\n\t\t\t\treturn $this->deleteTag($searchdata,$recorddata);\n\t\t\t}\n\t\t} catch (\\Exception $e) {\n\t\t\tCommonTools::writeErrorLogByException($e);\n\t\t\treturn CommonTools::returnData(false,'#030401',null,null);\n\t\t}\n\t}","title":""},{"docid":"0728fcc1c51554a5d03098f09578c880","score":"0.46737584","text":"public function deleteProgramUrlTypeUrlWithHttpInfo($id_program, $id_url_type, $id_url)\n {\n $returnType = '';\n $request = $this->deleteProgramUrlTypeUrlRequest($id_program, $id_url_type, $id_url);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }","title":""},{"docid":"292b5ad9f02cf1bf66e2f560edd9f395","score":"0.467109","text":"public function delete(string $type, string $phase, int $year, string $anchor, ?string $hoofdstukMinfinId);","title":""},{"docid":"bef8926e62cffe9e00c0321480e41c02","score":"0.46578243","text":"public function destroy(DestroyTypeRequest $request)\n {\n //get Data\n $dataRequest = $request->all();\n $model = new Type();\n if ($model->where('id', $dataRequest['id'])->update([\n 'status'=>Type::HIDE\n ])) {\n return redirect()->back()->with('success', 'Delete!');\n } else {\n return redirect_errors('Have error, cannot delete!');\n }\n }","title":""},{"docid":"ebb8509b02fca70171794ea60664c4b2","score":"0.46537915","text":"public function delete($tipo_proyecto);","title":""},{"docid":"e26f3b737d65b80c7a82c330f1d10209","score":"0.46536374","text":"public function destroy(Request $request)\n {\n $server = Helper::doctieIsDemoSiteAjax();\n if (!empty($server)) {\n $json['type'] = 'error';\n $json['message'] = $server->getData()->message;\n return $json;\n }\n $json = array();\n $id = $request['id'];\n if (!empty($id)) {\n $this->package::where('id', $id)->delete();\n $json['type'] = 'success';\n $json['message'] = trans('lang.package_deleted');\n return $json;\n } else {\n $json['type'] = 'error';\n $json['message'] = trans('lang.something_wrong');\n return $json;\n }\n }","title":""},{"docid":"5a7b9878fd55030361ec871745615ceb","score":"0.46446118","text":"public function action_delete_item()\n {\n try {\n $type_stub = $this->request->param('id');\n $type = $this->_crud_items[$type_stub];\n $id = $this->request->param('toggle');\n\n if (empty($type)) {\n IbHelpers::set_message('This action cannot be performed on items of type '.$type_stub, 'error popup_box');\n $this->request->redirect('/admin/'.$this->_plugin);\n }\n\n if (!empty($type['delete_permission']) && !Auth::instance()->has_access($type['delete_permission'])) {\n IbHelpers::set_message('You need access to the &quot;'.$type['delete_permission'].'&quot; permission to perform this action.', 'error popup_box');\n $this->request->redirect('/admin/'.$this->_plugin);\n }\n\n $model = ORM::factory($type['model'])->where('id', '=', $id)->find_undeleted();\n $model->delete_and_save();\n\n IbHelpers::set_message(htmlspecialchars($type['name'].' #'.$id.' successfully deleted.'), 'success popup_box');\n\n $name_plural = isset($type['name_plural']) ? $type['name_plural'] : $type['name'].'s';\n $stub_plural = isset($type['stub_plural']) ? $type['stub_plural'] : $type_stub.'s';\n\n $this->request->redirect('/admin/'.$this->_plugin.'/'.$stub_plural);\n }\n catch (Exception $e) {\n Log::instance()->add(Log::ERROR, \"Error deleting\\n\".$e->getMessage().\"\\n\".$e->getTraceAsString());\n IbHelpers::set_message('Unexpected internal error deleting. If this problem continues, please ask an administrator to check the error logs.');\n $this->request->redirect('/admin');\n }\n }","title":""},{"docid":"6ee6ee659a4e38a837847a2cd6b1b7f5","score":"0.46063715","text":"public function destroy($id)\n {\n try {\n Type::destroy($id);\n return response(['The type has been deleted'], 204);\n } catch (Exception $e) {\n return response(['Problem deleting the type', 500]);\n }\n }","title":""},{"docid":"9b817e1991a9457d56c733afe20c9d54","score":"0.46028382","text":"public static function del($type)\n {\n $cacheName = class_user_func($type . '::getName');\n\n $config = new Config();\n $c = $config->get();\n\n $file = $c['cachedir'] . DIRECTORY_SEPARATOR . $cacheName;\n\n if(file_exists($file))\n {\n unlink($file);\n }\n }","title":""},{"docid":"80dfedbc55bf4e4a18087eae340f3c55","score":"0.45909375","text":"public function deleteNatGatewayWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->force)) {\n $query['Force'] = $request->force;\n }\n if (!Utils::isUnset($request->natGatewayId)) {\n $query['NatGatewayId'] = $request->natGatewayId;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteNatGateway',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteNatGatewayResponse::fromMap($this->callApi($params, $req, $runtime));\n }","title":""},{"docid":"0514fd5442d1623ace2c2c80dce54f90","score":"0.45691252","text":"public function destroy($id_type)\n {\n $type_product = TypeProduct::find($id_type);\n $type_product->status_type = 'ยกเลิก';\n $type_product->save();\n return response()->json('Users Deleted Successfully.');\n }","title":""},{"docid":"2e1adc9444f318015faabf652871d05e","score":"0.45670918","text":"public function deleteAction() {\n $this->_helper->layout->setLayout('admin-simple');\n\n\t\t//GET MAPPING ID\n $this->view->planmap_id = $planmap_id = $this->_getParam('planmap_id');\n\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n\t\t\t\t//GET MAPPING ITEM\n $sitestore_planmap = Engine_Api::_()->getItem('sitestore_planmap', $planmap_id);\n\n\t\t\t\t//DELETE MAPPING\n $sitestore_planmap->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Mapping deleted successfully !'))\n ));\n }\n $this->renderScript('admin-package/delete.tpl');\n }","title":""},{"docid":"b1a7e7ebf26f7ec27825171c8bcd7241","score":"0.45491484","text":"public function destroy($id)\n {\n //\n $product_type = ProductType::find($id);\n $data = [\n 'product_type_id' => $product_type->id\n ];\n $product_type->delete();\n return response()->json($data);\n }","title":""},{"docid":"647e8daab937d8784b55b06a0cd38e39","score":"0.4519827","text":"public function removeAction(){\n \n // Keep reference to the content type, if not sent send them back to content types\n $contentTypeIdent = $this->getRequest()->getParam('content-type');\n \n if (isset($contentTypeIdent) && is_numeric($contentTypeIdent)){\n $contentType = $this->getFromApi('/contenttypes/'.$contentTypeIdent, 'array');\n $this->view->contentType = $contentType;\n }else{\n $this->_helper->flashMessenger->addMessage('Unkown content type sent cannot add field');\n $this->view->messages = $this->_helper->flashMessenger->getMessages();\n $this->_redirect('/contenttypes');\n return;\n }\n \n // Get the content type buy the ID parsed\n $id = $this->getRequest()->getParam('id');\n \n // If the get param was sent and is in the correct format\n if (isset($id) && is_numeric($id)){\n \n // Make post request to remove content type from the API\n $removeAction = $this->postToApi('/contenttypefields', 'remove', $id);\n \n\n if ($removeAction == 1){\n $this->_helper->flashMessenger->addMessage(ucfirst($contentType['name']).' field removed from the system');\n \n }else{\n $this->_helper->flashMessenger->addMessage('Could not find the '.ucfirst($contentType['name']).' field to remove');\n }\n \n $this->view->messages = $this->_helper->flashMessenger->getMessages();\n $this->_redirect('/contenttypefields/index/id/'.$contentTypeIdent);\n return;\n \n }else{\n // Redirect back to content type fields\n $this->_redirect('/contenttypefields/index/id/'.$contentTypeIdent);\n return;\n }\n }","title":""},{"docid":"819318e851547e6273f0250ef874a74a","score":"0.45142516","text":"public function destroy(Request $request, $id)\n {\n if ($request->isMethod('delete') && Package::where('id', $id)->exists()) {\n $site = site();\n $package = $site->packages()->where('id', $id)->firstOrFail();\n $stripe_error = '';\n $package->status = Package::INACTIVE;\n $stripe_plan = $package->stripe_plan;\n $package->saveOrFail();\n\n //------------------------------\n // Stripe Plan\n //------------------------------\n // Update stripe plan.\n if (filled($stripe_plan)) {\n try {\n \\Stripe\\Stripe::setApiKey(config('cashier.secret')); // stripe key\n\n $stripe_plan = \\Stripe\\Plan::update(\n $stripe_plan,\n [\n 'active' => false\n ]\n );\n } catch (\\Stripe\\Exception\\InvalidRequestException $e) {\n $json = json_decode(json_encode($e->getJsonBody()), false);\n $error = $json->error;\n $stripe_error = $error->message;\n }\n\n // Handle stripe errors\n if (filled($stripe_error)) {\n flash($stripe_error);\n return back()->withInput();\n }\n }\n\n if ($package->delete()) {\n flash('Successfully deleted package.');\n return redirect()->route('admin.packages.index');\n }\n }\n\n flash('Invaild action or packages does not exist.');\n return redirect()->route('admin.packages.index');\n }","title":""},{"docid":"2bab31b429412e04fb4f9d86a85d7a51","score":"0.45132256","text":"public function billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteAsyncWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\n {\n $returnType = '\\Jiwa\\Model\\Object';\n $request = $this->billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }","title":""},{"docid":"baecc4f8cad1d018fe10779caeb5bf8e","score":"0.45119327","text":"public function delete(int $id) {\n\n return redirect(url('packageTypes'));\n }","title":""},{"docid":"c2cb77d0147e5d9f5bccdd9941fb93ff","score":"0.4510962","text":"public function expenseTypesIdDeleteWithHttpInfo($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling expenseTypesIdDelete');\n }\n // parse inputs\n $resourcePath = \"/expense/types/{id}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires HTTP basic authentication\n if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {\n $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . \":\" . $this->apiClient->getConfig()->getPassword());\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/expense/types/{id}'\n );\n\n return [null, $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 401:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Spinen\\ConnectWise\\Clients\\Expense\\Model\\Error', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }","title":""},{"docid":"c61a1cacd3d6330feb74c4680e1fcaec","score":"0.45093593","text":"public function delete($id, Request $request)\n {\n\n try {\n $this->polizaTipoRepository->delete($request->all(), $id);\n\n return response()->json(['data' =>\n [\n 'id' => $id\n ]\n ], 200);\n } catch (\\Exception $e){\n return response()->json([\n 'data' => $e->getTraceAsString()], 500);\n }\n }","title":""},{"docid":"a4eff61d9447d77919b5966f55d0615b","score":"0.45072314","text":"public function deleteUserType(Request $request){\n\t\n\t\t$userTye = UserType::find($request->id); \n\t\t$deleteUserType = $userTye->delete();\n\t\t\n \t\tif($deleteUserType){\n\t\t\tSession::flash('message', \"User Type deleted successfully!\"); \n\t\t\tSession::flash('alert-class', 'alert-success');\n\t\t\treturn back();\n\t \t}\n }","title":""},{"docid":"1a234516b34c106ddc23d3928e4d779b","score":"0.45005444","text":"function delete_post_type() {\r\n\t\tcheck_ajax_referer('custom_post_types_suffusion', 'custom_post_types_wpnonce');\r\n\t\t$post_type_index = $_POST['post_type_index'];\r\n\t\t$ret = \"\";\r\n\t\tif (isset($post_type_index)) {\r\n\t\t\t$suffusion_post_types = get_option('suffusion_post_types');\r\n\t\t\tif (is_array($suffusion_post_types)) {\r\n\t\t\t\tunset($suffusion_post_types[$post_type_index]);\r\n\t\t\t\tupdate_option('suffusion_post_types', $suffusion_post_types);\r\n\t\t\t\t$ret = \"Post type deleted.\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$ret = \"Failed to delete post type. Post types are not stored as an array in the database.\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}","title":""},{"docid":"9bb8c4276b9470a2d815d68d5a11fe52","score":"0.44934562","text":"public function deleteTranscoderStreamNameGroupConfigWithHttpInfo($server_name, $vhost_name, $template_name, $group_name)\n {\n $returnType = '';\n $request = $this->deleteTranscoderStreamNameGroupConfigRequest($server_name, $vhost_name, $template_name, $group_name);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }","title":""},{"docid":"b59f75796c5f94690dd08b6bac8b51ba","score":"0.44904438","text":"function delete($url = \"\",$options = array()){\n\t\tif(is_array($url)){\n\t\t\t$options = $url;\n\t\t\t$url = \"\";\n\t\t}\n\t\t$options[\"request_method\"] = \"DELETE\";\n\t\treturn $this->fetchContent($url,$options);\n\t}","title":""},{"docid":"0e3171c766dab3072226974740834051","score":"0.4489704","text":"public function deleteIdentity(string $type, string $name);","title":""},{"docid":"a06a723eb11348e56e1d43f2ad87bc0f","score":"0.4478995","text":"public function deleteVpnGatewayWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->vpnGatewayId)) {\n $query['VpnGatewayId'] = $request->vpnGatewayId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteVpnGateway',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteVpnGatewayResponse::fromMap($this->callApi($params, $req, $runtime));\n }","title":""},{"docid":"ef1f09296852dc6cf04bfd00627900e8","score":"0.44787332","text":"public function updatePackageTypeWithHttpInfo($package_type_id, $body = null)\n {\n // verify the required parameter 'package_type_id' is set\n if ($package_type_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $package_type_id when calling updatePackageType');\n }\n // parse inputs\n $resourcePath = \"/package-type/{packageTypeId}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // path params\n if ($package_type_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"packageTypeId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($package_type_id),\n $resourcePath\n );\n }\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\ApiResponse',\n '/package-type/{packageTypeId}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\ApiResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }","title":""},{"docid":"e64ac44dd956b624cf14e7edb161e1d6","score":"0.4478231","text":"function DEL()\n{\n\tif ($this->isError()) return;\n\n\t$id_type_fiche = $this->id_type_fiche;\n\n\t$sql = \" DELETE FROM \".$GLOBALS['prefix'].\"param_type_fiche\n\t\t\t\tWHERE id_type_fiche = $id_type_fiche\";\n\n\tif (!Sql_exec($sql)) $this->setError(ERROR);\n\tif (!$this->isError()) Lib_sqlLog($sql);\n\n\treturn;\n}","title":""},{"docid":"f8631609cd395e7c37d8f215956b8851","score":"0.4476143","text":"public function retrieveListPackageTypeWithHttpInfo($arguments)\n {\n // verify the required parameter 'arguments' is set\n if ($arguments === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $arguments when calling retrieveListPackageType');\n }\n // parse inputs\n $resourcePath = \"/package-type\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\n\n // body params\n $_tempBody = null;\n if (isset($arguments)) {\n $_tempBody = $arguments;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['ApiKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\BumbalClient\\Model\\PackageTypeListResponse',\n '/package-type'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\BumbalClient\\Model\\PackageTypeListResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\BumbalClient\\Model\\PackageTypeListResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }","title":""},{"docid":"1372e2e4451ed177c11e59fe05fa9c3d","score":"0.44722387","text":"public function realizaPeticionDelete($url, $http, $data){\n\t\tRequests::register_autoloader();\n\t\t$request = Requests::delete(\n\t\t\t$url, \n\t\t\tarray(\n\t\t\t\t'Content-Type' => 'application/json'\n\t\t\t), \n\t\t\t$data\n\t\t);\n\t\treturn($request->body); \n }","title":""},{"docid":"24d0030ebc420252f7c843ef361d89a1","score":"0.44665372","text":"public function delete_contract_type() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'');\n\t\t\t$id = $this->uri->segment(3);\n\t\t\t$result = $this->Graphene_model->delete_contract_type_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = 'Contract Type deleted.';\n\t\t\t} else {\n\t\t\t\t$Return['error'] = 'Bug. Something went wrong, please try again.';\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}","title":""},{"docid":"552bc29492672a7ffba1a899d30c2927","score":"0.4464114","text":"protected function drop_key($type, $name)\n\t{\n\t\treturn $this->command($type, compact('name'));\n\t}","title":""},{"docid":"9ab20a5882372b1c5f9db037adb2da76","score":"0.44576827","text":"public function delete($params) {\n if (!isset($params['userId'])) throw new osapiException(\"Invalid or no userId specified for osapiAppData->delete\");\n if (!isset($params['groupId'])) throw new osapiException(\"Invalid or no groupId specified for osapiAppData->delete\");\n if (!isset($params['appId'])) throw new osapiException(\"Invalid or no appId specified for osapiAppData->delete\");\n if (isset($params['fields'])) {\n if (!is_array($params['fields'])) throw new osapiException(\"Optional param 'fields' should be an array in osapiAppData->delete\");\n foreach ($params['fields'] as $key) {\n if (!self::isValidKey($key)) {\n throw new osapiException(\"Invalid key specified in osapiAppData->delete: $key\");\n }\n }\n }\n return osapiRequest::createRequest('appdata.delete', $params);\n }","title":""},{"docid":"8ff9c63dfb006a5ac7bd9e174f5e1f84","score":"0.44545767","text":"public function destroy(Request $request)\n {\n $goal_type = GoalType::findOrFail($request->id);\n $goal_type->delete();\n return back()->with('success',\"Goal Type has been deleted\");\n }","title":""},{"docid":"dd3b20208142c3e4858e7f2505e2c5fa","score":"0.44429618","text":"public function index_delete($nID = NULL)\n {\n // Delete shop type\n return $this->lib_rest_shop_types->deleteShopType($nID);\n }","title":""},{"docid":"d9d7545cb66f1ac6783128ddd232ef76","score":"0.44405052","text":"public function forceDelete(Request $request, $id)\n {\n if ($request->isMethod('delete') && Package::withTrashed()->where('id', $id)->exists()) {\n $site = site();\n $package = $site->packages()->withTrashed()->where('id', $id)->firstOrFail();\n $products = $package->products()->cursor();\n $stripe_id = $package->stripe_plan;\n\n // Unassign any products\n if ($products && $products->count() !== 0) {\n foreach ($products as $product) {\n $package->unassignProduct($product);\n }\n }\n\n //-------------------------//\n // Stripe Product\n //-------------------------//\n if (filled($stripe_id)) {\n try {\n \\Stripe\\Stripe::setApiKey(config('cashier.secret')); // stripe key\n\n $stripe_plan = \\Stripe\\Plan::retrieve($stripe_id);\n $stripe_plan->delete();\n } catch (\\Stripe\\Exception\\InvalidRequestException $e) {\n $json = json_decode(json_encode($e->getJsonBody()), false);\n $error = $json->error;\n $stripe_error = $error->message;\n\n if (filled($stripe_error)) {\n flash($stripe_error);\n return redirect()->route('admin.packages.index');\n }\n }\n }\n\n // Delete Images\n $images = $package->getMedia('images');\n\n if ($images && count($images) !== 0) {\n foreach ($images as $index => $_image) {\n $_image->delete();\n }\n }\n\n // Remove from site\n $site->unassignPackage($package);\n $package->forceDelete();\n\n flash('Successfully deleted package forever.');\n return redirect()->route('admin.packages.index');\n }\n\n flash('Invaild action or package does not exist.');\n return redirect()->route('admin.packagess.index');\n }","title":""},{"docid":"8da109ca7ffd8f2291545f5a7efcd457","score":"0.44401118","text":"public function delete(string $url, RequestOptionsInterface $requestOptions) : ResponseInterface;","title":""},{"docid":"ae69cf3c70a9752a8268e8ac03adafcd","score":"0.44390172","text":"public function deleteApplicationUsingDeleteWithHttpInfo($application_id)\n {\n $returnType = '';\n $request = $this->deleteApplicationUsingDeleteRequest($application_id);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }","title":""},{"docid":"83e679ecdb0211c2815bfa2704cf9a24","score":"0.44310552","text":"public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }","title":""},{"docid":"83e679ecdb0211c2815bfa2704cf9a24","score":"0.44310552","text":"public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }","title":""},{"docid":"83e679ecdb0211c2815bfa2704cf9a24","score":"0.44310552","text":"public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }","title":""},{"docid":"83e679ecdb0211c2815bfa2704cf9a24","score":"0.44310552","text":"public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }","title":""},{"docid":"83e679ecdb0211c2815bfa2704cf9a24","score":"0.44310552","text":"public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }","title":""},{"docid":"83e679ecdb0211c2815bfa2704cf9a24","score":"0.44310552","text":"public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], Operation::class);\n }","title":""},{"docid":"c75613b8ea56ab76cc8300f78edb5571","score":"0.44304055","text":"public function delAttributeWithHttpInfo()\n {\n // parse inputs\n $resourcePath = \"/{uuid}/attribute/{key}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2004',\n '/{uuid}/attribute/{key}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2004', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2004', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }","title":""},{"docid":"6be470ed6d2505edaee4b857352d783a","score":"0.44279456","text":"public function deleteServiceAuthorizationWithHttpInfo($options)\n {\n $request = $this->deleteServiceAuthorizationRequest($options);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') {\n $header = $response->getHeader('Fastly-RateLimit-Remaining');\n if (count($header) > 0) {\n $this->config->setRateLimitRemaining($header[0]);\n }\n\n $header = $response->getHeader('Fastly-RateLimit-Reset');\n if (count($header) > 0) {\n $this->config->setRateLimitReset($header[0]);\n }\n } \n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }","title":""},{"docid":"79e7205af31755754f60fa3c4b0f3ac6","score":"0.44171318","text":"public function destroy(ContactType $contactType)\n {\n $contactType->delete();\n\n return response()->json([\n 'message' => 'Contact Type Deleted Successfully!!'\n ]);\n }","title":""},{"docid":"a2792e0af60a1eae4b4502397419bece","score":"0.44136465","text":"public function deleteType($lpaId)\n {\n $helper = new ApplicationResourceService($lpaId, 'type', $this);\n return $helper->deleteResource();\n }","title":""},{"docid":"ac609400ae00a90fe6f5cdc281166176","score":"0.4407292","text":"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('ZIMZIMBundlesOpinionBundle:TypeButchery')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find TypeButchery entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n $this->deleteSuccess();\n }\n\n return $this->redirect($this->generateUrl('zimzim_opinion_typebutchery'));\n }","title":""},{"docid":"9b09d5d522d544aa2176b6bb439b2e87","score":"0.44070202","text":"function deleteType() {\r\n\r\n if(!array_key_exists(36,$this->role_privileges)){\r\n echo(json_encode(array('status' => 'access')));\r\n } else {\r\n $id = $this->input->post('id');\r\n $data = array('deleted' => 1, 'updated_by' => $this->vendorId, 'updated_time' => date('Y-m-d H:i:s'));\r\n $result = $this->k_master_vehicle_type_model->delete($id, $data);\r\n if ($result > 0) {\r\n echo(json_encode(array('status' => TRUE)));\r\n } else {\r\n echo(json_encode(array('status' => FALSE)));\r\n }\r\n }\r\n }","title":""},{"docid":"7dfb787096ccc9fa809fa0b898c97e04","score":"0.44069","text":"public function destroy(Request $request)\n {\n Type::find($request->id)->delete();\n return $this->create();\n }","title":""},{"docid":"e6d4206d8fb3aa058ba91ca10098e679","score":"0.44059187","text":"public function destroy(Brand $brand, Type $type)\n {\n $type->delete();\n\n return response()->json([\n 'Deleted Type'\n ]);\n }","title":""},{"docid":"aa9545de0adce3f1c193caa46f3ebf5c","score":"0.4402174","text":"public function delete($package, $name)\n {\n $this->table()\n ->where('package', $package)\n ->where('name', $name)\n ->delete();\n }","title":""},{"docid":"c89272b0fd4f97bd6df170e631cd3c78","score":"0.43942875","text":"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('IbaseStoreBundle:ProductPerPackage')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ProductPerPackage entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('package_include'));\n }","title":""},{"docid":"1f07e3216abc85b6de8db8c1cbf4a0c1","score":"0.43935055","text":"public function deleteRoutineWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $body = [];\n if (!Utils::isUnset($request->name)) {\n $body['Name'] = $request->name;\n }\n $req = new OpenApiRequest([\n 'body' => OpenApiUtilClient::parseToMap($body),\n ]);\n $params = new Params([\n 'action' => 'DeleteRoutine',\n 'version' => '2018-01-15',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteRoutineResponse::fromMap($this->callApi($params, $req, $runtime));\n }","title":""},{"docid":"801dd5319c0c34b25fed1f08302ec22b","score":"0.43933755","text":"public function deletePackage($request, $response)\n {\n $post = $request->getattributes('id');\n\n /** Find and update package information */\n $package = Package::find($post['id']);\n $package->disabled = 1;\n $package->save();\n\n return $response->withRedirect($this->router->pathFor('agent.packages'));\n }","title":""},{"docid":"c9cce688c06507f63ae7bc464f089209","score":"0.4385794","text":"public function deleteType()\n {\n $query = \"DELETE FROM sms_todo_status WHERE todo_status_id = :id\";\n\n $sql = $this->db->prepare($query);\n $sql->bindValue(':id', $this->data->id);\n\n if ($sql->execute()) {\n $data[\"status\"] = 'success';\n }\n return $data;\n }","title":""},{"docid":"46812ac3ff997d2215e17c16c98d435e","score":"0.4384278","text":"public function destroy(Request $request)\n {\n $result = InfoClass::destroyInfoClass($request->input('Id'));\n\n if ($result) {\n return response()->json(['message' => '删除成功', 'code' => 200]);\n } else {\n return response()->json(['message' => '删除失败', 'code' => 0]);\n }\n }","title":""},{"docid":"4cee075db8612133a2eb1814dfc61374","score":"0.43753105","text":"public function deleteDnsRecord($type, $name, $content)\r\n {\r\n $result = $this->listAllDnsRecords();\r\n $res = '';\r\n $id = '';\r\n if ( $result['status'] == 'success' ) {\r\n $json = json_decode( $result['data'] );\r\n \r\n foreach($json->result as $record) {\r\n if ( $type == 'CNAME' && $record->type == 'CNAME' ) {\r\n if ( $record->type == $type && $record->name == $name . '.' . $content ) {\r\n $id = $record->id;\r\n break;\r\n }\r\n } else {\r\n if ( $record->type == $type && $record->name == $name && $record->content == $content ) {\r\n $id = $record->id;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Than, call delete id\r\n if ( $id != '' ) {\r\n $method = 'DELETE';\r\n $path = 'zones/' . $this->zoneId . '/dns_records/' . $id;\r\n return $this->call($method, $path);\r\n } else {\r\n return array(\r\n 'status' => 'error',\r\n 'data' => 'DNS Record not found'\r\n );\r\n }\r\n }","title":""},{"docid":"7e17cf6cf2b4c3514e0bdadeb6725383","score":"0.43741024","text":"public function deleteVpcWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->dryRun)) {\n $query['DryRun'] = $request->dryRun;\n }\n if (!Utils::isUnset($request->forceDelete)) {\n $query['ForceDelete'] = $request->forceDelete;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->vpcId)) {\n $query['VpcId'] = $request->vpcId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteVpc',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteVpcResponse::fromMap($this->callApi($params, $req, $runtime));\n }","title":""},{"docid":"03146793a2e28a7b291b9a7c1221b8f8","score":"0.43730873","text":"public function delete_currency_type() {\n\t\t\n\t\tif($this->input->post('type')=='delete_record') {\n\t\t\t/* Define return | here result is used to return user data and error for error message */\n\t\t\t$Return = array('result'=>'', 'error'=>'');\n\t\t\t$id = $this->uri->segment(3);\n\t\t\t$result = $this->Graphene_model->delete_currency_type_record($id);\n\t\t\tif(isset($id)) {\n\t\t\t\t$Return['result'] = 'Currency Type deleted.';\n\t\t\t} else {\n\t\t\t\t$Return['error'] = 'Bug. Something went wrong, please try again.';\n\t\t\t}\n\t\t\t$this->output($Return);\n\t\t}\n\t}","title":""},{"docid":"c07aef47e3c3ba974b3f2e8ee32b9f6d","score":"0.43690553","text":"public function deleteDhcpOptions($request);","title":""},{"docid":"f8df34ba161af695c5afcd5c306e3de1","score":"0.4366733","text":"function delete_user_type($user_type_id)\n {\n $parameter_array = array();\n \n array_push($parameter_array, array(\n 'and',\n 'id',\n '=',\n $user_type_id\n ));\n \n parent::delete('i', $parameter_array);\n }","title":""},{"docid":"f14c6de131893a7b05c4c7fce4a31d73","score":"0.43592575","text":"public function deleteAction(Request $request)\n {\n $helpers = $this->get(\"app.helpers\");\n $hash = $request->get(\"authorization\", null);\n $authCheck = $helpers->authCheck($hash);\n\n if ($authCheck== true) {\n $json = $request->get(\"data\",null);\n $params = json_decode($json);\n\n $em = $this->getDoctrine()->getManager();\n\n $descuento = $em->getRepository('JHWEBContravencionalBundle:CvCdoCfgDescuento')->find(\n $params->id\n );\n\n $descuento->setActivo(false);\n\n $em->flush();\n\n $response = array(\n 'status' => 'success',\n 'code' => 200,\n 'message' => \"Registro eliminado con exito\"\n );\n }else{\n $response = array(\n 'status' => 'error',\n 'code' => 400,\n 'message' => \"Autorizacion no valida\", \n );\n }\n \n return $helpers->json($response);\n }","title":""},{"docid":"160f16cdf4698931ab2ce115a8eade44","score":"0.43585265","text":"public function deletePackageType($package_type_id)\n {\n list($response) = $this->deletePackageTypeWithHttpInfo($package_type_id);\n return $response;\n }","title":""},{"docid":"69257d0e3f2a607df921d32c713c286d","score":"0.43572706","text":"public function deletionProtectionWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->instanceId)) {\n $query['InstanceId'] = $request->instanceId;\n }\n if (!Utils::isUnset($request->ownerId)) {\n $query['OwnerId'] = $request->ownerId;\n }\n if (!Utils::isUnset($request->protectionEnable)) {\n $query['ProtectionEnable'] = $request->protectionEnable;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->type)) {\n $query['Type'] = $request->type;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeletionProtection',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeletionProtectionResponse::fromMap($this->callApi($params, $req, $runtime));\n }","title":""},{"docid":"053735800dbc38a695137c43f520b257","score":"0.43568933","text":"public function destroy(Type $type)\n {\n if($type==null){\n $errors = ['No se ha encontrado el id especificado'];\n return redirect()->back()->withErrors($errors);\n }\n\n $type->delete();\n\n session()->flash('message', 'El tipo de café se ha eliminado correctamente.');\n return redirect( route('admin.types') );\n }","title":""},{"docid":"94c02416f30f546340e6727fdcbfbc77","score":"0.4355165","text":"public function deleteAction(Request $request)\n {\n $helpers = $this->get(\"app.helpers\");\n $hash = $request->get(\"authorization\", null);\n $authCheck = $helpers->authCheck($hash);\n\n if ($authCheck == true) {\n $em = $this->getDoctrine()->getManager();\n $json = $request->get(\"json\", null);\n $params = json_decode($json);\n\n $placa = $em->getRepository('JHWEBVehiculoBundle:VhloCfgPlaca')->find($params);\n\n $placa->setEstado(0);\n $em = $this->getDoctrine()->getManager();\n $em->persist($placa);\n $em->flush();\n $response = array(\n 'status' => 'success',\n 'code' => 200,\n 'message' => \"Placa eliminada con éxito\",\n );\n\n }else{\n $response = array(\n 'status' => 'error',\n 'code' => 400,\n 'message' => \"Autorización no válida\",\n );\n }\n return $helpers->json($response);\n }","title":""},{"docid":"c3037d6543bace9c8cd9d795cca08637","score":"0.43489024","text":"public function actionDeleteErrorType() {\n $model = AudioQCErrorType::model()->findByPk(Yii::app()->request->getPost('errorTypeId'));\n\n // Only in case the record exist\n if (!$model instanceof AudioQCErrorType)\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => 'error')));\n\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => $model->delete() ? 'ok' : 'error')));\n }","title":""},{"docid":"515ad107a6adec730a1c0d518c0425c9","score":"0.4343692","text":"function delete_type()\r\n{\t\r\n\tglobal $con;\r\n\t/////////Delete the record//////////\r\n\t$SQL=\"DELETE FROM type WHERE type_id = $_REQUEST[type_id]\";\r\n\tmysqli_query($con,$SQL) or die(mysqli_error($con));\r\n\theader(\"Location:../type-report.php?msg=Deleted Successfully.\");\r\n}","title":""},{"docid":"4f164017d1dc83fbb2ed4a4b7dd7d4bf","score":"0.43402538","text":"public function deleteVpnAttachmentWithOptions($request, $runtime)\n {\n Utils::validateModel($request);\n $query = [];\n if (!Utils::isUnset($request->clientToken)) {\n $query['ClientToken'] = $request->clientToken;\n }\n if (!Utils::isUnset($request->ownerAccount)) {\n $query['OwnerAccount'] = $request->ownerAccount;\n }\n if (!Utils::isUnset($request->regionId)) {\n $query['RegionId'] = $request->regionId;\n }\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\n }\n if (!Utils::isUnset($request->resourceOwnerId)) {\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\n }\n if (!Utils::isUnset($request->vpnConnectionId)) {\n $query['VpnConnectionId'] = $request->vpnConnectionId;\n }\n $req = new OpenApiRequest([\n 'query' => OpenApiUtilClient::query($query),\n ]);\n $params = new Params([\n 'action' => 'DeleteVpnAttachment',\n 'version' => '2016-04-28',\n 'protocol' => 'HTTPS',\n 'pathname' => '/',\n 'method' => 'POST',\n 'authType' => 'AK',\n 'style' => 'RPC',\n 'reqBodyType' => 'formData',\n 'bodyType' => 'json',\n ]);\n\n return DeleteVpnAttachmentResponse::fromMap($this->callApi($params, $req, $runtime));\n }","title":""}],"string":"[\n {\n \"docid\": \"5f17a7cce1965dab5df1bb09fcf32b93\",\n \"score\": \"0.5600216\",\n \"text\": \"public function deleteWithHttpInfo($request)\\n {\\n $request = $this->deleteRequest($request);\\n \\n $response = $this->callClient($request);\\n return [null, $response->getStatusCode(), $response->getHeaders()];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e60a26115824b2022408cb7102193e7\",\n \"score\": \"0.5524437\",\n \"text\": \"function deleteType($dType){\\n $result = $this->dma->managementApiCall('DELETE', \\\"{$this->hashid}/types/{$dType}\\\");\\n return $result['statusCode'] == 204;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1dac7f22ffd3c9b61b0ee22decf8e240\",\n \"score\": \"0.5494976\",\n \"text\": \"function og_micro_type_delete($info) {\\n variable_del('og_group_type_' . $info->machine_name);\\n variable_del('og_group_content_type_' . $info->machine_name);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24bb90f034edcee5d9f9f6970e86a5ed\",\n \"score\": \"0.5456284\",\n \"text\": \"public function deletePaymentType(Request $request)\\n {\\n // VALIDATE Payment type id\\n $payment_type_id_validator = Validator::make($request->all(), [\\n 'payment_type_id' => ['required','integer','exists:App\\\\Models\\\\Student\\\\Payment\\\\Type,id'],\\n ]);\\n\\n // CHECK VALIDATOR FAILS\\n if($payment_type_id_validator->fails()):\\n return response()->json(['status'=>'error', 'errors'=>$payment_type_id_validator->errors()]);\\n else:\\n Type::destroy($request->payment_type_id);\\n return response()->json(['status'=>'success']);\\n endif;\\n return response()->json(['status'=>'error', 'data'=>$request->all()]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39242301e83513243964f5f857023d26\",\n \"score\": \"0.5403116\",\n \"text\": \"function deleteType()\\n {\\n global $objDatabase, $_ARRAYLANG;\\n\\n if (isset($_GET['typeId'])) {\\n $typeId=intval($_GET['typeId']);\\n $objResult = $objDatabase->Execute(\\\"SELECT id FROM \\\".DBPREFIX.\\\"module_news WHERE typeid=\\\".$typeId);\\n\\n if ($objResult !== false) {\\n if (!$objResult->EOF) {\\n $this->strErrMessage = $_ARRAYLANG['TXT_TYPE_NOT_DELETED_BECAUSE_IN_USE'];\\n }\\n else {\\n if ($objDatabase->Execute(\\n \\\"DELETE tblC, tblL\\n FROM \\\".DBPREFIX.\\\"module_news_types AS tblC\\n INNER JOIN \\\".DBPREFIX.\\\"module_news_types_locale AS tblL ON tblL.type_id=tblC.typeid\\n WHERE tblC.typeid=\\\".$typeId\\n ) !== false\\n ) {\\n $this->strOkMessage = $_ARRAYLANG['TXT_DATA_RECORD_DELETED_SUCCESSFUL'];\\n } else {\\n $this->strErrMessage = $_ARRAYLANG['TXT_DATABASE_QUERY_ERROR'];\\n }\\n }\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb82fc067566fc2ad6fc16119bf7844f\",\n \"score\": \"0.5182083\",\n \"text\": \"abstract public function deleteContentTypeFromIndex($type_name);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7b90c8fdd92dd1088c42f88f888b712a\",\n \"score\": \"0.50645626\",\n \"text\": \"public function deleteCommonBandwidthPackageWithOptions($request, $runtime)\\n {\\n Utils::validateModel($request);\\n $query = [];\\n if (!Utils::isUnset($request->bandwidthPackageId)) {\\n $query['BandwidthPackageId'] = $request->bandwidthPackageId;\\n }\\n if (!Utils::isUnset($request->force)) {\\n $query['Force'] = $request->force;\\n }\\n if (!Utils::isUnset($request->ownerAccount)) {\\n $query['OwnerAccount'] = $request->ownerAccount;\\n }\\n if (!Utils::isUnset($request->ownerId)) {\\n $query['OwnerId'] = $request->ownerId;\\n }\\n if (!Utils::isUnset($request->regionId)) {\\n $query['RegionId'] = $request->regionId;\\n }\\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\\n }\\n if (!Utils::isUnset($request->resourceOwnerId)) {\\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\\n }\\n $req = new OpenApiRequest([\\n 'query' => OpenApiUtilClient::query($query),\\n ]);\\n $params = new Params([\\n 'action' => 'DeleteCommonBandwidthPackage',\\n 'version' => '2016-04-28',\\n 'protocol' => 'HTTPS',\\n 'pathname' => '/',\\n 'method' => 'POST',\\n 'authType' => 'AK',\\n 'style' => 'RPC',\\n 'reqBodyType' => 'formData',\\n 'bodyType' => 'json',\\n ]);\\n\\n return DeleteCommonBandwidthPackageResponse::fromMap($this->callApi($params, $req, $runtime));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04d6f6cc8ac5a317b37befd80acdd583\",\n \"score\": \"0.5061891\",\n \"text\": \"public function deleteById($packageId);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d71e4452ec7a5a5b2bd196b49502a4e1\",\n \"score\": \"0.5008056\",\n \"text\": \"public function deleteCharterStatusTypeByIdWithHttpInfo($id, $if_match = null)\\n {\\n \\n // verify the required parameter 'id' is set\\n if ($id === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $id when calling deleteCharterStatusTypeById');\\n }\\n \\n // parse inputs\\n $resourcePath = \\\"/charterStatusTypes/{id}\\\";\\n $httpBody = '';\\n $queryParams = array();\\n $headerParams = array();\\n $formParams = array();\\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json'));\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());\\n \\n \\n // header params\\n \\n if ($if_match !== null) {\\n $headerParams['If-Match'] = $this->apiClient->getSerializer()->toHeaderValue($if_match);\\n }\\n // path params\\n \\n if ($id !== null) {\\n $resourcePath = str_replace(\\n \\\"{\\\" . \\\"id\\\" . \\\"}\\\",\\n $this->apiClient->getSerializer()->toPathValue($id),\\n $resourcePath\\n );\\n }\\n // default format to json\\n $resourcePath = str_replace(\\\"{format}\\\", \\\"json\\\", $resourcePath);\\n\\n \\n \\n \\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n \\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath, 'DELETE',\\n $queryParams, $httpBody,\\n $headerParams\\n );\\n \\n return array(null, $statusCode, $httpHeader);\\n \\n } catch (ApiException $e) {\\n switch ($e->getCode()) { \\n case 500:\\n $data = \\\\Swagger\\\\Client\\\\ObjectSerializer::deserialize($e->getResponseBody(), '\\\\Swagger\\\\Client\\\\Model\\\\WebServiceError', $e->getResponseHeaders());\\n $e->setResponseObject($data);\\n break;\\n }\\n \\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a99a70a898f240f8d0856572d1318000\",\n \"score\": \"0.49986213\",\n \"text\": \"public function typesRemove()\\n {\\n $session = FR_Session::singleton();\\n $id_type = null;\\n\\n // Support POST & GET\\n if(filter_input(INPUT_POST, 'type_id') != ''){\\n $id_type = filter_input(INPUT_POST, 'type_id');\\n }\\n else{\\n $id_type = filter_input(INPUT_GET, 'type_id');\\n }\\n\\n if($id_type != null){\\n require_once 'models/TypesModel.php';\\n $model = new TypesModel();\\n\\n $status = 9; // 9 removed status\\n\\n // remove\\n $result = $model->updateStatusType($id_type, $session->id_tenant, $status);\\n\\n if($result != null){\\n $error = $result->errorInfo();\\n $numr = $result->rowCount();\\n\\n if($error[0] == 00000 && $numr > 0){\\n header(\\\"Location: \\\".$this->root.\\\"?controller=types&action=typesDt&error_flag=1'\\\");\\n }\\n else{\\n header(\\\"Location: \\\".$this->root.\\\"?controller=types&action=typesDt&error_flag=10&message='No se lograron aplicar cambios: \\\".$error[2].\\\"'\\\");\\n }\\n }\\n else{\\n header(\\\"Location: \\\".$this->root.\\\"?controller=types&action=typesDt&error_flag=10&message='Error: no se ha podido eliminar!\\\");\\n }\\n }\\n else{\\n header(\\\"Location: \\\".$this->root.\\\"?controller=types&action=typesDt&error_flag=10&message='Error: esta materia ya no existe!\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09af0bfb980cf45472af8c61ba6ca7f7\",\n \"score\": \"0.49855638\",\n \"text\": \"public function destroy(Type $type)\\n {\\n // remove TYPE\\n $type->delete();\\n return response(Type::all()->jsonSerialize(), Response::HTTP_OK);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"757d6ad9ffd8bf0b6dfd9251101636e5\",\n \"score\": \"0.4943237\",\n \"text\": \"public function delEntityWithHttpInfo()\\n {\\n // parse inputs\\n $resourcePath = \\\"/{uuid}\\\";\\n $httpBody = '';\\n $queryParams = [];\\n $headerParams = [];\\n $formParams = [];\\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\\n\\n // default format to json\\n $resourcePath = str_replace(\\\"{format}\\\", \\\"json\\\", $resourcePath);\\n\\n \\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'DELETE',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n null,\\n '/{uuid}'\\n );\\n\\n return [null, $statusCode, $httpHeader];\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce1abab548a2ccbc0f8f6df7bbe26292\",\n \"score\": \"0.49417755\",\n \"text\": \"public function setPackageTypeWithHttpInfo($body = null)\\n {\\n // parse inputs\\n $resourcePath = \\\"/package-type/set\\\";\\n $httpBody = '';\\n $queryParams = [];\\n $headerParams = [];\\n $formParams = [];\\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\\n if (strlen($apiKey) !== 0) {\\n $headerParams['ApiKey'] = $apiKey;\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'POST',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n '\\\\BumbalClient\\\\Model\\\\ApiResponse',\\n '/package-type/set'\\n );\\n\\n return [$this->apiClient->getSerializer()->deserialize($response, '\\\\BumbalClient\\\\Model\\\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 200:\\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\\\BumbalClient\\\\Model\\\\ApiResponse', $e->getResponseHeaders());\\n $e->setResponseObject($data);\\n break;\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3555b05ed731f5342f51c74c80131dbe\",\n \"score\": \"0.4938556\",\n \"text\": \"public function deleteExamType(Request $request)\\n {\\n //Validate exam type id\\n $exam_type_id_validator = Validator::make($request->all(), [\\n 'exam_type_id' => ['required', 'integer', 'exists:App\\\\Models\\\\Exam\\\\Types,id'],\\n ]);\\n\\n //Check validator fails\\n if($exam_type_id_validator->fails()):\\n return response()->json(['status'=>'error', 'errors'=>$exam_type_id_validator->errors()]);\\n else:\\n if(Types::destroy($request->exam_type_id)):\\n return response()->json(['status'=>'success']);\\n endif;\\n endif;\\n return response()->json(['status'=>'error', 'data'=>$request->all()]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70e997e3761cd5306c421217a3683f46\",\n \"score\": \"0.4935121\",\n \"text\": \"public function delete($name, $type) {\\n $this->redisClient->del([$this->generateKey($name, $type)]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d75661158b60d8bf8adc33699718f79\",\n \"score\": \"0.492966\",\n \"text\": \"public function createPackageTypeWithHttpInfo($body = null)\\n {\\n // parse inputs\\n $resourcePath = \\\"/package-type\\\";\\n $httpBody = '';\\n $queryParams = [];\\n $headerParams = [];\\n $formParams = [];\\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\\n if (strlen($apiKey) !== 0) {\\n $headerParams['ApiKey'] = $apiKey;\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'POST',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n '\\\\BumbalClient\\\\Model\\\\ApiResponse',\\n '/package-type'\\n );\\n\\n return [$this->apiClient->getSerializer()->deserialize($response, '\\\\BumbalClient\\\\Model\\\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 200:\\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\\\BumbalClient\\\\Model\\\\ApiResponse', $e->getResponseHeaders());\\n $e->setResponseObject($data);\\n break;\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8d8fc0c21645d627578370170912d0e\",\n \"score\": \"0.49048853\",\n \"text\": \"public function billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteWithHttpInfo($accept, $document_type_id, $jiwa_stateful = null)\\n {\\n $returnType = '\\\\Jiwa\\\\Model\\\\Object';\\n $request = $this->billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteRequest($accept, $document_type_id, $jiwa_stateful);\\n\\n try {\\n $options = $this->createHttpClientOption();\\n try {\\n $response = $this->client->send($request, $options);\\n } catch (RequestException $e) {\\n throw new ApiException(\\n \\\"[{$e->getCode()}] {$e->getMessage()}\\\",\\n $e->getCode(),\\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\\n );\\n }\\n\\n $statusCode = $response->getStatusCode();\\n\\n if ($statusCode < 200 || $statusCode > 299) {\\n throw new ApiException(\\n sprintf(\\n '[%d] Error connecting to the API (%s)',\\n $statusCode,\\n $request->getUri()\\n ),\\n $statusCode,\\n $response->getHeaders(),\\n $response->getBody()\\n );\\n }\\n\\n $responseBody = $response->getBody();\\n if ($returnType === '\\\\SplFileObject') {\\n $content = $responseBody; //stream goes to serializer\\n } else {\\n $content = $responseBody->getContents();\\n if ($returnType !== 'string') {\\n $content = json_decode($content);\\n }\\n }\\n\\n return [\\n ObjectSerializer::deserialize($content, $returnType, []),\\n $response->getStatusCode(),\\n $response->getHeaders()\\n ];\\n\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 200:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n case 401:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n case 403:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n case 204:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n case 404:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n }\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cf8d898dafdf90869b24dee7ae7d57fb\",\n \"score\": \"0.48920533\",\n \"text\": \"public function teamBuilderConfigsIdProductGroupsNkTypesDeleteWithHttpInfo($id, $nk)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsNkTypesDelete');\\n }\\n // verify the required parameter 'nk' is set\\n if ($nk === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $nk when calling teamBuilderConfigsIdProductGroupsNkTypesDelete');\\n }\\n // parse inputs\\n $resourcePath = \\\"/TeamBuilderConfigs/{id}/productGroups/{nk}/types\\\";\\n $httpBody = '';\\n $queryParams = array();\\n $headerParams = array();\\n $formParams = array();\\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n \\\"{\\\" . \\\"id\\\" . \\\"}\\\",\\n $this->apiClient->getSerializer()->toPathValue($id),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($nk !== null) {\\n $resourcePath = str_replace(\\n \\\"{\\\" . \\\"nk\\\" . \\\"}\\\",\\n $this->apiClient->getSerializer()->toPathValue($nk),\\n $resourcePath\\n );\\n }\\n // default format to json\\n $resourcePath = str_replace(\\\"{format}\\\", \\\"json\\\", $resourcePath);\\n\\n \\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\\n if (strlen($apiKey) !== 0) {\\n $queryParams['access_token'] = $apiKey;\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'DELETE',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n null,\\n '/TeamBuilderConfigs/{id}/productGroups/{nk}/types'\\n );\\n\\n return array(null, $statusCode, $httpHeader);\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc280bc3a6484e124d2befeadf3af996\",\n \"score\": \"0.48444647\",\n \"text\": \"function deleteType($typeId) {\\n\\t\\tthrow new CmisNotImplementedException(\\\"deleteType\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4fe06f87a503169106664c5efc64c39\",\n \"score\": \"0.48351854\",\n \"text\": \"public function deleteById(int $idCompanyType): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d9de03b38fd028f30ddc37c8f204722\",\n \"score\": \"0.4823014\",\n \"text\": \"function delete_type($id)\\n {\\n return $this->db->delete('type',array('id'=>$id));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"45c6fba3cea7dc0c45ebb87cc10d148f\",\n \"score\": \"0.4808812\",\n \"text\": \"function entity_type_delete($projectId, $entityTypeId)\\n{\\n $entityTypesClient = new EntityTypesClient();\\n\\n $parent = $entityTypesClient->entityTypeName($projectId,\\n $entityTypeId);\\n $entityTypesClient->deleteEntityType($parent);\\n printf('Entity type deleted: %s' . PHP_EOL, $parent);\\n\\n $entityTypesClient->close();\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68fdb27004606f40480fbaa9f0963f28\",\n \"score\": \"0.48045158\",\n \"text\": \"public function deleteAction() {\\n\\t\\t$id = intval ( $this->getRequest ()->getParam ( 'id' ) );\\n\\t\\t$ProductType = ProductType::getById ( $id );\\n\\t\\tif ($ProductType) {\\n\\t\\t\\t$title = $ProductType->name;\\n\\t\\t\\t$id = $ProductType->id;\\n\\t\\t\\tif ($this->getRequest ()->isPost ()) {\\n\\t\\t\\t\\tif ($ProductType->delete ()) {\\n\\t\\t\\t\\t\\t$this->Member->log ( 'Xóa Loại Danh mục: ' . $title . ' (' . $id . ')', '$ProductType' );\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\tMy_Plugin_Libs::setSplash ( 'Loại Danh mục ' . $title . ' đã được xóa' );\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t// NewsCategories::db2js ();\\n\\t\\t\\t\\t$this->_redirect ( 'admin/producttype' );\\n\\t\\t\\t}\\n\\t\\t\\t$this->view->ProductType = $ProductType;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24f575304aba4770f56d308f618e4420\",\n \"score\": \"0.48042196\",\n \"text\": \"function flowadmin_delete_devicetype()\\r\\n{\\r\\n\\tglobal $user;\\t\\r\\n\\t$deviceTypeId = func_get_arg(0);\\r\\n\\t\\r\\n\\tflowadmin_access();\\r\\n\\t\\r\\n\\ttry {\\r\\n\\t\\t\\t$oauthInfo = flowautho_get_oauth_credentials($user->mail);\\r\\n\\t\\t\\t$deviceTypesServices = new FDWDeviceTypeServicesImpl($oauthInfo, $user);\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\tif (isset($deviceTypeId)) \\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tif ($deviceTypesServices->deleteDeviceTypeByID($deviceTypeId)) \\r\\n\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t$msg = t('Your device type was successfully deleted.');\\r\\n\\t\\t\\t\\t\\tflowautho_set_message('c-ate-delete-devicetype-success', $msg, 'status', true);\\r\\n\\t\\t\\t\\t\\tdrupal_goto(FLOWADMIN_DASHBOARD.'/'.FLOWADMIN.'/'.FLOWADMIN_DEVICETYPES.'/1');\\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$msg = t('Sorry an error occrured when we tried to delete your device type.');\\r\\n\\t\\t\\t\\t\\tflowautho_set_message('c-ate-delete-devicetype-error', $msg, 'error', true);\\r\\n\\t\\t\\t\\t\\tdrupal_goto(FLOWADMIN_DASHBOARD.'/'.FLOWADMIN.'/'.FLOWADMIN_DEVICETYPES.'/1');\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t} catch (FDWUnknownUserException $e) {\\r\\n\\t\\twatchdog('error', 'FDWDeviceTypeServicesImpl error:: '. print_r($e->getMessage(),true));\\r\\n\\t}\\t\\r\\n\\t\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19558b71dd08049ca1cd0f4b78861e84\",\n \"score\": \"0.47947705\",\n \"text\": \"public function teamBuilderConfigsIdProductTypesFkDeleteWithHttpInfo($id, $fk)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductTypesFkDelete');\\n }\\n // verify the required parameter 'fk' is set\\n if ($fk === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductTypesFkDelete');\\n }\\n // parse inputs\\n $resourcePath = \\\"/TeamBuilderConfigs/{id}/productTypes/{fk}\\\";\\n $httpBody = '';\\n $queryParams = array();\\n $headerParams = array();\\n $formParams = array();\\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n \\\"{\\\" . \\\"id\\\" . \\\"}\\\",\\n $this->apiClient->getSerializer()->toPathValue($id),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($fk !== null) {\\n $resourcePath = str_replace(\\n \\\"{\\\" . \\\"fk\\\" . \\\"}\\\",\\n $this->apiClient->getSerializer()->toPathValue($fk),\\n $resourcePath\\n );\\n }\\n // default format to json\\n $resourcePath = str_replace(\\\"{format}\\\", \\\"json\\\", $resourcePath);\\n\\n \\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\\n if (strlen($apiKey) !== 0) {\\n $queryParams['access_token'] = $apiKey;\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'DELETE',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n null,\\n '/TeamBuilderConfigs/{id}/productTypes/{fk}'\\n );\\n\\n return array(null, $statusCode, $httpHeader);\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c35cb86d8cc0fa7c5984cb3ae303504\",\n \"score\": \"0.4759362\",\n \"text\": \"public function billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\\n {\\n $returnType = '\\\\Jiwa\\\\Model\\\\Object';\\n $request = $this->billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\\n\\n try {\\n $options = $this->createHttpClientOption();\\n try {\\n $response = $this->client->send($request, $options);\\n } catch (RequestException $e) {\\n throw new ApiException(\\n \\\"[{$e->getCode()}] {$e->getMessage()}\\\",\\n $e->getCode(),\\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\\n );\\n }\\n\\n $statusCode = $response->getStatusCode();\\n\\n if ($statusCode < 200 || $statusCode > 299) {\\n throw new ApiException(\\n sprintf(\\n '[%d] Error connecting to the API (%s)',\\n $statusCode,\\n $request->getUri()\\n ),\\n $statusCode,\\n $response->getHeaders(),\\n $response->getBody()\\n );\\n }\\n\\n $responseBody = $response->getBody();\\n if ($returnType === '\\\\SplFileObject') {\\n $content = $responseBody; //stream goes to serializer\\n } else {\\n $content = $responseBody->getContents();\\n if ($returnType !== 'string') {\\n $content = json_decode($content);\\n }\\n }\\n\\n return [\\n ObjectSerializer::deserialize($content, $returnType, []),\\n $response->getStatusCode(),\\n $response->getHeaders()\\n ];\\n\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 200:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n case 401:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n case 404:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n case 403:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n case 204:\\n $data = ObjectSerializer::deserialize(\\n $e->getResponseBody(),\\n '\\\\Jiwa\\\\Model\\\\Object',\\n $e->getResponseHeaders()\\n );\\n $e->setResponseObject($data);\\n break;\\n }\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8937d7eb91d617bc42224453b91af717\",\n \"score\": \"0.4730612\",\n \"text\": \"public function billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteAsyncWithHttpInfo($accept, $document_type_id, $jiwa_stateful = null)\\n {\\n $returnType = '\\\\Jiwa\\\\Model\\\\Object';\\n $request = $this->billDocumentTypeDELETERequestDocumentTypesDocumentTypeIDDeleteRequest($accept, $document_type_id, $jiwa_stateful);\\n\\n return $this->client\\n ->sendAsync($request, $this->createHttpClientOption())\\n ->then(\\n function ($response) use ($returnType) {\\n $responseBody = $response->getBody();\\n if ($returnType === '\\\\SplFileObject') {\\n $content = $responseBody; //stream goes to serializer\\n } else {\\n $content = $responseBody->getContents();\\n if ($returnType !== 'string') {\\n $content = json_decode($content);\\n }\\n }\\n\\n return [\\n ObjectSerializer::deserialize($content, $returnType, []),\\n $response->getStatusCode(),\\n $response->getHeaders()\\n ];\\n },\\n function ($exception) {\\n $response = $exception->getResponse();\\n $statusCode = $response->getStatusCode();\\n throw new ApiException(\\n sprintf(\\n '[%d] Error connecting to the API (%s)',\\n $statusCode,\\n $exception->getRequest()->getUri()\\n ),\\n $statusCode,\\n $response->getHeaders(),\\n $response->getBody()\\n );\\n }\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80b3e9c6de5b40a923b5ba1b38f4b464\",\n \"score\": \"0.47259614\",\n \"text\": \"public function destroy($id)\\n {\\n $model = Type::find($id);\\n //删除该类型对应的属性, todo 删除了该类型下的所有商品属性,则库存也需要删除\\n Attribute::where('type_id', $id)->delete();\\n if (!$model)\\n return response('删除失败',403);\\n $res = $model->delete(); //成功返回1?失败返回0?\\n return (string) $res;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afd9bc7b98fa71f9598d623f6bcfe635\",\n \"score\": \"0.47247607\",\n \"text\": \"public function destory(Request $request){\\n $model = Type::find($request->input('id'));\\n if(!empty($model)){\\n if($model->delete()){\\n return response()->json(['code' => 200, 'msg' => '删除成功']);\\n }\\n return response()->json(['code' => 400, 'msg' => '删除失败']);\\n }\\n return response()->json(['code' => 204, 'msg' => '信息不存在']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e7231aefb0442833a4b69a3c91de619\",\n \"score\": \"0.47111487\",\n \"text\": \"public function deleteItem() {\\n $this->request->onlyAllow('post');\\n $this->response->type('json');\\n\\n $status = false;\\n $message = \\\"\\\";\\n\\n if (isset($this->request->data)) {\\n $id = $this->request->data['id'];\\n $type = $this->request->data['type'];\\n $status = $this->Library->deleteItem($type, $id);\\n }\\n\\n if ($status) {\\n $message = \\\"Deletion successful\\\";\\n } else {\\n $message = \\\"Deletion unsuccessful\\\";\\n }\\n\\n $this->set(compact('status', 'message', 'data'));\\n $this->set('_serialize', array('data', 'status', 'message'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25bcba90991fafb20a9da8d108721f1e\",\n \"score\": \"0.46833473\",\n \"text\": \"public function actionDelete($pro_type){\\n\\t\\t$searchdata = Request::all();\\n\\t\\t$recorddata = array();\\n\\t\\t$recorddata['tr_action'] = 3; //異動動作:刪除\\n\\t\\ttry {\\n\\t\\t\\tif($pro_type == 1){ //專案任務\\n\\t\\t\\t\\t$recorddata['tr_goal'] = 1; //異動目標:專案任務\\n\\t\\t\\t\\treturn $this->deleteProject($searchdata,$recorddata);\\n\\t\\t\\t}\\n\\t\\t\\tif($pro_type == 2){ //專案子任務\\n\\t\\t\\t\\t$recorddata['tr_goal'] = 2; //異動目標:專案子任務\\n\\t\\t\\t\\treturn $this->deleteSubProject($searchdata,$recorddata);\\n\\t\\t\\t}\\n\\t\\t\\tif($pro_type == 3){ //專案訊息\\n\\t\\t\\t\\t$recorddata['tr_goal'] = 3; //異動目標:專案訊息\\n\\t\\t\\t\\treturn $this->deleteProjectInformation($searchdata,$recorddata);\\n\\t\\t\\t}\\n\\t\\t\\tif($pro_type == 4){ //專案紀錄\\n\\t\\t\\t\\t$recorddata['tr_goal'] = 4; //異動目標:專案紀錄\\n\\t\\t\\t\\treturn $this->deleteProjectRecord($searchdata,$recorddata);\\n\\t\\t\\t}\\n\\t\\t\\tif($pro_type == 5){ //標籤\\n\\t\\t\\t\\t$recorddata['tr_goal'] = 5; //異動目標:標籤\\n\\t\\t\\t\\treturn $this->deleteTag($searchdata,$recorddata);\\n\\t\\t\\t}\\n\\t\\t} catch (\\\\Exception $e) {\\n\\t\\t\\tCommonTools::writeErrorLogByException($e);\\n\\t\\t\\treturn CommonTools::returnData(false,'#030401',null,null);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0728fcc1c51554a5d03098f09578c880\",\n \"score\": \"0.46737584\",\n \"text\": \"public function deleteProgramUrlTypeUrlWithHttpInfo($id_program, $id_url_type, $id_url)\\n {\\n $returnType = '';\\n $request = $this->deleteProgramUrlTypeUrlRequest($id_program, $id_url_type, $id_url);\\n\\n try {\\n $options = $this->createHttpClientOption();\\n try {\\n $response = $this->client->send($request, $options);\\n } catch (RequestException $e) {\\n throw new ApiException(\\n \\\"[{$e->getCode()}] {$e->getMessage()}\\\",\\n $e->getCode(),\\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\\n );\\n }\\n\\n $statusCode = $response->getStatusCode();\\n\\n if ($statusCode < 200 || $statusCode > 299) {\\n throw new ApiException(\\n sprintf(\\n '[%d] Error connecting to the API (%s)',\\n $statusCode,\\n $request->getUri()\\n ),\\n $statusCode,\\n $response->getHeaders(),\\n $response->getBody()\\n );\\n }\\n\\n return [null, $statusCode, $response->getHeaders()];\\n\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n }\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"292b5ad9f02cf1bf66e2f560edd9f395\",\n \"score\": \"0.467109\",\n \"text\": \"public function delete(string $type, string $phase, int $year, string $anchor, ?string $hoofdstukMinfinId);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bef8926e62cffe9e00c0321480e41c02\",\n \"score\": \"0.46578243\",\n \"text\": \"public function destroy(DestroyTypeRequest $request)\\n {\\n //get Data\\n $dataRequest = $request->all();\\n $model = new Type();\\n if ($model->where('id', $dataRequest['id'])->update([\\n 'status'=>Type::HIDE\\n ])) {\\n return redirect()->back()->with('success', 'Delete!');\\n } else {\\n return redirect_errors('Have error, cannot delete!');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ebb8509b02fca70171794ea60664c4b2\",\n \"score\": \"0.46537915\",\n \"text\": \"public function delete($tipo_proyecto);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e26f3b737d65b80c7a82c330f1d10209\",\n \"score\": \"0.46536374\",\n \"text\": \"public function destroy(Request $request)\\n {\\n $server = Helper::doctieIsDemoSiteAjax();\\n if (!empty($server)) {\\n $json['type'] = 'error';\\n $json['message'] = $server->getData()->message;\\n return $json;\\n }\\n $json = array();\\n $id = $request['id'];\\n if (!empty($id)) {\\n $this->package::where('id', $id)->delete();\\n $json['type'] = 'success';\\n $json['message'] = trans('lang.package_deleted');\\n return $json;\\n } else {\\n $json['type'] = 'error';\\n $json['message'] = trans('lang.something_wrong');\\n return $json;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a7b9878fd55030361ec871745615ceb\",\n \"score\": \"0.46446118\",\n \"text\": \"public function action_delete_item()\\n {\\n try {\\n $type_stub = $this->request->param('id');\\n $type = $this->_crud_items[$type_stub];\\n $id = $this->request->param('toggle');\\n\\n if (empty($type)) {\\n IbHelpers::set_message('This action cannot be performed on items of type '.$type_stub, 'error popup_box');\\n $this->request->redirect('/admin/'.$this->_plugin);\\n }\\n\\n if (!empty($type['delete_permission']) && !Auth::instance()->has_access($type['delete_permission'])) {\\n IbHelpers::set_message('You need access to the &quot;'.$type['delete_permission'].'&quot; permission to perform this action.', 'error popup_box');\\n $this->request->redirect('/admin/'.$this->_plugin);\\n }\\n\\n $model = ORM::factory($type['model'])->where('id', '=', $id)->find_undeleted();\\n $model->delete_and_save();\\n\\n IbHelpers::set_message(htmlspecialchars($type['name'].' #'.$id.' successfully deleted.'), 'success popup_box');\\n\\n $name_plural = isset($type['name_plural']) ? $type['name_plural'] : $type['name'].'s';\\n $stub_plural = isset($type['stub_plural']) ? $type['stub_plural'] : $type_stub.'s';\\n\\n $this->request->redirect('/admin/'.$this->_plugin.'/'.$stub_plural);\\n }\\n catch (Exception $e) {\\n Log::instance()->add(Log::ERROR, \\\"Error deleting\\\\n\\\".$e->getMessage().\\\"\\\\n\\\".$e->getTraceAsString());\\n IbHelpers::set_message('Unexpected internal error deleting. If this problem continues, please ask an administrator to check the error logs.');\\n $this->request->redirect('/admin');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ee6ee659a4e38a837847a2cd6b1b7f5\",\n \"score\": \"0.46063715\",\n \"text\": \"public function destroy($id)\\n {\\n try {\\n Type::destroy($id);\\n return response(['The type has been deleted'], 204);\\n } catch (Exception $e) {\\n return response(['Problem deleting the type', 500]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b817e1991a9457d56c733afe20c9d54\",\n \"score\": \"0.46028382\",\n \"text\": \"public static function del($type)\\n {\\n $cacheName = class_user_func($type . '::getName');\\n\\n $config = new Config();\\n $c = $config->get();\\n\\n $file = $c['cachedir'] . DIRECTORY_SEPARATOR . $cacheName;\\n\\n if(file_exists($file))\\n {\\n unlink($file);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80dfedbc55bf4e4a18087eae340f3c55\",\n \"score\": \"0.45909375\",\n \"text\": \"public function deleteNatGatewayWithOptions($request, $runtime)\\n {\\n Utils::validateModel($request);\\n $query = [];\\n if (!Utils::isUnset($request->force)) {\\n $query['Force'] = $request->force;\\n }\\n if (!Utils::isUnset($request->natGatewayId)) {\\n $query['NatGatewayId'] = $request->natGatewayId;\\n }\\n if (!Utils::isUnset($request->ownerAccount)) {\\n $query['OwnerAccount'] = $request->ownerAccount;\\n }\\n if (!Utils::isUnset($request->ownerId)) {\\n $query['OwnerId'] = $request->ownerId;\\n }\\n if (!Utils::isUnset($request->regionId)) {\\n $query['RegionId'] = $request->regionId;\\n }\\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\\n }\\n if (!Utils::isUnset($request->resourceOwnerId)) {\\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\\n }\\n $req = new OpenApiRequest([\\n 'query' => OpenApiUtilClient::query($query),\\n ]);\\n $params = new Params([\\n 'action' => 'DeleteNatGateway',\\n 'version' => '2016-04-28',\\n 'protocol' => 'HTTPS',\\n 'pathname' => '/',\\n 'method' => 'POST',\\n 'authType' => 'AK',\\n 'style' => 'RPC',\\n 'reqBodyType' => 'formData',\\n 'bodyType' => 'json',\\n ]);\\n\\n return DeleteNatGatewayResponse::fromMap($this->callApi($params, $req, $runtime));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0514fd5442d1623ace2c2c80dce54f90\",\n \"score\": \"0.45691252\",\n \"text\": \"public function destroy($id_type)\\n {\\n $type_product = TypeProduct::find($id_type);\\n $type_product->status_type = 'ยกเลิก';\\n $type_product->save();\\n return response()->json('Users Deleted Successfully.');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2e1adc9444f318015faabf652871d05e\",\n \"score\": \"0.45670918\",\n \"text\": \"public function deleteAction() {\\n $this->_helper->layout->setLayout('admin-simple');\\n\\n\\t\\t//GET MAPPING ID\\n $this->view->planmap_id = $planmap_id = $this->_getParam('planmap_id');\\n\\n if ($this->getRequest()->isPost()) {\\n $db = Engine_Db_Table::getDefaultAdapter();\\n $db->beginTransaction();\\n try {\\n\\n\\t\\t\\t\\t//GET MAPPING ITEM\\n $sitestore_planmap = Engine_Api::_()->getItem('sitestore_planmap', $planmap_id);\\n\\n\\t\\t\\t\\t//DELETE MAPPING\\n $sitestore_planmap->delete();\\n $db->commit();\\n } catch (Exception $e) {\\n $db->rollBack();\\n throw $e;\\n }\\n $this->_forward('success', 'utility', 'core', array(\\n 'smoothboxClose' => 10,\\n 'parentRefresh' => 10,\\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Mapping deleted successfully !'))\\n ));\\n }\\n $this->renderScript('admin-package/delete.tpl');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1a7e7ebf26f7ec27825171c8bcd7241\",\n \"score\": \"0.45491484\",\n \"text\": \"public function destroy($id)\\n {\\n //\\n $product_type = ProductType::find($id);\\n $data = [\\n 'product_type_id' => $product_type->id\\n ];\\n $product_type->delete();\\n return response()->json($data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"647e8daab937d8784b55b06a0cd38e39\",\n \"score\": \"0.4519827\",\n \"text\": \"public function removeAction(){\\n \\n // Keep reference to the content type, if not sent send them back to content types\\n $contentTypeIdent = $this->getRequest()->getParam('content-type');\\n \\n if (isset($contentTypeIdent) && is_numeric($contentTypeIdent)){\\n $contentType = $this->getFromApi('/contenttypes/'.$contentTypeIdent, 'array');\\n $this->view->contentType = $contentType;\\n }else{\\n $this->_helper->flashMessenger->addMessage('Unkown content type sent cannot add field');\\n $this->view->messages = $this->_helper->flashMessenger->getMessages();\\n $this->_redirect('/contenttypes');\\n return;\\n }\\n \\n // Get the content type buy the ID parsed\\n $id = $this->getRequest()->getParam('id');\\n \\n // If the get param was sent and is in the correct format\\n if (isset($id) && is_numeric($id)){\\n \\n // Make post request to remove content type from the API\\n $removeAction = $this->postToApi('/contenttypefields', 'remove', $id);\\n \\n\\n if ($removeAction == 1){\\n $this->_helper->flashMessenger->addMessage(ucfirst($contentType['name']).' field removed from the system');\\n \\n }else{\\n $this->_helper->flashMessenger->addMessage('Could not find the '.ucfirst($contentType['name']).' field to remove');\\n }\\n \\n $this->view->messages = $this->_helper->flashMessenger->getMessages();\\n $this->_redirect('/contenttypefields/index/id/'.$contentTypeIdent);\\n return;\\n \\n }else{\\n // Redirect back to content type fields\\n $this->_redirect('/contenttypefields/index/id/'.$contentTypeIdent);\\n return;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"819318e851547e6273f0250ef874a74a\",\n \"score\": \"0.45142516\",\n \"text\": \"public function destroy(Request $request, $id)\\n {\\n if ($request->isMethod('delete') && Package::where('id', $id)->exists()) {\\n $site = site();\\n $package = $site->packages()->where('id', $id)->firstOrFail();\\n $stripe_error = '';\\n $package->status = Package::INACTIVE;\\n $stripe_plan = $package->stripe_plan;\\n $package->saveOrFail();\\n\\n //------------------------------\\n // Stripe Plan\\n //------------------------------\\n // Update stripe plan.\\n if (filled($stripe_plan)) {\\n try {\\n \\\\Stripe\\\\Stripe::setApiKey(config('cashier.secret')); // stripe key\\n\\n $stripe_plan = \\\\Stripe\\\\Plan::update(\\n $stripe_plan,\\n [\\n 'active' => false\\n ]\\n );\\n } catch (\\\\Stripe\\\\Exception\\\\InvalidRequestException $e) {\\n $json = json_decode(json_encode($e->getJsonBody()), false);\\n $error = $json->error;\\n $stripe_error = $error->message;\\n }\\n\\n // Handle stripe errors\\n if (filled($stripe_error)) {\\n flash($stripe_error);\\n return back()->withInput();\\n }\\n }\\n\\n if ($package->delete()) {\\n flash('Successfully deleted package.');\\n return redirect()->route('admin.packages.index');\\n }\\n }\\n\\n flash('Invaild action or packages does not exist.');\\n return redirect()->route('admin.packages.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bab31b429412e04fb4f9d86a85d7a51\",\n \"score\": \"0.45132256\",\n \"text\": \"public function billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteAsyncWithHttpInfo($accept, $note_type_id, $jiwa_stateful = null)\\n {\\n $returnType = '\\\\Jiwa\\\\Model\\\\Object';\\n $request = $this->billNoteTypeDELETERequestNoteTypesNoteTypeIDDeleteRequest($accept, $note_type_id, $jiwa_stateful);\\n\\n return $this->client\\n ->sendAsync($request, $this->createHttpClientOption())\\n ->then(\\n function ($response) use ($returnType) {\\n $responseBody = $response->getBody();\\n if ($returnType === '\\\\SplFileObject') {\\n $content = $responseBody; //stream goes to serializer\\n } else {\\n $content = $responseBody->getContents();\\n if ($returnType !== 'string') {\\n $content = json_decode($content);\\n }\\n }\\n\\n return [\\n ObjectSerializer::deserialize($content, $returnType, []),\\n $response->getStatusCode(),\\n $response->getHeaders()\\n ];\\n },\\n function ($exception) {\\n $response = $exception->getResponse();\\n $statusCode = $response->getStatusCode();\\n throw new ApiException(\\n sprintf(\\n '[%d] Error connecting to the API (%s)',\\n $statusCode,\\n $exception->getRequest()->getUri()\\n ),\\n $statusCode,\\n $response->getHeaders(),\\n $response->getBody()\\n );\\n }\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"baecc4f8cad1d018fe10779caeb5bf8e\",\n \"score\": \"0.45119327\",\n \"text\": \"public function delete(int $id) {\\n\\n return redirect(url('packageTypes'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c2cb77d0147e5d9f5bccdd9941fb93ff\",\n \"score\": \"0.4510962\",\n \"text\": \"public function expenseTypesIdDeleteWithHttpInfo($id)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $id when calling expenseTypesIdDelete');\\n }\\n // parse inputs\\n $resourcePath = \\\"/expense/types/{id}\\\";\\n $httpBody = '';\\n $queryParams = [];\\n $headerParams = [];\\n $formParams = [];\\n $_header_accept = $this->apiClient->selectHeaderAccept([]);\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n \\\"{\\\" . \\\"id\\\" . \\\"}\\\",\\n $this->apiClient->getSerializer()->toPathValue($id),\\n $resourcePath\\n );\\n }\\n // default format to json\\n $resourcePath = str_replace(\\\"{format}\\\", \\\"json\\\", $resourcePath);\\n\\n \\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // this endpoint requires HTTP basic authentication\\n if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {\\n $headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . \\\":\\\" . $this->apiClient->getConfig()->getPassword());\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'DELETE',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n null,\\n '/expense/types/{id}'\\n );\\n\\n return [null, $statusCode, $httpHeader];\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 401:\\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\\\Spinen\\\\ConnectWise\\\\Clients\\\\Expense\\\\Model\\\\Error', $e->getResponseHeaders());\\n $e->setResponseObject($data);\\n break;\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c61a1cacd3d6330feb74c4680e1fcaec\",\n \"score\": \"0.45093593\",\n \"text\": \"public function delete($id, Request $request)\\n {\\n\\n try {\\n $this->polizaTipoRepository->delete($request->all(), $id);\\n\\n return response()->json(['data' =>\\n [\\n 'id' => $id\\n ]\\n ], 200);\\n } catch (\\\\Exception $e){\\n return response()->json([\\n 'data' => $e->getTraceAsString()], 500);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4eff61d9447d77919b5966f55d0615b\",\n \"score\": \"0.45072314\",\n \"text\": \"public function deleteUserType(Request $request){\\n\\t\\n\\t\\t$userTye = UserType::find($request->id); \\n\\t\\t$deleteUserType = $userTye->delete();\\n\\t\\t\\n \\t\\tif($deleteUserType){\\n\\t\\t\\tSession::flash('message', \\\"User Type deleted successfully!\\\"); \\n\\t\\t\\tSession::flash('alert-class', 'alert-success');\\n\\t\\t\\treturn back();\\n\\t \\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a234516b34c106ddc23d3928e4d779b\",\n \"score\": \"0.45005444\",\n \"text\": \"function delete_post_type() {\\r\\n\\t\\tcheck_ajax_referer('custom_post_types_suffusion', 'custom_post_types_wpnonce');\\r\\n\\t\\t$post_type_index = $_POST['post_type_index'];\\r\\n\\t\\t$ret = \\\"\\\";\\r\\n\\t\\tif (isset($post_type_index)) {\\r\\n\\t\\t\\t$suffusion_post_types = get_option('suffusion_post_types');\\r\\n\\t\\t\\tif (is_array($suffusion_post_types)) {\\r\\n\\t\\t\\t\\tunset($suffusion_post_types[$post_type_index]);\\r\\n\\t\\t\\t\\tupdate_option('suffusion_post_types', $suffusion_post_types);\\r\\n\\t\\t\\t\\t$ret = \\\"Post type deleted.\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\telse {\\r\\n\\t\\t\\t\\t$ret = \\\"Failed to delete post type. Post types are not stored as an array in the database.\\\";\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\treturn $ret;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9bb8c4276b9470a2d815d68d5a11fe52\",\n \"score\": \"0.44934562\",\n \"text\": \"public function deleteTranscoderStreamNameGroupConfigWithHttpInfo($server_name, $vhost_name, $template_name, $group_name)\\n {\\n $returnType = '';\\n $request = $this->deleteTranscoderStreamNameGroupConfigRequest($server_name, $vhost_name, $template_name, $group_name);\\n\\n try {\\n $options = $this->createHttpClientOption();\\n try {\\n $response = $this->client->send($request, $options);\\n } catch (RequestException $e) {\\n throw new ApiException(\\n \\\"[{$e->getCode()}] {$e->getMessage()}\\\",\\n $e->getCode(),\\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\\n );\\n }\\n\\n $statusCode = $response->getStatusCode();\\n\\n if ($statusCode < 200 || $statusCode > 299) {\\n throw new ApiException(\\n sprintf(\\n '[%d] Error connecting to the API (%s)',\\n $statusCode,\\n $request->getUri()\\n ),\\n $statusCode,\\n $response->getHeaders(),\\n $response->getBody()\\n );\\n }\\n\\n return [null, $statusCode, $response->getHeaders()];\\n\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n }\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b59f75796c5f94690dd08b6bac8b51ba\",\n \"score\": \"0.44904438\",\n \"text\": \"function delete($url = \\\"\\\",$options = array()){\\n\\t\\tif(is_array($url)){\\n\\t\\t\\t$options = $url;\\n\\t\\t\\t$url = \\\"\\\";\\n\\t\\t}\\n\\t\\t$options[\\\"request_method\\\"] = \\\"DELETE\\\";\\n\\t\\treturn $this->fetchContent($url,$options);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e3171c766dab3072226974740834051\",\n \"score\": \"0.4489704\",\n \"text\": \"public function deleteIdentity(string $type, string $name);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a06a723eb11348e56e1d43f2ad87bc0f\",\n \"score\": \"0.4478995\",\n \"text\": \"public function deleteVpnGatewayWithOptions($request, $runtime)\\n {\\n Utils::validateModel($request);\\n $query = [];\\n if (!Utils::isUnset($request->clientToken)) {\\n $query['ClientToken'] = $request->clientToken;\\n }\\n if (!Utils::isUnset($request->ownerAccount)) {\\n $query['OwnerAccount'] = $request->ownerAccount;\\n }\\n if (!Utils::isUnset($request->ownerId)) {\\n $query['OwnerId'] = $request->ownerId;\\n }\\n if (!Utils::isUnset($request->regionId)) {\\n $query['RegionId'] = $request->regionId;\\n }\\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\\n }\\n if (!Utils::isUnset($request->resourceOwnerId)) {\\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\\n }\\n if (!Utils::isUnset($request->vpnGatewayId)) {\\n $query['VpnGatewayId'] = $request->vpnGatewayId;\\n }\\n $req = new OpenApiRequest([\\n 'query' => OpenApiUtilClient::query($query),\\n ]);\\n $params = new Params([\\n 'action' => 'DeleteVpnGateway',\\n 'version' => '2016-04-28',\\n 'protocol' => 'HTTPS',\\n 'pathname' => '/',\\n 'method' => 'POST',\\n 'authType' => 'AK',\\n 'style' => 'RPC',\\n 'reqBodyType' => 'formData',\\n 'bodyType' => 'json',\\n ]);\\n\\n return DeleteVpnGatewayResponse::fromMap($this->callApi($params, $req, $runtime));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef1f09296852dc6cf04bfd00627900e8\",\n \"score\": \"0.44787332\",\n \"text\": \"public function updatePackageTypeWithHttpInfo($package_type_id, $body = null)\\n {\\n // verify the required parameter 'package_type_id' is set\\n if ($package_type_id === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $package_type_id when calling updatePackageType');\\n }\\n // parse inputs\\n $resourcePath = \\\"/package-type/{packageTypeId}\\\";\\n $httpBody = '';\\n $queryParams = [];\\n $headerParams = [];\\n $formParams = [];\\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\\n\\n // path params\\n if ($package_type_id !== null) {\\n $resourcePath = str_replace(\\n \\\"{\\\" . \\\"packageTypeId\\\" . \\\"}\\\",\\n $this->apiClient->getSerializer()->toPathValue($package_type_id),\\n $resourcePath\\n );\\n }\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\\n if (strlen($apiKey) !== 0) {\\n $headerParams['ApiKey'] = $apiKey;\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'PUT',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n '\\\\BumbalClient\\\\Model\\\\ApiResponse',\\n '/package-type/{packageTypeId}'\\n );\\n\\n return [$this->apiClient->getSerializer()->deserialize($response, '\\\\BumbalClient\\\\Model\\\\ApiResponse', $httpHeader), $statusCode, $httpHeader];\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 200:\\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\\\BumbalClient\\\\Model\\\\ApiResponse', $e->getResponseHeaders());\\n $e->setResponseObject($data);\\n break;\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e64ac44dd956b624cf14e7edb161e1d6\",\n \"score\": \"0.4478231\",\n \"text\": \"function DEL()\\n{\\n\\tif ($this->isError()) return;\\n\\n\\t$id_type_fiche = $this->id_type_fiche;\\n\\n\\t$sql = \\\" DELETE FROM \\\".$GLOBALS['prefix'].\\\"param_type_fiche\\n\\t\\t\\t\\tWHERE id_type_fiche = $id_type_fiche\\\";\\n\\n\\tif (!Sql_exec($sql)) $this->setError(ERROR);\\n\\tif (!$this->isError()) Lib_sqlLog($sql);\\n\\n\\treturn;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8631609cd395e7c37d8f215956b8851\",\n \"score\": \"0.4476143\",\n \"text\": \"public function retrieveListPackageTypeWithHttpInfo($arguments)\\n {\\n // verify the required parameter 'arguments' is set\\n if ($arguments === null) {\\n throw new \\\\InvalidArgumentException('Missing the required parameter $arguments when calling retrieveListPackageType');\\n }\\n // parse inputs\\n $resourcePath = \\\"/package-type\\\";\\n $httpBody = '';\\n $queryParams = [];\\n $headerParams = [];\\n $formParams = [];\\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'application/xml']);\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'application/xml']);\\n\\n // body params\\n $_tempBody = null;\\n if (isset($arguments)) {\\n $_tempBody = $arguments;\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->apiClient->getApiKeyWithPrefix('ApiKey');\\n if (strlen($apiKey) !== 0) {\\n $headerParams['ApiKey'] = $apiKey;\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'PUT',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n '\\\\BumbalClient\\\\Model\\\\PackageTypeListResponse',\\n '/package-type'\\n );\\n\\n return [$this->apiClient->getSerializer()->deserialize($response, '\\\\BumbalClient\\\\Model\\\\PackageTypeListResponse', $httpHeader), $statusCode, $httpHeader];\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 200:\\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\\\BumbalClient\\\\Model\\\\PackageTypeListResponse', $e->getResponseHeaders());\\n $e->setResponseObject($data);\\n break;\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1372e2e4451ed177c11e59fe05fa9c3d\",\n \"score\": \"0.44722387\",\n \"text\": \"public function realizaPeticionDelete($url, $http, $data){\\n\\t\\tRequests::register_autoloader();\\n\\t\\t$request = Requests::delete(\\n\\t\\t\\t$url, \\n\\t\\t\\tarray(\\n\\t\\t\\t\\t'Content-Type' => 'application/json'\\n\\t\\t\\t), \\n\\t\\t\\t$data\\n\\t\\t);\\n\\t\\treturn($request->body); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24d0030ebc420252f7c843ef361d89a1\",\n \"score\": \"0.44665372\",\n \"text\": \"public function delete_contract_type() {\\n\\t\\t\\n\\t\\tif($this->input->post('type')=='delete_record') {\\n\\t\\t\\t/* Define return | here result is used to return user data and error for error message */\\n\\t\\t\\t$Return = array('result'=>'', 'error'=>'');\\n\\t\\t\\t$id = $this->uri->segment(3);\\n\\t\\t\\t$result = $this->Graphene_model->delete_contract_type_record($id);\\n\\t\\t\\tif(isset($id)) {\\n\\t\\t\\t\\t$Return['result'] = 'Contract Type deleted.';\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$Return['error'] = 'Bug. Something went wrong, please try again.';\\n\\t\\t\\t}\\n\\t\\t\\t$this->output($Return);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"552bc29492672a7ffba1a899d30c2927\",\n \"score\": \"0.4464114\",\n \"text\": \"protected function drop_key($type, $name)\\n\\t{\\n\\t\\treturn $this->command($type, compact('name'));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ab20a5882372b1c5f9db037adb2da76\",\n \"score\": \"0.44576827\",\n \"text\": \"public function delete($params) {\\n if (!isset($params['userId'])) throw new osapiException(\\\"Invalid or no userId specified for osapiAppData->delete\\\");\\n if (!isset($params['groupId'])) throw new osapiException(\\\"Invalid or no groupId specified for osapiAppData->delete\\\");\\n if (!isset($params['appId'])) throw new osapiException(\\\"Invalid or no appId specified for osapiAppData->delete\\\");\\n if (isset($params['fields'])) {\\n if (!is_array($params['fields'])) throw new osapiException(\\\"Optional param 'fields' should be an array in osapiAppData->delete\\\");\\n foreach ($params['fields'] as $key) {\\n if (!self::isValidKey($key)) {\\n throw new osapiException(\\\"Invalid key specified in osapiAppData->delete: $key\\\");\\n }\\n }\\n }\\n return osapiRequest::createRequest('appdata.delete', $params);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ff9c63dfb006a5ac7bd9e174f5e1f84\",\n \"score\": \"0.44545767\",\n \"text\": \"public function destroy(Request $request)\\n {\\n $goal_type = GoalType::findOrFail($request->id);\\n $goal_type->delete();\\n return back()->with('success',\\\"Goal Type has been deleted\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dd3b20208142c3e4858e7f2505e2c5fa\",\n \"score\": \"0.44429618\",\n \"text\": \"public function index_delete($nID = NULL)\\n {\\n // Delete shop type\\n return $this->lib_rest_shop_types->deleteShopType($nID);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9d7545cb66f1ac6783128ddd232ef76\",\n \"score\": \"0.44405052\",\n \"text\": \"public function forceDelete(Request $request, $id)\\n {\\n if ($request->isMethod('delete') && Package::withTrashed()->where('id', $id)->exists()) {\\n $site = site();\\n $package = $site->packages()->withTrashed()->where('id', $id)->firstOrFail();\\n $products = $package->products()->cursor();\\n $stripe_id = $package->stripe_plan;\\n\\n // Unassign any products\\n if ($products && $products->count() !== 0) {\\n foreach ($products as $product) {\\n $package->unassignProduct($product);\\n }\\n }\\n\\n //-------------------------//\\n // Stripe Product\\n //-------------------------//\\n if (filled($stripe_id)) {\\n try {\\n \\\\Stripe\\\\Stripe::setApiKey(config('cashier.secret')); // stripe key\\n\\n $stripe_plan = \\\\Stripe\\\\Plan::retrieve($stripe_id);\\n $stripe_plan->delete();\\n } catch (\\\\Stripe\\\\Exception\\\\InvalidRequestException $e) {\\n $json = json_decode(json_encode($e->getJsonBody()), false);\\n $error = $json->error;\\n $stripe_error = $error->message;\\n\\n if (filled($stripe_error)) {\\n flash($stripe_error);\\n return redirect()->route('admin.packages.index');\\n }\\n }\\n }\\n\\n // Delete Images\\n $images = $package->getMedia('images');\\n\\n if ($images && count($images) !== 0) {\\n foreach ($images as $index => $_image) {\\n $_image->delete();\\n }\\n }\\n\\n // Remove from site\\n $site->unassignPackage($package);\\n $package->forceDelete();\\n\\n flash('Successfully deleted package forever.');\\n return redirect()->route('admin.packages.index');\\n }\\n\\n flash('Invaild action or package does not exist.');\\n return redirect()->route('admin.packagess.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8da109ca7ffd8f2291545f5a7efcd457\",\n \"score\": \"0.44401118\",\n \"text\": \"public function delete(string $url, RequestOptionsInterface $requestOptions) : ResponseInterface;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae69cf3c70a9752a8268e8ac03adafcd\",\n \"score\": \"0.44390172\",\n \"text\": \"public function deleteApplicationUsingDeleteWithHttpInfo($application_id)\\n {\\n $returnType = '';\\n $request = $this->deleteApplicationUsingDeleteRequest($application_id);\\n\\n try {\\n $options = $this->createHttpClientOption();\\n try {\\n $response = $this->client->send($request, $options);\\n } catch (RequestException $e) {\\n throw new ApiException(\\n \\\"[{$e->getCode()}] {$e->getMessage()}\\\",\\n $e->getCode(),\\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\\n );\\n }\\n\\n $statusCode = $response->getStatusCode();\\n\\n if ($statusCode < 200 || $statusCode > 299) {\\n throw new ApiException(\\n sprintf(\\n '[%d] Error connecting to the API (%s)',\\n $statusCode,\\n $request->getUri()\\n ),\\n $statusCode,\\n $response->getHeaders(),\\n $response->getBody()\\n );\\n }\\n\\n return [null, $statusCode, $response->getHeaders()];\\n\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n }\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83e679ecdb0211c2815bfa2704cf9a24\",\n \"score\": \"0.44310552\",\n \"text\": \"public function delete($name, $optParams = [])\\n {\\n $params = ['name' => $name];\\n $params = array_merge($params, $optParams);\\n return $this->call('delete', [$params], Operation::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83e679ecdb0211c2815bfa2704cf9a24\",\n \"score\": \"0.44310552\",\n \"text\": \"public function delete($name, $optParams = [])\\n {\\n $params = ['name' => $name];\\n $params = array_merge($params, $optParams);\\n return $this->call('delete', [$params], Operation::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83e679ecdb0211c2815bfa2704cf9a24\",\n \"score\": \"0.44310552\",\n \"text\": \"public function delete($name, $optParams = [])\\n {\\n $params = ['name' => $name];\\n $params = array_merge($params, $optParams);\\n return $this->call('delete', [$params], Operation::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83e679ecdb0211c2815bfa2704cf9a24\",\n \"score\": \"0.44310552\",\n \"text\": \"public function delete($name, $optParams = [])\\n {\\n $params = ['name' => $name];\\n $params = array_merge($params, $optParams);\\n return $this->call('delete', [$params], Operation::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83e679ecdb0211c2815bfa2704cf9a24\",\n \"score\": \"0.44310552\",\n \"text\": \"public function delete($name, $optParams = [])\\n {\\n $params = ['name' => $name];\\n $params = array_merge($params, $optParams);\\n return $this->call('delete', [$params], Operation::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"83e679ecdb0211c2815bfa2704cf9a24\",\n \"score\": \"0.44310552\",\n \"text\": \"public function delete($name, $optParams = [])\\n {\\n $params = ['name' => $name];\\n $params = array_merge($params, $optParams);\\n return $this->call('delete', [$params], Operation::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c75613b8ea56ab76cc8300f78edb5571\",\n \"score\": \"0.44304055\",\n \"text\": \"public function delAttributeWithHttpInfo()\\n {\\n // parse inputs\\n $resourcePath = \\\"/{uuid}/attribute/{key}\\\";\\n $httpBody = '';\\n $queryParams = [];\\n $headerParams = [];\\n $formParams = [];\\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\\n if (!is_null($_header_accept)) {\\n $headerParams['Accept'] = $_header_accept;\\n }\\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\\n\\n // default format to json\\n $resourcePath = str_replace(\\\"{format}\\\", \\\"json\\\", $resourcePath);\\n\\n \\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\\n } elseif (count($formParams) > 0) {\\n $httpBody = $formParams; // for HTTP post (form)\\n }\\n // make the API Call\\n try {\\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\\n $resourcePath,\\n 'DELETE',\\n $queryParams,\\n $httpBody,\\n $headerParams,\\n '\\\\Swagger\\\\Client\\\\Model\\\\InlineResponse2004',\\n '/{uuid}/attribute/{key}'\\n );\\n\\n return [$this->apiClient->getSerializer()->deserialize($response, '\\\\Swagger\\\\Client\\\\Model\\\\InlineResponse2004', $httpHeader), $statusCode, $httpHeader];\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n case 200:\\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\\\Swagger\\\\Client\\\\Model\\\\InlineResponse2004', $e->getResponseHeaders());\\n $e->setResponseObject($data);\\n break;\\n }\\n\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6be470ed6d2505edaee4b857352d783a\",\n \"score\": \"0.44279456\",\n \"text\": \"public function deleteServiceAuthorizationWithHttpInfo($options)\\n {\\n $request = $this->deleteServiceAuthorizationRequest($options);\\n\\n try {\\n $options = $this->createHttpClientOption();\\n try {\\n $response = $this->client->send($request, $options);\\n } catch (RequestException $e) {\\n throw new ApiException(\\n \\\"[{$e->getCode()}] {$e->getMessage()}\\\",\\n (int) $e->getCode(),\\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\\n );\\n } catch (ConnectException $e) {\\n throw new ApiException(\\n \\\"[{$e->getCode()}] {$e->getMessage()}\\\",\\n (int) $e->getCode(),\\n null,\\n null\\n );\\n }\\n\\n if ('DELETE' != 'GET' && 'DELETE' != 'HEAD') {\\n $header = $response->getHeader('Fastly-RateLimit-Remaining');\\n if (count($header) > 0) {\\n $this->config->setRateLimitRemaining($header[0]);\\n }\\n\\n $header = $response->getHeader('Fastly-RateLimit-Reset');\\n if (count($header) > 0) {\\n $this->config->setRateLimitReset($header[0]);\\n }\\n } \\n\\n $statusCode = $response->getStatusCode();\\n\\n if ($statusCode < 200 || $statusCode > 299) {\\n throw new ApiException(\\n sprintf(\\n '[%d] Error connecting to the API (%s)',\\n $statusCode,\\n (string) $request->getUri()\\n ),\\n $statusCode,\\n $response->getHeaders(),\\n (string) $response->getBody()\\n );\\n }\\n\\n return [null, $statusCode, $response->getHeaders()];\\n\\n } catch (ApiException $e) {\\n switch ($e->getCode()) {\\n }\\n throw $e;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79e7205af31755754f60fa3c4b0f3ac6\",\n \"score\": \"0.44171318\",\n \"text\": \"public function destroy(ContactType $contactType)\\n {\\n $contactType->delete();\\n\\n return response()->json([\\n 'message' => 'Contact Type Deleted Successfully!!'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2792e0af60a1eae4b4502397419bece\",\n \"score\": \"0.44136465\",\n \"text\": \"public function deleteType($lpaId)\\n {\\n $helper = new ApplicationResourceService($lpaId, 'type', $this);\\n return $helper->deleteResource();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac609400ae00a90fe6f5cdc281166176\",\n \"score\": \"0.4407292\",\n \"text\": \"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('ZIMZIMBundlesOpinionBundle:TypeButchery')->find($id);\\n\\n if (!$entity) {\\n throw $this->createNotFoundException('Unable to find TypeButchery entity.');\\n }\\n\\n $em->remove($entity);\\n $em->flush();\\n $this->deleteSuccess();\\n }\\n\\n return $this->redirect($this->generateUrl('zimzim_opinion_typebutchery'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b09d5d522d544aa2176b6bb439b2e87\",\n \"score\": \"0.44070202\",\n \"text\": \"function deleteType() {\\r\\n\\r\\n if(!array_key_exists(36,$this->role_privileges)){\\r\\n echo(json_encode(array('status' => 'access')));\\r\\n } else {\\r\\n $id = $this->input->post('id');\\r\\n $data = array('deleted' => 1, 'updated_by' => $this->vendorId, 'updated_time' => date('Y-m-d H:i:s'));\\r\\n $result = $this->k_master_vehicle_type_model->delete($id, $data);\\r\\n if ($result > 0) {\\r\\n echo(json_encode(array('status' => TRUE)));\\r\\n } else {\\r\\n echo(json_encode(array('status' => FALSE)));\\r\\n }\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7dfb787096ccc9fa809fa0b898c97e04\",\n \"score\": \"0.44069\",\n \"text\": \"public function destroy(Request $request)\\n {\\n Type::find($request->id)->delete();\\n return $this->create();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6d4206d8fb3aa058ba91ca10098e679\",\n \"score\": \"0.44059187\",\n \"text\": \"public function destroy(Brand $brand, Type $type)\\n {\\n $type->delete();\\n\\n return response()->json([\\n 'Deleted Type'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa9545de0adce3f1c193caa46f3ebf5c\",\n \"score\": \"0.4402174\",\n \"text\": \"public function delete($package, $name)\\n {\\n $this->table()\\n ->where('package', $package)\\n ->where('name', $name)\\n ->delete();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c89272b0fd4f97bd6df170e631cd3c78\",\n \"score\": \"0.43942875\",\n \"text\": \"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('IbaseStoreBundle:ProductPerPackage')->find($id);\\n\\n if (!$entity) {\\n throw $this->createNotFoundException('Unable to find ProductPerPackage entity.');\\n }\\n\\n $em->remove($entity);\\n $em->flush();\\n }\\n\\n return $this->redirect($this->generateUrl('package_include'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f07e3216abc85b6de8db8c1cbf4a0c1\",\n \"score\": \"0.43935055\",\n \"text\": \"public function deleteRoutineWithOptions($request, $runtime)\\n {\\n Utils::validateModel($request);\\n $body = [];\\n if (!Utils::isUnset($request->name)) {\\n $body['Name'] = $request->name;\\n }\\n $req = new OpenApiRequest([\\n 'body' => OpenApiUtilClient::parseToMap($body),\\n ]);\\n $params = new Params([\\n 'action' => 'DeleteRoutine',\\n 'version' => '2018-01-15',\\n 'protocol' => 'HTTPS',\\n 'pathname' => '/',\\n 'method' => 'POST',\\n 'authType' => 'AK',\\n 'style' => 'RPC',\\n 'reqBodyType' => 'formData',\\n 'bodyType' => 'json',\\n ]);\\n\\n return DeleteRoutineResponse::fromMap($this->callApi($params, $req, $runtime));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"801dd5319c0c34b25fed1f08302ec22b\",\n \"score\": \"0.43933755\",\n \"text\": \"public function deletePackage($request, $response)\\n {\\n $post = $request->getattributes('id');\\n\\n /** Find and update package information */\\n $package = Package::find($post['id']);\\n $package->disabled = 1;\\n $package->save();\\n\\n return $response->withRedirect($this->router->pathFor('agent.packages'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9cce688c06507f63ae7bc464f089209\",\n \"score\": \"0.4385794\",\n \"text\": \"public function deleteType()\\n {\\n $query = \\\"DELETE FROM sms_todo_status WHERE todo_status_id = :id\\\";\\n\\n $sql = $this->db->prepare($query);\\n $sql->bindValue(':id', $this->data->id);\\n\\n if ($sql->execute()) {\\n $data[\\\"status\\\"] = 'success';\\n }\\n return $data;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46812ac3ff997d2215e17c16c98d435e\",\n \"score\": \"0.4384278\",\n \"text\": \"public function destroy(Request $request)\\n {\\n $result = InfoClass::destroyInfoClass($request->input('Id'));\\n\\n if ($result) {\\n return response()->json(['message' => '删除成功', 'code' => 200]);\\n } else {\\n return response()->json(['message' => '删除失败', 'code' => 0]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4cee075db8612133a2eb1814dfc61374\",\n \"score\": \"0.43753105\",\n \"text\": \"public function deleteDnsRecord($type, $name, $content)\\r\\n {\\r\\n $result = $this->listAllDnsRecords();\\r\\n $res = '';\\r\\n $id = '';\\r\\n if ( $result['status'] == 'success' ) {\\r\\n $json = json_decode( $result['data'] );\\r\\n \\r\\n foreach($json->result as $record) {\\r\\n if ( $type == 'CNAME' && $record->type == 'CNAME' ) {\\r\\n if ( $record->type == $type && $record->name == $name . '.' . $content ) {\\r\\n $id = $record->id;\\r\\n break;\\r\\n }\\r\\n } else {\\r\\n if ( $record->type == $type && $record->name == $name && $record->content == $content ) {\\r\\n $id = $record->id;\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n // Than, call delete id\\r\\n if ( $id != '' ) {\\r\\n $method = 'DELETE';\\r\\n $path = 'zones/' . $this->zoneId . '/dns_records/' . $id;\\r\\n return $this->call($method, $path);\\r\\n } else {\\r\\n return array(\\r\\n 'status' => 'error',\\r\\n 'data' => 'DNS Record not found'\\r\\n );\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e17cf6cf2b4c3514e0bdadeb6725383\",\n \"score\": \"0.43741024\",\n \"text\": \"public function deleteVpcWithOptions($request, $runtime)\\n {\\n Utils::validateModel($request);\\n $query = [];\\n if (!Utils::isUnset($request->dryRun)) {\\n $query['DryRun'] = $request->dryRun;\\n }\\n if (!Utils::isUnset($request->forceDelete)) {\\n $query['ForceDelete'] = $request->forceDelete;\\n }\\n if (!Utils::isUnset($request->ownerAccount)) {\\n $query['OwnerAccount'] = $request->ownerAccount;\\n }\\n if (!Utils::isUnset($request->ownerId)) {\\n $query['OwnerId'] = $request->ownerId;\\n }\\n if (!Utils::isUnset($request->regionId)) {\\n $query['RegionId'] = $request->regionId;\\n }\\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\\n }\\n if (!Utils::isUnset($request->resourceOwnerId)) {\\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\\n }\\n if (!Utils::isUnset($request->vpcId)) {\\n $query['VpcId'] = $request->vpcId;\\n }\\n $req = new OpenApiRequest([\\n 'query' => OpenApiUtilClient::query($query),\\n ]);\\n $params = new Params([\\n 'action' => 'DeleteVpc',\\n 'version' => '2016-04-28',\\n 'protocol' => 'HTTPS',\\n 'pathname' => '/',\\n 'method' => 'POST',\\n 'authType' => 'AK',\\n 'style' => 'RPC',\\n 'reqBodyType' => 'formData',\\n 'bodyType' => 'json',\\n ]);\\n\\n return DeleteVpcResponse::fromMap($this->callApi($params, $req, $runtime));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03146793a2e28a7b291b9a7c1221b8f8\",\n \"score\": \"0.43730873\",\n \"text\": \"public function delete_currency_type() {\\n\\t\\t\\n\\t\\tif($this->input->post('type')=='delete_record') {\\n\\t\\t\\t/* Define return | here result is used to return user data and error for error message */\\n\\t\\t\\t$Return = array('result'=>'', 'error'=>'');\\n\\t\\t\\t$id = $this->uri->segment(3);\\n\\t\\t\\t$result = $this->Graphene_model->delete_currency_type_record($id);\\n\\t\\t\\tif(isset($id)) {\\n\\t\\t\\t\\t$Return['result'] = 'Currency Type deleted.';\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$Return['error'] = 'Bug. Something went wrong, please try again.';\\n\\t\\t\\t}\\n\\t\\t\\t$this->output($Return);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c07aef47e3c3ba974b3f2e8ee32b9f6d\",\n \"score\": \"0.43690553\",\n \"text\": \"public function deleteDhcpOptions($request);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8df34ba161af695c5afcd5c306e3de1\",\n \"score\": \"0.4366733\",\n \"text\": \"function delete_user_type($user_type_id)\\n {\\n $parameter_array = array();\\n \\n array_push($parameter_array, array(\\n 'and',\\n 'id',\\n '=',\\n $user_type_id\\n ));\\n \\n parent::delete('i', $parameter_array);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f14c6de131893a7b05c4c7fce4a31d73\",\n \"score\": \"0.43592575\",\n \"text\": \"public function deleteAction(Request $request)\\n {\\n $helpers = $this->get(\\\"app.helpers\\\");\\n $hash = $request->get(\\\"authorization\\\", null);\\n $authCheck = $helpers->authCheck($hash);\\n\\n if ($authCheck== true) {\\n $json = $request->get(\\\"data\\\",null);\\n $params = json_decode($json);\\n\\n $em = $this->getDoctrine()->getManager();\\n\\n $descuento = $em->getRepository('JHWEBContravencionalBundle:CvCdoCfgDescuento')->find(\\n $params->id\\n );\\n\\n $descuento->setActivo(false);\\n\\n $em->flush();\\n\\n $response = array(\\n 'status' => 'success',\\n 'code' => 200,\\n 'message' => \\\"Registro eliminado con exito\\\"\\n );\\n }else{\\n $response = array(\\n 'status' => 'error',\\n 'code' => 400,\\n 'message' => \\\"Autorizacion no valida\\\", \\n );\\n }\\n \\n return $helpers->json($response);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"160f16cdf4698931ab2ce115a8eade44\",\n \"score\": \"0.43585265\",\n \"text\": \"public function deletePackageType($package_type_id)\\n {\\n list($response) = $this->deletePackageTypeWithHttpInfo($package_type_id);\\n return $response;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69257d0e3f2a607df921d32c713c286d\",\n \"score\": \"0.43572706\",\n \"text\": \"public function deletionProtectionWithOptions($request, $runtime)\\n {\\n Utils::validateModel($request);\\n $query = [];\\n if (!Utils::isUnset($request->clientToken)) {\\n $query['ClientToken'] = $request->clientToken;\\n }\\n if (!Utils::isUnset($request->instanceId)) {\\n $query['InstanceId'] = $request->instanceId;\\n }\\n if (!Utils::isUnset($request->ownerId)) {\\n $query['OwnerId'] = $request->ownerId;\\n }\\n if (!Utils::isUnset($request->protectionEnable)) {\\n $query['ProtectionEnable'] = $request->protectionEnable;\\n }\\n if (!Utils::isUnset($request->regionId)) {\\n $query['RegionId'] = $request->regionId;\\n }\\n if (!Utils::isUnset($request->regionId)) {\\n $query['RegionId'] = $request->regionId;\\n }\\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\\n }\\n if (!Utils::isUnset($request->resourceOwnerId)) {\\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\\n }\\n if (!Utils::isUnset($request->type)) {\\n $query['Type'] = $request->type;\\n }\\n $req = new OpenApiRequest([\\n 'query' => OpenApiUtilClient::query($query),\\n ]);\\n $params = new Params([\\n 'action' => 'DeletionProtection',\\n 'version' => '2016-04-28',\\n 'protocol' => 'HTTPS',\\n 'pathname' => '/',\\n 'method' => 'POST',\\n 'authType' => 'AK',\\n 'style' => 'RPC',\\n 'reqBodyType' => 'formData',\\n 'bodyType' => 'json',\\n ]);\\n\\n return DeletionProtectionResponse::fromMap($this->callApi($params, $req, $runtime));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"053735800dbc38a695137c43f520b257\",\n \"score\": \"0.43568933\",\n \"text\": \"public function destroy(Type $type)\\n {\\n if($type==null){\\n $errors = ['No se ha encontrado el id especificado'];\\n return redirect()->back()->withErrors($errors);\\n }\\n\\n $type->delete();\\n\\n session()->flash('message', 'El tipo de café se ha eliminado correctamente.');\\n return redirect( route('admin.types') );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94c02416f30f546340e6727fdcbfbc77\",\n \"score\": \"0.4355165\",\n \"text\": \"public function deleteAction(Request $request)\\n {\\n $helpers = $this->get(\\\"app.helpers\\\");\\n $hash = $request->get(\\\"authorization\\\", null);\\n $authCheck = $helpers->authCheck($hash);\\n\\n if ($authCheck == true) {\\n $em = $this->getDoctrine()->getManager();\\n $json = $request->get(\\\"json\\\", null);\\n $params = json_decode($json);\\n\\n $placa = $em->getRepository('JHWEBVehiculoBundle:VhloCfgPlaca')->find($params);\\n\\n $placa->setEstado(0);\\n $em = $this->getDoctrine()->getManager();\\n $em->persist($placa);\\n $em->flush();\\n $response = array(\\n 'status' => 'success',\\n 'code' => 200,\\n 'message' => \\\"Placa eliminada con éxito\\\",\\n );\\n\\n }else{\\n $response = array(\\n 'status' => 'error',\\n 'code' => 400,\\n 'message' => \\\"Autorización no válida\\\",\\n );\\n }\\n return $helpers->json($response);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3037d6543bace9c8cd9d795cca08637\",\n \"score\": \"0.43489024\",\n \"text\": \"public function actionDeleteErrorType() {\\n $model = AudioQCErrorType::model()->findByPk(Yii::app()->request->getPost('errorTypeId'));\\n\\n // Only in case the record exist\\n if (!$model instanceof AudioQCErrorType)\\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => 'error')));\\n\\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => $model->delete() ? 'ok' : 'error')));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"515ad107a6adec730a1c0d518c0425c9\",\n \"score\": \"0.4343692\",\n \"text\": \"function delete_type()\\r\\n{\\t\\r\\n\\tglobal $con;\\r\\n\\t/////////Delete the record//////////\\r\\n\\t$SQL=\\\"DELETE FROM type WHERE type_id = $_REQUEST[type_id]\\\";\\r\\n\\tmysqli_query($con,$SQL) or die(mysqli_error($con));\\r\\n\\theader(\\\"Location:../type-report.php?msg=Deleted Successfully.\\\");\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f164017d1dc83fbb2ed4a4b7dd7d4bf\",\n \"score\": \"0.43402538\",\n \"text\": \"public function deleteVpnAttachmentWithOptions($request, $runtime)\\n {\\n Utils::validateModel($request);\\n $query = [];\\n if (!Utils::isUnset($request->clientToken)) {\\n $query['ClientToken'] = $request->clientToken;\\n }\\n if (!Utils::isUnset($request->ownerAccount)) {\\n $query['OwnerAccount'] = $request->ownerAccount;\\n }\\n if (!Utils::isUnset($request->regionId)) {\\n $query['RegionId'] = $request->regionId;\\n }\\n if (!Utils::isUnset($request->resourceOwnerAccount)) {\\n $query['ResourceOwnerAccount'] = $request->resourceOwnerAccount;\\n }\\n if (!Utils::isUnset($request->resourceOwnerId)) {\\n $query['ResourceOwnerId'] = $request->resourceOwnerId;\\n }\\n if (!Utils::isUnset($request->vpnConnectionId)) {\\n $query['VpnConnectionId'] = $request->vpnConnectionId;\\n }\\n $req = new OpenApiRequest([\\n 'query' => OpenApiUtilClient::query($query),\\n ]);\\n $params = new Params([\\n 'action' => 'DeleteVpnAttachment',\\n 'version' => '2016-04-28',\\n 'protocol' => 'HTTPS',\\n 'pathname' => '/',\\n 'method' => 'POST',\\n 'authType' => 'AK',\\n 'style' => 'RPC',\\n 'reqBodyType' => 'formData',\\n 'bodyType' => 'json',\\n ]);\\n\\n return DeleteVpnAttachmentResponse::fromMap($this->callApi($params, $req, $runtime));\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":776,"cells":{"query_id":{"kind":"string","value":"853bae4c1f832824ca803ba2f74a382e"},"query":{"kind":"string","value":"Retrieve consents. This function should return a list of consents the user has saved."},"positive_passages":{"kind":"list like","value":[{"docid":"e7ff34bbf12337ebfc68d47822a6bc02","score":"0.5491765","text":"public function getConsents($userId)\n {\n assert('is_string($userId)');\n\n $ret = array();\n\n $st = $this->_execute(\n 'SELECT service_id, attribute, consent_date, usage_date ' .\n 'FROM ' . $this->_table . ' ' .\n 'WHERE hashed_user_id = ?',\n array($userId)\n );\n\n if ($st === false) {\n return array();\n }\n\n while ($row = $st->fetch(PDO::FETCH_NUM)) {\n $ret[] = $row;\n }\n\n return $ret;\n }","title":""}],"string":"[\n {\n \"docid\": \"e7ff34bbf12337ebfc68d47822a6bc02\",\n \"score\": \"0.5491765\",\n \"text\": \"public function getConsents($userId)\\n {\\n assert('is_string($userId)');\\n\\n $ret = array();\\n\\n $st = $this->_execute(\\n 'SELECT service_id, attribute, consent_date, usage_date ' .\\n 'FROM ' . $this->_table . ' ' .\\n 'WHERE hashed_user_id = ?',\\n array($userId)\\n );\\n\\n if ($st === false) {\\n return array();\\n }\\n\\n while ($row = $st->fetch(PDO::FETCH_NUM)) {\\n $ret[] = $row;\\n }\\n\\n return $ret;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"8910b50329640cfde336b0658cf864e0","score":"0.55958676","text":"public function clientCorrespondences()\n {\n return Basecamp::clientCorrespondences($this->id);\n }","title":""},{"docid":"145cc46624d165c8a9cadfd8da1b4de7","score":"0.5520358","text":"public function getAll()\n {\n $clients = $this->getEntityManager()\n ->getRepository('AppBundle:Client')\n ->createQueryBuilder('client')\n ->select('client')\n ->orderBy('client.nom')\n ->getQuery()\n ->getResult();\n return $clients;\n }","title":""},{"docid":"62114ebe557bedcd30eefc305a65c455","score":"0.5460961","text":"public static function obtenerConductoresDisponibles(){\n $conductores = Persona::all();\n $ocupados = DB::table('TBL_Persona as p')\n ->join('TBL_Vehiculo as v', 'v.VHC_Conductor_Id', '=', 'p.id')\n ->select('p.id')\n ->get();\n $disponibles = [];\n foreach ($conductores as $conductor) {\n if(!$ocupados->contains('id', $conductor->id)){\n array_push($disponibles, $conductor);\n }\n }\n return $disponibles;\n }","title":""},{"docid":"0c89fa720e903ab652063deb3b1d2fbe","score":"0.5445692","text":"private function findContribuyente()\r\n\t\t{\r\n\t\t\t$results = [];\r\n\t\t\t$findModel = self::findContribuyenteModel();\r\n\t\t\t$findModel = $findModel->select([\r\n\t\t\t\t\t\t\t\t\t\t'id_contribuyente',\r\n\t\t\t\t\t\t\t\t\t\t'naturaleza',\r\n\t\t\t\t\t\t\t\t\t\t'cedula',\r\n\t\t\t\t\t\t\t\t\t\t'tipo',\r\n\t\t\t\t\t\t\t\t\t\t'id_rif',\r\n\t\t\t\t\t\t\t\t\t\t'razon_social',\r\n\t\t\t\t\t\t\t\t\t\t'domicilio_fiscal',\r\n\t\t\t\t\t\t\t\t\t\t'tlf_ofic',\r\n\t\t\t\t\t\t\t\t\t\t'tlf_ofic_otro',\r\n\t\t\t\t\t\t\t\t\t\t'tlf_celular',\r\n\t\t\t\t\t\t\t\t\t\t'email',\r\n\t\t\t\t\t\t\t\t\t])\r\n\t\t\t\t\t\t\t\t ->where(['inactivo' => 0])\r\n\t\t\t\t\t\t\t\t ->andWhere(['tipo_naturaleza' => 1])\r\n\t\t\t\t\t\t\t\t ->andWhere(['no_declara' => 0]);\r\n\r\n\t\t\tif ( (int)$this->todos_contribuyentes == 1 ) {\r\n\t\t\t\t// La consulta se realiza sobre un lote\r\n\t\t\t\t$results = $findModel->asArray()->all();\r\n\t\t\t} else {\r\n\t\t\t\t// La consulta se realiza sobre uno\r\n\t\t\t\tif ( (int)$this->id_contribuyente > 0 ) {\r\n\t\t\t\t\t$results = $findModel->andWhere('id_contribuyente =:id_contribuyente',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[':id_contribuyente' => (int)$this->id_contribuyente])\r\n\t\t\t\t\t\t\t\t\t\t ->asArray()\r\n\t\t\t\t\t\t\t\t\t\t ->all();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $results;\r\n\t\t}","title":""},{"docid":"ab2c0eb962f3cf03b6b723efd26b4d6d","score":"0.5431517","text":"public static function insurances()\n {\n $user = Sentinel::getUser();\n $member = DB::table('members')->where('email', '=', $user->email)->first();\n $insurances=Member::find($member->id)->insurances()->latest()->get();\n return $insurances;\n\n }","title":""},{"docid":"19333b40ba0315de1d650637a12beddf","score":"0.5346143","text":"function get_all_credito()\n {\n $credito = $this->db->query(\"\n SELECT\n *\n\n FROM\n `credito`\n\n WHERE\n 1 = 1\n\n ORDER BY `credito_id` DESC\n \")->result_array();\n\n return $credito;\n }","title":""},{"docid":"394dd6bc982ecf7c42810b8d647f0d44","score":"0.53388995","text":"static function getAllClients() {\n $model = \\app\\models\\Clients::find()\n ->where(['is_deleted' => 0])\n ->all();\n $list = ArrayHelper::map($model, 'client_id', 'business_name');\n return $list;\n }","title":""},{"docid":"55f84b373672e24594084dbe0c0c1b8c","score":"0.5318582","text":"public function index()\n {\n $clientes = Cliente::with(['pessoa', 'carrinho'])->get();\n return $clientes;\n }","title":""},{"docid":"041cc9bbbeac87a56918b3d37fab3834","score":"0.53031504","text":"static function findAllSuspense(){\n $cnpj = $_SESSION['login']['cnpj_empresa'];\n /*id, nome, login, senha, perfil, ativo, cnpj_empresa*/\n $sql = \"SELECT * FROM tb_cliente WHERE cnpj_empresa = :cnpj_empresa ORDER BY nome\";\n $DB = db_connect();\n $stmt = $DB->prepare($sql);\n $stmt->bindParam(':cnpj_empresa', $cnpj);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_CLASS, 'Cliente');\n }","title":""},{"docid":"c88566e7a209e9087675d21e84d1d79e","score":"0.52982473","text":"public function getContatos()\n {\n return $this->contatos;\n }","title":""},{"docid":"c88566e7a209e9087675d21e84d1d79e","score":"0.52982473","text":"public function getContatos()\n {\n return $this->contatos;\n }","title":""},{"docid":"bfd47c96e1d63447b4d49c23877047a6","score":"0.5276311","text":"public function index()\n {\n //\n\n $clases=Clases::all();\n return $clases;\n }","title":""},{"docid":"1b892b3365ead169345e3033f3a0da8a","score":"0.5274984","text":"public function index()\n {\n $contacts = Brindes::all();\n\n return $contacts;\n }","title":""},{"docid":"c5e22f70af5508c441feda25397bd4ce","score":"0.5270017","text":"public function getContatos()\n {\n $sql = $this->pdo->prepare('select * from tb_contatos');\n $sql->execute();\n\n $lista = array();\n\n if ($sql->execute()) {\n // Query succeeded.\n while ($dados = $sql->fetch(PDO::FETCH_OBJ)) {\n $contato = new Contato();\n\n $contato->setId_usuario($dados->id_usuario);\n $contato->setTelefone($dados->telefone);\n $contato->setTipo($dados->tipo);\n\n $lista[] = $contato;\n }\n } else {\n // Query failed.\n echo $sql->errorCode();\n return null;\n }\n\n return $lista;\n }","title":""},{"docid":"7a98dba23a9b9109bb3192d0e8b57f0c","score":"0.52620876","text":"public function index()\n {\n $dados = Cliente::all();\n return $dados;\n }","title":""},{"docid":"8b6883247147542da980cafa395b17a2","score":"0.5252663","text":"public function getBeacons()\n {\n $result = $this->request('get', '/device');\n\n return collect($result->devices)->map(function ($device) {\n return $this->getBeacon($device);\n });\n }","title":""},{"docid":"9e90e401e83462a79ba889736a38985c","score":"0.52377","text":"function getCapstoneAll() {\n return DB::query(\"SELECT cs.id, u.first_name , u.last_name, u.username, cs.title, cs.description, cs.defense_date, cs.plagerism_score, cs.grade, cs.type\n FROM capstone cs JOIN student s ON cs.student_id = s.id\n JOIN user u ON s.uid = u.uid\n ORDER BY cs.defense_date;\");\n }","title":""},{"docid":"2994434965f7bd77eb9ac514c784d4df","score":"0.5235964","text":"public function getClientes() {\r\n //obtenemos la informacion de la bdd:\r\n $pdo = Database::connect();\r\n $sql = \"select * from cliente order by apellidos\";\r\n $resultado = $pdo->query($sql);\r\n //transformamos los registros en objetos:\r\n $listado = array();\r\n foreach ($resultado as $res) {\r\n $cliente = new Cliente($res['cedula'], $res['apellidos'], $res['nombres'], $res['direccion']);\r\n array_push($listado, $cliente);\r\n }\r\n Database::disconnect();\r\n //retornamos el listado resultante:\r\n return $listado;\r\n }","title":""},{"docid":"377172be0e34e6d2f08a1dc6d9b262e6","score":"0.5224592","text":"public function clients()\n {\n return $this->hasMany(\n Passport::clientModel(),\n 'user_id'\n )->select(\n [\n 'id',\n 'user_id',\n 'name',\n 'secret',\n 'revoked',\n 'created_at',\n 'updated_at',\n ]\n );\n }","title":""},{"docid":"286c3ca22fbb42cb823a597ebe2ba4dd","score":"0.5213156","text":"public function index()\n {\n $incidents = Incident::all();\n\n return response()->json($incidents);\n }","title":""},{"docid":"dbc1eade2c107b0893093e99558d3d9a","score":"0.5208467","text":"public function getConsumers()\n {\n\n#\n### Initialise data connector\n#\n $this->data_connector = LTI_Data_Connector::getDataConnector($this->data_connector);\n\n return $this->data_connector->Tool_Consumer_list();\n\n }","title":""},{"docid":"4bc983dbb8e245e0d6ec7fd3a8d038cf","score":"0.5193406","text":"public function getAllClientActif()\n {\n $clients = $this->getEntityManager()\n ->getRepository('AppBundle:Client')\n ->createQueryBuilder('client')\n ->select('client')\n ->where('client.status = :status')\n ->setParameters([\n 'status' => 1,\n ])\n ->orderBy('client.nom')\n ->getQuery()\n ->getResult();\n return $clients;\n }","title":""},{"docid":"4e79d8b69c2c2d4be036959124886008","score":"0.51912814","text":"public function listClients()\n {\n $clients = $this->clientService->list();\n return ClientResource::collection($clients);\n }","title":""},{"docid":"f6d7fee10c70c07918c96c94cedba343","score":"0.51896083","text":"public function index()\n {\n $contrato = contrato::all();\n return $contrato;\n }","title":""},{"docid":"1ac61cdde5628425a6288810a5b283cd","score":"0.51800644","text":"public static function getAllClients(){\n $sql = \"SELECT * FROM Clients ORDER BY idClient;\";\n return Model::fetchDB($sql);\n }","title":""},{"docid":"410ad5d8d87513e7e422a32a87352d6d","score":"0.5177919","text":"protected function getClients()\n {\n /* @var $collection \\yii\\authclient\\Collection */\n $collection = Yii::$app->get($this->clientCollection);\n\n return $collection->getClients();\n }","title":""},{"docid":"4a31805ac7068957ca9cb0f3c3e39020","score":"0.5142657","text":"public function getBeacons(){\n\t\t$this->db->from('ads');\n \t$this->db->where('status = 1');\n\t\treturn $this->db->get()->result();\n\t}","title":""},{"docid":"53eed9bed6f3d1ea27769d059f58d820","score":"0.5139372","text":"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $consommables = $em->getRepository('AppBundle:Consommable')->findAll();\n\n return $this->render('consommable/index.html.twig', array(\n 'consommables' => $consommables,\n ));\n }","title":""},{"docid":"6d0791d1f9faa6196f34a2062846ca40","score":"0.5134875","text":"public function get_clients(){\n\t\t$this->dal->connect();\n\t\t$result = $this->dal->select(\"SELECT client_name, client_id FROM Client\");\t\n\t\t$this->dal->disconnect();\n\t\treturn $result;\n\t}","title":""},{"docid":"c3125e9e8cc3307e44a6c6e6db57e262","score":"0.5109347","text":"public function index()\n {\n // Get accountBlockAssociations\n $accountBlockAssociations = AccountBlockAssociation::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of accountBlockAssociations as a resource\n return AccountBlockAssociationResource::collection($accountBlockAssociations);\n }","title":""},{"docid":"a4f7dd2903b805ac130aa447c84144ed","score":"0.5099835","text":"public function index()\n {\n $enderecos = Endereco::with(\"cidade\")->get();\n return $enderecos;\n }","title":""},{"docid":"eb6106d714d8ecb7e1a8cec4738a9f48","score":"0.5084105","text":"public function findCapstones()\n {\n $users = $this->createQueryBuilder('u')\n ->andWhere(\"u.progress = '5' or u.progress = '6' or u.progress = '12' or u.progress = '13'\")\n ->addOrderBy('u.lastname', 'ASC')\n ->addOrderBy('u.firstname', 'ASC')\n ->getQuery()\n ->getResult();\n return $users;\n }","title":""},{"docid":"c128f5202bcf725b5aeecada5b66e0f3","score":"0.5081435","text":"public function Listar(){\n $convenios = new Convenio();\n\n // Chama o metodo para selecionar os registros\n return $convenios::Select();\n }","title":""},{"docid":"7d8170093d3f70fa184e93e5ce8afba9","score":"0.50809443","text":"public function ListAction(){\n $em = $this->getDoctrine()->getManager();\n\n //recupere de la liste des internautes au travers du repository\n $internautes = $em->getRepository('BackBundle:Internaute')->findAll();\n\n return $internautes;\n }","title":""},{"docid":"77f4386cd0104203e05a08fb61d93396","score":"0.50808156","text":"public function listcancelation(){ \n $sts=$this->db->prepare(\"SELECT * FROM `cancelation`\");\n $sts->execute();\n\t\t$data=$sts->fetchAll(PDO::FETCH_ASSOC);\n\t\t\n return $data;\n\t\t\n }","title":""},{"docid":"2c537594c6f5d05d5ee5ca8bab80a28e","score":"0.5069361","text":"public function accounts()\n {\n return $this->request('eth_accounts', []);\n }","title":""},{"docid":"2cceea8bf31313b40ca3de6efb000151","score":"0.5068681","text":"public function all()\n {\n return $this->bank_account->all();\n }","title":""},{"docid":"e6fb45dcb0c56a9eaa21dec2f941b9e3","score":"0.506302","text":"public function users(){\n // Replace with company later\n // $clients = Auth::user()->clients;\n return ClientResource::collection(Auth::user()->clients);\n }","title":""},{"docid":"7efae927e123b512ff28710a9254f804","score":"0.50600183","text":"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $cons = $em->getRepository('ConsultationBundle:Cons')->findAll();\n\n return $this->render('cons/index.html.twig', array(\n 'cons' => $cons,\n ));\n }","title":""},{"docid":"22494360a31f3d4530dbfbb41bca9ab5","score":"0.5033673","text":"public function getList()\n {\n return $this\n ->where('cookie_id', request()->cookie_id)\n ->where('status', true)\n ->get();\n }","title":""},{"docid":"4448a6a8029fd583323928ac49916082","score":"0.502563","text":"public function fetch()\n {\n return $this->configurationModel->all();\n }","title":""},{"docid":"21d338aa0dda3a10c04cc32eacc0d194","score":"0.5009652","text":"public static function getAll() {\n\t\t\t//list\n\t\t\t$list = array();\n\t\t\t//get connection\n\t\t\t$connection = MySqlConnection::getConnection();\n\t\t\t//query\n\t\t\t$query = 'call usp_getIncidentsWithStatusActive();';\n\t\t\t//command\n\t\t\t$command = $connection->prepare($query);\n\t\t\t//execute\n\t\t\t$command->execute();\n\t\t\t//bind results\n\t\t\t$command->bind_result($id,\n\t\t\t$disUsername, $disFirstName, $disLastName, $disBirthdate, $disGender, $disPhotograph, $disPhone, $disEmail, $acoDisLastLogin,\n\t\t\t$usUsername, $usFirstName, $usLastName, $usBirthdate, $usGender, $usPhotograph, $usPhoneNumber, $usEmail, $acoUsLastLogin,\n\t\t\t$itId, $itDescription, $description, $dateTime, $latitude, $longitude, $summon, $status);\n\t\t\t//fetch data\n\t\t\twhile($command->fetch()) {\n\t\t\t\t$id = $id;\n\t\t\t\t$contactDataDispacher = new ContactData($disPhone, $disEmail);\n\t\t\t\t$contacDataUser = new ContactData($usPhoneNumber, $usEmail);\n\t\t\t\t$accountDipacher = new Account($disUsername, $acoDisLastLogin);\n\t\t\t\t$accountUser = new Account($usUsername, $acoUsLastLogin);\n\t\t\t\t$dispatcher = new Dispatcher($accountDipacher, $disFirstName, $disLastName, $disBirthdate, $disGender, $disPhotograph, $contactDataDispacher);\n\t\t\t\t$user = new User($accountUser, $usFirstName, $usLastName, $usBirthdate, $usGender, $usPhotograph, $contacDataUser);\n\t\t\t\t$incidentType = new IncidentType($itId, $itDescription);\n\t\t\t\t$description = $description;\n\t\t\t\t$date = $dateTime;\n\t\t\t\t$location = new Location($latitude, $longitude);\n\t\t\t\t$summon = $summon;\n\t\t\t\t$status = $status;\n\t\t\t\tarray_push($list, new Incident($id, $dispatcher, $user, $incidentType, $description, $dateTime, $location, $summon, $status));\n\t\t\t}\n\t\t\t//close command\n\t\t\tmysqli_stmt_close($command);\n\t\t\t//close connection\n\t\t\t$connection->close();\n\t\t\t//return list\n\t\t\treturn $list;\n\t\t}","title":""},{"docid":"49f3dc3df25919b754c11e5fc69a38e5","score":"0.50063217","text":"public function list()\n {\n return $this->careerApplicationService->list();\n }","title":""},{"docid":"2d7e339de6fbf68511d42ad1dc6d5777","score":"0.49957934","text":"public function getAll()\n {\n return $this->candidateModel->orderBy('candidates.id','desc')\n ->get();\n }","title":""},{"docid":"6408520add92fff3cc38f66869a5ae16","score":"0.49956858","text":"public function getInfos()\n {\n if(!$this->ping())\n return false;\n\n $response = $this->client->get('/cds/application',$this->headers);\n \n return $response->json();\n }","title":""},{"docid":"f7bde9b619c165c5eace92e37ddd28cc","score":"0.49920824","text":"public function getAll()\n {\n $data = array();\n $rs = parent::findAll(array(\"name\" => \"Client\"));\n foreach ($rs as $k => $v) {\n foreach ($v as $vi) {\n $data[$k] = new Client($v['CLIENTID'],$v['NOM'],$v['EMAIL'],$v['MOTPASSE']);\n }\n }\n return $data;\n }","title":""},{"docid":"93d8761ba860344fa7bae0b5e7b41b9a","score":"0.49920416","text":"public function getAll()\n {\n return $this->boat_service->getAll();\n }","title":""},{"docid":"57cef047e3c5e3d0f94614210cd518a1","score":"0.49906743","text":"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('WoojinAgencyBundle:Contractor')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }","title":""},{"docid":"d29e2410f7c52c28f001ab4ad79bd789","score":"0.49866912","text":"function disciplineFetch()\n\t{\n\t\treturn [\n\t\t\t'list'=>JbDisciplines::get()\n\t\t];\n\t}","title":""},{"docid":"7497590c8bf60a84b697963584ff60dd","score":"0.49832225","text":"public function readAll()\n {\n $sql = 'SELECT id_recomendaciones, recomendaciones, fecha, estado, nombres_cliente\n FROM recomendaciones INNER JOIN clientes USING(id_cliente) \n ORDER BY id_cliente';\n $params = null;\n return Database::getRows($sql, $params);\n }","title":""},{"docid":"5e133c17462078a7c9f4de4646a80e0a","score":"0.49754944","text":"public function getCurrensies();","title":""},{"docid":"a22c4131d83af98d6f3a80282cd0e303","score":"0.49713996","text":"public function index()\n {\n $lancamentoConta = LancamentoConta::all();\n return $lancamentoConta;\n }","title":""},{"docid":"3ee6a4b1ae0c7641dc0309e62454eeb7","score":"0.49584424","text":"public static function getCarList() {\n $cars = DB::table('cars')->get();\n return $cars;\n }","title":""},{"docid":"c5b05883a4a7c5a8603c91d9047ccc40","score":"0.4954885","text":"public function getComentarios(){\n\t\t$sql = \"SELECT c.Comentario, cli.Usuario FROM comentarios c, cliente cli, producto p where c.IdCliente=cli.IdCliente and p.IdProducto=c.IdProducto and c.Estado=1\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n }","title":""},{"docid":"e0de5477847b79f75ccfee4abc1d832f","score":"0.49547556","text":"public function allClientes()\n {\n $clientes = Cliente::all();\n return response()->json($clientes, 200);\n }","title":""},{"docid":"9ba658ab2d1d3b936cd6879c4c2bfc60","score":"0.49536398","text":"public function findAll()\n {\n try {\n $clients = $this->db->createQueryBuilder()\n ->select('c')\n ->from(ClientPhysique::class,'c')\n ->getQuery()\n ->getArrayResult();\n\n return $clients;\n } catch (\\PDOException $e) {\n exit($e->getMessage());\n }\n }","title":""},{"docid":"f6b1e3c44b41b8042c1958569858927d","score":"0.4943648","text":"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Cliente')->findByEstado(1);\n\n return array(\n 'entities' => $entities\n );\n }","title":""},{"docid":"40aa3f59a10c66b3f0709ca46141df7a","score":"0.49356428","text":"public function clientApprovals()\n {\n return Basecamp::clientApprovals($this->id);\n }","title":""},{"docid":"9b54fa14c680076ebdcb5757039fb0e7","score":"0.4935288","text":"public function getStatistics()\n {\n $ret = array();\n\n // Get total number of consents\n $st = $this->_execute('SELECT COUNT(*) AS no FROM consent', array());\n \n if ($st === false) {\n return array(); \n }\n\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\n $ret['total'] = $row[0];\n }\n\n // Get total number of users that has given consent\n $st = $this->_execute(\n 'SELECT COUNT(*) AS no ' .\n 'FROM (SELECT DISTINCT hashed_user_id FROM consent ) AS foo',\n array()\n );\n \n if ($st === false) {\n return array(); \n }\n\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\n $ret['users'] = $row[0];\n }\n\n // Get total number of services that has been given consent to\n $st = $this->_execute(\n 'SELECT COUNT(*) AS no ' .\n 'FROM (SELECT DISTINCT service_id FROM consent) AS foo',\n array()\n );\n \n if ($st === false) {\n return array();\n }\n\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\n $ret['services'] = $row[0];\n }\n\n return $ret;\n }","title":""},{"docid":"36cd2c00e64fcb7dab80f0509055b5aa","score":"0.49331528","text":"public function contatos()\n {\n return $this->hasMany(ClienteContato::class);\n }","title":""},{"docid":"4d0034d393ca385edbf1c174a1dc2df8","score":"0.4929256","text":"public function getAll()\n {\n return Courier::mapArrayFromJson(\n $this->client->sendRequest(\n new Request('GET', 'couriers')\n )\n );\n }","title":""},{"docid":"ada6781254d8afd578f357e448f42ea6","score":"0.49189928","text":"private function _getClans() {\n \n //Role Super Admin get all Clans\n if ($this->session_data->role == 1) {\n $clan = new Clan();\n return $clan->get();\n }\n \n //Role Admin get all Clans\n if ($this->session_data->role == 2) {\n $clan = new Clan();\n return $clan->get();\n }\n \n //Role Rector then get all clans related to rector\n if ($this->session_data->role == 3) {\n $clan = new Clan();\n return $clan->getClanOfRector($this->session_data->id);\n }\n \n //Role Dean then get all clans related to dean\n if ($this->session_data->role == 4) {\n $clan = new Clan();\n return $clan->getClanOfDean($this->session_data->id);\n }\n \n //Role Teacher then get all clans related to teacher\n if ($this->session_data->role == 5) {\n $clan = new Clan();\n return $clan->getClanOfTeacher($this->session_data->id);\n }\n \n //Role Student then get all clans related to student\n if ($this->session_data->role == 6) {\n $clan = new Clan();\n return $clan->getClanOfStudent($this->session_data->id);\n }\n }","title":""},{"docid":"c7e3608ae42113b3cafcd5eca2188b76","score":"0.4918706","text":"public function getClients(){\n\t\t \t$all_organisations = new User;\n\n\t\t \t$organisations = $all_organisations->where('role_id','=',2)->get();\n \t\treturn view('clients.list',compact('organisations'));\n }","title":""},{"docid":"7d0f0b26e59662938da0406048a96bc6","score":"0.49138373","text":"public function get_client_list()\n {\n\n $data_list = $this->model->get_client_list();\n\n return $this->respond($data_list);\n }","title":""},{"docid":"f706e892842e429d12887f8cf41fa9a5","score":"0.4910518","text":"public function index()\n {\n //return all collections\n $collections = Customer::where('company_id', Auth::user()->company_id)\n ->orderBy('id', 'desc')\n ->with('collection', 'company', 'bin')\n ->get();\n\n return $collections;\n }","title":""},{"docid":"18e79f452c750dcc20af703a84ad471a","score":"0.4909431","text":"public function congesListeAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KbhGestionCongesBundle:Conge')->findAll();\n\n return $this->render('KbhGestionCongesBundle:Super-Admin/DonneesSysteme/Conges:conges.html.twig', array(\n 'entities' => $entities,\n ));\n }","title":""},{"docid":"31fd5874830c576fd432438e738d4178","score":"0.4905666","text":"public function index()\n {\n return PresidencyConsolidate::all();\n }","title":""},{"docid":"23f38a0d6f318b0d56bb26602b0b9992","score":"0.4904415","text":"public function index()\n {\n $clients = Client::all();\n \n return ClientResource::collection($clients);\n }","title":""},{"docid":"2a55a376a6b81ae3ceb4e7efb13fa6e2","score":"0.48985922","text":"public function getAllClients(){\r\n return $this->database->getRows(\"SELECT * FROM client WHERE client_trash = 0\");\r\n }","title":""},{"docid":"3c00acbd7b26d56d141e51646aa6c375","score":"0.48962793","text":"static function findAllActive(){\n $cnpj = $_SESSION['login']['cnpj_empresa'];\n $s = NULL;\n /*id, nome, login, senha, perfil, ativo, cnpj_empresa*/\n $sql = \"SELECT * FROM tb_cliente WHERE cnpj_empresa = :cnpj_empresa ORDER BY nome\";\n $DB = db_connect();\n $stmt = $DB->prepare($sql);\n $stmt->bindParam(':cnpj_empresa', $cnpj);\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_CLASS, 'Cliente');\n }","title":""},{"docid":"44f5bc4bb203a9cecb96b298e4e7a6fd","score":"0.48948744","text":"public function getAccounts()\n {\n return UserAccount::getAll(['where' => \"osoba_id = $this->id AND active = 1\"]);\n }","title":""},{"docid":"076d4f4dc9d75667010a1dbb76925bb5","score":"0.4890949","text":"public function connectedAccounts()\n {\n return $this->hasMany(Socialstream::connectedAccountModel(), 'user_id');\n }","title":""},{"docid":"a04bf554ba964c1ca6461f1b793da955","score":"0.48842958","text":"public function getList() {\n\n\t\t$logger = $this->getServiceLocator()->get( 'Log\\App' );\n\t\t$logger->log( \\Zend\\Log\\Logger::INFO, \"Rest call to /customer\" );\n\n\t\t/* this serves as the get call for the create account page */\n\t\t/* get the possible roles */\n\t\t$e = $this->getServiceLocator()->get( 'doctrine.entitymanager.orm_default' );\n\t\t$r = $e->createQuery( \"SELECT r FROM CAP\\Entity\\Role r\" )->getResult( \\Doctrine\\ORM\\Query::HYDRATE_OBJECT );\n\n\t\t$results = array();\n\n\t\tforeach ($r as $role) {\n\n\t\t\tarray_push($results, array('id' => $role->getId(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'name'=> $role->getName()));\n\t\t}\n\t\treturn new JsonModel(array('roles' => $results));\n\t}","title":""},{"docid":"c48b462898f0e7d19c16a8b764ee3553","score":"0.48840687","text":"public function getClients();","title":""},{"docid":"d2e4dc6314cddb8ff45b50b083ac8f79","score":"0.48808023","text":"public function index()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->getUser();\n\n if ($user->hasRole('ROLE_ECOMMERCE_ADMIN')) {\n $commandes = $em->getRepository(Commande::class)->getCommandeALivrer();\n } else {\n $commandes = $em->getRepository(Commande::class)->getCommandeALivrerByCommerce($user);\n }\n\n return [\n 'commandes' => $commandes,\n ];\n }","title":""},{"docid":"35731a4823e2d4fcdddd65ec4b4763e5","score":"0.4876098","text":"public function getBalances ()\n {\n return $this->call ('account/getbalances', array(), true);\n }","title":""},{"docid":"fcdd8b975f2cbacc47f4fbb6e33646f5","score":"0.4875129","text":"public function index()\n\t{\n $assistencies = Assistencies::all();\n return $assistencies;\n\t}","title":""},{"docid":"ea9415e5e908aa53ca275918716d809a","score":"0.487489","text":"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Cuenta')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }","title":""},{"docid":"73e2f55a047b3519f61715a8b01f9975","score":"0.48743296","text":"public function getClients()\n {\n $webstoreRepository = pluginApp(WebstoreRepositoryContract::class);\n\n $clients = array();\n\n $result = $webstoreRepository->loadAll();\n\n foreach ($result as $record)\n {\n if ($record->storeIdentifier > 0)\n {\n $clients[] = $record->storeIdentifier;\n }\n }\n\n return $clients;\n }","title":""},{"docid":"6ea2e4a172c3f21d9bec96b7ddb51c02","score":"0.48740748","text":"public function getObservacoes()\n {\n return $this->observacoes;\n }","title":""},{"docid":"85f13a19cde38a801f798be417e0247a","score":"0.48711053","text":"public function index()\n {\n return Client::all();\n }","title":""},{"docid":"85f13a19cde38a801f798be417e0247a","score":"0.48711053","text":"public function index()\n {\n return Client::all();\n }","title":""},{"docid":"85f13a19cde38a801f798be417e0247a","score":"0.48711053","text":"public function index()\n {\n return Client::all();\n }","title":""},{"docid":"519f8d11bd0000f9ad78359646936a97","score":"0.48698908","text":"public static function getCouleurs(){\n\t\t$dao = new CouleurDAO();\n\t\treturn $dao->getCouleurs();\n\t}","title":""},{"docid":"57095c3e678a80ab6e3a32dbcd1a3923","score":"0.4867414","text":"public static function getAllClues()\n\t{\n\t\treturn self::getClues(null);\t\n\t}","title":""},{"docid":"a15ff61060445c8629726037cb7ea460","score":"0.4865551","text":"public function consultar_clientes(){\n $query = \"SELECT * FROM cliente;\";\n $res = $this->mysqli->query($query);\n $this->results = $res->fetch_all(MYSQLI_ASSOC);\n return $this->results;\n }","title":""},{"docid":"1f2b3ce9a7cf0d5138b09953c0e0b6e9","score":"0.48618746","text":"public function index()\n {\n $compra = Compra::all();\n return $compra;\n }","title":""},{"docid":"8589c3c28b4314e59de8362187cddf2a","score":"0.48607698","text":"public static function getBosses()\n {\n $results = self::where('disabled', '=', false)->where('role', '=', BOSS);\n\n return $results;\n }","title":""},{"docid":"99166138ddb27772ee6d3c0f22d9544a","score":"0.4860737","text":"public function getClients()\n {\n /** @var OauthServer $this */\n return $this->get('clients');\n }","title":""},{"docid":"035e8d2aeb5872f61b6f6c3572865f97","score":"0.48566833","text":"public static function getTransedCopartners () {\n return \\Sooh\\Db\\Broker::getInstance(\\Rpt\\Tbname::db_rpt)\n ->getPair(\\Rpt\\Tbname::tb_copartners_trans, 'copartnerName', 'contractId');\n }","title":""},{"docid":"cb5fed7002af2afdae9791753085aa34","score":"0.48532146","text":"function getClaves()\n {\n return $this->claves;\n }","title":""},{"docid":"a3d60def27c764a5bbe13f90765556b2","score":"0.48521492","text":"public function concerns()\n\t{\n\t\treturn $this->hasMany(Concern::class)->orderBy('created_at', 'DESC');\n\t}","title":""},{"docid":"d5560a60ee407e107ba5514e3ac731d8","score":"0.48516566","text":"public function getAll(){\n $query=\"select * from clientes\";\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n return $stmt->fetchAll(\\PDO::FETCH_OBJ);\n }","title":""},{"docid":"798f51d4caeb3ef4858aa5e412032fc3","score":"0.48509118","text":"public function index()\n {\n $clients = Client::paginate();\n\n return ClientResource::collection($clients);\n }","title":""},{"docid":"76491d1c5ae0dca8fa9d30e9d61e525b","score":"0.4849676","text":"public function getAllOwners() {}","title":""},{"docid":"40c50fbf361ccffb64b7813914d83226","score":"0.48477876","text":"public function getCustomers()\n {\n $role = Role::where('name', 'customer')->first();\n return $role->users;\n }","title":""},{"docid":"495a96de3d1dbe6f7838c19ad98a4b7d","score":"0.48474693","text":"public function index()\n {\n //\n return new CandidatesResource(Candidate::all());\n }","title":""},{"docid":"62cd273589d51d0bf9c594de929960a9","score":"0.48455605","text":"public function getReadersList(){\n return $this->_get(3);\n }","title":""},{"docid":"24d30b1b2d2a71f3528c9e905b4f1ada","score":"0.48417187","text":"public function index()\n {\n return Borrow::with('user', 'book')->get();\n }","title":""},{"docid":"567ba358a5bdbb09528507c34b17aea7","score":"0.4837243","text":"public function findAll()\n {\n $role = Auth::user()->role;\n\n $donations = [];\n\n if ($role === 'admin') {\n $donations = Donation::with(['donor', 'patient', 'service'])->paginate(6);\n } else if ($role === 'donor') {\n $donations =\n Donation::with(['patient', 'service'])->where('donor_id', Auth::id())->paginate(6);\n } else {\n $donations =\n Donation::with(['donor', 'service'])->where('patient_id', Auth::id())->paginate(6);\n }\n\n return $donations;\n }","title":""}],"string":"[\n {\n \"docid\": \"8910b50329640cfde336b0658cf864e0\",\n \"score\": \"0.55958676\",\n \"text\": \"public function clientCorrespondences()\\n {\\n return Basecamp::clientCorrespondences($this->id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"145cc46624d165c8a9cadfd8da1b4de7\",\n \"score\": \"0.5520358\",\n \"text\": \"public function getAll()\\n {\\n $clients = $this->getEntityManager()\\n ->getRepository('AppBundle:Client')\\n ->createQueryBuilder('client')\\n ->select('client')\\n ->orderBy('client.nom')\\n ->getQuery()\\n ->getResult();\\n return $clients;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62114ebe557bedcd30eefc305a65c455\",\n \"score\": \"0.5460961\",\n \"text\": \"public static function obtenerConductoresDisponibles(){\\n $conductores = Persona::all();\\n $ocupados = DB::table('TBL_Persona as p')\\n ->join('TBL_Vehiculo as v', 'v.VHC_Conductor_Id', '=', 'p.id')\\n ->select('p.id')\\n ->get();\\n $disponibles = [];\\n foreach ($conductores as $conductor) {\\n if(!$ocupados->contains('id', $conductor->id)){\\n array_push($disponibles, $conductor);\\n }\\n }\\n return $disponibles;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c89fa720e903ab652063deb3b1d2fbe\",\n \"score\": \"0.5445692\",\n \"text\": \"private function findContribuyente()\\r\\n\\t\\t{\\r\\n\\t\\t\\t$results = [];\\r\\n\\t\\t\\t$findModel = self::findContribuyenteModel();\\r\\n\\t\\t\\t$findModel = $findModel->select([\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'id_contribuyente',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'naturaleza',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'cedula',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'tipo',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'id_rif',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'razon_social',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'domicilio_fiscal',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'tlf_ofic',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'tlf_ofic_otro',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'tlf_celular',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'email',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t])\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t ->where(['inactivo' => 0])\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t ->andWhere(['tipo_naturaleza' => 1])\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t ->andWhere(['no_declara' => 0]);\\r\\n\\r\\n\\t\\t\\tif ( (int)$this->todos_contribuyentes == 1 ) {\\r\\n\\t\\t\\t\\t// La consulta se realiza sobre un lote\\r\\n\\t\\t\\t\\t$results = $findModel->asArray()->all();\\r\\n\\t\\t\\t} else {\\r\\n\\t\\t\\t\\t// La consulta se realiza sobre uno\\r\\n\\t\\t\\t\\tif ( (int)$this->id_contribuyente > 0 ) {\\r\\n\\t\\t\\t\\t\\t$results = $findModel->andWhere('id_contribuyente =:id_contribuyente',\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t[':id_contribuyente' => (int)$this->id_contribuyente])\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t ->asArray()\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t ->all();\\r\\n\\t\\t\\t\\t}\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\treturn $results;\\r\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab2c0eb962f3cf03b6b723efd26b4d6d\",\n \"score\": \"0.5431517\",\n \"text\": \"public static function insurances()\\n {\\n $user = Sentinel::getUser();\\n $member = DB::table('members')->where('email', '=', $user->email)->first();\\n $insurances=Member::find($member->id)->insurances()->latest()->get();\\n return $insurances;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19333b40ba0315de1d650637a12beddf\",\n \"score\": \"0.5346143\",\n \"text\": \"function get_all_credito()\\n {\\n $credito = $this->db->query(\\\"\\n SELECT\\n *\\n\\n FROM\\n `credito`\\n\\n WHERE\\n 1 = 1\\n\\n ORDER BY `credito_id` DESC\\n \\\")->result_array();\\n\\n return $credito;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"394dd6bc982ecf7c42810b8d647f0d44\",\n \"score\": \"0.53388995\",\n \"text\": \"static function getAllClients() {\\n $model = \\\\app\\\\models\\\\Clients::find()\\n ->where(['is_deleted' => 0])\\n ->all();\\n $list = ArrayHelper::map($model, 'client_id', 'business_name');\\n return $list;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"55f84b373672e24594084dbe0c0c1b8c\",\n \"score\": \"0.5318582\",\n \"text\": \"public function index()\\n {\\n $clientes = Cliente::with(['pessoa', 'carrinho'])->get();\\n return $clientes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"041cc9bbbeac87a56918b3d37fab3834\",\n \"score\": \"0.53031504\",\n \"text\": \"static function findAllSuspense(){\\n $cnpj = $_SESSION['login']['cnpj_empresa'];\\n /*id, nome, login, senha, perfil, ativo, cnpj_empresa*/\\n $sql = \\\"SELECT * FROM tb_cliente WHERE cnpj_empresa = :cnpj_empresa ORDER BY nome\\\";\\n $DB = db_connect();\\n $stmt = $DB->prepare($sql);\\n $stmt->bindParam(':cnpj_empresa', $cnpj);\\n $stmt->execute();\\n return $stmt->fetchAll(PDO::FETCH_CLASS, 'Cliente');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c88566e7a209e9087675d21e84d1d79e\",\n \"score\": \"0.52982473\",\n \"text\": \"public function getContatos()\\n {\\n return $this->contatos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c88566e7a209e9087675d21e84d1d79e\",\n \"score\": \"0.52982473\",\n \"text\": \"public function getContatos()\\n {\\n return $this->contatos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bfd47c96e1d63447b4d49c23877047a6\",\n \"score\": \"0.5276311\",\n \"text\": \"public function index()\\n {\\n //\\n\\n $clases=Clases::all();\\n return $clases;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b892b3365ead169345e3033f3a0da8a\",\n \"score\": \"0.5274984\",\n \"text\": \"public function index()\\n {\\n $contacts = Brindes::all();\\n\\n return $contacts;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5e22f70af5508c441feda25397bd4ce\",\n \"score\": \"0.5270017\",\n \"text\": \"public function getContatos()\\n {\\n $sql = $this->pdo->prepare('select * from tb_contatos');\\n $sql->execute();\\n\\n $lista = array();\\n\\n if ($sql->execute()) {\\n // Query succeeded.\\n while ($dados = $sql->fetch(PDO::FETCH_OBJ)) {\\n $contato = new Contato();\\n\\n $contato->setId_usuario($dados->id_usuario);\\n $contato->setTelefone($dados->telefone);\\n $contato->setTipo($dados->tipo);\\n\\n $lista[] = $contato;\\n }\\n } else {\\n // Query failed.\\n echo $sql->errorCode();\\n return null;\\n }\\n\\n return $lista;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a98dba23a9b9109bb3192d0e8b57f0c\",\n \"score\": \"0.52620876\",\n \"text\": \"public function index()\\n {\\n $dados = Cliente::all();\\n return $dados;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b6883247147542da980cafa395b17a2\",\n \"score\": \"0.5252663\",\n \"text\": \"public function getBeacons()\\n {\\n $result = $this->request('get', '/device');\\n\\n return collect($result->devices)->map(function ($device) {\\n return $this->getBeacon($device);\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e90e401e83462a79ba889736a38985c\",\n \"score\": \"0.52377\",\n \"text\": \"function getCapstoneAll() {\\n return DB::query(\\\"SELECT cs.id, u.first_name , u.last_name, u.username, cs.title, cs.description, cs.defense_date, cs.plagerism_score, cs.grade, cs.type\\n FROM capstone cs JOIN student s ON cs.student_id = s.id\\n JOIN user u ON s.uid = u.uid\\n ORDER BY cs.defense_date;\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2994434965f7bd77eb9ac514c784d4df\",\n \"score\": \"0.5235964\",\n \"text\": \"public function getClientes() {\\r\\n //obtenemos la informacion de la bdd:\\r\\n $pdo = Database::connect();\\r\\n $sql = \\\"select * from cliente order by apellidos\\\";\\r\\n $resultado = $pdo->query($sql);\\r\\n //transformamos los registros en objetos:\\r\\n $listado = array();\\r\\n foreach ($resultado as $res) {\\r\\n $cliente = new Cliente($res['cedula'], $res['apellidos'], $res['nombres'], $res['direccion']);\\r\\n array_push($listado, $cliente);\\r\\n }\\r\\n Database::disconnect();\\r\\n //retornamos el listado resultante:\\r\\n return $listado;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"377172be0e34e6d2f08a1dc6d9b262e6\",\n \"score\": \"0.5224592\",\n \"text\": \"public function clients()\\n {\\n return $this->hasMany(\\n Passport::clientModel(),\\n 'user_id'\\n )->select(\\n [\\n 'id',\\n 'user_id',\\n 'name',\\n 'secret',\\n 'revoked',\\n 'created_at',\\n 'updated_at',\\n ]\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"286c3ca22fbb42cb823a597ebe2ba4dd\",\n \"score\": \"0.5213156\",\n \"text\": \"public function index()\\n {\\n $incidents = Incident::all();\\n\\n return response()->json($incidents);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbc1eade2c107b0893093e99558d3d9a\",\n \"score\": \"0.5208467\",\n \"text\": \"public function getConsumers()\\n {\\n\\n#\\n### Initialise data connector\\n#\\n $this->data_connector = LTI_Data_Connector::getDataConnector($this->data_connector);\\n\\n return $this->data_connector->Tool_Consumer_list();\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4bc983dbb8e245e0d6ec7fd3a8d038cf\",\n \"score\": \"0.5193406\",\n \"text\": \"public function getAllClientActif()\\n {\\n $clients = $this->getEntityManager()\\n ->getRepository('AppBundle:Client')\\n ->createQueryBuilder('client')\\n ->select('client')\\n ->where('client.status = :status')\\n ->setParameters([\\n 'status' => 1,\\n ])\\n ->orderBy('client.nom')\\n ->getQuery()\\n ->getResult();\\n return $clients;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e79d8b69c2c2d4be036959124886008\",\n \"score\": \"0.51912814\",\n \"text\": \"public function listClients()\\n {\\n $clients = $this->clientService->list();\\n return ClientResource::collection($clients);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6d7fee10c70c07918c96c94cedba343\",\n \"score\": \"0.51896083\",\n \"text\": \"public function index()\\n {\\n $contrato = contrato::all();\\n return $contrato;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ac61cdde5628425a6288810a5b283cd\",\n \"score\": \"0.51800644\",\n \"text\": \"public static function getAllClients(){\\n $sql = \\\"SELECT * FROM Clients ORDER BY idClient;\\\";\\n return Model::fetchDB($sql);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"410ad5d8d87513e7e422a32a87352d6d\",\n \"score\": \"0.5177919\",\n \"text\": \"protected function getClients()\\n {\\n /* @var $collection \\\\yii\\\\authclient\\\\Collection */\\n $collection = Yii::$app->get($this->clientCollection);\\n\\n return $collection->getClients();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a31805ac7068957ca9cb0f3c3e39020\",\n \"score\": \"0.5142657\",\n \"text\": \"public function getBeacons(){\\n\\t\\t$this->db->from('ads');\\n \\t$this->db->where('status = 1');\\n\\t\\treturn $this->db->get()->result();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"53eed9bed6f3d1ea27769d059f58d820\",\n \"score\": \"0.5139372\",\n \"text\": \"public function indexAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $consommables = $em->getRepository('AppBundle:Consommable')->findAll();\\n\\n return $this->render('consommable/index.html.twig', array(\\n 'consommables' => $consommables,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d0791d1f9faa6196f34a2062846ca40\",\n \"score\": \"0.5134875\",\n \"text\": \"public function get_clients(){\\n\\t\\t$this->dal->connect();\\n\\t\\t$result = $this->dal->select(\\\"SELECT client_name, client_id FROM Client\\\");\\t\\n\\t\\t$this->dal->disconnect();\\n\\t\\treturn $result;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3125e9e8cc3307e44a6c6e6db57e262\",\n \"score\": \"0.5109347\",\n \"text\": \"public function index()\\n {\\n // Get accountBlockAssociations\\n $accountBlockAssociations = AccountBlockAssociation::orderBy('created_at', 'desc')->paginate(15);\\n\\n // Return collection of accountBlockAssociations as a resource\\n return AccountBlockAssociationResource::collection($accountBlockAssociations);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4f7dd2903b805ac130aa447c84144ed\",\n \"score\": \"0.5099835\",\n \"text\": \"public function index()\\n {\\n $enderecos = Endereco::with(\\\"cidade\\\")->get();\\n return $enderecos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb6106d714d8ecb7e1a8cec4738a9f48\",\n \"score\": \"0.5084105\",\n \"text\": \"public function findCapstones()\\n {\\n $users = $this->createQueryBuilder('u')\\n ->andWhere(\\\"u.progress = '5' or u.progress = '6' or u.progress = '12' or u.progress = '13'\\\")\\n ->addOrderBy('u.lastname', 'ASC')\\n ->addOrderBy('u.firstname', 'ASC')\\n ->getQuery()\\n ->getResult();\\n return $users;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c128f5202bcf725b5aeecada5b66e0f3\",\n \"score\": \"0.5081435\",\n \"text\": \"public function Listar(){\\n $convenios = new Convenio();\\n\\n // Chama o metodo para selecionar os registros\\n return $convenios::Select();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d8170093d3f70fa184e93e5ce8afba9\",\n \"score\": \"0.50809443\",\n \"text\": \"public function ListAction(){\\n $em = $this->getDoctrine()->getManager();\\n\\n //recupere de la liste des internautes au travers du repository\\n $internautes = $em->getRepository('BackBundle:Internaute')->findAll();\\n\\n return $internautes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77f4386cd0104203e05a08fb61d93396\",\n \"score\": \"0.50808156\",\n \"text\": \"public function listcancelation(){ \\n $sts=$this->db->prepare(\\\"SELECT * FROM `cancelation`\\\");\\n $sts->execute();\\n\\t\\t$data=$sts->fetchAll(PDO::FETCH_ASSOC);\\n\\t\\t\\n return $data;\\n\\t\\t\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c537594c6f5d05d5ee5ca8bab80a28e\",\n \"score\": \"0.5069361\",\n \"text\": \"public function accounts()\\n {\\n return $this->request('eth_accounts', []);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2cceea8bf31313b40ca3de6efb000151\",\n \"score\": \"0.5068681\",\n \"text\": \"public function all()\\n {\\n return $this->bank_account->all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6fb45dcb0c56a9eaa21dec2f941b9e3\",\n \"score\": \"0.506302\",\n \"text\": \"public function users(){\\n // Replace with company later\\n // $clients = Auth::user()->clients;\\n return ClientResource::collection(Auth::user()->clients);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7efae927e123b512ff28710a9254f804\",\n \"score\": \"0.50600183\",\n \"text\": \"public function indexAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $cons = $em->getRepository('ConsultationBundle:Cons')->findAll();\\n\\n return $this->render('cons/index.html.twig', array(\\n 'cons' => $cons,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"22494360a31f3d4530dbfbb41bca9ab5\",\n \"score\": \"0.5033673\",\n \"text\": \"public function getList()\\n {\\n return $this\\n ->where('cookie_id', request()->cookie_id)\\n ->where('status', true)\\n ->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4448a6a8029fd583323928ac49916082\",\n \"score\": \"0.502563\",\n \"text\": \"public function fetch()\\n {\\n return $this->configurationModel->all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21d338aa0dda3a10c04cc32eacc0d194\",\n \"score\": \"0.5009652\",\n \"text\": \"public static function getAll() {\\n\\t\\t\\t//list\\n\\t\\t\\t$list = array();\\n\\t\\t\\t//get connection\\n\\t\\t\\t$connection = MySqlConnection::getConnection();\\n\\t\\t\\t//query\\n\\t\\t\\t$query = 'call usp_getIncidentsWithStatusActive();';\\n\\t\\t\\t//command\\n\\t\\t\\t$command = $connection->prepare($query);\\n\\t\\t\\t//execute\\n\\t\\t\\t$command->execute();\\n\\t\\t\\t//bind results\\n\\t\\t\\t$command->bind_result($id,\\n\\t\\t\\t$disUsername, $disFirstName, $disLastName, $disBirthdate, $disGender, $disPhotograph, $disPhone, $disEmail, $acoDisLastLogin,\\n\\t\\t\\t$usUsername, $usFirstName, $usLastName, $usBirthdate, $usGender, $usPhotograph, $usPhoneNumber, $usEmail, $acoUsLastLogin,\\n\\t\\t\\t$itId, $itDescription, $description, $dateTime, $latitude, $longitude, $summon, $status);\\n\\t\\t\\t//fetch data\\n\\t\\t\\twhile($command->fetch()) {\\n\\t\\t\\t\\t$id = $id;\\n\\t\\t\\t\\t$contactDataDispacher = new ContactData($disPhone, $disEmail);\\n\\t\\t\\t\\t$contacDataUser = new ContactData($usPhoneNumber, $usEmail);\\n\\t\\t\\t\\t$accountDipacher = new Account($disUsername, $acoDisLastLogin);\\n\\t\\t\\t\\t$accountUser = new Account($usUsername, $acoUsLastLogin);\\n\\t\\t\\t\\t$dispatcher = new Dispatcher($accountDipacher, $disFirstName, $disLastName, $disBirthdate, $disGender, $disPhotograph, $contactDataDispacher);\\n\\t\\t\\t\\t$user = new User($accountUser, $usFirstName, $usLastName, $usBirthdate, $usGender, $usPhotograph, $contacDataUser);\\n\\t\\t\\t\\t$incidentType = new IncidentType($itId, $itDescription);\\n\\t\\t\\t\\t$description = $description;\\n\\t\\t\\t\\t$date = $dateTime;\\n\\t\\t\\t\\t$location = new Location($latitude, $longitude);\\n\\t\\t\\t\\t$summon = $summon;\\n\\t\\t\\t\\t$status = $status;\\n\\t\\t\\t\\tarray_push($list, new Incident($id, $dispatcher, $user, $incidentType, $description, $dateTime, $location, $summon, $status));\\n\\t\\t\\t}\\n\\t\\t\\t//close command\\n\\t\\t\\tmysqli_stmt_close($command);\\n\\t\\t\\t//close connection\\n\\t\\t\\t$connection->close();\\n\\t\\t\\t//return list\\n\\t\\t\\treturn $list;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49f3dc3df25919b754c11e5fc69a38e5\",\n \"score\": \"0.50063217\",\n \"text\": \"public function list()\\n {\\n return $this->careerApplicationService->list();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d7e339de6fbf68511d42ad1dc6d5777\",\n \"score\": \"0.49957934\",\n \"text\": \"public function getAll()\\n {\\n return $this->candidateModel->orderBy('candidates.id','desc')\\n ->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6408520add92fff3cc38f66869a5ae16\",\n \"score\": \"0.49956858\",\n \"text\": \"public function getInfos()\\n {\\n if(!$this->ping())\\n return false;\\n\\n $response = $this->client->get('/cds/application',$this->headers);\\n \\n return $response->json();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7bde9b619c165c5eace92e37ddd28cc\",\n \"score\": \"0.49920824\",\n \"text\": \"public function getAll()\\n {\\n $data = array();\\n $rs = parent::findAll(array(\\\"name\\\" => \\\"Client\\\"));\\n foreach ($rs as $k => $v) {\\n foreach ($v as $vi) {\\n $data[$k] = new Client($v['CLIENTID'],$v['NOM'],$v['EMAIL'],$v['MOTPASSE']);\\n }\\n }\\n return $data;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93d8761ba860344fa7bae0b5e7b41b9a\",\n \"score\": \"0.49920416\",\n \"text\": \"public function getAll()\\n {\\n return $this->boat_service->getAll();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57cef047e3c5e3d0f94614210cd518a1\",\n \"score\": \"0.49906743\",\n \"text\": \"public function indexAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $entities = $em->getRepository('WoojinAgencyBundle:Contractor')->findAll();\\n\\n return array(\\n 'entities' => $entities,\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d29e2410f7c52c28f001ab4ad79bd789\",\n \"score\": \"0.49866912\",\n \"text\": \"function disciplineFetch()\\n\\t{\\n\\t\\treturn [\\n\\t\\t\\t'list'=>JbDisciplines::get()\\n\\t\\t];\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7497590c8bf60a84b697963584ff60dd\",\n \"score\": \"0.49832225\",\n \"text\": \"public function readAll()\\n {\\n $sql = 'SELECT id_recomendaciones, recomendaciones, fecha, estado, nombres_cliente\\n FROM recomendaciones INNER JOIN clientes USING(id_cliente) \\n ORDER BY id_cliente';\\n $params = null;\\n return Database::getRows($sql, $params);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e133c17462078a7c9f4de4646a80e0a\",\n \"score\": \"0.49754944\",\n \"text\": \"public function getCurrensies();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a22c4131d83af98d6f3a80282cd0e303\",\n \"score\": \"0.49713996\",\n \"text\": \"public function index()\\n {\\n $lancamentoConta = LancamentoConta::all();\\n return $lancamentoConta;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ee6a4b1ae0c7641dc0309e62454eeb7\",\n \"score\": \"0.49584424\",\n \"text\": \"public static function getCarList() {\\n $cars = DB::table('cars')->get();\\n return $cars;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c5b05883a4a7c5a8603c91d9047ccc40\",\n \"score\": \"0.4954885\",\n \"text\": \"public function getComentarios(){\\n\\t\\t$sql = \\\"SELECT c.Comentario, cli.Usuario FROM comentarios c, cliente cli, producto p where c.IdCliente=cli.IdCliente and p.IdProducto=c.IdProducto and c.Estado=1\\\";\\n\\t\\t$params = array(null);\\n\\t\\treturn Database::getRows($sql, $params);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0de5477847b79f75ccfee4abc1d832f\",\n \"score\": \"0.49547556\",\n \"text\": \"public function allClientes()\\n {\\n $clientes = Cliente::all();\\n return response()->json($clientes, 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ba658ab2d1d3b936cd6879c4c2bfc60\",\n \"score\": \"0.49536398\",\n \"text\": \"public function findAll()\\n {\\n try {\\n $clients = $this->db->createQueryBuilder()\\n ->select('c')\\n ->from(ClientPhysique::class,'c')\\n ->getQuery()\\n ->getArrayResult();\\n\\n return $clients;\\n } catch (\\\\PDOException $e) {\\n exit($e->getMessage());\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6b1e3c44b41b8042c1958569858927d\",\n \"score\": \"0.4943648\",\n \"text\": \"public function indexAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $entities = $em->getRepository('AppBundle:Cliente')->findByEstado(1);\\n\\n return array(\\n 'entities' => $entities\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40aa3f59a10c66b3f0709ca46141df7a\",\n \"score\": \"0.49356428\",\n \"text\": \"public function clientApprovals()\\n {\\n return Basecamp::clientApprovals($this->id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b54fa14c680076ebdcb5757039fb0e7\",\n \"score\": \"0.4935288\",\n \"text\": \"public function getStatistics()\\n {\\n $ret = array();\\n\\n // Get total number of consents\\n $st = $this->_execute('SELECT COUNT(*) AS no FROM consent', array());\\n \\n if ($st === false) {\\n return array(); \\n }\\n\\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\\n $ret['total'] = $row[0];\\n }\\n\\n // Get total number of users that has given consent\\n $st = $this->_execute(\\n 'SELECT COUNT(*) AS no ' .\\n 'FROM (SELECT DISTINCT hashed_user_id FROM consent ) AS foo',\\n array()\\n );\\n \\n if ($st === false) {\\n return array(); \\n }\\n\\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\\n $ret['users'] = $row[0];\\n }\\n\\n // Get total number of services that has been given consent to\\n $st = $this->_execute(\\n 'SELECT COUNT(*) AS no ' .\\n 'FROM (SELECT DISTINCT service_id FROM consent) AS foo',\\n array()\\n );\\n \\n if ($st === false) {\\n return array();\\n }\\n\\n if ($row = $st->fetch(PDO::FETCH_NUM)) {\\n $ret['services'] = $row[0];\\n }\\n\\n return $ret;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36cd2c00e64fcb7dab80f0509055b5aa\",\n \"score\": \"0.49331528\",\n \"text\": \"public function contatos()\\n {\\n return $this->hasMany(ClienteContato::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4d0034d393ca385edbf1c174a1dc2df8\",\n \"score\": \"0.4929256\",\n \"text\": \"public function getAll()\\n {\\n return Courier::mapArrayFromJson(\\n $this->client->sendRequest(\\n new Request('GET', 'couriers')\\n )\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ada6781254d8afd578f357e448f42ea6\",\n \"score\": \"0.49189928\",\n \"text\": \"private function _getClans() {\\n \\n //Role Super Admin get all Clans\\n if ($this->session_data->role == 1) {\\n $clan = new Clan();\\n return $clan->get();\\n }\\n \\n //Role Admin get all Clans\\n if ($this->session_data->role == 2) {\\n $clan = new Clan();\\n return $clan->get();\\n }\\n \\n //Role Rector then get all clans related to rector\\n if ($this->session_data->role == 3) {\\n $clan = new Clan();\\n return $clan->getClanOfRector($this->session_data->id);\\n }\\n \\n //Role Dean then get all clans related to dean\\n if ($this->session_data->role == 4) {\\n $clan = new Clan();\\n return $clan->getClanOfDean($this->session_data->id);\\n }\\n \\n //Role Teacher then get all clans related to teacher\\n if ($this->session_data->role == 5) {\\n $clan = new Clan();\\n return $clan->getClanOfTeacher($this->session_data->id);\\n }\\n \\n //Role Student then get all clans related to student\\n if ($this->session_data->role == 6) {\\n $clan = new Clan();\\n return $clan->getClanOfStudent($this->session_data->id);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7e3608ae42113b3cafcd5eca2188b76\",\n \"score\": \"0.4918706\",\n \"text\": \"public function getClients(){\\n\\t\\t \\t$all_organisations = new User;\\n\\n\\t\\t \\t$organisations = $all_organisations->where('role_id','=',2)->get();\\n \\t\\treturn view('clients.list',compact('organisations'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7d0f0b26e59662938da0406048a96bc6\",\n \"score\": \"0.49138373\",\n \"text\": \"public function get_client_list()\\n {\\n\\n $data_list = $this->model->get_client_list();\\n\\n return $this->respond($data_list);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f706e892842e429d12887f8cf41fa9a5\",\n \"score\": \"0.4910518\",\n \"text\": \"public function index()\\n {\\n //return all collections\\n $collections = Customer::where('company_id', Auth::user()->company_id)\\n ->orderBy('id', 'desc')\\n ->with('collection', 'company', 'bin')\\n ->get();\\n\\n return $collections;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"18e79f452c750dcc20af703a84ad471a\",\n \"score\": \"0.4909431\",\n \"text\": \"public function congesListeAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $entities = $em->getRepository('KbhGestionCongesBundle:Conge')->findAll();\\n\\n return $this->render('KbhGestionCongesBundle:Super-Admin/DonneesSysteme/Conges:conges.html.twig', array(\\n 'entities' => $entities,\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31fd5874830c576fd432438e738d4178\",\n \"score\": \"0.4905666\",\n \"text\": \"public function index()\\n {\\n return PresidencyConsolidate::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23f38a0d6f318b0d56bb26602b0b9992\",\n \"score\": \"0.4904415\",\n \"text\": \"public function index()\\n {\\n $clients = Client::all();\\n \\n return ClientResource::collection($clients);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2a55a376a6b81ae3ceb4e7efb13fa6e2\",\n \"score\": \"0.48985922\",\n \"text\": \"public function getAllClients(){\\r\\n return $this->database->getRows(\\\"SELECT * FROM client WHERE client_trash = 0\\\");\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c00acbd7b26d56d141e51646aa6c375\",\n \"score\": \"0.48962793\",\n \"text\": \"static function findAllActive(){\\n $cnpj = $_SESSION['login']['cnpj_empresa'];\\n $s = NULL;\\n /*id, nome, login, senha, perfil, ativo, cnpj_empresa*/\\n $sql = \\\"SELECT * FROM tb_cliente WHERE cnpj_empresa = :cnpj_empresa ORDER BY nome\\\";\\n $DB = db_connect();\\n $stmt = $DB->prepare($sql);\\n $stmt->bindParam(':cnpj_empresa', $cnpj);\\n $stmt->execute();\\n return $stmt->fetchAll(PDO::FETCH_CLASS, 'Cliente');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44f5bc4bb203a9cecb96b298e4e7a6fd\",\n \"score\": \"0.48948744\",\n \"text\": \"public function getAccounts()\\n {\\n return UserAccount::getAll(['where' => \\\"osoba_id = $this->id AND active = 1\\\"]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"076d4f4dc9d75667010a1dbb76925bb5\",\n \"score\": \"0.4890949\",\n \"text\": \"public function connectedAccounts()\\n {\\n return $this->hasMany(Socialstream::connectedAccountModel(), 'user_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a04bf554ba964c1ca6461f1b793da955\",\n \"score\": \"0.48842958\",\n \"text\": \"public function getList() {\\n\\n\\t\\t$logger = $this->getServiceLocator()->get( 'Log\\\\App' );\\n\\t\\t$logger->log( \\\\Zend\\\\Log\\\\Logger::INFO, \\\"Rest call to /customer\\\" );\\n\\n\\t\\t/* this serves as the get call for the create account page */\\n\\t\\t/* get the possible roles */\\n\\t\\t$e = $this->getServiceLocator()->get( 'doctrine.entitymanager.orm_default' );\\n\\t\\t$r = $e->createQuery( \\\"SELECT r FROM CAP\\\\Entity\\\\Role r\\\" )->getResult( \\\\Doctrine\\\\ORM\\\\Query::HYDRATE_OBJECT );\\n\\n\\t\\t$results = array();\\n\\n\\t\\tforeach ($r as $role) {\\n\\n\\t\\t\\tarray_push($results, array('id' => $role->getId(),\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t 'name'=> $role->getName()));\\n\\t\\t}\\n\\t\\treturn new JsonModel(array('roles' => $results));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c48b462898f0e7d19c16a8b764ee3553\",\n \"score\": \"0.48840687\",\n \"text\": \"public function getClients();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2e4dc6314cddb8ff45b50b083ac8f79\",\n \"score\": \"0.48808023\",\n \"text\": \"public function index()\\n {\\n $em = $this->getDoctrine()->getManager();\\n $user = $this->getUser();\\n\\n if ($user->hasRole('ROLE_ECOMMERCE_ADMIN')) {\\n $commandes = $em->getRepository(Commande::class)->getCommandeALivrer();\\n } else {\\n $commandes = $em->getRepository(Commande::class)->getCommandeALivrerByCommerce($user);\\n }\\n\\n return [\\n 'commandes' => $commandes,\\n ];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35731a4823e2d4fcdddd65ec4b4763e5\",\n \"score\": \"0.4876098\",\n \"text\": \"public function getBalances ()\\n {\\n return $this->call ('account/getbalances', array(), true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcdd8b975f2cbacc47f4fbb6e33646f5\",\n \"score\": \"0.4875129\",\n \"text\": \"public function index()\\n\\t{\\n $assistencies = Assistencies::all();\\n return $assistencies;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea9415e5e908aa53ca275918716d809a\",\n \"score\": \"0.487489\",\n \"text\": \"public function indexAction()\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $entities = $em->getRepository('AppBundle:Cuenta')->findAll();\\n\\n return array(\\n 'entities' => $entities,\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73e2f55a047b3519f61715a8b01f9975\",\n \"score\": \"0.48743296\",\n \"text\": \"public function getClients()\\n {\\n $webstoreRepository = pluginApp(WebstoreRepositoryContract::class);\\n\\n $clients = array();\\n\\n $result = $webstoreRepository->loadAll();\\n\\n foreach ($result as $record)\\n {\\n if ($record->storeIdentifier > 0)\\n {\\n $clients[] = $record->storeIdentifier;\\n }\\n }\\n\\n return $clients;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6ea2e4a172c3f21d9bec96b7ddb51c02\",\n \"score\": \"0.48740748\",\n \"text\": \"public function getObservacoes()\\n {\\n return $this->observacoes;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85f13a19cde38a801f798be417e0247a\",\n \"score\": \"0.48711053\",\n \"text\": \"public function index()\\n {\\n return Client::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85f13a19cde38a801f798be417e0247a\",\n \"score\": \"0.48711053\",\n \"text\": \"public function index()\\n {\\n return Client::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85f13a19cde38a801f798be417e0247a\",\n \"score\": \"0.48711053\",\n \"text\": \"public function index()\\n {\\n return Client::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"519f8d11bd0000f9ad78359646936a97\",\n \"score\": \"0.48698908\",\n \"text\": \"public static function getCouleurs(){\\n\\t\\t$dao = new CouleurDAO();\\n\\t\\treturn $dao->getCouleurs();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57095c3e678a80ab6e3a32dbcd1a3923\",\n \"score\": \"0.4867414\",\n \"text\": \"public static function getAllClues()\\n\\t{\\n\\t\\treturn self::getClues(null);\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a15ff61060445c8629726037cb7ea460\",\n \"score\": \"0.4865551\",\n \"text\": \"public function consultar_clientes(){\\n $query = \\\"SELECT * FROM cliente;\\\";\\n $res = $this->mysqli->query($query);\\n $this->results = $res->fetch_all(MYSQLI_ASSOC);\\n return $this->results;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1f2b3ce9a7cf0d5138b09953c0e0b6e9\",\n \"score\": \"0.48618746\",\n \"text\": \"public function index()\\n {\\n $compra = Compra::all();\\n return $compra;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8589c3c28b4314e59de8362187cddf2a\",\n \"score\": \"0.48607698\",\n \"text\": \"public static function getBosses()\\n {\\n $results = self::where('disabled', '=', false)->where('role', '=', BOSS);\\n\\n return $results;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99166138ddb27772ee6d3c0f22d9544a\",\n \"score\": \"0.4860737\",\n \"text\": \"public function getClients()\\n {\\n /** @var OauthServer $this */\\n return $this->get('clients');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"035e8d2aeb5872f61b6f6c3572865f97\",\n \"score\": \"0.48566833\",\n \"text\": \"public static function getTransedCopartners () {\\n return \\\\Sooh\\\\Db\\\\Broker::getInstance(\\\\Rpt\\\\Tbname::db_rpt)\\n ->getPair(\\\\Rpt\\\\Tbname::tb_copartners_trans, 'copartnerName', 'contractId');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb5fed7002af2afdae9791753085aa34\",\n \"score\": \"0.48532146\",\n \"text\": \"function getClaves()\\n {\\n return $this->claves;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3d60def27c764a5bbe13f90765556b2\",\n \"score\": \"0.48521492\",\n \"text\": \"public function concerns()\\n\\t{\\n\\t\\treturn $this->hasMany(Concern::class)->orderBy('created_at', 'DESC');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5560a60ee407e107ba5514e3ac731d8\",\n \"score\": \"0.48516566\",\n \"text\": \"public function getAll(){\\n $query=\\\"select * from clientes\\\";\\n $stmt = $this->db->prepare($query);\\n $stmt->execute();\\n return $stmt->fetchAll(\\\\PDO::FETCH_OBJ);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"798f51d4caeb3ef4858aa5e412032fc3\",\n \"score\": \"0.48509118\",\n \"text\": \"public function index()\\n {\\n $clients = Client::paginate();\\n\\n return ClientResource::collection($clients);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76491d1c5ae0dca8fa9d30e9d61e525b\",\n \"score\": \"0.4849676\",\n \"text\": \"public function getAllOwners() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40c50fbf361ccffb64b7813914d83226\",\n \"score\": \"0.48477876\",\n \"text\": \"public function getCustomers()\\n {\\n $role = Role::where('name', 'customer')->first();\\n return $role->users;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"495a96de3d1dbe6f7838c19ad98a4b7d\",\n \"score\": \"0.48474693\",\n \"text\": \"public function index()\\n {\\n //\\n return new CandidatesResource(Candidate::all());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62cd273589d51d0bf9c594de929960a9\",\n \"score\": \"0.48455605\",\n \"text\": \"public function getReadersList(){\\n return $this->_get(3);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24d30b1b2d2a71f3528c9e905b4f1ada\",\n \"score\": \"0.48417187\",\n \"text\": \"public function index()\\n {\\n return Borrow::with('user', 'book')->get();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"567ba358a5bdbb09528507c34b17aea7\",\n \"score\": \"0.4837243\",\n \"text\": \"public function findAll()\\n {\\n $role = Auth::user()->role;\\n\\n $donations = [];\\n\\n if ($role === 'admin') {\\n $donations = Donation::with(['donor', 'patient', 'service'])->paginate(6);\\n } else if ($role === 'donor') {\\n $donations =\\n Donation::with(['patient', 'service'])->where('donor_id', Auth::id())->paginate(6);\\n } else {\\n $donations =\\n Donation::with(['donor', 'service'])->where('patient_id', Auth::id())->paginate(6);\\n }\\n\\n return $donations;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":777,"cells":{"query_id":{"kind":"string","value":"1e73f40de055272663c9bcdc84c70dbb"},"query":{"kind":"string","value":"Filter the query on the tdate column Example usage: $query>filterByTdate('20110314'); // WHERE tdate = '20110314' $query>filterByTdate('now'); // WHERE tdate = '20110314' $query>filterByTdate(array('max' => 'yesterday')); // WHERE tdate > '20110313'"},"positive_passages":{"kind":"list like","value":[{"docid":"03414ceee785d952e1b6ef62bed2544d","score":"0.53202915","text":"public function filterByTdate($tdate = null, $comparison = null)\n {\n if (is_array($tdate)) {\n $useMinMax = false;\n if (isset($tdate['min'])) {\n $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($tdate['max'])) {\n $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate, $comparison);\n }","title":""}],"string":"[\n {\n \"docid\": \"03414ceee785d952e1b6ef62bed2544d\",\n \"score\": \"0.53202915\",\n \"text\": \"public function filterByTdate($tdate = null, $comparison = null)\\n {\\n if (is_array($tdate)) {\\n $useMinMax = false;\\n if (isset($tdate['min'])) {\\n $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\\n $useMinMax = true;\\n }\\n if (isset($tdate['max'])) {\\n $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\\n $useMinMax = true;\\n }\\n if ($useMinMax) {\\n return $this;\\n }\\n if (null === $comparison) {\\n $comparison = Criteria::IN;\\n }\\n }\\n\\n return $this->addUsingAlias(AliFmbonusTableMap::COL_TDATE, $tdate, $comparison);\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"690fceaae0bc63c2404145f48ff9ffea","score":"0.5598991","text":"public function scopeFilterByEndDate( $query )\n {\n $date = request() -> get( 'end_date' );\n\n if( $date )\n {\n try \n {\n $date = Carbon :: parse($date);\n $query -> whereDate( 'created_at', '<=', $date );\n }\n catch ( \\Exception $e )\n {\n // Do nothing, it's ok.\n }\n }\n }","title":""},{"docid":"8328dfebf8a9099bafbe5774103dcb4c","score":"0.5571023","text":"function filterByDate($date) {\n $this->setDateFilter(self::DATE_FILTER_SELECTED_DATE);\n $this->setAdditionalProperty('date_filter_on', (string) $date);\n }","title":""},{"docid":"c08962c7c785b20f767fd28d89121fac","score":"0.5482131","text":"function setDateFilter($value) {\n return $this->setAdditionalProperty('date_filter', $value);\n }","title":""},{"docid":"e4a449c3f8cdc0d9e48dc3298de665eb","score":"0.54168165","text":"function getFilterDate($top){\n\tif(!$top)\n\t\t$top=20;\n\n\t$data = M('event');\n\t$date_set = Array();\n\t$condition = Array('event_date' => Array('egt', todayDate()));\n\t$result = $data->where($condition)->group('event_date')->limit($top)->order('event_date asc')->select();\n\tforeach($result as $value)\n\t\tarray_push($date_set, $value['event_date']);\n\n\treturn $date_set;\n}","title":""},{"docid":"649c4720ba41fe12830c82114a444992","score":"0.5393599","text":"function filter_where( $where = '' ) {\r\n\t$where .= \" AND post_date > '\" . date('Y-m-d', strtotime('-99930 days')) . \"'\";\r\n\treturn $where;\r\n}","title":""},{"docid":"6def562ef81d28c5f5eb50bbfea3e457","score":"0.5375973","text":"static function apply($query) {\n\t\t$query = DateFilter::after($query);\n\t\t$query = DateFilter::before($query);\n\t\treturn $query;\n\t}","title":""},{"docid":"182a3d18f45a86ed0bf98349f52f6b47","score":"0.5351299","text":"function getFiltroTempoEntrega($get,$where = \" 1 = 1\"){\n \n if(isset($get['hrini']) && isset($get['hrfim'])){\n $hrIni = $get['hrini'];\n $hrFim = $get['hrfim'];\n if (!empty($hrIni) && !empty($hrFim)){\n \n return $where .= \" AND TO_CHAR(EXTRACT(HOUR from NUMTODSINTERVAL((to_date(DtFim,'YYYYMMDDHH24MISS') - to_date(DtIni,'YYYYMMDDHH24MISS')),'DAY')),'FM00') \n ||':' ||\n TO_CHAR(EXTRACT(Minute from NUMTODSINTERVAL((to_date(DtFim,'YYYYMMDDHH24MISS') - to_date(DtIni,'YYYYMMDDHH24MISS')),'DAY')),'FM00') \n BETWEEN '{$hrIni}' AND '{$hrFim}'\";\n \n }\n \n } \n }","title":""},{"docid":"c99027a145199e6371d147dbcde6ddbd","score":"0.5285243","text":"public function filterDataTable($query, $request)\n {\n if (isset($request['req']['from']) && $request['req']['from'] != '') {\n $query->whereDate('created_at', '>=', $request['req']['from']);\n }\n\n if (isset($request['req']['to']) && $request['req']['to'] != '') {\n $query->whereDate('created_at', '<=', $request['req']['to']);\n }\n\n if (isset($request['req']['type']) && $request['req']['type'] != '') {\n $query->where('type', '=', $request['req']['type']);\n }\n \n \n\n \n\n \n return $query;\n }","title":""},{"docid":"bfd9ff5f288d0e3b261fcee15a47e7fd","score":"0.52795666","text":"private function filterDay()\n {\n try {\n if(empty($this->day)) {\n return;\n }\n\n $dayDT = new DateTime(DateHelper::parseDateTime($this->day), DateHelper::getSystemTimeZone());\n\n $endDT = clone $dayDT;\n $endDT->setTime(23,59,59);\n $end = $endDT->getTimestamp();\n\n $start = $dayDT->setTime(0,0,0)->getTimestamp();\n\n $this->query->andWhere(['<=', 'log_time', $end]);\n $this->query->andWhere(['>=', 'log_time', $start]);\n\n } catch (\\Exception $e) {\n Yii::error($e, 'admin');\n }\n }","title":""},{"docid":"664b43fd6b1a85debac35639e47f5a68","score":"0.5276063","text":"function filter_where($where = '') {\n $postid = get_the_ID();\n $format = 'Y-m-d';\n $publish_date = get_the_date( $format, $postid);\n\n $where .= \" AND post_date <= '\" . $publish_date . \"'\";\n\n return $where;\n }","title":""},{"docid":"0b2acb92545d5fab94748179115ff620","score":"0.525917","text":"public function filterByTdate($tdate = null, $comparison = null)\n {\n if (is_array($tdate)) {\n $useMinMax = false;\n if (isset($tdate['min'])) {\n $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($tdate['max'])) {\n $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate, $comparison);\n }","title":""},{"docid":"d2074f34a539bb906bc316076bb6c049","score":"0.5222251","text":"function getDateFilter() {\n return $this->getAdditionalProperty('date_filter', self::DATE_FILTER_ANY);\n }","title":""},{"docid":"b23a21251213f50b2f1caf37026baa7f","score":"0.52122027","text":"public function filterByTdate($tdate = null, $comparison = null)\n {\n if (is_array($tdate)) {\n $useMinMax = false;\n if (isset($tdate['min'])) {\n $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($tdate['max'])) {\n $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate, $comparison);\n }","title":""},{"docid":"b734474cc5bbff22ac75badff18387e7","score":"0.51908195","text":"function wpfc_temp_filter_where( $where = '' ) {\n\t \t$where .= \" AND post_date >= '\".date(\"Y-m-d\", $_REQUEST['start']).\"' AND post_date < '\".date(\"Y-m-d\", $_REQUEST['end']).\"'\";\n\t \treturn $where;\n\t }","title":""},{"docid":"09ea27314e7785f927b8c13767ab3b3e","score":"0.5175028","text":"public function makeFilter_date($field, $date, $negate = false) {\r\n\t\treturn TodoyuSearchFilterHelper::makeFilter_date(self::TABLE, $field, $date, $negate);\r\n\t}","title":""},{"docid":"70edd964dcc805c34233b719ac222a31","score":"0.5145515","text":"function filter_where($where = '') {\n global $popular_days;\n //posts in the last X days\n $where .= \" AND post_date > '\" . date('Y-m-d', strtotime('-'.$popular_days.' days')) . \"'\";\n return $where;\n}","title":""},{"docid":"2dbded59e734c865f83222e187801c66","score":"0.51413924","text":"public function scopeFilterByStartDate( $query )\n { \n $date = request() -> get( 'start_date' );\n if( $date )\n {\n try \n {\n $date = Carbon :: parse( $date );\n $query -> whereDate( 'created_at', '>=', $date );\n }\n catch( \\Exception $e )\n {\n // Do nothing, it's ok.\n }\n }\n }","title":""},{"docid":"003db7cab4485178555808abda2f5786","score":"0.5117767","text":"function todays_posts_only($atts) {\n\n $DEFAULT_DATE = 'today';\n $DEFAULT_TEMPLATE_PART = 'content';\n\n // if we were not passed a date, use the default date instead\n if ((! array_key_exists ('date', $atts))\n || (is_null ($atts['date']))\n ) {\n $post_date = $DEFAULT_DATE;\n } else {\n $post_date = $atts['date'];\n }\n\n // if we were not passed a template part, use the default instead\n if ((! array_key_exists ('template_part', $atts))\n || (is_null ($atts['template_part']))\n ) {\n $template_part = $DEFAULT_TEMPLATE_PART;\n }\n\n // start with an empty query filter\n $query_filter = array();\n\n // parse the date string we were passed into an array\n // http://php.net/manual/en/function.date-parse.php\n $parsed_date = date_parse ($post_date);\n\n // add a query filter based on the specified date\n // https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters\n $query_filter['date_query'] = array(\n array(\n 'year' => $parsed_date['year'],\n 'month' => $parsed_date['mon'],\n 'day' => $parsed_date['day'],\n ),\n );\n\n // if we were passed a category (name), add that as a filter\n // http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters\n if ((array_key_exists ('category', $atts))\n && (! is_null ($atts['category']))\n ) {\n $query_filter['category_name'] = $atts['category'];\n }\n\n // if we were passed a tag, add that as a filter\n // https://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters\n if ((array_key_exists ('tag', $atts))\n && (! is_null ($atts['tag']))\n ) {\n $query_filter['tag'] = $atts['tag'];\n }\n\n // instantiate a new query based on the filter we've constructed\n // https://codex.wordpress.org/Class_Reference/WP_Query\n $custom_query = new WP_Query($query_filter);\n\n // if the query returned any posts, process them\n if ($custom_query->have_posts()) {\n\n // loop through all of the posts the query returned\n while ($custom_query->have_posts()) {\n $custom_query->the_post();\n\n $format = get_post_format();\n get_template_part($template_part, $format);\n\n }// end custom loop\n\n // restore the global $post from the main query loop\n // https://codex.wordpress.org/Function_Reference/wp_reset_postdata\n wp_reset_postdata();\n\n return '';\n\n } else {\n\n // restore the global $post from the main query loop\n // https://codex.wordpress.org/Function_Reference/wp_reset_postdata\n wp_reset_postdata();\n\n return FALSE;\n\n }// end if\n }","title":""},{"docid":"38b3e9854a990bb2ab53f45ee2655401","score":"0.5111801","text":"protected function _myDdateFilter($collection, $column)\n {\n /*if (!$value = $column->getFilter()->getValue()) {\n return $this;\n }\n $from = $filters['from'];\n $to = $filters['to'];\n if ($from) {\n $this->getCollection()->addFieldToFilter('main_table.ddate', array(\n 'gteq' => $from->toString('yyyy-MM-dd')\n ));\n }\n if ($to) {\n $this->getCollection()->addFieldToFilter('main_table.ddate', array(\n 'lteq' => $to->toString('yyyy-MM-dd')\n ));\n }*/\n if (!$value = $column->getFilter()->getValue()) {\n return $this;\n }\n $filters = $column->getFilter()->getValue();\n\n $from = $filters['from'];\n $to = $filters['to'];\n if($from)\n $this->getCollection()->addFieldToFilter('main_table.ddate', array('gteq' => $from->toString('yyyy-MM-dd')));\n if($to)\n $this->getCollection()->addFieldToFilter('main_table.ddate', array('lteq' => $to->toString('yyyy-MM-dd')));\n }","title":""},{"docid":"3b08661f7edaa14c8a6fe622ec941d38","score":"0.5092028","text":"public function filter_where($where = '') {\n $where .= \" AND post_date > '\" . date('Y-m-d', strtotime('-30 days')) . \"'\";\n return $where;\n }","title":""},{"docid":"bccca81a9edc66db9360ef38379b931a","score":"0.5086713","text":"protected function filteringWhereComparison($query, $value)\n {\n $compares = $this->explodeCompare($value);\n $query = $query->orWhere(function ($subquery) use ($compares) {\n foreach ($compares as $compare) {\n $function = $compare->function;\n $subquery = $subquery->$function(\n $this->isDate($compare->value)\n ? DB::raw(\"{$this->fieldName}\")\n : DB::raw(\"LOWER(\" . $this->fieldName . \")\"),\n $compare->compare,\n $this->transformValueForFilter($compare->value)\n );\n }\n });\n }","title":""},{"docid":"35ff25159072a07ba70ddce978f624ab","score":"0.508217","text":"public function filterByDate(&$row)\n {\n $row[3] = Carbon::createFromFormat('j/n/Y', $row[3]);\n return $row[3] >= $this->today;\n }","title":""},{"docid":"54061a225558221f1c8237026f381518","score":"0.5029461","text":"public function scopeOndate($query, $variable)\n\t{\n\t\tif(!is_array($variable))\n\t\t{\n\t\t\treturn $query->where('created_at', '<=', date('Y-m-d H:i:s', strtotime($variable)))->orderBy('created_at', 'desc');\n\t\t}\n\n\t\tif(!strtotime($variable[1]) && strtotime($variable[0]))\n\t\t{\n\t\t\treturn $query->where('created_at', '<=',date('Y-m-d H:i:s', strtotime($variable[0])));\n\t\t}\n\n\t\treturn $query->where('created_at', '>=', date('Y-m-d H:i:s', strtotime($variable[0])))->where('created_at', '<=', date('Y-m-d H:i:s', strtotime($variable[1])))->orderBy('created_at', 'asc');\n\t}","title":""},{"docid":"822eed995c267d0f18cd29a7b0bfaad8","score":"0.5021632","text":"public function addDateFilter()\n\t{\n\t\t$this->_addFilter(new DataGrid\\Filters\\DateFilter());\n\t\treturn $this->getFilter();\n\t}","title":""},{"docid":"74cf9818010cfdcaedbb9ad833b55a0e","score":"0.4995949","text":"function getFilterDatePast($top){\n\tif(!$top)\n\t\t$top=20;\n\n\t$data = M('event');\n\t$date_set = Array();\n\t$condition = Array('event_date' => Array('elt', todayDate()));\n\t$result = $data->where($condition)->group('event_date')->limit($top)->order('event_date desc')->select();\n\tforeach($result as $value)\n\t\tarray_push($date_set, $value['event_date']);\n\n\treturn $date_set;\n}","title":""},{"docid":"082149420af0f9396d43eabe86e47465","score":"0.49820295","text":"public function Filter_taskFilter($value, $negate = false) {\r\n\t\t$filterSets\t= TodoyuArray::intExplode(',', $value, true, true);\r\n\t\t$queryParts\t= false;\r\n\r\n\t\tif( sizeof($filterSets) === 0 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$taskFilter = new TodoyuProjectTaskFilter(array(array('filter' => 'filterSet', 'value' => $filterSets)));\r\n\r\n\t\t$queryArray = $taskFilter->getQueryArray();\r\n\t\t$queryArray['group']\t= '';\r\n\t\t$queryArray['fields']\t= str_ireplace('sql_calc_found_rows', '', $queryArray['fields']);\r\n\t\t$subQuery = TodoyuSql::buildSELECTquery($queryArray['fields'], $queryArray['tables'], $queryArray['where'], 'ext_project_task.id_project');\r\n\r\n\t\t// This double sub query is here for performance reasons (don't optimize it!)\r\n\t\t$subQuery = ' SELECT id FROM ( ' . $subQuery . ') as x';\r\n\r\n\t\t$compare\t= $negate ? ' NOT IN ' : ' IN ';\r\n\r\n\t\t$queryParts['tables']\t= array('ext_project_project', 'ext_project_task');\r\n\t\t$queryParts['where']\t= 'ext_project_task.id ' . $compare . ' (' . $subQuery . ')';\r\n\t\t$queryParts['join']\t\t= array('ext_project_project.id = ext_project_task.id_project');\r\n\r\n\t\treturn $queryParts;\r\n\t}","title":""},{"docid":"7cb33974d84a4ce89fe2d760941180ca","score":"0.49718788","text":"public function Filter_editdateDyn($value, $negate) {\r\n\t\t$timeStamps = TodoyuSearchFilterHelper::getDynamicDateTimestamp($value, $negate);\r\n\r\n\t\treturn $this->Filter_dateDyn($timeStamps, 'date_update', $negate);\r\n\t}","title":""},{"docid":"766cf849adf0e38003c61808d94e1f60","score":"0.49677926","text":"protected function applyDateFilter($field)\n {\n $dates = explode('..', $this->value);\n\n if(count($dates)=== 2){\n $timestampFrom = $this->dateParser->getTimestamp($dates[0].\" 00:00\");\n $timestampTo = $this->dateParser->getTimestamp($dates[1].\" 00:00\");\n\n $this->query->gte($field, $timestampFrom);\n $this->query->lte($field, $timestampTo + 86399);\n }\n }","title":""},{"docid":"f813b2cf3330cc821b7f70873d62a9f4","score":"0.49474782","text":"public function applyLatestOnlyCondition(Event $event)\n {\n /** @var \\yii\\db\\BaseActiveRecord|\\zarv1k\\sync\\twoway\\behavior\\model\\SyncableBehavior $model */\n $model = $event->data;\n /** @var \\yii\\db\\ActiveRecordInterface $modelClass */\n $modelClass = $this->owner->modelClass;\n /** @var ActiveQuery $activeQuery */\n $activeQuery = $event->sender;\n\n $updatedAfterDate = \\Yii::$app->request->getQueryParam($model->timestampQueryParam);\n\n $orderBy = [$model->timestampColumn => SORT_ASC];\n foreach ($modelClass::primaryKey() as $column) {\n $orderBy[$column] = SORT_ASC;\n }\n\n $activeQuery\n ->andFilterWhere(['>', $model->timestampColumn, $updatedAfterDate])\n ->addOrderBy($orderBy);\n\n Event::off(ActiveQuery::className(), ActiveQuery::EVENT_INIT, [$this, 'applyLatestOnlyCondition']);\n }","title":""},{"docid":"4522155795d06d294400964763848d49","score":"0.4945606","text":"public function twig_filter_sdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('sdate', function ($_string, $_max =\"day\", $_format =\"Y/m/d\")\n\t\t{\n\t\t\treturn \\lib\\utility::humanTiming($_string, $_max, $_format, $this->data->site['currentlang']);\n\t\t});\n\t}","title":""},{"docid":"a39596bbe68b64237776d95842c2b8fa","score":"0.4930032","text":"public function DateGreater($time) {\n $this->filter->Greater('udate', $time);\n }","title":""},{"docid":"d67ddc028d0c6200de4cf4fcf8826565","score":"0.49218166","text":"function getDateforStdFilterBytype($type)\n\t{\n\t\t//$thisyear = date(\"Y\");\n\t\t$maxdate = \"2099-12-31\";\n\t\t$mindate = \"1900-01-01\";\n\t\t$datevalue = array();\n\n\t\tif($type == \"today\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"yesterday\" )\n\t\t{\n\t\t\t$yesterday = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-1, date(\"Y\")));\n\t\t\t$datevalue[0] = $yesterday;\n\t\t\t$datevalue[1] = $yesterday;\n\t\t}\n\t\telseif($type == \"tomorrow\" )\n\t\t{\n\t\t\t$tomorrow = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+1, date(\"Y\")));\n\t\t\t$datevalue[0] = $tomorrow;\n\t\t\t$datevalue[1] = $tomorrow;\n\t\t}\n\t\telseif($type == \"thisweek\" )\n\t\t{\n\t\t\t$thisweek0 = date(\"Y-m-d\",strtotime(\"-1 week Sunday\"));\n\t\t\t$thisweek1 = date(\"Y-m-d\",strtotime(\"this Saturday\"));\n\t\t\t$datevalue[0] = $thisweek0;\n\t\t\t$datevalue[1] = $thisweek1;\n\t\t}\n\t\telseif($type == \"lastweek\" )\n\t\t{\n\t\t\t$lastweek0 = date(\"Y-m-d\",strtotime(\"-2 week Sunday\"));\n\t\t\t$lastweek1 = date(\"Y-m-d\",strtotime(\"-1 week Saturday\"));\n\t\t\t$datevalue[0] = $lastweek0;\n\t\t\t$datevalue[1] = $lastweek1;\n\t\t}\n\t\telseif($type == \"nextweek\" )\n\t\t{\n\t\t\t$nextweek0 = date(\"Y-m-d\",strtotime(\"this Sunday\"));\n\t\t $nextweek1 = date(\"Y-m-d\",strtotime(\"+1 week Saturday\"));\n\t\t\t$datevalue[0] = $nextweek0;\n\t\t\t$datevalue[1] = $nextweek1;\n\t\t}\n\t\telseif($type == \"thismonth\" )\n\t\t{\n\t\t\t$currentmonth0 = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\"), \"01\", date(\"Y\")));\n\t\t\t$currentmonth1 = date(\"Y-m-t\");\n\t\t\t$datevalue[0] =$currentmonth0;\n\t\t\t$datevalue[1] = $currentmonth1;\n\t\t}\n\n\t\telseif($type == \"lastmonth\" )\n\t\t{\n\t\t\t$lastmonth0 = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\")-1, \"01\", date(\"Y\")));\n\t\t\t$lastmonth1 = date(\"Y-m-t\", mktime(0, 0, 0, date(\"m\")-1, \"01\", date(\"Y\")));\n\t\t\t$datevalue[0] = $lastmonth0;\n\t\t\t$datevalue[1] = $lastmonth1;\n\t\t}\n\t\telseif($type == \"nextmonth\" )\n\t\t{\n\t\t\t$nextmonth0 = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\")+1, \"01\", date(\"Y\")));\n\t\t $nextmonth1 = date(\"Y-m-t\", mktime(0, 0, 0, date(\"m\")+1, \"01\", date(\"Y\")));\n\t\t\t$datevalue[0] = $nextmonth0;\n\t\t\t$datevalue[1] = $nextmonth1;\n\t\t}\n\t\telseif($type == \"next3days\" )\n\t\t{\n\t\t\t$next7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+2, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next7days;\n\t\t}\n\t\telseif($type == \"next7days\" )\n\t\t{\n\t\t\t$next7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+6, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next7days;\n\t\t}\n\t\telseif($type == \"next15days\" )\n\t\t{\n\t\t\t$next7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+14, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next7days;\n\t\t}\n\t\telseif($type == \"next30days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$next30days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+29, date(\"Y\")));\n\n\t\t\t$datevalue[0] =$today;\n\t\t\t$datevalue[1] =$next30days;\n\t\t}\n\t\telseif($type == \"next60days\" )\n\t\t{\n\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$next60days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+59, date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next60days;\n\t\t}\n\t\telseif($type == \"next90days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$next90days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+89, date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next90days;\n\t\t}\n\t\telseif($type == \"next180days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$next180days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+179, date(\"Y\")));\n\t\t\t$datevalue[0] = $today;\n\t\t\t$datevalue[1] = $next180days;\n\t\t}\n\t\telseif($type == \"before3days\" )\n\t\t{\n\t\t\t$before7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-3, date(\"Y\")));\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before7days;\n\t\t}\n\t\telseif($type == \"before7days\" )\n\t\t{\n\t\t\t$before7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-7, date(\"Y\")));\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before7days;\n\t\t}\n\t\telseif($type == \"before15days\" )\n\t\t{\n\t\t\t$before7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-15, date(\"Y\")));\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before7days;\n\t\t}\n\t\telseif($type == \"before30days\" )\n\t\t{\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$before30days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-30, date(\"Y\")));\n\n\t\t\t$datevalue[0] =$mindate;\n\t\t\t$datevalue[1] =$before30days;\n\t\t}\n\t\telseif($type == \"before60days\" )\n\t\t{\n\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$before60days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-60, date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before60days;\n\t\t}\n\t\telseif($type == \"before100days\" )\n\t\t{\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$before100days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-100, date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before100days;\n\t\t}\n\t\telseif($type == \"before180days\" )\n\t\t{\n\t\t\t//$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$before180days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-180, date(\"Y\")));\n\t\t\t$datevalue[0] = $mindate;\n\t\t\t$datevalue[1] = $before180days;\n\t\t}\n\t\telseif($type == \"after3days\" )\n\t\t{\n\t\t\t$after7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+2, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $after7days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after7days\" )\n\t\t{\n\t\t\t$after7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+6, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $after7days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after15days\" )\n\t\t{\n\t\t\t$after7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+14, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $after7days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after30days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$after30days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+29, date(\"Y\")));\n\n\t\t\t$datevalue[0] =$after30days;\n\t\t\t$datevalue[1] =$maxdate;\n\t\t}\n\t\telseif($type == \"after60days\" )\n\t\t{\n\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$after60days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+59, date(\"Y\")));\n\t\t\t$datevalue[0] = $after60days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after100days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$after100days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+99, date(\"Y\")));\n\t\t\t$datevalue[0] = $after100days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"after180days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$after180days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")+179, date(\"Y\")));\n\t\t\t$datevalue[0] = $after180days;\n\t\t\t$datevalue[1] = $maxdate;\n\t\t}\n\t\telseif($type == \"last3days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-2, date(\"Y\")));\n\t\t\t$datevalue[0] = $last7days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last7days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-6, date(\"Y\")));\n\t\t\t$datevalue[0] = $last7days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last15days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last7days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-14, date(\"Y\")));\n\t\t\t$datevalue[0] = $last7days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last30days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last30days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-29, date(\"Y\")));\n\t\t\t$datevalue[0] = $last30days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last60days\" )\n\t\t{\n\t\t\t$last60days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-59, date(\"Y\")));\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $last60days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telse if($type == \"last90days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last90days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-89, date(\"Y\")));\n\t\t\t$datevalue[0] = $last90days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"last180days\" )\n\t\t{\n\t\t\t$today = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\")));\n\t\t\t$last180days = date(\"Y-m-d\",mktime(0, 0, 0, date(\"m\") , date(\"d\")-179, date(\"Y\")));\n\t\t\t$datevalue[0] = $last180days;\n\t\t\t$datevalue[1] = $today;\n\t\t}\n\t\telseif($type == \"thisfy\" )\n\t\t{\n\t\t\t$currentFY0 = date(\"Y-m-d\",mktime(0, 0, 0, \"01\", \"01\", date(\"Y\")));\n\t\t\t$currentFY1 = date(\"Y-m-t\",mktime(0, 0, 0, \"12\", date(\"d\"), date(\"Y\")));\n\t\t\t$datevalue[0] = $currentFY0;\n\t\t\t$datevalue[1] = $currentFY1;\n\t\t}\n\t\telseif($type == \"prevfy\" )\n\t\t{\n\t\t\t$lastFY0 = date(\"Y-m-d\",mktime(0, 0, 0, \"01\", \"01\", date(\"Y\")-1));\n\t\t\t$lastFY1 = date(\"Y-m-t\", mktime(0, 0, 0, \"12\", date(\"d\"), date(\"Y\")-1));\n\t\t\t$datevalue[0] = $lastFY0;\n\t\t\t$datevalue[1] = $lastFY1;\n\t\t}\n\t\telseif($type == \"nextfy\" )\n\t\t{\n\t\t\t$nextFY0 = date(\"Y-m-d\",mktime(0, 0, 0, \"01\", \"01\", date(\"Y\")+1));\n\t\t\t$nextFY1 = date(\"Y-m-t\", mktime(0, 0, 0, \"12\", date(\"d\"), date(\"Y\")+1));\n\t\t\t$datevalue[0] = $nextFY0;\n\t\t\t$datevalue[1] = $nextFY1;\n\t\t}\n\t\telseif($type == \"nextfq\" )\n\t\t{\n\t\t\tif(date(\"m\") <= 3)\n\t\t\t{\n\t\t\t\t$nFq = date(\"Y-m-d\",mktime(0, 0, 0, \"04\",\"01\",date(\"Y\")));\n\t\t\t\t$nFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"06\",\"30\",date(\"Y\")));\n \t\t}else if(date(\"m\") > 3 and date(\"m\") <= 6)\n \t\t{\n\t\t\t\t$nFq = date(\"Y-m-d\",mktime(0, 0, 0, \"07\",\"01\",date(\"Y\")));\n\t\t\t\t$nFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"09\",\"30\",date(\"Y\")));\n\n \t\t}\n\t\t\telse if(date(\"m\") > 6 and date(\"m\") <= 9)\n \t\t{\n\t\t\t\t$nFq = date(\"Y-m-d\",mktime(0, 0, 0, \"10\",\"01\",date(\"Y\")));\n\t\t\t\t$nFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"12\",\"31\",date(\"Y\")));\n\n \t\t}\n\t\t\telse\n \t\t{\n\t\t\t\t$nFq = date(\"Y-m-d\",mktime(0, 0, 0, \"01\",\"01\",date(\"Y\")+1));\n\t\t\t\t$nFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"03\",\"31\",date(\"Y\")+1));\n \t\t}\n\t\t\t$datevalue[0] = $nFq;\n\t\t\t$datevalue[1] = $nFq1;\n\t\t}\n\t\telseif($type == \"prevfq\" )\n\t\t{\n\t\t\tif(date(\"m\") <= 3)\n\t\t\t{\n\t\t\t\t$pFq = date(\"Y-m-d\",mktime(0, 0, 0, \"10\",\"01\",date(\"Y\")-1));\n\t\t\t\t$pFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"12\",\"31\",date(\"Y\")-1));\n \t\t}\n\t\t\telse if(date(\"m\") > 3 and date(\"m\") <= 6)\n \t\t{\n\t\t\t\t$pFq = date(\"Y-m-d\",mktime(0, 0, 0, \"01\",\"01\",date(\"Y\")));\n\t\t\t\t$pFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"03\",\"31\",date(\"Y\")));\n\n \t\t}\n\t\t\telse if(date(\"m\") > 6 and date(\"m\") <= 9)\n \t\t{\n\t\t\t\t$pFq = date(\"Y-m-d\",mktime(0, 0, 0, \"04\",\"01\",date(\"Y\")));\n\t\t\t\t$pFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"06\",\"30\",date(\"Y\")));\n\n \t\t}\n\t\t\telse\n \t\t{\n\t\t\t\t$pFq = date(\"Y-m-d\",mktime(0, 0, 0, \"07\",\"01\",date(\"Y\")));\n\t\t\t\t$pFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"09\",\"30\",date(\"Y\")));\n \t\t}\n\t\t\t$datevalue[0] = $pFq;\n\t\t\t$datevalue[1] = $pFq1;\n\t\t}\n\t\telseif($type == \"thisfq\")\n\t\t{\n\t\t\tif(date(\"m\") <= 3)\n\t\t\t{\n\t\t\t\t$cFq = date(\"Y-m-d\",mktime(0, 0, 0, \"01\",\"01\",date(\"Y\")));\n\t\t\t\t$cFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"03\",\"31\",date(\"Y\")));\n\n \t\t}\n\t\t\telse if(date(\"m\") > 3 and date(\"m\") <= 6)\n \t\t{\n\t\t\t\t$cFq = date(\"Y-m-d\",mktime(0, 0, 0, \"04\",\"01\",date(\"Y\")));\n\t\t\t\t$cFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"06\",\"30\",date(\"Y\")));\n\n \t\t}\n\t\t\telse if(date(\"m\") > 6 and date(\"m\") <= 9)\n \t\t{\n\t\t\t\t$cFq = date(\"Y-m-d\",mktime(0, 0, 0, \"07\",\"01\",date(\"Y\")));\n\t\t\t\t$cFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"09\",\"30\",date(\"Y\")));\n\n \t\t}\n\t\t\telse\n \t\t{\n\t\t\t\t$cFq = date(\"Y-m-d\",mktime(0, 0, 0, \"10\",\"01\",date(\"Y\")));\n\t\t\t\t$cFq1 = date(\"Y-m-d\",mktime(0, 0, 0, \"12\",\"31\",date(\"Y\")));\n \t\t}\n\t\t\t$datevalue[0] = $cFq;\n\t\t\t$datevalue[1] = $cFq1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$datevalue[0] = \"\";\n\t\t\t$datevalue[1] = \"\";\n\t\t}\n\n\t\treturn $datevalue;\n\t}","title":""},{"docid":"fa0e17fa611ccba2165df9295d8210d5","score":"0.49126953","text":"public static function should_remove_date_filters( $query ) {\n\t\t\t// if we're doing ajax, let's keep the date filters\n\t\t\tif ( tribe( 'context' )->doing_ajax() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// otherwise, let's remove the date filters if we're in the admin dashboard and the query is\n\t\t\t// and event query on the tribe_events edit page\n\t\t\treturn (\n\t\t\t\tis_admin()\n\t\t\t\t&& $query->tribe_is_event_query\n\t\t\t\t&& Tribe__Admin__Helpers::instance()->is_screen( 'edit-' . Tribe__Events__Main::POSTTYPE )\n\t\t\t)\n\t\t\t|| true === $query->get( 'tribe_remove_date_filters', false );\n\t\t}","title":""},{"docid":"e1b464ecafb0a2f2a2362449ff8ddda8","score":"0.49040937","text":"protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and')\n {\n return $this->callHook(\"where{$type}\", $this->packArgs(compact('column', 'operator', 'value', 'boolean')));\n }","title":""},{"docid":"0cfe09eb23837ab2956242ed4eaf51d1","score":"0.48513946","text":"public function scopeFilter($query, $filters) {\n if( $month = $filters['month'] ) {\n\n // Carbon::parse($month)->month --> converts to month number. \n $query->whereMonth('created_at', Carbon::parse($month)->month );\n }\n\n if( $year = $filters['year'] ) {\n \n $query->whereYear('created_at', $year );\n }\n\n }","title":""},{"docid":"bfc550d60a0f4cdf059aeb8836fc95be","score":"0.48400205","text":"function get_date_where($max_levels=3)\n {\n global $page;\n $date = $page['chronology_date'];\n while (count($date)>$max_levels)\n {\n array_pop($date);\n }\n $res = '';\n if (isset($date[CYEAR]) and $date[CYEAR]!=='any')\n {\n $y = $date[CYEAR];\n $res = \" AND $this->date_field BETWEEN '$y-01-01' AND '$y-12-31 23:59:59'\";\n }\n\n if (isset($date[CWEEK]) and $date[CWEEK]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CWEEK]['sql'].'='.$date[CWEEK];\n }\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\n }\n if (empty($res))\n {\n $res = ' AND '.$this->date_field.' IS NOT NULL';\n }\n return $res;\n }","title":""},{"docid":"5a3756c6dc5a5e4d33663e92c688f0bb","score":"0.4837852","text":"public function scopePublishedAfter($query, $date)\n {\n $query->where('created_at', '>=', $date);\n }","title":""},{"docid":"0f395a8f5b5daff23da43e9bbb7fee71","score":"0.48036596","text":"function filtersecondary()\r\n\t{\t\r\n\t\t// make date and time variables\r\n\t\t$this->_setModelState();\r\n\t $model = $this->getModel( $this->get( 'suffix' ) );\r\n\t $state = $model->getState();\r\n\t \t\t\r\n\t\t$date->current = $state->filter_date_from; \r\n\t\t\r\n\t\t$date->month = date( 'm', strtotime($date->current) );\r\n\t\t$date->year = date( 'Y', strtotime($date->current) );\r\n\t\t\r\n\t\t// date time variables\r\n\t\t$date->days = $this->getDays( $date->current );\r\n\t\t$date->hours = $this->getHours( );\r\n\t\t\r\n\t\t// datetime matrix\r\n\t\t$datetime = array( );\r\n\t\tfor ( $i = 0; $i < 3; $i++ )\r\n\t\t{\r\n\t\t\tfor ( $j = 0; $j < 24; $j++ )\r\n\t\t\t{\r\n\t\t\t\t$dayskey = $date->days[$i];\r\n\t\t\t\t$hourskey = $date->hours[$j];\r\n\t\t\t\t$datetime[$dayskey][$hourskey] = '';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$date->datetime = $datetime;\r\n\t\t\r\n\t\t// navigation dates\r\n\t\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\r\n\t\t\r\n\t\t// aditional variables\r\n\t\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\r\n\t\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\r\n\t\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\r\n\t\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\r\n\t\t$date->nonworkingdays = $this->getNonWorkingDays( );\r\n\t\t\r\n\t\t// get categories for filtering\r\n\t\t\r\n\t\t$filter_category = JRequest::getVar( 'filter_category' );\r\n\t\t$model->setState( 'filter_secondary_category', $filter_category );\r\n\t\t\r\n\t\t$model->setState( 'order', 'tbl.eventinstance_date' );\r\n\t\t$model->setState( 'direction', 'ASC' );\r\n\t\t$query = $model->getQuery( );\r\n\t\t$query->order( 'tbl.eventinstance_time' );\r\n\t\t$model->setQuery( $query );\r\n\t\t\r\n\t\t$vars->date = $date;\r\n\t\t$vars->items = $model->getList( );\r\n\t\t\r\n\t\t$html = $this->getLayout( 'default', $vars, 'three' ); \r\n\t\techo ( json_encode( array('msg'=>$html) ) );\r\n\t}","title":""},{"docid":"f66d2227b3d26338fa6beaa1a0ef74de","score":"0.47997433","text":"public function filterAction()\r\n {\r\n \t/*\r\n \t * form needs to include:\r\n \t * \r\n \t * user id\r\n \t * task category\r\n \t * client id\r\n \t * project id\r\n \t * start date\r\n \t * end date\r\n \t */\r\n $this->view->allUsers = $this->userService->getUserList();\r\n $task = new Task();\r\n $this->view->categories = $task->constraints['category']->getValues();\r\n $this->view->clients = $this->clientService->getClients();\r\n \t $this->view->projects = new ArrayObject();\r\n $this->renderView('timesheet/filter.php'); \t\r\n }","title":""},{"docid":"4bca08df9b45888b725e7cb261e0c936","score":"0.4795844","text":"public function Filter_createdateDyn($value, $negate) {\r\n\t\t$timeStamps = TodoyuSearchFilterHelper::getDynamicDateTimestamp($value, $negate);\r\n\r\n\t\treturn $this->Filter_dateDyn($timeStamps, 'date_create', $negate);\r\n\t}","title":""},{"docid":"fafff90c9207fba1988ff1ffbab0e102","score":"0.47860122","text":"function getColumnFilter ( &$where = array(),\n $table,\n $column,\n $columnLogicOpr,\n $minOper,\n $minValue,\n $rangeLogicOper,\n $maxOper,\n $maxValue ) {\n if ( ($minOper != \"\" and $minValue != \"\") and ( $maxValue == \"\" )) {\n $where[] = \"$columnLogicOpr \".self::getTableAlias( $table ).\".$column \".self::assignSymbol( $minOper ).\" $minValue\";\n }\n // Assign just the max limit\n if ( ($maxOper != \"\" and $maxValue != \"\") and ( $minValue == \"\") ) {\n $where[] = \"$columnLogicOpr \". self::getTableAlias ($table) . \".$column \".self::assignSymbol($maxOper).\" $maxValue\";\n }\n\t// Assign both min and max limit\n if ( ($maxOper != \"\" and $maxValue != \"\") and ($minOper != \"\" and $minValue != \"\") ) {\n $where[] = \"$columnLogicOpr ( \".self::getTableAlias( $table ).\".$column \".self::assignSymbol( $minOper ).\" $minValue $rangeLogicOper \".\n self::getTableAlias ($table) . \".$column \".self::assignSymbol($maxOper).\" $maxValue )\";\n }\n }","title":""},{"docid":"2584725220447762439923e2d8bc3026","score":"0.47745287","text":"public function twig_filter_tdate()\n\t{\n\t\treturn new \\Twig_SimpleFilter('tdate', function ($_string, $_format =\"Y/m/d\", $_convert = true)\n\t\t{\n\t\t\t$result = $_string;\n\t\t\tif($this->data->site['currentlang'] == 'fa')\n\t\t\t{\n\t\t\t\t$result = \\lib\\utility\\jdate::date($_format, $_string, $_convert);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = date($_format, strtotime($_string));\n\t\t\t}\n\n\t\t\treturn $result;\n\t\t});\n\t}","title":""},{"docid":"f517a5ca5834e6e5e4e4b2eff85d02f4","score":"0.47505686","text":"function getDateFilterSelectedDate() {\n $on = $this->getAdditionalProperty('date_filter_on');\n \n return $on ? new DateValue($on) : null;\n }","title":""},{"docid":"f14f0bb14b3c29e8530aef625a9c52c5","score":"0.4737189","text":"protected function _applyDateRangeFilter()\n {\n // Remember that field PERIOD is a DATE(YYYY-MM-DD) in all databases including Oracle\n\n if ($this->_from !== null) {\n $this->getSelect()->where('created_time >= ?', $this->_from .' 00:00:00');\n }\n if ($this->_to !== null) {\n $this->getSelect()->where('created_time <= ?', $this->_to .' 23:59:59');\n }\n\n return $this;\n\n }","title":""},{"docid":"fe79d7023b0225b3c383194deb21150c","score":"0.4722661","text":"public function getFileFilterByDate($conn, $date){\n\t\t//preparo lo statement che mi ricava tutte le informazioni \n\t\t$sth = $conn->prepare(\"select * from Filmato_Presentazione where data_inizio >= :data_inizio or data_fine >= :data_fine limit 1\");\n\t\t$sth->bindParam(':data_inizio', $date, PDO::PARAM_STR);\n\t\t$sth->bindParam(':data_fine', $date, PDO::PARAM_STR);\n\t\t$sth->execute();\n\t\treturn $sth; \n\t}","title":""},{"docid":"39fa9551fa3b4601a727adc6e96a2865","score":"0.4722035","text":"public function filterByDate()\n {\n global $connection;\n //echo \"Im on the purchases ->filterByDate()\";\n\n //else\n //{\n #set_error_handler\n #set_exception_handler\n #call the stored procedure\n \n \n $SQLQuery = \"CALL purchases_filter_date(\"\n . \":fk_customer_id,\"\n . \":fk_product_id,\"\n . \":purchase_quantity,\"\n . \":purchase_price,\"\n . \":purchase_comment,\"\n . \":purchase_subtotal,\"\n . \":purchase_taxesAmount,\"\n . \":purchase_grandtotal,\"\n . \":purchase_id);\";\n $PDOStatement = $connection->prepare($SQLQuery);\n $PDOStatement->bindParam(\":fk_customer_id\", $this->customer_id);\n $PDOStatement->bindParam(\":fk_product_id\", $this->product_id);\n $PDOStatement->bindParam(\":purchase_quantity\", $this->purchase_quantity);\n $PDOStatement->bindParam(\":purchase_price\", $this->purchase_price);\n $PDOStatement->bindParam(\":purchase_comment\", $this->purchase_comment);\n $PDOStatement->bindParam(\":purchase_subtotal\", $this->purchase_subtotal);\n $PDOStatement->bindParam(\":purchase_taxesAmount\", $this->purchase_taxesAmount);\n $PDOStatement->bindParam(\":purchase_grandtotal\", $this->purchase_grandtotal);\n $PDOStatement->bindParam(\":purchase_id\", $this->purchase_id); \n $PDOStatement->execute(); \n }","title":""},{"docid":"5437479e75616da6193a7c1728715c59","score":"0.47145924","text":"function wck_fep_filter_auto_drafts_where( $where = '' ){\n\t\t// posts older than 12 hours\n\t\t$where .= \" AND post_date <= '\" . date('Y-m-d H:i:s', strtotime('-12 hours')) . \"'\";\n\t\treturn $where;\n\t}","title":""},{"docid":"d53ed9a83ecc78cfd48313520dbc5592","score":"0.47128385","text":"protected function filterQuery(&$query) {\n foreach($this->filter_params as $filter) {\n if(Input::has($filter)) {\n $val = Input::get($filter);\n $query->where($filter, '=', $val);\n }\n }\n }","title":""},{"docid":"bcb443e823d0ff4881080aea164a51ee","score":"0.4700585","text":"function get_occurs_within_where_clause($table_name, $rel_table, $start_ts_obj, $end_ts_obj, $field_name='date_start', $view){\n\t\tglobal $timedate;\n\t\n\t\t$start = clone $start_ts_obj;\n\t\t$end = clone $end_ts_obj;\n\n\t\t$field_date = $table_name.'.'.$field_name;\n\t\t$start_day = $GLOBALS['db']->convert(\"'{$start->asDb()}'\",'datetime');\n\t\t$end_day = $GLOBALS['db']->convert(\"'{$end->asDb()}'\",'datetime');\n\n\t\t$where = \"($field_date >= $start_day AND $field_date < $end_day\";\n\t\tif($rel_table != ''){\n\t\t\t$where .= \" AND $rel_table.accept_status != 'decline'\";\n\t\t}\n\n\t\t$where .= \")\";\n\t\treturn $where;\n\t}","title":""},{"docid":"8c27d34d0aa2f2fe3aae7b9c6d196f3d","score":"0.46966797","text":"function filterprimary()\r\n\t{\t\r\n\t\t// make date and time variables\r\n\t\t$this->_setModelState();\r\n\t $model = $this->getModel( $this->get( 'suffix' ) );\r\n\t $state = $model->getState();\r\n\t \t\t\r\n\t\t$date->current = $state->filter_date_from; \r\n\t\t\r\n\t\t$date->month = date( 'm', strtotime($date->current) );\r\n\t\t$date->year = date( 'Y', strtotime($date->current) );\r\n\t\t\r\n\t\t// date time variables\r\n\t\t$date->days = $this->getDays( $date->current );\r\n\t\t$date->hours = $this->getHours( );\r\n\t\t\r\n\t\t// datetime matrix\r\n\t\t$datetime = array( );\r\n\t\tfor ( $i = 0; $i < 3; $i++ )\r\n\t\t{\r\n\t\t\tfor ( $j = 0; $j < 24; $j++ )\r\n\t\t\t{\r\n\t\t\t\t$dayskey = $date->days[$i];\r\n\t\t\t\t$hourskey = $date->hours[$j];\r\n\t\t\t\t$datetime[$dayskey][$hourskey] = '';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$date->datetime = $datetime;\r\n\t\t\r\n\t\t// navigation dates\r\n\t\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\r\n\t\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\r\n\t\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\r\n\t\t\r\n\t\t// aditional variables\r\n\t\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\r\n\t\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\r\n\t\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\r\n\t\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\r\n\t\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\r\n\t\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\r\n\t\t$date->nonworkingdays = $this->getNonWorkingDays( );\r\n\t\t\r\n\t\t// take filter categories and do filtering\r\n\t\t$elements = json_decode( preg_replace('/[\\n\\r]+/', '\\n', JRequest::getVar( 'elements', '', 'post', 'string' ) ) );\r\n\t\t\r\n\t\t$categories = array();\r\n\t\tforeach($elements as $element)\r\n\t\t{\r\n\t\t\tif($element->checked && strpos ( $element->name , 'primary_cat_' ) !== false )\r\n\t\t\t{\r\n\t\t\t\t$categories[$element->name] = $element->value;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$model->setState( 'filter_primary_categories', $categories );\r\n\t\t\r\n\t\t// order event instances by date and time\r\n\t\t$model->setState( 'order', 'tbl.eventinstance_date' );\r\n\t\t$model->setState( 'direction', 'ASC' );\r\n\t\t$query = $model->getQuery( );\r\n\t\t$query->order( 'tbl.eventinstance_start_time' );\r\n\t\t$model->setQuery( $query );\r\n\t\t\r\n\t\t// attach variables to the $vars object\r\n\t\t$vars->date = $date;\r\n\t\t$vars->items = $model->getList( );\r\n\t\t\r\n\t\t// echo output\r\n\t\t$html = $this->getLayout( 'default', $vars, 'three' ); \r\n\t\techo ( json_encode( array('msg'=>$html) ) );\r\n\t}","title":""},{"docid":"783309896e344013dd9a51fa2f8e605f","score":"0.4695176","text":"abstract public function filter(Octopus_Model_ResultSet $resultSet, $query);","title":""},{"docid":"54ceeef96f5e97c5fbc56b29d00859c6","score":"0.46802437","text":"public static function filter($table, $fields){ \r\n $queryType = \"filter\";\r\n include '../helper/retrieve_data.php'; //query and data rertrieval are handled here\r\n return $querySet;\r\n }","title":""},{"docid":"cc050acd63a9a8029dd646d9c6436ace","score":"0.46778077","text":"function getFilterEndDate($date)\n{\n $endDate = date('Y-m-d', strtotime('+1 day', strtotime($date)));\n if (!$date)\n $endDate = date(\"9999-12-31 23:59:59\");\n return $endDate;\n}","title":""},{"docid":"f60d90b74247a8afc8908335dd22e012","score":"0.4664104","text":"protected function dates_filter(){\n \t//+Constraint Isgi: only one year data\n \t$temporal = $this->get_temporal();\n \tif( strtolower($temporal->end) == \"now\"){\n \t\t$now = new \\DateTime();\n \t\t$temporal->end = $now->format(\"Y-m-d\");\n \t}\n \t\n \t\n \t//change start and end\n \tif( $this->start < $temporal->start){\n \t\t$this->start = $temporal->start;\n \t}\n \tif( $this->end > $temporal->end){\n \t\t$this->end = $temporal->end;\n \t}\n \t$update = $this->get_update();\n \tif( !empty( $update) && $update < $this->end){\n \t\t$this->end = $update;\n \t}\n \t// diff between start and end\n \t$start = new \\DateTime( $this->start);\n \t$end = new \\DateTime( $this->end);\n \t$interval = $start->diff( $end);\n \tif( $interval->invert){\n \t\t//end < start\n \t\t$this->error = \"NO_DATA\";\n \t}else{\n\t \tif( $interval->days > 365){\n\t \t\t$start = clone $end;\n\t \t\t$start->sub( new \\DateInterval(\"P364D\"));\n\t \t\t$this->start = $start->format(\"Y-m-d\");\n\t \t}\n \t}\n }","title":""},{"docid":"7e1eb098b38e2b9121caf6a09c86b2ab","score":"0.46535712","text":"public function getFilterTimeCount() {\n \n $columns = array();\n $params = array();\n\n // TODAY\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :todayStart AND n.start_date <= :todayEnd \n OR\n n.end_date >= :todayStart AND n.end_date <= :todayEnd \n OR\n n.start_date < :todayStart AND n.end_date > :todayEnd \n THEN 1 \n ELSE 0 \n END\n ) as today\";\n $params['todayStart'] = $dateStart;\n $params['todayEnd'] = $dateEnd;\n\n // YESTERDAY\n $dateStart = new \\DateTime('yesterday');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = new \\DateTime('yesterday');\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :yesterdayStart AND n.start_date <= :yesterdayEnd \n OR\n n.end_date >= :yesterdayStart AND n.end_date <= :yesterdayEnd \n OR\n n.start_date < :yesterdayStart AND n.end_date > :yesterdayEnd \n THEN 1 \n ELSE 0 \n END\n ) as yesterday\";\n $params['yesterdayStart'] = $dateStart;\n $params['yesterdayEnd'] = $dateEnd;\n\n // THIS WEEK\n $today = new \\DateTime();\n if('Sunday' == $today->format('l')) {\n $dateStart = clone $today;\n $dateStart->modify('Monday last week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = $today;\n $dateEnd->setTime(23, 59, 59);\n } else {\n $dateStart = clone $today;\n $dateStart->modify('Monday this week');\n $dateStart->setTime(0, 0, 1);\n $dateEnd = clone $today;\n $dateEnd->modify('Sunday this week');\n $dateEnd->setTime(23, 59, 59);\n }\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :thisWeekStart AND n.start_date <= :thisWeekEnd \n OR\n n.end_date >= :thisWeekStart AND n.end_date <= :thisWeekEnd \n OR\n n.start_date < :thisWeekStart AND n.end_date > :thisWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as thisWeek\";\n $params['thisWeekStart'] = $dateStart;\n $params['thisWeekEnd'] = $dateEnd;\n\n // LAST WEEK\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P7D'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :lastWeekStart AND n.start_date <= :lastWeekEnd \n OR\n n.end_date >= :lastWeekStart AND n.end_date <= :lastWeekEnd \n OR\n n.start_date < :lastWeekStart AND n.end_date > :lastWeekEnd \n THEN 1 \n ELSE 0 \n END\n ) as lastWeek\";\n $params['lastWeekStart'] = $dateStart;\n $params['lastWeekEnd'] = $dateEnd;\n \n // PAST MONTH\n $dateStart = new \\DateTime();\n $dateStart->setTime(0, 0, 1);\n $dateStart->sub(new \\DateInterval('P1M'));\n $dateEnd = new \\DateTime();\n $dateEnd->setTime(23, 59, 59);\n $columns[] = \"\n SUM(\n CASE \n WHEN \n n.start_date >= :pastMonthStart AND n.start_date <= :pastMonthEnd \n OR\n n.end_date >= :pastMonthStart AND n.end_date <= :pastMonthEnd \n OR\n n.start_date < :pastMonthStart AND n.end_date > :pastMonthEnd \n THEN 1 \n ELSE 0 \n END\n ) as pastMonth\";\n $params['pastMonthStart'] = $dateStart;\n $params['pastMonthEnd'] = $dateEnd;\n\n return $this->createQueryBuilder('n')\n ->select(implode(', ', $columns))\n ->where('n.draft = false')\n ->setParameters($params)\n ->getQuery()\n ->getOneOrNullResult();\n }","title":""},{"docid":"ed0dbc56c4ec5ff82003b88078ea7601","score":"0.46339327","text":"public function scopePastEventsOnly($query)\n {\n return $query->where('date_start', '<=', Carbon::now());\n }","title":""},{"docid":"a7232f7057b4fc0f515fc3276c946037","score":"0.45658055","text":"public function findTribeEventsByDate($tribe) \n {\n $date = new \\DateTime('now'); \n $date->modify('-10 days');\n\n $qb = $this->createQueryBuilder('e')\n ->join('e.tribe', 't')\n ->addselect('t')\n ->join('e.user', 'u')\n ->addselect('u')\n ->join('e.category', 'c')\n ->addselect('c')\n ->where('e.tribe = :myTribe')\n ->andWhere('e.createdAt > :date')\n ->setParameters([\n 'myTribe' => $tribe,\n 'date' => $date\n ])\n ;\n\n return $qb->getQuery()->getArrayResult();\n }","title":""},{"docid":"b341324552dc2b52b593135e75ab43c8","score":"0.45548645","text":"protected function dateBasedWhere($type, Builder $query, $where)\n {\n $value = $this->parameter($where['value']);\n\n return $type.'('.$this->wrap($where['column']).') '.$where['operator'].' '.$value;\n }","title":""},{"docid":"88124f3461f00004563c5fb3c4b6f58e","score":"0.45537654","text":"public function setDate($value){\n return $this->setParameter('date', $value);\n }","title":""},{"docid":"0633c42d4b718250c4b318de604a8b66","score":"0.45497492","text":"protected function filterDate($date)\n {\n switch (true)\n {\n case (!$date || !strlen(trim(implode('', (array) $date)))):\n case (is_array($date) && (!isset($date['year']) || !isset($date['month']) || !isset($date['day']))):\n // $date is null or is an array with empty or zero string elements\n // or one of its components is not set (year, month, day)\n return null;\n case (is_array($date)):\n // is an array and is not bad formed\n return $date['year'].'-'.$date['month'].'-'.$date['day'];\n default:\n // is not an array\n return $date;\n }\n }","title":""},{"docid":"ca7ae146f421717ecda700a2ea4bb2a6","score":"0.45443663","text":"private function _sql_custom_date_filter($date_value, $operation='=') {\n\t\tglobal $wpdb;\n\t\tif ($date_value) {\n\t\t\t$query = \" AND ({$wpdb->postmeta}.meta_key = %s AND {$wpdb->postmeta}.meta_value $operation %s)\";\n\t\t\treturn $wpdb->prepare( $query, $this->date_column, $date_value );\n\t\t}\n\t\telse {\n\t\t\treturn '';\n\t\t}\n\t}","title":""},{"docid":"f799d8699899640cc1f0a4157a4d1244","score":"0.45411038","text":"function _max_date($field, $date)\r\n\t{\r\n\t\treturn (strtotime($this->{$field}) > strtotime($date)) ? FALSE : TRUE;\r\n\t}","title":""},{"docid":"c84b9cf932d345078d68746c655dfb0f","score":"0.45355132","text":"public function scopeResultsLastPublishedAt($query)\n {\n // Get the last published_at from results\n $lastPublishedAt = $this->latest('published_at')->value('published_at');\n\n // Filter the results of the last pusblished_at\n return $query->where('published_at', $lastPublishedAt);\n }","title":""},{"docid":"7a8bfe179af1c821a2864bc9929d8402","score":"0.4531833","text":"public function scopeLastDate($query) {\n return $query->orderBy('date', 'desc');\n }","title":""},{"docid":"8f96d9fe96cabe779ea2659bcbcea071","score":"0.45195037","text":"private function modifyQuery($query, $tasksTable, $casesTable, $tpTable, $filteredTasksTable = false, $args)\n\t{\n\t\t$type = 'default';\n\t\tif (!empty($args['type'])) {\n\t\t\t$type = $args['type'];\n\t\t}\n\n\t\t$query->whereNested(function ($query) use ($tasksTable, $casesTable, $tpTable, $filteredTasksTable, $args) {\n\t\t\tif (!empty($args['addConditions'])) {\n\t\t\t\t$args['addConditions']($query);\n\t\t\t}\n\n\t\t\tif ($tasksTable) {\n\t\t\t\tif (count($this->fields->assignee)) {\n\t\t\t\t\t$query->whereIn(\"{$tasksTable}.assignee_id\", $this->fields->assignee);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->assignor)) {\n\t\t\t\t\t$query->whereIn(\"{$tasksTable}.assignor_id\", $this->fields->assignor);\n\t\t\t\t}\n\t\t\t\tif ($this->fields->surveystatus !== false) {\n\t\t\t\t\t$query->where(\"{$tasksTable}.status\", '=', $this->fields->surveystatus);\n\t\t\t\t}\n\t\t\t\tif (!$casesTable) {\n\t\t\t\t\tif (count($this->fields->caseid)) {\n\t\t\t\t\t\t$query->whereIn(\"{$tasksTable}.case_id\", $this->fields->caseid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($casesTable) {\n\t\t\t\tif ($this->fields->casestatus !== false) {\n\t\t\t\t\t$query->where(\"{$casesTable}.status\", '=', $this->fields->casestatus);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->patient)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.patient_id\", $this->fields->patient);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->tp)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.treatment_path_id\", $this->fields->tp);\n\t\t\t\t}\n\t\t\t\tif (count($this->fields->tpstep)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.step_id\", $this->fields->tpstep);\n\t\t\t\t}\n\n\t\t\t\tif (count($this->fields->caseid)) {\n\t\t\t\t\t$query->whereIn(\"{$casesTable}.id\", $this->fields->caseid);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($tpTable) {\n\t\t\t\tif (count($this->fields->cp)) {\n\t\t\t\t\t$query->whereIn(\"{$tpTable}.clinical_path_id\", $this->fields->cp);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($filteredTasksTable) {\n\t\t\t\t$query->whereNotNull(\"{$filteredTasksTable}.id\");\n\t\t\t}\n\t\t});\n\n\t\treturn $query;\n\t}","title":""},{"docid":"301de3df9ea0a7a9279cf1a6b4c94cff","score":"0.45118698","text":"protected function dateBasedWhere(string $type, Builder $query, array $where)\n {\n $value = $this->parameter($where['value']);\n\n return $type . '(' . $this->wrap($where['column']) . ') ' . $where['operator'] . ' ' . $value;\n }","title":""},{"docid":"5854f0a4adfc98c89535fa198f80a0cc","score":"0.45077533","text":"protected function filter(&$query)\n {\n if (!empty($this->filterModel)) {\n if (isset($this->filterModel->status_id)) {\n $query->andWhere(['status' => $this->filterModel->status_id]);\n }\n }\n }","title":""},{"docid":"100ac7a6afac18a139e5a00abf201650","score":"0.45069352","text":"private static function _getFilter() {}","title":""},{"docid":"c131d6eb0725d75e813946262691f47d","score":"0.45003167","text":"private function compare_with_date()\n {\n }","title":""},{"docid":"ab8e304136c6568e7c8b94932665f501","score":"0.44866413","text":"public function get_filter_data()\n {\n if(!empty($_POST['cntxt']))\n {\n if($_POST['cntxt']=='today')\n {\n $from_date=date('Y-m-d');\n $to_date=date('Y-m-d');\n }\n // echo date('d/m/Y', strtotime('-7 days'));\n if($_POST['cntxt']=='7 days')\n {\n $to_date=date('Y-m-d');\n $from_date = date('Y-m-d',strtotime(\"-7 days\"));\n }\n if($_POST['cntxt']=='30 days')\n {\n $to_date=date('Y-m-d');\n $from_date = date('Y-m-d',strtotime(\"-30 days\"));\n }\n if($_POST['cntxt']=='this month')\n {\n $to_date=date('Y-m-d');\n $from_date = date('Y-m-01');\n }\n if($_POST['cntxt']=='last month')\n {\n $to_date= date('Y-m-d', strtotime('last day of last month'));\n $from_date = date('Y-m-d', strtotime('first day of last month'));\n }\n \n $this->process_data($from_date,$to_date); \n }\n else\n {\n $data['status_text']='Input error';\n $data['status_code']='0';\n echo json_encode($data);\n }\n \n }","title":""},{"docid":"051486b035ce2ad935f9d1d46af6592f","score":"0.44836998","text":"public function filter($date)\n {\n if (empty($date)) {\n return null;\n } elseif (is_string($date)) {\n return $date;\n } elseif (!is_array($date) || empty($date['year']) || empty($date['month']) || empty($date['day'])) {\n return null;\n }\n\n return $date['year'] . '-' . $date['month'] . '-' . $date['day'];\n }","title":""},{"docid":"678e5388c6962f57f83270db89bad216","score":"0.4483415","text":"public function __invoke($query, $input)\n {\n $arguments = $this->getFilterParams($input);\n\n return $query->where($arguments);\n }","title":""},{"docid":"34a44132503d56a91d768fa9b72dd44e","score":"0.44764555","text":"public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->exemplar_id) AND ( (is_scalar($data->exemplar_id) AND $data->exemplar_id !== '') OR (is_array($data->exemplar_id) AND (!empty($data->exemplar_id)) )) )\n {\n\n $filters[] = new TFilter('exemplar_id', '=', $data->exemplar_id);// create the filter \n }\n\n if (isset($data->leitor_id) AND ( (is_scalar($data->leitor_id) AND $data->leitor_id !== '') OR (is_array($data->leitor_id) AND (!empty($data->leitor_id)) )) )\n {\n\n $filters[] = new TFilter('leitor_id', '=', $data->leitor_id);// create the filter \n }\n\n if (isset($data->dt_emprestimo) AND ( (is_scalar($data->dt_emprestimo) AND $data->dt_emprestimo !== '') OR (is_array($data->dt_emprestimo) AND (!empty($data->dt_emprestimo)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '>=', $data->dt_emprestimo);// create the filter \n }\n\n if (isset($data->dt_emprestimo_final) AND ( (is_scalar($data->dt_emprestimo_final) AND $data->dt_emprestimo_final !== '') OR (is_array($data->dt_emprestimo_final) AND (!empty($data->dt_emprestimo_final)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '<=', $data->dt_emprestimo_final);// create the filter \n }\n\n if (isset($data->dt_previsao) AND ( (is_scalar($data->dt_previsao) AND $data->dt_previsao !== '') OR (is_array($data->dt_previsao) AND (!empty($data->dt_previsao)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '>=', $data->dt_previsao);// create the filter \n }\n\n if (isset($data->dt_prevista_final) AND ( (is_scalar($data->dt_prevista_final) AND $data->dt_prevista_final !== '') OR (is_array($data->dt_prevista_final) AND (!empty($data->dt_prevista_final)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '<=', $data->dt_prevista_final);// create the filter \n }\n\n if (isset($data->dt_devolucao) AND ( (is_scalar($data->dt_devolucao) AND $data->dt_devolucao !== '') OR (is_array($data->dt_devolucao) AND (!empty($data->dt_devolucao)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '>=', $data->dt_devolucao);// create the filter \n }\n\n if (isset($data->dt_devolucao_final) AND ( (is_scalar($data->dt_devolucao_final) AND $data->dt_devolucao_final !== '') OR (is_array($data->dt_devolucao_final) AND (!empty($data->dt_devolucao_final)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '<=', $data->dt_devolucao_final);// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n $this->onReload($param);\n }","title":""},{"docid":"eaa57f83d7817bc1eb3d5f6c49a72265","score":"0.44731528","text":"protected function _applyDateRangeFilter() {\r\n return $this;\r\n }","title":""},{"docid":"9916963fafe241a55e41316b3bde7ada","score":"0.44635335","text":"function get_date_where($max_levels=3)\n {\n global $page;\n\n $date = $page['chronology_date'];\n while (count($date)>$max_levels)\n {\n array_pop($date);\n }\n $res = '';\n if (isset($date[CYEAR]) and $date[CYEAR]!=='any')\n {\n $b = $date[CYEAR] . '-';\n $e = $date[CYEAR] . '-';\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\n {\n $b .= sprintf('%02d-', $date[CMONTH]);\n $e .= sprintf('%02d-', $date[CMONTH]);\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\n {\n $b .= sprintf('%02d', $date[CDAY]);\n $e .= sprintf('%02d', $date[CDAY]);\n }\n else\n {\n $b .= '01';\n $e .= $this->get_all_days_in_month($date[CYEAR], $date[CMONTH]);\n }\n }\n else\n {\n $b .= '01-01';\n $e .= '12-31';\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];\n }\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\n }\n }\n $res = \" AND $this->date_field BETWEEN '$b' AND '$e 23:59:59'\" . $res;\n }\n else\n {\n $res = ' AND '.$this->date_field.' IS NOT NULL';\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];\n }\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\n {\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\n }\n }\n return $res;\n }","title":""},{"docid":"a9fbb2515b46cfb27dbf15780897b1be","score":"0.44630572","text":"private function sql_whereAnd_fromTS()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS value\n $andWhere = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'sql.' ][ 'andWhere' ];\n\n if ( !empty( $andWhere ) )\n {\n $andWhere = \" AND \" . $andWhere;\n }\n\n // RETURN AND WHERE statement\n return $andWhere;\n }","title":""},{"docid":"ce5b5e4fbff6c0548d9698e75312bb83","score":"0.44617042","text":"public function __invoke($query, $input)\n {\n $arguments = $this->getFilterParams($input);\n \n // Convert the invoice_date parameter to created_at parameter\n if ( isset($arguments['invoice_date'])) {\n\n $arguments['created_at'] = $arguments['invoice_date'];\n\n unset($arguments['invoice_date']);\n }\n\n // Convert the grand_total parameter to base_grand_total parameter\n if ( isset($arguments['grand_total'])) {\n\n $arguments['base_grand_total'] = $arguments['grand_total'];\n\n unset($arguments['grand_total']);\n }\n\n return $query->where($arguments);\n }","title":""},{"docid":"1603cd3124cde07cf1ad4d75dbec19ad","score":"0.4458376","text":"protected function addCommonViewFiltersForDate(QueryBuilder $qb)\n {\n if (null === $this->request) {\n return $qb;\n }\n $routeName = $this->request->get('_route');\n if (false !== strpos($routeName, 'edit')) {\n return $qb;\n }\n \n $parameters = $this->getViewQuickNavParametersForDate();\n foreach ($parameters as $k => $v) {\n if ($k == 'catId') {\n if (intval($v) > 0) {\n // single category filter\n $qb->andWhere('tblCategories.category = :category')\n ->setParameter('category', $v);\n }\n continue;\n }\n if ($k == 'catIdList') {\n // multi category filter\n $qb = $this->categoryHelper->buildFilterClauses($qb, 'date', $v);\n continue;\n }\n if (in_array($k, ['q', 'searchterm'])) {\n // quick search\n if (!empty($v)) {\n $qb = $this->addSearchFilter('date', $qb, $v);\n }\n continue;\n }\n \n if (is_array($v)) {\n continue;\n }\n \n // field filter\n if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) {\n if ($k == 'workflowState' && substr($v, 0, 1) == '!') {\n $qb->andWhere('tbl.' . $k . ' != :' . $k)\n ->setParameter($k, substr($v, 1, strlen($v)-1));\n } elseif (substr($v, 0, 1) == '%') {\n $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)\n ->setParameter($k, '%' . substr($v, 1) . '%');\n } else {\n $qb->andWhere('tbl.' . $k . ' = :' . $k)\n ->setParameter($k, $v);\n }\n }\n }\n \n $qb = $this->applyDefaultFiltersForDate($qb, $parameters);\n \n return $qb;\n }","title":""},{"docid":"adb2c29ef357a43f532d1a361f5acd27","score":"0.44578302","text":"public function ShowTicketsFilter($date, $idMovie, $idUser){\n\n $ticketList = $this->ticketDAO->GetFilteredTicket($date, $idMovie, $idUser);\n $ticketFilter = $this->ticketDAO->GetMovie($idUser);\n if($ticketList == null){\n $message = \"La bùsqueda no arrojo ninguna entrada para el dia de hoy.\";\n $this->ShowTicketsView($message, $idUser);\n }\n require_once (VIEWS_PATH . \"ticket-list.php\");\n }","title":""},{"docid":"3e1c19a8b254b77d60b617fd74675fe0","score":"0.44563895","text":"public function searchpast($params)\n {\n\n if(Yii::$app->user->identity['role']=='student') {\n $date1= date('Y-m-d H:i:s', time()+60*60*5+30*60);\n// print_r(gettype($date1));\n\n $query = Quiz::find()->where(['<', 'endtime', $date1]);\n /* $query = Quiz::find()->where(['quizid'=>2])->one();\n print_r($query['endtime']);\n exit();\n*/\n }\n\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'quizid' => $this->quizid,\n 'starttime' => $this->starttime,\n 'endtime' => $this->endtime,\n 'totalscore' => $this->totalscore,\n 'totalquestions' => $this->totalquestions,\n ]);\n\n $query->andFilterWhere(['like', 'quizname', $this->quizname])\n ->andFilterWhere(['like', 'inchargename', $this->inchargename])\n ->andFilterWhere(['like', 'courseid', $this->courseid])\n ->andFilterWhere(['like', 'coursename', $this->coursename])\n ->andFilterWhere(['like', 'department', $this->department])\n ->andFilterWhere(['like', 'setterid', $this->setterid]);\n\n return $dataProvider;\n }","title":""},{"docid":"e4e1dc592a2451922931146e6efb7251","score":"0.44499135","text":"public function on_filter( $query ) {\n\t global $post_type, $pagenow;\n \tif( !$pagenow == 'edit.php' || \n \t\t$post_type != $this->get_id() || \n \t\t!$query->is_main_query() ) {\n \t\treturn;\n \t}\n\n \tforeach ($this->args['columns'] as $key => $col) {\n\t\t\tif( empty( $col['filter_cb'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( !isset( $_GET[$key] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$col['filter_cb']( $query, $_GET[$key] );\n \t}\n\n \treturn $query;\n\t}","title":""},{"docid":"4f09dbf0e82d027e3521e0a441398056","score":"0.44462866","text":"public function scopeMonth($query,$filters){\n if($month = $filters['month']){\n $query->whereMonth('created_at', Carbon::parse($month)->month);\n }\n\n if($year = $filters['year']){\n $query->whereYear('created_at',$year);\n }\n\n }","title":""},{"docid":"1ec3b531c1b2d6aa03a7fb44f9dd2176","score":"0.4445821","text":"function getFilterStartDate($date)\n{\n $startDate = date($date);\n if (!$startDate)\n $startDate = date(\"1000-01-01 00:00:00\");\n return $startDate;\n}","title":""},{"docid":"add15e53d9f4dbb5b7f51d6366db8b3f","score":"0.444326","text":"public function applyFilter(Query $query);","title":""},{"docid":"37aba9d83e9083e0d8dda303abf13d63","score":"0.44348836","text":"public function createQuery($filtered = TRUE) {\n\t\t$query = parent::createQuery();\n\t\tif ($filtered === TRUE) {\n\t\t\t$startDate = new \\DateTime('last Friday');\n\t\t\t$query->matching($query->greaterThan('created', $startDate));\n\t\t\t$query->setOrderings(array(\n\t\t\t\t'created' => \\TYPO3\\Flow\\Persistence\\QueryInterface::ORDER_DESCENDING\n\t\t\t));\n\n\t\t\t$customers = $this->customerRepository->findAll()->toArray();\n\n\t\t\t$ratings = array();\n\t\t\tforeach ($query->execute() as $rating) {\n\t\t\t\tif (in_array($rating->getCustomer(), $customers)) {\n\t\t\t\t\t$identifier = $this->persistenceManager->getIdentifierByObject($rating->getCustomer());\n\t\t\t\t\t$ratings[] = $rating;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$query = new \\Famelo\\ADU\\Domain\\ArrayQuery();\n\t\t\t$query->setArray($ratings);\n\t\t\treturn $query;\n\t\t}\n\t\treturn $query;\n\t}","title":""},{"docid":"f5c2971cd1f633cbeb5e444eb830a608","score":"0.4422316","text":"public function scopeSearch($query, $filter)\n {\n return $query->where('date', '=', $filter)\n // INNER JOIN dealers d on d.id=t.id_dealer\n ->join('dealers', 'tasks.id_dealer', '=', 'dealers.id') \n ;\n \n }","title":""},{"docid":"3a863e911d2047d102707cf08fe0bc62","score":"0.44204935","text":"public static function getDateFilterTypes()\n\t{\n\t\t$dateFilters = Array('custom' => array('label' => 'LBL_CUSTOM'),\n\t\t\t'prevfy' => array('label' => 'LBL_PREVIOUS_FY'),\n\t\t\t'thisfy' => array('label' => 'LBL_CURRENT_FY'),\n\t\t\t'nextfy' => array('label' => 'LBL_NEXT_FY'),\n\t\t\t'prevfq' => array('label' => 'LBL_PREVIOUS_FQ'),\n\t\t\t'thisfq' => array('label' => 'LBL_CURRENT_FQ'),\n\t\t\t'nextfq' => array('label' => 'LBL_NEXT_FQ'),\n\t\t\t'yesterday' => array('label' => 'LBL_YESTERDAY'),\n\t\t\t'today' => array('label' => 'LBL_TODAY'),\n\t\t\t'tomorrow' => array('label' => 'LBL_TOMORROW'),\n\t\t\t'lastweek' => array('label' => 'LBL_LAST_WEEK'),\n\t\t\t'thisweek' => array('label' => 'LBL_CURRENT_WEEK'),\n\t\t\t'nextweek' => array('label' => 'LBL_NEXT_WEEK'),\n\t\t\t'lastmonth' => array('label' => 'LBL_LAST_MONTH'),\n\t\t\t'thismonth' => array('label' => 'LBL_CURRENT_MONTH'),\n\t\t\t'nextmonth' => array('label' => 'LBL_NEXT_MONTH'),\n\t\t\t'last7days' => array('label' => 'LBL_LAST_7_DAYS'),\n\t\t\t'last15days' => array('label' => 'LBL_LAST_15_DAYS'),\n\t\t\t'last30days' => array('label' => 'LBL_LAST_30_DAYS'),\n\t\t\t'last60days' => array('label' => 'LBL_LAST_60_DAYS'),\n\t\t\t'last90days' => array('label' => 'LBL_LAST_90_DAYS'),\n\t\t\t'last120days' => array('label' => 'LBL_LAST_120_DAYS'),\n\t\t\t'next15days' => array('label' => 'LBL_NEXT_15_DAYS'),\n\t\t\t'next30days' => array('label' => 'LBL_NEXT_30_DAYS'),\n\t\t\t'next60days' => array('label' => 'LBL_NEXT_60_DAYS'),\n\t\t\t'next90days' => array('label' => 'LBL_NEXT_90_DAYS'),\n\t\t\t'next120days' => array('label' => 'LBL_NEXT_120_DAYS')\n\t\t);\n\t\tforeach ($dateFilters as $filterType => $filterDetails) {\n\t\t\t$dateValues = \\DateTimeRange::getDateRangeByType($filterType);\n\t\t\t$dateFilters[$filterType]['startdate'] = $dateValues[0];\n\t\t\t$dateFilters[$filterType]['enddate'] = $dateValues[1];\n\t\t}\n\t\treturn $dateFilters;\n\t}","title":""},{"docid":"08ea376d1e60be037efc5c7c56995a4b","score":"0.4416581","text":"function filter($exprs=array(), $gexprs=array())\n\t{\n\t\t$where = array('sql'=>array(), 'args'=>array());\n\t\t$having = array('sql'=>array(), 'args'=>array());\n\t\tforeach($_REQUEST as $k=>$v) {\n\t\t\t$args = array();\n\t\t\t$sql = array();\n\n\t\t\tif($v === '') continue;\n\t\t\tif(!preg_match('|^f_[dts]_|', $k)) continue;\n\t\t\t$t = substr($k, 2, 1);\n\t\t\t$k = substr($k, 4);\n\t\t\t// only alphanumerics allowed\n\t\t\tif(!preg_match('|^[A-z0-9_-]+$|', $k)) continue;\n\t\t\tswitch($t) {\n\t\t\t\tcase 'd': $coltype = 'date'; break;\n\t\t\t\tcase 's': $coltype = 'select'; break;\n\t\t\t\tcase 't':\n\t\t\t\tdefault: $coltype = 'text';\n\t\t\t}\n\n\t\t\t// look for an expression passed to the function first -- this is\n\t\t\t// used for trickier SQL expressions, eg, functions\n\t\t\tif(isset($exprs[$k])) {\n\t\t\t\t$s = $exprs[$k];\n\t\t\t\t$t = 'where';\n\t\t\t} else if(isset($gexprs[$k])) {\n\t\t\t\t$s = $gexprs[$k];\n\t\t\t\t$t = 'having';\n\t\t\t} else {\n\t\t\t\t// use the literal column name\n\t\t\t\t$s = \"\\\"$k\\\"\";\n\t\t\t\t$t = 'where';\n\t\t\t}\n\n\t\t\t$range = explode('<>', $v);\n\t\t\tif(count($range) == 2) {\n\t\t\t\t// double-bounded range\n\t\t\t\t$sql[] = \"($s>='%s' AND $s<='%s')\";\n\t\t\t\t$args[] = $range[0];\n\t\t\t\t$args[] = $range[1];\n\t\t\t} else if(strlen($v) == 1) {\n\t\t\t\t// no range (explicit)\n\t\t\t\t// FYI: this check is needed, as the \"else\" block assumes\n\t\t\t\t// a string length of at least 2\n\t\t\t\t$sql[] = is_numeric($v) ? \"$s='%s'\" : \"$s LIKE '%%s%'\";\n\t\t\t\t$args[] = $v;\n\t\t\t} else {\n\t\t\t\t// everything else: single-bounded range, eq, neq, like, not like\n\t\t\t\t$chop = 0;\n\t\t\t\t$like = false;\n\t\t\t\tswitch(substr($v, 0, 1)) {\n\t\t\t\t\tcase '=': // exactly equals to\n\t\t\t\t\t\t$s .= '=';\n\t\t\t\t\t\t$chop = 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '>': // greater than\n\t\t\t\t\t\tif(substr($v, 1, 1) == '=') {\n\t\t\t\t\t\t\t$s .= '>=';\n\t\t\t\t\t\t\t$chop = 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$s .= '>';\n\t\t\t\t\t\t\t$chop = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '<': // less than\n\t\t\t\t\t\tif(substr($v, 1, 1) == '=') { \n\t\t\t\t\t\t\t$s .= '<=';\n\t\t\t\t\t\t\t$chop = 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$s .= '<';\n\t\t\t\t\t\t\t$chop = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '!': // does not contain\n\t\t\t\t\t\tif(substr($v, 1, 1) == '=') {\n\t\t\t\t\t\t\t$s .= '!=';\n\t\t\t\t\t\t\t$chop = 2;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$s .= ' NOT LIKE ';\n\t\t\t\t\t\t\t$chop = 1;\n\t\t\t\t\t\t\t$like = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: // contains\n\t\t\t\t\t\t$s .= ' LIKE ';\n\t\t\t\t\t\t$like = true;\n\t\t\t\t}\n\t\t\t\t$v = substr($v, $chop);\n\t\t\t\tif($like) {\n\t\t\t\t\t$s .= \"'%%s%'\";\n\t\t\t\t} else {\n\t\t\t\t\t$s .= \"'%s'\";\n\t\t\t\t}\n\t\t\t\t$sql[] = $s;\n\t\t\t\t$args[] = $v;\n\n\t\t\t\t// special handling for various filter types\n\t\t\t\tif($coltype == 'date' && $chop) {\n\t\t\t\t\t// don't include the default '0000-00-00' fields in ranged selections\n\t\t\t\t\t$s = isset($exprs[$k]) ? $exprs[$k] : \"\\\"$k\\\"\";\n\t\t\t\t\t$s .= \"!='0000-00-00'\";\n\t\t\t\t\t$sql[] = $s;\n\t\t\t\t}\n\t\t\t}\n\t\t\tswitch($t) {\n\t\t\t\tcase 'where':\n\t\t\t\t\t$where['sql'] = array_merge($where['sql'], $sql);\n\t\t\t\t\t$where['args'] = array_merge($where['args'], $args);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'having':\n\t\t\t\t\t$having['sql'] = array_merge($having['sql'], $sql);\n\t\t\t\t\t$having['args'] = array_merge($having['args'], $args);\n\t\t\t}\n\t\t}\n\n\t\t// ensure the WHERE clause always has something in it\n\t\t$where['sql'][] = '1=1';\n\n\t\t$final = array(implode(' AND ', $where['sql']), $where['args']);\n\t\tif(!empty($having['sql'])) {\n\t\t\t$final[] = implode(' AND ', $having['sql']);\n\t\t\t$final[] = $having['args'];\n\t\t}\n\n\t\treturn $final;\n\t}","title":""},{"docid":"7051ee377487365f5d6b63c080de1d8c","score":"0.44136626","text":"function getFiltroTiposTaxa($get = null,$where = \" 1 = 1\"){\n $Result = \"\"; \n if(isset($get['getFiltroTipo'])){\n foreach ($get['getFiltroTipo'] as $key => $value ) {\n \n switch ($value) {\n case 1:\n $where .= \" AND TDE <> 0 \";\n break;\n case 2:\n $where .= \" AND TDA <> 0 \";\n break;\n case 3:\n $where .= \" AND TDE = 0 \";\n break;\n case 4:\n $where .= \" AND TDA = 0 \";\n break;\n } \n } \n return $where;\n }\n }","title":""},{"docid":"c641ee90a684457e97309515ffe70e4f","score":"0.44132292","text":"public function filteredByDate(Request $request){\n return response(Expense::where('user_id', $request->user()->id)\n ->whereBetween('created_at',[Date(\"Y-m-d\", $request->start/1000).\" 00:00:00\", Date(\"Y-m-d\", $request->end/1000).\" 23:59:59\"])\n ->with('category')\n ->orderBy('created_at', 'desc')\n ->paginate(4), 200);\n }","title":""},{"docid":"aeddd2a600ef0353a255da94eb283357","score":"0.44104567","text":"public function scopePublishedBefore($query, $date)\n {\n $query->where('created_at', '<=', $date);\n }","title":""},{"docid":"15e07635777efb584797e59ee911ac02","score":"0.44094056","text":"public function scopePublished($query){\n $query->where('RDate','<=',Carbon::now()->format('Y-m-d'))->where('EXDate','>=',Carbon::now()->format('Y-m-d'));\n }","title":""},{"docid":"52f365f8395adc25f034025f4ca1bceb","score":"0.44026864","text":"protected function filter()\n {\n $request = $this->getRequest();\n $session = $request->getSession();\n $filterForm = $this->createForm(new EventDateFilterType());\n $em = $this->getDoctrine()->getManager();\n $queryBuilder = $em->getRepository('AtkRegistrationBundle:EventDate')->createQueryBuilder('e');\n\n // Reset filter\n if ($request->get('filter_action') == 'reset') {\n $session->remove('EventDateControllerFilter');\n }\n\n // Filter action\n if ($request->get('filter_action') == 'filter') {\n // Bind values from the request\n $filterForm->bind($request);\n\n if ($filterForm->isValid()) {\n // Build the query from the given form object\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n // Save filter to session\n $filterData = $filterForm->getData();\n $session->set('EventDateControllerFilter', $filterData);\n }\n } else {\n // Get filter from session\n if ($session->has('EventDateControllerFilter')) {\n $filterData = $session->get('EventDateControllerFilter');\n $filterForm = $this->createForm(new EventDateFilterType(), $filterData);\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\n }\n }\n\n return array($filterForm, $queryBuilder);\n }","title":""},{"docid":"fc3024f42473bd5563346d7dc9dbd6c1","score":"0.44025835","text":"function getEvents($filter, $sort_string = '', $limit = 0, $start = 0, $count = false) {\n\t \tglobal $wpdb;\n\n\t \tif (empty($sort_string)) {\n\t \t\t$sort_string = 'e.`datefrom` ASC';\n\t \t}\n\t \t\n\t \t// Convert timestamps to mysql date format\n\t \tif (isset($filter['datefrom']) && !empty($filter['datefrom'])) {\n\t \t\t// Neu auch text unterstützen\n\t \t\tif (strpos(strtolower($filter['datefrom']), 'now') !== false) { // Now\n\t \t\t\t$filter['datefrom'] = $this->calculate_dates($filter['datefrom']);\n\t \t\t} else if (strpos(strtolower($filter['datefrom']), 'today') !== false) { // Today\n\t \t\t\t$filter['datefrom'] = $this->calculate_dates($filter['datefrom']);\n\t \t\t} else if (strpos($filter['datefrom'], '-') === false) { // Integer format\n\t \t\t\t$filter['datefrom'] = date('Y-m-d H:i:s', $filter['datefrom']);\n\t \t\t} else {\n\t \t\t\t// Validate!\n\t \t\t\tif (strtotime($filter['datefrom']) == false || strtotime($filter['datefrom']) == -1) {\n\t \t\t\t\t$filter['datefrom'] = $this->calculate_dates('now');\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\t \tif (isset($filter['dateto']) && !empty($filter['dateto'])) {\n\t \t\tif (strpos(strtolower($filter['dateto']), 'now') !== false) {\n\t \t\t\t$filter['dateto'] = $this->calculate_dates($filter['dateto']);\n\t \t\t} else if (strpos(strtolower($filter['dateto']), 'today') !== false) {\n\t \t\t\t$filter['dateto'] = $this->calculate_dates($filter['dateto'], true);\n\t \t\t} else if (strpos($filter['dateto'], '-') === false) {\n\t \t\t\t$filter['dateto'] = date('Y-m-d H:i:s', $filter['dateto']);\n\t \t\t} else {\n\t \t\t\t// Validate!\n\t \t\t\tif (strtotime($filter['dateto']) == false || strtotime($filter['dateto']) == -1) {\n\t \t\t\t\tunset($filter['dateto']);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\n\t \t// If its an allday event, modify any selection time, because allday events allways starts at 00:00\n\t \tif (isset($filter['allday']) && $filter['allday'] == true) {\n\t \t\tif (isset($filter['datefrom'])) {\n\t \t\t\t$df = $filter['datefrom'];\n\t \t\t\t$filter['datefrom'] = date('Y-m-d H:i:s', mktime(0,0,0,mysql2date('m', $df), mysql2date('d', $df), mysql2date('Y', $df)));\n\t \t\t}\n\t \t\tif (isset($filter['dateto'])) {\n\t \t\t\t$df = $filter['dateto'];\n\t \t\t\t$filter['dateto'] = date('Y-m-d H:i:s', mktime(0,0,0,mysql2date('m', $df), mysql2date('d', $df)+1, mysql2date('Y', $df)) - 1);\n\t \t\t}\n\t \t}\n\n\t \t$where = ' WHERE ';\n\t \tif (isset($filter['id_inc']) && is_array($filter['id_inc']))\n\t \t$where .= \" e.`eventid` IN (\".implode(',', $filter['id_inc']).\") AND\";\n\t \tif (isset($filter['id_exc']) && is_array($filter['id_exc']))\n\t \t$where .= \" e.`eventid` NOT IN (\".implode(',', $filter['id_exc']).\") AND\";\n\t \tif (isset($filter['state']) && isset(self::$valid_states[$filter['state']]))\n\t \t$where .= \" e.`state`='{$filter['state']}' AND\";\n\t \tif (isset($filter['author']))\n\t \t$where .= \" e.`author`='{$filter['author']}' AND\";\n\t \tif (isset($filter['allday']))\n\t \t$where .= \" e.`allday`=\".($filter['allday'] === true ? '1' : '0').\" AND\";\n\t \tif (isset($filter['datefrom']) || isset($filter['dateto'])) {\n\n\t \t\tif (!isset($filter['datemode'])) {\n\t \t\t\t$filter['datemode']\t= FSE_DATE_MODE_ALL;\n\t \t\t}\n\n\t \t\t// Make date selection complete\n\t \t\tif (!isset($filter['datefrom']) || empty($filter['datefrom']))\n\t \t\t$filter['datefrom'] = date('Y-m-d H:i:s', 0);\n\t \t\tif (!isset($filter['dateto']) || empty($filter['dateto']))\n\t \t\t$filter['dateto'] = date('Y-m-d H:i:s', mktime(23, 59, 59, 12, 31, 2037));\n\n\t \t\t// Allday events to-stamp is at the beginning of the day!\n\t \t\t$date_to_allday = date('Y-m-d H:i:s', mktime(0, 0, 0, mysql2date('m', $filter['datefrom']), mysql2date('d', $filter['datefrom']), mysql2date('y', $filter['datefrom'])));\n\n\n\t \t\t// Events must always start before the end and\n\t \t\t// must end after start\n\t \t\t$where .= ' (e.`datefrom` <= \"'.$filter['dateto'].'\") AND '.\n \t\t\t\t\t\t' ((e.`dateto` >= \"'.$filter['datefrom'].'\") OR (e.`dateto` >= \"'.$date_to_allday.'\" AND `allday` = 1))'; \n\n\t \t\t//\n\t \t\tif ($filter['datemode'] == FSE_DATE_MODE_START) {\n\t \t\t\t$where .= ' AND (e.`datefrom` >= \"'.$filter['datefrom'].'\")';\n\t \t\t} elseif ($filter['datemode'] == FSE_DATE_MODE_END) {\n\t \t\t\t$where .= ' AND (e.`datefrom` <= \"'.$filter['dateto'].'\")';\n\t \t\t}\n\n\t \t\t$where .= ' AND';\n\t \t}\n\n\t \t// Join for categories\n\t \t$join = '';\n\t \tif (isset($filter['categories'])) {\n\t \t\t$f = $filter['categories'];\n\t \t\tif (!is_array($f))\n\t \t\t$f = array($f);\n\t \t\t$in = '';\n\t \t\tforeach($f as $c) {\n\t \t\t\t$c = intval($c);\n\t \t\t\tif (!empty($c))\n\t \t\t\t$in .= $c.',';\n\t \t\t}\n\n\t \t\tif (!empty($in)) {\n\t \t\t\t$in = substr($in, 0, strlen($in)-1);\n\t \t\t\t$where .= ' c.`catid` IN ('.$in.') AND';\n\t \t\t\t$join = ' LEFT JOIN `'.$wpdb->prefix.'fsevents_cats` AS c ON e.`eventid` = c.`eventid` ';\n\t \t\t}\n\t \t}\n\n\t \tif ($where != ' WHERE ')\n\t \t\t$where = substr($where, 0, strlen($where) - 3);\n\t \telse\n\t \t\t$where = '';\n\n\t \t// Special Case 'Count'!\n\t \tif ($count == true) {\n\t \t\t$sql = 'SELECT DISTINCT count(e.`eventid`) FROM `'.$wpdb->prefix.'fsevents` AS e '.$join.$where.' ORDER BY '.$sort_string;\n\t \t\treturn $wpdb->get_var($sql);\n\t \t} else {\n\t \t\t$sql = 'SELECT DISTINCT e.`eventid` FROM `'.$wpdb->prefix.'fsevents` AS e '.$join.$where.' ORDER BY '.$sort_string;\n\t \t\tif (!empty($limit)) {\n\t \t\t\t$sql .= ' LIMIT '.intval($start).', '.intval($limit);\n\t \t\t}\n\t \t}\n\n\t \tif (defined('FSE_SQL_DEBUG') && FSE_SQL_DEBUG == true && defined('WP_DEBUG') && WP_DEBUG == true) {\n\t \t\techo '

    '.$sql.'

    ';\n\t \t}\t\n\t \t\n\t \t$res = $wpdb->get_col($sql);\n\n\t \tif ($res === NULL)\n\t \t\treturn false;\n\n\t \treturn $res;\n\t }","title":""},{"docid":"333ade94769349e2e739926330bffdb8","score":"0.44000697","text":"public static function xfilter($table, $fields, $orderBy, $limit){\r\n $queryType = \"xfilter\"; \r\n include '../helper/retrieve_data.php';\r\n return $querySet;\r\n }","title":""},{"docid":"bb63727dc141fd9866259eeb9572e0cf","score":"0.43842334","text":"public function filterByT($t = null, $comparison = null)\n {\n if (is_array($t)) {\n $useMinMax = false;\n if (isset($t['min'])) {\n $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($t['max'])) {\n $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t, $comparison);\n }","title":""},{"docid":"ff7460dade66e0e0589509e9665e888c","score":"0.43714315","text":"public function TyleUngThanhCong($f_date, $t_date){\r\n\t\t$select = $this->Select(\"select log_date, sum(total) as total, sum(sucess) as sucess from (\r\n\t\tselect trunc(log_date) log_date, 0 total, count(*) sucess from credit_trans \r\n\t\twhere log_date >= to_date('\".$f_date.\"','dd/mm/yyyy') and log_date <= to_date('\".$t_date.\"','dd/mm/yyyy') + 1 and status = 1 and mt_status = 2 group by log_date\r\n\t\tunion all\r\n\t\tselect trunc(log_date) log_date , count(*) total, 0 sucess from credit_trans \r\n\t\twhere log_date >= to_date('\".$f_date.\"','dd/mm/yyyy') and log_date <= to_date('\".$t_date.\"','dd/mm/yyyy') + 1 and condition_status =1 group by log_date\r\n\t\t)\r\n\t\tgroup by log_date\r\n\t\torder by log_date\");\r\n\t\t\r\n\t\t$result = $this->FetchAll($select);\r\n\t\t//$this->DumpQueriesStack(); \r\n\t\tif($this->NumRows($select) > 0){\r\n return $result;\r\n }\r\n }","title":""},{"docid":"e3ca121e0bc0d2db2f3109d199233c76","score":"0.4370509","text":"public function getDataWithTypeDate() {}","title":""},{"docid":"84893638a7b5c4be3efdc7b6ce0396da","score":"0.4369703","text":"public function checkDateWithStrtotimeValuesDataProvider() {}","title":""},{"docid":"fa0996eafaef491e44e318ed84c44f82","score":"0.43663988","text":"protected function _buildWhere(&$query)\r\n {\r\n\r\n\r\n \t//if($this->_checkin!=null)\r\n \t//{\r\n \t//\t$query->where('ltap.ltap_qdatu = \"'.$this->_confdate.'\"');\r\n \t//}\r\n return $query;\r\n }","title":""}],"string":"[\n {\n \"docid\": \"690fceaae0bc63c2404145f48ff9ffea\",\n \"score\": \"0.5598991\",\n \"text\": \"public function scopeFilterByEndDate( $query )\\n {\\n $date = request() -> get( 'end_date' );\\n\\n if( $date )\\n {\\n try \\n {\\n $date = Carbon :: parse($date);\\n $query -> whereDate( 'created_at', '<=', $date );\\n }\\n catch ( \\\\Exception $e )\\n {\\n // Do nothing, it's ok.\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8328dfebf8a9099bafbe5774103dcb4c\",\n \"score\": \"0.5571023\",\n \"text\": \"function filterByDate($date) {\\n $this->setDateFilter(self::DATE_FILTER_SELECTED_DATE);\\n $this->setAdditionalProperty('date_filter_on', (string) $date);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c08962c7c785b20f767fd28d89121fac\",\n \"score\": \"0.5482131\",\n \"text\": \"function setDateFilter($value) {\\n return $this->setAdditionalProperty('date_filter', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4a449c3f8cdc0d9e48dc3298de665eb\",\n \"score\": \"0.54168165\",\n \"text\": \"function getFilterDate($top){\\n\\tif(!$top)\\n\\t\\t$top=20;\\n\\n\\t$data = M('event');\\n\\t$date_set = Array();\\n\\t$condition = Array('event_date' => Array('egt', todayDate()));\\n\\t$result = $data->where($condition)->group('event_date')->limit($top)->order('event_date asc')->select();\\n\\tforeach($result as $value)\\n\\t\\tarray_push($date_set, $value['event_date']);\\n\\n\\treturn $date_set;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"649c4720ba41fe12830c82114a444992\",\n \"score\": \"0.5393599\",\n \"text\": \"function filter_where( $where = '' ) {\\r\\n\\t$where .= \\\" AND post_date > '\\\" . date('Y-m-d', strtotime('-99930 days')) . \\\"'\\\";\\r\\n\\treturn $where;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6def562ef81d28c5f5eb50bbfea3e457\",\n \"score\": \"0.5375973\",\n \"text\": \"static function apply($query) {\\n\\t\\t$query = DateFilter::after($query);\\n\\t\\t$query = DateFilter::before($query);\\n\\t\\treturn $query;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"182a3d18f45a86ed0bf98349f52f6b47\",\n \"score\": \"0.5351299\",\n \"text\": \"function getFiltroTempoEntrega($get,$where = \\\" 1 = 1\\\"){\\n \\n if(isset($get['hrini']) && isset($get['hrfim'])){\\n $hrIni = $get['hrini'];\\n $hrFim = $get['hrfim'];\\n if (!empty($hrIni) && !empty($hrFim)){\\n \\n return $where .= \\\" AND TO_CHAR(EXTRACT(HOUR from NUMTODSINTERVAL((to_date(DtFim,'YYYYMMDDHH24MISS') - to_date(DtIni,'YYYYMMDDHH24MISS')),'DAY')),'FM00') \\n ||':' ||\\n TO_CHAR(EXTRACT(Minute from NUMTODSINTERVAL((to_date(DtFim,'YYYYMMDDHH24MISS') - to_date(DtIni,'YYYYMMDDHH24MISS')),'DAY')),'FM00') \\n BETWEEN '{$hrIni}' AND '{$hrFim}'\\\";\\n \\n }\\n \\n } \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c99027a145199e6371d147dbcde6ddbd\",\n \"score\": \"0.5285243\",\n \"text\": \"public function filterDataTable($query, $request)\\n {\\n if (isset($request['req']['from']) && $request['req']['from'] != '') {\\n $query->whereDate('created_at', '>=', $request['req']['from']);\\n }\\n\\n if (isset($request['req']['to']) && $request['req']['to'] != '') {\\n $query->whereDate('created_at', '<=', $request['req']['to']);\\n }\\n\\n if (isset($request['req']['type']) && $request['req']['type'] != '') {\\n $query->where('type', '=', $request['req']['type']);\\n }\\n \\n \\n\\n \\n\\n \\n return $query;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bfd9ff5f288d0e3b261fcee15a47e7fd\",\n \"score\": \"0.52795666\",\n \"text\": \"private function filterDay()\\n {\\n try {\\n if(empty($this->day)) {\\n return;\\n }\\n\\n $dayDT = new DateTime(DateHelper::parseDateTime($this->day), DateHelper::getSystemTimeZone());\\n\\n $endDT = clone $dayDT;\\n $endDT->setTime(23,59,59);\\n $end = $endDT->getTimestamp();\\n\\n $start = $dayDT->setTime(0,0,0)->getTimestamp();\\n\\n $this->query->andWhere(['<=', 'log_time', $end]);\\n $this->query->andWhere(['>=', 'log_time', $start]);\\n\\n } catch (\\\\Exception $e) {\\n Yii::error($e, 'admin');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"664b43fd6b1a85debac35639e47f5a68\",\n \"score\": \"0.5276063\",\n \"text\": \"function filter_where($where = '') {\\n $postid = get_the_ID();\\n $format = 'Y-m-d';\\n $publish_date = get_the_date( $format, $postid);\\n\\n $where .= \\\" AND post_date <= '\\\" . $publish_date . \\\"'\\\";\\n\\n return $where;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b2acb92545d5fab94748179115ff620\",\n \"score\": \"0.525917\",\n \"text\": \"public function filterByTdate($tdate = null, $comparison = null)\\n {\\n if (is_array($tdate)) {\\n $useMinMax = false;\\n if (isset($tdate['min'])) {\\n $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\\n $useMinMax = true;\\n }\\n if (isset($tdate['max'])) {\\n $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\\n $useMinMax = true;\\n }\\n if ($useMinMax) {\\n return $this;\\n }\\n if (null === $comparison) {\\n $comparison = Criteria::IN;\\n }\\n }\\n\\n return $this->addUsingAlias(AliSmbonusTableMap::COL_TDATE, $tdate, $comparison);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2074f34a539bb906bc316076bb6c049\",\n \"score\": \"0.5222251\",\n \"text\": \"function getDateFilter() {\\n return $this->getAdditionalProperty('date_filter', self::DATE_FILTER_ANY);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b23a21251213f50b2f1caf37026baa7f\",\n \"score\": \"0.52122027\",\n \"text\": \"public function filterByTdate($tdate = null, $comparison = null)\\n {\\n if (is_array($tdate)) {\\n $useMinMax = false;\\n if (isset($tdate['min'])) {\\n $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate['min'], Criteria::GREATER_EQUAL);\\n $useMinMax = true;\\n }\\n if (isset($tdate['max'])) {\\n $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate['max'], Criteria::LESS_EQUAL);\\n $useMinMax = true;\\n }\\n if ($useMinMax) {\\n return $this;\\n }\\n if (null === $comparison) {\\n $comparison = Criteria::IN;\\n }\\n }\\n\\n return $this->addUsingAlias(AliGmbonusTableMap::COL_TDATE, $tdate, $comparison);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b734474cc5bbff22ac75badff18387e7\",\n \"score\": \"0.51908195\",\n \"text\": \"function wpfc_temp_filter_where( $where = '' ) {\\n\\t \\t$where .= \\\" AND post_date >= '\\\".date(\\\"Y-m-d\\\", $_REQUEST['start']).\\\"' AND post_date < '\\\".date(\\\"Y-m-d\\\", $_REQUEST['end']).\\\"'\\\";\\n\\t \\treturn $where;\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"09ea27314e7785f927b8c13767ab3b3e\",\n \"score\": \"0.5175028\",\n \"text\": \"public function makeFilter_date($field, $date, $negate = false) {\\r\\n\\t\\treturn TodoyuSearchFilterHelper::makeFilter_date(self::TABLE, $field, $date, $negate);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70edd964dcc805c34233b719ac222a31\",\n \"score\": \"0.5145515\",\n \"text\": \"function filter_where($where = '') {\\n global $popular_days;\\n //posts in the last X days\\n $where .= \\\" AND post_date > '\\\" . date('Y-m-d', strtotime('-'.$popular_days.' days')) . \\\"'\\\";\\n return $where;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2dbded59e734c865f83222e187801c66\",\n \"score\": \"0.51413924\",\n \"text\": \"public function scopeFilterByStartDate( $query )\\n { \\n $date = request() -> get( 'start_date' );\\n if( $date )\\n {\\n try \\n {\\n $date = Carbon :: parse( $date );\\n $query -> whereDate( 'created_at', '>=', $date );\\n }\\n catch( \\\\Exception $e )\\n {\\n // Do nothing, it's ok.\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"003db7cab4485178555808abda2f5786\",\n \"score\": \"0.5117767\",\n \"text\": \"function todays_posts_only($atts) {\\n\\n $DEFAULT_DATE = 'today';\\n $DEFAULT_TEMPLATE_PART = 'content';\\n\\n // if we were not passed a date, use the default date instead\\n if ((! array_key_exists ('date', $atts))\\n || (is_null ($atts['date']))\\n ) {\\n $post_date = $DEFAULT_DATE;\\n } else {\\n $post_date = $atts['date'];\\n }\\n\\n // if we were not passed a template part, use the default instead\\n if ((! array_key_exists ('template_part', $atts))\\n || (is_null ($atts['template_part']))\\n ) {\\n $template_part = $DEFAULT_TEMPLATE_PART;\\n }\\n\\n // start with an empty query filter\\n $query_filter = array();\\n\\n // parse the date string we were passed into an array\\n // http://php.net/manual/en/function.date-parse.php\\n $parsed_date = date_parse ($post_date);\\n\\n // add a query filter based on the specified date\\n // https://codex.wordpress.org/Class_Reference/WP_Query#Date_Parameters\\n $query_filter['date_query'] = array(\\n array(\\n 'year' => $parsed_date['year'],\\n 'month' => $parsed_date['mon'],\\n 'day' => $parsed_date['day'],\\n ),\\n );\\n\\n // if we were passed a category (name), add that as a filter\\n // http://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters\\n if ((array_key_exists ('category', $atts))\\n && (! is_null ($atts['category']))\\n ) {\\n $query_filter['category_name'] = $atts['category'];\\n }\\n\\n // if we were passed a tag, add that as a filter\\n // https://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters\\n if ((array_key_exists ('tag', $atts))\\n && (! is_null ($atts['tag']))\\n ) {\\n $query_filter['tag'] = $atts['tag'];\\n }\\n\\n // instantiate a new query based on the filter we've constructed\\n // https://codex.wordpress.org/Class_Reference/WP_Query\\n $custom_query = new WP_Query($query_filter);\\n\\n // if the query returned any posts, process them\\n if ($custom_query->have_posts()) {\\n\\n // loop through all of the posts the query returned\\n while ($custom_query->have_posts()) {\\n $custom_query->the_post();\\n\\n $format = get_post_format();\\n get_template_part($template_part, $format);\\n\\n }// end custom loop\\n\\n // restore the global $post from the main query loop\\n // https://codex.wordpress.org/Function_Reference/wp_reset_postdata\\n wp_reset_postdata();\\n\\n return '';\\n\\n } else {\\n\\n // restore the global $post from the main query loop\\n // https://codex.wordpress.org/Function_Reference/wp_reset_postdata\\n wp_reset_postdata();\\n\\n return FALSE;\\n\\n }// end if\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38b3e9854a990bb2ab53f45ee2655401\",\n \"score\": \"0.5111801\",\n \"text\": \"protected function _myDdateFilter($collection, $column)\\n {\\n /*if (!$value = $column->getFilter()->getValue()) {\\n return $this;\\n }\\n $from = $filters['from'];\\n $to = $filters['to'];\\n if ($from) {\\n $this->getCollection()->addFieldToFilter('main_table.ddate', array(\\n 'gteq' => $from->toString('yyyy-MM-dd')\\n ));\\n }\\n if ($to) {\\n $this->getCollection()->addFieldToFilter('main_table.ddate', array(\\n 'lteq' => $to->toString('yyyy-MM-dd')\\n ));\\n }*/\\n if (!$value = $column->getFilter()->getValue()) {\\n return $this;\\n }\\n $filters = $column->getFilter()->getValue();\\n\\n $from = $filters['from'];\\n $to = $filters['to'];\\n if($from)\\n $this->getCollection()->addFieldToFilter('main_table.ddate', array('gteq' => $from->toString('yyyy-MM-dd')));\\n if($to)\\n $this->getCollection()->addFieldToFilter('main_table.ddate', array('lteq' => $to->toString('yyyy-MM-dd')));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b08661f7edaa14c8a6fe622ec941d38\",\n \"score\": \"0.5092028\",\n \"text\": \"public function filter_where($where = '') {\\n $where .= \\\" AND post_date > '\\\" . date('Y-m-d', strtotime('-30 days')) . \\\"'\\\";\\n return $where;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bccca81a9edc66db9360ef38379b931a\",\n \"score\": \"0.5086713\",\n \"text\": \"protected function filteringWhereComparison($query, $value)\\n {\\n $compares = $this->explodeCompare($value);\\n $query = $query->orWhere(function ($subquery) use ($compares) {\\n foreach ($compares as $compare) {\\n $function = $compare->function;\\n $subquery = $subquery->$function(\\n $this->isDate($compare->value)\\n ? DB::raw(\\\"{$this->fieldName}\\\")\\n : DB::raw(\\\"LOWER(\\\" . $this->fieldName . \\\")\\\"),\\n $compare->compare,\\n $this->transformValueForFilter($compare->value)\\n );\\n }\\n });\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35ff25159072a07ba70ddce978f624ab\",\n \"score\": \"0.508217\",\n \"text\": \"public function filterByDate(&$row)\\n {\\n $row[3] = Carbon::createFromFormat('j/n/Y', $row[3]);\\n return $row[3] >= $this->today;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54061a225558221f1c8237026f381518\",\n \"score\": \"0.5029461\",\n \"text\": \"public function scopeOndate($query, $variable)\\n\\t{\\n\\t\\tif(!is_array($variable))\\n\\t\\t{\\n\\t\\t\\treturn $query->where('created_at', '<=', date('Y-m-d H:i:s', strtotime($variable)))->orderBy('created_at', 'desc');\\n\\t\\t}\\n\\n\\t\\tif(!strtotime($variable[1]) && strtotime($variable[0]))\\n\\t\\t{\\n\\t\\t\\treturn $query->where('created_at', '<=',date('Y-m-d H:i:s', strtotime($variable[0])));\\n\\t\\t}\\n\\n\\t\\treturn $query->where('created_at', '>=', date('Y-m-d H:i:s', strtotime($variable[0])))->where('created_at', '<=', date('Y-m-d H:i:s', strtotime($variable[1])))->orderBy('created_at', 'asc');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"822eed995c267d0f18cd29a7b0bfaad8\",\n \"score\": \"0.5021632\",\n \"text\": \"public function addDateFilter()\\n\\t{\\n\\t\\t$this->_addFilter(new DataGrid\\\\Filters\\\\DateFilter());\\n\\t\\treturn $this->getFilter();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74cf9818010cfdcaedbb9ad833b55a0e\",\n \"score\": \"0.4995949\",\n \"text\": \"function getFilterDatePast($top){\\n\\tif(!$top)\\n\\t\\t$top=20;\\n\\n\\t$data = M('event');\\n\\t$date_set = Array();\\n\\t$condition = Array('event_date' => Array('elt', todayDate()));\\n\\t$result = $data->where($condition)->group('event_date')->limit($top)->order('event_date desc')->select();\\n\\tforeach($result as $value)\\n\\t\\tarray_push($date_set, $value['event_date']);\\n\\n\\treturn $date_set;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"082149420af0f9396d43eabe86e47465\",\n \"score\": \"0.49820295\",\n \"text\": \"public function Filter_taskFilter($value, $negate = false) {\\r\\n\\t\\t$filterSets\\t= TodoyuArray::intExplode(',', $value, true, true);\\r\\n\\t\\t$queryParts\\t= false;\\r\\n\\r\\n\\t\\tif( sizeof($filterSets) === 0 ) {\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\r\\n\\t\\t$taskFilter = new TodoyuProjectTaskFilter(array(array('filter' => 'filterSet', 'value' => $filterSets)));\\r\\n\\r\\n\\t\\t$queryArray = $taskFilter->getQueryArray();\\r\\n\\t\\t$queryArray['group']\\t= '';\\r\\n\\t\\t$queryArray['fields']\\t= str_ireplace('sql_calc_found_rows', '', $queryArray['fields']);\\r\\n\\t\\t$subQuery = TodoyuSql::buildSELECTquery($queryArray['fields'], $queryArray['tables'], $queryArray['where'], 'ext_project_task.id_project');\\r\\n\\r\\n\\t\\t// This double sub query is here for performance reasons (don't optimize it!)\\r\\n\\t\\t$subQuery = ' SELECT id FROM ( ' . $subQuery . ') as x';\\r\\n\\r\\n\\t\\t$compare\\t= $negate ? ' NOT IN ' : ' IN ';\\r\\n\\r\\n\\t\\t$queryParts['tables']\\t= array('ext_project_project', 'ext_project_task');\\r\\n\\t\\t$queryParts['where']\\t= 'ext_project_task.id ' . $compare . ' (' . $subQuery . ')';\\r\\n\\t\\t$queryParts['join']\\t\\t= array('ext_project_project.id = ext_project_task.id_project');\\r\\n\\r\\n\\t\\treturn $queryParts;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7cb33974d84a4ce89fe2d760941180ca\",\n \"score\": \"0.49718788\",\n \"text\": \"public function Filter_editdateDyn($value, $negate) {\\r\\n\\t\\t$timeStamps = TodoyuSearchFilterHelper::getDynamicDateTimestamp($value, $negate);\\r\\n\\r\\n\\t\\treturn $this->Filter_dateDyn($timeStamps, 'date_update', $negate);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"766cf849adf0e38003c61808d94e1f60\",\n \"score\": \"0.49677926\",\n \"text\": \"protected function applyDateFilter($field)\\n {\\n $dates = explode('..', $this->value);\\n\\n if(count($dates)=== 2){\\n $timestampFrom = $this->dateParser->getTimestamp($dates[0].\\\" 00:00\\\");\\n $timestampTo = $this->dateParser->getTimestamp($dates[1].\\\" 00:00\\\");\\n\\n $this->query->gte($field, $timestampFrom);\\n $this->query->lte($field, $timestampTo + 86399);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f813b2cf3330cc821b7f70873d62a9f4\",\n \"score\": \"0.49474782\",\n \"text\": \"public function applyLatestOnlyCondition(Event $event)\\n {\\n /** @var \\\\yii\\\\db\\\\BaseActiveRecord|\\\\zarv1k\\\\sync\\\\twoway\\\\behavior\\\\model\\\\SyncableBehavior $model */\\n $model = $event->data;\\n /** @var \\\\yii\\\\db\\\\ActiveRecordInterface $modelClass */\\n $modelClass = $this->owner->modelClass;\\n /** @var ActiveQuery $activeQuery */\\n $activeQuery = $event->sender;\\n\\n $updatedAfterDate = \\\\Yii::$app->request->getQueryParam($model->timestampQueryParam);\\n\\n $orderBy = [$model->timestampColumn => SORT_ASC];\\n foreach ($modelClass::primaryKey() as $column) {\\n $orderBy[$column] = SORT_ASC;\\n }\\n\\n $activeQuery\\n ->andFilterWhere(['>', $model->timestampColumn, $updatedAfterDate])\\n ->addOrderBy($orderBy);\\n\\n Event::off(ActiveQuery::className(), ActiveQuery::EVENT_INIT, [$this, 'applyLatestOnlyCondition']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4522155795d06d294400964763848d49\",\n \"score\": \"0.4945606\",\n \"text\": \"public function twig_filter_sdate()\\n\\t{\\n\\t\\treturn new \\\\Twig_SimpleFilter('sdate', function ($_string, $_max =\\\"day\\\", $_format =\\\"Y/m/d\\\")\\n\\t\\t{\\n\\t\\t\\treturn \\\\lib\\\\utility::humanTiming($_string, $_max, $_format, $this->data->site['currentlang']);\\n\\t\\t});\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a39596bbe68b64237776d95842c2b8fa\",\n \"score\": \"0.4930032\",\n \"text\": \"public function DateGreater($time) {\\n $this->filter->Greater('udate', $time);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d67ddc028d0c6200de4cf4fcf8826565\",\n \"score\": \"0.49218166\",\n \"text\": \"function getDateforStdFilterBytype($type)\\n\\t{\\n\\t\\t//$thisyear = date(\\\"Y\\\");\\n\\t\\t$maxdate = \\\"2099-12-31\\\";\\n\\t\\t$mindate = \\\"1900-01-01\\\";\\n\\t\\t$datevalue = array();\\n\\n\\t\\tif($type == \\\"today\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $today;\\n\\t\\t\\t$datevalue[1] = $today;\\n\\t\\t}\\n\\t\\telseif($type == \\\"yesterday\\\" )\\n\\t\\t{\\n\\t\\t\\t$yesterday = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-1, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $yesterday;\\n\\t\\t\\t$datevalue[1] = $yesterday;\\n\\t\\t}\\n\\t\\telseif($type == \\\"tomorrow\\\" )\\n\\t\\t{\\n\\t\\t\\t$tomorrow = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+1, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $tomorrow;\\n\\t\\t\\t$datevalue[1] = $tomorrow;\\n\\t\\t}\\n\\t\\telseif($type == \\\"thisweek\\\" )\\n\\t\\t{\\n\\t\\t\\t$thisweek0 = date(\\\"Y-m-d\\\",strtotime(\\\"-1 week Sunday\\\"));\\n\\t\\t\\t$thisweek1 = date(\\\"Y-m-d\\\",strtotime(\\\"this Saturday\\\"));\\n\\t\\t\\t$datevalue[0] = $thisweek0;\\n\\t\\t\\t$datevalue[1] = $thisweek1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"lastweek\\\" )\\n\\t\\t{\\n\\t\\t\\t$lastweek0 = date(\\\"Y-m-d\\\",strtotime(\\\"-2 week Sunday\\\"));\\n\\t\\t\\t$lastweek1 = date(\\\"Y-m-d\\\",strtotime(\\\"-1 week Saturday\\\"));\\n\\t\\t\\t$datevalue[0] = $lastweek0;\\n\\t\\t\\t$datevalue[1] = $lastweek1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"nextweek\\\" )\\n\\t\\t{\\n\\t\\t\\t$nextweek0 = date(\\\"Y-m-d\\\",strtotime(\\\"this Sunday\\\"));\\n\\t\\t $nextweek1 = date(\\\"Y-m-d\\\",strtotime(\\\"+1 week Saturday\\\"));\\n\\t\\t\\t$datevalue[0] = $nextweek0;\\n\\t\\t\\t$datevalue[1] = $nextweek1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"thismonth\\\" )\\n\\t\\t{\\n\\t\\t\\t$currentmonth0 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\"), \\\"01\\\", date(\\\"Y\\\")));\\n\\t\\t\\t$currentmonth1 = date(\\\"Y-m-t\\\");\\n\\t\\t\\t$datevalue[0] =$currentmonth0;\\n\\t\\t\\t$datevalue[1] = $currentmonth1;\\n\\t\\t}\\n\\n\\t\\telseif($type == \\\"lastmonth\\\" )\\n\\t\\t{\\n\\t\\t\\t$lastmonth0 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\")-1, \\\"01\\\", date(\\\"Y\\\")));\\n\\t\\t\\t$lastmonth1 = date(\\\"Y-m-t\\\", mktime(0, 0, 0, date(\\\"m\\\")-1, \\\"01\\\", date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $lastmonth0;\\n\\t\\t\\t$datevalue[1] = $lastmonth1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"nextmonth\\\" )\\n\\t\\t{\\n\\t\\t\\t$nextmonth0 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\")+1, \\\"01\\\", date(\\\"Y\\\")));\\n\\t\\t $nextmonth1 = date(\\\"Y-m-t\\\", mktime(0, 0, 0, date(\\\"m\\\")+1, \\\"01\\\", date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $nextmonth0;\\n\\t\\t\\t$datevalue[1] = $nextmonth1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"next3days\\\" )\\n\\t\\t{\\n\\t\\t\\t$next7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+2, date(\\\"Y\\\")));\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $today;\\n\\t\\t\\t$datevalue[1] = $next7days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"next7days\\\" )\\n\\t\\t{\\n\\t\\t\\t$next7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+6, date(\\\"Y\\\")));\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $today;\\n\\t\\t\\t$datevalue[1] = $next7days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"next15days\\\" )\\n\\t\\t{\\n\\t\\t\\t$next7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+14, date(\\\"Y\\\")));\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $today;\\n\\t\\t\\t$datevalue[1] = $next7days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"next30days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$next30days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+29, date(\\\"Y\\\")));\\n\\n\\t\\t\\t$datevalue[0] =$today;\\n\\t\\t\\t$datevalue[1] =$next30days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"next60days\\\" )\\n\\t\\t{\\n\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$next60days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+59, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $today;\\n\\t\\t\\t$datevalue[1] = $next60days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"next90days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$next90days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+89, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $today;\\n\\t\\t\\t$datevalue[1] = $next90days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"next180days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$next180days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+179, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $today;\\n\\t\\t\\t$datevalue[1] = $next180days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"before3days\\\" )\\n\\t\\t{\\n\\t\\t\\t$before7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-3, date(\\\"Y\\\")));\\n\\t\\t\\t//$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $mindate;\\n\\t\\t\\t$datevalue[1] = $before7days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"before7days\\\" )\\n\\t\\t{\\n\\t\\t\\t$before7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-7, date(\\\"Y\\\")));\\n\\t\\t\\t//$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $mindate;\\n\\t\\t\\t$datevalue[1] = $before7days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"before15days\\\" )\\n\\t\\t{\\n\\t\\t\\t$before7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-15, date(\\\"Y\\\")));\\n\\t\\t\\t//$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $mindate;\\n\\t\\t\\t$datevalue[1] = $before7days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"before30days\\\" )\\n\\t\\t{\\n\\t\\t\\t//$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$before30days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-30, date(\\\"Y\\\")));\\n\\n\\t\\t\\t$datevalue[0] =$mindate;\\n\\t\\t\\t$datevalue[1] =$before30days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"before60days\\\" )\\n\\t\\t{\\n\\n\\t\\t\\t//$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$before60days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-60, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $mindate;\\n\\t\\t\\t$datevalue[1] = $before60days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"before100days\\\" )\\n\\t\\t{\\n\\t\\t\\t//$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$before100days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-100, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $mindate;\\n\\t\\t\\t$datevalue[1] = $before100days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"before180days\\\" )\\n\\t\\t{\\n\\t\\t\\t//$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$before180days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-180, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $mindate;\\n\\t\\t\\t$datevalue[1] = $before180days;\\n\\t\\t}\\n\\t\\telseif($type == \\\"after3days\\\" )\\n\\t\\t{\\n\\t\\t\\t$after7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+2, date(\\\"Y\\\")));\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $after7days;\\n\\t\\t\\t$datevalue[1] = $maxdate;\\n\\t\\t}\\n\\t\\telseif($type == \\\"after7days\\\" )\\n\\t\\t{\\n\\t\\t\\t$after7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+6, date(\\\"Y\\\")));\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $after7days;\\n\\t\\t\\t$datevalue[1] = $maxdate;\\n\\t\\t}\\n\\t\\telseif($type == \\\"after15days\\\" )\\n\\t\\t{\\n\\t\\t\\t$after7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+14, date(\\\"Y\\\")));\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $after7days;\\n\\t\\t\\t$datevalue[1] = $maxdate;\\n\\t\\t}\\n\\t\\telseif($type == \\\"after30days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$after30days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+29, date(\\\"Y\\\")));\\n\\n\\t\\t\\t$datevalue[0] =$after30days;\\n\\t\\t\\t$datevalue[1] =$maxdate;\\n\\t\\t}\\n\\t\\telseif($type == \\\"after60days\\\" )\\n\\t\\t{\\n\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$after60days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+59, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $after60days;\\n\\t\\t\\t$datevalue[1] = $maxdate;\\n\\t\\t}\\n\\t\\telseif($type == \\\"after100days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$after100days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+99, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $after100days;\\n\\t\\t\\t$datevalue[1] = $maxdate;\\n\\t\\t}\\n\\t\\telseif($type == \\\"after180days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$after180days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")+179, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $after180days;\\n\\t\\t\\t$datevalue[1] = $maxdate;\\n\\t\\t}\\n\\t\\telseif($type == \\\"last3days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$last7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-2, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $last7days;\\n\\t\\t\\t$datevalue[1] = $today;\\n\\t\\t}\\n\\t\\telseif($type == \\\"last7days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$last7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-6, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $last7days;\\n\\t\\t\\t$datevalue[1] = $today;\\n\\t\\t}\\n\\t\\telseif($type == \\\"last15days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$last7days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-14, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $last7days;\\n\\t\\t\\t$datevalue[1] = $today;\\n\\t\\t}\\n\\t\\telseif($type == \\\"last30days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$last30days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-29, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $last30days;\\n\\t\\t\\t$datevalue[1] = $today;\\n\\t\\t}\\n\\t\\telseif($type == \\\"last60days\\\" )\\n\\t\\t{\\n\\t\\t\\t$last60days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-59, date(\\\"Y\\\")));\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $last60days;\\n\\t\\t\\t$datevalue[1] = $today;\\n\\t\\t}\\n\\t\\telse if($type == \\\"last90days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$last90days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-89, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $last90days;\\n\\t\\t\\t$datevalue[1] = $today;\\n\\t\\t}\\n\\t\\telseif($type == \\\"last180days\\\" )\\n\\t\\t{\\n\\t\\t\\t$today = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$last180days = date(\\\"Y-m-d\\\",mktime(0, 0, 0, date(\\\"m\\\") , date(\\\"d\\\")-179, date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $last180days;\\n\\t\\t\\t$datevalue[1] = $today;\\n\\t\\t}\\n\\t\\telseif($type == \\\"thisfy\\\" )\\n\\t\\t{\\n\\t\\t\\t$currentFY0 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"01\\\", \\\"01\\\", date(\\\"Y\\\")));\\n\\t\\t\\t$currentFY1 = date(\\\"Y-m-t\\\",mktime(0, 0, 0, \\\"12\\\", date(\\\"d\\\"), date(\\\"Y\\\")));\\n\\t\\t\\t$datevalue[0] = $currentFY0;\\n\\t\\t\\t$datevalue[1] = $currentFY1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"prevfy\\\" )\\n\\t\\t{\\n\\t\\t\\t$lastFY0 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"01\\\", \\\"01\\\", date(\\\"Y\\\")-1));\\n\\t\\t\\t$lastFY1 = date(\\\"Y-m-t\\\", mktime(0, 0, 0, \\\"12\\\", date(\\\"d\\\"), date(\\\"Y\\\")-1));\\n\\t\\t\\t$datevalue[0] = $lastFY0;\\n\\t\\t\\t$datevalue[1] = $lastFY1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"nextfy\\\" )\\n\\t\\t{\\n\\t\\t\\t$nextFY0 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"01\\\", \\\"01\\\", date(\\\"Y\\\")+1));\\n\\t\\t\\t$nextFY1 = date(\\\"Y-m-t\\\", mktime(0, 0, 0, \\\"12\\\", date(\\\"d\\\"), date(\\\"Y\\\")+1));\\n\\t\\t\\t$datevalue[0] = $nextFY0;\\n\\t\\t\\t$datevalue[1] = $nextFY1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"nextfq\\\" )\\n\\t\\t{\\n\\t\\t\\tif(date(\\\"m\\\") <= 3)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$nFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"04\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$nFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"06\\\",\\\"30\\\",date(\\\"Y\\\")));\\n \\t\\t}else if(date(\\\"m\\\") > 3 and date(\\\"m\\\") <= 6)\\n \\t\\t{\\n\\t\\t\\t\\t$nFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"07\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$nFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"09\\\",\\\"30\\\",date(\\\"Y\\\")));\\n\\n \\t\\t}\\n\\t\\t\\telse if(date(\\\"m\\\") > 6 and date(\\\"m\\\") <= 9)\\n \\t\\t{\\n\\t\\t\\t\\t$nFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"10\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$nFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"12\\\",\\\"31\\\",date(\\\"Y\\\")));\\n\\n \\t\\t}\\n\\t\\t\\telse\\n \\t\\t{\\n\\t\\t\\t\\t$nFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"01\\\",\\\"01\\\",date(\\\"Y\\\")+1));\\n\\t\\t\\t\\t$nFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"03\\\",\\\"31\\\",date(\\\"Y\\\")+1));\\n \\t\\t}\\n\\t\\t\\t$datevalue[0] = $nFq;\\n\\t\\t\\t$datevalue[1] = $nFq1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"prevfq\\\" )\\n\\t\\t{\\n\\t\\t\\tif(date(\\\"m\\\") <= 3)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$pFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"10\\\",\\\"01\\\",date(\\\"Y\\\")-1));\\n\\t\\t\\t\\t$pFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"12\\\",\\\"31\\\",date(\\\"Y\\\")-1));\\n \\t\\t}\\n\\t\\t\\telse if(date(\\\"m\\\") > 3 and date(\\\"m\\\") <= 6)\\n \\t\\t{\\n\\t\\t\\t\\t$pFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"01\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$pFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"03\\\",\\\"31\\\",date(\\\"Y\\\")));\\n\\n \\t\\t}\\n\\t\\t\\telse if(date(\\\"m\\\") > 6 and date(\\\"m\\\") <= 9)\\n \\t\\t{\\n\\t\\t\\t\\t$pFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"04\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$pFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"06\\\",\\\"30\\\",date(\\\"Y\\\")));\\n\\n \\t\\t}\\n\\t\\t\\telse\\n \\t\\t{\\n\\t\\t\\t\\t$pFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"07\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$pFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"09\\\",\\\"30\\\",date(\\\"Y\\\")));\\n \\t\\t}\\n\\t\\t\\t$datevalue[0] = $pFq;\\n\\t\\t\\t$datevalue[1] = $pFq1;\\n\\t\\t}\\n\\t\\telseif($type == \\\"thisfq\\\")\\n\\t\\t{\\n\\t\\t\\tif(date(\\\"m\\\") <= 3)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$cFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"01\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$cFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"03\\\",\\\"31\\\",date(\\\"Y\\\")));\\n\\n \\t\\t}\\n\\t\\t\\telse if(date(\\\"m\\\") > 3 and date(\\\"m\\\") <= 6)\\n \\t\\t{\\n\\t\\t\\t\\t$cFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"04\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$cFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"06\\\",\\\"30\\\",date(\\\"Y\\\")));\\n\\n \\t\\t}\\n\\t\\t\\telse if(date(\\\"m\\\") > 6 and date(\\\"m\\\") <= 9)\\n \\t\\t{\\n\\t\\t\\t\\t$cFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"07\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$cFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"09\\\",\\\"30\\\",date(\\\"Y\\\")));\\n\\n \\t\\t}\\n\\t\\t\\telse\\n \\t\\t{\\n\\t\\t\\t\\t$cFq = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"10\\\",\\\"01\\\",date(\\\"Y\\\")));\\n\\t\\t\\t\\t$cFq1 = date(\\\"Y-m-d\\\",mktime(0, 0, 0, \\\"12\\\",\\\"31\\\",date(\\\"Y\\\")));\\n \\t\\t}\\n\\t\\t\\t$datevalue[0] = $cFq;\\n\\t\\t\\t$datevalue[1] = $cFq1;\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t$datevalue[0] = \\\"\\\";\\n\\t\\t\\t$datevalue[1] = \\\"\\\";\\n\\t\\t}\\n\\n\\t\\treturn $datevalue;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa0e17fa611ccba2165df9295d8210d5\",\n \"score\": \"0.49126953\",\n \"text\": \"public static function should_remove_date_filters( $query ) {\\n\\t\\t\\t// if we're doing ajax, let's keep the date filters\\n\\t\\t\\tif ( tribe( 'context' )->doing_ajax() ) {\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t}\\n\\n\\t\\t\\t// otherwise, let's remove the date filters if we're in the admin dashboard and the query is\\n\\t\\t\\t// and event query on the tribe_events edit page\\n\\t\\t\\treturn (\\n\\t\\t\\t\\tis_admin()\\n\\t\\t\\t\\t&& $query->tribe_is_event_query\\n\\t\\t\\t\\t&& Tribe__Admin__Helpers::instance()->is_screen( 'edit-' . Tribe__Events__Main::POSTTYPE )\\n\\t\\t\\t)\\n\\t\\t\\t|| true === $query->get( 'tribe_remove_date_filters', false );\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1b464ecafb0a2f2a2362449ff8ddda8\",\n \"score\": \"0.49040937\",\n \"text\": \"protected function addDateBasedWhere($type, $column, $operator, $value, $boolean = 'and')\\n {\\n return $this->callHook(\\\"where{$type}\\\", $this->packArgs(compact('column', 'operator', 'value', 'boolean')));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cfe09eb23837ab2956242ed4eaf51d1\",\n \"score\": \"0.48513946\",\n \"text\": \"public function scopeFilter($query, $filters) {\\n if( $month = $filters['month'] ) {\\n\\n // Carbon::parse($month)->month --> converts to month number. \\n $query->whereMonth('created_at', Carbon::parse($month)->month );\\n }\\n\\n if( $year = $filters['year'] ) {\\n \\n $query->whereYear('created_at', $year );\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bfc550d60a0f4cdf059aeb8836fc95be\",\n \"score\": \"0.48400205\",\n \"text\": \"function get_date_where($max_levels=3)\\n {\\n global $page;\\n $date = $page['chronology_date'];\\n while (count($date)>$max_levels)\\n {\\n array_pop($date);\\n }\\n $res = '';\\n if (isset($date[CYEAR]) and $date[CYEAR]!=='any')\\n {\\n $y = $date[CYEAR];\\n $res = \\\" AND $this->date_field BETWEEN '$y-01-01' AND '$y-12-31 23:59:59'\\\";\\n }\\n\\n if (isset($date[CWEEK]) and $date[CWEEK]!=='any')\\n {\\n $res .= ' AND '.$this->calendar_levels[CWEEK]['sql'].'='.$date[CWEEK];\\n }\\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\\n {\\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\\n }\\n if (empty($res))\\n {\\n $res = ' AND '.$this->date_field.' IS NOT NULL';\\n }\\n return $res;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5a3756c6dc5a5e4d33663e92c688f0bb\",\n \"score\": \"0.4837852\",\n \"text\": \"public function scopePublishedAfter($query, $date)\\n {\\n $query->where('created_at', '>=', $date);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f395a8f5b5daff23da43e9bbb7fee71\",\n \"score\": \"0.48036596\",\n \"text\": \"function filtersecondary()\\r\\n\\t{\\t\\r\\n\\t\\t// make date and time variables\\r\\n\\t\\t$this->_setModelState();\\r\\n\\t $model = $this->getModel( $this->get( 'suffix' ) );\\r\\n\\t $state = $model->getState();\\r\\n\\t \\t\\t\\r\\n\\t\\t$date->current = $state->filter_date_from; \\r\\n\\t\\t\\r\\n\\t\\t$date->month = date( 'm', strtotime($date->current) );\\r\\n\\t\\t$date->year = date( 'Y', strtotime($date->current) );\\r\\n\\t\\t\\r\\n\\t\\t// date time variables\\r\\n\\t\\t$date->days = $this->getDays( $date->current );\\r\\n\\t\\t$date->hours = $this->getHours( );\\r\\n\\t\\t\\r\\n\\t\\t// datetime matrix\\r\\n\\t\\t$datetime = array( );\\r\\n\\t\\tfor ( $i = 0; $i < 3; $i++ )\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor ( $j = 0; $j < 24; $j++ )\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$dayskey = $date->days[$i];\\r\\n\\t\\t\\t\\t$hourskey = $date->hours[$j];\\r\\n\\t\\t\\t\\t$datetime[$dayskey][$hourskey] = '';\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t$date->datetime = $datetime;\\r\\n\\t\\t\\r\\n\\t\\t// navigation dates\\r\\n\\t\\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\\r\\n\\t\\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\\r\\n\\t\\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\\r\\n\\t\\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\\r\\n\\t\\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\\r\\n\\t\\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\\r\\n\\t\\t\\r\\n\\t\\t// aditional variables\\r\\n\\t\\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\\r\\n\\t\\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\\r\\n\\t\\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\\r\\n\\t\\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\\r\\n\\t\\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\\r\\n\\t\\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\\r\\n\\t\\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\\r\\n\\t\\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\\r\\n\\t\\t$date->nonworkingdays = $this->getNonWorkingDays( );\\r\\n\\t\\t\\r\\n\\t\\t// get categories for filtering\\r\\n\\t\\t\\r\\n\\t\\t$filter_category = JRequest::getVar( 'filter_category' );\\r\\n\\t\\t$model->setState( 'filter_secondary_category', $filter_category );\\r\\n\\t\\t\\r\\n\\t\\t$model->setState( 'order', 'tbl.eventinstance_date' );\\r\\n\\t\\t$model->setState( 'direction', 'ASC' );\\r\\n\\t\\t$query = $model->getQuery( );\\r\\n\\t\\t$query->order( 'tbl.eventinstance_time' );\\r\\n\\t\\t$model->setQuery( $query );\\r\\n\\t\\t\\r\\n\\t\\t$vars->date = $date;\\r\\n\\t\\t$vars->items = $model->getList( );\\r\\n\\t\\t\\r\\n\\t\\t$html = $this->getLayout( 'default', $vars, 'three' ); \\r\\n\\t\\techo ( json_encode( array('msg'=>$html) ) );\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f66d2227b3d26338fa6beaa1a0ef74de\",\n \"score\": \"0.47997433\",\n \"text\": \"public function filterAction()\\r\\n {\\r\\n \\t/*\\r\\n \\t * form needs to include:\\r\\n \\t * \\r\\n \\t * user id\\r\\n \\t * task category\\r\\n \\t * client id\\r\\n \\t * project id\\r\\n \\t * start date\\r\\n \\t * end date\\r\\n \\t */\\r\\n $this->view->allUsers = $this->userService->getUserList();\\r\\n $task = new Task();\\r\\n $this->view->categories = $task->constraints['category']->getValues();\\r\\n $this->view->clients = $this->clientService->getClients();\\r\\n \\t $this->view->projects = new ArrayObject();\\r\\n $this->renderView('timesheet/filter.php'); \\t\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4bca08df9b45888b725e7cb261e0c936\",\n \"score\": \"0.4795844\",\n \"text\": \"public function Filter_createdateDyn($value, $negate) {\\r\\n\\t\\t$timeStamps = TodoyuSearchFilterHelper::getDynamicDateTimestamp($value, $negate);\\r\\n\\r\\n\\t\\treturn $this->Filter_dateDyn($timeStamps, 'date_create', $negate);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fafff90c9207fba1988ff1ffbab0e102\",\n \"score\": \"0.47860122\",\n \"text\": \"function getColumnFilter ( &$where = array(),\\n $table,\\n $column,\\n $columnLogicOpr,\\n $minOper,\\n $minValue,\\n $rangeLogicOper,\\n $maxOper,\\n $maxValue ) {\\n if ( ($minOper != \\\"\\\" and $minValue != \\\"\\\") and ( $maxValue == \\\"\\\" )) {\\n $where[] = \\\"$columnLogicOpr \\\".self::getTableAlias( $table ).\\\".$column \\\".self::assignSymbol( $minOper ).\\\" $minValue\\\";\\n }\\n // Assign just the max limit\\n if ( ($maxOper != \\\"\\\" and $maxValue != \\\"\\\") and ( $minValue == \\\"\\\") ) {\\n $where[] = \\\"$columnLogicOpr \\\". self::getTableAlias ($table) . \\\".$column \\\".self::assignSymbol($maxOper).\\\" $maxValue\\\";\\n }\\n\\t// Assign both min and max limit\\n if ( ($maxOper != \\\"\\\" and $maxValue != \\\"\\\") and ($minOper != \\\"\\\" and $minValue != \\\"\\\") ) {\\n $where[] = \\\"$columnLogicOpr ( \\\".self::getTableAlias( $table ).\\\".$column \\\".self::assignSymbol( $minOper ).\\\" $minValue $rangeLogicOper \\\".\\n self::getTableAlias ($table) . \\\".$column \\\".self::assignSymbol($maxOper).\\\" $maxValue )\\\";\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2584725220447762439923e2d8bc3026\",\n \"score\": \"0.47745287\",\n \"text\": \"public function twig_filter_tdate()\\n\\t{\\n\\t\\treturn new \\\\Twig_SimpleFilter('tdate', function ($_string, $_format =\\\"Y/m/d\\\", $_convert = true)\\n\\t\\t{\\n\\t\\t\\t$result = $_string;\\n\\t\\t\\tif($this->data->site['currentlang'] == 'fa')\\n\\t\\t\\t{\\n\\t\\t\\t\\t$result = \\\\lib\\\\utility\\\\jdate::date($_format, $_string, $_convert);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t$result = date($_format, strtotime($_string));\\n\\t\\t\\t}\\n\\n\\t\\t\\treturn $result;\\n\\t\\t});\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f517a5ca5834e6e5e4e4b2eff85d02f4\",\n \"score\": \"0.47505686\",\n \"text\": \"function getDateFilterSelectedDate() {\\n $on = $this->getAdditionalProperty('date_filter_on');\\n \\n return $on ? new DateValue($on) : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f14f0bb14b3c29e8530aef625a9c52c5\",\n \"score\": \"0.4737189\",\n \"text\": \"protected function _applyDateRangeFilter()\\n {\\n // Remember that field PERIOD is a DATE(YYYY-MM-DD) in all databases including Oracle\\n\\n if ($this->_from !== null) {\\n $this->getSelect()->where('created_time >= ?', $this->_from .' 00:00:00');\\n }\\n if ($this->_to !== null) {\\n $this->getSelect()->where('created_time <= ?', $this->_to .' 23:59:59');\\n }\\n\\n return $this;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe79d7023b0225b3c383194deb21150c\",\n \"score\": \"0.4722661\",\n \"text\": \"public function getFileFilterByDate($conn, $date){\\n\\t\\t//preparo lo statement che mi ricava tutte le informazioni \\n\\t\\t$sth = $conn->prepare(\\\"select * from Filmato_Presentazione where data_inizio >= :data_inizio or data_fine >= :data_fine limit 1\\\");\\n\\t\\t$sth->bindParam(':data_inizio', $date, PDO::PARAM_STR);\\n\\t\\t$sth->bindParam(':data_fine', $date, PDO::PARAM_STR);\\n\\t\\t$sth->execute();\\n\\t\\treturn $sth; \\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39fa9551fa3b4601a727adc6e96a2865\",\n \"score\": \"0.4722035\",\n \"text\": \"public function filterByDate()\\n {\\n global $connection;\\n //echo \\\"Im on the purchases ->filterByDate()\\\";\\n\\n //else\\n //{\\n #set_error_handler\\n #set_exception_handler\\n #call the stored procedure\\n \\n \\n $SQLQuery = \\\"CALL purchases_filter_date(\\\"\\n . \\\":fk_customer_id,\\\"\\n . \\\":fk_product_id,\\\"\\n . \\\":purchase_quantity,\\\"\\n . \\\":purchase_price,\\\"\\n . \\\":purchase_comment,\\\"\\n . \\\":purchase_subtotal,\\\"\\n . \\\":purchase_taxesAmount,\\\"\\n . \\\":purchase_grandtotal,\\\"\\n . \\\":purchase_id);\\\";\\n $PDOStatement = $connection->prepare($SQLQuery);\\n $PDOStatement->bindParam(\\\":fk_customer_id\\\", $this->customer_id);\\n $PDOStatement->bindParam(\\\":fk_product_id\\\", $this->product_id);\\n $PDOStatement->bindParam(\\\":purchase_quantity\\\", $this->purchase_quantity);\\n $PDOStatement->bindParam(\\\":purchase_price\\\", $this->purchase_price);\\n $PDOStatement->bindParam(\\\":purchase_comment\\\", $this->purchase_comment);\\n $PDOStatement->bindParam(\\\":purchase_subtotal\\\", $this->purchase_subtotal);\\n $PDOStatement->bindParam(\\\":purchase_taxesAmount\\\", $this->purchase_taxesAmount);\\n $PDOStatement->bindParam(\\\":purchase_grandtotal\\\", $this->purchase_grandtotal);\\n $PDOStatement->bindParam(\\\":purchase_id\\\", $this->purchase_id); \\n $PDOStatement->execute(); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5437479e75616da6193a7c1728715c59\",\n \"score\": \"0.47145924\",\n \"text\": \"function wck_fep_filter_auto_drafts_where( $where = '' ){\\n\\t\\t// posts older than 12 hours\\n\\t\\t$where .= \\\" AND post_date <= '\\\" . date('Y-m-d H:i:s', strtotime('-12 hours')) . \\\"'\\\";\\n\\t\\treturn $where;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d53ed9a83ecc78cfd48313520dbc5592\",\n \"score\": \"0.47128385\",\n \"text\": \"protected function filterQuery(&$query) {\\n foreach($this->filter_params as $filter) {\\n if(Input::has($filter)) {\\n $val = Input::get($filter);\\n $query->where($filter, '=', $val);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bcb443e823d0ff4881080aea164a51ee\",\n \"score\": \"0.4700585\",\n \"text\": \"function get_occurs_within_where_clause($table_name, $rel_table, $start_ts_obj, $end_ts_obj, $field_name='date_start', $view){\\n\\t\\tglobal $timedate;\\n\\t\\n\\t\\t$start = clone $start_ts_obj;\\n\\t\\t$end = clone $end_ts_obj;\\n\\n\\t\\t$field_date = $table_name.'.'.$field_name;\\n\\t\\t$start_day = $GLOBALS['db']->convert(\\\"'{$start->asDb()}'\\\",'datetime');\\n\\t\\t$end_day = $GLOBALS['db']->convert(\\\"'{$end->asDb()}'\\\",'datetime');\\n\\n\\t\\t$where = \\\"($field_date >= $start_day AND $field_date < $end_day\\\";\\n\\t\\tif($rel_table != ''){\\n\\t\\t\\t$where .= \\\" AND $rel_table.accept_status != 'decline'\\\";\\n\\t\\t}\\n\\n\\t\\t$where .= \\\")\\\";\\n\\t\\treturn $where;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c27d34d0aa2f2fe3aae7b9c6d196f3d\",\n \"score\": \"0.46966797\",\n \"text\": \"function filterprimary()\\r\\n\\t{\\t\\r\\n\\t\\t// make date and time variables\\r\\n\\t\\t$this->_setModelState();\\r\\n\\t $model = $this->getModel( $this->get( 'suffix' ) );\\r\\n\\t $state = $model->getState();\\r\\n\\t \\t\\t\\r\\n\\t\\t$date->current = $state->filter_date_from; \\r\\n\\t\\t\\r\\n\\t\\t$date->month = date( 'm', strtotime($date->current) );\\r\\n\\t\\t$date->year = date( 'Y', strtotime($date->current) );\\r\\n\\t\\t\\r\\n\\t\\t// date time variables\\r\\n\\t\\t$date->days = $this->getDays( $date->current );\\r\\n\\t\\t$date->hours = $this->getHours( );\\r\\n\\t\\t\\r\\n\\t\\t// datetime matrix\\r\\n\\t\\t$datetime = array( );\\r\\n\\t\\tfor ( $i = 0; $i < 3; $i++ )\\r\\n\\t\\t{\\r\\n\\t\\t\\tfor ( $j = 0; $j < 24; $j++ )\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$dayskey = $date->days[$i];\\r\\n\\t\\t\\t\\t$hourskey = $date->hours[$j];\\r\\n\\t\\t\\t\\t$datetime[$dayskey][$hourskey] = '';\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t$date->datetime = $datetime;\\r\\n\\t\\t\\r\\n\\t\\t// navigation dates\\r\\n\\t\\t$date->nextthreedate = date( 'Y-m-d', strtotime( $date->current . ' +3 days' ) );\\r\\n\\t\\t$date->nextmonth = date( 'm', strtotime( $date->current . ' +3 days' ) );\\r\\n\\t\\t$date->nextyear = date( 'Y', strtotime( $date->current . ' +3 days' ) );\\r\\n\\t\\t$date->prevthreedate = date( 'Y-m-d', strtotime( $date->current . ' -3 days' ) );\\r\\n\\t\\t$date->prevmonth = date( 'm', strtotime( $date->current . ' -3 days' ) );\\r\\n\\t\\t$date->prevyear = date( 'Y', strtotime( $date->current . ' -3 days' ) );\\r\\n\\t\\t\\r\\n\\t\\t// aditional variables\\r\\n\\t\\t$date->startday = date( 'd', strtotime( $date->days[0] ) );\\r\\n\\t\\t$date->startmonth = date( 'm', strtotime( $date->days[0] ) );\\r\\n\\t\\t$date->startmonthname = date( 'F', strtotime( $date->days[0] ) );\\r\\n\\t\\t$date->startyear = date( 'Y', strtotime( $date->days[0] ) );\\r\\n\\t\\t$date->endday = date( 'd', strtotime( $date->days[2] ) );\\r\\n\\t\\t$date->endmonth = date( 'm', strtotime( $date->days[2] ) );\\r\\n\\t\\t$date->endmonthname = date( 'F', strtotime( $date->days[2] ) );\\r\\n\\t\\t$date->endyear = date( 'Y', strtotime( $date->days[2] ) );\\r\\n\\t\\t$date->nonworkingdays = $this->getNonWorkingDays( );\\r\\n\\t\\t\\r\\n\\t\\t// take filter categories and do filtering\\r\\n\\t\\t$elements = json_decode( preg_replace('/[\\\\n\\\\r]+/', '\\\\n', JRequest::getVar( 'elements', '', 'post', 'string' ) ) );\\r\\n\\t\\t\\r\\n\\t\\t$categories = array();\\r\\n\\t\\tforeach($elements as $element)\\r\\n\\t\\t{\\r\\n\\t\\t\\tif($element->checked && strpos ( $element->name , 'primary_cat_' ) !== false )\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\t$categories[$element->name] = $element->value;\\r\\n\\t\\t\\t}\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t\\t$model->setState( 'filter_primary_categories', $categories );\\r\\n\\t\\t\\r\\n\\t\\t// order event instances by date and time\\r\\n\\t\\t$model->setState( 'order', 'tbl.eventinstance_date' );\\r\\n\\t\\t$model->setState( 'direction', 'ASC' );\\r\\n\\t\\t$query = $model->getQuery( );\\r\\n\\t\\t$query->order( 'tbl.eventinstance_start_time' );\\r\\n\\t\\t$model->setQuery( $query );\\r\\n\\t\\t\\r\\n\\t\\t// attach variables to the $vars object\\r\\n\\t\\t$vars->date = $date;\\r\\n\\t\\t$vars->items = $model->getList( );\\r\\n\\t\\t\\r\\n\\t\\t// echo output\\r\\n\\t\\t$html = $this->getLayout( 'default', $vars, 'three' ); \\r\\n\\t\\techo ( json_encode( array('msg'=>$html) ) );\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"783309896e344013dd9a51fa2f8e605f\",\n \"score\": \"0.4695176\",\n \"text\": \"abstract public function filter(Octopus_Model_ResultSet $resultSet, $query);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54ceeef96f5e97c5fbc56b29d00859c6\",\n \"score\": \"0.46802437\",\n \"text\": \"public static function filter($table, $fields){ \\r\\n $queryType = \\\"filter\\\";\\r\\n include '../helper/retrieve_data.php'; //query and data rertrieval are handled here\\r\\n return $querySet;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc050acd63a9a8029dd646d9c6436ace\",\n \"score\": \"0.46778077\",\n \"text\": \"function getFilterEndDate($date)\\n{\\n $endDate = date('Y-m-d', strtotime('+1 day', strtotime($date)));\\n if (!$date)\\n $endDate = date(\\\"9999-12-31 23:59:59\\\");\\n return $endDate;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f60d90b74247a8afc8908335dd22e012\",\n \"score\": \"0.4664104\",\n \"text\": \"protected function dates_filter(){\\n \\t//+Constraint Isgi: only one year data\\n \\t$temporal = $this->get_temporal();\\n \\tif( strtolower($temporal->end) == \\\"now\\\"){\\n \\t\\t$now = new \\\\DateTime();\\n \\t\\t$temporal->end = $now->format(\\\"Y-m-d\\\");\\n \\t}\\n \\t\\n \\t\\n \\t//change start and end\\n \\tif( $this->start < $temporal->start){\\n \\t\\t$this->start = $temporal->start;\\n \\t}\\n \\tif( $this->end > $temporal->end){\\n \\t\\t$this->end = $temporal->end;\\n \\t}\\n \\t$update = $this->get_update();\\n \\tif( !empty( $update) && $update < $this->end){\\n \\t\\t$this->end = $update;\\n \\t}\\n \\t// diff between start and end\\n \\t$start = new \\\\DateTime( $this->start);\\n \\t$end = new \\\\DateTime( $this->end);\\n \\t$interval = $start->diff( $end);\\n \\tif( $interval->invert){\\n \\t\\t//end < start\\n \\t\\t$this->error = \\\"NO_DATA\\\";\\n \\t}else{\\n\\t \\tif( $interval->days > 365){\\n\\t \\t\\t$start = clone $end;\\n\\t \\t\\t$start->sub( new \\\\DateInterval(\\\"P364D\\\"));\\n\\t \\t\\t$this->start = $start->format(\\\"Y-m-d\\\");\\n\\t \\t}\\n \\t}\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e1eb098b38e2b9121caf6a09c86b2ab\",\n \"score\": \"0.46535712\",\n \"text\": \"public function getFilterTimeCount() {\\n \\n $columns = array();\\n $params = array();\\n\\n // TODAY\\n $dateStart = new \\\\DateTime();\\n $dateStart->setTime(0, 0, 1);\\n $dateEnd = new \\\\DateTime();\\n $dateEnd->setTime(23, 59, 59);\\n $columns[] = \\\"\\n SUM(\\n CASE \\n WHEN \\n n.start_date >= :todayStart AND n.start_date <= :todayEnd \\n OR\\n n.end_date >= :todayStart AND n.end_date <= :todayEnd \\n OR\\n n.start_date < :todayStart AND n.end_date > :todayEnd \\n THEN 1 \\n ELSE 0 \\n END\\n ) as today\\\";\\n $params['todayStart'] = $dateStart;\\n $params['todayEnd'] = $dateEnd;\\n\\n // YESTERDAY\\n $dateStart = new \\\\DateTime('yesterday');\\n $dateStart->setTime(0, 0, 1);\\n $dateEnd = new \\\\DateTime('yesterday');\\n $dateEnd->setTime(23, 59, 59);\\n $columns[] = \\\"\\n SUM(\\n CASE \\n WHEN \\n n.start_date >= :yesterdayStart AND n.start_date <= :yesterdayEnd \\n OR\\n n.end_date >= :yesterdayStart AND n.end_date <= :yesterdayEnd \\n OR\\n n.start_date < :yesterdayStart AND n.end_date > :yesterdayEnd \\n THEN 1 \\n ELSE 0 \\n END\\n ) as yesterday\\\";\\n $params['yesterdayStart'] = $dateStart;\\n $params['yesterdayEnd'] = $dateEnd;\\n\\n // THIS WEEK\\n $today = new \\\\DateTime();\\n if('Sunday' == $today->format('l')) {\\n $dateStart = clone $today;\\n $dateStart->modify('Monday last week');\\n $dateStart->setTime(0, 0, 1);\\n $dateEnd = $today;\\n $dateEnd->setTime(23, 59, 59);\\n } else {\\n $dateStart = clone $today;\\n $dateStart->modify('Monday this week');\\n $dateStart->setTime(0, 0, 1);\\n $dateEnd = clone $today;\\n $dateEnd->modify('Sunday this week');\\n $dateEnd->setTime(23, 59, 59);\\n }\\n $columns[] = \\\"\\n SUM(\\n CASE \\n WHEN \\n n.start_date >= :thisWeekStart AND n.start_date <= :thisWeekEnd \\n OR\\n n.end_date >= :thisWeekStart AND n.end_date <= :thisWeekEnd \\n OR\\n n.start_date < :thisWeekStart AND n.end_date > :thisWeekEnd \\n THEN 1 \\n ELSE 0 \\n END\\n ) as thisWeek\\\";\\n $params['thisWeekStart'] = $dateStart;\\n $params['thisWeekEnd'] = $dateEnd;\\n\\n // LAST WEEK\\n $dateStart = new \\\\DateTime();\\n $dateStart->setTime(0, 0, 1);\\n $dateStart->sub(new \\\\DateInterval('P7D'));\\n $dateEnd = new \\\\DateTime();\\n $dateEnd->setTime(23, 59, 59);\\n $columns[] = \\\"\\n SUM(\\n CASE \\n WHEN \\n n.start_date >= :lastWeekStart AND n.start_date <= :lastWeekEnd \\n OR\\n n.end_date >= :lastWeekStart AND n.end_date <= :lastWeekEnd \\n OR\\n n.start_date < :lastWeekStart AND n.end_date > :lastWeekEnd \\n THEN 1 \\n ELSE 0 \\n END\\n ) as lastWeek\\\";\\n $params['lastWeekStart'] = $dateStart;\\n $params['lastWeekEnd'] = $dateEnd;\\n \\n // PAST MONTH\\n $dateStart = new \\\\DateTime();\\n $dateStart->setTime(0, 0, 1);\\n $dateStart->sub(new \\\\DateInterval('P1M'));\\n $dateEnd = new \\\\DateTime();\\n $dateEnd->setTime(23, 59, 59);\\n $columns[] = \\\"\\n SUM(\\n CASE \\n WHEN \\n n.start_date >= :pastMonthStart AND n.start_date <= :pastMonthEnd \\n OR\\n n.end_date >= :pastMonthStart AND n.end_date <= :pastMonthEnd \\n OR\\n n.start_date < :pastMonthStart AND n.end_date > :pastMonthEnd \\n THEN 1 \\n ELSE 0 \\n END\\n ) as pastMonth\\\";\\n $params['pastMonthStart'] = $dateStart;\\n $params['pastMonthEnd'] = $dateEnd;\\n\\n return $this->createQueryBuilder('n')\\n ->select(implode(', ', $columns))\\n ->where('n.draft = false')\\n ->setParameters($params)\\n ->getQuery()\\n ->getOneOrNullResult();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed0dbc56c4ec5ff82003b88078ea7601\",\n \"score\": \"0.46339327\",\n \"text\": \"public function scopePastEventsOnly($query)\\n {\\n return $query->where('date_start', '<=', Carbon::now());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7232f7057b4fc0f515fc3276c946037\",\n \"score\": \"0.45658055\",\n \"text\": \"public function findTribeEventsByDate($tribe) \\n {\\n $date = new \\\\DateTime('now'); \\n $date->modify('-10 days');\\n\\n $qb = $this->createQueryBuilder('e')\\n ->join('e.tribe', 't')\\n ->addselect('t')\\n ->join('e.user', 'u')\\n ->addselect('u')\\n ->join('e.category', 'c')\\n ->addselect('c')\\n ->where('e.tribe = :myTribe')\\n ->andWhere('e.createdAt > :date')\\n ->setParameters([\\n 'myTribe' => $tribe,\\n 'date' => $date\\n ])\\n ;\\n\\n return $qb->getQuery()->getArrayResult();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b341324552dc2b52b593135e75ab43c8\",\n \"score\": \"0.45548645\",\n \"text\": \"protected function dateBasedWhere($type, Builder $query, $where)\\n {\\n $value = $this->parameter($where['value']);\\n\\n return $type.'('.$this->wrap($where['column']).') '.$where['operator'].' '.$value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88124f3461f00004563c5fb3c4b6f58e\",\n \"score\": \"0.45537654\",\n \"text\": \"public function setDate($value){\\n return $this->setParameter('date', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0633c42d4b718250c4b318de604a8b66\",\n \"score\": \"0.45497492\",\n \"text\": \"protected function filterDate($date)\\n {\\n switch (true)\\n {\\n case (!$date || !strlen(trim(implode('', (array) $date)))):\\n case (is_array($date) && (!isset($date['year']) || !isset($date['month']) || !isset($date['day']))):\\n // $date is null or is an array with empty or zero string elements\\n // or one of its components is not set (year, month, day)\\n return null;\\n case (is_array($date)):\\n // is an array and is not bad formed\\n return $date['year'].'-'.$date['month'].'-'.$date['day'];\\n default:\\n // is not an array\\n return $date;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca7ae146f421717ecda700a2ea4bb2a6\",\n \"score\": \"0.45443663\",\n \"text\": \"private function _sql_custom_date_filter($date_value, $operation='=') {\\n\\t\\tglobal $wpdb;\\n\\t\\tif ($date_value) {\\n\\t\\t\\t$query = \\\" AND ({$wpdb->postmeta}.meta_key = %s AND {$wpdb->postmeta}.meta_value $operation %s)\\\";\\n\\t\\t\\treturn $wpdb->prepare( $query, $this->date_column, $date_value );\\n\\t\\t}\\n\\t\\telse {\\n\\t\\t\\treturn '';\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f799d8699899640cc1f0a4157a4d1244\",\n \"score\": \"0.45411038\",\n \"text\": \"function _max_date($field, $date)\\r\\n\\t{\\r\\n\\t\\treturn (strtotime($this->{$field}) > strtotime($date)) ? FALSE : TRUE;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c84b9cf932d345078d68746c655dfb0f\",\n \"score\": \"0.45355132\",\n \"text\": \"public function scopeResultsLastPublishedAt($query)\\n {\\n // Get the last published_at from results\\n $lastPublishedAt = $this->latest('published_at')->value('published_at');\\n\\n // Filter the results of the last pusblished_at\\n return $query->where('published_at', $lastPublishedAt);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a8bfe179af1c821a2864bc9929d8402\",\n \"score\": \"0.4531833\",\n \"text\": \"public function scopeLastDate($query) {\\n return $query->orderBy('date', 'desc');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f96d9fe96cabe779ea2659bcbcea071\",\n \"score\": \"0.45195037\",\n \"text\": \"private function modifyQuery($query, $tasksTable, $casesTable, $tpTable, $filteredTasksTable = false, $args)\\n\\t{\\n\\t\\t$type = 'default';\\n\\t\\tif (!empty($args['type'])) {\\n\\t\\t\\t$type = $args['type'];\\n\\t\\t}\\n\\n\\t\\t$query->whereNested(function ($query) use ($tasksTable, $casesTable, $tpTable, $filteredTasksTable, $args) {\\n\\t\\t\\tif (!empty($args['addConditions'])) {\\n\\t\\t\\t\\t$args['addConditions']($query);\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ($tasksTable) {\\n\\t\\t\\t\\tif (count($this->fields->assignee)) {\\n\\t\\t\\t\\t\\t$query->whereIn(\\\"{$tasksTable}.assignee_id\\\", $this->fields->assignee);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif (count($this->fields->assignor)) {\\n\\t\\t\\t\\t\\t$query->whereIn(\\\"{$tasksTable}.assignor_id\\\", $this->fields->assignor);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif ($this->fields->surveystatus !== false) {\\n\\t\\t\\t\\t\\t$query->where(\\\"{$tasksTable}.status\\\", '=', $this->fields->surveystatus);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif (!$casesTable) {\\n\\t\\t\\t\\t\\tif (count($this->fields->caseid)) {\\n\\t\\t\\t\\t\\t\\t$query->whereIn(\\\"{$tasksTable}.case_id\\\", $this->fields->caseid);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ($casesTable) {\\n\\t\\t\\t\\tif ($this->fields->casestatus !== false) {\\n\\t\\t\\t\\t\\t$query->where(\\\"{$casesTable}.status\\\", '=', $this->fields->casestatus);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif (count($this->fields->patient)) {\\n\\t\\t\\t\\t\\t$query->whereIn(\\\"{$casesTable}.patient_id\\\", $this->fields->patient);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif (count($this->fields->tp)) {\\n\\t\\t\\t\\t\\t$query->whereIn(\\\"{$casesTable}.treatment_path_id\\\", $this->fields->tp);\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\tif (count($this->fields->tpstep)) {\\n\\t\\t\\t\\t\\t$query->whereIn(\\\"{$casesTable}.step_id\\\", $this->fields->tpstep);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tif (count($this->fields->caseid)) {\\n\\t\\t\\t\\t\\t$query->whereIn(\\\"{$casesTable}.id\\\", $this->fields->caseid);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tif ($tpTable) {\\n\\t\\t\\t\\tif (count($this->fields->cp)) {\\n\\t\\t\\t\\t\\t$query->whereIn(\\\"{$tpTable}.clinical_path_id\\\", $this->fields->cp);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tif ($filteredTasksTable) {\\n\\t\\t\\t\\t$query->whereNotNull(\\\"{$filteredTasksTable}.id\\\");\\n\\t\\t\\t}\\n\\t\\t});\\n\\n\\t\\treturn $query;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"301de3df9ea0a7a9279cf1a6b4c94cff\",\n \"score\": \"0.45118698\",\n \"text\": \"protected function dateBasedWhere(string $type, Builder $query, array $where)\\n {\\n $value = $this->parameter($where['value']);\\n\\n return $type . '(' . $this->wrap($where['column']) . ') ' . $where['operator'] . ' ' . $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5854f0a4adfc98c89535fa198f80a0cc\",\n \"score\": \"0.45077533\",\n \"text\": \"protected function filter(&$query)\\n {\\n if (!empty($this->filterModel)) {\\n if (isset($this->filterModel->status_id)) {\\n $query->andWhere(['status' => $this->filterModel->status_id]);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"100ac7a6afac18a139e5a00abf201650\",\n \"score\": \"0.45069352\",\n \"text\": \"private static function _getFilter() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c131d6eb0725d75e813946262691f47d\",\n \"score\": \"0.45003167\",\n \"text\": \"private function compare_with_date()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab8e304136c6568e7c8b94932665f501\",\n \"score\": \"0.44866413\",\n \"text\": \"public function get_filter_data()\\n {\\n if(!empty($_POST['cntxt']))\\n {\\n if($_POST['cntxt']=='today')\\n {\\n $from_date=date('Y-m-d');\\n $to_date=date('Y-m-d');\\n }\\n // echo date('d/m/Y', strtotime('-7 days'));\\n if($_POST['cntxt']=='7 days')\\n {\\n $to_date=date('Y-m-d');\\n $from_date = date('Y-m-d',strtotime(\\\"-7 days\\\"));\\n }\\n if($_POST['cntxt']=='30 days')\\n {\\n $to_date=date('Y-m-d');\\n $from_date = date('Y-m-d',strtotime(\\\"-30 days\\\"));\\n }\\n if($_POST['cntxt']=='this month')\\n {\\n $to_date=date('Y-m-d');\\n $from_date = date('Y-m-01');\\n }\\n if($_POST['cntxt']=='last month')\\n {\\n $to_date= date('Y-m-d', strtotime('last day of last month'));\\n $from_date = date('Y-m-d', strtotime('first day of last month'));\\n }\\n \\n $this->process_data($from_date,$to_date); \\n }\\n else\\n {\\n $data['status_text']='Input error';\\n $data['status_code']='0';\\n echo json_encode($data);\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"051486b035ce2ad935f9d1d46af6592f\",\n \"score\": \"0.44836998\",\n \"text\": \"public function filter($date)\\n {\\n if (empty($date)) {\\n return null;\\n } elseif (is_string($date)) {\\n return $date;\\n } elseif (!is_array($date) || empty($date['year']) || empty($date['month']) || empty($date['day'])) {\\n return null;\\n }\\n\\n return $date['year'] . '-' . $date['month'] . '-' . $date['day'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"678e5388c6962f57f83270db89bad216\",\n \"score\": \"0.4483415\",\n \"text\": \"public function __invoke($query, $input)\\n {\\n $arguments = $this->getFilterParams($input);\\n\\n return $query->where($arguments);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34a44132503d56a91d768fa9b72dd44e\",\n \"score\": \"0.44764555\",\n \"text\": \"public function onSearch()\\n {\\n // get the search form data\\n $data = $this->form->getData();\\n $filters = [];\\n\\n TSession::setValue(__CLASS__.'_filter_data', NULL);\\n TSession::setValue(__CLASS__.'_filters', NULL);\\n\\n if (isset($data->exemplar_id) AND ( (is_scalar($data->exemplar_id) AND $data->exemplar_id !== '') OR (is_array($data->exemplar_id) AND (!empty($data->exemplar_id)) )) )\\n {\\n\\n $filters[] = new TFilter('exemplar_id', '=', $data->exemplar_id);// create the filter \\n }\\n\\n if (isset($data->leitor_id) AND ( (is_scalar($data->leitor_id) AND $data->leitor_id !== '') OR (is_array($data->leitor_id) AND (!empty($data->leitor_id)) )) )\\n {\\n\\n $filters[] = new TFilter('leitor_id', '=', $data->leitor_id);// create the filter \\n }\\n\\n if (isset($data->dt_emprestimo) AND ( (is_scalar($data->dt_emprestimo) AND $data->dt_emprestimo !== '') OR (is_array($data->dt_emprestimo) AND (!empty($data->dt_emprestimo)) )) )\\n {\\n\\n $filters[] = new TFilter('dt_emprestimo', '>=', $data->dt_emprestimo);// create the filter \\n }\\n\\n if (isset($data->dt_emprestimo_final) AND ( (is_scalar($data->dt_emprestimo_final) AND $data->dt_emprestimo_final !== '') OR (is_array($data->dt_emprestimo_final) AND (!empty($data->dt_emprestimo_final)) )) )\\n {\\n\\n $filters[] = new TFilter('dt_emprestimo', '<=', $data->dt_emprestimo_final);// create the filter \\n }\\n\\n if (isset($data->dt_previsao) AND ( (is_scalar($data->dt_previsao) AND $data->dt_previsao !== '') OR (is_array($data->dt_previsao) AND (!empty($data->dt_previsao)) )) )\\n {\\n\\n $filters[] = new TFilter('dt_previsao', '>=', $data->dt_previsao);// create the filter \\n }\\n\\n if (isset($data->dt_prevista_final) AND ( (is_scalar($data->dt_prevista_final) AND $data->dt_prevista_final !== '') OR (is_array($data->dt_prevista_final) AND (!empty($data->dt_prevista_final)) )) )\\n {\\n\\n $filters[] = new TFilter('dt_previsao', '<=', $data->dt_prevista_final);// create the filter \\n }\\n\\n if (isset($data->dt_devolucao) AND ( (is_scalar($data->dt_devolucao) AND $data->dt_devolucao !== '') OR (is_array($data->dt_devolucao) AND (!empty($data->dt_devolucao)) )) )\\n {\\n\\n $filters[] = new TFilter('dt_devolucao', '>=', $data->dt_devolucao);// create the filter \\n }\\n\\n if (isset($data->dt_devolucao_final) AND ( (is_scalar($data->dt_devolucao_final) AND $data->dt_devolucao_final !== '') OR (is_array($data->dt_devolucao_final) AND (!empty($data->dt_devolucao_final)) )) )\\n {\\n\\n $filters[] = new TFilter('dt_devolucao', '<=', $data->dt_devolucao_final);// create the filter \\n }\\n\\n $param = array();\\n $param['offset'] = 0;\\n $param['first_page'] = 1;\\n\\n // fill the form with data again\\n $this->form->setData($data);\\n\\n // keep the search data in the session\\n TSession::setValue(__CLASS__.'_filter_data', $data);\\n TSession::setValue(__CLASS__.'_filters', $filters);\\n\\n $this->onReload($param);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eaa57f83d7817bc1eb3d5f6c49a72265\",\n \"score\": \"0.44731528\",\n \"text\": \"protected function _applyDateRangeFilter() {\\r\\n return $this;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9916963fafe241a55e41316b3bde7ada\",\n \"score\": \"0.44635335\",\n \"text\": \"function get_date_where($max_levels=3)\\n {\\n global $page;\\n\\n $date = $page['chronology_date'];\\n while (count($date)>$max_levels)\\n {\\n array_pop($date);\\n }\\n $res = '';\\n if (isset($date[CYEAR]) and $date[CYEAR]!=='any')\\n {\\n $b = $date[CYEAR] . '-';\\n $e = $date[CYEAR] . '-';\\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\\n {\\n $b .= sprintf('%02d-', $date[CMONTH]);\\n $e .= sprintf('%02d-', $date[CMONTH]);\\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\\n {\\n $b .= sprintf('%02d', $date[CDAY]);\\n $e .= sprintf('%02d', $date[CDAY]);\\n }\\n else\\n {\\n $b .= '01';\\n $e .= $this->get_all_days_in_month($date[CYEAR], $date[CMONTH]);\\n }\\n }\\n else\\n {\\n $b .= '01-01';\\n $e .= '12-31';\\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\\n {\\n $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];\\n }\\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\\n {\\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\\n }\\n }\\n $res = \\\" AND $this->date_field BETWEEN '$b' AND '$e 23:59:59'\\\" . $res;\\n }\\n else\\n {\\n $res = ' AND '.$this->date_field.' IS NOT NULL';\\n if (isset($date[CMONTH]) and $date[CMONTH]!=='any')\\n {\\n $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];\\n }\\n if (isset($date[CDAY]) and $date[CDAY]!=='any')\\n {\\n $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];\\n }\\n }\\n return $res;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9fbb2515b46cfb27dbf15780897b1be\",\n \"score\": \"0.44630572\",\n \"text\": \"private function sql_whereAnd_fromTS()\\n {\\n // Get table and field\\n list( $table, $field ) = explode( '.', $this->curr_tableField );\\n\\n // Get TS value\\n $andWhere = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'sql.' ][ 'andWhere' ];\\n\\n if ( !empty( $andWhere ) )\\n {\\n $andWhere = \\\" AND \\\" . $andWhere;\\n }\\n\\n // RETURN AND WHERE statement\\n return $andWhere;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce5b5e4fbff6c0548d9698e75312bb83\",\n \"score\": \"0.44617042\",\n \"text\": \"public function __invoke($query, $input)\\n {\\n $arguments = $this->getFilterParams($input);\\n \\n // Convert the invoice_date parameter to created_at parameter\\n if ( isset($arguments['invoice_date'])) {\\n\\n $arguments['created_at'] = $arguments['invoice_date'];\\n\\n unset($arguments['invoice_date']);\\n }\\n\\n // Convert the grand_total parameter to base_grand_total parameter\\n if ( isset($arguments['grand_total'])) {\\n\\n $arguments['base_grand_total'] = $arguments['grand_total'];\\n\\n unset($arguments['grand_total']);\\n }\\n\\n return $query->where($arguments);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1603cd3124cde07cf1ad4d75dbec19ad\",\n \"score\": \"0.4458376\",\n \"text\": \"protected function addCommonViewFiltersForDate(QueryBuilder $qb)\\n {\\n if (null === $this->request) {\\n return $qb;\\n }\\n $routeName = $this->request->get('_route');\\n if (false !== strpos($routeName, 'edit')) {\\n return $qb;\\n }\\n \\n $parameters = $this->getViewQuickNavParametersForDate();\\n foreach ($parameters as $k => $v) {\\n if ($k == 'catId') {\\n if (intval($v) > 0) {\\n // single category filter\\n $qb->andWhere('tblCategories.category = :category')\\n ->setParameter('category', $v);\\n }\\n continue;\\n }\\n if ($k == 'catIdList') {\\n // multi category filter\\n $qb = $this->categoryHelper->buildFilterClauses($qb, 'date', $v);\\n continue;\\n }\\n if (in_array($k, ['q', 'searchterm'])) {\\n // quick search\\n if (!empty($v)) {\\n $qb = $this->addSearchFilter('date', $qb, $v);\\n }\\n continue;\\n }\\n \\n if (is_array($v)) {\\n continue;\\n }\\n \\n // field filter\\n if ((!is_numeric($v) && $v != '') || (is_numeric($v) && $v > 0)) {\\n if ($k == 'workflowState' && substr($v, 0, 1) == '!') {\\n $qb->andWhere('tbl.' . $k . ' != :' . $k)\\n ->setParameter($k, substr($v, 1, strlen($v)-1));\\n } elseif (substr($v, 0, 1) == '%') {\\n $qb->andWhere('tbl.' . $k . ' LIKE :' . $k)\\n ->setParameter($k, '%' . substr($v, 1) . '%');\\n } else {\\n $qb->andWhere('tbl.' . $k . ' = :' . $k)\\n ->setParameter($k, $v);\\n }\\n }\\n }\\n \\n $qb = $this->applyDefaultFiltersForDate($qb, $parameters);\\n \\n return $qb;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"adb2c29ef357a43f532d1a361f5acd27\",\n \"score\": \"0.44578302\",\n \"text\": \"public function ShowTicketsFilter($date, $idMovie, $idUser){\\n\\n $ticketList = $this->ticketDAO->GetFilteredTicket($date, $idMovie, $idUser);\\n $ticketFilter = $this->ticketDAO->GetMovie($idUser);\\n if($ticketList == null){\\n $message = \\\"La bùsqueda no arrojo ninguna entrada para el dia de hoy.\\\";\\n $this->ShowTicketsView($message, $idUser);\\n }\\n require_once (VIEWS_PATH . \\\"ticket-list.php\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e1c19a8b254b77d60b617fd74675fe0\",\n \"score\": \"0.44563895\",\n \"text\": \"public function searchpast($params)\\n {\\n\\n if(Yii::$app->user->identity['role']=='student') {\\n $date1= date('Y-m-d H:i:s', time()+60*60*5+30*60);\\n// print_r(gettype($date1));\\n\\n $query = Quiz::find()->where(['<', 'endtime', $date1]);\\n /* $query = Quiz::find()->where(['quizid'=>2])->one();\\n print_r($query['endtime']);\\n exit();\\n*/\\n }\\n\\n\\n $dataProvider = new ActiveDataProvider([\\n 'query' => $query,\\n ]);\\n\\n $this->load($params);\\n\\n if (!$this->validate()) {\\n // uncomment the following line if you do not want to return any records when validation fails\\n // $query->where('0=1');\\n return $dataProvider;\\n }\\n\\n $query->andFilterWhere([\\n 'quizid' => $this->quizid,\\n 'starttime' => $this->starttime,\\n 'endtime' => $this->endtime,\\n 'totalscore' => $this->totalscore,\\n 'totalquestions' => $this->totalquestions,\\n ]);\\n\\n $query->andFilterWhere(['like', 'quizname', $this->quizname])\\n ->andFilterWhere(['like', 'inchargename', $this->inchargename])\\n ->andFilterWhere(['like', 'courseid', $this->courseid])\\n ->andFilterWhere(['like', 'coursename', $this->coursename])\\n ->andFilterWhere(['like', 'department', $this->department])\\n ->andFilterWhere(['like', 'setterid', $this->setterid]);\\n\\n return $dataProvider;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4e1dc592a2451922931146e6efb7251\",\n \"score\": \"0.44499135\",\n \"text\": \"public function on_filter( $query ) {\\n\\t global $post_type, $pagenow;\\n \\tif( !$pagenow == 'edit.php' || \\n \\t\\t$post_type != $this->get_id() || \\n \\t\\t!$query->is_main_query() ) {\\n \\t\\treturn;\\n \\t}\\n\\n \\tforeach ($this->args['columns'] as $key => $col) {\\n\\t\\t\\tif( empty( $col['filter_cb'] ) ) {\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif( !isset( $_GET[$key] ) ) {\\n\\t\\t\\t\\tcontinue;\\n\\t\\t\\t}\\n\\n\\t\\t\\t$col['filter_cb']( $query, $_GET[$key] );\\n \\t}\\n\\n \\treturn $query;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f09dbf0e82d027e3521e0a441398056\",\n \"score\": \"0.44462866\",\n \"text\": \"public function scopeMonth($query,$filters){\\n if($month = $filters['month']){\\n $query->whereMonth('created_at', Carbon::parse($month)->month);\\n }\\n\\n if($year = $filters['year']){\\n $query->whereYear('created_at',$year);\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ec3b531c1b2d6aa03a7fb44f9dd2176\",\n \"score\": \"0.4445821\",\n \"text\": \"function getFilterStartDate($date)\\n{\\n $startDate = date($date);\\n if (!$startDate)\\n $startDate = date(\\\"1000-01-01 00:00:00\\\");\\n return $startDate;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"add15e53d9f4dbb5b7f51d6366db8b3f\",\n \"score\": \"0.444326\",\n \"text\": \"public function applyFilter(Query $query);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37aba9d83e9083e0d8dda303abf13d63\",\n \"score\": \"0.44348836\",\n \"text\": \"public function createQuery($filtered = TRUE) {\\n\\t\\t$query = parent::createQuery();\\n\\t\\tif ($filtered === TRUE) {\\n\\t\\t\\t$startDate = new \\\\DateTime('last Friday');\\n\\t\\t\\t$query->matching($query->greaterThan('created', $startDate));\\n\\t\\t\\t$query->setOrderings(array(\\n\\t\\t\\t\\t'created' => \\\\TYPO3\\\\Flow\\\\Persistence\\\\QueryInterface::ORDER_DESCENDING\\n\\t\\t\\t));\\n\\n\\t\\t\\t$customers = $this->customerRepository->findAll()->toArray();\\n\\n\\t\\t\\t$ratings = array();\\n\\t\\t\\tforeach ($query->execute() as $rating) {\\n\\t\\t\\t\\tif (in_array($rating->getCustomer(), $customers)) {\\n\\t\\t\\t\\t\\t$identifier = $this->persistenceManager->getIdentifierByObject($rating->getCustomer());\\n\\t\\t\\t\\t\\t$ratings[] = $rating;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\t$query = new \\\\Famelo\\\\ADU\\\\Domain\\\\ArrayQuery();\\n\\t\\t\\t$query->setArray($ratings);\\n\\t\\t\\treturn $query;\\n\\t\\t}\\n\\t\\treturn $query;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f5c2971cd1f633cbeb5e444eb830a608\",\n \"score\": \"0.4422316\",\n \"text\": \"public function scopeSearch($query, $filter)\\n {\\n return $query->where('date', '=', $filter)\\n // INNER JOIN dealers d on d.id=t.id_dealer\\n ->join('dealers', 'tasks.id_dealer', '=', 'dealers.id') \\n ;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a863e911d2047d102707cf08fe0bc62\",\n \"score\": \"0.44204935\",\n \"text\": \"public static function getDateFilterTypes()\\n\\t{\\n\\t\\t$dateFilters = Array('custom' => array('label' => 'LBL_CUSTOM'),\\n\\t\\t\\t'prevfy' => array('label' => 'LBL_PREVIOUS_FY'),\\n\\t\\t\\t'thisfy' => array('label' => 'LBL_CURRENT_FY'),\\n\\t\\t\\t'nextfy' => array('label' => 'LBL_NEXT_FY'),\\n\\t\\t\\t'prevfq' => array('label' => 'LBL_PREVIOUS_FQ'),\\n\\t\\t\\t'thisfq' => array('label' => 'LBL_CURRENT_FQ'),\\n\\t\\t\\t'nextfq' => array('label' => 'LBL_NEXT_FQ'),\\n\\t\\t\\t'yesterday' => array('label' => 'LBL_YESTERDAY'),\\n\\t\\t\\t'today' => array('label' => 'LBL_TODAY'),\\n\\t\\t\\t'tomorrow' => array('label' => 'LBL_TOMORROW'),\\n\\t\\t\\t'lastweek' => array('label' => 'LBL_LAST_WEEK'),\\n\\t\\t\\t'thisweek' => array('label' => 'LBL_CURRENT_WEEK'),\\n\\t\\t\\t'nextweek' => array('label' => 'LBL_NEXT_WEEK'),\\n\\t\\t\\t'lastmonth' => array('label' => 'LBL_LAST_MONTH'),\\n\\t\\t\\t'thismonth' => array('label' => 'LBL_CURRENT_MONTH'),\\n\\t\\t\\t'nextmonth' => array('label' => 'LBL_NEXT_MONTH'),\\n\\t\\t\\t'last7days' => array('label' => 'LBL_LAST_7_DAYS'),\\n\\t\\t\\t'last15days' => array('label' => 'LBL_LAST_15_DAYS'),\\n\\t\\t\\t'last30days' => array('label' => 'LBL_LAST_30_DAYS'),\\n\\t\\t\\t'last60days' => array('label' => 'LBL_LAST_60_DAYS'),\\n\\t\\t\\t'last90days' => array('label' => 'LBL_LAST_90_DAYS'),\\n\\t\\t\\t'last120days' => array('label' => 'LBL_LAST_120_DAYS'),\\n\\t\\t\\t'next15days' => array('label' => 'LBL_NEXT_15_DAYS'),\\n\\t\\t\\t'next30days' => array('label' => 'LBL_NEXT_30_DAYS'),\\n\\t\\t\\t'next60days' => array('label' => 'LBL_NEXT_60_DAYS'),\\n\\t\\t\\t'next90days' => array('label' => 'LBL_NEXT_90_DAYS'),\\n\\t\\t\\t'next120days' => array('label' => 'LBL_NEXT_120_DAYS')\\n\\t\\t);\\n\\t\\tforeach ($dateFilters as $filterType => $filterDetails) {\\n\\t\\t\\t$dateValues = \\\\DateTimeRange::getDateRangeByType($filterType);\\n\\t\\t\\t$dateFilters[$filterType]['startdate'] = $dateValues[0];\\n\\t\\t\\t$dateFilters[$filterType]['enddate'] = $dateValues[1];\\n\\t\\t}\\n\\t\\treturn $dateFilters;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08ea376d1e60be037efc5c7c56995a4b\",\n \"score\": \"0.4416581\",\n \"text\": \"function filter($exprs=array(), $gexprs=array())\\n\\t{\\n\\t\\t$where = array('sql'=>array(), 'args'=>array());\\n\\t\\t$having = array('sql'=>array(), 'args'=>array());\\n\\t\\tforeach($_REQUEST as $k=>$v) {\\n\\t\\t\\t$args = array();\\n\\t\\t\\t$sql = array();\\n\\n\\t\\t\\tif($v === '') continue;\\n\\t\\t\\tif(!preg_match('|^f_[dts]_|', $k)) continue;\\n\\t\\t\\t$t = substr($k, 2, 1);\\n\\t\\t\\t$k = substr($k, 4);\\n\\t\\t\\t// only alphanumerics allowed\\n\\t\\t\\tif(!preg_match('|^[A-z0-9_-]+$|', $k)) continue;\\n\\t\\t\\tswitch($t) {\\n\\t\\t\\t\\tcase 'd': $coltype = 'date'; break;\\n\\t\\t\\t\\tcase 's': $coltype = 'select'; break;\\n\\t\\t\\t\\tcase 't':\\n\\t\\t\\t\\tdefault: $coltype = 'text';\\n\\t\\t\\t}\\n\\n\\t\\t\\t// look for an expression passed to the function first -- this is\\n\\t\\t\\t// used for trickier SQL expressions, eg, functions\\n\\t\\t\\tif(isset($exprs[$k])) {\\n\\t\\t\\t\\t$s = $exprs[$k];\\n\\t\\t\\t\\t$t = 'where';\\n\\t\\t\\t} else if(isset($gexprs[$k])) {\\n\\t\\t\\t\\t$s = $gexprs[$k];\\n\\t\\t\\t\\t$t = 'having';\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t// use the literal column name\\n\\t\\t\\t\\t$s = \\\"\\\\\\\"$k\\\\\\\"\\\";\\n\\t\\t\\t\\t$t = 'where';\\n\\t\\t\\t}\\n\\n\\t\\t\\t$range = explode('<>', $v);\\n\\t\\t\\tif(count($range) == 2) {\\n\\t\\t\\t\\t// double-bounded range\\n\\t\\t\\t\\t$sql[] = \\\"($s>='%s' AND $s<='%s')\\\";\\n\\t\\t\\t\\t$args[] = $range[0];\\n\\t\\t\\t\\t$args[] = $range[1];\\n\\t\\t\\t} else if(strlen($v) == 1) {\\n\\t\\t\\t\\t// no range (explicit)\\n\\t\\t\\t\\t// FYI: this check is needed, as the \\\"else\\\" block assumes\\n\\t\\t\\t\\t// a string length of at least 2\\n\\t\\t\\t\\t$sql[] = is_numeric($v) ? \\\"$s='%s'\\\" : \\\"$s LIKE '%%s%'\\\";\\n\\t\\t\\t\\t$args[] = $v;\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t// everything else: single-bounded range, eq, neq, like, not like\\n\\t\\t\\t\\t$chop = 0;\\n\\t\\t\\t\\t$like = false;\\n\\t\\t\\t\\tswitch(substr($v, 0, 1)) {\\n\\t\\t\\t\\t\\tcase '=': // exactly equals to\\n\\t\\t\\t\\t\\t\\t$s .= '=';\\n\\t\\t\\t\\t\\t\\t$chop = 1;\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tcase '>': // greater than\\n\\t\\t\\t\\t\\t\\tif(substr($v, 1, 1) == '=') {\\n\\t\\t\\t\\t\\t\\t\\t$s .= '>=';\\n\\t\\t\\t\\t\\t\\t\\t$chop = 2;\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t$s .= '>';\\n\\t\\t\\t\\t\\t\\t\\t$chop = 1;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tcase '<': // less than\\n\\t\\t\\t\\t\\t\\tif(substr($v, 1, 1) == '=') { \\n\\t\\t\\t\\t\\t\\t\\t$s .= '<=';\\n\\t\\t\\t\\t\\t\\t\\t$chop = 2;\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t$s .= '<';\\n\\t\\t\\t\\t\\t\\t\\t$chop = 1;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tcase '!': // does not contain\\n\\t\\t\\t\\t\\t\\tif(substr($v, 1, 1) == '=') {\\n\\t\\t\\t\\t\\t\\t\\t$s .= '!=';\\n\\t\\t\\t\\t\\t\\t\\t$chop = 2;\\n\\t\\t\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t\\t\\t$s .= ' NOT LIKE ';\\n\\t\\t\\t\\t\\t\\t\\t$chop = 1;\\n\\t\\t\\t\\t\\t\\t\\t$like = true;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\t\\tdefault: // contains\\n\\t\\t\\t\\t\\t\\t$s .= ' LIKE ';\\n\\t\\t\\t\\t\\t\\t$like = true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$v = substr($v, $chop);\\n\\t\\t\\t\\tif($like) {\\n\\t\\t\\t\\t\\t$s .= \\\"'%%s%'\\\";\\n\\t\\t\\t\\t} else {\\n\\t\\t\\t\\t\\t$s .= \\\"'%s'\\\";\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$sql[] = $s;\\n\\t\\t\\t\\t$args[] = $v;\\n\\n\\t\\t\\t\\t// special handling for various filter types\\n\\t\\t\\t\\tif($coltype == 'date' && $chop) {\\n\\t\\t\\t\\t\\t// don't include the default '0000-00-00' fields in ranged selections\\n\\t\\t\\t\\t\\t$s = isset($exprs[$k]) ? $exprs[$k] : \\\"\\\\\\\"$k\\\\\\\"\\\";\\n\\t\\t\\t\\t\\t$s .= \\\"!='0000-00-00'\\\";\\n\\t\\t\\t\\t\\t$sql[] = $s;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\tswitch($t) {\\n\\t\\t\\t\\tcase 'where':\\n\\t\\t\\t\\t\\t$where['sql'] = array_merge($where['sql'], $sql);\\n\\t\\t\\t\\t\\t$where['args'] = array_merge($where['args'], $args);\\n\\t\\t\\t\\t\\tbreak;\\n\\t\\t\\t\\tcase 'having':\\n\\t\\t\\t\\t\\t$having['sql'] = array_merge($having['sql'], $sql);\\n\\t\\t\\t\\t\\t$having['args'] = array_merge($having['args'], $args);\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\t// ensure the WHERE clause always has something in it\\n\\t\\t$where['sql'][] = '1=1';\\n\\n\\t\\t$final = array(implode(' AND ', $where['sql']), $where['args']);\\n\\t\\tif(!empty($having['sql'])) {\\n\\t\\t\\t$final[] = implode(' AND ', $having['sql']);\\n\\t\\t\\t$final[] = $having['args'];\\n\\t\\t}\\n\\n\\t\\treturn $final;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7051ee377487365f5d6b63c080de1d8c\",\n \"score\": \"0.44136626\",\n \"text\": \"function getFiltroTiposTaxa($get = null,$where = \\\" 1 = 1\\\"){\\n $Result = \\\"\\\"; \\n if(isset($get['getFiltroTipo'])){\\n foreach ($get['getFiltroTipo'] as $key => $value ) {\\n \\n switch ($value) {\\n case 1:\\n $where .= \\\" AND TDE <> 0 \\\";\\n break;\\n case 2:\\n $where .= \\\" AND TDA <> 0 \\\";\\n break;\\n case 3:\\n $where .= \\\" AND TDE = 0 \\\";\\n break;\\n case 4:\\n $where .= \\\" AND TDA = 0 \\\";\\n break;\\n } \\n } \\n return $where;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c641ee90a684457e97309515ffe70e4f\",\n \"score\": \"0.44132292\",\n \"text\": \"public function filteredByDate(Request $request){\\n return response(Expense::where('user_id', $request->user()->id)\\n ->whereBetween('created_at',[Date(\\\"Y-m-d\\\", $request->start/1000).\\\" 00:00:00\\\", Date(\\\"Y-m-d\\\", $request->end/1000).\\\" 23:59:59\\\"])\\n ->with('category')\\n ->orderBy('created_at', 'desc')\\n ->paginate(4), 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aeddd2a600ef0353a255da94eb283357\",\n \"score\": \"0.44104567\",\n \"text\": \"public function scopePublishedBefore($query, $date)\\n {\\n $query->where('created_at', '<=', $date);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15e07635777efb584797e59ee911ac02\",\n \"score\": \"0.44094056\",\n \"text\": \"public function scopePublished($query){\\n $query->where('RDate','<=',Carbon::now()->format('Y-m-d'))->where('EXDate','>=',Carbon::now()->format('Y-m-d'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52f365f8395adc25f034025f4ca1bceb\",\n \"score\": \"0.44026864\",\n \"text\": \"protected function filter()\\n {\\n $request = $this->getRequest();\\n $session = $request->getSession();\\n $filterForm = $this->createForm(new EventDateFilterType());\\n $em = $this->getDoctrine()->getManager();\\n $queryBuilder = $em->getRepository('AtkRegistrationBundle:EventDate')->createQueryBuilder('e');\\n\\n // Reset filter\\n if ($request->get('filter_action') == 'reset') {\\n $session->remove('EventDateControllerFilter');\\n }\\n\\n // Filter action\\n if ($request->get('filter_action') == 'filter') {\\n // Bind values from the request\\n $filterForm->bind($request);\\n\\n if ($filterForm->isValid()) {\\n // Build the query from the given form object\\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\\n // Save filter to session\\n $filterData = $filterForm->getData();\\n $session->set('EventDateControllerFilter', $filterData);\\n }\\n } else {\\n // Get filter from session\\n if ($session->has('EventDateControllerFilter')) {\\n $filterData = $session->get('EventDateControllerFilter');\\n $filterForm = $this->createForm(new EventDateFilterType(), $filterData);\\n $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($filterForm, $queryBuilder);\\n }\\n }\\n\\n return array($filterForm, $queryBuilder);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc3024f42473bd5563346d7dc9dbd6c1\",\n \"score\": \"0.44025835\",\n \"text\": \"function getEvents($filter, $sort_string = '', $limit = 0, $start = 0, $count = false) {\\n\\t \\tglobal $wpdb;\\n\\n\\t \\tif (empty($sort_string)) {\\n\\t \\t\\t$sort_string = 'e.`datefrom` ASC';\\n\\t \\t}\\n\\t \\t\\n\\t \\t// Convert timestamps to mysql date format\\n\\t \\tif (isset($filter['datefrom']) && !empty($filter['datefrom'])) {\\n\\t \\t\\t// Neu auch text unterstützen\\n\\t \\t\\tif (strpos(strtolower($filter['datefrom']), 'now') !== false) { // Now\\n\\t \\t\\t\\t$filter['datefrom'] = $this->calculate_dates($filter['datefrom']);\\n\\t \\t\\t} else if (strpos(strtolower($filter['datefrom']), 'today') !== false) { // Today\\n\\t \\t\\t\\t$filter['datefrom'] = $this->calculate_dates($filter['datefrom']);\\n\\t \\t\\t} else if (strpos($filter['datefrom'], '-') === false) { // Integer format\\n\\t \\t\\t\\t$filter['datefrom'] = date('Y-m-d H:i:s', $filter['datefrom']);\\n\\t \\t\\t} else {\\n\\t \\t\\t\\t// Validate!\\n\\t \\t\\t\\tif (strtotime($filter['datefrom']) == false || strtotime($filter['datefrom']) == -1) {\\n\\t \\t\\t\\t\\t$filter['datefrom'] = $this->calculate_dates('now');\\n\\t \\t\\t\\t}\\n\\t \\t\\t}\\n\\t \\t}\\n\\t \\tif (isset($filter['dateto']) && !empty($filter['dateto'])) {\\n\\t \\t\\tif (strpos(strtolower($filter['dateto']), 'now') !== false) {\\n\\t \\t\\t\\t$filter['dateto'] = $this->calculate_dates($filter['dateto']);\\n\\t \\t\\t} else if (strpos(strtolower($filter['dateto']), 'today') !== false) {\\n\\t \\t\\t\\t$filter['dateto'] = $this->calculate_dates($filter['dateto'], true);\\n\\t \\t\\t} else if (strpos($filter['dateto'], '-') === false) {\\n\\t \\t\\t\\t$filter['dateto'] = date('Y-m-d H:i:s', $filter['dateto']);\\n\\t \\t\\t} else {\\n\\t \\t\\t\\t// Validate!\\n\\t \\t\\t\\tif (strtotime($filter['dateto']) == false || strtotime($filter['dateto']) == -1) {\\n\\t \\t\\t\\t\\tunset($filter['dateto']);\\n\\t \\t\\t\\t}\\n\\t \\t\\t}\\n\\t \\t}\\n\\n\\t \\t// If its an allday event, modify any selection time, because allday events allways starts at 00:00\\n\\t \\tif (isset($filter['allday']) && $filter['allday'] == true) {\\n\\t \\t\\tif (isset($filter['datefrom'])) {\\n\\t \\t\\t\\t$df = $filter['datefrom'];\\n\\t \\t\\t\\t$filter['datefrom'] = date('Y-m-d H:i:s', mktime(0,0,0,mysql2date('m', $df), mysql2date('d', $df), mysql2date('Y', $df)));\\n\\t \\t\\t}\\n\\t \\t\\tif (isset($filter['dateto'])) {\\n\\t \\t\\t\\t$df = $filter['dateto'];\\n\\t \\t\\t\\t$filter['dateto'] = date('Y-m-d H:i:s', mktime(0,0,0,mysql2date('m', $df), mysql2date('d', $df)+1, mysql2date('Y', $df)) - 1);\\n\\t \\t\\t}\\n\\t \\t}\\n\\n\\t \\t$where = ' WHERE ';\\n\\t \\tif (isset($filter['id_inc']) && is_array($filter['id_inc']))\\n\\t \\t$where .= \\\" e.`eventid` IN (\\\".implode(',', $filter['id_inc']).\\\") AND\\\";\\n\\t \\tif (isset($filter['id_exc']) && is_array($filter['id_exc']))\\n\\t \\t$where .= \\\" e.`eventid` NOT IN (\\\".implode(',', $filter['id_exc']).\\\") AND\\\";\\n\\t \\tif (isset($filter['state']) && isset(self::$valid_states[$filter['state']]))\\n\\t \\t$where .= \\\" e.`state`='{$filter['state']}' AND\\\";\\n\\t \\tif (isset($filter['author']))\\n\\t \\t$where .= \\\" e.`author`='{$filter['author']}' AND\\\";\\n\\t \\tif (isset($filter['allday']))\\n\\t \\t$where .= \\\" e.`allday`=\\\".($filter['allday'] === true ? '1' : '0').\\\" AND\\\";\\n\\t \\tif (isset($filter['datefrom']) || isset($filter['dateto'])) {\\n\\n\\t \\t\\tif (!isset($filter['datemode'])) {\\n\\t \\t\\t\\t$filter['datemode']\\t= FSE_DATE_MODE_ALL;\\n\\t \\t\\t}\\n\\n\\t \\t\\t// Make date selection complete\\n\\t \\t\\tif (!isset($filter['datefrom']) || empty($filter['datefrom']))\\n\\t \\t\\t$filter['datefrom'] = date('Y-m-d H:i:s', 0);\\n\\t \\t\\tif (!isset($filter['dateto']) || empty($filter['dateto']))\\n\\t \\t\\t$filter['dateto'] = date('Y-m-d H:i:s', mktime(23, 59, 59, 12, 31, 2037));\\n\\n\\t \\t\\t// Allday events to-stamp is at the beginning of the day!\\n\\t \\t\\t$date_to_allday = date('Y-m-d H:i:s', mktime(0, 0, 0, mysql2date('m', $filter['datefrom']), mysql2date('d', $filter['datefrom']), mysql2date('y', $filter['datefrom'])));\\n\\n\\n\\t \\t\\t// Events must always start before the end and\\n\\t \\t\\t// must end after start\\n\\t \\t\\t$where .= ' (e.`datefrom` <= \\\"'.$filter['dateto'].'\\\") AND '.\\n \\t\\t\\t\\t\\t\\t' ((e.`dateto` >= \\\"'.$filter['datefrom'].'\\\") OR (e.`dateto` >= \\\"'.$date_to_allday.'\\\" AND `allday` = 1))'; \\n\\n\\t \\t\\t//\\n\\t \\t\\tif ($filter['datemode'] == FSE_DATE_MODE_START) {\\n\\t \\t\\t\\t$where .= ' AND (e.`datefrom` >= \\\"'.$filter['datefrom'].'\\\")';\\n\\t \\t\\t} elseif ($filter['datemode'] == FSE_DATE_MODE_END) {\\n\\t \\t\\t\\t$where .= ' AND (e.`datefrom` <= \\\"'.$filter['dateto'].'\\\")';\\n\\t \\t\\t}\\n\\n\\t \\t\\t$where .= ' AND';\\n\\t \\t}\\n\\n\\t \\t// Join for categories\\n\\t \\t$join = '';\\n\\t \\tif (isset($filter['categories'])) {\\n\\t \\t\\t$f = $filter['categories'];\\n\\t \\t\\tif (!is_array($f))\\n\\t \\t\\t$f = array($f);\\n\\t \\t\\t$in = '';\\n\\t \\t\\tforeach($f as $c) {\\n\\t \\t\\t\\t$c = intval($c);\\n\\t \\t\\t\\tif (!empty($c))\\n\\t \\t\\t\\t$in .= $c.',';\\n\\t \\t\\t}\\n\\n\\t \\t\\tif (!empty($in)) {\\n\\t \\t\\t\\t$in = substr($in, 0, strlen($in)-1);\\n\\t \\t\\t\\t$where .= ' c.`catid` IN ('.$in.') AND';\\n\\t \\t\\t\\t$join = ' LEFT JOIN `'.$wpdb->prefix.'fsevents_cats` AS c ON e.`eventid` = c.`eventid` ';\\n\\t \\t\\t}\\n\\t \\t}\\n\\n\\t \\tif ($where != ' WHERE ')\\n\\t \\t\\t$where = substr($where, 0, strlen($where) - 3);\\n\\t \\telse\\n\\t \\t\\t$where = '';\\n\\n\\t \\t// Special Case 'Count'!\\n\\t \\tif ($count == true) {\\n\\t \\t\\t$sql = 'SELECT DISTINCT count(e.`eventid`) FROM `'.$wpdb->prefix.'fsevents` AS e '.$join.$where.' ORDER BY '.$sort_string;\\n\\t \\t\\treturn $wpdb->get_var($sql);\\n\\t \\t} else {\\n\\t \\t\\t$sql = 'SELECT DISTINCT e.`eventid` FROM `'.$wpdb->prefix.'fsevents` AS e '.$join.$where.' ORDER BY '.$sort_string;\\n\\t \\t\\tif (!empty($limit)) {\\n\\t \\t\\t\\t$sql .= ' LIMIT '.intval($start).', '.intval($limit);\\n\\t \\t\\t}\\n\\t \\t}\\n\\n\\t \\tif (defined('FSE_SQL_DEBUG') && FSE_SQL_DEBUG == true && defined('WP_DEBUG') && WP_DEBUG == true) {\\n\\t \\t\\techo '

    '.$sql.'

    ';\\n\\t \\t}\\t\\n\\t \\t\\n\\t \\t$res = $wpdb->get_col($sql);\\n\\n\\t \\tif ($res === NULL)\\n\\t \\t\\treturn false;\\n\\n\\t \\treturn $res;\\n\\t }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"333ade94769349e2e739926330bffdb8\",\n \"score\": \"0.44000697\",\n \"text\": \"public static function xfilter($table, $fields, $orderBy, $limit){\\r\\n $queryType = \\\"xfilter\\\"; \\r\\n include '../helper/retrieve_data.php';\\r\\n return $querySet;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb63727dc141fd9866259eeb9572e0cf\",\n \"score\": \"0.43842334\",\n \"text\": \"public function filterByT($t = null, $comparison = null)\\n {\\n if (is_array($t)) {\\n $useMinMax = false;\\n if (isset($t['min'])) {\\n $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t['min'], Criteria::GREATER_EQUAL);\\n $useMinMax = true;\\n }\\n if (isset($t['max'])) {\\n $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t['max'], Criteria::LESS_EQUAL);\\n $useMinMax = true;\\n }\\n if ($useMinMax) {\\n return $this;\\n }\\n if (null === $comparison) {\\n $comparison = Criteria::IN;\\n }\\n }\\n\\n return $this->addUsingAlias(TblShippingEconomyTableMap::COL_T, $t, $comparison);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff7460dade66e0e0589509e9665e888c\",\n \"score\": \"0.43714315\",\n \"text\": \"public function TyleUngThanhCong($f_date, $t_date){\\r\\n\\t\\t$select = $this->Select(\\\"select log_date, sum(total) as total, sum(sucess) as sucess from (\\r\\n\\t\\tselect trunc(log_date) log_date, 0 total, count(*) sucess from credit_trans \\r\\n\\t\\twhere log_date >= to_date('\\\".$f_date.\\\"','dd/mm/yyyy') and log_date <= to_date('\\\".$t_date.\\\"','dd/mm/yyyy') + 1 and status = 1 and mt_status = 2 group by log_date\\r\\n\\t\\tunion all\\r\\n\\t\\tselect trunc(log_date) log_date , count(*) total, 0 sucess from credit_trans \\r\\n\\t\\twhere log_date >= to_date('\\\".$f_date.\\\"','dd/mm/yyyy') and log_date <= to_date('\\\".$t_date.\\\"','dd/mm/yyyy') + 1 and condition_status =1 group by log_date\\r\\n\\t\\t)\\r\\n\\t\\tgroup by log_date\\r\\n\\t\\torder by log_date\\\");\\r\\n\\t\\t\\r\\n\\t\\t$result = $this->FetchAll($select);\\r\\n\\t\\t//$this->DumpQueriesStack(); \\r\\n\\t\\tif($this->NumRows($select) > 0){\\r\\n return $result;\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3ca121e0bc0d2db2f3109d199233c76\",\n \"score\": \"0.4370509\",\n \"text\": \"public function getDataWithTypeDate() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84893638a7b5c4be3efdc7b6ce0396da\",\n \"score\": \"0.4369703\",\n \"text\": \"public function checkDateWithStrtotimeValuesDataProvider() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa0996eafaef491e44e318ed84c44f82\",\n \"score\": \"0.43663988\",\n \"text\": \"protected function _buildWhere(&$query)\\r\\n {\\r\\n\\r\\n\\r\\n \\t//if($this->_checkin!=null)\\r\\n \\t//{\\r\\n \\t//\\t$query->where('ltap.ltap_qdatu = \\\"'.$this->_confdate.'\\\"');\\r\\n \\t//}\\r\\n return $query;\\r\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":778,"cells":{"query_id":{"kind":"string","value":"b7864522ebbd3ab0de3c513c368673e4"},"query":{"kind":"string","value":"Set the id of the user who created this rule."},"positive_passages":{"kind":"list like","value":[{"docid":"d4adf21c3c8413f91ef5f19cd1e76fe4","score":"0.0","text":"public function setGrantedByUser($createdByUser);","title":""}],"string":"[\n {\n \"docid\": \"d4adf21c3c8413f91ef5f19cd1e76fe4\",\n \"score\": \"0.0\",\n \"text\": \"public function setGrantedByUser($createdByUser);\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"8afd6015c7b16259cc1e26158b5f17db","score":"0.72755086","text":"public function setUserId( $id ) {\n\t\t$this->userId = $id;\n\t}","title":""},{"docid":"7fc9491b2b9efc727280fb3b5d5173ce","score":"0.7209619","text":"public function setUserId($value){\n $this->attributes['user_id'] = $value;\n }","title":""},{"docid":"c8cdc9f531267f4f8cf3f4bb6feb12ef","score":"0.7112066","text":"protected function _setUserId() {\n\n if ($this->_identity !== null) {\n\n $userid = $this->_identity->getId();\n\n if ((int) $userid > 0) {\n $conn = $this->_em->getConnection();\n $conn->query('SET @userid = ' . $userid);\n }\n }\n }","title":""},{"docid":"dea52945e7f80ddcf8beaf07d8746763","score":"0.7091921","text":"public function set_id_user($arg)\n {\n if ($this->is_valid_int_format($arg))\n $this->_id_user = $arg;\n }","title":""},{"docid":"8ce1d9afacca4d2b1e80cf13655d20e7","score":"0.7051809","text":"public function setIdUser($idUser)\n {\n $this->idUser = (int) $idUser;\n }","title":""},{"docid":"23ca38c24f82a82abbfd8f42d3d09acd","score":"0.70433855","text":"public function set_user_id( $value ) {\n\t\t$this->set_prop( 'user_id', absint( $value ) ) ;\n\t}","title":""},{"docid":"32783f1c39d295c36c6908fabd78bea6","score":"0.7022507","text":"public function setIdUser($idUser)\r\n {\r\n $this->idUser = $idUser;\r\n }","title":""},{"docid":"d989c41efb514feff2480651085b0acd","score":"0.7004882","text":"function setUserId($id){\n\t\techo $this->userId\t=\t$id;\n\t}","title":""},{"docid":"cad46a84a220f0e0ff0f4e079694cb59","score":"0.6890296","text":"private function manageUserId() {\n if ($user_id =$this->getUserIdFromSession()) {\n $this->setUserId($user_id);\n }\n }","title":""},{"docid":"f756176ff5a48f7ecad38b5b0ef22a01","score":"0.6706175","text":"public function setUserId($value)\n {\n return $this->set(self::user_id, $value);\n }","title":""},{"docid":"9f8bfdbfa53c25721a6c25a2760ae0c2","score":"0.6693652","text":"public function setUserId($value)\n {\n $this->setProperty(\"UserId\", $value, true);\n }","title":""},{"docid":"df0fdb0a1a5a1e7e97d634a665dcc764","score":"0.66570204","text":"function set_user_id($user_id)\n\t{\n\t\t$this->set_default_property(self :: PROPERTY_USER_ID, $user_id);\n\t}","title":""},{"docid":"289e6ff3a985d165e43714270ce21fc1","score":"0.66401225","text":"public function setId_user($id_user)\n {\n $id_user = (int) $id_user;\n $this->_id_user = $id_user;\n }","title":""},{"docid":"c9c21b7dcc7d0f9b8edc72894d95e230","score":"0.6618805","text":"public function setIdUser($idUser)\n {\n $idUser = (int) $idUser;\n $this->idUser = $idUser;\n\n return $this;\n }","title":""},{"docid":"b0ac410a3ae564e9e25c1549ceff2047","score":"0.66121054","text":"protected function setUser_id($value)\n\t{\n\t\tif (isCeleKladneCislo($value) || is_null($value)) {\n\t\t\t$this->user_id = $value;\n\t\t}\n\t\tif (isCeleKladneCislo($value) && $this->lazyLoad) {\n\t\t\t$this->userUserEntity = new UserEntity($value,false);\n\t\t} else {\n\t\t\t$this->userUserEntity = null;\n\t\t}\n\t}","title":""},{"docid":"6a406a22f58e0c0a60091f5997c5d04a","score":"0.66034997","text":"private function setCurrentUserId()\n {\n// $this->currentUserId = get_current_user_id();\n }","title":""},{"docid":"3c78c02e0d7f64d74602b162e0573fe2","score":"0.658795","text":"public function setUserIdAttribute($value)\n {\n $this->attributes['user_id'] = $value ?: null;\n }","title":""},{"docid":"d7b8c74b5ceab7daae69bd313fd47777","score":"0.6555244","text":"protected function setEditedUserId()\n {\n $this->editedUserId = intval($_REQUEST['user_id']);\n if ($this->editedUserId == 0) {\n $this->editedUserId = intval(get_current_user_id());\n }\n $this->editedUser = get_user_by('id', $this->editedUserId);\n if ($this->editedUser->ID > 0) {\n $this->editedUser->profileCategories = ArrayManipulation::forceArray(get_user_meta($this->editedUserId, 'profile-categories', true));\n }\n }","title":""},{"docid":"d1efe851d96cf24413425c48d9305be7","score":"0.65452516","text":"public function setID($id)\r\n {\r\n $this->userID = $id;\r\n }","title":""},{"docid":"b1bd6291fcdf08a3ce4c036f30a331e2","score":"0.6542437","text":"function setUser( $value )\r\n {\r\n if ( is_a( $value, \"eZUser\" ) )\r\n $value = $value->id();\r\n\r\n $this->UserID = $value;\r\n }","title":""},{"docid":"444f5bd0ba93377ede1c2f115fa7b39b","score":"0.654227","text":"public function setIdUser($idUser)\n {\n $this->idUser = $idUser;\n\n return $this;\n }","title":""},{"docid":"444f5bd0ba93377ede1c2f115fa7b39b","score":"0.654227","text":"public function setIdUser($idUser)\n {\n $this->idUser = $idUser;\n\n return $this;\n }","title":""},{"docid":"79c27088a4fc4e8e977a384a46eda009","score":"0.65036803","text":"public function setToUserId($data)\n {\n $this->_ToUserId=$data;\n return $this;\n }","title":""},{"docid":"146a20e7ed380acd5f4250884694867a","score":"0.6489751","text":"private function setUserId($user_id) {\n $this->user_id = $user_id;\n }","title":""},{"docid":"a2ccda0e5a5ad57ace6a1fbb0ca83d81","score":"0.6473248","text":"public function setUserId($data)\n {\n $this->_UserId=$data;\n return $this;\n }","title":""},{"docid":"439125163d84d8629d48b04fa503467f","score":"0.6472386","text":"public function setUserId($userId);","title":""},{"docid":"2ebdd39abad01cc6fcaef824fcc4facd","score":"0.64626414","text":"public function setUser_id($user_id){\n\t\t$this->$user_id = $user_id;\n\t}","title":""},{"docid":"852a9f3758bfa8b60af46e33b7dec90b","score":"0.64474916","text":"public function setUserId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->user_id !== $v) {\n $this->user_id = $v;\n $this->modifiedColumns[] = PrincipalPeer::USER_ID;\n }\n\n if ($this->aUser !== null && $this->aUser->getId() !== $v) {\n $this->aUser = null;\n }\n\n\n return $this;\n }","title":""},{"docid":"fc791e73bc3da3ea3d71c6b4e385aa3e","score":"0.6434163","text":"public static function setUserId($id) {\n Cookie::set('id', $id);\n self::$user = Auth::NONE;\n }","title":""},{"docid":"525e3aa9eddfd568ce81b44c8cc29c56","score":"0.6429236","text":"public function setUserId( $user_id )\n {\n $this->user_id = $user_id;\n }","title":""},{"docid":"8a7f6e80cf2a073d5e5e469a321d8c0a","score":"0.642923","text":"function SetId($value) { $this->id=$value; }","title":""},{"docid":"be6acd16f67be8d49e9e1aa55f228553","score":"0.6402343","text":"public function setUserId(int $value): self\n {\n $this->userId = $value;\n return $this;\n }","title":""},{"docid":"dc59ecf94c2fa5969ea4900d282479e3","score":"0.6399636","text":"public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }","title":""},{"docid":"dc59ecf94c2fa5969ea4900d282479e3","score":"0.6399636","text":"public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }","title":""},{"docid":"dc59ecf94c2fa5969ea4900d282479e3","score":"0.6399636","text":"public function setIdUser($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }","title":""},{"docid":"ed4993a01a23468e581af3cada879a9b","score":"0.63852","text":"public function testSetUserID() {\n $testUser = new User();\n $testUser->setUsername('test');\n $testUser->create();\n\n // Create a test mission note\n $testMissionNote = new MissionNote();\n\n // Try and set id\n try {\n $testMissionNote->setUserID($testUser->getID(), true);\n $this->assertEquals($testUser->getID(), $testMissionNote->getUserID());\n } finally {\n $testUser->delete();\n }\n }","title":""},{"docid":"1770b6b23368da8fe9cef9915ae63bea","score":"0.6373896","text":"public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }","title":""},{"docid":"1770b6b23368da8fe9cef9915ae63bea","score":"0.6373896","text":"public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }","title":""},{"docid":"1770b6b23368da8fe9cef9915ae63bea","score":"0.6373896","text":"public function setUserID($value)\n {\n return $this->set('UserID', $value);\n }","title":""},{"docid":"b575f300bd1822466dc339d1df6f5575","score":"0.63727087","text":"public function set_user_id(?int $user_id) : self {\n\t\t$this->user_id = $user_id;\n\t\t$this->user = NULL; //Create new user from user_id\n\t\treturn $this;\n\t}","title":""},{"docid":"b053ec4ed3646ef60d24f9eb395606a0","score":"0.6356549","text":"public function setUser_id($user_id){\r\n $this->user_id = $user_id;\r\n }","title":""},{"docid":"9d76de09e287f814caf43fd25d16f920","score":"0.6340145","text":"public function setPreviousUserId( $id );","title":""},{"docid":"f2b0556b59e5d04069dec22550e3c6ae","score":"0.6338055","text":"function setCoachUserId($id)\n {\n $this->__coachuserid = $id;\n }","title":""},{"docid":"c3da49ad7608eaf2ba260291067568cd","score":"0.6327077","text":"function setUserId($userid)\n\t\t{\n\t\t\t$this->mUserId = $userid;\n\t\t}","title":""},{"docid":"2b122120fc3cab685fcf3cce619c57f4","score":"0.63209724","text":"public function setUserId( $userId )\n {\n $this->_daChallenge->setUserId( $this->getId(), $userId );\n }","title":""},{"docid":"eec689a4f23a174cef9c71a5738f1314","score":"0.63146603","text":"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }","title":""},{"docid":"eec689a4f23a174cef9c71a5738f1314","score":"0.63146603","text":"public function setUserIdAttribute($input)\n {\n $this->attributes['user_id'] = $input ? $input : null;\n }","title":""},{"docid":"5d42e74a82f15d6fbe9ef31b90894781","score":"0.6299653","text":"public function setCreatedBy($v)\n {\n if (is_a('\\TechWilk\\Rota\\User', $v)) {\n $v = $v->getId();\n }\n\n return parent::setCreatedBy($v);\n }","title":""},{"docid":"041414637a70ff7af7821c6705fb6c07","score":"0.6293224","text":"public function setUserId($user_id) {\n\n if(!isset($user_id) || $user_id == \"\"){\n $user_id = \"0\";\n }\n $this->fields[\"user_id\"] = $user_id;\n\nreturn $this;\n\n }","title":""},{"docid":"041414637a70ff7af7821c6705fb6c07","score":"0.6293224","text":"public function setUserId($user_id) {\n\n if(!isset($user_id) || $user_id == \"\"){\n $user_id = \"0\";\n }\n $this->fields[\"user_id\"] = $user_id;\n\nreturn $this;\n\n }","title":""},{"docid":"041414637a70ff7af7821c6705fb6c07","score":"0.6293224","text":"public function setUserId($user_id) {\n\n if(!isset($user_id) || $user_id == \"\"){\n $user_id = \"0\";\n }\n $this->fields[\"user_id\"] = $user_id;\n\nreturn $this;\n\n }","title":""},{"docid":"b130a6e602689a54658399388d057058","score":"0.62880635","text":"protected function setUserId($user_id): void {\n $this->user_id = $user_id;\n }","title":""},{"docid":"11a8202bbfd67c0afb1de6c0c9aa4c64","score":"0.6272965","text":"public function setUserId($v)\n {\n if ($v === ''){\n $v = null;\n }\n elseif ($v !== null){\n \n if(is_numeric($v)) {\n $v = (int) $v;\n }\n }\n if ($this->user_id !== $v) {\n $this->user_id = $v;\n $this->modifiedColumns[] = JournalDeVenteLignePeer::USER_ID;\n }\n\n\n return $this;\n }","title":""},{"docid":"c8ea3dbaed54bd7a91e1c800a372672d","score":"0.6259451","text":"public function setId_user($id_user)\n {\n $this->id_user = $id_user;\n\n return $this;\n }","title":""},{"docid":"d97ce289cd3994c59cdc87e29fd57d7b","score":"0.6258782","text":"public function should_assign_an_id_to_the_created_user()\n {\n $this->expectsEvents(UserCreated::class);\n\n $response = $this->call('POST', '/v1/users', [\n 'firstname' => 'Berzel',\n 'lastname' => 'Tumbude',\n 'email' => 'berzel@app.com',\n 'password' => 'secret123',\n 'password_confirmation' => 'secret123'\n ]);\n\n $this->seeJsonContains([\n 'id' => 1,\n 'firstname' => 'Berzel',\n 'lastname' => 'Tumbude',\n 'email' => 'berzel@app.com'\n ]);\n }","title":""},{"docid":"2bdff526626ead2655baf401e12eceab","score":"0.6254985","text":"public function setId($id): User\n {\n $this->id = $id;\n return $this;\n }","title":""},{"docid":"4baefb62f2a710e20ba2d5fa05d45cf9","score":"0.624619","text":"public function setUserId($user_id)\n {\n $this->user_id = $user_id;\n }","title":""},{"docid":"0b89980236eb07bb532df728e74af3c2","score":"0.6238676","text":"public function setUserId($newUserId) {\n $this->userId = $newUserId;\n }","title":""},{"docid":"b9ef02070f9c554f0ef1df5aedd8f6b3","score":"0.62343305","text":"public function setUserID($id)\n {\n if (!is_int($id))\n throw new InvalidParameterException(__FUNCTION__ . ' function only accepts integers. Input was: ' . $id);\n else\n $this->User_ID = $id;\n }","title":""},{"docid":"ad2df2a1bc7c03aaab3d8ece5f12e0b4","score":"0.6194981","text":"protected function set_user_id( $user_id ) {\n\t\t$this->user_id = $user_id;\n\t\t$this->get_datastore()->set_object_id( $user_id );\n\n\t\tforeach ( $this->fields as $field ) {\n\t\t\t$datastore = $field->get_datastore();\n\t\t\tif ( $datastore->get_object_id() === 0 ) {\n\t\t\t\t$datastore->set_object_id( $user_id );\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"630a0fcf4c2cec245371c572580c8c7b","score":"0.61770463","text":"public function idUser()\n {\n return $this->idUser;\n }","title":""},{"docid":"448c8c240252c801e2523829ccaa06db","score":"0.6176872","text":"public function setCreatorId($id)\n {\n $this->creatorId = $id;\n }","title":""},{"docid":"454b6ec4c410a09ad3cc700ce5aaaacc","score":"0.6172319","text":"function setUserId($userId) {\n\t\treturn $this->setData('userId', $userId);\n\t}","title":""},{"docid":"2f5787c5f5d89576f2e5363b18a2ca6b","score":"0.6151508","text":"function setUserId($userId) {\r\n\t\treturn $this->setData('userId', $userId);\r\n\t}","title":""},{"docid":"8d96e880b5f2a8d3c040fdccbf245c65","score":"0.6139318","text":"function setRealtorUserId($a_iRealtorUserId)\n {\n if (!is_null($this->_iRealtorUserId) && $this->_iRealtorUserId !== (int) $a_iRealtorUserId) {\n $this->_markModified();\n }\n $this->_iRealtorUserId = (int) $a_iRealtorUserId;\n }","title":""},{"docid":"dda9ff7b5aaf677e481df51dc35a7f5f","score":"0.6128203","text":"public function setCreator() {\r\n $this->Creator = new Warecorp_User('id',$this->creatorId);\r\n }","title":""},{"docid":"418cbdc933883fa06681ceb8fd56c832","score":"0.61273396","text":"function setUserId($a_iUserId)\n {\n if (!is_null($this->_iUserId) && $this->_iUserId !== (int) $a_iUserId) {\n $this->_markModified();\n }\n $this->_iUserId = (int) $a_iUserId;\n }","title":""},{"docid":"418cbdc933883fa06681ceb8fd56c832","score":"0.61273396","text":"function setUserId($a_iUserId)\n {\n if (!is_null($this->_iUserId) && $this->_iUserId !== (int) $a_iUserId) {\n $this->_markModified();\n }\n $this->_iUserId = (int) $a_iUserId;\n }","title":""},{"docid":"9e1142a08098960dfa90af07705f6c80","score":"0.61261296","text":"public function setUser_id ($user_id) : self\n {\n $this->user_id = $user_id;\n return $this;\n }","title":""},{"docid":"fe74fb1990d02c19081cc4ffd92b5e3e","score":"0.61176026","text":"public function setId($value) { $this->id = $value;}","title":""},{"docid":"930a22d1bbec4a3a029ef622a4b610ab","score":"0.61101454","text":"public function getIdUser()\n {\n return $this->id_user;\n }","title":""},{"docid":"930a22d1bbec4a3a029ef622a4b610ab","score":"0.61101454","text":"public function getIdUser()\n {\n return $this->id_user;\n }","title":""},{"docid":"930a22d1bbec4a3a029ef622a4b610ab","score":"0.61101454","text":"public function getIdUser()\n {\n return $this->id_user;\n }","title":""},{"docid":"05b39e5091c4ed5c8ba4ea7dd1ec7a27","score":"0.6100162","text":"function setUserId($userId) {\r\n\t\t$this->setData('userId', $userId);\r\n\t}","title":""},{"docid":"a4a463f41919326dd0bf9a73640646ea","score":"0.609867","text":"public function setUsersID($username);","title":""},{"docid":"ce186b6c285fdc9076852bcee9e66324","score":"0.6094834","text":"public function setInitiatedByUserId(?string $value): void {\n $this->getBackingStore()->set('initiatedByUserId', $value);\n }","title":""},{"docid":"c6292049d4c2720c50ea8d0e76a87abf","score":"0.6094628","text":"public function setUserId(\\ParticipantId $value=null)\n {\n return $this->set(self::USER_ID, $value);\n }","title":""},{"docid":"40ce3a792c4e2332f754a4aa0eb7cf81","score":"0.6080037","text":"public function setUserId($userId)\r\n {\r\n $this->_userId = $userId;\r\n }","title":""},{"docid":"1885b52c80e6c5e77bcb471e55576807","score":"0.6062265","text":"public function getIdUser() {\r\n return idUser;\r\n }","title":""},{"docid":"3ffa95ddf3613c0470583fc79d459e7b","score":"0.6057569","text":"public function userId($user_id = null)\n {\n if( empty($user_id) ){\n return $this->user_id;\n } else {\n return $this->user_id = $user_id;\n }\n }","title":""},{"docid":"3309c81d2f8ef2cab9185df421c065d4","score":"0.60562617","text":"public function getIdUser(): int\n {\n return $this->idUser;\n }","title":""},{"docid":"8217d12dc2d329d65c53708e7da421b6","score":"0.6046321","text":"public function setUserId($newUserId){\n\t\t//base case: if the new user ID is null, this is a new user, and there is no mySQL ID assigned as of yet\n\t\tif($newUserId === null){\n\t\t\t$this->userId = null;\n\t\t\treturn;\n\t\t}\n\n\t\t//verify that the ID is a valid integer\n\t\t$newUserId = filter_var($newUserId, FILTER_VALIDATE_INT);\n\t\tif($newUserId === false){\n\t\t\tthrow(new InvalidArgumentException(\"User ID is not a valid integer.\"));\n\t\t}\n\n\t\t//now, verify that the ID number is positive\n\t\tif($newUserId <= 0){\n\t\t\tthrow(new RangeException(\"User ID is not positive\"));\n\t\t}\n\n\t\t//convert the value to integer, and store\n\t\t$this->userId = intval($newUserId);\n\t}","title":""},{"docid":"3e3d13b5c5ef001b44e128ce52b95f22","score":"0.6041792","text":"public function setUser($userId);","title":""},{"docid":"2d82e99d786fabee98c4e7953fd6031b","score":"0.6039068","text":"public function getUserId()\n {\n return $this->id;\n }","title":""},{"docid":"5cd7e3c2aa3e605574ead2a3c09c0dfd","score":"0.60345817","text":"public function setUserid($userid)\r\n {\r\n $this->userid = $userid;\r\n\r\n return $this;\r\n }","title":""},{"docid":"30be8b397e01b4f41d8bfb18eaa5c0a2","score":"0.6034413","text":"public function getId() {\n return $this->id_user;\n }","title":""},{"docid":"9fec26ef6782ef7f1ac4b14403b491c9","score":"0.60268563","text":"public function getIdUser()\n {\n return $this->idUser;\n }","title":""},{"docid":"9fec26ef6782ef7f1ac4b14403b491c9","score":"0.60268563","text":"public function getIdUser()\n {\n return $this->idUser;\n }","title":""},{"docid":"9fec26ef6782ef7f1ac4b14403b491c9","score":"0.60268563","text":"public function getIdUser()\n {\n return $this->idUser;\n }","title":""},{"docid":"58e6af67c1b84d7278b10abbc1350652","score":"0.6013502","text":"public function getIdUser()\r\n {\r\n return $this->idUser;\r\n }","title":""},{"docid":"0c7503c6507ce566d134e848f8868650","score":"0.60107124","text":"public function getIdAttribute()\n {\n return $this->user_id;\n }","title":""},{"docid":"567f9c2f768d7daf2b79bc39ce20ef6b","score":"0.60067284","text":"public function setUserId($userId)\n {\n $this->userId = $userId;\n }","title":""},{"docid":"4835f0b4c6b04f1aba9e149f1e097e08","score":"0.6006465","text":"public function setUserId($userId)\n\t\t{\n\t\t\t$this->userId = $userId;\n\t\t}","title":""},{"docid":"5b8b70a0f5a327f5bfd37b9a893b7cbe","score":"0.59938496","text":"function setOwnerID($value) { $this->set('ownerid', $value); }","title":""},{"docid":"d9aad50f7f9755dcb0d70b0f75c8d5ee","score":"0.5992688","text":"public function setUserId( $userId )\n {\n $this->_daContent->setUserId( $this->getId(), $userId );\n }","title":""},{"docid":"c47d688b978d351942a485f06c4af9de","score":"0.5990392","text":"function initUserId() {\n $objFWUser = \\FWUser::getFWUserObject();\n $this->_intCurrentUserId = $objFWUser->objUser->login() ? $objFWUser->objUser->getId() : 0;\n }","title":""},{"docid":"4366759f2b4ddd38e42c5c7a2d2a59ba","score":"0.5986308","text":"public function setUser($userId)\n {\n $this->userId = $userId;\n }","title":""},{"docid":"d6b34163270e8852d29e4b6a9e42ea0d","score":"0.5979831","text":"public function setCreatorAccount( $username, $id = '' ) {\n\t\t$user = self::filter_account_info( $username, $id );\n\t\tif ( $user && isset( $user->username ) )\n\t\t\t$this->creator = $user;\n\t\treturn $this;\n\t}","title":""},{"docid":"faa4b7e62f25e6fd5f98a919d298ec68","score":"0.59689903","text":"public function setUserId(?int $userId): self\n {\n $this->initialized['userId'] = true;\n $this->userId = $userId;\n\n return $this;\n }","title":""},{"docid":"26376b0ea4ba6a63691b0ee61b5d77e3","score":"0.5966963","text":"public function setUserId(?string $value): void {\n $this->getBackingStore()->set('userId', $value);\n }","title":""},{"docid":"6f60c489901a5c2087bc562b2aca24b4","score":"0.5954189","text":"public function getIdUser()\n {\n return $this->IdUser;\n }","title":""}],"string":"[\n {\n \"docid\": \"8afd6015c7b16259cc1e26158b5f17db\",\n \"score\": \"0.72755086\",\n \"text\": \"public function setUserId( $id ) {\\n\\t\\t$this->userId = $id;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7fc9491b2b9efc727280fb3b5d5173ce\",\n \"score\": \"0.7209619\",\n \"text\": \"public function setUserId($value){\\n $this->attributes['user_id'] = $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8cdc9f531267f4f8cf3f4bb6feb12ef\",\n \"score\": \"0.7112066\",\n \"text\": \"protected function _setUserId() {\\n\\n if ($this->_identity !== null) {\\n\\n $userid = $this->_identity->getId();\\n\\n if ((int) $userid > 0) {\\n $conn = $this->_em->getConnection();\\n $conn->query('SET @userid = ' . $userid);\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dea52945e7f80ddcf8beaf07d8746763\",\n \"score\": \"0.7091921\",\n \"text\": \"public function set_id_user($arg)\\n {\\n if ($this->is_valid_int_format($arg))\\n $this->_id_user = $arg;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ce1d9afacca4d2b1e80cf13655d20e7\",\n \"score\": \"0.7051809\",\n \"text\": \"public function setIdUser($idUser)\\n {\\n $this->idUser = (int) $idUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23ca38c24f82a82abbfd8f42d3d09acd\",\n \"score\": \"0.70433855\",\n \"text\": \"public function set_user_id( $value ) {\\n\\t\\t$this->set_prop( 'user_id', absint( $value ) ) ;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"32783f1c39d295c36c6908fabd78bea6\",\n \"score\": \"0.7022507\",\n \"text\": \"public function setIdUser($idUser)\\r\\n {\\r\\n $this->idUser = $idUser;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d989c41efb514feff2480651085b0acd\",\n \"score\": \"0.7004882\",\n \"text\": \"function setUserId($id){\\n\\t\\techo $this->userId\\t=\\t$id;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cad46a84a220f0e0ff0f4e079694cb59\",\n \"score\": \"0.6890296\",\n \"text\": \"private function manageUserId() {\\n if ($user_id =$this->getUserIdFromSession()) {\\n $this->setUserId($user_id);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f756176ff5a48f7ecad38b5b0ef22a01\",\n \"score\": \"0.6706175\",\n \"text\": \"public function setUserId($value)\\n {\\n return $this->set(self::user_id, $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f8bfdbfa53c25721a6c25a2760ae0c2\",\n \"score\": \"0.6693652\",\n \"text\": \"public function setUserId($value)\\n {\\n $this->setProperty(\\\"UserId\\\", $value, true);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"df0fdb0a1a5a1e7e97d634a665dcc764\",\n \"score\": \"0.66570204\",\n \"text\": \"function set_user_id($user_id)\\n\\t{\\n\\t\\t$this->set_default_property(self :: PROPERTY_USER_ID, $user_id);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"289e6ff3a985d165e43714270ce21fc1\",\n \"score\": \"0.66401225\",\n \"text\": \"public function setId_user($id_user)\\n {\\n $id_user = (int) $id_user;\\n $this->_id_user = $id_user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9c21b7dcc7d0f9b8edc72894d95e230\",\n \"score\": \"0.6618805\",\n \"text\": \"public function setIdUser($idUser)\\n {\\n $idUser = (int) $idUser;\\n $this->idUser = $idUser;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b0ac410a3ae564e9e25c1549ceff2047\",\n \"score\": \"0.66121054\",\n \"text\": \"protected function setUser_id($value)\\n\\t{\\n\\t\\tif (isCeleKladneCislo($value) || is_null($value)) {\\n\\t\\t\\t$this->user_id = $value;\\n\\t\\t}\\n\\t\\tif (isCeleKladneCislo($value) && $this->lazyLoad) {\\n\\t\\t\\t$this->userUserEntity = new UserEntity($value,false);\\n\\t\\t} else {\\n\\t\\t\\t$this->userUserEntity = null;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a406a22f58e0c0a60091f5997c5d04a\",\n \"score\": \"0.66034997\",\n \"text\": \"private function setCurrentUserId()\\n {\\n// $this->currentUserId = get_current_user_id();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c78c02e0d7f64d74602b162e0573fe2\",\n \"score\": \"0.658795\",\n \"text\": \"public function setUserIdAttribute($value)\\n {\\n $this->attributes['user_id'] = $value ?: null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7b8c74b5ceab7daae69bd313fd47777\",\n \"score\": \"0.6555244\",\n \"text\": \"protected function setEditedUserId()\\n {\\n $this->editedUserId = intval($_REQUEST['user_id']);\\n if ($this->editedUserId == 0) {\\n $this->editedUserId = intval(get_current_user_id());\\n }\\n $this->editedUser = get_user_by('id', $this->editedUserId);\\n if ($this->editedUser->ID > 0) {\\n $this->editedUser->profileCategories = ArrayManipulation::forceArray(get_user_meta($this->editedUserId, 'profile-categories', true));\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1efe851d96cf24413425c48d9305be7\",\n \"score\": \"0.65452516\",\n \"text\": \"public function setID($id)\\r\\n {\\r\\n $this->userID = $id;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b1bd6291fcdf08a3ce4c036f30a331e2\",\n \"score\": \"0.6542437\",\n \"text\": \"function setUser( $value )\\r\\n {\\r\\n if ( is_a( $value, \\\"eZUser\\\" ) )\\r\\n $value = $value->id();\\r\\n\\r\\n $this->UserID = $value;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"444f5bd0ba93377ede1c2f115fa7b39b\",\n \"score\": \"0.654227\",\n \"text\": \"public function setIdUser($idUser)\\n {\\n $this->idUser = $idUser;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"444f5bd0ba93377ede1c2f115fa7b39b\",\n \"score\": \"0.654227\",\n \"text\": \"public function setIdUser($idUser)\\n {\\n $this->idUser = $idUser;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79c27088a4fc4e8e977a384a46eda009\",\n \"score\": \"0.65036803\",\n \"text\": \"public function setToUserId($data)\\n {\\n $this->_ToUserId=$data;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"146a20e7ed380acd5f4250884694867a\",\n \"score\": \"0.6489751\",\n \"text\": \"private function setUserId($user_id) {\\n $this->user_id = $user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a2ccda0e5a5ad57ace6a1fbb0ca83d81\",\n \"score\": \"0.6473248\",\n \"text\": \"public function setUserId($data)\\n {\\n $this->_UserId=$data;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"439125163d84d8629d48b04fa503467f\",\n \"score\": \"0.6472386\",\n \"text\": \"public function setUserId($userId);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ebdd39abad01cc6fcaef824fcc4facd\",\n \"score\": \"0.64626414\",\n \"text\": \"public function setUser_id($user_id){\\n\\t\\t$this->$user_id = $user_id;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"852a9f3758bfa8b60af46e33b7dec90b\",\n \"score\": \"0.64474916\",\n \"text\": \"public function setUserId($v)\\n {\\n if ($v !== null && is_numeric($v)) {\\n $v = (int) $v;\\n }\\n\\n if ($this->user_id !== $v) {\\n $this->user_id = $v;\\n $this->modifiedColumns[] = PrincipalPeer::USER_ID;\\n }\\n\\n if ($this->aUser !== null && $this->aUser->getId() !== $v) {\\n $this->aUser = null;\\n }\\n\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc791e73bc3da3ea3d71c6b4e385aa3e\",\n \"score\": \"0.6434163\",\n \"text\": \"public static function setUserId($id) {\\n Cookie::set('id', $id);\\n self::$user = Auth::NONE;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"525e3aa9eddfd568ce81b44c8cc29c56\",\n \"score\": \"0.6429236\",\n \"text\": \"public function setUserId( $user_id )\\n {\\n $this->user_id = $user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a7f6e80cf2a073d5e5e469a321d8c0a\",\n \"score\": \"0.642923\",\n \"text\": \"function SetId($value) { $this->id=$value; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be6acd16f67be8d49e9e1aa55f228553\",\n \"score\": \"0.6402343\",\n \"text\": \"public function setUserId(int $value): self\\n {\\n $this->userId = $value;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc59ecf94c2fa5969ea4900d282479e3\",\n \"score\": \"0.6399636\",\n \"text\": \"public function setIdUser($id_user)\\n {\\n $this->id_user = $id_user;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc59ecf94c2fa5969ea4900d282479e3\",\n \"score\": \"0.6399636\",\n \"text\": \"public function setIdUser($id_user)\\n {\\n $this->id_user = $id_user;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc59ecf94c2fa5969ea4900d282479e3\",\n \"score\": \"0.6399636\",\n \"text\": \"public function setIdUser($id_user)\\n {\\n $this->id_user = $id_user;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed4993a01a23468e581af3cada879a9b\",\n \"score\": \"0.63852\",\n \"text\": \"public function testSetUserID() {\\n $testUser = new User();\\n $testUser->setUsername('test');\\n $testUser->create();\\n\\n // Create a test mission note\\n $testMissionNote = new MissionNote();\\n\\n // Try and set id\\n try {\\n $testMissionNote->setUserID($testUser->getID(), true);\\n $this->assertEquals($testUser->getID(), $testMissionNote->getUserID());\\n } finally {\\n $testUser->delete();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1770b6b23368da8fe9cef9915ae63bea\",\n \"score\": \"0.6373896\",\n \"text\": \"public function setUserID($value)\\n {\\n return $this->set('UserID', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1770b6b23368da8fe9cef9915ae63bea\",\n \"score\": \"0.6373896\",\n \"text\": \"public function setUserID($value)\\n {\\n return $this->set('UserID', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1770b6b23368da8fe9cef9915ae63bea\",\n \"score\": \"0.6373896\",\n \"text\": \"public function setUserID($value)\\n {\\n return $this->set('UserID', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b575f300bd1822466dc339d1df6f5575\",\n \"score\": \"0.63727087\",\n \"text\": \"public function set_user_id(?int $user_id) : self {\\n\\t\\t$this->user_id = $user_id;\\n\\t\\t$this->user = NULL; //Create new user from user_id\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b053ec4ed3646ef60d24f9eb395606a0\",\n \"score\": \"0.6356549\",\n \"text\": \"public function setUser_id($user_id){\\r\\n $this->user_id = $user_id;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d76de09e287f814caf43fd25d16f920\",\n \"score\": \"0.6340145\",\n \"text\": \"public function setPreviousUserId( $id );\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2b0556b59e5d04069dec22550e3c6ae\",\n \"score\": \"0.6338055\",\n \"text\": \"function setCoachUserId($id)\\n {\\n $this->__coachuserid = $id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c3da49ad7608eaf2ba260291067568cd\",\n \"score\": \"0.6327077\",\n \"text\": \"function setUserId($userid)\\n\\t\\t{\\n\\t\\t\\t$this->mUserId = $userid;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b122120fc3cab685fcf3cce619c57f4\",\n \"score\": \"0.63209724\",\n \"text\": \"public function setUserId( $userId )\\n {\\n $this->_daChallenge->setUserId( $this->getId(), $userId );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eec689a4f23a174cef9c71a5738f1314\",\n \"score\": \"0.63146603\",\n \"text\": \"public function setUserIdAttribute($input)\\n {\\n $this->attributes['user_id'] = $input ? $input : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eec689a4f23a174cef9c71a5738f1314\",\n \"score\": \"0.63146603\",\n \"text\": \"public function setUserIdAttribute($input)\\n {\\n $this->attributes['user_id'] = $input ? $input : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d42e74a82f15d6fbe9ef31b90894781\",\n \"score\": \"0.6299653\",\n \"text\": \"public function setCreatedBy($v)\\n {\\n if (is_a('\\\\TechWilk\\\\Rota\\\\User', $v)) {\\n $v = $v->getId();\\n }\\n\\n return parent::setCreatedBy($v);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"041414637a70ff7af7821c6705fb6c07\",\n \"score\": \"0.6293224\",\n \"text\": \"public function setUserId($user_id) {\\n\\n if(!isset($user_id) || $user_id == \\\"\\\"){\\n $user_id = \\\"0\\\";\\n }\\n $this->fields[\\\"user_id\\\"] = $user_id;\\n\\nreturn $this;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"041414637a70ff7af7821c6705fb6c07\",\n \"score\": \"0.6293224\",\n \"text\": \"public function setUserId($user_id) {\\n\\n if(!isset($user_id) || $user_id == \\\"\\\"){\\n $user_id = \\\"0\\\";\\n }\\n $this->fields[\\\"user_id\\\"] = $user_id;\\n\\nreturn $this;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"041414637a70ff7af7821c6705fb6c07\",\n \"score\": \"0.6293224\",\n \"text\": \"public function setUserId($user_id) {\\n\\n if(!isset($user_id) || $user_id == \\\"\\\"){\\n $user_id = \\\"0\\\";\\n }\\n $this->fields[\\\"user_id\\\"] = $user_id;\\n\\nreturn $this;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b130a6e602689a54658399388d057058\",\n \"score\": \"0.62880635\",\n \"text\": \"protected function setUserId($user_id): void {\\n $this->user_id = $user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"11a8202bbfd67c0afb1de6c0c9aa4c64\",\n \"score\": \"0.6272965\",\n \"text\": \"public function setUserId($v)\\n {\\n if ($v === ''){\\n $v = null;\\n }\\n elseif ($v !== null){\\n \\n if(is_numeric($v)) {\\n $v = (int) $v;\\n }\\n }\\n if ($this->user_id !== $v) {\\n $this->user_id = $v;\\n $this->modifiedColumns[] = JournalDeVenteLignePeer::USER_ID;\\n }\\n\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8ea3dbaed54bd7a91e1c800a372672d\",\n \"score\": \"0.6259451\",\n \"text\": \"public function setId_user($id_user)\\n {\\n $this->id_user = $id_user;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d97ce289cd3994c59cdc87e29fd57d7b\",\n \"score\": \"0.6258782\",\n \"text\": \"public function should_assign_an_id_to_the_created_user()\\n {\\n $this->expectsEvents(UserCreated::class);\\n\\n $response = $this->call('POST', '/v1/users', [\\n 'firstname' => 'Berzel',\\n 'lastname' => 'Tumbude',\\n 'email' => 'berzel@app.com',\\n 'password' => 'secret123',\\n 'password_confirmation' => 'secret123'\\n ]);\\n\\n $this->seeJsonContains([\\n 'id' => 1,\\n 'firstname' => 'Berzel',\\n 'lastname' => 'Tumbude',\\n 'email' => 'berzel@app.com'\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2bdff526626ead2655baf401e12eceab\",\n \"score\": \"0.6254985\",\n \"text\": \"public function setId($id): User\\n {\\n $this->id = $id;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4baefb62f2a710e20ba2d5fa05d45cf9\",\n \"score\": \"0.624619\",\n \"text\": \"public function setUserId($user_id)\\n {\\n $this->user_id = $user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b89980236eb07bb532df728e74af3c2\",\n \"score\": \"0.6238676\",\n \"text\": \"public function setUserId($newUserId) {\\n $this->userId = $newUserId;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9ef02070f9c554f0ef1df5aedd8f6b3\",\n \"score\": \"0.62343305\",\n \"text\": \"public function setUserID($id)\\n {\\n if (!is_int($id))\\n throw new InvalidParameterException(__FUNCTION__ . ' function only accepts integers. Input was: ' . $id);\\n else\\n $this->User_ID = $id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad2df2a1bc7c03aaab3d8ece5f12e0b4\",\n \"score\": \"0.6194981\",\n \"text\": \"protected function set_user_id( $user_id ) {\\n\\t\\t$this->user_id = $user_id;\\n\\t\\t$this->get_datastore()->set_object_id( $user_id );\\n\\n\\t\\tforeach ( $this->fields as $field ) {\\n\\t\\t\\t$datastore = $field->get_datastore();\\n\\t\\t\\tif ( $datastore->get_object_id() === 0 ) {\\n\\t\\t\\t\\t$datastore->set_object_id( $user_id );\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"630a0fcf4c2cec245371c572580c8c7b\",\n \"score\": \"0.61770463\",\n \"text\": \"public function idUser()\\n {\\n return $this->idUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"448c8c240252c801e2523829ccaa06db\",\n \"score\": \"0.6176872\",\n \"text\": \"public function setCreatorId($id)\\n {\\n $this->creatorId = $id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"454b6ec4c410a09ad3cc700ce5aaaacc\",\n \"score\": \"0.6172319\",\n \"text\": \"function setUserId($userId) {\\n\\t\\treturn $this->setData('userId', $userId);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f5787c5f5d89576f2e5363b18a2ca6b\",\n \"score\": \"0.6151508\",\n \"text\": \"function setUserId($userId) {\\r\\n\\t\\treturn $this->setData('userId', $userId);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8d96e880b5f2a8d3c040fdccbf245c65\",\n \"score\": \"0.6139318\",\n \"text\": \"function setRealtorUserId($a_iRealtorUserId)\\n {\\n if (!is_null($this->_iRealtorUserId) && $this->_iRealtorUserId !== (int) $a_iRealtorUserId) {\\n $this->_markModified();\\n }\\n $this->_iRealtorUserId = (int) $a_iRealtorUserId;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dda9ff7b5aaf677e481df51dc35a7f5f\",\n \"score\": \"0.6128203\",\n \"text\": \"public function setCreator() {\\r\\n $this->Creator = new Warecorp_User('id',$this->creatorId);\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"418cbdc933883fa06681ceb8fd56c832\",\n \"score\": \"0.61273396\",\n \"text\": \"function setUserId($a_iUserId)\\n {\\n if (!is_null($this->_iUserId) && $this->_iUserId !== (int) $a_iUserId) {\\n $this->_markModified();\\n }\\n $this->_iUserId = (int) $a_iUserId;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"418cbdc933883fa06681ceb8fd56c832\",\n \"score\": \"0.61273396\",\n \"text\": \"function setUserId($a_iUserId)\\n {\\n if (!is_null($this->_iUserId) && $this->_iUserId !== (int) $a_iUserId) {\\n $this->_markModified();\\n }\\n $this->_iUserId = (int) $a_iUserId;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e1142a08098960dfa90af07705f6c80\",\n \"score\": \"0.61261296\",\n \"text\": \"public function setUser_id ($user_id) : self\\n {\\n $this->user_id = $user_id;\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe74fb1990d02c19081cc4ffd92b5e3e\",\n \"score\": \"0.61176026\",\n \"text\": \"public function setId($value) { $this->id = $value;}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"930a22d1bbec4a3a029ef622a4b610ab\",\n \"score\": \"0.61101454\",\n \"text\": \"public function getIdUser()\\n {\\n return $this->id_user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"930a22d1bbec4a3a029ef622a4b610ab\",\n \"score\": \"0.61101454\",\n \"text\": \"public function getIdUser()\\n {\\n return $this->id_user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"930a22d1bbec4a3a029ef622a4b610ab\",\n \"score\": \"0.61101454\",\n \"text\": \"public function getIdUser()\\n {\\n return $this->id_user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05b39e5091c4ed5c8ba4ea7dd1ec7a27\",\n \"score\": \"0.6100162\",\n \"text\": \"function setUserId($userId) {\\r\\n\\t\\t$this->setData('userId', $userId);\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4a463f41919326dd0bf9a73640646ea\",\n \"score\": \"0.609867\",\n \"text\": \"public function setUsersID($username);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce186b6c285fdc9076852bcee9e66324\",\n \"score\": \"0.6094834\",\n \"text\": \"public function setInitiatedByUserId(?string $value): void {\\n $this->getBackingStore()->set('initiatedByUserId', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6292049d4c2720c50ea8d0e76a87abf\",\n \"score\": \"0.6094628\",\n \"text\": \"public function setUserId(\\\\ParticipantId $value=null)\\n {\\n return $this->set(self::USER_ID, $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40ce3a792c4e2332f754a4aa0eb7cf81\",\n \"score\": \"0.6080037\",\n \"text\": \"public function setUserId($userId)\\r\\n {\\r\\n $this->_userId = $userId;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1885b52c80e6c5e77bcb471e55576807\",\n \"score\": \"0.6062265\",\n \"text\": \"public function getIdUser() {\\r\\n return idUser;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ffa95ddf3613c0470583fc79d459e7b\",\n \"score\": \"0.6057569\",\n \"text\": \"public function userId($user_id = null)\\n {\\n if( empty($user_id) ){\\n return $this->user_id;\\n } else {\\n return $this->user_id = $user_id;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3309c81d2f8ef2cab9185df421c065d4\",\n \"score\": \"0.60562617\",\n \"text\": \"public function getIdUser(): int\\n {\\n return $this->idUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8217d12dc2d329d65c53708e7da421b6\",\n \"score\": \"0.6046321\",\n \"text\": \"public function setUserId($newUserId){\\n\\t\\t//base case: if the new user ID is null, this is a new user, and there is no mySQL ID assigned as of yet\\n\\t\\tif($newUserId === null){\\n\\t\\t\\t$this->userId = null;\\n\\t\\t\\treturn;\\n\\t\\t}\\n\\n\\t\\t//verify that the ID is a valid integer\\n\\t\\t$newUserId = filter_var($newUserId, FILTER_VALIDATE_INT);\\n\\t\\tif($newUserId === false){\\n\\t\\t\\tthrow(new InvalidArgumentException(\\\"User ID is not a valid integer.\\\"));\\n\\t\\t}\\n\\n\\t\\t//now, verify that the ID number is positive\\n\\t\\tif($newUserId <= 0){\\n\\t\\t\\tthrow(new RangeException(\\\"User ID is not positive\\\"));\\n\\t\\t}\\n\\n\\t\\t//convert the value to integer, and store\\n\\t\\t$this->userId = intval($newUserId);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e3d13b5c5ef001b44e128ce52b95f22\",\n \"score\": \"0.6041792\",\n \"text\": \"public function setUser($userId);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d82e99d786fabee98c4e7953fd6031b\",\n \"score\": \"0.6039068\",\n \"text\": \"public function getUserId()\\n {\\n return $this->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5cd7e3c2aa3e605574ead2a3c09c0dfd\",\n \"score\": \"0.60345817\",\n \"text\": \"public function setUserid($userid)\\r\\n {\\r\\n $this->userid = $userid;\\r\\n\\r\\n return $this;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"30be8b397e01b4f41d8bfb18eaa5c0a2\",\n \"score\": \"0.6034413\",\n \"text\": \"public function getId() {\\n return $this->id_user;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fec26ef6782ef7f1ac4b14403b491c9\",\n \"score\": \"0.60268563\",\n \"text\": \"public function getIdUser()\\n {\\n return $this->idUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fec26ef6782ef7f1ac4b14403b491c9\",\n \"score\": \"0.60268563\",\n \"text\": \"public function getIdUser()\\n {\\n return $this->idUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fec26ef6782ef7f1ac4b14403b491c9\",\n \"score\": \"0.60268563\",\n \"text\": \"public function getIdUser()\\n {\\n return $this->idUser;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58e6af67c1b84d7278b10abbc1350652\",\n \"score\": \"0.6013502\",\n \"text\": \"public function getIdUser()\\r\\n {\\r\\n return $this->idUser;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c7503c6507ce566d134e848f8868650\",\n \"score\": \"0.60107124\",\n \"text\": \"public function getIdAttribute()\\n {\\n return $this->user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"567f9c2f768d7daf2b79bc39ce20ef6b\",\n \"score\": \"0.60067284\",\n \"text\": \"public function setUserId($userId)\\n {\\n $this->userId = $userId;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4835f0b4c6b04f1aba9e149f1e097e08\",\n \"score\": \"0.6006465\",\n \"text\": \"public function setUserId($userId)\\n\\t\\t{\\n\\t\\t\\t$this->userId = $userId;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5b8b70a0f5a327f5bfd37b9a893b7cbe\",\n \"score\": \"0.59938496\",\n \"text\": \"function setOwnerID($value) { $this->set('ownerid', $value); }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d9aad50f7f9755dcb0d70b0f75c8d5ee\",\n \"score\": \"0.5992688\",\n \"text\": \"public function setUserId( $userId )\\n {\\n $this->_daContent->setUserId( $this->getId(), $userId );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c47d688b978d351942a485f06c4af9de\",\n \"score\": \"0.5990392\",\n \"text\": \"function initUserId() {\\n $objFWUser = \\\\FWUser::getFWUserObject();\\n $this->_intCurrentUserId = $objFWUser->objUser->login() ? $objFWUser->objUser->getId() : 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4366759f2b4ddd38e42c5c7a2d2a59ba\",\n \"score\": \"0.5986308\",\n \"text\": \"public function setUser($userId)\\n {\\n $this->userId = $userId;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6b34163270e8852d29e4b6a9e42ea0d\",\n \"score\": \"0.5979831\",\n \"text\": \"public function setCreatorAccount( $username, $id = '' ) {\\n\\t\\t$user = self::filter_account_info( $username, $id );\\n\\t\\tif ( $user && isset( $user->username ) )\\n\\t\\t\\t$this->creator = $user;\\n\\t\\treturn $this;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"faa4b7e62f25e6fd5f98a919d298ec68\",\n \"score\": \"0.59689903\",\n \"text\": \"public function setUserId(?int $userId): self\\n {\\n $this->initialized['userId'] = true;\\n $this->userId = $userId;\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26376b0ea4ba6a63691b0ee61b5d77e3\",\n \"score\": \"0.5966963\",\n \"text\": \"public function setUserId(?string $value): void {\\n $this->getBackingStore()->set('userId', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f60c489901a5c2087bc562b2aca24b4\",\n \"score\": \"0.5954189\",\n \"text\": \"public function getIdUser()\\n {\\n return $this->IdUser;\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":779,"cells":{"query_id":{"kind":"string","value":"366628ea005432297a28d0fda76a254d"},"query":{"kind":"string","value":"Store a newly created CentralElectrica in storage. POST /centralElectricas"},"positive_passages":{"kind":"list like","value":[{"docid":"517f0e820b2d2a778aa1f20237af6856","score":"0.7422654","text":"public function store(CreateCentralElectricaAPIRequest $request)\n {\n $input = $request->all();\n\n $centralElectrica = $this->centralElectricaRepository->create($input);\n\n return $this->sendResponse($centralElectrica->toArray(), 'Central Electrica saved successfully');\n }","title":""}],"string":"[\n {\n \"docid\": \"517f0e820b2d2a778aa1f20237af6856\",\n \"score\": \"0.7422654\",\n \"text\": \"public function store(CreateCentralElectricaAPIRequest $request)\\n {\\n $input = $request->all();\\n\\n $centralElectrica = $this->centralElectricaRepository->create($input);\\n\\n return $this->sendResponse($centralElectrica->toArray(), 'Central Electrica saved successfully');\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"d3eb15451fd1ef1117dff6cbf3ecd9d0","score":"0.606247","text":"public function store(Request $request)\n {\n $request->validate([\n 'storage_code' => ['required', 'max:255', 'unique:silo_actuals'],\n 'date' => ['required'],\n 'value_actual' => ['required'],\n ]);\n\n $silo = SiloActual::create($request->except('_token'));\n try {\n $request->request->add(['id' => $silo->id]);\n SiloActualCloud::create($request->except('_token'));\n } catch (\\Throwable $th) {\n return redirect('setting/silo-manual')->with(['update' => 'Data saved successfully!']);\n }\n return redirect('setting/silo-manual')->with(['create' => 'Data saved successfully!']);\n }","title":""},{"docid":"1eadd46cb5f082ff7082550863de3774","score":"0.5910282","text":"public function store(Request $request)\n {\n $validateData = $request->validate([\n 'description' => 'required',\n 'somme' => 'required',\n 'apercu' => 'required',\n 'client_id' => 'required',\n 'modele_id' => 'required'\n ]);\n $clientId = $request->input('client_id');\n $modeleId = $request->input('modele_id');\n \n\n $client = Client::find($clientId);\n $modele = Modele::find($modeleId);\n \n if ($client && $modele) {\n // Store image in public file;\n $request->file('apercu')->store('couture', 'public');\n echo \"start saving...\";\n $couture = Couture::create([\n 'description'=> $request->input('description'),\n 'date' => $request->input('date'),\n 'somme' => $request->input('somme'),\n 'apercu' => $request->file('apercu')->hashName(),\n 'client_id' => $request->input('client_id'),\n 'modele_id' => $request->input('modele_id')\n ]);\n }else{\n return response()->json(['status'=>FALSE, 'message'=>\"Veuillez vous assurez de l'existance du client et du modele dans la base de donnée svp.\" ]);\n }\n \n if ($couture) {\n return response()->json(['status'=>TRUE, 'couture'=>$couture]);\n }else{\n return response()->json(['status'=>FALSE, 'couture'=>[]]);\n }\n \n }","title":""},{"docid":"4679a89e7503db0dab15892f6746501d","score":"0.5896923","text":"public function store(Request $request){\n try{\n if(!$request->input('central_name') )\n throw new Exception(\"Central name is required!\");\n $centralOffice = new CentralOffice();\n $centralOffice->central_name = $request->input('central_name');\n $centralOffice->central_details = $request->input('central_details');\n if(!$centralOffice->save())\n throw new Exception(\"Critical error when save central office data!\");\n $where = ['central_office_id'=>$centralOffice->id,'role'=>1];\n $centralOffice->head = TermRelation::findMyAdmin($where);\n return ['success'=>true, 'message'=>'Cetnral office save success', 'data'=>$centralOffice];\n\n }catch (Exception $e){\n return ['success'=>false, 'message'=> $e->getMessage()];\n }\n }","title":""},{"docid":"15066a1a5efcf88c05402f9d157276db","score":"0.5878643","text":"public function store() {\n try {\n $data = Input::all();\n $this->validator->validate($data);\n $data['valor'] = Helpers::toDecimal($data['valor']);\n $data['vencimento'] = Helpers::dateDb($data['vencimento']);\n $this->conta->fill($data)->save();\n Session::flash('message', 'Conta criada com sucesso!');\n return Redirect::route('admin.contas.edit', [$this->conta->id]);\n } catch (InvalidArgumentException $e) {\n return Redirect::route('admin.contas.create')->withErrors($e->getMessage())->withInput();\n }\n }","title":""},{"docid":"03c8e4645690d0e12be40f8303b5711d","score":"0.58098084","text":"public function store()\n {\n $this->setBillingCycles();\n\n $body = [\n \"product_id\" => \"XRP-PROD-001\",\n \"name\" => $this->name,\n \"description\" => $this->description,\n \"status\" => $this->status,\n \"billing_cycles\" => [$this->billing_cycles],\n \"payment_preferences\" => $this->payment_preferences,\n \"taxes\" => $this->taxes,\n ];\n\n try {\n $response = $this->client->request(\"POST\", $this->store, [\"headers\" => $this->headers(), \"json\" => $body]);\n } catch (ClientException $e) {\n return $e->getMessage();\n }\n\n return $response->getBody();\n }","title":""},{"docid":"130810cbfa71fb94195381385cf376c4","score":"0.58057463","text":"public function store(Request $request)\n {\n /*$emergencias = new Emergencias;\n $emergencias->Institucion = request('Institucion');\n $emergencias->Zona = request('Zona');\n $emergencias->Telefono = request('Telefono'); \n $emergencias->save();*/\n //return redirect('practica/lista');\n $emergencia = $this->emergencia->create($request->all());\n return response()->json($emergencia);\n }","title":""},{"docid":"68f875cbd20a6dbaaf3a2d1cdc7faff2","score":"0.5756716","text":"public function store(ComputerInsertFormRequest $request)\n {\n\n $computer = new Computer();\n $computer->local_id = $request->get('local_id');\n $computer->brand =$request->get('brand');\n $computer->model_or_serial = $request->get('model_or_serial');\n $computer->specification = $request->get('specification');\n $computer->company_id = $request->get('company_id');\n $computer->ip_address = $request->get('ip_address');\n\n $live_year = $request->get('live_year');\n if ($request->get('active') == 'year')\n $active_live = $live_year * 12 ;\n else\n $active_live = $live_year;\n\n $computer->live_year =$active_live;\n\n $getprice = $request->get('price');\n $usa_rate =floatval(preg_replace('/[^\\d.]/', '', $request->get('USA_rate')));\n $eur_rate =floatval(preg_replace('/[^\\d.]/', '', $request->get('EUR_rate')));\n $sgd_rate =floatval(preg_replace('/[^\\d.]/', '', $request->get('SGD_rate')));\n if ($request->get('country') == \"USA\" )\n $usa = $getprice * $usa_rate;\n elseif ($request->get('country') == \"EUR\" )\n $usa = $getprice * $eur_rate;\n elseif ($request->get('country') == \"SGD\" )\n $usa = $getprice * $sgd_rate;\n else\n $usa = $getprice;\n\n $computer->price = $usa;\n $computer->bought_date = $request->get('bought_date');\n\n if($request->file('image')) {\n $image = $request->file('image');\n $image_name = date('YmdHis').\"_\". $image->getClientOriginalName();\n $image_path = $_SERVER['DOCUMENT_ROOT']. \"/computers\";\n $image->move($image_path,$image_name);\n }else {$image_name = \"noimage.gif\";}\n if ($request->file('warranty_card')) {\n $warranty_card = $request->file('warranty_card');\n $warranty_card_name = date('YmdHis') . \"_\" . $warranty_card->getClientOriginalName();\n $warranty_card_path = $_SERVER['DOCUMENT_ROOT'] . \"/warrantyCards\";\n $warranty_card->move($warranty_card_path, $warranty_card_name);\n }else $warranty_card_name = \"noimage.gif\";\n $computer->image = $image_name;\n $computer->warranty_card = $warranty_card_name;\n\n $computer->save();\n return redirect('backend/dropDowns/computers/index')->with('success','Successfully Inserted Data!');\n\n }","title":""},{"docid":"c6beca3db8c550c50a63c05e5ecb2fc5","score":"0.5755776","text":"public function store(Request $request){ \n $institucion = Helpers::codigo_inst_seleccionada();\n\n $ultimoId = $this->INCentroCosto($institucion);\n $idMasUno = count($ultimoId)+1;\n\n $ultimoIdCorr = $this->codCorrelativo();\n $codMasUno = count($ultimoIdCorr)+1;\n try{\n $centroCosto = new CentroCostos();\n \n $centroCosto->id = $codMasUno;\n $centroCosto->ccDesc =$request->descCC;\n $centroCosto->estatus = $request->tipo;\n $centroCosto->INCodigo = $institucion;\n $centroCosto->ccCod =$idMasUno; \n\n $centroCosto->save();\n \n $notificacion=Helpers::Notificaciones(true, 'success', '¡Exito!', 'El centro de costo se creo con éxito');\n\n }catch(Exception $e){\n $notificacion=Helpers::Notificaciones(true, 'error', 'Error!', 'El centro de costo no se registro con éxito.');\n }\n return redirect()->action('CentroCostoController@index')->with($notificacion);\n\n }","title":""},{"docid":"bad03adcdbeca7e9a7f0990fe6641b7e","score":"0.5746824","text":"public function store(CentroFormacionRequest $request)\n {\n //\n }","title":""},{"docid":"5341dac5f674b713ed54604730ccb8d7","score":"0.5727088","text":"public function store(Request $request)\n {\n \n $conductor = new Conductor;\n\n $conductor->rut = $request->rut;\n $conductor->nombre = $request->nombre;\n //$vehiculo->idUser = Auth::user()->id;\n\n $conductor->save();\n\n return redirect('sispam/conductores')->with('info', 'Conductor Registrado con Éxito !');\n\n }","title":""},{"docid":"56c61086080d753d9e332e1a080acc40","score":"0.5723747","text":"public function store(Request $request) {\n $data = $request->all();\n $status = 0;\n switch ($data['type_compromise_id']) {\n case TypeCompromise::QUOTE_HOME:\n $status = 1;\n break;\n case TypeCompromise::QUOTE_DISTANCE:\n $status = 18;\n break;\n case TypeCompromise::SALE_NOTE:\n $status = 3;\n break;\n case TypeCompromise::INFO_SEND:\n $status = Carbon::parse($data['documents']['moment'])->day === Carbon::now()->day ? 17 : 16;\n break;\n }\n\n $cg = CGlobal::query()->create([\n 'moment' => $data['moment'],\n 'emit' => Carbon::now(),\n 'client_id' => $data['client']['id'],\n 'user_id' => $data['user_id'],\n 'type_contact_id' => $data['type_contact_id'],\n 'repeater' => $data['repeater'],\n 'type_compromise_id' => $data['type_compromise_id'],\n 'type_motive' => $data['type_motive'],\n 'type_motive_id' => $data['type_motive_id'],\n 'required_time' => $data['required_time'],\n 'traser' => 1,\n 'note' => $data['note'],\n 'status_id' => $status\n ]);\n\n $this->setID('cglobals', $cg->id);\n\n foreach ($data['info'] as $inf) {\n CGlobalInfo::query()->create([\n 'cglobal_id' => $cg->id,\n 'type_info_id' => $inf['info']['id'],\n 'type_info_detail_id' => $inf['info_det']['id'],\n 'info_descrip' => $inf['info_descrip']\n ]);\n }\n\n // CREANDO COTIZACION A DOMICILIO\n\n $client = Client::query()->find($data['client']['id']);\n\n if ($data['type_compromise_id'] === TypeCompromise::QUOTE_HOME) {\n\n $cg->LandScaper()->create($data['landscaper']);\n\n $user_email = User::query()->where('uid', $data['landscaper']['user_uid'])->first();\n\n $generador = User::query()->where('id', $data['user_id'])->first();\n\n $data_email = [\n 'user' => $user_email,\n 'generador' => $generador->name,\n 'visit' => $data['landscaper'],\n 'client' => $client,\n 'company' => Company::query()->find(1),\n ];\n // ENVIANDO ALERTA A PAISAJISTA\n // SendMails::dispatch(new AlertLandscape($data_email), $user_email->email);\n Mail::to($user_email->email)->send(new AlertLandscape($data_email));\n\n Calendar::query()->create([\n 'cglobal_id' => $cg->id,\n 'user_id' => $data['user_id'],\n 'for_user_id' => 0,\n 'start' => Carbon::parse($data['landscaper']['moment'] . ' '.$data['landscaper']['timer']),\n 'end' => Carbon::parse($data['landscaper']['moment'] . ' '.$data['landscaper']['timer'])->addHours(2),\n 'title' => 'Visita a cliente: ' . $client->name,\n 'contentFull' => 'DOMICILIO: ' . $client->street . ' '. $client->home_number . ' '. $client->colony . ' / NOTA: '. $data['landscaper']['note'],\n 'class' => 'domicilio'\n ]);\n\n Quote::query()->create([\n 'cglobal_id' => $cg->id,\n 'type_quote_id' => 1,\n 'token' => random_int(0,99999),\n 'moment' => Carbon::now(),\n 'emit' => Carbon::now(),\n 'status_id' => 1,\n ]);\n\n return response()->json('Se generó un evento de visita en el calendario y se informo al paisajista!');\n }\n\n\n if ($data['type_compromise_id'] === TypeCompromise::INFO_SEND) {\n\n $cg->Documents()->create($data['documents']);\n\n Calendar::query()->create([\n 'cglobal_id' => $cg->id,\n 'user_id' => $data['user_id'],\n 'for_user_id' => 0,\n 'start' => Carbon::parse($data['documents']['moment'] . ' 8:00'),\n 'end' => Carbon::parse($data['documents']['moment'] . ' 18:00'),\n 'allDay' => 1,\n 'contentFull' => ' DOMICILIO: ' . $client->street . ' '. $client->home_number . ' '. $client->colony,\n 'title' => 'Información a: ' .$client->name ,\n 'class' => 'info'\n ]);\n\n return response()->json('Se generó un evento de envio de información a cliente!');\n }\n\n if ($data['type_compromise_id'] === TypeCompromise::SALE_NOTE) {\n\n $sale = SalesNote::create([\n 'global_id' => $cg->id,\n 'moment' => Carbon::now(),\n 'emit' => Carbon::now(),\n 'advance' => 0,\n 'origin' => SalesNote::ORIGIN_CAG,\n 'status_id' => 3,\n ]);\n\n return response()->json(['id'=>$sale->id]);\n }\n\n if ($data['type_compromise_id'] === TypeCompromise::QUOTE_DISTANCE) {\n $quote = Quote::query()->create([\n 'cglobal_id' => $cg->id,\n 'type_quote_id' => 2,\n 'token' => mt_rand(0,99999),\n 'moment' => Carbon::now(),\n 'emit' => Carbon::now(),\n 'status_id' => 2,\n ]);\n return response()->json(['id'=>$quote->id]);\n }\n\n\n }","title":""},{"docid":"835dc50bea0c30632bcfc83e866ef57d","score":"0.5684494","text":"public function store($sec, Request $request)\n {\n $compromiso = new Compromiso;\n $compromiso->id_lider = $request->input('id_lider');\n $compromiso->nombre = $request->input('nombre');\n $compromiso->descripcion = $request->input('descripcion');\n $compromiso->cumplimiento = $request->input('cumplimiento');\n $compromiso->costo = $request->input('costo');\n\n $compromiso->save();\n\n return redirect('/Administracion/'.$sec.'/Compromisos')->with('success', 'Compromiso creado');\n }","title":""},{"docid":"3fad5779d0172a9db04b02dd692ec17f","score":"0.56778353","text":"public function store(Request $request)\n {\n $request->validate([\n 'empresa_id' => 'required|unique:cau',\n ]);\n\n $date_inicio = $request->get('data_inicio');\n $date_fim = $request->get('data_fim');\n $date_doc = $request->get('data_doc');\n\n $cau = new cau();\n $cau->empresa_id = $request->get('empresa_id');\n $cau->agente_integracao = $request->get('agente_integracao');\n $cau->data_inicio = Carbon::createFromFormat('d/m/Y', $date_inicio)->format('Y-m-d');\n $cau->data_fim = Carbon::createFromFormat('d/m/Y', $date_fim)->format('Y-m-d');\n $cau->data_doc = Carbon::createFromFormat('d/m/Y', $date_doc)->format('Y-m-d');\n $cau->obs = $request->get('obs');\n // dd($cau);\n $cau->save();\n\n $request->session()->flash('success', 'Cadastrado com sucesso!');\n return redirect('cau_convenio');\n\n // return redirect()->route('cau_convenio.index')\n // ->with('success', 'Cadastrado com sucesso.');\n }","title":""},{"docid":"1663439e4f253318f25f9b67c61398c4","score":"0.5677689","text":"public function store(Request $request)\n {\n $calle = new Calle();\n\n $calle->idbarrio = $request->input('idbarrio');\n $calle->namecalle = $request->input('nombrecalle');\n $calle->fechaingreso = date('Y-m-d');\n\n $calle->save();\n\n return response()->json(['success' => true]);\n\n }","title":""},{"docid":"fcc5e8ae84a36562961c55c0bed76ffb","score":"0.56738746","text":"public function store(StoreCelsRequest $request)\n {\n $request = $this->saveFiles($request);\n $cel = Cel::create($request->all());\n return redirect()->route('cels.index');\n\n }","title":""},{"docid":"6a240fa78c11959127c6d30997a11cd9","score":"0.56656355","text":"public function store(CocheCreateRequest $request)\n {\n $coche = new Coche($request->all());\n $coche->iduser = auth()->user()->id;\n $archivo = null;\n \n if($request->hasFile('foto')){\n if($request->file('foto')->isValid()) {\n $archivo = $request->file('foto');\n $path = $archivo->getRealPath();\n $imagen = $this->reduceImage($path);\n $coche->foto = base64_encode($imagen); \n } \n }\n try {\n $result = $coche->save();\n if($archivo != null){\n $fecha = new \\DateTime();\n $nombre = $fecha->getTimestamp() . '.' . $archivo->extension(); //nombre con el que se guarda el archivo en el storage\n $archivo->storeAs('public/images/'. $coche->iduser . '/' . $coche->id, $nombre);\n }\n } catch(\\Exception $e) {\n return redirect('coche/index')->withInput()->withErrors(['error' => 'Se ha producido un error al guardar los datos del vehiculo.']);\n }\n return redirect('coche/index')->with(['store' => 'Se ha publicado su vehiculo correctamente']);\n }","title":""},{"docid":"8e02d63513e246652999042acd9f77df","score":"0.5663955","text":"public function store(Request $request)\n {\n \n $solicitud = new AsignarServicio();\n $solicitud->descripcion = $request->descripcion;\n $solicitud->estado = 'E';\n $solicitud->fecha = date('d/m/Y H:i:s');\n $solicitud->fkidcliente = $request->cliente;\n $solicitud->fkidservicio = $request->servicio;\n $solicitud->save();\n DB::table('cliente')\n ->where('idcliente','=',$request->cliente)\n ->update(['fkidzona'=>2 ]);\n \n return redirect()->route('admin.solicitud.index');\n }","title":""},{"docid":"52ab8a635aa1240b4e4d61172fa0d733","score":"0.566306","text":"public function store()\n {\n $inputs = Input::except( '_token', 'characteristic_id');\n $race = Input::except( '_token', 'characteristic_id', 'characteristic_date', 'characteristic_racial_type', 'characteristic_aggressivness_level', 'characteristic_swarming_level', 'characteristic_winter_hardiness_level', 'characteristic_wake_up_month', 'characteristic_comment' );\n\n $race['name'] = [ 'name' => $race[ 'name' ] ]; // dans l'attente de modification ws $race_name\n\n $characteristics = [];\n foreach ( $inputs as $key => $input )\n if( str_contains( $key, 'characteristic_' ) )\n $characteristics[ str_replace( 'characteristic_', '', $key ) ] = $input;\n\n $characteristics['racial_type'] = null;// dans l'attente de modification ws $characteristics_race_name\n\n $characteristics[ 'date' ] = date( 'Y-m-d', strtotime( $characteristics[ 'date' ] ) );\n\n $response_characteristic = BeeTools::entityStore( $characteristics, 'characteristics' );\n $view = BeeTools::isError( $response_characteristic );\n if( $view ) return $view;\n\n $race['characteristic'] = $response_characteristic;\n\n $race = BeeTools::cleanElement( $race );\n $response_race = BeeTools::entityStore( $race, 'races' );\n $view = BeeTools::isError( $response_race );\n if( $view ) return $view;\n\n return Redirect::to( 'races' );\n }","title":""},{"docid":"211cd61b20176ed728a8d66a3a77b1d3","score":"0.56602544","text":"public function store(Request $request)\n {\n $censado = new Registered();\n\n $ultimo = Registered::all()->last();\n if ($ultimo) {\n $numerolegajo = $ultimo->numerolegajo;\n } else {\n $numerolegajo = 10000;\n }\n\n $censado->nombre = $request->nombre;\n $censado->apellido = $request->apellido;\n $censado->dni = $request->dni;\n $censado->fechanacimiento = $request->fechanacimiento;\n $censado->sexo = $request->sexo;\n $censado->estadocivil = $request->estadocivil;\n $censado->ocupacion = $request->ocupacion;\n $censado->localidad_id = $request->localidad_id;\n $censado->situacionresidencial_id = $request->situacionresidencial_id;\n $censado->direccion = $request->direccion;\n $censado->entornofamiliar = $request->entornofamiliar;\n $censado->telefono = $request->telefono;\n $censado->formacionescolar = $request->formacionescolar;\n\n $censado->numerocertificadod = $request->numerocertificadod;\n $censado->fechaemision = $request->fechaemision;\n $censado->fechavencimiento = $request->fechavencimiento;\n $censado->entidadcertificado = $request->entidadcertificado;\n $censado->obrasocial_id = $request->obrasocial_id;\n $censado->observacion = $request->observacion;\n $numerolegajo++;\n $censado->numerolegajo = $numerolegajo;\n $censado->legajo = 'CE' . $numerolegajo;\n\n $censado->save();\n\n //ver attach institucioneucativa\n $censado->schoolings()->attach($request->institucioneducativa_id);\n\n //ver pension\n $censado->pensions()->attach($request->pension);\n\n //ver patologia\n $censado->pathologies()->attach($request->patologia);\n\n //tratamiento\n $censado->treatments()->attach($request->tratamiento);\n\n toastr()->success('Se ha registrado correctamente el censado');\n\n\n return redirect()->route('censado.show', $censado->id);\n }","title":""},{"docid":"624ecbff7de8265f723abbce14147079","score":"0.5658977","text":"public function store(Request $request)\n {\n\n $course= new Course;\n $course->course_name=$request->input('name');\n $course->course_desc=$request->input('description');\n //send the id of auth center to save it's data to DB\n\n $adminId=auth()->guard('institute')->user()->id;\n Institute::find($adminId)->cities()->save($course,['city_id'=> $request->input('address'),\n 'branch_name'=>$request->input('value')\n ]);\n\n Institute::find($adminId)->courses()->save($course,['duration'=>$request->input('duration'),\n 'co_sc_sDate'=>$request->input('start-date'),\n 'trainer'=>$request->input('trainer'),\n 'co_sc_price'=>$request->input('price'),\n ]);\n\n\n return redirect('/centers');\n }","title":""},{"docid":"e15a8d1da33db26e9daadce06e567736","score":"0.56571937","text":"public function store()\n {\n $form = $this->getForm();\n $data = $form->getFieldValues();\n $form->redirectIfNotValid();\n\n $slug = Str::slug($form->getFieldValues()['name']);\n $data = array_merge($data,compact('slug'));\n\n Region::create($data);\n\n return redirect()->route('admin.settings.regions.index')->with('success','Une region a été créée avec succès!');\n }","title":""},{"docid":"0a59c170c3fca3e65cb1895035836d7f","score":"0.5654032","text":"public function store(Request $request)\n {\n $celular = '844552968';\n $valor = 10;\n $reference = '7y7y7y37t3g';\n// $recharge = Recharge::create($request->only(['reference', 'value','code']));\n// $recharge->save();\n $client = new Client ([\n 'apiKey' =>'5rqh0hssv2qtmp9648ys9nt83l0w65o2',\n 'publicKey' => 'MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAmptSWqV7cGUUJJhUBxsMLonux24u+FoTlrb+4Kgc6092JIszmI1QUoMohaDDXSVueXx6IXwYGsjjWY32HGXj1iQhkALXfObJ4DqXn5h6E8y5/xQYNAyd5bpN5Z8r892B6toGzZQVB7qtebH4apDjmvTi5FGZVjVYxalyyQkj4uQbbRQjgCkubSi45Xl4CGtLqZztsKssWz3mcKncgTnq3DHGYYEYiKq0xIj100LGbnvNz20Sgqmw/cH+Bua4GJsWYLEqf/h/yiMgiBbxFxsnwZl0im5vXDlwKPw+QnO2fscDhxZFAwV06bgG0oEoWm9FnjMsfvwm0rUNYFlZ+TOtCEhmhtFp+Tsx9jPCuOd5h2emGdSKD8A6jtwhNa7oQ8RtLEEqwAn44orENa1ibOkxMiiiFpmmJkwgZPOG/zMCjXIrrhDWTDUOZaPx/lEQoInJoE2i43VN/HTGCCw8dKQAwg0jsEXau5ixD0GUothqvuX3B9taoeoFAIvUPEq35YulprMM7ThdKodSHvhnwKG82dCsodRwY428kg2xM/UjiTENog4B6zzZfPhMxFlOSFX4MnrqkAS+8Jamhy1GgoHkEMrsT5+/ofjCx0HjKbT5NuA2V/lmzgJLl3jIERadLzuTYnKGWxVJcGLkWXlEPYLbiaKzbJb2sYxt+Kt5OxQqC1MCAwEAAQ==',\n 'serviceProviderCode' => '171717'\n ]);\n\n if(!empty($celular) || !empty($valor) || !empty($reference)){\n $paymentData = [\n 'from' => '258' . $celular, // input_CustomerMSISDN\n 'reference' => $reference, // input_ThirdPartyReference\n 'transaction' => 'T12344CC', // input_TransactionReference\n 'amount' => $valor // input_Amount\n ];\n\n $result = $client->receive($paymentData);\n\n if ($result->success) {\n dd( \"Pagamento efectuado!\");\n } else {\n dd(\"Falha ao processar pagamento\");\n }\n }else{\n dd(\"Preencha todos os campos do formulário\");\n }\n }","title":""},{"docid":"658ec2c4333b9616c0cd5aed6d39a040","score":"0.56514955","text":"public function store(){\n $json = $this->list();\n $bg = new BienesGenerales();\n\n $bg->id = $_REQUEST['id'];\n\n //? Busco mi elemento con el id y traigo sus datos\n $bien = $this->searchBienGeneral($bg->id, $json);\n\n $bg->direccion = $bien['Direccion'];\n $bg->ciudad = $bien['Ciudad'];\n $bg->telefono = $bien['Telefono'];\n $bg->codigo_postal = $bien['Codigo_Postal'];\n $bg->tipo = $bien['Tipo'];\n\n //* Damos formato al precio \n $precio = $bien['Precio'];\n\n $precio = str_replace(\",\",\".\",$precio);\n $precio = str_replace(\"$\",\"\",$precio);\n\n $bg->precio = $precio;\n\n if($this->model->Unico($bg->id)){\n $this->mensaje=array(\"Advertencia\", \"Ya fue registrado\");\n } else {\n $this->model->Registrar($bg);\n $this->mensaje=array(\"Guardado\", \"Registrado Correctamente\");\n }\n\n $this->index();\n }","title":""},{"docid":"148baafdecd83c676c510f421c0aae98","score":"0.56485337","text":"public function store(SpecificateRequest $request)\n {\n $storage = new Storage();\n $storage->fill([\n 'storage' => $request->storage,\n ]);\n $storage->save();\n return redirect()->route('admin.specificate.storage.index');\n }","title":""},{"docid":"9b6e626abfe939e19874500ca299f7f0","score":"0.5632344","text":"public function store(Request $request)\n {\n $solar_meter = SolarMeter::firstOrCreate([\n 'name' => $request->name,\n 'units' => $request->value_type,\n 'description'=>''\n ]);\n $all_params = $request->all();\n $all_params['meter_id']=$solar_meter->id;\n $all_params['timestamp']=time();\n if (!is_string($all_params['serialized'])){\n $all_params['serialized']=json_encode($all_params['serialized']);\n }\n $res = SolarPower::create($all_params);\n\n return response()->json([\n 'payload' => [$res],\n 'errors' => []\n ]);\n }","title":""},{"docid":"4b9b9d4a7b2e9c101cec72a06bb11c5d","score":"0.56317055","text":"public function storeasptranse(Request $request) {\n //aspirante, datos personales, datos de ubicacion, circunscripcion\n $aspi = new Aspirante();\n $aspi->tipodoc_id = (isset($request->tipodoc_id)) ? $request->tipodoc_id : 0;\n $aspi->numerodocumento = (isset($request->numero_documento)) ? $request->numero_documento : 0;\n $aspi->lugar_expedicion = (isset($request->lugar_expedicion)) ? $request->lugar_expedicion : null;\n $aspi->fecha_expedicion = (isset($request->fecha_expedicion)) ? $request->fecha_expedicion : null;\n $aspi->sexo = (isset($request->sexo)) ? $request->sexo : null;\n $aspi->estatura = (isset($request->estatura)) ? $request->estatura : null;\n $aspi->primer_nombre = (isset($request->primer_nombre)) ? $request->primer_nombre : \"\";\n $aspi->segundo_nombre = (isset($request->segundo_nombre)) ? $request->segundo_nombre : null;\n $aspi->primer_apellido = (isset($request->primer_apellido)) ? $request->primer_apellido : \"\";\n $aspi->segundo_apellido = (isset($request->segundo_apellido)) ? $request->segundo_apellido : null;\n $aspi->libreta_militar = (isset($request->libreta_militar)) ? $request->libreta_militar : null;\n $aspi->claselibretamilitar = (isset($request->clase_libreta_militar)) ? $request->clase_libreta_militar : null;\n $aspi->distrito_militar = (isset($request->distrito_militar)) ? $request->distrito_militar : null;\n $aspi->tiposanguineo = (isset($request->tipo_sanguineo)) ? $request->tipo_sanguineo : null;\n if (isset($request->eps)) {\n if ($request->eps == \"OTRA\") {\n $aspi->eps = $request->aspi_eps;\n } else {\n $aspi->entidadsalud_id = $request->eps;\n }\n }\n $aspi->estadocivil_id = (isset($request->estado_civil)) ? $request->estado_civil : null;\n $aspi->pais_nacimiento = (isset($request->pais_id)) ? $request->pais_id : null;\n $aspi->dpto_nacimiento = (isset($request->dpto_id)) ? $request->dpto_id : null;\n $aspi->ciudad_nacimiento = (isset($request->ciudad_id)) ? $request->ciudad_id : null;\n $aspi->fecha_nacimiento = (isset($request->fecha_nacimiento)) ? $request->fecha_nacimiento : null;\n $aspi->numerovisa = (isset($request->numero_visa)) ? $request->numero_visa : null;\n $aspi->estadovisa = (isset($request->estado_visa)) ? $request->estado_visa : null;\n $aspi->fechavencevisa = (isset($request->fechavence_visa)) ? $request->fechavence_visa : null;\n $aspi->mediodivulgacion_id = (isset($request->mediodivulgacion_id)) ? $request->mediodivulgacion_id : null;\n $aspi->nivelacademico = (isset($request->nivelacademico)) ? $request->nivelacademico : null;\n $aspi->nivel_educativo_id = (isset($request->nivel_educativo_id)) ? $request->nivel_educativo_id : null;\n $aspi->circunscripcion_id = (isset($request->circunscripcion_id)) ? $request->circunscripcion_id : null;\n $aspi->pais_residencia = (isset($request->pais2_id)) ? $request->pais2_id : null;\n $aspi->dpto_residencia = (isset($request->dpto2_id)) ? $request->dpto2_id : null;\n $aspi->ciudad_residencia = (isset($request->ciudad2_id)) ? $request->ciudad2_id : null;\n $aspi->sectorciudad_id = (isset($request->sectorciudad_id)) ? $request->sectorciudad_id : null;\n $aspi->direccion_residencia = (isset($request->direccion_aspirante)) ? $request->direccion_aspirante : null;\n $aspi->barrio_residencia = (isset($request->barrio_aspirante)) ? $request->barrio_aspirante : null;\n $aspi->barrio_id = (isset($request->barrio_id)) ? $request->barrio_id : null;\n $aspi->vereda_residencia = (isset($request->vereda_aspirante)) ? $request->vereda_aspirante : null;\n $aspi->etnia = (isset($request->etnia_aspirante)) ? $request->etnia_aspirante : null;\n $aspi->telefono_residencia = (isset($request->telefono_contacto)) ? $request->telefono_contacto : null;\n $aspi->telefonocelular = (isset($request->telefono_celular)) ? $request->telefono_celular : null;\n $aspi->email = (isset($request->correo)) ? $request->correo : null;\n $aspi->dpto_residenciasec = (isset($request->dpto3_id)) ? $request->dpto3_id : null;\n $aspi->ciudad_residenciasec = (isset($request->ciudad3_id)) ? $request->ciudad3_id : null;\n $aspi->direccion_residenciasec = (isset($request->direccion_ec)) ? $request->direccion_ec : null;\n $aspi->direccion_estudio = (isset($request->direccion_ciudade)) ? $request->direccion_ciudade : null;\n $aspi->telefonoestudio = (isset($request->telefono_ciudade)) ? $request->telefono_ciudade : null;\n $response = null;\n if (count($aspi) > 0) {\n if ($aspi->save()) {\n $response = $response . \"

    Se guardó la información básica del aspirante

    \";\n //formulario, pin\n $foin = new Formularioinscripcion();\n $foin->medioinscripcion = \"ON LINE\";\n $foin->simultaneidad = \"NINGUNO\";\n $foin->aspirante_id = $aspi->id;\n $foin->estadoadmision = \"ASPIRANTE\";\n $foin->tipoinscripcion_id = 4;\n $pin = Pin::where('pin', $request->pin)->first();\n if (count($pin) > 0) {\n if ($pin->estado == \"USADO\") {\n $foin->pin_id = $pin->id;\n } else {\n //no puede seguir la inscripcion\n flash(\"El PIN que ingresó no ha sido vendido en el banco. Si usted compro el PIN, por favor Acérquese a la oficina de registro y control para validar su PIN.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n } else {\n //no puede seguir la inscripcion\n flash(\"El PIN que ingresó es inválido. No puede continuar.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n if (count($foin) > 0) {\n if ($foin->save()) {\n $response = $response . \"

    Se ha creado el formulario de inscripción del aspirante

    \";\n//estudios secundarios\n $esse = new Estudiossecundario();\n $esse->pais = (isset($request->paisn_id)) ? $request->paisn_id : null;\n $esse->ciudad = (isset($request->ciudadn_id)) ? $request->ciudadn_id : null;\n $esse->codigo_snp = (isset($request->iem_id)) ? $request->iem_id : null;\n $esse->enfasis_mod_sec = (isset($request->enfasis)) ? $request->enfasis : null;\n $esse->fechaterminacion = (isset($request->ft)) ? $request->ft : null;\n $esse->formaobtuvotitulo = (isset($request->forma_obt_titulo)) ? $request->forma_obt_titulo : null;\n $esse->valormatricula10 = (isset($request->vmd)) ? $request->vmd : null;\n $esse->valorpension10 = (isset($request->vpd)) ? $request->vpd : null;\n $esse->valorpension11 = (isset($request->vpu)) ? $request->vpu : null;\n $esse->valormatricula11 = (isset($request->vmu)) ? $request->vmu : null;\n $esse->libro = (isset($request->libro)) ? $request->libro : null;\n $esse->folio = (isset($request->folio)) ? $request->folio : null;\n $esse->snp = (isset($request->snp_aspirante)) ? $request->snp_aspirante : null;\n $esse->puntajeobtenido = (isset($request->poes)) ? $request->poes : null;\n $esse->ciudadpresentoprueba = (isset($request->ciudad5_id)) ? $request->ciudad5_id : null;\n $esse->fechapresentopruebas = (isset($request->fpes)) ? $request->fpes : null;\n if ($esse->fechapresentopruebas !== null) {\n $time = strtotime($esse->fechapresentopruebas);\n $newformat = date('Y-m-d', $time);\n $fff = explode(\"-\", $newformat);\n $aniop = $fff[0];\n $mesp = $fff[1];\n if ($aniop < 2014) {\n $esse->tipoprueba = \"ANTIGUA\";\n }\n if ($aniop == 2014 && $mesp < 6) {\n $esse->tipoprueba = \"ANTIGUA\";\n }\n if ($aniop == 2014 && $mesp > 6) {\n $esse->tipoprueba = \"NUEVA\";\n }\n if ($aniop > 2014) {\n $esse->tipoprueba = \"NUEVA\";\n }\n }\n $esse->tipodocicfes = (isset($request->tipodoc_prueba)) ? $request->tipodoc_prueba : null;\n $esse->documentoicfes = (isset($request->dipi)) ? $request->dipi : null;\n $esse->aspirante_id = $aspi->id;\n if (count($esse) > 0) {\n if ($esse->save()) {\n $response = $response . \"

    Se guardó la información de estudios secundarios

    \";\n }\n }\n $tb1 = $tb2 = $tb3 = $tb4 = $tb5 = $tb6 = $tb7 = $tb8 = $tb9 = $tb10 = $tb11 = $tb12 = $tb13 = $tb14 = $tb15 = $tb16 = null;\n //tb1 lista inst en las que estudió institucionsecundaria\n if (isset($request->tb1)) {\n foreach ($request->tb1 as $value) {\n $is = new Institucionsecundaria();\n $v = explode(\";\", $value);\n $is->institucionestudio = (strlen($v[0]) > 0) ? $v[0] : null;\n $is->fechainicial = (strlen($v[1]) > 0) ? $v[1] : date('Y-m-d', strtotime('00-00-0000'));\n $is->fechafin = (strlen($v[2]) > 0) ? $v[2] : date('Y-m-d', strtotime('00-00-0000'));\n $is->aspirante_id = $aspi->id;\n $tb1[] = $is;\n }\n }\n if (count($tb1) > 0) {\n foreach ($tb1 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de instituciones donde estudió.

    \";\n }\n //tb6 familiares\n if (isset($request->tb6)) {\n foreach ($request->tb6 as $value) {\n $g = new Grupofamiliar();\n $v = explode(\";\", $value);\n $g->sitiotrabajoestudio = $v[0];\n $g->ciudad = $v[1];\n $g->parentesco_id = (count($v[4]) > 0) ? $v[4] : 0;\n $g->cedula = $v[5];\n $g->nombrecompleto = $v[6];\n $g->vive = $v[7];\n $g->ocupacion = $v[8];\n $g->profesion = $v[9];\n $g->edad = $v[10];\n $g->niveleducativo = $v[11];\n $g->ingresomensual = $v[12];\n $g->ingresomensual_rango = $v[13];\n $g->lee = $v[14];\n $g->ciudadresidencia = $v[16];\n $g->direccion = $v[17];\n $g->telefonoresidencia = $v[18];\n $g->ciudadresidencia = $v[19];\n $g->direccionempresa = $v[20];\n $g->celular = $v[21];\n $g->aspirante_id = $aspi->id;\n $tb6[] = $g;\n }\n }\n if (count($tb6) > 0) {\n foreach ($tb6 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de familiares.

    \";\n }\n //informacion socioeconomica\n $ise = new Informacionsocioeconomica();\n $ise->situacionpadres = (isset($request->sdlp)) ? $request->sdlp : null;\n $ise->numerofamiliares = (isset($request->nmf)) ? $request->nmf : null;\n $ise->numeromiembrostrabaja = (isset($request->pqt)) ? $request->pqt : null;\n $ise->numerohermanos = (isset($request->nhise)) ? $request->nhise : null;\n $ise->posicionhermanos = (isset($request->pelh)) ? $request->pelh : null;\n $ise->ingresomensualfamilia = (isset($request->imaf)) ? $request->imaf : null;\n $ise->egresomensualfamilia = (isset($request->emaf)) ? $request->emaf : null;\n $ise->hermanosestudiandou = (isset($request->nheu)) ? $request->nheu : null;\n $ise->viveconfamilia = (isset($request->vcsf)) ? $request->vcsf : null;\n $ise->numhermanosestudiaunivers = (isset($request->nhceu)) ? $request->nhceu : null;\n $ise->quiencosteaestudios = (isset($request->cdse)) ? $request->cdse : null;\n $ise->conquienreside = (isset($request->edr)) ? $request->edr : null;\n $ise->estrato = (isset($request->eise)) ? $request->eise : null;\n $ise->situacioneconomica = (isset($request->se)) ? $request->se : null;\n $ise->sufragoelecciones = (isset($request->selue)) ? $request->selue : null;\n $ise->rentagravable = (isset($request->rg)) ? $request->rg : null;\n $ise->patrimoniogravable = (isset($request->pg)) ? $request->pg : null;\n $ise->ingresoretenciones = (isset($request->iyr)) ? $request->iyr : null;\n $ise->sisben = (isset($request->tsise)) ? $request->tsise : null;\n $ise->nivelsisben = (isset($request->nivelsisben)) ? $request->nivelsisben : null;\n $ise->cajacompensacion = (isset($request->ccf)) ? $request->ccf : null;\n $ise->ingresosnogravables = (isset($request->ing)) ? $request->ing : null;\n $ise->patrimoniobruto = (isset($request->pb)) ? $request->pb : null;\n $ise->ingresobruto = (isset($request->ib)) ? $request->ib : null;\n $ise->rentanogravable = (isset($request->rng)) ? $request->rng : null;\n $ise->ingresosgravables = (isset($request->ig)) ? $request->ig : null;\n $ise->aspirante_id = $aspi->id;\n if (count($ise) > 0) {\n if ($ise->save()) {\n $response = $response . \"

    Se guardó la información socioeconómica.

    \";\n }\n }\n //tb13 idiomas\n if (isset($request->tb13)) {\n foreach ($request->tb13 as $value) {\n $ep = new Idiomaaspirante();\n $v = explode(\";\", $value);\n $ep->idioma_id = $v[0];\n $ep->oir = $v[1];\n $ep->habla = $v[2];\n $ep->lee = $v[3];\n $ep->escribe = $v[4];\n $ep->aspirante_id = $aspi->id;\n $tb13[] = $ep;\n }\n }\n if (count($tb13) > 0) {\n foreach ($tb13 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de idiomas.

    \";\n }\n //tb14 pasatiempos\n if (isset($request->tb14)) {\n foreach ($request->tb14 as $value) {\n $ep = new Pasatiempoaspirante();\n $v = explode(\";\", $value);\n $ep->pasatiempo_id = $v[0];\n $ep->aspirante_id = $aspi->id;\n $tb14[] = $ep;\n }\n }\n if (count($tb14) > 0) {\n foreach ($tb14 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de pasatiempos.

    \";\n }\n flash($response)->success();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n } else {\n $foin->delete();\n $aspi->delete();\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n } else {\n $aspi->delete();\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n } else {\n $aspi->delete();\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n } else {\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\n }\n }","title":""},{"docid":"fc8939e1262c8edc26db048ca14d7f52","score":"0.56270176","text":"public function store(Request $request)\n {\n$dados = $request->all();\nCozinha::create($dados);\nreturn redirect()->route('cozinhas.index');\n\n\n}","title":""},{"docid":"af38732a19ec96d86008a0b93e637600","score":"0.562443","text":"public function store(StoreCEO $request)\n {\n $validated = $request->validated();\n CEO::create($validated);\n return redirect(route('ceo.index'));\n }","title":""},{"docid":"7c2beab841180f9cf83e579358004da1","score":"0.56147045","text":"public function store(Request $request) \n {\n //dd($request->all());\n\n $Strain = Strain::create([\n 'strainName' => $request['strainName'],\n 'systemID' => app('system')->id, // from appServiceprovider\n 'testingStatus' => $request['testingStatus'],\n 'floweringTimeInDays' => $request['floweringTimeInDays'],\n 'genetics' => $request['genetics'],\n 'operatorUserName' => Auth::user()->username,\n 'created_at' => Carbon::now()->toDateTimeString(),\n 'updated_at' => Carbon::now()->toDateTimeString(),\n ]);\n\n return redirect('strains');\n }","title":""},{"docid":"c47171eac1ae6b9ee15e46019f7a6ca8","score":"0.56116235","text":"public function store() {\n\n\t\t$input = Input::all();\n\t\t//echo json_encode($input);\n\t\t//exit;\n\t\t$clienteInstance = new Cliente();\n\t\t$clienteInstance -> numcte = $input['numcte'];\n\t\t$clienteInstance -> nomcte = $input['nomcte'];\n\t\t$clienteInstance -> rfccte = $input['rfccte'];\n\t\t$clienteInstance -> dircte = $input['dircte'];\n\t\t$clienteInstance -> nlecte = $input['nlecte'];\n\t\t$clienteInstance -> nlicte = $input['nlicte'];\n\t\t$clienteInstance -> colcte = $input['colcte'];\n\t\t$clienteInstance -> pobcte = $input['pobcte'];\n\t\t$clienteInstance -> estado = $input['estado'];\n\t\t$clienteInstance -> pais = $input['pais'];\n\t\t$clienteInstance -> telcte = $input['telcte'];\n\t\t$clienteInstance -> mailcte = $input['mailcte'];\n\t\t$clienteInstance -> usuarioInsert_id = 1;\n\t\t$clienteInstance -> save();\n\t\treturn Redirect::action('ClienteController@show', array($clienteInstance -> id));\n\n\t}","title":""},{"docid":"6574a9afe7e3a2f8d723e14ecb0b9a86","score":"0.5601652","text":"public function store(CreateSerieRequest $request)\n {\n $serie = Serie::create($request->all());\n\n return redirect()->route('series.index');\n }","title":""},{"docid":"2b35844fbca373a04f079101c5079168","score":"0.5601288","text":"public function store(Request $request){\n //'Precio_venta', 'Stock', 'Descripcion', 'Condicion'];\n $articulo = new Articulo;\n $articulo->categoria = $request->categoria;\n $articulo->codigo = $request->codigo;\n $articulo->nombre = $request->nombre;\n $articulo->precio_venta = $request->precio_venta;\n $articulo->stock = $request->stock;\n $articulo->descripcion = $request->descripcion;\n $articulo->condicion = 1;\n\n $articulo->save();\n return response()->json(['Message'=>'Articulo creado correctamente',$articulo],200);\n\n }","title":""},{"docid":"5df192879a5669cd948bb2164f615b29","score":"0.55990016","text":"public function store(Request $request) {\n //aspirante, datos personales, datos de ubicacion, circunscripcion\n $aspi = new Aspirante();\n $aspi->tipodoc_id = (isset($request->tipodoc_id)) ? $request->tipodoc_id : 0;\n $aspi->numerodocumento = (isset($request->numero_documento)) ? $request->numero_documento : 0;\n $aspi->lugar_expedicion = (isset($request->lugar_expedicion)) ? $request->lugar_expedicion : null;\n $aspi->fecha_expedicion = (isset($request->fecha_expedicion)) ? $request->fecha_expedicion : null;\n $aspi->sexo = (isset($request->sexo)) ? $request->sexo : null;\n $aspi->estatura = (isset($request->estatura)) ? $request->estatura : null;\n $aspi->primer_nombre = (isset($request->primer_nombre)) ? $request->primer_nombre : \"\";\n $aspi->segundo_nombre = (isset($request->segundo_nombre)) ? $request->segundo_nombre : null;\n $aspi->primer_apellido = (isset($request->primer_apellido)) ? $request->primer_apellido : \"\";\n $aspi->segundo_apellido = (isset($request->segundo_apellido)) ? $request->segundo_apellido : null;\n $aspi->libreta_militar = (isset($request->libreta_militar)) ? $request->libreta_militar : null;\n $aspi->claselibretamilitar = (isset($request->clase_libreta_militar)) ? $request->clase_libreta_militar : null;\n $aspi->distrito_militar = (isset($request->distrito_militar)) ? $request->distrito_militar : null;\n $aspi->tiposanguineo = (isset($request->tipo_sanguineo)) ? $request->tipo_sanguineo : null;\n if (isset($request->eps)) {\n if ($request->eps == \"OTRA\") {\n $aspi->eps = $request->aspi_eps;\n } else {\n $aspi->entidadsalud_id = $request->eps;\n }\n }\n $aspi->estadocivil_id = (isset($request->estado_civil)) ? $request->estado_civil : null;\n $aspi->pais_nacimiento = (isset($request->pais_id)) ? $request->pais_id : null;\n $aspi->dpto_nacimiento = (isset($request->dpto_id)) ? $request->dpto_id : null;\n $aspi->ciudad_nacimiento = (isset($request->ciudad_id)) ? $request->ciudad_id : null;\n $aspi->fecha_nacimiento = (isset($request->fecha_nacimiento)) ? $request->fecha_nacimiento : null;\n $aspi->numerovisa = (isset($request->numero_visa)) ? $request->numero_visa : null;\n $aspi->estadovisa = (isset($request->estado_visa)) ? $request->estado_visa : null;\n $aspi->fechavencevisa = (isset($request->fechavence_visa)) ? $request->fechavence_visa : null;\n $aspi->mediodivulgacion_id = (isset($request->mediodivulgacion_id)) ? $request->mediodivulgacion_id : null;\n $aspi->nivelacademico = (isset($request->nivelacademico)) ? $request->nivelacademico : null;\n $aspi->nivel_educativo_id = (isset($request->nivel_educativo_id)) ? $request->nivel_educativo_id : null;\n $aspi->circunscripcion_id = (isset($request->circunscripcion_id)) ? $request->circunscripcion_id : null;\n $aspi->pais_residencia = (isset($request->pais2_id)) ? $request->pais2_id : null;\n $aspi->dpto_residencia = (isset($request->dpto2_id)) ? $request->dpto2_id : null;\n $aspi->ciudad_residencia = (isset($request->ciudad2_id)) ? $request->ciudad2_id : null;\n $aspi->sectorciudad_id = (isset($request->sectorciudad_id)) ? $request->sectorciudad_id : null;\n $aspi->direccion_residencia = (isset($request->direccion_aspirante)) ? $request->direccion_aspirante : null;\n $aspi->barrio_residencia = (isset($request->barrio_aspirante)) ? $request->barrio_aspirante : null;\n $aspi->barrio_id = (isset($request->barrio_id)) ? $request->barrio_id : null;\n $aspi->vereda_residencia = (isset($request->vereda_aspirante)) ? $request->vereda_aspirante : null;\n $aspi->etnia = (isset($request->etnia_aspirante)) ? $request->etnia_aspirante : null;\n $aspi->telefono_residencia = (isset($request->telefono_contacto)) ? $request->telefono_contacto : null;\n $aspi->telefonocelular = (isset($request->telefono_celular)) ? $request->telefono_celular : null;\n $aspi->email = (isset($request->correo)) ? $request->correo : null;\n $aspi->dpto_residenciasec = (isset($request->dpto3_id)) ? $request->dpto3_id : null;\n $aspi->ciudad_residenciasec = (isset($request->ciudad3_id)) ? $request->ciudad3_id : null;\n $aspi->direccion_residenciasec = (isset($request->direccion_ec)) ? $request->direccion_ec : null;\n $aspi->direccion_estudio = (isset($request->direccion_ciudade)) ? $request->direccion_ciudade : null;\n $aspi->telefonoestudio = (isset($request->telefono_ciudade)) ? $request->telefono_ciudade : null;\n $response = null;\n if (count($aspi) > 0) {\n if ($aspi->save()) {\n $response = $response . \"

    Se guardó la información básica del aspirante

    \";\n //formulario, pin\n $foin = new Formularioinscripcion();\n $foin->medioinscripcion = \"ON LINE\";\n $foin->simultaneidad = \"NINGUNO\";\n $foin->aspirante_id = $aspi->id;\n $foin->estadoadmision = \"ASPIRANTE\";\n $foin->servicioperiodo_id = $request->serp;\n $pr = Programaunidad::find($request->programaunidad_id);\n $codigo = substr($pr->programa_id, strlen($pr->programa_id) - 2, 2) . substr(date('Y'), strlen(date('Y')) - 2, 2) . substr($request->numero_documento, strlen($request->numero_documento) - 3, 3);\n $foin->codigo = $codigo;\n $sp = Servicioperiodo::find($request->serp);\n if (count($sp) > 0) {\n $foin->tipoinscripcion_id = $sp->servicioinscripcion->tipoinscripcion_id;\n } else {\n $foin->tipoinscripcion_id = 1;\n }\n $pin = Pin::where('pin', $request->pin)->first();\n if (count($pin) > 0) {\n if ($pin->estado == \"USADO\") {\n $foin->pin_id = $pin->id;\n } else {\n //no puede seguir la inscripcion\n flash(\"El PIN que ingresó no ha sido vendido en el banco. Si usted compro el PIN, por favor Acérquese a la oficina de registro y control para validar su PIN.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n //no puede seguir la inscripcion\n flash(\"El PIN que ingresó es inválido. No puede continuar.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n if (count($foin) > 0) {\n if ($foin->save()) {\n $response = $response . \"

    Se ha creado el formulario de inscripción del aspirante

    \";\n //programaXformulario\n $pxf = new Programaxformulario();\n $pxf->prioridad = 1;\n $pxf->puntajeobtenido = 0;\n $pxf->puesto = 0;\n $pxf->formularioinscripcion_id = $foin->id;\n $pxf->programaunidad_id = $request->programaunidad_id;\n $conv = Convocatoria::where([['programaunidad_id', $request->programaunidad_id], ['periodoacademico_id', $sp->periodoacademico_id]])->first();\n if (count($conv) > 0) {\n $pxf->convocatoria_id = $conv->id;\n }\n if (count($pxf) > 0) {\n if ($pxf->save()) {\n $response = $response . \"

    El programa que ha seleccionado ha sido asociado al aspirante

    \";\n //estudios secundarios\n $esse = new Estudiossecundario();\n $esse->pais = (isset($request->paisn_id)) ? $request->paisn_id : null;\n $esse->ciudad = (isset($request->ciudadn_id)) ? $request->ciudadn_id : null;\n $esse->codigo_snp = (isset($request->iem_id)) ? $request->iem_id : null;\n $esse->enfasis_mod_sec = (isset($request->enfasis)) ? $request->enfasis : null;\n $esse->fechaterminacion = (isset($request->ft)) ? $request->ft : null;\n $esse->formaobtuvotitulo = (isset($request->forma_obt_titulo)) ? $request->forma_obt_titulo : null;\n $esse->valormatricula10 = (isset($request->vmd)) ? $request->vmd : null;\n $esse->valorpension10 = (isset($request->vpd)) ? $request->vpd : null;\n $esse->valorpension11 = (isset($request->vpu)) ? $request->vpu : null;\n $esse->valormatricula11 = (isset($request->vmu)) ? $request->vmu : null;\n $esse->libro = (isset($request->libro)) ? $request->libro : null;\n $esse->folio = (isset($request->folio)) ? $request->folio : null;\n $esse->snp = (isset($request->snp_aspirante)) ? $request->snp_aspirante : null;\n $esse->puntajeobtenido = (isset($request->poes)) ? $request->poes : null;\n $esse->ciudadpresentoprueba = (isset($request->ciudad5_id)) ? $request->ciudad5_id : null;\n $esse->fechapresentopruebas = (isset($request->fpes)) ? $request->fpes : null;\n if ($esse->fechapresentopruebas !== null) {\n $time = strtotime($esse->fechapresentopruebas);\n $newformat = date('Y-m-d', $time);\n $fff = explode(\"-\", $newformat);\n $aniop = $fff[0];\n $mesp = $fff[1];\n if ($aniop < 2014) {\n $esse->tipoprueba = \"ANTIGUA\";\n }\n if ($aniop == 2014 && $mesp < 6) {\n $esse->tipoprueba = \"ANTIGUA\";\n }\n if ($aniop == 2014 && $mesp > 6) {\n $esse->tipoprueba = \"NUEVA\";\n }\n if ($aniop > 2014) {\n $esse->tipoprueba = \"NUEVA\";\n }\n }\n $esse->tipodocicfes = (isset($request->tipodoc_prueba)) ? $request->tipodoc_prueba : null;\n $esse->documentoicfes = (isset($request->dipi)) ? $request->dipi : null;\n $esse->aspirante_id = $aspi->id;\n if (count($esse) > 0) {\n if ($esse->save()) {\n $response = $response . \"

    Se guardó la información de estudios secundarios

    \";\n }\n }\n $tb1 = $tb2 = $tb3 = $tb4 = $tb5 = $tb6 = $tb7 = $tb8 = $tb9 = $tb10 = $tb11 = $tb12 = $tb13 = $tb14 = $tb15 = $tb16 = null;\n //tb1 lista inst en las que estudió institucionsecundaria\n if (isset($request->tb1)) {\n foreach ($request->tb1 as $value) {\n $is = new Institucionsecundaria();\n $v = explode(\";\", $value);\n $is->institucionestudio = (strlen($v[0]) > 0) ? $v[0] : null;\n $is->fechainicial = (strlen($v[1]) > 0) ? $v[1] : date('Y-m-d', strtotime('00-00-0000'));\n $is->fechafin = (strlen($v[2]) > 0) ? $v[2] : date('Y-m-d', strtotime('00-00-0000'));\n $is->aspirante_id = $aspi->id;\n $tb1[] = $is;\n }\n }\n if (count($tb1) > 0) {\n foreach ($tb1 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de instituciones donde estudió.

    \";\n }\n //tb2 estudios de pregrado\n if (isset($request->tb2)) {\n foreach ($request->tb2 as $value) {\n $eu = new Estudiosuniversitario();\n $v = explode(\";\", $value);\n $eu->codigosnp = $v[0];\n $eu->programa = $v[1];\n $eu->periodoscursados = $v[2];\n $eu->fechaterminacion = $v[3];\n $eu->tarjetaprofesional = $v[4];\n $eu->ciudadrural = $v[5];\n if ($v[6] == \"PRESENTO\") {\n $eu->registroecaes = $v[7];\n $eu->puntajeecaes = $v[8];\n }\n $eu->aspirante_id = $aspi->id;\n $tb2[] = $eu;\n }\n }\n if (count($tb2) > 0) {\n foreach ($tb2 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de pregrado.

    \";\n }\n //tb3 estudios de postgrado\n if (isset($request->tb3)) {\n foreach ($request->tb3 as $value) {\n $ep = new Estudiospostgrado();\n $v = explode(\";\", $value);\n $ep->codigosnp = $v[0];\n $ep->programa = $v[1];\n $ep->fechaterminacion = $v[2];\n $ep->aspirante_id = $aspi->id;\n $tb3[] = $ep;\n }\n }\n if (count($tb3) > 0) {\n foreach ($tb3 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de postgrado.

    \";\n }\n //tb4 cursos realizados\n if (isset($request->tb4)) {\n foreach ($request->tb4 as $value) {\n $cr = new Cursorealizado();\n $v = explode(\";\", $value);\n $cr->titulo = $v[0];\n $cr->institucion = $v[1];\n $cr->fechaterminacion = $v[2];\n $cr->aspirante_id = $aspi->id;\n $tb4[] = $cr;\n }\n }\n if (count($tb4) > 0) {\n foreach ($tb4 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de cursos realizados.

    \";\n }\n //tb5 publicaciones\n if (isset($request->tb5)) {\n foreach ($request->tb5 as $value) {\n $p = new Publicacion();\n $v = explode(\";\", $value);\n $p->nombre = $v[0];\n $p->tipoobra = $v[1];\n $p->anio = $v[2];\n $p->entidadauspiciadora = $v[3];\n $p->aspirante_id = $aspi->id;\n $tb5[] = $p;\n }\n }\n if (count($tb5) > 0) {\n foreach ($tb5 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de publicaciones.

    \";\n }\n //tb6 familiares\n if (isset($request->tb6)) {\n foreach ($request->tb6 as $value) {\n $g = new Grupofamiliar();\n $v = explode(\";\", $value);\n $g->sitiotrabajoestudio = $v[0];\n $g->ciudad = $v[1];\n $g->parentesco_id = (count($v[4]) > 0) ? $v[4] : 0;\n $g->cedula = $v[5];\n $g->nombrecompleto = $v[6];\n $g->vive = $v[7];\n $g->ocupacion = $v[8];\n $g->profesion = $v[9];\n $g->edad = $v[10];\n $g->niveleducativo = $v[11];\n $g->ingresomensual = $v[12];\n $g->ingresomensual_rango = $v[13];\n $g->lee = $v[14];\n $g->ciudadresidencia = $v[16];\n $g->direccion = $v[17];\n $g->telefonoresidencia = $v[18];\n $g->ciudadresidencia = $v[19];\n $g->direccionempresa = $v[20];\n $g->celular = $v[21];\n $g->aspirante_id = $aspi->id;\n $tb6[] = $g;\n }\n }\n if (count($tb6) > 0) {\n foreach ($tb6 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de familiares.

    \";\n }\n //informacion socioeconomica\n $ise = new Informacionsocioeconomica();\n $ise->situacionpadres = (isset($request->sdlp)) ? $request->sdlp : null;\n $ise->numerofamiliares = (isset($request->nmf)) ? $request->nmf : null;\n $ise->numeromiembrostrabaja = (isset($request->pqt)) ? $request->pqt : null;\n $ise->numerohermanos = (isset($request->nhise)) ? $request->nhise : null;\n $ise->posicionhermanos = (isset($request->pelh)) ? $request->pelh : null;\n $ise->ingresomensualfamilia = (isset($request->imaf)) ? $request->imaf : null;\n $ise->egresomensualfamilia = (isset($request->emaf)) ? $request->emaf : null;\n $ise->hermanosestudiandou = (isset($request->nheu)) ? $request->nheu : null;\n $ise->viveconfamilia = (isset($request->vcsf)) ? $request->vcsf : null;\n $ise->numhermanosestudiaunivers = (isset($request->nhceu)) ? $request->nhceu : null;\n $ise->quiencosteaestudios = (isset($request->cdse)) ? $request->cdse : null;\n $ise->conquienreside = (isset($request->edr)) ? $request->edr : null;\n $ise->estrato = (isset($request->eise)) ? $request->eise : null;\n $ise->situacioneconomica = (isset($request->se)) ? $request->se : null;\n $ise->sufragoelecciones = (isset($request->selue)) ? $request->selue : null;\n $ise->rentagravable = (isset($request->rg)) ? $request->rg : null;\n $ise->patrimoniogravable = (isset($request->pg)) ? $request->pg : null;\n $ise->ingresoretenciones = (isset($request->iyr)) ? $request->iyr : null;\n $ise->sisben = (isset($request->tsise)) ? $request->tsise : null;\n $ise->nivelsisben = (isset($request->nivelsisben)) ? $request->nivelsisben : null;\n $ise->cajacompensacion = (isset($request->ccf)) ? $request->ccf : null;\n $ise->ingresosnogravables = (isset($request->ing)) ? $request->ing : null;\n $ise->patrimoniobruto = (isset($request->pb)) ? $request->pb : null;\n $ise->ingresobruto = (isset($request->ib)) ? $request->ib : null;\n $ise->rentanogravable = (isset($request->rng)) ? $request->rng : null;\n $ise->ingresosgravables = (isset($request->ig)) ? $request->ig : null;\n $ise->aspirante_id = $aspi->id;\n if (count($ise) > 0) {\n if ($ise->save()) {\n $response = $response . \"

    Se guardó la información socioeconómica.

    \";\n }\n }\n //posesion de residencia\n $pos = new Posesionresidencia();\n if (isset($request->PROPIA)) {\n if ($request->PROPIA == \"PROPIA\") {\n $pos->tipoposesion = \"PROPIA\";\n }\n }\n if (isset($request->pppc)) {\n if ($request->pppc == \"CASA PROPIA\") {\n $pos->tipoposesion = \"CASA PROPIA\";\n $pos->deudavivienda = (isset($request->ddlv)) ? $request->ddlv : null;\n $pos->vrmensualcuota = (isset($request->vmc)) ? $request->vmc : null;\n $pos->dirmueblehipotecado = (isset($request->ddih)) ? $request->ddih : null;\n $pos->numcredito = (isset($request->ndc)) ? $request->ndc : null;\n }\n }\n if (isset($request->aoa)) {\n if ($request->aoa == \"ARRENDADA\") {\n $pos->tipoposesion = \"ARRENDADA\";\n $pos->vrmensualarriendo = (isset($request->vma)) ? $request->vma : null;\n $pos->vrdelanticres = (isset($request->vdac)) ? $request->vdac : null;\n $pos->nombrearrendador = (isset($request->nda)) ? $request->nda : null;\n $pos->ciudadarrendador = (isset($request->cda)) ? $request->cda : null;\n $pos->direccarrendador = (isset($request->dda)) ? $request->dda : null;\n $pos->telarrendador = (isset($request->tda)) ? $request->tda : null;\n }\n }\n if (isset($request->ndla)) {\n if ($request->ndla == \"NINGUNA POSESION\") {\n $pos->tipoposesion = \"NINGUNA POSESION\";\n }\n }\n $pos->aspirante_id = $aspi->id;\n if (count($pos) > 0) {\n if ($pos->save()) {\n $response = $response . \"

    Se guardó la información de residencia.

    \";\n }\n }\n //tb7 jefes de familia\n if (isset($request->tb7)) {\n foreach ($request->tb7 as $value) {\n $jf = new Jefefamilia();\n $v = explode(\";\", $value);\n $jf->nombre = $v[0];\n $jf->empresa = $v[1];\n $jf->cargo = $v[2];\n $jf->tiemposervicio = $v[3];\n $jf->sueldo = $v[4];\n $jf->jefeinmediato = $v[5];\n $jf->areadesempenio = $v[6];\n $jf->teltrabajo = $v[7];\n $jf->numpersonascargo = $v[8];\n $jf->eljefedefamiliaeselpadre = $v[9];\n $jf->ciudad = $v[11];\n $jf->dirempresa = $v[12];\n $jf->parentesco_id = (count($v[13]) > 0) ? $v[13] : 0;\n $jf->celular = $v[14];\n $jf->niveleducativo = $v[15];\n $jf->ocupacionlaboral_id = $v[16];\n $jf->tipodoc_id = $v[17];\n $jf->documentoidentidad = $v[18];\n $jf->aspirante_id = $aspi->id;\n $tb7[] = $jf;\n }\n }\n if (count($tb7) > 0) {\n foreach ($tb7 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de jefes de familia.

    \";\n }\n //tb8 experiencia profesional\n if (isset($request->tb8)) {\n foreach ($request->tb8 as $value) {\n $ep = new Experienciaprofesional();\n $v = explode(\";\", $value);\n $ep->institucion = $v[0];\n $ep->cargo = $v[1];\n $ep->rangosalario_id = $v[2];\n $ep->fechaingreso = $v[3];\n $ep->fecharetiro = $v[4];\n $ep->telefonotrabajo = $v[5];\n $ep->aspirante_id = $aspi->id;\n $tb8[] = $ep;\n }\n }\n if (count($tb8) > 0) {\n foreach ($tb8 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de experiencia profesional.

    \";\n }\n //tb9 experiencia docente\n if (isset($request->tb9)) {\n foreach ($request->tb9 as $value) {\n $ep = new Experienciadocente();\n $v = explode(\";\", $value);\n $ep->institucion = $v[0];\n $ep->nivel = $v[1];\n $ep->area = $v[2];\n $ep->tiemposervicio = $v[3];\n $ep->aspirante_id = $aspi->id;\n $tb9[] = $ep;\n }\n }\n if (count($tb9) > 0) {\n foreach ($tb9 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de experiencia docente.

    \";\n }\n //tb10 experiencia en investigacion\n if (isset($request->tb10)) {\n foreach ($request->tb10 as $value) {\n $ep = new Experienciainvestigacion();\n $v = explode(\";\", $value);\n $ep->institucion = $v[0];\n $ep->proyecto = $v[1];\n $ep->cargo = $v[2];\n $ep->anio = $v[3];\n $ep->aspirante_id = $aspi->id;\n $tb10[] = $ep;\n }\n }\n if (count($tb10) > 0) {\n foreach ($tb10 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de investigación.

    \";\n }\n //tb11 referencias\n if (isset($request->tb11)) {\n foreach ($request->tb11 as $value) {\n $ep = new Referenciaacademica();\n $v = explode(\";\", $value);\n $ep->nombre = $v[0];\n $ep->direccion = $v[1];\n $ep->telefono = $v[2];\n $ep->aspirante_id = $aspi->id;\n $tb11[] = $ep;\n }\n }\n if (count($tb11) > 0) {\n foreach ($tb11 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de referencias.

    \";\n }\n //tb12 Asociaciones Científicas, Sociales y Culturales\n if (isset($request->tb12)) {\n foreach ($request->tb12 as $value) {\n $ep = new Asociacioncientifica();\n $v = explode(\";\", $value);\n $ep->nombre = $v[0];\n $ep->objetosocial = $v[1];\n $ep->fechaingreso = $v[2];\n $ep->aspirante_id = $aspi->id;\n $tb12[] = $ep;\n }\n }\n if (count($tb12) > 0) {\n foreach ($tb12 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información científica.

    \";\n }\n //tb13 idiomas\n if (isset($request->tb13)) {\n foreach ($request->tb13 as $value) {\n $ep = new Idiomaaspirante();\n $v = explode(\";\", $value);\n $ep->idioma_id = $v[0];\n $ep->oir = $v[1];\n $ep->habla = $v[2];\n $ep->lee = $v[3];\n $ep->escribe = $v[4];\n $ep->aspirante_id = $aspi->id;\n $tb13[] = $ep;\n }\n }\n if (count($tb13) > 0) {\n foreach ($tb13 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de idiomas.

    \";\n }\n //tb14 pasatiempos\n if (isset($request->tb14)) {\n foreach ($request->tb14 as $value) {\n $ep = new Pasatiempoaspirante();\n $v = explode(\";\", $value);\n $ep->pasatiempo_id = $v[0];\n $ep->aspirante_id = $aspi->id;\n $tb14[] = $ep;\n }\n }\n if (count($tb14) > 0) {\n foreach ($tb14 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de pasatiempos.

    \";\n }\n //caracterizacion\n $car = new Caracterizacion();\n $car->practicadeporte = (isset($request->pd)) ? $request->pd : null;\n $car->deporte = (isset($request->cd)) ? $request->cd : null;\n $car->frecuenciadeporte = (isset($request->fp)) ? $request->fp : null;\n $car->formadeporte = (isset($request->flp)) ? $request->flp : null;\n $car->porquenodeporte = (isset($request->pnpd)) ? $request->pnpd : null;\n $car->eventopreferido = (isset($request->ecp)) ? $request->ecp : null;\n $car->frecuenciaeventopreferido = (isset($request->fca)) ? $request->fca : null;\n $car->practicaartistica = (isset($request->paa)) ? $request->paa : null;\n $car->actividadartistica = (isset($request->caa)) ? $request->caa : null;\n $car->formaactividadartistica = (isset($request->felp)) ? $request->felp : null;\n $car->ocupatiempolibre = (isset($request->eotl)) ? $request->eotl : null;\n $car->fuma = (isset($request->f)) ? $request->f : null;\n $car->frecuenciafuma = (isset($request->ccpd)) ? $request->ccpd : null;\n $car->bebe = (isset($request->cl)) ? $request->cl : null;\n $car->frecuenciabebe = (isset($request->cqfcl)) ? $request->cqfcl : null;\n $car->sustanciapsicoactivas = (isset($request->cssa)) ? $request->cssa : null;\n $car->frecuenciasustancia = (isset($request->cqfcssa)) ? $request->cqfcssa : null;\n $car->relacionessexuales = (isset($request->htrs)) ? $request->htrs : null;\n $car->edadprimrelacion = (isset($request->epr)) ? $request->epr : null;\n $car->metodoanticonceptivo = (isset($request->ma)) ? $request->ma : null;\n $car->numerohijos = (isset($request->nh)) ? $request->nh : null;\n $car->gradoaceptacion = (isset($request->gasm)) ? $request->gasm : null;\n $car->depresionsinmotivo = (isset($request->sdsm)) ? $request->sdsm : null;\n $car->gradoconcentracion = (isset($request->gcc)) ? $request->gcc : null;\n $car->aspirante_id = $aspi->id;\n if (count($car) > 0) {\n if ($car->save()) {\n $response = $response . \"

    Se guardó la información de caracterización.

    \";\n }\n }\n //tb15 inst donde ha soliscitado admision\n if (isset($request->tb15)) {\n foreach ($request->tb15 as $value) {\n $p = new Instsolicitudadmision();\n $v = explode(\";\", $value);\n $p->codigosnp = $v[0];\n $p->programa = $v[1];\n $p->anio = $v[2];\n $p->aceptado = $v[3];\n $p->aspirante_id = $aspi->id;\n $tb15[] = $p;\n }\n }\n if (count($tb15) > 0) {\n foreach ($tb15 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de instituciones donde solicitó admisión.

    \";\n }\n //tb16 datos de discapacitados\n if (isset($request->tb16)) {\n foreach ($request->tb16 as $value) {\n $p = new Discapacidad();\n $v = explode(\";\", $value);\n $p->tipodiscapacidad_id = (count($v[0]) > 0) ? $v[0] : 1;\n $p->nombre = $v[1];\n $p->fechadiagnostico = $v[2];\n $p->aspirante_id = $aspi->id;\n $tb16[] = $p;\n }\n }\n if (count($tb16) > 0) {\n foreach ($tb16 as $value) {\n $value->save();\n }\n $response = $response . \"

    Se guardó la información de discapacidades.

    \";\n }\n //otros datos\n $inf = new Informacioncomplementaria();\n $inf->tienehijos = (isset($request->tienehijos)) ? $request->tienehijos : null;\n $inf->cuantoshijos = (isset($request->chdi)) ? $request->chdi : null;\n $inf->sisben = (isset($request->sisben)) ? $request->sisben : null;\n $inf->desplazado = (isset($request->desplazado)) ? $request->desplazado : null;\n $inf->laboraactualmente = (isset($request->labora)) ? $request->labora : null;\n $inf->telefonocontactosec = (isset($request->tcs)) ? $request->tcs : null;\n $inf->otrocorreocontacto = (isset($request->cec)) ? $request->cec : null;\n $inf->personastrabajanfam = (isset($request->cptgf)) ? $request->cptgf : null;\n $inf->cuentaequipocomputo = (isset($request->ccec)) ? $request->ccec : null;\n $inf->accesointernet = (isset($request->eaie)) ? $request->eaie : null;\n $inf->aspirante_id = $aspi->id;\n if (count($tb1) > 0) {\n if ($inf->save()) {\n $response = $response . \"

    Se guardó la información complementaria.

    \";\n }\n }\n $pu = Programaunidad::find($request->programaunidad_id);\n $requisitos = null;\n if (count($pu) > 0) {\n $docins = Documentoinscripcion::where([['circunscripcion_id', $request->circunscripcion_id], ['programa_id', $pu->programa_id]])->get();\n if (count($docins) > 0) {\n foreach ($docins as $item) {\n $obj[\"ob\"] = $item->obligatorio;\n $obj[\"item\"] = $item->tipodocanexo->descripcion;\n $requisitos[] = $obj;\n }\n }\n }\n return view('inscripcion_publico.resultado_inscripcion')\n ->with('doc', $aspi->id)\n ->with('requisitos', $requisitos)\n ->with('rta', $response)\n ->with('sp', $request->serp);\n } else {\n $foin->delete();\n $aspi->delete();\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n $foin->delete();\n $aspi->delete();\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n $aspi->delete();\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n $aspi->delete();\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n flash(\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n } else {\n flash(\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\")->error();\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\n }\n }","title":""},{"docid":"b087facea726acecbf1828d70c6214d9","score":"0.55980456","text":"public function store()\n {\n $this->validate();\n\n $producto = Producto::create([\n 'color_id' => $this->color_id,\n 'talla_id' => $this->talla_id,\n 'nombre' => $this->nombre,\n 'precio_venta' => $this->precio_venta,\n 'imagen' => $this->imagen,\n 'stock' => $this->stock\n ]);\n\n $this->resetInput();\n $this->action = 1;\n\n }","title":""},{"docid":"8fbdf93382796d1b0830ebdaaaf32c15","score":"0.559054","text":"public function store(Request $request)\n {\n $estante=new Estante;\n $estante->fill($request->all());\n $estante->save();\n Bitacora::bitacora('store','estantes','estantes',$estante->id);\n return redirect('/estantes')->with('mensaje','¡Guardado!');\n }","title":""},{"docid":"f1d0af0f067bd82cab33d8f47388842b","score":"0.5583906","text":"public function store(Request $request)\n {\n \n $requestData = $request->all();\n \n sector_af::create($requestData);\n\n return redirect('sector_af')->with('flash_message', 'sector_af added!');\n }","title":""},{"docid":"27030caec153d6ead37b37458496da9e","score":"0.5579884","text":"public function store()\n {\n // store the object itself\n parent::store(); \n parent::saveComposite('Contato', 'servidor_id', $this->id, $this->contatos);\n }","title":""},{"docid":"ff594b91ea9fbb00a38a7bc3306fd739","score":"0.5575716","text":"public function store(Request $request)\n {\n $asistente = new Asistente;\n $asistente->cuil = $request->cuil;\n $asistente->apellido = $request->apellido;\n $asistente->nombre = $request->nombre;\n $asistente->matricula = $request->matricula;\n $asistente->titulo = $request->titulo;\n $asistente->direccion = $request->direccion;\n $asistente->telefono = $request->telefono;\n $asistente->email = $request->email;\n\n $asistente->save();\n }","title":""},{"docid":"994a40a0cd60f22179369d6c6be995f4","score":"0.5568811","text":"public function store()\n\t{\n\t\t$input = Input::all();\n\t\ttry{\n\t\t\t$this->cemetery->store($input);\n\t\t\treturn Redirect::route('admin.cemeteries.index')\n \t->with('success', 'The new cemetery has been created');\n\t\t}\n\t\tcatch(ValidationException $e){\n\t\t\treturn Redirect::route('admin.cemeteries.create')\n\t\t ->withInput()\n\t\t ->withErrors($e->getErrors())\n\t\t ->with('error', 'The cemetery was not saved.');\n\t\t}\n\t}","title":""},{"docid":"02b20eee08907e4cd5189620c74a7a9d","score":"0.5567966","text":"public function store(Request $request)\n {\n $caroussel = new Caroussel;\n $caroussel->name = $request->name;\n $caroussel->photo = $request->photo->store('','DiskImage');\n $caroussel->save();\n\n return redirect()->route('caroussels.show');\n }","title":""},{"docid":"f3c89b63d23435139715bbcb5e318959","score":"0.5566875","text":"public function adminStore()\n {\n $data = request()->all();\n// dd($data);\n FFFlights::create([\n 'origin_id' => $data['origin'],\n 'destination_id' => $data['destination'],\n 'airline_id' => $data['airline'],\n 'departure' => $data['departure'],\n 'arival' => $data['arrival'],\n ]);\n return redirect(route('app.flights.index'));\n }","title":""},{"docid":"85e074736a4c2ff9ef8e89ac182e7f3d","score":"0.55647427","text":"public function store(Request $request)\n {\n $this->validate($request, [\n 'nombre' => 'required|unique:escuelas,nombre',\n 'carrera' => 'required',\n ]);\n \n $escuela = new Escuela;\n $escuela->nombre = $request->input('nombre');\n $escuela->descripcion = $request->input('descripcion');\n $escuela->user_id = auth()->user()->id;\n\n $escuela->save();\n $escuela->carreras()->sync($request->input('carrera'));\n\n return redirect()->route('escuelas.index')\n ->with('success', trans('School').' '.trans('created successfully '));\n }","title":""},{"docid":"01bb31c278c0eee0ccb35797bdee1b2d","score":"0.55466723","text":"public function store()\n\t{\n\t\t$ngo = NGOs::create(array(\n 'name' => Input::get('name'),\n 'registation_date' => Input::get('reg_date'),\n 'certificate_no' => Input::get('certificate'),\n 'registation_type' => Input::get('reg_type'),\n 'operation_level' => Input::get('operation'),\n 'postal_adress' => Input::get('postal'),\n 'phisycal_add' => Input::get('physical'),\n 'region' => Input::get('region'),\n 'district' => Input::get('district'),\n 'phone_number' => Input::get('phone'),\n 'email' => Input::get('email'),\n ));\n\n $name = $ngo->name;\n foreach(Input::get('sector') as $sector_id){\n $ngo_sector = NGOSector::create(array(\n \"sector_id\" => $sector_id,\n \"n_gos_id\" => $ngo->id\n ));\n $sector = Sector::find($sector_id);\n Logs::create(array(\n \"user_id\"=> Auth::user()->id,\n \"action\" =>\"Add Sector \".$sector['sector_name'].\" to NGO nammed \".$name\n ));\n }\n\n Logs::create(array(\n \"user_id\"=> Auth::user()->id,\n \"action\" =>\"Add NGO nammed \".$name\n ));\n return \"

    NGO Added Successfull

    \";\n\t}","title":""},{"docid":"a55cc6ad9e9e92848b2e504092f5c006","score":"0.55461484","text":"public function store(Request $request)\n {\n $cad= $this->objEntrega->create([\n 'produto'=>$request->produto,\n 'quantidade'=>$request->quantidadeproduto,\n 'categoria'=>$request->categoria,\n 'enderecoentrega'=>$request->enderecoentrga,\n 'enderecocoleta'=>$request->enderecocoleta,\n ]);\n if($cad){\n return redirect('entrega');\n }\n }","title":""},{"docid":"f0d2d65c8e0fa1ce6fda1566f3067600","score":"0.5542125","text":"public function store(Request $request)\n {\n $this->validate($request,[\n 'wet' =>'required|numeric',\n 'c_wet' =>'required',\n 'dry' =>'required',\n 'c_dry' =>'required'\n ]);\n\n $info = new AgriFacility;\n $info->subsector = session('SUBSEC');\n $info->wet = $request->input('wet');\n $info->c_wet = $request->input('c_wet');\n $info->dry = $request->input('c_dry');\n $info->c_dry = $request->input('c_dry');\n $info->orchard = $request->input('orchard');\n $info->c_orchard = $request->input('c_orchard');\n\n $info->food_processing = $request->input('food_processing');\n $info->mills = $request->input('mills');\n $info->tradition_mills = $request->input('tradition_mills');\n $info->oil_expeller = $request->input('oil_expeller');\n $info->corn_flake = $request->input('corn_flake');\n $info->electric_dryer = $request->input('electric_dryer');\n $info->potatoe_fryer = $request->input('potatoe_fryer');\n $info->power_tiller = $request->input('power_tiller');\n $info->tractor = $request->input('tractor');\n $info->transplanter = $request->input('transplanter');\n $info->grass_cutter = $request->input('grass_cutter');\n $info->green_house = $request->input('green_house');\n\n $info->save();\n return redirect('/agrifacility')->with('success','Saved successfully!!');\n }","title":""},{"docid":"b9d27003418811cb8b4db2c5dce0ec54","score":"0.5540304","text":"public function store() {\n $this->validate(request(), [\n 'asset_id'\t\t=> 'required',\n 'item' \t\t\t=> 'required', // Advanced Validation\n 'type'\t\t\t=> 'required',\t// Advanced Validation\n 'qty' => 'nullable|numeric',\n 'weight_uom' \t=> 'required',\t// Advanced Validation\n 'note' \t\t\t=> 'required'\n ]);\n\n $now \t\t= new DateTime();\n $last_id \t= $this->getID();\n \n DB::table('asset_part')->insert([\n\t\t\t'id'\t\t\t\t=> $last_id,\n\t\t\t'asset_id'\t\t\t=> request('asset_id'),\n\t\t\t'in_id'\t\t\t\t=> request('item'),\n\t\t\t'type_id'\t\t\t=> request('type'),\n\t\t\t'qty'\t\t\t\t=> request('qty'),\n\t\t\t'uom_id'\t\t\t=> request('weight_uom'),\n\t\t\t'note'\t\t\t\t=> request('note'),\n\t\t\t'modified_time' => $now,\n\t\t\t'modified_id' => $this->user_id,\n\t\t\t'created_time' => $now,\n\t\t\t'created_id' => $this->user_id\n\t\t]);\n\n return response(['status' => 'ok'], 200);\n }","title":""},{"docid":"0ed0e4c1494f8dfcc936c62df42cfd3b","score":"0.55357647","text":"public function store(Request $request)\n {\n // = ['designat','date_paiement','mode_paiement','montant','ref_paiement','type_opr','observations'];\n\n $user = Auth::user();\n if($user->can('create-client')){\n\n $caisse = new Caisse();\n $caisse->designat = $request->input('designat');\n $caisse->date_paiement = $request->input('date_paiement');\n $caisse->mode_paiement = $request->input('mode_paiement');\n $caisse->montant = $request->input('montant');\n $caisse->ref_paiement = $request->input('ref_paiement');\n $caisse->type_opr = $request->input('type_opr');\n $caisse->observations = $request->input('observations');\n $user->caisses()->save($caisse);\n\n return response()->json('user can add caisse');\n }\n else{\n return response()->json('user not can add caisse');\n }\n }","title":""},{"docid":"993cb06ea7022b5a9ff29810908f3a17","score":"0.5534853","text":"public function storeC(Request $request)\n {\n //Troquei nome do LogCaixa pq Log e reservado buga o sistema\n \n $caixa = new CaixaStatus();\n \n $caixa->user_id = Auth::user()->id;\n \n $caixa->status = 1;\n\n $caixa->save();\n \n \n \n $caixaID = CaixaStatus::select('*')\n ->where('user_id','=',Auth::user()->id)\n ->where('status','=',1)\n ->first();\n \n $data = $request->all();\n \n $cashier = new Cashier;\n \n $cashier->fill($data);\n \n $cashier->caixa_status_id = $caixaID->id;\n\n\n // dd($cashier);\n \n $cashier->save();\n \n \n // return view('admin.cashier.index');\n return redirect()->route('admin.cashier.index');\n \n \n }","title":""},{"docid":"6c2f8808393af66df6bc6a282054bd2c","score":"0.5533907","text":"public function store()\n\t{\n\n\t\tprint_r(\\Request::all());\n\n\t\tif( $snapshot = XSnapCourier::createSnapshot(\\Request::get('volume_name'), \\Request::get('snapshot_name') )) {\n\t\t\techo \"Created successfully\";\n\t\t\tprint_r($snapshot);\n\t\t}\n\n\t}","title":""},{"docid":"6268027e52e06aef54b1f9b7b764a918","score":"0.55338377","text":"public function store(Request $request)\n { \n if ($request->session()->get('codigoLotacaoFisica') == null || $request->session()->get('codigoLotacaoFisica') === \"NULL\") {\n $lotacao = $request->session()->get('codigoLotacaoAdministrativa');\n } \n else {\n $lotacao = $request->session()->get('codigoLotacaoFisica');\n }\n \n try {\n DB::beginTransaction();\n // REALIZA O INSERT NA TABELA DE DEMANDA\n $demanda = new ContratacaoDemanda;\n $demanda->tipoPessoa = $request->tipoPessoa;\n if ($request->tipoPessoa === \"PF\") {\n $demanda->cpf = $request->cpf;\n } \n else {\n $demanda->cnpj = $request->cnpj;\n }\n \n $demanda->nomeCliente = $request->nomeCliente;\n $demanda->dadosContaCliente = $request->agenciaContaCliente . '.' . $request->operacaoContaCliente . '.' . $request->contaCliente . '-' . $request->digitoContaCliente;\n $demanda->tipoOperacao = $request->tipoOperacao;\n $demanda->tipoMoeda = $request->tipoMoeda;\n $demanda->valorOperacao = str_replace(\",\",\".\", str_replace(\".\", \"\", $request->valorOperacao));\n \n if ($request->tipoOperacao == \"Pronto Exportação Antecipado\" || $request->tipoOperacao == \"Pronto Importação Antecipado\") {\n $demanda->dataPrevistaEmbarque = date(\"Y-m-d\", strtotime(str_replace('/', '-', $request->dataPrevistaEmbarque)));\n }\n \n $demanda->statusAtual = \"CADASTRADA\";\n $demanda->responsavelAtual = $request->session()->get('matricula');\n \n if ($request->session()->get('acessoEmpregadoEsteiraComex') == \"SR\") {\n $demanda->agResponsavel = null;\n $demanda->srResponsavel = $lotacao;\n } else {\n // CAPTURA A SR RESPONSÁVEL PELA AGÊNCIA\n $objRelacaoEmailUnidades = RelacaoAgSrComEmail::where('codigoAgencia', $lotacao)->first();\n\n $demanda->agResponsavel = $lotacao;\n $demanda->srResponsavel = $objRelacaoEmailUnidades->codigoSr;\n }\n \n $demanda->analiseAg = $request->analiseAg;\n $demanda->dataCadastro = date(\"Y-m-d H:i:s\", time());\n $demanda->cnaeRestrito = $request->cnaeRestrito;\n $demanda->liberadoLiquidacao = 'NAO';\n $demanda->save();\n\n // VALIDA SE É OPERACAO DE IMPORTAÇÃO PARA CADASTRO DO DADOS DO BENEFICIARIO E INTERMEDIARIO (SE HOUVER)\n // if ($request->tipoOperacao == 'Pronto Importação Antecipado' || $request->tipoOperacao == 'Pronto Importação') {\n // $dadosContaImportador = new ContratacaoContaImportador;\n // $dadosContaImportador->idDemanda = $demanda->idDemanda;\n // $dadosContaImportador->nomeBeneficiario = $request->nomeBeneficiario;\n // $dadosContaImportador->enderecoBeneficiario = $request->enderecoBeneficiario;\n // $dadosContaImportador->cidadeBeneficiario = $request->cidadeBeneficiario;\n // $dadosContaImportador->paisBeneficiario = $request->paisBeneficiario;\n // $dadosContaImportador->nomeBancoBeneficiario = $request->nomeBancoBeneficiario;\n // $dadosContaImportador->ibanBancoBeneficiario = $request->ibanBancoBeneficiario;\n // $dadosContaImportador->swiftAbaBancoBeneficiario = $request->swiftAbaBancoBeneficiario;\n // $dadosContaImportador->numeroContaBeneficiario = $request->numeroContaBeneficiario;\n // // VALIDA SE EXITE BANCO INTERMADIARIO\n // if ($request->has('temBancoIntermediario')) {\n // $dadosContaImportador->nomeBancoIntermediario = $request->nomeBancoIntermediario;\n // $dadosContaImportador->ibanBancoIntermediario = $request->ibanBancoIntermediario;\n // $dadosContaImportador->contaBancoIntermediario = $request->contaBancoIntermediario;\n // $dadosContaImportador->swiftAbaBancoIntermediario = $request->swiftAbaBancoIntermediario;\n // }\n // $dadosContaImportador->save();\n // }\n\n // CRIA O DIRETÓRIO PARA UPLOAD DOS ARQUIVOS\n $this->criaDiretorioUploadArquivo($request, $demanda->idDemanda);\n\n // REALIZA O UPLOAD DOS ARQUIVOS E FAZ O INSERT NAS TABELAS TBL_EST_CONTRATACAO_LINK_UPLOADS E TBL_EST_CONTRATACAO_CONFERE_CONFORMIDADE\n switch ($request->tipoOperacao) {\n case 'Pronto Importação Antecipado':\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadInvoice\", \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DADOS_CONTA_DO_BENEFICIARIO\", $demanda->idDemanda);\n break;\n case 'Pronto Importação':\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadInvoice\", \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadConhecimento\", \"CONHECIMENTO_DE_EMBARQUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"CONHECIMENTO_DE_EMBARQUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadDi\", \"DI\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DI\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DADOS_CONTA_DO_BENEFICIARIO\", $demanda->idDemanda);\n break;\n case 'Pronto Exportação Antecipado':\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadInvoice\", \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"INVOICE\", $demanda->idDemanda);\n break;\n case 'Pronto Exportação':\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadInvoice\", \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"INVOICE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadConhecimento\", \"CONHECIMENTO_DE_EMBARQUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"CONHECIMENTO_DE_EMBARQUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadDue\", \"DUE\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DUE\", $demanda->idDemanda);\n break;\n }\n // DOCUMENTOS DIVERSOS\n if ($request->has('uploadDocumentosDiversos')) {\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \"uploadDocumentosDiversos\", \"DOCUMENTOS_DIVERSOS\", $demanda->idDemanda);\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \"DOCUMENTOS_DIVERSOS\", $demanda->idDemanda);\n }\n\n // REALIZA O INSERT NA TABELA DE HISTORICO\n $historico = new ContratacaoHistorico;\n $historico->idDemanda = $demanda->idDemanda;\n $historico->tipoStatus = \"CADASTRO\";\n $historico->dataStatus = date(\"Y-m-d H:i:s\", time());\n $historico->responsavelStatus = $request->session()->get('matricula');\n $historico->area = $lotacao;\n $historico->analiseHistorico = $request->analiseAg;\n $historico->save();\n\n // ENVIA E-MAIL PARA A AGÊNCIA\n if (env('DB_CONNECTION') === 'sqlsrv') {\n $dadosDemandaCadastrada = ContratacaoDemanda::find($demanda->idDemanda);\n ContratacaoPhpMailer::enviarMensageria($request, $dadosDemandaCadastrada, 'demandaCadastrada', 'faseConformidadeDocumental', null);\n }\n \n $request->session()->flash('corMensagem', 'success');\n $request->session()->flash('tituloMensagem', \"Protocolo #\" . str_pad($demanda->idDemanda, 4, '0', STR_PAD_LEFT) . \" | Cadastro Realizado com Sucesso!\");\n $request->session()->flash('corpoMensagem', \"Sua demanda foi cadastrada com sucesso! Para acompanhar todas suas demandas já cadastradas \");\n DB::commit();\n return redirect('esteiracomex/solicitar/contratacao');\n } catch (\\Exception $e) {\n DB::rollback();\n dd($e);\n $request->session()->flash('corMensagem', 'danger');\n $request->session()->flash('tituloMensagem', \"Protocolo não foi cadastrado\");\n $request->session()->flash('corpoMensagem', \"Aconteceu algum erro durante o cadastro, tente novamente.\");\n return redirect('esteiracomex/solicitar/contratacao');\n }\n }","title":""},{"docid":"10a2cfb31c1dc13c5d61b59f568dd3a8","score":"0.55319875","text":"public function store(Request $request)\n {\n\n $centro = json_decode($request->getContent(), true);\n\n if(!Auth::user()->isSuperAdmin()){\n $centro['coordinador'] = Auth::id();\n }\n\n if(in_array(\"verificado\", $centro)){\n unset($centro['verificado']);\n }\n\n $centro = Centro::create($centro);\n\n return new CentroResource($centro);\n }","title":""},{"docid":"a5f8bda492d957cd5c0917fbb7a083a8","score":"0.553024","text":"public function store(Request $request)\n {\n $construction = New Construction;\n $construction->name = $request->name;\n $construction->honorary = $request->honorary;\n $construction->date = $request->date;\n $construction->square_meter = $request->square_meter;\n if($request->status==\"Activo\")\n $construction->status=\"0\";\n else if($request->status==\"Finalizado\")\n $construction->status=\"1\";\n else if($request->status==\"Espera\")\n $construction->status=\"2\";\n $construction->client_id = $request->client_id;\n $construction->save();\n\n $msg = [\n 'title' => 'Creado!',\n 'text' => 'Obra creada exitosamente.',\n 'icon' => 'success'\n ];\n\n $honorary_remaining = New HonoraryRemaining;\n $honorary_remaining->construction_id = $construction->id;\n $honorary_remaining->remaining = 0;\n $honorary_remaining->save();\n\n return redirect('construction')->with('message', $msg);\n }","title":""},{"docid":"364eeae3687052f99013e799f4469d92","score":"0.5527333","text":"public function store(StoreVacanciesRequest $request)\n {\n if (! Gate::allows('vacancy_create')) {\n return abort(401);\n }\n $request = $this->saveFiles($request);\n $vacancy = Vacancy::create($request->all());\n $vacancy->sphere_id()->sync(array_filter((array)$request->input('sphere_id')));\n $vacancy->schedule_id()->sync(array_filter((array)$request->input('schedule_id')));\n\n\n\n return redirect()->route('admin.vacancies.index');\n }","title":""},{"docid":"5521da03b557ef076a9bc19bca7a7bad","score":"0.55185604","text":"public function store(Request $request)\n {\n request()->validate([\n 'beneficiario_id' => 'required',\n ]);\n\n $peso = floatval(request('peso'));\n $estatura = floatval(request('estatura'));\n if($estatura != null){ \n $estatura = $estatura/100;\n $estatura = pow($estatura,2);\n $imc = $peso/$estatura;\n $imc = round($imc,2);\n }\n else{\n $imc = null;\n }\n \n $consulta= new nutricionConsulta([\n 'ocupacion'=> request('ocupacion'),\n 'horarioscomida'=> request('horarioscomida'),\n 'cantidadalimentos'=> request('cantidadalimentos'),\n 'apetito'=> request('apetito'),\n 'distension'=> request('distension'),\n 'estrenimiento'=> request('estrenimiento'),\n 'flatulencias'=> request('flatulencias'),\n 'vomitos'=> request('vomitos'),\n 'caries'=> request('caries'),\n 'edema'=> request('edema'),\n 'mareo'=> request('mareo'),\n 'zumbido'=> request('zumbido'),\n 'cefaleas'=> request('cefaleas'),\n 'disnea'=> request('disnea'),\n 'poliuria'=> request('poliuria'),\n 'actividadfisica'=> request('actividadfisica'),\n 'suenohoras'=> request('suenohoras'),\n 'comidasdia'=> request('comidasdia'),\n 'lugarcomida'=> request('lugarcomida'),\n 'preparacomida'=> request('preparacomida'),\n 'entrecomidas'=> request('entrecomidas'),\n 'alimentospreferidos'=> request('alimentospreferidos'),\n 'alimentosodiados'=> request('alimentosodiados'),\n 'suplementos'=> request('suplementos'),\n 'medicamentos'=> request('medicamentos'),\n 'consumoagua'=> request('consumoagua'),\n 'recordatoriodesayuno'=> request('recordatoriodesayuno'),\n 'recordatoriocolacionm'=> request('recordatoriocolacionm'),\n 'recordatoriocomida'=> request('recordatoriocomida'),\n 'recordatoriocolaciont'=> request('recordatoriocolaciont'),\n 'recordatoriocena'=> request('recordatoriocena'),\n 'peso'=> request('peso'),\n 'estatura'=> request('estatura'),\n 'tipodieta'=> request('tipodieta'),\n 'kilocaloriastotal'=> request('kilocaloriastotal'),\n 'kilocaloriashidratos'=> request('kilocaloriashidratos'),\n 'porcentajehidratos'=> request('porcentajehidratos'),\n 'porcentajeproteinas'=> request('porcentajeproteinas'),\n 'porcentajegrasas'=> request('porcentajegrasas'),\n 'diagnostico'=> request('diagnostico'),\n 'nota'=> request('nota'),\n 'imc'=> $imc,\n 'fecha'=> request('fecha'),\n //'beneficiario_id' => request('beneficiario_id'),\n ]);\n\n $id = request('beneficiario_id');\n $beneficiario = Beneficiario::find($id);\n $beneficiario->nutricionconsulta()->save($consulta);\n\n return view('nutriologia.edit',compact('consulta'));\n // return redirect('beneficiario/'.$id)->with('nuevo','Consulta agregada con éxito');\n }","title":""},{"docid":"5eb9b4e8df5594ad76af8f6f33d394f2","score":"0.55176973","text":"public function store()\n {\n //\n $this->supplier->createSupplier(Input::all());\n return Redirect::action('SupplierController@index');\n }","title":""},{"docid":"8aed2227138873c176aaff64d3416ff5","score":"0.5516383","text":"public function store()\n {\n $client = Client::create(array(\n \"attention_name\"=> Input::get(\"attention_name\"),\n \"campany_name\" => Input::get(\"campany_name\"),\n \"address\" => Input::get(\"address\"),\n \"email\" => Input::get(\"email\"),\n \"phone_no\" => Input::get(\"phone_no\"),\n \"tin_no\" => Input::get(\"tin_no\"),\n \"vat_no\" => Input::get(\"vat_no\"),\n \"status\" => Input::get(\"status\"),\n// \"country\" => Input::get(\"country\"),\n\n ));\n\n return \"

    Client Registered Successful

    \";\n\n }","title":""},{"docid":"db53cd50f0951f368ad9ee1136d42921","score":"0.55158925","text":"public function store()\n {\n $attributes = request()->validate([\n 'make' => ['required', 'max:255'],\n 'model' => ['required', 'max:255'],\n 'description' => ['required', 'min:3', 'max:255']\n ]);\n\n $attributes['owner_id'] = auth()->id();\n\n $tag = request()->get('tag');\n\n $car = Car::create($attributes);\n\n $car->tags()->attach($tag);\n\n session()->flash('added', 'You have added a new car!');\n\n event(new CarAdded($car)); // fires an event which sends an email to user\n\n return redirect ('cars');\n }","title":""},{"docid":"54db356d5922a4564d7e55415e63b41e","score":"0.5510926","text":"public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'from' => 'required',\n 'to' => 'required',\n 'tour_number' => 'required',\n 'price' => 'required',\n 'file' => 'required|image',\n ]);\n\n $circuit = new Circuit();\n\n if($request->hasFile('file')){\n $image = $request->file('file');\n $filename = time(). '.' . $image->getClientOriginalExtension();\n $location = public_path('uploads/' .$filename);\n Image::make($image)->fit(310, 201)->save($location);\n $circuit->file = $filename;\n }\n\n $circuit->name = $request->get('name');\n $circuit->from = $request->get('from');\n $circuit->to = $request->get('to');\n $circuit->price = $request->get('price');\n $circuit->tour_number = $request->get('tour_number');\n $circuit->save();\n\n Session::flash('success', 'Circuit ajouté avec succès');\n return redirect()->route('admin.circuit.index');\n }","title":""},{"docid":"f503a6d59b85fa22de2ba93f00eb0f6a","score":"0.5510771","text":"public function store()\n\t{\n\t\t$this->gateway->create(Input::only(['name'])); \n\t\treturn Redirect::to('admin/course');\n\t}","title":""},{"docid":"b4e4df912aef65fffd3587228101f760","score":"0.55086887","text":"public function store(ClientRequest $request)\n {\n Supplier::create($request->only('name', 'phoneNumber'));\n\n flash('supplier created success fully');\n\n return redirect()->route('suppliers.index');\n }","title":""},{"docid":"42fd000919e74e694e3b803d9038b66f","score":"0.5507637","text":"public function store(Request $request)\n {\n Cliente::create($request->all());\n return redirect()->route('cliente.index')->with('success','Registro creado satisfactoriamente');\n }","title":""},{"docid":"86ccd2c2299a50fe4de5efe0536fd217","score":"0.55056787","text":"public function store(Request $request)\n {\n $this->validate($request, [\n 'welfare' => 'required',\n 'cadre' => 'required',\n 'value' => 'required',\n 'active' => 'required'\n ]);\n\n ByCadre::create([\n 'welfare_id'=> $request->welfare,\n 'cadre_id' => $request->cadre,\n 'value' => $request->value,\n 'percentage'=> $request->percentage,\n 'active' => $request->active\n ]);\n\n return redirect('hrpayroll/allowance/by-cadre')->with('success', 'Record has been added.');\n }","title":""},{"docid":"6bd3b0b54a5feb2759712b3290ab19b2","score":"0.5505329","text":"public function store(Request $request)\n {\n $request['produto'] = mb_strtoupper($request->produto, 'UTF-8');\n $request['user_id'] = 1;\n $request['area_id'] = 1;\n\n Estoque::create($request->all());\n return redirect('/admin/farmacia/estoque/cadastro')->with('success', 'Item cadastrado com sucesso!');\n }","title":""},{"docid":"c7fe55cef40c463739ba8fc103491390","score":"0.5503317","text":"public function store(Request $request)\n {\n $this->validate($request, [\n 'serial_number' => 'required',\n 'weight' => 'required',\n 'manufacture_date' => 'required',\n 'shelf_life' => 'required',\n 'country_of_origin' => 'required',\n 'source' => 'required',\n 'source_address' => 'required',\n 'current_location' => 'required',\n ]);\n \n $cylinder = new Cylinder();\n $cylinder->serial_number = $request->serial_number;\n $cylinder->weight = $request->weight;\n $cylinder->manufacture_date = $request->manufacture_date;\n $cylinder->shelf_life = $request->shelf_life;\n $cylinder->country_of_origin = $request->country_of_origin;\n $cylinder->source = $request->source;\n $cylinder->source_address = $request->source_address;\n $cylinder->current_location = $request->current_location;\n $cylinder->save();\n\n $history = new History();\n $history->serial_number = $request->serial_number;\n $history->current_location = $request->current_location;\n $history->save();\n $request->session()->flash('success', 'Cylinder Added successfully');\n return redirect()->route('admin.cylinder');\n }","title":""},{"docid":"8a178edcea7e06905bd094220ab5fe42","score":"0.55009794","text":"public function store()\n\t{\n\t\t$carrier = new $this->repo;\n\n\t\tif ($carrier->save()) {\n\t\t\treturn $this->rest->response(201, $carrier);\n\t\t}\n\n\t\treturn $this->response->errorBadRequest($carrier->errors());\n\t}","title":""},{"docid":"9df0dbf18f74eb02e89331243a109e55","score":"0.5498913","text":"public function store(Request $request){\n\n $nuevoSeguimiento->paciente=$request->paciente;\n $nuevoSeguimiento->perfil_medico=$request->perfil_medico;\n $nuevoSeguimiento->diagnostico_medico=$request->diagnostico_medico;\n $nuevoSeguimiento->pronostico_medico=$request->pronostico_medico;\n $nuevoSeguimiento->objetivos_medico=$request->objetivos_medico;\n $nuevoSeguimiento->actividades_medico=$request->actividades_medico;\n $nuevoSeguimiento->ind_evaluacion_medico=$request->ind_evaluacion_medico;\n $nuevoSeguimiento->observaciones_medico=$request->observaciones_medico;\n $nuevoSeguimiento->perfil_nutricionista=$request->perfil_nutricionista;\n $nuevoSeguimiento->diagnostico_nutricionista=$request->diagnostico_nutricionista;\n $nuevoSeguimiento->pronostico_nutricionista=$request->pronostico_nutricionista;\n $nuevoSeguimiento->objetivos_nutricionista=$request->objetivos_nutricionista;\n $nuevoSeguimiento->actividades_nutricionista=$request->actividades_nutricionista;\n $nuevoSeguimiento->ind_evaluacion_nutricionista=$request->ind_evaluacion_nutricionista;\n $nuevoSeguimiento->observaciones_nutricionista=$request->observaciones_nutricionista;\n $nuevoSeguimiento->perfil_fisioterapeuta=$request->perfil_fisioterapeuta;\n $nuevoSeguimiento->diagnostico_fisioterapeuta=$request->diagnostico_fisioterapeuta;\n $nuevoSeguimiento->pronostico_fisioterapeuta=$request->pronostico_fisioterapeuta;\n $nuevoSeguimiento->objetivos_fisioterapeuta=$request->objetivos_fisioterapeuta;\n $nuevoSeguimiento->actividades_fisioterapeuta=$request->actividades_fisioterapeuta;\n $nuevoSeguimiento->ind_evaluacion_fisioterapeuta=$request->ind_evaluacion_fisioterapeuta;\n $nuevoSeguimiento->observaciones_fisioterapeuta=$request->observaciones_fisioterapeuta;\n $nuevoSeguimiento->perfil_psicologico=$request->perfil_psicologico;\n $nuevoSeguimiento->diagnostico_psicologico=$request->diagnostico_psicologico;\n $nuevoSeguimiento->pronostico_psicologico=$request->pronostico_psicologico;\n $nuevoSeguimiento->objetivos_psicologico=$request->objetivos_psicologico;\n $nuevoSeguimiento->actividades_psicologico=$request->actividades_psicologico;\n $nuevoSeguimiento->ind_evaluacion_psicologico=$request->ind_evaluacion_psicologico;\n $nuevoSeguimiento->observaciones_psicologico=$request->observaciones_psicologico;\n $nuevoSeguimiento->perfil_gerontologo=$request->perfil_gerontologo;\n $nuevoSeguimiento->objetivos_gerontologo=$request->objetivos_gerontologo;\n $nuevoSeguimiento->actividades_gerontologo=$request->actividades_gerontologo;\n $nuevoSeguimiento->ind_evaluacion_gerontologo=$request->ind_evaluacion_gerontologo;\n $nuevoSeguimiento->observaciones_gerontologo=$request->observaciones_gerontologo;\n $nuevoSeguimiento->perfil_recreacion=$request->perfil_recreacion;\n $nuevoSeguimiento->objetivos_recreacion=$request->objetivos_recreacion;\n $nuevoSeguimiento->actividades_recreacion=$request->actividades_recreacion;\n $nuevoSeguimiento->ind_evaluacion_recreacion=$request->ind_evaluacion_recreacion;\n $nuevoSeguimiento->observaciones_recreacion=$request->observaciones_recreacion;\n $nuevoSeguimiento->perfil_religioso=$request->perfil_religioso;\n $nuevoSeguimiento->objetivos_religioso=$request->objetivos_religioso;\n $nuevoSeguimiento->actividades_religioso=$request->actividades_religioso;\n $nuevoSeguimiento->ind_evaluacion_religioso=$request->ind_evaluacion_religioso;\n $nuevoSeguimiento->observaciones_religioso=$request->observaciones_religioso;\n $nuevoSeguimiento->perfil_enfermera=$request->perfil_enfermera;\n $nuevoSeguimiento->objetivos_enfermera=$request->objetivos_enfermera;\n $nuevoSeguimiento->actividades_enfermera=$request->actividades_enfermera;\n $nuevoSeguimiento->ind_evaluacion_enfermera=$request->ind_evaluacion_enfermera;\n $nuevoSeguimiento->observaciones_enfermera=$request->observaciones_enfermera;\n }","title":""},{"docid":"47202a124297d48771d4e762644ea80c","score":"0.54983157","text":"public function store(StorePartCreate $request)\n {\n $partenaire = New Partenaire;\n $partenaire->name = $request->name;\n if($request->image != NULL){\n $partenaire->image = $request->image->store('','imgPartenaire');\n }\n $partenaire->save();\n\n return redirect()->route('partenaires.index');\n }","title":""},{"docid":"de140b8a490d0876a83ad8c7296182f3","score":"0.54964936","text":"public function store(CinemaRequest $request)\n {\n Cinema::create($request->all());\n return redirect()->route('cinema.index')->with('ok', __('Le cinema a bien été enregistré'));//\n }","title":""},{"docid":"63212869d3788883caa17587ed5d33b1","score":"0.5496032","text":"public function store()\n\t{\n\t\t$this->stocklocation->create(Input::all());\n\t\t//return view('');\n\t}","title":""},{"docid":"62be5efef3ecad29e541e8871fb7d512","score":"0.5492393","text":"public function store()\n {\n $input = Request::all();\n\n Client::create($input);\n\n return redirect('clients');\n }","title":""},{"docid":"fbbb1095210aa47b238926ef418f7895","score":"0.5492094","text":"public function store(Request $request)\n {\n $machinery_time=$request->input('machinery_time');\n $gas=$request->input('gas');\n $delivery_time = date(\"h:i:s\");\n $trade=DB::table('entregas')->insert([\"Delivery_time\" =>$delivery_time, \"Machine_time\"=>$machinery_time, \"Gas\" =>$gas]);\n\n return View('DispachCenter.document_contract');\n }","title":""},{"docid":"03ce3a076d4441326e3a0ec8cfe147d8","score":"0.5490453","text":"public function store(Request $request)\n {\n $solicitud_beca = new SolicitudBeca();\n $solicitud_beca->fill($request->all())->save();\n return response()->json(\n ['message'=>'Solicitud de beca creado satisfactoriamente', 'data'=>$solicitud_beca]);\n }","title":""},{"docid":"7da6b3437cfd5093d4b6eb2f239fe0e7","score":"0.5488208","text":"public function store(Request $request)\n {\n /* $request->validate([\n 'nome_sector' => 'required|min:3',\n 'edificio' => 'required'\n ]);*/\n\n $equipamento = new Equipamento();\n $equipamento->codigo_equipamento = $request->codigo_equipamento;\n $equipamento->referencia = $request->referencia;\n $equipamento->estado_conputador = $request->estado_conputador;\n $equipamento->necessario = $request->necessario;\n $equipamento->sector_id = $request->sector_id;\n $equipamento->tipo_id = $request->tipo_id;\n\n\n if ($equipamento->save()) {\n return response()->json($equipamento, 200);\n } else {\n return response()->json([\n 'message' => 'Some error occurred, please try agian',\n 'status_code' => 500\n ], 500);\n }\n }","title":""},{"docid":"84bd063185498af5ad6304a729a66212","score":"0.54874974","text":"public function store(SerreRequest $request)\n {\n $alpha = $request->enviroment_alpha;\n $beta = $request->enviroment_beta;\n\n /* switch ($request->get('envirenement')) {\n case 1:\n $alpha = 0.1;\n $beta = 1.3;\n break;\n case 2:\n $alpha = 1.15;\n $beta = 1;\n break;\n case 3:\n $alpha = 0.2;\n $beta = 0.85;\n break;\n case 4:\n $alpha = 0.25;\n $beta = 0.67;\n break;\n case 5:\n $alpha = 0.35;\n $beta = 0.47;\n break;\n default:\n $alpha = null;\n $beta = null;\n break;\n }*/\n // dd($envirenement['alpha']);\n // dd($alpha,$beta);\n $serre = new Serre();\n $serre->name = $request->get('name');\n $serre->zone_id = $request->get('zone_id');\n $serre->nbr = $request->get('nbr');\n $serre->ctz = $request->get('ctz');\n $serre->c = $request->get('c');\n $serre->w = $request->get('w');\n $serre->l = $request->get('l');\n $serre->h = $request->get('h');\n $serre->e = $request->get('e');\n $serre->d = $request->get('d');\n $serre->tc = $request->get('tc');\n $serre->hvouv = $request->get('hvouv');\n $serre->stouv = $request->get('stouv');\n $serre->srf = $request->get('srf');\n $serre->ssd = $request->get('ssd');\n $serre->y = $request->get('y');\n $serre->alpha = $alpha;\n $serre->beta = $beta;\n $serre->type = $request->get('type');\n $serre->save();\n /*Serre::create([\n 'name' => $request->get('name'),\n 'zone_id' => $request->get('zone_id'),\n 'nbr' => $request->get('nbr'),\n 'ctz' => $request->get('ctz'),\n 'c' => $request->get('c'),\n 'w' => $request->get('w'),\n 'l' => $request->get('l'),\n 'h' => $request->get('h'),\n 'e' => $request->get('e'),\n 'd' => $request->get('d'),\n 'tc' => $request->get('tc'),\n 'hvouv' =>$request->get('hvouv'),\n 'stouv' =>$request->get('stouv'),\n 'srf' =>$request->get('srf'),\n 'ssd' =>$request->get('ssd'),\n 'y' =>$request->get('y'),\n 'alpha' =>$alpha,\n 'beta' =>$beta\n ]);*/\n\n return redirect()->route('serre.index');\n }","title":""},{"docid":"34c38a8e904e6c06a8d3ec1638f7bbbc","score":"0.54869026","text":"public function store(StoreCliente $request){\n\n $cliente = Cliente::create($request->all());\n\n return redirect()->route('cliente.show', $cliente);\n }","title":""},{"docid":"3e73e75f0810d5c05bb6e07ca805159d","score":"0.548563","text":"public function store(CreateArtistaRequest $request)\n {\n Artista::create($request->all());\n return redirect('artistas');\n }","title":""},{"docid":"bb7e6e82bec8695569f1d209223ba31d","score":"0.54751456","text":"public function store() {\r\n\t\t//\r\n\t}","title":""},{"docid":"dcf2b1f653dd44b74c47264d4ceb3c86","score":"0.54689413","text":"public function store(Request $request)\n {\n request()->validate([\n 'beneficiario_id' => 'required',\n ]);\n\n if (request('urobilinogeno') == null) {\n $urobilinogeno = '0.2';\n }\n else {\n $urobilinogeno = request('urobilinogeno');\n }\n\n\n $examenorina= new ExamenOrina([\n 'color' => request('color'),\n 'aspecto' => request('aspecto'),\n 'ph' => request('ph'),\n 'densidad' => request('densidad'),\n 'nitritos' => request('nitritos'),\n 'glucosa' => request('glucosa'),\n 'proteinas' => request('proteinas'),\n 'hemoglobina' => request('hemoglobina'),\n 'cuerposCetonicos' => request('cuerposCetonicos'),\n 'bilirribuna' => request('bilirribuna'),\n 'urobilinogeno' => $urobilinogeno,\n 'leucocitos' => request('leucocitos'),\n 'eritrocitosIntactos' => request('eritrocitosIntactos'),\n 'eritrocitosCrenados' => request('eritrocitosCrenados'),\n 'observacionLeucocitos' => request('observacionLeucocitos'),\n 'cristales' => request('cristales'),\n 'cilindros' => request('cilindros'),\n 'celulasEpiteliales' => request('celulasEpiteliales'),\n 'bacterias' => request('bacterias'),\n 'nota' => request('nota'),\n 'metodo' => request('metodo'),\n 'observaciones' => request('observaciones'),\n 'fecharegistro' => request('fecharegistro'),\n ]);\n\n $id = request('beneficiario_id');\n $beneficiario = Beneficiario::find($id);\n $beneficiario->antecedentes()->save($examenorina);\n\n return redirect('beneficiario/'.$id)->with('nuevo','Examen de orina registrado con éxito');\n }","title":""},{"docid":"4068491f822b923aad1d2c8572974020","score":"0.54685533","text":"public function store(CatalogoRequest $request){\n $data = $request->validated();\n \n \n try{\n $tarifa_cargos = floatval(str_replace('$','', $data['tarifa_cargos']));\n\n $catalogo = new Catalogo;\n $catalogo->nombre = $data['nombre']; \n $catalogo->interes = $data['interes'];\n $catalogo->porcentaje = $data['porcentaje'];\n $catalogo->num_plazodevolucion = $data['num_plazoDevolucion'];\n $catalogo->time_plazodevolucion = $data['time_plazoDevolucion'];\n $catalogo->no_cobranza = $data['no_cobranza'];\n $catalogo->tarifa_cargos = $tarifa_cargos;\n $catalogo->creo_id_usuario = auth()->user()->id;\n $catalogo->save();\n return redirect()->route('catalogo.index')->with('success', 'El nuevo concepto de prestamo se ha agregado correctamete');\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }","title":""},{"docid":"e3e71d463d3aa2abe949c137e87e474e","score":"0.5466491","text":"public function store(Request $request)\n {\n VehicleCollateral::create($request->all());\n return redirect('/admin/vehiclecollateral')->with('Success', 'Collateral Created Successfully');\n }","title":""},{"docid":"bb4a9198ce48cbf8b725ee8c6a371cab","score":"0.5462925","text":"public function store(Request $request)\n {\n $informacion=['error'=>false, 'resultado' => '','id'=>''];\n\n\n\n try{\n //Aqui se guarda el representante legal\n /*$repLegal=new RepresentanteLegal;\n $repLegal->nombre=strtoupper($request['cliente']['replegal']);\n $repLegal->tipo=\"Cliente\";\n $repLegal->save();\n*/\n\n //Aqui se guarda el cliente\n $cliente=new ComercializacionCliente;\n $cliente->razon_social=strtoupper($request['cliente']['razon_social']);\n //$cliente->domicilio_fiscal=strtoupper($request['cliente']['domicilio_fiscal']);\n $cliente->fecha_alta=$request['cliente']['fecha'];\n $cliente->nombre_comercial=strtoupper($request['cliente']['nombre_comercial']);\n //$cliente->rfc=\"PENDIENTE\";//no necesario que lo capturen\n //$cliente->cargo=strtoupper($request['cliente']['cargo']);\n $cliente->giro=strtoupper($request['cliente']['giro']);\n\n //$cliente->domicilio_notificacion=\"PENDIENTE\";//no necesario que lo capturen\n $cliente->id_delegacion=$request['cliente']['id_delegacion'];\n //$cliente->tipo_contrato=$request['cliente']['tipo_contrato'];\n //$cliente->id_representante_legal=$repLegal->id;//$ultimorep->id;\n $cliente->save();\n\n\n $this->historial('Registro del Cliente id:'. $cliente->id);\n $informacion['resultado']='El registro del cliente '.$cliente->razon_social.' fue exitoso';\n $informacion['id']=$cliente->id;\n }\n catch(\\Exception $e) {\n $informacion['error']=true;\n $informacion['resultado']='Registro de datos incorrecto, reporte añadido a SISTEMAS';\n\n }\n return $informacion;\n\n }","title":""},{"docid":"f0dce62eec35d53d1929414898265222","score":"0.54625607","text":"public function store(Request $request)\n {\n $this->validate($request, [\n\n 'name' => 'required|max:255',\n 'lastnames' => 'required|max:255',\n 'CIN' => 'required|unique:solicituds',\n 'email' => 'required|email|max:255',\n 'phone' => 'required|integer|max:255',\n 'city' => 'required|max:255',\n\n ]);\n\n $cataloge = Cataloge::find($request['cat']);\n \n Solicitud::create([\n 'name' => $request['name'],\n 'lastnames' => $request['lastnames'],\n 'CIN' => $request['CIN'],\n 'phone' => $request ['phone'],\n 'city' => $request['city'],\n 'email' => $request['email'],\n 'user_id'=> Auth::id(),\n ])->cataloge()->save($cataloge);\n \n\n\n /* Cataloge_Solicitud::create([\n 'cataloge_id' => $request['cataloge_id'],\n 'solicitud_id' => $request['solicitud_id'],\n ]); */\n\n Session::flash('message','Solicitud creada correctamente');\n return Redirect::to('/solicitud');////\n }","title":""},{"docid":"5204fe0ff805a8b50ac74f9733ca9f08","score":"0.54596287","text":"public function store()\n {\n try {\n $userId = Input::get('user_id') ?: getCurrentUserId();\n $supplier = Input::get('supplier');\n $invoice = Input::get('invoice');\n $products = Input::get('products') ?: [];\n $description = Input::get('description');\n\n // Abre um transaction no banco de dados\n \\DB::beginTransaction();\n \\Log::debug('Transaction - begin');\n\n $supplier = $this->importSupplier($supplier);\n\n $entry = (self::MODEL)\n ::create([\n 'description' => $description,\n 'confirmed_at' => null,\n 'user_id' => $userId,\n 'supplier_id' => $supplier ? $supplier->id : null,\n ]);\n\n $invoice = $this->importInvoice($invoice, $entry->id);\n $products = $this->importProducts($products, $entry->id);\n\n // Fecha a transação e comita as alterações\n \\DB::commit();\n \\Log::debug('Transaction - commit');\n\n return $this->createdResponse($entry);\n } catch (\\Exception $exception) {\n \\DB::rollBack();\n \\Log::debug('Transaction - rollback');\n\n \\Log::error(logMessage($exception, 'Erro ao salvar recurso'), ['model' => self::MODEL]);\n\n return $this->clientErrorResponse([\n 'exception' => '[' . $exception->getLine() . ']' . ' ' . $exception->getMessage()\n ]);\n }\n }","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""},{"docid":"d25e328608bea4c8f7f39852c1099ca8","score":"0.54595274","text":"public function store()\n\t{\n\t\t//\n\t}","title":""}],"string":"[\n {\n \"docid\": \"d3eb15451fd1ef1117dff6cbf3ecd9d0\",\n \"score\": \"0.606247\",\n \"text\": \"public function store(Request $request)\\n {\\n $request->validate([\\n 'storage_code' => ['required', 'max:255', 'unique:silo_actuals'],\\n 'date' => ['required'],\\n 'value_actual' => ['required'],\\n ]);\\n\\n $silo = SiloActual::create($request->except('_token'));\\n try {\\n $request->request->add(['id' => $silo->id]);\\n SiloActualCloud::create($request->except('_token'));\\n } catch (\\\\Throwable $th) {\\n return redirect('setting/silo-manual')->with(['update' => 'Data saved successfully!']);\\n }\\n return redirect('setting/silo-manual')->with(['create' => 'Data saved successfully!']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1eadd46cb5f082ff7082550863de3774\",\n \"score\": \"0.5910282\",\n \"text\": \"public function store(Request $request)\\n {\\n $validateData = $request->validate([\\n 'description' => 'required',\\n 'somme' => 'required',\\n 'apercu' => 'required',\\n 'client_id' => 'required',\\n 'modele_id' => 'required'\\n ]);\\n $clientId = $request->input('client_id');\\n $modeleId = $request->input('modele_id');\\n \\n\\n $client = Client::find($clientId);\\n $modele = Modele::find($modeleId);\\n \\n if ($client && $modele) {\\n // Store image in public file;\\n $request->file('apercu')->store('couture', 'public');\\n echo \\\"start saving...\\\";\\n $couture = Couture::create([\\n 'description'=> $request->input('description'),\\n 'date' => $request->input('date'),\\n 'somme' => $request->input('somme'),\\n 'apercu' => $request->file('apercu')->hashName(),\\n 'client_id' => $request->input('client_id'),\\n 'modele_id' => $request->input('modele_id')\\n ]);\\n }else{\\n return response()->json(['status'=>FALSE, 'message'=>\\\"Veuillez vous assurez de l'existance du client et du modele dans la base de donnée svp.\\\" ]);\\n }\\n \\n if ($couture) {\\n return response()->json(['status'=>TRUE, 'couture'=>$couture]);\\n }else{\\n return response()->json(['status'=>FALSE, 'couture'=>[]]);\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4679a89e7503db0dab15892f6746501d\",\n \"score\": \"0.5896923\",\n \"text\": \"public function store(Request $request){\\n try{\\n if(!$request->input('central_name') )\\n throw new Exception(\\\"Central name is required!\\\");\\n $centralOffice = new CentralOffice();\\n $centralOffice->central_name = $request->input('central_name');\\n $centralOffice->central_details = $request->input('central_details');\\n if(!$centralOffice->save())\\n throw new Exception(\\\"Critical error when save central office data!\\\");\\n $where = ['central_office_id'=>$centralOffice->id,'role'=>1];\\n $centralOffice->head = TermRelation::findMyAdmin($where);\\n return ['success'=>true, 'message'=>'Cetnral office save success', 'data'=>$centralOffice];\\n\\n }catch (Exception $e){\\n return ['success'=>false, 'message'=> $e->getMessage()];\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15066a1a5efcf88c05402f9d157276db\",\n \"score\": \"0.5878643\",\n \"text\": \"public function store() {\\n try {\\n $data = Input::all();\\n $this->validator->validate($data);\\n $data['valor'] = Helpers::toDecimal($data['valor']);\\n $data['vencimento'] = Helpers::dateDb($data['vencimento']);\\n $this->conta->fill($data)->save();\\n Session::flash('message', 'Conta criada com sucesso!');\\n return Redirect::route('admin.contas.edit', [$this->conta->id]);\\n } catch (InvalidArgumentException $e) {\\n return Redirect::route('admin.contas.create')->withErrors($e->getMessage())->withInput();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03c8e4645690d0e12be40f8303b5711d\",\n \"score\": \"0.58098084\",\n \"text\": \"public function store()\\n {\\n $this->setBillingCycles();\\n\\n $body = [\\n \\\"product_id\\\" => \\\"XRP-PROD-001\\\",\\n \\\"name\\\" => $this->name,\\n \\\"description\\\" => $this->description,\\n \\\"status\\\" => $this->status,\\n \\\"billing_cycles\\\" => [$this->billing_cycles],\\n \\\"payment_preferences\\\" => $this->payment_preferences,\\n \\\"taxes\\\" => $this->taxes,\\n ];\\n\\n try {\\n $response = $this->client->request(\\\"POST\\\", $this->store, [\\\"headers\\\" => $this->headers(), \\\"json\\\" => $body]);\\n } catch (ClientException $e) {\\n return $e->getMessage();\\n }\\n\\n return $response->getBody();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"130810cbfa71fb94195381385cf376c4\",\n \"score\": \"0.58057463\",\n \"text\": \"public function store(Request $request)\\n {\\n /*$emergencias = new Emergencias;\\n $emergencias->Institucion = request('Institucion');\\n $emergencias->Zona = request('Zona');\\n $emergencias->Telefono = request('Telefono'); \\n $emergencias->save();*/\\n //return redirect('practica/lista');\\n $emergencia = $this->emergencia->create($request->all());\\n return response()->json($emergencia);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68f875cbd20a6dbaaf3a2d1cdc7faff2\",\n \"score\": \"0.5756716\",\n \"text\": \"public function store(ComputerInsertFormRequest $request)\\n {\\n\\n $computer = new Computer();\\n $computer->local_id = $request->get('local_id');\\n $computer->brand =$request->get('brand');\\n $computer->model_or_serial = $request->get('model_or_serial');\\n $computer->specification = $request->get('specification');\\n $computer->company_id = $request->get('company_id');\\n $computer->ip_address = $request->get('ip_address');\\n\\n $live_year = $request->get('live_year');\\n if ($request->get('active') == 'year')\\n $active_live = $live_year * 12 ;\\n else\\n $active_live = $live_year;\\n\\n $computer->live_year =$active_live;\\n\\n $getprice = $request->get('price');\\n $usa_rate =floatval(preg_replace('/[^\\\\d.]/', '', $request->get('USA_rate')));\\n $eur_rate =floatval(preg_replace('/[^\\\\d.]/', '', $request->get('EUR_rate')));\\n $sgd_rate =floatval(preg_replace('/[^\\\\d.]/', '', $request->get('SGD_rate')));\\n if ($request->get('country') == \\\"USA\\\" )\\n $usa = $getprice * $usa_rate;\\n elseif ($request->get('country') == \\\"EUR\\\" )\\n $usa = $getprice * $eur_rate;\\n elseif ($request->get('country') == \\\"SGD\\\" )\\n $usa = $getprice * $sgd_rate;\\n else\\n $usa = $getprice;\\n\\n $computer->price = $usa;\\n $computer->bought_date = $request->get('bought_date');\\n\\n if($request->file('image')) {\\n $image = $request->file('image');\\n $image_name = date('YmdHis').\\\"_\\\". $image->getClientOriginalName();\\n $image_path = $_SERVER['DOCUMENT_ROOT']. \\\"/computers\\\";\\n $image->move($image_path,$image_name);\\n }else {$image_name = \\\"noimage.gif\\\";}\\n if ($request->file('warranty_card')) {\\n $warranty_card = $request->file('warranty_card');\\n $warranty_card_name = date('YmdHis') . \\\"_\\\" . $warranty_card->getClientOriginalName();\\n $warranty_card_path = $_SERVER['DOCUMENT_ROOT'] . \\\"/warrantyCards\\\";\\n $warranty_card->move($warranty_card_path, $warranty_card_name);\\n }else $warranty_card_name = \\\"noimage.gif\\\";\\n $computer->image = $image_name;\\n $computer->warranty_card = $warranty_card_name;\\n\\n $computer->save();\\n return redirect('backend/dropDowns/computers/index')->with('success','Successfully Inserted Data!');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c6beca3db8c550c50a63c05e5ecb2fc5\",\n \"score\": \"0.5755776\",\n \"text\": \"public function store(Request $request){ \\n $institucion = Helpers::codigo_inst_seleccionada();\\n\\n $ultimoId = $this->INCentroCosto($institucion);\\n $idMasUno = count($ultimoId)+1;\\n\\n $ultimoIdCorr = $this->codCorrelativo();\\n $codMasUno = count($ultimoIdCorr)+1;\\n try{\\n $centroCosto = new CentroCostos();\\n \\n $centroCosto->id = $codMasUno;\\n $centroCosto->ccDesc =$request->descCC;\\n $centroCosto->estatus = $request->tipo;\\n $centroCosto->INCodigo = $institucion;\\n $centroCosto->ccCod =$idMasUno; \\n\\n $centroCosto->save();\\n \\n $notificacion=Helpers::Notificaciones(true, 'success', '¡Exito!', 'El centro de costo se creo con éxito');\\n\\n }catch(Exception $e){\\n $notificacion=Helpers::Notificaciones(true, 'error', 'Error!', 'El centro de costo no se registro con éxito.');\\n }\\n return redirect()->action('CentroCostoController@index')->with($notificacion);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bad03adcdbeca7e9a7f0990fe6641b7e\",\n \"score\": \"0.5746824\",\n \"text\": \"public function store(CentroFormacionRequest $request)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5341dac5f674b713ed54604730ccb8d7\",\n \"score\": \"0.5727088\",\n \"text\": \"public function store(Request $request)\\n {\\n \\n $conductor = new Conductor;\\n\\n $conductor->rut = $request->rut;\\n $conductor->nombre = $request->nombre;\\n //$vehiculo->idUser = Auth::user()->id;\\n\\n $conductor->save();\\n\\n return redirect('sispam/conductores')->with('info', 'Conductor Registrado con Éxito !');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56c61086080d753d9e332e1a080acc40\",\n \"score\": \"0.5723747\",\n \"text\": \"public function store(Request $request) {\\n $data = $request->all();\\n $status = 0;\\n switch ($data['type_compromise_id']) {\\n case TypeCompromise::QUOTE_HOME:\\n $status = 1;\\n break;\\n case TypeCompromise::QUOTE_DISTANCE:\\n $status = 18;\\n break;\\n case TypeCompromise::SALE_NOTE:\\n $status = 3;\\n break;\\n case TypeCompromise::INFO_SEND:\\n $status = Carbon::parse($data['documents']['moment'])->day === Carbon::now()->day ? 17 : 16;\\n break;\\n }\\n\\n $cg = CGlobal::query()->create([\\n 'moment' => $data['moment'],\\n 'emit' => Carbon::now(),\\n 'client_id' => $data['client']['id'],\\n 'user_id' => $data['user_id'],\\n 'type_contact_id' => $data['type_contact_id'],\\n 'repeater' => $data['repeater'],\\n 'type_compromise_id' => $data['type_compromise_id'],\\n 'type_motive' => $data['type_motive'],\\n 'type_motive_id' => $data['type_motive_id'],\\n 'required_time' => $data['required_time'],\\n 'traser' => 1,\\n 'note' => $data['note'],\\n 'status_id' => $status\\n ]);\\n\\n $this->setID('cglobals', $cg->id);\\n\\n foreach ($data['info'] as $inf) {\\n CGlobalInfo::query()->create([\\n 'cglobal_id' => $cg->id,\\n 'type_info_id' => $inf['info']['id'],\\n 'type_info_detail_id' => $inf['info_det']['id'],\\n 'info_descrip' => $inf['info_descrip']\\n ]);\\n }\\n\\n // CREANDO COTIZACION A DOMICILIO\\n\\n $client = Client::query()->find($data['client']['id']);\\n\\n if ($data['type_compromise_id'] === TypeCompromise::QUOTE_HOME) {\\n\\n $cg->LandScaper()->create($data['landscaper']);\\n\\n $user_email = User::query()->where('uid', $data['landscaper']['user_uid'])->first();\\n\\n $generador = User::query()->where('id', $data['user_id'])->first();\\n\\n $data_email = [\\n 'user' => $user_email,\\n 'generador' => $generador->name,\\n 'visit' => $data['landscaper'],\\n 'client' => $client,\\n 'company' => Company::query()->find(1),\\n ];\\n // ENVIANDO ALERTA A PAISAJISTA\\n // SendMails::dispatch(new AlertLandscape($data_email), $user_email->email);\\n Mail::to($user_email->email)->send(new AlertLandscape($data_email));\\n\\n Calendar::query()->create([\\n 'cglobal_id' => $cg->id,\\n 'user_id' => $data['user_id'],\\n 'for_user_id' => 0,\\n 'start' => Carbon::parse($data['landscaper']['moment'] . ' '.$data['landscaper']['timer']),\\n 'end' => Carbon::parse($data['landscaper']['moment'] . ' '.$data['landscaper']['timer'])->addHours(2),\\n 'title' => 'Visita a cliente: ' . $client->name,\\n 'contentFull' => 'DOMICILIO: ' . $client->street . ' '. $client->home_number . ' '. $client->colony . ' / NOTA: '. $data['landscaper']['note'],\\n 'class' => 'domicilio'\\n ]);\\n\\n Quote::query()->create([\\n 'cglobal_id' => $cg->id,\\n 'type_quote_id' => 1,\\n 'token' => random_int(0,99999),\\n 'moment' => Carbon::now(),\\n 'emit' => Carbon::now(),\\n 'status_id' => 1,\\n ]);\\n\\n return response()->json('Se generó un evento de visita en el calendario y se informo al paisajista!');\\n }\\n\\n\\n if ($data['type_compromise_id'] === TypeCompromise::INFO_SEND) {\\n\\n $cg->Documents()->create($data['documents']);\\n\\n Calendar::query()->create([\\n 'cglobal_id' => $cg->id,\\n 'user_id' => $data['user_id'],\\n 'for_user_id' => 0,\\n 'start' => Carbon::parse($data['documents']['moment'] . ' 8:00'),\\n 'end' => Carbon::parse($data['documents']['moment'] . ' 18:00'),\\n 'allDay' => 1,\\n 'contentFull' => ' DOMICILIO: ' . $client->street . ' '. $client->home_number . ' '. $client->colony,\\n 'title' => 'Información a: ' .$client->name ,\\n 'class' => 'info'\\n ]);\\n\\n return response()->json('Se generó un evento de envio de información a cliente!');\\n }\\n\\n if ($data['type_compromise_id'] === TypeCompromise::SALE_NOTE) {\\n\\n $sale = SalesNote::create([\\n 'global_id' => $cg->id,\\n 'moment' => Carbon::now(),\\n 'emit' => Carbon::now(),\\n 'advance' => 0,\\n 'origin' => SalesNote::ORIGIN_CAG,\\n 'status_id' => 3,\\n ]);\\n\\n return response()->json(['id'=>$sale->id]);\\n }\\n\\n if ($data['type_compromise_id'] === TypeCompromise::QUOTE_DISTANCE) {\\n $quote = Quote::query()->create([\\n 'cglobal_id' => $cg->id,\\n 'type_quote_id' => 2,\\n 'token' => mt_rand(0,99999),\\n 'moment' => Carbon::now(),\\n 'emit' => Carbon::now(),\\n 'status_id' => 2,\\n ]);\\n return response()->json(['id'=>$quote->id]);\\n }\\n\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"835dc50bea0c30632bcfc83e866ef57d\",\n \"score\": \"0.5684494\",\n \"text\": \"public function store($sec, Request $request)\\n {\\n $compromiso = new Compromiso;\\n $compromiso->id_lider = $request->input('id_lider');\\n $compromiso->nombre = $request->input('nombre');\\n $compromiso->descripcion = $request->input('descripcion');\\n $compromiso->cumplimiento = $request->input('cumplimiento');\\n $compromiso->costo = $request->input('costo');\\n\\n $compromiso->save();\\n\\n return redirect('/Administracion/'.$sec.'/Compromisos')->with('success', 'Compromiso creado');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fad5779d0172a9db04b02dd692ec17f\",\n \"score\": \"0.56778353\",\n \"text\": \"public function store(Request $request)\\n {\\n $request->validate([\\n 'empresa_id' => 'required|unique:cau',\\n ]);\\n\\n $date_inicio = $request->get('data_inicio');\\n $date_fim = $request->get('data_fim');\\n $date_doc = $request->get('data_doc');\\n\\n $cau = new cau();\\n $cau->empresa_id = $request->get('empresa_id');\\n $cau->agente_integracao = $request->get('agente_integracao');\\n $cau->data_inicio = Carbon::createFromFormat('d/m/Y', $date_inicio)->format('Y-m-d');\\n $cau->data_fim = Carbon::createFromFormat('d/m/Y', $date_fim)->format('Y-m-d');\\n $cau->data_doc = Carbon::createFromFormat('d/m/Y', $date_doc)->format('Y-m-d');\\n $cau->obs = $request->get('obs');\\n // dd($cau);\\n $cau->save();\\n\\n $request->session()->flash('success', 'Cadastrado com sucesso!');\\n return redirect('cau_convenio');\\n\\n // return redirect()->route('cau_convenio.index')\\n // ->with('success', 'Cadastrado com sucesso.');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1663439e4f253318f25f9b67c61398c4\",\n \"score\": \"0.5677689\",\n \"text\": \"public function store(Request $request)\\n {\\n $calle = new Calle();\\n\\n $calle->idbarrio = $request->input('idbarrio');\\n $calle->namecalle = $request->input('nombrecalle');\\n $calle->fechaingreso = date('Y-m-d');\\n\\n $calle->save();\\n\\n return response()->json(['success' => true]);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fcc5e8ae84a36562961c55c0bed76ffb\",\n \"score\": \"0.56738746\",\n \"text\": \"public function store(StoreCelsRequest $request)\\n {\\n $request = $this->saveFiles($request);\\n $cel = Cel::create($request->all());\\n return redirect()->route('cels.index');\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6a240fa78c11959127c6d30997a11cd9\",\n \"score\": \"0.56656355\",\n \"text\": \"public function store(CocheCreateRequest $request)\\n {\\n $coche = new Coche($request->all());\\n $coche->iduser = auth()->user()->id;\\n $archivo = null;\\n \\n if($request->hasFile('foto')){\\n if($request->file('foto')->isValid()) {\\n $archivo = $request->file('foto');\\n $path = $archivo->getRealPath();\\n $imagen = $this->reduceImage($path);\\n $coche->foto = base64_encode($imagen); \\n } \\n }\\n try {\\n $result = $coche->save();\\n if($archivo != null){\\n $fecha = new \\\\DateTime();\\n $nombre = $fecha->getTimestamp() . '.' . $archivo->extension(); //nombre con el que se guarda el archivo en el storage\\n $archivo->storeAs('public/images/'. $coche->iduser . '/' . $coche->id, $nombre);\\n }\\n } catch(\\\\Exception $e) {\\n return redirect('coche/index')->withInput()->withErrors(['error' => 'Se ha producido un error al guardar los datos del vehiculo.']);\\n }\\n return redirect('coche/index')->with(['store' => 'Se ha publicado su vehiculo correctamente']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8e02d63513e246652999042acd9f77df\",\n \"score\": \"0.5663955\",\n \"text\": \"public function store(Request $request)\\n {\\n \\n $solicitud = new AsignarServicio();\\n $solicitud->descripcion = $request->descripcion;\\n $solicitud->estado = 'E';\\n $solicitud->fecha = date('d/m/Y H:i:s');\\n $solicitud->fkidcliente = $request->cliente;\\n $solicitud->fkidservicio = $request->servicio;\\n $solicitud->save();\\n DB::table('cliente')\\n ->where('idcliente','=',$request->cliente)\\n ->update(['fkidzona'=>2 ]);\\n \\n return redirect()->route('admin.solicitud.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52ab8a635aa1240b4e4d61172fa0d733\",\n \"score\": \"0.566306\",\n \"text\": \"public function store()\\n {\\n $inputs = Input::except( '_token', 'characteristic_id');\\n $race = Input::except( '_token', 'characteristic_id', 'characteristic_date', 'characteristic_racial_type', 'characteristic_aggressivness_level', 'characteristic_swarming_level', 'characteristic_winter_hardiness_level', 'characteristic_wake_up_month', 'characteristic_comment' );\\n\\n $race['name'] = [ 'name' => $race[ 'name' ] ]; // dans l'attente de modification ws $race_name\\n\\n $characteristics = [];\\n foreach ( $inputs as $key => $input )\\n if( str_contains( $key, 'characteristic_' ) )\\n $characteristics[ str_replace( 'characteristic_', '', $key ) ] = $input;\\n\\n $characteristics['racial_type'] = null;// dans l'attente de modification ws $characteristics_race_name\\n\\n $characteristics[ 'date' ] = date( 'Y-m-d', strtotime( $characteristics[ 'date' ] ) );\\n\\n $response_characteristic = BeeTools::entityStore( $characteristics, 'characteristics' );\\n $view = BeeTools::isError( $response_characteristic );\\n if( $view ) return $view;\\n\\n $race['characteristic'] = $response_characteristic;\\n\\n $race = BeeTools::cleanElement( $race );\\n $response_race = BeeTools::entityStore( $race, 'races' );\\n $view = BeeTools::isError( $response_race );\\n if( $view ) return $view;\\n\\n return Redirect::to( 'races' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"211cd61b20176ed728a8d66a3a77b1d3\",\n \"score\": \"0.56602544\",\n \"text\": \"public function store(Request $request)\\n {\\n $censado = new Registered();\\n\\n $ultimo = Registered::all()->last();\\n if ($ultimo) {\\n $numerolegajo = $ultimo->numerolegajo;\\n } else {\\n $numerolegajo = 10000;\\n }\\n\\n $censado->nombre = $request->nombre;\\n $censado->apellido = $request->apellido;\\n $censado->dni = $request->dni;\\n $censado->fechanacimiento = $request->fechanacimiento;\\n $censado->sexo = $request->sexo;\\n $censado->estadocivil = $request->estadocivil;\\n $censado->ocupacion = $request->ocupacion;\\n $censado->localidad_id = $request->localidad_id;\\n $censado->situacionresidencial_id = $request->situacionresidencial_id;\\n $censado->direccion = $request->direccion;\\n $censado->entornofamiliar = $request->entornofamiliar;\\n $censado->telefono = $request->telefono;\\n $censado->formacionescolar = $request->formacionescolar;\\n\\n $censado->numerocertificadod = $request->numerocertificadod;\\n $censado->fechaemision = $request->fechaemision;\\n $censado->fechavencimiento = $request->fechavencimiento;\\n $censado->entidadcertificado = $request->entidadcertificado;\\n $censado->obrasocial_id = $request->obrasocial_id;\\n $censado->observacion = $request->observacion;\\n $numerolegajo++;\\n $censado->numerolegajo = $numerolegajo;\\n $censado->legajo = 'CE' . $numerolegajo;\\n\\n $censado->save();\\n\\n //ver attach institucioneucativa\\n $censado->schoolings()->attach($request->institucioneducativa_id);\\n\\n //ver pension\\n $censado->pensions()->attach($request->pension);\\n\\n //ver patologia\\n $censado->pathologies()->attach($request->patologia);\\n\\n //tratamiento\\n $censado->treatments()->attach($request->tratamiento);\\n\\n toastr()->success('Se ha registrado correctamente el censado');\\n\\n\\n return redirect()->route('censado.show', $censado->id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"624ecbff7de8265f723abbce14147079\",\n \"score\": \"0.5658977\",\n \"text\": \"public function store(Request $request)\\n {\\n\\n $course= new Course;\\n $course->course_name=$request->input('name');\\n $course->course_desc=$request->input('description');\\n //send the id of auth center to save it's data to DB\\n\\n $adminId=auth()->guard('institute')->user()->id;\\n Institute::find($adminId)->cities()->save($course,['city_id'=> $request->input('address'),\\n 'branch_name'=>$request->input('value')\\n ]);\\n\\n Institute::find($adminId)->courses()->save($course,['duration'=>$request->input('duration'),\\n 'co_sc_sDate'=>$request->input('start-date'),\\n 'trainer'=>$request->input('trainer'),\\n 'co_sc_price'=>$request->input('price'),\\n ]);\\n\\n\\n return redirect('/centers');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e15a8d1da33db26e9daadce06e567736\",\n \"score\": \"0.56571937\",\n \"text\": \"public function store()\\n {\\n $form = $this->getForm();\\n $data = $form->getFieldValues();\\n $form->redirectIfNotValid();\\n\\n $slug = Str::slug($form->getFieldValues()['name']);\\n $data = array_merge($data,compact('slug'));\\n\\n Region::create($data);\\n\\n return redirect()->route('admin.settings.regions.index')->with('success','Une region a été créée avec succès!');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a59c170c3fca3e65cb1895035836d7f\",\n \"score\": \"0.5654032\",\n \"text\": \"public function store(Request $request)\\n {\\n $celular = '844552968';\\n $valor = 10;\\n $reference = '7y7y7y37t3g';\\n// $recharge = Recharge::create($request->only(['reference', 'value','code']));\\n// $recharge->save();\\n $client = new Client ([\\n 'apiKey' =>'5rqh0hssv2qtmp9648ys9nt83l0w65o2',\\n 'publicKey' => 'MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAmptSWqV7cGUUJJhUBxsMLonux24u+FoTlrb+4Kgc6092JIszmI1QUoMohaDDXSVueXx6IXwYGsjjWY32HGXj1iQhkALXfObJ4DqXn5h6E8y5/xQYNAyd5bpN5Z8r892B6toGzZQVB7qtebH4apDjmvTi5FGZVjVYxalyyQkj4uQbbRQjgCkubSi45Xl4CGtLqZztsKssWz3mcKncgTnq3DHGYYEYiKq0xIj100LGbnvNz20Sgqmw/cH+Bua4GJsWYLEqf/h/yiMgiBbxFxsnwZl0im5vXDlwKPw+QnO2fscDhxZFAwV06bgG0oEoWm9FnjMsfvwm0rUNYFlZ+TOtCEhmhtFp+Tsx9jPCuOd5h2emGdSKD8A6jtwhNa7oQ8RtLEEqwAn44orENa1ibOkxMiiiFpmmJkwgZPOG/zMCjXIrrhDWTDUOZaPx/lEQoInJoE2i43VN/HTGCCw8dKQAwg0jsEXau5ixD0GUothqvuX3B9taoeoFAIvUPEq35YulprMM7ThdKodSHvhnwKG82dCsodRwY428kg2xM/UjiTENog4B6zzZfPhMxFlOSFX4MnrqkAS+8Jamhy1GgoHkEMrsT5+/ofjCx0HjKbT5NuA2V/lmzgJLl3jIERadLzuTYnKGWxVJcGLkWXlEPYLbiaKzbJb2sYxt+Kt5OxQqC1MCAwEAAQ==',\\n 'serviceProviderCode' => '171717'\\n ]);\\n\\n if(!empty($celular) || !empty($valor) || !empty($reference)){\\n $paymentData = [\\n 'from' => '258' . $celular, // input_CustomerMSISDN\\n 'reference' => $reference, // input_ThirdPartyReference\\n 'transaction' => 'T12344CC', // input_TransactionReference\\n 'amount' => $valor // input_Amount\\n ];\\n\\n $result = $client->receive($paymentData);\\n\\n if ($result->success) {\\n dd( \\\"Pagamento efectuado!\\\");\\n } else {\\n dd(\\\"Falha ao processar pagamento\\\");\\n }\\n }else{\\n dd(\\\"Preencha todos os campos do formulário\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"658ec2c4333b9616c0cd5aed6d39a040\",\n \"score\": \"0.56514955\",\n \"text\": \"public function store(){\\n $json = $this->list();\\n $bg = new BienesGenerales();\\n\\n $bg->id = $_REQUEST['id'];\\n\\n //? Busco mi elemento con el id y traigo sus datos\\n $bien = $this->searchBienGeneral($bg->id, $json);\\n\\n $bg->direccion = $bien['Direccion'];\\n $bg->ciudad = $bien['Ciudad'];\\n $bg->telefono = $bien['Telefono'];\\n $bg->codigo_postal = $bien['Codigo_Postal'];\\n $bg->tipo = $bien['Tipo'];\\n\\n //* Damos formato al precio \\n $precio = $bien['Precio'];\\n\\n $precio = str_replace(\\\",\\\",\\\".\\\",$precio);\\n $precio = str_replace(\\\"$\\\",\\\"\\\",$precio);\\n\\n $bg->precio = $precio;\\n\\n if($this->model->Unico($bg->id)){\\n $this->mensaje=array(\\\"Advertencia\\\", \\\"Ya fue registrado\\\");\\n } else {\\n $this->model->Registrar($bg);\\n $this->mensaje=array(\\\"Guardado\\\", \\\"Registrado Correctamente\\\");\\n }\\n\\n $this->index();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"148baafdecd83c676c510f421c0aae98\",\n \"score\": \"0.56485337\",\n \"text\": \"public function store(SpecificateRequest $request)\\n {\\n $storage = new Storage();\\n $storage->fill([\\n 'storage' => $request->storage,\\n ]);\\n $storage->save();\\n return redirect()->route('admin.specificate.storage.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b6e626abfe939e19874500ca299f7f0\",\n \"score\": \"0.5632344\",\n \"text\": \"public function store(Request $request)\\n {\\n $solar_meter = SolarMeter::firstOrCreate([\\n 'name' => $request->name,\\n 'units' => $request->value_type,\\n 'description'=>''\\n ]);\\n $all_params = $request->all();\\n $all_params['meter_id']=$solar_meter->id;\\n $all_params['timestamp']=time();\\n if (!is_string($all_params['serialized'])){\\n $all_params['serialized']=json_encode($all_params['serialized']);\\n }\\n $res = SolarPower::create($all_params);\\n\\n return response()->json([\\n 'payload' => [$res],\\n 'errors' => []\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b9b9d4a7b2e9c101cec72a06bb11c5d\",\n \"score\": \"0.56317055\",\n \"text\": \"public function storeasptranse(Request $request) {\\n //aspirante, datos personales, datos de ubicacion, circunscripcion\\n $aspi = new Aspirante();\\n $aspi->tipodoc_id = (isset($request->tipodoc_id)) ? $request->tipodoc_id : 0;\\n $aspi->numerodocumento = (isset($request->numero_documento)) ? $request->numero_documento : 0;\\n $aspi->lugar_expedicion = (isset($request->lugar_expedicion)) ? $request->lugar_expedicion : null;\\n $aspi->fecha_expedicion = (isset($request->fecha_expedicion)) ? $request->fecha_expedicion : null;\\n $aspi->sexo = (isset($request->sexo)) ? $request->sexo : null;\\n $aspi->estatura = (isset($request->estatura)) ? $request->estatura : null;\\n $aspi->primer_nombre = (isset($request->primer_nombre)) ? $request->primer_nombre : \\\"\\\";\\n $aspi->segundo_nombre = (isset($request->segundo_nombre)) ? $request->segundo_nombre : null;\\n $aspi->primer_apellido = (isset($request->primer_apellido)) ? $request->primer_apellido : \\\"\\\";\\n $aspi->segundo_apellido = (isset($request->segundo_apellido)) ? $request->segundo_apellido : null;\\n $aspi->libreta_militar = (isset($request->libreta_militar)) ? $request->libreta_militar : null;\\n $aspi->claselibretamilitar = (isset($request->clase_libreta_militar)) ? $request->clase_libreta_militar : null;\\n $aspi->distrito_militar = (isset($request->distrito_militar)) ? $request->distrito_militar : null;\\n $aspi->tiposanguineo = (isset($request->tipo_sanguineo)) ? $request->tipo_sanguineo : null;\\n if (isset($request->eps)) {\\n if ($request->eps == \\\"OTRA\\\") {\\n $aspi->eps = $request->aspi_eps;\\n } else {\\n $aspi->entidadsalud_id = $request->eps;\\n }\\n }\\n $aspi->estadocivil_id = (isset($request->estado_civil)) ? $request->estado_civil : null;\\n $aspi->pais_nacimiento = (isset($request->pais_id)) ? $request->pais_id : null;\\n $aspi->dpto_nacimiento = (isset($request->dpto_id)) ? $request->dpto_id : null;\\n $aspi->ciudad_nacimiento = (isset($request->ciudad_id)) ? $request->ciudad_id : null;\\n $aspi->fecha_nacimiento = (isset($request->fecha_nacimiento)) ? $request->fecha_nacimiento : null;\\n $aspi->numerovisa = (isset($request->numero_visa)) ? $request->numero_visa : null;\\n $aspi->estadovisa = (isset($request->estado_visa)) ? $request->estado_visa : null;\\n $aspi->fechavencevisa = (isset($request->fechavence_visa)) ? $request->fechavence_visa : null;\\n $aspi->mediodivulgacion_id = (isset($request->mediodivulgacion_id)) ? $request->mediodivulgacion_id : null;\\n $aspi->nivelacademico = (isset($request->nivelacademico)) ? $request->nivelacademico : null;\\n $aspi->nivel_educativo_id = (isset($request->nivel_educativo_id)) ? $request->nivel_educativo_id : null;\\n $aspi->circunscripcion_id = (isset($request->circunscripcion_id)) ? $request->circunscripcion_id : null;\\n $aspi->pais_residencia = (isset($request->pais2_id)) ? $request->pais2_id : null;\\n $aspi->dpto_residencia = (isset($request->dpto2_id)) ? $request->dpto2_id : null;\\n $aspi->ciudad_residencia = (isset($request->ciudad2_id)) ? $request->ciudad2_id : null;\\n $aspi->sectorciudad_id = (isset($request->sectorciudad_id)) ? $request->sectorciudad_id : null;\\n $aspi->direccion_residencia = (isset($request->direccion_aspirante)) ? $request->direccion_aspirante : null;\\n $aspi->barrio_residencia = (isset($request->barrio_aspirante)) ? $request->barrio_aspirante : null;\\n $aspi->barrio_id = (isset($request->barrio_id)) ? $request->barrio_id : null;\\n $aspi->vereda_residencia = (isset($request->vereda_aspirante)) ? $request->vereda_aspirante : null;\\n $aspi->etnia = (isset($request->etnia_aspirante)) ? $request->etnia_aspirante : null;\\n $aspi->telefono_residencia = (isset($request->telefono_contacto)) ? $request->telefono_contacto : null;\\n $aspi->telefonocelular = (isset($request->telefono_celular)) ? $request->telefono_celular : null;\\n $aspi->email = (isset($request->correo)) ? $request->correo : null;\\n $aspi->dpto_residenciasec = (isset($request->dpto3_id)) ? $request->dpto3_id : null;\\n $aspi->ciudad_residenciasec = (isset($request->ciudad3_id)) ? $request->ciudad3_id : null;\\n $aspi->direccion_residenciasec = (isset($request->direccion_ec)) ? $request->direccion_ec : null;\\n $aspi->direccion_estudio = (isset($request->direccion_ciudade)) ? $request->direccion_ciudade : null;\\n $aspi->telefonoestudio = (isset($request->telefono_ciudade)) ? $request->telefono_ciudade : null;\\n $response = null;\\n if (count($aspi) > 0) {\\n if ($aspi->save()) {\\n $response = $response . \\\"

    Se guardó la información básica del aspirante

    \\\";\\n //formulario, pin\\n $foin = new Formularioinscripcion();\\n $foin->medioinscripcion = \\\"ON LINE\\\";\\n $foin->simultaneidad = \\\"NINGUNO\\\";\\n $foin->aspirante_id = $aspi->id;\\n $foin->estadoadmision = \\\"ASPIRANTE\\\";\\n $foin->tipoinscripcion_id = 4;\\n $pin = Pin::where('pin', $request->pin)->first();\\n if (count($pin) > 0) {\\n if ($pin->estado == \\\"USADO\\\") {\\n $foin->pin_id = $pin->id;\\n } else {\\n //no puede seguir la inscripcion\\n flash(\\\"El PIN que ingresó no ha sido vendido en el banco. Si usted compro el PIN, por favor Acérquese a la oficina de registro y control para validar su PIN.\\\")->error();\\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\\n }\\n } else {\\n //no puede seguir la inscripcion\\n flash(\\\"El PIN que ingresó es inválido. No puede continuar.\\\")->error();\\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\\n }\\n if (count($foin) > 0) {\\n if ($foin->save()) {\\n $response = $response . \\\"

    Se ha creado el formulario de inscripción del aspirante

    \\\";\\n//estudios secundarios\\n $esse = new Estudiossecundario();\\n $esse->pais = (isset($request->paisn_id)) ? $request->paisn_id : null;\\n $esse->ciudad = (isset($request->ciudadn_id)) ? $request->ciudadn_id : null;\\n $esse->codigo_snp = (isset($request->iem_id)) ? $request->iem_id : null;\\n $esse->enfasis_mod_sec = (isset($request->enfasis)) ? $request->enfasis : null;\\n $esse->fechaterminacion = (isset($request->ft)) ? $request->ft : null;\\n $esse->formaobtuvotitulo = (isset($request->forma_obt_titulo)) ? $request->forma_obt_titulo : null;\\n $esse->valormatricula10 = (isset($request->vmd)) ? $request->vmd : null;\\n $esse->valorpension10 = (isset($request->vpd)) ? $request->vpd : null;\\n $esse->valorpension11 = (isset($request->vpu)) ? $request->vpu : null;\\n $esse->valormatricula11 = (isset($request->vmu)) ? $request->vmu : null;\\n $esse->libro = (isset($request->libro)) ? $request->libro : null;\\n $esse->folio = (isset($request->folio)) ? $request->folio : null;\\n $esse->snp = (isset($request->snp_aspirante)) ? $request->snp_aspirante : null;\\n $esse->puntajeobtenido = (isset($request->poes)) ? $request->poes : null;\\n $esse->ciudadpresentoprueba = (isset($request->ciudad5_id)) ? $request->ciudad5_id : null;\\n $esse->fechapresentopruebas = (isset($request->fpes)) ? $request->fpes : null;\\n if ($esse->fechapresentopruebas !== null) {\\n $time = strtotime($esse->fechapresentopruebas);\\n $newformat = date('Y-m-d', $time);\\n $fff = explode(\\\"-\\\", $newformat);\\n $aniop = $fff[0];\\n $mesp = $fff[1];\\n if ($aniop < 2014) {\\n $esse->tipoprueba = \\\"ANTIGUA\\\";\\n }\\n if ($aniop == 2014 && $mesp < 6) {\\n $esse->tipoprueba = \\\"ANTIGUA\\\";\\n }\\n if ($aniop == 2014 && $mesp > 6) {\\n $esse->tipoprueba = \\\"NUEVA\\\";\\n }\\n if ($aniop > 2014) {\\n $esse->tipoprueba = \\\"NUEVA\\\";\\n }\\n }\\n $esse->tipodocicfes = (isset($request->tipodoc_prueba)) ? $request->tipodoc_prueba : null;\\n $esse->documentoicfes = (isset($request->dipi)) ? $request->dipi : null;\\n $esse->aspirante_id = $aspi->id;\\n if (count($esse) > 0) {\\n if ($esse->save()) {\\n $response = $response . \\\"

    Se guardó la información de estudios secundarios

    \\\";\\n }\\n }\\n $tb1 = $tb2 = $tb3 = $tb4 = $tb5 = $tb6 = $tb7 = $tb8 = $tb9 = $tb10 = $tb11 = $tb12 = $tb13 = $tb14 = $tb15 = $tb16 = null;\\n //tb1 lista inst en las que estudió institucionsecundaria\\n if (isset($request->tb1)) {\\n foreach ($request->tb1 as $value) {\\n $is = new Institucionsecundaria();\\n $v = explode(\\\";\\\", $value);\\n $is->institucionestudio = (strlen($v[0]) > 0) ? $v[0] : null;\\n $is->fechainicial = (strlen($v[1]) > 0) ? $v[1] : date('Y-m-d', strtotime('00-00-0000'));\\n $is->fechafin = (strlen($v[2]) > 0) ? $v[2] : date('Y-m-d', strtotime('00-00-0000'));\\n $is->aspirante_id = $aspi->id;\\n $tb1[] = $is;\\n }\\n }\\n if (count($tb1) > 0) {\\n foreach ($tb1 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de instituciones donde estudió.

    \\\";\\n }\\n //tb6 familiares\\n if (isset($request->tb6)) {\\n foreach ($request->tb6 as $value) {\\n $g = new Grupofamiliar();\\n $v = explode(\\\";\\\", $value);\\n $g->sitiotrabajoestudio = $v[0];\\n $g->ciudad = $v[1];\\n $g->parentesco_id = (count($v[4]) > 0) ? $v[4] : 0;\\n $g->cedula = $v[5];\\n $g->nombrecompleto = $v[6];\\n $g->vive = $v[7];\\n $g->ocupacion = $v[8];\\n $g->profesion = $v[9];\\n $g->edad = $v[10];\\n $g->niveleducativo = $v[11];\\n $g->ingresomensual = $v[12];\\n $g->ingresomensual_rango = $v[13];\\n $g->lee = $v[14];\\n $g->ciudadresidencia = $v[16];\\n $g->direccion = $v[17];\\n $g->telefonoresidencia = $v[18];\\n $g->ciudadresidencia = $v[19];\\n $g->direccionempresa = $v[20];\\n $g->celular = $v[21];\\n $g->aspirante_id = $aspi->id;\\n $tb6[] = $g;\\n }\\n }\\n if (count($tb6) > 0) {\\n foreach ($tb6 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de familiares.

    \\\";\\n }\\n //informacion socioeconomica\\n $ise = new Informacionsocioeconomica();\\n $ise->situacionpadres = (isset($request->sdlp)) ? $request->sdlp : null;\\n $ise->numerofamiliares = (isset($request->nmf)) ? $request->nmf : null;\\n $ise->numeromiembrostrabaja = (isset($request->pqt)) ? $request->pqt : null;\\n $ise->numerohermanos = (isset($request->nhise)) ? $request->nhise : null;\\n $ise->posicionhermanos = (isset($request->pelh)) ? $request->pelh : null;\\n $ise->ingresomensualfamilia = (isset($request->imaf)) ? $request->imaf : null;\\n $ise->egresomensualfamilia = (isset($request->emaf)) ? $request->emaf : null;\\n $ise->hermanosestudiandou = (isset($request->nheu)) ? $request->nheu : null;\\n $ise->viveconfamilia = (isset($request->vcsf)) ? $request->vcsf : null;\\n $ise->numhermanosestudiaunivers = (isset($request->nhceu)) ? $request->nhceu : null;\\n $ise->quiencosteaestudios = (isset($request->cdse)) ? $request->cdse : null;\\n $ise->conquienreside = (isset($request->edr)) ? $request->edr : null;\\n $ise->estrato = (isset($request->eise)) ? $request->eise : null;\\n $ise->situacioneconomica = (isset($request->se)) ? $request->se : null;\\n $ise->sufragoelecciones = (isset($request->selue)) ? $request->selue : null;\\n $ise->rentagravable = (isset($request->rg)) ? $request->rg : null;\\n $ise->patrimoniogravable = (isset($request->pg)) ? $request->pg : null;\\n $ise->ingresoretenciones = (isset($request->iyr)) ? $request->iyr : null;\\n $ise->sisben = (isset($request->tsise)) ? $request->tsise : null;\\n $ise->nivelsisben = (isset($request->nivelsisben)) ? $request->nivelsisben : null;\\n $ise->cajacompensacion = (isset($request->ccf)) ? $request->ccf : null;\\n $ise->ingresosnogravables = (isset($request->ing)) ? $request->ing : null;\\n $ise->patrimoniobruto = (isset($request->pb)) ? $request->pb : null;\\n $ise->ingresobruto = (isset($request->ib)) ? $request->ib : null;\\n $ise->rentanogravable = (isset($request->rng)) ? $request->rng : null;\\n $ise->ingresosgravables = (isset($request->ig)) ? $request->ig : null;\\n $ise->aspirante_id = $aspi->id;\\n if (count($ise) > 0) {\\n if ($ise->save()) {\\n $response = $response . \\\"

    Se guardó la información socioeconómica.

    \\\";\\n }\\n }\\n //tb13 idiomas\\n if (isset($request->tb13)) {\\n foreach ($request->tb13 as $value) {\\n $ep = new Idiomaaspirante();\\n $v = explode(\\\";\\\", $value);\\n $ep->idioma_id = $v[0];\\n $ep->oir = $v[1];\\n $ep->habla = $v[2];\\n $ep->lee = $v[3];\\n $ep->escribe = $v[4];\\n $ep->aspirante_id = $aspi->id;\\n $tb13[] = $ep;\\n }\\n }\\n if (count($tb13) > 0) {\\n foreach ($tb13 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de idiomas.

    \\\";\\n }\\n //tb14 pasatiempos\\n if (isset($request->tb14)) {\\n foreach ($request->tb14 as $value) {\\n $ep = new Pasatiempoaspirante();\\n $v = explode(\\\";\\\", $value);\\n $ep->pasatiempo_id = $v[0];\\n $ep->aspirante_id = $aspi->id;\\n $tb14[] = $ep;\\n }\\n }\\n if (count($tb14) > 0) {\\n foreach ($tb14 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de pasatiempos.

    \\\";\\n }\\n flash($response)->success();\\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\\n } else {\\n $foin->delete();\\n $aspi->delete();\\n flash(\\\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\\\")->error();\\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\\n }\\n } else {\\n $aspi->delete();\\n flash(\\\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\\\")->error();\\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\\n }\\n } else {\\n $aspi->delete();\\n flash(\\\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\\\")->error();\\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\\n }\\n } else {\\n flash(\\\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\\\")->error();\\n return redirect()->route('inscripcion.agregaraspte', $request->nivel_educativo_id);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fc8939e1262c8edc26db048ca14d7f52\",\n \"score\": \"0.56270176\",\n \"text\": \"public function store(Request $request)\\n {\\n$dados = $request->all();\\nCozinha::create($dados);\\nreturn redirect()->route('cozinhas.index');\\n\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af38732a19ec96d86008a0b93e637600\",\n \"score\": \"0.562443\",\n \"text\": \"public function store(StoreCEO $request)\\n {\\n $validated = $request->validated();\\n CEO::create($validated);\\n return redirect(route('ceo.index'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c2beab841180f9cf83e579358004da1\",\n \"score\": \"0.56147045\",\n \"text\": \"public function store(Request $request) \\n {\\n //dd($request->all());\\n\\n $Strain = Strain::create([\\n 'strainName' => $request['strainName'],\\n 'systemID' => app('system')->id, // from appServiceprovider\\n 'testingStatus' => $request['testingStatus'],\\n 'floweringTimeInDays' => $request['floweringTimeInDays'],\\n 'genetics' => $request['genetics'],\\n 'operatorUserName' => Auth::user()->username,\\n 'created_at' => Carbon::now()->toDateTimeString(),\\n 'updated_at' => Carbon::now()->toDateTimeString(),\\n ]);\\n\\n return redirect('strains');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c47171eac1ae6b9ee15e46019f7a6ca8\",\n \"score\": \"0.56116235\",\n \"text\": \"public function store() {\\n\\n\\t\\t$input = Input::all();\\n\\t\\t//echo json_encode($input);\\n\\t\\t//exit;\\n\\t\\t$clienteInstance = new Cliente();\\n\\t\\t$clienteInstance -> numcte = $input['numcte'];\\n\\t\\t$clienteInstance -> nomcte = $input['nomcte'];\\n\\t\\t$clienteInstance -> rfccte = $input['rfccte'];\\n\\t\\t$clienteInstance -> dircte = $input['dircte'];\\n\\t\\t$clienteInstance -> nlecte = $input['nlecte'];\\n\\t\\t$clienteInstance -> nlicte = $input['nlicte'];\\n\\t\\t$clienteInstance -> colcte = $input['colcte'];\\n\\t\\t$clienteInstance -> pobcte = $input['pobcte'];\\n\\t\\t$clienteInstance -> estado = $input['estado'];\\n\\t\\t$clienteInstance -> pais = $input['pais'];\\n\\t\\t$clienteInstance -> telcte = $input['telcte'];\\n\\t\\t$clienteInstance -> mailcte = $input['mailcte'];\\n\\t\\t$clienteInstance -> usuarioInsert_id = 1;\\n\\t\\t$clienteInstance -> save();\\n\\t\\treturn Redirect::action('ClienteController@show', array($clienteInstance -> id));\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6574a9afe7e3a2f8d723e14ecb0b9a86\",\n \"score\": \"0.5601652\",\n \"text\": \"public function store(CreateSerieRequest $request)\\n {\\n $serie = Serie::create($request->all());\\n\\n return redirect()->route('series.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b35844fbca373a04f079101c5079168\",\n \"score\": \"0.5601288\",\n \"text\": \"public function store(Request $request){\\n //'Precio_venta', 'Stock', 'Descripcion', 'Condicion'];\\n $articulo = new Articulo;\\n $articulo->categoria = $request->categoria;\\n $articulo->codigo = $request->codigo;\\n $articulo->nombre = $request->nombre;\\n $articulo->precio_venta = $request->precio_venta;\\n $articulo->stock = $request->stock;\\n $articulo->descripcion = $request->descripcion;\\n $articulo->condicion = 1;\\n\\n $articulo->save();\\n return response()->json(['Message'=>'Articulo creado correctamente',$articulo],200);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5df192879a5669cd948bb2164f615b29\",\n \"score\": \"0.55990016\",\n \"text\": \"public function store(Request $request) {\\n //aspirante, datos personales, datos de ubicacion, circunscripcion\\n $aspi = new Aspirante();\\n $aspi->tipodoc_id = (isset($request->tipodoc_id)) ? $request->tipodoc_id : 0;\\n $aspi->numerodocumento = (isset($request->numero_documento)) ? $request->numero_documento : 0;\\n $aspi->lugar_expedicion = (isset($request->lugar_expedicion)) ? $request->lugar_expedicion : null;\\n $aspi->fecha_expedicion = (isset($request->fecha_expedicion)) ? $request->fecha_expedicion : null;\\n $aspi->sexo = (isset($request->sexo)) ? $request->sexo : null;\\n $aspi->estatura = (isset($request->estatura)) ? $request->estatura : null;\\n $aspi->primer_nombre = (isset($request->primer_nombre)) ? $request->primer_nombre : \\\"\\\";\\n $aspi->segundo_nombre = (isset($request->segundo_nombre)) ? $request->segundo_nombre : null;\\n $aspi->primer_apellido = (isset($request->primer_apellido)) ? $request->primer_apellido : \\\"\\\";\\n $aspi->segundo_apellido = (isset($request->segundo_apellido)) ? $request->segundo_apellido : null;\\n $aspi->libreta_militar = (isset($request->libreta_militar)) ? $request->libreta_militar : null;\\n $aspi->claselibretamilitar = (isset($request->clase_libreta_militar)) ? $request->clase_libreta_militar : null;\\n $aspi->distrito_militar = (isset($request->distrito_militar)) ? $request->distrito_militar : null;\\n $aspi->tiposanguineo = (isset($request->tipo_sanguineo)) ? $request->tipo_sanguineo : null;\\n if (isset($request->eps)) {\\n if ($request->eps == \\\"OTRA\\\") {\\n $aspi->eps = $request->aspi_eps;\\n } else {\\n $aspi->entidadsalud_id = $request->eps;\\n }\\n }\\n $aspi->estadocivil_id = (isset($request->estado_civil)) ? $request->estado_civil : null;\\n $aspi->pais_nacimiento = (isset($request->pais_id)) ? $request->pais_id : null;\\n $aspi->dpto_nacimiento = (isset($request->dpto_id)) ? $request->dpto_id : null;\\n $aspi->ciudad_nacimiento = (isset($request->ciudad_id)) ? $request->ciudad_id : null;\\n $aspi->fecha_nacimiento = (isset($request->fecha_nacimiento)) ? $request->fecha_nacimiento : null;\\n $aspi->numerovisa = (isset($request->numero_visa)) ? $request->numero_visa : null;\\n $aspi->estadovisa = (isset($request->estado_visa)) ? $request->estado_visa : null;\\n $aspi->fechavencevisa = (isset($request->fechavence_visa)) ? $request->fechavence_visa : null;\\n $aspi->mediodivulgacion_id = (isset($request->mediodivulgacion_id)) ? $request->mediodivulgacion_id : null;\\n $aspi->nivelacademico = (isset($request->nivelacademico)) ? $request->nivelacademico : null;\\n $aspi->nivel_educativo_id = (isset($request->nivel_educativo_id)) ? $request->nivel_educativo_id : null;\\n $aspi->circunscripcion_id = (isset($request->circunscripcion_id)) ? $request->circunscripcion_id : null;\\n $aspi->pais_residencia = (isset($request->pais2_id)) ? $request->pais2_id : null;\\n $aspi->dpto_residencia = (isset($request->dpto2_id)) ? $request->dpto2_id : null;\\n $aspi->ciudad_residencia = (isset($request->ciudad2_id)) ? $request->ciudad2_id : null;\\n $aspi->sectorciudad_id = (isset($request->sectorciudad_id)) ? $request->sectorciudad_id : null;\\n $aspi->direccion_residencia = (isset($request->direccion_aspirante)) ? $request->direccion_aspirante : null;\\n $aspi->barrio_residencia = (isset($request->barrio_aspirante)) ? $request->barrio_aspirante : null;\\n $aspi->barrio_id = (isset($request->barrio_id)) ? $request->barrio_id : null;\\n $aspi->vereda_residencia = (isset($request->vereda_aspirante)) ? $request->vereda_aspirante : null;\\n $aspi->etnia = (isset($request->etnia_aspirante)) ? $request->etnia_aspirante : null;\\n $aspi->telefono_residencia = (isset($request->telefono_contacto)) ? $request->telefono_contacto : null;\\n $aspi->telefonocelular = (isset($request->telefono_celular)) ? $request->telefono_celular : null;\\n $aspi->email = (isset($request->correo)) ? $request->correo : null;\\n $aspi->dpto_residenciasec = (isset($request->dpto3_id)) ? $request->dpto3_id : null;\\n $aspi->ciudad_residenciasec = (isset($request->ciudad3_id)) ? $request->ciudad3_id : null;\\n $aspi->direccion_residenciasec = (isset($request->direccion_ec)) ? $request->direccion_ec : null;\\n $aspi->direccion_estudio = (isset($request->direccion_ciudade)) ? $request->direccion_ciudade : null;\\n $aspi->telefonoestudio = (isset($request->telefono_ciudade)) ? $request->telefono_ciudade : null;\\n $response = null;\\n if (count($aspi) > 0) {\\n if ($aspi->save()) {\\n $response = $response . \\\"

    Se guardó la información básica del aspirante

    \\\";\\n //formulario, pin\\n $foin = new Formularioinscripcion();\\n $foin->medioinscripcion = \\\"ON LINE\\\";\\n $foin->simultaneidad = \\\"NINGUNO\\\";\\n $foin->aspirante_id = $aspi->id;\\n $foin->estadoadmision = \\\"ASPIRANTE\\\";\\n $foin->servicioperiodo_id = $request->serp;\\n $pr = Programaunidad::find($request->programaunidad_id);\\n $codigo = substr($pr->programa_id, strlen($pr->programa_id) - 2, 2) . substr(date('Y'), strlen(date('Y')) - 2, 2) . substr($request->numero_documento, strlen($request->numero_documento) - 3, 3);\\n $foin->codigo = $codigo;\\n $sp = Servicioperiodo::find($request->serp);\\n if (count($sp) > 0) {\\n $foin->tipoinscripcion_id = $sp->servicioinscripcion->tipoinscripcion_id;\\n } else {\\n $foin->tipoinscripcion_id = 1;\\n }\\n $pin = Pin::where('pin', $request->pin)->first();\\n if (count($pin) > 0) {\\n if ($pin->estado == \\\"USADO\\\") {\\n $foin->pin_id = $pin->id;\\n } else {\\n //no puede seguir la inscripcion\\n flash(\\\"El PIN que ingresó no ha sido vendido en el banco. Si usted compro el PIN, por favor Acérquese a la oficina de registro y control para validar su PIN.\\\")->error();\\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\\n }\\n } else {\\n //no puede seguir la inscripcion\\n flash(\\\"El PIN que ingresó es inválido. No puede continuar.\\\")->error();\\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\\n }\\n if (count($foin) > 0) {\\n if ($foin->save()) {\\n $response = $response . \\\"

    Se ha creado el formulario de inscripción del aspirante

    \\\";\\n //programaXformulario\\n $pxf = new Programaxformulario();\\n $pxf->prioridad = 1;\\n $pxf->puntajeobtenido = 0;\\n $pxf->puesto = 0;\\n $pxf->formularioinscripcion_id = $foin->id;\\n $pxf->programaunidad_id = $request->programaunidad_id;\\n $conv = Convocatoria::where([['programaunidad_id', $request->programaunidad_id], ['periodoacademico_id', $sp->periodoacademico_id]])->first();\\n if (count($conv) > 0) {\\n $pxf->convocatoria_id = $conv->id;\\n }\\n if (count($pxf) > 0) {\\n if ($pxf->save()) {\\n $response = $response . \\\"

    El programa que ha seleccionado ha sido asociado al aspirante

    \\\";\\n //estudios secundarios\\n $esse = new Estudiossecundario();\\n $esse->pais = (isset($request->paisn_id)) ? $request->paisn_id : null;\\n $esse->ciudad = (isset($request->ciudadn_id)) ? $request->ciudadn_id : null;\\n $esse->codigo_snp = (isset($request->iem_id)) ? $request->iem_id : null;\\n $esse->enfasis_mod_sec = (isset($request->enfasis)) ? $request->enfasis : null;\\n $esse->fechaterminacion = (isset($request->ft)) ? $request->ft : null;\\n $esse->formaobtuvotitulo = (isset($request->forma_obt_titulo)) ? $request->forma_obt_titulo : null;\\n $esse->valormatricula10 = (isset($request->vmd)) ? $request->vmd : null;\\n $esse->valorpension10 = (isset($request->vpd)) ? $request->vpd : null;\\n $esse->valorpension11 = (isset($request->vpu)) ? $request->vpu : null;\\n $esse->valormatricula11 = (isset($request->vmu)) ? $request->vmu : null;\\n $esse->libro = (isset($request->libro)) ? $request->libro : null;\\n $esse->folio = (isset($request->folio)) ? $request->folio : null;\\n $esse->snp = (isset($request->snp_aspirante)) ? $request->snp_aspirante : null;\\n $esse->puntajeobtenido = (isset($request->poes)) ? $request->poes : null;\\n $esse->ciudadpresentoprueba = (isset($request->ciudad5_id)) ? $request->ciudad5_id : null;\\n $esse->fechapresentopruebas = (isset($request->fpes)) ? $request->fpes : null;\\n if ($esse->fechapresentopruebas !== null) {\\n $time = strtotime($esse->fechapresentopruebas);\\n $newformat = date('Y-m-d', $time);\\n $fff = explode(\\\"-\\\", $newformat);\\n $aniop = $fff[0];\\n $mesp = $fff[1];\\n if ($aniop < 2014) {\\n $esse->tipoprueba = \\\"ANTIGUA\\\";\\n }\\n if ($aniop == 2014 && $mesp < 6) {\\n $esse->tipoprueba = \\\"ANTIGUA\\\";\\n }\\n if ($aniop == 2014 && $mesp > 6) {\\n $esse->tipoprueba = \\\"NUEVA\\\";\\n }\\n if ($aniop > 2014) {\\n $esse->tipoprueba = \\\"NUEVA\\\";\\n }\\n }\\n $esse->tipodocicfes = (isset($request->tipodoc_prueba)) ? $request->tipodoc_prueba : null;\\n $esse->documentoicfes = (isset($request->dipi)) ? $request->dipi : null;\\n $esse->aspirante_id = $aspi->id;\\n if (count($esse) > 0) {\\n if ($esse->save()) {\\n $response = $response . \\\"

    Se guardó la información de estudios secundarios

    \\\";\\n }\\n }\\n $tb1 = $tb2 = $tb3 = $tb4 = $tb5 = $tb6 = $tb7 = $tb8 = $tb9 = $tb10 = $tb11 = $tb12 = $tb13 = $tb14 = $tb15 = $tb16 = null;\\n //tb1 lista inst en las que estudió institucionsecundaria\\n if (isset($request->tb1)) {\\n foreach ($request->tb1 as $value) {\\n $is = new Institucionsecundaria();\\n $v = explode(\\\";\\\", $value);\\n $is->institucionestudio = (strlen($v[0]) > 0) ? $v[0] : null;\\n $is->fechainicial = (strlen($v[1]) > 0) ? $v[1] : date('Y-m-d', strtotime('00-00-0000'));\\n $is->fechafin = (strlen($v[2]) > 0) ? $v[2] : date('Y-m-d', strtotime('00-00-0000'));\\n $is->aspirante_id = $aspi->id;\\n $tb1[] = $is;\\n }\\n }\\n if (count($tb1) > 0) {\\n foreach ($tb1 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de instituciones donde estudió.

    \\\";\\n }\\n //tb2 estudios de pregrado\\n if (isset($request->tb2)) {\\n foreach ($request->tb2 as $value) {\\n $eu = new Estudiosuniversitario();\\n $v = explode(\\\";\\\", $value);\\n $eu->codigosnp = $v[0];\\n $eu->programa = $v[1];\\n $eu->periodoscursados = $v[2];\\n $eu->fechaterminacion = $v[3];\\n $eu->tarjetaprofesional = $v[4];\\n $eu->ciudadrural = $v[5];\\n if ($v[6] == \\\"PRESENTO\\\") {\\n $eu->registroecaes = $v[7];\\n $eu->puntajeecaes = $v[8];\\n }\\n $eu->aspirante_id = $aspi->id;\\n $tb2[] = $eu;\\n }\\n }\\n if (count($tb2) > 0) {\\n foreach ($tb2 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de pregrado.

    \\\";\\n }\\n //tb3 estudios de postgrado\\n if (isset($request->tb3)) {\\n foreach ($request->tb3 as $value) {\\n $ep = new Estudiospostgrado();\\n $v = explode(\\\";\\\", $value);\\n $ep->codigosnp = $v[0];\\n $ep->programa = $v[1];\\n $ep->fechaterminacion = $v[2];\\n $ep->aspirante_id = $aspi->id;\\n $tb3[] = $ep;\\n }\\n }\\n if (count($tb3) > 0) {\\n foreach ($tb3 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de postgrado.

    \\\";\\n }\\n //tb4 cursos realizados\\n if (isset($request->tb4)) {\\n foreach ($request->tb4 as $value) {\\n $cr = new Cursorealizado();\\n $v = explode(\\\";\\\", $value);\\n $cr->titulo = $v[0];\\n $cr->institucion = $v[1];\\n $cr->fechaterminacion = $v[2];\\n $cr->aspirante_id = $aspi->id;\\n $tb4[] = $cr;\\n }\\n }\\n if (count($tb4) > 0) {\\n foreach ($tb4 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de cursos realizados.

    \\\";\\n }\\n //tb5 publicaciones\\n if (isset($request->tb5)) {\\n foreach ($request->tb5 as $value) {\\n $p = new Publicacion();\\n $v = explode(\\\";\\\", $value);\\n $p->nombre = $v[0];\\n $p->tipoobra = $v[1];\\n $p->anio = $v[2];\\n $p->entidadauspiciadora = $v[3];\\n $p->aspirante_id = $aspi->id;\\n $tb5[] = $p;\\n }\\n }\\n if (count($tb5) > 0) {\\n foreach ($tb5 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de publicaciones.

    \\\";\\n }\\n //tb6 familiares\\n if (isset($request->tb6)) {\\n foreach ($request->tb6 as $value) {\\n $g = new Grupofamiliar();\\n $v = explode(\\\";\\\", $value);\\n $g->sitiotrabajoestudio = $v[0];\\n $g->ciudad = $v[1];\\n $g->parentesco_id = (count($v[4]) > 0) ? $v[4] : 0;\\n $g->cedula = $v[5];\\n $g->nombrecompleto = $v[6];\\n $g->vive = $v[7];\\n $g->ocupacion = $v[8];\\n $g->profesion = $v[9];\\n $g->edad = $v[10];\\n $g->niveleducativo = $v[11];\\n $g->ingresomensual = $v[12];\\n $g->ingresomensual_rango = $v[13];\\n $g->lee = $v[14];\\n $g->ciudadresidencia = $v[16];\\n $g->direccion = $v[17];\\n $g->telefonoresidencia = $v[18];\\n $g->ciudadresidencia = $v[19];\\n $g->direccionempresa = $v[20];\\n $g->celular = $v[21];\\n $g->aspirante_id = $aspi->id;\\n $tb6[] = $g;\\n }\\n }\\n if (count($tb6) > 0) {\\n foreach ($tb6 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de familiares.

    \\\";\\n }\\n //informacion socioeconomica\\n $ise = new Informacionsocioeconomica();\\n $ise->situacionpadres = (isset($request->sdlp)) ? $request->sdlp : null;\\n $ise->numerofamiliares = (isset($request->nmf)) ? $request->nmf : null;\\n $ise->numeromiembrostrabaja = (isset($request->pqt)) ? $request->pqt : null;\\n $ise->numerohermanos = (isset($request->nhise)) ? $request->nhise : null;\\n $ise->posicionhermanos = (isset($request->pelh)) ? $request->pelh : null;\\n $ise->ingresomensualfamilia = (isset($request->imaf)) ? $request->imaf : null;\\n $ise->egresomensualfamilia = (isset($request->emaf)) ? $request->emaf : null;\\n $ise->hermanosestudiandou = (isset($request->nheu)) ? $request->nheu : null;\\n $ise->viveconfamilia = (isset($request->vcsf)) ? $request->vcsf : null;\\n $ise->numhermanosestudiaunivers = (isset($request->nhceu)) ? $request->nhceu : null;\\n $ise->quiencosteaestudios = (isset($request->cdse)) ? $request->cdse : null;\\n $ise->conquienreside = (isset($request->edr)) ? $request->edr : null;\\n $ise->estrato = (isset($request->eise)) ? $request->eise : null;\\n $ise->situacioneconomica = (isset($request->se)) ? $request->se : null;\\n $ise->sufragoelecciones = (isset($request->selue)) ? $request->selue : null;\\n $ise->rentagravable = (isset($request->rg)) ? $request->rg : null;\\n $ise->patrimoniogravable = (isset($request->pg)) ? $request->pg : null;\\n $ise->ingresoretenciones = (isset($request->iyr)) ? $request->iyr : null;\\n $ise->sisben = (isset($request->tsise)) ? $request->tsise : null;\\n $ise->nivelsisben = (isset($request->nivelsisben)) ? $request->nivelsisben : null;\\n $ise->cajacompensacion = (isset($request->ccf)) ? $request->ccf : null;\\n $ise->ingresosnogravables = (isset($request->ing)) ? $request->ing : null;\\n $ise->patrimoniobruto = (isset($request->pb)) ? $request->pb : null;\\n $ise->ingresobruto = (isset($request->ib)) ? $request->ib : null;\\n $ise->rentanogravable = (isset($request->rng)) ? $request->rng : null;\\n $ise->ingresosgravables = (isset($request->ig)) ? $request->ig : null;\\n $ise->aspirante_id = $aspi->id;\\n if (count($ise) > 0) {\\n if ($ise->save()) {\\n $response = $response . \\\"

    Se guardó la información socioeconómica.

    \\\";\\n }\\n }\\n //posesion de residencia\\n $pos = new Posesionresidencia();\\n if (isset($request->PROPIA)) {\\n if ($request->PROPIA == \\\"PROPIA\\\") {\\n $pos->tipoposesion = \\\"PROPIA\\\";\\n }\\n }\\n if (isset($request->pppc)) {\\n if ($request->pppc == \\\"CASA PROPIA\\\") {\\n $pos->tipoposesion = \\\"CASA PROPIA\\\";\\n $pos->deudavivienda = (isset($request->ddlv)) ? $request->ddlv : null;\\n $pos->vrmensualcuota = (isset($request->vmc)) ? $request->vmc : null;\\n $pos->dirmueblehipotecado = (isset($request->ddih)) ? $request->ddih : null;\\n $pos->numcredito = (isset($request->ndc)) ? $request->ndc : null;\\n }\\n }\\n if (isset($request->aoa)) {\\n if ($request->aoa == \\\"ARRENDADA\\\") {\\n $pos->tipoposesion = \\\"ARRENDADA\\\";\\n $pos->vrmensualarriendo = (isset($request->vma)) ? $request->vma : null;\\n $pos->vrdelanticres = (isset($request->vdac)) ? $request->vdac : null;\\n $pos->nombrearrendador = (isset($request->nda)) ? $request->nda : null;\\n $pos->ciudadarrendador = (isset($request->cda)) ? $request->cda : null;\\n $pos->direccarrendador = (isset($request->dda)) ? $request->dda : null;\\n $pos->telarrendador = (isset($request->tda)) ? $request->tda : null;\\n }\\n }\\n if (isset($request->ndla)) {\\n if ($request->ndla == \\\"NINGUNA POSESION\\\") {\\n $pos->tipoposesion = \\\"NINGUNA POSESION\\\";\\n }\\n }\\n $pos->aspirante_id = $aspi->id;\\n if (count($pos) > 0) {\\n if ($pos->save()) {\\n $response = $response . \\\"

    Se guardó la información de residencia.

    \\\";\\n }\\n }\\n //tb7 jefes de familia\\n if (isset($request->tb7)) {\\n foreach ($request->tb7 as $value) {\\n $jf = new Jefefamilia();\\n $v = explode(\\\";\\\", $value);\\n $jf->nombre = $v[0];\\n $jf->empresa = $v[1];\\n $jf->cargo = $v[2];\\n $jf->tiemposervicio = $v[3];\\n $jf->sueldo = $v[4];\\n $jf->jefeinmediato = $v[5];\\n $jf->areadesempenio = $v[6];\\n $jf->teltrabajo = $v[7];\\n $jf->numpersonascargo = $v[8];\\n $jf->eljefedefamiliaeselpadre = $v[9];\\n $jf->ciudad = $v[11];\\n $jf->dirempresa = $v[12];\\n $jf->parentesco_id = (count($v[13]) > 0) ? $v[13] : 0;\\n $jf->celular = $v[14];\\n $jf->niveleducativo = $v[15];\\n $jf->ocupacionlaboral_id = $v[16];\\n $jf->tipodoc_id = $v[17];\\n $jf->documentoidentidad = $v[18];\\n $jf->aspirante_id = $aspi->id;\\n $tb7[] = $jf;\\n }\\n }\\n if (count($tb7) > 0) {\\n foreach ($tb7 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de jefes de familia.

    \\\";\\n }\\n //tb8 experiencia profesional\\n if (isset($request->tb8)) {\\n foreach ($request->tb8 as $value) {\\n $ep = new Experienciaprofesional();\\n $v = explode(\\\";\\\", $value);\\n $ep->institucion = $v[0];\\n $ep->cargo = $v[1];\\n $ep->rangosalario_id = $v[2];\\n $ep->fechaingreso = $v[3];\\n $ep->fecharetiro = $v[4];\\n $ep->telefonotrabajo = $v[5];\\n $ep->aspirante_id = $aspi->id;\\n $tb8[] = $ep;\\n }\\n }\\n if (count($tb8) > 0) {\\n foreach ($tb8 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de experiencia profesional.

    \\\";\\n }\\n //tb9 experiencia docente\\n if (isset($request->tb9)) {\\n foreach ($request->tb9 as $value) {\\n $ep = new Experienciadocente();\\n $v = explode(\\\";\\\", $value);\\n $ep->institucion = $v[0];\\n $ep->nivel = $v[1];\\n $ep->area = $v[2];\\n $ep->tiemposervicio = $v[3];\\n $ep->aspirante_id = $aspi->id;\\n $tb9[] = $ep;\\n }\\n }\\n if (count($tb9) > 0) {\\n foreach ($tb9 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de experiencia docente.

    \\\";\\n }\\n //tb10 experiencia en investigacion\\n if (isset($request->tb10)) {\\n foreach ($request->tb10 as $value) {\\n $ep = new Experienciainvestigacion();\\n $v = explode(\\\";\\\", $value);\\n $ep->institucion = $v[0];\\n $ep->proyecto = $v[1];\\n $ep->cargo = $v[2];\\n $ep->anio = $v[3];\\n $ep->aspirante_id = $aspi->id;\\n $tb10[] = $ep;\\n }\\n }\\n if (count($tb10) > 0) {\\n foreach ($tb10 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de investigación.

    \\\";\\n }\\n //tb11 referencias\\n if (isset($request->tb11)) {\\n foreach ($request->tb11 as $value) {\\n $ep = new Referenciaacademica();\\n $v = explode(\\\";\\\", $value);\\n $ep->nombre = $v[0];\\n $ep->direccion = $v[1];\\n $ep->telefono = $v[2];\\n $ep->aspirante_id = $aspi->id;\\n $tb11[] = $ep;\\n }\\n }\\n if (count($tb11) > 0) {\\n foreach ($tb11 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de referencias.

    \\\";\\n }\\n //tb12 Asociaciones Científicas, Sociales y Culturales\\n if (isset($request->tb12)) {\\n foreach ($request->tb12 as $value) {\\n $ep = new Asociacioncientifica();\\n $v = explode(\\\";\\\", $value);\\n $ep->nombre = $v[0];\\n $ep->objetosocial = $v[1];\\n $ep->fechaingreso = $v[2];\\n $ep->aspirante_id = $aspi->id;\\n $tb12[] = $ep;\\n }\\n }\\n if (count($tb12) > 0) {\\n foreach ($tb12 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información científica.

    \\\";\\n }\\n //tb13 idiomas\\n if (isset($request->tb13)) {\\n foreach ($request->tb13 as $value) {\\n $ep = new Idiomaaspirante();\\n $v = explode(\\\";\\\", $value);\\n $ep->idioma_id = $v[0];\\n $ep->oir = $v[1];\\n $ep->habla = $v[2];\\n $ep->lee = $v[3];\\n $ep->escribe = $v[4];\\n $ep->aspirante_id = $aspi->id;\\n $tb13[] = $ep;\\n }\\n }\\n if (count($tb13) > 0) {\\n foreach ($tb13 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de idiomas.

    \\\";\\n }\\n //tb14 pasatiempos\\n if (isset($request->tb14)) {\\n foreach ($request->tb14 as $value) {\\n $ep = new Pasatiempoaspirante();\\n $v = explode(\\\";\\\", $value);\\n $ep->pasatiempo_id = $v[0];\\n $ep->aspirante_id = $aspi->id;\\n $tb14[] = $ep;\\n }\\n }\\n if (count($tb14) > 0) {\\n foreach ($tb14 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de pasatiempos.

    \\\";\\n }\\n //caracterizacion\\n $car = new Caracterizacion();\\n $car->practicadeporte = (isset($request->pd)) ? $request->pd : null;\\n $car->deporte = (isset($request->cd)) ? $request->cd : null;\\n $car->frecuenciadeporte = (isset($request->fp)) ? $request->fp : null;\\n $car->formadeporte = (isset($request->flp)) ? $request->flp : null;\\n $car->porquenodeporte = (isset($request->pnpd)) ? $request->pnpd : null;\\n $car->eventopreferido = (isset($request->ecp)) ? $request->ecp : null;\\n $car->frecuenciaeventopreferido = (isset($request->fca)) ? $request->fca : null;\\n $car->practicaartistica = (isset($request->paa)) ? $request->paa : null;\\n $car->actividadartistica = (isset($request->caa)) ? $request->caa : null;\\n $car->formaactividadartistica = (isset($request->felp)) ? $request->felp : null;\\n $car->ocupatiempolibre = (isset($request->eotl)) ? $request->eotl : null;\\n $car->fuma = (isset($request->f)) ? $request->f : null;\\n $car->frecuenciafuma = (isset($request->ccpd)) ? $request->ccpd : null;\\n $car->bebe = (isset($request->cl)) ? $request->cl : null;\\n $car->frecuenciabebe = (isset($request->cqfcl)) ? $request->cqfcl : null;\\n $car->sustanciapsicoactivas = (isset($request->cssa)) ? $request->cssa : null;\\n $car->frecuenciasustancia = (isset($request->cqfcssa)) ? $request->cqfcssa : null;\\n $car->relacionessexuales = (isset($request->htrs)) ? $request->htrs : null;\\n $car->edadprimrelacion = (isset($request->epr)) ? $request->epr : null;\\n $car->metodoanticonceptivo = (isset($request->ma)) ? $request->ma : null;\\n $car->numerohijos = (isset($request->nh)) ? $request->nh : null;\\n $car->gradoaceptacion = (isset($request->gasm)) ? $request->gasm : null;\\n $car->depresionsinmotivo = (isset($request->sdsm)) ? $request->sdsm : null;\\n $car->gradoconcentracion = (isset($request->gcc)) ? $request->gcc : null;\\n $car->aspirante_id = $aspi->id;\\n if (count($car) > 0) {\\n if ($car->save()) {\\n $response = $response . \\\"

    Se guardó la información de caracterización.

    \\\";\\n }\\n }\\n //tb15 inst donde ha soliscitado admision\\n if (isset($request->tb15)) {\\n foreach ($request->tb15 as $value) {\\n $p = new Instsolicitudadmision();\\n $v = explode(\\\";\\\", $value);\\n $p->codigosnp = $v[0];\\n $p->programa = $v[1];\\n $p->anio = $v[2];\\n $p->aceptado = $v[3];\\n $p->aspirante_id = $aspi->id;\\n $tb15[] = $p;\\n }\\n }\\n if (count($tb15) > 0) {\\n foreach ($tb15 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de instituciones donde solicitó admisión.

    \\\";\\n }\\n //tb16 datos de discapacitados\\n if (isset($request->tb16)) {\\n foreach ($request->tb16 as $value) {\\n $p = new Discapacidad();\\n $v = explode(\\\";\\\", $value);\\n $p->tipodiscapacidad_id = (count($v[0]) > 0) ? $v[0] : 1;\\n $p->nombre = $v[1];\\n $p->fechadiagnostico = $v[2];\\n $p->aspirante_id = $aspi->id;\\n $tb16[] = $p;\\n }\\n }\\n if (count($tb16) > 0) {\\n foreach ($tb16 as $value) {\\n $value->save();\\n }\\n $response = $response . \\\"

    Se guardó la información de discapacidades.

    \\\";\\n }\\n //otros datos\\n $inf = new Informacioncomplementaria();\\n $inf->tienehijos = (isset($request->tienehijos)) ? $request->tienehijos : null;\\n $inf->cuantoshijos = (isset($request->chdi)) ? $request->chdi : null;\\n $inf->sisben = (isset($request->sisben)) ? $request->sisben : null;\\n $inf->desplazado = (isset($request->desplazado)) ? $request->desplazado : null;\\n $inf->laboraactualmente = (isset($request->labora)) ? $request->labora : null;\\n $inf->telefonocontactosec = (isset($request->tcs)) ? $request->tcs : null;\\n $inf->otrocorreocontacto = (isset($request->cec)) ? $request->cec : null;\\n $inf->personastrabajanfam = (isset($request->cptgf)) ? $request->cptgf : null;\\n $inf->cuentaequipocomputo = (isset($request->ccec)) ? $request->ccec : null;\\n $inf->accesointernet = (isset($request->eaie)) ? $request->eaie : null;\\n $inf->aspirante_id = $aspi->id;\\n if (count($tb1) > 0) {\\n if ($inf->save()) {\\n $response = $response . \\\"

    Se guardó la información complementaria.

    \\\";\\n }\\n }\\n $pu = Programaunidad::find($request->programaunidad_id);\\n $requisitos = null;\\n if (count($pu) > 0) {\\n $docins = Documentoinscripcion::where([['circunscripcion_id', $request->circunscripcion_id], ['programa_id', $pu->programa_id]])->get();\\n if (count($docins) > 0) {\\n foreach ($docins as $item) {\\n $obj[\\\"ob\\\"] = $item->obligatorio;\\n $obj[\\\"item\\\"] = $item->tipodocanexo->descripcion;\\n $requisitos[] = $obj;\\n }\\n }\\n }\\n return view('inscripcion_publico.resultado_inscripcion')\\n ->with('doc', $aspi->id)\\n ->with('requisitos', $requisitos)\\n ->with('rta', $response)\\n ->with('sp', $request->serp);\\n } else {\\n $foin->delete();\\n $aspi->delete();\\n flash(\\\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\\\")->error();\\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\\n }\\n } else {\\n $foin->delete();\\n $aspi->delete();\\n flash(\\\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\\\")->error();\\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\\n }\\n } else {\\n $aspi->delete();\\n flash(\\\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\\\")->error();\\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\\n }\\n } else {\\n $aspi->delete();\\n flash(\\\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\\\")->error();\\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\\n }\\n } else {\\n flash(\\\"Se ha encontrado un error y la inscripción no pudo ser completada. Intentelo nuevamente.\\\")->error();\\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\\n }\\n } else {\\n flash(\\\"No hay datos válidos para diligenciar el formulario de inscripción. No se puede continuar.\\\")->error();\\n return redirect()->route('inscripcion.inscribirse', [$request->nivel_educativo_id, $request->serp,]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b087facea726acecbf1828d70c6214d9\",\n \"score\": \"0.55980456\",\n \"text\": \"public function store()\\n {\\n $this->validate();\\n\\n $producto = Producto::create([\\n 'color_id' => $this->color_id,\\n 'talla_id' => $this->talla_id,\\n 'nombre' => $this->nombre,\\n 'precio_venta' => $this->precio_venta,\\n 'imagen' => $this->imagen,\\n 'stock' => $this->stock\\n ]);\\n\\n $this->resetInput();\\n $this->action = 1;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fbdf93382796d1b0830ebdaaaf32c15\",\n \"score\": \"0.559054\",\n \"text\": \"public function store(Request $request)\\n {\\n $estante=new Estante;\\n $estante->fill($request->all());\\n $estante->save();\\n Bitacora::bitacora('store','estantes','estantes',$estante->id);\\n return redirect('/estantes')->with('mensaje','¡Guardado!');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1d0af0f067bd82cab33d8f47388842b\",\n \"score\": \"0.5583906\",\n \"text\": \"public function store(Request $request)\\n {\\n \\n $requestData = $request->all();\\n \\n sector_af::create($requestData);\\n\\n return redirect('sector_af')->with('flash_message', 'sector_af added!');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27030caec153d6ead37b37458496da9e\",\n \"score\": \"0.5579884\",\n \"text\": \"public function store()\\n {\\n // store the object itself\\n parent::store(); \\n parent::saveComposite('Contato', 'servidor_id', $this->id, $this->contatos);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff594b91ea9fbb00a38a7bc3306fd739\",\n \"score\": \"0.5575716\",\n \"text\": \"public function store(Request $request)\\n {\\n $asistente = new Asistente;\\n $asistente->cuil = $request->cuil;\\n $asistente->apellido = $request->apellido;\\n $asistente->nombre = $request->nombre;\\n $asistente->matricula = $request->matricula;\\n $asistente->titulo = $request->titulo;\\n $asistente->direccion = $request->direccion;\\n $asistente->telefono = $request->telefono;\\n $asistente->email = $request->email;\\n\\n $asistente->save();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"994a40a0cd60f22179369d6c6be995f4\",\n \"score\": \"0.5568811\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t$input = Input::all();\\n\\t\\ttry{\\n\\t\\t\\t$this->cemetery->store($input);\\n\\t\\t\\treturn Redirect::route('admin.cemeteries.index')\\n \\t->with('success', 'The new cemetery has been created');\\n\\t\\t}\\n\\t\\tcatch(ValidationException $e){\\n\\t\\t\\treturn Redirect::route('admin.cemeteries.create')\\n\\t\\t ->withInput()\\n\\t\\t ->withErrors($e->getErrors())\\n\\t\\t ->with('error', 'The cemetery was not saved.');\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02b20eee08907e4cd5189620c74a7a9d\",\n \"score\": \"0.5567966\",\n \"text\": \"public function store(Request $request)\\n {\\n $caroussel = new Caroussel;\\n $caroussel->name = $request->name;\\n $caroussel->photo = $request->photo->store('','DiskImage');\\n $caroussel->save();\\n\\n return redirect()->route('caroussels.show');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3c89b63d23435139715bbcb5e318959\",\n \"score\": \"0.5566875\",\n \"text\": \"public function adminStore()\\n {\\n $data = request()->all();\\n// dd($data);\\n FFFlights::create([\\n 'origin_id' => $data['origin'],\\n 'destination_id' => $data['destination'],\\n 'airline_id' => $data['airline'],\\n 'departure' => $data['departure'],\\n 'arival' => $data['arrival'],\\n ]);\\n return redirect(route('app.flights.index'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85e074736a4c2ff9ef8e89ac182e7f3d\",\n \"score\": \"0.55647427\",\n \"text\": \"public function store(Request $request)\\n {\\n $this->validate($request, [\\n 'nombre' => 'required|unique:escuelas,nombre',\\n 'carrera' => 'required',\\n ]);\\n \\n $escuela = new Escuela;\\n $escuela->nombre = $request->input('nombre');\\n $escuela->descripcion = $request->input('descripcion');\\n $escuela->user_id = auth()->user()->id;\\n\\n $escuela->save();\\n $escuela->carreras()->sync($request->input('carrera'));\\n\\n return redirect()->route('escuelas.index')\\n ->with('success', trans('School').' '.trans('created successfully '));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01bb31c278c0eee0ccb35797bdee1b2d\",\n \"score\": \"0.55466723\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t$ngo = NGOs::create(array(\\n 'name' => Input::get('name'),\\n 'registation_date' => Input::get('reg_date'),\\n 'certificate_no' => Input::get('certificate'),\\n 'registation_type' => Input::get('reg_type'),\\n 'operation_level' => Input::get('operation'),\\n 'postal_adress' => Input::get('postal'),\\n 'phisycal_add' => Input::get('physical'),\\n 'region' => Input::get('region'),\\n 'district' => Input::get('district'),\\n 'phone_number' => Input::get('phone'),\\n 'email' => Input::get('email'),\\n ));\\n\\n $name = $ngo->name;\\n foreach(Input::get('sector') as $sector_id){\\n $ngo_sector = NGOSector::create(array(\\n \\\"sector_id\\\" => $sector_id,\\n \\\"n_gos_id\\\" => $ngo->id\\n ));\\n $sector = Sector::find($sector_id);\\n Logs::create(array(\\n \\\"user_id\\\"=> Auth::user()->id,\\n \\\"action\\\" =>\\\"Add Sector \\\".$sector['sector_name'].\\\" to NGO nammed \\\".$name\\n ));\\n }\\n\\n Logs::create(array(\\n \\\"user_id\\\"=> Auth::user()->id,\\n \\\"action\\\" =>\\\"Add NGO nammed \\\".$name\\n ));\\n return \\\"

    NGO Added Successfull

    \\\";\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a55cc6ad9e9e92848b2e504092f5c006\",\n \"score\": \"0.55461484\",\n \"text\": \"public function store(Request $request)\\n {\\n $cad= $this->objEntrega->create([\\n 'produto'=>$request->produto,\\n 'quantidade'=>$request->quantidadeproduto,\\n 'categoria'=>$request->categoria,\\n 'enderecoentrega'=>$request->enderecoentrga,\\n 'enderecocoleta'=>$request->enderecocoleta,\\n ]);\\n if($cad){\\n return redirect('entrega');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0d2d65c8e0fa1ce6fda1566f3067600\",\n \"score\": \"0.5542125\",\n \"text\": \"public function store(Request $request)\\n {\\n $this->validate($request,[\\n 'wet' =>'required|numeric',\\n 'c_wet' =>'required',\\n 'dry' =>'required',\\n 'c_dry' =>'required'\\n ]);\\n\\n $info = new AgriFacility;\\n $info->subsector = session('SUBSEC');\\n $info->wet = $request->input('wet');\\n $info->c_wet = $request->input('c_wet');\\n $info->dry = $request->input('c_dry');\\n $info->c_dry = $request->input('c_dry');\\n $info->orchard = $request->input('orchard');\\n $info->c_orchard = $request->input('c_orchard');\\n\\n $info->food_processing = $request->input('food_processing');\\n $info->mills = $request->input('mills');\\n $info->tradition_mills = $request->input('tradition_mills');\\n $info->oil_expeller = $request->input('oil_expeller');\\n $info->corn_flake = $request->input('corn_flake');\\n $info->electric_dryer = $request->input('electric_dryer');\\n $info->potatoe_fryer = $request->input('potatoe_fryer');\\n $info->power_tiller = $request->input('power_tiller');\\n $info->tractor = $request->input('tractor');\\n $info->transplanter = $request->input('transplanter');\\n $info->grass_cutter = $request->input('grass_cutter');\\n $info->green_house = $request->input('green_house');\\n\\n $info->save();\\n return redirect('/agrifacility')->with('success','Saved successfully!!');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9d27003418811cb8b4db2c5dce0ec54\",\n \"score\": \"0.5540304\",\n \"text\": \"public function store() {\\n $this->validate(request(), [\\n 'asset_id'\\t\\t=> 'required',\\n 'item' \\t\\t\\t=> 'required', // Advanced Validation\\n 'type'\\t\\t\\t=> 'required',\\t// Advanced Validation\\n 'qty' => 'nullable|numeric',\\n 'weight_uom' \\t=> 'required',\\t// Advanced Validation\\n 'note' \\t\\t\\t=> 'required'\\n ]);\\n\\n $now \\t\\t= new DateTime();\\n $last_id \\t= $this->getID();\\n \\n DB::table('asset_part')->insert([\\n\\t\\t\\t'id'\\t\\t\\t\\t=> $last_id,\\n\\t\\t\\t'asset_id'\\t\\t\\t=> request('asset_id'),\\n\\t\\t\\t'in_id'\\t\\t\\t\\t=> request('item'),\\n\\t\\t\\t'type_id'\\t\\t\\t=> request('type'),\\n\\t\\t\\t'qty'\\t\\t\\t\\t=> request('qty'),\\n\\t\\t\\t'uom_id'\\t\\t\\t=> request('weight_uom'),\\n\\t\\t\\t'note'\\t\\t\\t\\t=> request('note'),\\n\\t\\t\\t'modified_time' => $now,\\n\\t\\t\\t'modified_id' => $this->user_id,\\n\\t\\t\\t'created_time' => $now,\\n\\t\\t\\t'created_id' => $this->user_id\\n\\t\\t]);\\n\\n return response(['status' => 'ok'], 200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ed0e4c1494f8dfcc936c62df42cfd3b\",\n \"score\": \"0.55357647\",\n \"text\": \"public function store(Request $request)\\n {\\n // = ['designat','date_paiement','mode_paiement','montant','ref_paiement','type_opr','observations'];\\n\\n $user = Auth::user();\\n if($user->can('create-client')){\\n\\n $caisse = new Caisse();\\n $caisse->designat = $request->input('designat');\\n $caisse->date_paiement = $request->input('date_paiement');\\n $caisse->mode_paiement = $request->input('mode_paiement');\\n $caisse->montant = $request->input('montant');\\n $caisse->ref_paiement = $request->input('ref_paiement');\\n $caisse->type_opr = $request->input('type_opr');\\n $caisse->observations = $request->input('observations');\\n $user->caisses()->save($caisse);\\n\\n return response()->json('user can add caisse');\\n }\\n else{\\n return response()->json('user not can add caisse');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"993cb06ea7022b5a9ff29810908f3a17\",\n \"score\": \"0.5534853\",\n \"text\": \"public function storeC(Request $request)\\n {\\n //Troquei nome do LogCaixa pq Log e reservado buga o sistema\\n \\n $caixa = new CaixaStatus();\\n \\n $caixa->user_id = Auth::user()->id;\\n \\n $caixa->status = 1;\\n\\n $caixa->save();\\n \\n \\n \\n $caixaID = CaixaStatus::select('*')\\n ->where('user_id','=',Auth::user()->id)\\n ->where('status','=',1)\\n ->first();\\n \\n $data = $request->all();\\n \\n $cashier = new Cashier;\\n \\n $cashier->fill($data);\\n \\n $cashier->caixa_status_id = $caixaID->id;\\n\\n\\n // dd($cashier);\\n \\n $cashier->save();\\n \\n \\n // return view('admin.cashier.index');\\n return redirect()->route('admin.cashier.index');\\n \\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c2f8808393af66df6bc6a282054bd2c\",\n \"score\": \"0.5533907\",\n \"text\": \"public function store()\\n\\t{\\n\\n\\t\\tprint_r(\\\\Request::all());\\n\\n\\t\\tif( $snapshot = XSnapCourier::createSnapshot(\\\\Request::get('volume_name'), \\\\Request::get('snapshot_name') )) {\\n\\t\\t\\techo \\\"Created successfully\\\";\\n\\t\\t\\tprint_r($snapshot);\\n\\t\\t}\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6268027e52e06aef54b1f9b7b764a918\",\n \"score\": \"0.55338377\",\n \"text\": \"public function store(Request $request)\\n { \\n if ($request->session()->get('codigoLotacaoFisica') == null || $request->session()->get('codigoLotacaoFisica') === \\\"NULL\\\") {\\n $lotacao = $request->session()->get('codigoLotacaoAdministrativa');\\n } \\n else {\\n $lotacao = $request->session()->get('codigoLotacaoFisica');\\n }\\n \\n try {\\n DB::beginTransaction();\\n // REALIZA O INSERT NA TABELA DE DEMANDA\\n $demanda = new ContratacaoDemanda;\\n $demanda->tipoPessoa = $request->tipoPessoa;\\n if ($request->tipoPessoa === \\\"PF\\\") {\\n $demanda->cpf = $request->cpf;\\n } \\n else {\\n $demanda->cnpj = $request->cnpj;\\n }\\n \\n $demanda->nomeCliente = $request->nomeCliente;\\n $demanda->dadosContaCliente = $request->agenciaContaCliente . '.' . $request->operacaoContaCliente . '.' . $request->contaCliente . '-' . $request->digitoContaCliente;\\n $demanda->tipoOperacao = $request->tipoOperacao;\\n $demanda->tipoMoeda = $request->tipoMoeda;\\n $demanda->valorOperacao = str_replace(\\\",\\\",\\\".\\\", str_replace(\\\".\\\", \\\"\\\", $request->valorOperacao));\\n \\n if ($request->tipoOperacao == \\\"Pronto Exportação Antecipado\\\" || $request->tipoOperacao == \\\"Pronto Importação Antecipado\\\") {\\n $demanda->dataPrevistaEmbarque = date(\\\"Y-m-d\\\", strtotime(str_replace('/', '-', $request->dataPrevistaEmbarque)));\\n }\\n \\n $demanda->statusAtual = \\\"CADASTRADA\\\";\\n $demanda->responsavelAtual = $request->session()->get('matricula');\\n \\n if ($request->session()->get('acessoEmpregadoEsteiraComex') == \\\"SR\\\") {\\n $demanda->agResponsavel = null;\\n $demanda->srResponsavel = $lotacao;\\n } else {\\n // CAPTURA A SR RESPONSÁVEL PELA AGÊNCIA\\n $objRelacaoEmailUnidades = RelacaoAgSrComEmail::where('codigoAgencia', $lotacao)->first();\\n\\n $demanda->agResponsavel = $lotacao;\\n $demanda->srResponsavel = $objRelacaoEmailUnidades->codigoSr;\\n }\\n \\n $demanda->analiseAg = $request->analiseAg;\\n $demanda->dataCadastro = date(\\\"Y-m-d H:i:s\\\", time());\\n $demanda->cnaeRestrito = $request->cnaeRestrito;\\n $demanda->liberadoLiquidacao = 'NAO';\\n $demanda->save();\\n\\n // VALIDA SE É OPERACAO DE IMPORTAÇÃO PARA CADASTRO DO DADOS DO BENEFICIARIO E INTERMEDIARIO (SE HOUVER)\\n // if ($request->tipoOperacao == 'Pronto Importação Antecipado' || $request->tipoOperacao == 'Pronto Importação') {\\n // $dadosContaImportador = new ContratacaoContaImportador;\\n // $dadosContaImportador->idDemanda = $demanda->idDemanda;\\n // $dadosContaImportador->nomeBeneficiario = $request->nomeBeneficiario;\\n // $dadosContaImportador->enderecoBeneficiario = $request->enderecoBeneficiario;\\n // $dadosContaImportador->cidadeBeneficiario = $request->cidadeBeneficiario;\\n // $dadosContaImportador->paisBeneficiario = $request->paisBeneficiario;\\n // $dadosContaImportador->nomeBancoBeneficiario = $request->nomeBancoBeneficiario;\\n // $dadosContaImportador->ibanBancoBeneficiario = $request->ibanBancoBeneficiario;\\n // $dadosContaImportador->swiftAbaBancoBeneficiario = $request->swiftAbaBancoBeneficiario;\\n // $dadosContaImportador->numeroContaBeneficiario = $request->numeroContaBeneficiario;\\n // // VALIDA SE EXITE BANCO INTERMADIARIO\\n // if ($request->has('temBancoIntermediario')) {\\n // $dadosContaImportador->nomeBancoIntermediario = $request->nomeBancoIntermediario;\\n // $dadosContaImportador->ibanBancoIntermediario = $request->ibanBancoIntermediario;\\n // $dadosContaImportador->contaBancoIntermediario = $request->contaBancoIntermediario;\\n // $dadosContaImportador->swiftAbaBancoIntermediario = $request->swiftAbaBancoIntermediario;\\n // }\\n // $dadosContaImportador->save();\\n // }\\n\\n // CRIA O DIRETÓRIO PARA UPLOAD DOS ARQUIVOS\\n $this->criaDiretorioUploadArquivo($request, $demanda->idDemanda);\\n\\n // REALIZA O UPLOAD DOS ARQUIVOS E FAZ O INSERT NAS TABELAS TBL_EST_CONTRATACAO_LINK_UPLOADS E TBL_EST_CONTRATACAO_CONFERE_CONFORMIDADE\\n switch ($request->tipoOperacao) {\\n case 'Pronto Importação Antecipado':\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadInvoice\\\", \\\"INVOICE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"INVOICE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"DADOS_CONTA_DO_BENEFICIARIO\\\", $demanda->idDemanda);\\n break;\\n case 'Pronto Importação':\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadInvoice\\\", \\\"INVOICE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"INVOICE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadConhecimento\\\", \\\"CONHECIMENTO_DE_EMBARQUE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"CONHECIMENTO_DE_EMBARQUE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadDi\\\", \\\"DI\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"DI\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"DADOS_CONTA_DO_BENEFICIARIO\\\", $demanda->idDemanda);\\n break;\\n case 'Pronto Exportação Antecipado':\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadInvoice\\\", \\\"INVOICE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"INVOICE\\\", $demanda->idDemanda);\\n break;\\n case 'Pronto Exportação':\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadInvoice\\\", \\\"INVOICE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"INVOICE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadConhecimento\\\", \\\"CONHECIMENTO_DE_EMBARQUE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"CONHECIMENTO_DE_EMBARQUE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadDue\\\", \\\"DUE\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"DUE\\\", $demanda->idDemanda);\\n break;\\n }\\n // DOCUMENTOS DIVERSOS\\n if ($request->has('uploadDocumentosDiversos')) {\\n ContratacaoFaseConformidadeDocumentalController::uploadArquivo($request, \\\"uploadDocumentosDiversos\\\", \\\"DOCUMENTOS_DIVERSOS\\\", $demanda->idDemanda);\\n ContratacaoFaseConformidadeDocumentalController::cadastraChecklist($request, \\\"DOCUMENTOS_DIVERSOS\\\", $demanda->idDemanda);\\n }\\n\\n // REALIZA O INSERT NA TABELA DE HISTORICO\\n $historico = new ContratacaoHistorico;\\n $historico->idDemanda = $demanda->idDemanda;\\n $historico->tipoStatus = \\\"CADASTRO\\\";\\n $historico->dataStatus = date(\\\"Y-m-d H:i:s\\\", time());\\n $historico->responsavelStatus = $request->session()->get('matricula');\\n $historico->area = $lotacao;\\n $historico->analiseHistorico = $request->analiseAg;\\n $historico->save();\\n\\n // ENVIA E-MAIL PARA A AGÊNCIA\\n if (env('DB_CONNECTION') === 'sqlsrv') {\\n $dadosDemandaCadastrada = ContratacaoDemanda::find($demanda->idDemanda);\\n ContratacaoPhpMailer::enviarMensageria($request, $dadosDemandaCadastrada, 'demandaCadastrada', 'faseConformidadeDocumental', null);\\n }\\n \\n $request->session()->flash('corMensagem', 'success');\\n $request->session()->flash('tituloMensagem', \\\"Protocolo #\\\" . str_pad($demanda->idDemanda, 4, '0', STR_PAD_LEFT) . \\\" | Cadastro Realizado com Sucesso!\\\");\\n $request->session()->flash('corpoMensagem', \\\"Sua demanda foi cadastrada com sucesso! Para acompanhar todas suas demandas já cadastradas \\\");\\n DB::commit();\\n return redirect('esteiracomex/solicitar/contratacao');\\n } catch (\\\\Exception $e) {\\n DB::rollback();\\n dd($e);\\n $request->session()->flash('corMensagem', 'danger');\\n $request->session()->flash('tituloMensagem', \\\"Protocolo não foi cadastrado\\\");\\n $request->session()->flash('corpoMensagem', \\\"Aconteceu algum erro durante o cadastro, tente novamente.\\\");\\n return redirect('esteiracomex/solicitar/contratacao');\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"10a2cfb31c1dc13c5d61b59f568dd3a8\",\n \"score\": \"0.55319875\",\n \"text\": \"public function store(Request $request)\\n {\\n\\n $centro = json_decode($request->getContent(), true);\\n\\n if(!Auth::user()->isSuperAdmin()){\\n $centro['coordinador'] = Auth::id();\\n }\\n\\n if(in_array(\\\"verificado\\\", $centro)){\\n unset($centro['verificado']);\\n }\\n\\n $centro = Centro::create($centro);\\n\\n return new CentroResource($centro);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5f8bda492d957cd5c0917fbb7a083a8\",\n \"score\": \"0.553024\",\n \"text\": \"public function store(Request $request)\\n {\\n $construction = New Construction;\\n $construction->name = $request->name;\\n $construction->honorary = $request->honorary;\\n $construction->date = $request->date;\\n $construction->square_meter = $request->square_meter;\\n if($request->status==\\\"Activo\\\")\\n $construction->status=\\\"0\\\";\\n else if($request->status==\\\"Finalizado\\\")\\n $construction->status=\\\"1\\\";\\n else if($request->status==\\\"Espera\\\")\\n $construction->status=\\\"2\\\";\\n $construction->client_id = $request->client_id;\\n $construction->save();\\n\\n $msg = [\\n 'title' => 'Creado!',\\n 'text' => 'Obra creada exitosamente.',\\n 'icon' => 'success'\\n ];\\n\\n $honorary_remaining = New HonoraryRemaining;\\n $honorary_remaining->construction_id = $construction->id;\\n $honorary_remaining->remaining = 0;\\n $honorary_remaining->save();\\n\\n return redirect('construction')->with('message', $msg);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"364eeae3687052f99013e799f4469d92\",\n \"score\": \"0.5527333\",\n \"text\": \"public function store(StoreVacanciesRequest $request)\\n {\\n if (! Gate::allows('vacancy_create')) {\\n return abort(401);\\n }\\n $request = $this->saveFiles($request);\\n $vacancy = Vacancy::create($request->all());\\n $vacancy->sphere_id()->sync(array_filter((array)$request->input('sphere_id')));\\n $vacancy->schedule_id()->sync(array_filter((array)$request->input('schedule_id')));\\n\\n\\n\\n return redirect()->route('admin.vacancies.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5521da03b557ef076a9bc19bca7a7bad\",\n \"score\": \"0.55185604\",\n \"text\": \"public function store(Request $request)\\n {\\n request()->validate([\\n 'beneficiario_id' => 'required',\\n ]);\\n\\n $peso = floatval(request('peso'));\\n $estatura = floatval(request('estatura'));\\n if($estatura != null){ \\n $estatura = $estatura/100;\\n $estatura = pow($estatura,2);\\n $imc = $peso/$estatura;\\n $imc = round($imc,2);\\n }\\n else{\\n $imc = null;\\n }\\n \\n $consulta= new nutricionConsulta([\\n 'ocupacion'=> request('ocupacion'),\\n 'horarioscomida'=> request('horarioscomida'),\\n 'cantidadalimentos'=> request('cantidadalimentos'),\\n 'apetito'=> request('apetito'),\\n 'distension'=> request('distension'),\\n 'estrenimiento'=> request('estrenimiento'),\\n 'flatulencias'=> request('flatulencias'),\\n 'vomitos'=> request('vomitos'),\\n 'caries'=> request('caries'),\\n 'edema'=> request('edema'),\\n 'mareo'=> request('mareo'),\\n 'zumbido'=> request('zumbido'),\\n 'cefaleas'=> request('cefaleas'),\\n 'disnea'=> request('disnea'),\\n 'poliuria'=> request('poliuria'),\\n 'actividadfisica'=> request('actividadfisica'),\\n 'suenohoras'=> request('suenohoras'),\\n 'comidasdia'=> request('comidasdia'),\\n 'lugarcomida'=> request('lugarcomida'),\\n 'preparacomida'=> request('preparacomida'),\\n 'entrecomidas'=> request('entrecomidas'),\\n 'alimentospreferidos'=> request('alimentospreferidos'),\\n 'alimentosodiados'=> request('alimentosodiados'),\\n 'suplementos'=> request('suplementos'),\\n 'medicamentos'=> request('medicamentos'),\\n 'consumoagua'=> request('consumoagua'),\\n 'recordatoriodesayuno'=> request('recordatoriodesayuno'),\\n 'recordatoriocolacionm'=> request('recordatoriocolacionm'),\\n 'recordatoriocomida'=> request('recordatoriocomida'),\\n 'recordatoriocolaciont'=> request('recordatoriocolaciont'),\\n 'recordatoriocena'=> request('recordatoriocena'),\\n 'peso'=> request('peso'),\\n 'estatura'=> request('estatura'),\\n 'tipodieta'=> request('tipodieta'),\\n 'kilocaloriastotal'=> request('kilocaloriastotal'),\\n 'kilocaloriashidratos'=> request('kilocaloriashidratos'),\\n 'porcentajehidratos'=> request('porcentajehidratos'),\\n 'porcentajeproteinas'=> request('porcentajeproteinas'),\\n 'porcentajegrasas'=> request('porcentajegrasas'),\\n 'diagnostico'=> request('diagnostico'),\\n 'nota'=> request('nota'),\\n 'imc'=> $imc,\\n 'fecha'=> request('fecha'),\\n //'beneficiario_id' => request('beneficiario_id'),\\n ]);\\n\\n $id = request('beneficiario_id');\\n $beneficiario = Beneficiario::find($id);\\n $beneficiario->nutricionconsulta()->save($consulta);\\n\\n return view('nutriologia.edit',compact('consulta'));\\n // return redirect('beneficiario/'.$id)->with('nuevo','Consulta agregada con éxito');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5eb9b4e8df5594ad76af8f6f33d394f2\",\n \"score\": \"0.55176973\",\n \"text\": \"public function store()\\n {\\n //\\n $this->supplier->createSupplier(Input::all());\\n return Redirect::action('SupplierController@index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8aed2227138873c176aaff64d3416ff5\",\n \"score\": \"0.5516383\",\n \"text\": \"public function store()\\n {\\n $client = Client::create(array(\\n \\\"attention_name\\\"=> Input::get(\\\"attention_name\\\"),\\n \\\"campany_name\\\" => Input::get(\\\"campany_name\\\"),\\n \\\"address\\\" => Input::get(\\\"address\\\"),\\n \\\"email\\\" => Input::get(\\\"email\\\"),\\n \\\"phone_no\\\" => Input::get(\\\"phone_no\\\"),\\n \\\"tin_no\\\" => Input::get(\\\"tin_no\\\"),\\n \\\"vat_no\\\" => Input::get(\\\"vat_no\\\"),\\n \\\"status\\\" => Input::get(\\\"status\\\"),\\n// \\\"country\\\" => Input::get(\\\"country\\\"),\\n\\n ));\\n\\n return \\\"

    Client Registered Successful

    \\\";\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db53cd50f0951f368ad9ee1136d42921\",\n \"score\": \"0.55158925\",\n \"text\": \"public function store()\\n {\\n $attributes = request()->validate([\\n 'make' => ['required', 'max:255'],\\n 'model' => ['required', 'max:255'],\\n 'description' => ['required', 'min:3', 'max:255']\\n ]);\\n\\n $attributes['owner_id'] = auth()->id();\\n\\n $tag = request()->get('tag');\\n\\n $car = Car::create($attributes);\\n\\n $car->tags()->attach($tag);\\n\\n session()->flash('added', 'You have added a new car!');\\n\\n event(new CarAdded($car)); // fires an event which sends an email to user\\n\\n return redirect ('cars');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54db356d5922a4564d7e55415e63b41e\",\n \"score\": \"0.5510926\",\n \"text\": \"public function store(Request $request)\\n {\\n $this->validate($request, [\\n 'name' => 'required',\\n 'from' => 'required',\\n 'to' => 'required',\\n 'tour_number' => 'required',\\n 'price' => 'required',\\n 'file' => 'required|image',\\n ]);\\n\\n $circuit = new Circuit();\\n\\n if($request->hasFile('file')){\\n $image = $request->file('file');\\n $filename = time(). '.' . $image->getClientOriginalExtension();\\n $location = public_path('uploads/' .$filename);\\n Image::make($image)->fit(310, 201)->save($location);\\n $circuit->file = $filename;\\n }\\n\\n $circuit->name = $request->get('name');\\n $circuit->from = $request->get('from');\\n $circuit->to = $request->get('to');\\n $circuit->price = $request->get('price');\\n $circuit->tour_number = $request->get('tour_number');\\n $circuit->save();\\n\\n Session::flash('success', 'Circuit ajouté avec succès');\\n return redirect()->route('admin.circuit.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f503a6d59b85fa22de2ba93f00eb0f6a\",\n \"score\": \"0.5510771\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t$this->gateway->create(Input::only(['name'])); \\n\\t\\treturn Redirect::to('admin/course');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4e4df912aef65fffd3587228101f760\",\n \"score\": \"0.55086887\",\n \"text\": \"public function store(ClientRequest $request)\\n {\\n Supplier::create($request->only('name', 'phoneNumber'));\\n\\n flash('supplier created success fully');\\n\\n return redirect()->route('suppliers.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"42fd000919e74e694e3b803d9038b66f\",\n \"score\": \"0.5507637\",\n \"text\": \"public function store(Request $request)\\n {\\n Cliente::create($request->all());\\n return redirect()->route('cliente.index')->with('success','Registro creado satisfactoriamente');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"86ccd2c2299a50fe4de5efe0536fd217\",\n \"score\": \"0.55056787\",\n \"text\": \"public function store(Request $request)\\n {\\n $this->validate($request, [\\n 'welfare' => 'required',\\n 'cadre' => 'required',\\n 'value' => 'required',\\n 'active' => 'required'\\n ]);\\n\\n ByCadre::create([\\n 'welfare_id'=> $request->welfare,\\n 'cadre_id' => $request->cadre,\\n 'value' => $request->value,\\n 'percentage'=> $request->percentage,\\n 'active' => $request->active\\n ]);\\n\\n return redirect('hrpayroll/allowance/by-cadre')->with('success', 'Record has been added.');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bd3b0b54a5feb2759712b3290ab19b2\",\n \"score\": \"0.5505329\",\n \"text\": \"public function store(Request $request)\\n {\\n $request['produto'] = mb_strtoupper($request->produto, 'UTF-8');\\n $request['user_id'] = 1;\\n $request['area_id'] = 1;\\n\\n Estoque::create($request->all());\\n return redirect('/admin/farmacia/estoque/cadastro')->with('success', 'Item cadastrado com sucesso!');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7fe55cef40c463739ba8fc103491390\",\n \"score\": \"0.5503317\",\n \"text\": \"public function store(Request $request)\\n {\\n $this->validate($request, [\\n 'serial_number' => 'required',\\n 'weight' => 'required',\\n 'manufacture_date' => 'required',\\n 'shelf_life' => 'required',\\n 'country_of_origin' => 'required',\\n 'source' => 'required',\\n 'source_address' => 'required',\\n 'current_location' => 'required',\\n ]);\\n \\n $cylinder = new Cylinder();\\n $cylinder->serial_number = $request->serial_number;\\n $cylinder->weight = $request->weight;\\n $cylinder->manufacture_date = $request->manufacture_date;\\n $cylinder->shelf_life = $request->shelf_life;\\n $cylinder->country_of_origin = $request->country_of_origin;\\n $cylinder->source = $request->source;\\n $cylinder->source_address = $request->source_address;\\n $cylinder->current_location = $request->current_location;\\n $cylinder->save();\\n\\n $history = new History();\\n $history->serial_number = $request->serial_number;\\n $history->current_location = $request->current_location;\\n $history->save();\\n $request->session()->flash('success', 'Cylinder Added successfully');\\n return redirect()->route('admin.cylinder');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a178edcea7e06905bd094220ab5fe42\",\n \"score\": \"0.55009794\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t$carrier = new $this->repo;\\n\\n\\t\\tif ($carrier->save()) {\\n\\t\\t\\treturn $this->rest->response(201, $carrier);\\n\\t\\t}\\n\\n\\t\\treturn $this->response->errorBadRequest($carrier->errors());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9df0dbf18f74eb02e89331243a109e55\",\n \"score\": \"0.5498913\",\n \"text\": \"public function store(Request $request){\\n\\n $nuevoSeguimiento->paciente=$request->paciente;\\n $nuevoSeguimiento->perfil_medico=$request->perfil_medico;\\n $nuevoSeguimiento->diagnostico_medico=$request->diagnostico_medico;\\n $nuevoSeguimiento->pronostico_medico=$request->pronostico_medico;\\n $nuevoSeguimiento->objetivos_medico=$request->objetivos_medico;\\n $nuevoSeguimiento->actividades_medico=$request->actividades_medico;\\n $nuevoSeguimiento->ind_evaluacion_medico=$request->ind_evaluacion_medico;\\n $nuevoSeguimiento->observaciones_medico=$request->observaciones_medico;\\n $nuevoSeguimiento->perfil_nutricionista=$request->perfil_nutricionista;\\n $nuevoSeguimiento->diagnostico_nutricionista=$request->diagnostico_nutricionista;\\n $nuevoSeguimiento->pronostico_nutricionista=$request->pronostico_nutricionista;\\n $nuevoSeguimiento->objetivos_nutricionista=$request->objetivos_nutricionista;\\n $nuevoSeguimiento->actividades_nutricionista=$request->actividades_nutricionista;\\n $nuevoSeguimiento->ind_evaluacion_nutricionista=$request->ind_evaluacion_nutricionista;\\n $nuevoSeguimiento->observaciones_nutricionista=$request->observaciones_nutricionista;\\n $nuevoSeguimiento->perfil_fisioterapeuta=$request->perfil_fisioterapeuta;\\n $nuevoSeguimiento->diagnostico_fisioterapeuta=$request->diagnostico_fisioterapeuta;\\n $nuevoSeguimiento->pronostico_fisioterapeuta=$request->pronostico_fisioterapeuta;\\n $nuevoSeguimiento->objetivos_fisioterapeuta=$request->objetivos_fisioterapeuta;\\n $nuevoSeguimiento->actividades_fisioterapeuta=$request->actividades_fisioterapeuta;\\n $nuevoSeguimiento->ind_evaluacion_fisioterapeuta=$request->ind_evaluacion_fisioterapeuta;\\n $nuevoSeguimiento->observaciones_fisioterapeuta=$request->observaciones_fisioterapeuta;\\n $nuevoSeguimiento->perfil_psicologico=$request->perfil_psicologico;\\n $nuevoSeguimiento->diagnostico_psicologico=$request->diagnostico_psicologico;\\n $nuevoSeguimiento->pronostico_psicologico=$request->pronostico_psicologico;\\n $nuevoSeguimiento->objetivos_psicologico=$request->objetivos_psicologico;\\n $nuevoSeguimiento->actividades_psicologico=$request->actividades_psicologico;\\n $nuevoSeguimiento->ind_evaluacion_psicologico=$request->ind_evaluacion_psicologico;\\n $nuevoSeguimiento->observaciones_psicologico=$request->observaciones_psicologico;\\n $nuevoSeguimiento->perfil_gerontologo=$request->perfil_gerontologo;\\n $nuevoSeguimiento->objetivos_gerontologo=$request->objetivos_gerontologo;\\n $nuevoSeguimiento->actividades_gerontologo=$request->actividades_gerontologo;\\n $nuevoSeguimiento->ind_evaluacion_gerontologo=$request->ind_evaluacion_gerontologo;\\n $nuevoSeguimiento->observaciones_gerontologo=$request->observaciones_gerontologo;\\n $nuevoSeguimiento->perfil_recreacion=$request->perfil_recreacion;\\n $nuevoSeguimiento->objetivos_recreacion=$request->objetivos_recreacion;\\n $nuevoSeguimiento->actividades_recreacion=$request->actividades_recreacion;\\n $nuevoSeguimiento->ind_evaluacion_recreacion=$request->ind_evaluacion_recreacion;\\n $nuevoSeguimiento->observaciones_recreacion=$request->observaciones_recreacion;\\n $nuevoSeguimiento->perfil_religioso=$request->perfil_religioso;\\n $nuevoSeguimiento->objetivos_religioso=$request->objetivos_religioso;\\n $nuevoSeguimiento->actividades_religioso=$request->actividades_religioso;\\n $nuevoSeguimiento->ind_evaluacion_religioso=$request->ind_evaluacion_religioso;\\n $nuevoSeguimiento->observaciones_religioso=$request->observaciones_religioso;\\n $nuevoSeguimiento->perfil_enfermera=$request->perfil_enfermera;\\n $nuevoSeguimiento->objetivos_enfermera=$request->objetivos_enfermera;\\n $nuevoSeguimiento->actividades_enfermera=$request->actividades_enfermera;\\n $nuevoSeguimiento->ind_evaluacion_enfermera=$request->ind_evaluacion_enfermera;\\n $nuevoSeguimiento->observaciones_enfermera=$request->observaciones_enfermera;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47202a124297d48771d4e762644ea80c\",\n \"score\": \"0.54983157\",\n \"text\": \"public function store(StorePartCreate $request)\\n {\\n $partenaire = New Partenaire;\\n $partenaire->name = $request->name;\\n if($request->image != NULL){\\n $partenaire->image = $request->image->store('','imgPartenaire');\\n }\\n $partenaire->save();\\n\\n return redirect()->route('partenaires.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de140b8a490d0876a83ad8c7296182f3\",\n \"score\": \"0.54964936\",\n \"text\": \"public function store(CinemaRequest $request)\\n {\\n Cinema::create($request->all());\\n return redirect()->route('cinema.index')->with('ok', __('Le cinema a bien été enregistré'));//\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"63212869d3788883caa17587ed5d33b1\",\n \"score\": \"0.5496032\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t$this->stocklocation->create(Input::all());\\n\\t\\t//return view('');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"62be5efef3ecad29e541e8871fb7d512\",\n \"score\": \"0.5492393\",\n \"text\": \"public function store()\\n {\\n $input = Request::all();\\n\\n Client::create($input);\\n\\n return redirect('clients');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbbb1095210aa47b238926ef418f7895\",\n \"score\": \"0.5492094\",\n \"text\": \"public function store(Request $request)\\n {\\n $machinery_time=$request->input('machinery_time');\\n $gas=$request->input('gas');\\n $delivery_time = date(\\\"h:i:s\\\");\\n $trade=DB::table('entregas')->insert([\\\"Delivery_time\\\" =>$delivery_time, \\\"Machine_time\\\"=>$machinery_time, \\\"Gas\\\" =>$gas]);\\n\\n return View('DispachCenter.document_contract');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"03ce3a076d4441326e3a0ec8cfe147d8\",\n \"score\": \"0.5490453\",\n \"text\": \"public function store(Request $request)\\n {\\n $solicitud_beca = new SolicitudBeca();\\n $solicitud_beca->fill($request->all())->save();\\n return response()->json(\\n ['message'=>'Solicitud de beca creado satisfactoriamente', 'data'=>$solicitud_beca]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7da6b3437cfd5093d4b6eb2f239fe0e7\",\n \"score\": \"0.5488208\",\n \"text\": \"public function store(Request $request)\\n {\\n /* $request->validate([\\n 'nome_sector' => 'required|min:3',\\n 'edificio' => 'required'\\n ]);*/\\n\\n $equipamento = new Equipamento();\\n $equipamento->codigo_equipamento = $request->codigo_equipamento;\\n $equipamento->referencia = $request->referencia;\\n $equipamento->estado_conputador = $request->estado_conputador;\\n $equipamento->necessario = $request->necessario;\\n $equipamento->sector_id = $request->sector_id;\\n $equipamento->tipo_id = $request->tipo_id;\\n\\n\\n if ($equipamento->save()) {\\n return response()->json($equipamento, 200);\\n } else {\\n return response()->json([\\n 'message' => 'Some error occurred, please try agian',\\n 'status_code' => 500\\n ], 500);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84bd063185498af5ad6304a729a66212\",\n \"score\": \"0.54874974\",\n \"text\": \"public function store(SerreRequest $request)\\n {\\n $alpha = $request->enviroment_alpha;\\n $beta = $request->enviroment_beta;\\n\\n /* switch ($request->get('envirenement')) {\\n case 1:\\n $alpha = 0.1;\\n $beta = 1.3;\\n break;\\n case 2:\\n $alpha = 1.15;\\n $beta = 1;\\n break;\\n case 3:\\n $alpha = 0.2;\\n $beta = 0.85;\\n break;\\n case 4:\\n $alpha = 0.25;\\n $beta = 0.67;\\n break;\\n case 5:\\n $alpha = 0.35;\\n $beta = 0.47;\\n break;\\n default:\\n $alpha = null;\\n $beta = null;\\n break;\\n }*/\\n // dd($envirenement['alpha']);\\n // dd($alpha,$beta);\\n $serre = new Serre();\\n $serre->name = $request->get('name');\\n $serre->zone_id = $request->get('zone_id');\\n $serre->nbr = $request->get('nbr');\\n $serre->ctz = $request->get('ctz');\\n $serre->c = $request->get('c');\\n $serre->w = $request->get('w');\\n $serre->l = $request->get('l');\\n $serre->h = $request->get('h');\\n $serre->e = $request->get('e');\\n $serre->d = $request->get('d');\\n $serre->tc = $request->get('tc');\\n $serre->hvouv = $request->get('hvouv');\\n $serre->stouv = $request->get('stouv');\\n $serre->srf = $request->get('srf');\\n $serre->ssd = $request->get('ssd');\\n $serre->y = $request->get('y');\\n $serre->alpha = $alpha;\\n $serre->beta = $beta;\\n $serre->type = $request->get('type');\\n $serre->save();\\n /*Serre::create([\\n 'name' => $request->get('name'),\\n 'zone_id' => $request->get('zone_id'),\\n 'nbr' => $request->get('nbr'),\\n 'ctz' => $request->get('ctz'),\\n 'c' => $request->get('c'),\\n 'w' => $request->get('w'),\\n 'l' => $request->get('l'),\\n 'h' => $request->get('h'),\\n 'e' => $request->get('e'),\\n 'd' => $request->get('d'),\\n 'tc' => $request->get('tc'),\\n 'hvouv' =>$request->get('hvouv'),\\n 'stouv' =>$request->get('stouv'),\\n 'srf' =>$request->get('srf'),\\n 'ssd' =>$request->get('ssd'),\\n 'y' =>$request->get('y'),\\n 'alpha' =>$alpha,\\n 'beta' =>$beta\\n ]);*/\\n\\n return redirect()->route('serre.index');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34c38a8e904e6c06a8d3ec1638f7bbbc\",\n \"score\": \"0.54869026\",\n \"text\": \"public function store(StoreCliente $request){\\n\\n $cliente = Cliente::create($request->all());\\n\\n return redirect()->route('cliente.show', $cliente);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e73e75f0810d5c05bb6e07ca805159d\",\n \"score\": \"0.548563\",\n \"text\": \"public function store(CreateArtistaRequest $request)\\n {\\n Artista::create($request->all());\\n return redirect('artistas');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb7e6e82bec8695569f1d209223ba31d\",\n \"score\": \"0.54751456\",\n \"text\": \"public function store() {\\r\\n\\t\\t//\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dcf2b1f653dd44b74c47264d4ceb3c86\",\n \"score\": \"0.54689413\",\n \"text\": \"public function store(Request $request)\\n {\\n request()->validate([\\n 'beneficiario_id' => 'required',\\n ]);\\n\\n if (request('urobilinogeno') == null) {\\n $urobilinogeno = '0.2';\\n }\\n else {\\n $urobilinogeno = request('urobilinogeno');\\n }\\n\\n\\n $examenorina= new ExamenOrina([\\n 'color' => request('color'),\\n 'aspecto' => request('aspecto'),\\n 'ph' => request('ph'),\\n 'densidad' => request('densidad'),\\n 'nitritos' => request('nitritos'),\\n 'glucosa' => request('glucosa'),\\n 'proteinas' => request('proteinas'),\\n 'hemoglobina' => request('hemoglobina'),\\n 'cuerposCetonicos' => request('cuerposCetonicos'),\\n 'bilirribuna' => request('bilirribuna'),\\n 'urobilinogeno' => $urobilinogeno,\\n 'leucocitos' => request('leucocitos'),\\n 'eritrocitosIntactos' => request('eritrocitosIntactos'),\\n 'eritrocitosCrenados' => request('eritrocitosCrenados'),\\n 'observacionLeucocitos' => request('observacionLeucocitos'),\\n 'cristales' => request('cristales'),\\n 'cilindros' => request('cilindros'),\\n 'celulasEpiteliales' => request('celulasEpiteliales'),\\n 'bacterias' => request('bacterias'),\\n 'nota' => request('nota'),\\n 'metodo' => request('metodo'),\\n 'observaciones' => request('observaciones'),\\n 'fecharegistro' => request('fecharegistro'),\\n ]);\\n\\n $id = request('beneficiario_id');\\n $beneficiario = Beneficiario::find($id);\\n $beneficiario->antecedentes()->save($examenorina);\\n\\n return redirect('beneficiario/'.$id)->with('nuevo','Examen de orina registrado con éxito');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4068491f822b923aad1d2c8572974020\",\n \"score\": \"0.54685533\",\n \"text\": \"public function store(CatalogoRequest $request){\\n $data = $request->validated();\\n \\n \\n try{\\n $tarifa_cargos = floatval(str_replace('$','', $data['tarifa_cargos']));\\n\\n $catalogo = new Catalogo;\\n $catalogo->nombre = $data['nombre']; \\n $catalogo->interes = $data['interes'];\\n $catalogo->porcentaje = $data['porcentaje'];\\n $catalogo->num_plazodevolucion = $data['num_plazoDevolucion'];\\n $catalogo->time_plazodevolucion = $data['time_plazoDevolucion'];\\n $catalogo->no_cobranza = $data['no_cobranza'];\\n $catalogo->tarifa_cargos = $tarifa_cargos;\\n $catalogo->creo_id_usuario = auth()->user()->id;\\n $catalogo->save();\\n return redirect()->route('catalogo.index')->with('success', 'El nuevo concepto de prestamo se ha agregado correctamete');\\n } catch (Exception $e) {\\n return $e->getMessage();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3e71d463d3aa2abe949c137e87e474e\",\n \"score\": \"0.5466491\",\n \"text\": \"public function store(Request $request)\\n {\\n VehicleCollateral::create($request->all());\\n return redirect('/admin/vehiclecollateral')->with('Success', 'Collateral Created Successfully');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb4a9198ce48cbf8b725ee8c6a371cab\",\n \"score\": \"0.5462925\",\n \"text\": \"public function store(Request $request)\\n {\\n $informacion=['error'=>false, 'resultado' => '','id'=>''];\\n\\n\\n\\n try{\\n //Aqui se guarda el representante legal\\n /*$repLegal=new RepresentanteLegal;\\n $repLegal->nombre=strtoupper($request['cliente']['replegal']);\\n $repLegal->tipo=\\\"Cliente\\\";\\n $repLegal->save();\\n*/\\n\\n //Aqui se guarda el cliente\\n $cliente=new ComercializacionCliente;\\n $cliente->razon_social=strtoupper($request['cliente']['razon_social']);\\n //$cliente->domicilio_fiscal=strtoupper($request['cliente']['domicilio_fiscal']);\\n $cliente->fecha_alta=$request['cliente']['fecha'];\\n $cliente->nombre_comercial=strtoupper($request['cliente']['nombre_comercial']);\\n //$cliente->rfc=\\\"PENDIENTE\\\";//no necesario que lo capturen\\n //$cliente->cargo=strtoupper($request['cliente']['cargo']);\\n $cliente->giro=strtoupper($request['cliente']['giro']);\\n\\n //$cliente->domicilio_notificacion=\\\"PENDIENTE\\\";//no necesario que lo capturen\\n $cliente->id_delegacion=$request['cliente']['id_delegacion'];\\n //$cliente->tipo_contrato=$request['cliente']['tipo_contrato'];\\n //$cliente->id_representante_legal=$repLegal->id;//$ultimorep->id;\\n $cliente->save();\\n\\n\\n $this->historial('Registro del Cliente id:'. $cliente->id);\\n $informacion['resultado']='El registro del cliente '.$cliente->razon_social.' fue exitoso';\\n $informacion['id']=$cliente->id;\\n }\\n catch(\\\\Exception $e) {\\n $informacion['error']=true;\\n $informacion['resultado']='Registro de datos incorrecto, reporte añadido a SISTEMAS';\\n\\n }\\n return $informacion;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0dce62eec35d53d1929414898265222\",\n \"score\": \"0.54625607\",\n \"text\": \"public function store(Request $request)\\n {\\n $this->validate($request, [\\n\\n 'name' => 'required|max:255',\\n 'lastnames' => 'required|max:255',\\n 'CIN' => 'required|unique:solicituds',\\n 'email' => 'required|email|max:255',\\n 'phone' => 'required|integer|max:255',\\n 'city' => 'required|max:255',\\n\\n ]);\\n\\n $cataloge = Cataloge::find($request['cat']);\\n \\n Solicitud::create([\\n 'name' => $request['name'],\\n 'lastnames' => $request['lastnames'],\\n 'CIN' => $request['CIN'],\\n 'phone' => $request ['phone'],\\n 'city' => $request['city'],\\n 'email' => $request['email'],\\n 'user_id'=> Auth::id(),\\n ])->cataloge()->save($cataloge);\\n \\n\\n\\n /* Cataloge_Solicitud::create([\\n 'cataloge_id' => $request['cataloge_id'],\\n 'solicitud_id' => $request['solicitud_id'],\\n ]); */\\n\\n Session::flash('message','Solicitud creada correctamente');\\n return Redirect::to('/solicitud');////\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5204fe0ff805a8b50ac74f9733ca9f08\",\n \"score\": \"0.54596287\",\n \"text\": \"public function store()\\n {\\n try {\\n $userId = Input::get('user_id') ?: getCurrentUserId();\\n $supplier = Input::get('supplier');\\n $invoice = Input::get('invoice');\\n $products = Input::get('products') ?: [];\\n $description = Input::get('description');\\n\\n // Abre um transaction no banco de dados\\n \\\\DB::beginTransaction();\\n \\\\Log::debug('Transaction - begin');\\n\\n $supplier = $this->importSupplier($supplier);\\n\\n $entry = (self::MODEL)\\n ::create([\\n 'description' => $description,\\n 'confirmed_at' => null,\\n 'user_id' => $userId,\\n 'supplier_id' => $supplier ? $supplier->id : null,\\n ]);\\n\\n $invoice = $this->importInvoice($invoice, $entry->id);\\n $products = $this->importProducts($products, $entry->id);\\n\\n // Fecha a transação e comita as alterações\\n \\\\DB::commit();\\n \\\\Log::debug('Transaction - commit');\\n\\n return $this->createdResponse($entry);\\n } catch (\\\\Exception $exception) {\\n \\\\DB::rollBack();\\n \\\\Log::debug('Transaction - rollback');\\n\\n \\\\Log::error(logMessage($exception, 'Erro ao salvar recurso'), ['model' => self::MODEL]);\\n\\n return $this->clientErrorResponse([\\n 'exception' => '[' . $exception->getLine() . ']' . ' ' . $exception->getMessage()\\n ]);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d25e328608bea4c8f7f39852c1099ca8\",\n \"score\": \"0.54595274\",\n \"text\": \"public function store()\\n\\t{\\n\\t\\t//\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":780,"cells":{"query_id":{"kind":"string","value":"ca9f6429434e393d6f262a5e33bf67c6"},"query":{"kind":"string","value":"bool player_camera = 6;"},"positive_passages":{"kind":"list like","value":[{"docid":"cb0ae94e8fb8ec318dbeaa23792a1140","score":"0.6332921","text":"public function setPlayerCamera($var)\n {\n GPBUtil::checkBool($var);\n $this->player_camera = $var;\n }","title":""}],"string":"[\n {\n \"docid\": \"cb0ae94e8fb8ec318dbeaa23792a1140\",\n \"score\": \"0.6332921\",\n \"text\": \"public function setPlayerCamera($var)\\n {\\n GPBUtil::checkBool($var);\\n $this->player_camera = $var;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"1d5fee24f5da8713e837dd00ed29e236","score":"0.6100702","text":"function cameraInput()\n {\n return isset($this->whiteMap[\"{$this->y},{$this->x}\"]) ? 1 : 0;\n }","title":""},{"docid":"adc72085a4e9a135b3678d0163e50bff","score":"0.6055702","text":"public function hasStationaryCamera(){\n return $this->_has(3);\n }","title":""},{"docid":"850d1174b1baa4821e4813d7e41b5047","score":"0.552724","text":"public function isPlayable(): bool;","title":""},{"docid":"8cee593fff3e4d38f82da688d388480d","score":"0.536648","text":"function setSurvivalModeTrue()\n{\n global $isSurvival;\n if (isset($_POST['page']) && !isset($_POST['survivalMode']) && $_SESSION['survivalMode']) {\n // NEW GAME WITH CAMPAIGN MODE\n $_SESSION[\"survivalMode\"] = false;\n resetPoints();\n }\n if (isset($_POST['page']) && isset($_POST['survivalMode']) && !$_SESSION['survivalMode']) {\n // NEW GAME WITH SURVIVE MODE\n $isSurvival = true;\n $_SESSION[\"survivalMode\"] = true;\n resetPoints();\n }\n if (isset($_POST['survivalMode']) or $_SESSION[\"survivalMode\"]) {\n // FOLLOW WITH THE SAME SURVIVAL MODE\n $isSurvival = true;\n $_SESSION[\"survivalMode\"] = true;\n }\n}","title":""},{"docid":"cec0f61f6e6973fa543a700ec569f2ad","score":"0.53636265","text":"public function getPlayerCamera()\n {\n return $this->player_camera;\n }","title":""},{"docid":"a0a51167bb6f23fded25f7fdc2b25d4b","score":"0.5261664","text":"function wpvideocoach_checked_six() {\r\n\tglobal $wpvideocoach_visible_036, $wpvideocoach_visible_037, $wpvideocoach_visible_038, $wpvideocoach_visible_039, $wpvideocoach_visible_040;\r\n\tif(!empty($wpvideocoach_visible_036) && !empty($wpvideocoach_visible_037) && !empty($wpvideocoach_visible_038) && !empty($wpvideocoach_visible_039) && !empty($wpvideocoach_visible_040)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"2c08869306bf557dd9d5cdc226bed6fd","score":"0.52284294","text":"public function testUpdateDeviceCameraVideoSettings()\n {\n }","title":""},{"docid":"f777b0df7f03af8d3ffbb69640ade054","score":"0.51885533","text":"function wpvideocoach_checked_four() {\r\n\tglobal $wpvideocoach_visible_028, $wpvideocoach_visible_029, $wpvideocoach_visible_030, $wpvideocoach_visible_031;\r\n\tif(!empty($wpvideocoach_visible_028) && !empty($wpvideocoach_visible_029) && !empty($wpvideocoach_visible_030) && !empty($wpvideocoach_visible_031)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"ce1902b8dd87bb1062520151793bbf55","score":"0.5130662","text":"function wpvideocoach_checked_twelve() {\r\n\tglobal $wpvideocoach_visible_141, $wpvideocoach_visible_142;\r\n\tif(!empty($wpvideocoach_visible_141) && !empty($wpvideocoach_visible_142)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"ad57ea3ed75107c7431eb59a496cf122","score":"0.5085652","text":"public function setImageMatte(bool $matte): bool {}","title":""},{"docid":"3b4ab27511b51b1ef1251efe490a06ab","score":"0.50723946","text":"public function setImageScene(int $scene): bool {}","title":""},{"docid":"16d03bc3399735f12572a29a562b7882","score":"0.5061079","text":"function wpvideocoach_checked_eight() {\r\n\tglobal $wpvideocoach_visible_046, $wpvideocoach_visible_047, $wpvideocoach_visible_048, $wpvideocoach_visible_049, $wpvideocoach_visible_050;\r\n\tif(!empty($wpvideocoach_visible_046) && !empty($wpvideocoach_visible_047) && !empty($wpvideocoach_visible_048) && !empty($wpvideocoach_visible_049) && !empty($wpvideocoach_visible_050)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"8fbb9d30ee850c4e19ea08fc873e1bef","score":"0.506105","text":"function wpvideocoach_checked_three() {\r\n\tglobal $wpvideocoach_visible_024, $wpvideocoach_visible_025, $wpvideocoach_visible_026, $wpvideocoach_visible_027;\r\n\tif(!empty($wpvideocoach_visible_024) && !empty($wpvideocoach_visible_025) && !empty($wpvideocoach_visible_026) && !empty($wpvideocoach_visible_027)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"47078f3993b43efa16eebf7a89eb9b16","score":"0.5038036","text":"function CAPTURE_toggle()\n{\n\tCAPTURE_deActivate(!CAPTURE_isActive());\n}","title":""},{"docid":"b2f9689bf424fb9fc7c34f28c95b562e","score":"0.50333124","text":"function wpvideocoach_checked_one() {\r\n\tglobal $wpvideocoach_visible_001, $wpvideocoach_visible_002, $wpvideocoach_visible_003;\r\n\tif(!empty($wpvideocoach_visible_001) && !empty($wpvideocoach_visible_002) && !empty($wpvideocoach_visible_003)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"073a2c3a3ad6da0840cf6f4e04f48f3d","score":"0.5031164","text":"function wpvideocoach_checked_thirteen() {\r\n\tglobal $wpvideocoach_visible_151, $wpvideocoach_visible_152, $wpvideocoach_visible_153;\r\n\tif(!empty($wpvideocoach_visible_151) && !empty($wpvideocoach_visible_152) && !empty($wpvideocoach_visible_153)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"924cb46b8b759f2d38097b8e593ce5e6","score":"0.4954004","text":"function wpvideocoach_checked_five() {\r\n\tglobal $wpvideocoach_visible_032, $wpvideocoach_visible_033, $wpvideocoach_visible_034, $wpvideocoach_visible_035;\r\n\tif(!empty($wpvideocoach_visible_032) && !empty($wpvideocoach_visible_033) && !empty($wpvideocoach_visible_034) && !empty($wpvideocoach_visible_035)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"912888cfbcaee11b8a2211217baabe4e","score":"0.49328542","text":"function wpvideocoach_checked_ten() {\r\n\tglobal $wpvideocoach_visible_121, $wpvideocoach_visible_122, $wpvideocoach_visible_123, $wpvideocoach_visible_124, $wpvideocoach_visible_125, $wpvideocoach_visible_126;\r\n\tif(!empty($wpvideocoach_visible_121) && !empty($wpvideocoach_visible_122) && !empty($wpvideocoach_visible_123) && !empty($wpvideocoach_visible_124) && !empty($wpvideocoach_visible_125) && !empty($wpvideocoach_visible_126)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"8717a27aa02f3d1912d93e693c708618","score":"0.4923841","text":"function wpvideocoach_checked_seven() {\r\n\tglobal $wpvideocoach_visible_041, $wpvideocoach_visible_042, $wpvideocoach_visible_043, $wpvideocoach_visible_044, $wpvideocoach_visible_045;\r\n\tif(!empty($wpvideocoach_visible_041) && !empty($wpvideocoach_visible_042) && !empty($wpvideocoach_visible_043) && !empty($wpvideocoach_visible_044) && !empty($wpvideocoach_visible_045)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"5ca0e9719bfa5efc1f30d75e7a2f9ab2","score":"0.49162614","text":"public function setPublic(bool $bool);","title":""},{"docid":"5f60b453bdea0b5129cbf41fe3c6c426","score":"0.49046075","text":"public abstract function isPlaying();","title":""},{"docid":"0283201acca5b1e056b39f418c3fd2b8","score":"0.4900024","text":"public function main()\n {\n // Set now playing overlay time to current time\n $this->nowPlayingOverlayShownTime = time();\n\n // Create our master loop\n while(true) {\n\n // Keep track of whether we have done a switch\n $switched = false;\n\n // Set a random time for the next switch to occur\n $switchDelayTime = rand($this->switchTimeMin,$this->switchTimeMax);\n\n // Get the state of the cameras\n $videoInput = $this->getVideoState();\n\n // Grab our volume state\n $audioInput = $this->getVolumeState();\n\n // Get the state of our overlays\n $titleInput = $this->getTitleState();\n\n $onAirOverlays = $this->getOnAirOverlays();\n\n // Remove ignored inputs\n foreach($this->ignoreInputs as $inputIgnore) {\n unset($audioInput[$inputIgnore]);\n }\n\n // Check if nexgen is above the threshold and if it is, cut to the wide shot.\n foreach($this->playoutInputNames as $inValue) {\n if($audioInput[$inValue]['volume'] > $this->playoutThreshold) {\n $switched = true;\n echo \" Switching to wide \\r \\n\";\n $this->switchApiInput('cut', $videoInput[$this->wideCamera]['key']);\n\n // Run now playing function to determine if we should show 'Now Playing Title'\n $this->nowPlaying($titleInput, $onAirOverlays);\n }\n }\n\n // Nexgen isn't playing, so now find the microphone that is exceeding our threshold and cut to it\n if($switched == false) {\n $loudest = array_reduce($audioInput, function($a, $b) {\n return $a['volume'] > $b['volume'] ? $a : $b;\n });\n\n if($this->micCameraMap[$loudest['name']] != NULL) {\n echo \" Switching to \".$loudest['name'].\"\\r \\n\";\n $this->switchApiInput('cut', $videoInput[$this->micCameraMap[$loudest['name']]]['key']);\n\n // Show the now playing title if it is still shown\n $this->nowPlaying($titleInput, $onAirOverlays, true);\n }\n }\n\n // Sleep for duration of the switch\n sleep($switchDelayTime);\n\n // If we are in the browser we only execute one loop, to avoid an endless loop\n if (!php_sapi_name() == \"cli\") {\n break;\n }\n }\n }","title":""},{"docid":"01adfc05ab9c1217c55ef90b0db7d215","score":"0.4899832","text":"public function testUpdateDeviceCameraSense()\n {\n }","title":""},{"docid":"2013fa0421f2a2771fa302711ba5881f","score":"0.48899117","text":"function BotOpped()\n{\n if (isset($GLOBALS['BOT_OPPED'])) {\n return true;\n } else { \n return false;\n }\n}","title":""},{"docid":"6cef344e3bb0cabf9fd32bfdcb6a73c4","score":"0.48880386","text":"public function isGrabable(){ // $grabar\n return $this->save;\n }","title":""},{"docid":"89ba07f58db2f5a6bb495e2729498541","score":"0.48850176","text":"public function set_init($bool);","title":""},{"docid":"4ea7e70ae6a59bdfd6b0cab60e23563b","score":"0.48813272","text":"function wpvideocoach_checked_eleven() {\r\n\tglobal $wpvideocoach_visible_131, $wpvideocoach_visible_132, $wpvideocoach_visible_133, $wpvideocoach_visible_134;\r\n\tif(!empty($wpvideocoach_visible_131) && !empty($wpvideocoach_visible_132) && !empty($wpvideocoach_visible_133) && !empty($wpvideocoach_visible_134)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"c7d8fc17c3e468c6a4cb13c08f02be3c","score":"0.4877666","text":"public function setEsGrabable($val){ // $grabar\n $this->save = (bool)$val;\n }","title":""},{"docid":"6342d48e58b3e16ae7aed016fdfb6ae3","score":"0.48596755","text":"public function setCameraBlocked(?bool $value): void {\n $this->getBackingStore()->set('cameraBlocked', $value);\n }","title":""},{"docid":"6342d48e58b3e16ae7aed016fdfb6ae3","score":"0.48596755","text":"public function setCameraBlocked(?bool $value): void {\n $this->getBackingStore()->set('cameraBlocked', $value);\n }","title":""},{"docid":"5546ffa1ba2615efc1dd5823c1c15357","score":"0.485461","text":"public function isPlayed() { return false; }","title":""},{"docid":"87215e43602ccbc717d7761cd9390c4a","score":"0.48528007","text":"public static function setUserMode($flag){\n\t\tif($flag === true){\n\t\t\tself::$user_mode = true;\n\t\t}else{\n\t\t\tself::$user_mode = false;\n\t\t}\n\t}","title":""},{"docid":"a41b66a15edc904eb43c4b8b9a1addc2","score":"0.4816592","text":"public function inLimbo(): bool;","title":""},{"docid":"1183f386785edcff3af7ff40623ce7ca","score":"0.4793966","text":"public static function getBoolean()\n {\n return (boolean)(\\rand() & 1);\n }","title":""},{"docid":"fda50afb6b16bf0cd61e9113b0398ff4","score":"0.478334","text":"abstract protected function gameShouldContinue(): bool;","title":""},{"docid":"bece6d0dc65869dd775539246f5ef5e7","score":"0.4781173","text":"public static function debug($bool=true){\n\t\n\t\tself::$debug = (bool) $bool;\n\t}","title":""},{"docid":"0b77507e025421975d5daae191fd7461","score":"0.4778276","text":"public function getImageMatte(): bool {}","title":""},{"docid":"8f897e360beba457707399007772d576","score":"0.4772368","text":"public function restrict_webcam_sharing($value)\n {\n $old_value = 'presenterShareOnly=\"false\"';\n $new_value = 'presenterShareOnly=\"true\"';\n\n switch ($value) {\n case true:\n $this->changeValue($old_value, $new_value, $this->files['client']['config']);\n break;\n case false:\n $this->changeValue($new_value, $old_value, $this->files['client']['config']);\n break;\n }\n }","title":""},{"docid":"dad1427eae3f092bdb9f41e4c7af7914","score":"0.47711524","text":"public function testGetDeviceCameraVideoSettings()\n {\n }","title":""},{"docid":"f4096b97d19387223412cb87c3509ba9","score":"0.47531518","text":"function wpvideocoach_checked_nine() {\r\n\tglobal $wpvideocoach_visible_101, $wpvideocoach_visible_102, $wpvideocoach_visible_103, $wpvideocoach_visible_104, $wpvideocoach_visible_105, $wpvideocoach_visible_106, $wpvideocoach_visible_107, $wpvideocoach_visible_108, $wpvideocoach_visible_109;\r\n\tif(!empty($wpvideocoach_visible_101) && !empty($wpvideocoach_visible_102) && !empty($wpvideocoach_visible_103) && !empty($wpvideocoach_visible_104) && !empty($wpvideocoach_visible_105) && !empty($wpvideocoach_visible_106) && !empty($wpvideocoach_visible_107) && !empty($wpvideocoach_visible_108) && !empty($wpvideocoach_visible_109)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"4f8fcd732ad3dbdd20fead758c5e64ba","score":"0.47331393","text":"function air_horn_sound_setflag($user_login, $user)\n{\n\tupdate_user_meta($user->ID, 'air_horn_playsound', 1);\n}","title":""},{"docid":"6d01061579a8e0f991e1d3eacc55f4d6","score":"0.47187388","text":"function gameComplete(){\n return isset($_SESSION[\"gamecomplete\"]) ? $_SESSION[\"gamecomplete\"] :false;\n}","title":""},{"docid":"8f37f2792a0ec080a78241930b123c75","score":"0.4688589","text":"public function player_loaded() { \n\n\t\tif (is_object($this->_player)) { \n\t\t\treturn true; \n\t\t} \n\t\telse { \n\t\t\treturn false; \n\t\t} \n\n\t}","title":""},{"docid":"1d1cd3aa49a87900470b5072994cf805","score":"0.46694636","text":"final static function boolean() {}","title":""},{"docid":"5688b2c2cab3f7ef30c9ee755f6b26ad","score":"0.46661937","text":"public static function setGuestMode($flag){\n\t\tif($flag === true){\n\t\t\tself::$guest_mode = true;\n\t\t}else{\n\t\t\tself::$guest_mode = false;\n\t\t}\n\t}","title":""},{"docid":"3925099313f1dc798f4988cd49ede8da","score":"0.46618417","text":"public function setBoolean(string $name, bool $value): bool\n {\n $this->_globalVariables['db 0x43'][$name] = (int)$value;\n return (bool)$this->_globalVariables['db 0x43'][$name];\n }","title":""},{"docid":"2769fb6633b44b776b1b10344b23b9f6","score":"0.46600857","text":"public function isMelee(): bool;","title":""},{"docid":"c965901ab9806f7a23c3ae0190325cde","score":"0.46565008","text":"public function isPreviewMode(): bool\n\t{\n\t\treturn $this->isPreviewMode;\n\t}","title":""},{"docid":"79843ef08ef437896af8ecf4d36f27cd","score":"0.46556088","text":"function wpvideocoach_checked_two() {\r\n\tglobal $wpvideocoach_visible_004, $wpvideocoach_visible_005, $wpvideocoach_visible_006, $wpvideocoach_visible_007, $wpvideocoach_visible_008, $wpvideocoach_visible_009, $wpvideocoach_visible_010, $wpvideocoach_visible_011, $wpvideocoach_visible_012, $wpvideocoach_visible_013, $wpvideocoach_visible_014, $wpvideocoach_visible_015, $wpvideocoach_visible_016, $wpvideocoach_visible_017, $wpvideocoach_visible_018, $wpvideocoach_visible_019, $wpvideocoach_visible_020, $wpvideocoach_visible_021, $wpvideocoach_visible_022, $wpvideocoach_visible_023;\r\n\tif(!empty($wpvideocoach_visible_004) && !empty($wpvideocoach_visible_005) && !empty($wpvideocoach_visible_006) && !empty($wpvideocoach_visible_007) && !empty($wpvideocoach_visible_008) && !empty($wpvideocoach_visible_009) && !empty($wpvideocoach_visible_010) && !empty($wpvideocoach_visible_011) && !empty($wpvideocoach_visible_012) && !empty($wpvideocoach_visible_013) && !empty($wpvideocoach_visible_014) && !empty($wpvideocoach_visible_015) && !empty($wpvideocoach_visible_016) && !empty($wpvideocoach_visible_017) && !empty($wpvideocoach_visible_018) && !empty($wpvideocoach_visible_019) && !empty($wpvideocoach_visible_020) && !empty($wpvideocoach_visible_021) && !empty($wpvideocoach_visible_022) && !empty($wpvideocoach_visible_023)) {\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n\telse {\r\n\t\t//do nothing\r\n\t}\r\n}","title":""},{"docid":"003a6d98291d267c10e5e899b6f1ba1b","score":"0.46495613","text":"function prepare_bool( $p_bool ) {\n\t\treturn (int)(bool)$p_bool;\n\t}","title":""},{"docid":"ee05c752018bea05c0d7966f563ea98b","score":"0.46485397","text":"public function isSingleRegistration()\n {\n return 1 == $this->players;\n }","title":""},{"docid":"8827c43e42c36e78b98b716f7eff8f08","score":"0.46419957","text":"public function playersAreAlive(){\n if($this->hero->getHealth() > 0 && $this->beast->getHealth() > 0){\n return true;\n } else{\n return false;\n }\n }","title":""},{"docid":"94afa2965f97fb99498d70b2e79bf024","score":"0.46402207","text":"public function hasEye(){\n return $this->_has(8);\n }","title":""},{"docid":"60545405e1b6b16ce2f6d05273eea807","score":"0.46230078","text":"function getIsPreset()\n {\n return (bool) $this->_bIsPreset;\n }","title":""},{"docid":"60545405e1b6b16ce2f6d05273eea807","score":"0.46230078","text":"function getIsPreset()\n {\n return (bool) $this->_bIsPreset;\n }","title":""},{"docid":"a9cb1e24f939ffb6e44bc17431212644","score":"0.46198142","text":"function isPreview() {\n\t\treturn ($this->conf[$this->cmdKey.'.']['preview'] && $this->feUserData['preview']);\n\t}","title":""},{"docid":"59659fe37a21c707e03a0e3dddcef9e7","score":"0.4617984","text":"function setImposterModeTrue()\n{\n global $isImposter;\n if (isset($_POST['page']) && !isset($_POST['imposterMode']) && $_SESSION['imposterMode']) {\n // NEW GAME WITHOUT IMPOSTOR\n $_SESSION[\"imposterMode\"] = false;\n resetPoints();\n }\n if (isset($_POST['page']) && isset($_POST['imposterMode']) && !$_SESSION['imposterMode']) {\n // NEW GAME WITH IMPOSTOR\n $isImposter = true;\n $_SESSION[\"imposterMode\"] = true;\n resetPoints();\n }\n if (isset($_POST['imposterMode']) or $_SESSION[\"imposterMode\"]) {\n // FOLLOW WITH THE SAME IMPOSTER MODE\n $isImposter = true;\n $_SESSION[\"imposterMode\"] = true;\n }\n}","title":""},{"docid":"17ec52a0bf8594106b2293f806cf16b5","score":"0.46147388","text":"public function hasGamePort()\n {\n return $this->game_port !== null;\n }","title":""},{"docid":"0eba5b4db67a6eb3304b5c6233982765","score":"0.4590185","text":"public function getLightsStatus(): bool\n {\n return $this->lights;\n }","title":""},{"docid":"85330b126e18ea3b8a6a0c2fd077a5b6","score":"0.45834893","text":"function CAPTURE_isActive()\n{\n\treturn(file_exists(\"/m23/tmp/captureSave\"));\n}","title":""},{"docid":"9658486d16a7bd6c184618892b64fa13","score":"0.45786512","text":"public function debug($bool){\n $this->debug = (bool) $bool;\n }","title":""},{"docid":"ca96b827c748b40a24fa1f54cbfdbc93","score":"0.45737106","text":"public static function setSensor($sensor)\n {\n if (!is_bool($sensor))\n {\n// throw new Exception('The parameter must be boolean.');\n } // if\n\n self::$sensor = $sensor;\n }","title":""},{"docid":"67bfbb758ed0f66573977fb33d93c0bf","score":"0.4569562","text":"function cb_motion_detected()\n{\n echo \"Motion Detected\\n\";\n}","title":""},{"docid":"e8c9641624c42213d05523acc0e75569","score":"0.4569271","text":"public static function setDevelopment($flag)\r\n\t{\r\n\t self::$_isDev = (bool) $flag;\r\n\t}","title":""},{"docid":"5e3993de45f14db9c1dab510c20b8e06","score":"0.45606783","text":"public function testUpdateOrganizationCameraOnboardingStatuses()\n {\n }","title":""},{"docid":"44180dc69cf772006779dc5fd133fc5a","score":"0.45497355","text":"function update_turns_by_player_moves($game){\n // if in match not throwed cube then not change turns\n if($game['throwed_cube'] == 0){\n return false;\n }\n $points = $game['last_throw_points'];\n $game_id = $game['id'];\n $player = get_game_active_player($game_id);\n // if none player in game has status 4, so active not throw cube pass\n // change turns\n if ($player == null){\n return false;\n }\n // check if player have move\n $player_manager = new PlayerManager($player['id']);\n if ($player_manager->check_if_player_have_moves($points)){\n echo \"player have moves
    \";\n } else {\n // if player have not any move\n $turnManager = new TurnManager($game_id);\n $turnManager->change_turn();\n }\n}","title":""},{"docid":"5103f7453b8466510b0c16fa3980a614","score":"0.45485303","text":"public function turnOn()\n {\n echo 'light is already on->take no action
    ';\n }","title":""},{"docid":"bc3e88844f2f758244be8284f69b02df","score":"0.4542378","text":"function checkWinner()\n {\n // $player = $_SESSION[\"currentplayer\"];\n $computer = $_SESSION[\"computerturn\"];\n\n if ($computer === false) {\n if ($_SESSION[\"gameroundSum\"] >= 100) {\n $_SESSION[\"haveWinner\"] = \"Spelare 1\";\n } else {\n changePlayer();\n }\n } elseif ($computer === true) {\n if ($_SESSION[\"computersum\"] >= 100) {\n $_SESSION[\"haveWinner\"] = \"datorn\";\n } else {\n changePlayer();\n }\n }\n }","title":""},{"docid":"4fe4ac1f7f74b802023d07cde42dd4cd","score":"0.45354906","text":"function one_zero( $new_value ) {\n\t\treturn (int) (bool) $new_value;\n\t}","title":""},{"docid":"94858476a3437fcfca7e0b677e17006d","score":"0.45336163","text":"function octopus_get_visible_flag($user, $cmid) {\n global $DB;\n\n return $DB->get_record_sql('SELECT p.private, u.firstname FROM mdl_octopus_private_profile p, mdl_user u\n WHERE p.user_id = ' . $user . ' AND p.cmid = ' . $cmid . ' AND u.id = ' . $user . ' ');\n}","title":""},{"docid":"a54514f5a21b882795a8ce92ae51457a","score":"0.4531986","text":"function setNvpRequest($flag)\n {\n $this->nvpRequest = (bool)$flag;\n }","title":""},{"docid":"92616f145fc5a9d6e3b9a43359a089de","score":"0.45307848","text":"function Camion()\n {\n //se llama igual que la clase,\n //le da un estado inicial a la clase\n $this->ruedas = 8; //nuestro coche en estadio inicial tiene 4 ruedas\n $this->color = \"gris\"; //El color esta sin definir\n $this->motor = 2600; //Con esto le dimos estado inicial a nuestro objeto coche\n }","title":""},{"docid":"b6f2903bb381afb149f0d60b63307c99","score":"0.4528312","text":"public function isSettingDefaultImage() :bool\n\t{\n\t\treturn (bool) static::$is_saving_default_image;\n\t}","title":""},{"docid":"e1335bfc2cbf98b71121cc9554ce54aa","score":"0.4527293","text":"public function flag(): ?bool;","title":""},{"docid":"a78d1671e9782c7289a8aae6471e8735","score":"0.45262432","text":"function check_session_variable($main_object) {\n\t\t\tif(isset($_SESSION[\"account\"])) {\n\t\t\t\tif($_SESSION[\"account\"] == \"Manager\") {\n\t\t\t\t\tif(isset($_SESSION[\"research_group\"])){\n\t\t\t\t\t\t$main_object->research_group = $_SESSION[\"research_group\"];\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse return false;\n }","title":""},{"docid":"9860577c02e07ffb5baf635a3a29d69d","score":"0.45195323","text":"public function setDevMode($flag)\n {\n $this->devMode = (bool)$flag;\n }","title":""},{"docid":"8f525f279cf96c67b6ab845de083c3eb","score":"0.4518466","text":"public function activateCards($player){\n if(!empty($player->getPlateau())){\n foreach ($player->getPlateau()as $carte){\n if($carte->getActive() == 0){\n $carte->setActive(1);\n }\n }\n }\n }","title":""},{"docid":"39d3ebc022102042c7bf12963e1877e3","score":"0.45174855","text":"function uv_is_active(UV $handle)\n{\n}","title":""},{"docid":"a6782eafb39e4b5f3a31e57937d14481","score":"0.4513184","text":"function get_im() {\r\n\t\treturn false;\r\n\t}","title":""},{"docid":"440196c9686eb1987aab37cbc8500c33","score":"0.45126188","text":"function pak_player($in)\r\n\t{\r\n\t\tglobal $pak_player;\r\n\t\t$pak_player = true;\r\n\t\t\r\n\t\t$vdetails = $in['vdetails'];\r\n\t\t$vid_file = get_video_file($vdetails,true,true);\r\n\t\t//Checking for YT Referal\r\n\t\t$ref = $vdetails['refer_url'];\r\n\t\t//Checking for youtube\r\n\t\tif(function_exists('is_ref_youtube'))\r\n\t\t\t$ytcom = is_ref_youtube($ref);\r\n\t\tif($ytcom)\r\n\t\t\t$is_youtube = true;\r\n\t\telse\r\n\t\t\t$is_youtube = false;\r\n\t\r\n\t\tif($vid_file || $is_youtube)\r\n\t\t{\r\n\t\t\t$hd = $data['hq'];\r\n\t\t\t\r\n\t\t\tif($hd=='yes') $file = get_hq_video_file($vdetails); else $file = get_video_file($vdetails,true,true);\r\n\t\t\t$hd_file = get_hq_video_file($vdetails);\r\n\t\t\t\r\n\t\t\tif($is_youtube)\r\n\t\t\t{\r\n\t\t\t\tpreg_match(\"/\\?v\\=(.*)/\",$ref,$srcs);\r\n\r\n\t\t\t\t$srcs = explode(\"&\",$srcs[1]);\r\n\t\t\t\t$srcs = $srcs[0];\r\n\t\t\t\t$srcs = explode(\"?\",$srcs);\r\n\t\t\t\t$ytcode = $srcs[0];\r\n\t\t\t\tassign('youtube',true);\r\n\t\t\t\tassign('ytcode',$ytcode);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!strstr($in['width'],\"\\%\"))\r\n\t\t\t\t$in['width'] = $in['width'].'px';\r\n\t\t\tif(!strstr($in['height'],\"\\%\"))\r\n\t\t\t\t$in['height'] = $in['height'].'px';\r\n\t\t\t\r\n\t\t\tif($in['autoplay'] =='yes' || $in['autoplay']===true)\r\n\t\t\t\t$in['autoplay'] = \"true\";\r\n\t\t\telse\r\n\t\t\t\t$in['autoplay'] = \"false\";\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Logo Placement\r\n\t\t\t$placement = config('logo_placement');\r\n\t\t\tswitch($placement)\r\n\t\t\t{\r\n\t\t\t\tcase \"tl\":\r\n\t\t\t\tassign('logo_top','5');\r\n\t\t\t\tassign('logo_left','5');\r\n\t\t\t\tassign('logo_position','top:5,left:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"tr\":\r\n\t\t\t\tassign('logo_top','5');\r\n\t\t\t\tassign('logo_right','5');\r\n\t\t\t\tassign('logo_position','top:5,right:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"br\":\r\n\t\t\t\tassign('logo_bottom','5');\r\n\t\t\t\tassign('logo_right','5');\r\n\t\t\t\tassign('logo_position','bottom:5,right:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase \"bl\":\r\n\t\t\t\tassign('logo_bottom','5');\r\n\t\t\t\tassign('logo_left','5');\r\n\t\t\t\tassign('logo_position','bottom:5,left:5');\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tassign('player_data',$in);\r\n\t\t\tassign('player_logo',website_logo());\r\n\t\t\tassign('normal_vid_file',$vid_file);\r\n\t\t\tassign(\"hq_vid_file\",$hd_file);\t\t\t\r\n\t\t\tassign('vdata',$vdetails);\r\n\t\t\tTemplate(PAK_PLAYER_DIR.'/player.html',false);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}","title":""},{"docid":"ff45b48aeef28a1807a9f79e90163ce5","score":"0.4511899","text":"public function testGetDeviceCameraSense()\n {\n }","title":""},{"docid":"15eceed5f2a5d9abcaaf497fdd306b1a","score":"0.45060098","text":"function isVisible($row,$mode) {\n if (($mode == \"dm\") && ($row['dmVisible'] == 1)) {return True;}\n elseif ($row['visible'] == 1) {return True;}\n else {return False;}\n}","title":""},{"docid":"f6c1250cff208b3db59e6a1e307892f4","score":"0.44935986","text":"function use_ki($game_id) {\n\tglobal $db;\n\t$ki = false;\n\t$sql = 'SELECT player1 FROM addle WHERE id = '.$game_id;\n\t$result = $db->query($sql, __FILE__, __LINE__, __FUNCTION__);\n\t$rs = $db->fetch($result);\n\tif($rs['player1'] == BARBARA_HARRIS) {\n\t\t$ki = true;\n\t}\n}","title":""},{"docid":"23f12c0092824c884066cbb5fee2607a","score":"0.44875294","text":"function gallery_enable_player_for_activity(){\r\n?>\r\n\r\ngame_flags !== null;\n }","title":""},{"docid":"ee37ca07cae8e3527ee8424c9f43d06d","score":"0.4483417","text":"function setForceAudioPreview($a_val)\n\t{\n\t\t$this->force_audio_preview = $a_val;\n\t}","title":""},{"docid":"61a31977fb73680e608fbbef7f466987","score":"0.44817832","text":"public function nativeBoolean()\n {\n $this->use_native_boolean = true;\n }","title":""},{"docid":"1cad7a8296b28c2260f4f4005eaf0923","score":"0.4481151","text":"public function isPublic($flag){\n return $this->setVar('public', $flag);\n }","title":""},{"docid":"a963b01b6025dd88b337e5a28c6ac0f3","score":"0.44801444","text":"public function isShootingWeapon(): bool;","title":""},{"docid":"f0a075699ede7170f086a6c48a1c7a3c","score":"0.44794244","text":"function markGameAsNew(){\n $_SESSION[\"gamecomplete\"] = false;\n}","title":""},{"docid":"4382a94502ef792ee1b9f491d083c4b0","score":"0.4479254","text":"function hasHonors(){\n if($this->gpa >= 3.5){\n return \"true\";\n }\n else{ \n return \"false\"; \n }\n }","title":""},{"docid":"bb1053e129d745bc1c86f16421a0ea6a","score":"0.44783607","text":"static public function connected(){return (self::$_connected==true);}","title":""},{"docid":"4b2fdf4d273b08b0afaea94e6148a299","score":"0.44698387","text":"public function setGamingBlockMultiplayer(?bool $value): void {\n $this->getBackingStore()->set('gamingBlockMultiplayer', $value);\n }","title":""},{"docid":"0c30b15176239c88cd94572c92a26cf4","score":"0.44659618","text":"function checkLogin(){\n if ($this->userid <= 0){\n return 0;\n }else{\n return 1;\n }\n}","title":""},{"docid":"4fb9714cf66661bb8444f882da877444","score":"0.44643655","text":"function Camion() {\n //Con la flecha se refencia o una propiedad o un metodo de la clase\n $this->ruedas=4;\n $this->color='';\n $this->motor=1600;\n\n }","title":""},{"docid":"123e4e623f572fa3f3e91bc49ecd6e6e","score":"0.44625556","text":"public function getFilmGeoblockingEnabled()\n\t{\n\t\treturn $this->film_geoblocking_enabled;\n\t}","title":""},{"docid":"bf3933f6a7ab406dbcf1013cf6fb31a9","score":"0.44596493","text":"protected function randomBoolean(){\n\n $values = [false , true];\n\n return $values[array_rand($values)];\n }","title":""},{"docid":"3846d50d926106cb2003c9444a94c3cf","score":"0.44595778","text":"function is_preview_mode() {\n\treturn array_key_exists( 'preview', $_GET ) && 'true' == $_GET['preview']; // WPCS: loose comparison ok, CSRF.\n}","title":""},{"docid":"35c6605089084eb7c8e698a0babe9269","score":"0.44593683","text":"public function set_loggable(bool $flag);","title":""}],"string":"[\n {\n \"docid\": \"1d5fee24f5da8713e837dd00ed29e236\",\n \"score\": \"0.6100702\",\n \"text\": \"function cameraInput()\\n {\\n return isset($this->whiteMap[\\\"{$this->y},{$this->x}\\\"]) ? 1 : 0;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"adc72085a4e9a135b3678d0163e50bff\",\n \"score\": \"0.6055702\",\n \"text\": \"public function hasStationaryCamera(){\\n return $this->_has(3);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"850d1174b1baa4821e4813d7e41b5047\",\n \"score\": \"0.552724\",\n \"text\": \"public function isPlayable(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8cee593fff3e4d38f82da688d388480d\",\n \"score\": \"0.536648\",\n \"text\": \"function setSurvivalModeTrue()\\n{\\n global $isSurvival;\\n if (isset($_POST['page']) && !isset($_POST['survivalMode']) && $_SESSION['survivalMode']) {\\n // NEW GAME WITH CAMPAIGN MODE\\n $_SESSION[\\\"survivalMode\\\"] = false;\\n resetPoints();\\n }\\n if (isset($_POST['page']) && isset($_POST['survivalMode']) && !$_SESSION['survivalMode']) {\\n // NEW GAME WITH SURVIVE MODE\\n $isSurvival = true;\\n $_SESSION[\\\"survivalMode\\\"] = true;\\n resetPoints();\\n }\\n if (isset($_POST['survivalMode']) or $_SESSION[\\\"survivalMode\\\"]) {\\n // FOLLOW WITH THE SAME SURVIVAL MODE\\n $isSurvival = true;\\n $_SESSION[\\\"survivalMode\\\"] = true;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cec0f61f6e6973fa543a700ec569f2ad\",\n \"score\": \"0.53636265\",\n \"text\": \"public function getPlayerCamera()\\n {\\n return $this->player_camera;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0a51167bb6f23fded25f7fdc2b25d4b\",\n \"score\": \"0.5261664\",\n \"text\": \"function wpvideocoach_checked_six() {\\r\\n\\tglobal $wpvideocoach_visible_036, $wpvideocoach_visible_037, $wpvideocoach_visible_038, $wpvideocoach_visible_039, $wpvideocoach_visible_040;\\r\\n\\tif(!empty($wpvideocoach_visible_036) && !empty($wpvideocoach_visible_037) && !empty($wpvideocoach_visible_038) && !empty($wpvideocoach_visible_039) && !empty($wpvideocoach_visible_040)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2c08869306bf557dd9d5cdc226bed6fd\",\n \"score\": \"0.52284294\",\n \"text\": \"public function testUpdateDeviceCameraVideoSettings()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f777b0df7f03af8d3ffbb69640ade054\",\n \"score\": \"0.51885533\",\n \"text\": \"function wpvideocoach_checked_four() {\\r\\n\\tglobal $wpvideocoach_visible_028, $wpvideocoach_visible_029, $wpvideocoach_visible_030, $wpvideocoach_visible_031;\\r\\n\\tif(!empty($wpvideocoach_visible_028) && !empty($wpvideocoach_visible_029) && !empty($wpvideocoach_visible_030) && !empty($wpvideocoach_visible_031)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce1902b8dd87bb1062520151793bbf55\",\n \"score\": \"0.5130662\",\n \"text\": \"function wpvideocoach_checked_twelve() {\\r\\n\\tglobal $wpvideocoach_visible_141, $wpvideocoach_visible_142;\\r\\n\\tif(!empty($wpvideocoach_visible_141) && !empty($wpvideocoach_visible_142)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ad57ea3ed75107c7431eb59a496cf122\",\n \"score\": \"0.5085652\",\n \"text\": \"public function setImageMatte(bool $matte): bool {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b4ab27511b51b1ef1251efe490a06ab\",\n \"score\": \"0.50723946\",\n \"text\": \"public function setImageScene(int $scene): bool {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16d03bc3399735f12572a29a562b7882\",\n \"score\": \"0.5061079\",\n \"text\": \"function wpvideocoach_checked_eight() {\\r\\n\\tglobal $wpvideocoach_visible_046, $wpvideocoach_visible_047, $wpvideocoach_visible_048, $wpvideocoach_visible_049, $wpvideocoach_visible_050;\\r\\n\\tif(!empty($wpvideocoach_visible_046) && !empty($wpvideocoach_visible_047) && !empty($wpvideocoach_visible_048) && !empty($wpvideocoach_visible_049) && !empty($wpvideocoach_visible_050)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fbb9d30ee850c4e19ea08fc873e1bef\",\n \"score\": \"0.506105\",\n \"text\": \"function wpvideocoach_checked_three() {\\r\\n\\tglobal $wpvideocoach_visible_024, $wpvideocoach_visible_025, $wpvideocoach_visible_026, $wpvideocoach_visible_027;\\r\\n\\tif(!empty($wpvideocoach_visible_024) && !empty($wpvideocoach_visible_025) && !empty($wpvideocoach_visible_026) && !empty($wpvideocoach_visible_027)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47078f3993b43efa16eebf7a89eb9b16\",\n \"score\": \"0.5038036\",\n \"text\": \"function CAPTURE_toggle()\\n{\\n\\tCAPTURE_deActivate(!CAPTURE_isActive());\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2f9689bf424fb9fc7c34f28c95b562e\",\n \"score\": \"0.50333124\",\n \"text\": \"function wpvideocoach_checked_one() {\\r\\n\\tglobal $wpvideocoach_visible_001, $wpvideocoach_visible_002, $wpvideocoach_visible_003;\\r\\n\\tif(!empty($wpvideocoach_visible_001) && !empty($wpvideocoach_visible_002) && !empty($wpvideocoach_visible_003)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"073a2c3a3ad6da0840cf6f4e04f48f3d\",\n \"score\": \"0.5031164\",\n \"text\": \"function wpvideocoach_checked_thirteen() {\\r\\n\\tglobal $wpvideocoach_visible_151, $wpvideocoach_visible_152, $wpvideocoach_visible_153;\\r\\n\\tif(!empty($wpvideocoach_visible_151) && !empty($wpvideocoach_visible_152) && !empty($wpvideocoach_visible_153)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"924cb46b8b759f2d38097b8e593ce5e6\",\n \"score\": \"0.4954004\",\n \"text\": \"function wpvideocoach_checked_five() {\\r\\n\\tglobal $wpvideocoach_visible_032, $wpvideocoach_visible_033, $wpvideocoach_visible_034, $wpvideocoach_visible_035;\\r\\n\\tif(!empty($wpvideocoach_visible_032) && !empty($wpvideocoach_visible_033) && !empty($wpvideocoach_visible_034) && !empty($wpvideocoach_visible_035)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"912888cfbcaee11b8a2211217baabe4e\",\n \"score\": \"0.49328542\",\n \"text\": \"function wpvideocoach_checked_ten() {\\r\\n\\tglobal $wpvideocoach_visible_121, $wpvideocoach_visible_122, $wpvideocoach_visible_123, $wpvideocoach_visible_124, $wpvideocoach_visible_125, $wpvideocoach_visible_126;\\r\\n\\tif(!empty($wpvideocoach_visible_121) && !empty($wpvideocoach_visible_122) && !empty($wpvideocoach_visible_123) && !empty($wpvideocoach_visible_124) && !empty($wpvideocoach_visible_125) && !empty($wpvideocoach_visible_126)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8717a27aa02f3d1912d93e693c708618\",\n \"score\": \"0.4923841\",\n \"text\": \"function wpvideocoach_checked_seven() {\\r\\n\\tglobal $wpvideocoach_visible_041, $wpvideocoach_visible_042, $wpvideocoach_visible_043, $wpvideocoach_visible_044, $wpvideocoach_visible_045;\\r\\n\\tif(!empty($wpvideocoach_visible_041) && !empty($wpvideocoach_visible_042) && !empty($wpvideocoach_visible_043) && !empty($wpvideocoach_visible_044) && !empty($wpvideocoach_visible_045)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ca0e9719bfa5efc1f30d75e7a2f9ab2\",\n \"score\": \"0.49162614\",\n \"text\": \"public function setPublic(bool $bool);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f60b453bdea0b5129cbf41fe3c6c426\",\n \"score\": \"0.49046075\",\n \"text\": \"public abstract function isPlaying();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0283201acca5b1e056b39f418c3fd2b8\",\n \"score\": \"0.4900024\",\n \"text\": \"public function main()\\n {\\n // Set now playing overlay time to current time\\n $this->nowPlayingOverlayShownTime = time();\\n\\n // Create our master loop\\n while(true) {\\n\\n // Keep track of whether we have done a switch\\n $switched = false;\\n\\n // Set a random time for the next switch to occur\\n $switchDelayTime = rand($this->switchTimeMin,$this->switchTimeMax);\\n\\n // Get the state of the cameras\\n $videoInput = $this->getVideoState();\\n\\n // Grab our volume state\\n $audioInput = $this->getVolumeState();\\n\\n // Get the state of our overlays\\n $titleInput = $this->getTitleState();\\n\\n $onAirOverlays = $this->getOnAirOverlays();\\n\\n // Remove ignored inputs\\n foreach($this->ignoreInputs as $inputIgnore) {\\n unset($audioInput[$inputIgnore]);\\n }\\n\\n // Check if nexgen is above the threshold and if it is, cut to the wide shot.\\n foreach($this->playoutInputNames as $inValue) {\\n if($audioInput[$inValue]['volume'] > $this->playoutThreshold) {\\n $switched = true;\\n echo \\\" Switching to wide \\\\r \\\\n\\\";\\n $this->switchApiInput('cut', $videoInput[$this->wideCamera]['key']);\\n\\n // Run now playing function to determine if we should show 'Now Playing Title'\\n $this->nowPlaying($titleInput, $onAirOverlays);\\n }\\n }\\n\\n // Nexgen isn't playing, so now find the microphone that is exceeding our threshold and cut to it\\n if($switched == false) {\\n $loudest = array_reduce($audioInput, function($a, $b) {\\n return $a['volume'] > $b['volume'] ? $a : $b;\\n });\\n\\n if($this->micCameraMap[$loudest['name']] != NULL) {\\n echo \\\" Switching to \\\".$loudest['name'].\\\"\\\\r \\\\n\\\";\\n $this->switchApiInput('cut', $videoInput[$this->micCameraMap[$loudest['name']]]['key']);\\n\\n // Show the now playing title if it is still shown\\n $this->nowPlaying($titleInput, $onAirOverlays, true);\\n }\\n }\\n\\n // Sleep for duration of the switch\\n sleep($switchDelayTime);\\n\\n // If we are in the browser we only execute one loop, to avoid an endless loop\\n if (!php_sapi_name() == \\\"cli\\\") {\\n break;\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01adfc05ab9c1217c55ef90b0db7d215\",\n \"score\": \"0.4899832\",\n \"text\": \"public function testUpdateDeviceCameraSense()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2013fa0421f2a2771fa302711ba5881f\",\n \"score\": \"0.48899117\",\n \"text\": \"function BotOpped()\\n{\\n if (isset($GLOBALS['BOT_OPPED'])) {\\n return true;\\n } else { \\n return false;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6cef344e3bb0cabf9fd32bfdcb6a73c4\",\n \"score\": \"0.48880386\",\n \"text\": \"public function isGrabable(){ // $grabar\\n return $this->save;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89ba07f58db2f5a6bb495e2729498541\",\n \"score\": \"0.48850176\",\n \"text\": \"public function set_init($bool);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ea7e70ae6a59bdfd6b0cab60e23563b\",\n \"score\": \"0.48813272\",\n \"text\": \"function wpvideocoach_checked_eleven() {\\r\\n\\tglobal $wpvideocoach_visible_131, $wpvideocoach_visible_132, $wpvideocoach_visible_133, $wpvideocoach_visible_134;\\r\\n\\tif(!empty($wpvideocoach_visible_131) && !empty($wpvideocoach_visible_132) && !empty($wpvideocoach_visible_133) && !empty($wpvideocoach_visible_134)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7d8fc17c3e468c6a4cb13c08f02be3c\",\n \"score\": \"0.4877666\",\n \"text\": \"public function setEsGrabable($val){ // $grabar\\n $this->save = (bool)$val;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6342d48e58b3e16ae7aed016fdfb6ae3\",\n \"score\": \"0.48596755\",\n \"text\": \"public function setCameraBlocked(?bool $value): void {\\n $this->getBackingStore()->set('cameraBlocked', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6342d48e58b3e16ae7aed016fdfb6ae3\",\n \"score\": \"0.48596755\",\n \"text\": \"public function setCameraBlocked(?bool $value): void {\\n $this->getBackingStore()->set('cameraBlocked', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5546ffa1ba2615efc1dd5823c1c15357\",\n \"score\": \"0.485461\",\n \"text\": \"public function isPlayed() { return false; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"87215e43602ccbc717d7761cd9390c4a\",\n \"score\": \"0.48528007\",\n \"text\": \"public static function setUserMode($flag){\\n\\t\\tif($flag === true){\\n\\t\\t\\tself::$user_mode = true;\\n\\t\\t}else{\\n\\t\\t\\tself::$user_mode = false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a41b66a15edc904eb43c4b8b9a1addc2\",\n \"score\": \"0.4816592\",\n \"text\": \"public function inLimbo(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1183f386785edcff3af7ff40623ce7ca\",\n \"score\": \"0.4793966\",\n \"text\": \"public static function getBoolean()\\n {\\n return (boolean)(\\\\rand() & 1);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fda50afb6b16bf0cd61e9113b0398ff4\",\n \"score\": \"0.478334\",\n \"text\": \"abstract protected function gameShouldContinue(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bece6d0dc65869dd775539246f5ef5e7\",\n \"score\": \"0.4781173\",\n \"text\": \"public static function debug($bool=true){\\n\\t\\n\\t\\tself::$debug = (bool) $bool;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0b77507e025421975d5daae191fd7461\",\n \"score\": \"0.4778276\",\n \"text\": \"public function getImageMatte(): bool {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f897e360beba457707399007772d576\",\n \"score\": \"0.4772368\",\n \"text\": \"public function restrict_webcam_sharing($value)\\n {\\n $old_value = 'presenterShareOnly=\\\"false\\\"';\\n $new_value = 'presenterShareOnly=\\\"true\\\"';\\n\\n switch ($value) {\\n case true:\\n $this->changeValue($old_value, $new_value, $this->files['client']['config']);\\n break;\\n case false:\\n $this->changeValue($new_value, $old_value, $this->files['client']['config']);\\n break;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dad1427eae3f092bdb9f41e4c7af7914\",\n \"score\": \"0.47711524\",\n \"text\": \"public function testGetDeviceCameraVideoSettings()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4096b97d19387223412cb87c3509ba9\",\n \"score\": \"0.47531518\",\n \"text\": \"function wpvideocoach_checked_nine() {\\r\\n\\tglobal $wpvideocoach_visible_101, $wpvideocoach_visible_102, $wpvideocoach_visible_103, $wpvideocoach_visible_104, $wpvideocoach_visible_105, $wpvideocoach_visible_106, $wpvideocoach_visible_107, $wpvideocoach_visible_108, $wpvideocoach_visible_109;\\r\\n\\tif(!empty($wpvideocoach_visible_101) && !empty($wpvideocoach_visible_102) && !empty($wpvideocoach_visible_103) && !empty($wpvideocoach_visible_104) && !empty($wpvideocoach_visible_105) && !empty($wpvideocoach_visible_106) && !empty($wpvideocoach_visible_107) && !empty($wpvideocoach_visible_108) && !empty($wpvideocoach_visible_109)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f8fcd732ad3dbdd20fead758c5e64ba\",\n \"score\": \"0.47331393\",\n \"text\": \"function air_horn_sound_setflag($user_login, $user)\\n{\\n\\tupdate_user_meta($user->ID, 'air_horn_playsound', 1);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6d01061579a8e0f991e1d3eacc55f4d6\",\n \"score\": \"0.47187388\",\n \"text\": \"function gameComplete(){\\n return isset($_SESSION[\\\"gamecomplete\\\"]) ? $_SESSION[\\\"gamecomplete\\\"] :false;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f37f2792a0ec080a78241930b123c75\",\n \"score\": \"0.4688589\",\n \"text\": \"public function player_loaded() { \\n\\n\\t\\tif (is_object($this->_player)) { \\n\\t\\t\\treturn true; \\n\\t\\t} \\n\\t\\telse { \\n\\t\\t\\treturn false; \\n\\t\\t} \\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d1cd3aa49a87900470b5072994cf805\",\n \"score\": \"0.46694636\",\n \"text\": \"final static function boolean() {}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5688b2c2cab3f7ef30c9ee755f6b26ad\",\n \"score\": \"0.46661937\",\n \"text\": \"public static function setGuestMode($flag){\\n\\t\\tif($flag === true){\\n\\t\\t\\tself::$guest_mode = true;\\n\\t\\t}else{\\n\\t\\t\\tself::$guest_mode = false;\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3925099313f1dc798f4988cd49ede8da\",\n \"score\": \"0.46618417\",\n \"text\": \"public function setBoolean(string $name, bool $value): bool\\n {\\n $this->_globalVariables['db 0x43'][$name] = (int)$value;\\n return (bool)$this->_globalVariables['db 0x43'][$name];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2769fb6633b44b776b1b10344b23b9f6\",\n \"score\": \"0.46600857\",\n \"text\": \"public function isMelee(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c965901ab9806f7a23c3ae0190325cde\",\n \"score\": \"0.46565008\",\n \"text\": \"public function isPreviewMode(): bool\\n\\t{\\n\\t\\treturn $this->isPreviewMode;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"79843ef08ef437896af8ecf4d36f27cd\",\n \"score\": \"0.46556088\",\n \"text\": \"function wpvideocoach_checked_two() {\\r\\n\\tglobal $wpvideocoach_visible_004, $wpvideocoach_visible_005, $wpvideocoach_visible_006, $wpvideocoach_visible_007, $wpvideocoach_visible_008, $wpvideocoach_visible_009, $wpvideocoach_visible_010, $wpvideocoach_visible_011, $wpvideocoach_visible_012, $wpvideocoach_visible_013, $wpvideocoach_visible_014, $wpvideocoach_visible_015, $wpvideocoach_visible_016, $wpvideocoach_visible_017, $wpvideocoach_visible_018, $wpvideocoach_visible_019, $wpvideocoach_visible_020, $wpvideocoach_visible_021, $wpvideocoach_visible_022, $wpvideocoach_visible_023;\\r\\n\\tif(!empty($wpvideocoach_visible_004) && !empty($wpvideocoach_visible_005) && !empty($wpvideocoach_visible_006) && !empty($wpvideocoach_visible_007) && !empty($wpvideocoach_visible_008) && !empty($wpvideocoach_visible_009) && !empty($wpvideocoach_visible_010) && !empty($wpvideocoach_visible_011) && !empty($wpvideocoach_visible_012) && !empty($wpvideocoach_visible_013) && !empty($wpvideocoach_visible_014) && !empty($wpvideocoach_visible_015) && !empty($wpvideocoach_visible_016) && !empty($wpvideocoach_visible_017) && !empty($wpvideocoach_visible_018) && !empty($wpvideocoach_visible_019) && !empty($wpvideocoach_visible_020) && !empty($wpvideocoach_visible_021) && !empty($wpvideocoach_visible_022) && !empty($wpvideocoach_visible_023)) {\\r\\n\\t\\techo \\\"checked='checked'\\\";\\r\\n\\t}\\r\\n\\telse {\\r\\n\\t\\t//do nothing\\r\\n\\t}\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"003a6d98291d267c10e5e899b6f1ba1b\",\n \"score\": \"0.46495613\",\n \"text\": \"function prepare_bool( $p_bool ) {\\n\\t\\treturn (int)(bool)$p_bool;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee05c752018bea05c0d7966f563ea98b\",\n \"score\": \"0.46485397\",\n \"text\": \"public function isSingleRegistration()\\n {\\n return 1 == $this->players;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8827c43e42c36e78b98b716f7eff8f08\",\n \"score\": \"0.46419957\",\n \"text\": \"public function playersAreAlive(){\\n if($this->hero->getHealth() > 0 && $this->beast->getHealth() > 0){\\n return true;\\n } else{\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94afa2965f97fb99498d70b2e79bf024\",\n \"score\": \"0.46402207\",\n \"text\": \"public function hasEye(){\\n return $this->_has(8);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60545405e1b6b16ce2f6d05273eea807\",\n \"score\": \"0.46230078\",\n \"text\": \"function getIsPreset()\\n {\\n return (bool) $this->_bIsPreset;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60545405e1b6b16ce2f6d05273eea807\",\n \"score\": \"0.46230078\",\n \"text\": \"function getIsPreset()\\n {\\n return (bool) $this->_bIsPreset;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a9cb1e24f939ffb6e44bc17431212644\",\n \"score\": \"0.46198142\",\n \"text\": \"function isPreview() {\\n\\t\\treturn ($this->conf[$this->cmdKey.'.']['preview'] && $this->feUserData['preview']);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"59659fe37a21c707e03a0e3dddcef9e7\",\n \"score\": \"0.4617984\",\n \"text\": \"function setImposterModeTrue()\\n{\\n global $isImposter;\\n if (isset($_POST['page']) && !isset($_POST['imposterMode']) && $_SESSION['imposterMode']) {\\n // NEW GAME WITHOUT IMPOSTOR\\n $_SESSION[\\\"imposterMode\\\"] = false;\\n resetPoints();\\n }\\n if (isset($_POST['page']) && isset($_POST['imposterMode']) && !$_SESSION['imposterMode']) {\\n // NEW GAME WITH IMPOSTOR\\n $isImposter = true;\\n $_SESSION[\\\"imposterMode\\\"] = true;\\n resetPoints();\\n }\\n if (isset($_POST['imposterMode']) or $_SESSION[\\\"imposterMode\\\"]) {\\n // FOLLOW WITH THE SAME IMPOSTER MODE\\n $isImposter = true;\\n $_SESSION[\\\"imposterMode\\\"] = true;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"17ec52a0bf8594106b2293f806cf16b5\",\n \"score\": \"0.46147388\",\n \"text\": \"public function hasGamePort()\\n {\\n return $this->game_port !== null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0eba5b4db67a6eb3304b5c6233982765\",\n \"score\": \"0.4590185\",\n \"text\": \"public function getLightsStatus(): bool\\n {\\n return $this->lights;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85330b126e18ea3b8a6a0c2fd077a5b6\",\n \"score\": \"0.45834893\",\n \"text\": \"function CAPTURE_isActive()\\n{\\n\\treturn(file_exists(\\\"/m23/tmp/captureSave\\\"));\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9658486d16a7bd6c184618892b64fa13\",\n \"score\": \"0.45786512\",\n \"text\": \"public function debug($bool){\\n $this->debug = (bool) $bool;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca96b827c748b40a24fa1f54cbfdbc93\",\n \"score\": \"0.45737106\",\n \"text\": \"public static function setSensor($sensor)\\n {\\n if (!is_bool($sensor))\\n {\\n// throw new Exception('The parameter must be boolean.');\\n } // if\\n\\n self::$sensor = $sensor;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67bfbb758ed0f66573977fb33d93c0bf\",\n \"score\": \"0.4569562\",\n \"text\": \"function cb_motion_detected()\\n{\\n echo \\\"Motion Detected\\\\n\\\";\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8c9641624c42213d05523acc0e75569\",\n \"score\": \"0.4569271\",\n \"text\": \"public static function setDevelopment($flag)\\r\\n\\t{\\r\\n\\t self::$_isDev = (bool) $flag;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e3993de45f14db9c1dab510c20b8e06\",\n \"score\": \"0.45606783\",\n \"text\": \"public function testUpdateOrganizationCameraOnboardingStatuses()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44180dc69cf772006779dc5fd133fc5a\",\n \"score\": \"0.45497355\",\n \"text\": \"function update_turns_by_player_moves($game){\\n // if in match not throwed cube then not change turns\\n if($game['throwed_cube'] == 0){\\n return false;\\n }\\n $points = $game['last_throw_points'];\\n $game_id = $game['id'];\\n $player = get_game_active_player($game_id);\\n // if none player in game has status 4, so active not throw cube pass\\n // change turns\\n if ($player == null){\\n return false;\\n }\\n // check if player have move\\n $player_manager = new PlayerManager($player['id']);\\n if ($player_manager->check_if_player_have_moves($points)){\\n echo \\\"player have moves
    \\\";\\n } else {\\n // if player have not any move\\n $turnManager = new TurnManager($game_id);\\n $turnManager->change_turn();\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5103f7453b8466510b0c16fa3980a614\",\n \"score\": \"0.45485303\",\n \"text\": \"public function turnOn()\\n {\\n echo 'light is already on->take no action
    ';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc3e88844f2f758244be8284f69b02df\",\n \"score\": \"0.4542378\",\n \"text\": \"function checkWinner()\\n {\\n // $player = $_SESSION[\\\"currentplayer\\\"];\\n $computer = $_SESSION[\\\"computerturn\\\"];\\n\\n if ($computer === false) {\\n if ($_SESSION[\\\"gameroundSum\\\"] >= 100) {\\n $_SESSION[\\\"haveWinner\\\"] = \\\"Spelare 1\\\";\\n } else {\\n changePlayer();\\n }\\n } elseif ($computer === true) {\\n if ($_SESSION[\\\"computersum\\\"] >= 100) {\\n $_SESSION[\\\"haveWinner\\\"] = \\\"datorn\\\";\\n } else {\\n changePlayer();\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fe4ac1f7f74b802023d07cde42dd4cd\",\n \"score\": \"0.45354906\",\n \"text\": \"function one_zero( $new_value ) {\\n\\t\\treturn (int) (bool) $new_value;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94858476a3437fcfca7e0b677e17006d\",\n \"score\": \"0.45336163\",\n \"text\": \"function octopus_get_visible_flag($user, $cmid) {\\n global $DB;\\n\\n return $DB->get_record_sql('SELECT p.private, u.firstname FROM mdl_octopus_private_profile p, mdl_user u\\n WHERE p.user_id = ' . $user . ' AND p.cmid = ' . $cmid . ' AND u.id = ' . $user . ' ');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a54514f5a21b882795a8ce92ae51457a\",\n \"score\": \"0.4531986\",\n \"text\": \"function setNvpRequest($flag)\\n {\\n $this->nvpRequest = (bool)$flag;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92616f145fc5a9d6e3b9a43359a089de\",\n \"score\": \"0.45307848\",\n \"text\": \"function Camion()\\n {\\n //se llama igual que la clase,\\n //le da un estado inicial a la clase\\n $this->ruedas = 8; //nuestro coche en estadio inicial tiene 4 ruedas\\n $this->color = \\\"gris\\\"; //El color esta sin definir\\n $this->motor = 2600; //Con esto le dimos estado inicial a nuestro objeto coche\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6f2903bb381afb149f0d60b63307c99\",\n \"score\": \"0.4528312\",\n \"text\": \"public function isSettingDefaultImage() :bool\\n\\t{\\n\\t\\treturn (bool) static::$is_saving_default_image;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1335bfc2cbf98b71121cc9554ce54aa\",\n \"score\": \"0.4527293\",\n \"text\": \"public function flag(): ?bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a78d1671e9782c7289a8aae6471e8735\",\n \"score\": \"0.45262432\",\n \"text\": \"function check_session_variable($main_object) {\\n\\t\\t\\tif(isset($_SESSION[\\\"account\\\"])) {\\n\\t\\t\\t\\tif($_SESSION[\\\"account\\\"] == \\\"Manager\\\") {\\n\\t\\t\\t\\t\\tif(isset($_SESSION[\\\"research_group\\\"])){\\n\\t\\t\\t\\t\\t\\t$main_object->research_group = $_SESSION[\\\"research_group\\\"];\\n\\t\\t\\t\\t\\t\\treturn true;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\treturn false;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t\\telse return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9860577c02e07ffb5baf635a3a29d69d\",\n \"score\": \"0.45195323\",\n \"text\": \"public function setDevMode($flag)\\n {\\n $this->devMode = (bool)$flag;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f525f279cf96c67b6ab845de083c3eb\",\n \"score\": \"0.4518466\",\n \"text\": \"public function activateCards($player){\\n if(!empty($player->getPlateau())){\\n foreach ($player->getPlateau()as $carte){\\n if($carte->getActive() == 0){\\n $carte->setActive(1);\\n }\\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39d3ebc022102042c7bf12963e1877e3\",\n \"score\": \"0.45174855\",\n \"text\": \"function uv_is_active(UV $handle)\\n{\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a6782eafb39e4b5f3a31e57937d14481\",\n \"score\": \"0.4513184\",\n \"text\": \"function get_im() {\\r\\n\\t\\treturn false;\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"440196c9686eb1987aab37cbc8500c33\",\n \"score\": \"0.45126188\",\n \"text\": \"function pak_player($in)\\r\\n\\t{\\r\\n\\t\\tglobal $pak_player;\\r\\n\\t\\t$pak_player = true;\\r\\n\\t\\t\\r\\n\\t\\t$vdetails = $in['vdetails'];\\r\\n\\t\\t$vid_file = get_video_file($vdetails,true,true);\\r\\n\\t\\t//Checking for YT Referal\\r\\n\\t\\t$ref = $vdetails['refer_url'];\\r\\n\\t\\t//Checking for youtube\\r\\n\\t\\tif(function_exists('is_ref_youtube'))\\r\\n\\t\\t\\t$ytcom = is_ref_youtube($ref);\\r\\n\\t\\tif($ytcom)\\r\\n\\t\\t\\t$is_youtube = true;\\r\\n\\t\\telse\\r\\n\\t\\t\\t$is_youtube = false;\\r\\n\\t\\r\\n\\t\\tif($vid_file || $is_youtube)\\r\\n\\t\\t{\\r\\n\\t\\t\\t$hd = $data['hq'];\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif($hd=='yes') $file = get_hq_video_file($vdetails); else $file = get_video_file($vdetails,true,true);\\r\\n\\t\\t\\t$hd_file = get_hq_video_file($vdetails);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif($is_youtube)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tpreg_match(\\\"/\\\\?v\\\\=(.*)/\\\",$ref,$srcs);\\r\\n\\r\\n\\t\\t\\t\\t$srcs = explode(\\\"&\\\",$srcs[1]);\\r\\n\\t\\t\\t\\t$srcs = $srcs[0];\\r\\n\\t\\t\\t\\t$srcs = explode(\\\"?\\\",$srcs);\\r\\n\\t\\t\\t\\t$ytcode = $srcs[0];\\r\\n\\t\\t\\t\\tassign('youtube',true);\\r\\n\\t\\t\\t\\tassign('ytcode',$ytcode);\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif(!strstr($in['width'],\\\"\\\\%\\\"))\\r\\n\\t\\t\\t\\t$in['width'] = $in['width'].'px';\\r\\n\\t\\t\\tif(!strstr($in['height'],\\\"\\\\%\\\"))\\r\\n\\t\\t\\t\\t$in['height'] = $in['height'].'px';\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tif($in['autoplay'] =='yes' || $in['autoplay']===true)\\r\\n\\t\\t\\t\\t$in['autoplay'] = \\\"true\\\";\\r\\n\\t\\t\\telse\\r\\n\\t\\t\\t\\t$in['autoplay'] = \\\"false\\\";\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t//Logo Placement\\r\\n\\t\\t\\t$placement = config('logo_placement');\\r\\n\\t\\t\\tswitch($placement)\\r\\n\\t\\t\\t{\\r\\n\\t\\t\\t\\tcase \\\"tl\\\":\\r\\n\\t\\t\\t\\tassign('logo_top','5');\\r\\n\\t\\t\\t\\tassign('logo_left','5');\\r\\n\\t\\t\\t\\tassign('logo_position','top:5,left:5');\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tcase \\\"tr\\\":\\r\\n\\t\\t\\t\\tassign('logo_top','5');\\r\\n\\t\\t\\t\\tassign('logo_right','5');\\r\\n\\t\\t\\t\\tassign('logo_position','top:5,right:5');\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tcase \\\"br\\\":\\r\\n\\t\\t\\t\\tassign('logo_bottom','5');\\r\\n\\t\\t\\t\\tassign('logo_right','5');\\r\\n\\t\\t\\t\\tassign('logo_position','bottom:5,right:5');\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\tcase \\\"bl\\\":\\r\\n\\t\\t\\t\\tassign('logo_bottom','5');\\r\\n\\t\\t\\t\\tassign('logo_left','5');\\r\\n\\t\\t\\t\\tassign('logo_position','bottom:5,left:5');\\r\\n\\t\\t\\t\\tbreak;\\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t}\\r\\n\\t\\t\\t\\r\\n\\t\\t\\tassign('player_data',$in);\\r\\n\\t\\t\\tassign('player_logo',website_logo());\\r\\n\\t\\t\\tassign('normal_vid_file',$vid_file);\\r\\n\\t\\t\\tassign(\\\"hq_vid_file\\\",$hd_file);\\t\\t\\t\\r\\n\\t\\t\\tassign('vdata',$vdetails);\\r\\n\\t\\t\\tTemplate(PAK_PLAYER_DIR.'/player.html',false);\\r\\n\\t\\t\\t\\r\\n\\t\\t\\treturn true;\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff45b48aeef28a1807a9f79e90163ce5\",\n \"score\": \"0.4511899\",\n \"text\": \"public function testGetDeviceCameraSense()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15eceed5f2a5d9abcaaf497fdd306b1a\",\n \"score\": \"0.45060098\",\n \"text\": \"function isVisible($row,$mode) {\\n if (($mode == \\\"dm\\\") && ($row['dmVisible'] == 1)) {return True;}\\n elseif ($row['visible'] == 1) {return True;}\\n else {return False;}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6c1250cff208b3db59e6a1e307892f4\",\n \"score\": \"0.44935986\",\n \"text\": \"function use_ki($game_id) {\\n\\tglobal $db;\\n\\t$ki = false;\\n\\t$sql = 'SELECT player1 FROM addle WHERE id = '.$game_id;\\n\\t$result = $db->query($sql, __FILE__, __LINE__, __FUNCTION__);\\n\\t$rs = $db->fetch($result);\\n\\tif($rs['player1'] == BARBARA_HARRIS) {\\n\\t\\t$ki = true;\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23f12c0092824c884066cbb5fee2607a\",\n \"score\": \"0.44875294\",\n \"text\": \"function gallery_enable_player_for_activity(){\\r\\n?>\\r\\n\\r\\ngame_flags !== null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee37ca07cae8e3527ee8424c9f43d06d\",\n \"score\": \"0.4483417\",\n \"text\": \"function setForceAudioPreview($a_val)\\n\\t{\\n\\t\\t$this->force_audio_preview = $a_val;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61a31977fb73680e608fbbef7f466987\",\n \"score\": \"0.44817832\",\n \"text\": \"public function nativeBoolean()\\n {\\n $this->use_native_boolean = true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1cad7a8296b28c2260f4f4005eaf0923\",\n \"score\": \"0.4481151\",\n \"text\": \"public function isPublic($flag){\\n return $this->setVar('public', $flag);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a963b01b6025dd88b337e5a28c6ac0f3\",\n \"score\": \"0.44801444\",\n \"text\": \"public function isShootingWeapon(): bool;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f0a075699ede7170f086a6c48a1c7a3c\",\n \"score\": \"0.44794244\",\n \"text\": \"function markGameAsNew(){\\n $_SESSION[\\\"gamecomplete\\\"] = false;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4382a94502ef792ee1b9f491d083c4b0\",\n \"score\": \"0.4479254\",\n \"text\": \"function hasHonors(){\\n if($this->gpa >= 3.5){\\n return \\\"true\\\";\\n }\\n else{ \\n return \\\"false\\\"; \\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb1053e129d745bc1c86f16421a0ea6a\",\n \"score\": \"0.44783607\",\n \"text\": \"static public function connected(){return (self::$_connected==true);}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b2fdf4d273b08b0afaea94e6148a299\",\n \"score\": \"0.44698387\",\n \"text\": \"public function setGamingBlockMultiplayer(?bool $value): void {\\n $this->getBackingStore()->set('gamingBlockMultiplayer', $value);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c30b15176239c88cd94572c92a26cf4\",\n \"score\": \"0.44659618\",\n \"text\": \"function checkLogin(){\\n if ($this->userid <= 0){\\n return 0;\\n }else{\\n return 1;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fb9714cf66661bb8444f882da877444\",\n \"score\": \"0.44643655\",\n \"text\": \"function Camion() {\\n //Con la flecha se refencia o una propiedad o un metodo de la clase\\n $this->ruedas=4;\\n $this->color='';\\n $this->motor=1600;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"123e4e623f572fa3f3e91bc49ecd6e6e\",\n \"score\": \"0.44625556\",\n \"text\": \"public function getFilmGeoblockingEnabled()\\n\\t{\\n\\t\\treturn $this->film_geoblocking_enabled;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf3933f6a7ab406dbcf1013cf6fb31a9\",\n \"score\": \"0.44596493\",\n \"text\": \"protected function randomBoolean(){\\n\\n $values = [false , true];\\n\\n return $values[array_rand($values)];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3846d50d926106cb2003c9444a94c3cf\",\n \"score\": \"0.44595778\",\n \"text\": \"function is_preview_mode() {\\n\\treturn array_key_exists( 'preview', $_GET ) && 'true' == $_GET['preview']; // WPCS: loose comparison ok, CSRF.\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35c6605089084eb7c8e698a0babe9269\",\n \"score\": \"0.44593683\",\n \"text\": \"public function set_loggable(bool $flag);\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":781,"cells":{"query_id":{"kind":"string","value":"78a0569df5a22d38dc8d5af391417789"},"query":{"kind":"string","value":"/ check items function v1.0 function to check item in database [function accept parameters] $select = the item to select [example : user , item , category] $from = the table to select from [example : users , items , categories ] $value = the value of select [example : osama , box , electronics]"},"positive_passages":{"kind":"list like","value":[{"docid":"31824d556f79bd1d41ad175b80fc94b6","score":"0.74108577","text":"function checkItem ($select , $from , $value) {\n\t\n\tglobal $con; \n\t\n\t$statement = $con->prepare(\"select $select from $from where $select = ? \"); \n\t\n\t$statement->execute(array($value)); \n\t\n\t$count = $statement->rowCount(); \n\t\n\treturn $count; \n}","title":""}],"string":"[\n {\n \"docid\": \"31824d556f79bd1d41ad175b80fc94b6\",\n \"score\": \"0.74108577\",\n \"text\": \"function checkItem ($select , $from , $value) {\\n\\t\\n\\tglobal $con; \\n\\t\\n\\t$statement = $con->prepare(\\\"select $select from $from where $select = ? \\\"); \\n\\t\\n\\t$statement->execute(array($value)); \\n\\t\\n\\t$count = $statement->rowCount(); \\n\\t\\n\\treturn $count; \\n}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"fdc8da9ba3e0295c135bab9617fd8666","score":"0.76120293","text":"function checkItem($select, $from, $value) {\n\t\t\n\t\tglobal $con;\n\n\t\t$statement = $con->prepare(\"SELECT $select FROM $from WHERE $select = ?\");\n\n\t\t$statement->execute(array($value));\n\n\t\t$count = $statement->rowCount();\n\n\t\treturn $count;\n\n\t}","title":""},{"docid":"9bb841e1141e179d6750c85d6ed6513d","score":"0.7502494","text":"function checkItem($select, $fromTable, $valueItemCheck)\n{\n global $conn;\n $sqlStat = \"SELECT $select FROM $fromTable WHERE $select = ? \";\n $satment = $conn->prepare($sqlStat);\n $satment->execute(array($valueItemCheck));\n $resf = $satment->rowCount();\n if ($resf > 0) {\n return $resf;\n } else {\n return 0;\n }\n\n}","title":""},{"docid":"f1c7084d0a2501a81bc8f6012dd54535","score":"0.7484502","text":"function checkItems($select, $from, $value) {\n global $con;\n $statement = $con->prepare(\"SELECT $select FROM $from WHERE $select = ?\");\n $statement->execute(array(\n $value\n ));\n $count = $statement->rowCount();\n return $count;\n}","title":""},{"docid":"982503397cb64477e772a85f811a82c1","score":"0.74468964","text":"function checkItem($select, $from, $value) {\n\t\tglobal $db;\n\n\t\t$statment = $db->prepare(\"SELECT $select FROM $from WHERE $select = ?\");\n\n\t\t$statment->execute(array($value));\n\n\t\t$counter = $statment->rowCount();\n\n\t\treturn $counter;\n\t}","title":""},{"docid":"0ba2506d19acf7252898886f8f63b801","score":"0.73915315","text":"function checkItem($select, $table, $value){\n\n // Make the MySQL query dynamic using $select, $table, $value [Being called from members page]\n global $connection ;\n\n $statement = $connection->prepare(\"SELECT $select FROM $table WHERE $select= ? \");\n $statement -> execute(array($value));\n $count = $statement->rowCount(); \n\n return $count;\n\n }","title":""},{"docid":"8dc349ae385d155ef41a1ed6d503f80f","score":"0.7296195","text":"function checkItem($select, $from, $value){\r\n\r\n\r\nglobal $con;\r\n\r\n$statement = $con->prepare(\"SELECT $select FROM $from WHERE $select=?\");\r\n\r\n$statement->execute(array($value));\r\n$count = $statement->rowCount();\r\n\r\nreturn $count;\r\n\r\n\r\n}","title":""},{"docid":"08fd93799563e9f33314ff41c7602805","score":"0.72418994","text":"function checkItem($select, $from, $value, $exceptKey = \"\", $exceptValue = \"\") {\n global $con;\n $sql = \"SELECT $select FROM $from WHERE $select = ?\";\n $values[] = $value;\n if (!empty($exceptKey) && !empty($exceptValue)) {\n $sql .= \" AND $exceptKey != ?\";\n $values[] = $exceptValue;\n }\n $statement = $con->prepare($sql);\n $statement->execute($values);\n\n return ($statement->rowCount() >= 1) ? true : false;\n }","title":""},{"docid":"b09d54a78931dbb7348ed9959ce5414b","score":"0.7231176","text":"function checkItem($select, $user, $value)\n{\n global $conn;\n $statment = $conn->prepare(\"SELECT $select FROM $user WHERE $select=? \");\n $statment->execute(array($value));\n $conect = $statment->rowCount();\n return $conect;\n}","title":""},{"docid":"c9c21a9f32cb62b596fe6b93be0549ef","score":"0.7056379","text":"function checkItem($select, $from, $value){\n\n global $con;\n\n $statment = $con->prepare('SELECT ' . $select . ' FROM ' . $from . ' WHERE ' . $select . ' = ?');\n $statment->execute(array($value));\n $count = $statment->rowCount();\n return $count;\n}","title":""},{"docid":"1bd71facb30d5287f80eafc2dc2354c6","score":"0.69792205","text":"function checkItem($select,$from,$value){\n\tglobal $con;\n\t$statment=$con->prepare(\"SELECT $select FROM $from WHERE $select = ?\");\n\t$statment->execute(array($value));\n\t$count=$statment->rowCount();\n\treturn $count;/// return item not like echo return value of output\n\n\n}","title":""},{"docid":"2ac139948c23b87476c5b2c4bfbf73ec","score":"0.6959769","text":"public static function checkItem($select, $from, $value, $And=NULL){\n\n global $con;\n\n $statement = $con->Prepare(\"SELECT $select FROM $from WHERE $select like ? $And\");\n\n $statement->execute(array($value));\n\n $count = $statement->rowCount();\n\n return $count;\n\n }","title":""},{"docid":"99e2024cf46292b1db06590156911c23","score":"0.67115545","text":"function check_column($item,$table_name,$column_name,$item_name,$item_value)\n {\n global $connection;\n $selectQuery=\"select $item from $table_name where $column_name ='$item_name'\";\n $result=mysqli_query($connection,$selectQuery);\n if(mysqli_num_rows($result)>0)\n {\n while($row=mysqli_fetch_assoc($result))\n {\n if($row[\"$item\"]==$item_value)\n return true;\n else\n return false;\n }\n }\n \n }","title":""},{"docid":"240299e26bc20c49670da72231cb897d","score":"0.65187186","text":"function checkItem($select, $from, $value) {\n global $conn;\n $stmt = $conn->prepare(\"SELECT $select FROM $from WHERE $select = ?\"); // This is Same [\"SELECT Username FROM `users` WHERE Username = ? \"]\n $stmt->execute(array($value)); // Execute The Result ..\n $count = $stmt->rowCount();\n return $count;\n\n}","title":""},{"docid":"240299e26bc20c49670da72231cb897d","score":"0.65187186","text":"function checkItem($select, $from, $value) {\n global $conn;\n $stmt = $conn->prepare(\"SELECT $select FROM $from WHERE $select = ?\"); // This is Same [\"SELECT Username FROM `users` WHERE Username = ? \"]\n $stmt->execute(array($value)); // Execute The Result ..\n $count = $stmt->rowCount();\n return $count;\n\n}","title":""},{"docid":"d53260bb1af3c62cb9caee3133e88184","score":"0.6297642","text":"function select_item()\r\n{\r\n global $world_db, $characters_db, $realm_id, $user_name, $output, $action_permission,\r\n $base_datasite, $name_datasite, $user_lvl, $sql;\r\n\r\n valid_login($action_permission[\"view\"]);\r\n\r\n if ( empty($_GET[\"charname\"]) )\r\n redirect(\"ultra_vendor.php?error=1\");\r\n\r\n $output .= '\r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n '.lang(\"ultra\", \"selectitem\").'\r\n
    \r\n \r\n '\r\n .lang(\"ultra\", \"itemline1\").'.\r\n
    \r\n
    \r\n \r\n ('.lang(\"ultra\", \"itemline2\").' '.$name_datasite.'.\r\n
    '\r\n .lang(\"ultra\", \"itemline3\").'.)\r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    ';\r\n makebutton(lang(\"ultra\", \"select\"), \"javascript:do_submit()\\\" type=\\\"def\", 180);\r\n $output .= '\r\n ';\r\n makebutton(lang(\"global\", \"back\"), \"javascript:window.history.back()\\\" type=\\\"def\", 130);\r\n $output .= '\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    ';\r\n}","title":""},{"docid":"5c74dbbb35ac24996d94276a7a525ba2","score":"0.6249586","text":"function Query($database, $un, $name, $price, $cat){\n\t/*\n\t * Generates the SELECT query for the items in the user's inventory. The following line is the base query followed by 3 if statements\n\t * that add to the query if conditions where sent. If no conditions were sent, the query will return the same result as the my_inv\n\t * pageLoadQuery function.\n\t */\n\t$sql_query = \"SELECT * FROM ITEM WHERE inventory_id IN (SELECT inventory_id FROM HASACCESSTO WHERE user_id=\\\"$un\\\") AND is_sold=0\";\n\tif(!($name == \"\")){\n\t\t$sql_query .= \" AND item_name=\\\"$name\\\"\";\t\t\n\t}\n\tif(!($price == \"\")){\n\t\t$sql_query .= \" AND value=\\\"$price\\\"\";\t\t\n\t}\n\tif(!($cat == \"\")){\n\t\t$sql_query .= \" AND category=\\\"$cat\\\"\";\t\t\n\t}\n\t$sql_query .=\" LIMIT 0, 20\";\n\t\n\t// Runs the generated query against the database. If the query fails to run, an ERROR will be returned, otherwise the result of the\n\t// query will be returned.\n\t$result = mysql_query($sql_query,$database);\n\tif(!$result){\n\t\techo mysql_errno($database) . \": \" . mysql_error($database). \"\\n\";\n\t\techo $sql_query;\n\t\techo \"ERROR!\";\n\t\treturn 0;\n\t}else{\n\t\treturn $result;\n\t}\n}","title":""},{"docid":"c04087c7fadc3fb16b4cc833745e2b50","score":"0.6180792","text":"function avalia_sql($item)\n{\n global $posicao;\t\n global $ordem;\n global $db; \n $in=desformatar($_REQUEST['in']); // variavel pra obter valor $res[item] de menus1.php\n$tam_item=strlen($item);\n\n if($tam_item >1)\n { \n $new=$item{0};\n\t$sql=\"SELECT item from menu_item as a where a.item like'$new%' \";\n\t$db->query($sql);\n $conta=$db->contalinhas();\n //////////////////////////////////\n if($conta >0)\n\t { \n\t $sql=\"SELECT item from menu_item as a where a.item='$item'\";\n\t\t$db->query($sql);\n $conta2=$db->contalinhas();\n\t\t\tif($conta2 >0)\n\t\t\t{\n\t\t\t if($in==$item){\n\t\t\t\t return $item;\n\t\t\t\t exit(); }\n\t\t\t if($in<>$item){\n\t\t\t echo\"\";\n echo\"\";\n exit();\n\t\t\t }\n\t\t\t }\n elseif($conta2==0)\n\t\t\t\t{\n return $item;\n\t exit();\n\t\t\t\t}\n\t\t\t\t \n\t }\n \n\t////////////////////////////\n elseif($conta==0)\n\t{\n echo\"\";\n echo\"\";\n exit();\n\t}\n exit();\n }\n \nelseif($tam_item==1)\n{\n $sql=\"SELECT item from menu_item as a where a.item='$item'\";\n $db->query($sql);\n $conta=$db->contalinhas();\n if($conta>0)\n\t\t {\n echo\"\";\n echo\"\";\n exit(); \n\t\t }\n if($conta==0)\n\t\t { \n return $item;\n\t\t}\n }\n}","title":""},{"docid":"25c3a44e67780948044926333ce20a65","score":"0.60329336","text":"public function checkitems(){\n\n\t\t $deviceId = $this->input->post('deviceId');\n\t\t\t\t$userId=$this->input->post('userId');\n\t\t\t\t$existitem=$this->Patient_model->check_items($deviceId,$userId);\n\t\t\t\tif($existitem==1){\n\t\t\t\t\t$data['response']='true';\n\t\t\t\t\t$data['message']=$this->message()[3]->message;\n\t\t\t\t\t\n\t\t\t\t\t$this->response($data);\n\t\t\t\t}else{\n\t\t\t\t\t$data['response']='false';\n\t\t\t\t\t$data['message']=$this->message()[4]->message;\n\t\t\t\t\t\n\t\t\t\t\t$this->response($data);\n\n\t\t\t\t}\n\n\n\t}","title":""},{"docid":"4f272b8bfce15084e12206bf9ac111a8","score":"0.6029326","text":"function checkvalue($selected, $table, $value) {\n global $con;\n\n $stmt = $con->prepare(\"SELECT $selected FROM $table WHERE $selected = ?\");\n $stmt->execute(array($value));\n $count = $stmt->rowCount();\n return $count;\n \n}","title":""},{"docid":"c7e250454082cbf8a79b5a501bd322a9","score":"0.60136074","text":"public function checkItem($id){\n\n\t}","title":""},{"docid":"64b30743c7479e726a17605473f38deb","score":"0.59146297","text":"public static function checkval($select, $from, $WHERE = NULL, $AND = NULL, $value1, $value2=NULL,$value3 = NULL){\n\n global $con;\n\n $statement = $con->Prepare(\"SELECT $select FROM $from $WHERE $AND \");\n if ($value2 == NULL) {\n $statement->execute(array($value1));\n }elseif ($value3 == NULL) {\n\n $statement->execute(array($value1, $value2));\n\n }else {\n\n $statement->execute(array($value1, $value2,$value3));\n\n }\n\n $count = $statement->rowCount();\n\n return $count;\n\n }","title":""},{"docid":"81688df6baf8b47b1cce16842b175a66","score":"0.5860909","text":"function check_item($user_id, $item_id) {\n $this->db->select(\"*\");\n $this->db->where('user_id', $user_id);\n\t\t$this->db->where('item_id', $item_id);\n return $this->db->get('user_per_item')->num_rows();\n }","title":""},{"docid":"6bdb9baa6ed1daab6ae665dc6f8d15f8","score":"0.583971","text":"function pujado($cn, $id_item){\n $sql = \"select id from pujas where id_item=$id_item\";\n $rs= $cn->query($sql);\n if($rs->num_rows==0){\n return false;\n }\n return true;\n}","title":""},{"docid":"46c2fc4c5f5bdbb1be5101add2f9c36d","score":"0.5804893","text":"function query_items($dbc,$system,$genres,$pricemin,$pricemax){\n\t$query = \"SELECT * from items WHERE \";\n\tif($system != \"any\"){\n\t\t$query = $query.\"system = '\".$system.\"' AND \";\n\t}\n\tif(sizeof($genres)>0){\n\t\t$size = sizeof($genres);\n\t\t$query = $query.\"(\";\n\t\tfor($i=0;$i<$size;$i++){\n\t\t\t$query = $query.\"genre = '\".$genres[$i].\"'\";\n\t\t\tif(($i+1)>=$size){\n\t\t\t\t$query = $query.\") AND \";\n\t\t\t}else{\n\t\t\t\t$query = $query.\" OR \";\n\t\t\t}\n\t\t}\n\t}\n\t$query = $query.\"price>=\".$pricemin.\" AND price<=\".$pricemax.\" ORDER BY name\";\n\t$result = mysqli_query($dbc,$query);\n\treturn $result;\n}","title":""},{"docid":"77b491421aa5a147ca77210b9c41cbf8","score":"0.55647975","text":"function ShowValue($tablename, $fieldid, $returnfield, $selected=\"\")\r\n{\r\n\t$chkquery = \"select * from \". $tablename . \" where \" .$fieldid . \" = '\". $selected .\"'\" ;\r\n\t$res = mysql_query($chkquery);\r\n\t$result = mysql_fetch_array($res);\r\n\t$str = \"\";\r\n\t$str\t= $result[ $returnfield];\r\n\r\n\treturn $str;\r\n\r\n}","title":""},{"docid":"94398a0a918d441b49259a00de6cc1eb","score":"0.554003","text":"function search_data($Value,$type){\r\n\r\n\t//jika nilai $Value=*, maka program akan mengambil seluruh nilai field yg ada di tabel,jika tidak, isikan sesuai dengan field yg akan dicari dlm tabel, isikan $type dengan selectAll untuk memilih semua data atau isikan dengan notAll untuk memilih sesuai dengan identifier,\r\n\t//if $value=*, program will take all value from the table, if not, fill the $Value with the field that will be taken from the table, fill $type with selectAll to select all data from table or notAll to select the data according to the $identifier\r\n\t\tif($type==\"selectAll\"){\r\n\t\t\treturn mysqli_query($this->conn,\"select \".$Value.\" from \".$this->table);\t\r\n\t\t}\r\n\t\telse if($type==\"notAll\"){\r\n\t\t\t$value_e=explode(\"+#+\",$this->Value);\r\n\t\t\treturn mysqli_query($this->conn,\"select \".$Value.\" from \".$this->table.\" where \".$this->identifier.\"='\".$value_e[0].\"'\");\t\r\n\t\t}\r\n\t}","title":""},{"docid":"cbbbc89310e630bd9fb62f1a30418327","score":"0.5518737","text":"public function actionItemnamecheck()\n {\n if (Yii::$app->request->isAjax) {\n $data = Yii::$app->request->post();\n }\n if ($data['item_id'] == 0) {\n $itemname = Vendoritem::find()->select('item_name')\n ->where(['item_name' => $data['item']])\n ->andwhere(['trash' => 'Default'])\n ->all();\n } else {\n $itemname = Vendoritem::find()->select('item_name')\n ->where(['item_name' => $data['item']])\n ->where(['item_id' => $data['item_id']])\n ->andwhere(['trash' => 'Default'])\n ->all();\n if (count($itemname) > 0) {\n return $result = 0;\n die;\n } else {\n return $result = 1;\n die;\n }\n }\n return $result = count($itemname);\n \n }","title":""},{"docid":"34b19e5c36c902eed6bd1963b9d567d0","score":"0.5502967","text":"function itemExists($itemNo) {\n global $db;\n \n $query = 'SELECT 1 FROM inventory \n WHERE itemNo = :itemNo\n LIMIT 1;';\n \n try {\n $statement = $db->prepare($query);\n $statement->bindValue(':itemNo', $itemNo);\n $statement->execute();\n $result = $statement->fetch();\n $statement->closeCursor();\n \n return $result['1'] == 1 ? true : false;\n } catch (PDOException $e) {\n $error_message = $e->getMessage();\n include('..\\..\\view\\errors\\error.php');\n }\n}","title":""},{"docid":"8a8da43e42caed864204360ec525bbfe","score":"0.5497728","text":"static public function mdlShowUsers($table, $item, $valor){\n\n $stmt = Connection::connect()->prepare(\"SELECT * FROM $table WHERE $item = :$item\");\n $stmt->bindParam(\":\".$item, $valor, PDO::PARAM_STR);\n\n $stmt->execute();\n return $stmt->fetch();\n $stmt->close();\n $stmt = null;\n\n }","title":""},{"docid":"48ff28795c3e6cddaf5d4daef0b01482","score":"0.54883933","text":"public static function have_items( $category = array(), $place = '', $special = array() ) {\r\n\r\nglobal $db, $GET;\r\n\r\n $categories = \\site\\utils::validate_user_data( $category );\r\n\r\n $where = array();\r\n\r\n /*\r\n\r\n WHERE / ORDER BY\r\n\r\n */\r\n\r\n if( !empty( $categories['update'] ) ) {\r\n $date = array_map( 'trim', explode( ',', $categories['update'] ) );\r\n $where[] = 'c.lastupdate >= FROM_UNIXTIME(' . \\site\\utils::dbp( $date[0] ) . ')';\r\n if( isset( $date[1] ) ) {\r\n $where[] = 'c.lastupdate <= FROM_UNIXTIME(' . \\site\\utils::dbp( $date[1] ) . ')';\r\n }\r\n }\r\n\r\n if( !empty( $categories['date'] ) ) {\r\n $date = array_map( 'trim', explode( ',', $categories['date'] ) );\r\n $where[] = 'c.date >= FROM_UNIXTIME(' . \\site\\utils::dbp( $date[0] ) . ')';\r\n if( isset( $date[1] ) ) {\r\n $where[] = 'c.date <= FROM_UNIXTIME(' . \\site\\utils::dbp( $date[1] ) . ')';\r\n }\r\n }\r\n\r\n /*\r\n\r\n */\r\n\r\n switch( $place ) {\r\n\r\n case 'category':\r\n\r\n $stmt = $db->stmt_init();\r\n $stmt->prepare( \"SELECT istop,connect FROM \" . DB_TABLE_PREFIX . \"categories WHERE id = ?\" );\r\n $stmt->bind_param( \"i\", $GET['id'] );\r\n $stmt->execute();\r\n $stmt->bind_result( $istop,$connect );\r\n\r\n $ids[] = (int) $GET['id'];\r\n if( $stmt->fetch() ) {\r\n if($istop > 0){\r\n $connect_arr = explode(\"|\", $connect);\r\n foreach($connect_arr as $value){\r\n $v = intval($value);\r\n if($v > 0){\r\n $ids[] = $v;\r\n }\r\n }\r\n }\r\n }\r\n\r\n $stmt->prepare(\"SELECT COUNT(*) FROM \" . DB_TABLE_PREFIX . \"coupons c LEFT JOIN \" . DB_TABLE_PREFIX . \"stores s ON (c.store = s.id) WHERE c.category IN(\" . implode( ',', $ids ) . \") AND c.visible > 0 AND s.visible > 0\");\r\n $stmt->execute();\r\n $stmt->bind_result( $count );\r\n $stmt->fetch();\r\n\r\n break;\r\n\r\n case 'search':\r\n\r\n $stmt = $db->stmt_init();\r\n $stmt->prepare(\"SELECT COUNT(*) FROM \" . DB_TABLE_PREFIX . \"coupons c LEFT JOIN \" . DB_TABLE_PREFIX . \"stores s ON (s.id = c.store) WHERE CONCAT(c.title, c.tags, s.name, s.tags) REGEXP ? AND c.visible > 0 AND s.visible > 0\");\r\n\r\n if( gettype( $GET['id'] ) === 'string' ) {\r\n $search = implode( '.*', explode( ' ', trim( $GET['id'] ) ) );\r\n } else {\r\n $search = '';\r\n }\r\n\r\n $stmt->bind_param( \"s\", $search );\r\n $stmt->execute();\r\n $stmt->bind_result( $count );\r\n $stmt->fetch();\r\n\r\n break;\r\n\r\n default:\r\n\r\n /*\r\n\r\n WHERE / ORDER BY\r\n\r\n */\r\n\r\n if( !empty( $categories['ids'] ) && $categories['ids'] != 'all' ) {\r\n $arr = array_filter( array_map( function( $w ){\r\n return (int) $w;\r\n }, explode( ',', $categories['ids'] ) ));\r\n if( !empty( $arr ) )\r\n $where[] = 'c.id IN(' . \\site\\utils::dbp( implode(',', $arr) ) . ')';\r\n }\r\n\r\n if( !empty( $categories['categories'] ) && $categories['categories'] != 'all' ) {\r\n $arr = array_filter( array_map( function( $w ){\r\n return (int) $w;\r\n }, explode( ',', $categories['categories'] ) ));\r\n if( !empty( $arr ) )\r\n $where[] = 'c.category IN(' . \\site\\utils::dbp ( implode(',', $arr) ) . ')';\r\n }\r\n\r\n if( !empty( $categories['store'] ) && $categories['store'] != 'all' ) {\r\n $arr = array_filter( array_map( function( $w ){\r\n return (int) $w;\r\n }, explode( ',', $categories['store'] ) ));\r\n if( !empty( $arr ) )\r\n $where[] = 'c.store IN(' . \\site\\utils::dbp( implode(',', $arr) ) . ')';\r\n }\r\n\r\n if( !empty( $categories['user'] ) ) {\r\n $where[] = 'c.user = \"' . (int) $categories['user'] . '\"';\r\n }\r\n\r\n if( !empty( $categories['search'] ) ) {\r\n $search = implode( '.*', explode( ' ', trim( $categories['search'] ) ) );\r\n $where[] = 'CONCAT(c.title, c.tags) REGEXP \"' . \\site\\utils::dbp( $search ) . '\"';\r\n }\r\n\r\n if( isset( $categories['show'] ) ) {\r\n $show = array_map( 'trim', explode( ',', strtolower( $categories['show'] ) ) );\r\n foreach( $show as $v ) {\r\n switch( $v ) {\r\n case 'all': break;\r\n case 'expired': $where[] = 'c.expiration <= NOW()'; break;\r\n case 'active': $where[] = 'c.expiration > NOW()'; break;\r\n case 'popular': $where[] = 'c.popular > 0'; break;\r\n case 'exclusive': $where[] = 'c.exclusive > 0'; break;\r\n case 'feed': $where[] = 'c.feedID > 0'; break;\r\n case 'visible': $where[] = 'c.visible > 0 AND s.visible > 0'; break;\r\n case 'notvisible': $where[] = 'c.visible = 0'; break;\r\n default: $where[] = 'c.visible > 0 AND s.visible > 0'; break;\r\n }\r\n }\r\n } else {\r\n $where[] = 'c.visible > 0 AND s.visible > 0';\r\n }\r\n\r\n /*\r\n\r\n */\r\n\r\n $stmt = $db->stmt_init();\r\n $stmt->prepare( \"SELECT COUNT(*) FROM \" . DB_TABLE_PREFIX . \"coupons c LEFT JOIN \" . DB_TABLE_PREFIX . \"stores s ON (s.id = c.store)\" . ( empty( $where ) ? '' : ' WHERE ' . implode( ' AND ', $where ) ) );\r\n $stmt->execute();\r\n $stmt->bind_result( $count );\r\n $stmt->fetch();\r\n\r\n break;\r\n\r\n }\r\n\r\n $stmt->close();\r\n\r\n if( isset( $special['only_count'] ) ) {\r\n return $count;\r\n }\r\n\r\n\r\n $pags = array();\r\n $pags['results'] = $count;\r\n $pags['per_page'] = ( !empty( $categories['per_page'] ) ? (int) $categories['per_page'] : \\query\\main::get_option( 'items_per_page' ) );\r\n $pags['pages'] = ceil( $pags['results'] / $pags['per_page'] );\r\n $page = ( !empty( $_GET['page'] ) ? (int) $_GET['page'] : 1 );\r\n if( $page < 1 ) $page = 1;\r\n if( $page > $pags['pages'] ) $page = $_GET['page'] = $pags['pages'];\r\n $pags['page'] = $page;\r\n if( $pags['pages'] > $pags['page'] ) $pags['next_page'] = \\site\\utils::update_uri( '', array( 'page' => ($pags['page']+1) ) );\r\n if( $pags['pages'] > 1 && $pags['page'] > 1 ) $pags['prev_page'] = \\site\\utils::update_uri( '', array( 'page' => ($pags['page']-1) ) );\r\n\r\n return $pags;\r\n\r\n}","title":""},{"docid":"ab0e9728242989ed076ae6cbb461eb40","score":"0.5483852","text":"static public function mdlValidarCategoria($tabla, $item, $valor){\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla WHERE $item = :$item\");\n\n\t\t$stmt -> bindParam(\":\".$item, $valor, PDO::PARAM_STR);\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetchAll();\n\n\t\t$stmt -> close();\n\t\t\n\t\t$stmt = null;\n\t\n\t}","title":""},{"docid":"946a577426bc3a03905b66e908ac68e6","score":"0.5478328","text":"public function checkItemIfExistInMenu()\n {\n }","title":""},{"docid":"de71f12390c47ef37bd349d4a9f1ea0f","score":"0.54683524","text":"function callselect($value){\r\nif($value == 2)\r\n listobjmarca($value);\r\nelse if($value == 3) \r\n listcolores($value,2);\r\nelse if($value == 4) \r\n listobjequivalencia($value,1); \r\n}","title":""},{"docid":"3ca63f460739a938f915a1836bfeeba1","score":"0.5457211","text":"function showForm()\n{\n\tglobal $config;\n get_header(); #defaults to header_inc.php\t\n\t\n\techo \n\t'\n\t\n\t

    Order great food here!

    \n\t

    Please select your items and submit your order

    \n
    \n
    \n
    \n\t
    \n ';\n echo '\n \n \n \n \n \n ';\n\t\tforeach($config->items as $item)\n {\n //echo \"

    ID:$item->ID Name:$item->Name

    \"; \n //echo '

    Taco

    ';\n echo '\n \n \n \n \n \n ';\n //echo '

    ' . $item->Name . ' ID . '\" />

    ';\n \n } \n echo '
    QuantityItemDescriptionPrice
    \n ' . $item->Name . '' .$item->Description . '' . money_format('%n', $item->Price) . '
    ';\n \n echo '\n\t\t\t\t

    \n\t\t\t\t\t(* required field)\n\t\t\t\t

    \n\t\t\n\t
    \n\t';\n\tget_footer(); #defaults to footer_inc.php\n}","title":""},{"docid":"1ae462af251f67f4e579c83c2ef91f2e","score":"0.54557794","text":"public static function item_exists( $id = 0, $special = array() ) {\r\n\r\nglobal $db, $GET;\r\n\r\n$id = empty( $id ) ? $GET['id'] : $id;\r\n\r\n $where = array();\r\n\r\n if( isset( $special['user_view'] ) ) {\r\n $where[] = 'visible > 0';\r\n }\r\n\r\n $stmt = $db->stmt_init();\r\n $stmt->prepare(\"SELECT id FROM \" . DB_TABLE_PREFIX . \"coupons WHERE id = ?\" . ( empty( $where ) ? '' : ' AND ' . implode( ' AND ', $where ) ) );\r\n $stmt->bind_param( \"i\", $id );\r\n $stmt->execute();\r\n $stmt->bind_result( $count );\r\n $stmt->fetch();\r\n $stmt->close();\r\n\r\n if( $count > 0 ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n\r\n}","title":""},{"docid":"caa96c38f768dbca8f5d037282e3ebd5","score":"0.5447897","text":"function selectbox($c1, $c2, $current_cmds)\n{\n// c2 = script || alert\n\n\tif($c2==\"alert\") {$label=\"Alerts\"; }\n\telse ($label=\"Scripts\"); \t\n\t\n\t//result = sqlite3_open(\"/etc/rms100.db\", &db);\n\t$dbh = new PDO('sqlite:/etc/rms100.db');\n\tprintf(\"
    \";\n\techo\"\";\n\tprintf(\"\";\n\techo\"
    Available %s
    \");\n\tprintf(\"

    \\n\";\n\techo\"

    &nbsp;<-->&nbsp;


    \\n\";\n\techo\"
    Selected %s
    \";\n\n\tprintf(\"

    \\n\";\t\n\techo\"
    \";\n}","title":""},{"docid":"3e0327294ca6e2df49f4701692d3ff1e","score":"0.5443798","text":"function check_data_in_db($table_name,$data_id_field,$data_id_value,$user_id_field,$where_clause=\"\",$dump_query=0){\r\n\t\tif ($this->logged!=1) return 0;\r\n\t\t$my_query = \"SELECT \" . $data_id_field . \"\r\n\t\t\t\t\t FROM \" . $table_name . \"\r\n\t\t\t\t\t WHERE \" . $data_id_field . \"=\" . $data_id_value . \" AND \" . $user_id_field . \"=\" . intval($this->u_id) . \" \" . $where_clause;\r\n\r\n\t\t//neu dump_query = 1 thi in ra ma`n hinh\r\n\t\tif ($dump_query==1) echo $my_query;\r\n\r\n\t\t//kiem tra query\r\n\t\t$db_check = new db_query($my_query);\r\n\t\t//neu ton tai record do thi` tra ve gia tri 1, neu ko thi` tra ve gia tri 0\r\n\t\tif (mysqli_num_rows($db_check->result) > 0){\r\n\t\t\tunset($db_check);\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tunset($db_check);\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}","title":""},{"docid":"71490ef328820dd1d3ecc876365b1b2f","score":"0.5430748","text":"function select_quantity()\r\n{\r\n global $world_db, $characters_db, $realm_id, $user_name, $output, $action_permission, $user_lvl,\r\n $locales_search_option, $ultra_mult, $ultra_base, $uv_credits, $uv_money, $credits_fractional,\r\n $sql, $core;\r\n\r\n valid_login($action_permission[\"view\"]);\r\n\r\n if ( empty($_GET[\"myItem\"]) )\r\n redirect(\"ultra_vendor.php?error=1\");\r\n\r\n if ( $core == 1 )\r\n $iquery = \"SELECT * FROM items \"\r\n .( ( $locales_search_option != 0 ) ? \"LEFT JOIN items_localized ON (items_localized.entry=items.entry AND language_code='\".$locales_search_option.\"') \" : \" \" ).\r\n \"WHERE items.entry='\".$_GET[\"myItem\"].\"'\";\r\n else\r\n $iquery = \"SELECT *,\r\n name AS name1, Quality AS quality, SellPrice AS sellprice, BuyPrice AS buyprice\r\n FROM item_template \"\r\n .( ( $locales_search_option != 0 ) ? \"LEFT JOIN locales_item ON locales_item.entry=item_template.entry \" : \" \" ).\r\n \"WHERE item_template.entry='\".$_GET[\"myItem\"].\"'\";\r\n $iresult = $sql[\"world\"]->query($iquery);\r\n $item = $sql[\"world\"]->fetch_assoc($iresult);\r\n\r\n // Localization\r\n if ( $locales_search_option != 0 )\r\n {\r\n if ( $core == 1 )\r\n $item[\"name1\"] = $item[\"name\"];\r\n else\r\n $item[\"name1\"] = $item[\"name_loc\".$locales_search_option];\r\n }\r\n else\r\n $item[\"name1\"] = $item[\"name1\"];\r\n\r\n if ( $core == 1 )\r\n $cquery = \"SELECT guid, level, gold FROM characters WHERE name='\".$_GET[\"charname\"].\"'\";\r\n else\r\n $cquery = \"SELECT guid, level, money AS gold FROM characters WHERE name='\".$_GET[\"charname\"].\"'\";\r\n $cresult = $sql[\"char\"]->query($cquery);\r\n $char = $sql[\"char\"]->fetch_assoc($cresult);\r\n\r\n $chargold = $char[\"gold\"];\r\n $chargold = str_pad($chargold, 4, \"0\", STR_PAD_LEFT);\r\n $pg = substr($chargold, 0, -4);\r\n if ( $pg == '' )\r\n $pg = 0;\r\n $ps = substr($chargold, -4, 2);\r\n if ( ( $ps == '' ) || ( $ps == '00' ) )\r\n $ps = 0;\r\n $pc = substr($chargold, -2);\r\n if ( ( $pc == '' ) || ( $pc == '00' ) )\r\n $pc = 0;\r\n\r\n $mul = $ultra_mult[$item[\"quality\"]];\r\n $qual = quality($item[\"quality\"]);\r\n\r\n if ( $item[\"sellprice\"] <> 0 )\r\n $base_price = $item[\"sellprice\"];\r\n else\r\n {\r\n if ( $item[\"buyprice\"] == 0 )\r\n $base_price = $ultra_base;\r\n else\r\n $base_price = $item[\"buyprice\"];\r\n }\r\n\r\n $output .= '\r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n '.lang(\"ultra\", \"selectquantity\").'';\r\n\r\n $gold = $mul * $base_price;\r\n $gold = str_pad($gold, 4, \"0\", STR_PAD_LEFT);\r\n $cg = substr($gold, 0, -4);\r\n if ( $cg == '' )\r\n $cg = 0;\r\n $cs = substr($gold, -4, 2);\r\n if ( ( $cs == '' ) || ( $cs == '00' ) )\r\n $cs = 0;\r\n $cc = substr($gold, -2);\r\n if ( ( $cc == '' ) || ( $cc == '00' ) )\r\n $cc = 0;\r\n $gold = $mul * $base_price;\r\n\r\n $base_gold = $base_price;\r\n $base_gold = str_pad($base_gold, 4, \"0\", STR_PAD_LEFT);\r\n $bg = substr($base_gold, 0, -4);\r\n if ( $bg == '' )\r\n $bg = 0;\r\n $bs = substr($base_gold, -4, 2);\r\n if ( ( $bs == '' ) || ( $bs == '00' ) )\r\n $bs = 0;\r\n $bc = substr($base_gold, -2);\r\n if ( ( $bc == '' ) || ( $bc == '00' ) )\r\n $bc = 0;\r\n\r\n // Localization\r\n $isranked = lang(\"ultra\", \"isranked\");\r\n $isranked = str_replace(\"%1\", ''.$item[\"name1\"].'', $isranked);\r\n $isranked = str_replace(\"%2\", '\"'.$qual.'\"', $isranked);\r\n\r\n $output .= $isranked;\r\n $output .= '\r\n
    ';\r\n\r\n // Localization\r\n $willcost = lang(\"ultra\", \"willcost\");\r\n $willcost = str_replace(\"%1\", ''.$mul.'', $willcost);\r\n $cost_display = $bg.'\"\"'\r\n .$bs.'\"\"'\r\n .$bc.'\"\"';\r\n $willcost = str_replace(\"%2\", $cost_display, $willcost);\r\n\r\n $output .= $willcost;\r\n $output .= '\r\n
    ';\r\n\r\n // Localization\r\n $orcost = lang(\"ultra\", \"or\");\r\n $or_display = $cg.'\"\"'\r\n .$cs.'\"\"'\r\n .$cc.'\"\"';\r\n $orcost = str_replace(\"%1\", $or_display, $orcost);\r\n\r\n $output .= $orcost;\r\n $output .= '\r\n
    \r\n
    ';\r\n\r\n // Localization\r\n $charhas = lang(\"ultra\", \"has\");\r\n $charhas = str_replace(\"%1\", ''.$_GET[\"charname\"].'', $charhas);\r\n $money_display = $pg.'\"\"'\r\n .$ps.'\"\"'\r\n .$pc.'\"\"';\r\n $charhas = str_replace(\"%2\", $money_display, $charhas);\r\n\r\n $output .= $charhas;\r\n $output .= '\r\n
    \r\n
    ';\r\n\r\n // credits\r\n if ( $uv_money > 0 )\r\n {\r\n // get our credit balance\r\n $query = \"SELECT Credits FROM config_accounts WHERE Login='\".$user_name.\"'\";\r\n $result = $sql[\"mgr\"]->query($query);\r\n $result = $sql[\"mgr\"]->fetch_assoc($result);\r\n $credits = $result[\"Credits\"];\r\n\r\n if ( $credits < 0 )\r\n {\r\n // unlimited credits\r\n $output .= lang(\"global\", \"credits_unlimited\");\r\n $output .= '\r\n
    \r\n
    ';\r\n }\r\n elseif ( $credits >= 0 )\r\n {\r\n $credit_cost = $uv_credits * ($gold / $uv_money);\r\n\r\n // if Allow Fractional Credits is disabled then cost must be a whole number\r\n $credit_cost = ( ( !$credits_fractional ) ? ceil($credit_cost) : $credit_cost );\r\n\r\n $credits_per_item = lang(\"ultra\", \"credits_peritem\");\r\n $credits_per_item = str_replace(\"%1\", ''.$credit_cost.'', $credits_per_item);\r\n $credits_per_item = str_replace(\"%2\", ''.$item[\"name1\"].'', $credits_per_item);\r\n\r\n $output .= $credits_per_item;\r\n $output .= '\r\n
    \r\n
    ';\r\n\r\n $credits_avail = lang(\"ultra\", \"credits_avail\");\r\n $credits_avail = str_replace(\"%1\", ''.(float)$credits.'', $credits_avail);\r\n\r\n $output .= $credits_avail;\r\n $output .= '\r\n
    \r\n
    ';\r\n }\r\n }\r\n\r\n $output .= '\r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n '\r\n .lang(\"ultra\", \"wanted\").':\r\n \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    ';\r\n makebutton(lang(\"ultra\", \"submit\"), \"javascript:do_submit()\\\" type=\\\"def\",180);\r\n $output .= '\r\n ';\r\n makebutton(lang(\"global\", \"back\"), \"javascript:window.history.back()\\\" type=\\\"def\",130);\r\n $output .= '\r\n
    \r\n
    \r\n
    \r\n
    \r\n
    ';\r\n}","title":""},{"docid":"f1be3195806d684eae5f86f3f8cf0a87","score":"0.54198307","text":"function selComb($nome, $val, $sql) {\r\n //Executa a consulta\r\n include \"connection.php\"; // Conecta ao banco de dados\r\n $res = sqlexec($id, $sql);\r\n //Exibe as linhas encontradas na consulta\r\n echo \"\";\r\n}","title":""},{"docid":"64a0583cd2edffb4436f5b3fa3850fa9","score":"0.5419794","text":"function show_items($key,$table){\n\t\n\t$sql = \"SELECT * FROM inspection_form_$table WHERE key=$key AND (status=1 OR status=0) ORDER BY id\";\n\n\t//echo $sql;\n\t\n\tif(($res = pg_query($sql)) == false)\n\t\tdie(\"nepodarilo sa zobrziť výsledky\");\n\t\t\n\t$html = '';\n\t\n\twhile($pole = pg_fetch_row($res)){\n\t\tif($pole[7]==\"t\"){\n\t\t\t$checked_func = 'checked=\"checked\"';\n\t\t\t$checked_func_val = '&nbsp;funguje';\n\t\t}\n\t\telse{\n\t\t\t$checked_func = \"\";\n\t\t\t$checked_func_val = '&nbsp;nefunguje';\n\t\t}\n\t\tif($pole[8]==\"t\"){\n\t\t\t$checked_poloha = 'checked=\"checked\"';\n\t\t\t$checked_poloha_val = '&nbsp;vyhovuje';\n\t\t}\n\t\telse{\n\t\t\t$checked_poloha = \"\";\n\t\t\t$checked_poloha_val = '&nbsp;nevyhovuje';\n\t\t}\n\t\tif($pole[6]==\"t\"){\n\t\t\t$checked_zaloha = 'checked=\"checked\"';\n\t\t\t$checked_zaloha_val = '&nbsp;zálohovaná';\n\t\t}\n\t\telse{\n\t\t\t$checked_zaloha = '\"\"';\n\t\t\t$checked_zaloha_val = '&nbsp;nezálohovaná';\n\t\t}\n\t\t\n\t\tif($table == \"snimace\")\t\n\t\t\t$html .= '\n\t\t\t\n\t\t\t\t\n\t\t\t';\n\t\tif($table == \"sireny\")\n\t\t\t$html .= '\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t';\n\t}\n\t$html .= '
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t &nbsp;\n\t\t\t\t\t\t \n\t\t\t\t\t\t &nbsp;\n\t\t\t\t\t\t &nbsp;\n\t\t\t\t\t\t &nbsp;\n\t\t\t\t\t\t \n\t\t\t\t\t
    \n\t\t\t\t\t
    '.$checked_func_val.'
    \n\t\t\t\t\t
    '.$checked_poloha_val.'
    \n\t\t\t\t \t
    &nbsp;
    \n\t\t\t\t \t
    \n\t\t\t\t
    \n\t\t\t
    \n\t\t\t\t\t
    \n\t\t\t\t\t\t &nbsp;\n\t\t\t\t\t\t &nbsp;\n\t\t\t\t\t\t &nbsp;\n\t\t\t\t\t\t &nbsp;\n\t\t\t\t\t\t \n\t\t\t\t\t
    \n\t\t\t\t\t
    '.$checked_zaloha_val.'
    \n\t\t\t\t\t
    '.$checked_func_val.'
    \n\t\t\t\t\t
    &nbsp;
    \n\t\t\t\t\t
    \n\t\t\t\t
    ';\n\t\n\treturn $html;\n}","title":""},{"docid":"996b44f8d6f382b7777fde64b4bff393","score":"0.5397022","text":"function getTableList_skype($value='',$id='',$_table='',$_label=''){\n global $_LIST;\n \n\n\n $sql=\"Select * from $_table where status=2 or id=$value\";\n\n \n \n $result=mysql_query($sql);\n $return=\"\";\n return $return;\n \n }","title":""},{"docid":"ef206d0b35849ecf520ac8ac48c97ea3","score":"0.5389437","text":"function list_users($name, $selected_id='', $required=false, $all=false, $text_all='-', $where='', $params=''){\r\n $db_obj = new database();\r\n \r\n\t$table = TB_PREF.\"users\";\r\n $query = $db_obj->display_table_all_column($table, $where, false, false, 0, 0, 'nama');\r\n\techo \"\";\r\n}","title":""},{"docid":"a740462e28f9c6dcba49ca9d5be1bca4","score":"0.53869104","text":"function getitems($where, $catID)\n{\n global $conn;\n\n $getitems = $conn->prepare(\"SELECT * FROM items Where $where = ? \");\n $getitems->execute(array($catID));\n $items = $getitems->fetchAll();\n\n return $items;\n}","title":""},{"docid":"fe117fd3954ae705ae3707b1d8ff1866","score":"0.5376847","text":"function get_mu_item_details($upc) {\r\n if ((!$upc) || ($upc=='')) {\r\n return false;\r\n }\r\n $conn = db_connect();\r\n $query = \"select * from mu_items where upc='\".$conn->real_escape_string($upc).\"'\";\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n }\r\n $result = @$result->fetch_assoc();\r\n return $result;\r\n}","title":""},{"docid":"19b5e2e375462c4e70ebca9cf67aca4f","score":"0.53626233","text":"function checked_akses($id_user_level,$id_menu){\n $ci = get_instance();\n $ci->db->where('user_level',$id_user_level);\n $ci->db->where('menu_id',$id_menu);\n $data = $ci->db->get('tbl_userlevel');\n if($data->num_rows()>0){\n return \"checked='checked'\";\n }\n}","title":""},{"docid":"4f6c818856c2e44c5a0bf272a62612ae","score":"0.53561425","text":"function checked_akses($id_user_level, $id_menu)\n{\n $ci = get_instance();\n $ci->db->where('id_user_level', $id_user_level);\n $ci->db->where('id_menu', $id_menu);\n $data = $ci->db->get('tbl_hak_akses');\n if ($data->num_rows() > 0) {\n return \"checked='checked'\";\n }\n}","title":""},{"docid":"b4ec5dabd0fcd106c11dfc80e0b41658","score":"0.53526443","text":"function check_item_data()\n{\n\t//if (!check_num('amount', 0))\n\t//{\n\t//\tdisplay_error( _(\"The amount entered is not a valid number or is less than zero.\"));\n\t//\tset_focus('amount');\n\t//\treturn false;\n\t//}\n\n\tif ($_POST['code_id'] == $_POST['bank_account'])\n\t{\n\t\tdisplay_error( _(\"The source and destination accouts cannot be the same.\"));\n\t\tset_focus('code_id');\n\t\treturn false;\n\t}\n\n\t//if (is_bank_account($_POST['code_id']))\n\t//{\n\t//\tif ($_SESSION['pay_items']->trans_type == ST_BANKPAYMENT)\n\t//\t\tdisplay_error( _(\"You cannot make a payment to a bank account. Please use the transfer funds facility for this.\"));\n\t//\telse\n \t//\t\tdisplay_error( _(\"You cannot make a deposit from a bank account. Please use the transfer funds facility for this.\"));\n\t//\tset_focus('code_id');\n\t//\treturn false;\n\t//}\n\tdisplay_error( _(\"Good data.\"));\n\n \treturn true;\n}","title":""},{"docid":"85ace34b5b3bf4cfd620d4016d5a889d","score":"0.53468","text":"function selComb($nome,$val,$sql){\r\n\t//Executa a consulta\r\n\t$res = sqlexec($id,$sql);\r\n\t//Exibe as linhas encontradas na consulta\r\n\techo \"\";\r\n}","title":""},{"docid":"ed533877418adf486e3e9e71bf156434","score":"0.53463006","text":"function get_mu_items($catid) {\r\n if ((!$catid) || ($catid == '')) {\r\n return false;\r\n }\r\n $conn = db_connect();\r\n $query = \"select * from mu_items where catid = '\".$conn->real_escape_string($catid).\"'\";\r\n $result = @$conn->query($query);\r\n if (!$result) {\r\n return false;\r\n }\r\n $num_books = @$result->num_rows;\r\n if ($num_books == 0) {\r\n return false;\r\n }\r\n $result = db_result_to_array($result);\r\n return $result;\r\n}","title":""},{"docid":"623a8c1d30b2ff6b8d9480e2ad8fd8f1","score":"0.5339574","text":"function itemExists($itemName)\n {\n $sql = \"SELECT `itemName` FROM `items` WHERE `itemName` = :itemName\";\n\n //prepare the statement\n $preparedStatement = $this->db->prepare($sql);\n\n //bind the values\n $preparedStatement->bindParam(':itemName', $itemName, PDO::PARAM_STR);\n\n //run the query\n $preparedStatement->execute();\n\n //check the result\n if($preparedStatement->fetch()) { //if item has been found (fetch returns false if no results and an array if there are results)\n $this->result = true;\n } else { //false was returned, the item does not exist\n $this->result = false;\n }\n return $this->result;\n }","title":""},{"docid":"b5579b700d99924c0da3c14f337e5bce","score":"0.53382945","text":"function getDataList_transaction_new($value='',$id='',$_type='',$_user=''){\n global $_LIST;\n if(!empty($_type) && $_type==4){\n $sql=\"Select * from campus_students where (std_status=1 or std_status=2)\";\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\n $sql.=\" and agent_id=$_user\";\n }\n }else{\n $sql=\"Select * from capmus_users where user_type=$_type and status=1\";\n \n \n }\n $result=mysql_query($sql);\n $return=\"\";\n return $return;\n \n }","title":""},{"docid":"160573963d34ceaec4e37819e496ecc9","score":"0.5338284","text":"function checkStatus($field,$table, $where,$value)\n{\n global $connection;\n $stmt = $connection ->prepare(\"SELECT\n $field\n FROM\n $table\n Where\n $where =?\n \");\n $stmt ->execute(array($value));\n $status = $stmt ->fetch();\n return $status[$field];\n}","title":""},{"docid":"b958af1bd14afdb4294f2791654bf145","score":"0.53355134","text":"function _search_all_db($str)\n{\n $servername = \"localhost\";\n $username = \"aman\";\n $password = \"password\";\n $database = \"test\";\n $reply=\"\";\n $conn = new mysqli($servername, $username, $password, $database);\n if(!$conn->connect_error) { //connection succeeded\n $sql = \"SELECT Repository.UserID AS UserID, /*UserID will be used to retrieve userinfo*/\n TempTable.ItemID AS ItemID,\n\t\t\t\t\tTempTable.ItemName AS ItemName,\n\t\t\t\t\tTempTable.Aliases AS Aliases,\n\t\t\t\t\tTempTable.Category AS Category,\n\t\t\t\t\tTempTable.Description AS DefaultDescription,\n\t\t\t\t\tTempTable.ImageURI AS ImageURI,\n\t\t\t\t\tRepository.RepID AS RepID,\n\t\t\t\t\tRepository.Quantity AS Quantity,\n\t\t\t\t\tRepository.Units AS Units,\n\t\t\t\t\tRepository.UnitPrice AS UnitPrice,\n\t\t\t\t\tRepository.State AS State,\n\t\t\t\t\tRepository.DateAdded AS DateAdded,\n\t\t\t\t\tRepository.Description AS Description,\n\t\t\t\t\tRepository.Deliverable AS Deliverable,\n\t\t\t\t\tRepository.DeliverableAreas AS DeliverableAreas\n\t\t\t\t\t FROM (SELECT * FROM Items \n\t\t\t\t\t WHERE ItemName LIKE '%\".$str.\"%' OR Aliases LIKE '%\".$str.\"%')\n\t\t\t\t\t AS TempTable JOIN Repository ON TempTable.ItemID = Repository.ItemID\n\t\t\t\t\t \"\n\t\t\t\t\t ;\n $result = $conn->query($sql);\n if($result!=false) { //Query executed successfully\n if($result->num_rows>0) { //At least one record was found\n echo \"0\";\n while($row=$result->fetch_assoc()) { //Fetch row by row\n global $UserID;\n $UserID = $row['UserID'];\n $ItemID = $row['ItemID'];\n $ItemName = $row['ItemName'];\n $Aliases = setdefault($row['Aliases'], \"None\");\n $Category = $row['Category'];\n $DefaultDescription = setdefault($row['DefaultDescription'], \"None\");\n $ImageURI =\tsetdefault($row['ImageURI'], \"None\");\n $RepID = $row['RepID'];\n $Quantity = $row['Quantity'];\n $Units = $row['Units'];\n $UnitPrice = $row['UnitPrice'];\n $State = setdefault($row['State'], \"None\");\n $DateAdded = $row['DateAdded'];\n $Description = setdefault($row['Description'], \"None\");\n $Deliverable = $row['Deliverable'];\n $DeliverableAreas = $row['DeliverableAreas'];\n $reply.=\"\";\n $reply.=\"\".$UserID.\"\";\n $reply.=\"\".$ItemID.\"\";\n $reply.=\"\".$ItemName.\"\";\n $reply.=\"\".$Aliases.\"\";\n $reply.=\"\".$Category.\"\";\n $reply.=\"\".$DefaultDescription.\"\";\n $reply.=\"\".$ImageURI.\"\";\n $reply.=\"\".$RepID.\"\";\n $reply.=\"\".$Quantity.\"\";\n $reply.=\"\".$Units.\"\";\n $reply.=\"\".$UnitPrice.\"\";\n $reply.=\"\".$State.\"\";\n $reply.=\"\".$DateAdded.\"\";\n $reply.=\"\".$Description.\"\";\n $reply.=\"\".$Deliverable.\"\";\n $reply.=\"\".$DeliverableAreas.\"\";\n $reply.=\"\";\n }\n //Close the xml\n $reply.=\"\";\n //Return the xml\n echo $reply;\n\n\n } else { //No results were found\n echo \"1\";\n }\n } else { //There was a problem with the query\n echo \"2\";\n }\n $conn->close(); //Close the connection\n } else { //connection failed\n echo \"3\";\n }\n}","title":""},{"docid":"e1a4d059820041eb75fc3c5461ae1ffe","score":"0.532925","text":"function countItem($item, $table, $status = null, $value = null) {\n global $con;\n \n if ($status != null && $value != null){\n $query = \"WHERE $status = $value\";\n } else { \n $query = \"\";\n }\n \n\n $stmt2 = $con->prepare(\"SELECT COUNT($item) FROM $table $query\");\n $stmt2->execute();\n $count = $stmt2->fetchColumn();\n echo $count;\n}","title":""},{"docid":"d74cd66a877dcbac6d45112e1ab7e18e","score":"0.5308957","text":"public function item_fetch(){\n\n\t\t\t$items = $this->master_model->custom_query(\"SELECT c.description AS c_desc, c.code, i.cat_id, i.common_name, i.description AS i_desc, i.brand, i.size_type, i.price, i.item_id, i.is_sold FROM items i LEFT JOIN categories c ON c.cat_id = i.cat_id WHERE i.is_deleted = 0 ORDER BY i.cat_id ASC\");\n\n\n\t\t\tif($items != FALSE)\n\t\t\t{\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'success' => $items->result()\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode(array(\n\t\t\t\t\t\t'error' => 'No items found!'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t}","title":""},{"docid":"9d7ad0d8f68c3799b0027aad2562ddba","score":"0.5290532","text":"function getItem($item)\n{\n $item = filter_var($item, FILTER_SANITIZE_SPECIAL_CHARS);\n\t\n //remove whitespace characters before search\n $item = trim($item);\n \n\tglobal $dbc;\n\t$item = \"%\" . $item . \"%\";\n\t\n $query = \"SELECT prod_id, prod_name, prod_weight, prod_price, prod_description, prod_image, cat_name\n FROM ICS199db.tblProducts\n JOIN ICS199db.tblCategory\n ON tblCategory_cat_id = cat_id \n\t\t\t\tWHERE upper(prod_name) LIKE upper(:item) OR upper(cat_name) LIKE upper(:item);\";\n $statement = $dbc->prepare($query);\n\t$statement->bindValue(':item', $item);\n $statement->execute();\n $products = $statement->fetchAll();\n $statement->closeCursor();\n return $products;\n}","title":""},{"docid":"05d5b3b7aba939b1d283ed1312eba460","score":"0.5290504","text":"function search_item($item_name)\n\t\t{\n\t\t\t$selectQ = \"SELECT * FROM \".INVENTORY_TABLE.\" WHERE name = '$item_name'\";\n\t\t\t$selectResult = $this->conn->query($selectQ);\n\n\t\t\tif ($selectResult->num_rows == 0){return null;}\n\n\t\t\t$search_results = array();\n\t\t\twhile($table_row = $selectResult->fetch_assoc())\n\t\t\t{\n\t\t\t\tarray_push($search_results, $table_row);\n\t\t\t}\n\t\t\treturn $search_results;\n\t\t}","title":""},{"docid":"cd31b235131e72bced4544241582fd62","score":"0.5289049","text":"function record_exists_select($table, $select='') {\n\n global $CFG;\n\n if ($select) {\n $select = 'WHERE '.$select;\n }\n\n return record_exists_sql('SELECT * FROM '. $CFG->prefix . $table . ' ' . $select);\n}","title":""},{"docid":"73d74b78e07cbf0a9c0123cc91d79924","score":"0.5286422","text":"function item_held($member_id, $item_name)\n{\n // Is the item held by the user\n $r = $GLOBALS['SITE_DB']->query_select_value_if_there('w_inventory', 'item_count', array('item_owner' => $member_id, 'item_name' => $item_name));\n return !is_null($r);\n}","title":""},{"docid":"dab22def700f265aaa6b9bf5727792f8","score":"0.52856696","text":"function getdbfields($returntype=\"\", $itemsperrow)\n {\n global $selectfield;\n global $search;\n global $order;\n $q=new Cdb;\n $a=$q->metadata(\"members\", false);\n $a[]=array('table' => 'members', 'name' => 'affiliate_name', 'type' => 'int', 'len' => '10', 'flags' => 'not_null primary_key auto_increment');\n $j=0;\n $k=0;\n foreach ($a as $b)\n {\n\n $i=0;\n foreach ($b as $c)\n {\n if ($i==1) \n {\n if ($returntype==\"check\")\n {\n if ($k%$itemsperrow==0) \n {\n $return.=\"\n \";\n $j=$k;\n }\n $k++;\n $return.=''.$c.'\n ';\n $m=0;\n if ($k%$itemsperrow==0 && $k!=$j)\n {\n $return.=\"\n \"; $m=1;\n }\n }\n if ($returntype==\"select\")\n {\n $m=3;\n $return.='';\n }\n if ($returntype==\"select_x\")\n {\n $return.='';\n }\n if ($returntype==\"select_s\")\n {\n $m=3;\n $return.='';\n }\n break;\n }\n else $i++;\n }\n\n }\n if ($m==0) $return.='';\n return $return;\n }","title":""},{"docid":"069bcd0e95c4f5ffd489f3a3be305e81","score":"0.5285205","text":"function save_name($item) {\n\n $result = \\Drupal::database()->select('myusers', 'm')\n ->fields('m', array('id', 'name'))\n ->condition('m.name', $item)\n ->countQuery()\n ->execute()\n ->fetchField(); \n\n if($result===0){\n $database = \\Drupal::service('database');\n $database->insert('myusers')\n ->fields([\n 'name' => $item\n ])\n ->execute();\n return true;\n }else{\n return false;\n }\n\n}","title":""},{"docid":"27338e1a33bea03da137e5f79f69ba50","score":"0.5274581","text":"function select($conexion,$valoresSeleccion,$tabla,$where = ['']){\n $consulta=\"SELECT \";\n for ($i=0; $i < count($valoresSeleccion); $i++) { \n if($i < count($valoresSeleccion)-1){\n $consulta=$consulta.$valoresSeleccion[$i].' ,';\n } else {\n $consulta=$consulta.$valoresSeleccion[$i].' ';\n }\n }\n $consulta=$consulta.'FROM ';\n for ($i=0; $i < count($tabla); $i++) { \n \n if($i < count($tabla)-1){\n $consulta=$consulta.$tabla[$i].' ,';\n } else {\n $consulta=$consulta.$tabla[$i].' ';\n }\n }\n if ($where[0]!=''){\n $consulta=$consulta.' WHERE ';\n for ($i=0; $i < count($where); $i++) { \n if($i < count($where)-1){\n $consulta=$consulta.$where[$i].' AND ';\n } else {\n $consulta=$consulta.$where[$i].' ';\n }\n }\n }\n $resultado = $conexion->query($consulta);\n return $resultado;\n}","title":""},{"docid":"4ed89c507ae20b8b0272d6827acbc2f5","score":"0.52655804","text":"function showoptionlists2($fieldname,$tablename,$returnvaluefield,$showfield , $whereclause){\n global $dbprefix,$$fieldname;\n $sql=\"select $returnvaluefield,$showfield from \".$dbprefix.\"$tablename \";\n if($whereclause <> '' ) $sql = $sql .\" where \" . $whereclause;\n $result=mysql_query($sql);\n echo \"\";\n}","title":""},{"docid":"92af404d863153dab73fda12cda59954","score":"0.52460337","text":"public function test_input_field_select()\n\t{\n\t\t$id = '';\n\t\t$seloptions = array();\n\t\t$selected_value = '';\n\t\t$parameters = array($id, $seloptions, $selected_value);\n $msg = self::invokeMethod('LiteSpeed_Cache_Admin_Display','input_field_select', $parameters);\n\t\t$bool = self::isString($msg);\n \t$this->assertTrue($bool);\t\t\n \t\n\t}","title":""},{"docid":"e8bc7067417c1c2cce75e8ec4fe7e45d","score":"0.5234986","text":"function getDataList_reference($value='',$id='',$_type='',$_user=''){\n global $_LIST;\n if(!empty($_type) && $_type==4){\n $sql=\"Select * from campus_students where (std_status=1 or std_status=2)\";\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\n $sql.=\" and agent_id=$_user\";\n }\n }else{\n $sql=\"Select * from capmus_users where status=1\";\n \n \n }\n $result=mysql_query($sql);\n $return=\"\";\n return $return;\n \n }","title":""},{"docid":"f4478e40638564909c117454bdd5f559","score":"0.5234897","text":"public function search_items($item) {\n $this->db->select(\"item_id as value, concat(item_number,' / ',item_name) as label\",FALSE);\n $this->db->from('v_itemsearch');\n $this->db->like('upper(concat(item_name,item_number)) ', strtoupper($item));\n $this->db->order_by('item_number');\n $result=$this->db->get()->result_array();\n return $result;\n }","title":""},{"docid":"bda07529006910fbf4eea5dd95d5f2db","score":"0.52305186","text":"function select_itmlist(){\n\t\t$username = $this->session->userdata('username');\n\t\t$query = $this->db->query(\"select * from mod_itm_list\");\n\t\treturn $query;\n\t}","title":""},{"docid":"76749257c03b1f715f5057b146dd08f5","score":"0.5222353","text":"function items_info($item_id=null) {\n\treturn query('select * from item');\n}","title":""},{"docid":"969fe9dc537c01ddb373256dc13fb892","score":"0.52190423","text":"public function CheckItem($fieldName,$fieldValue)\n {\n $this->copen();\n $stmt = $this->DBH->prepare(\"SELECT * FROM users WHERE $fieldName=:itemValue\");\n $stmt->execute(['itemValue' => $fieldValue]);\n $result = $stmt->fetch();\n $this->cclose();\n return $result[\"$fieldName\"];\n }","title":""},{"docid":"15fa4335c891e8576e29e793533c340b","score":"0.5207522","text":"abstract public static function getItemsSelectStatement() : string;","title":""},{"docid":"7a9cde33e000c50a73c8376e20bf9432","score":"0.5200764","text":"function DB_select ($SQL, &$vystup, &$pocet_zaznamu)\n{\t//echo \"

    SQL = \".$SQL.\"

    \";\n\t$funguje = false;\n\tif (!(DB_spojeni(c_Databaze, $chyba, $spojeni))):\n\t\techo \"

    Do�lo k chyb� p�i spojen� s datab�z�.\n\t\t\t($chyba)


    \\n\";\n\t\treturn false;\n\tendif;\n\t$vysledek = MySQL_Query($SQL);\n\tif (!$vysledek):\n\t\techo \"

    Do�lo k chyb� p�i zpracov�n� dotazu v\n\t\t\t\tdatab�zi.


    \\n\";\n\telse:\n \t$funguje = true;\n\t\t$vystup = $vysledek;\n $pocet_zaznamu = MySQL_num_rows($vystup);\n endif;\n\tDB_odpojeni($spojeni);\n\treturn $funguje;\n}","title":""},{"docid":"9ca7faaefa4217baf6bc0a9a67377443","score":"0.520033","text":"function check_value_unique($options, $table) {\n\tif( !empty( $options['unique'] ) ) {\n\n\t\tforeach( $options['unique'] as $key=>$value ) {\n\n\t\t\t$sql = \"SELECT * FROM `\" . $table . \"` WHERE \";\n\t\t\t\n\t\t\t$sql .= \"`\" . $key . \"`='\" . $value['value'] . \"'\";\n\n\t\t\tif( $res = query($sql) ) {\n\t\t\t\tif( mysql_num_rows($res) > 0 ) {\n\n\t\t\t\t\t//There was a match, so error out.\n\t\t\t\t\terrorBox($value['message']);\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\t//If we've gotten here, they all checked out.\n\t\treturn TRUE;\n\t}else{ \n\t\treturn FALSE;\n\t}\n}","title":""},{"docid":"b9b6f9759c57373277a937a2c79bce83","score":"0.51990783","text":"function populate_user_select() {\nglobal $db;\n// get list of available users\n$modify_query = \"SELECT users_id, name FROM admin_users\";\n$sth = $db->prepare($modify_query);\n$res = $db->execute($sth,$category);\n\nwhile ($row = $res->fetchRow()) {\n$page_content .= '' . \"\\n\";\n}\n\nreturn $page_content;\n}","title":""},{"docid":"65adf218734f1af02dcc077c7a7428e2","score":"0.5199023","text":"function ItemInfoFetch($start = null, $limit = null){\r\n$searchq \t= getRequest('searchq');\r\n$page \t= getRequest('page');\r\n$sub_item_category_id \t= getRequest('sub_item_category_id');\r\nif($searchq){\r\n\t$sql=\"SELECT\r\n\titem_id,\r\n\ti.sub_item_category_id,\r\n\tsub_item_category_name,\r\n\titem_size,\r\n\tdescription,\r\n\ti.main_item_category_id,\r\n\tmain_item_category_name,\r\n\tcost_price,\r\n\tsales_price,\r\n\twhole_sales_price,\r\n\ti.branch_id,\r\n\tbranch_name,\r\n\tquantity,\r\n\treceive_date,\r\n\ti.createdby,\r\n\ti.createddate\r\nFROM\r\n\t\".INV_ITEMINFO_TBL.\" i inner join \".INV_CATEGORY_SUB_TBL.\" c on c.sub_item_category_id=i.sub_item_category_id\r\n\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\r\n\tinner join branch b on b.branch_id=i.branch_id\r\n\twhere branch_name LIKE '%\".$searchq.\"%' or main_item_category_name LIKE '%\".$searchq.\"%' or sub_item_category_name LIKE '%\".$searchq.\"%' order by receive_date desc LIMIT 0, 5\"; \r\n\t}if($page){\r\n\t\t$sql=\"SELECT\r\n\titem_id,\r\n\ti.sub_item_category_id,\r\n\tsub_item_category_name,\r\n\titem_size,\r\n\tdescription,\r\n\ti.main_item_category_id,\r\n\tmain_item_category_name,\r\n\tcost_price,\r\n\tsales_price,\r\n\twhole_sales_price,\r\n\ti.branch_id,\r\n\tbranch_name,\r\n\tquantity,\r\n\treceive_date,\r\n\ti.createdby,\r\n\ti.createddate\r\nFROM\r\n\t\".INV_ITEMINFO_TBL.\" i inner join \".INV_CATEGORY_SUB_TBL.\" c on c.sub_item_category_id=i.sub_item_category_id\r\n\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\r\n\tinner join branch b on b.branch_id=i.branch_id\r\n\torder by receive_date desc LIMIT $start, $limit\"; \r\n\t}if($sub_item_category_id){\r\n\t\t$sql=\"SELECT\r\n\titem_id,\r\n\ti.sub_item_category_id,\r\n\tsub_item_category_name,\r\n\titem_size,\r\n\tdescription,\r\n\ti.main_item_category_id,\r\n\tmain_item_category_name,\r\n\tcost_price,\r\n\tsales_price,\r\n\twhole_sales_price,\r\n\ti.branch_id,\r\n\tbranch_name,\r\n\tquantity,\r\n\treceive_date,\r\n\ti.createdby,\r\n\ti.createddate\r\nFROM\r\n\t\".INV_ITEMINFO_TBL.\" i inner join \".INV_CATEGORY_SUB_TBL.\" c on c.sub_item_category_id=i.sub_item_category_id\r\n\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\r\n\tinner join branch b on b.branch_id=i.branch_id \r\n\twhere sub_item_category_id=$sub_item_category_id order by receive_date desc\"; \r\n\t}\r\nif(!$page && !$searchq && !$sub_item_category_id){\r\n\t$sql=\"SELECT\r\n\titem_id,\r\n\ti.sub_item_category_id,\r\n\tsub_item_category_name,\r\n\titem_size,\r\n\tdescription,\r\n\ti.main_item_category_id,\r\n\tmain_item_category_name,\r\n\tcost_price,\r\n\tsales_price,\r\n\twhole_sales_price,\r\n\ti.branch_id,\r\n\tbranch_name,\r\n\tquantity,\r\n\treceive_date,\r\n\ti.createdby,\r\n\ti.createddate\r\nFROM\r\n\t\".INV_ITEMINFO_TBL.\" i inner join \".INV_CATEGORY_SUB_TBL.\" c on c.sub_item_category_id=i.sub_item_category_id\r\n\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\r\n\tinner join branch b on b.branch_id=i.branch_id \r\n\torder by receive_date desc LIMIT 0, 29\"; \r\n\t\t}\r\n\t\t//echo $sql;\r\n\t\t$res= mysql_query($sql);\r\n\t $type = '

    \r\n\t \r\n\t\t\t\t\r\n\t \r\n\t \r\n\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t\r\n\t\t\t\t\r\n\t ';\r\n\t\t$rowcolor=0;$i=1;\r\n\t\twhile($row = mysql_fetch_array($res)){\r\n \t\t\t\r\n\t\t\t\r\n\t\t if($rowcolor==0){ \r\n\t\t\t\t$style = \"oddClassStyle\";$rowcolor=1;\r\n\t\t\t }else{\r\n\t\t\t\t$style = \"evenClassStyle\";$rowcolor=0;\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t$type .='\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t';\r\n\t\t\t\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$type .= '
    SLBrand NameItem NameQuantityCostSales(retail)Sales(whole)SizeDateCreated ByBranch
    '.$i.'&nbsp;'.$row['main_item_category_name'].'&nbsp;'.$row['sub_item_category_name'].'&nbsp;'.$row['quantity'].'&nbsp;'.$row['cost_price'].'&nbsp;'.$row['sales_price'].'&nbsp;'.$row['whole_sales_price'].'&nbsp;'.$row['item_size'].'&nbsp;'._date($row['receive_date']).'&nbsp;'.$row['createdby'].'&nbsp;'.$row['branch_name'].'&nbsp;\r\n\t\t\t
    ';\r\n\t\treturn $type;\r\n}","title":""},{"docid":"d2d6fed790638f78004bfee6679c754e","score":"0.5187584","text":"function getTableList_ext($value='',$id='',$_table='',$_label=''){\n global $_LIST;\n \n $skid=showStudents($value,'extId');\n if(!empty($skid)){\n\t$sql=\"Select * from $_table where status=2 or id=$skid\";\n }else{\n $sql=\"Select * from $_table where status=2\";\n }\n \n \n $result=mysql_query($sql);\n $return=\"\";\n return $return;\n \n }","title":""},{"docid":"89ba8cfefc2f73b62babdce2e4e58009","score":"0.51858157","text":"function check_resource_item($rid, $t, $m, $l) {\n global $con;\n $sql = \"SELECT id FROM resourceItem WHERE deleted_at IS NULL AND resource_id='$rid' AND title='$t' AND mime='$m' AND link='$l' LIMIT 1\";\n if (($temp = mysql_query($sql, $con))) {\n if (mysql_num_rows($temp) > 0) {\n return true;\n } else {\n return false;\n }\n } else {\n die_error(-2, json_encode(mysql_error()));\n }\n}","title":""},{"docid":"d58372c83795d0fa5da708dd571cfd7a","score":"0.51836336","text":"public function scan_item($barcode)\n {\n $sql = \"SELECT a.itemlink,a.packsize,a.itemcode,a.description,b.barcode \n FROM backend.itemmaster a INNER JOIN backend.itembarcode b ON a.itemcode=b.itemcode \n WHERE b.barcode='$barcode'\";\n $query = $this->db->query($sql);\n //echo $this->db->last_query();die;\n return $query;\n \n }","title":""},{"docid":"de73a1ca19405c1c2c5d7a42ff67b8e4","score":"0.5173374","text":"function checkStatus($table,$column,$status){\r\nglobal $connection;\r\n\r\n$query = \"SELECT * FROM $table WHERE $column = '$status'\";\r\n\r\n$result = mysqli_query($connection,$query);\r\n\r\nconfirmQuery($result);\r\n\r\n return mysqli_num_rows($result);\r\n\r\n\r\n}","title":""},{"docid":"82663d529b4838538da70bbddac417f0","score":"0.5166895","text":"function validate_dropdowntable($id, $value)\n{ \n\n\t//echo \"\";\n\tglobal $db;\n\n\t$select = $db->select();\n\n\t\n\t//The following updates the column 'value' with the changed dropdown option's value \n\t$columns['value']\t= $value;\n\t$db->update(\"station_variables\",$columns,'\"svid\"=\\''.$id.'\\'');\n\n\t$result = $db->fetchAll('select sid from station_variables where \"svid\"=\\''.$id.'\\'');\n\t//$result[0]['sid'] == sid\n\tworkflow_input($result[0]['sid']);\n\t\n\treturn $value; \n}","title":""},{"docid":"0cd8671c8b5a92ba7be392876f4fdaa4","score":"0.5164167","text":"public function qty($a){\n $sql = \"SELECT qty FROM products WHERE product_id='$a'\";\n //execute the query and return boolean\n return $this->db_query($sql);\n}","title":""},{"docid":"9707bded6ee16237292f271ec1d9159f","score":"0.5161214","text":"static public function mdlMostrarCategorias($tabla,$item,$valor){\n if($item!= null){\n \n $stmt=Conexion::conectar()->prepare(\"SELECT * FROM $tabla where $item = '$valor'\");\n $stmt->bindParam(\":\".$item, $valor,PDO::PARAM_STR); /*el metodo bindParam sirve para enlazar parametros */\n $stmt->execute();\n /*if(isset($stmt) && !empty($stmt)){\n return $stmt->errorInfo();\n \n }else{*/\n return $stmt->fetch();\n \n \n }else{\n $stmt=Conexion::conectar()->prepare(\"SELECT * FROM $tabla\");\n $stmt->execute();\n return $stmt->fetchAll();\n }\n\n $stmt->close();\n $stmt=null;\n \n }","title":""},{"docid":"490cd950cd6d67ad4f29a8241f5e61bf","score":"0.51592916","text":"function check_if_you_want_this_thing_exist_in_database_or_not($colum,$table,$value){\r\n global $con;\r\n $select = $con ->prepare(\"SELECT $colum FROM $table WHERE $colum = ?\");\r\n $select ->execute(array($value));\r\n $result =$select ->rowCount();\r\n return $result;\r\n\r\n \r\n}","title":""},{"docid":"8f6caba9292e14f49385564cfc44470d","score":"0.5154782","text":"function SelectTableOnTwoConditions($TableName,$ConditionColumn1,$ConditionValue1,$ConditionColumn2,$ConditionValue2)\r\n{\r\n \r\n //connecting to database\r\n $Connection=ConnetToDatabaseFuntion();\r\n\r\n $my_county_select=$my_county_select=\"SELECT * FROM `$TableName` WHERE `$ConditionColumn1`='\".mysqli_real_escape_string($Connection,$ConditionValue1).\"' AND `$ConditionColumn2`='\".mysqli_real_escape_string($Connection,$ConditionValue2).\"' \";\r\n\t\r\n \r\n\t\t$do_my_county_select=mysqli_query($Connection,$my_county_select);\r\n \r\n if($do_my_county_select)\r\n {\r\n $selected_manage_data=mysqli_fetch_all($do_my_county_select,MYSQLI_ASSOC);\r\n \r\n $Connection->close();\r\n mysqli_free_result($do_my_county_select);\r\n return $selected_manage_data;\r\n }\r\n else \r\n {\r\n die(\"could not select on two conditions table--\".$my_county_select);\r\n }\r\n\r\n}","title":""},{"docid":"6c29068f80d71de27b881f09fd30d2a7","score":"0.51494884","text":"public function itemID_AutoComplete($id=\"\"){\n return (Items::find_by_sql(\"SELECT * FROM items WHERE item_name LIKE '%\".$_POST['input'].\"%'\"));\n }","title":""},{"docid":"cc8280498f19c58de4710c75958ba7d7","score":"0.51163733","text":"function find_specified($specified, $table, $column, $item)\n{\n try\n {\n $connection = open_connection();\n $statement = $connection->prepare(\"SELECT $specified FROM $table WHERE $column = :item\");\n if($statement->execute(array('item' => $item)))\n {\n //echo \"Successfully looked for $specified
    \";\n $temp = $statement->fetchAll();\n //print_r($temp);\n if(!isset($temp[0][0]))\n {\n return(-1);\n }\n else\n {\n return ($temp[0][0]);\n }\n }\n }\n catch(PDOException $e)\n {\n print(\"Failed to look for $specified: \" . $e->getMessage() . \"
    \");\n $statement->debugDumpParams();\n die();\n }\n}","title":""},{"docid":"e26a11a41aaa401dd7cc7b27dac0080b","score":"0.5114054","text":"function optionSelected($value , $comboBox){\n if (isset($_POST) && $_POST[$comboBox]==$value || isset($_GET) && $_GET[$comboBox]==$value) {\n echo \" selected\";\n }\n }","title":""},{"docid":"f3612c7e9d88fad85ec4037ddfa606e6","score":"0.5100969","text":"function Selallscnd($data1,$data2,$data3)\r\n{\r\n global $db_table_prefix;\r\n $Ckhstt = \"SELECT * FROM \".$db_table_prefix.$data1.\" WHERE $data2=$data3\";\r\n $exQry = mysql_query($Ckhstt)or die(doLogDb(mysql_error().__LINE__).\"$Ckhstt
    failed @ line \".__LINE__);\r\n return $exQry;\r\n}","title":""},{"docid":"dbf0be89ee58a3003ed820351e4cbc8a","score":"0.50984263","text":"function insert_record($dbc, $id, $desc, $create, $update, $room, $owner, $finder, $item_status) {\r\n $query = 'INSERT INTO stuff(location_id, description, create_date, update_date, room, owner, finder, item_status) VALUES (\"' . $id . '\" ,\"' . $desc . '\" , \"' . $create . '\",\"' . $update . '\",\"' . $room . '\",\"' . $owner . '\",\"' . $finder . '\",\"' . $item_status . '\")' ;\r\n show_query($query);\r\n\t$results = mysqli_query($dbc,$query) ;\r\n\tif(!valid_description($desc))\r\n\t echo '

    Please give a description.

    ';\r\n\telse if (!valid_date($create))\r\n\t echo '

    Please give a valid date.

    '; \r\n\telse if (!valid_status($item_status))\r\n\t echo '

    Please complete the item status.

    ';\r\n\telse\r\n\t\tcheck_results($results) ;\r\n return $results ;\r\n}","title":""},{"docid":"544eec506c2a73fece5dcbf005e83cb4","score":"0.5095081","text":"function mysql_select($table) {\r\r\n $noerror = true;\r\r\n if (($noerror = $this->mysql_qry($table, 1))) {\r\r\n }\r\r\n return $noerror;\r\r\n }","title":""},{"docid":"3216d7da072f67dc02f1a0c05a50fc06","score":"0.50919384","text":"function claim_found_item($status) {\r\n global $dbc, $debug;\r\n\t\r\n if($status === 'Claimed'){\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_email']))))\r\n\t\t\t$owner_email = $_POST['owner_email'];\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\tif(trim(is_numeric(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_phone'])))))\r\n\t\t\t$owner_phone = $_POST['owner_phone'];\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_full_name']))))\r\n\t\t\t$owner_full_name = $_POST['owner_full_name'];\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($status))))\r\n\t\t\t$status1 = $status;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t\tif(is_numeric($_POST['id']))\r\n\t\t\t$id = $_POST['id'];\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n $query = 'UPDATE stuff SET update_date=NOW()' . ', claimed_date=NOW()' . ', owner_email=\"' . $owner_email . '\", owner_phone=\"' . $owner_phone . '\", owner=\"' . $owner_full_name . '\", status=\"' . $status1 . '\" WHERE id=' . $id;\r\n }\r\n\t\r\n else if($status === 'Found') {\r\n $title_query = 'SELECT title FROM stuff WHERE id=' . $_POST['id'];\r\n $title_results = mysqli_query($dbc, $title_query);\r\n check_results($title_results);\r\n $row = mysqli_fetch_array($title_results);\r\n $title = $row['title'];\r\n\t\t\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_email']))))\r\n\t\t\t$finder_email = $_POST['finder_email'];\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\r\n\t\tif(trim(is_numeric(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_phone'])))))\r\n\t\t\t$finder_phone = $_POST['finder_phone'];\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_full_name']))))\r\n\t\t\t$finder_full_name = $_POST['finder_full_name'];\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($status))))\r\n\t\t\t$status1 = $status;\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif(is_numeric($_POST['id']))\r\n\t\t\t$id = $_POST['id'];\r\n\t\telse {\r\n\t\t\techo '';\r\n\t\t\treturn false;\r\n\t\t}\r\n \r\n # update item as found only if it has not been reported found already\r\n if(!is_numeric(strpos($title, 'REPORTED FOUND:')))\r\n $query = 'UPDATE stuff SET title=\"REPORTED FOUND: ' . $title . '\", update_date=NOW()' . ', found_date=NOW()'. ', finder_email=\"' . $finder_email . '\", finder_phone=\"' . $finder_phone . '\", finder=\"' . $finder_full_name . '\", status=\"' . $status1 . '\" WHERE id=' . $id;\r\n }\r\n else\r\n return false;\r\n if(!empty($query)) {\r\n $results = mysqli_query($dbc, $query);\r\n check_results($results);\r\n \r\n if($status === 'Found')\r\n echo '';\r\n \r\n else if($status === 'Claimed')\r\n echo ''; \r\n }\r\n\t\r\n if($debug)\r\n echo '';\r\n}","title":""},{"docid":"db6e01721fdfd6cd2a4a5991e538d97f","score":"0.5090051","text":"function MakeSelectFieldWithItems($edit,$data,$items,$datas,$namer,$item,$rdata=\"\",$titler=\"\",$empty=\"\")\n {\n if ($edit==0)\n {\n return $this->MakeSelectShowField($data,$datas,$namer,$item,$titler,$empty);\n }\n\n $values=array();\n $names=array();\n $titles=array();\n\n $value=0;\n if(!empty($item[ $data ]))\n {\n $value=$item[ $data ];\n }\n else { $empty=\"\"; }\n\n $values=array(0);\n $names=array($empty);\n if (!empty($titler)) { $titles=array(\"\"); }\n\n\n $title=\"\";\n foreach ($items as $ritem)\n {\n if (!empty($ritem[ \"__Disabled__\" ]))\n {\n array_push($values,\"disabled\");\n }\n else\n {\n array_push($values,$ritem[ \"ID\" ]);\n }\n\n $this->ApplySqlObjectDataNames($ritem,$datas);\n\n array_push($names,$this->Filter($namer,$ritem));\n if (!empty($titler))\n {\n array_push($titles,$this->Filter($titler,$ritem));\n if ($ritem[ \"ID\" ]==$value) { $title=$this->Filter($titler,$ritem); }\n }\n elseif ($ritem[ \"ID\" ]==$value)\n {\n $title=$this->Filter($namer,$ritem);\n }\n }\n\n \n\n if (empty($rdata)) { $rdata=$data; }\n\n return $this->MakeSelectField\n (\n $rdata,\n $values,\n $names,\n $value,\n array(),\n $titles,\n $title\n );\n }","title":""},{"docid":"de17a6a463288dec90910d975de2b52a","score":"0.50886464","text":"public function selectItems($content){\n foreach($this->_items as $name => $item){\n if (is_array($content)){\n if (in_array($item->getItemValue(), $content))\n $item->selected(true);\n } else {\n if ($item->getItemValue() == $content)\n $item->selected(true); \n }\n }\n }","title":""},{"docid":"0f22503674d3b367420a9f556d92dd10","score":"0.5086063","text":"function fetch_items($category=0)\n{\n\t\t$sql = \"SELECT stock_id, stock.description AS name,\n\t\t\t\tstock.category_id,\n\t\t\t\tunits,material_cost,\n\t\t\t\tcat.description\n\t\t\tFROM \".TB_PREF.\"stock_master stock LEFT JOIN \".TB_PREF.\"stock_category cat ON stock.category_id=cat.category_id\n\t\t\t\tWHERE mb_flag <> 'D'\";\n\t\tif ($category != 0)\n\t\t\t$sql .= \" AND cat.category_id = \".db_escape($category);\n\t\t$sql .= \" ORDER BY stock.category_id, stock_id\";\n\n return db_query($sql,\"No transactions were returned\");\n}","title":""},{"docid":"c9d8ba30399b9a77f92573105758947e","score":"0.5082954","text":"function getDataList_active_deactive_teachers($value='',$id='',$_type='',$_user=''){\n global $_LIST;\n if(!empty($_type) && $_type==4){\n $sql=\"Select * from campus_students where (std_status=1 or std_status=2)\";\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\n $sql.=\" and agent_id=$_user\";\n }\n }else{\n $sql=\"Select * from capmus_users where user_type=$_type\";\n \n \n }\n $result=mysql_query($sql);\n $return=\"\";\n return $return;\n \n }","title":""},{"docid":"9e8ae6b2fc5d10488bb4cda8d72c0502","score":"0.5082712","text":"public function selectAllMineItems($customerId, $selected);","title":""},{"docid":"81501b5b46b0d0969bfbf3550a40be20","score":"0.5081719","text":"function errorCheck($table, $id) {\r\n\t$result = mysql_query(\"select * from $table where id = $id\");\r\n\tif (!$result) return \"Query failed: \" . mysql_error();\r\n \r\n $ses_replacement = mysql_real_escape_string(trim($_SESSION['gwasreplacement']));\r\n if (!(isset($ses_replacement)) || ($ses_replacement == '') || $ses_replacement == \"%\") {\r\n return \"No replacement selected.\";\r\n }\r\n \r\n\t$item = mysql_fetch_array($result);\r\n\t$id_visit = $item['id_visit'];\r\n\t$id_subject = $item['id_subject'];\r\n\t$date_visit = $item['date_visit'];\r\n\r\n\r\n \r\n\t//wrong item type\r\n\tif ($item['type'] != \"tube\") return \"wrong item type\";\r\n\t//wrong study\r\n\tif ($item['id_study'] != \"CRIC\") return \"wrong study\";\r\n\t//wrong sample type\r\n\tif ($item['sample_type'] != \"BUFFY\") return \"wrong sample type\";\r\n\t//pid exists check\r\n\t$gwasresult = mysql_query(\"select * from gwas_specimens where pid = $id_subject\");\r\n\tif (!$gwasresult) return \"Query failed: \" . mysql_error();\r\n\tif (mysql_affected_rows() == 0) return \"PID not on list\";\r\n \r\n //any tube for this patent already scanned\r\n $gwasresult = mysql_query(\"select * from gwas_specimens where pid = $id_subject and barcode != '' and replacement = $ses_replacement\");\r\n if (!$gwasresult) return \"Query failed: \" . mysql_error();\r\n\tif (mysql_affected_rows() > 0) return \"PID already scanned\";\r\n \r\n //vnum/replacement id check\r\n\t$gwasresult = mysql_query(\"select * from gwas_specimens where pid = $id_subject and vnum = '$id_visit' and replacement = $ses_replacement\");\r\n\tif (!$gwasresult) return \"Query failed: \" . mysql_error();\r\n\tif (mysql_affected_rows() == 0) return \"TCL_VNUM != VNUM\";\r\n\t$gwas_item = mysql_fetch_array($gwasresult);\r\n\t//pid already scanned check\r\n\tif ($gwas_item['scan_date'] != '0000-00-00') return \"PID already scanned\";\r\n\t\r\n //vdate check\r\n\t$gwas_date_visit = $gwas_item['vdate'];\r\n\tif ($date_visit == 0) {\r\n\t\treturn \"TCL_VDATE not set\";\r\n\t}\r\n\t$diff = dateDiff($gwas_item['vdate'], $item['date_visit']);\r\n //$diff = 0; #debug!\r\n\t$dateRange = 90;\r\n\t/*\r\n\techo $gwas_item['vdate'] . \", \" . $item['date_visit'];\r\n\techo $diff;\r\n\t*/\r\n\tif ($diff < - $dateRange) {\r\n\t\treturn \"TCL_VDATE < VDATE - 90\";\r\n\t}\r\n\tif ($diff > $dateRange) {\r\n\t\treturn \"TCL_VDATE > VDATE + 90\";\r\n\t}\r\n\treturn \"ok\";\r\n}","title":""},{"docid":"8071903409d419d2af433ce0278058ba","score":"0.5079654","text":"function showContent($title) {\r\n require \"includes/dbconvars.php\";\r\n $dbCnx = mysql_connect($dbhost, $dbuser, $dbpwd)\r\n or die(mysql_error());\r\n mysql_select_db($dbname, $dbCnx)\r\n or die(mysql_error());\r\n\r\n $category = $_SESSION[\"category\"];\r\n $selection = $_SESSION[\"selection\"];\r\n $userEntry = $_SESSION[\"userEntry\"];\r\n\r\n if (!get_magic_quotes_gpc()) {\r\n $selection = mysql_real_escape_string($selection);\r\n $userEntry = mysql_real_escape_string($userEntry);\r\n }\r\n\r\n\r\n $sql = \"\r\n SELECT ID, FIRST_NAME, LAST_NAME, COMPANY, STREET\r\n FROM $category\r\n WHERE $selection LIKE '$userEntry%'\r\n ORDER BY LAST_NAME\r\n \";\r\n $result = mysql_query($sql);\r\n\r\n if (mysql_num_rows($result) == 0) {\r\n echo \"

    No Results Matched Your Search. Please Use Your Browser's Back Button and Try Again

    \";\r\n }\r\n\r\n echo \"

    $title

    \\n\";\r\n echo \"\\n\";\r\n showHeading();\r\n while ($row = mysql_fetch_row($result)) {\r\n list($id, $fname, $lname, $company, $address) = $row;\r\n showItem($id, $fname, $lname, $company, $address);\r\n }\r\n echo \"
    \\n\";\r\n\r\n mysql_free_result($result);\r\n mysql_close($dbCnx);\r\n}","title":""},{"docid":"7aa7fdbccfa97669b8de6818b673f87d","score":"0.50791806","text":"function getItem() {\n $sql = \"SELECT Tuotetunnus FROM tuote WHERE tuotetyyppi = ?\";\n $prepare = $db_handle->db()->prepare($sql);\n $prepare->bind_param($POST['tuote']);\n $result = $prepare->get_result();\n return $result;\n}","title":""},{"docid":"24c12e2095bd96319be78cf80b4ef611","score":"0.5075969","text":"function customer_have_saved_item($customer_id, $item_id)\n{\n global $conn;\n\n $sql = \"SELECT * FROM savedproducts WHERE customerid='$customer_id' AND productid='$item_id';\";\n $result = mysqli_query($conn, $sql);\n $numrows = mysqli_num_rows($result);\n\n if ($numrows > 0) {\n return true;\n } else {\n return false;\n }\n}","title":""},{"docid":"8fa0540e6f97ac9d717a2904260c634a","score":"0.5071931","text":"function ajr_trackmate_check_lists( $args ) {\n\n\tglobal $wpdb;\n\t\n\t# args\n\t$visible_nonrunners\t= $args['visible_nonrunners'];\n\t$arg_get\t\t\t= $args['get'];\n\t$arg_select\t\t\t= $args['select'];\n\t$type\t\t\t\t= $args['type'];\n\t$sub_type\t\t\t= $args['sub_type'];\n\t$horse_name\t\t\t= $args['horse_name'];\n\t$race_date\t\t\t= $args['race_date'];\n\t$race_time\t\t\t= $args['race_time'];\n\t$track_name\t\t\t= $args['track_name'];\n\t$user_id\t\t\t= get_current_user_id();\n\t\n\t//$visible_nonrunners = false;\n\t\n\t# build query\n\tif( $type == 'all' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, type, sub_type, notes, user_id, user_name';\n\t\t$where\t= 'WHERE '.($visible_nonrunners?'':'user_id=\"'.$user_id.'\" AND ').'horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';\n\telseif( $type == 'toggle_onoff' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, info';\n\t\t$where\t= 'WHERE user_id=\"'.$user_id.'\" AND type=\"'.$type.'\" AND sub_type=\"'.$sub_type.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';\n\telseif( $sub_type == 'notebook' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, type, sub_type';\n\t\t$where\t= 'WHERE user_id=\"'.$user_id.'\" AND (type=\"notebook\" AND sub_type=\"notebook\" AND horse_name=\"'.$horse_name.'\") OR (type=\"favourite\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\")';\n\telseif( $type == 'favourite' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, type, sub_type, user_id';\n\t\t$where\t= 'WHERE type=\"'.$type.'\" AND user_id=\"'.$user_id.'\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';\n\telseif( $type == 'ignore' && in_array($sub_type, array('nonrunner','ignore_horse')) ) :\n\t\t$get\t= $arg_get;\n\t\t$select\t= 'SELECT '.$arg_select; \n\t\t$where\t= 'WHERE '.($visible_nonrunners?'':'user_id=\"'.$user_id.'\" AND ').'type=\"'.$type.'\" AND sub_type=\"'.$sub_type.'\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';//'.(!empty($sub_type) ? ' AND sub_type=\"'.$sub_type.'\"' : '' ).'\n\telseif( $type == 'ignore' ) :\n\t\t$get\t= 'get_results';\n\t\t$select\t= 'SELECT id, rating, notes';\n\t\t$where\t= 'WHERE type=\"ignore\" AND user_id=\"'.$user_id.'\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';//'.(!empty($sub_type) ? ' AND sub_type=\"'.$sub_type.'\"' : '' ).'\n\telse :\n\t\t$get\t= 'get_var';\n\t\t$select\t= 'SELECT id';\n\t\t$where\t= 'WHERE type=\"'.$type.'\" AND user_id=\"'.$user_id.'\" AND horse_name=\"'.$horse_name.'\" AND race_date=\"'.$race_date.'\" AND race_time=\"'.$race_time.'\" AND track_name=\"'.$track_name.'\"';//'.(!empty($sub_type) ? ' AND sub_type=\"'.$sub_type.'\"' : '' ).'\n\tendif;\n\n\t# query\n\t$results\t= $wpdb->$get( $select.' FROM ajr_trackmate_lists '.$where );\n\n\t# testing\n\t//echo '
    '; print_r($args); echo '
    ';\n\t//echo $get.' '.$select.' FROM ajr_trackmate_lists '.$where;\n\t//echo '
    check_list results:'; print_r($result); echo '
    ';\n\t\n\t#return\n\treturn ( $results ?: '' );\n}","title":""}],"string":"[\n {\n \"docid\": \"fdc8da9ba3e0295c135bab9617fd8666\",\n \"score\": \"0.76120293\",\n \"text\": \"function checkItem($select, $from, $value) {\\n\\t\\t\\n\\t\\tglobal $con;\\n\\n\\t\\t$statement = $con->prepare(\\\"SELECT $select FROM $from WHERE $select = ?\\\");\\n\\n\\t\\t$statement->execute(array($value));\\n\\n\\t\\t$count = $statement->rowCount();\\n\\n\\t\\treturn $count;\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9bb841e1141e179d6750c85d6ed6513d\",\n \"score\": \"0.7502494\",\n \"text\": \"function checkItem($select, $fromTable, $valueItemCheck)\\n{\\n global $conn;\\n $sqlStat = \\\"SELECT $select FROM $fromTable WHERE $select = ? \\\";\\n $satment = $conn->prepare($sqlStat);\\n $satment->execute(array($valueItemCheck));\\n $resf = $satment->rowCount();\\n if ($resf > 0) {\\n return $resf;\\n } else {\\n return 0;\\n }\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1c7084d0a2501a81bc8f6012dd54535\",\n \"score\": \"0.7484502\",\n \"text\": \"function checkItems($select, $from, $value) {\\n global $con;\\n $statement = $con->prepare(\\\"SELECT $select FROM $from WHERE $select = ?\\\");\\n $statement->execute(array(\\n $value\\n ));\\n $count = $statement->rowCount();\\n return $count;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"982503397cb64477e772a85f811a82c1\",\n \"score\": \"0.74468964\",\n \"text\": \"function checkItem($select, $from, $value) {\\n\\t\\tglobal $db;\\n\\n\\t\\t$statment = $db->prepare(\\\"SELECT $select FROM $from WHERE $select = ?\\\");\\n\\n\\t\\t$statment->execute(array($value));\\n\\n\\t\\t$counter = $statment->rowCount();\\n\\n\\t\\treturn $counter;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ba2506d19acf7252898886f8f63b801\",\n \"score\": \"0.73915315\",\n \"text\": \"function checkItem($select, $table, $value){\\n\\n // Make the MySQL query dynamic using $select, $table, $value [Being called from members page]\\n global $connection ;\\n\\n $statement = $connection->prepare(\\\"SELECT $select FROM $table WHERE $select= ? \\\");\\n $statement -> execute(array($value));\\n $count = $statement->rowCount(); \\n\\n return $count;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8dc349ae385d155ef41a1ed6d503f80f\",\n \"score\": \"0.7296195\",\n \"text\": \"function checkItem($select, $from, $value){\\r\\n\\r\\n\\r\\nglobal $con;\\r\\n\\r\\n$statement = $con->prepare(\\\"SELECT $select FROM $from WHERE $select=?\\\");\\r\\n\\r\\n$statement->execute(array($value));\\r\\n$count = $statement->rowCount();\\r\\n\\r\\nreturn $count;\\r\\n\\r\\n\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08fd93799563e9f33314ff41c7602805\",\n \"score\": \"0.72418994\",\n \"text\": \"function checkItem($select, $from, $value, $exceptKey = \\\"\\\", $exceptValue = \\\"\\\") {\\n global $con;\\n $sql = \\\"SELECT $select FROM $from WHERE $select = ?\\\";\\n $values[] = $value;\\n if (!empty($exceptKey) && !empty($exceptValue)) {\\n $sql .= \\\" AND $exceptKey != ?\\\";\\n $values[] = $exceptValue;\\n }\\n $statement = $con->prepare($sql);\\n $statement->execute($values);\\n\\n return ($statement->rowCount() >= 1) ? true : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b09d54a78931dbb7348ed9959ce5414b\",\n \"score\": \"0.7231176\",\n \"text\": \"function checkItem($select, $user, $value)\\n{\\n global $conn;\\n $statment = $conn->prepare(\\\"SELECT $select FROM $user WHERE $select=? \\\");\\n $statment->execute(array($value));\\n $conect = $statment->rowCount();\\n return $conect;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9c21a9f32cb62b596fe6b93be0549ef\",\n \"score\": \"0.7056379\",\n \"text\": \"function checkItem($select, $from, $value){\\n\\n global $con;\\n\\n $statment = $con->prepare('SELECT ' . $select . ' FROM ' . $from . ' WHERE ' . $select . ' = ?');\\n $statment->execute(array($value));\\n $count = $statment->rowCount();\\n return $count;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1bd71facb30d5287f80eafc2dc2354c6\",\n \"score\": \"0.69792205\",\n \"text\": \"function checkItem($select,$from,$value){\\n\\tglobal $con;\\n\\t$statment=$con->prepare(\\\"SELECT $select FROM $from WHERE $select = ?\\\");\\n\\t$statment->execute(array($value));\\n\\t$count=$statment->rowCount();\\n\\treturn $count;/// return item not like echo return value of output\\n\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ac139948c23b87476c5b2c4bfbf73ec\",\n \"score\": \"0.6959769\",\n \"text\": \"public static function checkItem($select, $from, $value, $And=NULL){\\n\\n global $con;\\n\\n $statement = $con->Prepare(\\\"SELECT $select FROM $from WHERE $select like ? $And\\\");\\n\\n $statement->execute(array($value));\\n\\n $count = $statement->rowCount();\\n\\n return $count;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99e2024cf46292b1db06590156911c23\",\n \"score\": \"0.67115545\",\n \"text\": \"function check_column($item,$table_name,$column_name,$item_name,$item_value)\\n {\\n global $connection;\\n $selectQuery=\\\"select $item from $table_name where $column_name ='$item_name'\\\";\\n $result=mysqli_query($connection,$selectQuery);\\n if(mysqli_num_rows($result)>0)\\n {\\n while($row=mysqli_fetch_assoc($result))\\n {\\n if($row[\\\"$item\\\"]==$item_value)\\n return true;\\n else\\n return false;\\n }\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"240299e26bc20c49670da72231cb897d\",\n \"score\": \"0.65187186\",\n \"text\": \"function checkItem($select, $from, $value) {\\n global $conn;\\n $stmt = $conn->prepare(\\\"SELECT $select FROM $from WHERE $select = ?\\\"); // This is Same [\\\"SELECT Username FROM `users` WHERE Username = ? \\\"]\\n $stmt->execute(array($value)); // Execute The Result ..\\n $count = $stmt->rowCount();\\n return $count;\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"240299e26bc20c49670da72231cb897d\",\n \"score\": \"0.65187186\",\n \"text\": \"function checkItem($select, $from, $value) {\\n global $conn;\\n $stmt = $conn->prepare(\\\"SELECT $select FROM $from WHERE $select = ?\\\"); // This is Same [\\\"SELECT Username FROM `users` WHERE Username = ? \\\"]\\n $stmt->execute(array($value)); // Execute The Result ..\\n $count = $stmt->rowCount();\\n return $count;\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d53260bb1af3c62cb9caee3133e88184\",\n \"score\": \"0.6297642\",\n \"text\": \"function select_item()\\r\\n{\\r\\n global $world_db, $characters_db, $realm_id, $user_name, $output, $action_permission,\\r\\n $base_datasite, $name_datasite, $user_lvl, $sql;\\r\\n\\r\\n valid_login($action_permission[\\\"view\\\"]);\\r\\n\\r\\n if ( empty($_GET[\\\"charname\\\"]) )\\r\\n redirect(\\\"ultra_vendor.php?error=1\\\");\\r\\n\\r\\n $output .= '\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n '.lang(\\\"ultra\\\", \\\"selectitem\\\").'\\r\\n
    \\r\\n \\r\\n '\\r\\n .lang(\\\"ultra\\\", \\\"itemline1\\\").'.\\r\\n
    \\r\\n
    \\r\\n \\r\\n ('.lang(\\\"ultra\\\", \\\"itemline2\\\").' '.$name_datasite.'.\\r\\n
    '\\r\\n .lang(\\\"ultra\\\", \\\"itemline3\\\").'.)\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n \\r\\n
    \\r\\n
    \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
    ';\\r\\n makebutton(lang(\\\"ultra\\\", \\\"select\\\"), \\\"javascript:do_submit()\\\\\\\" type=\\\\\\\"def\\\", 180);\\r\\n $output .= '\\r\\n ';\\r\\n makebutton(lang(\\\"global\\\", \\\"back\\\"), \\\"javascript:window.history.back()\\\\\\\" type=\\\\\\\"def\\\", 130);\\r\\n $output .= '\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    ';\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c74dbbb35ac24996d94276a7a525ba2\",\n \"score\": \"0.6249586\",\n \"text\": \"function Query($database, $un, $name, $price, $cat){\\n\\t/*\\n\\t * Generates the SELECT query for the items in the user's inventory. The following line is the base query followed by 3 if statements\\n\\t * that add to the query if conditions where sent. If no conditions were sent, the query will return the same result as the my_inv\\n\\t * pageLoadQuery function.\\n\\t */\\n\\t$sql_query = \\\"SELECT * FROM ITEM WHERE inventory_id IN (SELECT inventory_id FROM HASACCESSTO WHERE user_id=\\\\\\\"$un\\\\\\\") AND is_sold=0\\\";\\n\\tif(!($name == \\\"\\\")){\\n\\t\\t$sql_query .= \\\" AND item_name=\\\\\\\"$name\\\\\\\"\\\";\\t\\t\\n\\t}\\n\\tif(!($price == \\\"\\\")){\\n\\t\\t$sql_query .= \\\" AND value=\\\\\\\"$price\\\\\\\"\\\";\\t\\t\\n\\t}\\n\\tif(!($cat == \\\"\\\")){\\n\\t\\t$sql_query .= \\\" AND category=\\\\\\\"$cat\\\\\\\"\\\";\\t\\t\\n\\t}\\n\\t$sql_query .=\\\" LIMIT 0, 20\\\";\\n\\t\\n\\t// Runs the generated query against the database. If the query fails to run, an ERROR will be returned, otherwise the result of the\\n\\t// query will be returned.\\n\\t$result = mysql_query($sql_query,$database);\\n\\tif(!$result){\\n\\t\\techo mysql_errno($database) . \\\": \\\" . mysql_error($database). \\\"\\\\n\\\";\\n\\t\\techo $sql_query;\\n\\t\\techo \\\"ERROR!\\\";\\n\\t\\treturn 0;\\n\\t}else{\\n\\t\\treturn $result;\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c04087c7fadc3fb16b4cc833745e2b50\",\n \"score\": \"0.6180792\",\n \"text\": \"function avalia_sql($item)\\n{\\n global $posicao;\\t\\n global $ordem;\\n global $db; \\n $in=desformatar($_REQUEST['in']); // variavel pra obter valor $res[item] de menus1.php\\n$tam_item=strlen($item);\\n\\n if($tam_item >1)\\n { \\n $new=$item{0};\\n\\t$sql=\\\"SELECT item from menu_item as a where a.item like'$new%' \\\";\\n\\t$db->query($sql);\\n $conta=$db->contalinhas();\\n //////////////////////////////////\\n if($conta >0)\\n\\t { \\n\\t $sql=\\\"SELECT item from menu_item as a where a.item='$item'\\\";\\n\\t\\t$db->query($sql);\\n $conta2=$db->contalinhas();\\n\\t\\t\\tif($conta2 >0)\\n\\t\\t\\t{\\n\\t\\t\\t if($in==$item){\\n\\t\\t\\t\\t return $item;\\n\\t\\t\\t\\t exit(); }\\n\\t\\t\\t if($in<>$item){\\n\\t\\t\\t echo\\\"\\\";\\n echo\\\"\\\";\\n exit();\\n\\t\\t\\t }\\n\\t\\t\\t }\\n elseif($conta2==0)\\n\\t\\t\\t\\t{\\n return $item;\\n\\t exit();\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t \\n\\t }\\n \\n\\t////////////////////////////\\n elseif($conta==0)\\n\\t{\\n echo\\\"\\\";\\n echo\\\"\\\";\\n exit();\\n\\t}\\n exit();\\n }\\n \\nelseif($tam_item==1)\\n{\\n $sql=\\\"SELECT item from menu_item as a where a.item='$item'\\\";\\n $db->query($sql);\\n $conta=$db->contalinhas();\\n if($conta>0)\\n\\t\\t {\\n echo\\\"\\\";\\n echo\\\"\\\";\\n exit(); \\n\\t\\t }\\n if($conta==0)\\n\\t\\t { \\n return $item;\\n\\t\\t}\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"25c3a44e67780948044926333ce20a65\",\n \"score\": \"0.60329336\",\n \"text\": \"public function checkitems(){\\n\\n\\t\\t $deviceId = $this->input->post('deviceId');\\n\\t\\t\\t\\t$userId=$this->input->post('userId');\\n\\t\\t\\t\\t$existitem=$this->Patient_model->check_items($deviceId,$userId);\\n\\t\\t\\t\\tif($existitem==1){\\n\\t\\t\\t\\t\\t$data['response']='true';\\n\\t\\t\\t\\t\\t$data['message']=$this->message()[3]->message;\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$this->response($data);\\n\\t\\t\\t\\t}else{\\n\\t\\t\\t\\t\\t$data['response']='false';\\n\\t\\t\\t\\t\\t$data['message']=$this->message()[4]->message;\\n\\t\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$this->response($data);\\n\\n\\t\\t\\t\\t}\\n\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f272b8bfce15084e12206bf9ac111a8\",\n \"score\": \"0.6029326\",\n \"text\": \"function checkvalue($selected, $table, $value) {\\n global $con;\\n\\n $stmt = $con->prepare(\\\"SELECT $selected FROM $table WHERE $selected = ?\\\");\\n $stmt->execute(array($value));\\n $count = $stmt->rowCount();\\n return $count;\\n \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7e250454082cbf8a79b5a501bd322a9\",\n \"score\": \"0.60136074\",\n \"text\": \"public function checkItem($id){\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64b30743c7479e726a17605473f38deb\",\n \"score\": \"0.59146297\",\n \"text\": \"public static function checkval($select, $from, $WHERE = NULL, $AND = NULL, $value1, $value2=NULL,$value3 = NULL){\\n\\n global $con;\\n\\n $statement = $con->Prepare(\\\"SELECT $select FROM $from $WHERE $AND \\\");\\n if ($value2 == NULL) {\\n $statement->execute(array($value1));\\n }elseif ($value3 == NULL) {\\n\\n $statement->execute(array($value1, $value2));\\n\\n }else {\\n\\n $statement->execute(array($value1, $value2,$value3));\\n\\n }\\n\\n $count = $statement->rowCount();\\n\\n return $count;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81688df6baf8b47b1cce16842b175a66\",\n \"score\": \"0.5860909\",\n \"text\": \"function check_item($user_id, $item_id) {\\n $this->db->select(\\\"*\\\");\\n $this->db->where('user_id', $user_id);\\n\\t\\t$this->db->where('item_id', $item_id);\\n return $this->db->get('user_per_item')->num_rows();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6bdb9baa6ed1daab6ae665dc6f8d15f8\",\n \"score\": \"0.583971\",\n \"text\": \"function pujado($cn, $id_item){\\n $sql = \\\"select id from pujas where id_item=$id_item\\\";\\n $rs= $cn->query($sql);\\n if($rs->num_rows==0){\\n return false;\\n }\\n return true;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46c2fc4c5f5bdbb1be5101add2f9c36d\",\n \"score\": \"0.5804893\",\n \"text\": \"function query_items($dbc,$system,$genres,$pricemin,$pricemax){\\n\\t$query = \\\"SELECT * from items WHERE \\\";\\n\\tif($system != \\\"any\\\"){\\n\\t\\t$query = $query.\\\"system = '\\\".$system.\\\"' AND \\\";\\n\\t}\\n\\tif(sizeof($genres)>0){\\n\\t\\t$size = sizeof($genres);\\n\\t\\t$query = $query.\\\"(\\\";\\n\\t\\tfor($i=0;$i<$size;$i++){\\n\\t\\t\\t$query = $query.\\\"genre = '\\\".$genres[$i].\\\"'\\\";\\n\\t\\t\\tif(($i+1)>=$size){\\n\\t\\t\\t\\t$query = $query.\\\") AND \\\";\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$query = $query.\\\" OR \\\";\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\t$query = $query.\\\"price>=\\\".$pricemin.\\\" AND price<=\\\".$pricemax.\\\" ORDER BY name\\\";\\n\\t$result = mysqli_query($dbc,$query);\\n\\treturn $result;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77b491421aa5a147ca77210b9c41cbf8\",\n \"score\": \"0.55647975\",\n \"text\": \"function ShowValue($tablename, $fieldid, $returnfield, $selected=\\\"\\\")\\r\\n{\\r\\n\\t$chkquery = \\\"select * from \\\". $tablename . \\\" where \\\" .$fieldid . \\\" = '\\\". $selected .\\\"'\\\" ;\\r\\n\\t$res = mysql_query($chkquery);\\r\\n\\t$result = mysql_fetch_array($res);\\r\\n\\t$str = \\\"\\\";\\r\\n\\t$str\\t= $result[ $returnfield];\\r\\n\\r\\n\\treturn $str;\\r\\n\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"94398a0a918d441b49259a00de6cc1eb\",\n \"score\": \"0.554003\",\n \"text\": \"function search_data($Value,$type){\\r\\n\\r\\n\\t//jika nilai $Value=*, maka program akan mengambil seluruh nilai field yg ada di tabel,jika tidak, isikan sesuai dengan field yg akan dicari dlm tabel, isikan $type dengan selectAll untuk memilih semua data atau isikan dengan notAll untuk memilih sesuai dengan identifier,\\r\\n\\t//if $value=*, program will take all value from the table, if not, fill the $Value with the field that will be taken from the table, fill $type with selectAll to select all data from table or notAll to select the data according to the $identifier\\r\\n\\t\\tif($type==\\\"selectAll\\\"){\\r\\n\\t\\t\\treturn mysqli_query($this->conn,\\\"select \\\".$Value.\\\" from \\\".$this->table);\\t\\r\\n\\t\\t}\\r\\n\\t\\telse if($type==\\\"notAll\\\"){\\r\\n\\t\\t\\t$value_e=explode(\\\"+#+\\\",$this->Value);\\r\\n\\t\\t\\treturn mysqli_query($this->conn,\\\"select \\\".$Value.\\\" from \\\".$this->table.\\\" where \\\".$this->identifier.\\\"='\\\".$value_e[0].\\\"'\\\");\\t\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbbbc89310e630bd9fb62f1a30418327\",\n \"score\": \"0.5518737\",\n \"text\": \"public function actionItemnamecheck()\\n {\\n if (Yii::$app->request->isAjax) {\\n $data = Yii::$app->request->post();\\n }\\n if ($data['item_id'] == 0) {\\n $itemname = Vendoritem::find()->select('item_name')\\n ->where(['item_name' => $data['item']])\\n ->andwhere(['trash' => 'Default'])\\n ->all();\\n } else {\\n $itemname = Vendoritem::find()->select('item_name')\\n ->where(['item_name' => $data['item']])\\n ->where(['item_id' => $data['item_id']])\\n ->andwhere(['trash' => 'Default'])\\n ->all();\\n if (count($itemname) > 0) {\\n return $result = 0;\\n die;\\n } else {\\n return $result = 1;\\n die;\\n }\\n }\\n return $result = count($itemname);\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34b19e5c36c902eed6bd1963b9d567d0\",\n \"score\": \"0.5502967\",\n \"text\": \"function itemExists($itemNo) {\\n global $db;\\n \\n $query = 'SELECT 1 FROM inventory \\n WHERE itemNo = :itemNo\\n LIMIT 1;';\\n \\n try {\\n $statement = $db->prepare($query);\\n $statement->bindValue(':itemNo', $itemNo);\\n $statement->execute();\\n $result = $statement->fetch();\\n $statement->closeCursor();\\n \\n return $result['1'] == 1 ? true : false;\\n } catch (PDOException $e) {\\n $error_message = $e->getMessage();\\n include('..\\\\..\\\\view\\\\errors\\\\error.php');\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a8da43e42caed864204360ec525bbfe\",\n \"score\": \"0.5497728\",\n \"text\": \"static public function mdlShowUsers($table, $item, $valor){\\n\\n $stmt = Connection::connect()->prepare(\\\"SELECT * FROM $table WHERE $item = :$item\\\");\\n $stmt->bindParam(\\\":\\\".$item, $valor, PDO::PARAM_STR);\\n\\n $stmt->execute();\\n return $stmt->fetch();\\n $stmt->close();\\n $stmt = null;\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"48ff28795c3e6cddaf5d4daef0b01482\",\n \"score\": \"0.54883933\",\n \"text\": \"public static function have_items( $category = array(), $place = '', $special = array() ) {\\r\\n\\r\\nglobal $db, $GET;\\r\\n\\r\\n $categories = \\\\site\\\\utils::validate_user_data( $category );\\r\\n\\r\\n $where = array();\\r\\n\\r\\n /*\\r\\n\\r\\n WHERE / ORDER BY\\r\\n\\r\\n */\\r\\n\\r\\n if( !empty( $categories['update'] ) ) {\\r\\n $date = array_map( 'trim', explode( ',', $categories['update'] ) );\\r\\n $where[] = 'c.lastupdate >= FROM_UNIXTIME(' . \\\\site\\\\utils::dbp( $date[0] ) . ')';\\r\\n if( isset( $date[1] ) ) {\\r\\n $where[] = 'c.lastupdate <= FROM_UNIXTIME(' . \\\\site\\\\utils::dbp( $date[1] ) . ')';\\r\\n }\\r\\n }\\r\\n\\r\\n if( !empty( $categories['date'] ) ) {\\r\\n $date = array_map( 'trim', explode( ',', $categories['date'] ) );\\r\\n $where[] = 'c.date >= FROM_UNIXTIME(' . \\\\site\\\\utils::dbp( $date[0] ) . ')';\\r\\n if( isset( $date[1] ) ) {\\r\\n $where[] = 'c.date <= FROM_UNIXTIME(' . \\\\site\\\\utils::dbp( $date[1] ) . ')';\\r\\n }\\r\\n }\\r\\n\\r\\n /*\\r\\n\\r\\n */\\r\\n\\r\\n switch( $place ) {\\r\\n\\r\\n case 'category':\\r\\n\\r\\n $stmt = $db->stmt_init();\\r\\n $stmt->prepare( \\\"SELECT istop,connect FROM \\\" . DB_TABLE_PREFIX . \\\"categories WHERE id = ?\\\" );\\r\\n $stmt->bind_param( \\\"i\\\", $GET['id'] );\\r\\n $stmt->execute();\\r\\n $stmt->bind_result( $istop,$connect );\\r\\n\\r\\n $ids[] = (int) $GET['id'];\\r\\n if( $stmt->fetch() ) {\\r\\n if($istop > 0){\\r\\n $connect_arr = explode(\\\"|\\\", $connect);\\r\\n foreach($connect_arr as $value){\\r\\n $v = intval($value);\\r\\n if($v > 0){\\r\\n $ids[] = $v;\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n $stmt->prepare(\\\"SELECT COUNT(*) FROM \\\" . DB_TABLE_PREFIX . \\\"coupons c LEFT JOIN \\\" . DB_TABLE_PREFIX . \\\"stores s ON (c.store = s.id) WHERE c.category IN(\\\" . implode( ',', $ids ) . \\\") AND c.visible > 0 AND s.visible > 0\\\");\\r\\n $stmt->execute();\\r\\n $stmt->bind_result( $count );\\r\\n $stmt->fetch();\\r\\n\\r\\n break;\\r\\n\\r\\n case 'search':\\r\\n\\r\\n $stmt = $db->stmt_init();\\r\\n $stmt->prepare(\\\"SELECT COUNT(*) FROM \\\" . DB_TABLE_PREFIX . \\\"coupons c LEFT JOIN \\\" . DB_TABLE_PREFIX . \\\"stores s ON (s.id = c.store) WHERE CONCAT(c.title, c.tags, s.name, s.tags) REGEXP ? AND c.visible > 0 AND s.visible > 0\\\");\\r\\n\\r\\n if( gettype( $GET['id'] ) === 'string' ) {\\r\\n $search = implode( '.*', explode( ' ', trim( $GET['id'] ) ) );\\r\\n } else {\\r\\n $search = '';\\r\\n }\\r\\n\\r\\n $stmt->bind_param( \\\"s\\\", $search );\\r\\n $stmt->execute();\\r\\n $stmt->bind_result( $count );\\r\\n $stmt->fetch();\\r\\n\\r\\n break;\\r\\n\\r\\n default:\\r\\n\\r\\n /*\\r\\n\\r\\n WHERE / ORDER BY\\r\\n\\r\\n */\\r\\n\\r\\n if( !empty( $categories['ids'] ) && $categories['ids'] != 'all' ) {\\r\\n $arr = array_filter( array_map( function( $w ){\\r\\n return (int) $w;\\r\\n }, explode( ',', $categories['ids'] ) ));\\r\\n if( !empty( $arr ) )\\r\\n $where[] = 'c.id IN(' . \\\\site\\\\utils::dbp( implode(',', $arr) ) . ')';\\r\\n }\\r\\n\\r\\n if( !empty( $categories['categories'] ) && $categories['categories'] != 'all' ) {\\r\\n $arr = array_filter( array_map( function( $w ){\\r\\n return (int) $w;\\r\\n }, explode( ',', $categories['categories'] ) ));\\r\\n if( !empty( $arr ) )\\r\\n $where[] = 'c.category IN(' . \\\\site\\\\utils::dbp ( implode(',', $arr) ) . ')';\\r\\n }\\r\\n\\r\\n if( !empty( $categories['store'] ) && $categories['store'] != 'all' ) {\\r\\n $arr = array_filter( array_map( function( $w ){\\r\\n return (int) $w;\\r\\n }, explode( ',', $categories['store'] ) ));\\r\\n if( !empty( $arr ) )\\r\\n $where[] = 'c.store IN(' . \\\\site\\\\utils::dbp( implode(',', $arr) ) . ')';\\r\\n }\\r\\n\\r\\n if( !empty( $categories['user'] ) ) {\\r\\n $where[] = 'c.user = \\\"' . (int) $categories['user'] . '\\\"';\\r\\n }\\r\\n\\r\\n if( !empty( $categories['search'] ) ) {\\r\\n $search = implode( '.*', explode( ' ', trim( $categories['search'] ) ) );\\r\\n $where[] = 'CONCAT(c.title, c.tags) REGEXP \\\"' . \\\\site\\\\utils::dbp( $search ) . '\\\"';\\r\\n }\\r\\n\\r\\n if( isset( $categories['show'] ) ) {\\r\\n $show = array_map( 'trim', explode( ',', strtolower( $categories['show'] ) ) );\\r\\n foreach( $show as $v ) {\\r\\n switch( $v ) {\\r\\n case 'all': break;\\r\\n case 'expired': $where[] = 'c.expiration <= NOW()'; break;\\r\\n case 'active': $where[] = 'c.expiration > NOW()'; break;\\r\\n case 'popular': $where[] = 'c.popular > 0'; break;\\r\\n case 'exclusive': $where[] = 'c.exclusive > 0'; break;\\r\\n case 'feed': $where[] = 'c.feedID > 0'; break;\\r\\n case 'visible': $where[] = 'c.visible > 0 AND s.visible > 0'; break;\\r\\n case 'notvisible': $where[] = 'c.visible = 0'; break;\\r\\n default: $where[] = 'c.visible > 0 AND s.visible > 0'; break;\\r\\n }\\r\\n }\\r\\n } else {\\r\\n $where[] = 'c.visible > 0 AND s.visible > 0';\\r\\n }\\r\\n\\r\\n /*\\r\\n\\r\\n */\\r\\n\\r\\n $stmt = $db->stmt_init();\\r\\n $stmt->prepare( \\\"SELECT COUNT(*) FROM \\\" . DB_TABLE_PREFIX . \\\"coupons c LEFT JOIN \\\" . DB_TABLE_PREFIX . \\\"stores s ON (s.id = c.store)\\\" . ( empty( $where ) ? '' : ' WHERE ' . implode( ' AND ', $where ) ) );\\r\\n $stmt->execute();\\r\\n $stmt->bind_result( $count );\\r\\n $stmt->fetch();\\r\\n\\r\\n break;\\r\\n\\r\\n }\\r\\n\\r\\n $stmt->close();\\r\\n\\r\\n if( isset( $special['only_count'] ) ) {\\r\\n return $count;\\r\\n }\\r\\n\\r\\n\\r\\n $pags = array();\\r\\n $pags['results'] = $count;\\r\\n $pags['per_page'] = ( !empty( $categories['per_page'] ) ? (int) $categories['per_page'] : \\\\query\\\\main::get_option( 'items_per_page' ) );\\r\\n $pags['pages'] = ceil( $pags['results'] / $pags['per_page'] );\\r\\n $page = ( !empty( $_GET['page'] ) ? (int) $_GET['page'] : 1 );\\r\\n if( $page < 1 ) $page = 1;\\r\\n if( $page > $pags['pages'] ) $page = $_GET['page'] = $pags['pages'];\\r\\n $pags['page'] = $page;\\r\\n if( $pags['pages'] > $pags['page'] ) $pags['next_page'] = \\\\site\\\\utils::update_uri( '', array( 'page' => ($pags['page']+1) ) );\\r\\n if( $pags['pages'] > 1 && $pags['page'] > 1 ) $pags['prev_page'] = \\\\site\\\\utils::update_uri( '', array( 'page' => ($pags['page']-1) ) );\\r\\n\\r\\n return $pags;\\r\\n\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab0e9728242989ed076ae6cbb461eb40\",\n \"score\": \"0.5483852\",\n \"text\": \"static public function mdlValidarCategoria($tabla, $item, $valor){\\n\\n\\t\\t$stmt = Conexion::conectar()->prepare(\\\"SELECT * FROM $tabla WHERE $item = :$item\\\");\\n\\n\\t\\t$stmt -> bindParam(\\\":\\\".$item, $valor, PDO::PARAM_STR);\\n\\n\\t\\t$stmt -> execute();\\n\\n\\t\\treturn $stmt -> fetchAll();\\n\\n\\t\\t$stmt -> close();\\n\\t\\t\\n\\t\\t$stmt = null;\\n\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"946a577426bc3a03905b66e908ac68e6\",\n \"score\": \"0.5478328\",\n \"text\": \"public function checkItemIfExistInMenu()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de71f12390c47ef37bd349d4a9f1ea0f\",\n \"score\": \"0.54683524\",\n \"text\": \"function callselect($value){\\r\\nif($value == 2)\\r\\n listobjmarca($value);\\r\\nelse if($value == 3) \\r\\n listcolores($value,2);\\r\\nelse if($value == 4) \\r\\n listobjequivalencia($value,1); \\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ca63f460739a938f915a1836bfeeba1\",\n \"score\": \"0.5457211\",\n \"text\": \"function showForm()\\n{\\n\\tglobal $config;\\n get_header(); #defaults to header_inc.php\\t\\n\\t\\n\\techo \\n\\t'\\n\\t\\n\\t

    Order great food here!

    \\n\\t

    Please select your items and submit your order

    \\n
    \\n
    \\n
    \\n\\t
    \\n ';\\n echo '\\n \\n \\n \\n \\n \\n ';\\n\\t\\tforeach($config->items as $item)\\n {\\n //echo \\\"

    ID:$item->ID Name:$item->Name

    \\\"; \\n //echo '

    Taco

    ';\\n echo '\\n \\n \\n \\n \\n \\n ';\\n //echo '

    ' . $item->Name . ' ID . '\\\" />

    ';\\n \\n } \\n echo '
    QuantityItemDescriptionPrice
    \\n ' . $item->Name . '' .$item->Description . '' . money_format('%n', $item->Price) . '
    ';\\n \\n echo '\\n\\t\\t\\t\\t

    \\n\\t\\t\\t\\t\\t(* required field)\\n\\t\\t\\t\\t

    \\n\\t\\t\\n\\t
    \\n\\t';\\n\\tget_footer(); #defaults to footer_inc.php\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ae462af251f67f4e579c83c2ef91f2e\",\n \"score\": \"0.54557794\",\n \"text\": \"public static function item_exists( $id = 0, $special = array() ) {\\r\\n\\r\\nglobal $db, $GET;\\r\\n\\r\\n$id = empty( $id ) ? $GET['id'] : $id;\\r\\n\\r\\n $where = array();\\r\\n\\r\\n if( isset( $special['user_view'] ) ) {\\r\\n $where[] = 'visible > 0';\\r\\n }\\r\\n\\r\\n $stmt = $db->stmt_init();\\r\\n $stmt->prepare(\\\"SELECT id FROM \\\" . DB_TABLE_PREFIX . \\\"coupons WHERE id = ?\\\" . ( empty( $where ) ? '' : ' AND ' . implode( ' AND ', $where ) ) );\\r\\n $stmt->bind_param( \\\"i\\\", $id );\\r\\n $stmt->execute();\\r\\n $stmt->bind_result( $count );\\r\\n $stmt->fetch();\\r\\n $stmt->close();\\r\\n\\r\\n if( $count > 0 ) {\\r\\n return true;\\r\\n }\\r\\n\\r\\n return false;\\r\\n\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"caa96c38f768dbca8f5d037282e3ebd5\",\n \"score\": \"0.5447897\",\n \"text\": \"function selectbox($c1, $c2, $current_cmds)\\n{\\n// c2 = script || alert\\n\\n\\tif($c2==\\\"alert\\\") {$label=\\\"Alerts\\\"; }\\n\\telse ($label=\\\"Scripts\\\"); \\t\\n\\t\\n\\t//result = sqlite3_open(\\\"/etc/rms100.db\\\", &db);\\n\\t$dbh = new PDO('sqlite:/etc/rms100.db');\\n\\tprintf(\\\"
    \\\";\\n\\techo\\\"\\\";\\n\\tprintf(\\\"\\\";\\n\\techo\\\"
    Available %s
    \\\");\\n\\tprintf(\\\"

    \\\\n\\\";\\n\\techo\\\"

    &nbsp;<-->&nbsp;


    \\\\n\\\";\\n\\techo\\\"
    Selected %s
    \\\";\\n\\n\\tprintf(\\\"

    \\\\n\\\";\\t\\n\\techo\\\"
    \\\";\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3e0327294ca6e2df49f4701692d3ff1e\",\n \"score\": \"0.5443798\",\n \"text\": \"function check_data_in_db($table_name,$data_id_field,$data_id_value,$user_id_field,$where_clause=\\\"\\\",$dump_query=0){\\r\\n\\t\\tif ($this->logged!=1) return 0;\\r\\n\\t\\t$my_query = \\\"SELECT \\\" . $data_id_field . \\\"\\r\\n\\t\\t\\t\\t\\t FROM \\\" . $table_name . \\\"\\r\\n\\t\\t\\t\\t\\t WHERE \\\" . $data_id_field . \\\"=\\\" . $data_id_value . \\\" AND \\\" . $user_id_field . \\\"=\\\" . intval($this->u_id) . \\\" \\\" . $where_clause;\\r\\n\\r\\n\\t\\t//neu dump_query = 1 thi in ra ma`n hinh\\r\\n\\t\\tif ($dump_query==1) echo $my_query;\\r\\n\\r\\n\\t\\t//kiem tra query\\r\\n\\t\\t$db_check = new db_query($my_query);\\r\\n\\t\\t//neu ton tai record do thi` tra ve gia tri 1, neu ko thi` tra ve gia tri 0\\r\\n\\t\\tif (mysqli_num_rows($db_check->result) > 0){\\r\\n\\t\\t\\tunset($db_check);\\r\\n\\t\\t\\treturn 1;\\r\\n\\t\\t}\\r\\n\\t\\telse{\\r\\n\\t\\t\\tunset($db_check);\\r\\n\\t\\t\\treturn 0;\\r\\n\\t\\t}\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"71490ef328820dd1d3ecc876365b1b2f\",\n \"score\": \"0.5430748\",\n \"text\": \"function select_quantity()\\r\\n{\\r\\n global $world_db, $characters_db, $realm_id, $user_name, $output, $action_permission, $user_lvl,\\r\\n $locales_search_option, $ultra_mult, $ultra_base, $uv_credits, $uv_money, $credits_fractional,\\r\\n $sql, $core;\\r\\n\\r\\n valid_login($action_permission[\\\"view\\\"]);\\r\\n\\r\\n if ( empty($_GET[\\\"myItem\\\"]) )\\r\\n redirect(\\\"ultra_vendor.php?error=1\\\");\\r\\n\\r\\n if ( $core == 1 )\\r\\n $iquery = \\\"SELECT * FROM items \\\"\\r\\n .( ( $locales_search_option != 0 ) ? \\\"LEFT JOIN items_localized ON (items_localized.entry=items.entry AND language_code='\\\".$locales_search_option.\\\"') \\\" : \\\" \\\" ).\\r\\n \\\"WHERE items.entry='\\\".$_GET[\\\"myItem\\\"].\\\"'\\\";\\r\\n else\\r\\n $iquery = \\\"SELECT *,\\r\\n name AS name1, Quality AS quality, SellPrice AS sellprice, BuyPrice AS buyprice\\r\\n FROM item_template \\\"\\r\\n .( ( $locales_search_option != 0 ) ? \\\"LEFT JOIN locales_item ON locales_item.entry=item_template.entry \\\" : \\\" \\\" ).\\r\\n \\\"WHERE item_template.entry='\\\".$_GET[\\\"myItem\\\"].\\\"'\\\";\\r\\n $iresult = $sql[\\\"world\\\"]->query($iquery);\\r\\n $item = $sql[\\\"world\\\"]->fetch_assoc($iresult);\\r\\n\\r\\n // Localization\\r\\n if ( $locales_search_option != 0 )\\r\\n {\\r\\n if ( $core == 1 )\\r\\n $item[\\\"name1\\\"] = $item[\\\"name\\\"];\\r\\n else\\r\\n $item[\\\"name1\\\"] = $item[\\\"name_loc\\\".$locales_search_option];\\r\\n }\\r\\n else\\r\\n $item[\\\"name1\\\"] = $item[\\\"name1\\\"];\\r\\n\\r\\n if ( $core == 1 )\\r\\n $cquery = \\\"SELECT guid, level, gold FROM characters WHERE name='\\\".$_GET[\\\"charname\\\"].\\\"'\\\";\\r\\n else\\r\\n $cquery = \\\"SELECT guid, level, money AS gold FROM characters WHERE name='\\\".$_GET[\\\"charname\\\"].\\\"'\\\";\\r\\n $cresult = $sql[\\\"char\\\"]->query($cquery);\\r\\n $char = $sql[\\\"char\\\"]->fetch_assoc($cresult);\\r\\n\\r\\n $chargold = $char[\\\"gold\\\"];\\r\\n $chargold = str_pad($chargold, 4, \\\"0\\\", STR_PAD_LEFT);\\r\\n $pg = substr($chargold, 0, -4);\\r\\n if ( $pg == '' )\\r\\n $pg = 0;\\r\\n $ps = substr($chargold, -4, 2);\\r\\n if ( ( $ps == '' ) || ( $ps == '00' ) )\\r\\n $ps = 0;\\r\\n $pc = substr($chargold, -2);\\r\\n if ( ( $pc == '' ) || ( $pc == '00' ) )\\r\\n $pc = 0;\\r\\n\\r\\n $mul = $ultra_mult[$item[\\\"quality\\\"]];\\r\\n $qual = quality($item[\\\"quality\\\"]);\\r\\n\\r\\n if ( $item[\\\"sellprice\\\"] <> 0 )\\r\\n $base_price = $item[\\\"sellprice\\\"];\\r\\n else\\r\\n {\\r\\n if ( $item[\\\"buyprice\\\"] == 0 )\\r\\n $base_price = $ultra_base;\\r\\n else\\r\\n $base_price = $item[\\\"buyprice\\\"];\\r\\n }\\r\\n\\r\\n $output .= '\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n '.lang(\\\"ultra\\\", \\\"selectquantity\\\").'';\\r\\n\\r\\n $gold = $mul * $base_price;\\r\\n $gold = str_pad($gold, 4, \\\"0\\\", STR_PAD_LEFT);\\r\\n $cg = substr($gold, 0, -4);\\r\\n if ( $cg == '' )\\r\\n $cg = 0;\\r\\n $cs = substr($gold, -4, 2);\\r\\n if ( ( $cs == '' ) || ( $cs == '00' ) )\\r\\n $cs = 0;\\r\\n $cc = substr($gold, -2);\\r\\n if ( ( $cc == '' ) || ( $cc == '00' ) )\\r\\n $cc = 0;\\r\\n $gold = $mul * $base_price;\\r\\n\\r\\n $base_gold = $base_price;\\r\\n $base_gold = str_pad($base_gold, 4, \\\"0\\\", STR_PAD_LEFT);\\r\\n $bg = substr($base_gold, 0, -4);\\r\\n if ( $bg == '' )\\r\\n $bg = 0;\\r\\n $bs = substr($base_gold, -4, 2);\\r\\n if ( ( $bs == '' ) || ( $bs == '00' ) )\\r\\n $bs = 0;\\r\\n $bc = substr($base_gold, -2);\\r\\n if ( ( $bc == '' ) || ( $bc == '00' ) )\\r\\n $bc = 0;\\r\\n\\r\\n // Localization\\r\\n $isranked = lang(\\\"ultra\\\", \\\"isranked\\\");\\r\\n $isranked = str_replace(\\\"%1\\\", ''.$item[\\\"name1\\\"].'', $isranked);\\r\\n $isranked = str_replace(\\\"%2\\\", '\\\"'.$qual.'\\\"', $isranked);\\r\\n\\r\\n $output .= $isranked;\\r\\n $output .= '\\r\\n
    ';\\r\\n\\r\\n // Localization\\r\\n $willcost = lang(\\\"ultra\\\", \\\"willcost\\\");\\r\\n $willcost = str_replace(\\\"%1\\\", ''.$mul.'', $willcost);\\r\\n $cost_display = $bg.'\\\"\\\"'\\r\\n .$bs.'\\\"\\\"'\\r\\n .$bc.'\\\"\\\"';\\r\\n $willcost = str_replace(\\\"%2\\\", $cost_display, $willcost);\\r\\n\\r\\n $output .= $willcost;\\r\\n $output .= '\\r\\n
    ';\\r\\n\\r\\n // Localization\\r\\n $orcost = lang(\\\"ultra\\\", \\\"or\\\");\\r\\n $or_display = $cg.'\\\"\\\"'\\r\\n .$cs.'\\\"\\\"'\\r\\n .$cc.'\\\"\\\"';\\r\\n $orcost = str_replace(\\\"%1\\\", $or_display, $orcost);\\r\\n\\r\\n $output .= $orcost;\\r\\n $output .= '\\r\\n
    \\r\\n
    ';\\r\\n\\r\\n // Localization\\r\\n $charhas = lang(\\\"ultra\\\", \\\"has\\\");\\r\\n $charhas = str_replace(\\\"%1\\\", ''.$_GET[\\\"charname\\\"].'', $charhas);\\r\\n $money_display = $pg.'\\\"\\\"'\\r\\n .$ps.'\\\"\\\"'\\r\\n .$pc.'\\\"\\\"';\\r\\n $charhas = str_replace(\\\"%2\\\", $money_display, $charhas);\\r\\n\\r\\n $output .= $charhas;\\r\\n $output .= '\\r\\n
    \\r\\n
    ';\\r\\n\\r\\n // credits\\r\\n if ( $uv_money > 0 )\\r\\n {\\r\\n // get our credit balance\\r\\n $query = \\\"SELECT Credits FROM config_accounts WHERE Login='\\\".$user_name.\\\"'\\\";\\r\\n $result = $sql[\\\"mgr\\\"]->query($query);\\r\\n $result = $sql[\\\"mgr\\\"]->fetch_assoc($result);\\r\\n $credits = $result[\\\"Credits\\\"];\\r\\n\\r\\n if ( $credits < 0 )\\r\\n {\\r\\n // unlimited credits\\r\\n $output .= lang(\\\"global\\\", \\\"credits_unlimited\\\");\\r\\n $output .= '\\r\\n
    \\r\\n
    ';\\r\\n }\\r\\n elseif ( $credits >= 0 )\\r\\n {\\r\\n $credit_cost = $uv_credits * ($gold / $uv_money);\\r\\n\\r\\n // if Allow Fractional Credits is disabled then cost must be a whole number\\r\\n $credit_cost = ( ( !$credits_fractional ) ? ceil($credit_cost) : $credit_cost );\\r\\n\\r\\n $credits_per_item = lang(\\\"ultra\\\", \\\"credits_peritem\\\");\\r\\n $credits_per_item = str_replace(\\\"%1\\\", ''.$credit_cost.'', $credits_per_item);\\r\\n $credits_per_item = str_replace(\\\"%2\\\", ''.$item[\\\"name1\\\"].'', $credits_per_item);\\r\\n\\r\\n $output .= $credits_per_item;\\r\\n $output .= '\\r\\n
    \\r\\n
    ';\\r\\n\\r\\n $credits_avail = lang(\\\"ultra\\\", \\\"credits_avail\\\");\\r\\n $credits_avail = str_replace(\\\"%1\\\", ''.(float)$credits.'', $credits_avail);\\r\\n\\r\\n $output .= $credits_avail;\\r\\n $output .= '\\r\\n
    \\r\\n
    ';\\r\\n }\\r\\n }\\r\\n\\r\\n $output .= '\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n \\r\\n \\r\\n \\r\\n '\\r\\n .lang(\\\"ultra\\\", \\\"wanted\\\").':\\r\\n \\r\\n
    \\r\\n
    \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
    ';\\r\\n makebutton(lang(\\\"ultra\\\", \\\"submit\\\"), \\\"javascript:do_submit()\\\\\\\" type=\\\\\\\"def\\\",180);\\r\\n $output .= '\\r\\n ';\\r\\n makebutton(lang(\\\"global\\\", \\\"back\\\"), \\\"javascript:window.history.back()\\\\\\\" type=\\\\\\\"def\\\",130);\\r\\n $output .= '\\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    \\r\\n
    ';\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f1be3195806d684eae5f86f3f8cf0a87\",\n \"score\": \"0.54198307\",\n \"text\": \"function selComb($nome, $val, $sql) {\\r\\n //Executa a consulta\\r\\n include \\\"connection.php\\\"; // Conecta ao banco de dados\\r\\n $res = sqlexec($id, $sql);\\r\\n //Exibe as linhas encontradas na consulta\\r\\n echo \\\"\\\";\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64a0583cd2edffb4436f5b3fa3850fa9\",\n \"score\": \"0.5419794\",\n \"text\": \"function show_items($key,$table){\\n\\t\\n\\t$sql = \\\"SELECT * FROM inspection_form_$table WHERE key=$key AND (status=1 OR status=0) ORDER BY id\\\";\\n\\n\\t//echo $sql;\\n\\t\\n\\tif(($res = pg_query($sql)) == false)\\n\\t\\tdie(\\\"nepodarilo sa zobrziť výsledky\\\");\\n\\t\\t\\n\\t$html = '';\\n\\t\\n\\twhile($pole = pg_fetch_row($res)){\\n\\t\\tif($pole[7]==\\\"t\\\"){\\n\\t\\t\\t$checked_func = 'checked=\\\"checked\\\"';\\n\\t\\t\\t$checked_func_val = '&nbsp;funguje';\\n\\t\\t}\\n\\t\\telse{\\n\\t\\t\\t$checked_func = \\\"\\\";\\n\\t\\t\\t$checked_func_val = '&nbsp;nefunguje';\\n\\t\\t}\\n\\t\\tif($pole[8]==\\\"t\\\"){\\n\\t\\t\\t$checked_poloha = 'checked=\\\"checked\\\"';\\n\\t\\t\\t$checked_poloha_val = '&nbsp;vyhovuje';\\n\\t\\t}\\n\\t\\telse{\\n\\t\\t\\t$checked_poloha = \\\"\\\";\\n\\t\\t\\t$checked_poloha_val = '&nbsp;nevyhovuje';\\n\\t\\t}\\n\\t\\tif($pole[6]==\\\"t\\\"){\\n\\t\\t\\t$checked_zaloha = 'checked=\\\"checked\\\"';\\n\\t\\t\\t$checked_zaloha_val = '&nbsp;zálohovaná';\\n\\t\\t}\\n\\t\\telse{\\n\\t\\t\\t$checked_zaloha = '\\\"\\\"';\\n\\t\\t\\t$checked_zaloha_val = '&nbsp;nezálohovaná';\\n\\t\\t}\\n\\t\\t\\n\\t\\tif($table == \\\"snimace\\\")\\t\\n\\t\\t\\t$html .= '\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t';\\n\\t\\tif($table == \\\"sireny\\\")\\n\\t\\t\\t$html .= '\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t';\\n\\t}\\n\\t$html .= '
    \\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\t &nbsp;\\n\\t\\t\\t\\t\\t\\t \\n\\t\\t\\t\\t\\t\\t &nbsp;\\n\\t\\t\\t\\t\\t\\t &nbsp;\\n\\t\\t\\t\\t\\t\\t &nbsp;\\n\\t\\t\\t\\t\\t\\t \\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t
    '.$checked_func_val.'
    \\n\\t\\t\\t\\t\\t
    '.$checked_poloha_val.'
    \\n\\t\\t\\t\\t \\t
    &nbsp;
    \\n\\t\\t\\t\\t \\t
    \\n\\t\\t\\t\\t
    \\n\\t\\t\\t
    \\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t\\t &nbsp;\\n\\t\\t\\t\\t\\t\\t &nbsp;\\n\\t\\t\\t\\t\\t\\t &nbsp;\\n\\t\\t\\t\\t\\t\\t &nbsp;\\n\\t\\t\\t\\t\\t\\t \\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t\\t
    '.$checked_zaloha_val.'
    \\n\\t\\t\\t\\t\\t
    '.$checked_func_val.'
    \\n\\t\\t\\t\\t\\t
    &nbsp;
    \\n\\t\\t\\t\\t\\t
    \\n\\t\\t\\t\\t
    ';\\n\\t\\n\\treturn $html;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"996b44f8d6f382b7777fde64b4bff393\",\n \"score\": \"0.5397022\",\n \"text\": \"function getTableList_skype($value='',$id='',$_table='',$_label=''){\\n global $_LIST;\\n \\n\\n\\n $sql=\\\"Select * from $_table where status=2 or id=$value\\\";\\n\\n \\n \\n $result=mysql_query($sql);\\n $return=\\\"\\\";\\n return $return;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef206d0b35849ecf520ac8ac48c97ea3\",\n \"score\": \"0.5389437\",\n \"text\": \"function list_users($name, $selected_id='', $required=false, $all=false, $text_all='-', $where='', $params=''){\\r\\n $db_obj = new database();\\r\\n \\r\\n\\t$table = TB_PREF.\\\"users\\\";\\r\\n $query = $db_obj->display_table_all_column($table, $where, false, false, 0, 0, 'nama');\\r\\n\\techo \\\"\\\";\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a740462e28f9c6dcba49ca9d5be1bca4\",\n \"score\": \"0.53869104\",\n \"text\": \"function getitems($where, $catID)\\n{\\n global $conn;\\n\\n $getitems = $conn->prepare(\\\"SELECT * FROM items Where $where = ? \\\");\\n $getitems->execute(array($catID));\\n $items = $getitems->fetchAll();\\n\\n return $items;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fe117fd3954ae705ae3707b1d8ff1866\",\n \"score\": \"0.5376847\",\n \"text\": \"function get_mu_item_details($upc) {\\r\\n if ((!$upc) || ($upc=='')) {\\r\\n return false;\\r\\n }\\r\\n $conn = db_connect();\\r\\n $query = \\\"select * from mu_items where upc='\\\".$conn->real_escape_string($upc).\\\"'\\\";\\r\\n $result = @$conn->query($query);\\r\\n if (!$result) {\\r\\n return false;\\r\\n }\\r\\n $result = @$result->fetch_assoc();\\r\\n return $result;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19b5e2e375462c4e70ebca9cf67aca4f\",\n \"score\": \"0.53626233\",\n \"text\": \"function checked_akses($id_user_level,$id_menu){\\n $ci = get_instance();\\n $ci->db->where('user_level',$id_user_level);\\n $ci->db->where('menu_id',$id_menu);\\n $data = $ci->db->get('tbl_userlevel');\\n if($data->num_rows()>0){\\n return \\\"checked='checked'\\\";\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4f6c818856c2e44c5a0bf272a62612ae\",\n \"score\": \"0.53561425\",\n \"text\": \"function checked_akses($id_user_level, $id_menu)\\n{\\n $ci = get_instance();\\n $ci->db->where('id_user_level', $id_user_level);\\n $ci->db->where('id_menu', $id_menu);\\n $data = $ci->db->get('tbl_hak_akses');\\n if ($data->num_rows() > 0) {\\n return \\\"checked='checked'\\\";\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4ec5dabd0fcd106c11dfc80e0b41658\",\n \"score\": \"0.53526443\",\n \"text\": \"function check_item_data()\\n{\\n\\t//if (!check_num('amount', 0))\\n\\t//{\\n\\t//\\tdisplay_error( _(\\\"The amount entered is not a valid number or is less than zero.\\\"));\\n\\t//\\tset_focus('amount');\\n\\t//\\treturn false;\\n\\t//}\\n\\n\\tif ($_POST['code_id'] == $_POST['bank_account'])\\n\\t{\\n\\t\\tdisplay_error( _(\\\"The source and destination accouts cannot be the same.\\\"));\\n\\t\\tset_focus('code_id');\\n\\t\\treturn false;\\n\\t}\\n\\n\\t//if (is_bank_account($_POST['code_id']))\\n\\t//{\\n\\t//\\tif ($_SESSION['pay_items']->trans_type == ST_BANKPAYMENT)\\n\\t//\\t\\tdisplay_error( _(\\\"You cannot make a payment to a bank account. Please use the transfer funds facility for this.\\\"));\\n\\t//\\telse\\n \\t//\\t\\tdisplay_error( _(\\\"You cannot make a deposit from a bank account. Please use the transfer funds facility for this.\\\"));\\n\\t//\\tset_focus('code_id');\\n\\t//\\treturn false;\\n\\t//}\\n\\tdisplay_error( _(\\\"Good data.\\\"));\\n\\n \\treturn true;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"85ace34b5b3bf4cfd620d4016d5a889d\",\n \"score\": \"0.53468\",\n \"text\": \"function selComb($nome,$val,$sql){\\r\\n\\t//Executa a consulta\\r\\n\\t$res = sqlexec($id,$sql);\\r\\n\\t//Exibe as linhas encontradas na consulta\\r\\n\\techo \\\"\\\";\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ed533877418adf486e3e9e71bf156434\",\n \"score\": \"0.53463006\",\n \"text\": \"function get_mu_items($catid) {\\r\\n if ((!$catid) || ($catid == '')) {\\r\\n return false;\\r\\n }\\r\\n $conn = db_connect();\\r\\n $query = \\\"select * from mu_items where catid = '\\\".$conn->real_escape_string($catid).\\\"'\\\";\\r\\n $result = @$conn->query($query);\\r\\n if (!$result) {\\r\\n return false;\\r\\n }\\r\\n $num_books = @$result->num_rows;\\r\\n if ($num_books == 0) {\\r\\n return false;\\r\\n }\\r\\n $result = db_result_to_array($result);\\r\\n return $result;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"623a8c1d30b2ff6b8d9480e2ad8fd8f1\",\n \"score\": \"0.5339574\",\n \"text\": \"function itemExists($itemName)\\n {\\n $sql = \\\"SELECT `itemName` FROM `items` WHERE `itemName` = :itemName\\\";\\n\\n //prepare the statement\\n $preparedStatement = $this->db->prepare($sql);\\n\\n //bind the values\\n $preparedStatement->bindParam(':itemName', $itemName, PDO::PARAM_STR);\\n\\n //run the query\\n $preparedStatement->execute();\\n\\n //check the result\\n if($preparedStatement->fetch()) { //if item has been found (fetch returns false if no results and an array if there are results)\\n $this->result = true;\\n } else { //false was returned, the item does not exist\\n $this->result = false;\\n }\\n return $this->result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b5579b700d99924c0da3c14f337e5bce\",\n \"score\": \"0.53382945\",\n \"text\": \"function getDataList_transaction_new($value='',$id='',$_type='',$_user=''){\\n global $_LIST;\\n if(!empty($_type) && $_type==4){\\n $sql=\\\"Select * from campus_students where (std_status=1 or std_status=2)\\\";\\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\\n $sql.=\\\" and agent_id=$_user\\\";\\n }\\n }else{\\n $sql=\\\"Select * from capmus_users where user_type=$_type and status=1\\\";\\n \\n \\n }\\n $result=mysql_query($sql);\\n $return=\\\"\\\";\\n return $return;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"160573963d34ceaec4e37819e496ecc9\",\n \"score\": \"0.5338284\",\n \"text\": \"function checkStatus($field,$table, $where,$value)\\n{\\n global $connection;\\n $stmt = $connection ->prepare(\\\"SELECT\\n $field\\n FROM\\n $table\\n Where\\n $where =?\\n \\\");\\n $stmt ->execute(array($value));\\n $status = $stmt ->fetch();\\n return $status[$field];\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b958af1bd14afdb4294f2791654bf145\",\n \"score\": \"0.53355134\",\n \"text\": \"function _search_all_db($str)\\n{\\n $servername = \\\"localhost\\\";\\n $username = \\\"aman\\\";\\n $password = \\\"password\\\";\\n $database = \\\"test\\\";\\n $reply=\\\"\\\";\\n $conn = new mysqli($servername, $username, $password, $database);\\n if(!$conn->connect_error) { //connection succeeded\\n $sql = \\\"SELECT Repository.UserID AS UserID, /*UserID will be used to retrieve userinfo*/\\n TempTable.ItemID AS ItemID,\\n\\t\\t\\t\\t\\tTempTable.ItemName AS ItemName,\\n\\t\\t\\t\\t\\tTempTable.Aliases AS Aliases,\\n\\t\\t\\t\\t\\tTempTable.Category AS Category,\\n\\t\\t\\t\\t\\tTempTable.Description AS DefaultDescription,\\n\\t\\t\\t\\t\\tTempTable.ImageURI AS ImageURI,\\n\\t\\t\\t\\t\\tRepository.RepID AS RepID,\\n\\t\\t\\t\\t\\tRepository.Quantity AS Quantity,\\n\\t\\t\\t\\t\\tRepository.Units AS Units,\\n\\t\\t\\t\\t\\tRepository.UnitPrice AS UnitPrice,\\n\\t\\t\\t\\t\\tRepository.State AS State,\\n\\t\\t\\t\\t\\tRepository.DateAdded AS DateAdded,\\n\\t\\t\\t\\t\\tRepository.Description AS Description,\\n\\t\\t\\t\\t\\tRepository.Deliverable AS Deliverable,\\n\\t\\t\\t\\t\\tRepository.DeliverableAreas AS DeliverableAreas\\n\\t\\t\\t\\t\\t FROM (SELECT * FROM Items \\n\\t\\t\\t\\t\\t WHERE ItemName LIKE '%\\\".$str.\\\"%' OR Aliases LIKE '%\\\".$str.\\\"%')\\n\\t\\t\\t\\t\\t AS TempTable JOIN Repository ON TempTable.ItemID = Repository.ItemID\\n\\t\\t\\t\\t\\t \\\"\\n\\t\\t\\t\\t\\t ;\\n $result = $conn->query($sql);\\n if($result!=false) { //Query executed successfully\\n if($result->num_rows>0) { //At least one record was found\\n echo \\\"0\\\";\\n while($row=$result->fetch_assoc()) { //Fetch row by row\\n global $UserID;\\n $UserID = $row['UserID'];\\n $ItemID = $row['ItemID'];\\n $ItemName = $row['ItemName'];\\n $Aliases = setdefault($row['Aliases'], \\\"None\\\");\\n $Category = $row['Category'];\\n $DefaultDescription = setdefault($row['DefaultDescription'], \\\"None\\\");\\n $ImageURI =\\tsetdefault($row['ImageURI'], \\\"None\\\");\\n $RepID = $row['RepID'];\\n $Quantity = $row['Quantity'];\\n $Units = $row['Units'];\\n $UnitPrice = $row['UnitPrice'];\\n $State = setdefault($row['State'], \\\"None\\\");\\n $DateAdded = $row['DateAdded'];\\n $Description = setdefault($row['Description'], \\\"None\\\");\\n $Deliverable = $row['Deliverable'];\\n $DeliverableAreas = $row['DeliverableAreas'];\\n $reply.=\\\"\\\";\\n $reply.=\\\"\\\".$UserID.\\\"\\\";\\n $reply.=\\\"\\\".$ItemID.\\\"\\\";\\n $reply.=\\\"\\\".$ItemName.\\\"\\\";\\n $reply.=\\\"\\\".$Aliases.\\\"\\\";\\n $reply.=\\\"\\\".$Category.\\\"\\\";\\n $reply.=\\\"\\\".$DefaultDescription.\\\"\\\";\\n $reply.=\\\"\\\".$ImageURI.\\\"\\\";\\n $reply.=\\\"\\\".$RepID.\\\"\\\";\\n $reply.=\\\"\\\".$Quantity.\\\"\\\";\\n $reply.=\\\"\\\".$Units.\\\"\\\";\\n $reply.=\\\"\\\".$UnitPrice.\\\"\\\";\\n $reply.=\\\"\\\".$State.\\\"\\\";\\n $reply.=\\\"\\\".$DateAdded.\\\"\\\";\\n $reply.=\\\"\\\".$Description.\\\"\\\";\\n $reply.=\\\"\\\".$Deliverable.\\\"\\\";\\n $reply.=\\\"\\\".$DeliverableAreas.\\\"\\\";\\n $reply.=\\\"\\\";\\n }\\n //Close the xml\\n $reply.=\\\"\\\";\\n //Return the xml\\n echo $reply;\\n\\n\\n } else { //No results were found\\n echo \\\"1\\\";\\n }\\n } else { //There was a problem with the query\\n echo \\\"2\\\";\\n }\\n $conn->close(); //Close the connection\\n } else { //connection failed\\n echo \\\"3\\\";\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e1a4d059820041eb75fc3c5461ae1ffe\",\n \"score\": \"0.532925\",\n \"text\": \"function countItem($item, $table, $status = null, $value = null) {\\n global $con;\\n \\n if ($status != null && $value != null){\\n $query = \\\"WHERE $status = $value\\\";\\n } else { \\n $query = \\\"\\\";\\n }\\n \\n\\n $stmt2 = $con->prepare(\\\"SELECT COUNT($item) FROM $table $query\\\");\\n $stmt2->execute();\\n $count = $stmt2->fetchColumn();\\n echo $count;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d74cd66a877dcbac6d45112e1ab7e18e\",\n \"score\": \"0.5308957\",\n \"text\": \"public function item_fetch(){\\n\\n\\t\\t\\t$items = $this->master_model->custom_query(\\\"SELECT c.description AS c_desc, c.code, i.cat_id, i.common_name, i.description AS i_desc, i.brand, i.size_type, i.price, i.item_id, i.is_sold FROM items i LEFT JOIN categories c ON c.cat_id = i.cat_id WHERE i.is_deleted = 0 ORDER BY i.cat_id ASC\\\");\\n\\n\\n\\t\\t\\tif($items != FALSE)\\n\\t\\t\\t{\\n\\t\\t\\t\\techo json_encode(array(\\n\\t\\t\\t\\t\\t\\t'success' => $items->result()\\n\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\techo json_encode(array(\\n\\t\\t\\t\\t\\t\\t'error' => 'No items found!'\\n\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t);\\n\\t\\t\\t}\\n\\t\\t\\t\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9d7ad0d8f68c3799b0027aad2562ddba\",\n \"score\": \"0.5290532\",\n \"text\": \"function getItem($item)\\n{\\n $item = filter_var($item, FILTER_SANITIZE_SPECIAL_CHARS);\\n\\t\\n //remove whitespace characters before search\\n $item = trim($item);\\n \\n\\tglobal $dbc;\\n\\t$item = \\\"%\\\" . $item . \\\"%\\\";\\n\\t\\n $query = \\\"SELECT prod_id, prod_name, prod_weight, prod_price, prod_description, prod_image, cat_name\\n FROM ICS199db.tblProducts\\n JOIN ICS199db.tblCategory\\n ON tblCategory_cat_id = cat_id \\n\\t\\t\\t\\tWHERE upper(prod_name) LIKE upper(:item) OR upper(cat_name) LIKE upper(:item);\\\";\\n $statement = $dbc->prepare($query);\\n\\t$statement->bindValue(':item', $item);\\n $statement->execute();\\n $products = $statement->fetchAll();\\n $statement->closeCursor();\\n return $products;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05d5b3b7aba939b1d283ed1312eba460\",\n \"score\": \"0.5290504\",\n \"text\": \"function search_item($item_name)\\n\\t\\t{\\n\\t\\t\\t$selectQ = \\\"SELECT * FROM \\\".INVENTORY_TABLE.\\\" WHERE name = '$item_name'\\\";\\n\\t\\t\\t$selectResult = $this->conn->query($selectQ);\\n\\n\\t\\t\\tif ($selectResult->num_rows == 0){return null;}\\n\\n\\t\\t\\t$search_results = array();\\n\\t\\t\\twhile($table_row = $selectResult->fetch_assoc())\\n\\t\\t\\t{\\n\\t\\t\\t\\tarray_push($search_results, $table_row);\\n\\t\\t\\t}\\n\\t\\t\\treturn $search_results;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cd31b235131e72bced4544241582fd62\",\n \"score\": \"0.5289049\",\n \"text\": \"function record_exists_select($table, $select='') {\\n\\n global $CFG;\\n\\n if ($select) {\\n $select = 'WHERE '.$select;\\n }\\n\\n return record_exists_sql('SELECT * FROM '. $CFG->prefix . $table . ' ' . $select);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73d74b78e07cbf0a9c0123cc91d79924\",\n \"score\": \"0.5286422\",\n \"text\": \"function item_held($member_id, $item_name)\\n{\\n // Is the item held by the user\\n $r = $GLOBALS['SITE_DB']->query_select_value_if_there('w_inventory', 'item_count', array('item_owner' => $member_id, 'item_name' => $item_name));\\n return !is_null($r);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dab22def700f265aaa6b9bf5727792f8\",\n \"score\": \"0.52856696\",\n \"text\": \"function getdbfields($returntype=\\\"\\\", $itemsperrow)\\n {\\n global $selectfield;\\n global $search;\\n global $order;\\n $q=new Cdb;\\n $a=$q->metadata(\\\"members\\\", false);\\n $a[]=array('table' => 'members', 'name' => 'affiliate_name', 'type' => 'int', 'len' => '10', 'flags' => 'not_null primary_key auto_increment');\\n $j=0;\\n $k=0;\\n foreach ($a as $b)\\n {\\n\\n $i=0;\\n foreach ($b as $c)\\n {\\n if ($i==1) \\n {\\n if ($returntype==\\\"check\\\")\\n {\\n if ($k%$itemsperrow==0) \\n {\\n $return.=\\\"\\n \\\";\\n $j=$k;\\n }\\n $k++;\\n $return.=''.$c.'\\n ';\\n $m=0;\\n if ($k%$itemsperrow==0 && $k!=$j)\\n {\\n $return.=\\\"\\n \\\"; $m=1;\\n }\\n }\\n if ($returntype==\\\"select\\\")\\n {\\n $m=3;\\n $return.='';\\n }\\n if ($returntype==\\\"select_x\\\")\\n {\\n $return.='';\\n }\\n if ($returntype==\\\"select_s\\\")\\n {\\n $m=3;\\n $return.='';\\n }\\n break;\\n }\\n else $i++;\\n }\\n\\n }\\n if ($m==0) $return.='';\\n return $return;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"069bcd0e95c4f5ffd489f3a3be305e81\",\n \"score\": \"0.5285205\",\n \"text\": \"function save_name($item) {\\n\\n $result = \\\\Drupal::database()->select('myusers', 'm')\\n ->fields('m', array('id', 'name'))\\n ->condition('m.name', $item)\\n ->countQuery()\\n ->execute()\\n ->fetchField(); \\n\\n if($result===0){\\n $database = \\\\Drupal::service('database');\\n $database->insert('myusers')\\n ->fields([\\n 'name' => $item\\n ])\\n ->execute();\\n return true;\\n }else{\\n return false;\\n }\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27338e1a33bea03da137e5f79f69ba50\",\n \"score\": \"0.5274581\",\n \"text\": \"function select($conexion,$valoresSeleccion,$tabla,$where = ['']){\\n $consulta=\\\"SELECT \\\";\\n for ($i=0; $i < count($valoresSeleccion); $i++) { \\n if($i < count($valoresSeleccion)-1){\\n $consulta=$consulta.$valoresSeleccion[$i].' ,';\\n } else {\\n $consulta=$consulta.$valoresSeleccion[$i].' ';\\n }\\n }\\n $consulta=$consulta.'FROM ';\\n for ($i=0; $i < count($tabla); $i++) { \\n \\n if($i < count($tabla)-1){\\n $consulta=$consulta.$tabla[$i].' ,';\\n } else {\\n $consulta=$consulta.$tabla[$i].' ';\\n }\\n }\\n if ($where[0]!=''){\\n $consulta=$consulta.' WHERE ';\\n for ($i=0; $i < count($where); $i++) { \\n if($i < count($where)-1){\\n $consulta=$consulta.$where[$i].' AND ';\\n } else {\\n $consulta=$consulta.$where[$i].' ';\\n }\\n }\\n }\\n $resultado = $conexion->query($consulta);\\n return $resultado;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ed89c507ae20b8b0272d6827acbc2f5\",\n \"score\": \"0.52655804\",\n \"text\": \"function showoptionlists2($fieldname,$tablename,$returnvaluefield,$showfield , $whereclause){\\n global $dbprefix,$$fieldname;\\n $sql=\\\"select $returnvaluefield,$showfield from \\\".$dbprefix.\\\"$tablename \\\";\\n if($whereclause <> '' ) $sql = $sql .\\\" where \\\" . $whereclause;\\n $result=mysql_query($sql);\\n echo \\\"\\\";\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"92af404d863153dab73fda12cda59954\",\n \"score\": \"0.52460337\",\n \"text\": \"public function test_input_field_select()\\n\\t{\\n\\t\\t$id = '';\\n\\t\\t$seloptions = array();\\n\\t\\t$selected_value = '';\\n\\t\\t$parameters = array($id, $seloptions, $selected_value);\\n $msg = self::invokeMethod('LiteSpeed_Cache_Admin_Display','input_field_select', $parameters);\\n\\t\\t$bool = self::isString($msg);\\n \\t$this->assertTrue($bool);\\t\\t\\n \\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e8bc7067417c1c2cce75e8ec4fe7e45d\",\n \"score\": \"0.5234986\",\n \"text\": \"function getDataList_reference($value='',$id='',$_type='',$_user=''){\\n global $_LIST;\\n if(!empty($_type) && $_type==4){\\n $sql=\\\"Select * from campus_students where (std_status=1 or std_status=2)\\\";\\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\\n $sql.=\\\" and agent_id=$_user\\\";\\n }\\n }else{\\n $sql=\\\"Select * from capmus_users where status=1\\\";\\n \\n \\n }\\n $result=mysql_query($sql);\\n $return=\\\"\\\";\\n return $return;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4478e40638564909c117454bdd5f559\",\n \"score\": \"0.5234897\",\n \"text\": \"public function search_items($item) {\\n $this->db->select(\\\"item_id as value, concat(item_number,' / ',item_name) as label\\\",FALSE);\\n $this->db->from('v_itemsearch');\\n $this->db->like('upper(concat(item_name,item_number)) ', strtoupper($item));\\n $this->db->order_by('item_number');\\n $result=$this->db->get()->result_array();\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bda07529006910fbf4eea5dd95d5f2db\",\n \"score\": \"0.52305186\",\n \"text\": \"function select_itmlist(){\\n\\t\\t$username = $this->session->userdata('username');\\n\\t\\t$query = $this->db->query(\\\"select * from mod_itm_list\\\");\\n\\t\\treturn $query;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76749257c03b1f715f5057b146dd08f5\",\n \"score\": \"0.5222353\",\n \"text\": \"function items_info($item_id=null) {\\n\\treturn query('select * from item');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"969fe9dc537c01ddb373256dc13fb892\",\n \"score\": \"0.52190423\",\n \"text\": \"public function CheckItem($fieldName,$fieldValue)\\n {\\n $this->copen();\\n $stmt = $this->DBH->prepare(\\\"SELECT * FROM users WHERE $fieldName=:itemValue\\\");\\n $stmt->execute(['itemValue' => $fieldValue]);\\n $result = $stmt->fetch();\\n $this->cclose();\\n return $result[\\\"$fieldName\\\"];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"15fa4335c891e8576e29e793533c340b\",\n \"score\": \"0.5207522\",\n \"text\": \"abstract public static function getItemsSelectStatement() : string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a9cde33e000c50a73c8376e20bf9432\",\n \"score\": \"0.5200764\",\n \"text\": \"function DB_select ($SQL, &$vystup, &$pocet_zaznamu)\\n{\\t//echo \\\"

    SQL = \\\".$SQL.\\\"

    \\\";\\n\\t$funguje = false;\\n\\tif (!(DB_spojeni(c_Databaze, $chyba, $spojeni))):\\n\\t\\techo \\\"

    Do�lo k chyb� p�i spojen� s datab�z�.\\n\\t\\t\\t($chyba)


    \\\\n\\\";\\n\\t\\treturn false;\\n\\tendif;\\n\\t$vysledek = MySQL_Query($SQL);\\n\\tif (!$vysledek):\\n\\t\\techo \\\"

    Do�lo k chyb� p�i zpracov�n� dotazu v\\n\\t\\t\\t\\tdatab�zi.


    \\\\n\\\";\\n\\telse:\\n \\t$funguje = true;\\n\\t\\t$vystup = $vysledek;\\n $pocet_zaznamu = MySQL_num_rows($vystup);\\n endif;\\n\\tDB_odpojeni($spojeni);\\n\\treturn $funguje;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ca7faaefa4217baf6bc0a9a67377443\",\n \"score\": \"0.520033\",\n \"text\": \"function check_value_unique($options, $table) {\\n\\tif( !empty( $options['unique'] ) ) {\\n\\n\\t\\tforeach( $options['unique'] as $key=>$value ) {\\n\\n\\t\\t\\t$sql = \\\"SELECT * FROM `\\\" . $table . \\\"` WHERE \\\";\\n\\t\\t\\t\\n\\t\\t\\t$sql .= \\\"`\\\" . $key . \\\"`='\\\" . $value['value'] . \\\"'\\\";\\n\\n\\t\\t\\tif( $res = query($sql) ) {\\n\\t\\t\\t\\tif( mysql_num_rows($res) > 0 ) {\\n\\n\\t\\t\\t\\t\\t//There was a match, so error out.\\n\\t\\t\\t\\t\\terrorBox($value['message']);\\n\\t\\t\\t\\t\\treturn FALSE;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}else{\\n\\t\\t\\t\\treturn FALSE;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t//If we've gotten here, they all checked out.\\n\\t\\treturn TRUE;\\n\\t}else{ \\n\\t\\treturn FALSE;\\n\\t}\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9b6f9759c57373277a937a2c79bce83\",\n \"score\": \"0.51990783\",\n \"text\": \"function populate_user_select() {\\nglobal $db;\\n// get list of available users\\n$modify_query = \\\"SELECT users_id, name FROM admin_users\\\";\\n$sth = $db->prepare($modify_query);\\n$res = $db->execute($sth,$category);\\n\\nwhile ($row = $res->fetchRow()) {\\n$page_content .= '' . \\\"\\\\n\\\";\\n}\\n\\nreturn $page_content;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"65adf218734f1af02dcc077c7a7428e2\",\n \"score\": \"0.5199023\",\n \"text\": \"function ItemInfoFetch($start = null, $limit = null){\\r\\n$searchq \\t= getRequest('searchq');\\r\\n$page \\t= getRequest('page');\\r\\n$sub_item_category_id \\t= getRequest('sub_item_category_id');\\r\\nif($searchq){\\r\\n\\t$sql=\\\"SELECT\\r\\n\\titem_id,\\r\\n\\ti.sub_item_category_id,\\r\\n\\tsub_item_category_name,\\r\\n\\titem_size,\\r\\n\\tdescription,\\r\\n\\ti.main_item_category_id,\\r\\n\\tmain_item_category_name,\\r\\n\\tcost_price,\\r\\n\\tsales_price,\\r\\n\\twhole_sales_price,\\r\\n\\ti.branch_id,\\r\\n\\tbranch_name,\\r\\n\\tquantity,\\r\\n\\treceive_date,\\r\\n\\ti.createdby,\\r\\n\\ti.createddate\\r\\nFROM\\r\\n\\t\\\".INV_ITEMINFO_TBL.\\\" i inner join \\\".INV_CATEGORY_SUB_TBL.\\\" c on c.sub_item_category_id=i.sub_item_category_id\\r\\n\\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\\r\\n\\tinner join branch b on b.branch_id=i.branch_id\\r\\n\\twhere branch_name LIKE '%\\\".$searchq.\\\"%' or main_item_category_name LIKE '%\\\".$searchq.\\\"%' or sub_item_category_name LIKE '%\\\".$searchq.\\\"%' order by receive_date desc LIMIT 0, 5\\\"; \\r\\n\\t}if($page){\\r\\n\\t\\t$sql=\\\"SELECT\\r\\n\\titem_id,\\r\\n\\ti.sub_item_category_id,\\r\\n\\tsub_item_category_name,\\r\\n\\titem_size,\\r\\n\\tdescription,\\r\\n\\ti.main_item_category_id,\\r\\n\\tmain_item_category_name,\\r\\n\\tcost_price,\\r\\n\\tsales_price,\\r\\n\\twhole_sales_price,\\r\\n\\ti.branch_id,\\r\\n\\tbranch_name,\\r\\n\\tquantity,\\r\\n\\treceive_date,\\r\\n\\ti.createdby,\\r\\n\\ti.createddate\\r\\nFROM\\r\\n\\t\\\".INV_ITEMINFO_TBL.\\\" i inner join \\\".INV_CATEGORY_SUB_TBL.\\\" c on c.sub_item_category_id=i.sub_item_category_id\\r\\n\\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\\r\\n\\tinner join branch b on b.branch_id=i.branch_id\\r\\n\\torder by receive_date desc LIMIT $start, $limit\\\"; \\r\\n\\t}if($sub_item_category_id){\\r\\n\\t\\t$sql=\\\"SELECT\\r\\n\\titem_id,\\r\\n\\ti.sub_item_category_id,\\r\\n\\tsub_item_category_name,\\r\\n\\titem_size,\\r\\n\\tdescription,\\r\\n\\ti.main_item_category_id,\\r\\n\\tmain_item_category_name,\\r\\n\\tcost_price,\\r\\n\\tsales_price,\\r\\n\\twhole_sales_price,\\r\\n\\ti.branch_id,\\r\\n\\tbranch_name,\\r\\n\\tquantity,\\r\\n\\treceive_date,\\r\\n\\ti.createdby,\\r\\n\\ti.createddate\\r\\nFROM\\r\\n\\t\\\".INV_ITEMINFO_TBL.\\\" i inner join \\\".INV_CATEGORY_SUB_TBL.\\\" c on c.sub_item_category_id=i.sub_item_category_id\\r\\n\\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\\r\\n\\tinner join branch b on b.branch_id=i.branch_id \\r\\n\\twhere sub_item_category_id=$sub_item_category_id order by receive_date desc\\\"; \\r\\n\\t}\\r\\nif(!$page && !$searchq && !$sub_item_category_id){\\r\\n\\t$sql=\\\"SELECT\\r\\n\\titem_id,\\r\\n\\ti.sub_item_category_id,\\r\\n\\tsub_item_category_name,\\r\\n\\titem_size,\\r\\n\\tdescription,\\r\\n\\ti.main_item_category_id,\\r\\n\\tmain_item_category_name,\\r\\n\\tcost_price,\\r\\n\\tsales_price,\\r\\n\\twhole_sales_price,\\r\\n\\ti.branch_id,\\r\\n\\tbranch_name,\\r\\n\\tquantity,\\r\\n\\treceive_date,\\r\\n\\ti.createdby,\\r\\n\\ti.createddate\\r\\nFROM\\r\\n\\t\\\".INV_ITEMINFO_TBL.\\\" i inner join \\\".INV_CATEGORY_SUB_TBL.\\\" c on c.sub_item_category_id=i.sub_item_category_id\\r\\n\\tinner join inv_item_category_main m on m.main_item_category_id=c.main_item_category_id\\r\\n\\tinner join branch b on b.branch_id=i.branch_id \\r\\n\\torder by receive_date desc LIMIT 0, 29\\\"; \\r\\n\\t\\t}\\r\\n\\t\\t//echo $sql;\\r\\n\\t\\t$res= mysql_query($sql);\\r\\n\\t $type = '

    \\r\\n\\t \\r\\n\\t\\t\\t\\t\\r\\n\\t \\r\\n\\t \\r\\n\\t \\r\\n\\t\\t\\t\\t \\r\\n\\t\\t\\t\\t \\r\\n\\t\\t\\t\\t \\r\\n\\t\\t\\t\\t \\r\\n\\t\\t\\t\\t \\r\\n\\t\\t\\t\\t \\r\\n\\t\\t\\t\\t \\r\\n\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\r\\n\\t ';\\r\\n\\t\\t$rowcolor=0;$i=1;\\r\\n\\t\\twhile($row = mysql_fetch_array($res)){\\r\\n \\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t if($rowcolor==0){ \\r\\n\\t\\t\\t\\t$style = \\\"oddClassStyle\\\";$rowcolor=1;\\r\\n\\t\\t\\t }else{\\r\\n\\t\\t\\t\\t$style = \\\"evenClassStyle\\\";$rowcolor=0;\\r\\n\\t\\t\\t }\\r\\n\\t\\t\\t \\r\\n\\t\\t\\t \\r\\n\\t\\t\\t \\r\\n\\t\\t\\t$type .='\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t';\\r\\n\\t\\t\\t\\r\\n\\t\\t\\t$i++;\\r\\n\\t\\t}\\r\\n\\t\\t$type .= '
    SLBrand NameItem NameQuantityCostSales(retail)Sales(whole)SizeDateCreated ByBranch
    '.$i.'&nbsp;'.$row['main_item_category_name'].'&nbsp;'.$row['sub_item_category_name'].'&nbsp;'.$row['quantity'].'&nbsp;'.$row['cost_price'].'&nbsp;'.$row['sales_price'].'&nbsp;'.$row['whole_sales_price'].'&nbsp;'.$row['item_size'].'&nbsp;'._date($row['receive_date']).'&nbsp;'.$row['createdby'].'&nbsp;'.$row['branch_name'].'&nbsp;\\r\\n\\t\\t\\t
    ';\\r\\n\\t\\treturn $type;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d2d6fed790638f78004bfee6679c754e\",\n \"score\": \"0.5187584\",\n \"text\": \"function getTableList_ext($value='',$id='',$_table='',$_label=''){\\n global $_LIST;\\n \\n $skid=showStudents($value,'extId');\\n if(!empty($skid)){\\n\\t$sql=\\\"Select * from $_table where status=2 or id=$skid\\\";\\n }else{\\n $sql=\\\"Select * from $_table where status=2\\\";\\n }\\n \\n \\n $result=mysql_query($sql);\\n $return=\\\"\\\";\\n return $return;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"89ba8cfefc2f73b62babdce2e4e58009\",\n \"score\": \"0.51858157\",\n \"text\": \"function check_resource_item($rid, $t, $m, $l) {\\n global $con;\\n $sql = \\\"SELECT id FROM resourceItem WHERE deleted_at IS NULL AND resource_id='$rid' AND title='$t' AND mime='$m' AND link='$l' LIMIT 1\\\";\\n if (($temp = mysql_query($sql, $con))) {\\n if (mysql_num_rows($temp) > 0) {\\n return true;\\n } else {\\n return false;\\n }\\n } else {\\n die_error(-2, json_encode(mysql_error()));\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d58372c83795d0fa5da708dd571cfd7a\",\n \"score\": \"0.51836336\",\n \"text\": \"public function scan_item($barcode)\\n {\\n $sql = \\\"SELECT a.itemlink,a.packsize,a.itemcode,a.description,b.barcode \\n FROM backend.itemmaster a INNER JOIN backend.itembarcode b ON a.itemcode=b.itemcode \\n WHERE b.barcode='$barcode'\\\";\\n $query = $this->db->query($sql);\\n //echo $this->db->last_query();die;\\n return $query;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de73a1ca19405c1c2c5d7a42ff67b8e4\",\n \"score\": \"0.5173374\",\n \"text\": \"function checkStatus($table,$column,$status){\\r\\nglobal $connection;\\r\\n\\r\\n$query = \\\"SELECT * FROM $table WHERE $column = '$status'\\\";\\r\\n\\r\\n$result = mysqli_query($connection,$query);\\r\\n\\r\\nconfirmQuery($result);\\r\\n\\r\\n return mysqli_num_rows($result);\\r\\n\\r\\n\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82663d529b4838538da70bbddac417f0\",\n \"score\": \"0.5166895\",\n \"text\": \"function validate_dropdowntable($id, $value)\\n{ \\n\\n\\t//echo \\\"\\\";\\n\\tglobal $db;\\n\\n\\t$select = $db->select();\\n\\n\\t\\n\\t//The following updates the column 'value' with the changed dropdown option's value \\n\\t$columns['value']\\t= $value;\\n\\t$db->update(\\\"station_variables\\\",$columns,'\\\"svid\\\"=\\\\''.$id.'\\\\'');\\n\\n\\t$result = $db->fetchAll('select sid from station_variables where \\\"svid\\\"=\\\\''.$id.'\\\\'');\\n\\t//$result[0]['sid'] == sid\\n\\tworkflow_input($result[0]['sid']);\\n\\t\\n\\treturn $value; \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0cd8671c8b5a92ba7be392876f4fdaa4\",\n \"score\": \"0.5164167\",\n \"text\": \"public function qty($a){\\n $sql = \\\"SELECT qty FROM products WHERE product_id='$a'\\\";\\n //execute the query and return boolean\\n return $this->db_query($sql);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9707bded6ee16237292f271ec1d9159f\",\n \"score\": \"0.5161214\",\n \"text\": \"static public function mdlMostrarCategorias($tabla,$item,$valor){\\n if($item!= null){\\n \\n $stmt=Conexion::conectar()->prepare(\\\"SELECT * FROM $tabla where $item = '$valor'\\\");\\n $stmt->bindParam(\\\":\\\".$item, $valor,PDO::PARAM_STR); /*el metodo bindParam sirve para enlazar parametros */\\n $stmt->execute();\\n /*if(isset($stmt) && !empty($stmt)){\\n return $stmt->errorInfo();\\n \\n }else{*/\\n return $stmt->fetch();\\n \\n \\n }else{\\n $stmt=Conexion::conectar()->prepare(\\\"SELECT * FROM $tabla\\\");\\n $stmt->execute();\\n return $stmt->fetchAll();\\n }\\n\\n $stmt->close();\\n $stmt=null;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"490cd950cd6d67ad4f29a8241f5e61bf\",\n \"score\": \"0.51592916\",\n \"text\": \"function check_if_you_want_this_thing_exist_in_database_or_not($colum,$table,$value){\\r\\n global $con;\\r\\n $select = $con ->prepare(\\\"SELECT $colum FROM $table WHERE $colum = ?\\\");\\r\\n $select ->execute(array($value));\\r\\n $result =$select ->rowCount();\\r\\n return $result;\\r\\n\\r\\n \\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8f6caba9292e14f49385564cfc44470d\",\n \"score\": \"0.5154782\",\n \"text\": \"function SelectTableOnTwoConditions($TableName,$ConditionColumn1,$ConditionValue1,$ConditionColumn2,$ConditionValue2)\\r\\n{\\r\\n \\r\\n //connecting to database\\r\\n $Connection=ConnetToDatabaseFuntion();\\r\\n\\r\\n $my_county_select=$my_county_select=\\\"SELECT * FROM `$TableName` WHERE `$ConditionColumn1`='\\\".mysqli_real_escape_string($Connection,$ConditionValue1).\\\"' AND `$ConditionColumn2`='\\\".mysqli_real_escape_string($Connection,$ConditionValue2).\\\"' \\\";\\r\\n\\t\\r\\n \\r\\n\\t\\t$do_my_county_select=mysqli_query($Connection,$my_county_select);\\r\\n \\r\\n if($do_my_county_select)\\r\\n {\\r\\n $selected_manage_data=mysqli_fetch_all($do_my_county_select,MYSQLI_ASSOC);\\r\\n \\r\\n $Connection->close();\\r\\n mysqli_free_result($do_my_county_select);\\r\\n return $selected_manage_data;\\r\\n }\\r\\n else \\r\\n {\\r\\n die(\\\"could not select on two conditions table--\\\".$my_county_select);\\r\\n }\\r\\n\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6c29068f80d71de27b881f09fd30d2a7\",\n \"score\": \"0.51494884\",\n \"text\": \"public function itemID_AutoComplete($id=\\\"\\\"){\\n return (Items::find_by_sql(\\\"SELECT * FROM items WHERE item_name LIKE '%\\\".$_POST['input'].\\\"%'\\\"));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc8280498f19c58de4710c75958ba7d7\",\n \"score\": \"0.51163733\",\n \"text\": \"function find_specified($specified, $table, $column, $item)\\n{\\n try\\n {\\n $connection = open_connection();\\n $statement = $connection->prepare(\\\"SELECT $specified FROM $table WHERE $column = :item\\\");\\n if($statement->execute(array('item' => $item)))\\n {\\n //echo \\\"Successfully looked for $specified
    \\\";\\n $temp = $statement->fetchAll();\\n //print_r($temp);\\n if(!isset($temp[0][0]))\\n {\\n return(-1);\\n }\\n else\\n {\\n return ($temp[0][0]);\\n }\\n }\\n }\\n catch(PDOException $e)\\n {\\n print(\\\"Failed to look for $specified: \\\" . $e->getMessage() . \\\"
    \\\");\\n $statement->debugDumpParams();\\n die();\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e26a11a41aaa401dd7cc7b27dac0080b\",\n \"score\": \"0.5114054\",\n \"text\": \"function optionSelected($value , $comboBox){\\n if (isset($_POST) && $_POST[$comboBox]==$value || isset($_GET) && $_GET[$comboBox]==$value) {\\n echo \\\" selected\\\";\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f3612c7e9d88fad85ec4037ddfa606e6\",\n \"score\": \"0.5100969\",\n \"text\": \"function Selallscnd($data1,$data2,$data3)\\r\\n{\\r\\n global $db_table_prefix;\\r\\n $Ckhstt = \\\"SELECT * FROM \\\".$db_table_prefix.$data1.\\\" WHERE $data2=$data3\\\";\\r\\n $exQry = mysql_query($Ckhstt)or die(doLogDb(mysql_error().__LINE__).\\\"$Ckhstt
    failed @ line \\\".__LINE__);\\r\\n return $exQry;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbf0be89ee58a3003ed820351e4cbc8a\",\n \"score\": \"0.50984263\",\n \"text\": \"function insert_record($dbc, $id, $desc, $create, $update, $room, $owner, $finder, $item_status) {\\r\\n $query = 'INSERT INTO stuff(location_id, description, create_date, update_date, room, owner, finder, item_status) VALUES (\\\"' . $id . '\\\" ,\\\"' . $desc . '\\\" , \\\"' . $create . '\\\",\\\"' . $update . '\\\",\\\"' . $room . '\\\",\\\"' . $owner . '\\\",\\\"' . $finder . '\\\",\\\"' . $item_status . '\\\")' ;\\r\\n show_query($query);\\r\\n\\t$results = mysqli_query($dbc,$query) ;\\r\\n\\tif(!valid_description($desc))\\r\\n\\t echo '

    Please give a description.

    ';\\r\\n\\telse if (!valid_date($create))\\r\\n\\t echo '

    Please give a valid date.

    '; \\r\\n\\telse if (!valid_status($item_status))\\r\\n\\t echo '

    Please complete the item status.

    ';\\r\\n\\telse\\r\\n\\t\\tcheck_results($results) ;\\r\\n return $results ;\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"544eec506c2a73fece5dcbf005e83cb4\",\n \"score\": \"0.5095081\",\n \"text\": \"function mysql_select($table) {\\r\\r\\n $noerror = true;\\r\\r\\n if (($noerror = $this->mysql_qry($table, 1))) {\\r\\r\\n }\\r\\r\\n return $noerror;\\r\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3216d7da072f67dc02f1a0c05a50fc06\",\n \"score\": \"0.50919384\",\n \"text\": \"function claim_found_item($status) {\\r\\n global $dbc, $debug;\\r\\n\\t\\r\\n if($status === 'Claimed'){\\r\\n\\t\\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_email']))))\\r\\n\\t\\t\\t$owner_email = $_POST['owner_email'];\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\r\\n\\t\\tif(trim(is_numeric(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_phone'])))))\\r\\n\\t\\t\\t$owner_phone = $_POST['owner_phone'];\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['owner_full_name']))))\\r\\n\\t\\t\\t$owner_full_name = $_POST['owner_full_name'];\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($status))))\\r\\n\\t\\t\\t$status1 = $status;\\r\\n\\t\\telse\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\tif(is_numeric($_POST['id']))\\r\\n\\t\\t\\t$id = $_POST['id'];\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n $query = 'UPDATE stuff SET update_date=NOW()' . ', claimed_date=NOW()' . ', owner_email=\\\"' . $owner_email . '\\\", owner_phone=\\\"' . $owner_phone . '\\\", owner=\\\"' . $owner_full_name . '\\\", status=\\\"' . $status1 . '\\\" WHERE id=' . $id;\\r\\n }\\r\\n\\t\\r\\n else if($status === 'Found') {\\r\\n $title_query = 'SELECT title FROM stuff WHERE id=' . $_POST['id'];\\r\\n $title_results = mysqli_query($dbc, $title_query);\\r\\n check_results($title_results);\\r\\n $row = mysqli_fetch_array($title_results);\\r\\n $title = $row['title'];\\r\\n\\t\\t\\r\\n\\t\\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_email']))))\\r\\n\\t\\t\\t$finder_email = $_POST['finder_email'];\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\r\\n\\t\\tif(trim(is_numeric(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_phone'])))))\\r\\n\\t\\t\\t$finder_phone = $_POST['finder_phone'];\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($_POST['finder_full_name']))))\\r\\n\\t\\t\\t$finder_full_name = $_POST['finder_full_name'];\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tif(trim(mysqli_real_escape_string($dbc, htmlspecialchars($status))))\\r\\n\\t\\t\\t$status1 = $status;\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n\\t\\tif(is_numeric($_POST['id']))\\r\\n\\t\\t\\t$id = $_POST['id'];\\r\\n\\t\\telse {\\r\\n\\t\\t\\techo '';\\r\\n\\t\\t\\treturn false;\\r\\n\\t\\t}\\r\\n \\r\\n # update item as found only if it has not been reported found already\\r\\n if(!is_numeric(strpos($title, 'REPORTED FOUND:')))\\r\\n $query = 'UPDATE stuff SET title=\\\"REPORTED FOUND: ' . $title . '\\\", update_date=NOW()' . ', found_date=NOW()'. ', finder_email=\\\"' . $finder_email . '\\\", finder_phone=\\\"' . $finder_phone . '\\\", finder=\\\"' . $finder_full_name . '\\\", status=\\\"' . $status1 . '\\\" WHERE id=' . $id;\\r\\n }\\r\\n else\\r\\n return false;\\r\\n if(!empty($query)) {\\r\\n $results = mysqli_query($dbc, $query);\\r\\n check_results($results);\\r\\n \\r\\n if($status === 'Found')\\r\\n echo '';\\r\\n \\r\\n else if($status === 'Claimed')\\r\\n echo ''; \\r\\n }\\r\\n\\t\\r\\n if($debug)\\r\\n echo '';\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db6e01721fdfd6cd2a4a5991e538d97f\",\n \"score\": \"0.5090051\",\n \"text\": \"function MakeSelectFieldWithItems($edit,$data,$items,$datas,$namer,$item,$rdata=\\\"\\\",$titler=\\\"\\\",$empty=\\\"\\\")\\n {\\n if ($edit==0)\\n {\\n return $this->MakeSelectShowField($data,$datas,$namer,$item,$titler,$empty);\\n }\\n\\n $values=array();\\n $names=array();\\n $titles=array();\\n\\n $value=0;\\n if(!empty($item[ $data ]))\\n {\\n $value=$item[ $data ];\\n }\\n else { $empty=\\\"\\\"; }\\n\\n $values=array(0);\\n $names=array($empty);\\n if (!empty($titler)) { $titles=array(\\\"\\\"); }\\n\\n\\n $title=\\\"\\\";\\n foreach ($items as $ritem)\\n {\\n if (!empty($ritem[ \\\"__Disabled__\\\" ]))\\n {\\n array_push($values,\\\"disabled\\\");\\n }\\n else\\n {\\n array_push($values,$ritem[ \\\"ID\\\" ]);\\n }\\n\\n $this->ApplySqlObjectDataNames($ritem,$datas);\\n\\n array_push($names,$this->Filter($namer,$ritem));\\n if (!empty($titler))\\n {\\n array_push($titles,$this->Filter($titler,$ritem));\\n if ($ritem[ \\\"ID\\\" ]==$value) { $title=$this->Filter($titler,$ritem); }\\n }\\n elseif ($ritem[ \\\"ID\\\" ]==$value)\\n {\\n $title=$this->Filter($namer,$ritem);\\n }\\n }\\n\\n \\n\\n if (empty($rdata)) { $rdata=$data; }\\n\\n return $this->MakeSelectField\\n (\\n $rdata,\\n $values,\\n $names,\\n $value,\\n array(),\\n $titles,\\n $title\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"de17a6a463288dec90910d975de2b52a\",\n \"score\": \"0.50886464\",\n \"text\": \"public function selectItems($content){\\n foreach($this->_items as $name => $item){\\n if (is_array($content)){\\n if (in_array($item->getItemValue(), $content))\\n $item->selected(true);\\n } else {\\n if ($item->getItemValue() == $content)\\n $item->selected(true); \\n }\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f22503674d3b367420a9f556d92dd10\",\n \"score\": \"0.5086063\",\n \"text\": \"function fetch_items($category=0)\\n{\\n\\t\\t$sql = \\\"SELECT stock_id, stock.description AS name,\\n\\t\\t\\t\\tstock.category_id,\\n\\t\\t\\t\\tunits,material_cost,\\n\\t\\t\\t\\tcat.description\\n\\t\\t\\tFROM \\\".TB_PREF.\\\"stock_master stock LEFT JOIN \\\".TB_PREF.\\\"stock_category cat ON stock.category_id=cat.category_id\\n\\t\\t\\t\\tWHERE mb_flag <> 'D'\\\";\\n\\t\\tif ($category != 0)\\n\\t\\t\\t$sql .= \\\" AND cat.category_id = \\\".db_escape($category);\\n\\t\\t$sql .= \\\" ORDER BY stock.category_id, stock_id\\\";\\n\\n return db_query($sql,\\\"No transactions were returned\\\");\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9d8ba30399b9a77f92573105758947e\",\n \"score\": \"0.5082954\",\n \"text\": \"function getDataList_active_deactive_teachers($value='',$id='',$_type='',$_user=''){\\n global $_LIST;\\n if(!empty($_type) && $_type==4){\\n $sql=\\\"Select * from campus_students where (std_status=1 or std_status=2)\\\";\\n if(!empty($_user) && ($_SESSION['userType']==3 || $_SESSION['userType']==5)){\\n $sql.=\\\" and agent_id=$_user\\\";\\n }\\n }else{\\n $sql=\\\"Select * from capmus_users where user_type=$_type\\\";\\n \\n \\n }\\n $result=mysql_query($sql);\\n $return=\\\"\\\";\\n return $return;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e8ae6b2fc5d10488bb4cda8d72c0502\",\n \"score\": \"0.5082712\",\n \"text\": \"public function selectAllMineItems($customerId, $selected);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81501b5b46b0d0969bfbf3550a40be20\",\n \"score\": \"0.5081719\",\n \"text\": \"function errorCheck($table, $id) {\\r\\n\\t$result = mysql_query(\\\"select * from $table where id = $id\\\");\\r\\n\\tif (!$result) return \\\"Query failed: \\\" . mysql_error();\\r\\n \\r\\n $ses_replacement = mysql_real_escape_string(trim($_SESSION['gwasreplacement']));\\r\\n if (!(isset($ses_replacement)) || ($ses_replacement == '') || $ses_replacement == \\\"%\\\") {\\r\\n return \\\"No replacement selected.\\\";\\r\\n }\\r\\n \\r\\n\\t$item = mysql_fetch_array($result);\\r\\n\\t$id_visit = $item['id_visit'];\\r\\n\\t$id_subject = $item['id_subject'];\\r\\n\\t$date_visit = $item['date_visit'];\\r\\n\\r\\n\\r\\n \\r\\n\\t//wrong item type\\r\\n\\tif ($item['type'] != \\\"tube\\\") return \\\"wrong item type\\\";\\r\\n\\t//wrong study\\r\\n\\tif ($item['id_study'] != \\\"CRIC\\\") return \\\"wrong study\\\";\\r\\n\\t//wrong sample type\\r\\n\\tif ($item['sample_type'] != \\\"BUFFY\\\") return \\\"wrong sample type\\\";\\r\\n\\t//pid exists check\\r\\n\\t$gwasresult = mysql_query(\\\"select * from gwas_specimens where pid = $id_subject\\\");\\r\\n\\tif (!$gwasresult) return \\\"Query failed: \\\" . mysql_error();\\r\\n\\tif (mysql_affected_rows() == 0) return \\\"PID not on list\\\";\\r\\n \\r\\n //any tube for this patent already scanned\\r\\n $gwasresult = mysql_query(\\\"select * from gwas_specimens where pid = $id_subject and barcode != '' and replacement = $ses_replacement\\\");\\r\\n if (!$gwasresult) return \\\"Query failed: \\\" . mysql_error();\\r\\n\\tif (mysql_affected_rows() > 0) return \\\"PID already scanned\\\";\\r\\n \\r\\n //vnum/replacement id check\\r\\n\\t$gwasresult = mysql_query(\\\"select * from gwas_specimens where pid = $id_subject and vnum = '$id_visit' and replacement = $ses_replacement\\\");\\r\\n\\tif (!$gwasresult) return \\\"Query failed: \\\" . mysql_error();\\r\\n\\tif (mysql_affected_rows() == 0) return \\\"TCL_VNUM != VNUM\\\";\\r\\n\\t$gwas_item = mysql_fetch_array($gwasresult);\\r\\n\\t//pid already scanned check\\r\\n\\tif ($gwas_item['scan_date'] != '0000-00-00') return \\\"PID already scanned\\\";\\r\\n\\t\\r\\n //vdate check\\r\\n\\t$gwas_date_visit = $gwas_item['vdate'];\\r\\n\\tif ($date_visit == 0) {\\r\\n\\t\\treturn \\\"TCL_VDATE not set\\\";\\r\\n\\t}\\r\\n\\t$diff = dateDiff($gwas_item['vdate'], $item['date_visit']);\\r\\n //$diff = 0; #debug!\\r\\n\\t$dateRange = 90;\\r\\n\\t/*\\r\\n\\techo $gwas_item['vdate'] . \\\", \\\" . $item['date_visit'];\\r\\n\\techo $diff;\\r\\n\\t*/\\r\\n\\tif ($diff < - $dateRange) {\\r\\n\\t\\treturn \\\"TCL_VDATE < VDATE - 90\\\";\\r\\n\\t}\\r\\n\\tif ($diff > $dateRange) {\\r\\n\\t\\treturn \\\"TCL_VDATE > VDATE + 90\\\";\\r\\n\\t}\\r\\n\\treturn \\\"ok\\\";\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8071903409d419d2af433ce0278058ba\",\n \"score\": \"0.5079654\",\n \"text\": \"function showContent($title) {\\r\\n require \\\"includes/dbconvars.php\\\";\\r\\n $dbCnx = mysql_connect($dbhost, $dbuser, $dbpwd)\\r\\n or die(mysql_error());\\r\\n mysql_select_db($dbname, $dbCnx)\\r\\n or die(mysql_error());\\r\\n\\r\\n $category = $_SESSION[\\\"category\\\"];\\r\\n $selection = $_SESSION[\\\"selection\\\"];\\r\\n $userEntry = $_SESSION[\\\"userEntry\\\"];\\r\\n\\r\\n if (!get_magic_quotes_gpc()) {\\r\\n $selection = mysql_real_escape_string($selection);\\r\\n $userEntry = mysql_real_escape_string($userEntry);\\r\\n }\\r\\n\\r\\n\\r\\n $sql = \\\"\\r\\n SELECT ID, FIRST_NAME, LAST_NAME, COMPANY, STREET\\r\\n FROM $category\\r\\n WHERE $selection LIKE '$userEntry%'\\r\\n ORDER BY LAST_NAME\\r\\n \\\";\\r\\n $result = mysql_query($sql);\\r\\n\\r\\n if (mysql_num_rows($result) == 0) {\\r\\n echo \\\"

    No Results Matched Your Search. Please Use Your Browser's Back Button and Try Again

    \\\";\\r\\n }\\r\\n\\r\\n echo \\\"

    $title

    \\\\n\\\";\\r\\n echo \\\"\\\\n\\\";\\r\\n showHeading();\\r\\n while ($row = mysql_fetch_row($result)) {\\r\\n list($id, $fname, $lname, $company, $address) = $row;\\r\\n showItem($id, $fname, $lname, $company, $address);\\r\\n }\\r\\n echo \\\"
    \\\\n\\\";\\r\\n\\r\\n mysql_free_result($result);\\r\\n mysql_close($dbCnx);\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7aa7fdbccfa97669b8de6818b673f87d\",\n \"score\": \"0.50791806\",\n \"text\": \"function getItem() {\\n $sql = \\\"SELECT Tuotetunnus FROM tuote WHERE tuotetyyppi = ?\\\";\\n $prepare = $db_handle->db()->prepare($sql);\\n $prepare->bind_param($POST['tuote']);\\n $result = $prepare->get_result();\\n return $result;\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24c12e2095bd96319be78cf80b4ef611\",\n \"score\": \"0.5075969\",\n \"text\": \"function customer_have_saved_item($customer_id, $item_id)\\n{\\n global $conn;\\n\\n $sql = \\\"SELECT * FROM savedproducts WHERE customerid='$customer_id' AND productid='$item_id';\\\";\\n $result = mysqli_query($conn, $sql);\\n $numrows = mysqli_num_rows($result);\\n\\n if ($numrows > 0) {\\n return true;\\n } else {\\n return false;\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8fa0540e6f97ac9d717a2904260c634a\",\n \"score\": \"0.5071931\",\n \"text\": \"function ajr_trackmate_check_lists( $args ) {\\n\\n\\tglobal $wpdb;\\n\\t\\n\\t# args\\n\\t$visible_nonrunners\\t= $args['visible_nonrunners'];\\n\\t$arg_get\\t\\t\\t= $args['get'];\\n\\t$arg_select\\t\\t\\t= $args['select'];\\n\\t$type\\t\\t\\t\\t= $args['type'];\\n\\t$sub_type\\t\\t\\t= $args['sub_type'];\\n\\t$horse_name\\t\\t\\t= $args['horse_name'];\\n\\t$race_date\\t\\t\\t= $args['race_date'];\\n\\t$race_time\\t\\t\\t= $args['race_time'];\\n\\t$track_name\\t\\t\\t= $args['track_name'];\\n\\t$user_id\\t\\t\\t= get_current_user_id();\\n\\t\\n\\t//$visible_nonrunners = false;\\n\\t\\n\\t# build query\\n\\tif( $type == 'all' ) :\\n\\t\\t$get\\t= 'get_results';\\n\\t\\t$select\\t= 'SELECT id, type, sub_type, notes, user_id, user_name';\\n\\t\\t$where\\t= 'WHERE '.($visible_nonrunners?'':'user_id=\\\"'.$user_id.'\\\" AND ').'horse_name=\\\"'.$horse_name.'\\\" AND race_date=\\\"'.$race_date.'\\\" AND race_time=\\\"'.$race_time.'\\\" AND track_name=\\\"'.$track_name.'\\\"';\\n\\telseif( $type == 'toggle_onoff' ) :\\n\\t\\t$get\\t= 'get_results';\\n\\t\\t$select\\t= 'SELECT id, info';\\n\\t\\t$where\\t= 'WHERE user_id=\\\"'.$user_id.'\\\" AND type=\\\"'.$type.'\\\" AND sub_type=\\\"'.$sub_type.'\\\" AND race_date=\\\"'.$race_date.'\\\" AND race_time=\\\"'.$race_time.'\\\" AND track_name=\\\"'.$track_name.'\\\"';\\n\\telseif( $sub_type == 'notebook' ) :\\n\\t\\t$get\\t= 'get_results';\\n\\t\\t$select\\t= 'SELECT id, type, sub_type';\\n\\t\\t$where\\t= 'WHERE user_id=\\\"'.$user_id.'\\\" AND (type=\\\"notebook\\\" AND sub_type=\\\"notebook\\\" AND horse_name=\\\"'.$horse_name.'\\\") OR (type=\\\"favourite\\\" AND horse_name=\\\"'.$horse_name.'\\\" AND race_date=\\\"'.$race_date.'\\\" AND race_time=\\\"'.$race_time.'\\\" AND track_name=\\\"'.$track_name.'\\\")';\\n\\telseif( $type == 'favourite' ) :\\n\\t\\t$get\\t= 'get_results';\\n\\t\\t$select\\t= 'SELECT id, type, sub_type, user_id';\\n\\t\\t$where\\t= 'WHERE type=\\\"'.$type.'\\\" AND user_id=\\\"'.$user_id.'\\\" AND horse_name=\\\"'.$horse_name.'\\\" AND race_date=\\\"'.$race_date.'\\\" AND race_time=\\\"'.$race_time.'\\\" AND track_name=\\\"'.$track_name.'\\\"';\\n\\telseif( $type == 'ignore' && in_array($sub_type, array('nonrunner','ignore_horse')) ) :\\n\\t\\t$get\\t= $arg_get;\\n\\t\\t$select\\t= 'SELECT '.$arg_select; \\n\\t\\t$where\\t= 'WHERE '.($visible_nonrunners?'':'user_id=\\\"'.$user_id.'\\\" AND ').'type=\\\"'.$type.'\\\" AND sub_type=\\\"'.$sub_type.'\\\" AND horse_name=\\\"'.$horse_name.'\\\" AND race_date=\\\"'.$race_date.'\\\" AND race_time=\\\"'.$race_time.'\\\" AND track_name=\\\"'.$track_name.'\\\"';//'.(!empty($sub_type) ? ' AND sub_type=\\\"'.$sub_type.'\\\"' : '' ).'\\n\\telseif( $type == 'ignore' ) :\\n\\t\\t$get\\t= 'get_results';\\n\\t\\t$select\\t= 'SELECT id, rating, notes';\\n\\t\\t$where\\t= 'WHERE type=\\\"ignore\\\" AND user_id=\\\"'.$user_id.'\\\" AND horse_name=\\\"'.$horse_name.'\\\" AND race_date=\\\"'.$race_date.'\\\" AND race_time=\\\"'.$race_time.'\\\" AND track_name=\\\"'.$track_name.'\\\"';//'.(!empty($sub_type) ? ' AND sub_type=\\\"'.$sub_type.'\\\"' : '' ).'\\n\\telse :\\n\\t\\t$get\\t= 'get_var';\\n\\t\\t$select\\t= 'SELECT id';\\n\\t\\t$where\\t= 'WHERE type=\\\"'.$type.'\\\" AND user_id=\\\"'.$user_id.'\\\" AND horse_name=\\\"'.$horse_name.'\\\" AND race_date=\\\"'.$race_date.'\\\" AND race_time=\\\"'.$race_time.'\\\" AND track_name=\\\"'.$track_name.'\\\"';//'.(!empty($sub_type) ? ' AND sub_type=\\\"'.$sub_type.'\\\"' : '' ).'\\n\\tendif;\\n\\n\\t# query\\n\\t$results\\t= $wpdb->$get( $select.' FROM ajr_trackmate_lists '.$where );\\n\\n\\t# testing\\n\\t//echo '
    '; print_r($args); echo '
    ';\\n\\t//echo $get.' '.$select.' FROM ajr_trackmate_lists '.$where;\\n\\t//echo '
    check_list results:'; print_r($result); echo '
    ';\\n\\t\\n\\t#return\\n\\treturn ( $results ?: '' );\\n}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":782,"cells":{"query_id":{"kind":"string","value":"4d9bbbf3cba6fa1bb4cdc7717913bd37"},"query":{"kind":"string","value":"Determine if the user is authorized to make this request."},"positive_passages":{"kind":"list like","value":[{"docid":"392040ec403ae875aeef2d2a3d96424a","score":"0.0","text":"public function authorize()\n {\n return Auth::check();\n }","title":""}],"string":"[\n {\n \"docid\": \"392040ec403ae875aeef2d2a3d96424a\",\n \"score\": \"0.0\",\n \"text\": \"public function authorize()\\n {\\n return Auth::check();\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"9fb39029db943b6c00f8b0416336e051","score":"0.82641774","text":"public function authorize()\n {\n return $this->session()->has('user');\n }","title":""},{"docid":"31beff90f07fc0d7b251495f888cf277","score":"0.8246314","text":"public function authorize()\n {\n\t\treturn $this->user()->isUser();\n }","title":""},{"docid":"0479d42b86e5cc69fe13f40dac477d18","score":"0.82355934","text":"public function authorize()\n {\n return ! empty($this->user());\n }","title":""},{"docid":"863c6df1a64b6980d99e321f5f5e2d24","score":"0.8213121","text":"public function authorize()\n {\n return !is_null($this->user());\n }","title":""},{"docid":"aafc12ff0512ce2fb4f697c308e5f661","score":"0.81675667","text":"public function authorize()\n {\n return $this->getUser()->isYou();\n }","title":""},{"docid":"ec001bd38e23218816604180027e4b42","score":"0.8145075","text":"public function authorize()\n {\n return ($this->user = $this->ownableUser())? true: false;\n }","title":""},{"docid":"97ff65f09cf39bf2988dedb9c7c1f6e7","score":"0.81407666","text":"public function authorize()\n {\n return $this->user() === null;\n }","title":""},{"docid":"d6ac25c880181d2c548e111a3ac86671","score":"0.8105579","text":"public function authorize()\n {\n return (bool)$this->user();\n }","title":""},{"docid":"05590fc9a3eaa9395069921dc992b629","score":"0.8101211","text":"public function authorize()\n {\n //Todo check is admin\n return $this->user() != null;\n }","title":""},{"docid":"ca1bdb4f82e7d03f71573e2c1ecd59f3","score":"0.80493444","text":"public function isAuthorized()\n {\n if ($this->Auth->user('status') === 'admin') {\n return true;\n } \n if (in_array($this->request->getParam('action'), ['index','logout','login','rps','api'])) {\n return true;\n }\n\n }","title":""},{"docid":"50a1858aaf4be32130881da51a4ba50e","score":"0.80292636","text":"public function is_user_authorized() {\n\t\treturn $this->authorized;\n\t}","title":""},{"docid":"9e03a611541dce0c22ee584309b77ab3","score":"0.80142987","text":"public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n return true;\n break;\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n default:\n return false;\n break;\n }\n }","title":""},{"docid":"02a3582aa8830bf5e50a9f6468365620","score":"0.7986208","text":"public function isAuthorised()\n {\n if( $this->getLocalHttpClient() instanceof Zend_Oauth_Client ) \n return true;\n \n return false;\n }","title":""},{"docid":"8eb22930c13eab73be9b778a8382478f","score":"0.797119","text":"public function authorize()\n {\n $method = strtoupper(request()->method());\n return request()->loggedin_role === ($method === 'PATCH' || $method === 'PUT' ? 1 : 0);\n }","title":""},{"docid":"fca99c69a62646c9993bb1b5cad9f01e","score":"0.79579306","text":"public function authorize()\n {\n $statuse = $this->route('statuse');\n\n return $statuse->user_id == auth()->id();\n }","title":""},{"docid":"68cbbf2a944e943c11bb4d48842aef74","score":"0.7932432","text":"public function authorize()\r\n {\r\n if (! isset(Auth::user()->id)) {\r\n return false;\r\n }\r\n return true;\r\n }","title":""},{"docid":"ef9e3c49b61ee70ff93893a1e68f8cd6","score":"0.7922112","text":"public function isAuthorized() {\n if (empty($this->authorizedToken) && empty($this->accessToken)) {\n return false;\n }\n return true;\n }","title":""},{"docid":"935a0da134c0bfa79ad09ddb3e7615c5","score":"0.78689","text":"public function authorize()\n {\n return request()->session()->has('api_credential');\n }","title":""},{"docid":"b9e686a9cac988a9a0e707383d1afae8","score":"0.7867058","text":"public function isUserAllowed() {\n return $this->requiresAuthorization == false || SessionManager::isUserLoggedIn();\n }","title":""},{"docid":"327cd01f92f76b75d2229e7e8f47fe5e","score":"0.786551","text":"public static function userIsAuthorized()\n {\n if (isset($_SESSION['user'])) {\n return true;\n }\n return false;\n }","title":""},{"docid":"d89fe5921e4fd9a2f1fd4ee09095a657","score":"0.78291756","text":"public function authorize()\n {\n return $this->isMethod('PATCH') ? $this->user() !== null : true;\n }","title":""},{"docid":"4ec73613993002d512777b70d5e26322","score":"0.78120255","text":"public function authorize()\n {\n if ($this->isGet()) {\n return true;\n }\n\n if ($this->isPut()) {\n return false;\n }\n\n if ($this->isDelete()) {\n return auth()->user()->can('delete', $this->route('order'));\n }\n\n return true;\n }","title":""},{"docid":"73b7dce2fefe6e6d8604c3fe33ecbddb","score":"0.78080106","text":"public function authorized() : bool\n {\n return $this->guard->check() && $this->authorization()->checkImpersonator($this->getImpersonator());\n }","title":""},{"docid":"2743358e871796a5c78deb89fa6ac709","score":"0.77941877","text":"public function authorize()\n {\n return request()->session()->has('storefront_key') || request()->session()->has('api_credential');\n }","title":""},{"docid":"e44b62f87dba8a7e1dfb82bc22a4649f","score":"0.7791976","text":"public function isAuthorized() {\n\t\treturn $this->authorized;\n\t}","title":""},{"docid":"49cab148f10aad996ebaf915db12267a","score":"0.7786787","text":"protected function _isAuthorized()\n {\n return true;\n }","title":""},{"docid":"5e3e481a70f68b7298ec6f10369940d0","score":"0.77863365","text":"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"7e018dd32eb997c8f95bceb67e866e35","score":"0.77716076","text":"public function hasAuthorizedUser()\n {\n return (bool) $this->getSfGuardUser()->getIsAuthorized();\n }","title":""},{"docid":"a0fea693a7831a81b368c3b480b2f21b","score":"0.77690256","text":"public function authorize()\n {\n if ($this->method() === 'POST') {\n return $this->user()->can('create', Hit::class);\n }\n\n return $this->user()->can('update', Hit::class);\n }","title":""},{"docid":"d6d1211a3aa6c3cfb70419246f369e2a","score":"0.7763308","text":"public function authorize()\n {\n return is_client_or_staff();\n }","title":""},{"docid":"771449ccda0adb0569e1a5079730e8ba","score":"0.7757949","text":"public function authorize()\n {\n if ($this->user()->hasRole('admin')) {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"5f91e98a58f6f773245b5ac81143eb4e","score":"0.77484","text":"public function isAuthorized()\n {\n return $this->isAuthorized;\n }","title":""},{"docid":"4a6b902d3aee0b742535a85aea0c0b8a","score":"0.7741106","text":"public function authorize()\n {\n $trip = $this->route()->parameter('trip');\n\n if ($trip->user_id === Auth::user()->id) {\n return false;\n }\n\n return true;\n }","title":""},{"docid":"08d69a0dee566bd1dc0d8e6fb481d1bf","score":"0.7724704","text":"public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }","title":""},{"docid":"08d69a0dee566bd1dc0d8e6fb481d1bf","score":"0.7724704","text":"public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }","title":""},{"docid":"08d69a0dee566bd1dc0d8e6fb481d1bf","score":"0.7724704","text":"public function authorize()\n {\n return $this->user() && $this->user()->isAdmin();\n }","title":""},{"docid":"5c528e677793952976076d3dd492467d","score":"0.77225506","text":"public function authorize(): bool\n {\n $game = $this->route('game');\n\n return $game->user_id === auth()->id();\n }","title":""},{"docid":"14db1af2b2071d6c2ea1b5e78b1da6a2","score":"0.7708531","text":"public function authorize()\n {\n $this->user = $this->user('api');\n\n if ($this->route('job') !== null) {\n return $this->user->can('update', $this->route('job'));\n }\n\n return true;\n }","title":""},{"docid":"b22054a627c56ee2013dbfd1144e23fb","score":"0.76961654","text":"public function authorize()\n {\n $user = Auth::user();\n if (1 === $user->user_type_id) {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"e45cb38000c87c835bc1548b4be9d50b","score":"0.7695674","text":"public function authorize()\n {\n $article = Article::find($this->article_id);\n return $this->user()->id == $article->user->id;\n }","title":""},{"docid":"532c6c1036e7cfad132d50317ea265f2","score":"0.76932836","text":"function isAuthorized() {\n\t\treturn true;\n\t}","title":""},{"docid":"7832f71f834c25d9f63805254a90e749","score":"0.7692503","text":"function isAuthorized(){\n\t\treturn $this->__permitted($this->name,$this->action);\n\t}","title":""},{"docid":"e4e4812d5edca7c6ea5a3ecbd3fc774a","score":"0.76909506","text":"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }","title":""},{"docid":"eed0ee104e748302648f3eb88bb951d7","score":"0.76826715","text":"public function userAuthorized()\n {\n $result = false;\n $user = $this->grav['user'];\n\n if ($user->authorized) {\n $result = $user->authorize('site.editable') || $user->authorize('admin.super') || $user->authorize('admin.pages');\n }\n return $result;\n }","title":""},{"docid":"e48df3a15c8c653e638c72b60bf35dbd","score":"0.76771003","text":"public function authorize()\n {\n $authenticated = false;\n if (Auth::check() || Auth::guard('ngo')->check()) {\n $authenticated = true;\n }\n return $authenticated;\n }","title":""},{"docid":"7493ff038140e7ba0f73ea8447c19fc3","score":"0.76743484","text":"public function authorize() {\n return auth()->user()->can('user', $this->route('objUser'));\n }","title":""},{"docid":"37976a5e0664f41e34be2e8efe3036aa","score":"0.7670316","text":"public function isAuthorized() {\n\t\t$authorized = true;\n\n\t\t// Restrict \"admin\" prefix routes to users with the role \"admin\".\n\t\tif (isset($this->params['prefix']) && $this->params['prefix'] == 'admin') {\n\t\t\t$authorized = $this->Auth->user('role') === 'admin';\n\t\t}\n\t\treturn $authorized;\n\t}","title":""},{"docid":"acd39263de7f8581d42809fa4fb0cc78","score":"0.7648311","text":"public function authorize()\n {\n $id = $this->route('id');\n $project_environment = ProjectEnvironment::query()->find($id);\n return $project_environment && $project_environment->isUserAuthorized(auth()->user()->id);\n }","title":""},{"docid":"49244cd1f602e42e9958d295c3378652","score":"0.76471764","text":"public function authorize(): bool\n {\n if ($this->user()->isAdmin()) {\n return true;\n }\n\n return $this->get('subscribable_type') === 'user' && $this->get('subscribable_id') === $this->user()->id;\n }","title":""},{"docid":"ca5a88163402aefc49609eaa3c705e81","score":"0.7640693","text":"public function authorize()\r\n {\r\n\r\n return (!\\Auth::check()) ? false : true;\r\n }","title":""},{"docid":"a5ee51c13ce7b19c27772102a42ca3da","score":"0.7633139","text":"public function authorize()\n {\n $contact = Contact::find(request('contact_id'));\n\n if (! $contact) {\n return false;\n }\n\n return $contact->user_id === Auth::user()->id;\n }","title":""},{"docid":"1620e920e650721bba18703186c82201","score":"0.7625041","text":"public function authorize()\n {\n $this->userRouteId = $this->route(\"user\");\n return true;\n }","title":""},{"docid":"dac595333da84dfb8ae02f841a4b3dea","score":"0.7612475","text":"public function authorize()\n {\n return auth()->check() == true;\n }","title":""},{"docid":"dac595333da84dfb8ae02f841a4b3dea","score":"0.7612475","text":"public function authorize()\n {\n return auth()->check() == true;\n }","title":""},{"docid":"44441de2b8bb958d7102b43285859291","score":"0.7610816","text":"public function authorize()\n {\n return (bool) auth()->user();\n }","title":""},{"docid":"c78e31ee952b9abb7f96de3c25225186","score":"0.7609951","text":"public function authorize()\n {\n if (Auth::check()) {\n if (Auth::user()->role_id == 1) {\n return true;\n }\n }\n\n return false;\n }","title":""},{"docid":"d8cf48f23bcac99e7a4634f63c1b3826","score":"0.7608681","text":"public function authorize()\n {\n // if $user->id != $tweet->id\n // return false\n\n // policies\n return true;\n }","title":""},{"docid":"054563d3bfdafc8d20246eb29d0ee33f","score":"0.76065665","text":"public function authorize()\n {\n return $this->user()->can('send application') || $this->user()->can('accept application');\n }","title":""},{"docid":"9a106fe865928acb311133a944e2f523","score":"0.76035625","text":"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}","title":""},{"docid":"e7103b0956700fca99d764e01b6e63e6","score":"0.7592604","text":"public function authorize()\n {\n $routePath = explode('/', $this->decodedPath());\n $authorize = false;\n\n switch ($this->method()) {\n case 'POST':\n $authorize = true;\n break;\n case 'PUT':\n $job = Job::find($routePath[2]);\n\n if ($job->user_id == auth()->id()) {\n $authorize = true;\n }\n break;\n }\n\n return $authorize;\n }","title":""},{"docid":"d874e8d00c74a72170175676432fd1f0","score":"0.75822276","text":"public function authorize()\n {\n if ($this->path() == 'rgst/custom/add' || $this->path() == 'rgst/custom/edit') {\n return true;\n } else {\n return false;\n }\n }","title":""},{"docid":"99318457b951c3326b52b869881516f0","score":"0.75755775","text":"public function authorize()\n {\n return (Auth::user() == NULL);\n }","title":""},{"docid":"54c565a6e372b2e0f2bc66fef64e4e67","score":"0.7573726","text":"public function authorize()\n {\n if ($this->user && $this->user->hasPermission('associate_photos') ) {\n return true;\n }\n return false;\n }","title":""},{"docid":"4162b13edd3da988db0394dd164b7649","score":"0.7564263","text":"public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') || $this->user->hasPermission('manage_pages') ) ) {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"80f9611cc7474a1a8232bfe2bad2767d","score":"0.7562698","text":"public function authorize()\n {\n $user = auth()->user();\n\n return $user->hasRole('employee') || ($user->hasRole('customer') && $user->id == $this->request->get('id'));\n\n }","title":""},{"docid":"5090c03d5e3c1f0545aa32370c0d2c37","score":"0.7550086","text":"public function authorize()\n {\n return Auth::user()->id === $this->private_category->owner_id;\n }","title":""},{"docid":"7450b44b718db968f30e3839cf4c0278","score":"0.7545441","text":"protected function isAuthorized()\n {\n return true;\n return $this->app->make('antares.acl')->make('antares/api')->can('can-use-api');\n }","title":""},{"docid":"1e5bc4bbb7e375fd2e6207c90646128b","score":"0.75436807","text":"public function authorize()\n {\n return Auth::user() ? true : false;\n }","title":""},{"docid":"57012fa7d21a8d6482f4b84293f5743f","score":"0.7541938","text":"public function authorize()\n {\n if(! Auth::user()->active)\n return true;\n \n return false;\n }","title":""},{"docid":"9faacb6cf0c3b57abd2336d53e4fc648","score":"0.75405705","text":"function isAuthorized()\n {\n $session = true;\n include(GEO_BASE_DIR . 'get_common_vars.php');\n if ($session->getUserId() !== 0) {\n return true;\n } else {\n return false;\n }\n }","title":""},{"docid":"16be1c2e01ca4b01d24569f5268bb3e8","score":"0.7528504","text":"public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_pages') ) {\n return true;\n }\n return false;\n }","title":""},{"docid":"d7ff45b4a6226d5137f2ee870c0d7519","score":"0.75248927","text":"public function authorize()\n {\n if (App::environment('testing')) {\n /* Example, deal with it in a middleware */\n return !Auth::guest() && (Auth::user()->id == $this->route->post->user_id);\n } else {\n return true;\n }\n \n }","title":""},{"docid":"3594daafa944b6c0730db5d3ea25e5d1","score":"0.7520546","text":"public function authorize()\n {\n return $this->user()->is_admin;\n }","title":""},{"docid":"a3356463f9788727db560744fe9198e3","score":"0.7506139","text":"public function authorize()\n {\n return $this->user()->can(\n 'edit', $this->route('user')\n );\n }","title":""},{"docid":"b8c138dfbf0a96d5b19051c395e3e939","score":"0.7501601","text":"public function authorize()\n {\n //TODO check if the authenticated user actually has the authority to update a given resource.\n return true;\n }","title":""},{"docid":"12ec45746bcaed1634532b2424547923","score":"0.75000906","text":"public function authorized()\n {\n return true;\n }","title":""},{"docid":"d32ff1413ce4cacbf2de6ef55ec899ee","score":"0.74859905","text":"public function authorize()\n {\n // $user = User::find($this->route('user'));\n\n // return $user && $user->can('update', $user);\n\n return true;\n }","title":""},{"docid":"05a21538b18332e2a1193803e1be39df","score":"0.74828404","text":"public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_seo_booster') ) {\n return true;\n }\n\n return false;\n }","title":""},{"docid":"ac7a1db84c95a405336f2ae0703ac714","score":"0.7480357","text":"public function authorize()\n {\n if($this->method() == 'DELETE' && ($this->route('user') == config('cms.DEFAULT_USER_ID') || auth()->id() == $this->route('user')) )\n return false;\n return true;\n }","title":""},{"docid":"3ae2e4849befde1a04f41438d973326f","score":"0.74711835","text":"public function authorize()\n {\n // Set to true we will not do authentication here\n return true;\n }","title":""},{"docid":"e382e69b62fc12f837b5f5aa867c89bb","score":"0.7471096","text":"public function isAuthorized() {\n\t\t$role = $this->Auth->user('role');\n\t\tif ($role === 'admin') return true;\n\t\tif (empty($this->_permissions[$this->action])) return false;\n\t\t$perms = $this->_permissions[$this->action];\n\t\tif (is_string($perms)) {\n\t\t\tif ($perms === '*') return true;\n\t\t\treturn (bool) call_user_func(array(&$this, $perms));\n\t\t}\n\t\tif ($role) return in_array($role, $perms);\n\t\treturn false;\n\t}","title":""},{"docid":"60a6050aa49198976abe4cf6aad32bbd","score":"0.74658936","text":"public function authorize()\n {\n return $this->user()->type === 'admin';\n }","title":""},{"docid":"a0c263182891c2e6a287e26ed64201f7","score":"0.74655193","text":"public function authorize()\n {\n /* request must have auth.id and auth.secret, and they must match our config */\n $auth = $this->post('auth');\n $id = $auth['id'] ?? false;\n $secret = $auth['secret'] ?? false;\n\n return ($id && $secret && $id === config('app.client_id') && $secret === config('app.client_secret'));\n }","title":""},{"docid":"4da31466613c2e9da8bec1e82f21f108","score":"0.7450424","text":"abstract protected function _isAuthorized();","title":""},{"docid":"784e4dc5b747a63b7eb02fe96e885f68","score":"0.7448189","text":"public function authorize(Request $request)\n {\n return Auth::id() == $request->user_id;\n }","title":""},{"docid":"803eb51e8df89ef3bc81e58be36297f8","score":"0.74467045","text":"public function authorize()\n {\n /** @var User|null $user */\n $user = $this->user();\n $isWorkshop = $user->roles()->where('name', User::USER_ROLE_SHOP);\n $isAdmin = $user->roles()->where('name', User::USER_ROLE_ADMIN);\n\n $this->user = $user;\n\n return null !== $user && ($isWorkshop || $isAdmin);\n }","title":""},{"docid":"ee5c25dcb01bf3fb0810d94934968b57","score":"0.74301696","text":"public function authorize()\n {\n $user = auth()->user();\n return ($user->hasRole(3)&&$user->hasStatus(3));\n }","title":""},{"docid":"0707b38a55ec6b7b4afe1caae8d23c78","score":"0.7421741","text":"public function authorize()\n {\n if(\\Auth::check()) {\n\n /* Check if user has permission */\n if(\\Auth::user()->hasRole('Creating/Designing/Editing/Removing of Forms'))\n return true;\n }\n\n return false;\n }","title":""},{"docid":"8475169486c92e03cf299d95b2673f70","score":"0.7415748","text":"public function authorize()\n {\n return auth()->user()->id ? true : false;\n }","title":""},{"docid":"aec154c99202d5d8ff163aefea8ab474","score":"0.7415425","text":"public function authorize()\n {\n if($this->isMethod('get')){\n if(auth()->user()->canIndexPermissions()) return true;\n return false;\n }elseif($this->isMethod('post')){\n if(auth()->user()->canStorePermissions()) return true;\n return false;\n }\n return false;\n }","title":""},{"docid":"ab8c626bc07a5ea7eaae1c4d17fb6e41","score":"0.74144197","text":"public function authorize()\n {\n return $this->user()->hasRole('admin');\n }","title":""},{"docid":"6f4551e441e27e01695753b04f3292d0","score":"0.74024","text":"public function authorize()\n {\n return Auth::id() && $this->userOwnsWallets();\n }","title":""},{"docid":"67111946b51e489606ae7759398c7326","score":"0.739976","text":"public function authorize()\n {\n if(Auth::user()->user_type === 1)\n return true;\n return false;\n }","title":""},{"docid":"cab47d70a82dbc1ccbde6527f927a4e7","score":"0.7398635","text":"public function authorize(): bool\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }","title":""},{"docid":"a5ffedc84c87aa995195bffa59825b64","score":"0.7398006","text":"public function authorize()\n {\n return hasPermission('admin.user.permission');\n }","title":""},{"docid":"3c412a98951830835550fbc0685dbb71","score":"0.73944557","text":"public function authorize()\n {\n /**\n * Para saber si el usuario que esta haciendo la peticion es un administrador\n */\n return ($this->user()->roles->name === 'SuperUsuario Estatal');\n }","title":""},{"docid":"61ed9cbce2ea309049ee1a5d78bee45a","score":"0.7384167","text":"public function authorize()\r\n {\r\n if( ! \\Auth::check() ){\r\n return false;\r\n }\r\n\r\n return true;\r\n }","title":""},{"docid":"3913dc0ea21f5beab08adb110b71cdd9","score":"0.7380253","text":"public function authorize()\n {\n \t$applicant = $this->route('applicant');\n \tif(!is_object($applicant)){\n \t\t$applicant=User::find($applicant);\n\t }\n\t if ($applicant){\n \t\treturn $applicant->status==User::STATUS_ON_APPROVAL || $applicant->status==User::STATUS_REJECTED;\n\t }\n return false;\n }","title":""},{"docid":"bca3a815d4acc2513af6f111c6aaacb9","score":"0.736582","text":"public function authorize()\n {\n return $this->user()->can('update', $this->getResponse());\n }","title":""},{"docid":"c7b6c1b120f0892042ccc26cb422ee9e","score":"0.7357182","text":"public function authorize()\n {\n return Auth::user()->hasRole('superadministrator|administrator|user');\n }","title":""},{"docid":"5fcc7ba03cbc045a35c20a0a77b89bad","score":"0.735548","text":"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }","title":""}],"string":"[\n {\n \"docid\": \"9fb39029db943b6c00f8b0416336e051\",\n \"score\": \"0.82641774\",\n \"text\": \"public function authorize()\\n {\\n return $this->session()->has('user');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"31beff90f07fc0d7b251495f888cf277\",\n \"score\": \"0.8246314\",\n \"text\": \"public function authorize()\\n {\\n\\t\\treturn $this->user()->isUser();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0479d42b86e5cc69fe13f40dac477d18\",\n \"score\": \"0.82355934\",\n \"text\": \"public function authorize()\\n {\\n return ! empty($this->user());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"863c6df1a64b6980d99e321f5f5e2d24\",\n \"score\": \"0.8213121\",\n \"text\": \"public function authorize()\\n {\\n return !is_null($this->user());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aafc12ff0512ce2fb4f697c308e5f661\",\n \"score\": \"0.81675667\",\n \"text\": \"public function authorize()\\n {\\n return $this->getUser()->isYou();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec001bd38e23218816604180027e4b42\",\n \"score\": \"0.8145075\",\n \"text\": \"public function authorize()\\n {\\n return ($this->user = $this->ownableUser())? true: false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"97ff65f09cf39bf2988dedb9c7c1f6e7\",\n \"score\": \"0.81407666\",\n \"text\": \"public function authorize()\\n {\\n return $this->user() === null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6ac25c880181d2c548e111a3ac86671\",\n \"score\": \"0.8105579\",\n \"text\": \"public function authorize()\\n {\\n return (bool)$this->user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05590fc9a3eaa9395069921dc992b629\",\n \"score\": \"0.8101211\",\n \"text\": \"public function authorize()\\n {\\n //Todo check is admin\\n return $this->user() != null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca1bdb4f82e7d03f71573e2c1ecd59f3\",\n \"score\": \"0.80493444\",\n \"text\": \"public function isAuthorized()\\n {\\n if ($this->Auth->user('status') === 'admin') {\\n return true;\\n } \\n if (in_array($this->request->getParam('action'), ['index','logout','login','rps','api'])) {\\n return true;\\n }\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50a1858aaf4be32130881da51a4ba50e\",\n \"score\": \"0.80292636\",\n \"text\": \"public function is_user_authorized() {\\n\\t\\treturn $this->authorized;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e03a611541dce0c22ee584309b77ab3\",\n \"score\": \"0.80142987\",\n \"text\": \"public function authorize()\\n {\\n switch ($this->method()) {\\n case 'GET':\\n return true;\\n break;\\n case 'POST':\\n case 'PUT':\\n case 'PATCH':\\n case 'DELETE':\\n return $this->user()->type == 'App\\\\\\\\Staff' ? true : false;\\n break;\\n default:\\n return false;\\n break;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"02a3582aa8830bf5e50a9f6468365620\",\n \"score\": \"0.7986208\",\n \"text\": \"public function isAuthorised()\\n {\\n if( $this->getLocalHttpClient() instanceof Zend_Oauth_Client ) \\n return true;\\n \\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8eb22930c13eab73be9b778a8382478f\",\n \"score\": \"0.797119\",\n \"text\": \"public function authorize()\\n {\\n $method = strtoupper(request()->method());\\n return request()->loggedin_role === ($method === 'PATCH' || $method === 'PUT' ? 1 : 0);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fca99c69a62646c9993bb1b5cad9f01e\",\n \"score\": \"0.79579306\",\n \"text\": \"public function authorize()\\n {\\n $statuse = $this->route('statuse');\\n\\n return $statuse->user_id == auth()->id();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"68cbbf2a944e943c11bb4d48842aef74\",\n \"score\": \"0.7932432\",\n \"text\": \"public function authorize()\\r\\n {\\r\\n if (! isset(Auth::user()->id)) {\\r\\n return false;\\r\\n }\\r\\n return true;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef9e3c49b61ee70ff93893a1e68f8cd6\",\n \"score\": \"0.7922112\",\n \"text\": \"public function isAuthorized() {\\n if (empty($this->authorizedToken) && empty($this->accessToken)) {\\n return false;\\n }\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"935a0da134c0bfa79ad09ddb3e7615c5\",\n \"score\": \"0.78689\",\n \"text\": \"public function authorize()\\n {\\n return request()->session()->has('api_credential');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b9e686a9cac988a9a0e707383d1afae8\",\n \"score\": \"0.7867058\",\n \"text\": \"public function isUserAllowed() {\\n return $this->requiresAuthorization == false || SessionManager::isUserLoggedIn();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"327cd01f92f76b75d2229e7e8f47fe5e\",\n \"score\": \"0.786551\",\n \"text\": \"public static function userIsAuthorized()\\n {\\n if (isset($_SESSION['user'])) {\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d89fe5921e4fd9a2f1fd4ee09095a657\",\n \"score\": \"0.78291756\",\n \"text\": \"public function authorize()\\n {\\n return $this->isMethod('PATCH') ? $this->user() !== null : true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ec73613993002d512777b70d5e26322\",\n \"score\": \"0.78120255\",\n \"text\": \"public function authorize()\\n {\\n if ($this->isGet()) {\\n return true;\\n }\\n\\n if ($this->isPut()) {\\n return false;\\n }\\n\\n if ($this->isDelete()) {\\n return auth()->user()->can('delete', $this->route('order'));\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"73b7dce2fefe6e6d8604c3fe33ecbddb\",\n \"score\": \"0.78080106\",\n \"text\": \"public function authorized() : bool\\n {\\n return $this->guard->check() && $this->authorization()->checkImpersonator($this->getImpersonator());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2743358e871796a5c78deb89fa6ac709\",\n \"score\": \"0.77941877\",\n \"text\": \"public function authorize()\\n {\\n return request()->session()->has('storefront_key') || request()->session()->has('api_credential');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e44b62f87dba8a7e1dfb82bc22a4649f\",\n \"score\": \"0.7791976\",\n \"text\": \"public function isAuthorized() {\\n\\t\\treturn $this->authorized;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49cab148f10aad996ebaf915db12267a\",\n \"score\": \"0.7786787\",\n \"text\": \"protected function _isAuthorized()\\n {\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e3e481a70f68b7298ec6f10369940d0\",\n \"score\": \"0.77863365\",\n \"text\": \"public function authorize()\\n {\\n if(Auth::user())\\n {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e018dd32eb997c8f95bceb67e866e35\",\n \"score\": \"0.77716076\",\n \"text\": \"public function hasAuthorizedUser()\\n {\\n return (bool) $this->getSfGuardUser()->getIsAuthorized();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0fea693a7831a81b368c3b480b2f21b\",\n \"score\": \"0.77690256\",\n \"text\": \"public function authorize()\\n {\\n if ($this->method() === 'POST') {\\n return $this->user()->can('create', Hit::class);\\n }\\n\\n return $this->user()->can('update', Hit::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d6d1211a3aa6c3cfb70419246f369e2a\",\n \"score\": \"0.7763308\",\n \"text\": \"public function authorize()\\n {\\n return is_client_or_staff();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"771449ccda0adb0569e1a5079730e8ba\",\n \"score\": \"0.7757949\",\n \"text\": \"public function authorize()\\n {\\n if ($this->user()->hasRole('admin')) {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5f91e98a58f6f773245b5ac81143eb4e\",\n \"score\": \"0.77484\",\n \"text\": \"public function isAuthorized()\\n {\\n return $this->isAuthorized;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4a6b902d3aee0b742535a85aea0c0b8a\",\n \"score\": \"0.7741106\",\n \"text\": \"public function authorize()\\n {\\n $trip = $this->route()->parameter('trip');\\n\\n if ($trip->user_id === Auth::user()->id) {\\n return false;\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08d69a0dee566bd1dc0d8e6fb481d1bf\",\n \"score\": \"0.7724704\",\n \"text\": \"public function authorize()\\n {\\n return $this->user() && $this->user()->isAdmin();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08d69a0dee566bd1dc0d8e6fb481d1bf\",\n \"score\": \"0.7724704\",\n \"text\": \"public function authorize()\\n {\\n return $this->user() && $this->user()->isAdmin();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08d69a0dee566bd1dc0d8e6fb481d1bf\",\n \"score\": \"0.7724704\",\n \"text\": \"public function authorize()\\n {\\n return $this->user() && $this->user()->isAdmin();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c528e677793952976076d3dd492467d\",\n \"score\": \"0.77225506\",\n \"text\": \"public function authorize(): bool\\n {\\n $game = $this->route('game');\\n\\n return $game->user_id === auth()->id();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14db1af2b2071d6c2ea1b5e78b1da6a2\",\n \"score\": \"0.7708531\",\n \"text\": \"public function authorize()\\n {\\n $this->user = $this->user('api');\\n\\n if ($this->route('job') !== null) {\\n return $this->user->can('update', $this->route('job'));\\n }\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b22054a627c56ee2013dbfd1144e23fb\",\n \"score\": \"0.76961654\",\n \"text\": \"public function authorize()\\n {\\n $user = Auth::user();\\n if (1 === $user->user_type_id) {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e45cb38000c87c835bc1548b4be9d50b\",\n \"score\": \"0.7695674\",\n \"text\": \"public function authorize()\\n {\\n $article = Article::find($this->article_id);\\n return $this->user()->id == $article->user->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"532c6c1036e7cfad132d50317ea265f2\",\n \"score\": \"0.76932836\",\n \"text\": \"function isAuthorized() {\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7832f71f834c25d9f63805254a90e749\",\n \"score\": \"0.7692503\",\n \"text\": \"function isAuthorized(){\\n\\t\\treturn $this->__permitted($this->name,$this->action);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e4e4812d5edca7c6ea5a3ecbd3fc774a\",\n \"score\": \"0.76909506\",\n \"text\": \"public function authorized()\\n {\\n return $this->accepted && ! $this->test_mode;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eed0ee104e748302648f3eb88bb951d7\",\n \"score\": \"0.76826715\",\n \"text\": \"public function userAuthorized()\\n {\\n $result = false;\\n $user = $this->grav['user'];\\n\\n if ($user->authorized) {\\n $result = $user->authorize('site.editable') || $user->authorize('admin.super') || $user->authorize('admin.pages');\\n }\\n return $result;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e48df3a15c8c653e638c72b60bf35dbd\",\n \"score\": \"0.76771003\",\n \"text\": \"public function authorize()\\n {\\n $authenticated = false;\\n if (Auth::check() || Auth::guard('ngo')->check()) {\\n $authenticated = true;\\n }\\n return $authenticated;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7493ff038140e7ba0f73ea8447c19fc3\",\n \"score\": \"0.76743484\",\n \"text\": \"public function authorize() {\\n return auth()->user()->can('user', $this->route('objUser'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"37976a5e0664f41e34be2e8efe3036aa\",\n \"score\": \"0.7670316\",\n \"text\": \"public function isAuthorized() {\\n\\t\\t$authorized = true;\\n\\n\\t\\t// Restrict \\\"admin\\\" prefix routes to users with the role \\\"admin\\\".\\n\\t\\tif (isset($this->params['prefix']) && $this->params['prefix'] == 'admin') {\\n\\t\\t\\t$authorized = $this->Auth->user('role') === 'admin';\\n\\t\\t}\\n\\t\\treturn $authorized;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"acd39263de7f8581d42809fa4fb0cc78\",\n \"score\": \"0.7648311\",\n \"text\": \"public function authorize()\\n {\\n $id = $this->route('id');\\n $project_environment = ProjectEnvironment::query()->find($id);\\n return $project_environment && $project_environment->isUserAuthorized(auth()->user()->id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"49244cd1f602e42e9958d295c3378652\",\n \"score\": \"0.76471764\",\n \"text\": \"public function authorize(): bool\\n {\\n if ($this->user()->isAdmin()) {\\n return true;\\n }\\n\\n return $this->get('subscribable_type') === 'user' && $this->get('subscribable_id') === $this->user()->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca5a88163402aefc49609eaa3c705e81\",\n \"score\": \"0.7640693\",\n \"text\": \"public function authorize()\\r\\n {\\r\\n\\r\\n return (!\\\\Auth::check()) ? false : true;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5ee51c13ce7b19c27772102a42ca3da\",\n \"score\": \"0.7633139\",\n \"text\": \"public function authorize()\\n {\\n $contact = Contact::find(request('contact_id'));\\n\\n if (! $contact) {\\n return false;\\n }\\n\\n return $contact->user_id === Auth::user()->id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1620e920e650721bba18703186c82201\",\n \"score\": \"0.7625041\",\n \"text\": \"public function authorize()\\n {\\n $this->userRouteId = $this->route(\\\"user\\\");\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dac595333da84dfb8ae02f841a4b3dea\",\n \"score\": \"0.7612475\",\n \"text\": \"public function authorize()\\n {\\n return auth()->check() == true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dac595333da84dfb8ae02f841a4b3dea\",\n \"score\": \"0.7612475\",\n \"text\": \"public function authorize()\\n {\\n return auth()->check() == true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"44441de2b8bb958d7102b43285859291\",\n \"score\": \"0.7610816\",\n \"text\": \"public function authorize()\\n {\\n return (bool) auth()->user();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c78e31ee952b9abb7f96de3c25225186\",\n \"score\": \"0.7609951\",\n \"text\": \"public function authorize()\\n {\\n if (Auth::check()) {\\n if (Auth::user()->role_id == 1) {\\n return true;\\n }\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d8cf48f23bcac99e7a4634f63c1b3826\",\n \"score\": \"0.7608681\",\n \"text\": \"public function authorize()\\n {\\n // if $user->id != $tweet->id\\n // return false\\n\\n // policies\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"054563d3bfdafc8d20246eb29d0ee33f\",\n \"score\": \"0.76065665\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->can('send application') || $this->user()->can('accept application');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9a106fe865928acb311133a944e2f523\",\n \"score\": \"0.76035625\",\n \"text\": \"public function authorize()\\n\\t{\\n\\t\\t//@todo check with perissions\\n\\t\\treturn (request()->user()->user_type == ADMIN_USER);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7103b0956700fca99d764e01b6e63e6\",\n \"score\": \"0.7592604\",\n \"text\": \"public function authorize()\\n {\\n $routePath = explode('/', $this->decodedPath());\\n $authorize = false;\\n\\n switch ($this->method()) {\\n case 'POST':\\n $authorize = true;\\n break;\\n case 'PUT':\\n $job = Job::find($routePath[2]);\\n\\n if ($job->user_id == auth()->id()) {\\n $authorize = true;\\n }\\n break;\\n }\\n\\n return $authorize;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d874e8d00c74a72170175676432fd1f0\",\n \"score\": \"0.75822276\",\n \"text\": \"public function authorize()\\n {\\n if ($this->path() == 'rgst/custom/add' || $this->path() == 'rgst/custom/edit') {\\n return true;\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"99318457b951c3326b52b869881516f0\",\n \"score\": \"0.75755775\",\n \"text\": \"public function authorize()\\n {\\n return (Auth::user() == NULL);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"54c565a6e372b2e0f2bc66fef64e4e67\",\n \"score\": \"0.7573726\",\n \"text\": \"public function authorize()\\n {\\n if ($this->user && $this->user->hasPermission('associate_photos') ) {\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4162b13edd3da988db0394dd164b7649\",\n \"score\": \"0.7564263\",\n \"text\": \"public function authorize()\\n {\\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') || $this->user->hasPermission('manage_pages') ) ) {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80f9611cc7474a1a8232bfe2bad2767d\",\n \"score\": \"0.7562698\",\n \"text\": \"public function authorize()\\n {\\n $user = auth()->user();\\n\\n return $user->hasRole('employee') || ($user->hasRole('customer') && $user->id == $this->request->get('id'));\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5090c03d5e3c1f0545aa32370c0d2c37\",\n \"score\": \"0.7550086\",\n \"text\": \"public function authorize()\\n {\\n return Auth::user()->id === $this->private_category->owner_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7450b44b718db968f30e3839cf4c0278\",\n \"score\": \"0.7545441\",\n \"text\": \"protected function isAuthorized()\\n {\\n return true;\\n return $this->app->make('antares.acl')->make('antares/api')->can('can-use-api');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1e5bc4bbb7e375fd2e6207c90646128b\",\n \"score\": \"0.75436807\",\n \"text\": \"public function authorize()\\n {\\n return Auth::user() ? true : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"57012fa7d21a8d6482f4b84293f5743f\",\n \"score\": \"0.7541938\",\n \"text\": \"public function authorize()\\n {\\n if(! Auth::user()->active)\\n return true;\\n \\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9faacb6cf0c3b57abd2336d53e4fc648\",\n \"score\": \"0.75405705\",\n \"text\": \"function isAuthorized()\\n {\\n $session = true;\\n include(GEO_BASE_DIR . 'get_common_vars.php');\\n if ($session->getUserId() !== 0) {\\n return true;\\n } else {\\n return false;\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16be1c2e01ca4b01d24569f5268bb3e8\",\n \"score\": \"0.7528504\",\n \"text\": \"public function authorize()\\n {\\n if ($this->user && $this->user->hasPermission('manage_pages') ) {\\n return true;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d7ff45b4a6226d5137f2ee870c0d7519\",\n \"score\": \"0.75248927\",\n \"text\": \"public function authorize()\\n {\\n if (App::environment('testing')) {\\n /* Example, deal with it in a middleware */\\n return !Auth::guest() && (Auth::user()->id == $this->route->post->user_id);\\n } else {\\n return true;\\n }\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3594daafa944b6c0730db5d3ea25e5d1\",\n \"score\": \"0.7520546\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->is_admin;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3356463f9788727db560744fe9198e3\",\n \"score\": \"0.7506139\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->can(\\n 'edit', $this->route('user')\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b8c138dfbf0a96d5b19051c395e3e939\",\n \"score\": \"0.7501601\",\n \"text\": \"public function authorize()\\n {\\n //TODO check if the authenticated user actually has the authority to update a given resource.\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12ec45746bcaed1634532b2424547923\",\n \"score\": \"0.75000906\",\n \"text\": \"public function authorized()\\n {\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d32ff1413ce4cacbf2de6ef55ec899ee\",\n \"score\": \"0.74859905\",\n \"text\": \"public function authorize()\\n {\\n // $user = User::find($this->route('user'));\\n\\n // return $user && $user->can('update', $user);\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05a21538b18332e2a1193803e1be39df\",\n \"score\": \"0.74828404\",\n \"text\": \"public function authorize()\\n {\\n if ($this->user && $this->user->hasPermission('manage_seo_booster') ) {\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac7a1db84c95a405336f2ae0703ac714\",\n \"score\": \"0.7480357\",\n \"text\": \"public function authorize()\\n {\\n if($this->method() == 'DELETE' && ($this->route('user') == config('cms.DEFAULT_USER_ID') || auth()->id() == $this->route('user')) )\\n return false;\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ae2e4849befde1a04f41438d973326f\",\n \"score\": \"0.74711835\",\n \"text\": \"public function authorize()\\n {\\n // Set to true we will not do authentication here\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e382e69b62fc12f837b5f5aa867c89bb\",\n \"score\": \"0.7471096\",\n \"text\": \"public function isAuthorized() {\\n\\t\\t$role = $this->Auth->user('role');\\n\\t\\tif ($role === 'admin') return true;\\n\\t\\tif (empty($this->_permissions[$this->action])) return false;\\n\\t\\t$perms = $this->_permissions[$this->action];\\n\\t\\tif (is_string($perms)) {\\n\\t\\t\\tif ($perms === '*') return true;\\n\\t\\t\\treturn (bool) call_user_func(array(&$this, $perms));\\n\\t\\t}\\n\\t\\tif ($role) return in_array($role, $perms);\\n\\t\\treturn false;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"60a6050aa49198976abe4cf6aad32bbd\",\n \"score\": \"0.74658936\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->type === 'admin';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a0c263182891c2e6a287e26ed64201f7\",\n \"score\": \"0.74655193\",\n \"text\": \"public function authorize()\\n {\\n /* request must have auth.id and auth.secret, and they must match our config */\\n $auth = $this->post('auth');\\n $id = $auth['id'] ?? false;\\n $secret = $auth['secret'] ?? false;\\n\\n return ($id && $secret && $id === config('app.client_id') && $secret === config('app.client_secret'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4da31466613c2e9da8bec1e82f21f108\",\n \"score\": \"0.7450424\",\n \"text\": \"abstract protected function _isAuthorized();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"784e4dc5b747a63b7eb02fe96e885f68\",\n \"score\": \"0.7448189\",\n \"text\": \"public function authorize(Request $request)\\n {\\n return Auth::id() == $request->user_id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"803eb51e8df89ef3bc81e58be36297f8\",\n \"score\": \"0.74467045\",\n \"text\": \"public function authorize()\\n {\\n /** @var User|null $user */\\n $user = $this->user();\\n $isWorkshop = $user->roles()->where('name', User::USER_ROLE_SHOP);\\n $isAdmin = $user->roles()->where('name', User::USER_ROLE_ADMIN);\\n\\n $this->user = $user;\\n\\n return null !== $user && ($isWorkshop || $isAdmin);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ee5c25dcb01bf3fb0810d94934968b57\",\n \"score\": \"0.74301696\",\n \"text\": \"public function authorize()\\n {\\n $user = auth()->user();\\n return ($user->hasRole(3)&&$user->hasStatus(3));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0707b38a55ec6b7b4afe1caae8d23c78\",\n \"score\": \"0.7421741\",\n \"text\": \"public function authorize()\\n {\\n if(\\\\Auth::check()) {\\n\\n /* Check if user has permission */\\n if(\\\\Auth::user()->hasRole('Creating/Designing/Editing/Removing of Forms'))\\n return true;\\n }\\n\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8475169486c92e03cf299d95b2673f70\",\n \"score\": \"0.7415748\",\n \"text\": \"public function authorize()\\n {\\n return auth()->user()->id ? true : false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aec154c99202d5d8ff163aefea8ab474\",\n \"score\": \"0.7415425\",\n \"text\": \"public function authorize()\\n {\\n if($this->isMethod('get')){\\n if(auth()->user()->canIndexPermissions()) return true;\\n return false;\\n }elseif($this->isMethod('post')){\\n if(auth()->user()->canStorePermissions()) return true;\\n return false;\\n }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab8c626bc07a5ea7eaae1c4d17fb6e41\",\n \"score\": \"0.74144197\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->hasRole('admin');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f4551e441e27e01695753b04f3292d0\",\n \"score\": \"0.74024\",\n \"text\": \"public function authorize()\\n {\\n return Auth::id() && $this->userOwnsWallets();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"67111946b51e489606ae7759398c7326\",\n \"score\": \"0.739976\",\n \"text\": \"public function authorize()\\n {\\n if(Auth::user()->user_type === 1)\\n return true;\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cab47d70a82dbc1ccbde6527f927a4e7\",\n \"score\": \"0.7398635\",\n \"text\": \"public function authorize(): bool\\n {\\n // only allow updates if the user is logged in\\n return backpack_auth()->check();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5ffedc84c87aa995195bffa59825b64\",\n \"score\": \"0.7398006\",\n \"text\": \"public function authorize()\\n {\\n return hasPermission('admin.user.permission');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3c412a98951830835550fbc0685dbb71\",\n \"score\": \"0.73944557\",\n \"text\": \"public function authorize()\\n {\\n /**\\n * Para saber si el usuario que esta haciendo la peticion es un administrador\\n */\\n return ($this->user()->roles->name === 'SuperUsuario Estatal');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"61ed9cbce2ea309049ee1a5d78bee45a\",\n \"score\": \"0.7384167\",\n \"text\": \"public function authorize()\\r\\n {\\r\\n if( ! \\\\Auth::check() ){\\r\\n return false;\\r\\n }\\r\\n\\r\\n return true;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3913dc0ea21f5beab08adb110b71cdd9\",\n \"score\": \"0.7380253\",\n \"text\": \"public function authorize()\\n {\\n \\t$applicant = $this->route('applicant');\\n \\tif(!is_object($applicant)){\\n \\t\\t$applicant=User::find($applicant);\\n\\t }\\n\\t if ($applicant){\\n \\t\\treturn $applicant->status==User::STATUS_ON_APPROVAL || $applicant->status==User::STATUS_REJECTED;\\n\\t }\\n return false;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bca3a815d4acc2513af6f111c6aaacb9\",\n \"score\": \"0.736582\",\n \"text\": \"public function authorize()\\n {\\n return $this->user()->can('update', $this->getResponse());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c7b6c1b120f0892042ccc26cb422ee9e\",\n \"score\": \"0.7357182\",\n \"text\": \"public function authorize()\\n {\\n return Auth::user()->hasRole('superadministrator|administrator|user');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fcc7ba03cbc045a35c20a0a77b89bad\",\n \"score\": \"0.735548\",\n \"text\": \"public function authorize()\\n {\\n // only allow updates if the user is logged in\\n return backpack_auth()->check();\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":783,"cells":{"query_id":{"kind":"string","value":"f25b0db1ccb95daf541da004683a033f"},"query":{"kind":"string","value":"Gets as description Text description of error."},"positive_passages":{"kind":"list like","value":[{"docid":"6ea2220043d501427df36dbc55009ffa","score":"0.0","text":"public function getDescription()\n {\n return $this->description;\n }","title":""}],"string":"[\n {\n \"docid\": \"6ea2220043d501427df36dbc55009ffa\",\n \"score\": \"0.0\",\n \"text\": \"public function getDescription()\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"5f62441f2f130f2be0738f6d145b1c49","score":"0.8368376","text":"public function getErrorDesc() {\n\t\treturn $this->errorDesc;\n\t}","title":""},{"docid":"370ea3a059738f67a0d3e4ed60c3f132","score":"0.81451356","text":"public function getDescription()\n {\n\t\t\treturn ($this->error_description)? $this->error_description:'';\n\t\t}","title":""},{"docid":"a1377de343f370e4b31a9e8856d8b1b4","score":"0.77344495","text":"public function text_error() {\r\n\t\t\r\n\t\tif($this->title != null) {\r\n\t\t\treturn $this->title.\": \".$this->error;\r\n\t\t}else{\r\n\t\t\treturn $this->error;\r\n\t\t}\r\n\t\t\r\n\t}","title":""},{"docid":"5d23869c0e2df489f4c7adc36028fb5c","score":"0.7512672","text":"public function getError() : string {\r\n return $this->errormessage;\r\n }","title":""},{"docid":"9cca4d55eea418056446b380400112b0","score":"0.74938214","text":"protected function getFailureDescription()\n {\n return 'the page contains '.$this->toString();\n }","title":""},{"docid":"38c48064c0655ed487a908daa89b8bdc","score":"0.74743193","text":"public function getMessage()\n {\n return $this->_error;\n }","title":""},{"docid":"69e9f98cbb5d9e662a530a9c1b9e5a1d","score":"0.74067223","text":"public function error_message() { return $this->_error['message']; }","title":""},{"docid":"23aa6f039c230208b1430088f6a9ec58","score":"0.7404739","text":"public function get_error_message()\n\t{\n\t\treturn $this->error;\n\t}","title":""},{"docid":"ab8ee690209d0dc9653f295e6ab47986","score":"0.7365628","text":"public function getMessage()\n {\n if ($this->isError()) {\n if (!empty($this->data['errordescription'])) {\n return $this->data['errordescription'];\n }\n if (!empty($this->data['errorcode'])) {\n return $this->data['errorcode'];\n }\n }\n\n return null;\n }","title":""},{"docid":"ae385ebc95e4ac55f61b09e0a2c66058","score":"0.72713995","text":"function describe() {\n return get_class($this) . \": \\\"\" \n . $this->getMessage() . \"\\\" (status: \"\n . $this->getStatus() . \", error code: \"\n . $this->getErrorCode() . \", reference: \"\n . $this->getReference() . \")\";\n }","title":""},{"docid":"8c8e593bd637c229d341d37c8dfe276a","score":"0.7226713","text":"public function get_error_message() {\n\t\treturn $this->error_message;\n\t}","title":""},{"docid":"c05e2e6606bf55bd6bb7c738be405041","score":"0.7220599","text":"public function getErrorMessage() {\n $error = $this->getError();\n return $error['error']['message'];\n }","title":""},{"docid":"13bb68a333959a25655fc4b50728d081","score":"0.7210056","text":"public function message()\n {\n return $this->error_message;\n }","title":""},{"docid":"2be80c84c95d2f34bf4fb9174676b376","score":"0.7209022","text":"public function getErrorMsg() {\n return $this->get(self::ERROR_MSG);\n }","title":""},{"docid":"a4e185a40cc534e8451a7d1787bcd8e8","score":"0.72049576","text":"public function getDescription(): string\n {\n return $this->message;\n }","title":""},{"docid":"9759736fdde7f48f0fcacead49ff7112","score":"0.71973366","text":"public function message()\n {\n return $this->error;\n }","title":""},{"docid":"9759736fdde7f48f0fcacead49ff7112","score":"0.71973366","text":"public function message()\n {\n return $this->error;\n }","title":""},{"docid":"ff4a8f78bf0f2607ac2265875f8b9781","score":"0.71862936","text":"public function errorMessage()\n {\n return $this->operation['error']['message'] ?? null;\n }","title":""},{"docid":"34e8d4029624942921c09788067d8c86","score":"0.7183678","text":"public function getErrorString()\n\t{\n\t\treturn $this->error_string;\n\t}","title":""},{"docid":"35d3d6b8f9dc1e610a7033fb38ff363d","score":"0.71617365","text":"public function errorMsg() {\n return $this->command_output[0];\n }","title":""},{"docid":"c14b8481babd642f5061e48c894725f4","score":"0.71448636","text":"public function getError()\n {\n return $this->errMsg;\n }","title":""},{"docid":"f464afc631a9b2d9f264a93b706720b1","score":"0.71363795","text":"public function getDescription()\n {\n return $this->message;\n }","title":""},{"docid":"0f5b4b0a57326a06e8077928c64daa94","score":"0.71243995","text":"public function error() : string\n {\n return !empty($this->error_msg) ? $this->error_msg : '' ;\n }","title":""},{"docid":"7dcf132725cdb1ad0f93795ae85a2a92","score":"0.7112695","text":"public static function _desc() { return 'Provides a graphical wrapper for Errors and Exceptions'; }","title":""},{"docid":"346a0f02a326156568e9d7fc7c5a9d82","score":"0.71103555","text":"public function getErrorMessage(): string {\n return $this->message;\n }","title":""},{"docid":"39983492a115c0e253cdf6a82ba765e2","score":"0.7109234","text":"public function getError() :string\n {\n return $this->error;\n }","title":""},{"docid":"4b7c13f53c880ae3be7dac32a94526c9","score":"0.7101948","text":"public function GetErrorMessage()\n {\n return $this->error_string;\n }","title":""},{"docid":"dfbcd21418352efb86e586267df03043","score":"0.70987654","text":"public function getErrorString()\n {\n $errors = $this -> getErrors();\n return !empty($errors) ? implode('', $errors) : '';\n }","title":""},{"docid":"a38df858ddaa517f96cc5df1800caeb1","score":"0.7084696","text":"public function getErrorMessage()\n {\n return $this->errorInfo[2];\n }","title":""},{"docid":"ff3ae68212484bc434875a37976bed28","score":"0.70846945","text":"public function getErrorString()\n {\n return $this->hasErrors ? implode(', ', ArrayHelper::getColumn($this->errors, 'message')) : '';\n }","title":""},{"docid":"0ee3eb5daaf81ecc83b0982250905e5e","score":"0.7070229","text":"public function errorMessage()\n {\n return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . \"
    \\n\";\n }","title":""},{"docid":"f2fabe0b343f3f342fbaab9872faa8ac","score":"0.7063558","text":"public function getErrorMessage()\n {\n $content = json_decode($this->response['content'], true);\n\n //Check if an error message is availbale.\n if((isset($content['error']) === true) && (isset($content['message']) === true)) {\n return $content['error'].': '.$content['message'];\n }\n\n //Return an empty string.\n return print_r($content,true) . \"*\";\n }","title":""},{"docid":"1ec79b99eed90acf8608b36d8dd653e3","score":"0.70555854","text":"public function message()\n {\n return $this->errorMessage;\n }","title":""},{"docid":"1ec79b99eed90acf8608b36d8dd653e3","score":"0.70555854","text":"public function message()\n {\n return $this->errorMessage;\n }","title":""},{"docid":"19faea41ec1fa582749001e21b94e1cf","score":"0.7049367","text":"public function getErrorString()\r\n {\r\n $string = \"\";\r\n\r\n foreach($this->error AS $error)\r\n {\r\n $string .= $error . \"\\n\";\r\n }\r\n\r\n return $string;\r\n }","title":""},{"docid":"fa35f749ffaea7ba9d3bfb6a52dffa6a","score":"0.70197135","text":"public function html_error() {\r\n\t\t\r\n\t\tif($this->title != null) {\r\n\t\t\treturn \"\".$this->title.\": \".$this->error;\r\n\t\t}else{\r\n\t\t\treturn \"Error: \".$this->error;\r\n\t\t}\r\n\t\t\r\n\t}","title":""},{"docid":"c9730162941758810008038e3306e442","score":"0.700436","text":"public function getErrorDetails(): string\n {\n return $this->getMessage();\n }","title":""},{"docid":"3820d3e5b43ef689ac86c11864542971","score":"0.6994359","text":"public function getErrorMessage()\n {\n if ($this->getSuccess()) {\n return '';\n }\n\n return trim($this->xml->StatusCode . ' ' . $this->xml->Status . ' ' . $this->xml->Reason);\n }","title":""},{"docid":"5157d01b7874a80d097f2e05a96fbd9a","score":"0.6978252","text":"public function error(): string\n {\n return $this->error ?? '';\n }","title":""},{"docid":"c038bf79972c7d23d699432974d0a998","score":"0.69512796","text":"public function errorMessage()\n {\n $errorMsg = '' . $this->getMessage() . \"
    \\n\";\n return $errorMsg;\n }","title":""},{"docid":"2fbce20a831eb4066036cba3027caa95","score":"0.69478756","text":"public function getError(): string;","title":""},{"docid":"16651abef6728de62baff3ade72bbdd8","score":"0.6939883","text":"public function getErrorMessage()\n {\n if(isset($this->get_vars['error'])) {\n return 'An error occured. Please try again';\n }\n \n return '';\n }","title":""},{"docid":"1052de13c8ed8dc36b7d57e764539ca1","score":"0.6938928","text":"public function message(): string\n {\n return $this->failure;\n }","title":""},{"docid":"98ddcd134ebd45d6c815f9931666d87a","score":"0.6930323","text":"protected function _getErrorMessage()\n {\n //get failed rules for the resource\n $rules = $this->getResource()->getAccessRule()->getFailedRules();\n $message = '';\n foreach ($rules as $rule) {\n if (!$rule->isAutoBuiltRule()) {\n $message .= __($rule->getTranslationKey()) . ' ';\n }\n }\n $message = rtrim($message);\n return $message;\n }","title":""},{"docid":"a32a0e9a57908360d12a6e4dcf254d90","score":"0.6910928","text":"public function message()\n {\n return $this->fail_message;\n }","title":""},{"docid":"1a32ac2592d39b571fa8c67f6e928720","score":"0.69052714","text":"public function getErrorDescription(){\n return mysql_error();\n }","title":""},{"docid":"14d9717304d11362cbdb8b139d1c489c","score":"0.690466","text":"public function getError(): string\n {\n return $this->lastError ?? '';\n }","title":""},{"docid":"e03a3dbe535e42b9a05cd139baf37d8f","score":"0.68966955","text":"public function message()\n {\n return $this->errors;\n }","title":""},{"docid":"230ca862d39ce7e3a83d5ad7c1a2a442","score":"0.6893097","text":"public function getMessageError()\n {\n return $this->msgError;\n }","title":""},{"docid":"e0e897c23c623505d200b1a7a10ca0cf","score":"0.6874268","text":"function getDescription(){\n\t\t/*** #pass */\n\t\treturn Message::_n($this->description());\n\t}","title":""},{"docid":"3a75fd99c7bf752e87443cdac9a441f0","score":"0.6863585","text":"public function message()\n {\n return 'label or directive error';\n }","title":""},{"docid":"c0fc4173847421ed2c9e1075096be432","score":"0.6854869","text":"public function getMessage()\n {\n return isset($this->data['errormessage']) ? $this->data['errormessage'] : null;\n }","title":""},{"docid":"338f10ac8252a9c732d6e85c8accff41","score":"0.68348473","text":"public function getFailureMessage() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"failure_message\");\n\t}","title":""},{"docid":"84af76ad6fd976a8ea8fdee8038edb87","score":"0.68143916","text":"public function getDescription() {\n if (empty($this->description)) {\n return $this->code;\n }\n return $this->description;\n }","title":""},{"docid":"26153674227fbd288c43c56f19d0ab9f","score":"0.68134224","text":"public function message() {\n\t\treturn $this->smError;\n\t}","title":""},{"docid":"8b22a12c968b0f07a2f8042fe20cc9c2","score":"0.6811645","text":"public function getError()\n {\n return $this->get('error', '');\n }","title":""},{"docid":"034f2d404d4c98720d725b1307e078e4","score":"0.6808419","text":"public function getError()\n {\n $strReturn = null;\n if (isset($this->arrResponse['error']['message'])) {\n $strReturn = $this->arrResponse['error']['message'];\n }\n return $strReturn;\n }","title":""},{"docid":"499ea292aa7ca1f7869b1a7b0cc667ea","score":"0.6800794","text":"public function getFullMessage()\n {\n\t\t\t$error_message = sprintf(\n\t\t\t\t\"Error with message '%s (Description: %s)' in file '%s' on line %d\",\n\t\t\t\tparent::getMessage(),\n $this->getDescription(),\n $this->getFilename(),\n $this->getLineNumber()\n\t\t\t);\n\t\t\treturn $error_message;\n\t\t}","title":""},{"docid":"165914f9e5d0be14ee920ba78685769d","score":"0.6798947","text":"public function toString()\n {\n $error = $this->result->getFirstError();\n\n return 'Invalid JsonApi. Error: '.$error->keyword().PHP_EOL;\n }","title":""},{"docid":"0a2aa20a89d21d92a02bf1d029a7a28e","score":"0.679598","text":"public function getError() {\n return $this->get(self::ERROR);\n }","title":""},{"docid":"0a2aa20a89d21d92a02bf1d029a7a28e","score":"0.679598","text":"public function getError() {\n return $this->get(self::ERROR);\n }","title":""},{"docid":"7e7d6f5f3a0e71b1f5f47401d1147618","score":"0.67953146","text":"public function errorMessage()\n\t{\n\t\treturn $this->_errmsg;\n\t}","title":""},{"docid":"fb9e98fec3dcfd5cc12d4cda6485e0b3","score":"0.6788874","text":"function get_error_message_str ()\r\n {\r\n return $this->error_message_str;\r\n }","title":""},{"docid":"27eb7029798f3b36de74b3590fa4a8e1","score":"0.67857504","text":"public function getDescription(): string\n {\n return (string) $this->description;\n }","title":""},{"docid":"dc5e15c587b8efa71a8925de43b11309","score":"0.6782834","text":"public function getError() {\n return $this->root->getAttribute('message');\n }","title":""},{"docid":"aab19d41f333d082422e4768b41605d5","score":"0.67824614","text":"function getErrorMessage() {\n return $this->error_message;\n }","title":""},{"docid":"20e098d4fbd8723a0e81d8b992650396","score":"0.6780535","text":"public function getDescription()\n {\n $value = $this->get(self::description);\n return $value === null ? (string)$value : $value;\n }","title":""},{"docid":"c9b14ad065b985e7a9f3d8e76ce713d3","score":"0.6777792","text":"public function errorMsg(){\n $errorMsg = $this->pdoStatement->errorInfo();\n return $errorMsg[2];\n }","title":""},{"docid":"a4f6f6b71312db253c660be6f768d692","score":"0.677517","text":"public static function getDescription() {\n\t\treturn '';\n\t}","title":""},{"docid":"196f9160318cb216daacc1e23b4a833e","score":"0.67602","text":"public function message()\n {\n return 'The validation error message.';\n }","title":""},{"docid":"196f9160318cb216daacc1e23b4a833e","score":"0.67602","text":"public function message()\n {\n return 'The validation error message.';\n }","title":""},{"docid":"196f9160318cb216daacc1e23b4a833e","score":"0.67602","text":"public function message()\n {\n return 'The validation error message.';\n }","title":""},{"docid":"196f9160318cb216daacc1e23b4a833e","score":"0.67602","text":"public function message()\n {\n return 'The validation error message.';\n }","title":""},{"docid":"196f9160318cb216daacc1e23b4a833e","score":"0.67602","text":"public function message()\n {\n return 'The validation error message.';\n }","title":""},{"docid":"196f9160318cb216daacc1e23b4a833e","score":"0.67602","text":"public function message()\n {\n return 'The validation error message.';\n }","title":""},{"docid":"35a07caa917cce6df8307f45c2dda055","score":"0.675228","text":"public function getErrorMessage()\n {\n return $this->error;\n }","title":""},{"docid":"9f233d233e885135870a6503d733c154","score":"0.67455596","text":"public function __toString(): string\n {\n return 'ERROR TYPE: ' . $this->type . '. DESCRIPTION TEST: ' . $this->description;\n }","title":""},{"docid":"d3489a32d965dfd1c0dde1d068067c7d","score":"0.6727811","text":"public function getErrorMessage()\n \t{\n \t\treturn $this->error;\n \t}","title":""},{"docid":"1b91538cd721f5fadcd7a47c27726c5b","score":"0.67225397","text":"function getMessage()\n {\n return ($this->error_message_prefix . $this->message);\n }","title":""},{"docid":"db4a1db166de5b05996ec69d1f819e39","score":"0.66910374","text":"public function getDescription() {\n return $this->get(self::DESCRIPTION);\n }","title":""},{"docid":"5dda3106fcebe6aee480c28390a71fa2","score":"0.6687775","text":"public function getErrorMessage()\n {\n return $this->errorMessage;\n }","title":""},{"docid":"5dda3106fcebe6aee480c28390a71fa2","score":"0.6687775","text":"public function getErrorMessage()\n {\n return $this->errorMessage;\n }","title":""},{"docid":"7be890f53f4c0fff27427499b7f41a02","score":"0.6687602","text":"public function getDescription()\n\t{\n\t\treturn '';\n\t}","title":""},{"docid":"722c5fad116f69917af4abb15730515c","score":"0.6678807","text":"protected function getJsonErrorDescription() {\n\t\t$error = '';\n\t\tswitch (json_last_error()) {\n\t\t\tcase JSON_ERROR_NONE:\n\t\t\t\t$error = 'No errors';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_DEPTH:\n\t\t\t\t$error = 'Maximum stack depth exceeded';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_STATE_MISMATCH:\n\t\t\t\t$error = 'Underflow or the modes mismatch';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_CTRL_CHAR:\n\t\t\t\t$error = 'Unexpected control character found';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_SYNTAX:\n\t\t\t\t$error = 'Syntax error, malformed JSON';\n\t\t\tbreak;\n\t\t\tcase JSON_ERROR_UTF8:\n\t\t\t\t$error = 'Malformed UTF-8 characters, possibly incorrectly encoded';\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$error = 'Unknown error';\n\t\t\tbreak;\n\t\t}\n\t\treturn $error;\n\t}","title":""},{"docid":"16437168041ea06be954e453c2b981dd","score":"0.6677953","text":"public function getFormattedErrorInfo()\n\t{\n\t\t$query = $this->getQuery();\n\t\t$error = $this->errorInfo();\n\n\t\t// Check the error code\n\t\tif ($error[0] === '00000') {\n\t\t\treturn 'No errors occured';\n\t\t}\n\n\t\t// Append error code\n\t\t$errorMessage = 'Error code ' . $error[0] . ':
     ' . $error[2] . '
    ';\n\n\t\t// Append query\n\t\t$errorMessage .= 'Executed query:
    ' . $query . '
    ';\n\n\t\t// Append possible solution, check missing \",\"\n\t\tpreg_match_all('/at line (?P\\d+)/', $error[2], $aMatches);\n\t\tif (isset($aMatches['lineNumber'])) {\n\t\t\t$lineInfo = array_slice(explode(PHP_EOL, $query), 4, 1);\n\t\t\t$lineProblem = array_pop($lineInfo);\n\n\t\t\t// Check if we are missing a \",\"\n\t\t\tif (strrchr($errorMessage, ',') !== strlen($lineProblem)) {\n\t\t\t\t$errorMessage .= 'Possible solution:
    Add a \",\" at the end of line: \"' . trim($lineProblem) . '\"
    ';\n\t\t\t} else {\n\t\t\t\t$errorMessage .= 'The error should exists in this line:
    ' . $query . '
    ';\n\t\t\t}\n\t\t}\n\n\t\treturn $errorMessage;\n\t}","title":""},{"docid":"bf52cdd35845e61b8a7cc045db74fbc8","score":"0.66752404","text":"public function failureMessage($description);","title":""},{"docid":"a7b57002527397f2fc47619f9c63d46f","score":"0.6673295","text":"public function getDescription() : string\n {\n return (string) $this->getField('Description');\n }","title":""},{"docid":"e850fda4a5106cd9d2f176810aafbf42","score":"0.66652346","text":"public function getMessage()\n {\n return rtText::get('valgrindNotAvailable');\n }","title":""},{"docid":"bc56f799e5515cedc33cd8fda314b54d","score":"0.66595834","text":"public function getError(): ?string\n {\n if ($e = $this->getException()) {\n return $e->getMessage();\n }\n\n return \"The item [{$this->class}] is not a valid task\";\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"e87f3d0785ed2fe6f46fe4276adde811","score":"0.66583306","text":"public function getDescription(): string\n {\n return $this->description;\n }","title":""},{"docid":"5207a884ac7f504042ff5eaf88e7aecc","score":"0.6650241","text":"public function getDescription()\n {\n return '';\n }","title":""},{"docid":"5207a884ac7f504042ff5eaf88e7aecc","score":"0.6650241","text":"public function getDescription()\n {\n return '';\n }","title":""},{"docid":"b44453cc06355a829fb3c9297181b17a","score":"0.6649932","text":"static public function error() {\n\t\t$ar = self::$db->errorInfo();\n\t\treturn $ar[2] . ' (' . $ar[1] . '/' . $ar[0] . ')';\n\t}","title":""}],"string":"[\n {\n \"docid\": \"5f62441f2f130f2be0738f6d145b1c49\",\n \"score\": \"0.8368376\",\n \"text\": \"public function getErrorDesc() {\\n\\t\\treturn $this->errorDesc;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"370ea3a059738f67a0d3e4ed60c3f132\",\n \"score\": \"0.81451356\",\n \"text\": \"public function getDescription()\\n {\\n\\t\\t\\treturn ($this->error_description)? $this->error_description:'';\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a1377de343f370e4b31a9e8856d8b1b4\",\n \"score\": \"0.77344495\",\n \"text\": \"public function text_error() {\\r\\n\\t\\t\\r\\n\\t\\tif($this->title != null) {\\r\\n\\t\\t\\treturn $this->title.\\\": \\\".$this->error;\\r\\n\\t\\t}else{\\r\\n\\t\\t\\treturn $this->error;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5d23869c0e2df489f4c7adc36028fb5c\",\n \"score\": \"0.7512672\",\n \"text\": \"public function getError() : string {\\r\\n return $this->errormessage;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9cca4d55eea418056446b380400112b0\",\n \"score\": \"0.74938214\",\n \"text\": \"protected function getFailureDescription()\\n {\\n return 'the page contains '.$this->toString();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38c48064c0655ed487a908daa89b8bdc\",\n \"score\": \"0.74743193\",\n \"text\": \"public function getMessage()\\n {\\n return $this->_error;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69e9f98cbb5d9e662a530a9c1b9e5a1d\",\n \"score\": \"0.74067223\",\n \"text\": \"public function error_message() { return $this->_error['message']; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23aa6f039c230208b1430088f6a9ec58\",\n \"score\": \"0.7404739\",\n \"text\": \"public function get_error_message()\\n\\t{\\n\\t\\treturn $this->error;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ab8ee690209d0dc9653f295e6ab47986\",\n \"score\": \"0.7365628\",\n \"text\": \"public function getMessage()\\n {\\n if ($this->isError()) {\\n if (!empty($this->data['errordescription'])) {\\n return $this->data['errordescription'];\\n }\\n if (!empty($this->data['errorcode'])) {\\n return $this->data['errorcode'];\\n }\\n }\\n\\n return null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ae385ebc95e4ac55f61b09e0a2c66058\",\n \"score\": \"0.72713995\",\n \"text\": \"function describe() {\\n return get_class($this) . \\\": \\\\\\\"\\\" \\n . $this->getMessage() . \\\"\\\\\\\" (status: \\\"\\n . $this->getStatus() . \\\", error code: \\\"\\n . $this->getErrorCode() . \\\", reference: \\\"\\n . $this->getReference() . \\\")\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c8e593bd637c229d341d37c8dfe276a\",\n \"score\": \"0.7226713\",\n \"text\": \"public function get_error_message() {\\n\\t\\treturn $this->error_message;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c05e2e6606bf55bd6bb7c738be405041\",\n \"score\": \"0.7220599\",\n \"text\": \"public function getErrorMessage() {\\n $error = $this->getError();\\n return $error['error']['message'];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13bb68a333959a25655fc4b50728d081\",\n \"score\": \"0.7210056\",\n \"text\": \"public function message()\\n {\\n return $this->error_message;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2be80c84c95d2f34bf4fb9174676b376\",\n \"score\": \"0.7209022\",\n \"text\": \"public function getErrorMsg() {\\n return $this->get(self::ERROR_MSG);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4e185a40cc534e8451a7d1787bcd8e8\",\n \"score\": \"0.72049576\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->message;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9759736fdde7f48f0fcacead49ff7112\",\n \"score\": \"0.71973366\",\n \"text\": \"public function message()\\n {\\n return $this->error;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9759736fdde7f48f0fcacead49ff7112\",\n \"score\": \"0.71973366\",\n \"text\": \"public function message()\\n {\\n return $this->error;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff4a8f78bf0f2607ac2265875f8b9781\",\n \"score\": \"0.71862936\",\n \"text\": \"public function errorMessage()\\n {\\n return $this->operation['error']['message'] ?? null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"34e8d4029624942921c09788067d8c86\",\n \"score\": \"0.7183678\",\n \"text\": \"public function getErrorString()\\n\\t{\\n\\t\\treturn $this->error_string;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35d3d6b8f9dc1e610a7033fb38ff363d\",\n \"score\": \"0.71617365\",\n \"text\": \"public function errorMsg() {\\n return $this->command_output[0];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c14b8481babd642f5061e48c894725f4\",\n \"score\": \"0.71448636\",\n \"text\": \"public function getError()\\n {\\n return $this->errMsg;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f464afc631a9b2d9f264a93b706720b1\",\n \"score\": \"0.71363795\",\n \"text\": \"public function getDescription()\\n {\\n return $this->message;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0f5b4b0a57326a06e8077928c64daa94\",\n \"score\": \"0.71243995\",\n \"text\": \"public function error() : string\\n {\\n return !empty($this->error_msg) ? $this->error_msg : '' ;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7dcf132725cdb1ad0f93795ae85a2a92\",\n \"score\": \"0.7112695\",\n \"text\": \"public static function _desc() { return 'Provides a graphical wrapper for Errors and Exceptions'; }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"346a0f02a326156568e9d7fc7c5a9d82\",\n \"score\": \"0.71103555\",\n \"text\": \"public function getErrorMessage(): string {\\n return $this->message;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"39983492a115c0e253cdf6a82ba765e2\",\n \"score\": \"0.7109234\",\n \"text\": \"public function getError() :string\\n {\\n return $this->error;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b7c13f53c880ae3be7dac32a94526c9\",\n \"score\": \"0.7101948\",\n \"text\": \"public function GetErrorMessage()\\n {\\n return $this->error_string;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dfbcd21418352efb86e586267df03043\",\n \"score\": \"0.70987654\",\n \"text\": \"public function getErrorString()\\n {\\n $errors = $this -> getErrors();\\n return !empty($errors) ? implode('', $errors) : '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a38df858ddaa517f96cc5df1800caeb1\",\n \"score\": \"0.7084696\",\n \"text\": \"public function getErrorMessage()\\n {\\n return $this->errorInfo[2];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ff3ae68212484bc434875a37976bed28\",\n \"score\": \"0.70846945\",\n \"text\": \"public function getErrorString()\\n {\\n return $this->hasErrors ? implode(', ', ArrayHelper::getColumn($this->errors, 'message')) : '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0ee3eb5daaf81ecc83b0982250905e5e\",\n \"score\": \"0.7070229\",\n \"text\": \"public function errorMessage()\\n {\\n return '' . htmlspecialchars($this->getMessage(), ENT_COMPAT | ENT_HTML401) . \\\"
    \\\\n\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f2fabe0b343f3f342fbaab9872faa8ac\",\n \"score\": \"0.7063558\",\n \"text\": \"public function getErrorMessage()\\n {\\n $content = json_decode($this->response['content'], true);\\n\\n //Check if an error message is availbale.\\n if((isset($content['error']) === true) && (isset($content['message']) === true)) {\\n return $content['error'].': '.$content['message'];\\n }\\n\\n //Return an empty string.\\n return print_r($content,true) . \\\"*\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ec79b99eed90acf8608b36d8dd653e3\",\n \"score\": \"0.70555854\",\n \"text\": \"public function message()\\n {\\n return $this->errorMessage;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ec79b99eed90acf8608b36d8dd653e3\",\n \"score\": \"0.70555854\",\n \"text\": \"public function message()\\n {\\n return $this->errorMessage;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19faea41ec1fa582749001e21b94e1cf\",\n \"score\": \"0.7049367\",\n \"text\": \"public function getErrorString()\\r\\n {\\r\\n $string = \\\"\\\";\\r\\n\\r\\n foreach($this->error AS $error)\\r\\n {\\r\\n $string .= $error . \\\"\\\\n\\\";\\r\\n }\\r\\n\\r\\n return $string;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fa35f749ffaea7ba9d3bfb6a52dffa6a\",\n \"score\": \"0.70197135\",\n \"text\": \"public function html_error() {\\r\\n\\t\\t\\r\\n\\t\\tif($this->title != null) {\\r\\n\\t\\t\\treturn \\\"\\\".$this->title.\\\": \\\".$this->error;\\r\\n\\t\\t}else{\\r\\n\\t\\t\\treturn \\\"Error: \\\".$this->error;\\r\\n\\t\\t}\\r\\n\\t\\t\\r\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9730162941758810008038e3306e442\",\n \"score\": \"0.700436\",\n \"text\": \"public function getErrorDetails(): string\\n {\\n return $this->getMessage();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3820d3e5b43ef689ac86c11864542971\",\n \"score\": \"0.6994359\",\n \"text\": \"public function getErrorMessage()\\n {\\n if ($this->getSuccess()) {\\n return '';\\n }\\n\\n return trim($this->xml->StatusCode . ' ' . $this->xml->Status . ' ' . $this->xml->Reason);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5157d01b7874a80d097f2e05a96fbd9a\",\n \"score\": \"0.6978252\",\n \"text\": \"public function error(): string\\n {\\n return $this->error ?? '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c038bf79972c7d23d699432974d0a998\",\n \"score\": \"0.69512796\",\n \"text\": \"public function errorMessage()\\n {\\n $errorMsg = '' . $this->getMessage() . \\\"
    \\\\n\\\";\\n return $errorMsg;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2fbce20a831eb4066036cba3027caa95\",\n \"score\": \"0.69478756\",\n \"text\": \"public function getError(): string;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16651abef6728de62baff3ade72bbdd8\",\n \"score\": \"0.6939883\",\n \"text\": \"public function getErrorMessage()\\n {\\n if(isset($this->get_vars['error'])) {\\n return 'An error occured. Please try again';\\n }\\n \\n return '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1052de13c8ed8dc36b7d57e764539ca1\",\n \"score\": \"0.6938928\",\n \"text\": \"public function message(): string\\n {\\n return $this->failure;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98ddcd134ebd45d6c815f9931666d87a\",\n \"score\": \"0.6930323\",\n \"text\": \"protected function _getErrorMessage()\\n {\\n //get failed rules for the resource\\n $rules = $this->getResource()->getAccessRule()->getFailedRules();\\n $message = '';\\n foreach ($rules as $rule) {\\n if (!$rule->isAutoBuiltRule()) {\\n $message .= __($rule->getTranslationKey()) . ' ';\\n }\\n }\\n $message = rtrim($message);\\n return $message;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a32a0e9a57908360d12a6e4dcf254d90\",\n \"score\": \"0.6910928\",\n \"text\": \"public function message()\\n {\\n return $this->fail_message;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1a32ac2592d39b571fa8c67f6e928720\",\n \"score\": \"0.69052714\",\n \"text\": \"public function getErrorDescription(){\\n return mysql_error();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14d9717304d11362cbdb8b139d1c489c\",\n \"score\": \"0.690466\",\n \"text\": \"public function getError(): string\\n {\\n return $this->lastError ?? '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e03a3dbe535e42b9a05cd139baf37d8f\",\n \"score\": \"0.68966955\",\n \"text\": \"public function message()\\n {\\n return $this->errors;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"230ca862d39ce7e3a83d5ad7c1a2a442\",\n \"score\": \"0.6893097\",\n \"text\": \"public function getMessageError()\\n {\\n return $this->msgError;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0e897c23c623505d200b1a7a10ca0cf\",\n \"score\": \"0.6874268\",\n \"text\": \"function getDescription(){\\n\\t\\t/*** #pass */\\n\\t\\treturn Message::_n($this->description());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3a75fd99c7bf752e87443cdac9a441f0\",\n \"score\": \"0.6863585\",\n \"text\": \"public function message()\\n {\\n return 'label or directive error';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c0fc4173847421ed2c9e1075096be432\",\n \"score\": \"0.6854869\",\n \"text\": \"public function getMessage()\\n {\\n return isset($this->data['errormessage']) ? $this->data['errormessage'] : null;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"338f10ac8252a9c732d6e85c8accff41\",\n \"score\": \"0.68348473\",\n \"text\": \"public function getFailureMessage() {\\n\\t\\treturn Temboo_Results::getSubItemByKey($this->base, \\\"failure_message\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84af76ad6fd976a8ea8fdee8038edb87\",\n \"score\": \"0.68143916\",\n \"text\": \"public function getDescription() {\\n if (empty($this->description)) {\\n return $this->code;\\n }\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"26153674227fbd288c43c56f19d0ab9f\",\n \"score\": \"0.68134224\",\n \"text\": \"public function message() {\\n\\t\\treturn $this->smError;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b22a12c968b0f07a2f8042fe20cc9c2\",\n \"score\": \"0.6811645\",\n \"text\": \"public function getError()\\n {\\n return $this->get('error', '');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"034f2d404d4c98720d725b1307e078e4\",\n \"score\": \"0.6808419\",\n \"text\": \"public function getError()\\n {\\n $strReturn = null;\\n if (isset($this->arrResponse['error']['message'])) {\\n $strReturn = $this->arrResponse['error']['message'];\\n }\\n return $strReturn;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"499ea292aa7ca1f7869b1a7b0cc667ea\",\n \"score\": \"0.6800794\",\n \"text\": \"public function getFullMessage()\\n {\\n\\t\\t\\t$error_message = sprintf(\\n\\t\\t\\t\\t\\\"Error with message '%s (Description: %s)' in file '%s' on line %d\\\",\\n\\t\\t\\t\\tparent::getMessage(),\\n $this->getDescription(),\\n $this->getFilename(),\\n $this->getLineNumber()\\n\\t\\t\\t);\\n\\t\\t\\treturn $error_message;\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"165914f9e5d0be14ee920ba78685769d\",\n \"score\": \"0.6798947\",\n \"text\": \"public function toString()\\n {\\n $error = $this->result->getFirstError();\\n\\n return 'Invalid JsonApi. Error: '.$error->keyword().PHP_EOL;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a2aa20a89d21d92a02bf1d029a7a28e\",\n \"score\": \"0.679598\",\n \"text\": \"public function getError() {\\n return $this->get(self::ERROR);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0a2aa20a89d21d92a02bf1d029a7a28e\",\n \"score\": \"0.679598\",\n \"text\": \"public function getError() {\\n return $this->get(self::ERROR);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7e7d6f5f3a0e71b1f5f47401d1147618\",\n \"score\": \"0.67953146\",\n \"text\": \"public function errorMessage()\\n\\t{\\n\\t\\treturn $this->_errmsg;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb9e98fec3dcfd5cc12d4cda6485e0b3\",\n \"score\": \"0.6788874\",\n \"text\": \"function get_error_message_str ()\\r\\n {\\r\\n return $this->error_message_str;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"27eb7029798f3b36de74b3590fa4a8e1\",\n \"score\": \"0.67857504\",\n \"text\": \"public function getDescription(): string\\n {\\n return (string) $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc5e15c587b8efa71a8925de43b11309\",\n \"score\": \"0.6782834\",\n \"text\": \"public function getError() {\\n return $this->root->getAttribute('message');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aab19d41f333d082422e4768b41605d5\",\n \"score\": \"0.67824614\",\n \"text\": \"function getErrorMessage() {\\n return $this->error_message;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"20e098d4fbd8723a0e81d8b992650396\",\n \"score\": \"0.6780535\",\n \"text\": \"public function getDescription()\\n {\\n $value = $this->get(self::description);\\n return $value === null ? (string)$value : $value;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9b14ad065b985e7a9f3d8e76ce713d3\",\n \"score\": \"0.6777792\",\n \"text\": \"public function errorMsg(){\\n $errorMsg = $this->pdoStatement->errorInfo();\\n return $errorMsg[2];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a4f6f6b71312db253c660be6f768d692\",\n \"score\": \"0.677517\",\n \"text\": \"public static function getDescription() {\\n\\t\\treturn '';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"196f9160318cb216daacc1e23b4a833e\",\n \"score\": \"0.67602\",\n \"text\": \"public function message()\\n {\\n return 'The validation error message.';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"196f9160318cb216daacc1e23b4a833e\",\n \"score\": \"0.67602\",\n \"text\": \"public function message()\\n {\\n return 'The validation error message.';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"196f9160318cb216daacc1e23b4a833e\",\n \"score\": \"0.67602\",\n \"text\": \"public function message()\\n {\\n return 'The validation error message.';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"196f9160318cb216daacc1e23b4a833e\",\n \"score\": \"0.67602\",\n \"text\": \"public function message()\\n {\\n return 'The validation error message.';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"196f9160318cb216daacc1e23b4a833e\",\n \"score\": \"0.67602\",\n \"text\": \"public function message()\\n {\\n return 'The validation error message.';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"196f9160318cb216daacc1e23b4a833e\",\n \"score\": \"0.67602\",\n \"text\": \"public function message()\\n {\\n return 'The validation error message.';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"35a07caa917cce6df8307f45c2dda055\",\n \"score\": \"0.675228\",\n \"text\": \"public function getErrorMessage()\\n {\\n return $this->error;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9f233d233e885135870a6503d733c154\",\n \"score\": \"0.67455596\",\n \"text\": \"public function __toString(): string\\n {\\n return 'ERROR TYPE: ' . $this->type . '. DESCRIPTION TEST: ' . $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3489a32d965dfd1c0dde1d068067c7d\",\n \"score\": \"0.6727811\",\n \"text\": \"public function getErrorMessage()\\n \\t{\\n \\t\\treturn $this->error;\\n \\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1b91538cd721f5fadcd7a47c27726c5b\",\n \"score\": \"0.67225397\",\n \"text\": \"function getMessage()\\n {\\n return ($this->error_message_prefix . $this->message);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db4a1db166de5b05996ec69d1f819e39\",\n \"score\": \"0.66910374\",\n \"text\": \"public function getDescription() {\\n return $this->get(self::DESCRIPTION);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5dda3106fcebe6aee480c28390a71fa2\",\n \"score\": \"0.6687775\",\n \"text\": \"public function getErrorMessage()\\n {\\n return $this->errorMessage;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5dda3106fcebe6aee480c28390a71fa2\",\n \"score\": \"0.6687775\",\n \"text\": \"public function getErrorMessage()\\n {\\n return $this->errorMessage;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7be890f53f4c0fff27427499b7f41a02\",\n \"score\": \"0.6687602\",\n \"text\": \"public function getDescription()\\n\\t{\\n\\t\\treturn '';\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"722c5fad116f69917af4abb15730515c\",\n \"score\": \"0.6678807\",\n \"text\": \"protected function getJsonErrorDescription() {\\n\\t\\t$error = '';\\n\\t\\tswitch (json_last_error()) {\\n\\t\\t\\tcase JSON_ERROR_NONE:\\n\\t\\t\\t\\t$error = 'No errors';\\n\\t\\t\\tbreak;\\n\\t\\t\\tcase JSON_ERROR_DEPTH:\\n\\t\\t\\t\\t$error = 'Maximum stack depth exceeded';\\n\\t\\t\\tbreak;\\n\\t\\t\\tcase JSON_ERROR_STATE_MISMATCH:\\n\\t\\t\\t\\t$error = 'Underflow or the modes mismatch';\\n\\t\\t\\tbreak;\\n\\t\\t\\tcase JSON_ERROR_CTRL_CHAR:\\n\\t\\t\\t\\t$error = 'Unexpected control character found';\\n\\t\\t\\tbreak;\\n\\t\\t\\tcase JSON_ERROR_SYNTAX:\\n\\t\\t\\t\\t$error = 'Syntax error, malformed JSON';\\n\\t\\t\\tbreak;\\n\\t\\t\\tcase JSON_ERROR_UTF8:\\n\\t\\t\\t\\t$error = 'Malformed UTF-8 characters, possibly incorrectly encoded';\\n\\t\\t\\tbreak;\\n\\t\\t\\tdefault:\\n\\t\\t\\t\\t$error = 'Unknown error';\\n\\t\\t\\tbreak;\\n\\t\\t}\\n\\t\\treturn $error;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"16437168041ea06be954e453c2b981dd\",\n \"score\": \"0.6677953\",\n \"text\": \"public function getFormattedErrorInfo()\\n\\t{\\n\\t\\t$query = $this->getQuery();\\n\\t\\t$error = $this->errorInfo();\\n\\n\\t\\t// Check the error code\\n\\t\\tif ($error[0] === '00000') {\\n\\t\\t\\treturn 'No errors occured';\\n\\t\\t}\\n\\n\\t\\t// Append error code\\n\\t\\t$errorMessage = 'Error code ' . $error[0] . ':
     ' . $error[2] . '
    ';\\n\\n\\t\\t// Append query\\n\\t\\t$errorMessage .= 'Executed query:
    ' . $query . '
    ';\\n\\n\\t\\t// Append possible solution, check missing \\\",\\\"\\n\\t\\tpreg_match_all('/at line (?P\\\\d+)/', $error[2], $aMatches);\\n\\t\\tif (isset($aMatches['lineNumber'])) {\\n\\t\\t\\t$lineInfo = array_slice(explode(PHP_EOL, $query), 4, 1);\\n\\t\\t\\t$lineProblem = array_pop($lineInfo);\\n\\n\\t\\t\\t// Check if we are missing a \\\",\\\"\\n\\t\\t\\tif (strrchr($errorMessage, ',') !== strlen($lineProblem)) {\\n\\t\\t\\t\\t$errorMessage .= 'Possible solution:
    Add a \\\",\\\" at the end of line: \\\"' . trim($lineProblem) . '\\\"
    ';\\n\\t\\t\\t} else {\\n\\t\\t\\t\\t$errorMessage .= 'The error should exists in this line:
    ' . $query . '
    ';\\n\\t\\t\\t}\\n\\t\\t}\\n\\n\\t\\treturn $errorMessage;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bf52cdd35845e61b8a7cc045db74fbc8\",\n \"score\": \"0.66752404\",\n \"text\": \"public function failureMessage($description);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a7b57002527397f2fc47619f9c63d46f\",\n \"score\": \"0.6673295\",\n \"text\": \"public function getDescription() : string\\n {\\n return (string) $this->getField('Description');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e850fda4a5106cd9d2f176810aafbf42\",\n \"score\": \"0.66652346\",\n \"text\": \"public function getMessage()\\n {\\n return rtText::get('valgrindNotAvailable');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bc56f799e5515cedc33cd8fda314b54d\",\n \"score\": \"0.66595834\",\n \"text\": \"public function getError(): ?string\\n {\\n if ($e = $this->getException()) {\\n return $e->getMessage();\\n }\\n\\n return \\\"The item [{$this->class}] is not a valid task\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e87f3d0785ed2fe6f46fe4276adde811\",\n \"score\": \"0.66583306\",\n \"text\": \"public function getDescription(): string\\n {\\n return $this->description;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5207a884ac7f504042ff5eaf88e7aecc\",\n \"score\": \"0.6650241\",\n \"text\": \"public function getDescription()\\n {\\n return '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5207a884ac7f504042ff5eaf88e7aecc\",\n \"score\": \"0.6650241\",\n \"text\": \"public function getDescription()\\n {\\n return '';\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b44453cc06355a829fb3c9297181b17a\",\n \"score\": \"0.6649932\",\n \"text\": \"static public function error() {\\n\\t\\t$ar = self::$db->errorInfo();\\n\\t\\treturn $ar[2] . ' (' . $ar[1] . '/' . $ar[0] . ')';\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":784,"cells":{"query_id":{"kind":"string","value":"fbdbdab7706aa244ead79e839624452a"},"query":{"kind":"string","value":"// relationship between todos and items"},"positive_passages":{"kind":"list like","value":[{"docid":"305be780a868f714e63fe0858f1a3d33","score":"0.5846517","text":"public function items()\n {\n return $this->hasMany('App\\Item');\n }","title":""}],"string":"[\n {\n \"docid\": \"305be780a868f714e63fe0858f1a3d33\",\n \"score\": \"0.5846517\",\n \"text\": \"public function items()\\n {\\n return $this->hasMany('App\\\\Item');\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"4a70c65a043004c38014d6495ca33682","score":"0.68108135","text":"public function todos()\n {\n return $this->hasMany('App\\Models\\Todo');\n }","title":""},{"docid":"7ecab6fefaa5b5a81e9003497f9471b7","score":"0.67878985","text":"public function todos()\n {\n return $this->hasMany('App\\Todo');\n }","title":""},{"docid":"d0fe2cb13bf0f53a630df49c4509fbbe","score":"0.66327155","text":"public function todos()\n {\n return $this->hasMany(Todo::class);\n }","title":""},{"docid":"9b68a2d3783afd1389937ae3164f0b55","score":"0.65953755","text":"public function todos()\n {\n return $this->hasMany(Todo::class, 'todolist_id', 'id');\n }","title":""},{"docid":"0e09fb099e58f735d4a516e667842121","score":"0.6451311","text":"public function todo()\n {\n return $this->hasMany('App\\Models\\Security\\Todo', 'user_id');\n }","title":""},{"docid":"ac7f8456e769d5f3626e235647617961","score":"0.6431436","text":"public function todo() {\n return $this->hasMany('App\\ProjectTodo');\n }","title":""},{"docid":"80c3567646a374758a3c8ff8dde05b74","score":"0.621157","text":"public function todo()\n {\n return $this->belongsTo('App\\Todo');\n }","title":""},{"docid":"d96a879cf9c1095965b9602e321d49e5","score":"0.61120164","text":"public function items()\n {\n \treturn $this->hasMany('App\\Item');\n }","title":""},{"docid":"b6e017e8742e4e4c8f3e677532ab60de","score":"0.6076279","text":"public function testTodoItem()\n {\n $this->app['session']->set('user', [\n 'id' => 1,\n 'username' => 'user1',\n 'password' => 'user1',\n ]);\n\n $todo = [\n 'id' => 123,\n 'description' => 'mock todo description',\n 'completed' => '1',\n ];\n\n $db = $this->mockDb(['fetchAssoc']);\n\n $db->expects($this->any())\n ->method('fetchAssoc')\n ->with(\"SELECT id, description, completed FROM todos WHERE id = ?\", [\n 123,\n ])\n ->willReturn($todo);\n $this->app['db'] = $db;\n\n $client = $this->createClient();\n $crawler = $client->request('GET', '/api/v1/todo/123', [], [], ['CONTENT_TYPE' => 'application/json']);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertEquals('{\"success\":true,\"todo\":{\"id\":123,\"description\":\"mock todo description\",\"completed\":\"1\"}}', $client->getResponse()->getContent());\n }","title":""},{"docid":"5fe66ffc5f1becb00cf29fd53f5342b6","score":"0.59959406","text":"public function items()\n {\n \treturn $this->hasMany('Item');\n }","title":""},{"docid":"3b9c154b3a6d0da4d9941e1392dc7e1d","score":"0.59287643","text":"public function items(){\n //we're connecting it to the newitem model\n //note one to may uses 'hasMany'. One to one uses 'hasOne'\n return $this->hasMany('App\\Newitem');\n }","title":""},{"docid":"6f6da856f590257ebd43fabb2a0f982c","score":"0.5926159","text":"public function items()\n {\n return $this->hasMany('App\\Models\\Access\\item');\n }","title":""},{"docid":"453707da7a233122e1ce3f91ddbfb011","score":"0.5921219","text":"public function items(){\n return $this->hasMany('App\\Item');\n }","title":""},{"docid":"0c60dae82f0d0cfcf15b05692c2a765b","score":"0.59031963","text":"public function todos(){\n return $this->all();\n }","title":""},{"docid":"40cd72fc78d9109cfe1b05ee98e0e5ad","score":"0.59018207","text":"public function item()\n {\n return $this->belongsTo(Item::class);\n }","title":""},{"docid":"2d9444c28d7a67bce41b849595c58a9c","score":"0.58087444","text":"public function items(){\n return $this->hasMany('Item','no');\n }","title":""},{"docid":"d88768a79e8270a36ecb61c49bb1796a","score":"0.58060825","text":"public function todos(){\n $lista = item::select(\"id\",\"nombre\",\"precio\")->get();\n return ['data' => $lista];\n }","title":""},{"docid":"f7013f0309e01bb7fbe539e2b38359a2","score":"0.5799104","text":"public function item() \n {\n return $this->belongsTo('App\\Models\\Item\\Item');\n }","title":""},{"docid":"788d278c5f019cefd31803eb1991435a","score":"0.5794537","text":"public function items()\n {\n return $this->hasMany('App\\Models\\Item');\n }","title":""},{"docid":"4fc623330862f8351d82998ddef2800b","score":"0.57677907","text":"public function item()\n {\n return $this->belongsTo('App\\Models\\Item', 'id_parent');\n\t}","title":""},{"docid":"6447c6f28486ad6d65b82d255981142b","score":"0.5765491","text":"public function item() {\n return $this->belongsTo('App\\Item');\n }","title":""},{"docid":"2f9b70f6956ea7b47037c52e1f858b3d","score":"0.5725856","text":"public function itemfodas()\n {\n return $this->hasMany('App\\Itemfoda');\n }","title":""},{"docid":"5ad7f40e28b05264e53fc60903107687","score":"0.5695152","text":"public function item()\n {\n return $this->belongsTo(Item::class, 'item_id');\n }","title":""},{"docid":"f98cbd7f1ca120b13d7818361de5c6b2","score":"0.5678163","text":"public function item()\n\t{\n\t\treturn $this->belongsTo('Item');\n\t}","title":""},{"docid":"607fc6d09a80d0bf642de402f526be5d","score":"0.565402","text":"public function items() {\n\t\treturn $this->hasMany(Item);\n\t}","title":""},{"docid":"c46fb0098299e44d6b8692e55bd4dcb9","score":"0.56474006","text":"public function items()\n\t{\n\t\treturn $this->hasMany('Item');\n\t}","title":""},{"docid":"f02175fa3960d14cd8620b8cbead3b3a","score":"0.5634289","text":"public function items()\n {\n return $this->hasMany('App\\OrderItem');\n }","title":""},{"docid":"4c78d6141668c49ab7ec79741c359491","score":"0.56236225","text":"public function testOrderOrderItemOneToMany()\n\t{\n\t\t$order = Order::create(array(\n\t\t\t'id' => 5,\n\t\t\t'user_id' => 8\n\t\t));\n\t\t$orderItem = new OrderItem(array('id' => 20));\n\n\t\t$order->items()->insert($orderItem);\n\n\t\t$orderItem = OrderItem::find(20);\n\t\t$this->assertEquals($order->id, $orderItem->order_id);\n\n\t\t$orderItem = Order::find(5)->items()->first();\n\t\t$this->assertEquals($order->id, $orderItem->order_id);\n\n\t\t$order = OrderItem::find(20)->order()->first();\n\t\t$this->assertEquals(8, $order->user_id);\n\t}","title":""},{"docid":"d86bd1b989e0346b712751c1d9b75792","score":"0.5562278","text":"public function items() {\n return $this->belongsToMany('App\\Item', 'invoice_items', 'invoice_id', 'item_id');\n }","title":""},{"docid":"3bb8915b4cc3b4e6f2e74f17889c1e14","score":"0.54866177","text":"public function getTodo()\n {\n return $this->todo;\n }","title":""},{"docid":"64aab04d598782a22d4ad90787d7a16c","score":"0.54419345","text":"public function items(){\n return $this->hasMany('Sales\\Quote\\Models\\QuoteItem');\n }","title":""},{"docid":"916e65fd4ed763f400231a931ae410ec","score":"0.54104877","text":"public function Item()\n {\n return $this->belongsToMany('junecity\\shop\\models\\Item');\n }","title":""},{"docid":"d3ffe8bfb47e41c644f5ab505c2535f3","score":"0.5399813","text":"protected function item() {\n return $this->belongsTo('App\\Model\\Item');\n }","title":""},{"docid":"50fb056347133b91cda96362ad368fa7","score":"0.5396898","text":"public function show(Todos $todos)\n {\n //\n }","title":""},{"docid":"b4b647b35fc3238e751ad817bfda837e","score":"0.53847873","text":"public function items()\n {\n return $this->hasMany(OrderItemDetails::class, 'order_id', 'id');\n }","title":""},{"docid":"0d7b9ded943e09a1cbefb395a38d113f","score":"0.5345151","text":"public static function getListsWithTodos()\n {\n session_start();\n\n // Check if auth session is available\n if (isset($_SESSION[\"id\"])) {\n\n // Join \"lists\" and \"todos\" table, create list containing list_name, list_id, (todo) id, created_by, title, description, status, created_at\n $data = self::query('SELECT lists.NAME AS list_name, lists.id AS list_id, todos.id, todos.created_by, todos.title, todos.description, todos.status, todos.created_at FROM lists LEFT JOIN todos ON lists.id = todos.list_id WHERE lists.created_by = ? ', array($_SESSION[\"id\"]));\n\n // Reduce above mentioned data and order them by list. Create one object for each list, with all todos associated to said list as children.\n $reduced_data = array_reduce($data, function ($acc, $curr) {\n $list_id = $curr[\"list_id\"];\n $list_name = $curr[\"list_name\"];\n\n unset($curr[\"list_id\"]);\n unset($curr[\"list_name\"]);\n\n $acc[$list_id][\"name\"] = $list_name;\n if (isset($curr[\"id\"])) {\n $acc[$list_id][\"todos\"][] = $curr;\n }\n\n return $acc;\n }, []);\n\n return $reduced_data;\n } else {\n echo \"No user logged in\";\n }\n }","title":""},{"docid":"5422fdc2fcf6cf8d920509e1d08ca7a2","score":"0.53217727","text":"public function createAction()\n {\n\t $todo = new TodoItem();\n\t $todo->title = $this->_params['title'];\n\t $todo->description = $this->_params['description'];\n\t $todo->due_date = $this->_params['due_date'];\n\t $todo->is_done = 'false';\n\t \n\t //pass the user's username and password to authenticate the user\n\t $todo->save($this->_params['username'], $this->_params['userpass']);\n\t \n\t //return the todo item in array format\n\t return $todo->toArray();\n }","title":""},{"docid":"e92c0618f0bf679826fa2dd93094cc7e","score":"0.5320402","text":"public function print_todo() {\n\t\t\tforeach ($this->todo as $id => $item) {\n\t\t\t\techo \"
  • \" . $item . PHP_EOL .\n\t\t\t\t\t \"
    name . \"&act=del_todo&id=\" . $id . \"\\\"> name . \"&act=todo_to_doing&id=\" . $id . \"\\\">
  • \";\n\t\t\t}\n\t\t}","title":""},{"docid":"23737afa0896fd8e663d5f006c924cc2","score":"0.53175646","text":"public function todos($id = null)\n {\n $deal = $this->deal->findOrFail($id);\n $todos = new TodosResource($deal->todos()->with(['agent:id,username,name'])->orderBy('id', 'desc')->paginate(50));\n return response($todos, Response::HTTP_OK);\n }","title":""},{"docid":"3f0a8d1d4c41d3c8bb1dd9946681c968","score":"0.5311732","text":"public function order_item()\n {\n //Redireccion\n return $this->hasOne('App\\OrderItem');\n }","title":""},{"docid":"11fd091c3a45a5ab55cd4d13e3dbad5f","score":"0.5272882","text":"public function test_can_create_todo() {\n $data = [\n 'title' => $this->faker->sentence,\n ];\n $this->post(route('todos.store'), $data)\n ->assertStatus(201);\n }","title":""},{"docid":"e45b9eabcc324d0459266b50e55ed105","score":"0.5257306","text":"public function order_item()\n { \n return $this->hasMany('App\\Model\\OrderItem');\n }","title":""},{"docid":"7cad4a145b0fba6886a4542f01f8aa67","score":"0.5253484","text":"public function todos($id = null)\n {\n $indexing = $this->indexing->findOrFail($id);\n $todos = new TodosResource($indexing->todos()->with(['agent:id,username,name'])->orderBy('id', 'desc')->paginate(50));\n return response($todos, Response::HTTP_OK);\n }","title":""},{"docid":"089a8fa2b80603033f3215b900ff0bf2","score":"0.5251132","text":"public function getItems()\n {\n return $this->hasMany(Item::className(), ['item_id' => 'item_id'])->viaTable('cos_item', ['cos_id' => 'cos_id']);\n }","title":""},{"docid":"8ea01b4639be4256b17b1f5a2cda261e","score":"0.5237535","text":"public function items()\n {\n \treturn $this->hasMany(Item::class, 'vendor_id');\n }","title":""},{"docid":"23dabf2111d551bf4f47ad95ce14ec15","score":"0.5230548","text":"public function orderItems(){\n return $this->hasMany(ItemOrder::class);\n }","title":""},{"docid":"d5b2e070bd2aeb627acd0a9254e5985b","score":"0.52190965","text":"public function testGetTodoTask(): void\n {\n $response = $this->request('GET', $this->findOneIriBy(TodoTask::class, ['description' => 'Develop TODO test']));\n $json = json_decode($response->getContent(), true);\n\n //assert there is a valid reply\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals('application/ld+json; charset=utf-8', $response->headers->get('Content-Type'));\n\n //assert that description of the returned JSON object is correct\n $this->assertEquals('Develop TODO test', $json['description']);\n\n //assert that the returned task is properly serialized\n $this->assertArrayHasKey('@id', $json);\n $this->assertArrayHasKey('@type', $json);\n $this->assertArrayHasKey('@context', $json);\n $this->assertArrayHasKey('id', $json);\n $this->assertArrayHasKey('state', $json);\n $this->assertArrayHasKey('description', $json);\n $this->assertArrayHasKey('createDate', $json);\n $this->assertArrayHasKey('list', $json);\n }","title":""},{"docid":"fb472f32d7dac54dad413c3b844c0f79","score":"0.52032095","text":"function testToDo() {\n// $this->todo('factory to create new');\n }","title":""},{"docid":"070fdb03dd666d57e88584ce59095baf","score":"0.51949","text":"public function orderItem()\n {\n return $this->hasMany('App\\OrderItem', 'orderid', 'id' );\n }","title":""},{"docid":"4840fc27e2ba86a1bc4a5e8a36d16252","score":"0.51584846","text":"public function testTodoList()\n {\n $this->app['session']->set('user', [\n 'id' => 1,\n 'username' => 'user1',\n 'password' => 'user1',\n ]);\n\n $todos = [\n [\n 'id' => 123,\n 'description' => 'mock todo description',\n 'completed' => '1',\n ],\n ];\n\n $db = $this->mockDb(['fetchAll']);\n $db->expects($this->any())\n ->method('fetchAll')\n ->with(\"SELECT id, description, completed FROM todos WHERE user_id = ?\", [\n 1,\n ])\n ->willReturn($todos);\n $this->app['db'] = $db;\n\n $client = $this->createClient();\n $crawler = $client->request('GET', '/api/v1/todo', [], [], ['CONTENT_TYPE' => 'application/json']);\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertEquals('{\"success\":true,\"todos\":[{\"id\":123,\"description\":\"mock todo description\",\"completed\":\"1\"}]}', $client->getResponse()->getContent());\n }","title":""},{"docid":"8ef9a2609c6b5f88f98c01f966c1bc59","score":"0.51536524","text":"public function listTodo(){\n\n /**Store user's todo in $todos */\n $todos = auth()->user()->todos;\n\n return view('admin.listTodo')\n ->with('todos', $todos); \n }","title":""},{"docid":"19c3718d71b20ce06401ce524a85bbde","score":"0.5144039","text":"public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todo($todo){\n $userid = \\SYSTEM\\SECURITY\\security::getUser()->id;\n $vars = \\SYSTEM\\SQL\\SYS_SAIMOD_TODO_TODO::Q1(array($todo,$userid));\n $vars['trace'] = implode('
    ', array_slice(explode('#', $vars['trace']), 1, -1));\n $vars['display_assign'] = $vars['assignee_id'] != $userid ? '' : 'display: none;';\n $vars['display_deassign'] = $vars['assignee_id'] == $userid ? '' : 'display: none;';\n $vars['assignees'] = '';\n $res = \\SYSTEM\\SQL\\SYS_SAIMOD_TODO_ASSIGNEES::QQ(array($todo,$userid));\n while($row = $res->next()){\n $vars['assignees'] .= \\SYSTEM\\PAGE\\replace::replaceFile((new \\SYSTEM\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl'))->SERVERPATH(), $row);\n }\n $vars = array_merge($vars,\\SYSTEM\\PAGE\\text::tag(\\SYSTEM\\SQL\\system_text::TAG_SAI_TODO));\n return $vars[\\SYSTEM\\SQL\\system_todo::FIELD_TYPE] == \\SYSTEM\\SQL\\system_todo::FIELD_TYPE_USER ?\n \\SYSTEM\\PAGE\\replace::replaceFile((new \\SYSTEM\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl'))->SERVERPATH(), $vars) :\n \\SYSTEM\\PAGE\\replace::replaceFile((new \\SYSTEM\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl'))->SERVERPATH(), $vars);}","title":""},{"docid":"e449ba36f8a38d029d03acb69e406f8f","score":"0.5136388","text":"public function delete(){\n\t\t$todoItems = TodoItem::model()->findAllByAttributes(['list_id' => $this->id]);\n\t\tforeach ($todoItems as $ti) {\n\t\t\t$tu->delete();\n\t\t}\n\t\tNotification::remove('Todo', $this->id);\n\t\treturn parent::delete();\n\t}","title":""},{"docid":"593a7519a782955c1123d7dc14ade830","score":"0.5130684","text":"static function item_deleted($item) {\r\n $existingFaces = ORM::factory(\"items_face\")\r\n ->where(\"item_id\", \"=\", $item->id)\r\n ->find_all();\r\n if (count($existingFaces) > 0) {\r\n db::build()->delete(\"items_faces\")->where(\"item_id\", \"=\", $item->id)->execute();\r\n }\r\n\r\n $existingNotes = ORM::factory(\"items_note\")\r\n ->where(\"item_id\", \"=\", $item->id)\r\n ->find_all();\r\n if (count($existingNotes) > 0) {\r\n db::build()->delete(\"items_notes\")->where(\"item_id\", \"=\", $item->id)->execute();\r\n }\r\n\r\n $existingUsers = ORM::factory(\"items_user\")\r\n ->where(\"item_id\", \"=\", $item->id)\r\n ->find_all();\r\n if (count($existingUsers) > 0) {\r\n db::build()->delete(\"items_users\")->where(\"item_id\", \"=\", $item->id)->execute();\r\n }\r\n }","title":""},{"docid":"e6b17d5d43c64b19462982b920c28af3","score":"0.5128146","text":"public function getToDos($project_id,$todo_list_id)\n\t{\n\t\treturn $this->get_data('https://basecamp.com/'.$this->accout_id.'/api/v1/projects/'.$project_id.'/todolists/'.$todo_list_id.'.json');\t\n\t}","title":""},{"docid":"64489906181b1d084ab526860d071ab5","score":"0.51197714","text":"public function item(){\n \treturn $this->belongsToMany('App\\Models\\Item\\Item')->withPivot('itemlist_id','qty','uom','created_at','updated_at');\n }","title":""},{"docid":"6e0406aa6c768869354bdb28e661b857","score":"0.5105048","text":"public function items() {\n return $this->hasMany(InvoiceItemProxy::modelClass())->whereNull('parent_id');\n }","title":""},{"docid":"e0c68120a679348cdf46b94deeede5ee","score":"0.5095908","text":"public function show(Todo $todo)\n {\n\n }","title":""},{"docid":"b21c60e914fb1def197b163da781052b","score":"0.5092529","text":"function append_todolist($todo_item)\t{ \n foreach($todo_item as $item){\n echo $item.'
    ';\n }\n \n}","title":""},{"docid":"3f3fc3abb50932603886bfa85c3ca062","score":"0.50910187","text":"public function workItems()\n {\n \treturn $this->belongsToMany('App\\WorkItem');\n }","title":""},{"docid":"4ec1ebbbd18919fc9456acf5a06a3760","score":"0.5072363","text":"function create_todo_item()\n{\n register_post_type('todo-item', [\n 'labels' => [\n 'name' => 'ToDo Items',\n 'singular_name' => 'ToDO item',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New ToDo Item',\n 'edit' => 'Edit',\n 'edit_item' => 'Edit ToDo Item',\n 'new_item' => 'New ToDo Item',\n 'view' => 'View',\n 'view_item' => 'View ToDo Item',\n 'search_items' => 'Search ToDo Items',\n 'not_found' => 'No ToDo Items found',\n 'not_found_in_trash' => 'No ToDo Items found in Trash',\n 'parent' => 'Parent ToDo Item',\n ],\n 'description' => 'ToDo items are displayed In TodO List plugin.',\n 'public' => true,\n 'supports' => ['title', 'editor', 'custom-fields'],\n 'menu_icon' => 'dashicons-editor-ul',\n 'has_archive' => true,\n ]);\n}","title":""},{"docid":"c98ebe1d6af14c4dd9a8dd7f395214f9","score":"0.5070802","text":"public function __construct(Todo $todo)\n\t{\n\t\t$this->todo = $todo;\n\t}","title":""},{"docid":"33b6d63f2420646ceb13e2037f086015","score":"0.5067051","text":"public function index()\n {\n \n $id = Auth::id(); //kirjautuneen käyttäjän id muuttujaan\n \n $results = DB::table('items')\n ->where('user_id', $id) //Missä user_id on käyttäjän id\n ->orderBy('items.id', 'DESC') //Järjestyksessä uusin esin\n ->get(); \n\n \n\n #Tekee Tyhjän rivin todo listalle ja tulee unshift errori tulee kun tehdään uusi tehtävä\n /* if($results->isEmpty()) {\n return response(['message' => 'Tehtäviä ei ole.']);\n } else {\n return $results;\n } */\n \n //Postman palauttaa tyhjän arrayn, jos ei ole tehtäviä\n return $results;\n \n }","title":""},{"docid":"80de576e35289d38b093dc222d84d71b","score":"0.5059461","text":"public function testCreateItem()\n {\n }","title":""},{"docid":"d8ba78e9987c5a9c5360960a66c4bfbc","score":"0.50482064","text":"public function items() {\n return $this->hasMany('Nixzen\\Models\\Item', 'unittype_id');\n }","title":""},{"docid":"5e56906fd515758d4647bb10af3a3e1c","score":"0.5043584","text":"function syncItems($table,$items,$where=[]){\n\t\tDb::startTransaction();\n\t\t//collect ids to exclude from delete\n\t\t$ids = [];\n\n\t\tforeach((array)$items as $item){\n\t\t\t$keys = Control::$model->flatMatchedKeys($table,$item);\n\t\t\t$itemWhere = array_merge($where,Arrays::extract($keys,$in));\n\t\t\t$id = \\Db::row($table,$itemWhere,'id');\n\t\t\tif($id){\n\t\t\t\t$ids[] = $id;\n\t\t\t\t\\Db::update($table,$item,$itemWhere);\n\t\t\t}else{\n\t\t\t\t$id = \\Db::insert($table,array_merge($where,$item));\n\t\t\t\t$ids[] = $id;\n\t\t\t}\n\t\t}\n\t\t$where['\"'] = 'id not in ('.implode(',',$ids).')';\n\t\t\\Db::query('delete',$where);\n\n\t\tDb::commitTransaction();\n\t\t\\Hook::run('userAction','interest update');\n\t}","title":""},{"docid":"101d787084bbce2a0433c33597002bfb","score":"0.5022634","text":"function createTodoTable(PDO $pdo): void\n{\n $query = \"CREATE TABLE IF NOT EXISTS items (\n `id` INT(11) NOT NULL AUTO_INCREMENT, \n `text` VARCHAR(255) NOT NULL, \n `checked` TINYINT(1) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8\";\n $pdo->exec($query);\n}","title":""},{"docid":"9c1d80628c1b58430e35eb14caa45d75","score":"0.501494","text":"public function getUserTodosList($id)\n {\n return $this->find($id)->todos;\n }","title":""},{"docid":"3beebb7a3e042c9dbf36d42bec090a3f","score":"0.50101644","text":"public function index()\n {\n return Todo::all();\n }","title":""},{"docid":"3beebb7a3e042c9dbf36d42bec090a3f","score":"0.50101644","text":"public function index()\n {\n return Todo::all();\n }","title":""},{"docid":"3beebb7a3e042c9dbf36d42bec090a3f","score":"0.50101644","text":"public function index()\n {\n return Todo::all();\n }","title":""},{"docid":"b2d8254afb9b5a272f044007e3e3c5c6","score":"0.5000052","text":"public function amulet()\n {\n return $this->belongsTo(Item::class, 'amulet_id');\n }","title":""},{"docid":"7ec07b37fc99fe17643e79b5a55fae7a","score":"0.49968356","text":"public function orderItem()\n {\n return $this->morphMany(OrderItem::class, 'item');\n }","title":""},{"docid":"88d43c9755a1116bf4034bd6111dcc4a","score":"0.49909496","text":"public function test_user_can_add_todo()\n {\n $formData =[\n 'title'=>'first task', \n 'description'=>'first task description',\n ];\n $response = $this->post('/api/todos',$formData);\n $response->assertStatus(200);\n }","title":""},{"docid":"8a6639ad91cc699b27093bac122e5bbf","score":"0.49909428","text":"public function favoriteMusic()\n\t{\n\t\treturn $this->belongsToMany('App\\Models\\MusicType','user_music_type');\n\t}","title":""},{"docid":"293c66fd9d8f4fbae233616123122099","score":"0.4990898","text":"public function getTaskItems($item = 'name')\n {\n \t$task_names = '';\n \t$query = TodoList::whereEmployeeId($this->employee_id);\n \tif(!isSuperAdmin()) {\n \t\t$query->whereAssignedBy(\\Auth::id());\n \t}\n\n \t$task_ids = $query->pluck('task_id')->all();\n\n \tif($item == 'id') {\n \t\treturn $task_ids;\n \t}\n\n \tif($task_ids) {\n \t\t$tasks = Task::whereIn('id', $task_ids)->pluck('title');\n \t\tif($tasks->isNotEmpty()) {\n \t\t\tforeach($tasks as $task_name) {\n \t\t\t\t$task_names .= $task_name . '
    ';\n \t\t\t}\n \t\t}\n \t}\n\n \treturn rtrim($task_names, '
    ');\n }","title":""},{"docid":"78360638dd888968a53824c7cb3dd8a5","score":"0.49883494","text":"public function setItems($items);","title":""},{"docid":"0c9088728beecde4a2c30673c4423953","score":"0.49798414","text":"public function createItem();","title":""},{"docid":"b852e952b245dfd61578b444631f91c7","score":"0.4978497","text":"public function products(){\n //match the name of the eloquent model\n //corresponding to the item\n return $this->hasMany('Product');\n}","title":""},{"docid":"33514239aabc7b7fcc310b85d5ac8ba0","score":"0.49692035","text":"public function show(ToDo $task)\n {\n //\n }","title":""},{"docid":"4c1c735ea34f2c6bb4d117ec5756a0de","score":"0.4968539","text":"public function markDone(TodoListItem $todoListItem);","title":""},{"docid":"3fdaf3b17cc1d8bf5bf94f1932f03032","score":"0.49645516","text":"abstract protected function _getItems();","title":""},{"docid":"81f370a600106115a768e3555d6275b1","score":"0.49595308","text":"public function itemOrders(){\n return $this->hasMany(ItemOrder::class);\n }","title":""},{"docid":"fbea0987d32c330090651d4a0f99479b","score":"0.49594542","text":"public function items()\n {\n return $this->hasMany('App\\BoardItem');\n }","title":""},{"docid":"a77d6e643329ae95bf3918cb9f51db8f","score":"0.49553734","text":"static function item_deleted($item) {\n db::build()->delete(\"item_links\")->where(\"item_id\", \"=\", $item->id)->execute();\n }","title":""},{"docid":"3421411417e1824e6474210345ea6a56","score":"0.49501118","text":"public function show(Todo $todo)\n {\n //\n }","title":""},{"docid":"3421411417e1824e6474210345ea6a56","score":"0.49501118","text":"public function show(Todo $todo)\n {\n //\n }","title":""},{"docid":"3421411417e1824e6474210345ea6a56","score":"0.49501118","text":"public function show(Todo $todo)\n {\n //\n }","title":""},{"docid":"122417fa41e941c62595fc88fc4db690","score":"0.49304518","text":"public function delete(User $user, ToDo $toDo)\n {\n //\n }","title":""},{"docid":"ca8e3d0ef13cb571896ccea3e071c5b0","score":"0.4925346","text":"public function testList()\n {\n $json = '[\n {\n \"uuid\": \"ac753187-2f22-4b5c-b716-f1fcecfb4410\",\n \"created_at\": \"2016-08-06T06:48:52.000Z\",\n \"updated_at\": \"2016-08-06T06:51:12.000Z\",\n \"description\": \"Catch some little Monsters\",\n \"notice\": null,\n \"pin\": false,\n \"completed\": false,\n \"completed_at\": null,\n \"repeat_type\": \"none\",\n \"remind_time\": null,\n \"estimated_pomo_count\": null,\n \"costed_pomo_count\": 0,\n \"sub_todos\": [\n \"81921b2e-8b54-46cf-bb47-0d3c3c7e8302\",\n \"ff59811e-4c53-404f-a842-9590b632616f\"\n ]\n }\n]';\n $mock = new MockHandler(\n [\n new Response(200, ['Content-Type' => 'application/json'], $json),\n ]\n );\n $handler = HandlerStack::create($mock);\n $client = new Client(['handler' => $handler]);\n $pomotodoQuery = new PomotodoQuery($client, 'TEST_KEY');\n\n $application = new Application();\n $application->add(new TodoListCommand($pomotodoQuery));\n $command = $application->find('todo:list');\n $tester = new CommandTester($command);\n $tester->execute(['command' => $command->getName()]);\n $result = '+---------------------+----------------------------+----------+\n| Date Created | Description | Estimate |\n+---------------------+----------------------------+----------+\n| 2016-08-06 06:48:52 | Catch some little Monsters | N/A |\n+---------------------+----------------------------+----------+\n';\n self::assertEquals($result, $tester->getDisplay());\n }","title":""},{"docid":"232ef3b501b452185e4629d9996884e6","score":"0.49244553","text":"abstract public function items();","title":""},{"docid":"a807e59675c826f6d735c0d8bfa1d6c7","score":"0.49239412","text":"public function testGetFavoriteListForItem()\n {\n }","title":""},{"docid":"05e5fd601a3eed390f8f3239f44f1d0a","score":"0.4919485","text":"function BeforeDelete($item);","title":""},{"docid":"3f231f2a0134c731d772ed3731678841","score":"0.49135634","text":"function get_related_items () {\r\n $conn = db_connect();\r\n $query = \"select * from items where item_creator_id = '\".$_SESSION['current_user_id'].\"'\r\n or item_follower_id = '\".$_SESSION['current_user_id'].\"' order by item_priority_id\";\r\n $result = $conn->query(\"set names utf8\");\r\n $result = $conn->query($query);\r\n if (!$result) {\r\n throw new Exception(\"Could not connect to DB.\");\r\n }\r\n if ($result->num_rows == 0) {\r\n //throw new Exception(\"NO items records!\");\r\n }\r\n\r\n $row = db_result_to_array($result);\r\n return $row;\r\n }","title":""},{"docid":"008558cfa45c1efc6c64a2c03278f200","score":"0.49088857","text":"public function update(Request $request, Todo $todo)\n {\n //сделать uncheck\n $todo = Todo::find($request->body);\n $todo->status = 1;\n $todo->save();\n $deals = Todo::all()->where('user_id', Auth::user()->id);\n return $deals;\n }","title":""},{"docid":"cadf7477ec5edc377b724e0a39a642ba","score":"0.49087542","text":"public function items();","title":""},{"docid":"185974951ed3693bedbacb9a8e3fbbff","score":"0.48944712","text":"public function createItemsChildrenTable(): void\n {\n if (\n $this->itemsTable === null ||\n $this->itemsChildrenTable === null ||\n $this->hasTable($this->itemsChildrenTable)\n ) {\n return;\n }\n\n $this\n ->database\n ->createCommand()\n ->createTable(\n $this->itemsChildrenTable,\n [\n 'parent' => 'string(128) NOT NULL',\n 'child' => 'string(128) NOT NULL',\n 'PRIMARY KEY ([[parent]], [[child]])',\n \"FOREIGN KEY ([[parent]]) REFERENCES {{%$this->itemsTable}} ([[name]])\",\n \"FOREIGN KEY ([[child]]) REFERENCES {{%$this->itemsTable}} ([[name]])\",\n ],\n )\n ->execute();\n }","title":""},{"docid":"21198b2358a21671a464db68803cb942","score":"0.4890994","text":"function assign_todo_to_project() {\n\t\tcheck_ajax_referer( 'bct_security', 'security' );\n\t\t$todo\t\t\t\t = new stdClass();\n\t\t$todo->account_id\t = esc_attr( $_POST['account_id'] );\n\t\t$todo->project_id\t = esc_attr( $_POST['project_id'] );\n\t\t$todo->name\t\t\t = esc_attr( $_POST['todo_name'] );\n\t\t$todo->description\t = esc_attr( $_POST['todo_description'] );\n\t\t$post_id\t\t\t = (int) esc_attr( $_POST['post_id'] );\n\n\t\t# Get the Tasks\n\t\t$todo->todos = get_post_meta( $post_id, \"_todolist\", true );\n\n\t\t$results = $this->create_todo( $todo );\n\t\tdelete_transient( $this->user_ID . \"_\" . $todo->project_id );\n\t\tdie();\n\t}","title":""}],"string":"[\n {\n \"docid\": \"4a70c65a043004c38014d6495ca33682\",\n \"score\": \"0.68108135\",\n \"text\": \"public function todos()\\n {\\n return $this->hasMany('App\\\\Models\\\\Todo');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ecab6fefaa5b5a81e9003497f9471b7\",\n \"score\": \"0.67878985\",\n \"text\": \"public function todos()\\n {\\n return $this->hasMany('App\\\\Todo');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d0fe2cb13bf0f53a630df49c4509fbbe\",\n \"score\": \"0.66327155\",\n \"text\": \"public function todos()\\n {\\n return $this->hasMany(Todo::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9b68a2d3783afd1389937ae3164f0b55\",\n \"score\": \"0.65953755\",\n \"text\": \"public function todos()\\n {\\n return $this->hasMany(Todo::class, 'todolist_id', 'id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0e09fb099e58f735d4a516e667842121\",\n \"score\": \"0.6451311\",\n \"text\": \"public function todo()\\n {\\n return $this->hasMany('App\\\\Models\\\\Security\\\\Todo', 'user_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac7f8456e769d5f3626e235647617961\",\n \"score\": \"0.6431436\",\n \"text\": \"public function todo() {\\n return $this->hasMany('App\\\\ProjectTodo');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80c3567646a374758a3c8ff8dde05b74\",\n \"score\": \"0.621157\",\n \"text\": \"public function todo()\\n {\\n return $this->belongsTo('App\\\\Todo');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d96a879cf9c1095965b9602e321d49e5\",\n \"score\": \"0.61120164\",\n \"text\": \"public function items()\\n {\\n \\treturn $this->hasMany('App\\\\Item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b6e017e8742e4e4c8f3e677532ab60de\",\n \"score\": \"0.6076279\",\n \"text\": \"public function testTodoItem()\\n {\\n $this->app['session']->set('user', [\\n 'id' => 1,\\n 'username' => 'user1',\\n 'password' => 'user1',\\n ]);\\n\\n $todo = [\\n 'id' => 123,\\n 'description' => 'mock todo description',\\n 'completed' => '1',\\n ];\\n\\n $db = $this->mockDb(['fetchAssoc']);\\n\\n $db->expects($this->any())\\n ->method('fetchAssoc')\\n ->with(\\\"SELECT id, description, completed FROM todos WHERE id = ?\\\", [\\n 123,\\n ])\\n ->willReturn($todo);\\n $this->app['db'] = $db;\\n\\n $client = $this->createClient();\\n $crawler = $client->request('GET', '/api/v1/todo/123', [], [], ['CONTENT_TYPE' => 'application/json']);\\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\\n $this->assertEquals('{\\\"success\\\":true,\\\"todo\\\":{\\\"id\\\":123,\\\"description\\\":\\\"mock todo description\\\",\\\"completed\\\":\\\"1\\\"}}', $client->getResponse()->getContent());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5fe66ffc5f1becb00cf29fd53f5342b6\",\n \"score\": \"0.59959406\",\n \"text\": \"public function items()\\n {\\n \\treturn $this->hasMany('Item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b9c154b3a6d0da4d9941e1392dc7e1d\",\n \"score\": \"0.59287643\",\n \"text\": \"public function items(){\\n //we're connecting it to the newitem model\\n //note one to may uses 'hasMany'. One to one uses 'hasOne'\\n return $this->hasMany('App\\\\Newitem');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f6da856f590257ebd43fabb2a0f982c\",\n \"score\": \"0.5926159\",\n \"text\": \"public function items()\\n {\\n return $this->hasMany('App\\\\Models\\\\Access\\\\item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"453707da7a233122e1ce3f91ddbfb011\",\n \"score\": \"0.5921219\",\n \"text\": \"public function items(){\\n return $this->hasMany('App\\\\Item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c60dae82f0d0cfcf15b05692c2a765b\",\n \"score\": \"0.59031963\",\n \"text\": \"public function todos(){\\n return $this->all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"40cd72fc78d9109cfe1b05ee98e0e5ad\",\n \"score\": \"0.59018207\",\n \"text\": \"public function item()\\n {\\n return $this->belongsTo(Item::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2d9444c28d7a67bce41b849595c58a9c\",\n \"score\": \"0.58087444\",\n \"text\": \"public function items(){\\n return $this->hasMany('Item','no');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d88768a79e8270a36ecb61c49bb1796a\",\n \"score\": \"0.58060825\",\n \"text\": \"public function todos(){\\n $lista = item::select(\\\"id\\\",\\\"nombre\\\",\\\"precio\\\")->get();\\n return ['data' => $lista];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f7013f0309e01bb7fbe539e2b38359a2\",\n \"score\": \"0.5799104\",\n \"text\": \"public function item() \\n {\\n return $this->belongsTo('App\\\\Models\\\\Item\\\\Item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"788d278c5f019cefd31803eb1991435a\",\n \"score\": \"0.5794537\",\n \"text\": \"public function items()\\n {\\n return $this->hasMany('App\\\\Models\\\\Item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4fc623330862f8351d82998ddef2800b\",\n \"score\": \"0.57677907\",\n \"text\": \"public function item()\\n {\\n return $this->belongsTo('App\\\\Models\\\\Item', 'id_parent');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6447c6f28486ad6d65b82d255981142b\",\n \"score\": \"0.5765491\",\n \"text\": \"public function item() {\\n return $this->belongsTo('App\\\\Item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f9b70f6956ea7b47037c52e1f858b3d\",\n \"score\": \"0.5725856\",\n \"text\": \"public function itemfodas()\\n {\\n return $this->hasMany('App\\\\Itemfoda');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5ad7f40e28b05264e53fc60903107687\",\n \"score\": \"0.5695152\",\n \"text\": \"public function item()\\n {\\n return $this->belongsTo(Item::class, 'item_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f98cbd7f1ca120b13d7818361de5c6b2\",\n \"score\": \"0.5678163\",\n \"text\": \"public function item()\\n\\t{\\n\\t\\treturn $this->belongsTo('Item');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"607fc6d09a80d0bf642de402f526be5d\",\n \"score\": \"0.565402\",\n \"text\": \"public function items() {\\n\\t\\treturn $this->hasMany(Item);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c46fb0098299e44d6b8692e55bd4dcb9\",\n \"score\": \"0.56474006\",\n \"text\": \"public function items()\\n\\t{\\n\\t\\treturn $this->hasMany('Item');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f02175fa3960d14cd8620b8cbead3b3a\",\n \"score\": \"0.5634289\",\n \"text\": \"public function items()\\n {\\n return $this->hasMany('App\\\\OrderItem');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c78d6141668c49ab7ec79741c359491\",\n \"score\": \"0.56236225\",\n \"text\": \"public function testOrderOrderItemOneToMany()\\n\\t{\\n\\t\\t$order = Order::create(array(\\n\\t\\t\\t'id' => 5,\\n\\t\\t\\t'user_id' => 8\\n\\t\\t));\\n\\t\\t$orderItem = new OrderItem(array('id' => 20));\\n\\n\\t\\t$order->items()->insert($orderItem);\\n\\n\\t\\t$orderItem = OrderItem::find(20);\\n\\t\\t$this->assertEquals($order->id, $orderItem->order_id);\\n\\n\\t\\t$orderItem = Order::find(5)->items()->first();\\n\\t\\t$this->assertEquals($order->id, $orderItem->order_id);\\n\\n\\t\\t$order = OrderItem::find(20)->order()->first();\\n\\t\\t$this->assertEquals(8, $order->user_id);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d86bd1b989e0346b712751c1d9b75792\",\n \"score\": \"0.5562278\",\n \"text\": \"public function items() {\\n return $this->belongsToMany('App\\\\Item', 'invoice_items', 'invoice_id', 'item_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3bb8915b4cc3b4e6f2e74f17889c1e14\",\n \"score\": \"0.54866177\",\n \"text\": \"public function getTodo()\\n {\\n return $this->todo;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64aab04d598782a22d4ad90787d7a16c\",\n \"score\": \"0.54419345\",\n \"text\": \"public function items(){\\n return $this->hasMany('Sales\\\\Quote\\\\Models\\\\QuoteItem');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"916e65fd4ed763f400231a931ae410ec\",\n \"score\": \"0.54104877\",\n \"text\": \"public function Item()\\n {\\n return $this->belongsToMany('junecity\\\\shop\\\\models\\\\Item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d3ffe8bfb47e41c644f5ab505c2535f3\",\n \"score\": \"0.5399813\",\n \"text\": \"protected function item() {\\n return $this->belongsTo('App\\\\Model\\\\Item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"50fb056347133b91cda96362ad368fa7\",\n \"score\": \"0.5396898\",\n \"text\": \"public function show(Todos $todos)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b4b647b35fc3238e751ad817bfda837e\",\n \"score\": \"0.53847873\",\n \"text\": \"public function items()\\n {\\n return $this->hasMany(OrderItemDetails::class, 'order_id', 'id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0d7b9ded943e09a1cbefb395a38d113f\",\n \"score\": \"0.5345151\",\n \"text\": \"public static function getListsWithTodos()\\n {\\n session_start();\\n\\n // Check if auth session is available\\n if (isset($_SESSION[\\\"id\\\"])) {\\n\\n // Join \\\"lists\\\" and \\\"todos\\\" table, create list containing list_name, list_id, (todo) id, created_by, title, description, status, created_at\\n $data = self::query('SELECT lists.NAME AS list_name, lists.id AS list_id, todos.id, todos.created_by, todos.title, todos.description, todos.status, todos.created_at FROM lists LEFT JOIN todos ON lists.id = todos.list_id WHERE lists.created_by = ? ', array($_SESSION[\\\"id\\\"]));\\n\\n // Reduce above mentioned data and order them by list. Create one object for each list, with all todos associated to said list as children.\\n $reduced_data = array_reduce($data, function ($acc, $curr) {\\n $list_id = $curr[\\\"list_id\\\"];\\n $list_name = $curr[\\\"list_name\\\"];\\n\\n unset($curr[\\\"list_id\\\"]);\\n unset($curr[\\\"list_name\\\"]);\\n\\n $acc[$list_id][\\\"name\\\"] = $list_name;\\n if (isset($curr[\\\"id\\\"])) {\\n $acc[$list_id][\\\"todos\\\"][] = $curr;\\n }\\n\\n return $acc;\\n }, []);\\n\\n return $reduced_data;\\n } else {\\n echo \\\"No user logged in\\\";\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5422fdc2fcf6cf8d920509e1d08ca7a2\",\n \"score\": \"0.53217727\",\n \"text\": \"public function createAction()\\n {\\n\\t $todo = new TodoItem();\\n\\t $todo->title = $this->_params['title'];\\n\\t $todo->description = $this->_params['description'];\\n\\t $todo->due_date = $this->_params['due_date'];\\n\\t $todo->is_done = 'false';\\n\\t \\n\\t //pass the user's username and password to authenticate the user\\n\\t $todo->save($this->_params['username'], $this->_params['userpass']);\\n\\t \\n\\t //return the todo item in array format\\n\\t return $todo->toArray();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e92c0618f0bf679826fa2dd93094cc7e\",\n \"score\": \"0.5320402\",\n \"text\": \"public function print_todo() {\\n\\t\\t\\tforeach ($this->todo as $id => $item) {\\n\\t\\t\\t\\techo \\\"
  • \\\" . $item . PHP_EOL .\\n\\t\\t\\t\\t\\t \\\"
    name . \\\"&act=del_todo&id=\\\" . $id . \\\"\\\\\\\"> name . \\\"&act=todo_to_doing&id=\\\" . $id . \\\"\\\\\\\">
  • \\\";\\n\\t\\t\\t}\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23737afa0896fd8e663d5f006c924cc2\",\n \"score\": \"0.53175646\",\n \"text\": \"public function todos($id = null)\\n {\\n $deal = $this->deal->findOrFail($id);\\n $todos = new TodosResource($deal->todos()->with(['agent:id,username,name'])->orderBy('id', 'desc')->paginate(50));\\n return response($todos, Response::HTTP_OK);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f0a8d1d4c41d3c8bb1dd9946681c968\",\n \"score\": \"0.5311732\",\n \"text\": \"public function order_item()\\n {\\n //Redireccion\\n return $this->hasOne('App\\\\OrderItem');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"11fd091c3a45a5ab55cd4d13e3dbad5f\",\n \"score\": \"0.5272882\",\n \"text\": \"public function test_can_create_todo() {\\n $data = [\\n 'title' => $this->faker->sentence,\\n ];\\n $this->post(route('todos.store'), $data)\\n ->assertStatus(201);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e45b9eabcc324d0459266b50e55ed105\",\n \"score\": \"0.5257306\",\n \"text\": \"public function order_item()\\n { \\n return $this->hasMany('App\\\\Model\\\\OrderItem');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7cad4a145b0fba6886a4542f01f8aa67\",\n \"score\": \"0.5253484\",\n \"text\": \"public function todos($id = null)\\n {\\n $indexing = $this->indexing->findOrFail($id);\\n $todos = new TodosResource($indexing->todos()->with(['agent:id,username,name'])->orderBy('id', 'desc')->paginate(50));\\n return response($todos, Response::HTTP_OK);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"089a8fa2b80603033f3215b900ff0bf2\",\n \"score\": \"0.5251132\",\n \"text\": \"public function getItems()\\n {\\n return $this->hasMany(Item::className(), ['item_id' => 'item_id'])->viaTable('cos_item', ['cos_id' => 'cos_id']);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ea01b4639be4256b17b1f5a2cda261e\",\n \"score\": \"0.5237535\",\n \"text\": \"public function items()\\n {\\n \\treturn $this->hasMany(Item::class, 'vendor_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23dabf2111d551bf4f47ad95ce14ec15\",\n \"score\": \"0.5230548\",\n \"text\": \"public function orderItems(){\\n return $this->hasMany(ItemOrder::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d5b2e070bd2aeb627acd0a9254e5985b\",\n \"score\": \"0.52190965\",\n \"text\": \"public function testGetTodoTask(): void\\n {\\n $response = $this->request('GET', $this->findOneIriBy(TodoTask::class, ['description' => 'Develop TODO test']));\\n $json = json_decode($response->getContent(), true);\\n\\n //assert there is a valid reply\\n $this->assertEquals(200, $response->getStatusCode());\\n $this->assertEquals('application/ld+json; charset=utf-8', $response->headers->get('Content-Type'));\\n\\n //assert that description of the returned JSON object is correct\\n $this->assertEquals('Develop TODO test', $json['description']);\\n\\n //assert that the returned task is properly serialized\\n $this->assertArrayHasKey('@id', $json);\\n $this->assertArrayHasKey('@type', $json);\\n $this->assertArrayHasKey('@context', $json);\\n $this->assertArrayHasKey('id', $json);\\n $this->assertArrayHasKey('state', $json);\\n $this->assertArrayHasKey('description', $json);\\n $this->assertArrayHasKey('createDate', $json);\\n $this->assertArrayHasKey('list', $json);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fb472f32d7dac54dad413c3b844c0f79\",\n \"score\": \"0.52032095\",\n \"text\": \"function testToDo() {\\n// $this->todo('factory to create new');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"070fdb03dd666d57e88584ce59095baf\",\n \"score\": \"0.51949\",\n \"text\": \"public function orderItem()\\n {\\n return $this->hasMany('App\\\\OrderItem', 'orderid', 'id' );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4840fc27e2ba86a1bc4a5e8a36d16252\",\n \"score\": \"0.51584846\",\n \"text\": \"public function testTodoList()\\n {\\n $this->app['session']->set('user', [\\n 'id' => 1,\\n 'username' => 'user1',\\n 'password' => 'user1',\\n ]);\\n\\n $todos = [\\n [\\n 'id' => 123,\\n 'description' => 'mock todo description',\\n 'completed' => '1',\\n ],\\n ];\\n\\n $db = $this->mockDb(['fetchAll']);\\n $db->expects($this->any())\\n ->method('fetchAll')\\n ->with(\\\"SELECT id, description, completed FROM todos WHERE user_id = ?\\\", [\\n 1,\\n ])\\n ->willReturn($todos);\\n $this->app['db'] = $db;\\n\\n $client = $this->createClient();\\n $crawler = $client->request('GET', '/api/v1/todo', [], [], ['CONTENT_TYPE' => 'application/json']);\\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\\n $this->assertEquals('{\\\"success\\\":true,\\\"todos\\\":[{\\\"id\\\":123,\\\"description\\\":\\\"mock todo description\\\",\\\"completed\\\":\\\"1\\\"}]}', $client->getResponse()->getContent());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ef9a2609c6b5f88f98c01f966c1bc59\",\n \"score\": \"0.51536524\",\n \"text\": \"public function listTodo(){\\n\\n /**Store user's todo in $todos */\\n $todos = auth()->user()->todos;\\n\\n return view('admin.listTodo')\\n ->with('todos', $todos); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19c3718d71b20ce06401ce524a85bbde\",\n \"score\": \"0.5144039\",\n \"text\": \"public static function sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todo($todo){\\n $userid = \\\\SYSTEM\\\\SECURITY\\\\security::getUser()->id;\\n $vars = \\\\SYSTEM\\\\SQL\\\\SYS_SAIMOD_TODO_TODO::Q1(array($todo,$userid));\\n $vars['trace'] = implode('
    ', array_slice(explode('#', $vars['trace']), 1, -1));\\n $vars['display_assign'] = $vars['assignee_id'] != $userid ? '' : 'display: none;';\\n $vars['display_deassign'] = $vars['assignee_id'] == $userid ? '' : 'display: none;';\\n $vars['assignees'] = '';\\n $res = \\\\SYSTEM\\\\SQL\\\\SYS_SAIMOD_TODO_ASSIGNEES::QQ(array($todo,$userid));\\n while($row = $res->next()){\\n $vars['assignees'] .= \\\\SYSTEM\\\\PAGE\\\\replace::replaceFile((new \\\\SYSTEM\\\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user_assignee.tpl'))->SERVERPATH(), $row);\\n }\\n $vars = array_merge($vars,\\\\SYSTEM\\\\PAGE\\\\text::tag(\\\\SYSTEM\\\\SQL\\\\system_text::TAG_SAI_TODO));\\n return $vars[\\\\SYSTEM\\\\SQL\\\\system_todo::FIELD_TYPE] == \\\\SYSTEM\\\\SQL\\\\system_todo::FIELD_TYPE_USER ?\\n \\\\SYSTEM\\\\PAGE\\\\replace::replaceFile((new \\\\SYSTEM\\\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo_user.tpl'))->SERVERPATH(), $vars) :\\n \\\\SYSTEM\\\\PAGE\\\\replace::replaceFile((new \\\\SYSTEM\\\\PSAI('modules/saimod_sys_todo/tpl/saimod_sys_todo_todo.tpl'))->SERVERPATH(), $vars);}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e449ba36f8a38d029d03acb69e406f8f\",\n \"score\": \"0.5136388\",\n \"text\": \"public function delete(){\\n\\t\\t$todoItems = TodoItem::model()->findAllByAttributes(['list_id' => $this->id]);\\n\\t\\tforeach ($todoItems as $ti) {\\n\\t\\t\\t$tu->delete();\\n\\t\\t}\\n\\t\\tNotification::remove('Todo', $this->id);\\n\\t\\treturn parent::delete();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"593a7519a782955c1123d7dc14ade830\",\n \"score\": \"0.5130684\",\n \"text\": \"static function item_deleted($item) {\\r\\n $existingFaces = ORM::factory(\\\"items_face\\\")\\r\\n ->where(\\\"item_id\\\", \\\"=\\\", $item->id)\\r\\n ->find_all();\\r\\n if (count($existingFaces) > 0) {\\r\\n db::build()->delete(\\\"items_faces\\\")->where(\\\"item_id\\\", \\\"=\\\", $item->id)->execute();\\r\\n }\\r\\n\\r\\n $existingNotes = ORM::factory(\\\"items_note\\\")\\r\\n ->where(\\\"item_id\\\", \\\"=\\\", $item->id)\\r\\n ->find_all();\\r\\n if (count($existingNotes) > 0) {\\r\\n db::build()->delete(\\\"items_notes\\\")->where(\\\"item_id\\\", \\\"=\\\", $item->id)->execute();\\r\\n }\\r\\n\\r\\n $existingUsers = ORM::factory(\\\"items_user\\\")\\r\\n ->where(\\\"item_id\\\", \\\"=\\\", $item->id)\\r\\n ->find_all();\\r\\n if (count($existingUsers) > 0) {\\r\\n db::build()->delete(\\\"items_users\\\")->where(\\\"item_id\\\", \\\"=\\\", $item->id)->execute();\\r\\n }\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e6b17d5d43c64b19462982b920c28af3\",\n \"score\": \"0.5128146\",\n \"text\": \"public function getToDos($project_id,$todo_list_id)\\n\\t{\\n\\t\\treturn $this->get_data('https://basecamp.com/'.$this->accout_id.'/api/v1/projects/'.$project_id.'/todolists/'.$todo_list_id.'.json');\\t\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"64489906181b1d084ab526860d071ab5\",\n \"score\": \"0.51197714\",\n \"text\": \"public function item(){\\n \\treturn $this->belongsToMany('App\\\\Models\\\\Item\\\\Item')->withPivot('itemlist_id','qty','uom','created_at','updated_at');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6e0406aa6c768869354bdb28e661b857\",\n \"score\": \"0.5105048\",\n \"text\": \"public function items() {\\n return $this->hasMany(InvoiceItemProxy::modelClass())->whereNull('parent_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0c68120a679348cdf46b94deeede5ee\",\n \"score\": \"0.5095908\",\n \"text\": \"public function show(Todo $todo)\\n {\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b21c60e914fb1def197b163da781052b\",\n \"score\": \"0.5092529\",\n \"text\": \"function append_todolist($todo_item)\\t{ \\n foreach($todo_item as $item){\\n echo $item.'
    ';\\n }\\n \\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f3fc3abb50932603886bfa85c3ca062\",\n \"score\": \"0.50910187\",\n \"text\": \"public function workItems()\\n {\\n \\treturn $this->belongsToMany('App\\\\WorkItem');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ec1ebbbd18919fc9456acf5a06a3760\",\n \"score\": \"0.5072363\",\n \"text\": \"function create_todo_item()\\n{\\n register_post_type('todo-item', [\\n 'labels' => [\\n 'name' => 'ToDo Items',\\n 'singular_name' => 'ToDO item',\\n 'add_new' => 'Add New',\\n 'add_new_item' => 'Add New ToDo Item',\\n 'edit' => 'Edit',\\n 'edit_item' => 'Edit ToDo Item',\\n 'new_item' => 'New ToDo Item',\\n 'view' => 'View',\\n 'view_item' => 'View ToDo Item',\\n 'search_items' => 'Search ToDo Items',\\n 'not_found' => 'No ToDo Items found',\\n 'not_found_in_trash' => 'No ToDo Items found in Trash',\\n 'parent' => 'Parent ToDo Item',\\n ],\\n 'description' => 'ToDo items are displayed In TodO List plugin.',\\n 'public' => true,\\n 'supports' => ['title', 'editor', 'custom-fields'],\\n 'menu_icon' => 'dashicons-editor-ul',\\n 'has_archive' => true,\\n ]);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c98ebe1d6af14c4dd9a8dd7f395214f9\",\n \"score\": \"0.5070802\",\n \"text\": \"public function __construct(Todo $todo)\\n\\t{\\n\\t\\t$this->todo = $todo;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33b6d63f2420646ceb13e2037f086015\",\n \"score\": \"0.5067051\",\n \"text\": \"public function index()\\n {\\n \\n $id = Auth::id(); //kirjautuneen käyttäjän id muuttujaan\\n \\n $results = DB::table('items')\\n ->where('user_id', $id) //Missä user_id on käyttäjän id\\n ->orderBy('items.id', 'DESC') //Järjestyksessä uusin esin\\n ->get(); \\n\\n \\n\\n #Tekee Tyhjän rivin todo listalle ja tulee unshift errori tulee kun tehdään uusi tehtävä\\n /* if($results->isEmpty()) {\\n return response(['message' => 'Tehtäviä ei ole.']);\\n } else {\\n return $results;\\n } */\\n \\n //Postman palauttaa tyhjän arrayn, jos ei ole tehtäviä\\n return $results;\\n \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"80de576e35289d38b093dc222d84d71b\",\n \"score\": \"0.5059461\",\n \"text\": \"public function testCreateItem()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d8ba78e9987c5a9c5360960a66c4bfbc\",\n \"score\": \"0.50482064\",\n \"text\": \"public function items() {\\n return $this->hasMany('Nixzen\\\\Models\\\\Item', 'unittype_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5e56906fd515758d4647bb10af3a3e1c\",\n \"score\": \"0.5043584\",\n \"text\": \"function syncItems($table,$items,$where=[]){\\n\\t\\tDb::startTransaction();\\n\\t\\t//collect ids to exclude from delete\\n\\t\\t$ids = [];\\n\\n\\t\\tforeach((array)$items as $item){\\n\\t\\t\\t$keys = Control::$model->flatMatchedKeys($table,$item);\\n\\t\\t\\t$itemWhere = array_merge($where,Arrays::extract($keys,$in));\\n\\t\\t\\t$id = \\\\Db::row($table,$itemWhere,'id');\\n\\t\\t\\tif($id){\\n\\t\\t\\t\\t$ids[] = $id;\\n\\t\\t\\t\\t\\\\Db::update($table,$item,$itemWhere);\\n\\t\\t\\t}else{\\n\\t\\t\\t\\t$id = \\\\Db::insert($table,array_merge($where,$item));\\n\\t\\t\\t\\t$ids[] = $id;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t$where['\\\"'] = 'id not in ('.implode(',',$ids).')';\\n\\t\\t\\\\Db::query('delete',$where);\\n\\n\\t\\tDb::commitTransaction();\\n\\t\\t\\\\Hook::run('userAction','interest update');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"101d787084bbce2a0433c33597002bfb\",\n \"score\": \"0.5022634\",\n \"text\": \"function createTodoTable(PDO $pdo): void\\n{\\n $query = \\\"CREATE TABLE IF NOT EXISTS items (\\n `id` INT(11) NOT NULL AUTO_INCREMENT, \\n `text` VARCHAR(255) NOT NULL, \\n `checked` TINYINT(1) NOT NULL DEFAULT '0',\\n PRIMARY KEY (`id`)\\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8\\\";\\n $pdo->exec($query);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9c1d80628c1b58430e35eb14caa45d75\",\n \"score\": \"0.501494\",\n \"text\": \"public function getUserTodosList($id)\\n {\\n return $this->find($id)->todos;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3beebb7a3e042c9dbf36d42bec090a3f\",\n \"score\": \"0.50101644\",\n \"text\": \"public function index()\\n {\\n return Todo::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3beebb7a3e042c9dbf36d42bec090a3f\",\n \"score\": \"0.50101644\",\n \"text\": \"public function index()\\n {\\n return Todo::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3beebb7a3e042c9dbf36d42bec090a3f\",\n \"score\": \"0.50101644\",\n \"text\": \"public function index()\\n {\\n return Todo::all();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2d8254afb9b5a272f044007e3e3c5c6\",\n \"score\": \"0.5000052\",\n \"text\": \"public function amulet()\\n {\\n return $this->belongsTo(Item::class, 'amulet_id');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ec07b37fc99fe17643e79b5a55fae7a\",\n \"score\": \"0.49968356\",\n \"text\": \"public function orderItem()\\n {\\n return $this->morphMany(OrderItem::class, 'item');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"88d43c9755a1116bf4034bd6111dcc4a\",\n \"score\": \"0.49909496\",\n \"text\": \"public function test_user_can_add_todo()\\n {\\n $formData =[\\n 'title'=>'first task', \\n 'description'=>'first task description',\\n ];\\n $response = $this->post('/api/todos',$formData);\\n $response->assertStatus(200);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a6639ad91cc699b27093bac122e5bbf\",\n \"score\": \"0.49909428\",\n \"text\": \"public function favoriteMusic()\\n\\t{\\n\\t\\treturn $this->belongsToMany('App\\\\Models\\\\MusicType','user_music_type');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"293c66fd9d8f4fbae233616123122099\",\n \"score\": \"0.4990898\",\n \"text\": \"public function getTaskItems($item = 'name')\\n {\\n \\t$task_names = '';\\n \\t$query = TodoList::whereEmployeeId($this->employee_id);\\n \\tif(!isSuperAdmin()) {\\n \\t\\t$query->whereAssignedBy(\\\\Auth::id());\\n \\t}\\n\\n \\t$task_ids = $query->pluck('task_id')->all();\\n\\n \\tif($item == 'id') {\\n \\t\\treturn $task_ids;\\n \\t}\\n\\n \\tif($task_ids) {\\n \\t\\t$tasks = Task::whereIn('id', $task_ids)->pluck('title');\\n \\t\\tif($tasks->isNotEmpty()) {\\n \\t\\t\\tforeach($tasks as $task_name) {\\n \\t\\t\\t\\t$task_names .= $task_name . '
    ';\\n \\t\\t\\t}\\n \\t\\t}\\n \\t}\\n\\n \\treturn rtrim($task_names, '
    ');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"78360638dd888968a53824c7cb3dd8a5\",\n \"score\": \"0.49883494\",\n \"text\": \"public function setItems($items);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0c9088728beecde4a2c30673c4423953\",\n \"score\": \"0.49798414\",\n \"text\": \"public function createItem();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b852e952b245dfd61578b444631f91c7\",\n \"score\": \"0.4978497\",\n \"text\": \"public function products(){\\n //match the name of the eloquent model\\n //corresponding to the item\\n return $this->hasMany('Product');\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"33514239aabc7b7fcc310b85d5ac8ba0\",\n \"score\": \"0.49692035\",\n \"text\": \"public function show(ToDo $task)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4c1c735ea34f2c6bb4d117ec5756a0de\",\n \"score\": \"0.4968539\",\n \"text\": \"public function markDone(TodoListItem $todoListItem);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fdaf3b17cc1d8bf5bf94f1932f03032\",\n \"score\": \"0.49645516\",\n \"text\": \"abstract protected function _getItems();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"81f370a600106115a768e3555d6275b1\",\n \"score\": \"0.49595308\",\n \"text\": \"public function itemOrders(){\\n return $this->hasMany(ItemOrder::class);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fbea0987d32c330090651d4a0f99479b\",\n \"score\": \"0.49594542\",\n \"text\": \"public function items()\\n {\\n return $this->hasMany('App\\\\BoardItem');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a77d6e643329ae95bf3918cb9f51db8f\",\n \"score\": \"0.49553734\",\n \"text\": \"static function item_deleted($item) {\\n db::build()->delete(\\\"item_links\\\")->where(\\\"item_id\\\", \\\"=\\\", $item->id)->execute();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3421411417e1824e6474210345ea6a56\",\n \"score\": \"0.49501118\",\n \"text\": \"public function show(Todo $todo)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3421411417e1824e6474210345ea6a56\",\n \"score\": \"0.49501118\",\n \"text\": \"public function show(Todo $todo)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3421411417e1824e6474210345ea6a56\",\n \"score\": \"0.49501118\",\n \"text\": \"public function show(Todo $todo)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"122417fa41e941c62595fc88fc4db690\",\n \"score\": \"0.49304518\",\n \"text\": \"public function delete(User $user, ToDo $toDo)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ca8e3d0ef13cb571896ccea3e071c5b0\",\n \"score\": \"0.4925346\",\n \"text\": \"public function testList()\\n {\\n $json = '[\\n {\\n \\\"uuid\\\": \\\"ac753187-2f22-4b5c-b716-f1fcecfb4410\\\",\\n \\\"created_at\\\": \\\"2016-08-06T06:48:52.000Z\\\",\\n \\\"updated_at\\\": \\\"2016-08-06T06:51:12.000Z\\\",\\n \\\"description\\\": \\\"Catch some little Monsters\\\",\\n \\\"notice\\\": null,\\n \\\"pin\\\": false,\\n \\\"completed\\\": false,\\n \\\"completed_at\\\": null,\\n \\\"repeat_type\\\": \\\"none\\\",\\n \\\"remind_time\\\": null,\\n \\\"estimated_pomo_count\\\": null,\\n \\\"costed_pomo_count\\\": 0,\\n \\\"sub_todos\\\": [\\n \\\"81921b2e-8b54-46cf-bb47-0d3c3c7e8302\\\",\\n \\\"ff59811e-4c53-404f-a842-9590b632616f\\\"\\n ]\\n }\\n]';\\n $mock = new MockHandler(\\n [\\n new Response(200, ['Content-Type' => 'application/json'], $json),\\n ]\\n );\\n $handler = HandlerStack::create($mock);\\n $client = new Client(['handler' => $handler]);\\n $pomotodoQuery = new PomotodoQuery($client, 'TEST_KEY');\\n\\n $application = new Application();\\n $application->add(new TodoListCommand($pomotodoQuery));\\n $command = $application->find('todo:list');\\n $tester = new CommandTester($command);\\n $tester->execute(['command' => $command->getName()]);\\n $result = '+---------------------+----------------------------+----------+\\n| Date Created | Description | Estimate |\\n+---------------------+----------------------------+----------+\\n| 2016-08-06 06:48:52 | Catch some little Monsters | N/A |\\n+---------------------+----------------------------+----------+\\n';\\n self::assertEquals($result, $tester->getDisplay());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"232ef3b501b452185e4629d9996884e6\",\n \"score\": \"0.49244553\",\n \"text\": \"abstract public function items();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a807e59675c826f6d735c0d8bfa1d6c7\",\n \"score\": \"0.49239412\",\n \"text\": \"public function testGetFavoriteListForItem()\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"05e5fd601a3eed390f8f3239f44f1d0a\",\n \"score\": \"0.4919485\",\n \"text\": \"function BeforeDelete($item);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3f231f2a0134c731d772ed3731678841\",\n \"score\": \"0.49135634\",\n \"text\": \"function get_related_items () {\\r\\n $conn = db_connect();\\r\\n $query = \\\"select * from items where item_creator_id = '\\\".$_SESSION['current_user_id'].\\\"'\\r\\n or item_follower_id = '\\\".$_SESSION['current_user_id'].\\\"' order by item_priority_id\\\";\\r\\n $result = $conn->query(\\\"set names utf8\\\");\\r\\n $result = $conn->query($query);\\r\\n if (!$result) {\\r\\n throw new Exception(\\\"Could not connect to DB.\\\");\\r\\n }\\r\\n if ($result->num_rows == 0) {\\r\\n //throw new Exception(\\\"NO items records!\\\");\\r\\n }\\r\\n\\r\\n $row = db_result_to_array($result);\\r\\n return $row;\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"008558cfa45c1efc6c64a2c03278f200\",\n \"score\": \"0.49088857\",\n \"text\": \"public function update(Request $request, Todo $todo)\\n {\\n //сделать uncheck\\n $todo = Todo::find($request->body);\\n $todo->status = 1;\\n $todo->save();\\n $deals = Todo::all()->where('user_id', Auth::user()->id);\\n return $deals;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cadf7477ec5edc377b724e0a39a642ba\",\n \"score\": \"0.49087542\",\n \"text\": \"public function items();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"185974951ed3693bedbacb9a8e3fbbff\",\n \"score\": \"0.48944712\",\n \"text\": \"public function createItemsChildrenTable(): void\\n {\\n if (\\n $this->itemsTable === null ||\\n $this->itemsChildrenTable === null ||\\n $this->hasTable($this->itemsChildrenTable)\\n ) {\\n return;\\n }\\n\\n $this\\n ->database\\n ->createCommand()\\n ->createTable(\\n $this->itemsChildrenTable,\\n [\\n 'parent' => 'string(128) NOT NULL',\\n 'child' => 'string(128) NOT NULL',\\n 'PRIMARY KEY ([[parent]], [[child]])',\\n \\\"FOREIGN KEY ([[parent]]) REFERENCES {{%$this->itemsTable}} ([[name]])\\\",\\n \\\"FOREIGN KEY ([[child]]) REFERENCES {{%$this->itemsTable}} ([[name]])\\\",\\n ],\\n )\\n ->execute();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"21198b2358a21671a464db68803cb942\",\n \"score\": \"0.4890994\",\n \"text\": \"function assign_todo_to_project() {\\n\\t\\tcheck_ajax_referer( 'bct_security', 'security' );\\n\\t\\t$todo\\t\\t\\t\\t = new stdClass();\\n\\t\\t$todo->account_id\\t = esc_attr( $_POST['account_id'] );\\n\\t\\t$todo->project_id\\t = esc_attr( $_POST['project_id'] );\\n\\t\\t$todo->name\\t\\t\\t = esc_attr( $_POST['todo_name'] );\\n\\t\\t$todo->description\\t = esc_attr( $_POST['todo_description'] );\\n\\t\\t$post_id\\t\\t\\t = (int) esc_attr( $_POST['post_id'] );\\n\\n\\t\\t# Get the Tasks\\n\\t\\t$todo->todos = get_post_meta( $post_id, \\\"_todolist\\\", true );\\n\\n\\t\\t$results = $this->create_todo( $todo );\\n\\t\\tdelete_transient( $this->user_ID . \\\"_\\\" . $todo->project_id );\\n\\t\\tdie();\\n\\t}\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":785,"cells":{"query_id":{"kind":"string","value":"aa9b2063c9bf2dd7eb0ead1782e95844"},"query":{"kind":"string","value":"Create request for operation 'mailingIdQueuePut'"},"positive_passages":{"kind":"list like","value":[{"docid":"457ac55f3a283f4bd2cbfaa755099b22","score":"0.7434382","text":"protected function mailingIdQueuePutRequest($id, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdQueuePut'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingIdQueuePut'\n );\n }\n\n $resourcePath = '/mailing/{id}/queue';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""}],"string":"[\n {\n \"docid\": \"457ac55f3a283f4bd2cbfaa755099b22\",\n \"score\": \"0.7434382\",\n \"text\": \"protected function mailingIdQueuePutRequest($id, $body)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling mailingIdQueuePut'\\n );\\n }\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling mailingIdQueuePut'\\n );\\n }\\n\\n $resourcePath = '/mailing/{id}/queue';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"dab5644055551f80735148ca57743297","score":"0.64982796","text":"protected function mailingIdPutRequest($id, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdPut'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingIdPut'\n );\n }\n\n $resourcePath = '/mailing/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"1c464d6cf86d1ff27011e5b1cf4329a3","score":"0.60579675","text":"protected function mailingIdArchivePutRequest($id, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdArchivePut'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingIdArchivePut'\n );\n }\n\n $resourcePath = '/mailing/{id}/archive';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"2f6ba3137c72f89b0313a21062ef996b","score":"0.58087623","text":"function setQueue($id)\n {\n $response = $this->db->where('BK_ID', $id)\n ->set('Q_ID', '2')\n ->update('booking');\n return $response;\n }","title":""},{"docid":"1017fd20b7a2fbf31b294eb97d0b90a0","score":"0.5723639","text":"public function make(string $queue_id): AmqpQueue;","title":""},{"docid":"daa776dfe3f4496ae154fc3add2a7eab","score":"0.56924355","text":"protected function jobsJobIdSubmitPutRequest($authorization, $job_id, $body) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsJobIdSubmitPut'\n );\n }\n // Verify the required parameter 'job_id' is set.\n if ($job_id === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling jobsJobIdSubmitPut'\n );\n }\n // Verify the required parameter 'body' is set.\n if ($body === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling jobsJobIdSubmitPut'\n );\n }\n\n $resourcePath = '/jobs/{jobId}/submit';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Path params.\n if ($job_id !== NULL) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($job_id),\n $resourcePath\n );\n }\n\n // Body params.\n $_tempBody = NULL;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // For HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"7c694acab5c990559a8771856a783912","score":"0.5656543","text":"protected function mailingsPutRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingsPut'\n );\n }\n\n $resourcePath = '/mailings';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"4444e6176029b7d99cd0536a06741c14","score":"0.55238295","text":"public function queueingAction()\n {\n $request = Request::createFromGlobals();\n $id = $request->get('id');\n\n // On historise pour ne pas perdre l'information de reprise\n // on historise tout ce qui est terminé\n $Request = $this->getDoctrine()->getRepository(\"AriiSelfBundle:Request\")->find($id);\n\n $Request->setReqStatus('QUEUED');\n $Request->setProcessed(null);\n \n $em = $this->getDoctrine()->getManager();\n $em->persist($Request);\n $em->flush();\n \n return new Response(\"success\");\n }","title":""},{"docid":"8ba1aaf3d9b0ecee5742a21d543f6134","score":"0.5506591","text":"protected function mailingIdDeleteRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdDelete'\n );\n }\n\n $resourcePath = '/mailing/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"41829c61c090dd02d106489a94ade425","score":"0.5309802","text":"public static function addToQueue($queue, $ownerID, $vCode, $api, $scope) {\n\n\t\t// Set the root namesace for queued commands\n\t\t$command_namespace = 'Seat\\EveQueues\\\\';\n\n\t\t// Prepare the auth array\n\t\tif($vCode != NULL)\n\t\t\t$auth = array('keyID' => $ownerID, 'vCode' => $vCode);\n\t\telse\n\t\t\t$auth = array();\n\n\t\t// Check the databse if there are jobs outstanding ie. they have the status\n\t\t// Queued or Working. If not, we will queue a new job, else just capture the\n\t\t// jobID and return that\n\t\t$jobID = \\SeatQueueInformation::where('ownerID', '=', $ownerID)\n\t\t\t->where('api', '=', $api)\n\t\t\t->whereIn('status', array('Queued', 'Working'))\n\t\t\t->first();\n\n\t\t// Check if the $jobID was found, else, queue a new job\n\t\tif(!$jobID) {\n\n\t\t\t$jobID = \\Queue::push($command_namespace . implode('\\\\', $queue), $auth);\n\t\t\t\\SeatQueueInformation::create(array('jobID' => $jobID, 'ownerID' => $ownerID, 'api' => $api, 'scope' => $scope, 'status' => 'Queued'));\n\t\t} else {\n\n\t\t\t// To aid in potential capacity debugging, lets write a warning log entry so that a user\n\t\t\t// is able to see that a new job was not submitted\n\t\t\t\\Log::warning('A new job was not submitted due a similar one still being outstanding. Details: ' . $jobID, array('src' => __CLASS__));\n\n\t\t\t// Set the jobID to the ID from the database\n\t\t\t$jobID = $jobID->jobID;\n\t\t}\n\n\t\treturn $jobID;\n\t}","title":""},{"docid":"d1165a6d8a60a479811f5fcec6d45115","score":"0.52378625","text":"function quickbooks_webconnect_queue_request($element, $element_type, $operation) {\r\n\r\n // create the item to place on the queue\r\n $item = array(\r\n 'element' => $element,\r\n 'type' => $element_type,\r\n 'op' => $operation,\r\n );\r\n \r\n // add the item to the queue\r\n $queue = DrupalQueue::get('quickbooks_webconnect');\r\n $queue->createItem($item);\r\n \r\n _quickbooks_webconnect_debug('[queue_request] item : @item', array('@item' => var_export($item, TRUE)));\r\n}","title":""},{"docid":"c52ed7919367772cd84e967d91ceb3f3","score":"0.5208331","text":"private function _convertCreateQueue($request) {\n \n $parameters = array();\n $parameters['Action'] = 'CreateQueue';\n if ($request->isSetQueueName()) {\n $parameters['QueueName'] = $request->getQueueName();\n }\n if ($request->isSetDefaultVisibilityTimeout()) {\n $parameters['DefaultVisibilityTimeout'] = $request->getDefaultVisibilityTimeout();\n }\n\n return $parameters;\n }","title":""},{"docid":"db67136e4b90268707ee06504cd1a1ab","score":"0.52012396","text":"protected function mailingIdGetRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdGet'\n );\n }\n\n $resourcePath = '/mailing/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"825dcbdc76e812a58b171306e5218375","score":"0.51900727","text":"protected function jobsJobIdPutRequest($authorization, $job_id, $job) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsJobIdPut'\n );\n }\n // Verify the required parameter 'job_id' is set.\n if ($job_id === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling jobsJobIdPut'\n );\n }\n // Verify the required parameter 'job' is set.\n if ($job === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job when calling jobsJobIdPut'\n );\n }\n\n $resourcePath = '/jobs/{jobId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Path params.\n if ($job_id !== NULL) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($job_id),\n $resourcePath\n );\n }\n\n // Body params.\n $_tempBody = NULL;\n if (isset($job)) {\n $_tempBody = $job;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // For HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"f6f56cb0533b6977c6f9898761072556","score":"0.5105287","text":"public function createQueue($request) \n {\n if (!$request instanceof Amazon_SQS_Model_CreateQueue) {\n require_once ('Amazon/SQS/Model/CreateQueue.php');\n $request = new Amazon_SQS_Model_CreateQueue($request);\n }\n require_once ('Amazon/SQS/Model/CreateQueueResponse.php');\n return Amazon_SQS_Model_CreateQueueResponse::fromXML($this->_invoke($this->_convertCreateQueue($request)));\n }","title":""},{"docid":"46b1abdeb51526ead0c2fdde4c661b8c","score":"0.50999856","text":"protected function jobsJobIdArchivePutRequest($authorization, $job_id) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsJobIdArchivePut'\n );\n }\n // Verify the required parameter 'job_id' is set.\n if ($job_id === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling jobsJobIdArchivePut'\n );\n }\n\n $resourcePath = '/jobs/{jobId}/archive';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Path params.\n if ($job_id !== NULL) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($job_id),\n $resourcePath\n );\n }\n\n // Body params.\n $_tempBody = NULL;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // For HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"90fdcbe4666777e136a4141be9689d4a","score":"0.507233","text":"function isymphony_queue_add($queueId, $addQueue, $displayName) {\r\n\tglobal $db;\r\n\t$addQueue = $addQueue ? \"1\" : \"0\";\t\r\n\t$prepStatement = $db->prepare(\"INSERT INTO isymphony_queues (queue_id, add_queue, display_name) VALUES (?, ?, ?)\");\r\n\t$values = array($queueId, $addQueue, $displayName);\r\n\t$db->execute($prepStatement, $values);\r\n}","title":""},{"docid":"01231b049565d350600856373951ca19","score":"0.5067795","text":"private function queue_operation($http_verb, $id, $method, $args=null)\n {\n\t\t$operation = array(\n\t\t\t\t'operation_id' => $id,\n\t\t\t\t'method' => $http_verb,\n\t\t\t\t'path' => $method,\n \t\t);\n\n\t\tif ($args) {\n\t\t\t$key = ($http_verb == 'GET' ? 'params' : 'body');\n\t\t\t$operation[$key] = json_encode($args);\n\t\t}\n\n\t\t$this->operations[] = $operation;\n }","title":""},{"docid":"29ac2d2e0066087036c5ad9178b6c993","score":"0.50524145","text":"protected function spamcheckPutRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling spamcheckPut'\n );\n }\n\n $resourcePath = '/spamcheck';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"8b6ab5e20744406d2b0841a85d5a687e","score":"0.4978856","text":"public function testGetValidQueueByQueueId() {\n\t\t$this->assertNotNull($this->queue1);\n\t\t$this->assertNotNull($this->mysqli);\n\n\t\t// first, assert the queue is inserted into mySQL by grabbing it and asserting the primary key\n\t\t$this->queue1->insert($this->mysqli);\n\t\t$mysqlQueue = Queue::getQueueByQueueId($this->mysqli, $this->queue1->getQueueId());\n\t\t$this->assertIdentical($this->queue1->getQueueId(), $mysqlQueue->getQueueId());\n\t}","title":""},{"docid":"868adc33c3536b4610c087bfe372fc67","score":"0.49774298","text":"public function createQueue(string $queueName): void;","title":""},{"docid":"7c15f80fe47fa11cec289a3651455088","score":"0.49633723","text":"public function pauseFromQueue($id)\n\t{\n\t\t$header = <<\n\n\teditqueue\n\t\n\t\t\n\t\t\tGroupPause\n\t\t\n\t\t\n\t\t\t0\n\t\t\n\t\t\n\t\t\t\"\"\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t$id\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\nNZBGet_PAUSE_FROM_QUEUE;\n\n\t\tnzedb\\utility\\Utility::getUrl([\n\t\t\t\t\t\t\t\t\t\t 'url' => $this->fullURL . 'editqueue',\n\t\t\t\t\t\t\t\t\t\t 'method' => 'post', 'postdata' => $header,\n\t\t\t\t\t\t\t\t\t\t 'verifycert' => false\n\t\t\t\t\t\t\t\t\t ]);\n\t}","title":""},{"docid":"f8d205f499cad69764a8db4cd3b8a451","score":"0.4944417","text":"public function submitAcknowledgementRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling submitAcknowledgement'\n );\n }\n\n $resourcePath = '/vendor/directFulfillment/orders/2021-12-28/acknowledgements';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"8ed4f9a9158e50b7ab333cadcf87f158","score":"0.49421394","text":"public function put($id, $method, $args=array())\n {\n \t$this->queue_operation('PUT', $id, $method, $args);\n }","title":""},{"docid":"9774d57cb6a1b023d1dd819afb5bc46f","score":"0.4909094","text":"private function addSMSToQueue(){\n $query = \"update sms_queue set in_queue = 1\"\n . \" where text_status = 'not sent' and (schedule_time < now() or schedule_time = '0000-00-00 00:00:00') and number rlike '^[\\+0-9]+$' and project = '{$this->settings['sms_api_project']}'\";\n $this->database->runMySQLQuery($query, false);\n \n return json_encode(array(\"error\" => false, \"data\" => array()));\n }","title":""},{"docid":"e2f5f5ca491b59c1a42433d1cbcf83d8","score":"0.49075085","text":"protected function mailingIdLinkId2PutRequest($id, $id2, $body)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling mailingIdLinkId2Put'\n );\n }\n // verify the required parameter 'id2' is set\n if ($id2 === null || (is_array($id2) && count($id2) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id2 when calling mailingIdLinkId2Put'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingIdLinkId2Put'\n );\n }\n\n $resourcePath = '/mailing/{id}/link/{id2}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($id2 !== null) {\n $resourcePath = str_replace(\n '{' . 'id2' . '}',\n ObjectSerializer::toPathValue($id2),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"93741dd366784b56e378a6f7a25a4015","score":"0.49010336","text":"public function queueMessage(Request $request)\n\t{\n\t\t// Validate request\n\t\t$this->validate($request, $rules = [\n\t\t\t'userId' => 'required|integer|exists:users,id',\n\t\t\t'originatingCountry' => 'required|alpha|size:2|exists:countries,code',\n\t\t\t'currencyFrom' => 'required|alpha|size:3|exists:currencies,code',\n\t\t\t'currencyTo' => 'required|alpha|size:3|different:currencyFrom|exists:currencies,code',\n\t\t\t'amountSell' => 'required|numeric|min:1',\n\t\t\t'amountBuy' => 'required|numeric|min:1',\n\t\t\t'rate' => 'required|numeric|min:0.001',\n\t\t\t'timePlaced' => 'required|before:' . Carbon::now()->toDateTimeString(),\n\t\t]);\n\n\t\t// Process input\n\t\t$input = $this->processInput($request->only(array_keys($rules)));\n\n\t\t// Create message\n\t\t$message = Message::create([\n\t\t\t'user_id' => $input->userId,\n\t\t\t'country_id' => $input->originatingCountry,\n\t\t\t'from_currency_id' => $input->currencyFrom,\n\t\t\t'to_currency_id' => $input->currencyTo,\n\t\t\t'amount_sell' => $input->amountSell,\n\t\t\t'amount_buy' => $input->amountBuy,\n\t\t\t'rate' => $input->rate,\n\t\t\t'placed_at' => $input->timePlaced,\n\t\t]);\n\n\t\t// Queue message to be processed later\n\t\t$this->dispatch(new ProcessMessageJob($message));\n\n\t\treturn redirect('/')->withSuccess(sprintf('Message %d successfully created', $message->getKey()));\n\t}","title":""},{"docid":"8ab0ba58e1a176a0706bfe71bba5e1cd","score":"0.48752338","text":"public function getQueueableId();","title":""},{"docid":"a3e603f70a382a1f9cc96fd24f93c5fb","score":"0.48592395","text":"public function setQueueAttributes($request) \n {\n if (!$request instanceof Amazon_SQS_Model_SetQueueAttributes) {\n require_once ('Amazon/SQS/Model/SetQueueAttributes.php');\n $request = new Amazon_SQS_Model_SetQueueAttributes($request);\n }\n require_once ('Amazon/SQS/Model/SetQueueAttributesResponse.php');\n return Amazon_SQS_Model_SetQueueAttributesResponse::fromXML($this->_invoke($this->_convertSetQueueAttributes($request)));\n }","title":""},{"docid":"1d1f476c60e16b318fbc3998c9ef942d","score":"0.4853496","text":"protected function campaignsAddRequest($data)\n {\n // verify the required parameter 'data' is set\n if ($data === null || (is_array($data) && count($data) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $data when calling campaignsAdd'\n );\n }\n\n $resourcePath = '/campaigns/add';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n if (in_array('multipart/form-data', ['application/json', 'application/xml'])) {\n $multipart = true;\n }\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json', 'application/xml']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('access_token');\n if ($apiKey !== null) {\n $queryParams['access_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('nonce');\n if ($apiKey !== null) {\n $queryParams['nonce'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('timestamp');\n if ($apiKey !== null) {\n $queryParams['timestamp'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n } else {\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n }\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"cdcd9900e2b24f73ccc6cd95801cfb45","score":"0.48420426","text":"public abstract function push($queueName, array $body, $options = []);","title":""},{"docid":"5edc301cbdc519e63671ac8e54914062","score":"0.48214164","text":"public function delFromQueue($id)\n\t{\n\t\t$header = <<\n\n\teditqueue\n\t\n\t\t\n\t\t\tGroupDelete\n\t\t\n\t\t\n\t\t\t0\n\t\t\n\t\t\n\t\t\t\"\"\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t$id\n\t\t\t\t\n\t\t\t\n\t\t\n\t\n\nNZBGet_DELETE_FROM_QUEUE;\n\n\t\tnzedb\\utility\\Utility::getUrl([\n\t\t\t\t\t\t\t\t\t\t 'url' => $this->fullURL . 'editqueue',\n\t\t\t\t\t\t\t\t\t\t 'method' => 'post', 'postdata' => $header,\n\t\t\t\t\t\t\t\t\t\t 'verifycert' => false\n\t\t\t\t\t\t\t\t\t ]);\n\t}","title":""},{"docid":"a80aab501e63522ab63fa96f35e1f8db","score":"0.48157257","text":"public function addToQueue($to, $from, $subject, $content, $options = array());","title":""},{"docid":"a5583e6747bd2030dff9bc6da42e1667","score":"0.48063833","text":"protected function queue_reput($queue, $data)\n {\n $httpsqs = HttpsqsService::get();\n $httpsqs->put($queue, json_encode($data)); \n }","title":""},{"docid":"3fb9a02bef54bf1d2c540b6c34716653","score":"0.48027435","text":"protected function mailingsPostRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling mailingsPost'\n );\n }\n\n $resourcePath = '/mailings';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"a403f547ae2fa94f95dc08349efad2ee","score":"0.48015046","text":"public function queueMessage()\n\t{\n\t\tif(!isset($this->queueData)) $this->_triggerError('You cannot Queue a message that has not been created. Use newMessage() to create a new message.');\n\n\t\t// loop through possible users\n\t\t$to = $this->queueData['send']['to'];\n\t\t$from = $this->queueData['send']['from'];\n\t\t$type = intval($this->queueData['send']['type']);\n\t\t$when = $this->queueData['send']['when'];\n\t\t$receiverList = (is_array($to)) ? $to:array($to);\n\t\t$senderList = (is_array($from)) ? $to:array($from);\n\t\tunset($this->queueData['send']);\n\n\t\tfor($i=0; $idb->prepare($sender);\n\t\t\t$receiver = $this->db->prepare($receiver);\n\t\t\tif(isset($this->message)) $pushMessage = $this->db->prepare($this->message);\n\t\t\telse $pushMessage = '';\n\t\t\tif(isset($this->sound)) $pushSound = $this->db->prepare($this->sound);\n\t\t\telse $pushSound = '';\n\t\t\tif(isset($this->badge)) $pushBadge = $this->db->prepare($this->badge);\n\t\t\telse $pushBadge = 0;\n\t\t\tif(isset($this->extraParams))\n\t\t\t{\n\t\t\t\t$extraParams = json_encode($this->extraParams);\n\t\t\t\t$extraParams = $this->db->prepare($extraParams);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$extraParams = '';\n\t\t\t}\n\n\t\t\t$this->db->query(\"CALL addApnQueue({$sender}, {$receiver}, {$type}, {$pushBadge}, '{$pushSound}', '{$pushMessage}', '{$extraParams}')\");\n\t\t}\n\t\tunset($this->queueData);\n\t}","title":""},{"docid":"7c7aea234f48ecbe59012c5d37b35b16","score":"0.4795097","text":"protected function putApiTaskRequest($id, $priority = null, $stage = null, $subject = null, $assigned_agent = null, $description = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling putApiTask'\n );\n }\n\n $resourcePath = '/task/{id}.json';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // form params\n if ($priority !== null) {\n $formParams['priority'] = ObjectSerializer::toFormValue($priority);\n }\n // form params\n if ($stage !== null) {\n $formParams['stage'] = ObjectSerializer::toFormValue($stage);\n }\n // form params\n if ($subject !== null) {\n $formParams['subject'] = ObjectSerializer::toFormValue($subject);\n }\n // form params\n if ($assigned_agent !== null) {\n $formParams['assignedAgent'] = ObjectSerializer::toFormValue($assigned_agent);\n }\n // form params\n if ($description !== null) {\n $formParams['description'] = ObjectSerializer::toFormValue($description);\n }\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"41bc887558c6563e77819cfab3603b42","score":"0.4742162","text":"public function testSendMailsInQueue()\n {\n $this->markTestIncomplete(\"Doesn't send yet, need to doublecheck my table definition.\");\n\n $id_user = 1;\n $sender = 'testsuite@example.org';\n $recipient = 'testcase@example.org';\n $headers = array('X-TestSuite' => 1);\n $body = 'Lorem ipsum';\n\n $mailId1 = $this->queue->put($sender, $recipient, $headers, $body);\n\n $id_user = 1;\n $sender = 'testsuite@example.org';\n $recipient = 'testcase@example.org';\n $headers = array('X-TestSuite' => 2);\n $body = 'Lorem ipsum sit dolor';\n\n $mailId2 = $this->queue->put($sender, $recipient, $headers, $body);\n\n $this->assertEquals(2, $this->queue->getQueueCount());\n\n $status = $this->queue->sendMailsInQueue();\n if (Pear::isError($status)) {\n $this->fail(\"Error sending emails: {$status->getMessage()}.\");\n }\n $this->assertTrue($status);\n $this->assertEquals(0, $this->queue->getQueueCount());\n }","title":""},{"docid":"ea9801f2aa49becdf640c37fb729fa25","score":"0.4740589","text":"public function createQueue(?QueueAttributes $queueAttr = null): MessageResult {\n if ($queueAttr == null) {\n $queueAttr = $this->getDefaultQueueAttribute();\n }\n $request = new CreateQueueRequest($this->queueName, $queueAttr);\n try {\n $res = $this->client->createQueue($request);\n }\n catch (MnsException $e) {\n return MessageResult::Failed($e, \"CreateQueue\");\n }\n if ($res->isSucceed()) {\n return MessageResult::Success();\n } else {\n return MessageResult::Failed('Unknown error occurs.', \"CreateQueue\");\n }\n }","title":""},{"docid":"1ff3c1875ac9b7962fcfe4f97d885645","score":"0.4732601","text":"public function addFlowspace($name, $dpid, $priority, $match, $queues, $force_enqueue, $slice_action){\n\t\tglobal $request_count;\n\t\t//check for null pointers on required fields\n\t\tif($name==null || $dpid==null || $priority==null || $match==null || $slice_action==null){\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t//saving the non-optional parameters\n\t\t$params = array(\"name\"=>$name,\n\t\t\t\"dpid\"=>$dpid,\n\t\t\t\"priority\"=>$priority,\n\t\t\t\"match\"=>$match,\n\t\t\t\"slice-action\"=>$slice_action);\n\t\t\t\n\t\t//checking for optional parameters\n\t\tif($queues!=null){\n\t\t\t$temp = array(\"queues\"=>$queues);\n\t\t\t$params = array_merge((array)$params, (array)$temp);\n\t\t}\n\n\t\tif($force_enqueue!=null){\n\t\t\t$temp = array(\"force_enqueue\"=>$force_enqueue);\n\t\t\t$params = array_merge((array)$params, (array)$temp);\n\t\t}\n\n\t\t//creating the request\n\t\t$request = array(\"jsonrpc\"=>\"2.0\",\n\t\t\t\"method\"=>$this->CREATE_FLOWSPACE,\n\t\t\t\"id\"=>$request_count,\n\t\t\t\"params\"=>array($params));\n//var_dump($params);\n\t\t//increase the request id count\n\t\t$request_count++;\n\t\t//encode the array in to a json string\n\t\t$this->requestJson = json_encode($request);\n//var_dump($this->requestJson);\n\t\t//send the json request\n\t\t$result = $this->send($this->requestJson);\n\t\t//decode the result and return it\n\t\treturn json_decode($result,true);\n\t}","title":""},{"docid":"4e6cb04fb981e471a8488a7c64833a1f","score":"0.47187796","text":"protected function getWorkforcemanagementManagementunitIntradayQueuesRequest($muId, $date)\n {\n // verify the required parameter 'muId' is set\n if ($muId === null || (is_array($muId) && count($muId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $muId when calling getWorkforcemanagementManagementunitIntradayQueues'\n );\n }\n // verify the required parameter 'date' is set\n if ($date === null || (is_array($date) && count($date) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $date when calling getWorkforcemanagementManagementunitIntradayQueues'\n );\n }\n\n $resourcePath = '/api/v2/workforcemanagement/managementunits/{muId}/intraday/queues';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($date !== null) {\n $queryParams['date'] = ObjectSerializer::toQueryValue($date);\n }\n\n // path params\n if ($muId !== null) {\n $resourcePath = str_replace(\n '{' . 'muId' . '}',\n ObjectSerializer::toPathValue($muId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"4bd8e69acfde74e4c6045f86e92f7c05","score":"0.47181526","text":"public function getByQueueId($queue_id);","title":""},{"docid":"dbb5e153c9eb96d433eed6396fea817b","score":"0.47106367","text":"public function buildQueue()\n {\n $this->queue = new Queue(uniqid('', true), $this->getResponseStream());\n }","title":""},{"docid":"b7cb5730b43568bc91331c690eef7ba5","score":"0.46905056","text":"protected function smtpLogMessageIdDeleteRequest($messageId)\n {\n // verify the required parameter 'messageId' is set\n if ($messageId === null || (is_array($messageId) && count($messageId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $messageId when calling smtpLogMessageIdDelete'\n );\n }\n\n $resourcePath = '/smtp/log/{messageId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($messageId !== null) {\n $resourcePath = str_replace(\n '{' . 'messageId' . '}',\n ObjectSerializer::toPathValue($messageId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('partner-key');\n if ($apiKey !== null) {\n $headers['partner-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"ce63f2998cb51bdb0b1778c7b3d3de23","score":"0.46871302","text":"private function _convertSetQueueAttributes($request) {\n \n $parameters = array();\n $parameters['Action'] = 'SetQueueAttributes';\n if ($request->isSetQueueName()) {\n $parameters['QueueName'] = $request->getQueueName();\n }\n foreach ($request->getAttribute() as $attributeIndex => $attribute) {\n if ($attribute->isSetName()) {\n $parameters['Attribute' . '.' . ($attributeIndex + 1) . '.' . 'Name'] = $attribute->getName();\n }\n if ($attribute->isSetValue()) {\n $parameters['Attribute' . '.' . ($attributeIndex + 1) . '.' . 'Value'] = $attribute->getValue();\n }\n\n }\n\n return $parameters;\n }","title":""},{"docid":"afd26c4d70afcd88b993e4c3b2f05f41","score":"0.46755007","text":"public function createRequest($data) {\n\t\t// add on duplicate key\n\t\t$sql = \"INSERT INTO `\" . DB_PREFIX . \"ms_pg_request`\n\t\t\t\tSET seller_id = \" . (int)$data['seller_id'] . \",\n\t\t\t\t\tproduct_id = \" . (isset($data['product_id']) ? (int)$data['product_id'] : 'NULL') . \",\n\t\t\t\t\torder_id = \" . (isset($data['order_id']) ? (int)$data['order_id'] : 'NULL') . \",\n\t\t\t\t\trequest_type = \" . (int)$data['request_type'] . \",\n\t\t\t\t\trequest_status = \" . (int)$data['request_status'] . \",\n\t\t\t\t\tdescription = '\" . $this->db->escape(htmlspecialchars(nl2br($data['description']), ENT_COMPAT)) . \"',\n\t\t\t\t\tamount = \". (float)$this->currency->format($data['amount'], $this->config->get('config_currency'), '', FALSE) . \",\n\t\t\t\t\tcurrency_id = \" . (int)$data['currency_id'] . \",\n\t\t\t\t\tcurrency_code = '\" . $this->db->escape($data['currency_code']) . \"',\n\t\t\t\t\tdate_created = NOW(),\n\t\t\t\t\tdate_modified = NULL\";\n\n\t\t$this->db->query($sql);\n\t\treturn $this->db->getLastId();\n\t}","title":""},{"docid":"a48259b4671df18a8e4db99ad1a7cdfa","score":"0.46655348","text":"function queue_mail_cc($mail_id, $to_name, $to_address) {\n\n\t$sql = \"select * from mail_queue where mail_id=\".$mail_id;\n\t$result = mysql_query($sql) or die(mysql_error());\n\t$row=mysql_fetch_array($result);\n\n\n\t$attachments=$row['attachments'];\n\t\n\t$now = (gmdate(\"Y-m-d H:i:s\"));\n\n\t$sql = \"INSERT INTO mail_queue (mail_id, mail_date, to_address, to_name, from_address, from_name, subject, message, html_message, attachments, status, error_msg, retry_count, template_id, date_stamp, att1_name, att2_name, att3_name) VALUES('', '$now', '$to_address', '$to_name', '\".addslashes($row['from_address']).\"', '\".addslashes($row['from_name']).\"', '\".addslashes($row['subject']).\"', '\".addslashes($row['message']).\"', '\".addslashes($row['html_message']).\"', '\".addslashes($row['attachments']).\"', 'queued', '', 0, '\".addslashes($row['template_id']).\"', '$now', '\".addslashes($row['att1_name']).\"', '\".addslashes($row['att2_name']).\"', '\".addslashes($row['att3_name']).\"')\";\n\n\tmysql_query ($sql) or q_mail_error (mysql_error().$sql);\n\n\t$mail_id = mysql_insert_id();\n\n\n\n\treturn $mail_id;\n\n}","title":""},{"docid":"1971bb330db09853ecc15a40e71d049e","score":"0.46633115","text":"public function addEmailToQueue($from_email, $from_name, $replyto_address, $replyto_name, array $recipients, array $cc, array $bcc, $subject, $body)\n\t{\n\t\t$this->db->trans_start();\n\n\t\tif (!$this->db->query('\n\t\t\tINSERT INTO mail_queue\n\t\t\t\t(from_address, from_name, replyto, replyto_name, subject, body, enqueue_date, sent_date, tries, try_date)\n\t\t\tVALUES\n\t\t\t\t(?, ?, ?, ?, ?, ?, NOW(), \\'0000-00-00 00:00:00\\', 0, \\'0000-00-00 00:00:00\\')', array(\n\t\t\t\t$from_email,\n\t\t\t\t$from_name,\n\t\t\t\t$replyto_address,\n\t\t\t\t$replyto_name,\n\t\t\t\t$subject,\n\t\t\t\t$body,\n\t\t\t))\n\t\t) {\n\t\t\treturn $this->db->error;\n\t\t}\n\n\t\t$mail_id = $this->db->insert_id();\n\n\t\t$mail_recipients = array();\n\t\tforeach ($recipients as $email => $name) {\n\t\t\t$mail_recipients[] = $mail_id;\n\t\t\t$mail_recipients[] = Email_model::RECIPIENT_TO;\n\t\t\t$mail_recipients[] = $email;\n\t\t\t$mail_recipients[] = $name;\n\t\t}\n\t\tforeach ($cc as $email => $name) {\n\t\t\t$mail_recipients[] = $mail_id;\n\t\t\t$mail_recipients[] = Email_model::RECIPIENT_CC;\n\t\t\t$mail_recipients[] = $email;\n\t\t\t$mail_recipients[] = $name;\n\t\t}\n\t\tforeach ($bcc as $email => $name) {\n\t\t\t$mail_recipients[] = $mail_id;\n\t\t\t$mail_recipients[] = Email_model::RECIPIENT_BCC;\n\t\t\t$mail_recipients[] = $email;\n\t\t\t$mail_recipients[] = $name;\n\t\t}\n\n\t\tif (!$this->db->query('\n\t\t\tINSERT INTO mail_recipient\n\t\t\t\t(mail_id, recipient_type, address, name)\n\t\t\tVALUES\n\t\t\t\t' . implode(', ', array_fill(0, count($recipients) + count($cc) + count($bcc), '(?, ?, ?, ?)')), $mail_recipients)\n\t\t) {\n\t\t\treturn $this->db->error;\n\t\t}\n\n\t\t$this->db->trans_complete();\n\t\t\n\t\treturn true;\n\t}","title":""},{"docid":"24b7275ca307e140d1a7d4b1913cbf00","score":"0.46621242","text":"protected function putOrderStatusItemRequest($id, $orderStatus = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling putOrderStatusItem'\n );\n }\n\n $resourcePath = '/order_statuses/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($orderStatus)) {\n $_tempBody = $orderStatus;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/ld+json', 'application/json', 'text/csv', 'text/html']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/ld+json', 'application/json', 'text/csv', 'text/html'],\n ['application/ld+json', 'application/json', 'text/csv', 'text/html']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"8a0cd33eb19c0e1f90f18846ad6644f2","score":"0.46471405","text":"private static function insertToQueue($status, $subject, $body, $toEmail = array(), $cc = array(), $bcc = array(), $attachment = array(), $fromName = null){\n\t\t$sendEmailTaskVo = new SendEmailTaskVo ();\n\t\t$sendEmailTaskVo->subject = $subject;\n\t\t$sendEmailTaskVo->body = $body;\n\t\t$sendEmailTaskVo->to = JsonUtil::encode($toEmail);\n\t\t$sendEmailTaskVo->cc = JsonUtil::encode($cc);\n\t\t$sendEmailTaskVo->bcc = JsonUtil::encode($bcc);\n\t\t$sendEmailTaskVo->attachments = JsonUtil::encode($attachment);\n\t\t$sendEmailTaskVo->fromName = $fromName;\n\t\t$sendEmailTaskVo->status = $status;\n\t\t// Add task to the queue.\n\t\t$sendEmailTaskDao = new SendEmailTaskBaseDao ();\n\t\t$sendEmailTaskDao->insertDynamic($sendEmailTaskVo);\n\t}","title":""},{"docid":"e16102665337acfbdf1e500016d52545","score":"0.46281445","text":"public function queueMessageAction()\n {\n $message = $this->_initMessage();\n if (!$message->getId()) {\n $template = $this->_initTemplate('template_id');\n if (!$template->getId()) {\n $this->_getSession()->addError($this->__('Template for new AirMail Message does not exist.'));\n $this->_redirect('*/*/template');\n }\n }\n\n if (isset($template)) {\n $appId = $template->getApplicationId();\n } else {\n $appId = Mage::getModel('xmlconnect/template')->load($message->getTemplateId())->getApplicationId();\n }\n\n /** @var $app Mage_XmlConnect_Model_Application */\n $app = Mage::getModel('xmlconnect/application')->load($appId);\n\n if(!$app->isNotificationsActive()) {\n $this->_getSession()->addError(\n $this->__('Queue is allowed only for applications with enabled Push Notification.')\n );\n $action = $message->getId() ? 'queue' : 'template';\n $this->_redirect('*/*/' . $action);\n return;\n }\n\n $this->loadLayout();\n if ($message->getId()) {\n $title = $this->__('Edit AirMail Message');\n } else {\n $title = $this->__('New AirMail Message');\n }\n $this->_addBreadcrumb(\n $this->__('AirMail Message Queue'), $this->__('AirMail Message Queue'), $this->getUrl('*/*/queue')\n );\n $this->_addBreadcrumb($title, $title);\n\n $this->_setActiveMenu('xmlconnect/queue');\n $this->renderLayout();\n }","title":""},{"docid":"70d110d233336bbf4a380b5ce163dd27","score":"0.4625044","text":"public function add(\\Puja\\Library\\Queue\\Entity\\Queue$queue)\n {\n }","title":""},{"docid":"70f529bcccc494c808324a614d5729c3","score":"0.46195135","text":"public function addAnnouncementQueue() {\n try {\n if (!($this->announcementQueue instanceof Base_Model_ObtorLib_App_Core_Announcement_Entity_AnnouncementQueue)) {\n throw new Base_Model_ObtorLib_App_Core_Announcement_Exception(\" AnnouncementQueue Entity not intialized\");\n } else {\n $data = array(\n 'status' => $this->announcementQueue->getStatus(),\n 'added_on' => $this->announcementQueue->getAddedOn(),\n 'updated_on' => $this->announcementQueue->getUpdatedOn(),\n 'staff_id' => $this->announcementQueue->getStaffId(),\n 'customer_id' => $this->announcementQueue->getCustomerId(),\n 'announcement_id' => $this->announcementQueue->getAnnouncement());\n \n $last_inserted_id = $this->insert($data);\n return $last_inserted_id;\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Announcement_Exception($ex);\n }\n }","title":""},{"docid":"19043e4ae682672c9ab3d8d9e48a255c","score":"0.46101785","text":"public function enqueue($queue, $command);","title":""},{"docid":"82527de704cd873bc0cc2c3a59cfce08","score":"0.46066695","text":"function SendQueue() {\n\t\tglobal $db;\n\n\t\trequire_once(AC_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');\n\t\t$mailQueueDAO = new MailQueueDAO();\n\t\t$rows = $mailQueueDAO->getAll();\n\n\t\t$mail_ids = array();\n\t\t\n\t\tif (is_array($rows))\n\t\t{\n\t\t\tforeach ($rows as $id => $row) \n\t\t\t{\n\t\t\t\t$this->ClearAllRecipients();\n\t\n\t\t\t\t$this->AddAddress($row['to_email'], $row['to_name']);\n\t\t\t\t$this->From = $row['from_email'];\n\t\t\t\t$this->FromName = $row['from_name'];\n\t\t\t\t$this->CharSet = $row['char_set'];\n\t\t\t\t$this->Subject = $row['subject'];\n\t\t\t\t$this->Body = $row['body'];\n\t\n\t\t\t\tparent::Send();\n\t\n\t\t\t\t$mail_ids[] = $row['mail_id'];\n\t\t\t}\n\t\t\tif ($mail_ids) \n\t\t\t{\n\t\t\t\tinclude(AC_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');\n\t\t\t\t$mailQueueDAO = new MailQueueDAO();\n\t\n\t\t\t\t$mailQueueDAO->DeleteByIDs($mail_ids);\n\t\t\t}\n\t\t}\n\t}","title":""},{"docid":"70908a5eb3453cd4d6d1472d512d09c5","score":"0.4599109","text":"protected function deleteScheduledEmailByIdRequest($identifier)\n {\n // verify the required parameter 'identifier' is set\n if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $identifier when calling deleteScheduledEmailById'\n );\n }\n\n $resourcePath = '/smtp/email/{identifier}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($identifier !== null) {\n $resourcePath = str_replace(\n '{' . 'identifier' . '}',\n ObjectSerializer::toPathValue($identifier),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\n if ($apiKey !== null) {\n $headers['api-key'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('partner-key');\n if ($apiKey !== null) {\n $headers['partner-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"76f32706e873bd939fb5efddaf540a2b","score":"0.45946047","text":"private function queueForWrite()\n {\n if (count($this->creates)) {\n // Debugging information\n $this->logger->info(__FILE__ . __FUNCTION__);\n\n $createObject = 'Synapse\\UploadBundle\\Job\\ManageGroupStudentBulkUpload';\n\n // get unique id\n $jobNumber = uniqid();\n\n // create the job with the information given\n $job = new $createObject();\n $job->queue = $this->queue;\n $job->args = array(\n 'creates' => $this->creates,\n 'jobNumber' => $jobNumber,\n 'uploadId' => $this->uploadId,\n 'orgId' => $this->organizationId,\n 'duplicatedExternalIDs' => implode(\",\", $this->duplicatedExternalIDs)\n );\n\n\n // send the job\n $this->jobs[$jobNumber] = $this->resque->enqueue($job, true);\n }\n // reset the object so the same thing is not uploaded each time\n $this->creates = [];\n }","title":""},{"docid":"dddab92d18e02eb43cbe8840ec12cd06","score":"0.4579092","text":"protected function getWorkforcemanagementSchedulingjobRequest($jobId)\n {\n // verify the required parameter 'jobId' is set\n if ($jobId === null || (is_array($jobId) && count($jobId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $jobId when calling getWorkforcemanagementSchedulingjob'\n );\n }\n\n $resourcePath = '/api/v2/workforcemanagement/schedulingjobs/{jobId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($jobId !== null) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($jobId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"7a482c0f5d97110cabda4157e07ca45d","score":"0.45652086","text":"function create_scheduling_requests( &$resource ) {\n if ( ! is_object($resource) ) {\n dbg_error_log( 'PUT', 'create_scheduling_requests called with non-object parameter (%s)', gettype($resource) );\n return;\n }\n\n $attendees = $resource->GetPropertiesByPath('/VCALENDAR/*/ATTENDEE');\n\t$wr_attendees = $resource->GetPropertiesByPath('/VCALENDAR/*/X-WR-ATTENDEE');\n\tif ( count ( $wr_attendees ) > 0 ) {\n dbg_error_log( 'POST', 'Non-compliant iCal request. Using X-WR-ATTENDEE property' );\n foreach( $wr_attendees AS $k => $v ) {\n $attendees[] = $v;\n }\n }\n if ( count($attendees) == 0 ) {\n dbg_error_log( 'PUT', 'Event has no attendees - no scheduling required.', count($attendees) );\n return;\n }\n\n dbg_error_log( 'PUT', 'Adding to scheduling inbox %d attendees', count($attendees) );\n foreach( $attendees AS $attendee ) {\n $attendee->SetParameterValue( 'SCHEDULE-STATUS', write_scheduling_request( $resource, $attendee->Value(), true ) );\n }\n}","title":""},{"docid":"4ca667c188b613002728e3f04236d93a","score":"0.45410302","text":"protected function scheduledPlansForSpaceRequest($space_id, $fields = null)\n {\n // verify the required parameter 'space_id' is set\n if ($space_id === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $space_id when calling scheduledPlansForSpace'\n );\n }\n\n $resourcePath = '/scheduled_plans/space/{space_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n\n // path params\n if ($space_id !== null) {\n $resourcePath = str_replace(\n '{' . 'space_id' . '}',\n ObjectSerializer::toPathValue($space_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"4b64feaac878c779c1ba3fc5e64b31f4","score":"0.453971","text":"protected function addRequest($organization, $body, $processId, $witRefName, $groupId, $apiVersion)\n {\n // verify the required parameter 'organization' is set\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization when calling add'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling add'\n );\n }\n // verify the required parameter 'processId' is set\n if ($processId === null || (is_array($processId) && count($processId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $processId when calling add'\n );\n }\n // verify the required parameter 'witRefName' is set\n if ($witRefName === null || (is_array($witRefName) && count($witRefName) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $witRefName when calling add'\n );\n }\n // verify the required parameter 'groupId' is set\n if ($groupId === null || (is_array($groupId) && count($groupId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $groupId when calling add'\n );\n }\n // verify the required parameter 'apiVersion' is set\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $apiVersion when calling add'\n );\n }\n\n $resourcePath = '/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($apiVersion !== null) {\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\n }\n\n // path params\n if ($organization !== null) {\n $resourcePath = str_replace(\n '{' . 'organization' . '}',\n ObjectSerializer::toPathValue($organization),\n $resourcePath\n );\n }\n // path params\n if ($processId !== null) {\n $resourcePath = str_replace(\n '{' . 'processId' . '}',\n ObjectSerializer::toPathValue($processId),\n $resourcePath\n );\n }\n // path params\n if ($witRefName !== null) {\n $resourcePath = str_replace(\n '{' . 'witRefName' . '}',\n ObjectSerializer::toPathValue($witRefName),\n $resourcePath\n );\n }\n // path params\n if ($groupId !== null) {\n $resourcePath = str_replace(\n '{' . 'groupId' . '}',\n ObjectSerializer::toPathValue($groupId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"bbfdd6e70d90be1459fcae584adeb166","score":"0.45392138","text":"public function delete($queue_id);","title":""},{"docid":"f050b1b341cf448ddb10a323090840b6","score":"0.45386273","text":"protected function putEmailSenderRequest($sender_id, $email_sender_put_request)\n {\n // verify the required parameter 'sender_id' is set\n if ($sender_id === null || (is_array($sender_id) && count($sender_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $sender_id when calling putEmailSender'\n );\n }\n if ($sender_id < 1) {\n throw new \\InvalidArgumentException('invalid value for \"$sender_id\" when calling SendersApi.putEmailSender, must be bigger than or equal to 1.');\n }\n\n // verify the required parameter 'email_sender_put_request' is set\n if ($email_sender_put_request === null || (is_array($email_sender_put_request) && count($email_sender_put_request) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $email_sender_put_request when calling putEmailSender'\n );\n }\n\n $resourcePath = '/senders/email/{sender_id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($sender_id !== null) {\n $resourcePath = str_replace(\n '{' . 'sender_id' . '}',\n ObjectSerializer::toPathValue($sender_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($email_sender_put_request)) {\n $_tempBody = $email_sender_put_request;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Apikey');\n if ($apiKey !== null) {\n $headers['Apikey'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"a94ce07c6d9391a14a1be838e72a5d74","score":"0.45194376","text":"public function queue($name = null);","title":""},{"docid":"058a51f811298ba6eb3264cb4ca707b5","score":"0.45113197","text":"public function putRequest()\n\t{\n\n\t}","title":""},{"docid":"725f1c678e7516ddf6bbffa4178d2f73","score":"0.4503776","text":"public function createQueue($queueName, $createQueueOptions = null);","title":""},{"docid":"d1a31cad52924b4e758e5ce52b4bf350","score":"0.45036888","text":"protected function voucherMarkAsPaidRequest($id, $body = null) {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling voucherMarkAsPaid'\n );\n }\n\n $resourcePath = '/Voucher/{id}/markAsPaid';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/xml', 'application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/xml', 'application/json'],\n ['application/x-www-form-urlencoded']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('token');\n if ($apiKey !== null) {\n $queryParams['token'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"300568fe12a99d5598544c0be190adbc","score":"0.4487947","text":"public function archiveTokenRequest($token_id)\n {\n // verify the required parameter 'token_id' is set\n if ($token_id === null || (is_array($token_id) && count($token_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $token_id when calling archiveToken'\n );\n }\n\n $resourcePath = '/marketing/v3/transactional/smtp-tokens/{tokenId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($token_id !== null) {\n $resourcePath = str_replace(\n '{' . 'tokenId' . '}',\n ObjectSerializer::toPathValue($token_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if (!empty($this->config->getAccessToken())) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"3b4b4e2745b66159d7c2883e9b403104","score":"0.44871387","text":"public function initQueue($routingKey, $queueName = null, $durable = true, $autodelete = false)\n {\n try {\n $channel = $this->getChannel();\n\n // Set the publisher's queue\n if (empty($queueName) && !empty($this->queueName)) {\n $queueName = $this->queueName;\n } else\n $this->setQueueName($queueName);\n \n // Sets the routing key for the queue\n $this->setRoutingKey($routingKey);\n //Create queue or use existing (define as persistent)\n $channel->queue_declare($queueName, false, $durable, false, $autodelete);\n // Do the binding of queue to exchange to route messages to correct queue\n $channel->queue_bind($queueName, $this->exchangeName, $routingKey);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n }","title":""},{"docid":"dcf3e8d9e8fb61f9b85efbd0b61baae3","score":"0.44822878","text":"protected function jobsPostRequest($authorization, $body) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsPost'\n );\n }\n // Verify the required parameter 'body' is set.\n if ($body === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling jobsPost'\n );\n }\n\n $resourcePath = '/jobs';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Body params.\n $_tempBody = NULL;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // For HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"923d54b174058806c2b51261a50b6b8f","score":"0.44680718","text":"protected function deleteApiTaskRequest($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling deleteApiTask'\n );\n }\n\n $resourcePath = '/task/{id}.json';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"ef0aece396f038eca048163b50229692","score":"0.44614497","text":"protected function taskgroupsUpdateRequest($organization, $body, $project, $taskGroupId, $apiVersion)\n {\n // verify the required parameter 'organization' is set\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization when calling taskgroupsUpdate'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling taskgroupsUpdate'\n );\n }\n // verify the required parameter 'project' is set\n if ($project === null || (is_array($project) && count($project) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $project when calling taskgroupsUpdate'\n );\n }\n // verify the required parameter 'taskGroupId' is set\n if ($taskGroupId === null || (is_array($taskGroupId) && count($taskGroupId) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $taskGroupId when calling taskgroupsUpdate'\n );\n }\n // verify the required parameter 'apiVersion' is set\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $apiVersion when calling taskgroupsUpdate'\n );\n }\n\n $resourcePath = '/{organization}/{project}/_apis/distributedtask/taskgroups/{taskGroupId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($apiVersion !== null) {\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\n }\n\n // path params\n if ($organization !== null) {\n $resourcePath = str_replace(\n '{' . 'organization' . '}',\n ObjectSerializer::toPathValue($organization),\n $resourcePath\n );\n }\n // path params\n if ($project !== null) {\n $resourcePath = str_replace(\n '{' . 'project' . '}',\n ObjectSerializer::toPathValue($project),\n $resourcePath\n );\n }\n // path params\n if ($taskGroupId !== null) {\n $resourcePath = str_replace(\n '{' . 'taskGroupId' . '}',\n ObjectSerializer::toPathValue($taskGroupId),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token) OR HTTP Basic Authentication with personal access token\n if ($this->config->getAccessToken() !== null) {\n\t\t\t$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n\t\t}\n\n\t\tif ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n\t\t\t$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n\t\t}\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"fd3e6efbb1c858234f514a400dc896ff","score":"0.4459506","text":"public function __construct($email_queue)\n {\n $this->email_queue = $email_queue;\n }","title":""},{"docid":"a32ad204f11d56b7e4e520d8aac77fbc","score":"0.44579569","text":"public function addQueue($name, $starting = null, $ending = null) {\n $q = new Queue();\n $q->setName($name);\n\n $q->setLowerBound($starting);\n $q->setUpperBound($ending);\n\n $this->dm->persist($q);\n\n $this->dm->flush();\n\n return true;\n }","title":""},{"docid":"47ad8d90283bc6ac43fdd2f3bf87b91c","score":"0.44525307","text":"public static function insert_from_queue( $id, $action, $args );","title":""},{"docid":"4dd2269247c09853b79b66d67daebe0f","score":"0.44465634","text":"public static function enqueue($to, string $subject, array $data)\n {\n $validation = \\Config\\Services::validation();\n\n if($validation->check($to,'required|valid_email') && $validation->check($subject,'required')){\n\n $queue = new EmailQueueModel();\n\n return $queue->enqueue($to, $subject, $data);\n\n }else{\n\n return redirect()->back()->with('error', $validation->getErrors());\n\n }\n }","title":""},{"docid":"e0d3f449b0d904549623003cc429ba47","score":"0.44450578","text":"protected function updateCustomerGroupRequest($number, $body)\n {\n // verify the required parameter 'number' is set\n if ($number === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $number when calling updateCustomerGroup'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateCustomerGroup'\n );\n }\n\n $resourcePath = '/customer-groups/{number}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($number !== null) {\n $resourcePath = str_replace(\n '{' . 'number' . '}',\n ObjectSerializer::toPathValue($number),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers= $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"cbf4cfec6ae0b3cd01e14bd005eaa8aa","score":"0.44407734","text":"public function addOrganisationToQueue(AddOrganisationToQueueRequest $request)\n {\n $this->manageCustomerQueue->addOrganisationToQueue($request);\n\n notify()->flash($request->input('organisationName') . \" Successfully Added to the Queue!\", \"success\", ['icon' => \"check\"]);\n\n return Redirect::back();\n }","title":""},{"docid":"6902165140ca385323080ef377408457","score":"0.44266328","text":"public function queue();","title":""},{"docid":"c85520c0867e66217b9ed23b6ab6820d","score":"0.44249249","text":"public function createShipmentRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling createShipment'\n );\n }\n\n $resourcePath = '/mfn/v0/shipments';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($body)) {\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\n } else {\n $httpBody = $body;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n }\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"56c31fe83158b06517198d0cde8b7e96","score":"0.44099864","text":"function qruqsp_ntst_messageAdd(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'participant_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Participant'),\n 'status'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Status'),\n 'number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Message Number'),\n 'precedence'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Precedence'),\n 'hx'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Handling'),\n 'station_of_origin'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Station of Origin'),\n 'check_number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Check'),\n 'place_of_origin'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Place of Origin'),\n 'time_filed'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Time Filed'),\n 'date_filed'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Date Filed'),\n 'to_name_address'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Name/Address'),\n 'phone_number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Phone Number'),\n 'email'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Email'),\n 'message'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Message'),\n 'spoken'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Spoken'),\n 'signature'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Signature'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner\n //\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'private', 'checkAccess');\n $rc = qruqsp_ntst_checkAccess($ciniki, $args['tnid'], 'qruqsp.ntst.messageAdd');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n \n //\n // Load the net details for the participant\n //\n $strsql = \"SELECT participants.callsign, \"\n . \"participants.name, \"\n . \"participants.flags, \"\n . \"participants.place_of_origin, \"\n . \"participants.phone, \"\n . \"participants.email, \"\n . \"nets.id AS net_id, \"\n . \"nets.name, \"\n . \"nets.message_sources \"\n . \"FROM qruqsp_ntst_participants AS participants \"\n . \"INNER JOIN qruqsp_ntst_nets AS nets ON (\"\n . \"participants.net_id = nets.id \"\n . \"AND nets.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE participants.id = '\" . ciniki_core_dbQuote($ciniki, $args['participant_id']) . \"' \"\n . \"AND participants.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'qruqsp.ntst', 'participant');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.10', 'msg'=>'Unable to load participant', 'err'=>$rc['err']));\n }\n if( !isset($rc['participant']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.11', 'msg'=>'Unable to find requested participant'));\n }\n $participant = $rc['participant'];\n $args['net_id'] = $rc['participant']['net_id'];\n\n $dt = new DateTime('now', new DateTimezone('UTC'));\n if( !isset($args['time_filed']) || $args['time_filed'] == '' ) {\n $args['time_filed'] = $dt->format('Hi') . 'Z';\n }\n if( !isset($args['date_filed']) || $args['date_filed'] == '' ) {\n $args['date_filed'] = $dt->format('M d');\n }\n $dt->sub(new DateInterval('P3M'));\n\n //\n // Check for next number if one was not passed\n //\n if( !isset($args['number']) || $args['number'] == '' ) {\n $strsql = \"SELECT MAX(messages.number) AS num \"\n . \"FROM qruqsp_ntst_participants AS participants \"\n . \"INNER JOIN qruqsp_ntst_messages AS messages ON (\"\n . \"participants.id = messages.participant_id \"\n . \"AND messages.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND messages.date_added > '\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d')) . \"' \"\n . \") \"\n . \"\";\n// $strsql .= \"WHERE participants.callsign = '\" . ciniki_core_dbQuote($ciniki, $participant['callsign']) . \"' \";\n $strsql .= \"WHERE participants.net_id = '\" . ciniki_core_dbQuote($ciniki, $participant['net_id']) . \"' \";\n $strsql .= \"AND participants.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'qruqsp.ntst', 'last');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.26', 'msg'=>'Unable to load number', 'err'=>$rc['err']));\n }\n if( isset($rc['last']['num']) && $rc['last']['num'] != '' ) {\n $args['number'] = sprintf(\"%03d\", ($rc['last']['num'] + 1));\n } else {\n $args['number'] = '001';\n }\n }\n\n if( !isset($args['precedence']) || $args['precedence'] == '' ) {\n $args['precedence'] = 'R';\n }\n\n if( !isset($args['station_of_origin']) || $args['station_of_origin'] == '' ) {\n $args['station_of_origin'] = $participant['callsign'];\n }\n if( !isset($args['place_of_origin']) || $args['place_of_origin'] == '' ) {\n $args['place_of_origin'] = $participant['place_of_origin'];\n }\n\n //\n // Load a message if one is not supplied\n //\n/* if( !isset($args['message']) || $args['message'] == '' ) {\n //\n // Get the last 3 months or 100 messages MD5's to compare with our message file\n //\n $strsql = \"SELECT md5(message) AS m \"\n . \"FROM qruqsp_ntst_messages \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"ORDER BY date_added DESC \"\n . \"LIMIT 100 \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQueryList');\n $rc = ciniki_core_dbQueryList($ciniki, $strsql, 'qruqsp.ntst', 'messages', 'm');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.24', 'msg'=>'Unable to load the list of messages', 'err'=>$rc['err']));\n }\n $existing_messages = isset($rc['messages']) ? $rc['messages'] : '';\n\n //\n // Load the messages file specified for th net\n //\n $message_source = 'quotes.csv';\n if( isset($participant['message_sources']) ) {\n //\n // FIXME: Add lookup of source\n //\n }\n\n //\n // Open the messages file, and generate MD5 array\n //\n $filename = $ciniki['config']['ciniki.core']['root_dir'] . '/qruqsp-mods/ntst/messages/' . $message_source;\n $message_file = file($filename);\n $messages = array();\n foreach($message_file as $line) {\n $pieces = explode(\"::\", $line);\n if( is_array($pieces) && count($pieces) > 1 ) {\n $messages[md5($pieces[0])] = array(\n 'message' => preg_replace(\"/\\[\\[(.*)||.*\\]\\]/g\", \"$1\", $pieces[0]),\n 'spoken' => preg_replace(\"/\\[\\[.*||(.*)\\]\\]/g\", \"$1\", $pieces[0]),\n 'signature' => $pieces[1],\n );\n }\n }\n if( count($messages) < 2 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.25', 'msg'=>'Message file is empty.'));\n }\n\n //\n // Find the last message sent from this file, so we know what's the next\n // message to send. Go through the list of existing md5 hashes in \n // descending order from the SQL above to find last one used.\n //\n foreach($existing_messages as $hash) {\n if( isset($messages[$hash]) ) {\n //\n // MD5 exists, now find position in array\n //\n $next = 'no';\n foreach($messages as $k => $v) {\n if( $next == 'yes' ) {\n $next_message = $v;\n break;\n } \n if( $k == $hash ) {\n $next = 'yes';\n// $next_message = next($messages);\n// if( $next_message === false ) {\n// $next_message = reset($messages);\n// }\n// break;\n }\n }\n \n break;\n }\n }\n if( !isset($next_message) ) {\n $next_message = reset($messages);\n }\n\n //\n // Setup the args with the next message\n //\n $args['message'] = $next_message['message'];\n $args['spoken'] = $next_message['spoken'];\n $args['signature'] = $next_message['signature'];\n }\n*/\n if( !isset($args['check_number']) || $args['check_number'] == '' || $args['check_number'] == 0 ) {\n $args['check_number'] = str_word_count($args['message']);\n }\n\n if( !isset($args['to_name_address']) || $args['to_name_address'] == '' ) {\n $args['to_name_address'] = 'All Stations';\n }\n\n //\n // Start transaction\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'qruqsp.ntst');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Add the message to the database\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n $rc = ciniki_core_objectAdd($ciniki, $args['tnid'], 'qruqsp.ntst.message', $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'qruqsp.ntst');\n return $rc;\n }\n $message_id = $rc['id'];\n\n //\n // Commit the transaction\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'qruqsp.ntst');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Email the message\n //\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'private', 'messageSend');\n $rc = qruqsp_ntst_messageSend($ciniki, $args['tnid'], $message_id);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.27', 'msg'=>'', 'err'=>$rc['err']));\n }\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'qruqsp', 'ntst');\n\n //\n // Update the web index if enabled\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'hookExec');\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'qruqsp.ntst.message', 'object_id'=>$message_id));\n\n //\n // Return the details for the net\n //\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'public', 'netGet');\n $ciniki['request']['args']['net_id'] = $args['net_id'];\n return qruqsp_ntst_netGet($ciniki);\n}","title":""},{"docid":"08237bba106adb203bd086f7b1cef773","score":"0.440803","text":"static public function queueAdd($schoolID)\n { \n global $db;\n // Cancel any current request\n self::queueCancel($schoolID);\n\n // Number of partipants\n $query = \"\n SELECT\n COUNT(*) AS count\n FROM `contestant`, `team`, `group`\n WHERE \n `contestant`.teamID = `team`.ID AND\n `team`.groupID = `group`.ID AND\n `group`.schoolID = :schoolID AND\n `team`.`participationType` = 'Official' AND\n `group`.contestID IN (\".CERTIGEN_CONTESTS.\")\n \";\n $stmt = $db->prepare($query);\n $stmt->execute(array(':schoolID' => $schoolID));\n $nbStudents = $stmt->fetchObject()->count;\n\n if ($nbStudents == 0)\n return;\n\n $query = \"\n INSERT INTO `certi_queue` (`schoolID`,`nbStudents`,`requestDate`,`state`)\n VALUES (:schoolID, :nbStudents, NOW(), :stateWaiting)\n \";\n $stmt = $db->prepare($query);\n $stmt->execute(array_merge(array(':schoolID' => $schoolID, ':nbStudents' => $nbStudents), self::getArrayStates($query))); \n }","title":""},{"docid":"84bcda3790d974ad600700923cc690c4","score":"0.44007054","text":"public function store(Request $request , $id)\n {\n\n $data = $request->all();\n $data['project_id']= $id;\n\n return $this->service->create($data);\n\n }","title":""},{"docid":"e20004ab070ff715561c50724b04514c","score":"0.43962225","text":"public function testGetInvalidQueueByQueueId() {\n\t\t// first, assert the mySQL class is sane\n\t\t$this->assertNotNull($this->mysqli);\n\n\t\t// grab a queue that could never exist\n\t\t$mysqlQueue = Queue::getQueueByQueueId($this->mysqli, 12);\n\t\t$this->assertNull($mysqlQueue);\n\t}","title":""},{"docid":"e7ceece98db055eb453d1649385871bf","score":"0.43941742","text":"protected function campaignsUpdateRequest($data)\n {\n // verify the required parameter 'data' is set\n if ($data === null || (is_array($data) && count($data) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $data when calling campaignsUpdate'\n );\n }\n\n $resourcePath = '/campaigns/update';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n if (in_array('multipart/form-data', ['application/json', 'application/xml'])) {\n $multipart = true;\n }\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json', 'application/xml']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $httpBody = \\GuzzleHttp\\Psr7\\Query::build($formParams);\n } else {\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('access_token');\n if ($apiKey !== null) {\n $queryParams['access_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('nonce');\n if ($apiKey !== null) {\n $queryParams['nonce'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('timestamp');\n if ($apiKey !== null) {\n $queryParams['timestamp'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n if (class_exists('\\GuzzleHttp\\Psr7\\Query')) {\n $query = \\GuzzleHttp\\Psr7\\Query::build($queryParams);\n } else {\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n }\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"12b03184f0fd8bdd7888aad0527d6b0a","score":"0.4378426","text":"protected function taskgroupsAddRequest($organization, $body, $project, $apiVersion)\n {\n // verify the required parameter 'organization' is set\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $organization when calling taskgroupsAdd'\n );\n }\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling taskgroupsAdd'\n );\n }\n // verify the required parameter 'project' is set\n if ($project === null || (is_array($project) && count($project) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $project when calling taskgroupsAdd'\n );\n }\n // verify the required parameter 'apiVersion' is set\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $apiVersion when calling taskgroupsAdd'\n );\n }\n\n $resourcePath = '/{organization}/{project}/_apis/distributedtask/taskgroups';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($apiVersion !== null) {\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\n }\n\n // path params\n if ($organization !== null) {\n $resourcePath = str_replace(\n '{' . 'organization' . '}',\n ObjectSerializer::toPathValue($organization),\n $resourcePath\n );\n }\n // path params\n if ($project !== null) {\n $resourcePath = str_replace(\n '{' . 'project' . '}',\n ObjectSerializer::toPathValue($project),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token) OR HTTP Basic Authentication with personal access token\n if ($this->config->getAccessToken() !== null) {\n\t\t\t$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n\t\t}\n\n\t\tif ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\n\t\t\t$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n\t\t}\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"8eee9d42aeb0950cf477af88fc1f2cda","score":"0.43750218","text":"public function __construct(QueueFactory $queue) {\n $this->queue = $queue;\n }","title":""},{"docid":"2db2ceeb14da310bbe934ba0691a15c0","score":"0.4371527","text":"protected function addQueue($action, $managerName, $model, $id = null)\n {\n if (!in_array($action, array( self::QUEUE_ACTION_PERSIST, self::QUEUE_ACTION_REMOVE))) {\n throw new \\InvalidArgumentException(sprintf('Action unknown, manager name : \"%s\".', $managerName));\n }\n\n $this->queueActions[] = $action;\n $this->queueManagerNames[] = $managerName;\n $this->queueModels[] = $model;\n $this->queueIds[] = $id;\n }","title":""},{"docid":"84ce8e317e66092a482a2f5595ad3361","score":"0.43677002","text":"public function getQueueableId()\n {\n return $this->getKey();\n }","title":""},{"docid":"eb4bf28b4d1bb175435ba9f22ebd3725","score":"0.436672","text":"public abstract function release($queueName, array $message, $options = []);","title":""},{"docid":"5c9d9b515173524a3037c6cddf3a413b","score":"0.43585724","text":"function messages_post() //create\n {\n $message = array('id' => $this->get('id'), 'name' => $this->post('name'), 'email' => $this->post('email'), 'message' => 'ADDED!');\n \n $this->response($message, 200); // 200 being the HTTP response code\n }","title":""},{"docid":"ccebc9dcffe9145809bf83ebe6c64797","score":"0.4357377","text":"public function getQueueID()\n {\n return $this->queueID;\n }","title":""},{"docid":"8c2263209c81ae6e96e31916430262c0","score":"0.4349991","text":"function insertRequestInDb($user_id, $requestId, $toId)\n {\n $bdd = getConnexion();\n $sth = $bdd->prepare('INSERT INTO invitation (requestId, toId, senderId) VALUES (:request, :item, :sender )');\n $sth->bindParam(':sender', cleanData($user_id));\n $sth->bindParam(':request', cleanData($requestId));\n \n foreach ($toId as $to){\n $sth->bindParam(':item', $to);\n $sth->execute();\n }\n }","title":""},{"docid":"c9932becd984c3257c71fc0d71c24400","score":"0.43436968","text":"protected function addReceivingWorksheetRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling addReceivingWorksheet'\n );\n }\n\n $resourcePath = '/beta/receivingWorksheet';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"12c00e47cd5f21a0281ebdd6203062bf","score":"0.43411577","text":"protected function jobsJobIdDeleteRequest($authorization, $job_id) {\n // Verify the required parameter 'authorization' is set.\n if ($authorization === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $authorization when calling jobsJobIdDelete'\n );\n }\n // Verify the required parameter 'job_id' is set.\n if ($job_id === NULL) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $job_id when calling jobsJobIdDelete'\n );\n }\n\n $resourcePath = '/jobs/{jobId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = FALSE;\n\n // Header params.\n if ($authorization !== NULL) {\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\n }\n\n // Path params.\n if ($job_id !== NULL) {\n $resourcePath = str_replace(\n '{' . 'jobId' . '}',\n ObjectSerializer::toPathValue($job_id),\n $resourcePath\n );\n }\n\n // Body params.\n $_tempBody = NULL;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n }\n else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // For model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present.\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually.\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n }\n elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // For HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n }\n elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n }\n else {\n // For HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== NULL) {\n $headers['Authorization'] = $apiKey;\n }\n // This endpoint requires API key authentication.\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\n if ($apiKey !== NULL) {\n $headers['x-api-key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }","title":""},{"docid":"74dd2758e1826e03d070a0c29c553d63","score":"0.43336242","text":"public function tasks_put($id = NULL) {\n\t\t$id = $id == NULL ? $this->put('workitem_id') : $id;\n\t\tself::validate_access($id);\n\t\t$task = deserialize($this->get_data(), WorkitemTask::find($this->put('id')));\n\t\t$task->done_date = now();\n\t\t$task->save();\n\t\treturn $task;\n\t}","title":""},{"docid":"9079d9e850cac0a90ab806d068823e93","score":"0.43333855","text":"public function store($org_id = null, $cal_id = null)\n\t{\n\t\tif(!Input::has('schedule'))\n\t\t{\n\t\t\treturn new JSend('error', (array)Input::all(), 'Tidak ada data schedule.');\n\t\t}\n\n\t\t$errors\t\t\t\t\t\t= new MessageBag();\n\n\t\tDB::beginTransaction();\n\n\t\t//1. store schedule of calendar to queue\n\t\t$schedule\t\t\t\t\t\t= Input::get('schedule');\n\n\t\tif(is_null($schedule['id']))\n\t\t{\n\t\t\t$is_new\t\t\t\t\t= true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$is_new\t\t\t\t\t= false;\n\t\t}\n\n\t\t$schedule_rules\t\t\t\t=\t[\n\t\t\t\t\t\t\t\t\t\t\t'calendar_id'\t\t\t\t\t=> 'required|exists:tmp_calendars,id',\n\t\t\t\t\t\t\t\t\t\t\t'name'\t\t\t\t\t\t\t=> 'required|max:255',\n\t\t\t\t\t\t\t\t\t\t\t'status'\t\t\t\t\t\t=> 'required|in:DN,CB,UL,HB,L',\n\t\t\t\t\t\t\t\t\t\t\t'on'\t\t\t\t\t\t\t=> 'required|date_format:\"Y-m-d H:i:s\"',\n\t\t\t\t\t\t\t\t\t\t\t'start'\t\t\t\t\t\t\t=> 'required|date_format:\"H:i:s\"',\n\t\t\t\t\t\t\t\t\t\t\t'end'\t\t\t\t\t\t\t=> 'required|date_format:\"H:i:s\"',\n\t\t\t\t\t\t\t\t\t\t];\n\n\t\t//1a. Validate Basic schedule Parameter\n\t\t$parameter \t\t\t\t\t= $schedule;\n\t\tunset($parameter['calendar']);\n\n\t\t$validator\t\t\t\t\t= Validator::make($parameter, $schedule_rules);\n\n\t\tif (!$validator->passes())\n\t\t{\n\t\t\t$errors->add('Schedule', $validator->errors());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$total \t\t\t\t\t\t= \\App\\Models\\Work::calendarid($cal_id)->count();\n\n\t\t\t$queue \t\t\t\t\t\t= new \\App\\Models\\Queue;\n\t\t\t$queue->fill([\n\t\t\t\t\t'process_name' \t\t\t=> 'hr:schedules',\n\t\t\t\t\t'process_option' \t\t=> 'store',\n\t\t\t\t\t'parameter' \t\t\t=> json_encode($parameter),\n\t\t\t\t\t'total_process' \t\t=> $total,\n\t\t\t\t\t'task_per_process' \t\t=> 1,\n\t\t\t\t\t'process_number' \t\t=> 0,\n\t\t\t\t\t'total_task' \t\t\t=> $total,\n\t\t\t\t\t'message' \t\t\t\t=> 'Initial Commit',\n\t\t\t\t]);\n\n\t\t\tif(!$queue->save())\n\t\t\t{\n\t\t\t\t$errors->add('Schedule', $queue->getError());\n\t\t\t}\n\t\t}\n\t\t//End of validate schedule\n\n\t\t//2. store schedule of calendars to queue\n\t\tif(!$errors->count() && isset($schedule['calendar']['calendars']) && is_array($schedule['calendar']['calendars']))\n\t\t{\n\t\t\tforeach ($schedule['calendar']['calendars'] as $key => $value) \n\t\t\t{\n\t\t\t\t$cals_data\t\t\t\t\t\t= \\App\\Models\\Calendar::id($value['id'])->calendarid($cal_id)->first();\n\n\t\t\t\tif(!$cals_data)\n\t\t\t\t{\n\t\t\t\t\t$errors->add('Calendar', 'Tidak ada kalender '.$value['name']);\n\t\t\t\t}\n\n\t\t\t\tif(!$errors->count())\n\t\t\t\t{\n\t\t\t\t\t$total \t\t\t\t\t\t= \\App\\Models\\Work::calendarid($value['id'])->count();\n\t\t\t\t\t$parameter['calendar_id']\t= $value['id'];\n\n\t\t\t\t\t$queue \t\t\t\t\t\t= new \\App\\Models\\Queue;\n\t\t\t\t\t$queue->fill([\n\t\t\t\t\t\t\t'process_name' \t\t\t=> 'hr:schedules',\n\t\t\t\t\t\t\t'process_option' \t\t=> 'store',\n\t\t\t\t\t\t\t'parameter' \t\t\t=> json_encode($parameter),\n\t\t\t\t\t\t\t'total_process' \t\t=> $total,\n\t\t\t\t\t\t\t'task_per_process' \t\t=> 1,\n\t\t\t\t\t\t\t'process_number' \t\t=> 0,\n\t\t\t\t\t\t\t'total_task' \t\t\t=> $total,\n\t\t\t\t\t\t\t'message' \t\t\t\t=> 'Initial Commit',\n\t\t\t\t\t\t]);\n\n\t\t\t\t\tif(!$queue->save())\n\t\t\t\t\t{\n\t\t\t\t\t\t$errors->add('Schedule', $queue->getError());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//End of validate calendar schedule\n\n\t\tif($errors->count())\n\t\t{\n\t\t\tDB::rollback();\n\n\t\t\treturn new JSend('error', (array)Input::all(), $errors);\n\t\t}\n\n\t\tDB::commit();\n\t\t\n\t\treturn new JSend('success', (array)Input::all());\n\t}","title":""},{"docid":"69b96e87df060bf0eb30e09d656880fd","score":"0.4330022","text":"public function enqueue(FoiaRequestInterface $foiaRequest);","title":""},{"docid":"0eff76a91c1ca6df3c124da4bb623e9a","score":"0.4329129","text":"public function setQueuedAt($time = REQUEST_TIME) {\n $this->getKeyValueStore()\n ->set($this->formatKeyName('queued'), (int) $time);\n\n return $this;\n }","title":""},{"docid":"cc57cb249be54b225477edf5770bb699","score":"0.43278915","text":"public function update_queue($arr = array()) {\n\t\t\tglobal $wpdb,$scrape_core,$_params;\n\t\t\t$where = array(\n\t\t\t\t'target_id' => $_params['target_id']\n\t\t\t);\n\t\t\t$arr['last_checked'] = current_time('mysql');\n\t\t\t$table_name = $wpdb->prefix . \"scrape_n_post_queue\";\n\t\t\t$rows_affected = $wpdb->update($table_name, $arr, $where);\n\t\t\t//needs message\n\t\t}","title":""},{"docid":"2b5827735e1071b64a72fb2a20be9182","score":"0.4327712","text":"public function testSerializeCreatingAPIKeyRequest() {\n\n // Set an Creating API key request mock.\n $arg = new CreatingAPIKeyRequest();\n\n $obj = new RequestSerializer();\n\n $res = [];\n $this->assertEquals($res, $obj->serialize($arg));\n }","title":""}],"string":"[\n {\n \"docid\": \"dab5644055551f80735148ca57743297\",\n \"score\": \"0.64982796\",\n \"text\": \"protected function mailingIdPutRequest($id, $body)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling mailingIdPut'\\n );\\n }\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling mailingIdPut'\\n );\\n }\\n\\n $resourcePath = '/mailing/{id}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c464d6cf86d1ff27011e5b1cf4329a3\",\n \"score\": \"0.60579675\",\n \"text\": \"protected function mailingIdArchivePutRequest($id, $body)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling mailingIdArchivePut'\\n );\\n }\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling mailingIdArchivePut'\\n );\\n }\\n\\n $resourcePath = '/mailing/{id}/archive';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f6ba3137c72f89b0313a21062ef996b\",\n \"score\": \"0.58087623\",\n \"text\": \"function setQueue($id)\\n {\\n $response = $this->db->where('BK_ID', $id)\\n ->set('Q_ID', '2')\\n ->update('booking');\\n return $response;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1017fd20b7a2fbf31b294eb97d0b90a0\",\n \"score\": \"0.5723639\",\n \"text\": \"public function make(string $queue_id): AmqpQueue;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"daa776dfe3f4496ae154fc3add2a7eab\",\n \"score\": \"0.56924355\",\n \"text\": \"protected function jobsJobIdSubmitPutRequest($authorization, $job_id, $body) {\\n // Verify the required parameter 'authorization' is set.\\n if ($authorization === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $authorization when calling jobsJobIdSubmitPut'\\n );\\n }\\n // Verify the required parameter 'job_id' is set.\\n if ($job_id === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $job_id when calling jobsJobIdSubmitPut'\\n );\\n }\\n // Verify the required parameter 'body' is set.\\n if ($body === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling jobsJobIdSubmitPut'\\n );\\n }\\n\\n $resourcePath = '/jobs/{jobId}/submit';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = FALSE;\\n\\n // Header params.\\n if ($authorization !== NULL) {\\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\\n }\\n\\n // Path params.\\n if ($job_id !== NULL) {\\n $resourcePath = str_replace(\\n '{' . 'jobId' . '}',\\n ObjectSerializer::toPathValue($job_id),\\n $resourcePath\\n );\\n }\\n\\n // Body params.\\n $_tempBody = NULL;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n }\\n else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // For model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present.\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually.\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n }\\n elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // For HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n }\\n elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n }\\n else {\\n // For HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\\n if ($apiKey !== NULL) {\\n $headers['Authorization'] = $apiKey;\\n }\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\\n if ($apiKey !== NULL) {\\n $headers['x-api-key'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c694acab5c990559a8771856a783912\",\n \"score\": \"0.5656543\",\n \"text\": \"protected function mailingsPutRequest($body)\\n {\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling mailingsPut'\\n );\\n }\\n\\n $resourcePath = '/mailings';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4444e6176029b7d99cd0536a06741c14\",\n \"score\": \"0.55238295\",\n \"text\": \"public function queueingAction()\\n {\\n $request = Request::createFromGlobals();\\n $id = $request->get('id');\\n\\n // On historise pour ne pas perdre l'information de reprise\\n // on historise tout ce qui est terminé\\n $Request = $this->getDoctrine()->getRepository(\\\"AriiSelfBundle:Request\\\")->find($id);\\n\\n $Request->setReqStatus('QUEUED');\\n $Request->setProcessed(null);\\n \\n $em = $this->getDoctrine()->getManager();\\n $em->persist($Request);\\n $em->flush();\\n \\n return new Response(\\\"success\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ba1aaf3d9b0ecee5742a21d543f6134\",\n \"score\": \"0.5506591\",\n \"text\": \"protected function mailingIdDeleteRequest($id)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling mailingIdDelete'\\n );\\n }\\n\\n $resourcePath = '/mailing/{id}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'DELETE',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41829c61c090dd02d106489a94ade425\",\n \"score\": \"0.5309802\",\n \"text\": \"public static function addToQueue($queue, $ownerID, $vCode, $api, $scope) {\\n\\n\\t\\t// Set the root namesace for queued commands\\n\\t\\t$command_namespace = 'Seat\\\\EveQueues\\\\\\\\';\\n\\n\\t\\t// Prepare the auth array\\n\\t\\tif($vCode != NULL)\\n\\t\\t\\t$auth = array('keyID' => $ownerID, 'vCode' => $vCode);\\n\\t\\telse\\n\\t\\t\\t$auth = array();\\n\\n\\t\\t// Check the databse if there are jobs outstanding ie. they have the status\\n\\t\\t// Queued or Working. If not, we will queue a new job, else just capture the\\n\\t\\t// jobID and return that\\n\\t\\t$jobID = \\\\SeatQueueInformation::where('ownerID', '=', $ownerID)\\n\\t\\t\\t->where('api', '=', $api)\\n\\t\\t\\t->whereIn('status', array('Queued', 'Working'))\\n\\t\\t\\t->first();\\n\\n\\t\\t// Check if the $jobID was found, else, queue a new job\\n\\t\\tif(!$jobID) {\\n\\n\\t\\t\\t$jobID = \\\\Queue::push($command_namespace . implode('\\\\\\\\', $queue), $auth);\\n\\t\\t\\t\\\\SeatQueueInformation::create(array('jobID' => $jobID, 'ownerID' => $ownerID, 'api' => $api, 'scope' => $scope, 'status' => 'Queued'));\\n\\t\\t} else {\\n\\n\\t\\t\\t// To aid in potential capacity debugging, lets write a warning log entry so that a user\\n\\t\\t\\t// is able to see that a new job was not submitted\\n\\t\\t\\t\\\\Log::warning('A new job was not submitted due a similar one still being outstanding. Details: ' . $jobID, array('src' => __CLASS__));\\n\\n\\t\\t\\t// Set the jobID to the ID from the database\\n\\t\\t\\t$jobID = $jobID->jobID;\\n\\t\\t}\\n\\n\\t\\treturn $jobID;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1165a6d8a60a479811f5fcec6d45115\",\n \"score\": \"0.52378625\",\n \"text\": \"function quickbooks_webconnect_queue_request($element, $element_type, $operation) {\\r\\n\\r\\n // create the item to place on the queue\\r\\n $item = array(\\r\\n 'element' => $element,\\r\\n 'type' => $element_type,\\r\\n 'op' => $operation,\\r\\n );\\r\\n \\r\\n // add the item to the queue\\r\\n $queue = DrupalQueue::get('quickbooks_webconnect');\\r\\n $queue->createItem($item);\\r\\n \\r\\n _quickbooks_webconnect_debug('[queue_request] item : @item', array('@item' => var_export($item, TRUE)));\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c52ed7919367772cd84e967d91ceb3f3\",\n \"score\": \"0.5208331\",\n \"text\": \"private function _convertCreateQueue($request) {\\n \\n $parameters = array();\\n $parameters['Action'] = 'CreateQueue';\\n if ($request->isSetQueueName()) {\\n $parameters['QueueName'] = $request->getQueueName();\\n }\\n if ($request->isSetDefaultVisibilityTimeout()) {\\n $parameters['DefaultVisibilityTimeout'] = $request->getDefaultVisibilityTimeout();\\n }\\n\\n return $parameters;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db67136e4b90268707ee06504cd1a1ab\",\n \"score\": \"0.52012396\",\n \"text\": \"protected function mailingIdGetRequest($id)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling mailingIdGet'\\n );\\n }\\n\\n $resourcePath = '/mailing/{id}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'GET',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"825dcbdc76e812a58b171306e5218375\",\n \"score\": \"0.51900727\",\n \"text\": \"protected function jobsJobIdPutRequest($authorization, $job_id, $job) {\\n // Verify the required parameter 'authorization' is set.\\n if ($authorization === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $authorization when calling jobsJobIdPut'\\n );\\n }\\n // Verify the required parameter 'job_id' is set.\\n if ($job_id === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $job_id when calling jobsJobIdPut'\\n );\\n }\\n // Verify the required parameter 'job' is set.\\n if ($job === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $job when calling jobsJobIdPut'\\n );\\n }\\n\\n $resourcePath = '/jobs/{jobId}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = FALSE;\\n\\n // Header params.\\n if ($authorization !== NULL) {\\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\\n }\\n\\n // Path params.\\n if ($job_id !== NULL) {\\n $resourcePath = str_replace(\\n '{' . 'jobId' . '}',\\n ObjectSerializer::toPathValue($job_id),\\n $resourcePath\\n );\\n }\\n\\n // Body params.\\n $_tempBody = NULL;\\n if (isset($job)) {\\n $_tempBody = $job;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n }\\n else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // For model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present.\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually.\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n }\\n elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // For HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n }\\n elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n }\\n else {\\n // For HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\\n if ($apiKey !== NULL) {\\n $headers['Authorization'] = $apiKey;\\n }\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\\n if ($apiKey !== NULL) {\\n $headers['x-api-key'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f6f56cb0533b6977c6f9898761072556\",\n \"score\": \"0.5105287\",\n \"text\": \"public function createQueue($request) \\n {\\n if (!$request instanceof Amazon_SQS_Model_CreateQueue) {\\n require_once ('Amazon/SQS/Model/CreateQueue.php');\\n $request = new Amazon_SQS_Model_CreateQueue($request);\\n }\\n require_once ('Amazon/SQS/Model/CreateQueueResponse.php');\\n return Amazon_SQS_Model_CreateQueueResponse::fromXML($this->_invoke($this->_convertCreateQueue($request)));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"46b1abdeb51526ead0c2fdde4c661b8c\",\n \"score\": \"0.50999856\",\n \"text\": \"protected function jobsJobIdArchivePutRequest($authorization, $job_id) {\\n // Verify the required parameter 'authorization' is set.\\n if ($authorization === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $authorization when calling jobsJobIdArchivePut'\\n );\\n }\\n // Verify the required parameter 'job_id' is set.\\n if ($job_id === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $job_id when calling jobsJobIdArchivePut'\\n );\\n }\\n\\n $resourcePath = '/jobs/{jobId}/archive';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = FALSE;\\n\\n // Header params.\\n if ($authorization !== NULL) {\\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\\n }\\n\\n // Path params.\\n if ($job_id !== NULL) {\\n $resourcePath = str_replace(\\n '{' . 'jobId' . '}',\\n ObjectSerializer::toPathValue($job_id),\\n $resourcePath\\n );\\n }\\n\\n // Body params.\\n $_tempBody = NULL;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n }\\n else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // For model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present.\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually.\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n }\\n elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // For HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n }\\n elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n }\\n else {\\n // For HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\\n if ($apiKey !== NULL) {\\n $headers['Authorization'] = $apiKey;\\n }\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\\n if ($apiKey !== NULL) {\\n $headers['x-api-key'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"90fdcbe4666777e136a4141be9689d4a\",\n \"score\": \"0.507233\",\n \"text\": \"function isymphony_queue_add($queueId, $addQueue, $displayName) {\\r\\n\\tglobal $db;\\r\\n\\t$addQueue = $addQueue ? \\\"1\\\" : \\\"0\\\";\\t\\r\\n\\t$prepStatement = $db->prepare(\\\"INSERT INTO isymphony_queues (queue_id, add_queue, display_name) VALUES (?, ?, ?)\\\");\\r\\n\\t$values = array($queueId, $addQueue, $displayName);\\r\\n\\t$db->execute($prepStatement, $values);\\r\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"01231b049565d350600856373951ca19\",\n \"score\": \"0.5067795\",\n \"text\": \"private function queue_operation($http_verb, $id, $method, $args=null)\\n {\\n\\t\\t$operation = array(\\n\\t\\t\\t\\t'operation_id' => $id,\\n\\t\\t\\t\\t'method' => $http_verb,\\n\\t\\t\\t\\t'path' => $method,\\n \\t\\t);\\n\\n\\t\\tif ($args) {\\n\\t\\t\\t$key = ($http_verb == 'GET' ? 'params' : 'body');\\n\\t\\t\\t$operation[$key] = json_encode($args);\\n\\t\\t}\\n\\n\\t\\t$this->operations[] = $operation;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"29ac2d2e0066087036c5ad9178b6c993\",\n \"score\": \"0.50524145\",\n \"text\": \"protected function spamcheckPutRequest($body)\\n {\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling spamcheckPut'\\n );\\n }\\n\\n $resourcePath = '/spamcheck';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8b6ab5e20744406d2b0841a85d5a687e\",\n \"score\": \"0.4978856\",\n \"text\": \"public function testGetValidQueueByQueueId() {\\n\\t\\t$this->assertNotNull($this->queue1);\\n\\t\\t$this->assertNotNull($this->mysqli);\\n\\n\\t\\t// first, assert the queue is inserted into mySQL by grabbing it and asserting the primary key\\n\\t\\t$this->queue1->insert($this->mysqli);\\n\\t\\t$mysqlQueue = Queue::getQueueByQueueId($this->mysqli, $this->queue1->getQueueId());\\n\\t\\t$this->assertIdentical($this->queue1->getQueueId(), $mysqlQueue->getQueueId());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"868adc33c3536b4610c087bfe372fc67\",\n \"score\": \"0.49774298\",\n \"text\": \"public function createQueue(string $queueName): void;\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c15f80fe47fa11cec289a3651455088\",\n \"score\": \"0.49633723\",\n \"text\": \"public function pauseFromQueue($id)\\n\\t{\\n\\t\\t$header = <<\\n\\n\\teditqueue\\n\\t\\n\\t\\t\\n\\t\\t\\tGroupPause\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t0\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\\"\\\"\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$id\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t\\n\\nNZBGet_PAUSE_FROM_QUEUE;\\n\\n\\t\\tnzedb\\\\utility\\\\Utility::getUrl([\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t 'url' => $this->fullURL . 'editqueue',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t 'method' => 'post', 'postdata' => $header,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t 'verifycert' => false\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t ]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f8d205f499cad69764a8db4cd3b8a451\",\n \"score\": \"0.4944417\",\n \"text\": \"public function submitAcknowledgementRequest($body)\\n {\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling submitAcknowledgement'\\n );\\n }\\n\\n $resourcePath = '/vendor/directFulfillment/orders/2021-12-28/acknowledgements';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($body)) {\\n if ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\\n } else {\\n $httpBody = $body;\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\\n foreach ($formParamValueItems as $formParamValueItem) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValueItem\\n ];\\n }\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($formParams);\\n }\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($queryParams);\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ed4f9a9158e50b7ab333cadcf87f158\",\n \"score\": \"0.49421394\",\n \"text\": \"public function put($id, $method, $args=array())\\n {\\n \\t$this->queue_operation('PUT', $id, $method, $args);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9774d57cb6a1b023d1dd819afb5bc46f\",\n \"score\": \"0.4909094\",\n \"text\": \"private function addSMSToQueue(){\\n $query = \\\"update sms_queue set in_queue = 1\\\"\\n . \\\" where text_status = 'not sent' and (schedule_time < now() or schedule_time = '0000-00-00 00:00:00') and number rlike '^[\\\\+0-9]+$' and project = '{$this->settings['sms_api_project']}'\\\";\\n $this->database->runMySQLQuery($query, false);\\n \\n return json_encode(array(\\\"error\\\" => false, \\\"data\\\" => array()));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e2f5f5ca491b59c1a42433d1cbcf83d8\",\n \"score\": \"0.49075085\",\n \"text\": \"protected function mailingIdLinkId2PutRequest($id, $id2, $body)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling mailingIdLinkId2Put'\\n );\\n }\\n // verify the required parameter 'id2' is set\\n if ($id2 === null || (is_array($id2) && count($id2) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id2 when calling mailingIdLinkId2Put'\\n );\\n }\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling mailingIdLinkId2Put'\\n );\\n }\\n\\n $resourcePath = '/mailing/{id}/link/{id2}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($id2 !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id2' . '}',\\n ObjectSerializer::toPathValue($id2),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"93741dd366784b56e378a6f7a25a4015\",\n \"score\": \"0.49010336\",\n \"text\": \"public function queueMessage(Request $request)\\n\\t{\\n\\t\\t// Validate request\\n\\t\\t$this->validate($request, $rules = [\\n\\t\\t\\t'userId' => 'required|integer|exists:users,id',\\n\\t\\t\\t'originatingCountry' => 'required|alpha|size:2|exists:countries,code',\\n\\t\\t\\t'currencyFrom' => 'required|alpha|size:3|exists:currencies,code',\\n\\t\\t\\t'currencyTo' => 'required|alpha|size:3|different:currencyFrom|exists:currencies,code',\\n\\t\\t\\t'amountSell' => 'required|numeric|min:1',\\n\\t\\t\\t'amountBuy' => 'required|numeric|min:1',\\n\\t\\t\\t'rate' => 'required|numeric|min:0.001',\\n\\t\\t\\t'timePlaced' => 'required|before:' . Carbon::now()->toDateTimeString(),\\n\\t\\t]);\\n\\n\\t\\t// Process input\\n\\t\\t$input = $this->processInput($request->only(array_keys($rules)));\\n\\n\\t\\t// Create message\\n\\t\\t$message = Message::create([\\n\\t\\t\\t'user_id' => $input->userId,\\n\\t\\t\\t'country_id' => $input->originatingCountry,\\n\\t\\t\\t'from_currency_id' => $input->currencyFrom,\\n\\t\\t\\t'to_currency_id' => $input->currencyTo,\\n\\t\\t\\t'amount_sell' => $input->amountSell,\\n\\t\\t\\t'amount_buy' => $input->amountBuy,\\n\\t\\t\\t'rate' => $input->rate,\\n\\t\\t\\t'placed_at' => $input->timePlaced,\\n\\t\\t]);\\n\\n\\t\\t// Queue message to be processed later\\n\\t\\t$this->dispatch(new ProcessMessageJob($message));\\n\\n\\t\\treturn redirect('/')->withSuccess(sprintf('Message %d successfully created', $message->getKey()));\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8ab0ba58e1a176a0706bfe71bba5e1cd\",\n \"score\": \"0.48752338\",\n \"text\": \"public function getQueueableId();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a3e603f70a382a1f9cc96fd24f93c5fb\",\n \"score\": \"0.48592395\",\n \"text\": \"public function setQueueAttributes($request) \\n {\\n if (!$request instanceof Amazon_SQS_Model_SetQueueAttributes) {\\n require_once ('Amazon/SQS/Model/SetQueueAttributes.php');\\n $request = new Amazon_SQS_Model_SetQueueAttributes($request);\\n }\\n require_once ('Amazon/SQS/Model/SetQueueAttributesResponse.php');\\n return Amazon_SQS_Model_SetQueueAttributesResponse::fromXML($this->_invoke($this->_convertSetQueueAttributes($request)));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1d1f476c60e16b318fbc3998c9ef942d\",\n \"score\": \"0.4853496\",\n \"text\": \"protected function campaignsAddRequest($data)\\n {\\n // verify the required parameter 'data' is set\\n if ($data === null || (is_array($data) && count($data) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $data when calling campaignsAdd'\\n );\\n }\\n\\n $resourcePath = '/campaigns/add';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n\\n // body params\\n $_tempBody = null;\\n if (isset($data)) {\\n $_tempBody = $data;\\n }\\n\\n if (in_array('multipart/form-data', ['application/json', 'application/xml'])) {\\n $multipart = true;\\n }\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json', 'application/xml']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n if (class_exists('\\\\GuzzleHttp\\\\Psr7\\\\Query')) {\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($formParams);\\n } else {\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n }\\n\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('access_token');\\n if ($apiKey !== null) {\\n $queryParams['access_token'] = $apiKey;\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('nonce');\\n if ($apiKey !== null) {\\n $queryParams['nonce'] = $apiKey;\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('timestamp');\\n if ($apiKey !== null) {\\n $queryParams['timestamp'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n if (class_exists('\\\\GuzzleHttp\\\\Psr7\\\\Query')) {\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($queryParams);\\n } else {\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n }\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cdcd9900e2b24f73ccc6cd95801cfb45\",\n \"score\": \"0.48420426\",\n \"text\": \"public abstract function push($queueName, array $body, $options = []);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5edc301cbdc519e63671ac8e54914062\",\n \"score\": \"0.48214164\",\n \"text\": \"public function delFromQueue($id)\\n\\t{\\n\\t\\t$header = <<\\n\\n\\teditqueue\\n\\t\\n\\t\\t\\n\\t\\t\\tGroupDelete\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t0\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\\"\\\"\\n\\t\\t\\n\\t\\t\\n\\t\\t\\t\\n\\t\\t\\t\\t\\n\\t\\t\\t\\t\\t$id\\n\\t\\t\\t\\t\\n\\t\\t\\t\\n\\t\\t\\n\\t\\n\\nNZBGet_DELETE_FROM_QUEUE;\\n\\n\\t\\tnzedb\\\\utility\\\\Utility::getUrl([\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t 'url' => $this->fullURL . 'editqueue',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t 'method' => 'post', 'postdata' => $header,\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t 'verifycert' => false\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t ]);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a80aab501e63522ab63fa96f35e1f8db\",\n \"score\": \"0.48157257\",\n \"text\": \"public function addToQueue($to, $from, $subject, $content, $options = array());\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a5583e6747bd2030dff9bc6da42e1667\",\n \"score\": \"0.48063833\",\n \"text\": \"protected function queue_reput($queue, $data)\\n {\\n $httpsqs = HttpsqsService::get();\\n $httpsqs->put($queue, json_encode($data)); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3fb9a02bef54bf1d2c540b6c34716653\",\n \"score\": \"0.48027435\",\n \"text\": \"protected function mailingsPostRequest($body)\\n {\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling mailingsPost'\\n );\\n }\\n\\n $resourcePath = '/mailings';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a403f547ae2fa94f95dc08349efad2ee\",\n \"score\": \"0.48015046\",\n \"text\": \"public function queueMessage()\\n\\t{\\n\\t\\tif(!isset($this->queueData)) $this->_triggerError('You cannot Queue a message that has not been created. Use newMessage() to create a new message.');\\n\\n\\t\\t// loop through possible users\\n\\t\\t$to = $this->queueData['send']['to'];\\n\\t\\t$from = $this->queueData['send']['from'];\\n\\t\\t$type = intval($this->queueData['send']['type']);\\n\\t\\t$when = $this->queueData['send']['when'];\\n\\t\\t$receiverList = (is_array($to)) ? $to:array($to);\\n\\t\\t$senderList = (is_array($from)) ? $to:array($from);\\n\\t\\tunset($this->queueData['send']);\\n\\n\\t\\tfor($i=0; $idb->prepare($sender);\\n\\t\\t\\t$receiver = $this->db->prepare($receiver);\\n\\t\\t\\tif(isset($this->message)) $pushMessage = $this->db->prepare($this->message);\\n\\t\\t\\telse $pushMessage = '';\\n\\t\\t\\tif(isset($this->sound)) $pushSound = $this->db->prepare($this->sound);\\n\\t\\t\\telse $pushSound = '';\\n\\t\\t\\tif(isset($this->badge)) $pushBadge = $this->db->prepare($this->badge);\\n\\t\\t\\telse $pushBadge = 0;\\n\\t\\t\\tif(isset($this->extraParams))\\n\\t\\t\\t{\\n\\t\\t\\t\\t$extraParams = json_encode($this->extraParams);\\n\\t\\t\\t\\t$extraParams = $this->db->prepare($extraParams);\\n\\t\\t\\t}\\n\\t\\t\\telse\\n\\t\\t\\t{\\n\\t\\t\\t\\t$extraParams = '';\\n\\t\\t\\t}\\n\\n\\t\\t\\t$this->db->query(\\\"CALL addApnQueue({$sender}, {$receiver}, {$type}, {$pushBadge}, '{$pushSound}', '{$pushMessage}', '{$extraParams}')\\\");\\n\\t\\t}\\n\\t\\tunset($this->queueData);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7c7aea234f48ecbe59012c5d37b35b16\",\n \"score\": \"0.4795097\",\n \"text\": \"protected function putApiTaskRequest($id, $priority = null, $stage = null, $subject = null, $assigned_agent = null, $description = null)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling putApiTask'\\n );\\n }\\n\\n $resourcePath = '/task/{id}.json';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // form params\\n if ($priority !== null) {\\n $formParams['priority'] = ObjectSerializer::toFormValue($priority);\\n }\\n // form params\\n if ($stage !== null) {\\n $formParams['stage'] = ObjectSerializer::toFormValue($stage);\\n }\\n // form params\\n if ($subject !== null) {\\n $formParams['subject'] = ObjectSerializer::toFormValue($subject);\\n }\\n // form params\\n if ($assigned_agent !== null) {\\n $formParams['assignedAgent'] = ObjectSerializer::toFormValue($assigned_agent);\\n }\\n // form params\\n if ($description !== null) {\\n $formParams['description'] = ObjectSerializer::toFormValue($description);\\n }\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/x-www-form-urlencoded']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"41bc887558c6563e77819cfab3603b42\",\n \"score\": \"0.4742162\",\n \"text\": \"public function testSendMailsInQueue()\\n {\\n $this->markTestIncomplete(\\\"Doesn't send yet, need to doublecheck my table definition.\\\");\\n\\n $id_user = 1;\\n $sender = 'testsuite@example.org';\\n $recipient = 'testcase@example.org';\\n $headers = array('X-TestSuite' => 1);\\n $body = 'Lorem ipsum';\\n\\n $mailId1 = $this->queue->put($sender, $recipient, $headers, $body);\\n\\n $id_user = 1;\\n $sender = 'testsuite@example.org';\\n $recipient = 'testcase@example.org';\\n $headers = array('X-TestSuite' => 2);\\n $body = 'Lorem ipsum sit dolor';\\n\\n $mailId2 = $this->queue->put($sender, $recipient, $headers, $body);\\n\\n $this->assertEquals(2, $this->queue->getQueueCount());\\n\\n $status = $this->queue->sendMailsInQueue();\\n if (Pear::isError($status)) {\\n $this->fail(\\\"Error sending emails: {$status->getMessage()}.\\\");\\n }\\n $this->assertTrue($status);\\n $this->assertEquals(0, $this->queue->getQueueCount());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ea9801f2aa49becdf640c37fb729fa25\",\n \"score\": \"0.4740589\",\n \"text\": \"public function createQueue(?QueueAttributes $queueAttr = null): MessageResult {\\n if ($queueAttr == null) {\\n $queueAttr = $this->getDefaultQueueAttribute();\\n }\\n $request = new CreateQueueRequest($this->queueName, $queueAttr);\\n try {\\n $res = $this->client->createQueue($request);\\n }\\n catch (MnsException $e) {\\n return MessageResult::Failed($e, \\\"CreateQueue\\\");\\n }\\n if ($res->isSucceed()) {\\n return MessageResult::Success();\\n } else {\\n return MessageResult::Failed('Unknown error occurs.', \\\"CreateQueue\\\");\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1ff3c1875ac9b7962fcfe4f97d885645\",\n \"score\": \"0.4732601\",\n \"text\": \"public function addFlowspace($name, $dpid, $priority, $match, $queues, $force_enqueue, $slice_action){\\n\\t\\tglobal $request_count;\\n\\t\\t//check for null pointers on required fields\\n\\t\\tif($name==null || $dpid==null || $priority==null || $match==null || $slice_action==null){\\n\\t\\t\\treturn null;\\n\\t\\t}\\n\\t\\t\\n\\t\\t//saving the non-optional parameters\\n\\t\\t$params = array(\\\"name\\\"=>$name,\\n\\t\\t\\t\\\"dpid\\\"=>$dpid,\\n\\t\\t\\t\\\"priority\\\"=>$priority,\\n\\t\\t\\t\\\"match\\\"=>$match,\\n\\t\\t\\t\\\"slice-action\\\"=>$slice_action);\\n\\t\\t\\t\\n\\t\\t//checking for optional parameters\\n\\t\\tif($queues!=null){\\n\\t\\t\\t$temp = array(\\\"queues\\\"=>$queues);\\n\\t\\t\\t$params = array_merge((array)$params, (array)$temp);\\n\\t\\t}\\n\\n\\t\\tif($force_enqueue!=null){\\n\\t\\t\\t$temp = array(\\\"force_enqueue\\\"=>$force_enqueue);\\n\\t\\t\\t$params = array_merge((array)$params, (array)$temp);\\n\\t\\t}\\n\\n\\t\\t//creating the request\\n\\t\\t$request = array(\\\"jsonrpc\\\"=>\\\"2.0\\\",\\n\\t\\t\\t\\\"method\\\"=>$this->CREATE_FLOWSPACE,\\n\\t\\t\\t\\\"id\\\"=>$request_count,\\n\\t\\t\\t\\\"params\\\"=>array($params));\\n//var_dump($params);\\n\\t\\t//increase the request id count\\n\\t\\t$request_count++;\\n\\t\\t//encode the array in to a json string\\n\\t\\t$this->requestJson = json_encode($request);\\n//var_dump($this->requestJson);\\n\\t\\t//send the json request\\n\\t\\t$result = $this->send($this->requestJson);\\n\\t\\t//decode the result and return it\\n\\t\\treturn json_decode($result,true);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4e6cb04fb981e471a8488a7c64833a1f\",\n \"score\": \"0.47187796\",\n \"text\": \"protected function getWorkforcemanagementManagementunitIntradayQueuesRequest($muId, $date)\\n {\\n // verify the required parameter 'muId' is set\\n if ($muId === null || (is_array($muId) && count($muId) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $muId when calling getWorkforcemanagementManagementunitIntradayQueues'\\n );\\n }\\n // verify the required parameter 'date' is set\\n if ($date === null || (is_array($date) && count($date) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $date when calling getWorkforcemanagementManagementunitIntradayQueues'\\n );\\n }\\n\\n $resourcePath = '/api/v2/workforcemanagement/managementunits/{muId}/intraday/queues';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n // query params\\n if ($date !== null) {\\n $queryParams['date'] = ObjectSerializer::toQueryValue($date);\\n }\\n\\n // path params\\n if ($muId !== null) {\\n $resourcePath = str_replace(\\n '{' . 'muId' . '}',\\n ObjectSerializer::toPathValue($muId),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'GET',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4bd8e69acfde74e4c6045f86e92f7c05\",\n \"score\": \"0.47181526\",\n \"text\": \"public function getByQueueId($queue_id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dbb5e153c9eb96d433eed6396fea817b\",\n \"score\": \"0.47106367\",\n \"text\": \"public function buildQueue()\\n {\\n $this->queue = new Queue(uniqid('', true), $this->getResponseStream());\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b7cb5730b43568bc91331c690eef7ba5\",\n \"score\": \"0.46905056\",\n \"text\": \"protected function smtpLogMessageIdDeleteRequest($messageId)\\n {\\n // verify the required parameter 'messageId' is set\\n if ($messageId === null || (is_array($messageId) && count($messageId) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $messageId when calling smtpLogMessageIdDelete'\\n );\\n }\\n\\n $resourcePath = '/smtp/log/{messageId}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($messageId !== null) {\\n $resourcePath = str_replace(\\n '{' . 'messageId' . '}',\\n ObjectSerializer::toPathValue($messageId),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($formParams);\\n }\\n }\\n\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\\n if ($apiKey !== null) {\\n $headers['api-key'] = $apiKey;\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('partner-key');\\n if ($apiKey !== null) {\\n $headers['partner-key'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($queryParams);\\n return new Request(\\n 'DELETE',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ce63f2998cb51bdb0b1778c7b3d3de23\",\n \"score\": \"0.46871302\",\n \"text\": \"private function _convertSetQueueAttributes($request) {\\n \\n $parameters = array();\\n $parameters['Action'] = 'SetQueueAttributes';\\n if ($request->isSetQueueName()) {\\n $parameters['QueueName'] = $request->getQueueName();\\n }\\n foreach ($request->getAttribute() as $attributeIndex => $attribute) {\\n if ($attribute->isSetName()) {\\n $parameters['Attribute' . '.' . ($attributeIndex + 1) . '.' . 'Name'] = $attribute->getName();\\n }\\n if ($attribute->isSetValue()) {\\n $parameters['Attribute' . '.' . ($attributeIndex + 1) . '.' . 'Value'] = $attribute->getValue();\\n }\\n\\n }\\n\\n return $parameters;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"afd26c4d70afcd88b993e4c3b2f05f41\",\n \"score\": \"0.46755007\",\n \"text\": \"public function createRequest($data) {\\n\\t\\t// add on duplicate key\\n\\t\\t$sql = \\\"INSERT INTO `\\\" . DB_PREFIX . \\\"ms_pg_request`\\n\\t\\t\\t\\tSET seller_id = \\\" . (int)$data['seller_id'] . \\\",\\n\\t\\t\\t\\t\\tproduct_id = \\\" . (isset($data['product_id']) ? (int)$data['product_id'] : 'NULL') . \\\",\\n\\t\\t\\t\\t\\torder_id = \\\" . (isset($data['order_id']) ? (int)$data['order_id'] : 'NULL') . \\\",\\n\\t\\t\\t\\t\\trequest_type = \\\" . (int)$data['request_type'] . \\\",\\n\\t\\t\\t\\t\\trequest_status = \\\" . (int)$data['request_status'] . \\\",\\n\\t\\t\\t\\t\\tdescription = '\\\" . $this->db->escape(htmlspecialchars(nl2br($data['description']), ENT_COMPAT)) . \\\"',\\n\\t\\t\\t\\t\\tamount = \\\". (float)$this->currency->format($data['amount'], $this->config->get('config_currency'), '', FALSE) . \\\",\\n\\t\\t\\t\\t\\tcurrency_id = \\\" . (int)$data['currency_id'] . \\\",\\n\\t\\t\\t\\t\\tcurrency_code = '\\\" . $this->db->escape($data['currency_code']) . \\\"',\\n\\t\\t\\t\\t\\tdate_created = NOW(),\\n\\t\\t\\t\\t\\tdate_modified = NULL\\\";\\n\\n\\t\\t$this->db->query($sql);\\n\\t\\treturn $this->db->getLastId();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a48259b4671df18a8e4db99ad1a7cdfa\",\n \"score\": \"0.46655348\",\n \"text\": \"function queue_mail_cc($mail_id, $to_name, $to_address) {\\n\\n\\t$sql = \\\"select * from mail_queue where mail_id=\\\".$mail_id;\\n\\t$result = mysql_query($sql) or die(mysql_error());\\n\\t$row=mysql_fetch_array($result);\\n\\n\\n\\t$attachments=$row['attachments'];\\n\\t\\n\\t$now = (gmdate(\\\"Y-m-d H:i:s\\\"));\\n\\n\\t$sql = \\\"INSERT INTO mail_queue (mail_id, mail_date, to_address, to_name, from_address, from_name, subject, message, html_message, attachments, status, error_msg, retry_count, template_id, date_stamp, att1_name, att2_name, att3_name) VALUES('', '$now', '$to_address', '$to_name', '\\\".addslashes($row['from_address']).\\\"', '\\\".addslashes($row['from_name']).\\\"', '\\\".addslashes($row['subject']).\\\"', '\\\".addslashes($row['message']).\\\"', '\\\".addslashes($row['html_message']).\\\"', '\\\".addslashes($row['attachments']).\\\"', 'queued', '', 0, '\\\".addslashes($row['template_id']).\\\"', '$now', '\\\".addslashes($row['att1_name']).\\\"', '\\\".addslashes($row['att2_name']).\\\"', '\\\".addslashes($row['att3_name']).\\\"')\\\";\\n\\n\\tmysql_query ($sql) or q_mail_error (mysql_error().$sql);\\n\\n\\t$mail_id = mysql_insert_id();\\n\\n\\n\\n\\treturn $mail_id;\\n\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1971bb330db09853ecc15a40e71d049e\",\n \"score\": \"0.46633115\",\n \"text\": \"public function addEmailToQueue($from_email, $from_name, $replyto_address, $replyto_name, array $recipients, array $cc, array $bcc, $subject, $body)\\n\\t{\\n\\t\\t$this->db->trans_start();\\n\\n\\t\\tif (!$this->db->query('\\n\\t\\t\\tINSERT INTO mail_queue\\n\\t\\t\\t\\t(from_address, from_name, replyto, replyto_name, subject, body, enqueue_date, sent_date, tries, try_date)\\n\\t\\t\\tVALUES\\n\\t\\t\\t\\t(?, ?, ?, ?, ?, ?, NOW(), \\\\'0000-00-00 00:00:00\\\\', 0, \\\\'0000-00-00 00:00:00\\\\')', array(\\n\\t\\t\\t\\t$from_email,\\n\\t\\t\\t\\t$from_name,\\n\\t\\t\\t\\t$replyto_address,\\n\\t\\t\\t\\t$replyto_name,\\n\\t\\t\\t\\t$subject,\\n\\t\\t\\t\\t$body,\\n\\t\\t\\t))\\n\\t\\t) {\\n\\t\\t\\treturn $this->db->error;\\n\\t\\t}\\n\\n\\t\\t$mail_id = $this->db->insert_id();\\n\\n\\t\\t$mail_recipients = array();\\n\\t\\tforeach ($recipients as $email => $name) {\\n\\t\\t\\t$mail_recipients[] = $mail_id;\\n\\t\\t\\t$mail_recipients[] = Email_model::RECIPIENT_TO;\\n\\t\\t\\t$mail_recipients[] = $email;\\n\\t\\t\\t$mail_recipients[] = $name;\\n\\t\\t}\\n\\t\\tforeach ($cc as $email => $name) {\\n\\t\\t\\t$mail_recipients[] = $mail_id;\\n\\t\\t\\t$mail_recipients[] = Email_model::RECIPIENT_CC;\\n\\t\\t\\t$mail_recipients[] = $email;\\n\\t\\t\\t$mail_recipients[] = $name;\\n\\t\\t}\\n\\t\\tforeach ($bcc as $email => $name) {\\n\\t\\t\\t$mail_recipients[] = $mail_id;\\n\\t\\t\\t$mail_recipients[] = Email_model::RECIPIENT_BCC;\\n\\t\\t\\t$mail_recipients[] = $email;\\n\\t\\t\\t$mail_recipients[] = $name;\\n\\t\\t}\\n\\n\\t\\tif (!$this->db->query('\\n\\t\\t\\tINSERT INTO mail_recipient\\n\\t\\t\\t\\t(mail_id, recipient_type, address, name)\\n\\t\\t\\tVALUES\\n\\t\\t\\t\\t' . implode(', ', array_fill(0, count($recipients) + count($cc) + count($bcc), '(?, ?, ?, ?)')), $mail_recipients)\\n\\t\\t) {\\n\\t\\t\\treturn $this->db->error;\\n\\t\\t}\\n\\n\\t\\t$this->db->trans_complete();\\n\\t\\t\\n\\t\\treturn true;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"24b7275ca307e140d1a7d4b1913cbf00\",\n \"score\": \"0.46621242\",\n \"text\": \"protected function putOrderStatusItemRequest($id, $orderStatus = null)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling putOrderStatusItem'\\n );\\n }\\n\\n $resourcePath = '/order_statuses/{id}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($orderStatus)) {\\n $_tempBody = $orderStatus;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/ld+json', 'application/json', 'text/csv', 'text/html']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/ld+json', 'application/json', 'text/csv', 'text/html'],\\n ['application/ld+json', 'application/json', 'text/csv', 'text/html']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n if ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\\n } else {\\n $httpBody = $_tempBody;\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\\n if ($apiKey !== null) {\\n $headers['Authorization'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8a0cd33eb19c0e1f90f18846ad6644f2\",\n \"score\": \"0.46471405\",\n \"text\": \"private static function insertToQueue($status, $subject, $body, $toEmail = array(), $cc = array(), $bcc = array(), $attachment = array(), $fromName = null){\\n\\t\\t$sendEmailTaskVo = new SendEmailTaskVo ();\\n\\t\\t$sendEmailTaskVo->subject = $subject;\\n\\t\\t$sendEmailTaskVo->body = $body;\\n\\t\\t$sendEmailTaskVo->to = JsonUtil::encode($toEmail);\\n\\t\\t$sendEmailTaskVo->cc = JsonUtil::encode($cc);\\n\\t\\t$sendEmailTaskVo->bcc = JsonUtil::encode($bcc);\\n\\t\\t$sendEmailTaskVo->attachments = JsonUtil::encode($attachment);\\n\\t\\t$sendEmailTaskVo->fromName = $fromName;\\n\\t\\t$sendEmailTaskVo->status = $status;\\n\\t\\t// Add task to the queue.\\n\\t\\t$sendEmailTaskDao = new SendEmailTaskBaseDao ();\\n\\t\\t$sendEmailTaskDao->insertDynamic($sendEmailTaskVo);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e16102665337acfbdf1e500016d52545\",\n \"score\": \"0.46281445\",\n \"text\": \"public function queueMessageAction()\\n {\\n $message = $this->_initMessage();\\n if (!$message->getId()) {\\n $template = $this->_initTemplate('template_id');\\n if (!$template->getId()) {\\n $this->_getSession()->addError($this->__('Template for new AirMail Message does not exist.'));\\n $this->_redirect('*/*/template');\\n }\\n }\\n\\n if (isset($template)) {\\n $appId = $template->getApplicationId();\\n } else {\\n $appId = Mage::getModel('xmlconnect/template')->load($message->getTemplateId())->getApplicationId();\\n }\\n\\n /** @var $app Mage_XmlConnect_Model_Application */\\n $app = Mage::getModel('xmlconnect/application')->load($appId);\\n\\n if(!$app->isNotificationsActive()) {\\n $this->_getSession()->addError(\\n $this->__('Queue is allowed only for applications with enabled Push Notification.')\\n );\\n $action = $message->getId() ? 'queue' : 'template';\\n $this->_redirect('*/*/' . $action);\\n return;\\n }\\n\\n $this->loadLayout();\\n if ($message->getId()) {\\n $title = $this->__('Edit AirMail Message');\\n } else {\\n $title = $this->__('New AirMail Message');\\n }\\n $this->_addBreadcrumb(\\n $this->__('AirMail Message Queue'), $this->__('AirMail Message Queue'), $this->getUrl('*/*/queue')\\n );\\n $this->_addBreadcrumb($title, $title);\\n\\n $this->_setActiveMenu('xmlconnect/queue');\\n $this->renderLayout();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70d110d233336bbf4a380b5ce163dd27\",\n \"score\": \"0.4625044\",\n \"text\": \"public function add(\\\\Puja\\\\Library\\\\Queue\\\\Entity\\\\Queue$queue)\\n {\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70f529bcccc494c808324a614d5729c3\",\n \"score\": \"0.46195135\",\n \"text\": \"public function addAnnouncementQueue() {\\n try {\\n if (!($this->announcementQueue instanceof Base_Model_ObtorLib_App_Core_Announcement_Entity_AnnouncementQueue)) {\\n throw new Base_Model_ObtorLib_App_Core_Announcement_Exception(\\\" AnnouncementQueue Entity not intialized\\\");\\n } else {\\n $data = array(\\n 'status' => $this->announcementQueue->getStatus(),\\n 'added_on' => $this->announcementQueue->getAddedOn(),\\n 'updated_on' => $this->announcementQueue->getUpdatedOn(),\\n 'staff_id' => $this->announcementQueue->getStaffId(),\\n 'customer_id' => $this->announcementQueue->getCustomerId(),\\n 'announcement_id' => $this->announcementQueue->getAnnouncement());\\n \\n $last_inserted_id = $this->insert($data);\\n return $last_inserted_id;\\n }\\n } catch (Exception $ex) {\\n throw new Base_Model_ObtorLib_App_Core_Announcement_Exception($ex);\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"19043e4ae682672c9ab3d8d9e48a255c\",\n \"score\": \"0.46101785\",\n \"text\": \"public function enqueue($queue, $command);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"82527de704cd873bc0cc2c3a59cfce08\",\n \"score\": \"0.46066695\",\n \"text\": \"function SendQueue() {\\n\\t\\tglobal $db;\\n\\n\\t\\trequire_once(AC_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');\\n\\t\\t$mailQueueDAO = new MailQueueDAO();\\n\\t\\t$rows = $mailQueueDAO->getAll();\\n\\n\\t\\t$mail_ids = array();\\n\\t\\t\\n\\t\\tif (is_array($rows))\\n\\t\\t{\\n\\t\\t\\tforeach ($rows as $id => $row) \\n\\t\\t\\t{\\n\\t\\t\\t\\t$this->ClearAllRecipients();\\n\\t\\n\\t\\t\\t\\t$this->AddAddress($row['to_email'], $row['to_name']);\\n\\t\\t\\t\\t$this->From = $row['from_email'];\\n\\t\\t\\t\\t$this->FromName = $row['from_name'];\\n\\t\\t\\t\\t$this->CharSet = $row['char_set'];\\n\\t\\t\\t\\t$this->Subject = $row['subject'];\\n\\t\\t\\t\\t$this->Body = $row['body'];\\n\\t\\n\\t\\t\\t\\tparent::Send();\\n\\t\\n\\t\\t\\t\\t$mail_ids[] = $row['mail_id'];\\n\\t\\t\\t}\\n\\t\\t\\tif ($mail_ids) \\n\\t\\t\\t{\\n\\t\\t\\t\\tinclude(AC_INCLUDE_PATH.'classes/DAO/MailQueueDAO.class.php');\\n\\t\\t\\t\\t$mailQueueDAO = new MailQueueDAO();\\n\\t\\n\\t\\t\\t\\t$mailQueueDAO->DeleteByIDs($mail_ids);\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"70908a5eb3453cd4d6d1472d512d09c5\",\n \"score\": \"0.4599109\",\n \"text\": \"protected function deleteScheduledEmailByIdRequest($identifier)\\n {\\n // verify the required parameter 'identifier' is set\\n if ($identifier === null || (is_array($identifier) && count($identifier) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $identifier when calling deleteScheduledEmailById'\\n );\\n }\\n\\n $resourcePath = '/smtp/email/{identifier}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($identifier !== null) {\\n $resourcePath = str_replace(\\n '{' . 'identifier' . '}',\\n ObjectSerializer::toPathValue($identifier),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($formParams);\\n }\\n }\\n\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('api-key');\\n if ($apiKey !== null) {\\n $headers['api-key'] = $apiKey;\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('partner-key');\\n if ($apiKey !== null) {\\n $headers['partner-key'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($queryParams);\\n return new Request(\\n 'DELETE',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76f32706e873bd939fb5efddaf540a2b\",\n \"score\": \"0.45946047\",\n \"text\": \"private function queueForWrite()\\n {\\n if (count($this->creates)) {\\n // Debugging information\\n $this->logger->info(__FILE__ . __FUNCTION__);\\n\\n $createObject = 'Synapse\\\\UploadBundle\\\\Job\\\\ManageGroupStudentBulkUpload';\\n\\n // get unique id\\n $jobNumber = uniqid();\\n\\n // create the job with the information given\\n $job = new $createObject();\\n $job->queue = $this->queue;\\n $job->args = array(\\n 'creates' => $this->creates,\\n 'jobNumber' => $jobNumber,\\n 'uploadId' => $this->uploadId,\\n 'orgId' => $this->organizationId,\\n 'duplicatedExternalIDs' => implode(\\\",\\\", $this->duplicatedExternalIDs)\\n );\\n\\n\\n // send the job\\n $this->jobs[$jobNumber] = $this->resque->enqueue($job, true);\\n }\\n // reset the object so the same thing is not uploaded each time\\n $this->creates = [];\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dddab92d18e02eb43cbe8840ec12cd06\",\n \"score\": \"0.4579092\",\n \"text\": \"protected function getWorkforcemanagementSchedulingjobRequest($jobId)\\n {\\n // verify the required parameter 'jobId' is set\\n if ($jobId === null || (is_array($jobId) && count($jobId) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $jobId when calling getWorkforcemanagementSchedulingjob'\\n );\\n }\\n\\n $resourcePath = '/api/v2/workforcemanagement/schedulingjobs/{jobId}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($jobId !== null) {\\n $resourcePath = str_replace(\\n '{' . 'jobId' . '}',\\n ObjectSerializer::toPathValue($jobId),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'GET',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7a482c0f5d97110cabda4157e07ca45d\",\n \"score\": \"0.45652086\",\n \"text\": \"function create_scheduling_requests( &$resource ) {\\n if ( ! is_object($resource) ) {\\n dbg_error_log( 'PUT', 'create_scheduling_requests called with non-object parameter (%s)', gettype($resource) );\\n return;\\n }\\n\\n $attendees = $resource->GetPropertiesByPath('/VCALENDAR/*/ATTENDEE');\\n\\t$wr_attendees = $resource->GetPropertiesByPath('/VCALENDAR/*/X-WR-ATTENDEE');\\n\\tif ( count ( $wr_attendees ) > 0 ) {\\n dbg_error_log( 'POST', 'Non-compliant iCal request. Using X-WR-ATTENDEE property' );\\n foreach( $wr_attendees AS $k => $v ) {\\n $attendees[] = $v;\\n }\\n }\\n if ( count($attendees) == 0 ) {\\n dbg_error_log( 'PUT', 'Event has no attendees - no scheduling required.', count($attendees) );\\n return;\\n }\\n\\n dbg_error_log( 'PUT', 'Adding to scheduling inbox %d attendees', count($attendees) );\\n foreach( $attendees AS $attendee ) {\\n $attendee->SetParameterValue( 'SCHEDULE-STATUS', write_scheduling_request( $resource, $attendee->Value(), true ) );\\n }\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4ca667c188b613002728e3f04236d93a\",\n \"score\": \"0.45410302\",\n \"text\": \"protected function scheduledPlansForSpaceRequest($space_id, $fields = null)\\n {\\n // verify the required parameter 'space_id' is set\\n if ($space_id === null) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $space_id when calling scheduledPlansForSpace'\\n );\\n }\\n\\n $resourcePath = '/scheduled_plans/space/{space_id}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n // query params\\n if ($fields !== null) {\\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\\n }\\n\\n // path params\\n if ($space_id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'space_id' . '}',\\n ObjectSerializer::toPathValue($space_id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'GET',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4b64feaac878c779c1ba3fc5e64b31f4\",\n \"score\": \"0.453971\",\n \"text\": \"protected function addRequest($organization, $body, $processId, $witRefName, $groupId, $apiVersion)\\n {\\n // verify the required parameter 'organization' is set\\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $organization when calling add'\\n );\\n }\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling add'\\n );\\n }\\n // verify the required parameter 'processId' is set\\n if ($processId === null || (is_array($processId) && count($processId) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $processId when calling add'\\n );\\n }\\n // verify the required parameter 'witRefName' is set\\n if ($witRefName === null || (is_array($witRefName) && count($witRefName) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $witRefName when calling add'\\n );\\n }\\n // verify the required parameter 'groupId' is set\\n if ($groupId === null || (is_array($groupId) && count($groupId) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $groupId when calling add'\\n );\\n }\\n // verify the required parameter 'apiVersion' is set\\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $apiVersion when calling add'\\n );\\n }\\n\\n $resourcePath = '/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n // query params\\n if ($apiVersion !== null) {\\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\\n }\\n\\n // path params\\n if ($organization !== null) {\\n $resourcePath = str_replace(\\n '{' . 'organization' . '}',\\n ObjectSerializer::toPathValue($organization),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($processId !== null) {\\n $resourcePath = str_replace(\\n '{' . 'processId' . '}',\\n ObjectSerializer::toPathValue($processId),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($witRefName !== null) {\\n $resourcePath = str_replace(\\n '{' . 'witRefName' . '}',\\n ObjectSerializer::toPathValue($witRefName),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($groupId !== null) {\\n $resourcePath = str_replace(\\n '{' . 'groupId' . '}',\\n ObjectSerializer::toPathValue($groupId),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires HTTP basic authentication\\n if ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \\\":\\\" . $this->config->getPassword());\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bbfdd6e70d90be1459fcae584adeb166\",\n \"score\": \"0.45392138\",\n \"text\": \"public function delete($queue_id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f050b1b341cf448ddb10a323090840b6\",\n \"score\": \"0.45386273\",\n \"text\": \"protected function putEmailSenderRequest($sender_id, $email_sender_put_request)\\n {\\n // verify the required parameter 'sender_id' is set\\n if ($sender_id === null || (is_array($sender_id) && count($sender_id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $sender_id when calling putEmailSender'\\n );\\n }\\n if ($sender_id < 1) {\\n throw new \\\\InvalidArgumentException('invalid value for \\\"$sender_id\\\" when calling SendersApi.putEmailSender, must be bigger than or equal to 1.');\\n }\\n\\n // verify the required parameter 'email_sender_put_request' is set\\n if ($email_sender_put_request === null || (is_array($email_sender_put_request) && count($email_sender_put_request) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $email_sender_put_request when calling putEmailSender'\\n );\\n }\\n\\n $resourcePath = '/senders/email/{sender_id}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($sender_id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'sender_id' . '}',\\n ObjectSerializer::toPathValue($sender_id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($email_sender_put_request)) {\\n $_tempBody = $email_sender_put_request;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n if ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\\n } else {\\n $httpBody = $_tempBody;\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('Apikey');\\n if ($apiKey !== null) {\\n $headers['Apikey'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a94ce07c6d9391a14a1be838e72a5d74\",\n \"score\": \"0.45194376\",\n \"text\": \"public function queue($name = null);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"058a51f811298ba6eb3264cb4ca707b5\",\n \"score\": \"0.45113197\",\n \"text\": \"public function putRequest()\\n\\t{\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"725f1c678e7516ddf6bbffa4178d2f73\",\n \"score\": \"0.4503776\",\n \"text\": \"public function createQueue($queueName, $createQueueOptions = null);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d1a31cad52924b4e758e5ce52b4bf350\",\n \"score\": \"0.45036888\",\n \"text\": \"protected function voucherMarkAsPaidRequest($id, $body = null) {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling voucherMarkAsPaid'\\n );\\n }\\n\\n $resourcePath = '/Voucher/{id}/markAsPaid';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/xml', 'application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/xml', 'application/json'],\\n ['application/x-www-form-urlencoded']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('token');\\n if ($apiKey !== null) {\\n $queryParams['token'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"300568fe12a99d5598544c0be190adbc\",\n \"score\": \"0.4487947\",\n \"text\": \"public function archiveTokenRequest($token_id)\\n {\\n // verify the required parameter 'token_id' is set\\n if ($token_id === null || (is_array($token_id) && count($token_id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $token_id when calling archiveToken'\\n );\\n }\\n\\n $resourcePath = '/marketing/v3/transactional/smtp-tokens/{tokenId}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n\\n // path params\\n if ($token_id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'tokenId' . '}',\\n ObjectSerializer::toPathValue($token_id),\\n $resourcePath\\n );\\n }\\n\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['*/*']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['*/*'],\\n []\\n );\\n }\\n\\n // for model (json/xml)\\n if (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\\n foreach ($formParamValueItems as $formParamValueItem) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValueItem\\n ];\\n }\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = ObjectSerializer::buildQuery($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if (!empty($this->config->getAccessToken())) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = ObjectSerializer::buildQuery($queryParams);\\n return new Request(\\n 'DELETE',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3b4b4e2745b66159d7c2883e9b403104\",\n \"score\": \"0.44871387\",\n \"text\": \"public function initQueue($routingKey, $queueName = null, $durable = true, $autodelete = false)\\n {\\n try {\\n $channel = $this->getChannel();\\n\\n // Set the publisher's queue\\n if (empty($queueName) && !empty($this->queueName)) {\\n $queueName = $this->queueName;\\n } else\\n $this->setQueueName($queueName);\\n \\n // Sets the routing key for the queue\\n $this->setRoutingKey($routingKey);\\n //Create queue or use existing (define as persistent)\\n $channel->queue_declare($queueName, false, $durable, false, $autodelete);\\n // Do the binding of queue to exchange to route messages to correct queue\\n $channel->queue_bind($queueName, $this->exchangeName, $routingKey);\\n } catch (\\\\Exception $e) {\\n echo $e->getMessage();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dcf3e8d9e8fb61f9b85efbd0b61baae3\",\n \"score\": \"0.44822878\",\n \"text\": \"protected function jobsPostRequest($authorization, $body) {\\n // Verify the required parameter 'authorization' is set.\\n if ($authorization === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $authorization when calling jobsPost'\\n );\\n }\\n // Verify the required parameter 'body' is set.\\n if ($body === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling jobsPost'\\n );\\n }\\n\\n $resourcePath = '/jobs';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = FALSE;\\n\\n // Header params.\\n if ($authorization !== NULL) {\\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\\n }\\n\\n // Body params.\\n $_tempBody = NULL;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n }\\n else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // For model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present.\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually.\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n }\\n elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // For HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n }\\n elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n }\\n else {\\n // For HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\\n if ($apiKey !== NULL) {\\n $headers['Authorization'] = $apiKey;\\n }\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\\n if ($apiKey !== NULL) {\\n $headers['x-api-key'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"923d54b174058806c2b51261a50b6b8f\",\n \"score\": \"0.44680718\",\n \"text\": \"protected function deleteApiTaskRequest($id)\\n {\\n // verify the required parameter 'id' is set\\n if ($id === null || (is_array($id) && count($id) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $id when calling deleteApiTask'\\n );\\n }\\n\\n $resourcePath = '/task/{id}.json';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($id !== null) {\\n $resourcePath = str_replace(\\n '{' . 'id' . '}',\\n ObjectSerializer::toPathValue($id),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token)\\n if ($this->config->getAccessToken() !== null) {\\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'DELETE',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ef0aece396f038eca048163b50229692\",\n \"score\": \"0.44614497\",\n \"text\": \"protected function taskgroupsUpdateRequest($organization, $body, $project, $taskGroupId, $apiVersion)\\n {\\n // verify the required parameter 'organization' is set\\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $organization when calling taskgroupsUpdate'\\n );\\n }\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling taskgroupsUpdate'\\n );\\n }\\n // verify the required parameter 'project' is set\\n if ($project === null || (is_array($project) && count($project) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $project when calling taskgroupsUpdate'\\n );\\n }\\n // verify the required parameter 'taskGroupId' is set\\n if ($taskGroupId === null || (is_array($taskGroupId) && count($taskGroupId) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $taskGroupId when calling taskgroupsUpdate'\\n );\\n }\\n // verify the required parameter 'apiVersion' is set\\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $apiVersion when calling taskgroupsUpdate'\\n );\\n }\\n\\n $resourcePath = '/{organization}/{project}/_apis/distributedtask/taskgroups/{taskGroupId}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n // query params\\n if ($apiVersion !== null) {\\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\\n }\\n\\n // path params\\n if ($organization !== null) {\\n $resourcePath = str_replace(\\n '{' . 'organization' . '}',\\n ObjectSerializer::toPathValue($organization),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($project !== null) {\\n $resourcePath = str_replace(\\n '{' . 'project' . '}',\\n ObjectSerializer::toPathValue($project),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($taskGroupId !== null) {\\n $resourcePath = str_replace(\\n '{' . 'taskGroupId' . '}',\\n ObjectSerializer::toPathValue($taskGroupId),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token) OR HTTP Basic Authentication with personal access token\\n if ($this->config->getAccessToken() !== null) {\\n\\t\\t\\t$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n\\t\\t}\\n\\n\\t\\tif ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\\n\\t\\t\\t$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \\\":\\\" . $this->config->getPassword());\\n\\t\\t}\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd3e6efbb1c858234f514a400dc896ff\",\n \"score\": \"0.4459506\",\n \"text\": \"public function __construct($email_queue)\\n {\\n $this->email_queue = $email_queue;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a32ad204f11d56b7e4e520d8aac77fbc\",\n \"score\": \"0.44579569\",\n \"text\": \"public function addQueue($name, $starting = null, $ending = null) {\\n $q = new Queue();\\n $q->setName($name);\\n\\n $q->setLowerBound($starting);\\n $q->setUpperBound($ending);\\n\\n $this->dm->persist($q);\\n\\n $this->dm->flush();\\n\\n return true;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"47ad8d90283bc6ac43fdd2f3bf87b91c\",\n \"score\": \"0.44525307\",\n \"text\": \"public static function insert_from_queue( $id, $action, $args );\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4dd2269247c09853b79b66d67daebe0f\",\n \"score\": \"0.44465634\",\n \"text\": \"public static function enqueue($to, string $subject, array $data)\\n {\\n $validation = \\\\Config\\\\Services::validation();\\n\\n if($validation->check($to,'required|valid_email') && $validation->check($subject,'required')){\\n\\n $queue = new EmailQueueModel();\\n\\n return $queue->enqueue($to, $subject, $data);\\n\\n }else{\\n\\n return redirect()->back()->with('error', $validation->getErrors());\\n\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e0d3f449b0d904549623003cc429ba47\",\n \"score\": \"0.44450578\",\n \"text\": \"protected function updateCustomerGroupRequest($number, $body)\\n {\\n // verify the required parameter 'number' is set\\n if ($number === null) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $number when calling updateCustomerGroup'\\n );\\n }\\n // verify the required parameter 'body' is set\\n if ($body === null) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling updateCustomerGroup'\\n );\\n }\\n\\n $resourcePath = '/customer-groups/{number}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n // path params\\n if ($number !== null) {\\n $resourcePath = str_replace(\\n '{' . 'number' . '}',\\n ObjectSerializer::toPathValue($number),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers= $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n []\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'PUT',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cbf4cfec6ae0b3cd01e14bd005eaa8aa\",\n \"score\": \"0.44407734\",\n \"text\": \"public function addOrganisationToQueue(AddOrganisationToQueueRequest $request)\\n {\\n $this->manageCustomerQueue->addOrganisationToQueue($request);\\n\\n notify()->flash($request->input('organisationName') . \\\" Successfully Added to the Queue!\\\", \\\"success\\\", ['icon' => \\\"check\\\"]);\\n\\n return Redirect::back();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6902165140ca385323080ef377408457\",\n \"score\": \"0.44266328\",\n \"text\": \"public function queue();\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c85520c0867e66217b9ed23b6ab6820d\",\n \"score\": \"0.44249249\",\n \"text\": \"public function createShipmentRequest($body)\\n {\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling createShipment'\\n );\\n }\\n\\n $resourcePath = '/mfn/v0/shipments';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($body)) {\\n if ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($body));\\n } else {\\n $httpBody = $body;\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\\n foreach ($formParamValueItems as $formParamValueItem) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValueItem\\n ];\\n }\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($formParams);\\n }\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($queryParams);\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56c31fe83158b06517198d0cde8b7e96\",\n \"score\": \"0.44099864\",\n \"text\": \"function qruqsp_ntst_messageAdd(&$ciniki) {\\n //\\n // Find all the required and optional arguments\\n //\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\\n 'participant_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Participant'),\\n 'status'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Status'),\\n 'number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Message Number'),\\n 'precedence'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Precedence'),\\n 'hx'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Handling'),\\n 'station_of_origin'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Station of Origin'),\\n 'check_number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Check'),\\n 'place_of_origin'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Place of Origin'),\\n 'time_filed'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Time Filed'),\\n 'date_filed'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Date Filed'),\\n 'to_name_address'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Name/Address'),\\n 'phone_number'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Phone Number'),\\n 'email'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Email'),\\n 'message'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Message'),\\n 'spoken'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Spoken'),\\n 'signature'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Signature'),\\n ));\\n if( $rc['stat'] != 'ok' ) {\\n return $rc;\\n }\\n $args = $rc['args'];\\n\\n //\\n // Check access to tnid as owner\\n //\\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'private', 'checkAccess');\\n $rc = qruqsp_ntst_checkAccess($ciniki, $args['tnid'], 'qruqsp.ntst.messageAdd');\\n if( $rc['stat'] != 'ok' ) {\\n return $rc;\\n }\\n \\n //\\n // Load the net details for the participant\\n //\\n $strsql = \\\"SELECT participants.callsign, \\\"\\n . \\\"participants.name, \\\"\\n . \\\"participants.flags, \\\"\\n . \\\"participants.place_of_origin, \\\"\\n . \\\"participants.phone, \\\"\\n . \\\"participants.email, \\\"\\n . \\\"nets.id AS net_id, \\\"\\n . \\\"nets.name, \\\"\\n . \\\"nets.message_sources \\\"\\n . \\\"FROM qruqsp_ntst_participants AS participants \\\"\\n . \\\"INNER JOIN qruqsp_ntst_nets AS nets ON (\\\"\\n . \\\"participants.net_id = nets.id \\\"\\n . \\\"AND nets.tnid = '\\\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \\\"' \\\"\\n . \\\") \\\"\\n . \\\"WHERE participants.id = '\\\" . ciniki_core_dbQuote($ciniki, $args['participant_id']) . \\\"' \\\"\\n . \\\"AND participants.tnid = '\\\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \\\"' \\\"\\n . \\\"\\\";\\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'qruqsp.ntst', 'participant');\\n if( $rc['stat'] != 'ok' ) {\\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.10', 'msg'=>'Unable to load participant', 'err'=>$rc['err']));\\n }\\n if( !isset($rc['participant']) ) {\\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.11', 'msg'=>'Unable to find requested participant'));\\n }\\n $participant = $rc['participant'];\\n $args['net_id'] = $rc['participant']['net_id'];\\n\\n $dt = new DateTime('now', new DateTimezone('UTC'));\\n if( !isset($args['time_filed']) || $args['time_filed'] == '' ) {\\n $args['time_filed'] = $dt->format('Hi') . 'Z';\\n }\\n if( !isset($args['date_filed']) || $args['date_filed'] == '' ) {\\n $args['date_filed'] = $dt->format('M d');\\n }\\n $dt->sub(new DateInterval('P3M'));\\n\\n //\\n // Check for next number if one was not passed\\n //\\n if( !isset($args['number']) || $args['number'] == '' ) {\\n $strsql = \\\"SELECT MAX(messages.number) AS num \\\"\\n . \\\"FROM qruqsp_ntst_participants AS participants \\\"\\n . \\\"INNER JOIN qruqsp_ntst_messages AS messages ON (\\\"\\n . \\\"participants.id = messages.participant_id \\\"\\n . \\\"AND messages.tnid = '\\\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \\\"' \\\"\\n . \\\"AND messages.date_added > '\\\" . ciniki_core_dbQuote($ciniki, $dt->format('Y-m-d')) . \\\"' \\\"\\n . \\\") \\\"\\n . \\\"\\\";\\n// $strsql .= \\\"WHERE participants.callsign = '\\\" . ciniki_core_dbQuote($ciniki, $participant['callsign']) . \\\"' \\\";\\n $strsql .= \\\"WHERE participants.net_id = '\\\" . ciniki_core_dbQuote($ciniki, $participant['net_id']) . \\\"' \\\";\\n $strsql .= \\\"AND participants.tnid = '\\\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \\\"' \\\"\\n . \\\"\\\";\\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'qruqsp.ntst', 'last');\\n if( $rc['stat'] != 'ok' ) {\\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.26', 'msg'=>'Unable to load number', 'err'=>$rc['err']));\\n }\\n if( isset($rc['last']['num']) && $rc['last']['num'] != '' ) {\\n $args['number'] = sprintf(\\\"%03d\\\", ($rc['last']['num'] + 1));\\n } else {\\n $args['number'] = '001';\\n }\\n }\\n\\n if( !isset($args['precedence']) || $args['precedence'] == '' ) {\\n $args['precedence'] = 'R';\\n }\\n\\n if( !isset($args['station_of_origin']) || $args['station_of_origin'] == '' ) {\\n $args['station_of_origin'] = $participant['callsign'];\\n }\\n if( !isset($args['place_of_origin']) || $args['place_of_origin'] == '' ) {\\n $args['place_of_origin'] = $participant['place_of_origin'];\\n }\\n\\n //\\n // Load a message if one is not supplied\\n //\\n/* if( !isset($args['message']) || $args['message'] == '' ) {\\n //\\n // Get the last 3 months or 100 messages MD5's to compare with our message file\\n //\\n $strsql = \\\"SELECT md5(message) AS m \\\"\\n . \\\"FROM qruqsp_ntst_messages \\\"\\n . \\\"WHERE tnid = '\\\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \\\"' \\\"\\n . \\\"ORDER BY date_added DESC \\\"\\n . \\\"LIMIT 100 \\\"\\n . \\\"\\\";\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQueryList');\\n $rc = ciniki_core_dbQueryList($ciniki, $strsql, 'qruqsp.ntst', 'messages', 'm');\\n if( $rc['stat'] != 'ok' ) {\\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.24', 'msg'=>'Unable to load the list of messages', 'err'=>$rc['err']));\\n }\\n $existing_messages = isset($rc['messages']) ? $rc['messages'] : '';\\n\\n //\\n // Load the messages file specified for th net\\n //\\n $message_source = 'quotes.csv';\\n if( isset($participant['message_sources']) ) {\\n //\\n // FIXME: Add lookup of source\\n //\\n }\\n\\n //\\n // Open the messages file, and generate MD5 array\\n //\\n $filename = $ciniki['config']['ciniki.core']['root_dir'] . '/qruqsp-mods/ntst/messages/' . $message_source;\\n $message_file = file($filename);\\n $messages = array();\\n foreach($message_file as $line) {\\n $pieces = explode(\\\"::\\\", $line);\\n if( is_array($pieces) && count($pieces) > 1 ) {\\n $messages[md5($pieces[0])] = array(\\n 'message' => preg_replace(\\\"/\\\\[\\\\[(.*)||.*\\\\]\\\\]/g\\\", \\\"$1\\\", $pieces[0]),\\n 'spoken' => preg_replace(\\\"/\\\\[\\\\[.*||(.*)\\\\]\\\\]/g\\\", \\\"$1\\\", $pieces[0]),\\n 'signature' => $pieces[1],\\n );\\n }\\n }\\n if( count($messages) < 2 ) {\\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.25', 'msg'=>'Message file is empty.'));\\n }\\n\\n //\\n // Find the last message sent from this file, so we know what's the next\\n // message to send. Go through the list of existing md5 hashes in \\n // descending order from the SQL above to find last one used.\\n //\\n foreach($existing_messages as $hash) {\\n if( isset($messages[$hash]) ) {\\n //\\n // MD5 exists, now find position in array\\n //\\n $next = 'no';\\n foreach($messages as $k => $v) {\\n if( $next == 'yes' ) {\\n $next_message = $v;\\n break;\\n } \\n if( $k == $hash ) {\\n $next = 'yes';\\n// $next_message = next($messages);\\n// if( $next_message === false ) {\\n// $next_message = reset($messages);\\n// }\\n// break;\\n }\\n }\\n \\n break;\\n }\\n }\\n if( !isset($next_message) ) {\\n $next_message = reset($messages);\\n }\\n\\n //\\n // Setup the args with the next message\\n //\\n $args['message'] = $next_message['message'];\\n $args['spoken'] = $next_message['spoken'];\\n $args['signature'] = $next_message['signature'];\\n }\\n*/\\n if( !isset($args['check_number']) || $args['check_number'] == '' || $args['check_number'] == 0 ) {\\n $args['check_number'] = str_word_count($args['message']);\\n }\\n\\n if( !isset($args['to_name_address']) || $args['to_name_address'] == '' ) {\\n $args['to_name_address'] = 'All Stations';\\n }\\n\\n //\\n // Start transaction\\n //\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\\n $rc = ciniki_core_dbTransactionStart($ciniki, 'qruqsp.ntst');\\n if( $rc['stat'] != 'ok' ) {\\n return $rc;\\n }\\n\\n //\\n // Add the message to the database\\n //\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\\n $rc = ciniki_core_objectAdd($ciniki, $args['tnid'], 'qruqsp.ntst.message', $args, 0x04);\\n if( $rc['stat'] != 'ok' ) {\\n ciniki_core_dbTransactionRollback($ciniki, 'qruqsp.ntst');\\n return $rc;\\n }\\n $message_id = $rc['id'];\\n\\n //\\n // Commit the transaction\\n //\\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'qruqsp.ntst');\\n if( $rc['stat'] != 'ok' ) {\\n return $rc;\\n }\\n\\n //\\n // Email the message\\n //\\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'private', 'messageSend');\\n $rc = qruqsp_ntst_messageSend($ciniki, $args['tnid'], $message_id);\\n if( $rc['stat'] != 'ok' ) {\\n return array('stat'=>'fail', 'err'=>array('code'=>'qruqsp.ntst.27', 'msg'=>'', 'err'=>$rc['err']));\\n }\\n\\n //\\n // Update the last_change date in the tenant modules\\n // Ignore the result, as we don't want to stop user updates if this fails.\\n //\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\\n ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'qruqsp', 'ntst');\\n\\n //\\n // Update the web index if enabled\\n //\\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'hookExec');\\n ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'qruqsp.ntst.message', 'object_id'=>$message_id));\\n\\n //\\n // Return the details for the net\\n //\\n ciniki_core_loadMethod($ciniki, 'qruqsp', 'ntst', 'public', 'netGet');\\n $ciniki['request']['args']['net_id'] = $args['net_id'];\\n return qruqsp_ntst_netGet($ciniki);\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"08237bba106adb203bd086f7b1cef773\",\n \"score\": \"0.440803\",\n \"text\": \"static public function queueAdd($schoolID)\\n { \\n global $db;\\n // Cancel any current request\\n self::queueCancel($schoolID);\\n\\n // Number of partipants\\n $query = \\\"\\n SELECT\\n COUNT(*) AS count\\n FROM `contestant`, `team`, `group`\\n WHERE \\n `contestant`.teamID = `team`.ID AND\\n `team`.groupID = `group`.ID AND\\n `group`.schoolID = :schoolID AND\\n `team`.`participationType` = 'Official' AND\\n `group`.contestID IN (\\\".CERTIGEN_CONTESTS.\\\")\\n \\\";\\n $stmt = $db->prepare($query);\\n $stmt->execute(array(':schoolID' => $schoolID));\\n $nbStudents = $stmt->fetchObject()->count;\\n\\n if ($nbStudents == 0)\\n return;\\n\\n $query = \\\"\\n INSERT INTO `certi_queue` (`schoolID`,`nbStudents`,`requestDate`,`state`)\\n VALUES (:schoolID, :nbStudents, NOW(), :stateWaiting)\\n \\\";\\n $stmt = $db->prepare($query);\\n $stmt->execute(array_merge(array(':schoolID' => $schoolID, ':nbStudents' => $nbStudents), self::getArrayStates($query))); \\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84bcda3790d974ad600700923cc690c4\",\n \"score\": \"0.44007054\",\n \"text\": \"public function store(Request $request , $id)\\n {\\n\\n $data = $request->all();\\n $data['project_id']= $id;\\n\\n return $this->service->create($data);\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e20004ab070ff715561c50724b04514c\",\n \"score\": \"0.43962225\",\n \"text\": \"public function testGetInvalidQueueByQueueId() {\\n\\t\\t// first, assert the mySQL class is sane\\n\\t\\t$this->assertNotNull($this->mysqli);\\n\\n\\t\\t// grab a queue that could never exist\\n\\t\\t$mysqlQueue = Queue::getQueueByQueueId($this->mysqli, 12);\\n\\t\\t$this->assertNull($mysqlQueue);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e7ceece98db055eb453d1649385871bf\",\n \"score\": \"0.43941742\",\n \"text\": \"protected function campaignsUpdateRequest($data)\\n {\\n // verify the required parameter 'data' is set\\n if ($data === null || (is_array($data) && count($data) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $data when calling campaignsUpdate'\\n );\\n }\\n\\n $resourcePath = '/campaigns/update';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n\\n // body params\\n $_tempBody = null;\\n if (isset($data)) {\\n $_tempBody = $data;\\n }\\n\\n if (in_array('multipart/form-data', ['application/json', 'application/xml'])) {\\n $multipart = true;\\n }\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json', 'application/xml']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n if (class_exists('\\\\GuzzleHttp\\\\Psr7\\\\Query')) {\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($formParams);\\n } else {\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n }\\n\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('access_token');\\n if ($apiKey !== null) {\\n $queryParams['access_token'] = $apiKey;\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('nonce');\\n if ($apiKey !== null) {\\n $queryParams['nonce'] = $apiKey;\\n }\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('timestamp');\\n if ($apiKey !== null) {\\n $queryParams['timestamp'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n if (class_exists('\\\\GuzzleHttp\\\\Psr7\\\\Query')) {\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\Query::build($queryParams);\\n } else {\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n }\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12b03184f0fd8bdd7888aad0527d6b0a\",\n \"score\": \"0.4378426\",\n \"text\": \"protected function taskgroupsAddRequest($organization, $body, $project, $apiVersion)\\n {\\n // verify the required parameter 'organization' is set\\n if ($organization === null || (is_array($organization) && count($organization) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $organization when calling taskgroupsAdd'\\n );\\n }\\n // verify the required parameter 'body' is set\\n if ($body === null || (is_array($body) && count($body) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling taskgroupsAdd'\\n );\\n }\\n // verify the required parameter 'project' is set\\n if ($project === null || (is_array($project) && count($project) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $project when calling taskgroupsAdd'\\n );\\n }\\n // verify the required parameter 'apiVersion' is set\\n if ($apiVersion === null || (is_array($apiVersion) && count($apiVersion) === 0)) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $apiVersion when calling taskgroupsAdd'\\n );\\n }\\n\\n $resourcePath = '/{organization}/{project}/_apis/distributedtask/taskgroups';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n // query params\\n if ($apiVersion !== null) {\\n $queryParams['api-version'] = ObjectSerializer::toQueryValue($apiVersion);\\n }\\n\\n // path params\\n if ($organization !== null) {\\n $resourcePath = str_replace(\\n '{' . 'organization' . '}',\\n ObjectSerializer::toPathValue($organization),\\n $resourcePath\\n );\\n }\\n // path params\\n if ($project !== null) {\\n $resourcePath = str_replace(\\n '{' . 'project' . '}',\\n ObjectSerializer::toPathValue($project),\\n $resourcePath\\n );\\n }\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n \\n if($headers['Content-Type'] === 'application/json') {\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n // array has no __toString(), so we should encode it manually\\n if(is_array($httpBody)) {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\\n }\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires OAuth (access token) OR HTTP Basic Authentication with personal access token\\n if ($this->config->getAccessToken() !== null) {\\n\\t\\t\\t$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\\n\\t\\t}\\n\\n\\t\\tif ($this->config->getUsername() !== null || $this->config->getPassword() !== null) {\\n\\t\\t\\t$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \\\":\\\" . $this->config->getPassword());\\n\\t\\t}\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8eee9d42aeb0950cf477af88fc1f2cda\",\n \"score\": \"0.43750218\",\n \"text\": \"public function __construct(QueueFactory $queue) {\\n $this->queue = $queue;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2db2ceeb14da310bbe934ba0691a15c0\",\n \"score\": \"0.4371527\",\n \"text\": \"protected function addQueue($action, $managerName, $model, $id = null)\\n {\\n if (!in_array($action, array( self::QUEUE_ACTION_PERSIST, self::QUEUE_ACTION_REMOVE))) {\\n throw new \\\\InvalidArgumentException(sprintf('Action unknown, manager name : \\\"%s\\\".', $managerName));\\n }\\n\\n $this->queueActions[] = $action;\\n $this->queueManagerNames[] = $managerName;\\n $this->queueModels[] = $model;\\n $this->queueIds[] = $id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"84ce8e317e66092a482a2f5595ad3361\",\n \"score\": \"0.43677002\",\n \"text\": \"public function getQueueableId()\\n {\\n return $this->getKey();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb4bf28b4d1bb175435ba9f22ebd3725\",\n \"score\": \"0.436672\",\n \"text\": \"public abstract function release($queueName, array $message, $options = []);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5c9d9b515173524a3037c6cddf3a413b\",\n \"score\": \"0.43585724\",\n \"text\": \"function messages_post() //create\\n {\\n $message = array('id' => $this->get('id'), 'name' => $this->post('name'), 'email' => $this->post('email'), 'message' => 'ADDED!');\\n \\n $this->response($message, 200); // 200 being the HTTP response code\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ccebc9dcffe9145809bf83ebe6c64797\",\n \"score\": \"0.4357377\",\n \"text\": \"public function getQueueID()\\n {\\n return $this->queueID;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8c2263209c81ae6e96e31916430262c0\",\n \"score\": \"0.4349991\",\n \"text\": \"function insertRequestInDb($user_id, $requestId, $toId)\\n {\\n $bdd = getConnexion();\\n $sth = $bdd->prepare('INSERT INTO invitation (requestId, toId, senderId) VALUES (:request, :item, :sender )');\\n $sth->bindParam(':sender', cleanData($user_id));\\n $sth->bindParam(':request', cleanData($requestId));\\n \\n foreach ($toId as $to){\\n $sth->bindParam(':item', $to);\\n $sth->execute();\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c9932becd984c3257c71fc0d71c24400\",\n \"score\": \"0.43436968\",\n \"text\": \"protected function addReceivingWorksheetRequest($body)\\n {\\n // verify the required parameter 'body' is set\\n if ($body === null) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $body when calling addReceivingWorksheet'\\n );\\n }\\n\\n $resourcePath = '/beta/receivingWorksheet';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = false;\\n\\n\\n\\n // body params\\n $_tempBody = null;\\n if (isset($body)) {\\n $_tempBody = $body;\\n }\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n } else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // for model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n } elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // for HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n } elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n } else {\\n // for HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // this endpoint requires API key authentication\\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\\n if ($apiKey !== null) {\\n $headers['API-Key'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'POST',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"12c00e47cd5f21a0281ebdd6203062bf\",\n \"score\": \"0.43411577\",\n \"text\": \"protected function jobsJobIdDeleteRequest($authorization, $job_id) {\\n // Verify the required parameter 'authorization' is set.\\n if ($authorization === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $authorization when calling jobsJobIdDelete'\\n );\\n }\\n // Verify the required parameter 'job_id' is set.\\n if ($job_id === NULL) {\\n throw new \\\\InvalidArgumentException(\\n 'Missing the required parameter $job_id when calling jobsJobIdDelete'\\n );\\n }\\n\\n $resourcePath = '/jobs/{jobId}';\\n $formParams = [];\\n $queryParams = [];\\n $headerParams = [];\\n $httpBody = '';\\n $multipart = FALSE;\\n\\n // Header params.\\n if ($authorization !== NULL) {\\n $headerParams['Authorization'] = ObjectSerializer::toHeaderValue($authorization);\\n }\\n\\n // Path params.\\n if ($job_id !== NULL) {\\n $resourcePath = str_replace(\\n '{' . 'jobId' . '}',\\n ObjectSerializer::toPathValue($job_id),\\n $resourcePath\\n );\\n }\\n\\n // Body params.\\n $_tempBody = NULL;\\n\\n if ($multipart) {\\n $headers = $this->headerSelector->selectHeadersForMultipart(\\n ['application/json']\\n );\\n }\\n else {\\n $headers = $this->headerSelector->selectHeaders(\\n ['application/json'],\\n ['application/json']\\n );\\n }\\n\\n // For model (json/xml)\\n if (isset($_tempBody)) {\\n // $_tempBody is the method argument, if present.\\n $httpBody = $_tempBody;\\n // \\\\stdClass has no __toString(), so we should encode it manually.\\n if ($httpBody instanceof \\\\stdClass && $headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($httpBody);\\n }\\n }\\n elseif (count($formParams) > 0) {\\n if ($multipart) {\\n $multipartContents = [];\\n foreach ($formParams as $formParamName => $formParamValue) {\\n $multipartContents[] = [\\n 'name' => $formParamName,\\n 'contents' => $formParamValue\\n ];\\n }\\n // For HTTP post (form)\\n $httpBody = new MultipartStream($multipartContents);\\n\\n }\\n elseif ($headers['Content-Type'] === 'application/json') {\\n $httpBody = \\\\GuzzleHttp\\\\json_encode($formParams);\\n\\n }\\n else {\\n // For HTTP post (form)\\n $httpBody = \\\\GuzzleHttp\\\\Psr7\\\\build_query($formParams);\\n }\\n }\\n\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\\n if ($apiKey !== NULL) {\\n $headers['Authorization'] = $apiKey;\\n }\\n // This endpoint requires API key authentication.\\n $apiKey = $this->config->getApiKeyWithPrefix('x-api-key');\\n if ($apiKey !== NULL) {\\n $headers['x-api-key'] = $apiKey;\\n }\\n\\n $defaultHeaders = [];\\n if ($this->config->getUserAgent()) {\\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\\n }\\n\\n $headers = array_merge(\\n $defaultHeaders,\\n $headerParams,\\n $headers\\n );\\n\\n $query = \\\\GuzzleHttp\\\\Psr7\\\\build_query($queryParams);\\n return new Request(\\n 'DELETE',\\n $this->config->getHost() . $resourcePath . ($query ? \\\"?{$query}\\\" : ''),\\n $headers,\\n $httpBody\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"74dd2758e1826e03d070a0c29c553d63\",\n \"score\": \"0.43336242\",\n \"text\": \"public function tasks_put($id = NULL) {\\n\\t\\t$id = $id == NULL ? $this->put('workitem_id') : $id;\\n\\t\\tself::validate_access($id);\\n\\t\\t$task = deserialize($this->get_data(), WorkitemTask::find($this->put('id')));\\n\\t\\t$task->done_date = now();\\n\\t\\t$task->save();\\n\\t\\treturn $task;\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9079d9e850cac0a90ab806d068823e93\",\n \"score\": \"0.43333855\",\n \"text\": \"public function store($org_id = null, $cal_id = null)\\n\\t{\\n\\t\\tif(!Input::has('schedule'))\\n\\t\\t{\\n\\t\\t\\treturn new JSend('error', (array)Input::all(), 'Tidak ada data schedule.');\\n\\t\\t}\\n\\n\\t\\t$errors\\t\\t\\t\\t\\t\\t= new MessageBag();\\n\\n\\t\\tDB::beginTransaction();\\n\\n\\t\\t//1. store schedule of calendar to queue\\n\\t\\t$schedule\\t\\t\\t\\t\\t\\t= Input::get('schedule');\\n\\n\\t\\tif(is_null($schedule['id']))\\n\\t\\t{\\n\\t\\t\\t$is_new\\t\\t\\t\\t\\t= true;\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t$is_new\\t\\t\\t\\t\\t= false;\\n\\t\\t}\\n\\n\\t\\t$schedule_rules\\t\\t\\t\\t=\\t[\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'calendar_id'\\t\\t\\t\\t\\t=> 'required|exists:tmp_calendars,id',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'name'\\t\\t\\t\\t\\t\\t\\t=> 'required|max:255',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'status'\\t\\t\\t\\t\\t\\t=> 'required|in:DN,CB,UL,HB,L',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'on'\\t\\t\\t\\t\\t\\t\\t=> 'required|date_format:\\\"Y-m-d H:i:s\\\"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'start'\\t\\t\\t\\t\\t\\t\\t=> 'required|date_format:\\\"H:i:s\\\"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t'end'\\t\\t\\t\\t\\t\\t\\t=> 'required|date_format:\\\"H:i:s\\\"',\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t];\\n\\n\\t\\t//1a. Validate Basic schedule Parameter\\n\\t\\t$parameter \\t\\t\\t\\t\\t= $schedule;\\n\\t\\tunset($parameter['calendar']);\\n\\n\\t\\t$validator\\t\\t\\t\\t\\t= Validator::make($parameter, $schedule_rules);\\n\\n\\t\\tif (!$validator->passes())\\n\\t\\t{\\n\\t\\t\\t$errors->add('Schedule', $validator->errors());\\n\\t\\t}\\n\\t\\telse\\n\\t\\t{\\n\\t\\t\\t$total \\t\\t\\t\\t\\t\\t= \\\\App\\\\Models\\\\Work::calendarid($cal_id)->count();\\n\\n\\t\\t\\t$queue \\t\\t\\t\\t\\t\\t= new \\\\App\\\\Models\\\\Queue;\\n\\t\\t\\t$queue->fill([\\n\\t\\t\\t\\t\\t'process_name' \\t\\t\\t=> 'hr:schedules',\\n\\t\\t\\t\\t\\t'process_option' \\t\\t=> 'store',\\n\\t\\t\\t\\t\\t'parameter' \\t\\t\\t=> json_encode($parameter),\\n\\t\\t\\t\\t\\t'total_process' \\t\\t=> $total,\\n\\t\\t\\t\\t\\t'task_per_process' \\t\\t=> 1,\\n\\t\\t\\t\\t\\t'process_number' \\t\\t=> 0,\\n\\t\\t\\t\\t\\t'total_task' \\t\\t\\t=> $total,\\n\\t\\t\\t\\t\\t'message' \\t\\t\\t\\t=> 'Initial Commit',\\n\\t\\t\\t\\t]);\\n\\n\\t\\t\\tif(!$queue->save())\\n\\t\\t\\t{\\n\\t\\t\\t\\t$errors->add('Schedule', $queue->getError());\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t//End of validate schedule\\n\\n\\t\\t//2. store schedule of calendars to queue\\n\\t\\tif(!$errors->count() && isset($schedule['calendar']['calendars']) && is_array($schedule['calendar']['calendars']))\\n\\t\\t{\\n\\t\\t\\tforeach ($schedule['calendar']['calendars'] as $key => $value) \\n\\t\\t\\t{\\n\\t\\t\\t\\t$cals_data\\t\\t\\t\\t\\t\\t= \\\\App\\\\Models\\\\Calendar::id($value['id'])->calendarid($cal_id)->first();\\n\\n\\t\\t\\t\\tif(!$cals_data)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$errors->add('Calendar', 'Tidak ada kalender '.$value['name']);\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\tif(!$errors->count())\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$total \\t\\t\\t\\t\\t\\t= \\\\App\\\\Models\\\\Work::calendarid($value['id'])->count();\\n\\t\\t\\t\\t\\t$parameter['calendar_id']\\t= $value['id'];\\n\\n\\t\\t\\t\\t\\t$queue \\t\\t\\t\\t\\t\\t= new \\\\App\\\\Models\\\\Queue;\\n\\t\\t\\t\\t\\t$queue->fill([\\n\\t\\t\\t\\t\\t\\t\\t'process_name' \\t\\t\\t=> 'hr:schedules',\\n\\t\\t\\t\\t\\t\\t\\t'process_option' \\t\\t=> 'store',\\n\\t\\t\\t\\t\\t\\t\\t'parameter' \\t\\t\\t=> json_encode($parameter),\\n\\t\\t\\t\\t\\t\\t\\t'total_process' \\t\\t=> $total,\\n\\t\\t\\t\\t\\t\\t\\t'task_per_process' \\t\\t=> 1,\\n\\t\\t\\t\\t\\t\\t\\t'process_number' \\t\\t=> 0,\\n\\t\\t\\t\\t\\t\\t\\t'total_task' \\t\\t\\t=> $total,\\n\\t\\t\\t\\t\\t\\t\\t'message' \\t\\t\\t\\t=> 'Initial Commit',\\n\\t\\t\\t\\t\\t\\t]);\\n\\n\\t\\t\\t\\t\\tif(!$queue->save())\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$errors->add('Schedule', $queue->getError());\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t\\t//End of validate calendar schedule\\n\\n\\t\\tif($errors->count())\\n\\t\\t{\\n\\t\\t\\tDB::rollback();\\n\\n\\t\\t\\treturn new JSend('error', (array)Input::all(), $errors);\\n\\t\\t}\\n\\n\\t\\tDB::commit();\\n\\t\\t\\n\\t\\treturn new JSend('success', (array)Input::all());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"69b96e87df060bf0eb30e09d656880fd\",\n \"score\": \"0.4330022\",\n \"text\": \"public function enqueue(FoiaRequestInterface $foiaRequest);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0eff76a91c1ca6df3c124da4bb623e9a\",\n \"score\": \"0.4329129\",\n \"text\": \"public function setQueuedAt($time = REQUEST_TIME) {\\n $this->getKeyValueStore()\\n ->set($this->formatKeyName('queued'), (int) $time);\\n\\n return $this;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc57cb249be54b225477edf5770bb699\",\n \"score\": \"0.43278915\",\n \"text\": \"public function update_queue($arr = array()) {\\n\\t\\t\\tglobal $wpdb,$scrape_core,$_params;\\n\\t\\t\\t$where = array(\\n\\t\\t\\t\\t'target_id' => $_params['target_id']\\n\\t\\t\\t);\\n\\t\\t\\t$arr['last_checked'] = current_time('mysql');\\n\\t\\t\\t$table_name = $wpdb->prefix . \\\"scrape_n_post_queue\\\";\\n\\t\\t\\t$rows_affected = $wpdb->update($table_name, $arr, $where);\\n\\t\\t\\t//needs message\\n\\t\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b5827735e1071b64a72fb2a20be9182\",\n \"score\": \"0.4327712\",\n \"text\": \"public function testSerializeCreatingAPIKeyRequest() {\\n\\n // Set an Creating API key request mock.\\n $arg = new CreatingAPIKeyRequest();\\n\\n $obj = new RequestSerializer();\\n\\n $res = [];\\n $this->assertEquals($res, $obj->serialize($arg));\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":786,"cells":{"query_id":{"kind":"string","value":"313ff7705d4e87750b2cd162f3a73639"},"query":{"kind":"string","value":"Show the form for editing the specified resource."},"positive_passages":{"kind":"list like","value":[{"docid":"a433e4db90e8b2bc1724f47789dc0d06","score":"0.0","text":"public function edit($id)\n {\n //\n }","title":""}],"string":"[\n {\n \"docid\": \"a433e4db90e8b2bc1724f47789dc0d06\",\n \"score\": \"0.0\",\n \"text\": \"public function edit($id)\\n {\\n //\\n }\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"a6688716096de732ac676d2606652404","score":"0.7856724","text":"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', ['resource' => $resource]);\n }","title":""},{"docid":"5781a2d120285a71e7e85b5a66be6d25","score":"0.7830503","text":"public function edit(Resource $resource)\n {\n return view('resources.edit')->with('resource', $resource);\n }","title":""},{"docid":"aa97beee62e2049b01f82b2c70781d18","score":"0.7470551","text":"public function edit(Resource $resource)\n {\n if (session()->has('index-referer-url')) {\n session()->keep('index-referer-url');\n }\n\n return view('resources.edit')->with('resource', $resource);\n }","title":""},{"docid":"06fbfb28b57b10ad3e552f17914cc366","score":"0.73990756","text":"public function edit(Request $request, $resource)\n { \n return view($this->editView)\n ->withForm($this->form()->setModel($resource))\n ->withName($this->name())\n ->withTitle($this->title())\n ->withActions($this->getActions())\n ->withRouteParameters(\n (array) $this->routeParameters('create', $resource)\n );\n }","title":""},{"docid":"04c9b7d4ef866f36e89d6540166ef493","score":"0.7218755","text":"public function edit($resource, $action)\n {\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n abort(404, 'There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n }\n\n return view('resource-edit', [\n 'pageTitle' => 'Edit ' . ucwords($resource) . ' ' . ucwords($action) . ' Settings | TEvo Harvester',\n 'harvest' => $harvest,\n ]);\n }","title":""},{"docid":"58505837b719ae51ea23d0844976dedc","score":"0.7187763","text":"public function editButton()\n {\n $entity = $this->entity;\n $resource = $this->entity->getResourceName();\n\n return new HtmlString(\n view(\n 'layouts.dashboard.presenters.resource.edit',\n compact('entity', 'resource')\n )->render()\n );\n }","title":""},{"docid":"fd7d6fa05564d94ddfe2439eb1a68e36","score":"0.7141603","text":"public function edit($id)\r\n {\r\n $obj = $this->model->getObject($id);\r\n $formView = parent::getFormView(array($id));\r\n $formView->setPost($obj); \r\n $formView->show(); \r\n }","title":""},{"docid":"b0265d02f79c0a87495c917bcb066d03","score":"0.71170145","text":"public function showeditAction()\r\n {\r\n $this->render('edit');\r\n }","title":""},{"docid":"77b52a1680fa491d92522682bb1dab03","score":"0.71064025","text":"public function edit($id)\n {\n $resource = Resource::find($id);\n\n return view('resource.edit', compact('resource'));\n }","title":""},{"docid":"dc519a1d109593cfac33c1ecb77b69d6","score":"0.7088185","text":"public function edit($id)\n {\n $resource = Resource::findorfail($id);\n return view('resources.edit', ['resource'=>$resource]);\n }","title":""},{"docid":"0181f4ab3b675f1e32e7436eec8db0b2","score":"0.7083328","text":"public function edit()\n {\n return view('management::edit');\n }","title":""},{"docid":"839bff7657627eb0e9f3c735e392600c","score":"0.7049996","text":"public function editAction(){\n // Current PO to show.\n $currentSupplier = $this->request->getQuery('supplier', 'int');\n // Pass the general parameters to the view.\n $this->view->setVar('title', 'Supplier #' . $currentSupplier);\n $this->view->setVar('subtitle', 'dat dat dat');\n // @todo::: Define controls.\n $this->view->setVar('show_submit', TRUE);\n $this->view->setVar('submit_text', 'Submit');\n $this->view->setVar('show_cancel', TRUE);\n $this->view->setVar('cancel_text', \"Cancel\");\n $this->view->setVar('main_form_id', '');\n $this->view->setVar('exit_to', $this->url->getBaseUri() . 'po/search');\n }","title":""},{"docid":"23425e32ade1f142faf8d64875349c14","score":"0.7040024","text":"function edit( $resource ){\n\n $order = get( 'orders', $resource );\n\n return view( 'admin/order/add_order', compact( 'order' ) );\n}","title":""},{"docid":"eb85fc5f08fd4d7f2735a44b666998b1","score":"0.7028135","text":"public function renderEditForm()\n {\n // Take id from $_GET, fetch record, pass on record as $vars in array\n if (isset($_GET['book_id']) && (int)$_GET['book_id'] > 0 && !is_null(BookModel::get($_GET['book_id']))) {\n $book = BookModel::get($_GET['book_id']);\n return View::render(\n 'edit-book',\n [\n 'book' => $book\n ]\n );\n }\n }","title":""},{"docid":"6102774974292f3760289857daf62d5e","score":"0.70018315","text":"public function editAction($id)\n {\n $entity = $this->findOr404($this->repository,array('id'=>$id));\n\n\n $editForm = $this->createForm($this->form, $entity);\n\n return $this->render($this->path_template.':edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'route_prefix' => $this->route_prefix\n ));\n }","title":""},{"docid":"9fa88f8a8c6146d7915873c2976a0c19","score":"0.69807905","text":"public function edit(Resform $resform)\n {\n //\n }","title":""},{"docid":"38b4c2bcc5d6f933f82442e502068ae3","score":"0.69469565","text":"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}","title":""},{"docid":"38b4c2bcc5d6f933f82442e502068ae3","score":"0.69469565","text":"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}","title":""},{"docid":"5528e9d735a1d9a4a8c37629a76211ee","score":"0.6943076","text":"public function show_editform() {\n $this->item_form->display();\n }","title":""},{"docid":"14ceb6f06e6f144fe7b54f8bae8bbe21","score":"0.69139755","text":"public function edit()\n {\n return view('superadmin::edit');\n }","title":""},{"docid":"901ccd53ce97c5a7d1966359f57043a4","score":"0.6911013","text":"public function edit()\n {\n return view('inpatient::edit');\n }","title":""},{"docid":"901ccd53ce97c5a7d1966359f57043a4","score":"0.6911013","text":"public function edit()\n {\n return view('inpatient::edit');\n }","title":""},{"docid":"f60e724dc93ad65b7bd2e7142b16eabc","score":"0.68989486","text":"public function edit($id)\n {\n return $this->showForm('update', $id);\n }","title":""},{"docid":"9197e5f6646ab8a602e1ff00b9e41fb5","score":"0.68830246","text":"public function edit() {\n\t\tglobal $tpl;\n\n\t\t$this->initForm(\"edit\");\n\t\t$this->getValues();\n\n\t\t$tpl->setContent($this->form->getHTML());\n\t}","title":""},{"docid":"be7762755fcfeef213c7106eb19a722a","score":"0.6868294","text":"public function edit()\n {\n return view('frontend::edit');\n }","title":""},{"docid":"51a9f359ceb6df3625a9742305229a9b","score":"0.686645","text":"public function action_edit()\n {\n if (!empty($this->m_partial)) {\n $this->partial($this->m_partial);\n\n return;\n }\n\n $node = $this->m_node;\n\n $record = $this->getRecord();\n\n if ($record === null) {\n $location = $node->feedbackUrl('edit', self::ACTION_FAILED, $record);\n $node->redirect($location);\n }\n\n // allowed to edit record?\n if (!$this->allowed($record)) {\n $this->renderAccessDeniedPage();\n\n return;\n }\n\n $record = $this->mergeWithPostvars($record);\n\n $this->notify('edit', $record);\n $res = $this->invoke('editPage', $record);\n\n $page = $this->getPage();\n $page->addContent($node->renderActionPage('edit', $res));\n }","title":""},{"docid":"cb9340a304c83c3a9a371e60993460e3","score":"0.68608934","text":"public function edit()\n {\n $data['individual'] = $this->getIndividualSeminar();\n $this->load->view('Dashboard/header');\n $this->load->view('Seminar/edit', $data);\n $this->load->view('Dashboard/footer');\n }","title":""},{"docid":"f4908ef32054735fdce9f1476c5fed8c","score":"0.6860868","text":"public function edit()\n {\n return view('hethong::edit');\n }","title":""},{"docid":"8848eef52013ec9c31efa5d9e1d9581d","score":"0.6850079","text":"public function edit()\n {\n //\n return view('editProfessor');\n }","title":""},{"docid":"326743aa2b21211a1afd860fcd859372","score":"0.681466","text":"public function edit($id)\n\t{ \n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, ['user' => $this->resource]);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, array('user' => $this->resource))->render(); \n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t);\n\t}","title":""},{"docid":"a66e6ee3bd0d4fa614c8f657ecc1c30e","score":"0.68075293","text":"public function edit(Form $form)\n {\n //\n }","title":""},{"docid":"926dd112a4ef916660ebcc2f8108ad0c","score":"0.6805087","text":"public function edit($id)\n {\n $page = Page::find($id);\n $pageTitle = trans(config('dashboard.trans_file').'edit');\n $submitFormRoute = route('pages.update', $id);\n $submitFormMethod = 'put';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('page', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }","title":""},{"docid":"b2548057b424e6a5cacb6db19ee658ae","score":"0.68023866","text":"public function edit()\n {\n return view('api::edit');\n }","title":""},{"docid":"e3fad094d4252fd72e2502d403dfc367","score":"0.6795616","text":"public function edit()\n {\n return view('product::edit');\n }","title":""},{"docid":"56ed8b2cfb426d64dc8a271149d4a6c5","score":"0.6794153","text":"public function edit($id)\n\t{\n\t\t$signatures = Signature::get();\n\t\t$teachers = Teacher::get();\n\t\t$resource = Resource::findOrFail($id);\n\n\t\treturn view('resource.edit', compact('resource', 'signatures', 'teachers'));\n\n\t}","title":""},{"docid":"231882e93a58215aa3b11a974a66292d","score":"0.67915684","text":"public function edit()\n {\n return view('admin::edit');\n }","title":""},{"docid":"231882e93a58215aa3b11a974a66292d","score":"0.67915684","text":"public function edit()\n {\n return view('admin::edit');\n }","title":""},{"docid":"9ef91ee9f6a8dcb15ea27096aa56e4fb","score":"0.6782868","text":"public function edit($id)\n\t{\n\t\t//\n\t\t$product = Product::find($id);\n\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('admin.product.edit')\n\t\t\t->with('product', $product);\n\t}","title":""},{"docid":"2761e36b6aa51ebff28c1747bd1a9924","score":"0.6779798","text":"public function edit()\n {\n return view('datamemory::edit');\n }","title":""},{"docid":"deba4f5487a02e79ef9e2e2bfde73c6a","score":"0.6779549","text":"public function edit($id)\n {\n $this->isEditing = true;\n $this->patient = Patient::find($id);\n $this->user = $this->patient->user;\n return $this->cView(\"form\");\n }","title":""},{"docid":"95eb405d84481bce79c5b504d5687466","score":"0.67747486","text":"public function edit()\n {\n return view('tendermaster::edit');\n }","title":""},{"docid":"76e1df6d2666fcc9e5012bf26b397bee","score":"0.67739016","text":"public function formEditar($id) {\n $product = Product::find($id);\n\n /*### SE NÃO LOCALIZAR, ABORTA ###*/\n if(!$product) {\n\n abort(404);\n }\n /*### SE NÃO LOCALIZAR, ABORTA ###*/\n\n //ABRE A VIEW DE EDIÇÃO\n return view('products.edit', compact('product'));\n\n }","title":""},{"docid":"ec74296c4873a04773215f9df3ec56e8","score":"0.6762886","text":"public function edit()\n {\n return view('product::edit');\n }","title":""},{"docid":"ac23622c3fc5df8461dba597a28f8bcb","score":"0.67608607","text":"public function edit()\n {\n $product = Product::findBy('id', $_GET['id']);\n\n return view('admin/product/edit', compact('product'));\n }","title":""},{"docid":"1c2a145885cc53fe0f501d19a56a5bc0","score":"0.6755481","text":"public function edit($id) {\n\t\t$this->authorize('update', $this->repo->model());\n\t\tif ($this->request->ajax()) {\n\t\t\t$model = $this->repo->findOrFail($id);\n\t\t\treturn view($this->view . 'form', compact('model'));\n\t\t} else {\n\t\t\treturn abort(404);\n\t\t}\n\t}","title":""},{"docid":"057b48bb7cf2107466c426e2c9e428fe","score":"0.6746726","text":"public function edit(form $form)\n {\n //\n }","title":""},{"docid":"af1ae147b46a5dbc0c8b9ec58527eeb0","score":"0.67450166","text":"public function edit()\n {\n return view('catalog::edit');\n }","title":""},{"docid":"f45c32e1819279bea701d7e847e50be1","score":"0.6737096","text":"public function edit($id) //Mostra o formulário de Editar \n {\n return \"Formulário para Editar Cliente com ID \" .$id;\n }","title":""},{"docid":"13b220d1119b9c3b276a10c0422ad486","score":"0.67340374","text":"public function editAction($id);","title":""},{"docid":"58c30f85a70f88f1e9b28e838f77705f","score":"0.67296666","text":"public function edit($id){\n $product = Product::find($id);\n \n //load form view\n return view('product.edit', ['product' => $product]);\n }","title":""},{"docid":"58c30f85a70f88f1e9b28e838f77705f","score":"0.67296666","text":"public function edit($id){\n $product = Product::find($id);\n \n //load form view\n return view('product.edit', ['product' => $product]);\n }","title":""},{"docid":"0db52b14d5721483125f9c0f73da2a71","score":"0.6725265","text":"public function editAction()\n {\n $personCatalog = PersonCatalog::getInstance();\n $idPerson = $this->getRequest()->getParam('idPerson');\n $person = $personCatalog->getById($idPerson);\n $post = array(\n 'id_person' => $person->getIdPerson(),\n 'name' => $person->getName(),\n 'middle_name' => $person->getMiddleName(),\n 'last_name' => $person->getLastName(),\n 'birthdate' => $person->getBirthdate(),\n 'ssn' => $person->getSsn(),\n 'genre' => $person->getGenre(),\n 'marital_status' => $person->getMaritalStatus(),\n 'curp' => $person->getCurp(),\n 'nationality' => $person->getNationality(),\n 'id_fiscal_entity' => $person->getIdFiscalEntity(),\n );\n $this->view->post = $post;\n $this->setTitle('Edit Person');\n }","title":""},{"docid":"36e81b336316946d6eebd6bc3678ef52","score":"0.672352","text":"public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }","title":""},{"docid":"b75fe06b66440ec2bc0b1975839b9db3","score":"0.6722548","text":"public function edit($id)\n {\n $item = $this->model::findOrFail($id);\n\n SEO::setTitle('Edit ' . title_case($this->singular) . ': ' . $item->label);\n SEO::setDescription('Edit ' . title_case($this->singular) . ': ' . $item->label);\n\n $fields = $this->getFieldsFromRules(new $this->formRequest);\n\n $viewPrefix = request()->is('admin*') ? 'admin.' : '';\n\n return view(\n $viewPrefix.'crud.edit',\n [\n 'item' => $item,\n 'model' => $this->model,\n 'slug' => $this->slug,\n 'fields' => $fields,\n ]\n );\n }","title":""},{"docid":"3edbba277d97d5405287bfc7a96bbf56","score":"0.67170596","text":"public function edit($id)\n {\n $form = Form::find($id);\n return view('forms.edit', compact('form', 'id'));\n }","title":""},{"docid":"b79b901144374465ebd3d31441a9b2e5","score":"0.67081386","text":"public function edit(Entity $entity)\n {\n return $this->form($entity);\n }","title":""},{"docid":"51f89c5d5d1bd15cea7d45cabafe8e6f","score":"0.6707989","text":"public function edit()\n\t{\n\t\t$this->view->assignmentOptions = $this->getAssignmentOptions();\n\t\t$this->view->roles = $this->getRoles();\n\t\t$this->view->gender = $this->getGender();\n\t\t$this->view->areas = PresenterFactory::getInstance('Reports')->getArea(true);\n\t\treturn $this->view('edit');\n\t}","title":""},{"docid":"b06d58ea5570ba05f85ba7ffb36e67e7","score":"0.669607","text":"public function edit($id)\n {\n return $this->view('edit');\n }","title":""},{"docid":"6431a5588c915992cb19d3e7612bc296","score":"0.6695045","text":"public function edit($id)\n {\n $form = Forms::findOrFail($id);\n\n return view('formbuilder::admin.forms.edit', compact('form'));\n }","title":""},{"docid":"2ec8c313c533a6f5842b628922d6a1a0","score":"0.66918045","text":"public function edit()\n {\n $company = Company::first();\n return view(config('laravel-company-module.views.company.edit'), compact('company'));\n }","title":""},{"docid":"f14d9738fc54a55b925b94b3252a0061","score":"0.66900253","text":"public function edit($id)\n {\n $this->crud->hasAccessOrFail('update');\n\n $this->data['entry'] = $this->crud->getEntry($id);\n\n\n $this->data['crud'] = $this->crud;\n $this->data['saveAction'] = $this->getSaveAction();\n $this->data['fields'] = $this->crud->getUpdateFields($id);\n $this->data['title'] = trans('base::crud.edit').' '.$this->crud->entity_name;\n $this->data['id'] = $id;\n\n return view($this->crud->getEditView(), $this->data);\n }","title":""},{"docid":"b459e42451a6fb5dac4372c9f2cf88a1","score":"0.6682187","text":"public function edit (Request $request)\n {\n $model = $this->resource->model();\n $this->authorize('update', $model);\n\n $form = $this->getForm($request, $model);\n\n return $this->render('edit', compact('model', 'form'), $request);\n }","title":""},{"docid":"1deb6920d550e3550137d6f49a6d7aeb","score":"0.66820544","text":"public function edit($id)\n {\n $model = Suplier::find($id);\n return view('backend.suplier.form',['model'=>$model,'update'=>1]);\n }","title":""},{"docid":"8811651512fbad624a5342b1c61e6ef3","score":"0.66780823","text":"public function edit($id)\n {\n $model = Supplier::findOrFail($id);\n return view('admin.supplier.form', compact('model'));\n }","title":""},{"docid":"d58aeddc51a32d8c85adcbf8fc206a39","score":"0.66672367","text":"public function editAction($id)\n {\n $this->initializeScaffolding();\n\n $this->beforeRead();\n $this->view->record = $this->scaffolding->doRead($id);\n $this->afterRead();\n\n $this->beforeEdit();\n $this->view->form = $this->scaffolding->getForm($this->view->record);\n $this->afterEdit();\n }","title":""},{"docid":"98c3057a696eb14943e7e5fea5851c0b","score":"0.6666091","text":"public function edit($id)\n {\n return $this->showForm($id);\n }","title":""},{"docid":"58fa8a98152b59c2e07c439335e492b4","score":"0.6665379","text":"public function edit($id)\n {\n return view('web::edit');\n }","title":""},{"docid":"6f15f8f92121a2bdd5d391d8e067cce6","score":"0.66645616","text":"public function edit($id)\n {\n \t$emp = Employee::find($id);\n \t \n \t// show the view and pass the nerd to it\n \treturn View::make('adminlte::employee.edit')\n \t->with('employee', $emp);\n }","title":""},{"docid":"52e52cdfc2de427528e31ab0f3380503","score":"0.6663675","text":"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('NumaDOADMSBundle:ListingForm')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ListingForm entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('NumaDOADMSBundle:ListingForm:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }","title":""},{"docid":"ade3e60125d3b02b74b68797e30c99f4","score":"0.6653248","text":"public function edit($id)\n {\n $this->data['product'] = Product::findOrFail($id);\n $this->data['category'] = Category::arrForCategory();\n $this->data['mode'] = 'edit';\n\n return view('products.form', $this->data);\n }","title":""},{"docid":"2144bb95c09393c12341bf4eb0e5d9e7","score":"0.66517454","text":"public function showEditForm($id){\n $post = $this->repo->byId($id);\n return view('create', [\n 'mode' => 'edit',\n 'published_at' => $post->published_at,\n 'is_published' =>$post->is_published,\n 'title' => $post->title,\n 'url' => $post->url,\n 'contents' => $post->contents,\n 'id' => $post->id\n ]);\n }","title":""},{"docid":"23fa969743853cefd4974f048eebf67a","score":"0.6641395","text":"public function edit()\r\n {\r\n return view('user::edit');\r\n }","title":""},{"docid":"6be4074acb7130903012aff787adc368","score":"0.663426","text":"public function edit($id)\n {\n $model = User::find($id);\n return view('master.admin.form', ['model'=>$model, 'update'=>true]);\n }","title":""},{"docid":"6f1a413f5dd5aee349bb9b9db12fa70b","score":"0.6629308","text":"public function edit($id) { }","title":""},{"docid":"5af850265a4a33e59e46a01b80ede2a3","score":"0.66275465","text":"public function edit()\n {\n return view('user::edit');\n }","title":""},{"docid":"5af850265a4a33e59e46a01b80ede2a3","score":"0.66275465","text":"public function edit()\n {\n return view('user::edit');\n }","title":""},{"docid":"5af850265a4a33e59e46a01b80ede2a3","score":"0.66275465","text":"public function edit()\n {\n return view('user::edit');\n }","title":""},{"docid":"5af850265a4a33e59e46a01b80ede2a3","score":"0.66275465","text":"public function edit()\n {\n return view('user::edit');\n }","title":""},{"docid":"5af850265a4a33e59e46a01b80ede2a3","score":"0.66275465","text":"public function edit()\n {\n return view('user::edit');\n }","title":""},{"docid":"7ea6d483a420134aa1b6a3947a002693","score":"0.6627498","text":"public function edit($id)\n {\n //\n return \"Se muestra formulario para editar Fabricante con id: $id\";\n }","title":""},{"docid":"f39b9490d89d766f2a0fd47a32dc248b","score":"0.66240406","text":"public function edit($id)\n {\n return view(\"user_form\");\n }","title":""},{"docid":"0fa42022ec77f2736c200c4b84f79316","score":"0.6615427","text":"public function edit($id)\n {\n $data = Merek::find($id);\n $data->page_title = 'Merek Edit';\n $data->h1 = 'Edit';\n $data->form_action = route('admin.merek.update');\n $data->page_type = 'edit';\n $data->button = 'Simpan';\n\n return view('backend.merek.form', [\n 'data' => $data,\n ]);\n }","title":""},{"docid":"860b8d42962dd4f1751317b806b97d66","score":"0.6614804","text":"public function edit()\n {\n return view('reception::edit');\n }","title":""},{"docid":"c8e6574baa7c09ee6dbb6a57608c40ce","score":"0.6614437","text":"public function editResourceAction($id, Request $request)\n {\n $resource = $this->getDoctrine()->getManager()\n ->getRepository('WBQbankBundle:Resources')\n ->find($id);\n\n if (!$resource) {\n throw $this->createNotFoundException(\n 'No resource found'\n );\n }\n\n // form\n $form = $this->createForm(new ResourcesType(), $resource);\n\n $form->handleRequest($request);\n\n if ($form->isSubmitted()) {\n\n $dir = $this->container->getParameter('resources-upload-path');\n $file = $resource->getFilename();\n \n //to keep the existing uploaded file location\n $filename_=$request->get('filename_');\n \n if (is_object($file)) {\n $resource->setFilesize($file->getSize());\n $filename = time() . $file->getClientOriginalName();\n $file->move($dir, $filename);\n $location = $dir . $filename;\n $resource->setFilename($location);\n }\n else if (trim($filename_)!=\"\"){\n $resource->setFilename($filename_);\n }\n\n $em = $this->getDoctrine()->getManager();\n\n $em->flush();\n\n return $this->redirect($this->generateUrl('resources'));\n }\n\n return $this->render('WBQbankBundle:Resources:editResource.html.twig', array(\n 'form' => $form->createView(),\n 'resourceId' => $id,\n 'active_button' => ActiveButtons::AdminResources\n ));\n }","title":""},{"docid":"a365c8fa77e729113252274bcd88baf6","score":"0.6607685","text":"public function edit($id)\n {\n $entity = Entity::findOrFail($id);\n\n if(Auth::user()->id != $entity->user_id){\n return view('error')->withErrors(['You don\\'t have permissions to access this resource.']);\n }\n\n return view('entities.edit', compact('entity'))->with('create', 0);\n }","title":""},{"docid":"38e6dad01dfe51fa6f95805601cc8137","score":"0.66073585","text":"public function edit()\n\t{\n\t\tCRequest::setVar('view', $this->view_item);\n\t\tparent::display();\n\t}","title":""},{"docid":"584d7649153a0da9f2d2848a6fd168fd","score":"0.6605469","text":"public function editAction()\n {\n $varName = $this->view->singularize($this->_helper->db->getDefaultModelName());\n\n $record = $this->_helper->db->findById();\n\n if ($this->_autoCsrfProtection) {\n $csrf = new Omeka_Form_SessionCsrf;\n $this->view->csrf = $csrf;\n }\n\n if ($this->getRequest()->isPost()) {\n if ($this->_autoCsrfProtection && !$csrf->isValid($_POST)) {\n $this->_helper->_flashMessenger(__('There was an error on the form. Please try again.'), 'error');\n $this->view->$varName = $record;\n return;\n }\n $record->setPostData($_POST);\n if ($record->save(false)) {\n $successMessage = $this->_getEditSuccessMessage($record);\n if ($successMessage != '') {\n $this->_helper->flashMessenger($successMessage, 'success');\n }\n $this->_redirectAfterEdit($record);\n } else {\n $this->_helper->flashMessenger($record->getErrors());\n }\n }\n\n $this->view->$varName = $record;\n }","title":""},{"docid":"b3434b39a7041adf18b694988ccedbea","score":"0.66050863","text":"public function edit($id)\n\t{\n return View::make('cardapios.edit');\n\t}","title":""},{"docid":"bb3d25c21124beddc757800cf8683cb4","score":"0.66033626","text":"public function edit(){\n\t\t//$this->common_data();\n\t\t$this->location = \"plataformas\";\n\t\t$this->plataforma = new plataforma($this->get('id'));\n\t\t$this->plataforma->read(\"id,nombre,empresa\");\n\t\t$this->include_theme(\"index\",\"edit\");\n\t}","title":""},{"docid":"672a8990802aca7ec3bf156a475b97ab","score":"0.6601295","text":"public function edit($id)\n {\n // get the nerd\n $employee = employee::find($id);\n\n // show the edit form and pass the nerd\n return View::make('employees.edit')\n ->with('employee', $employee);\n }","title":""},{"docid":"033e1e454bf02fa56620accb31e8cb8d","score":"0.65993685","text":"public function edit(Record $record)\n {\n return view('records.update', compact('record'));\n }","title":""},{"docid":"2b5fb043a3c87778cf2cebbc780df3b7","score":"0.65991616","text":"public function edit()\n\t{\n\t\tparent::edit();\n\t}","title":""},{"docid":"2f50bec1a38d27b16fac719637b651c4","score":"0.659718","text":"public function editViewAction($id)\n {\n $this->theme->setTitle('Redigera formulär');\n $this->theme->addStylesheet('css/form.css');\n \n $this->db->select()\n ->from('survey')\n ->where(\"id = $id\")\n ->execute();\n \n $survey = $this->db->fetchOne();\n \n $this->views->add('survey/edit', [\n 'title' => \"Redigera formulär\",\n 'survey' => $survey,\n 'id' => $id,\n ]);\n }","title":""},{"docid":"db2529a46c0e35eb3c68886810761fc8","score":"0.6592692","text":"public function edit($id)\n {\n return view('presensi::edit');\n }","title":""},{"docid":"148f2b795f1a0e6fbe96ee1b1579717f","score":"0.6589583","text":"public function edit()\n {\n // return view('api::edit');\n }","title":""},{"docid":"3ec00c8d29482613595774462fb85505","score":"0.6587105","text":"public function edit($id) {\n $item = Employee::find($id);\n return view('employees/update')->with(['item' => $item]);\n }","title":""},{"docid":"9e260dddc50926c0f371295c6cdff712","score":"0.6586051","text":"public function edit($id)\n {\n //\n $record = $this->record->findOrFail($id);\n\n return view('record.edit', ['record'=>$record]);\n }","title":""},{"docid":"cc0bb0b7f0592d72b552b09d7d5ca4ad","score":"0.6579556","text":"public function edit(){\n $id = $_GET['id'];\n $task = $this->taskModel->find($id);\n\n view('admin/edit_task', compact('task'));\n }","title":""},{"docid":"23e944e596556730ad9998873ce62f6e","score":"0.6575095","text":"public function edit($id)\n {\n $this->authChecker();\n $item = $this->provider::findOrFail($id);\n $fields = $this->getFields();\n $fields[0]['value'] = $item->name;\n $fields[1]['value'] = $item->size;\n $fields[2]['value'] = $item->restoarea_id;\n\n $parameter = [];\n $parameter[$this->parameter_name] = $id;\n\n return view('general.form', ['setup' => [\n 'inrow'=>true,\n 'title'=>__('crud.edit_item_name', ['item'=>__($this->title), 'name'=>$item->name]),\n 'action_link'=>route($this->webroute_path.'index'),\n 'action_name'=>__('crud.back'),\n 'iscontent'=>true,\n 'isupdate'=>true,\n 'action'=>route($this->webroute_path.'update', $parameter),\n ],\n 'fields'=>$fields, ]);\n }","title":""},{"docid":"b34cb7db16e9ac26b8ba6821e387fff9","score":"0.6572864","text":"public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit User';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}","title":""},{"docid":"4bf2fed80355d3a19316f7291f47ee44","score":"0.6567018","text":"public function edit($id) \n // : StudentResource\n {\n $student = Student::find($id);\n return view('welcome', ['student' => $student]);\n\n // return new StudentResource($student);\n }","title":""}],"string":"[\n {\n \"docid\": \"a6688716096de732ac676d2606652404\",\n \"score\": \"0.7856724\",\n \"text\": \"public function edit(Resource $resource)\\n {\\n return view('admin.resources.edit', ['resource' => $resource]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5781a2d120285a71e7e85b5a66be6d25\",\n \"score\": \"0.7830503\",\n \"text\": \"public function edit(Resource $resource)\\n {\\n return view('resources.edit')->with('resource', $resource);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"aa97beee62e2049b01f82b2c70781d18\",\n \"score\": \"0.7470551\",\n \"text\": \"public function edit(Resource $resource)\\n {\\n if (session()->has('index-referer-url')) {\\n session()->keep('index-referer-url');\\n }\\n\\n return view('resources.edit')->with('resource', $resource);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"06fbfb28b57b10ad3e552f17914cc366\",\n \"score\": \"0.73990756\",\n \"text\": \"public function edit(Request $request, $resource)\\n { \\n return view($this->editView)\\n ->withForm($this->form()->setModel($resource))\\n ->withName($this->name())\\n ->withTitle($this->title())\\n ->withActions($this->getActions())\\n ->withRouteParameters(\\n (array) $this->routeParameters('create', $resource)\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"04c9b7d4ef866f36e89d6540166ef493\",\n \"score\": \"0.7218755\",\n \"text\": \"public function edit($resource, $action)\\n {\\n try {\\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\\n } catch (\\\\Exception $e) {\\n abort(404, 'There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\\n }\\n\\n return view('resource-edit', [\\n 'pageTitle' => 'Edit ' . ucwords($resource) . ' ' . ucwords($action) . ' Settings | TEvo Harvester',\\n 'harvest' => $harvest,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58505837b719ae51ea23d0844976dedc\",\n \"score\": \"0.7187763\",\n \"text\": \"public function editButton()\\n {\\n $entity = $this->entity;\\n $resource = $this->entity->getResourceName();\\n\\n return new HtmlString(\\n view(\\n 'layouts.dashboard.presenters.resource.edit',\\n compact('entity', 'resource')\\n )->render()\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"fd7d6fa05564d94ddfe2439eb1a68e36\",\n \"score\": \"0.7141603\",\n \"text\": \"public function edit($id)\\r\\n {\\r\\n $obj = $this->model->getObject($id);\\r\\n $formView = parent::getFormView(array($id));\\r\\n $formView->setPost($obj); \\r\\n $formView->show(); \\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b0265d02f79c0a87495c917bcb066d03\",\n \"score\": \"0.71170145\",\n \"text\": \"public function showeditAction()\\r\\n {\\r\\n $this->render('edit');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"77b52a1680fa491d92522682bb1dab03\",\n \"score\": \"0.71064025\",\n \"text\": \"public function edit($id)\\n {\\n $resource = Resource::find($id);\\n\\n return view('resource.edit', compact('resource'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"dc519a1d109593cfac33c1ecb77b69d6\",\n \"score\": \"0.7088185\",\n \"text\": \"public function edit($id)\\n {\\n $resource = Resource::findorfail($id);\\n return view('resources.edit', ['resource'=>$resource]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0181f4ab3b675f1e32e7436eec8db0b2\",\n \"score\": \"0.7083328\",\n \"text\": \"public function edit()\\n {\\n return view('management::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"839bff7657627eb0e9f3c735e392600c\",\n \"score\": \"0.7049996\",\n \"text\": \"public function editAction(){\\n // Current PO to show.\\n $currentSupplier = $this->request->getQuery('supplier', 'int');\\n // Pass the general parameters to the view.\\n $this->view->setVar('title', 'Supplier #' . $currentSupplier);\\n $this->view->setVar('subtitle', 'dat dat dat');\\n // @todo::: Define controls.\\n $this->view->setVar('show_submit', TRUE);\\n $this->view->setVar('submit_text', 'Submit');\\n $this->view->setVar('show_cancel', TRUE);\\n $this->view->setVar('cancel_text', \\\"Cancel\\\");\\n $this->view->setVar('main_form_id', '');\\n $this->view->setVar('exit_to', $this->url->getBaseUri() . 'po/search');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23425e32ade1f142faf8d64875349c14\",\n \"score\": \"0.7040024\",\n \"text\": \"function edit( $resource ){\\n\\n $order = get( 'orders', $resource );\\n\\n return view( 'admin/order/add_order', compact( 'order' ) );\\n}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"eb85fc5f08fd4d7f2735a44b666998b1\",\n \"score\": \"0.7028135\",\n \"text\": \"public function renderEditForm()\\n {\\n // Take id from $_GET, fetch record, pass on record as $vars in array\\n if (isset($_GET['book_id']) && (int)$_GET['book_id'] > 0 && !is_null(BookModel::get($_GET['book_id']))) {\\n $book = BookModel::get($_GET['book_id']);\\n return View::render(\\n 'edit-book',\\n [\\n 'book' => $book\\n ]\\n );\\n }\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6102774974292f3760289857daf62d5e\",\n \"score\": \"0.70018315\",\n \"text\": \"public function editAction($id)\\n {\\n $entity = $this->findOr404($this->repository,array('id'=>$id));\\n\\n\\n $editForm = $this->createForm($this->form, $entity);\\n\\n return $this->render($this->path_template.':edit.html.twig', array(\\n 'entity' => $entity,\\n 'edit_form' => $editForm->createView(),\\n 'route_prefix' => $this->route_prefix\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9fa88f8a8c6146d7915873c2976a0c19\",\n \"score\": \"0.69807905\",\n \"text\": \"public function edit(Resform $resform)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38b4c2bcc5d6f933f82442e502068ae3\",\n \"score\": \"0.69469565\",\n \"text\": \"public function edit($id)\\n\\t{\\n\\t\\treturn $this->showForm('update', $id);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38b4c2bcc5d6f933f82442e502068ae3\",\n \"score\": \"0.69469565\",\n \"text\": \"public function edit($id)\\n\\t{\\n\\t\\treturn $this->showForm('update', $id);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5528e9d735a1d9a4a8c37629a76211ee\",\n \"score\": \"0.6943076\",\n \"text\": \"public function show_editform() {\\n $this->item_form->display();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"14ceb6f06e6f144fe7b54f8bae8bbe21\",\n \"score\": \"0.69139755\",\n \"text\": \"public function edit()\\n {\\n return view('superadmin::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"901ccd53ce97c5a7d1966359f57043a4\",\n \"score\": \"0.6911013\",\n \"text\": \"public function edit()\\n {\\n return view('inpatient::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"901ccd53ce97c5a7d1966359f57043a4\",\n \"score\": \"0.6911013\",\n \"text\": \"public function edit()\\n {\\n return view('inpatient::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f60e724dc93ad65b7bd2e7142b16eabc\",\n \"score\": \"0.68989486\",\n \"text\": \"public function edit($id)\\n {\\n return $this->showForm('update', $id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9197e5f6646ab8a602e1ff00b9e41fb5\",\n \"score\": \"0.68830246\",\n \"text\": \"public function edit() {\\n\\t\\tglobal $tpl;\\n\\n\\t\\t$this->initForm(\\\"edit\\\");\\n\\t\\t$this->getValues();\\n\\n\\t\\t$tpl->setContent($this->form->getHTML());\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"be7762755fcfeef213c7106eb19a722a\",\n \"score\": \"0.6868294\",\n \"text\": \"public function edit()\\n {\\n return view('frontend::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51a9f359ceb6df3625a9742305229a9b\",\n \"score\": \"0.686645\",\n \"text\": \"public function action_edit()\\n {\\n if (!empty($this->m_partial)) {\\n $this->partial($this->m_partial);\\n\\n return;\\n }\\n\\n $node = $this->m_node;\\n\\n $record = $this->getRecord();\\n\\n if ($record === null) {\\n $location = $node->feedbackUrl('edit', self::ACTION_FAILED, $record);\\n $node->redirect($location);\\n }\\n\\n // allowed to edit record?\\n if (!$this->allowed($record)) {\\n $this->renderAccessDeniedPage();\\n\\n return;\\n }\\n\\n $record = $this->mergeWithPostvars($record);\\n\\n $this->notify('edit', $record);\\n $res = $this->invoke('editPage', $record);\\n\\n $page = $this->getPage();\\n $page->addContent($node->renderActionPage('edit', $res));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cb9340a304c83c3a9a371e60993460e3\",\n \"score\": \"0.68608934\",\n \"text\": \"public function edit()\\n {\\n $data['individual'] = $this->getIndividualSeminar();\\n $this->load->view('Dashboard/header');\\n $this->load->view('Seminar/edit', $data);\\n $this->load->view('Dashboard/footer');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f4908ef32054735fdce9f1476c5fed8c\",\n \"score\": \"0.6860868\",\n \"text\": \"public function edit()\\n {\\n return view('hethong::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8848eef52013ec9c31efa5d9e1d9581d\",\n \"score\": \"0.6850079\",\n \"text\": \"public function edit()\\n {\\n //\\n return view('editProfessor');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"326743aa2b21211a1afd860fcd859372\",\n \"score\": \"0.681466\",\n \"text\": \"public function edit($id)\\n\\t{ \\n\\t\\treturn $this->respondTo(\\n\\t\\t\\tarray('html'=> function()\\n\\t\\t\\t\\t \\t\\t\\t{\\n\\t\\t\\t\\t \\t\\t\\t $this->layout->nest('content', $this->view, ['user' => $this->resource]);\\n\\t\\t\\t\\t \\t\\t\\t},\\n\\t\\t\\t\\t 'js' => function()\\n\\t\\t\\t\\t \\t\\t {\\n\\t\\t\\t\\t \\t\\t \\t $form = View::make($this->form, array('user' => $this->resource))->render(); \\n\\t\\t\\t\\t \\t\\t \\t return View::make('admin.shared.modal', array('body' => $form))->render();\\n\\t\\t\\t\\t \\t\\t }\\n\\t\\t\\t\\t )\\n\\t\\t);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a66e6ee3bd0d4fa614c8f657ecc1c30e\",\n \"score\": \"0.68075293\",\n \"text\": \"public function edit(Form $form)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"926dd112a4ef916660ebcc2f8108ad0c\",\n \"score\": \"0.6805087\",\n \"text\": \"public function edit($id)\\n {\\n $page = Page::find($id);\\n $pageTitle = trans(config('dashboard.trans_file').'edit');\\n $submitFormRoute = route('pages.update', $id);\\n $submitFormMethod = 'put';\\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('page', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b2548057b424e6a5cacb6db19ee658ae\",\n \"score\": \"0.68023866\",\n \"text\": \"public function edit()\\n {\\n return view('api::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"e3fad094d4252fd72e2502d403dfc367\",\n \"score\": \"0.6795616\",\n \"text\": \"public function edit()\\n {\\n return view('product::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"56ed8b2cfb426d64dc8a271149d4a6c5\",\n \"score\": \"0.6794153\",\n \"text\": \"public function edit($id)\\n\\t{\\n\\t\\t$signatures = Signature::get();\\n\\t\\t$teachers = Teacher::get();\\n\\t\\t$resource = Resource::findOrFail($id);\\n\\n\\t\\treturn view('resource.edit', compact('resource', 'signatures', 'teachers'));\\n\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"231882e93a58215aa3b11a974a66292d\",\n \"score\": \"0.67915684\",\n \"text\": \"public function edit()\\n {\\n return view('admin::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"231882e93a58215aa3b11a974a66292d\",\n \"score\": \"0.67915684\",\n \"text\": \"public function edit()\\n {\\n return view('admin::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9ef91ee9f6a8dcb15ea27096aa56e4fb\",\n \"score\": \"0.6782868\",\n \"text\": \"public function edit($id)\\n\\t{\\n\\t\\t//\\n\\t\\t$product = Product::find($id);\\n\\n\\t\\t// show the edit form and pass the nerd\\n\\t\\treturn View::make('admin.product.edit')\\n\\t\\t\\t->with('product', $product);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2761e36b6aa51ebff28c1747bd1a9924\",\n \"score\": \"0.6779798\",\n \"text\": \"public function edit()\\n {\\n return view('datamemory::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"deba4f5487a02e79ef9e2e2bfde73c6a\",\n \"score\": \"0.6779549\",\n \"text\": \"public function edit($id)\\n {\\n $this->isEditing = true;\\n $this->patient = Patient::find($id);\\n $this->user = $this->patient->user;\\n return $this->cView(\\\"form\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"95eb405d84481bce79c5b504d5687466\",\n \"score\": \"0.67747486\",\n \"text\": \"public function edit()\\n {\\n return view('tendermaster::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"76e1df6d2666fcc9e5012bf26b397bee\",\n \"score\": \"0.67739016\",\n \"text\": \"public function formEditar($id) {\\n $product = Product::find($id);\\n\\n /*### SE NÃO LOCALIZAR, ABORTA ###*/\\n if(!$product) {\\n\\n abort(404);\\n }\\n /*### SE NÃO LOCALIZAR, ABORTA ###*/\\n\\n //ABRE A VIEW DE EDIÇÃO\\n return view('products.edit', compact('product'));\\n\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ec74296c4873a04773215f9df3ec56e8\",\n \"score\": \"0.6762886\",\n \"text\": \"public function edit()\\n {\\n return view('product::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ac23622c3fc5df8461dba597a28f8bcb\",\n \"score\": \"0.67608607\",\n \"text\": \"public function edit()\\n {\\n $product = Product::findBy('id', $_GET['id']);\\n\\n return view('admin/product/edit', compact('product'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1c2a145885cc53fe0f501d19a56a5bc0\",\n \"score\": \"0.6755481\",\n \"text\": \"public function edit($id) {\\n\\t\\t$this->authorize('update', $this->repo->model());\\n\\t\\tif ($this->request->ajax()) {\\n\\t\\t\\t$model = $this->repo->findOrFail($id);\\n\\t\\t\\treturn view($this->view . 'form', compact('model'));\\n\\t\\t} else {\\n\\t\\t\\treturn abort(404);\\n\\t\\t}\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"057b48bb7cf2107466c426e2c9e428fe\",\n \"score\": \"0.6746726\",\n \"text\": \"public function edit(form $form)\\n {\\n //\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"af1ae147b46a5dbc0c8b9ec58527eeb0\",\n \"score\": \"0.67450166\",\n \"text\": \"public function edit()\\n {\\n return view('catalog::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f45c32e1819279bea701d7e847e50be1\",\n \"score\": \"0.6737096\",\n \"text\": \"public function edit($id) //Mostra o formulário de Editar \\n {\\n return \\\"Formulário para Editar Cliente com ID \\\" .$id;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"13b220d1119b9c3b276a10c0422ad486\",\n \"score\": \"0.67340374\",\n \"text\": \"public function editAction($id);\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58c30f85a70f88f1e9b28e838f77705f\",\n \"score\": \"0.67296666\",\n \"text\": \"public function edit($id){\\n $product = Product::find($id);\\n \\n //load form view\\n return view('product.edit', ['product' => $product]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58c30f85a70f88f1e9b28e838f77705f\",\n \"score\": \"0.67296666\",\n \"text\": \"public function edit($id){\\n $product = Product::find($id);\\n \\n //load form view\\n return view('product.edit', ['product' => $product]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0db52b14d5721483125f9c0f73da2a71\",\n \"score\": \"0.6725265\",\n \"text\": \"public function editAction()\\n {\\n $personCatalog = PersonCatalog::getInstance();\\n $idPerson = $this->getRequest()->getParam('idPerson');\\n $person = $personCatalog->getById($idPerson);\\n $post = array(\\n 'id_person' => $person->getIdPerson(),\\n 'name' => $person->getName(),\\n 'middle_name' => $person->getMiddleName(),\\n 'last_name' => $person->getLastName(),\\n 'birthdate' => $person->getBirthdate(),\\n 'ssn' => $person->getSsn(),\\n 'genre' => $person->getGenre(),\\n 'marital_status' => $person->getMaritalStatus(),\\n 'curp' => $person->getCurp(),\\n 'nationality' => $person->getNationality(),\\n 'id_fiscal_entity' => $person->getIdFiscalEntity(),\\n );\\n $this->view->post = $post;\\n $this->setTitle('Edit Person');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"36e81b336316946d6eebd6bc3678ef52\",\n \"score\": \"0.672352\",\n \"text\": \"public function edit($id)\\r\\n {\\r\\n return view('superadmin::edit');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b75fe06b66440ec2bc0b1975839b9db3\",\n \"score\": \"0.6722548\",\n \"text\": \"public function edit($id)\\n {\\n $item = $this->model::findOrFail($id);\\n\\n SEO::setTitle('Edit ' . title_case($this->singular) . ': ' . $item->label);\\n SEO::setDescription('Edit ' . title_case($this->singular) . ': ' . $item->label);\\n\\n $fields = $this->getFieldsFromRules(new $this->formRequest);\\n\\n $viewPrefix = request()->is('admin*') ? 'admin.' : '';\\n\\n return view(\\n $viewPrefix.'crud.edit',\\n [\\n 'item' => $item,\\n 'model' => $this->model,\\n 'slug' => $this->slug,\\n 'fields' => $fields,\\n ]\\n );\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3edbba277d97d5405287bfc7a96bbf56\",\n \"score\": \"0.67170596\",\n \"text\": \"public function edit($id)\\n {\\n $form = Form::find($id);\\n return view('forms.edit', compact('form', 'id'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b79b901144374465ebd3d31441a9b2e5\",\n \"score\": \"0.67081386\",\n \"text\": \"public function edit(Entity $entity)\\n {\\n return $this->form($entity);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"51f89c5d5d1bd15cea7d45cabafe8e6f\",\n \"score\": \"0.6707989\",\n \"text\": \"public function edit()\\n\\t{\\n\\t\\t$this->view->assignmentOptions = $this->getAssignmentOptions();\\n\\t\\t$this->view->roles = $this->getRoles();\\n\\t\\t$this->view->gender = $this->getGender();\\n\\t\\t$this->view->areas = PresenterFactory::getInstance('Reports')->getArea(true);\\n\\t\\treturn $this->view('edit');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b06d58ea5570ba05f85ba7ffb36e67e7\",\n \"score\": \"0.669607\",\n \"text\": \"public function edit($id)\\n {\\n return $this->view('edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6431a5588c915992cb19d3e7612bc296\",\n \"score\": \"0.6695045\",\n \"text\": \"public function edit($id)\\n {\\n $form = Forms::findOrFail($id);\\n\\n return view('formbuilder::admin.forms.edit', compact('form'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2ec8c313c533a6f5842b628922d6a1a0\",\n \"score\": \"0.66918045\",\n \"text\": \"public function edit()\\n {\\n $company = Company::first();\\n return view(config('laravel-company-module.views.company.edit'), compact('company'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f14d9738fc54a55b925b94b3252a0061\",\n \"score\": \"0.66900253\",\n \"text\": \"public function edit($id)\\n {\\n $this->crud->hasAccessOrFail('update');\\n\\n $this->data['entry'] = $this->crud->getEntry($id);\\n\\n\\n $this->data['crud'] = $this->crud;\\n $this->data['saveAction'] = $this->getSaveAction();\\n $this->data['fields'] = $this->crud->getUpdateFields($id);\\n $this->data['title'] = trans('base::crud.edit').' '.$this->crud->entity_name;\\n $this->data['id'] = $id;\\n\\n return view($this->crud->getEditView(), $this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b459e42451a6fb5dac4372c9f2cf88a1\",\n \"score\": \"0.6682187\",\n \"text\": \"public function edit (Request $request)\\n {\\n $model = $this->resource->model();\\n $this->authorize('update', $model);\\n\\n $form = $this->getForm($request, $model);\\n\\n return $this->render('edit', compact('model', 'form'), $request);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"1deb6920d550e3550137d6f49a6d7aeb\",\n \"score\": \"0.66820544\",\n \"text\": \"public function edit($id)\\n {\\n $model = Suplier::find($id);\\n return view('backend.suplier.form',['model'=>$model,'update'=>1]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"8811651512fbad624a5342b1c61e6ef3\",\n \"score\": \"0.66780823\",\n \"text\": \"public function edit($id)\\n {\\n $model = Supplier::findOrFail($id);\\n return view('admin.supplier.form', compact('model'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"d58aeddc51a32d8c85adcbf8fc206a39\",\n \"score\": \"0.66672367\",\n \"text\": \"public function editAction($id)\\n {\\n $this->initializeScaffolding();\\n\\n $this->beforeRead();\\n $this->view->record = $this->scaffolding->doRead($id);\\n $this->afterRead();\\n\\n $this->beforeEdit();\\n $this->view->form = $this->scaffolding->getForm($this->view->record);\\n $this->afterEdit();\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"98c3057a696eb14943e7e5fea5851c0b\",\n \"score\": \"0.6666091\",\n \"text\": \"public function edit($id)\\n {\\n return $this->showForm($id);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"58fa8a98152b59c2e07c439335e492b4\",\n \"score\": \"0.6665379\",\n \"text\": \"public function edit($id)\\n {\\n return view('web::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f15f8f92121a2bdd5d391d8e067cce6\",\n \"score\": \"0.66645616\",\n \"text\": \"public function edit($id)\\n {\\n \\t$emp = Employee::find($id);\\n \\t \\n \\t// show the view and pass the nerd to it\\n \\treturn View::make('adminlte::employee.edit')\\n \\t->with('employee', $emp);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"52e52cdfc2de427528e31ab0f3380503\",\n \"score\": \"0.6663675\",\n \"text\": \"public function editAction($id)\\n {\\n $em = $this->getDoctrine()->getManager();\\n\\n $entity = $em->getRepository('NumaDOADMSBundle:ListingForm')->find($id);\\n\\n if (!$entity) {\\n throw $this->createNotFoundException('Unable to find ListingForm entity.');\\n }\\n\\n $editForm = $this->createEditForm($entity);\\n $deleteForm = $this->createDeleteForm($id);\\n\\n return $this->render('NumaDOADMSBundle:ListingForm:edit.html.twig', array(\\n 'entity' => $entity,\\n 'edit_form' => $editForm->createView(),\\n 'delete_form' => $deleteForm->createView(),\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"ade3e60125d3b02b74b68797e30c99f4\",\n \"score\": \"0.6653248\",\n \"text\": \"public function edit($id)\\n {\\n $this->data['product'] = Product::findOrFail($id);\\n $this->data['category'] = Category::arrForCategory();\\n $this->data['mode'] = 'edit';\\n\\n return view('products.form', $this->data);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2144bb95c09393c12341bf4eb0e5d9e7\",\n \"score\": \"0.66517454\",\n \"text\": \"public function showEditForm($id){\\n $post = $this->repo->byId($id);\\n return view('create', [\\n 'mode' => 'edit',\\n 'published_at' => $post->published_at,\\n 'is_published' =>$post->is_published,\\n 'title' => $post->title,\\n 'url' => $post->url,\\n 'contents' => $post->contents,\\n 'id' => $post->id\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23fa969743853cefd4974f048eebf67a\",\n \"score\": \"0.6641395\",\n \"text\": \"public function edit()\\r\\n {\\r\\n return view('user::edit');\\r\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6be4074acb7130903012aff787adc368\",\n \"score\": \"0.663426\",\n \"text\": \"public function edit($id)\\n {\\n $model = User::find($id);\\n return view('master.admin.form', ['model'=>$model, 'update'=>true]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"6f1a413f5dd5aee349bb9b9db12fa70b\",\n \"score\": \"0.6629308\",\n \"text\": \"public function edit($id) { }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5af850265a4a33e59e46a01b80ede2a3\",\n \"score\": \"0.66275465\",\n \"text\": \"public function edit()\\n {\\n return view('user::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5af850265a4a33e59e46a01b80ede2a3\",\n \"score\": \"0.66275465\",\n \"text\": \"public function edit()\\n {\\n return view('user::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5af850265a4a33e59e46a01b80ede2a3\",\n \"score\": \"0.66275465\",\n \"text\": \"public function edit()\\n {\\n return view('user::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5af850265a4a33e59e46a01b80ede2a3\",\n \"score\": \"0.66275465\",\n \"text\": \"public function edit()\\n {\\n return view('user::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"5af850265a4a33e59e46a01b80ede2a3\",\n \"score\": \"0.66275465\",\n \"text\": \"public function edit()\\n {\\n return view('user::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"7ea6d483a420134aa1b6a3947a002693\",\n \"score\": \"0.6627498\",\n \"text\": \"public function edit($id)\\n {\\n //\\n return \\\"Se muestra formulario para editar Fabricante con id: $id\\\";\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"f39b9490d89d766f2a0fd47a32dc248b\",\n \"score\": \"0.66240406\",\n \"text\": \"public function edit($id)\\n {\\n return view(\\\"user_form\\\");\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"0fa42022ec77f2736c200c4b84f79316\",\n \"score\": \"0.6615427\",\n \"text\": \"public function edit($id)\\n {\\n $data = Merek::find($id);\\n $data->page_title = 'Merek Edit';\\n $data->h1 = 'Edit';\\n $data->form_action = route('admin.merek.update');\\n $data->page_type = 'edit';\\n $data->button = 'Simpan';\\n\\n return view('backend.merek.form', [\\n 'data' => $data,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"860b8d42962dd4f1751317b806b97d66\",\n \"score\": \"0.6614804\",\n \"text\": \"public function edit()\\n {\\n return view('reception::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"c8e6574baa7c09ee6dbb6a57608c40ce\",\n \"score\": \"0.6614437\",\n \"text\": \"public function editResourceAction($id, Request $request)\\n {\\n $resource = $this->getDoctrine()->getManager()\\n ->getRepository('WBQbankBundle:Resources')\\n ->find($id);\\n\\n if (!$resource) {\\n throw $this->createNotFoundException(\\n 'No resource found'\\n );\\n }\\n\\n // form\\n $form = $this->createForm(new ResourcesType(), $resource);\\n\\n $form->handleRequest($request);\\n\\n if ($form->isSubmitted()) {\\n\\n $dir = $this->container->getParameter('resources-upload-path');\\n $file = $resource->getFilename();\\n \\n //to keep the existing uploaded file location\\n $filename_=$request->get('filename_');\\n \\n if (is_object($file)) {\\n $resource->setFilesize($file->getSize());\\n $filename = time() . $file->getClientOriginalName();\\n $file->move($dir, $filename);\\n $location = $dir . $filename;\\n $resource->setFilename($location);\\n }\\n else if (trim($filename_)!=\\\"\\\"){\\n $resource->setFilename($filename_);\\n }\\n\\n $em = $this->getDoctrine()->getManager();\\n\\n $em->flush();\\n\\n return $this->redirect($this->generateUrl('resources'));\\n }\\n\\n return $this->render('WBQbankBundle:Resources:editResource.html.twig', array(\\n 'form' => $form->createView(),\\n 'resourceId' => $id,\\n 'active_button' => ActiveButtons::AdminResources\\n ));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"a365c8fa77e729113252274bcd88baf6\",\n \"score\": \"0.6607685\",\n \"text\": \"public function edit($id)\\n {\\n $entity = Entity::findOrFail($id);\\n\\n if(Auth::user()->id != $entity->user_id){\\n return view('error')->withErrors(['You don\\\\'t have permissions to access this resource.']);\\n }\\n\\n return view('entities.edit', compact('entity'))->with('create', 0);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"38e6dad01dfe51fa6f95805601cc8137\",\n \"score\": \"0.66073585\",\n \"text\": \"public function edit()\\n\\t{\\n\\t\\tCRequest::setVar('view', $this->view_item);\\n\\t\\tparent::display();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"584d7649153a0da9f2d2848a6fd168fd\",\n \"score\": \"0.6605469\",\n \"text\": \"public function editAction()\\n {\\n $varName = $this->view->singularize($this->_helper->db->getDefaultModelName());\\n\\n $record = $this->_helper->db->findById();\\n\\n if ($this->_autoCsrfProtection) {\\n $csrf = new Omeka_Form_SessionCsrf;\\n $this->view->csrf = $csrf;\\n }\\n\\n if ($this->getRequest()->isPost()) {\\n if ($this->_autoCsrfProtection && !$csrf->isValid($_POST)) {\\n $this->_helper->_flashMessenger(__('There was an error on the form. Please try again.'), 'error');\\n $this->view->$varName = $record;\\n return;\\n }\\n $record->setPostData($_POST);\\n if ($record->save(false)) {\\n $successMessage = $this->_getEditSuccessMessage($record);\\n if ($successMessage != '') {\\n $this->_helper->flashMessenger($successMessage, 'success');\\n }\\n $this->_redirectAfterEdit($record);\\n } else {\\n $this->_helper->flashMessenger($record->getErrors());\\n }\\n }\\n\\n $this->view->$varName = $record;\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b3434b39a7041adf18b694988ccedbea\",\n \"score\": \"0.66050863\",\n \"text\": \"public function edit($id)\\n\\t{\\n return View::make('cardapios.edit');\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"bb3d25c21124beddc757800cf8683cb4\",\n \"score\": \"0.66033626\",\n \"text\": \"public function edit(){\\n\\t\\t//$this->common_data();\\n\\t\\t$this->location = \\\"plataformas\\\";\\n\\t\\t$this->plataforma = new plataforma($this->get('id'));\\n\\t\\t$this->plataforma->read(\\\"id,nombre,empresa\\\");\\n\\t\\t$this->include_theme(\\\"index\\\",\\\"edit\\\");\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"672a8990802aca7ec3bf156a475b97ab\",\n \"score\": \"0.6601295\",\n \"text\": \"public function edit($id)\\n {\\n // get the nerd\\n $employee = employee::find($id);\\n\\n // show the edit form and pass the nerd\\n return View::make('employees.edit')\\n ->with('employee', $employee);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"033e1e454bf02fa56620accb31e8cb8d\",\n \"score\": \"0.65993685\",\n \"text\": \"public function edit(Record $record)\\n {\\n return view('records.update', compact('record'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2b5fb043a3c87778cf2cebbc780df3b7\",\n \"score\": \"0.65991616\",\n \"text\": \"public function edit()\\n\\t{\\n\\t\\tparent::edit();\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"2f50bec1a38d27b16fac719637b651c4\",\n \"score\": \"0.659718\",\n \"text\": \"public function editViewAction($id)\\n {\\n $this->theme->setTitle('Redigera formulär');\\n $this->theme->addStylesheet('css/form.css');\\n \\n $this->db->select()\\n ->from('survey')\\n ->where(\\\"id = $id\\\")\\n ->execute();\\n \\n $survey = $this->db->fetchOne();\\n \\n $this->views->add('survey/edit', [\\n 'title' => \\\"Redigera formulär\\\",\\n 'survey' => $survey,\\n 'id' => $id,\\n ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"db2529a46c0e35eb3c68886810761fc8\",\n \"score\": \"0.6592692\",\n \"text\": \"public function edit($id)\\n {\\n return view('presensi::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"148f2b795f1a0e6fbe96ee1b1579717f\",\n \"score\": \"0.6589583\",\n \"text\": \"public function edit()\\n {\\n // return view('api::edit');\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"3ec00c8d29482613595774462fb85505\",\n \"score\": \"0.6587105\",\n \"text\": \"public function edit($id) {\\n $item = Employee::find($id);\\n return view('employees/update')->with(['item' => $item]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"9e260dddc50926c0f371295c6cdff712\",\n \"score\": \"0.6586051\",\n \"text\": \"public function edit($id)\\n {\\n //\\n $record = $this->record->findOrFail($id);\\n\\n return view('record.edit', ['record'=>$record]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"cc0bb0b7f0592d72b552b09d7d5ca4ad\",\n \"score\": \"0.6579556\",\n \"text\": \"public function edit(){\\n $id = $_GET['id'];\\n $task = $this->taskModel->find($id);\\n\\n view('admin/edit_task', compact('task'));\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"23e944e596556730ad9998873ce62f6e\",\n \"score\": \"0.6575095\",\n \"text\": \"public function edit($id)\\n {\\n $this->authChecker();\\n $item = $this->provider::findOrFail($id);\\n $fields = $this->getFields();\\n $fields[0]['value'] = $item->name;\\n $fields[1]['value'] = $item->size;\\n $fields[2]['value'] = $item->restoarea_id;\\n\\n $parameter = [];\\n $parameter[$this->parameter_name] = $id;\\n\\n return view('general.form', ['setup' => [\\n 'inrow'=>true,\\n 'title'=>__('crud.edit_item_name', ['item'=>__($this->title), 'name'=>$item->name]),\\n 'action_link'=>route($this->webroute_path.'index'),\\n 'action_name'=>__('crud.back'),\\n 'iscontent'=>true,\\n 'isupdate'=>true,\\n 'action'=>route($this->webroute_path.'update', $parameter),\\n ],\\n 'fields'=>$fields, ]);\\n }\",\n \"title\": \"\"\n },\n {\n \"docid\": \"b34cb7db16e9ac26b8ba6821e387fff9\",\n \"score\": \"0.6572864\",\n \"text\": \"public function edit($id)\\n\\t{\\n\\t\\t$this->page_title = 'Edit User';\\n\\t\\t$data = $this->rendarEdit($id);\\n\\t\\treturn view('admin.crud.form',$data);\\n\\t}\",\n \"title\": \"\"\n },\n {\n \"docid\": \"4bf2fed80355d3a19316f7291f47ee44\",\n \"score\": \"0.6567018\",\n \"text\": \"public function edit($id) \\n // : StudentResource\\n {\\n $student = Student::find($id);\\n return view('welcome', ['student' => $student]);\\n\\n // return new StudentResource($student);\\n }\",\n \"title\": \"\"\n }\n]"}}},{"rowIdx":787,"cells":{"query_id":{"kind":"string","value":"d0ec94121d1bf457197fc458f8d2bc6f"},"query":{"kind":"string","value":"END DISPLAY ATTACHMENTS > PREVIEW Assign Variables and Definitions based on the fetched Attachments internal used by all displaying functions, the Data was collected before, it's only dependend on the template used. :) before this function is usable, init_display_attachments have to be called for specific pages (pm, posting, review etc...)"},"positive_passages":{"kind":"list like","value":[{"docid":"0ab2e2fa0b306642eaf1458c54a0b5c5","score":"0.5905478","text":"function display_attachments($post_id, $type = 'postrow')\n{\n\tglobal $db, $config, $template, $user, $lang;\n\tglobal $upload_dir, $allowed_extensions, $display_categories, $download_modes, $attachments, $upload_icons, $username_from;\n\t$num_attachments = sizeof($attachments['_' . $post_id]);\n\tif ($num_attachments == 0)\n\t{\n\t\treturn;\n\t}\n\n\t$template->assign_block_vars($type . '.attach', array());\n\n\tfor ($i = 0; $i < $num_attachments; $i++)\n\t{\n\t\t// Some basic things...\n\t\t$physical_filename = get_physical_filename($attachments['_' . $post_id][$i]['physical_filename'], false);\n\t\t$physical_filename_thumb = get_physical_filename($attachments['_' . $post_id][$i]['physical_filename'], true);\n\t\t$filename = $upload_dir . '/' . $physical_filename;\n\t\t$thumbnail_filename = $upload_dir . '/' . $physical_filename_thumb;\n\n\t\t$upload_image = '';\n\n\t\tif ($config['upload_img'] != '' && trim($upload_icons[$attachments['_' . $post_id][$i]['extension']]) == '')\n\t\t{\n\t\t\t$upload_image = '\"\"';\n\t\t}\n\t\telseif (trim($upload_icons[$attachments['_' . $post_id][$i]['extension']]) != '')\n\t\t{\n\t\t\t$upload_image = '\"\"';\n\t\t}\n\n\t\t$filesize = $attachments['_' . $post_id][$i]['filesize'];\n\t\t$size_lang = ($filesize >= 1048576) ? $lang['MB'] : (($filesize >= 1024) ? $lang['KB'] : $lang['Bytes']);\n\n\t\tif ($filesize >= 1048576)\n\t\t{\n\t\t\t$filesize = (round((round($filesize / 1048576 * 100) / 100), 2));\n\t\t}\n\t\telseif ($filesize >= 1024)\n\t\t{\n\t\t\t$filesize = (round((round($filesize / 1024 * 100) / 100), 2));\n\t\t}\n\n\t\t$display_name = $attachments['_' . $post_id][$i]['real_filename'];\n\t\t$comment = $attachments['_' . $post_id][$i]['comment'];\n\t\t$comment = str_replace(\"\\n\", '
    ', $comment);\n\n\t\t$denied = false;\n\n\t\t// Admin is allowed to view forbidden Attachments, but the error-message is displayed too to inform the Admin\n\t\tif (!in_array($attachments['_' . $post_id][$i]['extension'], $allowed_extensions))\n\t\t{\n\t\t\t$denied = true;\n\n\t\t\t$template->assign_block_vars($type . '.attach.denyrow', array(\n\t\t\t\t'L_DENIED' => sprintf($lang['Extension_disabled_after_posting'], $attachments['_' . $post_id][$i]['extension'])\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif (!$denied || $user->data['user_level'] == ADMIN)\n\t\t{\n\t\t\t// Some basic Template Vars\n\t\t\t$template->assign_vars(array(\n\t\t\t\t'L_DESCRIPTION' => $lang['Description'],\n\t\t\t\t'L_DOWNLOAD' => $lang['Download'],\n\t\t\t\t'L_FILENAME' => $lang['File_name'],\n\t\t\t\t'L_FILESIZE' => $lang['Filesize']\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// define category\n\t\t\t$image = false;\n\t\t\t$stream = false;\n\t\t\t$swf = false;\n\t\t\t$thumbnail = false;\n\t\t\t$link = false;\n\n\t\t\tif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == STREAM_CAT)\n\t\t\t{\n\t\t\t\t$stream = true;\n\t\t\t}\n\t\t\telseif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == SWF_CAT)\n\t\t\t{\n\t\t\t\t$swf = true;\n\t\t\t}\n\t\t\telseif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT && intval($config['img_display_inlined']))\n\t\t\t{\n\t\t\t\tif (intval($config['img_link_width']) != 0 || intval($config['img_link_height']) != 0)\n\t\t\t\t{\n\t\t\t\t\tlist($width, $height) = image_getdimension($filename);\n\n\t\t\t\t\tif (($width == 0) && ($height == 0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$image = true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($width <= intval($config['img_link_width']) && $height <= intval($config['img_link_height']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$image = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$image = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT && $attachments['_' . $post_id][$i]['thumbnail'] == 1)\n\t\t\t{\n\t\t\t\t$thumbnail = true;\n\t\t\t\t$image = false;\n\t\t\t}\n\n\t\t\tif (!$image && !$stream && !$swf && !$thumbnail)\n\t\t\t{\n\t\t\t\t$link = true;\n\t\t\t}\n\n\t\t\tif ($image)\n\t\t\t{\n\t\t\t\t// Images\n\t\t\t\t// NOTE: If you want to use the download.php everytime an image is displayed inlined, replace the\n\t\t\t\t// Section between BEGIN and END with (Without the // of course):\n\t\t\t\t//\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t\t//\t$download_link = true;\n\t\t\t\t//\n\t\t\t\t//\n\t\t\t\tif (intval($config['allow_ftp_upload']) && trim($config['download_path']) == '')\n\t\t\t\t{\n\t\t\t\t\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t\t\t$download_link = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Check if we can reach the file or if it is stored outside of the webroot\n\t\t\t\t\tif (($config['upload_dir'][0] == '/') || (($config['upload_dir'][0] != '/') && ($config['upload_dir'][1] == ':')))\n\t\t\t\t\t{\n\t\t\t\t\t\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t\t\t\t$download_link = true;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// BEGIN\n\t\t\t\t\t\t$img_source = $filename;\n\t\t\t\t\t\t$download_link = false;\n\t\t\t\t\t\t// END\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$max_image_width = intval($config['liw_max_width']);\n\n\t\t\t\t$server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://';\n\t\t\t\t$server_name = preg_replace('#^\\/?(.*?)\\/?$#', '\\1', trim($config['server_name']));\n\t\t\t\t$server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '';\n\t\t\t\t$script_name = preg_replace('#^\\/?(.*?)\\/?$#', '\\1', trim($config['script_path']));\n\t\t\t\t$script_name = ($script_name == '') ? $script_name : '/' . $script_name;\n\n\t\t\t\tif (($max_image_width != 0) && ($config['liw_attach_enabled'] == 1) && !isset($username_from))\n\t\t\t\t{\n\t\t\t\t\tif (!function_exists('liw_get_dimensions'))\n\t\t\t\t\t{\n\t\t\t\t\t\tinclude_once(IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_includes.' . PHP_EXT);\n\t\t\t\t\t}\n\t\t\t\t\tlist($image_width, $image_height) = liw_get_dimensions($server_protocol . $server_name . $server_port . $script_name . '/' . $img_source, $post_id);\n\n\t\t\t\t\tif ($image_width && ($image_width > $max_image_width) || empty($image_width) || empty($image_height))\n\t\t\t\t\t{\n\t\t\t\t\t\t$img_code = generate_liw_img_popup($img_source, $image_width, $image_height, $max_image_width);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$img_code = '\"'';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$img_code = '\"'';\n\t\t\t\t}\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.cat_images', array(\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\t\t\t\t\t'IMG_CODE' => $img_code,\n\t\t\t\t\t'IMG_SRC' => $img_source,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Directly Viewed Image ... update the download count\n\t\t\t\tif (!$download_link)\n\t\t\t\t{\n\t\t\t\t\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($thumbnail)\n\t\t\t{\n\t\t\t\t// Images, but display Thumbnail\n\t\t\t\t// NOTE: If you want to use the download.php everytime an thumbnail is displayed inlined, replace the\n\t\t\t\t// Section between BEGIN and END with (Without the // of course):\n\t\t\t\t//\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\n\t\t\t\t//\n\t\t\t\tif (intval($config['allow_ftp_upload']) && (trim($config['download_path']) == ''))\n\t\t\t\t{\n\t\t\t\t\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Check if we can reach the file or if it is stored outside of the webroot\n\t\t\t\t\tif (($config['upload_dir'][0] == '/') || (($config['upload_dir'][0] != '/') && ($config['upload_dir'][1] == ':')))\n\t\t\t\t\t{\n\t\t\t\t\t\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tif (file_exists($thumbnail_filename))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// BEGIN\n\t\t\t\t\t\t\t$thumb_source = $thumbnail_filename;\n\t\t\t\t\t\t\t// END\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.cat_thumb_images', array(\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n\t\t\t\t\t'IMG_SRC' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\n\t\t\t\t\t'IMG_THUMB_SRC' => $thumb_source,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ($stream)\n\t\t\t{\n\t\t\t\t// Streams\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.cat_stream', array(\n\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n//\t\t\t\t\t'U_DOWNLOAD_LINK' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Viewed/Heared File ... update the download count (download.php is not called here)\n\t\t\t\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t}\n\n\t\t\tif ($swf)\n\t\t\t{\n\t\t\t\t// Macromedia Flash Files\n\t\t\t\tlist($width, $height) = swf_getdimension($filename);\n\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.cat_swf', array(\n\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link,\n\t\t\t\t\t'WIDTH' => $width,\n\t\t\t\t\t'HEIGHT' => $height\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// Viewed/Heared File ... update the download count (download.php is not called here)\n\t\t\t\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\n\t\t\t}\n\n\t\t\tif ($link)\n\t\t\t{\n\t\t\t\t$target_blank = 'target=\"_blank\"'; //((intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT)) ? 'target=\"_blank\"' : '';\n\n\t\t\t\t// display attachment\n\t\t\t\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\n\t\t\t\t$template->assign_block_vars($type . '.attach.attachrow', array(\n\t\t\t\t\t'U_DOWNLOAD_LINK' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\n\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t'TARGET_BLANK' => $target_blank,\n\n\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Downloaded'],\n\t\t\t\t\t'L_DOWNLOAD_COUNT' => $download_count_link\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t}\n\t\t}\n\t}\n}","title":""}],"string":"[\n {\n \"docid\": \"0ab2e2fa0b306642eaf1458c54a0b5c5\",\n \"score\": \"0.5905478\",\n \"text\": \"function display_attachments($post_id, $type = 'postrow')\\n{\\n\\tglobal $db, $config, $template, $user, $lang;\\n\\tglobal $upload_dir, $allowed_extensions, $display_categories, $download_modes, $attachments, $upload_icons, $username_from;\\n\\t$num_attachments = sizeof($attachments['_' . $post_id]);\\n\\tif ($num_attachments == 0)\\n\\t{\\n\\t\\treturn;\\n\\t}\\n\\n\\t$template->assign_block_vars($type . '.attach', array());\\n\\n\\tfor ($i = 0; $i < $num_attachments; $i++)\\n\\t{\\n\\t\\t// Some basic things...\\n\\t\\t$physical_filename = get_physical_filename($attachments['_' . $post_id][$i]['physical_filename'], false);\\n\\t\\t$physical_filename_thumb = get_physical_filename($attachments['_' . $post_id][$i]['physical_filename'], true);\\n\\t\\t$filename = $upload_dir . '/' . $physical_filename;\\n\\t\\t$thumbnail_filename = $upload_dir . '/' . $physical_filename_thumb;\\n\\n\\t\\t$upload_image = '';\\n\\n\\t\\tif ($config['upload_img'] != '' && trim($upload_icons[$attachments['_' . $post_id][$i]['extension']]) == '')\\n\\t\\t{\\n\\t\\t\\t$upload_image = '\\\"\\\"';\\n\\t\\t}\\n\\t\\telseif (trim($upload_icons[$attachments['_' . $post_id][$i]['extension']]) != '')\\n\\t\\t{\\n\\t\\t\\t$upload_image = '\\\"\\\"';\\n\\t\\t}\\n\\n\\t\\t$filesize = $attachments['_' . $post_id][$i]['filesize'];\\n\\t\\t$size_lang = ($filesize >= 1048576) ? $lang['MB'] : (($filesize >= 1024) ? $lang['KB'] : $lang['Bytes']);\\n\\n\\t\\tif ($filesize >= 1048576)\\n\\t\\t{\\n\\t\\t\\t$filesize = (round((round($filesize / 1048576 * 100) / 100), 2));\\n\\t\\t}\\n\\t\\telseif ($filesize >= 1024)\\n\\t\\t{\\n\\t\\t\\t$filesize = (round((round($filesize / 1024 * 100) / 100), 2));\\n\\t\\t}\\n\\n\\t\\t$display_name = $attachments['_' . $post_id][$i]['real_filename'];\\n\\t\\t$comment = $attachments['_' . $post_id][$i]['comment'];\\n\\t\\t$comment = str_replace(\\\"\\\\n\\\", '
    ', $comment);\\n\\n\\t\\t$denied = false;\\n\\n\\t\\t// Admin is allowed to view forbidden Attachments, but the error-message is displayed too to inform the Admin\\n\\t\\tif (!in_array($attachments['_' . $post_id][$i]['extension'], $allowed_extensions))\\n\\t\\t{\\n\\t\\t\\t$denied = true;\\n\\n\\t\\t\\t$template->assign_block_vars($type . '.attach.denyrow', array(\\n\\t\\t\\t\\t'L_DENIED' => sprintf($lang['Extension_disabled_after_posting'], $attachments['_' . $post_id][$i]['extension'])\\n\\t\\t\\t\\t)\\n\\t\\t\\t);\\n\\t\\t}\\n\\n\\t\\tif (!$denied || $user->data['user_level'] == ADMIN)\\n\\t\\t{\\n\\t\\t\\t// Some basic Template Vars\\n\\t\\t\\t$template->assign_vars(array(\\n\\t\\t\\t\\t'L_DESCRIPTION' => $lang['Description'],\\n\\t\\t\\t\\t'L_DOWNLOAD' => $lang['Download'],\\n\\t\\t\\t\\t'L_FILENAME' => $lang['File_name'],\\n\\t\\t\\t\\t'L_FILESIZE' => $lang['Filesize']\\n\\t\\t\\t\\t)\\n\\t\\t\\t);\\n\\n\\t\\t\\t// define category\\n\\t\\t\\t$image = false;\\n\\t\\t\\t$stream = false;\\n\\t\\t\\t$swf = false;\\n\\t\\t\\t$thumbnail = false;\\n\\t\\t\\t$link = false;\\n\\n\\t\\t\\tif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == STREAM_CAT)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$stream = true;\\n\\t\\t\\t}\\n\\t\\t\\telseif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == SWF_CAT)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$swf = true;\\n\\t\\t\\t}\\n\\t\\t\\telseif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT && intval($config['img_display_inlined']))\\n\\t\\t\\t{\\n\\t\\t\\t\\tif (intval($config['img_link_width']) != 0 || intval($config['img_link_height']) != 0)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tlist($width, $height) = image_getdimension($filename);\\n\\n\\t\\t\\t\\t\\tif (($width == 0) && ($height == 0))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$image = true;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tif ($width <= intval($config['img_link_width']) && $height <= intval($config['img_link_height']))\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$image = true;\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$image = true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\tif (intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT && $attachments['_' . $post_id][$i]['thumbnail'] == 1)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$thumbnail = true;\\n\\t\\t\\t\\t$image = false;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif (!$image && !$stream && !$swf && !$thumbnail)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$link = true;\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ($image)\\n\\t\\t\\t{\\n\\t\\t\\t\\t// Images\\n\\t\\t\\t\\t// NOTE: If you want to use the download.php everytime an image is displayed inlined, replace the\\n\\t\\t\\t\\t// Section between BEGIN and END with (Without the // of course):\\n\\t\\t\\t\\t//\\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\\n\\t\\t\\t\\t//\\t$download_link = true;\\n\\t\\t\\t\\t//\\n\\t\\t\\t\\t//\\n\\t\\t\\t\\tif (intval($config['allow_ftp_upload']) && trim($config['download_path']) == '')\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\\n\\t\\t\\t\\t\\t$download_link = true;\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t// Check if we can reach the file or if it is stored outside of the webroot\\n\\t\\t\\t\\t\\tif (($config['upload_dir'][0] == '/') || (($config['upload_dir'][0] != '/') && ($config['upload_dir'][1] == ':')))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$img_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']);\\n\\t\\t\\t\\t\\t\\t$download_link = true;\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t// BEGIN\\n\\t\\t\\t\\t\\t\\t$img_source = $filename;\\n\\t\\t\\t\\t\\t\\t$download_link = false;\\n\\t\\t\\t\\t\\t\\t// END\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$max_image_width = intval($config['liw_max_width']);\\n\\n\\t\\t\\t\\t$server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://';\\n\\t\\t\\t\\t$server_name = preg_replace('#^\\\\/?(.*?)\\\\/?$#', '\\\\1', trim($config['server_name']));\\n\\t\\t\\t\\t$server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) : '';\\n\\t\\t\\t\\t$script_name = preg_replace('#^\\\\/?(.*?)\\\\/?$#', '\\\\1', trim($config['script_path']));\\n\\t\\t\\t\\t$script_name = ($script_name == '') ? $script_name : '/' . $script_name;\\n\\n\\t\\t\\t\\tif (($max_image_width != 0) && ($config['liw_attach_enabled'] == 1) && !isset($username_from))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tif (!function_exists('liw_get_dimensions'))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tinclude_once(IP_ROOT_PATH . ATTACH_MOD_PATH . 'includes/functions_includes.' . PHP_EXT);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\tlist($image_width, $image_height) = liw_get_dimensions($server_protocol . $server_name . $server_port . $script_name . '/' . $img_source, $post_id);\\n\\n\\t\\t\\t\\t\\tif ($image_width && ($image_width > $max_image_width) || empty($image_width) || empty($image_height))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$img_code = generate_liw_img_popup($img_source, $image_width, $image_height, $max_image_width);\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$img_code = '\\\"'';\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$img_code = '\\\"'';\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\\n\\t\\t\\t\\t$template->assign_block_vars($type . '.attach.cat_images', array(\\n\\t\\t\\t\\t\\t'DOWNLOAD_NAME' => $display_name,\\n\\t\\t\\t\\t\\t'S_UPLOAD_IMAGE' => $upload_image,\\n\\t\\t\\t\\t\\t'IMG_CODE' => $img_code,\\n\\t\\t\\t\\t\\t'IMG_SRC' => $img_source,\\n\\t\\t\\t\\t\\t'FILESIZE' => $filesize,\\n\\t\\t\\t\\t\\t'SIZE_VAR' => $size_lang,\\n\\t\\t\\t\\t\\t'COMMENT' => $comment,\\n\\t\\t\\t\\t\\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\\n\\t\\t\\t\\t\\t'L_DOWNLOAD_COUNT' => $download_count_link\\n\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t// Directly Viewed Image ... update the download count\\n\\t\\t\\t\\tif (!$download_link)\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ($thumbnail)\\n\\t\\t\\t{\\n\\t\\t\\t\\t// Images, but display Thumbnail\\n\\t\\t\\t\\t// NOTE: If you want to use the download.php everytime an thumbnail is displayed inlined, replace the\\n\\t\\t\\t\\t// Section between BEGIN and END with (Without the // of course):\\n\\t\\t\\t\\t//\\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\\n\\t\\t\\t\\t//\\n\\t\\t\\t\\tif (intval($config['allow_ftp_upload']) && (trim($config['download_path']) == ''))\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\\n\\t\\t\\t\\t}\\n\\t\\t\\t\\telse\\n\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t// Check if we can reach the file or if it is stored outside of the webroot\\n\\t\\t\\t\\t\\tif (($config['upload_dir'][0] == '/') || (($config['upload_dir'][0] != '/') && ($config['upload_dir'][1] == ':')))\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\tif (file_exists($thumbnail_filename))\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t// BEGIN\\n\\t\\t\\t\\t\\t\\t\\t$thumb_source = $thumbnail_filename;\\n\\t\\t\\t\\t\\t\\t\\t// END\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\t$thumb_source = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id'] . '&thumb=1');\\n\\t\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t}\\n\\n\\t\\t\\t\\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\\n\\t\\t\\t\\t$template->assign_block_vars($type . '.attach.cat_thumb_images', array(\\n\\t\\t\\t\\t\\t'DOWNLOAD_NAME' => $display_name,\\n\\t\\t\\t\\t\\t'S_UPLOAD_IMAGE' => $upload_image,\\n\\n\\t\\t\\t\\t\\t'IMG_SRC' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\\n\\t\\t\\t\\t\\t'IMG_THUMB_SRC' => $thumb_source,\\n\\t\\t\\t\\t\\t'FILESIZE' => $filesize,\\n\\t\\t\\t\\t\\t'SIZE_VAR' => $size_lang,\\n\\t\\t\\t\\t\\t'COMMENT' => $comment,\\n\\t\\t\\t\\t\\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\\n\\t\\t\\t\\t\\t'L_DOWNLOAD_COUNT' => $download_count_link\\n\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t);\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ($stream)\\n\\t\\t\\t{\\n\\t\\t\\t\\t// Streams\\n\\t\\t\\t\\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\\n\\t\\t\\t\\t$template->assign_block_vars($type . '.attach.cat_stream', array(\\n\\t\\t\\t\\t\\t'U_DOWNLOAD_LINK' => $filename,\\n\\t\\t\\t\\t\\t'S_UPLOAD_IMAGE' => $upload_image,\\n\\n//\\t\\t\\t\\t\\t'U_DOWNLOAD_LINK' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\\n\\t\\t\\t\\t\\t'DOWNLOAD_NAME' => $display_name,\\n\\t\\t\\t\\t\\t'FILESIZE' => $filesize,\\n\\t\\t\\t\\t\\t'SIZE_VAR' => $size_lang,\\n\\t\\t\\t\\t\\t'COMMENT' => $comment,\\n\\t\\t\\t\\t\\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\\n\\t\\t\\t\\t\\t'L_DOWNLOAD_COUNT' => $download_count_link\\n\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t// Viewed/Heared File ... update the download count (download.php is not called here)\\n\\t\\t\\t\\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ($swf)\\n\\t\\t\\t{\\n\\t\\t\\t\\t// Macromedia Flash Files\\n\\t\\t\\t\\tlist($width, $height) = swf_getdimension($filename);\\n\\n\\t\\t\\t\\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\\n\\t\\t\\t\\t$template->assign_block_vars($type . '.attach.cat_swf', array(\\n\\t\\t\\t\\t\\t'U_DOWNLOAD_LINK' => $filename,\\n\\t\\t\\t\\t\\t'S_UPLOAD_IMAGE' => $upload_image,\\n\\n\\t\\t\\t\\t\\t'DOWNLOAD_NAME' => $display_name,\\n\\t\\t\\t\\t\\t'FILESIZE' => $filesize,\\n\\t\\t\\t\\t\\t'SIZE_VAR' => $size_lang,\\n\\t\\t\\t\\t\\t'COMMENT' => $comment,\\n\\t\\t\\t\\t\\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\\n\\t\\t\\t\\t\\t'L_DOWNLOAD_COUNT' => $download_count_link,\\n\\t\\t\\t\\t\\t'WIDTH' => $width,\\n\\t\\t\\t\\t\\t'HEIGHT' => $height\\n\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t);\\n\\n\\t\\t\\t\\t// Viewed/Heared File ... update the download count (download.php is not called here)\\n\\t\\t\\t\\tupdate_attachments_stats($attachments['_' . $post_id][$i]['attach_id']);\\n\\t\\t\\t}\\n\\n\\t\\t\\tif ($link)\\n\\t\\t\\t{\\n\\t\\t\\t\\t$target_blank = 'target=\\\"_blank\\\"'; //((intval($display_categories[$attachments['_' . $post_id][$i]['extension']]) == IMAGE_CAT)) ? 'target=\\\"_blank\\\"' : '';\\n\\n\\t\\t\\t\\t// display attachment\\n\\t\\t\\t\\t$download_count_link = (($attachments['_' . $post_id][$i]['download_count'] > '0') && ($user->data['user_level'] == ADMIN)) ? ('' . sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']) . '') : sprintf($lang['Download_number'], $attachments['_' . $post_id][$i]['download_count']);\\n\\t\\t\\t\\t$template->assign_block_vars($type . '.attach.attachrow', array(\\n\\t\\t\\t\\t\\t'U_DOWNLOAD_LINK' => append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachments['_' . $post_id][$i]['attach_id']),\\n\\t\\t\\t\\t\\t'S_UPLOAD_IMAGE' => $upload_image,\\n\\n\\t\\t\\t\\t\\t'DOWNLOAD_NAME' => $display_name,\\n\\t\\t\\t\\t\\t'FILESIZE' => $filesize,\\n\\t\\t\\t\\t\\t'SIZE_VAR' => $size_lang,\\n\\t\\t\\t\\t\\t'COMMENT' => $comment,\\n\\t\\t\\t\\t\\t'TARGET_BLANK' => $target_blank,\\n\\n\\t\\t\\t\\t\\t'L_DOWNLOADED_VIEWED' => $lang['Downloaded'],\\n\\t\\t\\t\\t\\t'L_DOWNLOAD_COUNT' => $download_count_link\\n\\t\\t\\t\\t\\t)\\n\\t\\t\\t\\t);\\n\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\",\n \"title\": \"\"\n }\n]"},"negative_passages":{"kind":"list like","value":[{"docid":"5094a82505c4698fd90863dd0a9a69f7","score":"0.68666136","text":"function init_display_pm_attachments($switch_attachment)\n{\n\tglobal $config, $template, $user, $lang, $attachments, $privmsg;\n\n\tif ($user->data['user_level'] == ADMIN)\n\t{\n\t\t$auth_download = 1;\n\t}\n\telse\n\t{\n\t\t$auth_download = intval($config['allow_pm_attach']);\n\t}\n\n\tif (intval($switch_attachment) == 0 || intval($config['disable_attachments_mod']) || !$auth_download)\n\t{\n\t\treturn;\n\t}\n\n\t$privmsgs_id = $privmsg['privmsgs_id'];\n\n\t@reset($attachments);\n\t$attachments['_' . $privmsgs_id] = get_attachments_from_pm($privmsgs_id);\n\n\tif (sizeof($attachments['_' . $privmsgs_id]) == 0)\n\t{\n\t\treturn;\n\t}\n\n\t$template->assign_block_vars('postrow', array());\n\n\tinit_display_template('body', '{ATTACHMENTS}');\n\n\tinit_complete_extensions_data();\n\n\t$template->assign_vars(array(\n\t\t'L_POSTED_ATTACHMENTS' => $lang['Posted_attachments'],\n\t\t'L_KILOBYTE' => $lang['KB']\n\t\t)\n\t);\n\n\tdisplay_pm_attachments($privmsgs_id, $switch_attachment);\n}","title":""},{"docid":"6dfaebe9f61801862af8a1ac822785b6","score":"0.6831871","text":"function init_display_review_attachments($is_auth)\n{\n\tglobal $config;\n\n\tif (intval($config['disable_attachments_mod']) || (!($is_auth['auth_download'] && $is_auth['auth_view'])) || intval($config['attachment_topic_review']) == 0)\n\t{\n\t\treturn;\n\t}\n\n\tinit_display_template('reviewbody', '{postrow.ATTACHMENTS}');\n\n\tinit_complete_extensions_data();\n\n}","title":""},{"docid":"9ac571c0aae6c100f6c121fa08d31e82","score":"0.63396907","text":"function Show_attachments($data=\"\") {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<lang->words['attach_dl']}\">settings['public_dir']}{$data['mime_image']}style_extra/mime_types/unknown.gif\" alt=\"{$this->lang->words['attached_file']}\" />\n&nbsp;lang->words['attach_dl']}\">{$data['attach_file']} &nbsp;&nbsp;{$data['file_size']}\n&nbsp;&nbsp;{$data['attach_hits']} {$this->lang->words['attach_hits']}\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}","title":""},{"docid":"a70b16d40b42ad711f5c1af9ab323bb8","score":"0.6095815","text":"function display_review_attachments($post_id, $switch_attachment, $is_auth)\n{\n\tglobal $config, $attachments;\n\n\tif (intval($switch_attachment) == 0 || intval($config['disable_attachments_mod']) || (!($is_auth['auth_download'] && $is_auth['auth_view'])) || intval($config['attachment_topic_review']) == 0)\n\t{\n\t\treturn;\n\t}\n\n\t@reset($attachments);\n\t$attachments['_' . $post_id] = get_attachments_from_post($post_id);\n\n\tif (sizeof($attachments['_' . $post_id]) == 0)\n\t{\n\t\treturn;\n\t}\n\n\tdisplay_attachments($post_id, 'postrow');\n}","title":""},{"docid":"c2264b798f317c4c15485f49f5838360","score":"0.6081547","text":"protected function prepareForDisplay() {}","title":""},{"docid":"c2264b798f317c4c15485f49f5838360","score":"0.6081547","text":"protected function prepareForDisplay() {}","title":""},{"docid":"30edb7a0bc0152191c42429618632804","score":"0.595717","text":"function controller_attachment_list($page_name) {\n $page = try_textblock_get($page_name);\n identity_require('textblock-list-attach', $page);\n\n $view = array();\n $options = pager_init_options();\n\n $attach_list = attachment_get_all($page_name, \"%\", $options['first_entry'],\n $options['display_entries']);\n //FIXME: hack for numbering\n for ($i = 0; $i < count($attach_list); ++$i) {\n $attach_list[$i]['id'] = $options['first_entry'] + $i + 1;\n }\n $view['attach_list'] = $attach_list;\n $view['page_name'] = $page['name'];\n $view['title'] = 'Atasamentele paginii '.$page['title'];\n $view['total_entries'] = attachment_get_count($page_name);\n $view['first_entry'] = $options['first_entry'];\n $view['display_entries'] = $options['display_entries'];\n\n execute_view_die('views/listattach.php', $view);\n}","title":""},{"docid":"b4cc49f98c1692ad7de9e07afe3a9e22","score":"0.5898486","text":"public function loadInitialAttachments()\n {\n }","title":""},{"docid":"a898d650c8e1ea1448d464cd11a6e57a","score":"0.58508235","text":"function display_attachments_preview($attachment_id_list, $attachment_list, $attachment_filesize_list, $attachment_filename_list, $attachment_comment_list, $attachment_extension_list, $attachment_thumbnail_list)\n{\n\tglobal $config, $is_auth, $allowed_extensions, $user, $lang, $display_categories, $upload_dir, $upload_icons, $template, $db, $theme;\n\n\tif (sizeof($attachment_list) != 0)\n\t{\n\t\tinit_display_template('preview', '{ATTACHMENTS}');\n\n\t\tinit_complete_extensions_data();\n\n\t\t$template->assign_block_vars('postrow', array());\n\t\t$template->assign_block_vars('postrow.attach', array());\n\n\t\tfor ($i = 0, $size = sizeof($attachment_list); $i < $size; $i++)\n\t\t{\n\t\t\t$filename = $upload_dir . '/' . basename($attachment_list[$i]);\n\t\t\t$thumb_filename = $upload_dir . '/' . THUMB_DIR . '/t_' . basename($attachment_list[$i]);\n\t\t\tif (!file_exists($thumb_filename))\n\t\t\t{\n\t\t\t\t$thumb_filename = append_sid(IP_ROOT_PATH . 'download.' . PHP_EXT . '?id=' . $attachment_id_list[$i] . '&thumb=1');\n\t\t\t}\n\n\t\t\t$filesize = $attachment_filesize_list[$i];\n\t\t\t$size_lang = ($filesize >= 1048576) ? $lang['MB'] : (($filesize >= 1024) ? $lang['KB'] : $lang['Bytes']);\n\n\t\t\tif ($filesize >= 1048576)\n\t\t\t{\n\t\t\t\t$filesize = (round((round($filesize / 1048576 * 100) / 100), 2));\n\t\t\t}\n\t\t\telseif ($filesize >= 1024)\n\t\t\t{\n\t\t\t\t$filesize = (round((round($filesize / 1024 * 100) / 100), 2));\n\t\t\t}\n\n\t\t\t$display_name = $attachment_filename_list[$i];\n\t\t\t$comment = $attachment_comment_list[$i];\n\t\t\t$comment = str_replace(\"\\n\", '
    ', $comment);\n\n\t\t\t$extension = $attachment_extension_list[$i];\n\n\t\t\t$denied = false;\n\n\t\t\t// Admin is allowed to view forbidden Attachments, but the error-message is displayed too to inform the Admin\n\t\t\tif (!in_array($extension, $allowed_extensions))\n\t\t\t{\n\t\t\t\t$denied = true;\n\n\t\t\t\t$template->assign_block_vars('postrow.attach.denyrow', array(\n\t\t\t\t\t'L_DENIED' => sprintf($lang['Extension_disabled_after_posting'], $extension)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!$denied)\n\t\t\t{\n\t\t\t\t// Some basic Template Vars\n\t\t\t\t$template->assign_vars(array(\n\t\t\t\t\t'L_DESCRIPTION' => $lang['Description'],\n\t\t\t\t\t'L_DOWNLOAD' => $lang['Download'],\n\t\t\t\t\t'L_FILENAME' => $lang['File_name'],\n\t\t\t\t\t'L_FILESIZE' => $lang['Filesize']\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t// define category\n\t\t\t\t$image = false;\n\t\t\t\t$stream = false;\n\t\t\t\t$swf = false;\n\t\t\t\t$thumbnail = false;\n\t\t\t\t$link = false;\n\n\t\t\t\tif (intval($display_categories[$extension]) == STREAM_CAT)\n\t\t\t\t{\n\t\t\t\t\t$stream = true;\n\t\t\t\t}\n\t\t\t\telseif (intval($display_categories[$extension]) == SWF_CAT)\n\t\t\t\t{\n\t\t\t\t\t$swf = true;\n\t\t\t\t}\n\t\t\t\telseif ((intval($display_categories[$extension]) == IMAGE_CAT) && intval($config['img_display_inlined']))\n\t\t\t\t{\n\t\t\t\t\tif ((intval($config['img_link_width']) != 0) || (intval($config['img_link_height']) != 0))\n\t\t\t\t\t{\n\t\t\t\t\t\tlist($width, $height) = image_getdimension($filename);\n\n\t\t\t\t\t\tif ($width == 0 && $height == 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$image = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (($width <= intval($config['img_link_width'])) && ($height <= intval($config['img_link_height'])))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$image = true;\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\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$image = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((intval($display_categories[$extension]) == IMAGE_CAT) && (intval($attachment_thumbnail_list[$i]) == 1))\n\t\t\t\t{\n\t\t\t\t\t$thumbnail = true;\n\t\t\t\t\t$image = false;\n\t\t\t\t}\n\n\t\t\t\tif (!$image && !$stream && !$swf && !$thumbnail)\n\t\t\t\t{\n\t\t\t\t\t$link = true;\n\t\t\t\t}\n\n\t\t\t\tif ($image)\n\t\t\t\t{\n\t\t\t\t\t// Images\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.cat_images', array(\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'IMG_SRC' => $filename,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed']\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($thumbnail)\n\t\t\t\t{\n\t\t\t\t\t// Images, but display Thumbnail\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.cat_thumb_images', array(\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'IMG_SRC' => $filename,\n\t\t\t\t\t\t'IMG_THUMB_SRC' => $thumb_filename,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed']\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($stream)\n\t\t\t\t{\n\t\t\t\t\t// Streams\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.cat_stream', array(\n\t\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed']\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($swf)\n\t\t\t\t{\n\t\t\t\t\t// Macromedia Flash Files\n\t\t\t\t\tlist($width, $height) = swf_getdimension($filename);\n\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.cat_swf', array(\n\t\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Viewed'],\n\t\t\t\t\t\t'WIDTH' => $width,\n\t\t\t\t\t\t'HEIGHT' => $height\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif ($link)\n\t\t\t\t{\n\t\t\t\t\t$upload_image = '';\n\n\t\t\t\t\tif ($config['upload_img'] != '' && $upload_icons[$extension] == '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$upload_image = '\"\"';\n\t\t\t\t\t}\n\t\t\t\t\telseif (trim($upload_icons[$extension]) != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$upload_image = '\"\"';\n\t\t\t\t\t}\n\n\t\t\t\t\t$target_blank = 'target=\"_blank\"';\n\n\t\t\t\t\t// display attachment\n\t\t\t\t\t$template->assign_block_vars('postrow.attach.attachrow', array(\n\t\t\t\t\t\t'U_DOWNLOAD_LINK' => $filename,\n\t\t\t\t\t\t'S_UPLOAD_IMAGE' => $upload_image,\n\n\t\t\t\t\t\t'DOWNLOAD_NAME' => $display_name,\n\t\t\t\t\t\t'FILESIZE' => $filesize,\n\t\t\t\t\t\t'SIZE_VAR' => $size_lang,\n\t\t\t\t\t\t'COMMENT' => $comment,\n\t\t\t\t\t\t'L_DOWNLOADED_VIEWED' => $lang['Downloaded'],\n\t\t\t\t\t\t'TARGET_BLANK' => $target_blank\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}\n\t}\n}","title":""},{"docid":"0952ad06b7660c41a8bd2013b3ba90d7","score":"0.5841036","text":"function BeforeShowEdit(&$xt, &$templatefile, $values, &$pageObject)\n{\n\n\t\t$pageObject->hideField(\"loop_type\");\n$pageObject->hideField(\"message_content\");\n$pageObject->hideField(\"attachment\");\n$pageObject->hideField(\"repeat\");\n$pageObject->hideField(\"repeat_type\");\n$pageObject->hideField(\"loop_value\");\n\nif($values['loop_type'] == '1'){\t\n\t$data = array();\n\t$data[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t$data[\"flag\"] = '2';\n\t$rs = DB::Select(\"outbox_line\", $data );\n\t$rs1 = DB::Select(\"outbox_mail_alibaba\", $data );\n\t$rs2 = DB::Select(\"outbox_mail_aws\", $data );\n\t$rs3 = DB::Select(\"outbox_mail_mailchimp\", $data );\n\t$rs4 = DB::Select(\"outbox_telegram\", $data );\n\t$rs5 = DB::Select(\"outbox_whatsapp\", $data );\n\n\t$i = 1;\n\twhile( $record = $rs->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs1->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs2->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs3->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs4->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\twhile( $record = $rs5->fetchAssoc() )\n\t{\n\t\t\t$i = 2;\n\t}\n\n\tif($i == 2){\n\t\tif($values['repeat'] > 0){\n\t\t\t$pageObject->showField(\"message_content\");\n\t\t\t$pageObject->showField(\"attachment\");\n\n\t\t\t$data2 = array();\n\t\t\t$data2[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t\t\t$rsa = DB::Select(\"outbox_line\", $data2 );\n\t\t\t$rs1a = DB::Select(\"outbox_mail_alibaba\", $data2 );\n\t\t\t$rs2a = DB::Select(\"outbox_mail_aws\", $data2 );\n\t\t\t$rs3a = DB::Select(\"outbox_mail_mailchimp\", $data2 );\n\t\t\t$rs4a = DB::Select(\"outbox_telegram\", $data2 );\n\t\t\t$rs5a = DB::Select(\"outbox_whatsapp\", $data2 );\n\n\t\t\t$data1 = array();\n\t\t\t$data1[\"member_agenda_id\"] = $values['member_agenda_id'];\n\t\t\t$data1[\"flag\"] = '1';\n\t\t\t$rs = DB::Select(\"outbox_line\", $data1 );\n\t\t\t$rs1 = DB::Select(\"outbox_mail_alibaba\", $data1 );\n\t\t\t$rs2 = DB::Select(\"outbox_mail_aws\", $data1 );\n\t\t\t$rs3 = DB::Select(\"outbox_mail_mailchimp\", $data1 );\n\t\t\t$rs4 = DB::Select(\"outbox_telegram\", $data1 );\n\t\t\t$rs5 = DB::Select(\"outbox_whatsapp\", $data1 );\n\t\t\t\n\t\t\t$a = 0;\n\t\t\t$b = 0;\n\t\t\t$c = 0;\n\t\t\t$d = 0;\n\t\t\t$e = 0;\n\t\t\t$f = 0;\n\t\t\tif($rsa->fetchAssoc()){\n\t\t\t\tif($rs->fetchAssoc()){\n\t\t\t\t\t$a = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$a = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif($rs1a->fetchAssoc()){\n\t\t\t\tif($rs1->fetchAssoc()){\n\t\t\t\t\t$b = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$b = 1;\n\t\t\t}\n\n\t\t\tif($rs2a->fetchAssoc()){\n\t\t\t\tif($rs2->fetchAssoc()){\n\t\t\t\t\t$c = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$c = 1;\n\t\t\t}\n\n\t\t\tif($rs3a->fetchAssoc()){\n\t\t\t\tif($rs3->fetchAssoc()){\n\t\t\t\t\t$d = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$d = 1;\n\t\t\t}\n\n\t\t\tif($rs4a->fetchAssoc()){\n\t\t\t\tif($rs4->fetchAssoc()){\n\t\t\t\t\t$e = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$e = 1;\n\t\t\t}\n\n\t\t\tif($rs5a->fetchAssoc()){\n\t\t\t\tif($rs5->fetchAssoc()){\n\t\t\t\t\t$f = 1;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$f = 1;\n\t\t\t}\n\n\t\t\tif($a == 0 || $b == 0 || $c == 0 || $d == 0 || $e == 0 || $f == 0){\n\t\t\t\t$pageObject->hideField(\"message_content\");\n\t\t\t\t$pageObject->hideField(\"attachment\");\n\t\t\t}\n\t\t}\n\t}else{\n\t\t$pageObject->showField(\"loop_value\");\n\t\t$pageObject->showField(\"message_content\");\n\t\t$pageObject->showField(\"attachment\");\n\t\tif($values['repeat'] > 0){\n\t\t\t$pageObject->showField(\"repeat\");\n\t\t\t$pageObject->showField(\"repeat_type\");\n\t\t}\n\t}\n}\n;\t\t\n}","title":""},{"docid":"0d9c385f58aef3813b4f85e6c597f69a","score":"0.5752342","text":"function Show_attachments_img($data=array()) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<lang->words['attach_size']} {$data['file_size']}, {$this->lang->words['attach_ahits']} {$data['attach_hits']}\">settings['upload_url']}/{$data['o_location']}\" class='bbc_img linked-image' alt=\"{$data['location']}\" />\n{parse expression=\"$this->registry->output->addMetaTag( 'og:image', \"{$this->settings['upload_url']}/{$data['o_location']}\", false )\"}\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}","title":""},{"docid":"ebe1de17f68e839342bcf2905716399b","score":"0.57322824","text":"function display_field($data)\n {\n $conf = $this->EE->config->item('channel_images');\n\n //----------------------------------------\n // Global Vars\n //----------------------------------------\n $vData = array();\n $vData['missing_settings'] = false;\n $vData['field_name'] = $this->field_name;\n $vData['field_id'] = $this->field_id;\n $vData['temp_key'] = $this->EE->localize->now;\n $vData['entry_id'] = ($this->EE->input->get_post('entry_id') != false) ? $this->EE->input->get_post('entry_id') : false;\n $vData['total_images'] = 0;\n $vData['assigned_images'] = array();\n\n //----------------------------------------\n // Add Global JS & CSS & JS Scripts\n //----------------------------------------\n $this->EE->image_helper->mcp_js_css('gjs');\n $this->EE->image_helper->mcp_js_css('css', 'channel_images_pbf.css?v='.CHANNEL_IMAGES_VERSION, 'channel_images', 'main');\n $this->EE->image_helper->mcp_js_css('css', 'jquery.colorbox.css', 'jquery', 'colorbox');\n $this->EE->image_helper->mcp_js_css('js', 'js/handlebars.runtime-v1.3.0.js', 'handlebars', 'runtime');\n $this->EE->image_helper->mcp_js_css('js', 'js/hbs-templates.js?v='.CHANNEL_IMAGES_VERSION, 'channel_images', 'templates');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.editable.js', 'jquery', 'editable');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.base64.js', 'jquery', 'base64');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.liveurltitle.js', 'jquery', 'liveurltitle');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.colorbox.js', 'jquery', 'colorbox');\n $this->EE->image_helper->mcp_js_css('js', 'jquery.jcrop.min.js', 'jquery', 'jcrop');\n $this->EE->image_helper->mcp_js_css('js', 'json2.js', 'json2', 'main');\n $this->EE->image_helper->mcp_js_css('js', 'swfupload.js', 'swfupload', 'main');\n $this->EE->image_helper->mcp_js_css('js', 'swfupload.queue.js', 'swfupload', 'queue');\n $this->EE->image_helper->mcp_js_css('js', 'swfupload.speed.js', 'swfupload', 'speed');\n\n $this->EE->image_helper->mcp_js_css('js', 'channel_images_pbf.js?v='.CHANNEL_IMAGES_VERSION, 'channel_images', 'main');\n\n $this->EE->cp->add_js_script(array(\n 'ui' => array('sortable', 'tabs')\n )\n );\n\n //----------------------------------------\n // Settings\n //----------------------------------------\n $settings = $this->EE->image_helper->grabFieldSettings($this->field_id, $this->settings);\n\n // Settings SET?\n if ( (isset($settings['action_groups']) == false OR empty($settings['action_groups']) == true) && (isset($settings['no_sizes']) == false OR $settings['no_sizes'] != 'yes') )\n {\n $vData['missing_settings'] = true;\n return $this->EE->load->view('pbf_field', $vData, true);\n }\n\n // Columns?\n if (isset($settings['columns']) == false) $settings['columns'] = $this->EE->config->item('ci_columns');\n\n // Stored Images\n if (isset($settings['show_stored_images']) == false) $settings['show_stored_images'] = $defaults['show_stored_images'];\n\n\n // Limit Images?\n if (isset($settings['image_limit']) == false OR trim($settings['image_limit']) == false) $settings['image_limit'] = 999999;\n\n if (isset($this->session->cache['ChannelImages']['PerImageActionHolder']) == false && $settings['allow_per_image_action'] == 'yes')\n {\n $vData['actions'] = &$this->EE->image_helper->get_actions();\n $this->session->cache['ChannelImages']['PerImageActionHolder'] = true;\n }\n\n $vData['settings'] = $settings;\n\n\n //----------------------------------------\n // Field JSON\n //----------------------------------------\n $vData['field_json'] = array();\n $vData['field_json']['key'] = $vData['temp_key'];\n $vData['field_json']['field_name'] = $this->field_name;\n $vData['field_json']['field_label'] = $this->settings['field_label'];\n $vData['field_json']['settings'] = $vData['settings'];\n $vData['field_json']['categories'] = array();\n\n // Add Categories\n if (isset($settings['categories']) == true && empty($settings['categories']) == false)\n {\n $vData['field_json']['categories'][''] = '';\n foreach ($settings['categories'] as $cat) $vData['field_json']['categories'][$cat] = $cat;\n }\n\n // Remove some unwanted stuff\n unset($vData['field_json']['settings']['categories']);\n unset($vData['field_json']['settings']['locations']);\n unset($vData['field_json']['settings']['import_path']);\n\n //----------------------------------------\n // JS Templates\n //----------------------------------------\n $vData['js_templates'] = false;\n if (isset( $this->EE->session->cache['ChannelImages']['JSTemplates'] ) === false)\n {\n $vData['js_templates'] = true;\n $this->EE->session->cache['ChannelImages']['JSTemplates'] = true;\n\n $vData['langjson'] = array();\n\n foreach ($this->EE->lang->language as $key => $val)\n {\n if (strpos($key, 'ci:json:') === 0)\n {\n $vData['langjson'][substr($key, 8)] = $val;\n unset($this->EE->lang->language[$key]);\n }\n\n }\n\n $vData['langjson'] = $this->EE->image_helper->generate_json($vData['langjson']);\n }\n\n //----------------------------------------\n // Auto-Saved Entry?\n //----------------------------------------\n if ($this->EE->input->get('use_autosave') == 'y')\n {\n $vData['entry_id'] = false;\n $old_entry_id = $this->EE->input->get_post('entry_id');\n $query = $this->EE->db->select('original_entry_id')->from('exp_channel_entries_autosave')->where('entry_id', $old_entry_id)->get();\n if ($query->num_rows() > 0 && $query->row('original_entry_id') > 0) $vData['entry_id'] = $query->row('original_entry_id');\n }\n\n //----------------------------------------\n // Existing Entry?\n //----------------------------------------\n if ($vData['entry_id'] != false)\n {\n // -----------------------------------------\n // Grab all Images\n // -----------------------------------------\n $this->EE->db->select('*');\n $this->EE->db->from('exp_channel_images');\n $this->EE->db->where('entry_id', $vData['entry_id']);\n $this->EE->db->where('field_id', $this->field_id);\n\n $is_draft = 0;\n\n if (isset($this->EE->publisher_lib) === true && isset($this->EE->publisher_lib->status) ==- true) {\n if ($this->EE->publisher_lib->status == 'draft') {\n $is_draft = 1;\n }\n } else if (isset($this->EE->session->cache['ep_better_workflow']['is_draft']) && $this->EE->session->cache['ep_better_workflow']['is_draft']) {\n $is_draft = 1;\n }\n\n\n $this->EE->db->where('is_draft', $is_draft);\n\n if ($vData['settings']['cover_first'] == 'yes') $this->EE->db->order_by('cover', 'desc');\n $this->EE->db->order_by('image_order');\n $query = $this->EE->db->get();\n\n // -----------------------------------------\n // Which Previews?\n // -----------------------------------------\n if (isset($settings['small_preview']) == false OR $settings['small_preview'] == false)\n {\n $temp = reset($settings['action_groups']);\n $settings['small_preview'] = $temp['group_name'];\n }\n\n if (isset($settings['big_preview']) == false OR $settings['big_preview'] == false)\n {\n $temp = reset($settings['action_groups']);\n $settings['big_preview'] = $temp['group_name'];\n }\n\n // Preview URL\n $preview_url = $this->EE->image_helper->get_router_url('url', 'simple_image_url');\n\n foreach ($query->result() as $image)\n {\n // We need a good field_id to continue\n $image->field_id = $this->EE->channel_images_model->get_field_id($image);\n\n // Is it a linked image?\n // Then we need to \"fake\" the channel_id/field_id\n if ($image->link_image_id >= 1)\n {\n $image->entry_id = $image->link_entry_id;\n $image->field_id = $image->link_field_id;\n $image->channel_id = $image->link_channel_id;\n }\n\n // Just in case lets try to get the field_id again\n $image->field_id = $this->EE->channel_images_model->get_field_id($image);\n\n // Get settings for that field..\n $temp_settings = $this->EE->channel_images_model->get_field_settings($image->field_id);\n\n $act_url_params = \"&amp;fid={$image->field_id}&amp;d={$image->entry_id}\";\n\n if ( empty($settings['action_groups']) == false && (isset($settings['no_sizes']) == false OR $settings['no_sizes'] != 'yes') )\n {\n // Display SIzes URL\n $small_filename = str_replace('.'.$image->extension, \"__{$settings['small_preview']}.{$image->extension}\", urlencode($image->filename) );\n $big_filename = str_replace('.'.$image->extension, \"__{$settings['big_preview']}.{$image->extension}\", urlencode($image->filename) );\n\n if ($this->EE->config->item('ci_encode_filename_url') == 'yes')\n {\n $small_filename = base64_encode($small_filename);\n $big_filename = base64_encode($big_filename);\n }\n\n $image->small_img_url = \"{$preview_url}&amp;f={$small_filename}{$act_url_params}\";\n $image->big_img_url = \"{$preview_url}&amp;f={$big_filename}{$act_url_params}\";\n }\n else\n {\n $small_filename = $image->filename;\n $big_filename = $image->filename;\n\n if ($this->EE->config->item('ci_encode_filename_url') == 'yes')\n {\n $small_filename = base64_encode($small_filename);\n $big_filename = base64_encode($big_filename);\n }\n\n // Display SIzes URL\n $image->small_img_url = \"{$preview_url}&amp;f={$small_filename}{$act_url_params}\";\n $image->big_img_url = \"{$preview_url}&amp;f={$big_filename}{$act_url_params}\";\n }\n\n // ReAssign Field ID (WE NEED THIS)\n $image->field_id = $this->field_id;\n\n $image->title = html_entity_decode( str_replace('&quot;', '\"', $image->title), ENT_QUOTES);\n $image->description = html_entity_decode( str_replace('&quot;', '\"', $image->description), ENT_QUOTES);\n $image->cifield_1 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_1), ENT_QUOTES);\n $image->cifield_2 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_2), ENT_QUOTES);\n $image->cifield_3 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_3), ENT_QUOTES);\n $image->cifield_4 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_4), ENT_QUOTES);\n $image->cifield_5 = html_entity_decode( str_replace('&quot;', '\"', $image->cifield_5), ENT_QUOTES);\n\n // On some systems characters are not passed on as UTF-8, json_encode only works with UTF-8 chars.\n // This \"hack\" forces utf-8 encoding, good for swedisch chars etc\n if (isset($conf['utf8_encode_fields_for_json']) === true && $conf['utf8_encode_fields_for_json'] == 'yes') {\n $image->title = utf8_encode($image->title);\n $image->description = utf8_encode($image->description);\n $image->cifield_1 = utf8_encode($image->cifield_1);\n $image->cifield_2 = utf8_encode($image->cifield_2);\n $image->cifield_3 = utf8_encode($image->cifield_3);\n $image->cifield_4 = utf8_encode($image->cifield_4);\n $image->cifield_5 = utf8_encode($image->cifield_5);\n }\n\n\n // Fix utf chars once and for all\n // $image->title = base64_encode($image->title);\n // $image->description = base64_encode($image->description);\n // $image->cifield_1 = base64_encode($image->cifield_1);\n // $image->cifield_2 = base64_encode($image->cifield_2);\n // $image->cifield_3 = base64_encode($image->cifield_3);\n // $image->cifield_4 = base64_encode($image->cifield_4);\n // $image->cifield_5 = base64_encode($image->cifield_5);\n\n\n\n $vData['assigned_images'][] = $image;\n\n unset($image);\n }\n\n $vData['total_images'] = $query->num_rows();\n }\n\n //var_dump($vData);\n\n //----------------------------------------\n // Form Submission Error?\n //----------------------------------------\n if (isset($_POST[$this->field_name]) OR isset($_POST['field_id_' . $this->field_id]))\n {\n // Post DATA?\n if (isset($_POST[$this->field_name])) {\n $data = $_POST[$this->field_name];\n }\n\n if (isset($_POST['field_id_' . $this->field_id])) {\n $data = $_POST['field_id_' . $this->field_id];\n }\n\n // First.. The Key!\n $vData['field_json']['key'] = $data['key'];\n $vData['temp_key'] = $data['key'];\n\n if (isset($data['images']) == true)\n {\n $vData['assigned_images'] = '';\n\n // Preview URL\n $preview_url = $this->EE->image_helper->get_router_url('url', 'simple_image_url');\n\n foreach($data['images'] as $num => $img)\n {\n $img = $this->EE->image_helper->decode_json(html_entity_decode($img['data']));\n\n // Existing? lets get it!\n if ($img->image_id > 0)\n {\n $image = $img;\n }\n else\n {\n $image = $img;\n\n if ($image->link_image_id > 0)\n {\n continue;\n }\n\n $image->image_id = 0;\n $image->extension = substr( strrchr($image->filename, '.'), 1);\n $image->field_id = $this->field_id;\n\n // Display SIzes URL\n $image->small_img_url = $preview_url . '&amp;temp_dir=yes&amp;fid='.$this->field_id.'&amp;d=' . $vData['temp_key'] . '&amp;f=' . str_replace('.'.$image->extension, \"__{$settings['small_preview']}.{$image->extension}\", $image->filename);\n $image->big_img_url = $preview_url . '&amp;temp_dir=yes&amp;fid='.$this->field_id.'&amp;d=' . $vData['temp_key'] . '&amp;f=' . str_replace('.'.$image->extension, \"__{$settings['big_preview']}.{$image->extension}\", $image->filename);\n }\n\n // We need a good field_id to continue\n $image->field_id = $this->EE->channel_images_model->get_field_id($image);\n\n // Is it a linked image?\n // Then we need to \"fake\" the channel_id/field_id\n if ($image->link_image_id >= 1)\n {\n $image->entry_id = $image->link_entry_id;\n $image->field_id = $image->link_field_id;\n $image->channel_id = $image->link_channel_id;\n }\n\n // Just in case lets try to get the field_id again\n $image->field_id = $this->EE->channel_images_model->get_field_id($image);\n\n // ReAssign Field ID (WE NEED THIS)\n $image->field_id = $this->field_id;\n\n // Fix utf chars once and for all\n // $image->title = base64_encode($image->title);\n // $image->description = base64_encode($image->description);\n // $image->cifield_1 = base64_encode($image->cifield_1);\n // $image->cifield_2 = base64_encode($image->cifield_2);\n // $image->cifield_3 = base64_encode($image->cifield_3);\n // $image->cifield_4 = base64_encode($image->cifield_4);\n // $image->cifield_5 = base64_encode($image->cifield_5);\n\n $vData['assigned_images'][] = $image;\n\n unset($image);\n }\n }\n }\n\n $vData['field_json']['images'] = $vData['assigned_images'];\n $vData['field_json'] = base64_encode($this->EE->image_helper->generate_json($vData['field_json']));\n // Base64encode why? Safecracker loves to mess with quotes/unicode etc!!\n\n return $this->EE->load->view('pbf_field', $vData, true);\n }","title":""},{"docid":"bf797dcd278376c3b72c31bc6c4cf856","score":"0.56509656","text":"function list_attachment($link,$proposal_id)\n{\n\n\t\techo '';\n\t\techo '';\t\nforeach($GLOBALS['attachment_type'] as $key =>$value)\n\t{\n\t\t$sql='select * from attachment \n\t\t\t\twhere \n\t\t\t\t\tproposal_id=\\''.$proposal_id.'\\' \n\t\t\t\t\tand\n\t\t\t\t\ttype=\\''.$value.'\\' \n\t\t\t\torder by\n\t\t\t\t\tdate_time';\n\t\t\t\t\t\n\t\t$result=run_query($link,'research',$sql);\n\n\t\t$prev_type='';\n\t\twhile($ar=get_single_row($result))\n\t\t{\n\t\t\t$applicant_id=get_applicant_id($link,$proposal_id);\n\n\t\t\tif($ar['forwarded']==0)\t\t\t//all circumstances\n\t\t\t{\n\t\t\t\tif($prev_type!=$ar['type'])\n\t\t\t\t{\n\t\t\t\t\techo '';\n\t\t\t\t}\n\t\t\t\techo '\n\t\t\t\t\t\t\n\t\t\t\t\t\t';\n\t\t\t\techo '';\n\t\t\t\t$prev_type=$ar['type'];\n\t\t\t}\n\t\t\t//if 1 and PG teacher =>show download, show forward\n\t\t\t//if 1 and student =>show download, donot show forward\n\t\t\t//if 1 and SRCM/ECM/SRCMS/ECMS=> donot show anything\t\t\t\n\t\t\telseif($ar['forwarded']==1 && $applicant_id==$_SESSION['login'])\t//PG teacher login\n\t\t\t{\n\t\t\t\tif($prev_type!=$ar['type'])\n\t\t\t\t{\n\t\t\t\t\techo '';\n\t\t\t\t}\n\t\t\t\techo '\n\t\t\t\t\t\t\n\t\t\t\t\t\t';\n\t\t\t\techo '';\n\t\t\t\t$prev_type=$ar['type'];\n\t\t\t}\n\n\t\t\telseif($ar['forwarded']==1 && !get_user_info($link,$_SESSION['login']))\t//Department login\n\t\t\t{\n\t\t\t\tif($prev_type!=$ar['type'])\n\t\t\t\t{\n\t\t\t\t\techo '';\n\t\t\t\t}\n\t\t\t\techo '\n\t\t\t\t\t\t\n\t\t\t\t\t\t';\n\t\t\t\techo '';\n\t\t\t\t$prev_type=$ar['type'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//donot show if not forwarded and you are not PG teacher or PG student\n\t\t\t}\t\t\t\n\t\t}\t\n\t}\n\t\techo '
    Attachment TypeVersionDocument
    '.$ar['type'].'
    '.$ar['type'].''.$ar['date_time'].'';\n\t\t\t\tif(strlen($ar['attachment'])>0)\n\t\t\t\t\t{\n\t\t\t\t\techo_download_button('attachment','attachment','id',$ar['id'],''.$proposal_id.'-'.$ar['type'].'-'.$ar['id'].'-'.$ar['attachment_name']);\n\t\t\t\t}\n\t\t\t\tshow_forward_attachment_button($link,$ar['id']);\n\t\t\t\techo '
    '.$ar['type'].'
    '.$ar['type'].''.$ar['date_time'].'';\n\t\t\t\tif(strlen($ar['attachment'])>0)\n\t\t\t\t\t{\n\t\t\t\t\techo_download_button('attachment','attachment','id',$ar['id'],''.$proposal_id.'-'.$ar['type'].'-'.$ar['id'].'-'.$ar['attachment_name']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tshow_forward_attachment_button($link,$ar['id']);\n\t\t\t\techo '
    '.$ar['type'].'
    '.$ar['type'].''.$ar['date_time'].'';\n\t\t\t\tif(strlen($ar['attachment'])>0)\n\t\t\t\t{\n\t\t\t\t\techo_download_button('attachment','attachment','id',$ar['id'],''.$proposal_id.'-'.$ar['type'].'-'.$ar['id'].'-'.$ar['attachment_name']);\n\t\t\t\t}\n\t\t\t\tshow_forward_attachment_button($link,$ar['id']);\n\t\t\t\t\n\t\t\t\techo '
    ';\n\t\n}","title":""},{"docid":"cc3908b6003d9881cabd3db57bf70076","score":"0.5591752","text":"function module_display($parameters){\r\n\t\t$wo_owner_id= $this->check_parameters($parameters,\"wo_owner_id\",-1);\r\n\t\t$cmd = $this->check_parameters($parameters,\"command\");\r\n\t\t$pos = $this->check_parameters($parameters,\"__layout_position\");\r\n\t\tif (($pos==2 || $pos==3) && $cmd!=\"\"){\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t$image_list\t= \"\";\r\n\t\t$out \t\t= \"\";\r\n\t\t$where=\"\";\r\n\t\tif ($wo_owner_id !=-1){\r\n\t\t\t$where = \" irl_identifier=$wo_owner_id and \";\r\n\t\t}\r\n\t\t$irl_number = -1;\r\n\t\t$sql \t\t= \"select * from imagerotate_list\r\n\t\t\t\t\t\t\tleft outer join menu_to_object on \r\n\t\t\t\t\t\t\t\t(mto_client = irl_client and mto_object=irl_identifier and mto_module='$this->webContainer' and \r\n\t\t\t\t\t\t\t\t\t(mto_menu=\".$parameters[\"current_menu_location\"].\" or \r\n\t\t\t\t\t\t\t\t\t\t(mto_menu is null and irl_all_locations=1)\r\n\t\t\t\t\t\t\t\t\t) and mto_publish=1\r\n\t\t\t\t\t\t\t\t) \r\n\t\t\t\t\t where \r\n\t\t\t\t\t $where \r\n\t\t\t \t\t\t(mto_menu=\".$parameters[\"current_menu_location\"].\" or (mto_menu is null and irl_all_locations=1)) and \r\n\t\t\t\t\t irl_client= $this->client_identifier\";\r\n//\t\tprint $sql;\r\n\t\t$result = $this->call_command(\"DB_QUERY\",Array($sql));\r\n\t\t$max = count($this->previewed);\r\n\t\twhile($r = $this->call_command(\"DB_FETCH_ARRAY\",Array($result))){\r\n\t\t\t$ok = 1;\r\n\t\t\t$irl_identifier\t\t\t\t= $r[\"irl_identifier\"];\r\n\t\t\tfor ($index=0;$index<$max;$index++){\r\n\t\t\t\tif ($this->previewed[$index] == $irl_identifier){\r\n\t\t\t\t\t$ok = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif ($ok==1){\r\n\t//\t \tprint \" Label :: \t\t\t\".$r[\"irl_label\"];\r\n\t// \tprint \" Identifier :: \t\t\".$r[\"irl_identifier\"];\r\n\t// \tprint \" Number to show ::\t\".$r[\"irl_number\"];\r\n\t\t\t\t$irl_number\t\t\t\t\t= $r[\"irl_number\"];\r\n\t\t\t\t$irl_type\t\t\t\t\t= $r[\"irl_type\"];\r\n\t\t\t\t$irl_direction\t\t\t\t= $r[\"irl_direction\"];\r\n\t\t\t\t$irl_width\t\t\t\t\t= $this->check_parameters($r,\"irl_width\",0);\r\n\t\t\t\t$irl_height\t\t\t\t\t= $this->check_parameters($r,\"irl_height\",0);\r\n\t\t\t\t$irl_vspace\t\t\t\t\t= $this->check_parameters($r,\"irl_vspace\",0);\r\n\t\t\t\t$irl_hspace\t\t\t\t\t= $this->check_parameters($r,\"irl_hspace\",0);\r\n\t\t\t\t$irl_align\t\t\t\t\t= $this->check_parameters($r,\"irl_align\",0);\r\n\t\t\t\tif ($irl_align==0){\r\n\t\t\t\t\t$irl_align = \"alignleft\";\r\n\t\t\t\t} else if($irl_align==1){\r\n\t\t\t\t\t$irl_align = \"aligncenter\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$irl_align = \"alignright\";\r\n\t\t\t\t}\r\n\t\t\t\t$sql = \"select * from imagerotate_filelist\r\n\t\t\t\t\t\t\tinner join file_info on (file_identifier = irlf_file and irlf_client = file_client)\r\n\t\t\t\t\t\t where irlf_list = $irl_identifier and irlf_client = $this->client_identifier \r\n\t\t\t\t\t\t order by irlf_rank\";\r\n\t\t\t\t$fileresult = $this->call_command(\"DB_QUERY\",Array($sql));\r\n\t\t\t\t$numfiles\t= $this->call_command(\"DB_NUM_ROWS\",Array($fileresult));\r\n\t\t\t\t$c=0;\r\n\t\t\t\t$image_list = Array();\r\n\t \t while ($filerecord = $this->call_command(\"DB_FETCH_ARRAY\",Array($fileresult))){\r\n\t\t\t\t\t$dir_path = $this->call_command(\"LAYOUT_GET_DIRECTORY_PATH\",Array($filerecord[\"file_directory\"]));\r\n\t\t\t\t\t$destination_filename = $dir_path.$filerecord[\"file_md5_tag\"].$this->file_extension($filerecord[\"file_name\"]);\r\n\t \t\t$image_list[$c]=Array(\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\",0);\r\n\t\t\t\t\t$c++;\r\n\t\t\t\t\t// (\".$filerecord[\"file_size\"].\")\r\n\t \t }\r\n\t\t\t\t$this->call_command(\"DB_FREE\",Array($fileresult));\r\n\t\t\t\t$images = \"\";\r\n\t\t\t\tif ($irl_type==0){\r\n\t\t\t\t\t$max = ($numfiles>$irl_number)?$irl_number:$numfiles;\r\n\t\t\t\t\tfor($i = 0; $i<$max ; $i ++){\r\n\t\t\t\t\t\t$found=0;\r\n\t\t\t\t\t\twhile ($found==0){\r\n\t\t\t\t\t\t\t$index = rand(0,$numfiles-1);\r\n\t\t\t\t\t\t\tif ($image_list[$index][1]==0){\r\n\t\t\t\t\t\t\t\t$found=1;\r\n\t\t\t\t\t\t\t\t$images .= $image_list[$index][0];\r\n\t\t\t\t\t\t\t\t$image_list[$index][1]=1;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if ($irl_type==1){\r\n\t\t\t\t\t$listOfImages = $this->check_parameters($_SESSION,\"IR_\".$irl_identifier,Array());\r\n\t\t\t\t\tif (count($listOfImages)==0){\r\n\t\t\t\t\t\t$max = ($numfiles>$irl_number) ? $irl_number : $numfiles ;\r\n\t\t\t\t\t\tfor($i = 0; $i<$max ; $i ++){\r\n\t\t\t\t\t\t\t$found=0;\r\n\t\t\t\t\t\t\twhile ($found==0){\r\n\t\t\t\t\t\t\t\t$index = rand(0,$numfiles-1);\r\n\t\t\t\t\t\t\t\tif ($image_list[$index][1]==0){\r\n\t\t\t\t\t\t\t\t\t$found=1;\r\n\t\t\t\t\t\t\t\t\t$images .= $image_list[$index][0];\r\n\t\t\t\t\t\t\t\t\t$image_list[$index][1]=1;\r\n\t\t\t\t\t\t\t\t\t$listOfImages[$i] = $index;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$_SESSION[\"IR_\".$irl_identifier] = $listOfImages;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$max = count($listOfImages);\r\n\t\t\t\t\t\tfor($i = 0; $i<$max ; $i ++){\r\n\t\t\t\t\t\t\t$images .= $image_list[$listOfImages[$i]][0];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$index = $this->check_parameters($_SESSION,\"IRI_\".$irl_identifier,0);\r\n\t\t\t\t\t$max = ($numfiles>$irl_number) ? $irl_number : $numfiles;\r\n\t\t\t\t\tif ($this->check_parameters($_SESSION,\"IRI_\".$irl_identifier,0)>=$numfiles){\r\n\t\t\t\t\t\t$_SESSION[\"IRI_\".$irl_identifier] = 0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$_SESSION[\"IRI_\".$irl_identifier] = $index + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($index >= $numfiles){\r\n\t\t\t\t\t\t$index=0;\r\n\t\t\t\t\t\t$_SESSION[\"IRI_\".$irl_identifier] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfor($i = 0; $i<$max ; $i ++){\r\n\t\t\t\t\t\t$images .= $image_list[$index][0];\r\n\t\t\t\t\t\t$index++;\r\n\t\t\t\t\t\tif ($index >= $numfiles){\r\n\t\t\t\t\t\t\t$index=0;\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\t$dir = ($irl_direction==1)?\"vertical\":\"horizontal\";\r\n\t\t\t\t$out .= \"module_name.\"\\\" display=\\\"IMAGELIST\\\">\";\r\n\t\t\t\t$out .= \"\t\";\r\n\t\t\t\t$out .= \"\t$images\";\r\n\t\t\t\t$out .= \"\";\r\n\t\t\t}\r\n }\r\n $this->call_command(\"DB_FREE\",Array($result));\r\n\t\treturn $out;\r\n\t}","title":""},{"docid":"62eae4e379ccb9c91d865022eda40e2f","score":"0.55894893","text":"public function core_admin_display_page_attachments_edit_end($tpl_vars)\n {\n //$tpl_vars are the template vars sent to view class...\n\n if (!isset($tpl_vars['addon']) || $tpl_vars['addon'] != 'example' || $tpl_vars['pageName'] != 'examplePage') {\n //we checked to make sure the page attachments being edited were for\n //this addon, and for a specific page (examplePage which does not actually exist)\n\n //since this is not for the specific page, don't do anything.\n return;\n }\n\n //would do something here, perhaps change the template used to display\n //the page in a format more useful for how this page use's things.\n\n //For example, the storefront addon changes it to make more sense since\n //it re-tasks the category ID to be the template ID selected by each user,\n //to allow each storefront user to specify a specific template...\n }","title":""},{"docid":"10e7b8677e3f1ca46b310c340af61ced","score":"0.556062","text":"function display_pm_attachments($privmsgs_id, $switch_attachment)\n{\n\tglobal $config, $user, $template, $lang;\n\n\tif ($user->data['user_level'] == ADMIN)\n\t{\n\t\t$auth_download = 1;\n\t}\n\telse\n\t{\n\t\t$auth_download = intval($config['allow_pm_attach']);\n\t}\n\n\tif (intval($switch_attachment) == 0 || intval($config['disable_attachments_mod']) || !$auth_download)\n\t{\n\t\treturn;\n\t}\n\n\tdisplay_attachments($privmsgs_id, 'postrow');\n\n\t$template->assign_block_vars('switch_attachments', array());\n\t$template->assign_vars(array(\n\t\t'L_DELETE_ATTACHMENTS' => $lang['Delete_attachments']\n\t\t)\n\t);\n}","title":""},{"docid":"6188c9d5d1783cba6dad3fc17637d99f","score":"0.55547684","text":"protected function prepareDisplaySetting()\n {\n if ($this->fixture->hasData('landing_page')) {\n $this->fields['general']['landing_page'] = $this->getBlockId($this->fixture->getLandingPage());\n }\n\n $this->prepareAvailableSortBy();\n\n $useConfig = array_diff($this->dataUseConfig, array_keys($this->fields['general']));\n if (!empty($useConfig)) {\n $this->fields['use_config'] = $useConfig;\n }\n unset($this->fields['general']['use_config']);\n }","title":""},{"docid":"0eff7f47bc08700f3ccee7a466d5fe61","score":"0.55531645","text":"function attachments()\n\t{\n if($this->_user->id === 0)\n {\n\t $this->cacheAction = Configure::read('Cache.expires');\n }\n\n\t\t$this->EverywhereAfterFind = true;\n\n\t\t$listing_id = 0;\n\n\t\t$extension = '';\n\n\t\t$listing = array();\n\n\t\t$media_id = Sanitize::getString($this->params,'media_id');\n\n\t\tif($media_id && $listing_info = $this->Media->getListingInfo($media_id)) {\n\n\t\t\textract($listing_info);\n\t\t}\n\t\telse {\n\n\t\t\t$id = explode(':',base64_decode(urldecode(Sanitize::getString($this->params,'id'))));\n\n\t\t\t$listing_id = (int) array_shift($id);\n\n\t\t\t$extension = array_shift($id);\n\n\t\t}\n\n\t\tif(!$listing_id) {\n\t\t\treturn cmsFramework::noAccess();\n\t\t}\n\n\t\t$sort = Sanitize::getString($this->params,'order',Sanitize::getString($this->Config,'attachment_order_default'));\n\n\t\t$this->Media->processSorting($sort);\n\n\t\t$conditions = array(\n\t\t\t'Media.listing_id = ' . $listing_id,\n\t\t\t'Media.media_type = \"attachment\"'\n\t\t);\n\n\t\tif(!$this->Access->isManager()) {\n\t\t\t$conditions[] = 'Media.published = 1';\n\t\t\t$conditions[] = 'Media.approved = 1';\n\t\t}\n\n\t\t$attachments = $this->Media->findAll(array('conditions'=>$conditions));\n\n\t\t$this->set(array(\n\t\t\t'media_id'=>$media_id,\n\t\t\t'listing_id'=>$listing_id,\n\t\t\t'attachments'=>$attachments\n\t\t));\n\n\t\treturn $this->render('media','attachments');\n\t}","title":""},{"docid":"4093fe2925220bced76e01e4e297a727","score":"0.5541842","text":"function init_display_template($template_var, $replacement, $filename = 'viewtopic_attach_body.tpl')\n{\n\tglobal $template, $config;\n\n\t// This function is adapted from the old template class\n\t// I wish i had the functions from the 3.x one. :D (This class rocks, can't await to use it in Mods)\n\n\t// Handle Attachment Informations\n\tif (!isset($template->uncompiled_code[$template_var]) && empty($template->uncompiled_code[$template_var]))\n\t{\n\t\t// If we don't have a file assigned to this handle, die.\n\t\tif (!isset($template->files[$template_var]))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): No file specified for handle $template_var\");\n\t\t}\n\n\t\t$filename_2 = $template->files[$template_var];\n\n\t\t$str = implode('', @file($filename_2));\n\t\tif (empty($str))\n\t\t{\n\t\t\tdie(\"Template->loadfile(): File $filename_2 for handle $template_var is empty\");\n\t\t}\n\n\t\t$template->uncompiled_code[$template_var] = $str;\n\t}\n\n\t$complete_filename = $filename;\n\tif (substr($complete_filename, 0, 1) != '/')\n\t{\n\t\t$complete_filename = $template->root . '/' . $complete_filename;\n\t\tif (!file_exists($complete_filename))\n\t\t{\n\t\t\t$complete_filename = IP_ROOT_PATH . 'templates/' . $config['xs_def_template'] . '/' . $filename;\n\t\t}\n\t}\n\n\tif (!file_exists($complete_filename))\n\t{\n\t\tdie(\"Template->make_filename(): Error - file $complete_filename does not exist\");\n\t}\n\n\t$content = implode('', file($complete_filename));\n\tif (empty($content))\n\t{\n\t\tdie('Template->loadfile(): File ' . $complete_filename . ' is empty');\n\t}\n\n\t// replace $replacement with uncompiled code in $filename\n\t$template->uncompiled_code[$template_var] = str_replace($replacement, $content, $template->uncompiled_code[$template_var]);\n\n\t// Force Reload on cached version\n\tdisplay_compile_cache_clear($template->files[$template_var], $template_var);\n}","title":""},{"docid":"723fbd3adcc657be4c8c4e0faaab978a","score":"0.5516555","text":"function Show_attachments_img_thumb($data=array()) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<lang->words['attach_size']} {$data['file_size']}, {$this->lang->words['attach_ahits']} {$data['attach_hits']}\">settings['upload_url']}/{$data['t_location']}\" id='ipb-attach-img-{$data['_attach_id']}' style='width:{$data['t_width']};height:{$data['t_height']}' class='attach' width=\"{$data['t_width']}\" height=\"{$data['t_height']}\" alt=\"{$data['location']}\" />\n{parse expression=\"$this->registry->output->addMetaTag( 'og:image', \"{$this->settings['upload_url']}/{$data['t_location']}\", false )\"}\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}","title":""},{"docid":"e7c40c3f90a3f7abbd15c2f59d4910a9","score":"0.5501987","text":"function apptivo_ecommerce_populate_custom_fields() {\n\t// Attachment exclusion\n\t$args = array( \n\t\t'post_type' \t=> 'attachment', \n\t\t'numberposts' \t=> -1, \n\t\t'post_status' \t=> null, \n\t\t'fields' \t\t=> 'ids'\n\t); \n\t$attachments = get_posts($args);\n\tif ($attachments) foreach ($attachments as $id) :\n\t\tadd_post_meta($id, '_apptivo_ecommerce_exclude_image', 0);\n\tendforeach;\t\n}","title":""},{"docid":"a23a1b1100d6d998c4c0c11be3bb2568","score":"0.547538","text":"function ufl_display_attached_items_list($atts, $content = null) {\n\textract(shortcode_atts(array(\n\t\t'filetype' => 'pdf',\n\t\t'showdesc' => 'false',\n\t\t'order' => 'asc',\n\t\t'orderby' => 'name',\n\t\t'showasdates' => 'false',\n\t\t'dateformat' => 'F j, Y',\n\t\t'exclude' => '',\n\t\t'outputtype' => 'list',\n\t\t'limit' => '-1'\n\t), $atts));\n\tglobal $post;\n\t// List of mime types\n\t$mime_types = array(\n\t\t\"pdf\"=>\"application/pdf\",\"zip\"=>\"application/zip\",\"docx\"=>\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\",\"doc\"=>\"application/msword\",\"xls\"=>\"application/vnd.ms-excel\",\"xlsx\"=>\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\",\"ppt\"=>\"application/vnd.ms-powerpoint\",\"pptx\"=>\"application/vnd.openxmlformats-officedocument.presentationml.presentation\",\"gif\"=>\"image/gif\",\"png\"=>\"image/png\",\"jpeg\"=>\"image/jpg\",\"jpg\"=>\"image/jpg\",\"mp3\"=>\"audio/mpeg\",\"wav\"=>\"audio/x-wav\",\"mpeg\"=>\"video/mpeg\",\"mpg\"=>\"video/mpeg\",\"mpe\"=>\"video/mpeg\",\"mov\"=>\"video/quicktime\",\"avi\"=>\"video/x-msvideo\"\n\t);\n\t$args = array( 'orderby' => $orderby, 'order' => $order, 'post_type' => 'attachment', 'numberposts' => $limit, 'post_status' => null, 'post_parent' => $post->ID, 'exclude' => $exclude );\n\tif ( $filetype != \"all\" ) {\n\t\t$short_mime_types = explode(\",\", $filetype);\n\t\tforeach ($short_mime_types as $key => $short) {\n\t\t\t$types[] = $mime_types[$short];\n\t\t}\n\t\t$mimes = array( 'post_mime_type' => $types );\n\t\t$args = array_merge( $args, $mimes );\n\t}\n\t$attachments = get_posts($args);\n\tif ( $attachments ) {\n\t\tif ( $outputtype == 'list' ) {\n\t\t\t// Build UL to return if items were found.\n\t\t\t$out = '
      ';\n\t\t\tforeach ( $attachments as $attachment ) {\n\t\t\t\t// If the last 8 characters in the attachment title are a timestamp (e.g. filename-20120927),\n\t\t\t\tif ( $showasdates == 'true' && is_numeric( substr( $attachment->post_title, -8 ) ) ) {\n\t\t\t\t\t// Use the date as the link text instead of the title\n\t\t\t\t\t$link_text = date( $dateformat, strtotime( substr( $attachment->post_title, -8 ) ) );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// Use the default link text, which is the attachment title\n\t\t\t\t\t$link_text = false;\n\t\t\t\t}\n\t\t\t\t$out .= '
    • ' . wp_get_attachment_link( $attachment->ID , false, false, false, $link_text ) . ' (' . strtoupper( array_search( get_post_mime_type( $attachment->ID ), $mime_types ) ) . ')';\n\t\t\t\tif ($showdesc == 'true') { $out .= '

      '.$attachment->post_content.'

      '; }\n\t\t\t\t$out .= '
    • ';\n\t\t\t}\n\t\t\t$out .= '
    ';\n\t\t} elseif ( $outputtype == 'single' && $limit == '1' ) {\n\t\t\tforeach ( $attachments as $attachment ) {\n\t\t\t\t$out = wp_get_attachment_link( $attachment->ID , false, false, false, $link_text ) . ' (' . strtoupper( array_search( get_post_mime_type( $attachment->ID ), $mime_types ) ) . ')';\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// Return blank string if there is nothing attached.\n\t\t$out = '';\n\t}\n\treturn $out;\n}","title":""},{"docid":"81ce0bd77b5464386fa33e4c024cfa5e","score":"0.5460727","text":"function posts_display_extend($atts){\n\tob_start();\n\t $a = shortcode_atts(array('handle'=>'-1', 'default_image'=>'//i.imgur.com/p4juyuT.png', 'display' => 3, 'offset' => 0, 'total' => 10, 'list' => false, 'publication' => false), $atts);\n\t// No ID value\n\tif(strcmp($a['handle'], '-1') == 0){\n\t\t\treturn \"\";\n\t}\n\t$handle=$a['handle'];\n\t$default_image = $a['default_image'];\n\t$display = $a['display'];\n\t$offset = $a['offset'];\n\t$total = $a['total'];\n\t$list = $a['list'] =='false' ? false: $a['list'];\n\t$publication = $a['publication'] =='false' ? false: $a['publication'];\n\n\t$data = file_get_contents(\"https://medium.com/\".$handle.\"/latest?format=json\");\n\n\t$data = str_replace(\"])}while(1);\", \"\", $data);\n\tif($publication) {\n\t\t\n\t\t//If handle provided is specified as a publication\n\t\t$json = json_decode($data);\n\t\t$items = array();\n\t\t$count = 0;\n\t\t$name = '';\n\t\tif(isset($json->payload->posts))\n\t\t{\n\t\t\t$posts = $json->payload->posts;\n\t\n\t\t\tforeach($posts as $post)\n\t\t\t{\n\t\t\t\t$name = $post->creatorId;\n\t\t\t\tif($count <= 2) {\n\n\t\t\t\t\tif(strlen($post->title) >= 40) {\n\t\t\t\t\t\t$items[$count]['title'] = substr($post->title,0,40).'...';\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\t$items[$count]['title'] = $post->title;\t\n\t\t\t\t\t}\n\t\t\t\t\tif ($post->previewContent->bodyModel->paragraphs[2]->text == NUll) {\n\t\t\t\t\t$items[$count]['paragraphs'] = substr($post->previewContent->bodyModel->paragraphs[1]->text,0,90).'...';\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$items[$count]['paragraphs'] = substr($post->previewContent->bodyModel->paragraphs[2]->text,0,90).'...';\n\t\t\t\t\t}\n\t\t\t\t\t$items[$count]['name'] = json_decode(json_encode($json->payload->references->User->$name->name), True);\n\t\t\t\t\t$items[$count]['autherImg'] = json_decode(json_encode($json->payload->references->User->$name->imageId), True);\n\t\t\t\t\t$items[$count]['url'] = 'https://medium.com/'.$handle.'/'.$post->uniqueSlug;\n\t\t\t\t\t$items[$count]['subtitle'] = isset($post->content->subtitle) ? $post->content->subtitle : \"\";\n\t\t\t\t\tif(!empty($items[$count]['autherImg']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$image = '//cdn-images-1.medium.com/fit/c/60/60/'.$json->payload->references->User->$name->imageId;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$image = $default_image;\n\t\t\t\t\t}\n\n\t\t\t\t\t$items[$count]['image'] = $image;\n\t\t\t\t\t$items[$count]['duration'] = round($post->virtuals->readingTime);\n\t\t\t\t\t$items[$count]['date'] = isset($post->firstPublishedAt) ? date('d M Y', $post->firstPublishedAt/1000): \"\";\n\t\t\t\t}\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\tif($offset)\n\t\t\t{\n\t\t\t\t$items = array_slice($items, $offset); \n\t\t\t}\n\n\t\t\tif(count($items) > $total)\n\t\t\t{\n\t\t\t\t$items = array_slice($items, 0, $total); \n\t\t\t}\n\t\t}\n\t}\n\telse {\n\n\t\t$json = json_decode($data);\n\t\t$items = array();\n\t\t$count = 0;\n\t\t\n\t\tif(isset($json->payload->references->Post))\n\t\t{\n\t\t\t$posts = $json->payload->references->Post;\n\n\t\t\t\n\t\t\tforeach($posts as $post)\n\t\t\t{\t\t\t\n\t\t\t\tif($count <= 2 ) {\n\t\t\t\t\t$items[$count]['title'] = $post->title;\n\t\t\t\t\t$items[$count]['paragraphs'] = $post->previewContent->bodyModel->paragraphs[2]->text;\n\t\t\t\t\t$items[$count]['name'] = $json->payload->user->name;\n\t\t\t\t\t$items[$count]['autherImg'] = json_decode(json_encode($json->payload->references->User->$name->imageId), True);\n\t\t\t\t\t$items[$count]['url'] = 'https://medium.com/'.$handle.'/'.$post->uniqueSlug;\n\t\t\t\t\t$items[$count]['subtitle'] = isset($post->content->subtitle) ? $post->content->subtitle : \"\";\n\t\t\t\t\tif(!empty($items[$count]['autherImg']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$image = '//cdn-images-1.medium.com/fit/c/60/60/'.$json->payload->references->User->$name->imageId;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$image = $default_image;\n\t\t\t\t\t}\n\t\t\t\t\t$items[$count]['image'] = $image;\n\t\t\t\t\t$items[$count]['duration'] = round($post->virtuals->readingTime);\n\t\t\t\t\t$items[$count]['date'] = isset($post->firstPublishedAt) ? date('d M Y', $post->firstPublishedAt/1000): \"\";\n\t\t\t\t}\n\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\tif($offset)\n\t\t\t{\n\t\t\t\t$items = array_slice($items, $offset); \n\t\t\t}\n\n\t\t\tif(count($items) > $total)\n\t\t\t{\n\t\t\t\t$items = array_slice($items, 0, $total); \n\t\t\t}\n\t\t}\n\t}\n\t?>\n\t\n\tNo posts found!
    \";\n\t ?>\n\trulePRG();\n\t\t\n\t\t// fill data\n\t\t$this->fillMembers();\n\t\t$this->fillGroups();\n\t\t\n\t\t$this->calculateRecordCount();\n\n\t\t// build pagination block\n\t\t$this->buildPagination();\n\n\t\t$this->recSet = $this->dataSource->getList( $this->queryCommand );\n\n\t\tif( !$this->recSet ) {\n\t\t\tshowError( $this->dataSource->lastError() );\n\t\t}\n\n\t\t$this->fillGridData();\n\n\t\t//\tmust be called after fillGridData\n\t\t$this->fillSources();\n\t\t\n\t\t$this->buildSearchPanel();\n\t\t$this->fillFields();\n\n\t\t$this->addCommonJs();\n\t\t$this->addCommonHtml();\n\n\t\t$this->commonAssign();\t\n\t}","title":""},{"docid":"896483578a6d2f21e7c9ce7c5af65ef0","score":"0.5453157","text":"function p2_attachments()\r\n{\r\n\t\r\n\t$args = array(\r\n\t\t'post_type' => 'attachment',\r\n\t\t'post_parent' => get_the_ID()\r\n\t);\r\n\t$attachments = get_posts($args);\r\n\t\r\n\tif ( count($attachments) > 0 ):\r\n\r\n?>\r\n\t\t\r\n\t\t\t
    \r\n\t\t\t\t

    Attachments:

    \r\n\t\t\t\t\t
      \r\n\r\n\t\t\t\t\t\t
    • ID, '', true, false, basename($attachment->guid)) ?>
    • \r\n\r\n\t\t\t\t\t
    \r\n\t\t\t
    \r\n\t\t\r\narticle)) {\n\t\t\t$this->_data = array(\n\t\t\t\t'commentsToEditor' => $this->article->getCommentsToEditor()\n\t\t\t);\n\t\t}\n\t}","title":""},{"docid":"df725d19b3b436ab277a24aff17aa480","score":"0.5445297","text":"protected function prepareVars()\n {\n if ($this->formField->disabled) {\n $this->previewMode = true;\n }\n\n if ($this->previewMode) {\n $this->useCaption = false;\n }\n\n $this->vars['fileList'] = $fileList = $this->getFileList();\n $this->vars['singleFile'] = $fileList->first();\n $this->vars['displayMode'] = $this->getDisplayMode();\n $this->vars['emptyIcon'] = $this->getConfig('emptyIcon', 'icon-upload');\n $this->vars['imageHeight'] = $this->imageHeight;\n $this->vars['imageWidth'] = $this->imageWidth;\n $this->vars['acceptedFileTypes'] = $this->getAcceptedFileTypes(true);\n $this->vars['cssDimensions'] = $this->getCssDimensions();\n $this->vars['cssBlockDimensions'] = $this->getCssDimensions('block');\n $this->vars['useCaption'] = $this->useCaption;\n $this->vars['prompt'] = $this->getPromptText();\n }","title":""},{"docid":"69946713f3494532d3661281fb5e77f4","score":"0.54421407","text":"function get_attachments($posting_field_name)\n{\n\t$image_types=str_replace(',',', ',get_option('valid_images'));\n\n\trequire_lang('javascript');\n\trequire_javascript('javascript_swfupload');\n\trequire_css('swfupload');\n\n\trequire_code('files2');\n\t$max_attach_size=get_max_file_size(get_member(),$GLOBALS['SITE_DB']);\n\t$attach_size_field=form_input_hidden('MAX_FILE_SIZE',strval($max_attach_size));\n\n\t$num_attachments=post_param_integer('num_attachments',has_js()?1:3);\n\n\t$attachments=new ocp_tempcode();\n\tfor ($i=1;$i<=$num_attachments;$i++)\n\t{\n\t\t$attachments->attach(do_template('ATTACHMENT',array('_GUID'=>'c3b38ca70cbd1c5f9cf91bcae9ed1134','POSTING_FIELD_NAME'=>$posting_field_name,'I'=>strval($i))));\n\t}\n\n\tif (get_forum_type()=='ocf')\n\t{\n\t\trequire_code('ocf_groups');\n\t\trequire_lang('ocf');\n\t\t$max_attachments=ocf_get_member_best_group_property(get_member(),'max_attachments_per_post');\n\t} else $max_attachments=100;\n\n\t$attachment_template=do_template('ATTACHMENT',array('_GUID'=>'c3b38ca70cbd1c5f9cf91bcae9ed11dsds','POSTING_FIELD_NAME'=>$posting_field_name,'I'=>'__num_attachments__'));\n\t$attachments=do_template('ATTACHMENTS',array('_GUID'=>'054921e7c09412be479676759accf222','POSTING_FIELD_NAME'=>$posting_field_name,'ATTACHMENT_TEMPLATE'=>$attachment_template,'IMAGE_TYPES'=>$image_types,'ATTACHMENTS'=>$attachments,'MAX_ATTACHMENTS'=>strval($max_attachments),'NUM_ATTACHMENTS'=>strval($num_attachments)));\n\n\treturn array($attachments,$attach_size_field);\n}","title":""},{"docid":"516deae629b63aeb2d70765a2a0fa64b","score":"0.5423171","text":"function attach_to($display_id) { return; }","title":""},{"docid":"cd5a5db902e2c13b79fc7d5d9f7e7575","score":"0.5416422","text":"function display_post_attachments($post_id, $switch_attachment)\n{\n\tglobal $config, $is_auth;\n\n\tif (intval($switch_attachment) == 0 || intval($config['disable_attachments_mod']))\n\t{\n\t\treturn;\n\t}\n\n\tif ($is_auth['auth_download'] && $is_auth['auth_view'])\n\t{\n\t\tdisplay_attachments($post_id, 'postrow');\n\t}\n\telse\n\t{\n\t\t// Display Notice (attachment there but not having permissions to view it)\n\t\t// Not included because this would mean template and language file changes (at this stage this is not a wise step. ;))\n\t}\n}","title":""},{"docid":"78fc6b9db4e3128340fe170f85a6c470","score":"0.5395494","text":"function controller_attachment_create($page_name) {\n if (request_is_post()) {\n controller_attachment_submit($page_name);\n die();\n }\n $page = try_textblock_get($page_name);\n identity_require('textblock-attach', $page);\n\n // Initial attachment page. Rather empty.\n $view = array();\n $view['title'] = 'Ataseaza la pagina '.$page_name;\n $view['page_name'] = $page_name;\n $view['form_values'] = array();\n $view['form_errors'] = array();\n execute_view_die('views/attachment.php', $view);\n}","title":""},{"docid":"71a7432adda1fa544487dea487798096","score":"0.538727","text":"public function initializeView()\n {\n $this->view->assign('extConf', ObjectAccess::getGettableProperties($this->extConf));\n $this->view->assign('id', $GLOBALS['TSFE']->id);\n $this->view->assign('data', $this->configurationManager->getContentObject()->data);\n }","title":""},{"docid":"9419542682a434aa1fcb7bf100d43030","score":"0.53755105","text":"public function afterSetNode() {\n\n foreach ($this->attachment_types as $type) {\n $attachments[$type] = $this->extractMimeType($this->Layout->node, $type);\n }\n $this->Layout->node['Nodeattachments'] = $attachments;\n }","title":""},{"docid":"c9fa44170322e055d6928a0c4cf34abb","score":"0.536765","text":"public function sharedPageAttachments($type, &$attachments);","title":""},{"docid":"af28c6e2a39ebd85b36220d8d01b5815","score":"0.53598636","text":"function allow_fetch_attachments()\n {\n }","title":""},{"docid":"98eeb04322c86495a2b35a06fcbbd3c6","score":"0.53474057","text":"function BeforeShowEdit(&$xt, &$templatefile, $values, &$pageObject)\n{\n\n\t\t$data = array();\n$data[\"id_personal_repeat\"] = $values['id_group_repeat'];\n$data[\"flag\"] = \"2\";\n$rs = DB::Select(\"outbox_line\", $data );\n$rs1 = DB::Select(\"outbox_mail_alibaba\", $data );\n$rs2 = DB::Select(\"outbox_mail_aws\", $data );\n$rs3 = DB::Select(\"outbox_mail_mailchimp\", $data );\n$rs4 = DB::Select(\"outbox_telegram\", $data );\n$rs5 = DB::Select(\"outbox_whatsapp\", $data );\n\nif($rs->fetchAssoc() || $rs1->fetchAssoc() || $rs2->fetchAssoc() || $rs3->fetchAssoc() || $rs4->fetchAssoc() || $rs5->fetchAssoc()){\n\t$pageObject->hideField(\"id_group_repeat\");\n\t$pageObject->hideField(\"member_agenda_id\");\n\t$pageObject->hideField(\"dodate\");\n}\n\n\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}","title":""},{"docid":"032441661be7f76e58baa5375d522225","score":"0.5311933","text":"protected function initDisplayVars_table(){\r\n\t\t\r\n\t\t$this->objTable->setDefaultOrderby(\"title\");\r\n\t\t\r\n\t\t$pagingOptions = $this->objTable->getPagingOptions();\r\n\t\t\r\n\t\tif(!empty($this->layoutType)){\r\n\t\t\t$pagingOptions[\"layout_type\"] = $this->layoutType;\r\n\t\t}\r\n\t\t\r\n\t\t$response = $this->objLayouts->getArrLayoutsPaging($pagingOptions);\r\n\t\t\r\n\t\t$this->arrLayouts = $response[\"layouts\"];\r\n\t\t$pagingData = $response[\"paging\"];\r\n\t\t\r\n\t\t$urlLayouts = HelperUC::getViewUrl_LayoutsList();\r\n\t\t\r\n\t\t$this->objTable->setPagingData($urlLayouts, $pagingData);\r\n\t\t\r\n\t}","title":""},{"docid":"0d37a7ad89228dcdb6ed4b347ab51ebd","score":"0.5301552","text":"public function printData() {\n if (AttachmentManagement::validate($this->attachments, static::attachmentsMandatoryNumber)) {\n echo \"
    Tip Market : \" . get_class($this);\n echo \"
    Numar case lucratoare: \" . $this->caseLucratoare;\n echo \"
    Numar case disponibile: \" . static::case_disponibile;\n echo \"
    Dotari: \";\n if ($this->attachments != null) {\n foreach ($this->attachments as $key => $value) {\n echo $value . \", \";\n }\n }\n echo \"
    Profit initial: \" . static::profit_initial;\n echo \"
    Profit Final: \" . $this->calculateProfit();\n } else {\n echo \"You need to add some attachments\";\n }\n }","title":""},{"docid":"b382dc797c41b77d98c81aa9957d2592","score":"0.5273817","text":"function document_view($attachment){\n $data['attachment'] = $attachment;\n //print_r($data);\n $this->load->view('news/viewer_document',$data);\n }","title":""},{"docid":"bca14f8e53272e1d4884d933706b646b","score":"0.5270527","text":"public function process()\n\t{\t\n\t\t $lstVars = phpfox::getService('emailsystem.vars')->get();\n $editor= $this->getParam('idEditor');\n if($editor == null)\n {\n $editor = \"template_content\";\n }\n $this->template()->assign(\n array(\n 'lstVars' => $lstVars,\n 'editor' =>$editor,\n )\n );\n\t}","title":""},{"docid":"d20bcc0d8bff1e2b06cc9c1807b78302","score":"0.5251527","text":"function show_attachment_title($title=\"\",$data=\"\",$type=\"\") {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<\n\t

    {$title}

    \n\t
      \n\t\t\n\t\t\t
    • attachment'>\n\t\t\t\t{$file}\n\t\t\t
    • \n\t\t
      \n\t
    \n
    \r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}","title":""},{"docid":"baeb7ea7415a02f996ca7535eeda6090","score":"0.524874","text":"function preProcess(Vtiger_Request $request, $display=true) {\r\n\t\t//$logFusion =& LoggerManager::getLogger('fusion');\r\n\t\t$db = PearDatabase::getInstance();\n\t\t$recordId = $request->get('record');\r\n\t\t$moduleName = $request->getModule();\r\n\t\tif(!$this->record){\r\n\t\t\t$this->record = Vtiger_DetailView_Model::getInstance($moduleName, $recordId);\r\n\t\t}\r\n\t\t$recordModel = $this->record->getRecord();\r\n // To show recording link only if callstatus is 'completed' \r\n if($recordModel->get('callstatus') == 'completed') {\n\t $query=\"SELECT recordingurlfusion FROM vtiger_pbxmanager WHERE pbxmanagerid=?\";\n\t $result = $db->pquery($query,array($recordId));\r\n \t if ($result) {\r\n $rowData = $db->query_result_rowdata($result, 0, 'recordingurlfusion');\r\n\t\t$recordModel->set('recordingurl',$rowData['recordingurlfusion']); \r\n\t }\n \t} else {\n\t $recordModel->set('recordingurl', '');\n\t}\n return parent::preProcess($request, true);\r\n }","title":""},{"docid":"0c73346904e8986cee25494958139f76","score":"0.5239653","text":"function fetch_pagination_data()\n {\n\t\tglobal $TMPL, $FNS;\n\t\t\t\t\n\t\tif (preg_match(\"/\".LD.\"paginate\".RD.\"(.+?)\".LD.SLASH.\"paginate\".RD.\"/s\", $TMPL->tagdata, $match))\n\t\t{\n\t\t\tif ($TMPL->fetch_param('paginate_type') == 'field')\n\t\t\t{\n\t\t\t\tif (preg_match(\"/\".LD.\"multi_field\\=[\\\"'](.+?)[\\\"']\".RD.\"/s\", $TMPL->tagdata, $mmatch))\n\t\t\t\t{\n\t\t\t\t\t$this->multi_fields = $TMPL->fetch_simple_conditions($mmatch['1']);\n\t\t\t\t\t\n\t\t\t\t\t$this->field_pagination = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->paginate\t\t\t= TRUE;\n\t\t\t$this->paginate_data\t= $match['1'];\n\t\t\t\t\t\t\n\t\t\t$TMPL->tagdata = preg_replace(\"/\".LD.\"paginate\".RD.\".+?\".LD.SLASH.\"paginate\".RD.\"/s\", \"\", $TMPL->tagdata);\n\t\t}\n\t}","title":""},{"docid":"86b1d78d6d11cb10a6dccda733cefa66","score":"0.52162504","text":"public function add_template_vars()\n\t{\n\t\tif ( !$this->template_engine->assigned( 'pages' ) ) {\n\t\t\t$this->assign( 'pages', Posts::get( 'page_list' ) );\n\t\t}\n\t\t\n\t\t// add a recent comments variable, to remove need for plugin\n\t\tif (!$this->template_engine->assign( 'recent_comments' ) )\n\t\t{\n\t\t\t// this limits the list of recent comments to five items\n\t\t\t$this->assign( 'recent_comments', Comments::get( array('limit' => 5, 'status' => Comment::STATUS_APPROVED, 'type' => Comment::COMMENT, 'orderby' => 'date DESC' ) ) );\n\t\t}\n\t\t\n\t\tparent::add_template_vars();\n\t\t\n\t\t// assign variables to use with options\n\t\t\n\t}","title":""},{"docid":"f2ba546b880521b7bdbfef46ab4bf8e8","score":"0.5209462","text":"public function onLoadAttachmentConfig()\n {\n $fileModel = $this->getRelationModel();\n if (($fileId = post('file_id')) && ($file = $fileModel::find($fileId))) {\n $file = $this->decorateFileAttributes($file);\n\n $this->vars['file'] = $file;\n $this->vars['displayMode'] = $this->getDisplayMode();\n $this->vars['cssDimensions'] = $this->getCssDimensions();\n $this->vars['relationManageId'] = post('manage_id');\n $this->vars['relationField'] = post('_relation_field');\n\n return $this->makePartial('config_form');\n }\n\n throw new ApplicationException('Unable to find file, it may no longer exist');\n }","title":""},{"docid":"e5539a10843c03b8c97c68b8ad03cdf1","score":"0.5197265","text":"function initData() {\n\t\tif (isset($this->submission)) {\n\t\t\tparent::initData(array(\n\t\t\t\t'seriesId' => $this->submission->getSeriesId(),\n\t\t\t\t'seriesPosition' => $this->submission->getSeriesPosition(),\n\t\t\t\t'workType' => $this->submission->getWorkType(),\n\t\t\t));\n\t\t} else {\n\t\t\tparent::initData();\n\t\t}\n\t}","title":""},{"docid":"281201c72652e61f894ca2350919cd79","score":"0.5188058","text":"public function actionDefault() {\n\t\t\n\t\t// create available templates list\n\t\t$templateList = $this->paperboy->getTemplates();\n \t\t\n \t\t$templateSelect = $this->form->select(array(\n \t\t\t'values' => array_keys($templateList),\n \t\t\t'aliases' => array_values($templateList),\n \t\t\t'selected' => $this->newsletterTemplateID,\n \t\t\t'optionsOnly' =>true\n \t\t));\n \t\t$this->parser->setParserVar('templateSelect', $templateSelect);\n \t\t\n \t\t// create recipients list select\n \t\t$recipientLists = $this->paperboy->getRecipientLists();\n\t\t\n\t\t$newsletterSelect = $this->form->select(array(\n\t\t\t'values' => array_keys($recipientLists),\n\t\t\t'aliases' => array_values($recipientLists),\n\t\t\t'selected' => $this->newsletterID,\n\t\t\t'optionsOnly' =>true\n\t\t));\n\t\t$this->parser->setParserVar('newsletterSelect', $newsletterSelect);\n\n\t\t// create \"to\", \"cc\", \"bcc\" recipient selects\n\t\t$newsletterListSelect = $this->form->select(array(\n\t\t\t'values' => array_keys($recipientLists),\n\t\t\t'aliases' => array_values($recipientLists),\n\t\t\t'optionsOnly' =>true\n\t\t));\n\t\t$this->parser->setParserVar('newsletterListSelect', $newsletterListSelect);\n\t\t\n\t\t// create page list\n\t\t$this->parser->setParserVar('pageSelect', $this->makePageList());\n\t\t\n\t\t// create attachments panel content\n\t\t$this->attachmentsNr = count($this->newsletterAttachments);\n\t\t$this->parser->setParserVar('attachmentsNr', $this->attachmentsNr);\n\t\t$tplAttachment = $this->parser->getTemplate($this->templatesPath . 'cmt_paperboy_attach_file.tpl');\n\t\t$tplAttachedFile = $this->parser->getTemplate($this->templatesPath . 'cmt_paperboy_attached_file.tpl');\n\t\t$contentAttachments = '';\n\t\t\n\t\t$maxAttachments = $this->applicationSettings['maxAttachments'];\n\t\t$usedAttachmentsNr = count($this->newsletterAttachments);\n\t\t$unusedAttachmentsNr = $maxAttachments - $usedAttachmentsNr;\n\t\t$attachmentNr = 1;\n\n\t\tfor ($attachmentNr = 1; $attachmentNr <= $maxAttachments; $attachmentNr++) {\n\n\t\t\t$this->parser->setParservar('attachmentNr', $attachmentNr);\n\t\t\t\n\t\t\tif (isset($this->newsletterAttachments[$attachmentNr])) {\n\t\t\t\t$this->parser->setParservar('attachedFileName', $this->newsletterAttachments[$attachmentNr]['name']);\n\t\t\t\t\n\t\t\t\t$fileSizeParams = $this->fileHandler->formatFileSize($this->newsletterAttachments[$attachmentNr]['size']);\n\t\t\t\t$this->parser->setMultipleParserVars($fileSizeParams);\n\t\t\t\t\n\t\t\t\t$contentAttachments .= $this->parser->parse($tplAttachedFile);\n\t\t\t} else {\n\t\t\t\t$this->parser->deleteParservar('attachedFilename');\n\t\t\t\t$contentAttachments .= $this->parser->parse($tplAttachment);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->parser->setParserVar('contentAttachments', $contentAttachments);\n\n\t\t// show page\n\t\t$this->showPage($this->parser->parseTemplate($this->templatesPath . 'cmt_paperboy_editmail.tpl'));\n\t}","title":""},{"docid":"8828582717d5a72cab01f5ad0cc234fd","score":"0.51877666","text":"public function initContent()\n\t{\n\t\tparent::initContent();\n if(!$this->display_column_left && !$this->display_column_right && Configuration::get('STSN_PRODUCT_SECONDARY'))\n $this->context->smarty->assign(array( \n \t\t\t'HOOK_PRODUCT_SECONDARY_COLUMN' => Hook::exec('displayProductSecondaryColumn'), \n \t\t));\n $this->context->smarty->assign(array(\n 'show_brand_logo' => Configuration::get('STSN_SHOW_BRAND_LOGO'),\n ));\n\t}","title":""},{"docid":"45ee5c0cef241bec75cbd13499ce126e","score":"0.5173311","text":"public function processAttachments()\n {\n }","title":""},{"docid":"9db483985cd2646beb06960a56192f6b","score":"0.5173128","text":"function _display($aTemplate) {\r\n\t\tif (sizeof ( $this->_HSTemplate->_vars ) > 0) {\r\n\t\t\textract ( $this->_HSTemplate->_vars );\r\n\t\t}\r\n\t\t\r\n\t\tif (sizeof ( $this->_vars [HSTEMPLATE_DISPLAY_MAIN] ) > 0) {\r\n\t\t\textract ( $this->_vars [HSTEMPLATE_DISPLAY_MAIN] );\r\n\t\t}\r\n\t\t\r\n\t\tif (sizeof ( $this->_vars [$aTemplate] ) > 0) {\r\n\t\t\textract ( $this->_vars [$aTemplate] );\r\n\t\t}\r\n\t\t\r\n\t\tinclude_once ($this->_templates [$aTemplate]);\r\n\t\t\r\n\t\tif (sizeof ( $this->_vars [HSTEMPLATE_DISPLAY_MAIN] ) > 0) foreach ( $this->_vars [HSTEMPLATE_DISPLAY_MAIN] as $aKey => $aValue ) {\r\n\t\t\tunset ( $$aKey );\r\n\t\t}\r\n\t\t\r\n\t\tif (sizeof ( $this->_vars [$aTemplate] ) > 0) foreach ( $this->_vars [$aTemplate] as $aKey => $aValue ) {\r\n\t\t\tunset ( $$aKey );\r\n\t\t}\r\n\t}","title":""},{"docid":"22f36b521446bdfb1755d75fcf16defa","score":"0.5160693","text":"function announcement_show($announce=\"\",$author=\"\") {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<{$this->lang->words['announce_title']}: {$announce['announce_title']}\n
    \n

    {$this->lang->words['posted_by']} {parse template=\"userHoverCard\" group=\"global\" params=\"$author\"}

    \n
    \n\t
    \n\t\t
    \n\t\t
    \n\t\t\t{parse template=\"userInfoPane\" group=\"global\" params=\"$author, 'announcement', array( 'id2' => $announce['announce_id'] )\"}\n\t\t
    \n\t\t
    \n\t\t\t
    \n\t\t\t\t{$announce['announce_post']}\n\t\t\t
    \n\t\t\t\n\t\t
    \n\t
    \n
    \nsettings['disable_lightbox']\">\n{parse template=\"include_lightbox\" group=\"global\" params=\"\"}\n\n{parse template=\"include_highlighter\" group=\"global\" params=\"1\"}\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}","title":""},{"docid":"dadd11a75783ce7eb1a2470fea2a65e4","score":"0.51605207","text":"function alterDisplay(&$rows) {\n //CRM_Core_Error::debug_var('ReportDetail alterDisplay rows', $rows);\n\n static $fileRecords = [];\n\n if (empty($fileRecords)) {\n $sql = \"\n SELECT id, uri\n FROM civicrm_file;\n \";\n $files = CRM_Core_DAO::executeQuery($sql);\n\n while ($files->fetch()) {\n $fileRecords[$files->id] = CRM_Utils_File::cleanFileName($files->uri);\n }\n }\n\n foreach ($rows as $key => &$row) {\n if (strpos($row['field'][0], 'File Attachments') !== FALSE) {\n if (!empty($row['from'])) {\n $row['from'] = $fileRecords[$row['from']];\n }\n if (!empty($row['to'])) {\n $row['to'] = $fileRecords[$row['to']];\n }\n }\n }\n }","title":""},{"docid":"62ca4659d7ce236f85bd7e9087080c06","score":"0.51561797","text":"function buggm_list_attachment($ticket_id=false){\n if(!$ticket_id)\n $ticket_id=buggm_get_the_ticket_post_id ();\n $args = array(\n\t'post_type' => 'attachment',\n\t'numberposts' => null,\n\t'post_status' => null,\n\t'post_parent' => $ticket_id\n);\n \n $attachments = get_posts($args);\n if ($attachments) :\n \n echo \"